Version Description
- New: Twitter logo added to the top right of each tweet to fit with Twitter's display guidelines. Customize the logo on the "Style" tab, "Author" area or hide it using the settings on the "Customize" tab "Show/Hide" settings.
- New: Minified versions of JavaScript and CSS files now used.
- New: JavaScript file added to the source of the page only when the shortcode is used on the page.
- New: SVGs used for icons instead of Font Awesome font file. You can switch back to using the Font Awesome font file on the "Customize" tab, "Advanced" area.
- New: Tweets that are replies to the same account or mention the same account can be included in the feed by enabling the setting "Always include replies to self in the feed".
- New: Added a setting to completely disable Twitter intents widget.js file.
- Tweak: The HTML element used for icons has been switched from "i" to "span" for better accessibility.
- Tweak: Changed styling of media placeholder icons.
- Tweak: Combined widgets.js file with native JavaScript file for the plugin.
- Tweak: Twitter widgets.js will only be enqueued when "actions" are included in the feed.
- Tweak: Tweet text line height style set to 1.4.
- Fix: Bio text not displaying in header even when enabled.
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Twitter Feeds |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.4
- README.txt +15 -1
- css/ctf-admin-styles.css +215 -39
- css/ctf-styles.css +95 -44
- css/ctf-styles.min.css +1 -0
- custom-twitter-feed.php +112 -16
- img/carousel.png +0 -0
- img/ctf-icon-offer.jpg +0 -0
- img/ctf-icon.jpg +0 -0
- img/list.png +0 -0
- img/masonry.png +0 -0
- img/pro-notice.png +0 -0
- inc/CtfAdmin.php +300 -12
- inc/CtfFeed.php +349 -144
- inc/admin-hooks.php +1 -114
- inc/notices.php +252 -51
- js/ctf-admin-scripts.js +14 -2
- js/ctf-scripts.js +25 -0
- js/ctf-scripts.min.js +1 -0
- views/admin/customize.php +2 -0
- views/admin/display.php +16 -1
README.txt
CHANGED
@@ -5,7 +5,7 @@ Support Website: http://smashballoon/custom-twitter-feeds/
|
|
5 |
Tags: Twitter, Twitter feed, Tweets, Twitter widget, Custom Twitter Feed
|
6 |
Requires at least: 3.0
|
7 |
Tested up to: 5.2
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -237,6 +237,20 @@ Not many developers love providing support, but we're a rare breed here at Smash
|
|
237 |
7. To display a feed just copy and paste the shortcode into a widget or page
|
238 |
|
239 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
= 1.3 =
|
241 |
* New: You can now choose to only display a certain amount of text characters in your Tweets, with a clickable link to display the rest. This is set to be 280 characters by default, but can be changed by using the following setting: Customize > Style > Tweet Text > Text Length, or by using the "textlength" shortcode setting.
|
242 |
* Tweak: Twitter intents JavaScript not loaded on the page if tweet actions are removed
|
5 |
Tags: Twitter, Twitter feed, Tweets, Twitter widget, Custom Twitter Feed
|
6 |
Requires at least: 3.0
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 1.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
237 |
7. To display a feed just copy and paste the shortcode into a widget or page
|
238 |
|
239 |
== Changelog ==
|
240 |
+
= 1.4 =
|
241 |
+
* New: Twitter logo added to the top right of each tweet to fit with Twitter's display guidelines. Customize the logo on the "Style" tab, "Author" area or hide it using the settings on the "Customize" tab "Show/Hide" settings.
|
242 |
+
* New: Minified versions of JavaScript and CSS files now used.
|
243 |
+
* New: JavaScript file added to the source of the page only when the shortcode is used on the page.
|
244 |
+
* New: SVGs used for icons instead of Font Awesome font file. You can switch back to using the Font Awesome font file on the "Customize" tab, "Advanced" area.
|
245 |
+
* New: Tweets that are replies to the same account or mention the same account can be included in the feed by enabling the setting "Always include replies to self in the feed".
|
246 |
+
* New: Added a setting to completely disable Twitter intents widget.js file.
|
247 |
+
* Tweak: The HTML element used for icons has been switched from "i" to "span" for better accessibility.
|
248 |
+
* Tweak: Changed styling of media placeholder icons.
|
249 |
+
* Tweak: Combined widgets.js file with native JavaScript file for the plugin.
|
250 |
+
* Tweak: Twitter widgets.js will only be enqueued when "actions" are included in the feed.
|
251 |
+
* Tweak: Tweet text line height style set to 1.4.
|
252 |
+
* Fix: Bio text not displaying in header even when enabled.
|
253 |
+
|
254 |
= 1.3 =
|
255 |
* New: You can now choose to only display a certain amount of text characters in your Tweets, with a clickable link to display the rest. This is set to be 280 characters by default, but can be changed by using the following setting: Customize > Style > Tweet Text > Text Length, or by using the "textlength" shortcode setting.
|
256 |
* Tweak: Twitter intents JavaScript not loaded on the page if tweet actions are removed
|
css/ctf-admin-styles.css
CHANGED
@@ -126,6 +126,10 @@
|
|
126 |
-o-transition: all 0.1s ease-in-out;
|
127 |
transition: all 0.1s ease-in-out;
|
128 |
}
|
|
|
|
|
|
|
|
|
129 |
/* Config info */
|
130 |
#ctf_config{
|
131 |
float: left;
|
@@ -235,8 +239,12 @@
|
|
235 |
border: 1px solid #6AB074;
|
236 |
color: #214F28;
|
237 |
}
|
|
|
|
|
|
|
|
|
238 |
.ctf_review_notice img{
|
239 |
-
width:
|
240 |
margin: 0 0 0 -100% !important;
|
241 |
|
242 |
-moz-border-radius: 4px;
|
@@ -247,14 +255,18 @@
|
|
247 |
float: left;
|
248 |
clear: none;
|
249 |
width: 100%;
|
250 |
-
padding:
|
251 |
}
|
252 |
.ctf_review_notice p{
|
253 |
float: left;
|
254 |
clear: both;
|
255 |
width: auto;
|
256 |
-
margin: 0 0 0
|
257 |
-
padding:
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
.ctf_review_notice a{
|
260 |
display: inline-block;
|
@@ -266,13 +278,13 @@
|
|
266 |
color: #0c7abf;
|
267 |
}
|
268 |
.ctf_review_notice .links{
|
269 |
-
margin: 0 0 0
|
270 |
padding: 4px 0 0 0;
|
|
|
271 |
}
|
272 |
-
.ctf_review_notice .
|
273 |
-
|
274 |
-
|
275 |
-
.ctf_review_notice .ctf_notice_close{
|
276 |
position: absolute;
|
277 |
top: 0;
|
278 |
right: 0;
|
@@ -283,6 +295,27 @@
|
|
283 |
.ctf_review_notice .ctf_notice_close:focus{
|
284 |
color: #a34100;
|
285 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
|
287 |
/* Customize tab */
|
288 |
#ctf-admin #ctf_width_options{
|
@@ -300,6 +333,10 @@
|
|
300 |
#ctf_admin .ctf_pro input{
|
301 |
color: #999 !important;
|
302 |
}
|
|
|
|
|
|
|
|
|
303 |
#ctf-admin .ctf_shortcode_table tr.ctf_pro{
|
304 |
background: #eacccc;
|
305 |
}
|
@@ -324,6 +361,174 @@
|
|
324 |
padding-top: 10px;
|
325 |
vertical-align: top;
|
326 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
|
328 |
#ctf-admin .ctf-quick-start{
|
329 |
display: block;
|
@@ -394,33 +599,4 @@
|
|
394 |
}
|
395 |
#toplevel_page_custom-twitter-feeds .dashicons-admin-generic:before {
|
396 |
content: "\f301";
|
397 |
-
}
|
398 |
-
|
399 |
-
/* Icons */
|
400 |
-
@font-face{
|
401 |
-
font-family:'FontAwesome';
|
402 |
-
src:url('../fonts/fontawesome-webfont.eot?v=4.6.1');
|
403 |
-
src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),
|
404 |
-
url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),
|
405 |
-
url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),
|
406 |
-
url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');
|
407 |
-
font-weight:normal;
|
408 |
-
font-style:normal
|
409 |
-
}
|
410 |
-
#ctf-admin .fa, .ctf_notice .fa{
|
411 |
-
display:inline-block;
|
412 |
-
font:normal normal normal 14px/1 FontAwesome;
|
413 |
-
font-size:inherit;
|
414 |
-
text-rendering:auto;
|
415 |
-
-webkit-font-smoothing:antialiased;
|
416 |
-
-moz-osx-font-smoothing:grayscale
|
417 |
-
}
|
418 |
-
#ctf-admin .fa-twitter:before{content:"\f099"}
|
419 |
-
#ctf-admin .fa-life-ring:before{content:"\f1cd"}
|
420 |
-
#ctf-admin .fa-envelope:before{content:"\f0e0"}
|
421 |
-
#ctf-admin .fa-rocket:before{content:"\f135"}
|
422 |
-
#ctf-admin .fa-chevron-circle-right:before{content:"\f138"}
|
423 |
-
#ctf-admin .fa-question-circle:before{content:"\f059"}
|
424 |
-
#ctf-admin .fa-check-circle:before{content:"\f058"}
|
425 |
-
.ctf_notice .fa-close:before{content:"\f00d"}
|
426 |
-
#ctf-admin .fa-question-circle:before{content:"\f059"}
|
126 |
-o-transition: all 0.1s ease-in-out;
|
127 |
transition: all 0.1s ease-in-out;
|
128 |
}
|
129 |
+
.ctf-note-after-input {
|
130 |
+
font-style: italic;
|
131 |
+
font-size: 12px;
|
132 |
+
}
|
133 |
/* Config info */
|
134 |
#ctf_config{
|
135 |
float: left;
|
239 |
border: 1px solid #6AB074;
|
240 |
color: #214F28;
|
241 |
}
|
242 |
+
.ctf_bfcm_sale_notice,
|
243 |
+
.ctf_new_user_sale_notice{
|
244 |
+
max-width: 672px;
|
245 |
+
}
|
246 |
.ctf_review_notice img{
|
247 |
+
width: 74px;
|
248 |
margin: 0 0 0 -100% !important;
|
249 |
|
250 |
-moz-border-radius: 4px;
|
255 |
float: left;
|
256 |
clear: none;
|
257 |
width: 100%;
|
258 |
+
padding: 0;
|
259 |
}
|
260 |
.ctf_review_notice p{
|
261 |
float: left;
|
262 |
clear: both;
|
263 |
width: auto;
|
264 |
+
margin: 0 0 0 90px !important;
|
265 |
+
padding: 2px 40px 2px 0;
|
266 |
+
line-height: 1.4;
|
267 |
+
}
|
268 |
+
.ctf_review_notice .ctf-links{
|
269 |
+
margin-top: 4px !important;
|
270 |
}
|
271 |
.ctf_review_notice a{
|
272 |
display: inline-block;
|
278 |
color: #0c7abf;
|
279 |
}
|
280 |
.ctf_review_notice .links{
|
281 |
+
margin: 0 0 0 82px !important;
|
282 |
padding: 4px 0 0 0;
|
283 |
+
margin-top: 6px !important;
|
284 |
}
|
285 |
+
.ctf_review_notice .ctf_notice_close,
|
286 |
+
.ctf_review_notice .ctf_bfcm_sale_notice_close,
|
287 |
+
.ctf_review_notice .ctf_new_user_sale_notice_close {
|
|
|
288 |
position: absolute;
|
289 |
top: 0;
|
290 |
right: 0;
|
295 |
.ctf_review_notice .ctf_notice_close:focus{
|
296 |
color: #a34100;
|
297 |
}
|
298 |
+
.ctf_review_notice .ctf_offer_btn {
|
299 |
+
padding: 4px 12px 6px 12px;
|
300 |
+
background: green;
|
301 |
+
color: #fff;
|
302 |
+
border-radius: 4px;
|
303 |
+
display: inline-block;
|
304 |
+
text-decoration: none;
|
305 |
+
margin-left: 0;
|
306 |
+
}
|
307 |
+
.ctf_review_notice .ctf_offer_btn:hover, .ctf_review_notice .ctf_offer_btn:focus {
|
308 |
+
background: #049404;
|
309 |
+
color: #fff;
|
310 |
+
}
|
311 |
+
.ctf_review_notice .ctf_other_notice{
|
312 |
+
padding-top: 10px;
|
313 |
+
font-style: italic;
|
314 |
+
font-size: 12px;
|
315 |
+
}
|
316 |
+
.ctf_review_notice .ctf_other_notice a{
|
317 |
+
padding: 0;
|
318 |
+
}
|
319 |
|
320 |
/* Customize tab */
|
321 |
#ctf-admin #ctf_width_options{
|
333 |
#ctf_admin .ctf_pro input{
|
334 |
color: #999 !important;
|
335 |
}
|
336 |
+
#ctf-admin .ctf_pro .ctf_layout_cell:first-child label,
|
337 |
+
#ctf-admin .ctf_pro .ctf_layout_type_list {
|
338 |
+
color: initial !important;
|
339 |
+
}
|
340 |
#ctf-admin .ctf_shortcode_table tr.ctf_pro{
|
341 |
background: #eacccc;
|
342 |
}
|
361 |
padding-top: 10px;
|
362 |
vertical-align: top;
|
363 |
}
|
364 |
+
#ctf-admin .ctf_pro .ctf_layout_cell img{
|
365 |
+
opacity: 0.4;
|
366 |
+
}
|
367 |
+
#ctf-admin .ctf_pro .ctf_layout_cell:first-child img {
|
368 |
+
opacity: 1 !important;
|
369 |
+
}
|
370 |
+
#ctf-admin .ctf_pro input,
|
371 |
+
#ctf-admin .ctf_pro select {
|
372 |
+
color: #999 !important;
|
373 |
+
}
|
374 |
+
#ctf-admin .ctf_lock {
|
375 |
+
display: none;
|
376 |
+
padding: 8px 10px 8px 13px;
|
377 |
+
position: absolute;
|
378 |
+
top: 50%;
|
379 |
+
left: 50%;
|
380 |
+
margin-top: -4px;
|
381 |
+
margin-left: -34px;
|
382 |
+
background: rgba(255,255,255,0.8);
|
383 |
+
border-radius: 5px;
|
384 |
+
box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
|
385 |
+
color: #333;
|
386 |
+
z-index: 99;
|
387 |
+
font-size: 14px;
|
388 |
+
color: #666;
|
389 |
+
font-weight: 700;
|
390 |
+
text-decoration: none;
|
391 |
+
border: 1px solid #ccc;
|
392 |
+
}
|
393 |
+
#ctf-admin .ctf_lock i {
|
394 |
+
margin-right: 6px;
|
395 |
+
}
|
396 |
+
#ctf-admin .ctf_pro .ctf_layout_cell:hover .ctf_lock{
|
397 |
+
display: block;
|
398 |
+
}
|
399 |
+
#ctf-admin .ctf_pro .ctf_layout_cell:first-child .ctf_lock,
|
400 |
+
#ctf-admin .ctf_pro .ctf_layout_cell:first-child:hover .ctf_lock {
|
401 |
+
display: none;
|
402 |
+
}
|
403 |
+
|
404 |
+
/* Layout */
|
405 |
+
.form-table .ctf_layout_type {
|
406 |
+
display: inline-block;
|
407 |
+
margin-left: 20px;
|
408 |
+
}
|
409 |
+
.form-table .ctf_layout_type:first-child {
|
410 |
+
margin-left: 0;
|
411 |
+
}
|
412 |
+
.ctf_layout_setting,
|
413 |
+
.ctf_box_setting{
|
414 |
+
margin-bottom: 20px;
|
415 |
+
}
|
416 |
+
.ctf_layout_setting:last-child,
|
417 |
+
.ctf_box_setting:last-child {
|
418 |
+
margin-bottom: 0;
|
419 |
+
}
|
420 |
+
.ctf_layout_setting label,
|
421 |
+
.ctf_box_setting label {
|
422 |
+
display: inline-block;
|
423 |
+
font-weight: bold;
|
424 |
+
font-size: 14px;
|
425 |
+
padding-bottom: 5px;
|
426 |
+
padding-right: 5px;
|
427 |
+
}
|
428 |
+
#ctf-admin .ctf_layout_options_wrap .ctf_shortcode_symbol{
|
429 |
+
bottom: 4px;
|
430 |
+
right: -20px;
|
431 |
+
}
|
432 |
+
#ctf-admin .ctf_layout_options_wrap .ctf_shortcode,
|
433 |
+
#ctf-admin .ctf_box_setting .ctf_shortcode{
|
434 |
+
position: relative;
|
435 |
+
float: none;
|
436 |
+
top: -4px
|
437 |
+
}
|
438 |
+
|
439 |
+
.ctf_layout_cell {
|
440 |
+
position: relative;
|
441 |
+
padding: 0;
|
442 |
+
display: inline-block;
|
443 |
+
float: left;
|
444 |
+
width: 155px;
|
445 |
+
padding: 15px 15px 10px 15px;
|
446 |
+
margin-right: 10px;
|
447 |
+
background: #f6f6f6;
|
448 |
+
border: 1px solid #ddd;
|
449 |
+
-moz-border-radius: 5px;
|
450 |
+
-webkit-border-radius: 5px;
|
451 |
+
border-radius: 5px;
|
452 |
+
vertical-align: top;
|
453 |
+
}
|
454 |
+
.ctf_layout_cell:nth-child(4) {
|
455 |
+
margin-right: 0;
|
456 |
+
}
|
457 |
+
@media all and (max-width: 1200px){
|
458 |
+
.ctf_layout_cell{
|
459 |
+
width: 21%;
|
460 |
+
padding: 1%;
|
461 |
+
margin-right: 1%;
|
462 |
+
}
|
463 |
+
}
|
464 |
+
@media all and (max-width: 480px){
|
465 |
+
.ctf_layout_cell{
|
466 |
+
width: 98%;
|
467 |
+
padding: 1%;
|
468 |
+
margin: 5px 0;
|
469 |
+
}
|
470 |
+
}
|
471 |
+
.ctf_label {
|
472 |
+
font-size: 16px;
|
473 |
+
font-weight: bold;
|
474 |
+
padding-left: 2px;
|
475 |
+
}
|
476 |
+
.ctf_layout_cell:hover,
|
477 |
+
.ctf_layout_cell:focus{
|
478 |
+
background: #fcfcfc;
|
479 |
+
cursor: pointer;
|
480 |
+
}
|
481 |
+
.ctf_layout_cell.ctf_layout_selected{
|
482 |
+
background: #f7faf1;
|
483 |
+
border: 1px solid #7ad03a;
|
484 |
+
}
|
485 |
+
.ctf_layout_cell h3{
|
486 |
+
font-size: 15px;
|
487 |
+
margin-top: 0;
|
488 |
+
}
|
489 |
+
.ctf_layout_cell img{
|
490 |
+
width: 100%;
|
491 |
+
border: 1px solid #ddd;
|
492 |
+
margin-top: 5px;
|
493 |
+
}
|
494 |
+
|
495 |
+
#ctf-admin #ctf_width_options{
|
496 |
+
margin-top: 5px;
|
497 |
+
display: none;
|
498 |
+
}
|
499 |
+
#ctf-admin #ctf_width_options label {
|
500 |
+
font-size: 13px;
|
501 |
+
position: relative;
|
502 |
+
top: -2px;
|
503 |
+
}
|
504 |
+
#ctf-admin .ctf_layout_settings{
|
505 |
+
float: left;
|
506 |
+
clear: both;
|
507 |
+
width: 96%;
|
508 |
+
|
509 |
+
padding: 20px 2%;
|
510 |
+
margin: 10px 0;
|
511 |
+
font-size: 13px;
|
512 |
+
background: #f9f9f9;
|
513 |
+
background: rgba(255,255,255,0.8);
|
514 |
+
|
515 |
+
-moz-border-radius: 8px;
|
516 |
+
-webkit-border-radius: 8px;
|
517 |
+
border-radius: 8px;
|
518 |
+
}
|
519 |
+
.ctf_layout_setting {
|
520 |
+
clear:left;
|
521 |
+
margin-bottom: 10px;
|
522 |
+
}
|
523 |
+
#ctf-admin .ctf_layout_options_wrap .ctf-tooltip{
|
524 |
+
width: 98%;
|
525 |
+
padding: 10px 1%;
|
526 |
+
background: #eee;
|
527 |
+
background: rgba(0,0,0,0.05);
|
528 |
+
}
|
529 |
+
#ctf-admin .ctf_layout_mobile_layout_setting {
|
530 |
+
width: auto;
|
531 |
+
}
|
532 |
|
533 |
#ctf-admin .ctf-quick-start{
|
534 |
display: block;
|
599 |
}
|
600 |
#toplevel_page_custom-twitter-feeds .dashicons-admin-generic:before {
|
601 |
content: "\f301";
|
602 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/ctf-styles.css
CHANGED
@@ -100,15 +100,24 @@
|
|
100 |
-moz-border-radius: 40px;
|
101 |
-webkit-border-radius: 40px;
|
102 |
border-radius: 40px;
|
|
|
103 |
}
|
104 |
#ctf .ctf-header-img-hover .fa,
|
105 |
-
#ctf .ctf-header-generic-icon .fa
|
|
|
|
|
106 |
position: absolute;
|
107 |
top: 50%;
|
108 |
left: 50%;
|
109 |
margin-top: -10px;
|
110 |
margin-left: -8px;
|
111 |
font-size: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
/* Header text */
|
114 |
#ctf .ctf-header-text{
|
@@ -136,6 +145,7 @@
|
|
136 |
}
|
137 |
#ctf .ctf-header-text .ctf-header-bio{
|
138 |
padding: 0 !important;
|
|
|
139 |
}
|
140 |
#ctf .ctf-header-text .ctf-verified{
|
141 |
margin-right: 5px;
|
@@ -160,7 +170,8 @@
|
|
160 |
-o-transition: background 0.6s ease-in-out;
|
161 |
transition: background 0.6s ease-in-out;
|
162 |
}
|
163 |
-
#ctf .ctf-header .ctf-header-follow .fa
|
|
|
164 |
margin-right: 3px;
|
165 |
font-size: 12px;
|
166 |
}
|
@@ -221,6 +232,7 @@
|
|
221 |
width: 0 !important;
|
222 |
height: 0 !important;
|
223 |
line-height: 0 !important;
|
|
|
224 |
}
|
225 |
|
226 |
/* No bio */
|
@@ -314,11 +326,21 @@
|
|
314 |
#ctf p.ctf-media-link {
|
315 |
padding: 0 !important;
|
316 |
margin: 0 !important;
|
|
|
317 |
}
|
318 |
#ctf .ctf-tweet-content,
|
319 |
#ctf .ctf-tweet-actions{
|
320 |
margin-left: 58px;
|
321 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
/* No avatar */
|
323 |
#ctf .ctf-hide-avatar .ctf-context,
|
324 |
#ctf .ctf-hide-avatar .ctf-tweet-content,
|
@@ -428,14 +450,14 @@
|
|
428 |
#ctf .ctf-tweet-text-media-wrap,
|
429 |
#ctf .ctf-quoted-tweet-text-media-wrap{
|
430 |
margin-left: 5px;
|
431 |
-
padding:
|
432 |
display: inline-block;
|
433 |
border: 1px solid #ddd;
|
434 |
border: 1px solid rgba(0,0,0,0.15);
|
435 |
|
436 |
color: inherit;
|
437 |
text-decoration: none;
|
438 |
-
line-height: 1
|
439 |
|
440 |
-moz-border-radius: 2px;
|
441 |
-webkit-border-radius: 2px;
|
@@ -446,10 +468,6 @@
|
|
446 |
-o-transition: background 0.1s ease-in-out;
|
447 |
transition: background 0.1s ease-in-out;
|
448 |
}
|
449 |
-
#ctf .ctf-tweet-text-media-wrap .fa,
|
450 |
-
#ctf .ctf-quoted-tweet-text-media-wrap .fa{
|
451 |
-
padding-left: 3px;
|
452 |
-
}
|
453 |
#ctf .ctf-tweet-text-media-wrap:hover,
|
454 |
#ctf .ctf-tweet-text-media-wrap:focus{
|
455 |
background: #eee;
|
@@ -462,6 +480,10 @@
|
|
462 |
-o-transition: background 0.1s ease-in-out;
|
463 |
transition: background 0.1s ease-in-out;
|
464 |
}
|
|
|
|
|
|
|
|
|
465 |
|
466 |
/* Load more */
|
467 |
#ctf #ctf-more{
|
@@ -496,7 +518,7 @@
|
|
496 |
-o-transition: background 0.1s ease-in-out;
|
497 |
transition: background 0.1s ease-in-out;
|
498 |
}
|
499 |
-
#ctf #ctf-more.ctf-loading span{
|
500 |
-moz-transition: opacity 0.5s ease-in-out;
|
501 |
-webkit-transition: opacity 0.5s ease-in-out;
|
502 |
-o-transition: opacity 0.5s ease-in-out;
|
@@ -514,10 +536,10 @@
|
|
514 |
top: 50%;
|
515 |
left: 50%;
|
516 |
margin: -10px 0 0 -10px;
|
517 |
-
background-color:
|
518 |
background-color: rgba(0,0,0,0.5);
|
519 |
|
520 |
-
border-radius: 100%;
|
521 |
-webkit-animation: ctf-sk-scaleout 1.0s infinite ease-in-out;
|
522 |
animation: ctf-sk-scaleout 1.0s infinite ease-in-out;
|
523 |
}
|
@@ -529,14 +551,14 @@
|
|
529 |
}
|
530 |
}
|
531 |
@keyframes ctf-sk-scaleout {
|
532 |
-
0% {
|
533 |
-webkit-transform: scale(0);
|
534 |
transform: scale(0);
|
535 |
} 100% {
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
}
|
541 |
|
542 |
/* Credit link */
|
@@ -548,10 +570,44 @@
|
|
548 |
text-align: center;
|
549 |
font-size: 12px;
|
550 |
}
|
551 |
-
.ctf-credit-link .fa
|
|
|
552 |
margin-right: 4px;
|
553 |
}
|
554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
/* Default styles */
|
556 |
#ctf.ctf-styles .ctf-author-screenname,
|
557 |
#ctf.ctf-styles .ctf-context,
|
@@ -585,6 +641,28 @@
|
|
585 |
display: block;
|
586 |
padding: 4px;
|
587 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
|
589 |
/* Out of tweets */
|
590 |
#ctf .ctf-out-of-tweets{
|
@@ -705,33 +783,6 @@
|
|
705 |
margin-top: 3px;
|
706 |
}
|
707 |
|
708 |
-
/* Icons */
|
709 |
-
@font-face{
|
710 |
-
font-family:'FontAwesome';
|
711 |
-
src:url('../fonts/fontawesome-webfont.eot?v=4.6.1');
|
712 |
-
src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),
|
713 |
-
url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),
|
714 |
-
url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),
|
715 |
-
url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');
|
716 |
-
font-weight:normal;
|
717 |
-
font-style:normal
|
718 |
-
}
|
719 |
-
#ctf .fa{
|
720 |
-
display:inline-block;
|
721 |
-
font:normal normal normal 14px/1 FontAwesome;
|
722 |
-
font-size:inherit;
|
723 |
-
text-rendering:auto;
|
724 |
-
-webkit-font-smoothing:antialiased;
|
725 |
-
-moz-osx-font-smoothing:grayscale
|
726 |
-
}
|
727 |
-
#ctf .fa-retweet:before{content:"\f079"}
|
728 |
-
#ctf .fa-reply:before{content:"\f112"}
|
729 |
-
#ctf .fa-heart:before{content:"\f004"}
|
730 |
-
#ctf .fa-check-circle:before{content:"\f058"}
|
731 |
-
#ctf .fa-twitter:before{content:"\f099"}
|
732 |
-
#ctf .fa-file-video-o:before{content:"\f1c8"}
|
733 |
-
#ctf .fa-picture-o:before{content:"\f03e"}
|
734 |
-
|
735 |
/* On mobile make the min-width 100% */
|
736 |
@media all and (max-width: 640px){
|
737 |
#ctf.ctf-width-resp{
|
100 |
-moz-border-radius: 40px;
|
101 |
-webkit-border-radius: 40px;
|
102 |
border-radius: 40px;
|
103 |
+
z-index: 999;
|
104 |
}
|
105 |
#ctf .ctf-header-img-hover .fa,
|
106 |
+
#ctf .ctf-header-generic-icon .fa,
|
107 |
+
#ctf .ctf-header-img-hover svg,
|
108 |
+
#ctf .ctf-header-generic-icon svg{
|
109 |
position: absolute;
|
110 |
top: 50%;
|
111 |
left: 50%;
|
112 |
margin-top: -10px;
|
113 |
margin-left: -8px;
|
114 |
font-size: 20px;
|
115 |
+
z-index: 1000;
|
116 |
+
}
|
117 |
+
#ctf .ctf-header-img-hover svg,
|
118 |
+
#ctf .ctf-header-generic-icon svg {
|
119 |
+
margin-top: -10px;
|
120 |
+
margin-left: -10px;
|
121 |
}
|
122 |
/* Header text */
|
123 |
#ctf .ctf-header-text{
|
145 |
}
|
146 |
#ctf .ctf-header-text .ctf-header-bio{
|
147 |
padding: 0 !important;
|
148 |
+
word-break: break-word;
|
149 |
}
|
150 |
#ctf .ctf-header-text .ctf-verified{
|
151 |
margin-right: 5px;
|
170 |
-o-transition: background 0.6s ease-in-out;
|
171 |
transition: background 0.6s ease-in-out;
|
172 |
}
|
173 |
+
#ctf .ctf-header .ctf-header-follow .fa,
|
174 |
+
#ctf .ctf-header .ctf-header-follow svg{
|
175 |
margin-right: 3px;
|
176 |
font-size: 12px;
|
177 |
}
|
232 |
width: 0 !important;
|
233 |
height: 0 !important;
|
234 |
line-height: 0 !important;
|
235 |
+
text-align: left !important;
|
236 |
}
|
237 |
|
238 |
/* No bio */
|
326 |
#ctf p.ctf-media-link {
|
327 |
padding: 0 !important;
|
328 |
margin: 0 !important;
|
329 |
+
line-height: 1.4;
|
330 |
}
|
331 |
#ctf .ctf-tweet-content,
|
332 |
#ctf .ctf-tweet-actions{
|
333 |
margin-left: 58px;
|
334 |
}
|
335 |
+
#ctf .ctf-corner-logo {
|
336 |
+
display: inline-block;
|
337 |
+
float: right;
|
338 |
+
color: #1b95e0;
|
339 |
+
font-size: 24px;
|
340 |
+
}
|
341 |
+
#ctf.ctf-narrow .ctf-corner-logo {
|
342 |
+
font-size: 20px;
|
343 |
+
}
|
344 |
/* No avatar */
|
345 |
#ctf .ctf-hide-avatar .ctf-context,
|
346 |
#ctf .ctf-hide-avatar .ctf-tweet-content,
|
450 |
#ctf .ctf-tweet-text-media-wrap,
|
451 |
#ctf .ctf-quoted-tweet-text-media-wrap{
|
452 |
margin-left: 5px;
|
453 |
+
padding: 4px;
|
454 |
display: inline-block;
|
455 |
border: 1px solid #ddd;
|
456 |
border: 1px solid rgba(0,0,0,0.15);
|
457 |
|
458 |
color: inherit;
|
459 |
text-decoration: none;
|
460 |
+
line-height: 1;
|
461 |
|
462 |
-moz-border-radius: 2px;
|
463 |
-webkit-border-radius: 2px;
|
468 |
-o-transition: background 0.1s ease-in-out;
|
469 |
transition: background 0.1s ease-in-out;
|
470 |
}
|
|
|
|
|
|
|
|
|
471 |
#ctf .ctf-tweet-text-media-wrap:hover,
|
472 |
#ctf .ctf-tweet-text-media-wrap:focus{
|
473 |
background: #eee;
|
480 |
-o-transition: background 0.1s ease-in-out;
|
481 |
transition: background 0.1s ease-in-out;
|
482 |
}
|
483 |
+
.ctf-multi-media-icon .ctf-tweet-text-media,
|
484 |
+
.ctf-quoted-tweet-text .ctf-tweet-text-media{
|
485 |
+
margin-left: 3px;
|
486 |
+
}
|
487 |
|
488 |
/* Load more */
|
489 |
#ctf #ctf-more{
|
518 |
-o-transition: background 0.1s ease-in-out;
|
519 |
transition: background 0.1s ease-in-out;
|
520 |
}
|
521 |
+
#ctf #ctf-more.ctf-loading span{
|
522 |
-moz-transition: opacity 0.5s ease-in-out;
|
523 |
-webkit-transition: opacity 0.5s ease-in-out;
|
524 |
-o-transition: opacity 0.5s ease-in-out;
|
536 |
top: 50%;
|
537 |
left: 50%;
|
538 |
margin: -10px 0 0 -10px;
|
539 |
+
background-color: unset;
|
540 |
background-color: rgba(0,0,0,0.5);
|
541 |
|
542 |
+
border-radius: 100%;
|
543 |
-webkit-animation: ctf-sk-scaleout 1.0s infinite ease-in-out;
|
544 |
animation: ctf-sk-scaleout 1.0s infinite ease-in-out;
|
545 |
}
|
551 |
}
|
552 |
}
|
553 |
@keyframes ctf-sk-scaleout {
|
554 |
+
0% {
|
555 |
-webkit-transform: scale(0);
|
556 |
transform: scale(0);
|
557 |
} 100% {
|
558 |
+
-webkit-transform: scale(1.0);
|
559 |
+
transform: scale(1.0);
|
560 |
+
opacity: 0;
|
561 |
+
}
|
562 |
}
|
563 |
|
564 |
/* Credit link */
|
570 |
text-align: center;
|
571 |
font-size: 12px;
|
572 |
}
|
573 |
+
.ctf-credit-link .fa,
|
574 |
+
.ctf-credit-link svg {
|
575 |
margin-right: 4px;
|
576 |
}
|
577 |
|
578 |
+
/* SVGs */
|
579 |
+
#ctf svg { box-sizing: unset; }
|
580 |
+
#ctf svg:not(:root).svg-inline--fa,
|
581 |
+
#ctf_lightbox svg:not(:root).svg-inline--fa{
|
582 |
+
box-sizing: unset;
|
583 |
+
overflow: visible;
|
584 |
+
width: 1em;
|
585 |
+
}
|
586 |
+
#ctf .svg-inline--fa.fa-w-16,
|
587 |
+
#ctf .svg-inline--fa.fa-w-16{
|
588 |
+
width: 16px;
|
589 |
+
}
|
590 |
+
#ctf .svg-inline--fa.fa-w-20 {
|
591 |
+
width: 20px;
|
592 |
+
}
|
593 |
+
#ctf .ctf-tweet-actions a.ctf-retweet svg,
|
594 |
+
#ctf .ctf-context .ctf-retweet-icon svg{
|
595 |
+
width: 1.2em;
|
596 |
+
}
|
597 |
+
#ctf .svg-inline--fa,
|
598 |
+
#ctf_lightbox .svg-inline--fa{
|
599 |
+
display: inline-block;
|
600 |
+
font-size: inherit;
|
601 |
+
height: 1em;
|
602 |
+
overflow: visible;
|
603 |
+
vertical-align: -.125em;
|
604 |
+
}
|
605 |
+
|
606 |
+
#ctf #ctf .ctf-photo-hover span.fa-arrows-alt,
|
607 |
+
#ctf .ctf-photo-hover svg.fa-arrows-alt {
|
608 |
+
display: none;
|
609 |
+
}
|
610 |
+
|
611 |
/* Default styles */
|
612 |
#ctf.ctf-styles .ctf-author-screenname,
|
613 |
#ctf.ctf-styles .ctf-context,
|
641 |
display: block;
|
642 |
padding: 4px;
|
643 |
}
|
644 |
+
.ctf_smash_error{
|
645 |
+
border: 1px solid #ddd;
|
646 |
+
background: #eee;
|
647 |
+
color: #333;
|
648 |
+
margin: 10px 0 0;
|
649 |
+
padding: 10px 15px;
|
650 |
+
font-size: 13px;
|
651 |
+
text-align: center;
|
652 |
+
clear: both;
|
653 |
+
|
654 |
+
-moz-border-radius: 4px;
|
655 |
+
-webkit-border-radius: 4px;
|
656 |
+
border-radius: 4px;
|
657 |
+
}
|
658 |
+
.ctf_smash_error p{
|
659 |
+
padding: 5px 0 !important;
|
660 |
+
margin: 0 !important;
|
661 |
+
line-height: 1.3 !important;
|
662 |
+
}
|
663 |
+
.ctf_smash_error span{
|
664 |
+
font-size: 12px;
|
665 |
+
}
|
666 |
|
667 |
/* Out of tweets */
|
668 |
#ctf .ctf-out-of-tweets{
|
783 |
margin-top: 3px;
|
784 |
}
|
785 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
/* On mobile make the min-width 100% */
|
787 |
@media all and (max-width: 640px){
|
788 |
#ctf.ctf-width-resp{
|
css/ctf-styles.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#ctf{overflow-y:auto;-ms-overflow-y:auto}#ctf .ctf-item{padding:15px 5px;border-top:1px solid #ddd;border-top:1px solid rgba(0,0,0,.1);overflow:hidden}#ctf .ctf-item:first-child{border-top:none}#ctf .ctf_remaining{display:none}#ctf .ctf_more{padding:1px;border:1px solid transparent;border-radius:3px;display:inline-block;line-height:1}#ctf .ctf_more:hover{cursor:pointer;background:rgba(0,0,0,.05);border:1px solid rgba(0,0,0,.1);text-decoration:none}#ctf .ctf-header{float:left;clear:both;margin:0;padding:5px 5px 15px 5px;line-height:1.2;width:100%;border-bottom:1px solid #ddd;border-bottom:1px solid rgba(0,0,0,.1);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#ctf .ctf-header a{float:left;display:block;min-width:100%\9}#ctf .ctf-header-img{float:left;position:relative;width:48px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#ctf .ctf-header-img img{display:block;float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#ctf .ctf-author-avatar{clear:both;margin:3px 6px 0 -53px}#ctf .ctf-author-name{margin-left:6px}#ctf .ctf-author-box{margin-left:53px}#ctf .ctf-header-img-hover,#ctf .ctf-header-generic-icon{display:none;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:#1b95e0;background:rgba(27,149,224,.85);-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px;z-index:999}#ctf .ctf-header-img-hover .fa,#ctf .ctf-header-generic-icon .fa,#ctf .ctf-header-img-hover svg,#ctf .ctf-header-generic-icon svg{position:absolute;top:50%;left:50%;margin-top:-10px;margin-left:-8px;font-size:20px;z-index:1000}#ctf .ctf-header-img-hover svg,#ctf .ctf-header-generic-icon svg{margin-top:-10px;margin-left:-10px}#ctf .ctf-header-text{float:left;width:100%;padding-top:5px}#ctf .ctf-no-bio .ctf-header-text{padding-top:13px}#ctf .ctf-header a{text-decoration:none}#ctf .ctf-header-text .ctf-header-user,#ctf .ctf-header-text p{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#ctf .ctf-header-name{font-weight:700;margin-right:6px}#ctf .ctf-header-text .ctf-header-bio{padding:0!important;word-break:break-word}#ctf .ctf-header-text .ctf-verified{margin-right:5px}#ctf .ctf-header .ctf-header-follow{display:inline-block;padding:3px 6px;margin:0 0 0 2px;position:relative;top:-2px;background:#1b95e0;color:#fff;font-size:11px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-transition:background 0.6s ease-in-out;-webkit-transition:background 0.6s ease-in-out;-o-transition:background 0.6s ease-in-out;transition:background 0.6s ease-in-out}#ctf .ctf-header .ctf-header-follow .fa,#ctf .ctf-header .ctf-header-follow svg{margin-right:3px;font-size:12px}#ctf .ctf-header a:hover .ctf-header-follow{background:#0c7abf;-moz-transition:background 0.2s ease-in-out;-webkit-transition:background 0.2s ease-in-out;-o-transition:background 0.2s ease-in-out;transition:background 0.2s ease-in-out}#ctf .ctf-header-type-generic .ctf-header-img{color:#fff;width:48px;height:48px;position:relative}#ctf .ctf-header-type-generic .ctf-header-link:hover .ctf-header-generic-icon{background:#0c7abf}#ctf .ctf-header-type-generic .ctf-header-no-bio{padding-top:9px!important;font-size:16px;font-weight:700}#ctf .ctf-header-type-generic .ctf-header-generic-icon{display:block;color:#fff;background:#1b95e0;-moz-transition:background 0.2s ease-in-out;-webkit-transition:background 0.2s ease-in-out;-o-transition:background 0.2s ease-in-out;transition:background 0.2s ease-in-out}#ctf .ctf-header-type-generic:hover .ctf-header-generic-icon{display:block;opacity:1}#ctf .ctf-header .ctf-header-user{font-size:16px;line-height:1.3;-ms-word-wrap:break-word;word-break:break-word}#ctf .ctf-header p,#ctf .ctf-header .ctf-header-screenname{font-size:13px;line-height:1.3}.ctf-screenreader{text-indent:-9999px!important;display:inline-block!important;width:0!important;height:0!important;line-height:0!important;text-align:left!important}#ctf .ctf-header-text.sbi-no-info .ctf-header-user{padding-top:9px!important}#ctf .ctf-header-text.sbi-no-bio .ctf-header-counts{clear:both}#ctf .ctf-context{float:left;width:100%;margin-left:57px;margin-bottom:2px}#ctf .ctf-retweet-icon{display:inline-block;font-size:inherit;background:#19cf86;color:#fff!important;padding:1px 3px 3px 3px;line-height:1;margin:0 5px 0 0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#ctf .ctf-author-box{margin-left:56px}#ctf .ctf-author-avatar{width:48px;height:48px;margin:3px 6px 0 -56px;float:left;overflow:hidden;border:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}#ctf .ctf-author-avatar img{margin:0!important;padding:0}#ctf .ctf-author-name,#ctf .ctf-author-screenname,#ctf .ctf-verified,#ctf .ctf-tweet-meta{margin-left:4px;margin-right:4px;display:inline-block}#ctf .ctf-screename-sep{margin:0 2px;display:inline-block}#ctf .ctf-author-name{font-weight:bold!important;margin-top:4px}#ctf .ctf-author-box-link{color:black;text-decoration:none;display:inline;line-height:1.5!important}#ctf .ctf-verified,#ctf .ctf-quoted-verified{color:#77c7f7;margin-left:0}#ctf .ctf-quoted-verified{margin-right:4px}#ctf .ctf-tweet-meta{display:inline-block}#ctf .ctf-replied-to-text a{font-size:inherit;color:inherit;font-weight:inherit}#ctf p.ctf-tweet-text,#ctf p.ctf-media-link{padding:0!important;margin:0!important;line-height:1.4}#ctf .ctf-tweet-content,#ctf .ctf-tweet-actions{margin-left:58px}#ctf .ctf-corner-logo{display:inline-block;float:right;color:#1b95e0;font-size:24px}#ctf.ctf-narrow .ctf-corner-logo{font-size:20px}#ctf .ctf-hide-avatar .ctf-context,#ctf .ctf-hide-avatar .ctf-tweet-content,#ctf .ctf-hide-avatar .ctf-tweet-actions,#ctf .ctf-hide-avatar .ctf-quoted-tweet,#ctf .ctf-hide-avatar .ctf-author-box,#ctf.ctf-narrow .ctf-hide-avatar .ctf-context,#ctf.ctf-narrow .ctf-hide-avatar .ctf-tweet-content,#ctf.ctf-narrow .ctf-hide-avatar .ctf-tweet-actions,#ctf.ctf-narrow .ctf-hide-avatar .ctf-quoted-tweet,#ctf.ctf-narrow .ctf-hide-avatar .ctf-author-box,#ctf.ctf-super-narrow .ctf-hide-avatar .ctf-context,#ctf.ctf-super-narrow .ctf-hide-avatar .ctf-tweet-content,#ctf.ctf-super-narrow .ctf-hide-avatar .ctf-tweet-actions,#ctf.ctf-super-narrow .ctf-hide-avatar .ctf-quoted-tweet,#ctf.ctf-super-narrow .ctf-hide-avatar .ctf-author-box{margin-left:0}#ctf .ctf-quoted-tweet{display:block;clear:both;margin:7px 0 5px 58px;padding:8px 12px;border:1px solid #ddd;border:1px solid rgba(0,0,0,.1);text-decoration:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}#ctf .ctf-quoted-tweet:hover,#ctf .ctf-quoted-tweet:focus{background:#eee;background:rgba(0,0,0,.05);border:1px solid #ddd;border:1px solid rgba(0,0,0,.05);-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}#ctf .ctf-quoted-author-name{font-weight:700;margin-right:4px}#ctf .ctf-quoted-tweet p{margin:2px 0}#ctf .ctf-tweet-actions a{padding:2px 10px 2px 5px;float:left}#ctf .ctf-tweet-actions a.ctf-reply,#ctf .ctf-tweet-actions a.ctf-retweet,#ctf .ctf-tweet-actions a.ctf-like{color:#bbb;color:rgba(0,0,0,.3);text-decoration:none;border:none;-moz-transition:color 0.1s ease-in-out;-webkit-transition:color 0.1s ease-in-out;-o-transition:color 0.1s ease-in-out;transition:color 0.1s ease-in-out}#ctf .ctf-tweet-actions .ctf-reply{margin-left:-5px}#ctf .ctf-tweet-actions a:hover,#ctf .ctf-tweet-actions a:focus{-moz-transition:color 0.1s ease-in-out;-webkit-transition:color 0.1s ease-in-out;-o-transition:color 0.1s ease-in-out;transition:color 0.1s ease-in-out}#ctf .ctf-tweet-actions .ctf-reply:hover,#ctf .ctf-tweet-actions .ctf-reply:focus{color:#E34F0E!important}#ctf .ctf-tweet-actions .ctf-retweet:hover,#ctf .ctf-tweet-actions .ctf-retweet:focus{color:#19cf86!important}#ctf .ctf-tweet-actions .ctf-like:hover,#ctf .ctf-tweet-actions .ctf-like:focus{color:#e81c4f!important}#ctf .ctf-action-count{display:none;float:right;padding-left:3px;font-weight:700;font-size:11px;line-height:14px}#ctf .ctf-tweet-text-media-wrap,#ctf .ctf-quoted-tweet-text-media-wrap{margin-left:5px;padding:4px;display:inline-block;border:1px solid #ddd;border:1px solid rgba(0,0,0,.15);color:inherit;text-decoration:none;line-height:1;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}#ctf .ctf-tweet-text-media-wrap:hover,#ctf .ctf-tweet-text-media-wrap:focus{background:#eee;background:rgba(0,0,0,.05);border:1px solid #ddd;border:1px solid rgba(0,0,0,.1);-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}.ctf-multi-media-icon .ctf-tweet-text-media,.ctf-quoted-tweet-text .ctf-tweet-text-media{margin-left:3px}#ctf #ctf-more{display:block;border:none;background:#eee;background:rgba(0,0,0,.05);width:100%;min-height:30px;padding:5px 0;margin:0;position:relative;text-align:center;box-sizing:border-box;outline:none;text-decoration:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}#ctf #ctf-more:hover{background:#ddd;background:rgba(0,0,0,.1);-moz-transition:background 0.1s ease-in-out;-webkit-transition:background 0.1s ease-in-out;-o-transition:background 0.1s ease-in-out;transition:background 0.1s ease-in-out}#ctf #ctf-more.ctf-loading span{-moz-transition:opacity 0.5s ease-in-out;-webkit-transition:opacity 0.5s ease-in-out;-o-transition:opacity 0.5s ease-in-out;transition:opacity 0.5s ease-in-out}#ctf #ctf-more.ctf-loading span{filter:alpha(opacity=0);opacity:0}#ctf .ctf-loader{width:20px;height:20px;position:absolute;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:unset;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:ctf-sk-scaleout 1.0s infinite ease-in-out;animation:ctf-sk-scaleout 1.0s infinite ease-in-out}@-webkit-keyframes ctf-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes ctf-sk-scaleout{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.ctf-credit-link{width:100%;clear:both;padding:5px 0;margin-top:5px;text-align:center;font-size:12px}.ctf-credit-link .fa,.ctf-credit-link svg{margin-right:4px}#ctf svg{box-sizing:unset}#ctf svg:not(:root).svg-inline--fa,#ctf_lightbox svg:not(:root).svg-inline--fa{box-sizing:unset;overflow:visible;width:1em}#ctf .svg-inline--fa.fa-w-16,#ctf .svg-inline--fa.fa-w-16{width:16px}#ctf .svg-inline--fa.fa-w-20{width:20px}#ctf .ctf-tweet-actions a.ctf-retweet svg,#ctf .ctf-context .ctf-retweet-icon svg{width:1.2em}#ctf .svg-inline--fa,#ctf_lightbox .svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}#ctf #ctf .ctf-photo-hover span.fa-arrows-alt,#ctf .ctf-photo-hover svg.fa-arrows-alt{display:none}#ctf.ctf-styles .ctf-author-screenname,#ctf.ctf-styles .ctf-context,#ctf.ctf-styles .ctf-twitterlink,#ctf.ctf-styles .ctf-tweet-meta{font-size:12px}#ctf .ctf-error{width:100%;text-align:center}#ctf .ctf-error p,#ctf .ctf-error iframe,#ctf .ctf-error code{padding:0;margin:0 2px}#ctf .ctf-error-user p{padding-bottom:5px}#ctf .ctf-error-user{width:100%}#ctf .ctf-error-admin{margin-top:15px;display:inline-block}#ctf .ctf-error code{display:block;padding:4px}.ctf_smash_error{border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.ctf_smash_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}.ctf_smash_error span{font-size:12px}#ctf .ctf-out-of-tweets{width:100%}#ctf .ctf-out-of-tweets{display:block;border:1px solid rgba(0,0,0,.1);background:none;background:none;width:100%;min-height:30px;padding:5px 0;margin:0;position:relative;text-align:center;box-sizing:border-box;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}#ctf .ctf-out-of-tweets p,#ctf .ctf-out-of-tweets iframe{margin:0 2px;padding:0}#ctf .ctf-out-of-tweets p{padding:3px;display:none}#ctf.ctf-narrow .ctf-author-avatar,#ctf.ctf-narrow .ctf-author-avatar img{width:38px;height:38px}#ctf.ctf-narrow .ctf-tweet-content,#ctf.ctf-narrow .ctf-tweet-actions,#ctf.ctf-narrow .ctf-quoted-tweet{margin-left:48px}#ctf.ctf-narrow .ctf-context{margin-left:49px}#ctf.ctf-narrow .ctf-author-box{margin-left:46px}#ctf.ctf-narrow .ctf-author-avatar{margin-left:-46px}#ctf.ctf-narrow .ctf-tweet-content{padding:3px 0 5px 0}#ctf.ctf-narrow .ctf-tweet-actions{float:left;clear:both}#ctf.ctf-super-narrow .ctf-context,#ctf.ctf-super-narrow .ctf-tweet-content,#ctf.ctf-super-narrow .ctf-tweet-actions,#ctf.ctf-super-narrow .ctf-quoted-tweet{margin-left:0}#ctf.ctf-super-narrow .ctf-author-box{min-height:32px;margin-bottom:2px}#ctf.ctf-super-narrow .ctf-author-avatar,#ctf.ctf-super-narrow .ctf-author-avatar img{width:32px;height:32px}#ctf.ctf-super-narrow .ctf-author-box{margin-left:38px;float:left;clear:both}#ctf.ctf-super-narrow .ctf-author-avatar{margin-left:-38px;margin-top:0}#ctf.ctf-super-narrow .ctf-author-screenname,#ctf.ctf-super-narrow .ctf-screename-sep{display:none}#ctf.ctf-super-narrow .ctf-context{padding-bottom:5px}#ctf.ctf-super-narrow .ctf-author-name{display:inline-block}#ctf.ctf-super-narrow .ctf-tweet-content{float:left;clear:both}#ctf.ctf-super-narrow .ctf-credit-link{font-size:10px}#ctf.ctf-super-narrow .ctf-header-bio{margin:0!important;padding-top:5px}#ctf.ctf-super-narrow .ctf-header-user{min-height:48px}#ctf.ctf-super-narrow .ctf-header-text{padding-top:10px}#ctf.ctf-super-narrow .ctf-header-follow{margin-top:5px}#ctf.ctf-super-narrow .ctf-more span{display:block;margin-top:3px}@media all and (max-width:640px){#ctf.ctf-width-resp{width:100%!important}}
|
custom-twitter-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Custom Twitter Feeds
|
4 |
Plugin URI: http://smashballoon.com/custom-twitter-feeds
|
5 |
Description: Customizable Twitter feeds for your website
|
6 |
-
Version: 1.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
Text Domain: custom-twitter-feeds
|
@@ -24,10 +24,22 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
24 |
*/
|
25 |
|
26 |
define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
|
27 |
-
define( 'CTF_VERSION', '1.
|
28 |
define( 'CTF_TITLE', 'Custom Twitter Feeds' );
|
29 |
-
define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.js?ver=' . CTF_VERSION , __FILE__ ) );
|
30 |
define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
33 |
|
@@ -50,6 +62,53 @@ function ctf_update_settings() {
|
|
50 |
}
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
/**
|
54 |
* include the admin files only if in the admin area
|
55 |
*/
|
@@ -76,8 +135,9 @@ if ( is_admin() ) {
|
|
76 |
function ctf_init( $atts ) {
|
77 |
|
78 |
include_once( CTF_URL . '/inc/CtfFeed.php' );
|
|
|
79 |
|
80 |
-
|
81 |
/*
|
82 |
echo '<pre>';
|
83 |
var_dump( $twitter_feed->tweet_set);
|
@@ -246,45 +306,74 @@ function ctf_maybe_shorten_text( $string, $feed_settings ) {
|
|
246 |
}
|
247 |
add_filter( 'ctf_tweet_text', 'ctf_maybe_shorten_text', 10, 2 );
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
function ctf_get_fa_el( $icon ) {
|
250 |
$options = get_option( 'ctf_options' );
|
251 |
$font_method = isset( $options['font_method'] ) ? $options['font_method'] : 'svg';
|
252 |
|
253 |
$elems = array(
|
254 |
'fa-arrows-alt' => array(
|
255 |
-
'icon' => '<
|
256 |
'svg' => '<svg class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>'
|
257 |
),
|
258 |
'fa-check-circle' => array(
|
259 |
-
'icon' => '<
|
260 |
'svg' => '<svg class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>'
|
261 |
),
|
262 |
'fa-reply' => array(
|
263 |
-
'icon' => '<
|
264 |
'svg' => '<svg class="svg-inline--fa fa-reply fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="reply" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"></path></svg>'
|
265 |
),
|
266 |
'fa-retweet' => array(
|
267 |
-
'icon' => '<
|
268 |
'svg' => '<svg class="svg-inline--fa fa-retweet fa-w-20" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="retweet" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"></path></svg>'
|
269 |
),
|
270 |
'fa-heart' => array(
|
271 |
-
'icon' => '<
|
272 |
'svg' => '<svg class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>'
|
273 |
),
|
274 |
'fa-twitter' => array(
|
275 |
-
'icon' => '<
|
276 |
'svg' => '<svg class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>'
|
277 |
),
|
278 |
'fa-user' => array(
|
279 |
-
'icon' => '<
|
280 |
'svg' => '<svg class="svg-inline--fa fa-user fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>'
|
281 |
),
|
282 |
'ctf_playbtn' => array(
|
283 |
'icon' => '',
|
284 |
'svg' => '<svg style="color: rgba(255,255,255,1)" class="svg-inline--fa fa-play fa-w-14 ctf_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>'
|
285 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
);
|
287 |
|
|
|
|
|
|
|
|
|
288 |
return $elems[ $icon ]['icon'];
|
289 |
}
|
290 |
|
@@ -302,6 +391,7 @@ function ctf_auto_save_tokens() {
|
|
302 |
$options['access_token_secret'] = sanitize_text_field( $_POST['access_token_secret'] );
|
303 |
|
304 |
update_option( 'ctf_options', $options );
|
|
|
305 |
die();
|
306 |
}
|
307 |
die();
|
@@ -393,12 +483,17 @@ register_deactivation_hook( __FILE__, 'ctf_deactivate' );
|
|
393 |
function ctf_scripts_and_styles() {
|
394 |
$options = get_option( 'ctf_options' );
|
395 |
$not_ajax_theme = (! isset( $options['ajax_theme'] ) || ! $options['ajax_theme']);
|
|
|
|
|
396 |
|
397 |
-
wp_enqueue_style( 'ctf_styles', plugins_url( '/css/ctf-styles.css', __FILE__ ), array(), CTF_VERSION );
|
398 |
-
|
|
|
|
|
|
|
399 |
|
400 |
if ( $not_ajax_theme ) {
|
401 |
-
|
402 |
wp_localize_script( 'ctf_scripts', 'ctf', array(
|
403 |
'ajax_url' => admin_url( 'admin-ajax.php' )
|
404 |
)
|
@@ -454,7 +549,8 @@ add_action( 'wp_head', 'ctf_custom_css' );
|
|
454 |
*/
|
455 |
function ctf_admin_scripts_and_styles() {
|
456 |
wp_enqueue_style( 'ctf_admin_styles', plugins_url( '/css/ctf-admin-styles.css', __FILE__ ), array(), CTF_VERSION );
|
457 |
-
|
|
|
458 |
wp_localize_script( 'ctf_admin_scripts', 'ctf', array(
|
459 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
460 |
'sb_nonce' => wp_create_nonce( 'ctf-smash-balloon' )
|
3 |
Plugin Name: Custom Twitter Feeds
|
4 |
Plugin URI: http://smashballoon.com/custom-twitter-feeds
|
5 |
Description: Customizable Twitter feeds for your website
|
6 |
+
Version: 1.4
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
Text Domain: custom-twitter-feeds
|
24 |
*/
|
25 |
|
26 |
define( 'CTF_URL', plugin_dir_path( __FILE__ ) );
|
27 |
+
define( 'CTF_VERSION', '1.4' );
|
28 |
define( 'CTF_TITLE', 'Custom Twitter Feeds' );
|
29 |
+
define( 'CTF_JS_URL', plugins_url( '/js/ctf-scripts.min.js?ver=' . CTF_VERSION , __FILE__ ) );
|
30 |
define( 'OAUTH_PROCESSOR_URL', 'https://api.smashballoon.com/twitter-login.php?return_uri=' );
|
31 |
+
// Plugin Folder Path.
|
32 |
+
if ( ! defined( 'CTF_PLUGIN_DIR' ) ) {
|
33 |
+
define( 'CTF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
34 |
+
}
|
35 |
+
// Plugin Folder URL.
|
36 |
+
if ( ! defined( 'CTF_PLUGIN_URL' ) ) {
|
37 |
+
define( 'CTF_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
38 |
+
}
|
39 |
+
// Db version.
|
40 |
+
if ( ! defined( 'CTF_DBVERSION' ) ) {
|
41 |
+
define( 'CTF_DBVERSION', '1.0' );
|
42 |
+
}
|
43 |
|
44 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
45 |
|
62 |
}
|
63 |
}
|
64 |
|
65 |
+
function ctf_check_for_db_updates() {
|
66 |
+
|
67 |
+
$db_ver = get_option( 'ctf_db_version', 0 );
|
68 |
+
|
69 |
+
if ( (float) $db_ver < 1.0 ) {
|
70 |
+
|
71 |
+
global $wp_roles;
|
72 |
+
$wp_roles->add_cap( 'administrator', 'manage_custom_twitter_feeds_options' );
|
73 |
+
|
74 |
+
$ctf_statuses_option = get_option( 'ctf_statuses', array() );
|
75 |
+
|
76 |
+
if ( ! isset( $ctf_statuses_option['first_install'] ) ) {
|
77 |
+
|
78 |
+
$options_set = get_option( 'ctf_options', false );
|
79 |
+
|
80 |
+
if ( $options_set ) {
|
81 |
+
$ctf_statuses_option['first_install'] = 'from_update';
|
82 |
+
} else {
|
83 |
+
$ctf_statuses_option['first_install'] = time();
|
84 |
+
}
|
85 |
+
|
86 |
+
$ctf_rating_notice_option = get_option( 'ctf_rating_notice', false );
|
87 |
+
|
88 |
+
if ( $ctf_rating_notice_option === 'dismissed' ) {
|
89 |
+
$ctf_statuses_option['rating_notice_dismissed'] = time();
|
90 |
+
}
|
91 |
+
|
92 |
+
$ctf_rating_notice_waiting = get_transient( 'custom_twitter_feeds_rating_notice_waiting' );
|
93 |
+
|
94 |
+
if ( $ctf_rating_notice_waiting === false
|
95 |
+
&& $ctf_rating_notice_option === false ) {
|
96 |
+
$time = 2 * WEEK_IN_SECONDS;
|
97 |
+
set_transient( 'custom_twitter_feeds_rating_notice_waiting', 'waiting', $time );
|
98 |
+
update_option( 'ctf_rating_notice', 'pending', false );
|
99 |
+
}
|
100 |
+
|
101 |
+
update_option( 'ctf_statuses', $ctf_statuses_option, false );
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
update_option( 'ctf_db_version', CTF_DBVERSION );
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
add_action( 'wp_loaded', 'ctf_check_for_db_updates' );
|
110 |
+
|
111 |
+
|
112 |
/**
|
113 |
* include the admin files only if in the admin area
|
114 |
*/
|
135 |
function ctf_init( $atts ) {
|
136 |
|
137 |
include_once( CTF_URL . '/inc/CtfFeed.php' );
|
138 |
+
wp_enqueue_script( 'ctf_scripts' );
|
139 |
|
140 |
+
$twitter_feed = CtfFeed::init( $atts );
|
141 |
/*
|
142 |
echo '<pre>';
|
143 |
var_dump( $twitter_feed->tweet_set);
|
306 |
}
|
307 |
add_filter( 'ctf_tweet_text', 'ctf_maybe_shorten_text', 10, 2 );
|
308 |
|
309 |
+
function ctf_replace_urls( $string, $feed_settings, $post ) {
|
310 |
+
|
311 |
+
if ( $feed_settings['shorturls'] ) {
|
312 |
+
return $string;
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( isset( $post['entities']['urls'][0] ) ) {
|
316 |
+
foreach ( $post['entities']['urls'] as $url ) {
|
317 |
+
$string = str_replace( $url['url'], $url['expanded_url'], $string );
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
return $string;
|
322 |
+
}
|
323 |
+
add_filter( 'ctf_tweet_text', 'ctf_replace_urls', 9, 3 );
|
324 |
+
add_filter( 'ctf_quoted_tweet_text', 'ctf_replace_urls', 9, 3 );
|
325 |
+
|
326 |
function ctf_get_fa_el( $icon ) {
|
327 |
$options = get_option( 'ctf_options' );
|
328 |
$font_method = isset( $options['font_method'] ) ? $options['font_method'] : 'svg';
|
329 |
|
330 |
$elems = array(
|
331 |
'fa-arrows-alt' => array(
|
332 |
+
'icon' => '<span class="fa fa-arrows-alt"></span>',
|
333 |
'svg' => '<svg class="svg-inline--fa fa-arrows-alt fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="arrows-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"></path></svg>'
|
334 |
),
|
335 |
'fa-check-circle' => array(
|
336 |
+
'icon' => '<span class="fa fa-check-circle"></span>',
|
337 |
'svg' => '<svg class="svg-inline--fa fa-check-circle fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="check-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>'
|
338 |
),
|
339 |
'fa-reply' => array(
|
340 |
+
'icon' => '<span class="fa fa-reply"></span>',
|
341 |
'svg' => '<svg class="svg-inline--fa fa-reply fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="reply" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M8.309 189.836L184.313 37.851C199.719 24.546 224 35.347 224 56.015v80.053c160.629 1.839 288 34.032 288 186.258 0 61.441-39.581 122.309-83.333 154.132-13.653 9.931-33.111-2.533-28.077-18.631 45.344-145.012-21.507-183.51-176.59-185.742V360c0 20.7-24.3 31.453-39.687 18.164l-176.004-152c-11.071-9.562-11.086-26.753 0-36.328z"></path></svg>'
|
342 |
),
|
343 |
'fa-retweet' => array(
|
344 |
+
'icon' => '<span class="fa fa-retweet"></span>',
|
345 |
'svg' => '<svg class="svg-inline--fa fa-retweet fa-w-20" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="retweet" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M629.657 343.598L528.971 444.284c-9.373 9.372-24.568 9.372-33.941 0L394.343 343.598c-9.373-9.373-9.373-24.569 0-33.941l10.823-10.823c9.562-9.562 25.133-9.34 34.419.492L480 342.118V160H292.451a24.005 24.005 0 0 1-16.971-7.029l-16-16C244.361 121.851 255.069 96 276.451 96H520c13.255 0 24 10.745 24 24v222.118l40.416-42.792c9.285-9.831 24.856-10.054 34.419-.492l10.823 10.823c9.372 9.372 9.372 24.569-.001 33.941zm-265.138 15.431A23.999 23.999 0 0 0 347.548 352H160V169.881l40.416 42.792c9.286 9.831 24.856 10.054 34.419.491l10.822-10.822c9.373-9.373 9.373-24.569 0-33.941L144.971 67.716c-9.373-9.373-24.569-9.373-33.941 0L10.343 168.402c-9.373 9.373-9.373 24.569 0 33.941l10.822 10.822c9.562 9.562 25.133 9.34 34.419-.491L96 169.881V392c0 13.255 10.745 24 24 24h243.549c21.382 0 32.09-25.851 16.971-40.971l-16.001-16z"></path></svg>'
|
346 |
),
|
347 |
'fa-heart' => array(
|
348 |
+
'icon' => '<span class="fa fa-heart"></span>',
|
349 |
'svg' => '<svg class="svg-inline--fa fa-heart fa-w-18" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="heart" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M414.9 24C361.8 24 312 65.7 288 89.3 264 65.7 214.2 24 161.1 24 70.3 24 16 76.9 16 165.5c0 72.6 66.8 133.3 69.2 135.4l187 180.8c8.8 8.5 22.8 8.5 31.6 0l186.7-180.2c2.7-2.7 69.5-63.5 69.5-136C560 76.9 505.7 24 414.9 24z"></path></svg>'
|
350 |
),
|
351 |
'fa-twitter' => array(
|
352 |
+
'icon' => '<span class="fa fab fa-twitter"></span>',
|
353 |
'svg' => '<svg class="svg-inline--fa fa-twitter fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fab" data-icon="twitter" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>'
|
354 |
),
|
355 |
'fa-user' => array(
|
356 |
+
'icon' => '<span class="fa fa-user"></span>',
|
357 |
'svg' => '<svg class="svg-inline--fa fa-user fa-w-16" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="user" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M96 160C96 71.634 167.635 0 256 0s160 71.634 160 160-71.635 160-160 160S96 248.366 96 160zm304 192h-28.556c-71.006 42.713-159.912 42.695-230.888 0H112C50.144 352 0 402.144 0 464v24c0 13.255 10.745 24 24 24h464c13.255 0 24-10.745 24-24v-24c0-61.856-50.144-112-112-112z"></path></svg>'
|
358 |
),
|
359 |
'ctf_playbtn' => array(
|
360 |
'icon' => '',
|
361 |
'svg' => '<svg style="color: rgba(255,255,255,1)" class="svg-inline--fa fa-play fa-w-14 ctf_playbtn" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg>'
|
362 |
+
),
|
363 |
+
'fa-file-video-o' => array(
|
364 |
+
'icon' => '<span class="fa fa-file-video-o ctf-tweet-text-media" aria-hidden="true"></span>',
|
365 |
+
'svg' => '<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="file-video" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" class="svg-inline--fa fa-file-video fa-w-12 fa-9x ctf-tweet-text-media"><path fill="currentColor" d="M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm228.687-211.303L224 305.374V268c0-11.046-8.954-20-20-20H100c-11.046 0-20 8.954-20 20v104c0 11.046 8.954 20 20 20h104c11.046 0 20-8.954 20-20v-37.374l52.687 52.674C286.704 397.318 304 390.28 304 375.986V264.011c0-14.311-17.309-21.319-27.313-11.314z" class=""></path></svg>'
|
366 |
+
),
|
367 |
+
'fa-picture-o' => array(
|
368 |
+
'icon' => '<span class="fa fa-picture-o ctf-tweet-text-media" aria-hidden="true"></span>',
|
369 |
+
'svg' => '<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="image" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-image fa-w-16 fa-9x ctf-tweet-text-media"><path fill="currentColor" d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z" class=""></path></svg>'
|
370 |
+
),
|
371 |
);
|
372 |
|
373 |
+
if ( $font_method !== 'fontfile' ){
|
374 |
+
return $elems[ $icon ]['svg'];
|
375 |
+
}
|
376 |
+
|
377 |
return $elems[ $icon ]['icon'];
|
378 |
}
|
379 |
|
391 |
$options['access_token_secret'] = sanitize_text_field( $_POST['access_token_secret'] );
|
392 |
|
393 |
update_option( 'ctf_options', $options );
|
394 |
+
delete_transient( 'ctf_reauthenticate' );
|
395 |
die();
|
396 |
}
|
397 |
die();
|
483 |
function ctf_scripts_and_styles() {
|
484 |
$options = get_option( 'ctf_options' );
|
485 |
$not_ajax_theme = (! isset( $options['ajax_theme'] ) || ! $options['ajax_theme']);
|
486 |
+
$font_method = isset( $options['font_method'] ) ? $options['font_method'] : 'svg';
|
487 |
+
$disable_awesome = isset( $options['disableawesome'] ) ? $options['disableawesome'] : false;
|
488 |
|
489 |
+
wp_enqueue_style( 'ctf_styles', plugins_url( '/css/ctf-styles.min.css', __FILE__ ), array(), CTF_VERSION );
|
490 |
+
|
491 |
+
if ( $font_method === 'fontfile' && ! $disable_awesome ) {
|
492 |
+
wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
493 |
+
}
|
494 |
|
495 |
if ( $not_ajax_theme ) {
|
496 |
+
wp_register_script( 'ctf_scripts', plugins_url( '/js/ctf-scripts.min.js', __FILE__ ), array( 'jquery' ), CTF_VERSION, true );
|
497 |
wp_localize_script( 'ctf_scripts', 'ctf', array(
|
498 |
'ajax_url' => admin_url( 'admin-ajax.php' )
|
499 |
)
|
549 |
*/
|
550 |
function ctf_admin_scripts_and_styles() {
|
551 |
wp_enqueue_style( 'ctf_admin_styles', plugins_url( '/css/ctf-admin-styles.css', __FILE__ ), array(), CTF_VERSION );
|
552 |
+
wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
553 |
+
wp_enqueue_script( 'ctf_admin_scripts', plugins_url( '/js/ctf-admin-scripts.js', __FILE__ ) , array( 'jquery' ), CTF_VERSION, false );
|
554 |
wp_localize_script( 'ctf_admin_scripts', 'ctf', array(
|
555 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
556 |
'sb_nonce' => wp_create_nonce( 'ctf-smash-balloon' )
|
img/carousel.png
ADDED
Binary file
|
img/ctf-icon-offer.jpg
ADDED
Binary file
|
img/ctf-icon.jpg
CHANGED
Binary file
|
img/list.png
ADDED
Binary file
|
img/masonry.png
ADDED
Binary file
|
img/pro-notice.png
CHANGED
Binary file
|
inc/CtfAdmin.php
CHANGED
@@ -249,6 +249,7 @@ class CtfAdmin
|
|
249 |
'whatis' => $search_whatis, // what is this? text
|
250 |
'label' => $search_label,
|
251 |
'has_input' => true,
|
|
|
252 |
'extra' => true
|
253 |
) );
|
254 |
|
@@ -385,6 +386,43 @@ class CtfAdmin
|
|
385 |
'whatis' => "You can add your own CSS classes to the feed here. To add multiple classes separate each with a space, Eg. classone classtwo classthree"
|
386 |
));
|
387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
add_settings_section(
|
389 |
'ctf_options_showandhide', // matches the section name
|
390 |
'Show/Hide',
|
@@ -397,7 +435,8 @@ class CtfAdmin
|
|
397 |
array( 'include_retweeter', 'Retweeted text' ),
|
398 |
array( 'include_avatar', 'Avatar image' ),
|
399 |
array( 'include_author', 'Author name' ),
|
400 |
-
|
|
|
401 |
array( 'include_media_placeholder', 'Media placeholder' ),
|
402 |
array( 'include_date', 'Date' ),
|
403 |
array( 'include_actions', 'Tweet actions (reply, retweet, like)' ),
|
@@ -411,9 +450,9 @@ class CtfAdmin
|
|
411 |
'title' => '<label>Include the Following in Tweets <em>(when applicable)</em></label><code class="ctf_shortcode">include exclude
|
412 |
Eg: include=author,date
|
413 |
Eg: exclude=actions
|
414 |
-
Options: avatar, author,
|
415 |
-
|
416 |
-
linkbox </code>', // label for the input field
|
417 |
'callback' => 'include_exclude_checkbox', // name of the function that outputs the html
|
418 |
'page' => 'ctf_options_showandhide', // matches the section name
|
419 |
'section' => 'ctf_options_showandhide', // matches the section name
|
@@ -579,6 +618,67 @@ class CtfAdmin
|
|
579 |
'whatis' => "Checking this box will make all Search and Hashtag feeds have a permanent cache saved in the database by default of up to 150 tweets. Tweets will be available for the feed even after the 7 day limit though numbers of retweets and likes will not update"
|
580 |
));
|
581 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
/**
|
583 |
* "Style" tab
|
584 |
*/
|
@@ -788,6 +888,28 @@ class CtfAdmin
|
|
788 |
'class' => '',
|
789 |
));
|
790 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
add_settings_section(
|
792 |
'ctf_options_text', // matches the section name
|
793 |
'Tweet Text',
|
@@ -1181,6 +1303,9 @@ class CtfAdmin
|
|
1181 |
<label class="ctf-radio-label" for="ctf_<?php echo $args['name'].'_radio'; ?>"><?php echo $args['label']; ?></label>
|
1182 |
<?php if ( $args['has_input'] ) : ?>
|
1183 |
<input name="<?php echo $args['option'].'['.$args['name'].'_text'.']'; ?>" id="ctf_<?php echo $args['name'].'_text'; ?>" type="text" value="<?php esc_attr_e( $option_string ); ?>" size="25" />
|
|
|
|
|
|
|
1184 |
<?php endif; ?>
|
1185 |
<?php if ( isset( $args['whatis'] ) ) : ?>
|
1186 |
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
@@ -1216,20 +1341,45 @@ class CtfAdmin
|
|
1216 |
|
1217 |
public function cache_time( $args )
|
1218 |
{
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1223 |
?>
|
1224 |
<input name="<?php echo $args['option'].'['.$args['name'].']'; ?>" id="ctf_<?php echo $args['name']; ?>" class="<?php echo $args['class']; ?>" type="number" value="<?php echo $option_string; ?>" />
|
1225 |
<select name="<?php echo $args['option'].'['.$args['name'].'_unit]'; ?>">
|
1226 |
-
|
|
|
|
|
1227 |
<option value="3600" <?php if ( $selected == "3600" ) echo 'selected="selected"' ?> ><?php esc_attr_e( 'Hours' ); ?></option>
|
1228 |
<option value="86400" <?php if ( $selected == "86400" ) echo 'selected="selected"' ?> ><?php esc_attr_e( 'Days' ); ?></option>
|
1229 |
</select>
|
1230 |
<input id="ctf-clear-cache" class="button-secondary" style="margin-top: 1px;" type="submit" value="<?php esc_attr_e( 'Clear Twitter Cache' ); ?>" />
|
1231 |
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
1232 |
<p class="ctf-tooltip ctf-more-info"><?php _e( 'Clicking this button will clear all cached data for your Twitter feeds', 'custom-twitter-feeds' ); ?>.</p>
|
|
|
|
|
|
|
1233 |
<?php
|
1234 |
}
|
1235 |
|
@@ -1449,6 +1599,142 @@ class CtfAdmin
|
|
1449 |
<?php
|
1450 |
}
|
1451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1452 |
public function custom_code( $args )
|
1453 |
{
|
1454 |
$options = get_option( $args['option'] );
|
@@ -1506,8 +1792,9 @@ class CtfAdmin
|
|
1506 |
|
1507 |
// delete feeds cached in transients
|
1508 |
ctf_clear_cache();
|
|
|
1509 |
|
1510 |
-
|
1511 |
$cache_time = isset( $input['cache_time'] ) ? (int) $input['cache_time'] : 1;
|
1512 |
$cache_time_unit = isset( $input['cache_time_unit'] ) ? (int) $input['cache_time_unit'] : 3600;
|
1513 |
|
@@ -1531,8 +1818,9 @@ class CtfAdmin
|
|
1531 |
} elseif ( $input['tab'] === 'customize' && isset( $input['class'] ) ) {
|
1532 |
|
1533 |
$cron_clear_cache = isset( $input['cron_cache_clear'] ) ? $input['cron_cache_clear'] : 'no';
|
1534 |
-
$checkbox_settings = array( 'width_mobile_no_fixed', 'include_retweeter', 'include_avatar', 'include_author', 'include_text', 'include_media_placeholder',
|
1535 |
-
'include_date', 'include_actions', 'include_twitterlink', 'include_linkbox', 'creditctf', 'showbutton', 'showheader', 'persistentcache'
|
|
|
1536 |
$checkbox_settings = apply_filters( 'ctf_admin_customize_checkbox_settings', $checkbox_settings );
|
1537 |
$leave_spaces = array( 'headertext', 'translate_minute', 'translate_hour', 'custom_css', 'custom_js' );
|
1538 |
|
249 |
'whatis' => $search_whatis, // what is this? text
|
250 |
'label' => $search_label,
|
251 |
'has_input' => true,
|
252 |
+
'note_after_input' => __( '(only recent tweets initially)', 'custom-twitter-feeds' ),
|
253 |
'extra' => true
|
254 |
) );
|
255 |
|
386 |
'whatis' => "You can add your own CSS classes to the feed here. To add multiple classes separate each with a space, Eg. classone classtwo classthree"
|
387 |
));
|
388 |
|
389 |
+
add_settings_section(
|
390 |
+
'ctf_options_layout', // matches the section name
|
391 |
+
'Layout',
|
392 |
+
array( $this, 'general_section_text' ), // callback function to explain the section
|
393 |
+
'ctf_options_layout' // matches the section name
|
394 |
+
);
|
395 |
+
|
396 |
+
$settings = get_option( 'ctf_options', array() );
|
397 |
+
$layout = 'list';
|
398 |
+
$layout_selections = array(
|
399 |
+
'layout' => $layout,
|
400 |
+
'carouselcols' => isset( $settings['carouselcols'] ) ? $settings['carouselcols'] : 3,
|
401 |
+
'carouselmobilecols' => isset( $settings['carouselmobilecols'] ) ? $settings['carouselmobilecols'] : 1,
|
402 |
+
'carouselarrows' => isset( $settings['carouselarrows'] ) ? $settings['carouselarrows'] : 'onhover',
|
403 |
+
'carouselpag' => isset( $settings['carouselpag'] ) ? $settings['carouselpag'] : true,
|
404 |
+
'carouselheight' => isset( $settings['carouselheight'] ) ? $settings['carouselheight'] : 'tallest',
|
405 |
+
'carouselautoplay' => isset( $settings['carouselautoplay'] ) ? $settings['carouselautoplay'] : false,
|
406 |
+
'carouseltime' => isset( $settings['carouseltime'] ) ? $settings['carouseltime'] : '5000',
|
407 |
+
'carouselloop' => isset( $settings['carouselloop'] ) ? $settings['carouselloop'] : 'infinite',
|
408 |
+
'masonrycols' => isset( $settings['masonrycols'] ) ? $settings['masonrycols'] : 3,
|
409 |
+
'masonrymobilecols' => isset( $settings['masonrymobilecols'] ) ? $settings['masonrymobilecols'] : 1,
|
410 |
+
);
|
411 |
+
|
412 |
+
$this->create_settings_field( array(
|
413 |
+
'name' => 'class',
|
414 |
+
'title' => '<label for="ctf_layout">Layout Type</label><code class="ctf_shortcode">layout
|
415 |
+
Eg: layout="masonry"</code>', // label for the input field
|
416 |
+
'callback' => 'layout', // name of the function that outputs the html
|
417 |
+
'page' => 'ctf_options_layout', // matches the section name
|
418 |
+
'section' => 'ctf_options_layout', // matches the section name
|
419 |
+
'option' => 'ctf_options', // matches the options name
|
420 |
+
'class' => 'default-text ctf_pro',
|
421 |
+
'type' => 'text',
|
422 |
+
'layout_selections' => $layout_selections,
|
423 |
+
'whatis' => ""
|
424 |
+
));
|
425 |
+
|
426 |
add_settings_section(
|
427 |
'ctf_options_showandhide', // matches the section name
|
428 |
'Show/Hide',
|
435 |
array( 'include_retweeter', 'Retweeted text' ),
|
436 |
array( 'include_avatar', 'Avatar image' ),
|
437 |
array( 'include_author', 'Author name' ),
|
438 |
+
array( 'include_logo', 'Twitter logo' ),
|
439 |
+
array( 'include_text', 'Tweet text' ),
|
440 |
array( 'include_media_placeholder', 'Media placeholder' ),
|
441 |
array( 'include_date', 'Date' ),
|
442 |
array( 'include_actions', 'Tweet actions (reply, retweet, like)' ),
|
450 |
'title' => '<label>Include the Following in Tweets <em>(when applicable)</em></label><code class="ctf_shortcode">include exclude
|
451 |
Eg: include=author,date
|
452 |
Eg: exclude=actions
|
453 |
+
Options: avatar, author,
|
454 |
+
logo, text, placeholder,
|
455 |
+
date, actions, linkbox </code>', // label for the input field
|
456 |
'callback' => 'include_exclude_checkbox', // name of the function that outputs the html
|
457 |
'page' => 'ctf_options_showandhide', // matches the section name
|
458 |
'section' => 'ctf_options_showandhide', // matches the section name
|
618 |
'whatis' => "Checking this box will make all Search and Hashtag feeds have a permanent cache saved in the database by default of up to 150 tweets. Tweets will be available for the feed even after the 7 day limit though numbers of retweets and likes will not update"
|
619 |
));
|
620 |
|
621 |
+
$this->create_settings_field( array(
|
622 |
+
'name' => 'selfreplies',
|
623 |
+
'title' => '<label for="ctf_selfreplies">Always include replies to self in the feed</label><code class="ctf_shortcode">autores
|
624 |
+
Eg: selfreplies=true</code>', // label for the input field
|
625 |
+
'callback' => 'default_checkbox', // name of the function that outputs the html
|
626 |
+
'page' => 'ctf_options_advanced', // matches the section name
|
627 |
+
'section' => 'ctf_options_advanced', // matches the section name
|
628 |
+
'option' => 'ctf_options', // matches the options name
|
629 |
+
'class' => '',
|
630 |
+
'whatis' => "Twitter considers @mentions of your own account and replies to your own account's tweets as \"reply\" tweets. Enable this setting to include these type of tweets in your feed"
|
631 |
+
));
|
632 |
+
|
633 |
+
$this->create_settings_field( array(
|
634 |
+
'name' => 'disableintents',
|
635 |
+
'title' => '<label for="ctf_disableintents">Disable Twitter intents JS</label><code class="ctf_shortcode">disableintents
|
636 |
+
Eg: disableintents=true</code>', // label for the input field
|
637 |
+
'callback' => 'default_checkbox', // name of the function that outputs the html
|
638 |
+
'page' => 'ctf_options_advanced', // matches the section name
|
639 |
+
'section' => 'ctf_options_advanced', // matches the section name
|
640 |
+
'option' => 'ctf_options', // matches the options name
|
641 |
+
'class' => '',
|
642 |
+
'whatis' => "Twitter provides JavaScript that allows visitors of your site to reply to, retweet, and like tweets without leaving your site. This can be disabled using this setting"
|
643 |
+
));
|
644 |
+
|
645 |
+
$this->create_settings_field( array(
|
646 |
+
'name' => 'font_method',
|
647 |
+
'title' => '<label for="ctf_font_method">Icon Method</label>', // label for the input field
|
648 |
+
'callback' => 'default_select', // name of the function that outputs the html
|
649 |
+
'page' => 'ctf_options_advanced', // matches the section name
|
650 |
+
'section' => 'ctf_options_advanced', // matches the section name
|
651 |
+
'option' => 'ctf_options', // matches the options name
|
652 |
+
'class' => 'default-text', // class for the wrapper and input field
|
653 |
+
'fields' => array(
|
654 |
+
array( 'svg', 'SVG' ),
|
655 |
+
array( 'fontfile', 'Font File' )
|
656 |
+
),
|
657 |
+
'whatis' => "This plugin uses SVGs for all icons in the feed. Use this setting to switch to font icons" // what is this? text
|
658 |
+
) );
|
659 |
+
|
660 |
+
$this->create_settings_field( array(
|
661 |
+
'name' => 'disableawesome',
|
662 |
+
'title' => '<label for="ctf_disableawesome">Disable icon font</label>', // label for the input field
|
663 |
+
'callback' => 'default_checkbox', // name of the function that outputs the html
|
664 |
+
'page' => 'ctf_options_advanced', // matches the section name
|
665 |
+
'section' => 'ctf_options_advanced', // matches the section name
|
666 |
+
'option' => 'ctf_options', // matches the options name
|
667 |
+
'class' => '',
|
668 |
+
'whatis' => "Twitter provides JavaScript that allows visitors of your site to reply to, retweet, and like tweets without leaving your site. This can be disabled using this setting"
|
669 |
+
));
|
670 |
+
|
671 |
+
$this->create_settings_field( array(
|
672 |
+
'name' => 'shorturls',
|
673 |
+
'title' => '<label for="ctf_shorturls">Use shortened urls</label>', // label for the input field
|
674 |
+
'callback' => 'default_checkbox', // name of the function that outputs the html
|
675 |
+
'page' => 'ctf_options_advanced', // matches the section name
|
676 |
+
'section' => 'ctf_options_advanced', // matches the section name
|
677 |
+
'option' => 'ctf_options', // matches the options name
|
678 |
+
'class' => '',
|
679 |
+
'whatis' => "Twitter provides shortened versions of links in tweets. Enable this setting to use them instead of the full URLs"
|
680 |
+
));
|
681 |
+
|
682 |
/**
|
683 |
* "Style" tab
|
684 |
*/
|
888 |
'class' => '',
|
889 |
));
|
890 |
|
891 |
+
$this->create_settings_field( array(
|
892 |
+
'name' => 'logosize',
|
893 |
+
'title' => '<label for="ctf_logotextsize">Twitter Logo Size</label><code class="ctf_shortcode">logosize
|
894 |
+
Eg: logosize=16</code>', // label for the input field
|
895 |
+
'callback' => 'text_size', // name of the function that outputs the html
|
896 |
+
'page' => 'ctf_options_author', // matches the section name
|
897 |
+
'section' => 'ctf_options_author', // matches the section name
|
898 |
+
'option' => 'ctf_options', // matches the options name
|
899 |
+
'class' => 'default-text', // class for the wrapper and input field
|
900 |
+
));
|
901 |
+
|
902 |
+
$this->create_settings_field( array(
|
903 |
+
'name' => 'logocolor',
|
904 |
+
'title' => '<label for="ctf_logocolor">Logo Color</label><code class="ctf_shortcode">logocolor
|
905 |
+
Eg: logocolor=#333</code>', // label for the input field
|
906 |
+
'callback' => 'default_color', // name of the function that outputs the html
|
907 |
+
'page' => 'ctf_options_author', // matches the section name
|
908 |
+
'section' => 'ctf_options_author', // matches the section name
|
909 |
+
'option' => 'ctf_options', // matches the options name
|
910 |
+
'class' => '',
|
911 |
+
));
|
912 |
+
|
913 |
add_settings_section(
|
914 |
'ctf_options_text', // matches the section name
|
915 |
'Tweet Text',
|
1303 |
<label class="ctf-radio-label" for="ctf_<?php echo $args['name'].'_radio'; ?>"><?php echo $args['label']; ?></label>
|
1304 |
<?php if ( $args['has_input'] ) : ?>
|
1305 |
<input name="<?php echo $args['option'].'['.$args['name'].'_text'.']'; ?>" id="ctf_<?php echo $args['name'].'_text'; ?>" type="text" value="<?php esc_attr_e( $option_string ); ?>" size="25" />
|
1306 |
+
<?php endif; ?>
|
1307 |
+
<?php if ( isset( $args['note_after_input'] ) ) : ?>
|
1308 |
+
<span class="ctf-note-after-input"><?php echo esc_attr( $args['note_after_input'] ); ?></span>
|
1309 |
<?php endif; ?>
|
1310 |
<?php if ( isset( $args['whatis'] ) ) : ?>
|
1311 |
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
1341 |
|
1342 |
public function cache_time( $args )
|
1343 |
{
|
1344 |
+
$min_cache_time = 3600;
|
1345 |
+
$options = get_option( $args['option'] );
|
1346 |
+
$unrestricted = isset( $options['have_own_tokens'] ) && $options['have_own_tokens'];
|
1347 |
+
if ( $unrestricted ) {
|
1348 |
+
$min_cache_time = 1;
|
1349 |
+
}
|
1350 |
+
$default = 3;
|
1351 |
+
$option_string = ( isset( $options[ $args['name'] ] ) ) ? esc_attr( $options[ $args['name'] ] ) : $default;
|
1352 |
+
|
1353 |
+
$selected = ( isset( $options[ $args['name'] . '_unit' ] ) ) ? esc_attr( $options[ $args['name'] . '_unit' ] ) : '3600';
|
1354 |
+
$actual_time = (int)$option_string * (int)$selected;
|
1355 |
+
$show_notice = false;
|
1356 |
+
if ( get_transient( 'ct_feed_forced_cache_time_raise' ) ) {
|
1357 |
+
$show_notice = true;
|
1358 |
+
}
|
1359 |
+
if ( $actual_time < $min_cache_time ) {
|
1360 |
+
set_transient( 'ct_feed_forced_cache_time_raise', 'true', 60 * 60 * 48 );
|
1361 |
+
$show_notice = true;
|
1362 |
+
$option_string = max( 1, $min_cache_time / 3600 );
|
1363 |
+
$selected = "3600";
|
1364 |
+
} else {
|
1365 |
+
$selected = ( isset( $options[ $args['name'] . '_unit' ] ) ) ? esc_attr( $options[ $args['name'] . '_unit' ] ) : '3600';
|
1366 |
+
}
|
1367 |
+
|
1368 |
?>
|
1369 |
<input name="<?php echo $args['option'].'['.$args['name'].']'; ?>" id="ctf_<?php echo $args['name']; ?>" class="<?php echo $args['class']; ?>" type="number" value="<?php echo $option_string; ?>" />
|
1370 |
<select name="<?php echo $args['option'].'['.$args['name'].'_unit]'; ?>">
|
1371 |
+
<?php if ( $unrestricted ) : ?>
|
1372 |
+
<option value="60" <?php if ( $selected == "60" ) echo 'selected="selected"' ?> ><?php esc_attr_e( 'Minutes' ); ?></option>
|
1373 |
+
<?php endif; ?>
|
1374 |
<option value="3600" <?php if ( $selected == "3600" ) echo 'selected="selected"' ?> ><?php esc_attr_e( 'Hours' ); ?></option>
|
1375 |
<option value="86400" <?php if ( $selected == "86400" ) echo 'selected="selected"' ?> ><?php esc_attr_e( 'Days' ); ?></option>
|
1376 |
</select>
|
1377 |
<input id="ctf-clear-cache" class="button-secondary" style="margin-top: 1px;" type="submit" value="<?php esc_attr_e( 'Clear Twitter Cache' ); ?>" />
|
1378 |
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
1379 |
<p class="ctf-tooltip ctf-more-info"><?php _e( 'Clicking this button will clear all cached data for your Twitter feeds', 'custom-twitter-feeds' ); ?>.</p>
|
1380 |
+
<?php if ( $show_notice ) : ?>
|
1381 |
+
<p class="ctf-more-info"><?php _e( 'Due to upcoming changes in Twitter\'s API usage policy, the minimum caching time for the plugin is 1 hour.', 'custom-twitter-feeds' ); ?></p>
|
1382 |
+
<?php endif; ?>
|
1383 |
<?php
|
1384 |
}
|
1385 |
|
1599 |
<?php
|
1600 |
}
|
1601 |
|
1602 |
+
public function layout( $args ) {
|
1603 |
+
$selected_type = $args['layout_selections']['layout'];
|
1604 |
+
$layout_types = array(
|
1605 |
+
'list' => __( 'List', 'instagram-feed' ),
|
1606 |
+
'carousel' => __( 'Carousel', 'instagram-feed' ),
|
1607 |
+
'masonry' => __( 'Masonry', 'instagram-feed' ),
|
1608 |
+
);
|
1609 |
+
$layout_images = array(
|
1610 |
+
'list' => CTF_PLUGIN_URL . 'img/list.png',
|
1611 |
+
'carousel' => CTF_PLUGIN_URL . 'img/carousel.png',
|
1612 |
+
'masonry' => CTF_PLUGIN_URL . 'img/masonry.png',
|
1613 |
+
);
|
1614 |
+
?>
|
1615 |
+
|
1616 |
+
<?php foreach( $layout_types as $layout_type => $label ) : ?>
|
1617 |
+
<div class="ctf_layout_cell <?php if($selected_type === $layout_type) echo "ctf_layout_selected"; ?>">
|
1618 |
+
<input class="ctf_layout_type" id="ctf_layout_type_<?php esc_attr_e( $layout_type ); ?>" name="<?php echo $args['option'].'[layout]'; ?>" type="radio" value="<?php esc_attr_e( $layout_type ); ?>" <?php if ( $selected_type === $layout_type ) echo 'checked'; ?>/><label for="ctf_layout_type_<?php esc_attr_e( $layout_type ); ?>"><span class="ctf_label"><?php echo esc_html( $label ); ?></span><img src="<?php echo $layout_images[ $layout_type ]; ?>" /></label>
|
1619 |
+
|
1620 |
+
<a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank" class="ctf_lock"><i class="fa fa-rocket"></i>Pro</a>
|
1621 |
+
</div>
|
1622 |
+
<?php endforeach; ?>
|
1623 |
+
<div class="ctf_layout_options_wrap">
|
1624 |
+
<div class="ctf_layout_settings ctf_layout_type_list">
|
1625 |
+
<i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="ctf_note" style="margin-left: 0;"><?php _e('A full-width list of tweets.'); ?></span>
|
1626 |
+
</div>
|
1627 |
+
<div class="ctf_layout_settings ctf_layout_type_masonry">
|
1628 |
+
<p class="ctf_note" style="margin: 0 0 15px 0;"><a href="">Upgrade to the Pro version to use the Masonry layout option</a></p>
|
1629 |
+
<div class="ctf_layout_setting">
|
1630 |
+
<i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="ctf_note" style="margin-left: 0;"><?php _e('Tweets in columns with no empty space between them.'); ?></span>
|
1631 |
+
</div>
|
1632 |
+
<div class="ctf_layout_setting">
|
1633 |
+
<label><?php _e('Desktop Columns', 'instagram-feed'); ?></label><code class="ctf_shortcode"> masonrycols
|
1634 |
+
Eg: masonrycols=4</code>
|
1635 |
+
<br />
|
1636 |
+
<select name="<?php echo $args['option'].'[masonrycols]'; ?>" id="ctf_masonrycols">
|
1637 |
+
<?php
|
1638 |
+
$cols_options = array(1,2,3,4,5,6);
|
1639 |
+
foreach ( $cols_options as $option ) :
|
1640 |
+
?>
|
1641 |
+
<option value="<?php echo esc_attr( $option ); ?>" <?php if((int)$args['layout_selections']['masonrycols'] == (int)$option) echo 'selected="selected"' ?> ><?php echo esc_html( $option ); ?></option>
|
1642 |
+
<?php endforeach; ?>
|
1643 |
+
</select>
|
1644 |
+
</div>
|
1645 |
+
<div class="ctf_layout_setting">
|
1646 |
+
<label><?php _e('Moblie Columns', 'instagram-feed'); ?></label><code class="ctf_shortcode"> masonrymobilecols
|
1647 |
+
Eg: masonrymobilecols=2</code>
|
1648 |
+
<br />
|
1649 |
+
<select name="<?php echo $args['option'].'[masonrymobilecols]'; ?>" id="ctf_masonrymobilecols">
|
1650 |
+
<?php
|
1651 |
+
$cols_options = array(1,2);
|
1652 |
+
foreach ( $cols_options as $option ) :
|
1653 |
+
?>
|
1654 |
+
<option value="<?php echo esc_attr( $option ); ?>" <?php if((int)$args['layout_selections']['masonrymobilecols'] == (int)$option) echo 'selected="selected"' ?> ><?php echo esc_html( $option ); ?></option>
|
1655 |
+
<?php endforeach; ?>
|
1656 |
+
</select>
|
1657 |
+
</div>
|
1658 |
+
</div>
|
1659 |
+
<div class="ctf_layout_settings ctf_layout_type_carousel">
|
1660 |
+
<p class="ctf_note" style="margin: 0 0 15px 0;"><a href="">Upgrade to the Pro version to use the Carousel layout option</a></p>
|
1661 |
+
<div class="ctf_layout_setting">
|
1662 |
+
<i class="fa fa-info-circle" aria-hidden="true" style="margin-right: 8px;"></i><span class="ctf_note" style="margin-left: 0;"><?php _e('Posts are displayed in a slideshow carousel.', 'instagram-feed'); ?></span>
|
1663 |
+
</div>
|
1664 |
+
<div class="ctf_layout_setting">
|
1665 |
+
<label><?php _e('Desktop Columns', 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselcols
|
1666 |
+
Eg: carouselcols=4</code>
|
1667 |
+
<br />
|
1668 |
+
<select name="<?php echo $args['option'].'[carouselcols]'; ?>" id="ctf_carouselcols">
|
1669 |
+
<?php
|
1670 |
+
$cols_options = array(1,2,3,4,5,6);
|
1671 |
+
foreach ( $cols_options as $option ) :
|
1672 |
+
?>
|
1673 |
+
<option value="<?php echo esc_attr( $option ); ?>" <?php if((int)$args['layout_selections']['carouselcols'] == (int)$option) echo 'selected="selected"' ?> ><?php echo esc_html( $option ); ?></option>
|
1674 |
+
<?php endforeach; ?>
|
1675 |
+
</select>
|
1676 |
+
</div>
|
1677 |
+
<div class="ctf_layout_setting">
|
1678 |
+
<label><?php _e('Moblie Columns', 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselmobilecols
|
1679 |
+
Eg: carouselmobilecols=2</code>
|
1680 |
+
<br />
|
1681 |
+
<select name="<?php echo $args['option'].'[carouselmobilecols]'; ?>" id="ctf_carouselmobilecols">
|
1682 |
+
<?php
|
1683 |
+
$cols_options = array(1,2);
|
1684 |
+
foreach ( $cols_options as $option ) :
|
1685 |
+
?>
|
1686 |
+
<option value="<?php echo esc_attr( $option ); ?>" <?php if((int)$args['layout_selections']['carouselmobilecols'] == (int)$option) echo 'selected="selected"' ?> ><?php echo esc_html( $option ); ?></option>
|
1687 |
+
<?php endforeach; ?>
|
1688 |
+
</select>
|
1689 |
+
</div>
|
1690 |
+
<div class="ctf_layout_setting">
|
1691 |
+
<label><?php _e('Loop Type', 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselloop
|
1692 |
+
Eg: carouselloop=rewind
|
1693 |
+
carouselloop=infinity</code>
|
1694 |
+
<br />
|
1695 |
+
<select name="<?php echo $args['option'].'[carouselloop]'; ?>" id="ctf_carousel_loop">
|
1696 |
+
<option value="none" <?php if($args['layout_selections']['carouselloop'] == "none") echo 'selected="selected"' ?> ><?php _e( 'None', 'instagram-feed'); ?></option>
|
1697 |
+
<option value="rewind" <?php if($args['layout_selections']['carouselloop'] == "rewind") echo 'selected="selected"' ?> ><?php _e( 'Rewind', 'instagram-feed'); ?></option>
|
1698 |
+
<option value="infinity" <?php if($args['layout_selections']['carouselloop'] == "infinity") echo 'selected="selected"' ?> ><?php _e( 'Infinity', 'instagram-feed'); ?></option>
|
1699 |
+
</select>
|
1700 |
+
</div>
|
1701 |
+
<div class="ctf_layout_setting">
|
1702 |
+
<label><?php _e('Navigation Arrows', 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselarrows
|
1703 |
+
Eg: carouselarrows=below</code>
|
1704 |
+
<br />
|
1705 |
+
<select name="<?php echo $args['option'].'[carouselarrows]'; ?>" id="ctf_carousel_loop">
|
1706 |
+
<option value="onhover" <?php if($args['layout_selections']['carouselarrows'] == "onhover") echo 'selected="selected"' ?> ><?php _e( 'Show on Hover', 'instagram-feed'); ?></option>
|
1707 |
+
<option value="below" <?php if($args['layout_selections']['carouselarrows'] == "below") echo 'selected="selected"' ?> ><?php _e( 'Show below feed', 'instagram-feed'); ?></option>
|
1708 |
+
<option value="hide" <?php if($args['layout_selections']['carouselarrows'] == "hide") echo 'selected="selected"' ?> ><?php _e( 'Hide arrows', 'instagram-feed'); ?></option>
|
1709 |
+
</select>
|
1710 |
+
</div>
|
1711 |
+
<div class="ctf_layout_setting">
|
1712 |
+
<label><?php _e('Carousel Height', 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselarrows
|
1713 |
+
Eg: carouselarrows=below</code>
|
1714 |
+
<br />
|
1715 |
+
<select name="<?php echo $args['option'].'[carouselheight]'; ?>" id="ctf_carousel_loop">
|
1716 |
+
<option value="tallest" <?php if($args['layout_selections']['carouselheight'] == "tallest") echo 'selected="selected"' ?> ><?php _e( 'Always set to tallest post', 'instagram-feed'); ?></option>
|
1717 |
+
<option value="clickexpand" <?php if($args['layout_selections']['carouselheight'] == "clickexpand") echo 'selected="selected"' ?> ><?php _e( 'Set to shortest post, button to expand', 'instagram-feed'); ?></option>
|
1718 |
+
<option value="auto'" <?php if($args['layout_selections']['carouselheight'] == "auto'") echo 'selected="selected"' ?> ><?php _e( 'Automatically set to post height (forces single column)', 'instagram-feed'); ?></option>
|
1719 |
+
</select>
|
1720 |
+
</div>
|
1721 |
+
<div class="ctf_layout_setting">
|
1722 |
+
<input type="checkbox" name="<?php echo $args['option'].'[carouselautoplay]'; ?>" id="ctf_carousel_autoplay" <?php if($args['layout_selections']['carouselautoplay'] == true) echo 'checked="checked"' ?> />
|
1723 |
+
<label><?php _e("Enable Autoplay", 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouselautoplay
|
1724 |
+
Eg: carouselautoplay=true</code>
|
1725 |
+
</div>
|
1726 |
+
<div class="ctf_layout_setting">
|
1727 |
+
<label><?php _e("Interval Time", 'instagram-feed'); ?></label><code class="ctf_shortcode"> carouseltime
|
1728 |
+
Eg: carouseltime=8000</code>
|
1729 |
+
<br />
|
1730 |
+
<input name="<?php echo $args['option'].'[carouseltime]'; ?>" type="text" value="<?php esc_attr_e( $args['layout_selections']['carouseltime'] ); ?>" size="6" /><?php _e("miliseconds", 'instagram-feed'); ?>
|
1731 |
+
</div>
|
1732 |
+
</div>
|
1733 |
+
|
1734 |
+
</div>
|
1735 |
+
<?php
|
1736 |
+
}
|
1737 |
+
|
1738 |
public function custom_code( $args )
|
1739 |
{
|
1740 |
$options = get_option( $args['option'] );
|
1792 |
|
1793 |
// delete feeds cached in transients
|
1794 |
ctf_clear_cache();
|
1795 |
+
delete_transient( 'ctf_reauthenticate' );
|
1796 |
|
1797 |
+
// process force cache to clear on interval
|
1798 |
$cache_time = isset( $input['cache_time'] ) ? (int) $input['cache_time'] : 1;
|
1799 |
$cache_time_unit = isset( $input['cache_time_unit'] ) ? (int) $input['cache_time_unit'] : 3600;
|
1800 |
|
1818 |
} elseif ( $input['tab'] === 'customize' && isset( $input['class'] ) ) {
|
1819 |
|
1820 |
$cron_clear_cache = isset( $input['cron_cache_clear'] ) ? $input['cron_cache_clear'] : 'no';
|
1821 |
+
$checkbox_settings = array( 'width_mobile_no_fixed', 'include_retweeter', 'include_avatar', 'include_author', 'include_logo', 'include_text', 'include_media_placeholder',
|
1822 |
+
'include_date', 'include_actions', 'include_twitterlink', 'include_linkbox', 'creditctf', 'showbutton', 'showheader', 'persistentcache', 'selfreplies',
|
1823 |
+
'disableintents', 'disableawesome', 'shorturls' );
|
1824 |
$checkbox_settings = apply_filters( 'ctf_admin_customize_checkbox_settings', $checkbox_settings );
|
1825 |
$leave_spaces = array( 'headertext', 'translate_minute', 'translate_hour', 'custom_css', 'custom_js' );
|
1826 |
|
inc/CtfFeed.php
CHANGED
@@ -130,7 +130,10 @@ class CtfFeed
|
|
130 |
'width_mobile_no_fixed',
|
131 |
'disablelinks',
|
132 |
'linktexttotwitter',
|
133 |
-
'creditctf'
|
|
|
|
|
|
|
134 |
);
|
135 |
$this->setStandardBoolOptions( $bool_false, false );
|
136 |
|
@@ -156,7 +159,7 @@ class CtfFeed
|
|
156 |
$this->setStandardTextOptions( $standard_text, '' );
|
157 |
|
158 |
$this->setStandardTextOptions( 'retweetedtext', __( 'Retweeted', 'custom-twitter-feeds' ) );
|
159 |
-
|
160 |
$this->setStandardTextOptions( 'multiplier', 1.25 );
|
161 |
$this->setStandardTextOptions( 'twitterlinktext', 'Twitter' );
|
162 |
|
@@ -167,7 +170,8 @@ class CtfFeed
|
|
167 |
'tweettextsize',
|
168 |
'datetextsize',
|
169 |
'quotedauthorsize',
|
170 |
-
'iconsize'
|
|
|
171 |
);
|
172 |
$this->setTextSizeOptions( $text_size );
|
173 |
|
@@ -184,6 +188,7 @@ class CtfFeed
|
|
184 |
'textcolor',
|
185 |
'linktextcolor',
|
186 |
'iconcolor',
|
|
|
187 |
'buttontextcolor'
|
188 |
);
|
189 |
$this->setStandardStyleProperty( $text_color, 'color' );
|
@@ -382,7 +387,12 @@ class CtfFeed
|
|
382 |
public function setCacheTimeOptions()
|
383 |
{
|
384 |
$user_cache = isset( $this->db_options['cache_time'] ) ? ( $this->db_options['cache_time'] * $this->db_options['cache_time_unit'] ) : HOUR_IN_SECONDS;
|
385 |
-
|
|
|
|
|
|
|
|
|
|
|
386 |
}
|
387 |
|
388 |
|
@@ -474,6 +484,7 @@ class CtfFeed
|
|
474 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_actions'] ) && $this->db_options['include_actions'] == false ? null : 'actions';
|
475 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_twitterlink'] ) && $this->db_options['include_twitterlink'] == false ? null : 'twitterlink';
|
476 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_linkbox'] ) && $this->db_options['include_linkbox'] == false ? null : 'linkbox';
|
|
|
477 |
}
|
478 |
|
479 |
}
|
@@ -657,7 +668,11 @@ class CtfFeed
|
|
657 |
|
658 |
private function reduceTweetSetData( $tweet_set, $limit = true ) {
|
659 |
if ( $this->check_for_duplicates ) {
|
660 |
-
$tweet_set = $this->removeDuplicates( $tweet_set, $limit );
|
|
|
|
|
|
|
|
|
661 |
}
|
662 |
|
663 |
$this->tweet_set = $tweet_set;
|
@@ -665,6 +680,53 @@ class CtfFeed
|
|
665 |
return $this->tweet_set;
|
666 |
}
|
667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
private function appendPersistentCacheTweets( $existing_cache )
|
669 |
{
|
670 |
if ( is_array( $this->tweet_set ) ) {
|
@@ -783,7 +845,7 @@ class CtfFeed
|
|
783 |
$trimmed_tweets = array();
|
784 |
|
785 |
// for header
|
786 |
-
if ( $this->last_id_data == '' && isset( $
|
787 |
$trimmed_tweets[0]['user']['name']= $tweets[0]['user']['name'];
|
788 |
$trimmed_tweets[0]['user']['description']= $tweets[0]['user']['description'];
|
789 |
$trimmed_tweets[0]['user']['statuses_count']= $tweets[0]['user']['statuses_count'];
|
@@ -802,6 +864,17 @@ class CtfFeed
|
|
802 |
$trimmed_tweets[$i]['retweet_count']= $tweets[$i]['retweet_count'];
|
803 |
$trimmed_tweets[$i]['favorite_count']= $tweets[$i]['favorite_count'];
|
804 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
if ( isset( $tweets[$i]['retweeted_status'] ) ) {
|
806 |
$trimmed_tweets[$i]['retweeted_status']['user']['name'] = $tweets[$i]['retweeted_status']['user']['name'];
|
807 |
$trimmed_tweets[$i]['retweeted_status']['user']['screen_name'] = $tweets[$i]['retweeted_status']['user']['screen_name'];
|
@@ -813,6 +886,16 @@ class CtfFeed
|
|
813 |
$trimmed_tweets[$i]['retweeted_status']['created_at']= $tweets[$i]['retweeted_status']['created_at'];
|
814 |
$trimmed_tweets[$i]['retweeted_status']['retweet_count']= $tweets[$i]['retweeted_status']['retweet_count'];
|
815 |
$trimmed_tweets[$i]['retweeted_status']['favorite_count']= $tweets[$i]['retweeted_status']['favorite_count'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
816 |
}
|
817 |
|
818 |
if ( isset( $tweets[$i]['quoted_status'] ) ) {
|
@@ -821,6 +904,15 @@ class CtfFeed
|
|
821 |
$trimmed_tweets[$i]['quoted_status']['user']['verified'] = $tweets[$i]['quoted_status']['user']['verified'];
|
822 |
$trimmed_tweets[$i]['quoted_status']['text'] = isset( $tweets[$i]['quoted_status']['text'] ) ? $tweets[$i]['quoted_status']['text'] : $tweets[$i]['quoted_status']['full_text'];
|
823 |
$trimmed_tweets[$i]['quoted_status']['id_str'] = $tweets[$i]['quoted_status']['id_str'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
824 |
}
|
825 |
|
826 |
$trimmed_tweets[$i] = $this->filterTrimmedTweets( $trimmed_tweets[$i], $tweets[$i] );
|
@@ -833,100 +925,195 @@ class CtfFeed
|
|
833 |
return str_replace( $string, '', $text );
|
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 |
-
// if there is media, we need to remove the media url from the tweet text
|
872 |
-
$retweeted_text = isset( $tweet['retweeted_status']['full_text'] ) ? $tweet['retweeted_status']['full_text'] : $tweet['retweeted_status']['text'];
|
873 |
-
if ( isset( $tweet['retweeted_status']['extended_entities']['media'][0]['url'] ) ) {
|
874 |
-
$trimmed['retweeted_status']['text'] = $this->removeStringFromText( $tweet['retweeted_status']['extended_entities']['media'][0]['url'], $retweeted_text );
|
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 |
* will create a transient with the tweet cache if one doesn't exist, the data seems valid, and caching is active
|
@@ -982,10 +1169,15 @@ class CtfFeed
|
|
982 |
if ( ! empty ( $feed_term ) ) {
|
983 |
$get_fields['screen_name'] = $feed_term;
|
984 |
}
|
985 |
-
|
|
|
|
|
986 |
}
|
987 |
if ( $end_point === 'hometimeline' ) {
|
988 |
$get_fields['exclude_replies'] = 'true';
|
|
|
|
|
|
|
989 |
}
|
990 |
if ( $end_point === 'search' ) {
|
991 |
$get_fields['q'] = $feed_term;
|
@@ -1083,7 +1275,9 @@ class CtfFeed
|
|
1083 |
$html .= '<a class="twitter-follow-button" href="https://twitter.com/' . $feed_options['screenname'] . '" target="_blank" data-show-count="false" data-size="large" data-dnt="true">Follow</a>';
|
1084 |
}
|
1085 |
$html .= '</p>';
|
1086 |
-
|
|
|
|
|
1087 |
$html .= '</div>';
|
1088 |
|
1089 |
return $html;
|
@@ -1099,7 +1293,8 @@ class CtfFeed
|
|
1099 |
$feed_options = $this->feed_options;
|
1100 |
$ctf_data_disablelinks = ($feed_options['disablelinks'] == 'true') ? ' data-ctfdisablelinks="true"' : '';
|
1101 |
$ctf_data_linktextcolor = $feed_options['linktextcolor'] != '' ? ' data-ctflinktextcolor="'.$feed_options['linktextcolor'].'"' : '';
|
1102 |
-
|
|
|
1103 |
$ctf_feed_type = ! empty ( $feed_options['type'] ) ? esc_attr( $feed_options['type'] ) : 'multiple';
|
1104 |
$ctf_feed_classes = 'ctf ctf-type-' . $ctf_feed_type;
|
1105 |
$ctf_feed_classes .= ' ' . $feed_options['class'] . ' ctf-styles';
|
@@ -1109,7 +1304,7 @@ class CtfFeed
|
|
1109 |
$ctf_feed_html = '';
|
1110 |
|
1111 |
$ctf_feed_html .= '<!-- Custom Twitter Feeds by Smash Balloon -->';
|
1112 |
-
$ctf_feed_html .= '<div id="ctf" class="' . $ctf_feed_classes . '" style="' . $feed_options['width'] . $feed_options['height'] . $feed_options['bgcolor'] . '" data-ctfshortcode="' . $this->getShortCodeJSON() . '"' .$ctf_data_disablelinks . $ctf_data_linktextcolor . ' data-ctfneeded="'. $ctf_data_needed .'">';
|
1113 |
$tweet_set = $this->tweet_set;
|
1114 |
|
1115 |
// dynamically include header
|
@@ -1139,7 +1334,7 @@ class CtfFeed
|
|
1139 |
}
|
1140 |
|
1141 |
if ( $feed_options['creditctf'] ) {
|
1142 |
-
$ctf_feed_html .= '<div class="ctf-credit-link"><a href="https://smashballoon.com/custom-twitter-feeds" target="_blank"
|
1143 |
}
|
1144 |
|
1145 |
$ctf_feed_html .= '</div>'; // closing div tag for #ctf
|
@@ -1183,10 +1378,10 @@ class CtfFeed
|
|
1183 |
$ctf_header_html .= '</span>';
|
1184 |
|
1185 |
if ( $tweet_set[0]['user']['verified'] == 1 ) {
|
1186 |
-
|
1187 |
}
|
1188 |
|
1189 |
-
|
1190 |
$ctf_header_html .= '</p>';
|
1191 |
|
1192 |
if ( $feed_options['showbio'] && !empty($tweet_set[0]['user']['description']) ) {
|
@@ -1195,7 +1390,7 @@ class CtfFeed
|
|
1195 |
|
1196 |
$ctf_header_html .= '</div>';
|
1197 |
$ctf_header_html .= '<div class="ctf-header-img">';
|
1198 |
-
|
1199 |
$ctf_header_html .= '<img src="' . $tweet_set[0]['user']['profile_image_url_https'] . '" alt="' . $tweet_set[0]['user']['name'] . '" width="48" height="48">';
|
1200 |
$ctf_header_html .= '</div>';
|
1201 |
$ctf_header_html .= '</a>';
|
@@ -1217,7 +1412,7 @@ class CtfFeed
|
|
1217 |
$ctf_header_html .= '</div>';
|
1218 |
$ctf_header_html .= '<div class="ctf-header-img">';
|
1219 |
$ctf_header_html .= '<div class="ctf-header-generic-icon">';
|
1220 |
-
|
1221 |
$ctf_header_html .= '</div>';
|
1222 |
$ctf_header_html .= '</div>';
|
1223 |
$ctf_header_html .= '</a>';
|
@@ -1242,11 +1437,6 @@ class CtfFeed
|
|
1242 |
$feed_options = $this->feed_options;
|
1243 |
$tweet_html = $this->feed_html;
|
1244 |
|
1245 |
-
// dequeue intents if not being used
|
1246 |
-
if ( ! ctf_show( 'actions', $feed_options ) ) {
|
1247 |
-
wp_dequeue_script( 'ctf_twitter_intents' );
|
1248 |
-
}
|
1249 |
-
|
1250 |
if ( $is_pagination && ( ! isset ( $tweet_set[1]['id_str'] ) ) ) {
|
1251 |
$tweet_html .= $this->getOutOfTweetsHtml( $this->feed_options );
|
1252 |
} else {
|
@@ -1296,13 +1486,13 @@ class CtfFeed
|
|
1296 |
switch ( $quoted_media[0]['type'] ) {
|
1297 |
case 'video':
|
1298 |
case 'animated_gif':
|
1299 |
-
$quoted_media_text .= '
|
1300 |
break;
|
1301 |
default:
|
1302 |
if ( $quoted_media_count > 1 ) {
|
1303 |
-
$quoted_media_text .= '<span class="ctf-quoted-tweet-text-media-wrap">' . $quoted_media_count . '
|
1304 |
} else {
|
1305 |
-
$quoted_media_text .= '<span class="ctf-quoted-tweet-text-media-wrap"
|
1306 |
}
|
1307 |
break;
|
1308 |
}
|
@@ -1323,13 +1513,13 @@ class CtfFeed
|
|
1323 |
switch ( $post_media[0]['type'] ) {
|
1324 |
case 'video':
|
1325 |
case 'animated_gif':
|
1326 |
-
$post_media_text .= '
|
1327 |
break;
|
1328 |
default:
|
1329 |
if ( $post_media_count > 1 ) {
|
1330 |
-
$post_media_text .= $post_media_count . '
|
1331 |
} else {
|
1332 |
-
$post_media_text .= '
|
1333 |
}
|
1334 |
break;
|
1335 |
}
|
@@ -1342,7 +1532,7 @@ class CtfFeed
|
|
1342 |
|
1343 |
if ( isset( $retweeter ) && ctf_show( 'retweeter', $feed_options ) ) {
|
1344 |
$tweet_html .= '<div class="ctf-context">';
|
1345 |
-
$tweet_html .= '<a href="https://twitter.com/intent/user?screen_name=' . $retweeter['screen_name'] . '" target="_blank" class="ctf-retweet-icon"
|
1346 |
$tweet_html .= '<a href="https://twitter.com/' . $retweeter['screen_name'] . '" target="_blank" class="ctf-retweet-text" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">' . $retweeter['name'] . ' ' . $feed_options['retweetedtext'] . '</a>';
|
1347 |
$tweet_html .= '</div>';
|
1348 |
}
|
@@ -1360,7 +1550,7 @@ class CtfFeed
|
|
1360 |
if ( ctf_show( 'author', $feed_options ) ) {
|
1361 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '" target="_blank" class="ctf-author-name" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">' . $post['user']['name'] . '</a>';
|
1362 |
if ( $post['user']['verified'] == 1 ) {
|
1363 |
-
$tweet_html .= '<span class="ctf-verified"
|
1364 |
}
|
1365 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '" class="ctf-author-screenname" target="_blank" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">@' . $post['user']['screen_name'] . '</a>';
|
1366 |
$tweet_html .= '<span class="ctf-screename-sep">·</span>';
|
@@ -1372,13 +1562,18 @@ class CtfFeed
|
|
1372 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '/status/' . $post['id_str'] . '" class="ctf-tweet-date" target="_blank" style="' . $feed_options['datetextsize'] . $feed_options['datetextweight'] . $feed_options['textcolor'] . '">' . ctf_get_formatted_date( $post['created_at'], $feed_options, $post['user']['utc_offset'] ) . '</a>';
|
1373 |
$tweet_html .= '</div>';
|
1374 |
} // show date
|
1375 |
-
$tweet_html .= '</div>
|
|
|
|
|
|
|
|
|
|
|
1376 |
$tweet_html .= '</div>';
|
1377 |
}
|
1378 |
|
1379 |
|
1380 |
if ( ctf_show( 'text', $feed_options ) ) {
|
1381 |
-
$post_text = apply_filters( 'ctf_tweet_text', $post['text'], $feed_options );
|
1382 |
|
1383 |
$tweet_html .= '<div class="ctf-tweet-content">';
|
1384 |
|
@@ -1390,10 +1585,14 @@ class CtfFeed
|
|
1390 |
$tweet_html .= '<p class="ctf-tweet-text" style="' . $feed_options['tweettextsize'] . $feed_options['tweettextweight'] . $feed_options['textcolor'] . '">' . nl2br( $post_text );
|
1391 |
|
1392 |
if( $post_media_count > 0 ){
|
|
|
|
|
|
|
|
|
1393 |
if ( $feed_options['disablelinks'] ) {
|
1394 |
-
$tweet_html .= '<span class="ctf-tweet-text-media-wrap">' . $post_media_text . '</span>' . '</p>';
|
1395 |
} else {
|
1396 |
-
$tweet_html .= '</p><a href="https://twitter.com/' .$post['user']['screen_name'] . '/status/' . $post['id_str'] . '" target="_blank" class="ctf-tweet-text-media-wrap">' . $post_media_text . '</a>';
|
1397 |
}
|
1398 |
}
|
1399 |
} // link text to twitter option is selected
|
@@ -1406,11 +1605,12 @@ class CtfFeed
|
|
1406 |
$tweet_html .= '<span class="ctf-quoted-author-name">' . $quoted['user']['name'] . '</span>';
|
1407 |
|
1408 |
if ($quoted['user']['verified'] == 1) {
|
1409 |
-
$tweet_html .= '<span class="ctf-quoted-verified"
|
1410 |
} // user is verified
|
|
|
1411 |
|
1412 |
$tweet_html .= '<span class="ctf-quoted-author-screenname">@' . $quoted['user']['screen_name'] . '</span>';
|
1413 |
-
$tweet_html .= '<p class="ctf-quoted-tweet-text" style="' . $feed_options['tweettextsize'] . $feed_options['tweettextweight'] . $feed_options['textcolor'] . '">' . nl2br( $
|
1414 |
//$tweet_html .= ;
|
1415 |
$tweet_html .= '</a>';
|
1416 |
}// show link box
|
@@ -1449,43 +1649,48 @@ class CtfFeed
|
|
1449 |
public function getErrorHtml()
|
1450 |
{
|
1451 |
$error_html = '';
|
1452 |
-
$error_html .= '<div id="ctf" class="ctf">';
|
1453 |
$error_html .= '<div class="ctf-error">';
|
1454 |
$error_html .= '<div class="ctf-error-user">';
|
1455 |
-
|
1456 |
-
$error_html .= '<a class="twitter-share-button"';
|
1457 |
-
$error_html .= 'href="https://twitter.com/share"';
|
1458 |
-
$error_html .= 'data-size="large"';
|
1459 |
-
$error_html .= 'data-url="' . get_the_permalink() . '"';
|
1460 |
-
$error_html .= 'data-text="Check out this website">';
|
1461 |
-
$error_html .= '</a>';
|
1462 |
-
|
1463 |
-
if ( !empty( $this->feed_options['screenname'] ) ) {
|
1464 |
-
$error_html .= '<a class="twitter-follow-button"';
|
1465 |
-
$error_html .= 'href="https://twitter.com/' . $this->feed_options['screenname'] . '"';
|
1466 |
-
$error_html .= 'data-show-count="false"';
|
1467 |
-
$error_html .= 'data-size="large"';
|
1468 |
-
$error_html .= 'data-dnt="true">Follow</a>';
|
1469 |
-
}
|
1470 |
$error_html .= '</div>';
|
1471 |
|
1472 |
if ( current_user_can( 'manage_options' ) ) {
|
1473 |
$error_html .= '<div class="ctf-error-admin">';
|
1474 |
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1487 |
}
|
1488 |
-
$error_html .= '<a href="https://smashballoon.com/custom-twitter-feeds/docs/errors/" target="_blank">Click here to troubleshoot</a></p>';
|
1489 |
|
1490 |
$error_html .= '</div>';
|
1491 |
}
|
130 |
'width_mobile_no_fixed',
|
131 |
'disablelinks',
|
132 |
'linktexttotwitter',
|
133 |
+
'creditctf',
|
134 |
+
'selfreplies',
|
135 |
+
'disableintents',
|
136 |
+
'shorturls'
|
137 |
);
|
138 |
$this->setStandardBoolOptions( $bool_false, false );
|
139 |
|
159 |
$this->setStandardTextOptions( $standard_text, '' );
|
160 |
|
161 |
$this->setStandardTextOptions( 'retweetedtext', __( 'Retweeted', 'custom-twitter-feeds' ) );
|
162 |
+
$this->setStandardTextOptions( 'font_method', 'svg' );
|
163 |
$this->setStandardTextOptions( 'multiplier', 1.25 );
|
164 |
$this->setStandardTextOptions( 'twitterlinktext', 'Twitter' );
|
165 |
|
170 |
'tweettextsize',
|
171 |
'datetextsize',
|
172 |
'quotedauthorsize',
|
173 |
+
'iconsize',
|
174 |
+
'logosize'
|
175 |
);
|
176 |
$this->setTextSizeOptions( $text_size );
|
177 |
|
188 |
'textcolor',
|
189 |
'linktextcolor',
|
190 |
'iconcolor',
|
191 |
+
'logocolor',
|
192 |
'buttontextcolor'
|
193 |
);
|
194 |
$this->setStandardStyleProperty( $text_color, 'color' );
|
387 |
public function setCacheTimeOptions()
|
388 |
{
|
389 |
$user_cache = isset( $this->db_options['cache_time'] ) ? ( $this->db_options['cache_time'] * $this->db_options['cache_time_unit'] ) : HOUR_IN_SECONDS;
|
390 |
+
|
391 |
+
if ( $this->feed_options['have_own_tokens'] ) {
|
392 |
+
$this->feed_options['cache_time'] = max( $user_cache, 60 );
|
393 |
+
} else {
|
394 |
+
$this->feed_options['cache_time'] = max( $user_cache, 3600 );
|
395 |
+
}
|
396 |
}
|
397 |
|
398 |
|
484 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_actions'] ) && $this->db_options['include_actions'] == false ? null : 'actions';
|
485 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_twitterlink'] ) && $this->db_options['include_twitterlink'] == false ? null : 'twitterlink';
|
486 |
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_linkbox'] ) && $this->db_options['include_linkbox'] == false ? null : 'linkbox';
|
487 |
+
$this->feed_options['tweet_includes'][] = isset( $this->db_options['include_logo'] ) && $this->db_options['include_logo'] == false ? null : 'logo';
|
488 |
}
|
489 |
|
490 |
}
|
668 |
|
669 |
private function reduceTweetSetData( $tweet_set, $limit = true ) {
|
670 |
if ( $this->check_for_duplicates ) {
|
671 |
+
$this->tweet_set = $this->removeDuplicates( $tweet_set, $limit );
|
672 |
+
}
|
673 |
+
|
674 |
+
if ( $this->feed_options['selfreplies'] ) {
|
675 |
+
$this->tweet_set = $this->filterTweetSet( $tweet_set, $limit );
|
676 |
}
|
677 |
|
678 |
$this->tweet_set = $tweet_set;
|
680 |
return $this->tweet_set;
|
681 |
}
|
682 |
|
683 |
+
/**
|
684 |
+
* this takes the current set of tweets and processes them until there are
|
685 |
+
* enough filtered tweets to create the feed from
|
686 |
+
*/
|
687 |
+
private function filterTweetSet( $tweet_set, $limit = true )
|
688 |
+
{
|
689 |
+
$working_tweet_set = isset( $tweet_set['statuses'] ) ? $tweet_set['statuses'] : $tweet_set;
|
690 |
+
$usable_tweets = 0;
|
691 |
+
if ( $limit ) {
|
692 |
+
$tweets_needed = $this->feed_options['count'] + 1; // magic number here should be ADT
|
693 |
+
} else {
|
694 |
+
$tweets_needed = 200;
|
695 |
+
}
|
696 |
+
$i = 0; // index of working_tweet_set
|
697 |
+
$still_setting_filtered_tweets = true;
|
698 |
+
|
699 |
+
while ( $still_setting_filtered_tweets ) { // stays true until the number to display is reached or out of tweets
|
700 |
+
if ( isset ( $working_tweet_set[$i] ) ) { // if there is another tweet available
|
701 |
+
if ( !$this->feed_options['selfreplies'] && isset( $working_tweet_set[$i]['in_reply_to_screen_name'] ) ) {
|
702 |
+
unset( $working_tweet_set[$i] );
|
703 |
+
} elseif ( $this->feed_options['selfreplies']
|
704 |
+
&& isset( $working_tweet_set[$i]['in_reply_to_screen_name'] )
|
705 |
+
&& $working_tweet_set[$i]['in_reply_to_screen_name'] !== $working_tweet_set[$i]['user']['screen_name']) {
|
706 |
+
unset( $working_tweet_set[$i] );
|
707 |
+
} else {
|
708 |
+
$usable_tweets++;
|
709 |
+
}
|
710 |
+
} else {
|
711 |
+
$still_setting_filtered_tweets = false;
|
712 |
+
}
|
713 |
+
|
714 |
+
// if there are no more tweets needed
|
715 |
+
if ( $usable_tweets >= $tweets_needed ) {
|
716 |
+
$still_setting_filtered_tweets = false;
|
717 |
+
} else {
|
718 |
+
$i++;
|
719 |
+
}
|
720 |
+
|
721 |
+
}
|
722 |
+
|
723 |
+
if ( is_array( $working_tweet_set ) ) {
|
724 |
+
return array_values( $working_tweet_set );
|
725 |
+
} else {
|
726 |
+
return false;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
|
730 |
private function appendPersistentCacheTweets( $existing_cache )
|
731 |
{
|
732 |
if ( is_array( $this->tweet_set ) ) {
|
845 |
$trimmed_tweets = array();
|
846 |
|
847 |
// for header
|
848 |
+
if ( $this->last_id_data == '' && isset( $tweets[0] ) ) { // if this is the first set of tweets
|
849 |
$trimmed_tweets[0]['user']['name']= $tweets[0]['user']['name'];
|
850 |
$trimmed_tweets[0]['user']['description']= $tweets[0]['user']['description'];
|
851 |
$trimmed_tweets[0]['user']['statuses_count']= $tweets[0]['user']['statuses_count'];
|
864 |
$trimmed_tweets[$i]['retweet_count']= $tweets[$i]['retweet_count'];
|
865 |
$trimmed_tweets[$i]['favorite_count']= $tweets[$i]['favorite_count'];
|
866 |
|
867 |
+
if ( isset( $tweets[$i]['entities']['urls'][0] ) ) {
|
868 |
+
foreach ( $tweets[$i]['entities']['urls'] as $url ) {
|
869 |
+
$trimmed_tweets[$i]['entities']['urls'][] = array(
|
870 |
+
'url' => $url['url'],
|
871 |
+
'expanded_url' => $url['expanded_url'],
|
872 |
+
'display_url' => $url['display_url'],
|
873 |
+
|
874 |
+
);
|
875 |
+
}
|
876 |
+
}
|
877 |
+
|
878 |
if ( isset( $tweets[$i]['retweeted_status'] ) ) {
|
879 |
$trimmed_tweets[$i]['retweeted_status']['user']['name'] = $tweets[$i]['retweeted_status']['user']['name'];
|
880 |
$trimmed_tweets[$i]['retweeted_status']['user']['screen_name'] = $tweets[$i]['retweeted_status']['user']['screen_name'];
|
886 |
$trimmed_tweets[$i]['retweeted_status']['created_at']= $tweets[$i]['retweeted_status']['created_at'];
|
887 |
$trimmed_tweets[$i]['retweeted_status']['retweet_count']= $tweets[$i]['retweeted_status']['retweet_count'];
|
888 |
$trimmed_tweets[$i]['retweeted_status']['favorite_count']= $tweets[$i]['retweeted_status']['favorite_count'];
|
889 |
+
if ( isset( $tweets[$i]['retweeted_status']['entities']['urls'][0] ) ) {
|
890 |
+
foreach ( $tweets[$i]['retweeted_status']['entities']['urls'] as $url ) {
|
891 |
+
$trimmed_tweets[$i]['retweeted_status']['entities']['urls'][] = array(
|
892 |
+
'url' => $url['url'],
|
893 |
+
'expanded_url' => $url['expanded_url'],
|
894 |
+
'display_url' => $url['display_url'],
|
895 |
+
|
896 |
+
);
|
897 |
+
}
|
898 |
+
}
|
899 |
}
|
900 |
|
901 |
if ( isset( $tweets[$i]['quoted_status'] ) ) {
|
904 |
$trimmed_tweets[$i]['quoted_status']['user']['verified'] = $tweets[$i]['quoted_status']['user']['verified'];
|
905 |
$trimmed_tweets[$i]['quoted_status']['text'] = isset( $tweets[$i]['quoted_status']['text'] ) ? $tweets[$i]['quoted_status']['text'] : $tweets[$i]['quoted_status']['full_text'];
|
906 |
$trimmed_tweets[$i]['quoted_status']['id_str'] = $tweets[$i]['quoted_status']['id_str'];
|
907 |
+
if ( isset( $tweets[$i]['quoted_status']['entities']['urls'][0] ) ) {
|
908 |
+
foreach ( $tweets[$i]['quoted_status']['entities']['urls'] as $url ) {
|
909 |
+
$trimmed_tweets[$i]['quoted_status']['entities']['urls'][] = array(
|
910 |
+
'url' => $url['url'],
|
911 |
+
'expanded_url' => $url['expanded_url'],
|
912 |
+
'display_url' => $url['display_url'],
|
913 |
+
);
|
914 |
+
}
|
915 |
+
}
|
916 |
}
|
917 |
|
918 |
$trimmed_tweets[$i] = $this->filterTrimmedTweets( $trimmed_tweets[$i], $tweets[$i] );
|
925 |
return str_replace( $string, '', $text );
|
926 |
}
|
927 |
|
928 |
+
/**
|
929 |
+
* captures additional data for "Pro" features
|
930 |
+
*
|
931 |
+
* @param $trimmed array current set of trimmed tweets
|
932 |
+
* @param $tweet array raw tweet data from api
|
933 |
+
* @return array
|
934 |
+
*/
|
935 |
+
protected function filterTrimmedTweets( $trimmed, $tweet )
|
936 |
+
{
|
937 |
+
if ( isset( $tweet['in_reply_to_screen_name'] ) ) {
|
938 |
+
$trimmed['in_reply_to_screen_name'] = $tweet['in_reply_to_screen_name'];
|
939 |
+
$trimmed['entities']['user_mentions'][0]['name'] = isset( $tweet['entities']['user_mentions'][0]['name'] ) ? $tweet['entities']['user_mentions'][0]['name'] : '';
|
940 |
+
$trimmed['in_reply_to_status_id_str'] = $tweet['in_reply_to_status_id_str'];
|
941 |
+
}
|
|
|
942 |
|
943 |
+
if ( isset( $tweet['extended_entities']['media'] ) ) {
|
944 |
+
// if there is media, we need to remove the media url from the tweet text
|
945 |
+
$text = isset( $tweet['full_text'] ) ? $tweet['full_text'] : $tweet['text'];
|
946 |
+
if ( isset( $tweet['extended_entities']['media'][0]['url'] ) ) {
|
947 |
+
$trimmed['text'] = $this->removeStringFromText( $tweet['extended_entities']['media'][0]['url'], $text );
|
948 |
+
}
|
949 |
+
$num_media = count( $tweet['extended_entities']['media'] );
|
950 |
+
for ( $i = 0; $i < $num_media; $i++ ) {
|
951 |
+
$trimmed['extended_entities']['media'][$i]['media_url_https'] = $tweet['extended_entities']['media'][$i]['media_url_https'];
|
952 |
+
$trimmed['extended_entities']['media'][$i]['type'] = $tweet['extended_entities']['media'][$i]['type'];
|
953 |
+
if ( isset( $tweet['extended_entities']['media'][$i]['sizes'] ) ) {
|
954 |
+
$trimmed['extended_entities']['media'][$i]['sizes'] = $tweet['extended_entities']['media'][$i]['sizes'];
|
955 |
+
}
|
956 |
+
if ( $tweet['extended_entities']['media'][$i]['type'] == 'video' || $tweet['extended_entities']['media'][$i]['type'] == 'animated_gif' ) {
|
957 |
+
foreach ( $tweet['extended_entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
958 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
959 |
+
$trimmed['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
960 |
+
}
|
961 |
+
}
|
962 |
+
if ( ! isset( $trimmed['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
963 |
+
$trimmed['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['extended_entities']['media'][$i]['video_info']['variants'][0]['url'];
|
964 |
+
}
|
965 |
+
}
|
966 |
+
}
|
967 |
|
968 |
+
} elseif ( isset( $tweet['entities']['media'] ) ) {
|
969 |
+
// if there is media, we need to remove the media url from the tweet text
|
970 |
+
$text = isset( $tweet['full_text'] ) ? $tweet['full_text'] : $tweet['text'];
|
971 |
+
if ( isset( $tweet['entities']['media'][0]['url'] ) ) {
|
972 |
+
$trimmed['text'] = $this->removeStringFromText( $tweet['entities']['media'][0]['url'], $text );
|
973 |
+
}
|
974 |
|
975 |
+
$num_media = count( $tweet['entities']['media'] );
|
976 |
+
for ( $i = 0; $i < $num_media; $i++ ) {
|
977 |
+
$trimmed['entities']['media'][$i]['media_url_https'] = $tweet['entities']['media'][$i]['media_url_https'];
|
978 |
+
$trimmed['entities']['media'][$i]['type'] = $tweet['entities']['media'][$i]['type'];
|
979 |
+
if ( isset( $tweet['entities']['media'][$i]['sizes'] ) ) {
|
980 |
+
$trimmed['entities']['media'][$i]['sizes'] = $tweet['entities']['media'][$i]['sizes'];
|
981 |
+
}
|
982 |
+
if ( $tweet['entities']['media'][$i]['type'] == 'video' || $tweet['entities']['media'][$i]['type'] == 'animated_gif' ) {
|
983 |
+
foreach ( $tweet['entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
984 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
985 |
+
$trimmed['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
986 |
+
}
|
987 |
+
}
|
988 |
+
if ( ! isset( $trimmed['entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
989 |
+
$trimmed['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['entities']['media'][$i]['video_info']['variants'][0]['url'];
|
990 |
+
}
|
991 |
+
}
|
992 |
+
}
|
993 |
|
994 |
+
}
|
|
|
|
|
|
|
|
|
|
|
995 |
|
996 |
+
if ( isset( $tweet['retweeted_status']['extended_entities']['media'] ) ) {
|
997 |
+
// if there is media, we need to remove the media url from the tweet text
|
998 |
+
$retweeted_text = isset( $tweet['retweeted_status']['full_text'] ) ? $tweet['retweeted_status']['full_text'] : $tweet['retweeted_status']['text'];
|
999 |
+
if ( isset( $tweet['retweeted_status']['extended_entities']['media'][0]['url'] ) ) {
|
1000 |
+
$trimmed['retweeted_status']['text'] = $this->removeStringFromText( $tweet['retweeted_status']['extended_entities']['media'][0]['url'], $retweeted_text );
|
1001 |
+
}
|
1002 |
|
1003 |
+
$num_media = count( $tweet['retweeted_status']['extended_entities']['media'] );
|
1004 |
+
for ( $i = 0; $i < $num_media; $i++ ) {
|
1005 |
+
$trimmed['retweeted_status']['extended_entities']['media'][$i]['media_url_https'] = $tweet['retweeted_status']['extended_entities']['media'][$i]['media_url_https'];
|
1006 |
+
$trimmed['retweeted_status']['extended_entities']['media'][$i]['type'] = $tweet['retweeted_status']['extended_entities']['media'][$i]['type'];
|
1007 |
+
if ( isset( $tweet['retweeted_status']['extended_entities']['media'][$i]['sizes'] ) ) {
|
1008 |
+
$trimmed['retweeted_status']['extended_entities']['media'][$i]['sizes'] = $tweet['retweeted_status']['extended_entities']['media'][$i]['sizes'];
|
1009 |
+
}
|
1010 |
+
if ( $tweet['retweeted_status']['extended_entities']['media'][$i]['type'] == 'video' || $tweet['retweeted_status']['extended_entities']['media'][$i]['type'] == 'animated_gif' ) {
|
1011 |
+
foreach ( $tweet['retweeted_status']['extended_entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
1012 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
1013 |
+
$trimmed['retweeted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
1014 |
+
}
|
1015 |
+
}
|
1016 |
+
if ( ! isset( $trimmed['retweeted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
1017 |
+
$trimmed['retweeted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['retweeted_status']['extended_entities']['media'][$i]['video_info']['variants'][0]['url'];
|
1018 |
+
}
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
|
1022 |
+
} elseif ( isset( $tweet['retweeted_status']['entities']['media'] ) ) {
|
1023 |
+
// if there is media, we need to remove the media url from the tweet text
|
1024 |
+
$retweeted_text = isset( $tweet['retweeted_status']['full_text'] ) ? $tweet['retweeted_status']['full_text'] : $tweet['retweeted_status']['text'];
|
1025 |
+
if ( isset( $tweet['retweeted_status']['entities']['media'][0]['url'] ) ) {
|
1026 |
+
$trimmed['retweeted_status']['text'] = $this->removeStringFromText( $tweet['retweeted_status']['entities']['media'][0]['url'], $retweeted_text );
|
1027 |
+
}
|
1028 |
|
1029 |
+
$num_media = count( $tweet['retweeted_status']['entities']['media'] );
|
1030 |
+
for( $i = 0; $i < $num_media; $i++ ) {
|
1031 |
+
$trimmed['retweeted_status']['entities']['media'][$i]['media_url_https'] = $tweet['retweeted_status']['entities']['media'][$i]['media_url_https'];
|
1032 |
+
$trimmed['retweeted_status']['entities']['media'][$i]['type'] = $tweet['retweeted_status']['entities']['media'][$i]['type'];
|
1033 |
+
if ( isset( $tweet['retweeted_status']['entities']['media'][$i]['sizes'] ) ) {
|
1034 |
+
$trimmed['retweeted_status']['entities']['media'][$i]['sizes'] = $tweet['retweeted_status']['entities']['media'][$i]['sizes'];
|
1035 |
+
}
|
1036 |
+
if ( $tweet['retweeted_status']['entities']['media'][$i]['type'] == 'video' || $tweet['retweeted_status']['entities']['media'][$i]['type'] == 'animated_gif' ) {
|
1037 |
+
foreach ( $tweet['retweeted_status']['entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
1038 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
1039 |
+
$trimmed['retweeted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
if ( ! isset( $trimmed['retweeted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
1043 |
+
$trimmed['retweeted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['retweeted_status']['entities']['media'][$i]['video_info']['variants'][0]['url'];
|
1044 |
+
}
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
|
1048 |
+
} elseif ( isset( $tweet['quoted_status']['extended_entities']['media'] ) ) {
|
1049 |
+
// if there is media, we need to remove the media url from the tweet text
|
1050 |
+
$quoted_text = isset( $tweet['quoted_status']['full_text'] ) ? $tweet['quoted_status']['full_text'] : $tweet['quoted_status']['text'];
|
1051 |
+
if ( isset( $tweet['quoted_status']['extended_entities']['media'][0]['url'] ) ) {
|
1052 |
+
$trimmed['quoted_status']['text'] = $this->removeStringFromText( $tweet['quoted_status']['extended_entities']['media'][0]['url'], $quoted_text );
|
1053 |
+
}
|
1054 |
|
1055 |
+
$num_media = count( $tweet['quoted_status']['extended_entities']['media'] );
|
1056 |
+
for( $i = 0; $i < $num_media; $i++ ) {
|
1057 |
+
$trimmed['quoted_status']['extended_entities']['media'][$i]['media_url_https'] = $tweet['quoted_status']['extended_entities']['media'][$i]['media_url_https'];
|
1058 |
+
$trimmed['quoted_status']['extended_entities']['media'][$i]['type'] = $tweet['quoted_status']['extended_entities']['media'][$i]['type'];
|
1059 |
+
if ( $tweet['quoted_status']['extended_entities']['media'][$i]['type'] == 'video' || $tweet['quoted_status']['extended_entities']['media'][$i]['type'] == 'animated_gif' ) {
|
1060 |
+
foreach ( $tweet['quoted_status']['extended_entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
1061 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
1062 |
+
$trimmed['quoted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
1063 |
+
}
|
1064 |
+
}
|
1065 |
+
if ( ! isset( $trimmed['quoted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
1066 |
+
$trimmed['quoted_status']['extended_entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['quoted_status']['extended_entities']['media'][$i]['video_info']['variants'][0]['url'];
|
1067 |
+
}
|
1068 |
+
}
|
1069 |
+
}
|
1070 |
|
1071 |
+
} elseif ( isset( $tweet['quoted_status']['entities']['media'] ) ) {
|
1072 |
+
// if there is media, we need to remove the media url from the tweet text
|
1073 |
+
$quoted_text = isset( $tweet['quoted_status']['full_text'] ) ? $tweet['quoted_status']['full_text'] : $tweet['quoted_status']['text'];
|
1074 |
+
if ( isset( $tweet['quoted_status']['entities']['media'][0]['url'] ) ) {
|
1075 |
+
$trimmed['quoted_status']['text'] = $this->removeStringFromText( $tweet['quoted_status']['entities']['media'][0]['url'], $quoted_text );
|
1076 |
+
}
|
1077 |
|
1078 |
+
$num_media = count( $tweet['quoted_status']['entities']['media'] );
|
1079 |
+
for( $i = 0; $i < $num_media; $i++ ) {
|
1080 |
+
$trimmed['quoted_status']['entities']['media'][$i]['media_url_https'] = $tweet['quoted_status']['entities']['media'][$i]['media_url_https'];
|
1081 |
+
$trimmed['quoted_status']['entities']['media'][$i]['type'] = $tweet['quoted_status']['entities']['media'][$i]['type'];
|
1082 |
+
if ( $tweet['quoted_status']['entities']['media'][$i]['type'] == 'video' || $tweet['quoted_status']['entities']['media'][$i]['type'] == 'animated_gif' ) {
|
1083 |
+
foreach ( $tweet['quoted_status']['entities']['media'][$i]['video_info']['variants'] as $variant ) {
|
1084 |
+
if ( isset( $variant['content_type'] ) && $variant['content_type'] == 'video/mp4' ) {
|
1085 |
+
$trimmed['quoted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $variant['url'];
|
1086 |
+
}
|
1087 |
+
}
|
1088 |
+
if ( ! isset( $trimmed['quoted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] ) ) {
|
1089 |
+
$trimmed['quoted_status']['entities']['media'][$i]['video_info']['variants'][$i]['url'] = $tweet['quoted_status']['entities']['media'][$i]['video_info']['variants'][0]['url'];
|
1090 |
+
}
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
//remove the url from the text if it links to a quoted tweet that is already linked to
|
1097 |
+
if ( isset( $tweet['quoted_status'] ) ) {
|
1098 |
+
$maybe_remove_index = count( $tweet['entities']['urls'] ) - 1;
|
1099 |
+
if ( isset( $tweet['entities']['urls'][$maybe_remove_index]['url'] ) ) {
|
1100 |
+
$text = isset( $trimmed['full_text'] ) ? $trimmed['full_text'] : $trimmed['text'];
|
1101 |
+
$trimmed['text'] = $this->removeStringFromText( $tweet['entities']['urls'][$maybe_remove_index]['url'], $text );
|
1102 |
+
}
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
|
1106 |
+
// used to generate twitter cards
|
1107 |
+
if ( isset( $tweet['entities']['urls'][0]['expanded_url'] ) ) {
|
1108 |
+
$trimmed['entities']['urls'][0]['expanded_url'] = $tweet['entities']['urls'][0]['expanded_url'];
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
if ( isset( $tweet['retweeted_status']['entities']['urls'][0]['expanded_url'] ) ) {
|
1112 |
+
$trimmed['retweeted_status']['entities']['urls'][0]['expanded_url'] = $tweet['retweeted_status']['entities']['urls'][0]['expanded_url'];
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
return $trimmed;
|
1116 |
+
}
|
1117 |
|
1118 |
/**
|
1119 |
* will create a transient with the tweet cache if one doesn't exist, the data seems valid, and caching is active
|
1169 |
if ( ! empty ( $feed_term ) ) {
|
1170 |
$get_fields['screen_name'] = $feed_term;
|
1171 |
}
|
1172 |
+
if ( !$this->feed_options['selfreplies'] ) {
|
1173 |
+
$get_fields['exclude_replies'] = 'true';
|
1174 |
+
}
|
1175 |
}
|
1176 |
if ( $end_point === 'hometimeline' ) {
|
1177 |
$get_fields['exclude_replies'] = 'true';
|
1178 |
+
if ( !$this->feed_options['selfreplies'] ) {
|
1179 |
+
$get_fields['exclude_replies'] = 'true';
|
1180 |
+
}
|
1181 |
}
|
1182 |
if ( $end_point === 'search' ) {
|
1183 |
$get_fields['q'] = $feed_term;
|
1275 |
$html .= '<a class="twitter-follow-button" href="https://twitter.com/' . $feed_options['screenname'] . '" target="_blank" data-show-count="false" data-size="large" data-dnt="true">Follow</a>';
|
1276 |
}
|
1277 |
$html .= '</p>';
|
1278 |
+
if ( !$feed_options['disableintents'] ) {
|
1279 |
+
$html .= "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>";
|
1280 |
+
}
|
1281 |
$html .= '</div>';
|
1282 |
|
1283 |
return $html;
|
1293 |
$feed_options = $this->feed_options;
|
1294 |
$ctf_data_disablelinks = ($feed_options['disablelinks'] == 'true') ? ' data-ctfdisablelinks="true"' : '';
|
1295 |
$ctf_data_linktextcolor = $feed_options['linktextcolor'] != '' ? ' data-ctflinktextcolor="'.$feed_options['linktextcolor'].'"' : '';
|
1296 |
+
$ctf_enable_intents = $feed_options['disableintents'] === false && ctf_show( 'actions', $feed_options ) ? ' data-ctfintents="1"' : '';
|
1297 |
+
$ctf_data_needed = $this->num_tweets_needed;
|
1298 |
$ctf_feed_type = ! empty ( $feed_options['type'] ) ? esc_attr( $feed_options['type'] ) : 'multiple';
|
1299 |
$ctf_feed_classes = 'ctf ctf-type-' . $ctf_feed_type;
|
1300 |
$ctf_feed_classes .= ' ' . $feed_options['class'] . ' ctf-styles';
|
1304 |
$ctf_feed_html = '';
|
1305 |
|
1306 |
$ctf_feed_html .= '<!-- Custom Twitter Feeds by Smash Balloon -->';
|
1307 |
+
$ctf_feed_html .= '<div id="ctf" class="' . $ctf_feed_classes . '" style="' . $feed_options['width'] . $feed_options['height'] . $feed_options['bgcolor'] . '" data-ctfshortcode="' . $this->getShortCodeJSON() . '"' .$ctf_data_disablelinks . $ctf_data_linktextcolor . $ctf_enable_intents . ' data-ctfneeded="'. $ctf_data_needed .'">';
|
1308 |
$tweet_set = $this->tweet_set;
|
1309 |
|
1310 |
// dynamically include header
|
1334 |
}
|
1335 |
|
1336 |
if ( $feed_options['creditctf'] ) {
|
1337 |
+
$ctf_feed_html .= '<div class="ctf-credit-link"><a href="https://smashballoon.com/custom-twitter-feeds" target="_blank">' . ctf_get_fa_el( 'fa-twitter' ) . 'Custom Twitter Feeds Plugin</a></div>';
|
1338 |
}
|
1339 |
|
1340 |
$ctf_feed_html .= '</div>'; // closing div tag for #ctf
|
1378 |
$ctf_header_html .= '</span>';
|
1379 |
|
1380 |
if ( $tweet_set[0]['user']['verified'] == 1 ) {
|
1381 |
+
$ctf_header_html .= '<span class="ctf-verified">' . ctf_get_fa_el( 'fa-check-circle' ) . '</span>';
|
1382 |
}
|
1383 |
|
1384 |
+
$ctf_header_html .= '<span class="ctf-header-follow">' . ctf_get_fa_el( 'fa-twitter' ) . 'Follow</span>';
|
1385 |
$ctf_header_html .= '</p>';
|
1386 |
|
1387 |
if ( $feed_options['showbio'] && !empty($tweet_set[0]['user']['description']) ) {
|
1390 |
|
1391 |
$ctf_header_html .= '</div>';
|
1392 |
$ctf_header_html .= '<div class="ctf-header-img">';
|
1393 |
+
$ctf_header_html .= '<div class="ctf-header-img-hover">' . ctf_get_fa_el( 'fa-twitter' ) . '</div>';
|
1394 |
$ctf_header_html .= '<img src="' . $tweet_set[0]['user']['profile_image_url_https'] . '" alt="' . $tweet_set[0]['user']['name'] . '" width="48" height="48">';
|
1395 |
$ctf_header_html .= '</div>';
|
1396 |
$ctf_header_html .= '</a>';
|
1412 |
$ctf_header_html .= '</div>';
|
1413 |
$ctf_header_html .= '<div class="ctf-header-img">';
|
1414 |
$ctf_header_html .= '<div class="ctf-header-generic-icon">';
|
1415 |
+
$ctf_header_html .= ctf_get_fa_el( 'fa-twitter' );
|
1416 |
$ctf_header_html .= '</div>';
|
1417 |
$ctf_header_html .= '</div>';
|
1418 |
$ctf_header_html .= '</a>';
|
1437 |
$feed_options = $this->feed_options;
|
1438 |
$tweet_html = $this->feed_html;
|
1439 |
|
|
|
|
|
|
|
|
|
|
|
1440 |
if ( $is_pagination && ( ! isset ( $tweet_set[1]['id_str'] ) ) ) {
|
1441 |
$tweet_html .= $this->getOutOfTweetsHtml( $this->feed_options );
|
1442 |
} else {
|
1486 |
switch ( $quoted_media[0]['type'] ) {
|
1487 |
case 'video':
|
1488 |
case 'animated_gif':
|
1489 |
+
$quoted_media_text .= ctf_get_fa_el( 'fa-file-video-o' );
|
1490 |
break;
|
1491 |
default:
|
1492 |
if ( $quoted_media_count > 1 ) {
|
1493 |
+
$quoted_media_text .= '<span class="ctf-quoted-tweet-text-media-wrap ctf-multi-media-icon">' . $quoted_media_count . ctf_get_fa_el( 'fa-picture-o' ) . '</span>';
|
1494 |
} else {
|
1495 |
+
$quoted_media_text .= '<span class="ctf-quoted-tweet-text-media-wrap">' . ctf_get_fa_el( 'fa-picture-o' ) . '</span>';
|
1496 |
}
|
1497 |
break;
|
1498 |
}
|
1513 |
switch ( $post_media[0]['type'] ) {
|
1514 |
case 'video':
|
1515 |
case 'animated_gif':
|
1516 |
+
$post_media_text .= ctf_get_fa_el( 'fa-file-video-o' );
|
1517 |
break;
|
1518 |
default:
|
1519 |
if ( $post_media_count > 1 ) {
|
1520 |
+
$post_media_text .= $post_media_count . ctf_get_fa_el( 'fa-picture-o' );
|
1521 |
} else {
|
1522 |
+
$post_media_text .= ctf_get_fa_el( 'fa-picture-o' );
|
1523 |
}
|
1524 |
break;
|
1525 |
}
|
1532 |
|
1533 |
if ( isset( $retweeter ) && ctf_show( 'retweeter', $feed_options ) ) {
|
1534 |
$tweet_html .= '<div class="ctf-context">';
|
1535 |
+
$tweet_html .= '<a href="https://twitter.com/intent/user?screen_name=' . $retweeter['screen_name'] . '" target="_blank" class="ctf-retweet-icon">' . ctf_get_fa_el( 'fa-retweet' ) . '<span class="ctf-screenreader">'.__( 'Retweet on Twitter', 'custom-twitter-feeds' ).'</span></a>';
|
1536 |
$tweet_html .= '<a href="https://twitter.com/' . $retweeter['screen_name'] . '" target="_blank" class="ctf-retweet-text" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">' . $retweeter['name'] . ' ' . $feed_options['retweetedtext'] . '</a>';
|
1537 |
$tweet_html .= '</div>';
|
1538 |
}
|
1550 |
if ( ctf_show( 'author', $feed_options ) ) {
|
1551 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '" target="_blank" class="ctf-author-name" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">' . $post['user']['name'] . '</a>';
|
1552 |
if ( $post['user']['verified'] == 1 ) {
|
1553 |
+
$tweet_html .= '<span class="ctf-verified" >' . ctf_get_fa_el( 'fa-check-circle' ) . '</span>';
|
1554 |
}
|
1555 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '" class="ctf-author-screenname" target="_blank" style="' . $feed_options['authortextsize'] . $feed_options['authortextweight'] . $feed_options['textcolor'] . '">@' . $post['user']['screen_name'] . '</a>';
|
1556 |
$tweet_html .= '<span class="ctf-screename-sep">·</span>';
|
1562 |
$tweet_html .= '<a href="https://twitter.com/' . $post['user']['screen_name'] . '/status/' . $post['id_str'] . '" class="ctf-tweet-date" target="_blank" style="' . $feed_options['datetextsize'] . $feed_options['datetextweight'] . $feed_options['textcolor'] . '">' . ctf_get_formatted_date( $post['created_at'], $feed_options, $post['user']['utc_offset'] ) . '</a>';
|
1563 |
$tweet_html .= '</div>';
|
1564 |
} // show date
|
1565 |
+
$tweet_html .= '</div>';
|
1566 |
+
if ( ctf_show( 'logo', $feed_options ) ) {
|
1567 |
+
$tweet_html .= '<div class="ctf-corner-logo" style="' . $feed_options['logosize'] . $feed_options['logocolor'] . '">';
|
1568 |
+
$tweet_html .= ctf_get_fa_el( 'fa-twitter' );
|
1569 |
+
$tweet_html .= '</div>';
|
1570 |
+
}
|
1571 |
$tweet_html .= '</div>';
|
1572 |
}
|
1573 |
|
1574 |
|
1575 |
if ( ctf_show( 'text', $feed_options ) ) {
|
1576 |
+
$post_text = apply_filters( 'ctf_tweet_text', $post['text'], $feed_options, $post );
|
1577 |
|
1578 |
$tweet_html .= '<div class="ctf-tweet-content">';
|
1579 |
|
1585 |
$tweet_html .= '<p class="ctf-tweet-text" style="' . $feed_options['tweettextsize'] . $feed_options['tweettextweight'] . $feed_options['textcolor'] . '">' . nl2br( $post_text );
|
1586 |
|
1587 |
if( $post_media_count > 0 ){
|
1588 |
+
$multi_class = '';
|
1589 |
+
if ( $post_media_count > 1 ) {
|
1590 |
+
$multi_class = ' ctf-multi-media-icon';
|
1591 |
+
}
|
1592 |
if ( $feed_options['disablelinks'] ) {
|
1593 |
+
$tweet_html .= '<span class="ctf-tweet-text-media-wrap' . $multi_class . '">' . $post_media_text . '</span>' . '</p>';
|
1594 |
} else {
|
1595 |
+
$tweet_html .= '</p><a href="https://twitter.com/' .$post['user']['screen_name'] . '/status/' . $post['id_str'] . '" target="_blank" class="ctf-tweet-text-media-wrap' . $multi_class . '">' . $post_media_text . '</a>';
|
1596 |
}
|
1597 |
}
|
1598 |
} // link text to twitter option is selected
|
1605 |
$tweet_html .= '<span class="ctf-quoted-author-name">' . $quoted['user']['name'] . '</span>';
|
1606 |
|
1607 |
if ($quoted['user']['verified'] == 1) {
|
1608 |
+
$tweet_html .= '<span class="ctf-quoted-verified">' . ctf_get_fa_el( 'fa-check-circle' ) . '</span>';
|
1609 |
} // user is verified
|
1610 |
+
$quoted_text = apply_filters( 'ctf_quoted_tweet_text', $quoted['text'], $feed_options, $quoted );
|
1611 |
|
1612 |
$tweet_html .= '<span class="ctf-quoted-author-screenname">@' . $quoted['user']['screen_name'] . '</span>';
|
1613 |
+
$tweet_html .= '<p class="ctf-quoted-tweet-text" style="' . $feed_options['tweettextsize'] . $feed_options['tweettextweight'] . $feed_options['textcolor'] . '">' . nl2br( $quoted_text ) . $quoted_media_text . '</p>';
|
1614 |
//$tweet_html .= ;
|
1615 |
$tweet_html .= '</a>';
|
1616 |
}// show link box
|
1649 |
public function getErrorHtml()
|
1650 |
{
|
1651 |
$error_html = '';
|
1652 |
+
$error_html .= '<div id="ctf" class="ctf" data-ctfshortcode="' . $this->getShortCodeJSON() . '">';
|
1653 |
$error_html .= '<div class="ctf-error">';
|
1654 |
$error_html .= '<div class="ctf-error-user">';
|
1655 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1656 |
$error_html .= '</div>';
|
1657 |
|
1658 |
if ( current_user_can( 'manage_options' ) ) {
|
1659 |
$error_html .= '<div class="ctf-error-admin">';
|
1660 |
|
1661 |
+
if ( ! empty( $this->api_obj->api_error_no ) ) {
|
1662 |
+
|
1663 |
+
$error_html .= '<p>Unable to load Tweets</p>';
|
1664 |
+
$error_html .= '<a class="twitter-share-button"';
|
1665 |
+
$error_html .= 'href="https://twitter.com/share"';
|
1666 |
+
$error_html .= 'data-size="large"';
|
1667 |
+
$error_html .= 'data-url="' . get_the_permalink() . '"';
|
1668 |
+
$error_html .= 'data-text="Check out this website">';
|
1669 |
+
$error_html .= '</a>';
|
1670 |
+
|
1671 |
+
if ( !empty( $this->feed_options['screenname'] ) ) {
|
1672 |
+
$error_html .= '<a class="twitter-follow-button"';
|
1673 |
+
$error_html .= 'href="https://twitter.com/' . $this->feed_options['screenname'] . '"';
|
1674 |
+
$error_html .= 'data-show-count="false"';
|
1675 |
+
$error_html .= 'data-size="large"';
|
1676 |
+
$error_html .= 'data-dnt="true">Follow</a>';
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
$error_html .= '<p><b>This message is only visible to admins:</b><br />';
|
1680 |
+
$error_html .= 'An error has occurred with your feed.<br />';
|
1681 |
+
if ( $this->missing_credentials ) {
|
1682 |
+
$error_html .= 'There is a problem with your access token, access token secret, consumer token, or consumer secret<br />';
|
1683 |
+
}
|
1684 |
+
if ( isset( $this->errors['error_message'] ) ) {
|
1685 |
+
$error_html .= $this->errors['error_message'] . '<br />';
|
1686 |
+
}
|
1687 |
+
$error_html .= 'The error response from the Twitter API is the following:<br />';
|
1688 |
+
$error_html .= '<code>Error number: ' . $this->api_obj->api_error_no . '<br />';
|
1689 |
+
$error_html .= 'Message: ' . $this->api_obj->api_error_message . '</code>';
|
1690 |
+
$error_html .= '<a href="https://smashballoon.com/custom-twitter-feeds/docs/errors/" target="_blank">Click here to troubleshoot</a></p>';
|
1691 |
+
|
1692 |
+
|
1693 |
}
|
|
|
1694 |
|
1695 |
$error_html .= '</div>';
|
1696 |
}
|
inc/admin-hooks.php
CHANGED
@@ -6,7 +6,7 @@ function ctf_return_string_hashtag( $val ) {
|
|
6 |
|
7 |
add_filter( 'ctf_admin_search_whatis', 'ctf_return_string_instructions' );
|
8 |
function ctf_return_string_instructions( $val ) {
|
9 |
-
return 'Select this option and enter any single hashtag for a hashtag feed';
|
10 |
}
|
11 |
|
12 |
add_filter( 'ctf_admin_validate_search_text', 'ctf_validate_search_text', 10, 1 );
|
@@ -154,101 +154,6 @@ function ctf_show_hide_list( $show_hide_list ) {
|
|
154 |
return $show_hide_list;
|
155 |
}
|
156 |
|
157 |
-
function ctf_pro_masonry_section() {
|
158 |
-
?>
|
159 |
-
<p class="ctf_pro_section_note"><a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Upgrade to Pro to enable Masonry layouts</a></p>
|
160 |
-
<span><a href="javascript:void(0);" class="button button-secondary ctf-show-pro"><b>+</b> Show Pro Options</a></span>
|
161 |
-
|
162 |
-
<div class="ctf-pro-options">
|
163 |
-
<table class="form-table"><tbody><tr><th scope="row"><label for="ctf_masonry" title="Click for shortcode option">Set Masonry Columns as Default</label><code class="ctf_shortcode">masonry
|
164 |
-
Eg: masonry=true</code></th><td> <input name="ctf_options[masonry]" id="ctf_masonry" type="checkbox" disabled>
|
165 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
166 |
-
<p class="ctf-tooltip ctf-more-info">This will make every Twitter feed show as masonry style columns by default.</p>
|
167 |
-
</td></tr><tr><th scope="row"><label for="ctf_masonrycols">Desktop Columns</label><code class="ctf_shortcode">masonrycols
|
168 |
-
Eg: masonrycols=5</code></th><td> <select name="ctf_options[masonrycols]" id="ctf_masonrycols" class="" disabled>
|
169 |
-
<option value="2" id="ctf-masonrycols" class="">2</option>
|
170 |
-
<option value="3" id="ctf-masonrycols" class="">3</option>
|
171 |
-
<option value="4" id="ctf-masonrycols" class="">4</option>
|
172 |
-
<option value="5" id="ctf-masonrycols" class="">5</option>
|
173 |
-
<option value="6" id="ctf-masonrycols" class="">6</option>
|
174 |
-
</select>
|
175 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
176 |
-
<p class="ctf-tooltip ctf-more-info">Number of vertical columns the masonry feed will use when the screen is viewed on wide screens.</p>
|
177 |
-
</td></tr><tr><th scope="row"><label for="ctf_masonrymobilecols">Mobile Columns</label><code class="ctf_shortcode">masonrymobilecols
|
178 |
-
Eg: masonrymobilecols=2</code></th><td> <select name="ctf_options[masonrymobilecols]" id="ctf_masonrymobilecols" class="" disabled>
|
179 |
-
<option value="1" id="ctf-masonrymobilecols" class="">1</option>
|
180 |
-
<option value="2" id="ctf-masonrymobilecols" class="">2</option>
|
181 |
-
</select>
|
182 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
183 |
-
<p class="ctf-tooltip ctf-more-info">Number of vertical columns the masonry feed will use when the screen is viewed on small screens.</p>
|
184 |
-
</td></tr></tbody></table>
|
185 |
-
</div>
|
186 |
-
<div style="height: 18px;"></div>
|
187 |
-
<?php
|
188 |
-
}
|
189 |
-
|
190 |
-
function ctf_pro_carousel_section() {
|
191 |
-
?>
|
192 |
-
<p class="ctf_pro_section_note"><a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Upgrade to Pro to enable Carousel</a></p>
|
193 |
-
<span><a href="javascript:void(0);" class="button button-secondary ctf-show-pro"><b>+</b> Show Pro Options</a></span>
|
194 |
-
|
195 |
-
<div class="ctf-pro-options">
|
196 |
-
<table class="form-table"><tbody><tr><th scope="row"><label for="ctf_carousel" title="Click for shortcode option">Set Carousel as Default<code class="ctf_shortcode_symbol">[]</code></label><code class="ctf_shortcode">carousel
|
197 |
-
Eg: carousel=true</code></th><td> <input name="ctf_options[carousel]" id="ctf_carousel" type="checkbox">
|
198 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
199 |
-
<p class="ctf-tooltip ctf-more-info">This will make every Twitter feed display in a carousel by default.</p>
|
200 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselcols">Desktop Columns</label><code class="ctf_shortcode">carouselcols
|
201 |
-
Eg: carouselcols=5</code></th><td> <select name="ctf_options[carouselcols]" id="ctf_carouselcols" class="" disabled>
|
202 |
-
<option value="1" id="ctf-carouselcols" class="">1</option>
|
203 |
-
<option value="2" id="ctf-carouselcols" class="">2</option>
|
204 |
-
<option value="3" id="ctf-carouselcols" class="">3</option>
|
205 |
-
<option value="4" id="ctf-carouselcols" class="">4</option>
|
206 |
-
<option value="5" id="ctf-carouselcols" class="">5</option>
|
207 |
-
<option value="6" id="ctf-carouselcols" class="">6</option>
|
208 |
-
</select>
|
209 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
210 |
-
<p class="ctf-tooltip ctf-more-info">Number of vertical columns the carousel feed will use when the screen is viewed on wide screens.</p>
|
211 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselmobilecols">Mobile Columns</label><code class="ctf_shortcode">carouselmobilecols
|
212 |
-
Eg: carouselmobilecols=2</code></th><td> <select name="ctf_options[carouselmobilecols]" id="ctf_carouselmobilecols" class="" disabled>
|
213 |
-
<option value="1" id="ctf-carouselmobilecols" class="">1</option>
|
214 |
-
<option value="2" id="ctf-carouselmobilecols" class="">2</option>
|
215 |
-
</select>
|
216 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
217 |
-
<p class="ctf-tooltip ctf-more-info">Number of vertical columns the carousel feed will use when the screen is viewed on small screens.</p>
|
218 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselarrows">Navigation Arrows</label><code class="ctf_shortcode">carouselarrows
|
219 |
-
Eg: carouselarrows=below</code></th><td> <select name="ctf_options[carouselarrows]" id="ctf_carouselarrows" class="" disabled>
|
220 |
-
<option value="onhover" id="ctf-carouselarrows" class="">Show on Hover</option>
|
221 |
-
<option value="below" id="ctf-carouselarrows" class="">Show below feed</option>
|
222 |
-
<option value="hide" id="ctf-carouselarrows" class="">Hide arrows</option>
|
223 |
-
</select>
|
224 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselpag">Show Pagination</label><code class="ctf_shortcode">carouselpag
|
225 |
-
Eg: carouselpag=true</code></th><td> <input name="ctf_options[carouselpag]" id="ctf_carouselpag" type="checkbox">
|
226 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselheight">Height of Carousel</label><code class="ctf_shortcode">carouselheight
|
227 |
-
Eg: carouselheight="auto"</code></th><td> <select name="ctf_options[carouselheight]" id="ctf_carouselheight" class="" disabled>
|
228 |
-
<option value="tallest" id="ctf-carouselheight" class="">Always set to tallest post</option>
|
229 |
-
<option value="clickexpand" id="ctf-carouselheight" class="">Set to shortest post, button to expand</option>
|
230 |
-
<option value="auto" id="ctf-carouselheight" class="">Automatically set to post height (forces single column)</option>
|
231 |
-
</select>
|
232 |
-
</td></tr><tr><th scope="row"><label for="ctf_carouselautoplay">Enable Autoplay</label><code class="ctf_shortcode">carouselautoplay
|
233 |
-
Eg: carouselautoplay=true</code></th><td> <input name="ctf_options[carouselautoplay]" id="ctf_carouselautoplay" type="checkbox" disabled>
|
234 |
-
</td></tr><tr class="default-text"><th scope="row"><label for="ctf_carouseltime">Autoplay interval Time</label><code class="ctf_shortcode">carouseltime
|
235 |
-
Eg: carouseltime=8000</code></th><td> <input name="ctf_options[carouseltime]" id="ctf_carouseltime" class="default-text" type="text" value="5000" disabled>
|
236 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
237 |
-
<p class="ctf-tooltip ctf-more-info">Time it takes for the carousel to change in milliseconds.</p>
|
238 |
-
</td></tr><tr class="default-text"><th scope="row"><label for="ctf_carouselloop">Loop Type</label><code class="ctf_shortcode">carouselloop
|
239 |
-
Eg: carouselloop=none</code></th><td> <select name="ctf_options[carouselloop]" id="ctf_carouselloop" class="default-text" disabled>
|
240 |
-
<option value="none" id="ctf-carouselloop" class="default-text">None</option>
|
241 |
-
<option value="infinite" id="ctf-carouselloop" class="default-text">Infinite</option>
|
242 |
-
<option value="rewind" id="ctf-carouselloop" class="default-text">Rewind</option>
|
243 |
-
</select>
|
244 |
-
<a class="ctf-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
|
245 |
-
<p class="ctf-tooltip ctf-more-info">This is where you can set what happens when the carousel reaches the last item.</p>
|
246 |
-
</td></tr></tbody></table>
|
247 |
-
</div>
|
248 |
-
<div style="height: 18px;"></div>
|
249 |
-
<?php
|
250 |
-
}
|
251 |
-
|
252 |
function ctf_pro_autoscroll_section() {
|
253 |
?>
|
254 |
<p class="ctf_pro_section_note"><a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Upgrade to Pro to enable Autoscroll loading</a></p>
|
@@ -322,18 +227,6 @@ function ctf_add_masonry_autoscroll_options( $admin ) {
|
|
322 |
'whatis' => 'This will replace the default text displayed for "In reply to"',
|
323 |
'default' => 'In reply to'// "what is this?" text
|
324 |
) );
|
325 |
-
add_settings_section(
|
326 |
-
'ctf_options_carousel', // matches the section name
|
327 |
-
'<span class="ctf_pro_header">Carousel</span>',
|
328 |
-
'ctf_pro_carousel_section', // callback function to explain the section
|
329 |
-
'ctf_options_carousel' // matches the section name
|
330 |
-
);
|
331 |
-
add_settings_section(
|
332 |
-
'ctf_options_masonry', // matches the section name
|
333 |
-
'<span class="ctf_pro_header">Masonry Columns</span>',
|
334 |
-
'ctf_pro_masonry_section', // callback function to explain the section
|
335 |
-
'ctf_options_masonry' // matches the section name
|
336 |
-
);
|
337 |
|
338 |
add_settings_section(
|
339 |
'ctf_options_autoscroll', // matches the section name
|
@@ -435,12 +328,6 @@ function ctf_filter_operator( $args ) {
|
|
435 |
add_action( 'ctf_admin_add_settings_sections_to_customize', 'ctf_add_masonry_autoload_section_to_customize' );
|
436 |
function ctf_add_masonry_autoload_section_to_customize() {
|
437 |
?>
|
438 |
-
<a id="carousel"></a>
|
439 |
-
<?php do_settings_sections( 'ctf_options_carousel' ); ?>
|
440 |
-
<hr>
|
441 |
-
<a id="masonry"></a>
|
442 |
-
<?php do_settings_sections( 'ctf_options_masonry' ); ?>
|
443 |
-
<hr>
|
444 |
<a id="autoscroll"></a>
|
445 |
<?php do_settings_sections( 'ctf_options_autoscroll' ); ?>
|
446 |
<!-- <p class="submit"><input class="button-primary" type="submit" name="save" value="<?php esc_attr_e( 'Save Changes' ); ?>" /></p> -->
|
6 |
|
7 |
add_filter( 'ctf_admin_search_whatis', 'ctf_return_string_instructions' );
|
8 |
function ctf_return_string_instructions( $val ) {
|
9 |
+
return 'Select this option and enter any single hashtag for a hashtag feed. Only tweets made within the last 7 days are available initially. Once a tweet has been retrieved the plugin will keep it in a persistent cache indefinitely';
|
10 |
}
|
11 |
|
12 |
add_filter( 'ctf_admin_validate_search_text', 'ctf_validate_search_text', 10, 1 );
|
154 |
return $show_hide_list;
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
function ctf_pro_autoscroll_section() {
|
158 |
?>
|
159 |
<p class="ctf_pro_section_note"><a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Upgrade to Pro to enable Autoscroll loading</a></p>
|
227 |
'whatis' => 'This will replace the default text displayed for "In reply to"',
|
228 |
'default' => 'In reply to'// "what is this?" text
|
229 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
add_settings_section(
|
232 |
'ctf_options_autoscroll', // matches the section name
|
328 |
add_action( 'ctf_admin_add_settings_sections_to_customize', 'ctf_add_masonry_autoload_section_to_customize' );
|
329 |
function ctf_add_masonry_autoload_section_to_customize() {
|
330 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
<a id="autoscroll"></a>
|
332 |
<?php do_settings_sections( 'ctf_options_autoscroll' ); ?>
|
333 |
<!-- <p class="submit"><input class="button-primary" type="submit" name="save" value="<?php esc_attr_e( 'Save Changes' ); ?>" /></p> -->
|
inc/notices.php
CHANGED
@@ -1,74 +1,275 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
|
3 |
-
//
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
} elseif ( isset( $_GET[$nag] ) && $get[$nag] == 'later' ) {
|
8 |
-
$time = 2 * WEEK_IN_SECONDS;
|
9 |
-
set_transient( $transient, 'waiting', $time );
|
10 |
-
update_option( $option, 'pending' );
|
11 |
-
}
|
12 |
}
|
13 |
|
14 |
-
//
|
15 |
-
function
|
16 |
-
$ctf_rating_notice_waiting = get_transient( $transient );
|
17 |
-
$notice_status = get_option( $option, false );
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
if ( current_user_can( 'manage_options' ) ){
|
31 |
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
-
|
37 |
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
<div class='ctf_notice ctf_review_notice'>
|
40 |
-
<img src='".
|
41 |
<div class='ctf-notice-text'>
|
42 |
-
<p>It's great to see that you've been using the <strong>Custom Twitter Feeds</strong> plugin for a while now. Hopefully you're happy with it! If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too
|
43 |
-
<p class='links'
|
44 |
-
|
|
|
|
|
45 |
·
|
46 |
-
<a class='ctf_notice_dismiss' href='" .esc_url(
|
47 |
·
|
48 |
-
<a class='ctf_notice_dismiss' href='" .esc_url(
|
49 |
·
|
50 |
-
<a class='ctf_notice_dismiss' href='" .esc_url(
|
51 |
-
</p>
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
</div>
|
55 |
-
")
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
}
|
60 |
}
|
|
|
|
|
|
|
61 |
|
62 |
-
|
63 |
-
$
|
64 |
-
$
|
65 |
-
$nag = 'ctf_ignore_rating_notice_nag';
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
-
// only display the notice if the time offset has passed and the user hasn't already dismissed it
|
72 |
-
if ( get_transient( $transient ) !== 'waiting' && $notice_status !== 'dismissed' ) {
|
73 |
-
add_action( 'admin_notices', 'ctf_rating_notice_html' );
|
74 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
function ctf_get_current_time() {
|
3 |
+
$current_time = time();
|
4 |
|
5 |
+
// where to do tests
|
6 |
+
//$current_time = strtotime( 'November 25, 2020' ) + 1;
|
7 |
+
|
8 |
+
return $current_time;
|
|
|
|
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
+
// generates the html for the admin notices
|
12 |
+
function ctf_notices_html() {
|
|
|
|
|
13 |
|
14 |
+
if ( function_exists( 'sbi_notices_html' ) || function_exists( 'cff_notices_html' ) ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
$current_screen = get_current_screen();
|
19 |
+
$is_plugins_page = isset( $current_screen->id ) && $current_screen->id === 'plugins';
|
20 |
+
$page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
|
21 |
+
//Only show to admins
|
22 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
$ctf_statuses_option = get_option( 'ctf_statuses', array() );
|
27 |
+
$current_time = ctf_get_current_time();
|
28 |
+
$ctf_bfcm_discount_code = 'happysmashgiving' . date('Y', $current_time );
|
29 |
+
|
30 |
+
// reset everything for testing
|
31 |
+
if ( false ) {
|
32 |
+
global $current_user;
|
33 |
+
$user_id = $current_user->ID;
|
34 |
+
delete_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice' );
|
35 |
+
//delete_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice' );
|
36 |
+
//$ctf_statuses_option = array( 'first_install' => strtotime( 'December 8, 2019' ) );
|
37 |
+
//$ctf_statuses_option = array( 'first_install' => time() );
|
38 |
+
|
39 |
+
//update_option( 'ctf_statuses', $ctf_statuses_option, false );
|
40 |
+
//delete_option( 'ctf_rating_notice');
|
41 |
+
//delete_transient( 'instagram_feed_rating_notice_waiting' );
|
42 |
+
|
43 |
+
//set_transient( 'instagram_feed_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
|
44 |
+
//update_option( 'ctf_rating_notice', 'pending', false );
|
45 |
+
}
|
46 |
+
|
47 |
+
//$ctf_statuses_option['rating_notice_dismissed'] = time();
|
48 |
+
//update_option( 'ctf_statuses', $ctf_statuses_option, false );
|
49 |
+
// rating notice logic
|
50 |
+
$ctf_rating_notice_option = get_option( 'ctf_rating_notice', false );
|
51 |
+
$ctf_rating_notice_waiting = get_transient( 'custom_twitter_feeds_rating_notice_waiting' );
|
52 |
+
$should_show_rating_notice = ($ctf_rating_notice_waiting !== 'waiting' && $ctf_rating_notice_option !== 'dismissed');
|
53 |
+
|
54 |
+
// black friday cyber monday logic
|
55 |
+
$thanksgiving_this_year = ctf_get_future_date( 11, date('Y', $current_time ), 4, 4, 1 );
|
56 |
+
$one_week_before_black_friday_this_year = $thanksgiving_this_year - 7*24*60*60;
|
57 |
+
$one_day_after_cyber_monday_this_year = $thanksgiving_this_year + 5*24*60*60;
|
58 |
+
$has_been_two_days_since_rating_dismissal = isset( $ctf_statuses_option['rating_notice_dismissed'] ) ? ((int)$ctf_statuses_option['rating_notice_dismissed'] + 2*24*60*60) < $current_time : true;
|
59 |
+
|
60 |
+
$could_show_bfcm_discount = ($current_time > $one_week_before_black_friday_this_year && $current_time < $one_day_after_cyber_monday_this_year);
|
61 |
+
$should_show_bfcm_discount = false;
|
62 |
+
if ( $could_show_bfcm_discount && $has_been_two_days_since_rating_dismissal ) {
|
63 |
+
global $current_user;
|
64 |
+
$user_id = $current_user->ID;
|
65 |
+
|
66 |
+
$ignore_bfcm_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice' );
|
67 |
+
$ignore_bfcm_sale_notice_meta = isset( $ignore_bfcm_sale_notice_meta[0] ) ? $ignore_bfcm_sale_notice_meta[0] : '';
|
68 |
+
|
69 |
+
/* Check that the user hasn't already clicked to ignore the message */
|
70 |
+
$should_show_bfcm_discount = ($ignore_bfcm_sale_notice_meta !== 'always' && $ignore_bfcm_sale_notice_meta !== date( 'Y', $current_time ));
|
71 |
+
}
|
72 |
+
|
73 |
+
// new user discount logic
|
74 |
+
$in_new_user_month_range = true;
|
75 |
+
$should_show_new_user_discount = false;
|
76 |
+
$has_been_one_month_since_rating_dismissal = isset( $ctf_statuses_option['rating_notice_dismissed'] ) ? ((int)$ctf_statuses_option['rating_notice_dismissed'] + 30*24*60*60) < $current_time + 1: true;
|
77 |
+
|
78 |
+
if ( isset( $ctf_statuses_option['first_install'] ) && $ctf_statuses_option['first_install'] === 'from_update' ) {
|
79 |
+
global $current_user;
|
80 |
+
$user_id = $current_user->ID;
|
81 |
+
$ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice' );
|
82 |
+
$ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
|
83 |
+
|
84 |
+
if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
|
85 |
+
$should_show_new_user_discount = true;
|
86 |
+
}
|
87 |
+
} elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal ) {
|
88 |
+
global $current_user;
|
89 |
+
$user_id = $current_user->ID;
|
90 |
+
$ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice' );
|
91 |
+
$ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
|
92 |
+
|
93 |
+
if ( $ignore_new_user_sale_notice_meta !== 'always'
|
94 |
+
&& isset( $ctf_statuses_option['first_install'] )
|
95 |
+
&& $current_time > (int)$ctf_statuses_option['first_install'] + 60*60*24*30 ) {
|
96 |
+
$should_show_new_user_discount = true;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
// for debugging
|
101 |
+
if ( false ) {
|
102 |
+
global $current_user;
|
103 |
+
$user_id = $current_user->ID;
|
104 |
+
$ignore_bfcm_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice' );
|
105 |
+
$ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice' );
|
106 |
+
|
107 |
+
var_dump( 'new user rating option', $ctf_rating_notice_option );
|
108 |
+
var_dump( 'new user rating transient', $ctf_rating_notice_waiting );
|
109 |
+
|
110 |
+
var_dump( 'should show new user rating notice?', $should_show_rating_notice );
|
111 |
+
|
112 |
+
var_dump( 'new user discount month range?', $in_new_user_month_range );
|
113 |
+
var_dump( 'should show new user discount?', $should_show_new_user_discount );
|
114 |
+
|
115 |
+
var_dump( 'Thanksgiving this year?', date('m/d/Y', $thanksgiving_this_year ) );
|
116 |
|
117 |
+
var_dump( 'could show bfcm discount?', $could_show_bfcm_discount );
|
118 |
+
var_dump( 'rating was dismissed?', date('m/d/Y', $ctf_statuses_option['rating_notice_dismissed'] ) );
|
119 |
|
120 |
+
var_dump( 'should show bfcm discount?', $should_show_bfcm_discount );
|
|
|
121 |
|
122 |
+
var_dump( 'ignore_bfcm_sale_notice_meta', $ignore_bfcm_sale_notice_meta );
|
123 |
+
var_dump( 'ignore_new_user_sale_notice_meta', $ignore_new_user_sale_notice_meta );
|
124 |
|
125 |
+
var_dump( $ctf_statuses_option );
|
126 |
+
}
|
127 |
|
128 |
+
|
129 |
+
if ( $should_show_rating_notice ) {
|
130 |
+
$other_notice_html = '';
|
131 |
+
$dismiss_url = add_query_arg( 'ctf_ignore_rating_notice_nag', '1' );
|
132 |
+
$later_url = add_query_arg( 'ctf_ignore_rating_notice_nag', 'later' );
|
133 |
+
if ( $should_show_bfcm_discount ) {
|
134 |
+
$other_notice_html = '<p class="ctf_other_notice">' . __( 'PS. We currently have a <a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf&discount='.$ctf_bfcm_discount_code.'" target="_blank"><b style="font-weight: 700;">Black Friday deal</b></a> for 20% off the Pro version!', 'custom-twitter-feed' ) . '</p>';
|
135 |
+
|
136 |
+
$dismiss_url = add_query_arg( array(
|
137 |
+
'ctf_ignore_rating_notice_nag' => '1',
|
138 |
+
'ctf_ignore_bfcm_sale_notice' => date( 'Y', $current_time )
|
139 |
+
)
|
140 |
+
);
|
141 |
+
$later_url = add_query_arg( array(
|
142 |
+
'ctf_ignore_rating_notice_nag' => 'later',
|
143 |
+
'ctf_ignore_bfcm_sale_notice' => date( 'Y', $current_time )
|
144 |
+
)
|
145 |
+
);
|
146 |
+
}
|
147 |
+
|
148 |
+
echo "
|
149 |
<div class='ctf_notice ctf_review_notice'>
|
150 |
+
<img src='". CTF_PLUGIN_URL . 'img/ctf-icon.jpg' ."' alt='" . __( 'Custom Twitter Feed', 'custom-twitter-feed' ) . "'>
|
151 |
<div class='ctf-notice-text'>
|
152 |
+
<p style='padding-top: 4px;'>" . __( "It's great to see that you've been using the <strong style='font-weight: 700;'>Custom Twitter Feeds</strong> plugin for a while now. Hopefully you're happy with it! If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!", 'custom-twitter-feed' ) . "</p>
|
153 |
+
<p class='links'";
|
154 |
+
if( $should_show_bfcm_discount ) echo " style='margin-top: 0 !important;'";
|
155 |
+
echo ">
|
156 |
+
<a class='ctf_notice_dismiss' href='https://wordpress.org/support/plugin/custom-twitter-feeds/reviews/' target='_blank'>" . __( 'Sure, I\'d love to!', 'custom-twitter-feed' ) . "</a>
|
157 |
·
|
158 |
+
<a class='ctf_notice_dismiss' href='" .esc_url( $dismiss_url ). "'>" . __( 'No thanks', 'custom-twitter-feed' ) . "</a>
|
159 |
·
|
160 |
+
<a class='ctf_notice_dismiss' href='" .esc_url( $dismiss_url ). "'>" . __( 'I\'ve already given a review', 'custom-twitter-feed' ) . "</a>
|
161 |
·
|
162 |
+
<a class='ctf_notice_dismiss' href='" .esc_url( $later_url ). "'>" . __( 'Ask Me Later', 'custom-twitter-feed' ) . "</a>
|
163 |
+
</p>"
|
164 |
+
. $other_notice_html .
|
165 |
+
"</div>
|
166 |
+
<a class='ctf_notice_close' href='" .esc_url( $dismiss_url ). "'><i class='fa fa-close'></i></a>
|
167 |
+
</div>";
|
168 |
+
|
169 |
+
} elseif ( $should_show_new_user_discount ) {
|
170 |
+
global $current_user;
|
171 |
+
$user_id = $current_user->ID;
|
172 |
+
$ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice' );
|
173 |
+
if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
|
174 |
+
|
175 |
+
echo "
|
176 |
+
<div class='ctf_notice ctf_review_notice ctf_new_user_sale_notice'>
|
177 |
+
<img src='" . CTF_PLUGIN_URL . 'img/ctf-icon-offer.jpg' . "' alt='Custom Twitter Feed'>
|
178 |
+
<div class='ctf-notice-text'>
|
179 |
+
<p>" . __( '<b style="font-weight: 700;">Exclusive offer!</b> We don\'t run promotions very often, but for a limited time we\'re offering <b style="font-weight: 700;">20% off</b> our Pro version to all users of our free Custom Twitter Feeds plugin.', 'custom-twitter-feed' ) . "</p>
|
180 |
+
<p class='ctf-links'>
|
181 |
+
<a class='ctf_notice_dismiss ctf_offer_btn' href='https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf&discount=twitterthankyou' target='_blank'><b>" . __( 'Get this offer', 'custom-twitter-feed' ) . "</b></a>
|
182 |
+
<a class='ctf_notice_dismiss' style='margin-left: 5px;' href='" . esc_url( add_query_arg( 'ctf_ignore_new_user_sale_notice', 'always' ) ) . "'>" . __( 'I\'m not interested', 'custom-twitter-feed' ) . "</a>
|
183 |
+
|
184 |
+
</p>
|
185 |
</div>
|
186 |
+
<a class='ctf_new_user_sale_notice_close' href='" . esc_url( add_query_arg( 'ctf_ignore_new_user_sale_notice', 'always' ) ) . "'><i class='fa fa-close'></i></a>
|
187 |
+
</div>
|
188 |
+
";
|
189 |
+
}
|
190 |
+
|
191 |
+
} elseif ( $should_show_bfcm_discount ) {
|
192 |
|
193 |
+
echo "
|
194 |
+
<div class='ctf_notice ctf_review_notice ctf_bfcm_sale_notice'>
|
195 |
+
<img src='". CTF_PLUGIN_URL . 'img/ctf-icon-offer.jpg' ."' alt='Custom Twitter Feed'>
|
196 |
+
<div class='ctf-notice-text'>
|
197 |
+
<p>" . __( '<b style="font-weight: 700;">Black Friday/Cyber Monday Deal!</b> Thank you for using our free Custom Twitter Feeds plugin. For a limited time, we\'re offering <b style="font-weight: 700;">20% off</b> the Pro version for all of our users.', 'custom-twitter-feed' ) . "</p>
|
198 |
+
<p class='ctf-links'>
|
199 |
+
<a class='ctf_notice_dismiss ctf_offer_btn' href='https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf&discount=".$ctf_bfcm_discount_code."' target='_blank'><b>" . __( 'Get this offer', 'custom-twitter-feed' ) . "</b></a>
|
200 |
+
<a class='ctf_notice_dismiss' style='margin-left: 5px;' href='" .esc_url( add_query_arg( 'ctf_ignore_bfcm_sale_notice', date( 'Y', $current_time ) ) ). "'>" . __( 'I\'m not interested', 'custom-twitter-feed' ) . "</a>
|
201 |
+
</p>
|
202 |
+
</div>
|
203 |
+
<a class='ctf_bfcm_sale_notice_close' href='" .esc_url( add_query_arg( 'ctf_ignore_bfcm_sale_notice', date( 'Y', $current_time ) ) ). "'><i class='fa fa-close'></i></a>
|
204 |
+
</div>
|
205 |
+
";
|
206 |
+
|
207 |
+
}
|
208 |
|
|
|
209 |
}
|
210 |
+
add_action( 'admin_notices', 'ctf_notices_html', 12 ); // priority 8 for Instagram, priority 10 for Facebook
|
211 |
+
|
212 |
+
function ctf_process_nags() {
|
213 |
|
214 |
+
global $current_user;
|
215 |
+
$user_id = $current_user->ID;
|
216 |
+
$ctf_statuses_option = get_option( 'ctf_statuses', array() );
|
|
|
217 |
|
218 |
+
if ( isset( $_GET['ctf_ignore_rating_notice_nag'] ) ) {
|
219 |
+
if ( (int)$_GET['ctf_ignore_rating_notice_nag'] === 1 ) {
|
220 |
+
update_option( 'ctf_rating_notice', 'dismissed', false );
|
221 |
+
$ctf_statuses_option['rating_notice_dismissed'] = ctf_get_current_time();
|
222 |
+
update_option( 'ctf_statuses', $ctf_statuses_option, false );
|
223 |
+
|
224 |
+
} elseif ( $_GET['ctf_ignore_rating_notice_nag'] === 'later' ) {
|
225 |
+
set_transient( 'custom_twitter_feeds_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
|
226 |
+
update_option( 'ctf_rating_notice', 'pending', false );
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
if ( isset( $_GET['ctf_ignore_new_user_sale_notice'] ) ) {
|
231 |
+
$response = sanitize_text_field( $_GET['ctf_ignore_new_user_sale_notice'] );
|
232 |
+
if ( $response === 'always' ) {
|
233 |
+
update_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice', 'always' );
|
234 |
+
|
235 |
+
$current_month_number = (int)date('n', ctf_get_current_time() );
|
236 |
+
$not_early_in_the_year = ($current_month_number > 5);
|
237 |
+
|
238 |
+
if ( $not_early_in_the_year ) {
|
239 |
+
update_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice', date( 'Y', ctf_get_current_time() ) );
|
240 |
+
}
|
241 |
+
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
if ( isset( $_GET['ctf_ignore_bfcm_sale_notice'] ) ) {
|
246 |
+
$response = sanitize_text_field( $_GET['ctf_ignore_bfcm_sale_notice'] );
|
247 |
+
if ( $response === 'always' ) {
|
248 |
+
update_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice', 'always' );
|
249 |
+
} elseif ( $response === date( 'Y', ctf_get_current_time() ) ) {
|
250 |
+
update_user_meta( $user_id, 'ctf_ignore_bfcm_sale_notice', date( 'Y', ctf_get_current_time() ) );
|
251 |
+
}
|
252 |
+
update_user_meta( $user_id, 'ctf_ignore_new_user_sale_notice', 'always' );
|
253 |
+
}
|
254 |
|
|
|
|
|
|
|
255 |
}
|
256 |
+
add_action( 'admin_init', 'ctf_process_nags' );
|
257 |
+
|
258 |
+
function ctf_get_future_date( $month, $year, $week, $day, $direction ) {
|
259 |
+
if ( $direction > 0 ) {
|
260 |
+
$startday = 1;
|
261 |
+
} else {
|
262 |
+
$startday = date( 't', mktime(0, 0, 0, $month, 1, $year ) );
|
263 |
+
}
|
264 |
+
|
265 |
+
$start = mktime( 0, 0, 0, $month, $startday, $year );
|
266 |
+
$weekday = date( 'N', $start );
|
267 |
+
|
268 |
+
$offset = 0;
|
269 |
+
if ( $direction * $day >= $direction * $weekday ) {
|
270 |
+
$offset = -$direction * 7;
|
271 |
+
}
|
272 |
+
|
273 |
+
$offset += $direction * ($week * 7) + ($day - $weekday);
|
274 |
+
return mktime( 0, 0, 0, $month, $startday + $offset, $year );
|
275 |
+
}
|
js/ctf-admin-scripts.js
CHANGED
@@ -267,8 +267,10 @@ jQuery(document).ready(function($){
|
|
267 |
var ctfUpgradeNote = '<span class="ctf_note"> - <a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Available in Pro version</a></span>';
|
268 |
$('.ctf_pro').each(function(){
|
269 |
var $pro = $(this);
|
270 |
-
|
271 |
-
|
|
|
|
|
272 |
});
|
273 |
$('#ctf_include_twittercards, #ctf_include_media, #ctf_include_replied_to').attr('disabled', 'true').removeAttr('checked').next('label').css('color', '#999').after(ctfUpgradeNote);
|
274 |
|
@@ -280,4 +282,14 @@ jQuery(document).ready(function($){
|
|
280 |
$(this).closest('span').next('.ctf-pro-options').show();
|
281 |
}
|
282 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
});
|
267 |
var ctfUpgradeNote = '<span class="ctf_note"> - <a href="https://smashballoon.com/custom-twitter-feeds/?utm_source=plugin-free&utm_campaign=ctf" target="_blank">Available in Pro version</a></span>';
|
268 |
$('.ctf_pro').each(function(){
|
269 |
var $pro = $(this);
|
270 |
+
if (!$pro.find('.ctf_layout_options_wrap').length) {
|
271 |
+
$pro.find('td').last().append(ctfUpgradeNote);
|
272 |
+
$pro.find('input, select, textarea').attr('disabled', 'true');
|
273 |
+
}
|
274 |
});
|
275 |
$('#ctf_include_twittercards, #ctf_include_media, #ctf_include_replied_to').attr('disabled', 'true').removeAttr('checked').next('label').css('color', '#999').after(ctfUpgradeNote);
|
276 |
|
282 |
$(this).closest('span').next('.ctf-pro-options').show();
|
283 |
}
|
284 |
});
|
285 |
+
|
286 |
+
function ctfUpdateLayoutTypeOptionsDisplay() {
|
287 |
+
setTimeout(function(){
|
288 |
+
jQuery('.ctf_layout_settings').hide();
|
289 |
+
jQuery('.ctf_layout_settings.ctf_layout_type_'+jQuery('.ctf_layout_type:checked').val()).show();
|
290 |
+
}, 1);
|
291 |
+
}
|
292 |
+
ctfUpdateLayoutTypeOptionsDisplay();
|
293 |
+
jQuery('.ctf_layout_type').change(ctfUpdateLayoutTypeOptionsDisplay);
|
294 |
+
|
295 |
});
|
js/ctf-scripts.js
CHANGED
@@ -3,6 +3,22 @@ if(!ctf_js_exists){
|
|
3 |
|
4 |
(function ($) {
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
//Runs every time new tweets are loaded
|
7 |
function ctfScripts( $ctf ){
|
8 |
|
@@ -50,6 +66,7 @@ if(!ctf_js_exists){
|
|
50 |
var replacementString = jQuery.trim(tag);
|
51 |
return ' <a href="https://twitter.com/'+ replacementString.substring(1) +'" target="_blank" rel="nofollow">' + replacementString + '</a>';
|
52 |
}
|
|
|
53 |
var tagRegex = /[\s][@]+[A-Za-z0-9-_]+/g;
|
54 |
ctfTextStr = ctfTextStr.replace( tagRegex , ctfReplaceTags );
|
55 |
|
@@ -64,6 +81,13 @@ if(!ctf_js_exists){
|
|
64 |
|
65 |
} // End "ctfdata-disablelinks" check
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}); // End .ctfItem loop
|
68 |
|
69 |
//Change color of retweet icon to match text
|
@@ -97,6 +121,7 @@ if(!ctf_js_exists){
|
|
97 |
// Call Custom JS if it exists
|
98 |
if (typeof ctf_custom_js == 'function') ctf_custom_js($);
|
99 |
|
|
|
100 |
} // end ctfScripts()
|
101 |
|
102 |
function ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded, persistentIndex ) {
|
3 |
|
4 |
(function ($) {
|
5 |
|
6 |
+
var ctfIntentsIncluded = false;
|
7 |
+
$('.ctf').each(function() {
|
8 |
+
if (!ctfIntentsIncluded && typeof $(this).attr('data-ctfintents') !== 'undefined') {
|
9 |
+
ctfIntentsIncluded = true;
|
10 |
+
Function&&Function.prototype&&Function.prototype.bind&&(/MSIE ([6789]|10)/.test(navigator.userAgent)||(window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.loaded&&window.twttr.widgets.load&&window.twttr.widgets.load(),window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.init||function(t){function e(e){for(var n,i,o=e[0],s=e[1],a=0,c=[];a<o.length;a++)i=o[a],r[i]&&c.push(r[i][0]),r[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n]);for(u&&u(e);c.length;)c.shift()()}var n={},r={1:0};function i(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(t){var e=[],n=r[t];if(0!==n)if(n)e.push(n[2]);else{var o=new Promise(function(e,i){n=r[t]=[e,i]});e.push(n[2]=o);var s,a=document.getElementsByTagName("head")[0],u=document.createElement("script");u.charset="utf-8",u.timeout=120,i.nc&&u.setAttribute("nonce",i.nc),u.src=function(t){return i.p+"js/"+({0:"moment~timeline~tweet",2:"dm_button",3:"button",4:"moment",5:"periscope_on_air",6:"timeline",7:"tweet"}[t]||t)+"."+{0:"ec04a6cb5ba879d0e0db41f211639fdf",2:"6542a7407a2eccac51f5c5e0fac5bb80",3:"d941c9a422e2e3faf474b82a1f39e936",4:"0a3cc02317b85399478995c763a1296c",5:"d26526abe761c4d8d8d71cf0ec565649",6:"0a7b4db67eacd23e35c5ce02e6ea3470",7:"b2d749028be81f16d9cb4994d9692feb"}[t]+".js"}(t),s=function(e){u.onerror=u.onload=null,clearTimeout(c);var n=r[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src,s=new Error("Loading chunk "+t+" failed.\n("+i+": "+o+")");s.type=i,s.request=o,n[1](s)}r[t]=void 0}};var c=setTimeout(function(){s({type:"timeout",target:u})},12e4);u.onerror=u.onload=s,a.appendChild(u)}return Promise.all(e)},i.m=t,i.c=n,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="https://platform.twitter.com/",i.oe=function(t){throw console.error(t),t};var o=window.__twttrll=window.__twttrll||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var u=s;i(i.s=94)}([function(t,e,n){var r=n(1);function i(t,e){var n;for(n in t)t.hasOwnProperty&&!t.hasOwnProperty(n)||e(n,t[n]);return t}function o(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function s(t){return t===Object(t)}function a(t){var e;if(!s(t))return!1;if(Object.keys)return!Object.keys(t).length;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}function u(t){return t?Array.prototype.slice.call(t):[]}t.exports={aug:function(t){return u(arguments).slice(1).forEach(function(e){i(e,function(e,n){t[e]=n})}),t},async:function(t,e){r.setTimeout(function(){t.call(e||null)},0)},compact:function t(e){return i(e,function(n,r){s(r)&&(t(r),a(r)&&delete e[n]),void 0!==r&&null!==r&&""!==r||delete e[n]}),e},contains:function(t,e){return!(!t||!t.indexOf)&&t.indexOf(e)>-1},forIn:i,isObject:s,isEmptyObject:a,toType:o,isType:function(t,e){return t==o(e)},toRealArray:u}},function(t,e){t.exports=window},function(t,e,n){var r=n(6);t.exports=function(){var t=this;this.promise=new r(function(e,n){t.resolve=e,t.reject=n})}},function(t,e,n){var r=n(11),i=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,o=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,s=/^http(s?):\/\/(\w+\.)*twitter\.com([:/]|$)/i,a=/^http(s?):\/\/pbs\.twimg\.com\//,u=/^#?([^.,<>!\s/#\-()'"]+)$/,c=/twitter\.com(?::\d{2,4})?\/intent\/(\w+)/,d=/^https?:\/\/(?:www\.)?twitter\.com\/\w+\/timelines\/(\d+)/i,l=/^https?:\/\/(?:www\.)?twitter\.com\/i\/moments\/(\d+)/i,f=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/(?:likes|favorites)/i,h=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/lists\/([\w-%]+)/i,p=/^https?:\/\/(?:www\.)?twitter\.com\/i\/live\/(\d+)/i,m=/^https?:\/\/syndication\.twitter\.com\/settings/i,v=/^https?:\/\/(localhost|platform)\.twitter\.com(?::\d+)?\/widgets\/widget_iframe\.(.+)/i,g=/^https?:\/\/(?:www\.)?twitter\.com\/search\?q=(\w+)/i;function w(t){return"string"==typeof t&&i.test(t)&&RegExp.$1.length<=20}function y(t){if(w(t))return RegExp.$1}function b(t,e){var n=r.decodeURL(t);if(e=e||!1,n.screen_name=y(t),n.screen_name)return r.url("https://twitter.com/intent/"+(e?"follow":"user"),n)}function _(t){return"string"==typeof t&&u.test(t)}function E(t){return"string"==typeof t&&o.test(t)}t.exports={isHashTag:_,hashTag:function(t,e){if(e=void 0===e||e,_(t))return(e?"#":"")+RegExp.$1},isScreenName:w,screenName:y,isStatus:E,status:function(t){return E(t)&&RegExp.$1},intentForProfileURL:b,intentForFollowURL:function(t){return b(t,!0)},isTwitterURL:function(t){return s.test(t)},isTwimgURL:function(t){return a.test(t)},isIntentURL:function(t){return c.test(t)},isSettingsURL:function(t){return m.test(t)},isWidgetIframeURL:function(t){return v.test(t)},isSearchUrl:function(t){return g.test(t)},regexen:{profile:i},momentId:function(t){return l.test(t)&&RegExp.$1},collectionId:function(t){return d.test(t)&&RegExp.$1},intentType:function(t){return c.test(t)&&RegExp.$1},likesScreenName:function(t){return f.test(t)&&RegExp.$1},listScreenNameAndSlug:function(t){var e,n,r;if(h.test(t)){e=RegExp.$1,n=RegExp.$2;try{r=decodeURIComponent(n)}catch(t){}return{ownerScreenName:e,slug:r||n}}return!1},eventId:function(t){return p.test(t)&&RegExp.$1}}},function(t,e){t.exports=document},function(t,e,n){var r=n(0),i=[!0,1,"1","on","ON","true","TRUE","yes","YES"],o=[!1,0,"0","off","OFF","false","FALSE","no","NO"];function s(t){return void 0!==t&&null!==t&&""!==t}function a(t){return c(t)&&t%1==0}function u(t){return c(t)&&!a(t)}function c(t){return s(t)&&!isNaN(t)}function d(t){return r.contains(o,t)}function l(t){return r.contains(i,t)}t.exports={hasValue:s,isInt:a,isFloat:u,isNumber:c,isString:function(t){return"string"===r.toType(t)},isArray:function(t){return s(t)&&"array"==r.toType(t)},isTruthValue:l,isFalseValue:d,asInt:function(t){if(a(t))return parseInt(t,10)},asFloat:function(t){if(u(t))return t},asNumber:function(t){if(c(t))return t},asBoolean:function(t){return!(!s(t)||!l(t)&&(d(t)||!t))}}},function(t,e,n){var r=n(1),i=n(21),o=n(48);i.hasPromiseSupport()||(r.Promise=o),t.exports=r.Promise},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){var i=r.toRealArray(arguments);return t.apply(e,n.concat(i))}}},function(t,e){t.exports=location},function(t,e,n){var r=n(50);t.exports=new r("__twttr")},function(t,e,n){var r=n(0),i=/\b([\w-_]+)\b/g;function o(t){return new RegExp("\\b"+t+"\\b","g")}function s(t,e){t.classList?t.classList.add(e):o(e).test(t.className)||(t.className+=" "+e)}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(o(e)," ")}function u(t,e){return t.classList?t.classList.contains(e):r.contains(c(t),e)}function c(t){return r.toRealArray(t.classList?t.classList:t.className.match(i))}t.exports={add:s,remove:a,replace:function(t,e,n){if(t.classList&&u(t,e))return a(t,e),void s(t,n);t.className=t.className.replace(o(e),n)},toggle:function(t,e,n){return void 0===n&&t.classList&&t.classList.toggle?t.classList.toggle(e,n):(n?s(t,e):a(t,e),n)},present:u,list:c}},function(t,e,n){var r=n(5),i=n(0);function o(t){return encodeURIComponent(t).replace(/\+/g,"%2B").replace(/'/g,"%27")}function s(t){return decodeURIComponent(t)}function a(t){var e=[];return i.forIn(t,function(t,n){var s=o(t);i.isType("array",n)||(n=[n]),n.forEach(function(t){r.hasValue(t)&&e.push(s+"="+o(t))})}),e.sort().join("&")}function u(t){var e={};return t?(t.split("&").forEach(function(t){var n=t.split("="),r=s(n[0]),o=s(n[1]);if(2==n.length){if(!i.isType("array",e[r]))return r in e?(e[r]=[e[r]],void e[r].push(o)):void(e[r]=o);e[r].push(o)}}),e):{}}t.exports={url:function(t,e){return a(e).length>0?i.contains(t,"?")?t+"&"+a(e):t+"?"+a(e):t},decodeURL:function(t){var e=t&&t.split("?");return 2==e.length?u(e[1]):{}},decode:u,encode:a,encodePart:o,decodePart:s}},function(t,e,n){var r=n(8),i=n(1),o=n(0),s={},a=o.contains(r.href,"tw_debug=true");function u(){}function c(){}function d(){return i.performance&&+i.performance.now()||+new Date}function l(t,e){if(i.console&&i.console[t])switch(e.length){case 1:i.console[t](e[0]);break;case 2:i.console[t](e[0],e[1]);break;case 3:i.console[t](e[0],e[1],e[2]);break;case 4:i.console[t](e[0],e[1],e[2],e[3]);break;case 5:i.console[t](e[0],e[1],e[2],e[3],e[4]);break;default:0!==e.length&&i.console.warn&&i.console.warn("too many params passed to logger."+t)}}t.exports={devError:u,devInfo:c,devObject:function(t,e){},publicError:function(){l("error",o.toRealArray(arguments))},publicLog:function(){l("info",o.toRealArray(arguments))},time:function(t){a&&(s[t]=d())},timeEnd:function(t){a&&s[t]&&(d(),s[t])}}},function(t,e,n){var r=n(20),i=n(5),o=n(11),s=n(0),a=n(119);t.exports=function(t){var e=t.href&&t.href.split("?")[1],n=e?o.decode(e):{},u={lang:a(t),width:t.getAttribute("data-width")||t.getAttribute("width"),height:t.getAttribute("data-height")||t.getAttribute("height"),related:t.getAttribute("data-related"),partner:t.getAttribute("data-partner")};return i.asBoolean(t.getAttribute("data-dnt"))&&r.setOn(),s.forIn(u,function(t,e){var r=n[t];n[t]=i.hasValue(r)?r:e}),s.compact(n)}},function(t,e,n){var r=n(81),i=n(23);t.exports=function(){var t="data-twitter-extracted-"+i.generate();return function(e,n){return r(e,n).filter(function(e){return!e.hasAttribute(t)}).map(function(e){return e.setAttribute(t,"true"),e})}}},function(t,e){function n(t,e,n,r,i,o,s){this.factory=t,this.Sandbox=e,this.srcEl=o,this.targetEl=i,this.parameters=r,this.className=n,this.options=s}n.prototype.destroy=function(){this.srcEl=this.targetEl=null},t.exports=n},function(t,e){t.exports={DM_BUTTON:"twitter-dm-button",FOLLOW_BUTTON:"twitter-follow-button",HASHTAG_BUTTON:"twitter-hashtag-button",MENTION_BUTTON:"twitter-mention-button",MOMENT:"twitter-moment",PERISCOPE:"periscope-on-air",SHARE_BUTTON:"twitter-share-button",TIMELINE:"twitter-timeline",TWEET:"twitter-tweet"}},function(t,e,n){var r=n(6),i=n(20),o=n(53),s=n(52),a=n(35),u=n(5),c=n(0);t.exports=function(t,e,n){var d;return t=t||[],e=e||{},d="ƒ("+t.join(", ")+", target, [options]);",function(){var l,f,h,p,m=Array.prototype.slice.apply(arguments,[0,t.length]),v=Array.prototype.slice.apply(arguments,[t.length]);return v.forEach(function(t){t&&(t.nodeType!==Node.ELEMENT_NODE?c.isType("function",t)?l=t:c.isType("object",t)&&(f=t):h=t)}),m.length!==t.length||0===v.length?(l&&c.async(function(){l(!1)}),r.reject(new Error("Not enough parameters. Expected: "+d))):h?(f=c.aug({},f||{},e),t.forEach(function(t){f[t]=m.shift()}),u.asBoolean(f.dnt)&&i.setOn(),p=a.getExperiments().then(function(t){return o.addWidget(n(f,h,void 0,s.isHorizonTweetEnabled(t)))}),l&&p.then(l,function(){l(!1)}),p):(l&&c.async(function(){l(!1)}),r.reject(new Error("No target element specified. Expected: "+d)))}}},function(t,e,n){var r=n(102),i=n(2),o=n(0);function s(t,e){return function(){try{e.resolve(t.call(this))}catch(t){e.reject(t)}}}t.exports={sync:function(t,e){t.call(e)},read:function(t,e){var n=new i;return r.read(s(t,n),e),n.promise},write:function(t,e){var n=new i;return r.write(s(t,n),e),n.promise},defer:function(t,e,n){var a=new i;return o.isType("function",t)&&(n=e,e=t,t=1),r.defer(t,s(e,a),n),a.promise}}},function(t,e,n){var r=n(9),i=["https://syndication.twitter.com","https://cdn.syndication.twimg.com","https://localhost.twitter.com:8444"],o=["https://syndication.twitter.com","https://localhost.twitter.com:8445"],s=["https://platform.twitter.com/embed/index.html","https://localhost.twitter.com:8080",/https:\/\/ton\.smf1\.twitter\.com\/syndication-internal\/embed-iframe\/[0-9A-Za-z_-]+\/app\/index\.html/],a=function(t,e){return t.some(function(t){return t instanceof RegExp?t.test(e):t===e})},u=function(){var t=r.get("backendHost");return t&&a(i,t)?t:"https://cdn.syndication.twimg.com"},c=function(){var t=r.get("settingsSvcHost");return t&&a(o,t)?t:"https://syndication.twitter.com"},d=function(){var t=r.get("embedIframeURL");return t&&a(s,t)?t:"https://platform.twitter.com/embed/index.html"};function l(t,e){var n=[t];return e.forEach(function(t){n.push(function(t){var e=(t||"").toString(),n="/"===e.slice(0,1)?1:0,r=function(t){return"/"===t.slice(-1)}(e)?-1:void 0;return e.slice(n,r)}(t))}),n.join("/")}t.exports={cookieConsent:function(t){var e=t||[];return e.unshift("cookie/consent"),l(c(),e)},embedIframe:function(){return d()},eventVideo:function(t){var e=t||[];return e.unshift("video/event"),l(u(),e)},grid:function(t){var e=t||[];return e.unshift("grid/collection"),l(u(),e)},moment:function(t){var e=t||[];return e.unshift("moments"),l(u(),e)},settings:function(t){var e=t||[];return e.unshift("settings"),l(c(),e)},timeline:function(t){var e=t||[];return e.unshift("timeline"),l(u(),e)},tweetBatch:function(t){var e=t||[];return e.unshift("tweets.json"),l(u(),e)},video:function(t){var e=t||[];return e.unshift("widgets/video"),l(u(),e)}}},function(t,e,n){var r=n(4),i=n(8),o=n(38),s=n(79),a=n(5),u=n(33),c=!1,d=/https?:\/\/([^/]+).*/i;t.exports={setOn:function(){c=!0},enabled:function(t,e){return!!(c||a.asBoolean(u.val("dnt"))||s.isUrlSensitive(e||i.host)||o.isFramed()&&s.isUrlSensitive(o.rootDocumentLocation())||(t=d.test(t||r.referrer)&&RegExp.$1)&&s.isUrlSensitive(t))}}},function(t,e,n){var r=n(4),i=n(12),o=n(95),s=n(1),a=n(0),u=o.userAgent;function c(t){return/(Trident|MSIE|Edge[/ ]?\d)/.test(t=t||u)}t.exports={retina:function(t){return(t=t||s).devicePixelRatio?t.devicePixelRatio>=1.5:!!t.matchMedia&&t.matchMedia("only screen and (min-resolution: 144dpi)").matches},anyIE:c,ie9:function(t){return/MSIE 9/.test(t=t||u)},ie10:function(t){return/MSIE 10/.test(t=t||u)},ios:function(t){return/(iPad|iPhone|iPod)/.test(t=t||u)},android:function(t){return/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(t=t||u)},canPostMessage:function(t,e){return t=t||s,e=e||u,t.postMessage&&!(c(e)&&t.opener)},touch:function(t,e,n){return t=t||s,e=e||o,n=n||u,"ontouchstart"in t||/Opera Mini/.test(n)||e.msMaxTouchPoints>0},cssTransitions:function(){var t=r.body.style;return void 0!==t.transition||void 0!==t.webkitTransition||void 0!==t.mozTransition||void 0!==t.oTransition||void 0!==t.msTransition},hasPromiseSupport:function(){return!!(s.Promise&&s.Promise.resolve&&s.Promise.reject&&s.Promise.all&&s.Promise.race&&(new s.Promise(function(e){t=e}),a.isType("function",t)));var t},hasIntersectionObserverSupport:function(){return!!s.IntersectionObserver},hasPerformanceInformation:function(){return s.performance&&s.performance.getEntriesByType},hasLocalStorageSupport:function(){try{return s.localStorage.setItem("local_storage_support_test","true"),void 0!==s.localStorage}catch(t){return i.devError("window.localStorage is not supported:",t),!1}}}},function(t,e,n){var r=n(6),i=n(2);function o(t,e){return t.then(e,e)}function s(t){return t instanceof r}t.exports={always:o,allResolved:function(t){var e;return void 0===t?r.reject(new Error("undefined is not an object")):Array.isArray(t)?(e=t.length)?new r(function(n,r){var i=0,o=[];function a(){(i+=1)===e&&(0===o.length?r():n(o))}function u(t){o.push(t),a()}t.forEach(function(t){s(t)?t.then(u,a):u(t)})}):r.resolve([]):r.reject(new Error("Type error"))},some:function(t){var e;return e=(t=t||[]).length,t=t.filter(s),e?e!==t.length?r.reject("non-Promise passed to .some"):new r(function(e,n){var r=0;function i(){(r+=1)===t.length&&n()}t.forEach(function(t){t.then(e,i)})}):r.reject("no promises passed to .some")},isPromise:s,allSettled:function(t){function e(){}return r.all((t||[]).map(function(t){return o(t,e)}))},timeout:function(t,e){var n=new i;return setTimeout(function(){n.reject(new Error("Promise timed out"))},e),t.then(function(t){n.resolve(t)},function(t){n.reject(t)}),n.promise}}},function(t,e){var n="i",r=0,i=0;t.exports={generate:function(){return n+String(+new Date)+Math.floor(1e5*Math.random())+r++},deterministic:function(){return n+String(i++)}}},function(t,e,n){var r=n(49),i=n(51),o=n(0);t.exports=o.aug(r.get("events")||{},i.Emitter)},function(t,e,n){var r=n(26),i=n(110);t.exports=r.build([i])},function(t,e,n){var r=n(40),i=n(107),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(40),i=n(41),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(83),i=n(75),o=n(84),s=n(8),a=n(71),u=n(74),c=n(20),d=n(5),l=n(23),f=n(0);function h(t){if(!t||!t.headers)throw new Error("unexpected response schema");return{html:t.body,config:t.config,pollInterval:1e3*parseInt(t.headers.xPolling,10)||null,maxCursorPosition:t.headers.maxPosition,minCursorPosition:t.headers.minPosition}}function p(t){if(t&&t.headers)throw new Error(t.headers.status);throw t instanceof Error?t:new Error(t)}t.exports=function(t){t.params({instanceId:{required:!0,fallback:l.deterministic},lang:{required:!0,transform:a.matchLanguage,fallback:"en"},tweetLimit:{transform:d.asInt}}),t.defineProperty("endpoint",{get:function(){throw new Error("endpoint not specified")}}),t.defineProperty("pollEndpoint",{get:function(){return this.endpoint}}),t.define("cbId",function(t){var e=t?"_new":"_old";return"tl_"+this.params.instanceId+"_"+this.id+e}),t.define("queryParams",function(){return{lang:this.params.lang,tz:u.getTimezoneOffset(),t:r(),domain:s.host,tweet_limit:this.params.tweetLimit,dnt:c.enabled()}}),t.define("fetch",function(){return i.fetch(this.endpoint,this.queryParams(),o,this.cbId()).then(h,p)}),t.define("poll",function(t,e){var n,r;return n={since_id:(t=t||{}).sinceId,max_id:t.maxId,min_position:t.minPosition,max_position:t.maxPosition},r=f.aug(this.queryParams(),n),i.fetch(this.pollEndpoint,r,o,this.cbId(e)).then(h,p)})}},function(t,e,n){var r=n(51).makeEmitter();t.exports={emitter:r,START:"start",ALL_WIDGETS_RENDER_START:"all_widgets_render_start",ALL_WIDGETS_RENDER_END:"all_widgets_render_end",ALL_WIDGETS_AND_IMAGES_LOADED:"all_widgets_and_images_loaded"}},function(t,e,n){var r=n(4),i=n(0);t.exports=function(t,e,n){var o;if(n=n||r,t=t||{},e=e||{},t.name){try{o=n.createElement('<iframe name="'+t.name+'"></iframe>')}catch(e){(o=n.createElement("iframe")).name=t.name}delete t.name}else o=n.createElement("iframe");return t.id&&(o.id=t.id,delete t.id),o.allowtransparency="true",o.scrolling="no",o.setAttribute("frameBorder",0),o.setAttribute("allowTransparency",!0),i.forIn(t,function(t,e){o.setAttribute(t,e)}),i.forIn(e,function(t,e){o.style[t]=e}),o}},function(t,e,n){var r=n(1).JSON;t.exports={stringify:r.stringify||r.encode,parse:r.parse||r.decode}},function(t,e,n){var r=n(0),i=n(43);t.exports={closest:function t(e,n,o){var s;if(n)return o=o||n&&n.ownerDocument,s=r.isType("function",e)?e:function(t){return function(e){return!!e.tagName&&i(e,t)}}(e),n===o?s(n)?n:void 0:s(n)?n:t(s,n.parentNode,o)}}},function(t,e,n){var r,i=n(4);function o(t){var e,n,o,s=0;for(r={},e=(t=t||i).getElementsByTagName("meta");e[s];s++){if(n=e[s],/^twitter:/.test(n.getAttribute("name")))o=n.getAttribute("name").replace(/^twitter:/,"");else{if(!/^twitter:/.test(n.getAttribute("property")))continue;o=n.getAttribute("property").replace(/^twitter:/,"")}r[o]=n.getAttribute("content")||n.getAttribute("value")}}o(),t.exports={init:o,val:function(t){return r[t]}}},function(t,e,n){var r=n(4),i=n(31),o=n(20),s=n(0),a=n(44),u=n(9),c=n(3),d=n(32),l=a.version,f=u.get("clientEventEndpoint")||"https://syndication.twitter.com/i/jot",h=1;function p(t){return s.aug({client:"tfw"},t||{})}function m(t,e,n){return e=e||{},s.aug({},e,{_category_:t,triggered_on:e.triggered_on||+new Date,dnt:o.enabled(n)})}t.exports={extractTermsFromDOM:function t(e,n){var r;return n=n||{},e&&e.nodeType===Node.ELEMENT_NODE?((r=e.getAttribute("data-scribe"))&&r.split(" ").forEach(function(t){var e=t.trim().split(":"),r=e[0],i=e[1];r&&i&&!n[r]&&(n[r]=i)}),t(e.parentNode,n)):n},clickEventElement:function(t){var e=d.closest("[data-expanded-url]",t),n=e&&e.getAttribute("data-expanded-url");return n&&c.isTwitterURL(n)?"twitter_url":"url"},flattenClientEventPayload:function(t,e){return s.aug({},e,{event_namespace:t})},formatGenericEventData:m,formatClientEventData:function(t,e,n){var i=t&&t.widget_origin||r.referrer;return(t=m("tfw_client_event",t,i)).client_version=l,t.format_version=void 0!==n?n:1,e||(t.widget_origin=i),t},formatClientEventNamespace:p,formatTweetAssociation:function(t,e){var n={};return(e=e||{}).association_namespace=p(t),n[h]=e,n},noticeSeen:function(t){return"notice"===t.element&&"seen"===t.action},splitLogEntry:function(t){var e,n,r,i,o;return t.item_ids&&t.item_ids.length>1?(e=Math.floor(t.item_ids.length/2),n=t.item_ids.slice(0,e),r={},i=t.item_ids.slice(e),o={},n.forEach(function(e){r[e]=t.item_details[e]}),i.forEach(function(e){o[e]=t.item_details[e]}),[s.aug({},t,{item_ids:n,item_details:r}),s.aug({},t,{item_ids:i,item_details:o})]):[t]},stringify:function(t){var e,n=Array.prototype.toJSON;return delete Array.prototype.toJSON,e=i.stringify(t),n&&(Array.prototype.toJSON=n),e},AUDIENCE_ENDPOINT:"https://syndication.twitter.com/i/jot/syndication",CLIENT_EVENT_ENDPOINT:f,RUFOUS_REDIRECT:"https://platform.twitter.com/jot.html"}},function(t,e,n){var r=n(113),i=n(116);function o(t){return r.settingsLoaded().then(function(e){return e[t]})}function s(){return o("experiments")}t.exports={shouldObtainCookieConsent:function(){return o("shouldObtainCookieConsent")},getExperiments:s,getExperiment:function(t){return s().then(function(e){if(!e[t])throw new Error("Experiment not found");return e[t]})},getActiveExperimentDataString:function(){return s().then(function(t){var e=Object.keys(t).reduce(function(e,n){var r;return t[n].version&&(r=n.split("_").slice(-1)[0],e.push(r+";"+t[n].bucket)),e},[]);return i(e.join(","))})},getExperimentKeys:function(){return s().then(function(t){return Object.keys(t)})},load:function(){r.load()}}},function(t,e,n){var r=n(10),i={},o=-1,s={};function a(t){var e=t.getAttribute("data-twitter-event-id");return e||(t.setAttribute("data-twitter-event-id",++o),o)}function u(t,e,n){var r=0,i=t&&t.length||0;for(r=0;r<i;r++)if(t[r].call(e,n,e),n.ceaseImmediately)return!1}function c(t,e,n){for(var i=n||t.target||t.srcElement,o=r.list(i).map(function(t){return"."+t}).concat(i.tagName),s=0,a=o.length;s<a;s++)if(!1===u(e[o[s]],i,t))return;t.cease||i!==this&&c.call(this,t,e,i.parentElement||i.parentNode)}function d(t,e,n,r){function i(r){c.call(t,r,n[e])}!function(t,e,n,r){t.id&&(s[t.id]=s[t.id]||[],s[t.id].push({el:t,listener:e,type:n,rootId:r}))}(t,i,e,r),t.addEventListener(e,i,!1)}function l(t){t&&t.preventDefault?t.preventDefault():t.returnValue=!1}function f(t){t&&(t.cease=!0)&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}t.exports={stop:function(t){return f(t),l(t),!1},stopPropagation:f,stopImmediatePropagation:function(t){t&&(t.ceaseImmediately=!0,f(t),t.stopImmediatePropagation())},preventDefault:l,delegate:function(t,e,n,r){var o=a(t);i[o]=i[o]||{},i[o][e]||(i[o][e]={},d(t,e,i[o],o)),i[o][e][n]=i[o][e][n]||[],i[o][e][n].push(r)},simulate:function(t,e,n){var r=a(e),o=i[r]&&i[r];c.call(e,{target:n},o[t])},removeDelegatesForWidget:function(t){var e=s[t];e&&(e.forEach(function(t){t.el.removeEventListener(t.type,t.listener,!1),delete i[t.rootId]}),delete s[t])}}},function(t,e,n){var r=n(26),i=n(125);t.exports=r.build([i])},function(t,e,n){var r=n(8),i=n(78),o=n(0),s=i.getCanonicalURL()||r.href,a=s;t.exports={isFramed:function(){return s!==a},rootDocumentLocation:function(t){return t&&o.isType("string",t)&&(s=t),s},currentDocumentLocation:function(){return a}}},function(t,e,n){var r=n(77),i=n(104),o=n(80),s=n(34),a=new(n(112))(function(t){var e,n,a;if(0!==t.length){if(u(t))return c(t);e=r(t,function(t){return s.noticeSeen(t.input.namespace)}),n=e.true,a=e.false,n&&n.length>0&&(n=n.slice(0,1),o.canFlushOneItem(n[0])||(n[0].input.data.message=""),c(n)),a&&(u(a)?c:function(t){i.init(),t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,o=t.input.version;i.clientEvent(e,n,r,o)}),i.flush().then(function(){t.forEach(function(t){t.taskDoneDeferred.resolve()})},function(){t.forEach(function(t){t.taskDoneDeferred.reject()})})})(a)}});function u(t){return 1===t.length&&o.canFlushOneItem(t[0])}function c(t){t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,i=t.input.version;o.clientEvent(e,n,r,i),t.taskDoneDeferred.resolve()})}t.exports={scribe:function(t,e,n,r){return a.add({namespace:t,data:e,offsite:n,version:r})},pause:function(){a.pause()},resume:function(){a.resume()}}},function(t,e,n){var r=n(105),i=n(106),o=n(0);t.exports={couple:function(){return o.toRealArray(arguments)},build:function(t,e,n){var o=new t;return(e=i(r(e||[]))).forEach(function(t){t.call(null,o)}),o.build(n)}}},function(t,e,n){var r=n(108),i=n(0),o=n(42);function s(){this.Component=this.factory(),this._adviceArgs=[],this._lastArgs=[]}i.aug(s.prototype,{factory:o,build:function(t){var e=this;return this.Component,i.aug(this.Component.prototype.boundParams,t),this._adviceArgs.concat(this._lastArgs).forEach(function(t){(function(t,e,n){var r=this[e];if(!r)throw new Error(e+" does not exist");this[e]=t(r,n)}).apply(e.Component.prototype,t)}),delete this._lastArgs,delete this._adviceArgs,this.Component},params:function(t){var e=this.Component.prototype.paramConfigs;t=t||{},this.Component.prototype.paramConfigs=i.aug({},t,e)},define:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.override(t,e)},defineStatic:function(t,e){this.Component[t]=e},override:function(t,e){this.Component.prototype[t]=e},defineProperty:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.overrideProperty(t,e)},overrideProperty:function(t,e){var n=i.aug({configurable:!0},e);Object.defineProperty(this.Component.prototype,t,n)},before:function(t,e){this._adviceArgs.push([r.before,t,e])},after:function(t,e){this._adviceArgs.push([r.after,t,e])},around:function(t,e){this._adviceArgs.push([r.around,t,e])},last:function(t,e){this._lastArgs.push([r.after,t,e])}}),t.exports=s},function(t,e,n){var r=n(0);function i(){return!0}function o(t){return t}t.exports=function(){function t(t){var e=this;t=t||{},this.params=Object.keys(this.paramConfigs).reduce(function(n,s){var a=[],u=e.boundParams,c=e.paramConfigs[s],d=c.validate||i,l=c.transform||o;if(s in u&&a.push(u[s]),s in t&&a.push(t[s]),a="fallback"in c?a.concat(c.fallback):a,n[s]=function(t,e,n){var i=null;return t.some(function(t){if(t=r.isType("function",t)?t():t,e(t))return i=n(t),!0}),i}(a,d,l),c.required&&null==n[s])throw new Error(s+" is a required parameter");return n},{}),this.initialize()}return r.aug(t.prototype,{paramConfigs:{},boundParams:{},initialize:function(){}}),t}},function(t,e,n){var r=n(1).HTMLElement,i=r.prototype.matches||r.prototype.matchesSelector||r.prototype.webkitMatchesSelector||r.prototype.mozMatchesSelector||r.prototype.msMatchesSelector||r.prototype.oMatchesSelector;t.exports=function(t,e){if(i)return i.call(t,e)}},function(t){t.exports={version:"2a81c84:1568701398616"}},function(t,e,n){var r,i=n(10),o=n(4),s=n(1),a=n(33),u=n(54),c=n(5),d=n(23),l="csptest";t.exports={inlineStyle:function(){var t=l+d.generate(),e=o.createElement("div"),n=o.createElement("style"),f="."+t+" { visibility: hidden; }";return!!o.body&&(c.asBoolean(a.val("widgets:csp"))&&(r=!1),void 0!==r?r:(e.style.display="none",i.add(e,t),n.type="text/css",n.appendChild(o.createTextNode(f)),o.body.appendChild(n),o.body.appendChild(e),r="hidden"===s.getComputedStyle(e).visibility,u(e),u(n),r))}}},function(t,e,n){var r=n(1);t.exports=function(t,e,n){var i,o=0;return n=n||null,function s(){var a=n||this,u=arguments,c=+new Date;if(r.clearTimeout(i),c-o>e)return o=c,void t.apply(a,u);i=r.setTimeout(function(){s.apply(a,u)},e)}}},function(t,e){t.exports=function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}},function(t,e,n){
|
11 |
+
/*!
|
12 |
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
13 |
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
14 |
+
* @license Licensed under MIT license
|
15 |
+
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
16 |
+
* @version v4.2.5+7f2b526d
|
17 |
+
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,r=void 0,i=void 0,o=function(t,e){f[n]=t,f[n+1]=e,2===(n+=2)&&(i?i(h):w())},s="undefined"!=typeof window?window:void 0,a=s||{},u=a.MutationObserver||a.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function l(){var t=setTimeout;return function(){return t(h,1)}}var f=new Array(1e3);function h(){for(var t=0;t<n;t+=2)(0,f[t])(f[t+1]),f[t]=void 0,f[t+1]=void 0;n=0}var p,m,v,g,w=void 0;function y(t,e){var n=this,r=new this.constructor(E);void 0===r[_]&&k(r);var i=n._state;if(i){var s=arguments[i-1];o(function(){return D(i,r,s,n._result)})}else I(n,r,t,e);return r}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(E);return C(e,t),e}c?w=function(){return process.nextTick(h)}:u?(m=0,v=new u(h),g=document.createTextNode(""),v.observe(g,{characterData:!0}),w=function(){g.data=m=++m%2}):d?((p=new MessageChannel).port1.onmessage=h,w=function(){return p.port2.postMessage(0)}):w=void 0===s?function(){try{var t=Function("return this")().require("vertx");return void 0!==(r=t.runOnLoop||t.runOnContext)?function(){r(h)}:l()}catch(t){return l()}}():l();var _=Math.random().toString(36).substring(2);function E(){}var x=void 0,T=1,A=2,S={error:null};function R(t){try{return t.then}catch(t){return S.error=t,S}}function N(e,n,r){n.constructor===e.constructor&&r===y&&n.constructor.resolve===b?function(t,e){e._state===T?L(t,e._result):e._state===A?j(t,e._result):I(e,void 0,function(e){return C(t,e)},function(e){return j(t,e)})}(e,n):r===S?(j(e,S.error),S.error=null):void 0===r?L(e,n):t(r)?function(t,e,n){o(function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,function(n){r||(r=!0,e!==n?C(t,n):L(t,n))},function(e){r||(r=!0,j(t,e))},t._label);!r&&i&&(r=!0,j(t,i))},t)}(e,n,r):L(e,n)}function C(t,e){var n,r;t===e?j(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?L(t,e):N(t,e,R(e)))}function P(t){t._onerror&&t._onerror(t._result),O(t)}function L(t,e){t._state===x&&(t._result=e,t._state=T,0!==t._subscribers.length&&o(O,t))}function j(t,e){t._state===x&&(t._state=A,t._result=e,o(P,t))}function I(t,e,n,r){var i=t._subscribers,s=i.length;t._onerror=null,i[s]=e,i[s+T]=n,i[s+A]=r,0===s&&t._state&&o(O,t)}function O(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?D(n,r,i,o):i(o);t._subscribers.length=0}}function D(e,n,r,i){var o=t(r),s=void 0,a=void 0,u=void 0,c=void 0;if(o){if((s=function(t,e){try{return t(e)}catch(t){return S.error=t,S}}(r,i))===S?(c=!0,a=s.error,s.error=null):u=!0,n===s)return void j(n,new TypeError("A promises callback cannot return that same promise."))}else s=i,u=!0;n._state!==x||(o&&u?C(n,s):c?j(n,a):e===T?L(n,s):e===A&&j(n,s))}var z=0;function k(t){t[_]=z++,t._state=void 0,t._result=void 0,t._subscribers=[]}var M=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(E),this.promise[_]||k(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&L(this.promise,this._result))):j(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===x&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===b){var i=R(t);if(i===y&&t._state!==x)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===U){var o=new n(E);N(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===x&&(this._remaining--,t===A?j(r,n):this._result[e]=n),0===this._remaining&&L(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;I(t,void 0,function(t){return n._settledAt(T,e,t)},function(t){return n._settledAt(A,e,t)})},t}(),U=function(){function e(t){this[_]=z++,this._result=this._state=void 0,this._subscribers=[],E!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e(function(e){C(t,e)},function(e){j(t,e)})}catch(e){j(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})}):this.then(e,e)},e}();return U.prototype.then=y,U.all=function(t){return new M(this,t).promise},U.race=function(t){var n=this;return e(t)?new n(function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)}):new n(function(t,e){return e(new TypeError("You must pass an array to race."))})},U.resolve=b,U.reject=function(t){var e=new this(E);return j(e,t),e},U._setScheduler=function(t){i=t},U._setAsap=function(t){o=t},U._asap=o,U.polyfill=function(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=U},U.Promise=U,U},t.exports=r()},function(t,e,n){var r=n(50);t.exports=new r("twttr")},function(t,e,n){var r=n(1),i=n(0);function o(t){return i.isType("string",t)?t.split("."):i.isType("array",t)?t:[]}function s(t,e){(e=e||r)[t]=e[t]||{},Object.defineProperty(this,"base",{value:e[t]}),Object.defineProperty(this,"name",{value:t})}i.aug(s.prototype,{get:function(t){return o(t).reduce(function(t,e){if(i.isObject(t))return t[e]},this.base)},set:function(t,e,n){var r=o(t),s=function(t,e){var n=o(e).slice(0,-1);return n.reduce(function(t,e,r){if(t[e]=t[e]||{},!i.isObject(t[e]))throw new Error(n.slice(0,r+1).join(".")+" is already defined with a value.");return t[e]},t)}(this.base,t),a=r.slice(-1);return n&&a in s?s[a]:s[a]=e},init:function(t,e){return this.set(t,e,!0)},unset:function(t){var e=o(t),n=this.get(e.slice(0,-1));n&&delete n[e.slice(-1)]},aug:function(t){var e=this.get(t),n=i.toRealArray(arguments).slice(1);if(e=void 0!==e?e:{},n.unshift(e),!n.every(i.isObject))throw new Error("Cannot augment non-object.");return this.set(t,i.aug.apply(null,n))},call:function(t){var e=this.get(t),n=i.toRealArray(arguments).slice(1);if(!i.isType("function",e))throw new Error("Function "+t+"does not exist.");return e.apply(null,n)},fullPath:function(t){var e=o(t);return e.unshift(this.name),e.join(".")}}),t.exports=s},function(t,e,n){var r=n(0),i=n(7),o={bind:function(t,e){return this._handlers=this._handlers||{},this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e)},unbind:function(t,e){var n;this._handlers&&this._handlers[t]&&(e?(n=this._handlers[t].indexOf(e))>=0&&this._handlers[t].splice(n,1):this._handlers[t]=[])},trigger:function(t,e){var n=this._handlers&&this._handlers[t];(e=e||{}).type=t,n&&n.forEach(function(t){r.async(i(t,this,e))})}};t.exports={Emitter:o,makeEmitter:function(){return r.aug(function(){},o)}}},function(t,e){var n="tfw_horizon_tweet_embed_9555";t.exports={isHorizonTweetEnabled:function(t){return!(!t||!t[n]||"hte"!==t[n].bucket)}}},function(t,e,n){var r=n(101),i=n(76),o=n(6),s=n(22),a=n(7),u=n(0),c=new i(function(t){var e=function(t){return t.reduce(function(t,e){return t[e._className]=t[e._className]||[],t[e._className].push(e),t},{})}(t.map(r.fromRawTask));u.forIn(e,function(t,e){s.allSettled(e.map(function(t){return t.initialize()})).then(function(){e.forEach(function(t){o.all([t.hydrate(),t.insertIntoDom()]).then(a(t.render,t)).then(a(t.success,t),a(t.fail,t))})})})});t.exports={addWidget:function(t){return c.add(t)}}},function(t,e,n){var r=n(18);t.exports=function(t){return r.write(function(){t&&t.parentNode&&t.parentNode.removeChild(t)})}},function(t,e,n){n(12),t.exports={log:function(t,e){}}},function(t,e,n){var r=n(1);function i(t){return(t=t||r).getSelection&&t.getSelection()}t.exports={getSelection:i,getSelectedText:function(t){var e=i(t);return e?e.toString():""}}},function(t,e,n){var r=n(4),i=n(1),o=n(2),s=2e4;t.exports=function(t){var e=new o,n=r.createElement("img");return n.onload=n.onerror=function(){i.setTimeout(e.resolve,50)},n.src=t,i.setTimeout(e.reject,s),e.promise}},function(t,e,n){var r=n(111);t.exports=function(t){t.define("createElement",r),t.define("createFragment",r),t.define("htmlToElement",r),t.define("hasSelectedText",r),t.define("addRootClass",r),t.define("removeRootClass",r),t.define("hasRootClass",r),t.define("prependStyleSheet",r),t.define("appendStyleSheet",r),t.define("prependCss",r),t.define("appendCss",r),t.define("makeVisible",r),t.define("injectWidgetEl",r),t.define("matchHeightToContent",r),t.define("matchWidthToContent",r)}},function(t,e){t.exports=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments))}}},function(t,e,n){var r=n(15),i=n(120),o=n(61),s=n(16);t.exports=function(t,e,n){return new r(i,o,s.DM_BUTTON,t,e,n)}},function(t,e,n){var r=n(62),i=n(25);t.exports=r.isSupported()?r:i},function(t,e,n){var r=n(26),i=n(121);t.exports=r.build([i])},function(t,e,n){var r=n(15),i=n(124),o=n(37),s=n(16);t.exports=function(t,e,n){return new r(i,o,s.FOLLOW_BUTTON,t,e,n)}},function(t,e,n){var r=n(15),i=n(132),o=n(25),s=n(16);t.exports=function(t,e,n){return new r(i,o,s.MOMENT,t,e,n)}},function(t,e,n){var r=n(15),i=n(134),o=n(25),s=n(16);t.exports=function(t,e,n){return new r(i,o,s.PERISCOPE,t,e,n)}},function(t,e,n){var r=n(82),i=n(136),o=n(140),s=n(142),a=n(144),u=n(146),c={collection:i,event:o,likes:s,list:a,profile:u,url:l},d=[u,s,i,a,o];function l(t){return r(d,function(e){try{return new e(t)}catch(t){}})}t.exports=function(t){return t?function(t){var e,n;return e=(t.sourceType+"").toLowerCase(),(n=c[e])?new n(t):null}(t)||l(t):null}},function(t,e,n){var r=n(15),i=n(148),o=n(25),s=n(16);t.exports=function(t,e,n){return new r(i,o,s.TIMELINE,t,e,n)}},function(t,e,n){var r=n(15),i=n(4),o=n(37),s=n(150),a=n(61),u=n(151),c=n(16);t.exports=function(t,e,n,d){var l;return d?(l=i.createElement("div"),new r(s,o,c.TWEET,t,e,n,{sandboxWrapperEl:l})):new r(u,a,c.TWEET,t,e,n)}},function(t,e,n){var r=n(15),i=n(153),o=n(37),s=n(16);t.exports=function(t,e,n){var a=t&&t.type||"share",u="hashtag"==a?s.HASHTAG_BUTTON:"mention"==a?s.MENTION_BUTTON:s.SHARE_BUTTON;return new r(i,o,u,t,e,n)}},function(t,e,n){var r=n(39),i=n(38),o=n(0);t.exports=function(t){var e={widget_origin:i.rootDocumentLocation(),widget_frame:i.isFramed()?i.currentDocumentLocation():null,duration_ms:t.duration,item_ids:t.widgetIds||[]},n=o.aug(t.namespace,{page:"page",component:"performance"});r.scribe(n,e)}},function(t,e,n){var r=n(0),i=n(137),o=["ar","fa","he","ur"];t.exports={isRtlLang:function(t){return t=String(t).toLowerCase(),r.contains(o,t)},matchLanguage:function(t){return t=(t=(t||"").toLowerCase()).replace("_","-"),i(t)?t:(t=t.replace(/-.*/,""),i(t)?t:"en")}}},function(t){t.exports={tweetButtonHtmlPath:"/widgets/tweet_button.d6364fae9340b0be5f13818370141fd0.{{lang}}.html",followButtonHtmlPath:"/widgets/follow_button.d6364fae9340b0be5f13818370141fd0.{{lang}}.html",hubHtmlPath:"/widgets/hub.html",widgetIframeHtmlPath:"/widgets/widget_iframe.d6364fae9340b0be5f13818370141fd0.html",resourceBaseUrl:"https://platform.twitter.com"}},function(t,e,n){var r=n(3),i=n(98),o=n(24),s=n(11),a={favorite:["favorite","like"],follow:["follow"],like:["favorite","like"],retweet:["retweet"],tweet:["tweet"]};function u(t){this.srcEl=[],this.element=t}u.open=function(t,e,n){var u=(r.intentType(t)||"").toLowerCase();r.isTwitterURL(t)&&(function(t,e){i.open(t,{},e)}(t,n),e&&o.trigger("click",{target:e,region:"intent",type:"click",data:{}}),e&&a[u]&&a[u].forEach(function(n){o.trigger(n,{target:e,region:"intent",type:n,data:function(t,e){var n=s.decodeURL(e);switch(t){case"favorite":case"like":return{tweet_id:n.tweet_id};case"follow":return{screen_name:n.screen_name,user_id:n.user_id};case"retweet":return{source_tweet_id:n.tweet_id};default:return{}}}(u,t)})}))},t.exports=u},function(t,e){t.exports={getTimezoneOffset:function(){var t=(new Date).toString().match(/(GMT[+-]?\d+)/);return t&&t[0]||"GMT"}}},function(t,e,n){var r=n(4),i=n(9),o=n(2),s=n(0),a=n(11),u="cb",c=0;t.exports={fetch:function(t,e,n,d){var l,f,h;return d=function(t){if(t)return t.replace(/[^\w$]/g,"_")}(d||u+c++),l=i.fullPath(["callbacks",d]),f=r.createElement("script"),h=new o,e=s.aug({},e,{callback:l,suppress_response_codes:!0}),i.set(["callbacks",d],function(t){var e;t=(e=n(t||!1)).resp,e.success?h.resolve(t):h.reject(t),f.onload=f.onreadystatechange=null,f.parentNode&&f.parentNode.removeChild(f),i.unset(["callbacks",d])}),f.onerror=function(){h.reject(new Error("failed to fetch "+f.src))},f.src=a.url(t,e),f.async="async",r.body.appendChild(f),h.promise}}},function(t,e,n){var r=n(2),i=n(103),o=n(7);function s(t){this._inputsQueue=[],this._task=t,this._hasFlushBeenScheduled=!1}s.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._hasFlushBeenScheduled||(this._hasFlushBeenScheduled=!0,i(o(this._flush,this))),e.promise},s.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._hasFlushBeenScheduled=!1},t.exports=s},function(t,e){t.exports=function(t,e){return t.reduce(function(t,n){var r=e(n);return t[r]=t[r]||[],t[r].push(n),t},{})}},function(t,e,n){var r=n(4),i=n(8),o=n(3);function s(t,e){var n,r;return e=e||i,/^https?:\/\//.test(t)?t:/^\/\//.test(t)?e.protocol+t:(n=e.host+(e.port.length?":"+e.port:""),0!==t.indexOf("/")&&((r=e.pathname.split("/")).pop(),r.push(t),t="/"+r.join("/")),[e.protocol,"//",n,t].join(""))}t.exports={absolutize:s,getCanonicalURL:function(){for(var t,e=r.getElementsByTagName("link"),n=0;e[n];n++)if("canonical"==(t=e[n]).rel)return s(t.href)},getScreenNameFromPage:function(){for(var t,e,n,i=[r.getElementsByTagName("a"),r.getElementsByTagName("link")],s=0,a=0,u=/\bme\b/;t=i[s];s++)for(a=0;e=t[a];a++)if(u.test(e.rel)&&(n=o.screenName(e.href)))return n}}},function(t,e,n){var r=n(8),i=/^[^#?]*\.(gov|mil)(:\d+)?([#?].*)?$/i,o={};function s(t){return t in o?o[t]:o[t]=i.test(t)}t.exports={isUrlSensitive:s,isHostPageSensitive:function(){return s(r.host)}}},function(t,e,n){var r=n(20),i=n(55),o=n(11),s=n(34),a=n(0),u=n(9).get("scribeCallback"),c=2083,d=[],l=o.url(s.CLIENT_EVENT_ENDPOINT,{dnt:0,l:""}),f=encodeURIComponent(l).length;function h(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);i||o||(u&&u(arguments),p(s.formatClientEventNamespace(t),s.formatClientEventData(e,n,r),s.CLIENT_EVENT_ENDPOINT))}function p(t,e,n){var r,u;n&&a.isObject(t)&&a.isObject(e)&&(i.log(t,e),r=s.flattenClientEventPayload(t,e),u={l:s.stringify(r)},s.noticeSeen(t)&&(u.notice_seen=!0),r.dnt&&(u.dnt=1),w(o.url(n,u)))}function m(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);if(!i&&!o)return v(s.flattenClientEventPayload(s.formatClientEventNamespace(t),s.formatClientEventData(e,n,r)))}function v(t){return d.push(t),d}function g(t){return encodeURIComponent(t).length+3}function w(t){return(new Image).src=t}t.exports={canFlushOneItem:function(t){var e=g(s.stringify(t));return f+e<c},_enqueueRawObject:v,scribe:p,clientEvent:h,clientEvent2:function(t,e,n){return h(t,e,n,2)},enqueueClientEvent:m,flushClientEvents:function(){var t;return d.length>1&&m({page:"widgets_js",component:"scribe_pixel",action:"batch_log"},{}),t=d,d=[],t.reduce(function(e,n,r){var i=e.length,o=i&&e[i-1];return r+1==t.length&&n.event_namespace&&"batch_log"==n.event_namespace.action&&(n.message=["entries:"+r,"requests:"+i].join("/")),function t(e){return Array.isArray(e)||(e=[e]),e.reduce(function(e,n){var r,i=s.stringify(n),o=g(i);return f+o<c?e=e.concat(i):(r=s.splitLogEntry(n)).length>1&&(e=e.concat(t(r))),e},[])}(n).forEach(function(t){var n=g(t);(!o||o.urlLength+n>c)&&(o={urlLength:f,items:[]},e.push(o)),o.urlLength+=n,o.items.push(t)}),e},[]).map(function(t){var e={l:t.items};return r.enabled()&&(e.dnt=1),w(o.url(s.CLIENT_EVENT_ENDPOINT,e))})},interaction:function(t,e,n,r){var i=s.extractTermsFromDOM(t.target||t.srcElement);i.action=r||"click",h(i,e,n)}}},function(t,e,n){var r=n(0),i=n(43);t.exports=function(t,e){return i(t,e)?[t]:r.toRealArray(t.querySelectorAll(e))}},function(t,e){t.exports=function(t,e,n){for(var r,i=0;i<t.length;i++)if(r=e.call(n,t[i],i,t))return r}},function(t,e){t.exports=function(){return Math.floor(+new Date/9e5)}},function(t,e,n){var r=n(12);t.exports=function(t){var e,n;return e=t.headers&&t.headers.status,!(n=t&&!t.error&&200===e)&&t.headers&&t.headers.message&&r.publicError(t.headers.message),{success:n,resp:t}}},function(t,e,n){var r,i=n(29),o=0;function s(){r&&r.length===o&&(i.emitter.trigger(i.ALL_WIDGETS_AND_IMAGES_LOADED,r),r=null)}i.emitter.bind(i.ALL_WIDGETS_RENDER_END,function(t){r=t.widgets,s()}),t.exports={reportImagesLoadForAWidget:function(){o++,s()}}},,,,,,,,,function(t,e,n){var r,i=n(2),o=n(4),s=n(96),a=n(49),u=n(9),c=n(97),d=n(24),l=n(100),f=n(154),h=n(162),p=n(163),m=n(29),v=n(35);n(164),m.emitter.trigger(m.START),u.set("widgets.init",!0),a.set("init",!0),p(),r=new i,s.exposeReadyPromise(r.promise,a.base,"_e"),a.set("widgets",f),a.set("widgets.load",l.load),a.set("events",d),h(function(){v.load(),r.resolve(a.base),c.attachTo(o),l.loadPage()})},function(t,e){t.exports=navigator},function(t,e,n){var r=n(7);t.exports={exposeReadyPromise:function(t,e,n){e.ready=r(t.then,t),n&&Array.isArray(e[n])&&(e[n].forEach(r(t.then,t)),delete e[n])}}},function(t,e,n){var r=n(8),i=n(36),o=n(32),s=n(73),a=n(3);function u(t){var e,n,u;t.altKey||t.metaKey||t.shiftKey||(e=o.closest(function(t){return"A"===t.tagName||"AREA"===t.tagName},t.target))&&a.isIntentURL(e.href)&&(n=(n=(n=[u=e.href,"original_referer="+r.href].join(-1==u.indexOf("?")?"?":"&")).replace(/^http[:]/,"https:")).replace(/^\/\//,"https://"),s.open(n,e),i.preventDefault(t))}t.exports={attachTo:function(t){t.addEventListener("click",u,!1)}}},function(t,e,n){var r,i=n(1),o=n(99),s=n(36),a=n(32),u=n(21),c=n(3),d=n(23),l=n(0),f="intent_",h=i.screen.width,p=i.screen.height;function m(t,e){function n(t){return Math.round(t/2)}return t>e?{coordinate:0,size:e}:{coordinate:n(e)-n(t),size:t}}function v(t,e,n){var i,o;e=r.parse(e),n=n||{},i=m(e.width,n.width||h),e.left=i.coordinate,e.width=i.size,o=m(e.height,n.height||p),e.top=o.coordinate,e.height=o.size,this.win=t,this.features=function(t){var e=[];return l.forIn(t,function(t,n){e.push(t+"="+n)}),e.join(",")}(e)}r=(new o).defaults({width:550,height:520,personalbar:"0",toolbar:"0",location:"1",scrollbars:"1",resizable:"1"}),v.prototype.open=function(t,e){var n=e&&"click"==e.type&&a.closest("a",e.target),r=e&&(e.altKey||e.metaKey||e.shiftKey),i=n&&(u.ios()||u.android());if(c.isTwitterURL(t))return r||i?this:(this.name=f+d.generate(),this.popup=this.win.open(t,this.name,this.features),e&&s.preventDefault(e),this)},v.open=function(t,e,n){return new v(i,e).open(t,n)},t.exports=v},function(t,e,n){var r=n(5),i=n(0);function o(){this.assertions=[],this._defaults={}}o.prototype.assert=function(t,e){return this.assertions.push({fn:t,msg:e||"assertion failed"}),this},o.prototype.defaults=function(t){return this._defaults=t||this._defaults,this},o.prototype.require=function(t){var e=this;return(t=Array.isArray(t)?t:i.toRealArray(arguments)).forEach(function(t){e.assert(function(t){return function(e){return r.hasValue(e[t])}}(t),"required: "+t)}),this},o.prototype.parse=function(t){var e,n;if(e=i.aug({},this._defaults,t||{}),(n=this.assertions.reduce(function(t,n){return n.fn(e)||t.push(n.msg),t},[])).length>0)throw new Error(n.join("\n"));return e},t.exports=o},function(t,e,n){var r=n(4),i=n(52),o=n(6),s=n(22),a=n(53),u=n(33),c=n(9),d=n(39),l=n(24),f=n(5),h=n(0),p=n(35),m=n(117),v=n(29);function g(){var t=u.val("widgets:autoload")||!0;return!f.isFalseValue(t)&&(f.isTruthValue(t)?r.body:r.querySelectorAll(t))}function w(t,e){var n,i;return t=(t=t||r.body).length?h.toRealArray(t):[t],d.pause(),i=function(t,e){return t.reduce(function(t,n){return t.concat(m.reduce(function(t,r){return t.concat(r(n,e))},[]))},[])}(t,e),v.emitter.trigger(v.ALL_WIDGETS_RENDER_START,{widgets:i}),n=s.allResolved(i.map(function(t){return a.addWidget(t)})).then(function(t){l.trigger("loaded",{widgets:t}),t&&t.length&&v.emitter.trigger(v.ALL_WIDGETS_RENDER_END,{widgets:t})}),s.always(n,function(){d.resume()}),n}function y(t){return p.getExperiments().then(function(e){return w(t,i.isHorizonTweetEnabled(e))})}t.exports={load:y,loadPage:function(){var t=g();return!1===t?o.resolve():(c.set("widgets.loaded",!0),y(t))},_getPageLoadTarget:g}},function(t,e,n){var r=n(10),i=n(18),o=n(24),s=n(54),a=n(6),u=n(22);function c(t,e){this._widget=null,this._sandbox=null,this._hydrated=!1,this._insertedIntoDom=!1,this._Sandbox=t.Sandbox,this._factory=t.factory,this._widgetParams=t.parameters,this._resolve=e,this._className=t.className,this._renderedClassName=t.className+"-rendered",this._errorClassName=t.className+"-error",this._srcEl=t.srcEl,this._targetGlobal=function(t){return(t.srcEl||t.targetEl).ownerDocument.defaultView}(t),this._sandboxWrapperEl=t.options?t.options.sandboxWrapperEl:null,this._insertionStrategy=function(e){var n,r=t.srcEl,i=t.targetEl,o=t.options?t.options.sandboxWrapperEl:null;o?(o.appendChild(e),n=o):n=e,r?i.insertBefore(n,r):i.appendChild(n)}}c.fromRawTask=function(t){return new c(t.input,t.taskDoneDeferred.resolve)},c.prototype.initialize=function(){var t=this,e=new this._Sandbox(this._targetGlobal);return this._factory(this._widgetParams,e).then(function(n){return t._widget=n,t._sandbox=e,n._sandboxWrapperEl=t._sandboxWrapperEl,n})},c.prototype.insertIntoDom=function(){var t=this;return this._widget?this._sandbox.insert(this._widget.id,{class:[this._className,this._renderedClassName].join(" ")},null,this._insertionStrategy).then(function(){t._insertedIntoDom=!0}):a.reject(new Error("cannot insert widget into DOM before it is initialized"))},c.prototype.hydrate=function(){var t=this;return this._widget?this._widget.hydrate().then(function(){t._hydrated=!0}):a.reject(new Error("cannot hydrate widget before it is initialized"))},c.prototype.render=function(){var t=this;function e(e){return s(t._sandbox.sandboxEl).then(function(){return a.reject(e)})}return this._hydrated?this._insertedIntoDom?t._widget.render(t._sandbox).then(function(){return t._sandbox.onResize(function(){return t._widget.resize().then(function(){o.trigger("resize",{target:t._sandbox.sandboxEl})})}),t._widget.show()}).then(function(){return s(t._srcEl).then(function(){return t._sandbox.sandboxEl})},e):e(new Error("cannot render widget before DOM insertion")):e(new Error("cannot render widget before hydration"))},c.prototype.fail=function(){var t=this;return this._srcEl?u.always(i.write(function(){r.add(t._srcEl,t._errorClassName)}),function(){o.trigger("rendered",{target:t._srcEl}),t._resolve(t._srcEl)}):(t._resolve(),a.resolve())},c.prototype.success=function(){o.trigger("rendered",{target:this._sandbox.sandboxEl}),this._resolve(this._sandbox.sandboxEl)},t.exports=c},function(t,e,n){var r;!function(){"use strict";var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)};function o(){this.frames=[],this.lastId=0,this.raf=i,this.batch={hash:{},read:[],write:[],mode:null}}o.prototype.read=function(t,e){var n=this.add("read",t,e),r=n.id;return this.batch.read.push(n.id),"reading"===this.batch.mode||this.batch.scheduled?r:(this.scheduleBatch(),r)},o.prototype.write=function(t,e){var n=this.add("write",t,e),r=this.batch.mode,i=n.id;return this.batch.write.push(n.id),"writing"===r||"reading"===r||this.batch.scheduled?i:(this.scheduleBatch(),i)},o.prototype.defer=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=1);var r=this,i=t-1;return this.schedule(i,function(){r.run({fn:e,ctx:n})})},o.prototype.clear=function(t){if("function"==typeof t)return this.clearFrame(t);t=Number(t);var e=this.batch.hash[t];if(e){var n=this.batch[e.type],r=n.indexOf(t);delete this.batch.hash[t],~r&&n.splice(r,1)}},o.prototype.clearFrame=function(t){var e=this.frames.indexOf(t);~e&&this.frames.splice(e,1)},o.prototype.scheduleBatch=function(){var t=this;this.schedule(0,function(){t.batch.scheduled=!1,t.runBatch()}),this.batch.scheduled=!0},o.prototype.uniqueId=function(){return++this.lastId},o.prototype.flush=function(t){for(var e;e=t.shift();)this.run(this.batch.hash[e])},o.prototype.runBatch=function(){try{this.batch.mode="reading",this.flush(this.batch.read),this.batch.mode="writing",this.flush(this.batch.write),this.batch.mode=null}catch(t){throw this.runBatch(),t}},o.prototype.add=function(t,e,n){var r=this.uniqueId();return this.batch.hash[r]={id:r,fn:e,ctx:n,type:t}},o.prototype.run=function(t){var e=t.ctx||this,n=t.fn;if(delete this.batch.hash[t.id],!this.onError)return n.call(e);try{n.call(e)}catch(t){this.onError(t)}},o.prototype.loop=function(){var t,e=this,n=this.raf,r=!1;function i(){var t=e.frames.shift();e.frames.length?n(i):e.looping=!1,t&&t()}this.looping||(t=setTimeout(function(){r=!0,i()},500),n(function(){r||(clearTimeout(t),i())}),this.looping=!0)},o.prototype.schedule=function(t,e){return this.frames[t]?this.schedule(t+1,e):(this.loop(),this.frames[t]=e)};var s=new o;void 0!==t&&t.exports?t.exports=s:void 0===(r=function(){return s}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){var r=n(48).Promise;t.exports=r._asap},function(t,e,n){var r,i,o,s=n(4),a=n(1),u=n(30),c=n(20),d=n(2),l=n(6),f=n(55),h=n(34),p=n(0),m=n(25),v=n(9).get("scribeCallback"),g=Math.floor(1e3*Math.random())+"_",w="rufous-frame-"+g+"-",y="rufous-form-"+g+"-",b=0,_=!1,E=new d;function x(){var t=o.createElement("form"),e=o.createElement("input"),n=o.createElement("input");return b++,t.action=h.CLIENT_EVENT_ENDPOINT,t.method="POST",t.target=w+b,t.id=y+b,e.type="hidden",e.name="dnt",e.value=c.enabled(),n.type="hidden",n.name="tfw_redirect",n.value=h.RUFOUS_REDIRECT,t.appendChild(e),t.appendChild(n),t}function T(){var t=w+b;return u({id:t,name:t,width:0,height:0,border:0},{display:"none"},o.doc)}t.exports={clientEvent:function(t,e,n,i){(function(t,e){var n=!p.isObject(t),r=!!e&&!p.isObject(e),i=n||r;return i})(t,e)||(v&&v(arguments),E.promise.then(function(){!function(t,e){var n,i,s;p.isObject(t)&&p.isObject(e)&&(f.log(t,e),s=h.flattenClientEventPayload(t,e),(n=r.firstChild).value=+(+n.value||s.dnt||0),(i=o.createElement("input")).type="hidden",i.name="l",i.value=h.stringify(s),r.appendChild(i))}(h.formatClientEventNamespace(t),h.formatClientEventData(e,n,i))}))},flush:function(){return E.promise.then(function(){var t;return r.children.length<=2?l.reject():(t=l.all([o.doc.body.appendChild(r),o.doc.body.appendChild(i)]).then(function(t){var e=t[0],n=t[1];return n.addEventListener("load",function(){!function(t,e){return function(){var n=t.parentNode;n&&(n.removeChild(t),n.removeChild(e))}}(e,n)()}),e.submit(),t}),r=x(),i=T(),t)})},init:function(){return _?E.promise:((o=new m(a)).insert("rufous-sandbox",null,{display:"none"},function(t){s.body.appendChild(t)}).then(function(){o.setTitle("Twitter analytics iframe"),r=x(),i=T(),E.resolve([r,i])}),_=!0,E.promise)}}},function(t,e,n){var r=n(0);t.exports=function t(e){var n=[];return e.forEach(function(e){var i=r.isType("array",e)?t(e):[e];n=n.concat(i)}),n}},function(t,e){t.exports=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})}},function(t,e,n){var r=n(41),i=n(0),o=n(109);function s(){r.apply(this,arguments)}s.prototype=Object.create(r.prototype),i.aug(s.prototype,{factory:o}),t.exports=s},function(t,e,n){var r=n(22),i=n(0),o=n(7);t.exports={before:function(t,e){return function(){var n,i=this,o=arguments;return n=e.apply(this,arguments),r.isPromise(n)?n.then(function(){return t.apply(i,o)}):t.apply(this,arguments)}},after:function(t,e){return function(){var n,i=this,o=arguments;function s(t,e){return r.isPromise(e)?e.then(function(){return t}):t}return n=t.apply(this,arguments),r.isPromise(n)?n.then(function(t){return s(t,e.apply(i,o))}):s(n,e.apply(this,arguments))}},around:function(t,e){return function(){var n=i.toRealArray(arguments);return n.unshift(o(t,this)),e.apply(this,n)}}}},function(t,e,n){var r=n(10),i=n(18),o=n(42),s=n(6),a=n(0);t.exports=function(){var t=o();function e(e){t.apply(this,arguments),Object.defineProperty(this,"targetGlobal",{value:e})}return e.prototype=Object.create(t.prototype),a.aug(e.prototype,{id:null,initialized:!1,width:0,height:0,sandboxEl:null,insert:function(){return s.reject()},onResize:function(){},addClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.add(e,t)})})},removeClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.remove(e,t)})})},styleSelf:function(t){var e=this;return i.write(function(){a.forIn(t,function(t,n){e.sandboxEl.style[t]=n})})}}),e}},function(t,e,n){var r=n(4),i=n(10),o=n(18),s=n(56),a=n(26),u=n(57),c=n(45),d=n(46),l=n(30),f=n(12),h=n(47),p=n(2),m=n(6),v=n(0),g=n(9),w=n(23),y=n(7),b={allowfullscreen:"true"},_={position:"absolute",visibility:"hidden",display:"block",width:"0px",height:"0px",padding:"0",border:"none"},E={position:"static",visibility:"visible"},x="SandboxRoot",T=".SandboxRoot { display: none; }",A=50;function S(t,e,n,r){return e=v.aug({id:t},b,e),n=v.aug({},_,n),l(e,n,r)}function R(t,e,n,i,s){var a=new p,u=w.generate(),c=S(t,e,n,s);return g.set(["sandbox",u],function(){var t=c.contentWindow.document;o.write(function(){t.write("<!DOCTYPE html><html><head></head><body></body></html>")}).then(function(){t.close(),a.resolve(c)})}),c.src=["javascript:",'document.write("");',"try { window.parent.document; }",'catch (e) { document.domain="'+r.domain+'"; }',"window.parent."+g.fullPath(["sandbox",u])+"();"].join(""),c.addEventListener("error",a.reject,!1),o.write(function(){i.parentNode.replaceChild(c,i)}),a.promise}t.exports=a.couple(n(58),function(t){t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this.win}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this.iframeEl}}),t.defineProperty("iframeEl",{get:function(){return this._iframe}}),t.defineProperty("rootEl",{get:function(){return this.doc&&this.doc.documentElement}}),t.defineProperty("widgetEl",{get:function(){return this.doc&&this.doc.body.firstElementChild}}),t.defineProperty("win",{get:function(){return this.iframeEl&&this.iframeEl.contentWindow}}),t.defineProperty("doc",{get:function(){return this.win&&this.win.document}}),t.define("_updateCachedDimensions",function(){var t=this;return o.read(function(){var e,n=h(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=h(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_setTargetToBlank",function(){var t=this.createElement("base");t.target="_blank",this.doc.head.appendChild(t)}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.define("setTitle",function(t){this.iframeEl.title=t}),t.override("createElement",function(t){return this.doc.createElement(t)}),t.override("createFragment",function(){return this.doc.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!s.getSelectedText(this.win)}),t.override("addRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return i.present(this.rootEl,t)}),t.define("addStyleSheet",function(t,e){var n,r=new p;return this.initialized?((n=this.createElement("link")).type="text/css",n.rel="stylesheet",n.href=t,n.addEventListener("load",r.resolve,!1),n.addEventListener("error",r.reject,!1),o.write(y(e,null,n)).then(function(){return u(t).then(r.resolve,r.reject),r.promise})):m.reject(new Error("sandbox not initialized"))}),t.override("prependStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){return e.head.appendChild(t)})}),t.define("addCss",function(t,e){var n;return c.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.doc.createTextNode(t)),o.write(y(e,null,n))):(f.devError("CSP enabled; cannot embed inline styles"),m.resolve())}),t.override("prependCss",function(t){var e=this.doc;return this.addCss(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendCss",function(t){var e=this.doc;return this.addCss(t,function(t){return e.head.appendChild(t)})}),t.override("makeVisible",function(){var t=this;return this.styleSelf(E).then(function(){t._updateCachedDimensions()})}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this.widgetEl?m.reject(new Error("widget already injected")):o.write(function(){e.doc.body.appendChild(t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).height:0}),o.write(function(){e.sandboxEl.style.height=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.override("matchWidthToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).width:0}),o.write(function(){e.sandboxEl.style.width=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,r){var i=this,s=new p,a=this.targetGlobal.document,u=S(t,e,n,a);return o.write(y(r,null,u)),u.addEventListener("load",function(){(function(t){try{t.contentWindow.document}catch(t){return m.reject(t)}return m.resolve(t)})(u).then(null,y(R,null,t,e,n,u,a)).then(s.resolve,s.reject)},!1),u.addEventListener("error",s.reject,!1),s.promise.then(function(t){var e=d(i._didResize,A,i);return i._iframe=t,i.win.addEventListener("resize",e,!1),m.all([i._setTargetToBlank(),i.addRootClass(x),i.prependCss(T)])})}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){t.exports=function(){throw new Error("unimplemented method")}},function(t,e,n){var r=n(2),i=n(7),o=100,s=3e3;function a(t,e){this._inputsQueue=[],this._task=t,this._isPaused=!1,this._flushDelay=e&&e.flushDelay||o,this._pauseLength=e&&e.pauseLength||s,this._flushTimeout=void 0}a.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._scheduleFlush(),e.promise},a.prototype._scheduleFlush=function(){this._isPaused||(clearTimeout(this._flushTimeout),this._flushTimeout=setTimeout(i(this._flush,this),this._flushDelay))},a.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._flushTimeout=void 0},a.prototype.pause=function(t){clearTimeout(this._flushTimeout),this._isPaused=!0,!t&&this._pauseLength&&setTimeout(i(this.resume,this),this._pauseLength)},a.prototype.resume=function(){this._isPaused=!1,this._scheduleFlush()},t.exports=a},function(t,e,n){var r,i=n(72),o=n(30),s=n(2),a=n(4),u=n(19),c=n(21),d=n(31),l=n(8),f=n(12),h=n(114),p=n(59),m=n(9),v=n(11),g=n(115),w=n(3),y=n(0),b=n(1),_=p(function(){return new s});function E(t){var e=t||{should_obtain_cookie_consent:!0,experiments:{}};return new g(e.should_obtain_cookie_consent,e.experiments)}t.exports={load:function(){var t,e,n,s;if(c.ie9()||c.ie10()||"http:"!==l.protocol&&"https:"!==l.protocol)return f.devError("Using default settings due to unsupported browser or protocol."),r=E(),void _().resolve();t={origin:l.origin},u.settings().indexOf("localhost")>-1&&(t.localSettings=!0),e=v.url(i.resourceBaseUrl+i.widgetIframeHtmlPath,t),n=function(t){var n;if(e.substr(0,t.origin.length)===t.origin&&w.isTwitterURL(t.origin))try{(n="string"==typeof t.data?d.parse(t.data):t.data).namespace===h.settings&&(r=E(n.settings),_().resolve())}catch(t){f.devError(t)}},b.addEventListener("message",n),s=o({src:e,title:"Twitter settings iframe"},{display:"none"}),a.body.appendChild(s)},settingsLoaded:function(){var t,e,n;return t=new s,e=m.get("experimentOverride"),_().promise.then(function(){e&&e.name&&e.assignment&&((n={})[e.name]={bucket:e.assignment},r.experiments=y.aug(r.experiments,n)),t.resolve(r)}).catch(function(e){t.reject(e)}),t.promise}}},function(t,e){t.exports={settings:"twttr.settings"}},function(t,e){t.exports=function(t,e){this.shouldObtainCookieConsent=t,this.experiments=e||{}}},function(t,e){t.exports=function(t){return t.split("").map(function(t){return t.charCodeAt(0).toString(16)}).join("")}},function(t,e,n){t.exports=[n(118),n(123),n(131),n(133),n(135),n(149),n(152)]},function(t,e,n){var r=n(11),i=n(5),o=n(0),s=n(13),a=n(14)(),u=n(60),c="a.twitter-dm-button";t.exports=function(t){return a(t,c).map(function(t){return u(function(t){var e=t.getAttribute("data-show-screen-name"),n=s(t),a=t.getAttribute("href"),u=t.getAttribute("data-screen-name"),c=e?i.asBoolean(e):null,d=t.getAttribute("data-size"),l=r.decodeURL(a),f=l.recipient_id,h=t.getAttribute("data-text")||l.text,p=t.getAttribute("data-welcome-message-id")||l.welcomeMessageId;return o.aug(n,{screenName:u,showScreenName:c,size:d,text:h,userId:f,welcomeMessageId:p})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(0);t.exports=function t(e){var n;if(e)return n=e.lang||e.getAttribute("data-lang"),r.isType("string",n)?n:t(e.parentElement)}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(2).then(function(r){var o;try{o=n(86),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(122),i=n(1),o=n(10),s=n(36),a=n(18),u=n(56),c=n(26),d=n(57),l=n(45),f=n(47),h=n(7),p=n(46),m=n(6),v=n(0),g=50,w={position:"absolute",visibility:"hidden",display:"block",transform:"rotate(0deg)"},y={position:"static",visibility:"visible"},b="twitter-widget",_="open",E="SandboxRoot",x=".SandboxRoot { display: none; max-height: 10000px; }";t.exports=c.couple(n(58),function(t){t.defineStatic("isSupported",function(){return!!i.HTMLElement.prototype.attachShadow&&l.inlineStyle()}),t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this._shadowHost}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this._shadowHost}}),t.define("_updateCachedDimensions",function(){var t=this;return a.read(function(){var e,n=f(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=f(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.override("createElement",function(t){return this.targetGlobal.document.createElement(t)}),t.override("createFragment",function(){return this.targetGlobal.document.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!u.getSelectedText(this.targetGlobal)}),t.override("addRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return o.present(this._shadowRootBody,t)}),t.override("addStyleSheet",function(t,e){return this.addCss('@import url("'+t+'");',e).then(function(){return d(t)})}),t.override("prependStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){return e.appendChild(t)})}),t.override("addCss",function(t,e){var n;return this.initialized?l.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.targetGlobal.document.createTextNode(t)),a.write(h(e,null,n))):m.resolve():m.reject(new Error("sandbox not initialized"))}),t.override("prependCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){return e.appendChild(t)})}),t.override("makeVisible",function(){return this.styleSelf(y)}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this._shadowRootBody.firstElementChild?m.reject(new Error("widget already injected")):a.write(function(){e._shadowRootBody.appendChild(t)}).then(function(){return e._updateCachedDimensions()}).then(function(){var t=p(e._didResize,g,e);new r(e._shadowRootBody,t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){return m.resolve()}),t.override("matchWidthToContent",function(){return m.resolve()}),t.override("insert",function(t,e,n,r){var i=this.targetGlobal.document,o=this._shadowHost=i.createElement(b),u=this._shadowRoot=o.attachShadow({mode:_}),c=this._shadowRootBody=i.createElement("div");return v.forIn(e||{},function(t,e){o.setAttribute(t,e)}),o.id=t,u.appendChild(c),s.delegate(c,"click","A",function(t,e){e.hasAttribute("target")||e.setAttribute("target","_blank")}),m.all([this.styleSelf(w),this.addRootClass(E),this.prependCss(x),a.write(r.bind(null,o))])}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("initialize",function(){this._shadowHost=this._shadowRoot=this._shadowRootBody=null,this._width=this._height=0,this._resizeHandlers=[]}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){var n;(n=function(t,e){function r(t,e){if(t.resizedAttached){if(t.resizedAttached)return void t.resizedAttached.add(e)}else t.resizedAttached=new function(){var t,e;this.q=[],this.add=function(t){this.q.push(t)},this.call=function(){for(t=0,e=this.q.length;t<e;t++)this.q[t].call()}},t.resizedAttached.add(e);t.resizeSensor=document.createElement("div"),t.resizeSensor.className="resize-sensor";var n="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",r="position: absolute; left: 0; top: 0; transition: 0s;";t.resizeSensor.style.cssText=n,t.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+n+'"><div style="'+r+'"></div></div><div class="resize-sensor-shrink" style="'+n+'"><div style="'+r+' width: 200%; height: 200%"></div></div>',t.appendChild(t.resizeSensor),{fixed:1,absolute:1}[function(t,e){return t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue(e):t.style[e]}(t,"position")]||(t.style.position="relative");var i,o,s=t.resizeSensor.childNodes[0],a=s.childNodes[0],u=t.resizeSensor.childNodes[1],c=(u.childNodes[0],function(){a.style.width=s.offsetWidth+10+"px",a.style.height=s.offsetHeight+10+"px",s.scrollLeft=s.scrollWidth,s.scrollTop=s.scrollHeight,u.scrollLeft=u.scrollWidth,u.scrollTop=u.scrollHeight,i=t.offsetWidth,o=t.offsetHeight});c();var d=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)},l=function(){t.offsetWidth==i&&t.offsetHeight==o||t.resizedAttached&&t.resizedAttached.call(),c()};d(s,"scroll",l),d(u,"scroll",l)}var i=Object.prototype.toString.call(t),o="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(o)for(var s=0,a=t.length;s<a;s++)r(t[s],e);else r(t,e);this.detach=function(){if(o)for(var e=0,r=t.length;e<r;e++)n.detach(t[e]);else n.detach(t)}}).detach=function(t){t.resizeSensor&&(t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached)},void 0!==t&&void 0!==t.exports?t.exports=n:window.ResizeSensor=n},function(t,e,n){var r=n(3),i=n(0),o=n(13),s=n(14)(),a=n(63),u=n(5),c="a.twitter-follow-button";t.exports=function(t){return s(t,c).map(function(t){return a(function(t){var e=o(t),n={screenName:r.screenName(t.href),showScreenName:"false"!==t.getAttribute("data-show-screen-name"),showCount:"false"!==t.getAttribute("data-show-count"),size:t.getAttribute("data-size"),count:t.getAttribute("data-count"),preview:t.getAttribute("data-preview")};return i.forIn(n,function(t,n){var r=e[t];e[t]=u.hasValue(r)?r:n}),e.screenName=e.screenName||e.screen_name,e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(3).then(function(r){var o;try{o=n(87),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(18),i=n(126),o=n(59),s=n(30),a=n(2),u=n(6),c=n(7),d=n(0),l={position:"absolute",visibility:"hidden",width:"0px",height:"0px"},f={position:"static",visibility:"visible"},h={};i(function(t,e,n){var r=h[t];if(r)return e=e||1,n=n||1,r.styleSelf({width:e+"px",height:n+"px"}).then(function(){r.didResize()})}),t.exports=function(t){t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this.iframeEl}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this.iframeEl}}),t.defineProperty("iframeEl",{get:function(){return this._iframe}}),t.define("updateCachedDimensions",function(){var t=this;return this.initialized?r.read(function(){t._width=t.sandboxEl.offsetWidth,t._height=t.sandboxEl.offsetHeight}):u.resolve()}),t.define("setTitle",function(t){this.iframeEl.title=t}),t.define("makeVisible",function(){return this.styleSelf(f)}),t.define("didResize",function(){var t=this,e=t._resizeHandlers.length>0;return this.updateCachedDimensions().then(function(){e&&t._resizeHandlers.forEach(function(e){e(t)})})}),t.define("loadDocument",function(t){var e=new a;return this.initialized?this.iframeEl.src?u.reject(new Error("widget already loaded")):(this.iframeEl.addEventListener("load",e.resolve,!1),this.iframeEl.addEventListener("error",e.reject,!1),this.iframeEl.src=t,e.promise):u.reject(new Error("sandbox not initialized"))}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,i){var a=this;return e=d.aug({id:t},e),n=d.aug({},l,n),this._iframe=s(e,n),h[t]=this,this.onResize(o(function(){a.makeVisible()})),r.write(c(i,null,this._iframe))}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this.updateCachedDimensions()})}},function(t,e,n){var r=n(1),i=n(127),o=n(129),s=n(24),a=n(5),u=n(130);t.exports=function(t){function e(t,e){var n=u(this);s.trigger(t,{target:n,region:e,type:t,data:{}})}function n(e){var n=u(this),r=n&&n.id,i=a.asInt(e.width),o=a.asInt(e.height);r&&void 0!==i&&void 0!==o&&t(r,i,o)}(new i).attachReceiver(new o.Receiver(r,"twttr.button")).bind("twttr.private.trigger",e).bind("twttr.private.resizeButton",n),(new i).attachReceiver(new o.Receiver(r,"twttr.embed")).bind("twttr.private.trigger",e).bind("twttr.private.rendered",n).bind("twttr.private.resize",n)}},function(t,e,n){var r=n(31),i=n(128),o=n(0),s=n(6),a=n(22),u="2.0";function c(t){this.registry=t||{}}function d(t){var e,n;return e=o.isType("string",t),n=o.isType("number",t),e||n||null===t}function l(t,e){return{jsonrpc:u,id:d(t)?t:null,error:e}}c.prototype._invoke=function(t,e){var n,r,i;n=this.registry[t.method],r=t.params||[],r=o.isType("array",r)?r:[r];try{i=n.apply(e.source||null,r)}catch(t){i=s.reject(t.message)}return a.isPromise(i)?i:s.resolve(i)},c.prototype._processRequest=function(t,e){var n,r;return function(t){var e,n,r;return!!o.isObject(t)&&(e=t.jsonrpc===u,n=o.isType("string",t.method),r=!("id"in t)||d(t.id),e&&n&&r)}(t)?(n="params"in t&&(r=t.params,!o.isObject(r)||o.isType("function",r))?s.resolve(l(t.id,i.INVALID_PARAMS)):this.registry[t.method]?this._invoke(t,{source:e}).then(function(e){return n=t.id,{jsonrpc:u,id:n,result:e};var n},function(){return l(t.id,i.INTERNAL_ERROR)}):s.resolve(l(t.id,i.METHOD_NOT_FOUND)),null!=t.id?n:s.resolve()):s.resolve(l(t.id,i.INVALID_REQUEST))},c.prototype.attachReceiver=function(t){return t.attachTo(this),this},c.prototype.bind=function(t,e){return this.registry[t]=e,this},c.prototype.receive=function(t,e){var n,a,u,c=this;try{u=t,t=o.isType("string",u)?r.parse(u):u}catch(t){return s.resolve(l(null,i.PARSE_ERROR))}return e=e||null,a=((n=o.isType("array",t))?t:[t]).map(function(t){return c._processRequest(t,e)}),n?function(t){return s.all(t).then(function(t){return(t=t.filter(function(t){return void 0!==t})).length?t:void 0})}(a):a[0]},t.exports=c},function(t){t.exports={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INTERNAL_ERROR:{code:-32603,message:"Internal error"}}},function(t,e,n){var r=n(8),i=n(1),o=n(31),s=n(2),a=n(21),u=n(0),c=n(3),d=n(7),l=a.ie9();function f(t,e,n){var r;t&&t.postMessage&&(l?r=(n||"")+o.stringify(e):n?(r={})[n]=e:r=e,t.postMessage(r,"*"))}function h(t){return u.isType("string",t)?t:"JSONRPC"}function p(t,e){return e?u.isType("string",t)&&0===t.indexOf(e)?t.substring(e.length):t&&t[e]?t[e]:void 0:t}function m(t,e){var n=t.document;this.filter=h(e),this.server=null,this.isTwitterFrame=c.isTwitterURL(n.location.href),t.addEventListener("message",d(this._onMessage,this),!1)}function v(t,e){this.pending={},this.target=t,this.isTwitterHost=c.isTwitterURL(r.href),this.filter=h(e),i.addEventListener("message",d(this._onMessage,this),!1)}u.aug(m.prototype,{_onMessage:function(t){var e,n=this;this.server&&(this.isTwitterFrame&&!c.isTwitterURL(t.origin)||(e=p(t.data,this.filter))&&this.server.receive(e,t.source).then(function(e){e&&f(t.source,e,n.filter)}))},attachTo:function(t){this.server=t},detach:function(){this.server=null}}),u.aug(v.prototype,{_processResponse:function(t){var e=this.pending[t.id];e&&(e.resolve(t),delete this.pending[t.id])},_onMessage:function(t){var e;if((!this.isTwitterHost||c.isTwitterURL(t.origin))&&(e=p(t.data,this.filter))){if(u.isType("string",e))try{e=o.parse(e)}catch(t){return}(e=u.isType("array",e)?e:[e]).forEach(d(this._processResponse,this))}},send:function(t){var e=new s;return t.id?this.pending[t.id]=e:e.resolve(),f(this.target,t,this.filter),e.promise}}),t.exports={Receiver:m,Dispatcher:v,_stringifyPayload:function(t){return arguments.length>0&&(l=!!t),l}}},function(t,e,n){var r=n(4);t.exports=function(t){for(var e,n=r.getElementsByTagName("iframe"),i=0;n[i];i++)if((e=n[i]).contentWindow===t)return e}},function(t,e,n){var r=n(5),i=n(0),o=n(3),s=n(13),a=n(14)(),u=n(64),c="a.twitter-moment";t.exports=function(t){return a(t,c).map(function(t){return u(function(t){var e=s(t),n={momentId:o.momentId(t.href),chrome:t.getAttribute("data-chrome"),limit:t.getAttribute("data-limit")};return i.forIn(n,function(t,n){var i=e[t];e[t]=r.hasValue(i)?i:n}),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(4)]).then(function(r){var o;try{o=n(88),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0),i=n(13),o=n(14)(),s=n(65),a="a.periscope-on-air",u=/^https?:\/\/(?:www\.)?(?:periscope|pscp)\.tv\/@?([a-zA-Z0-9_]+)\/?$/i;t.exports=function(t){return o(t,a).map(function(t){return s(function(t){var e=i(t),n=t.getAttribute("href"),o=t.getAttribute("data-size"),s=u.exec(n)[1];return r.aug(e,{username:s,size:o})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(5).then(function(r){var o;try{o=n(89),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(5),i=n(0),o=n(66),s=n(13),a=n(14)(),u=n(67),c=n(3),d=n(12),l="a.twitter-timeline,div.twitter-timeline,a.twitter-grid",f="Embedded Search timelines have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",h="You may have been affected by an update to settings in embedded timelines. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",p="Embedded grids have been deprecated and will now render as timelines. Please update your embed code to use the twitter-timeline class. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564.";t.exports=function(t){return a(t,l).map(function(t){return u(function(t){var e=s(t),n=t.getAttribute("data-show-replies"),a={isPreconfigured:!!t.getAttribute("data-widget-id"),chrome:t.getAttribute("data-chrome"),tweetLimit:t.getAttribute("data-tweet-limit")||t.getAttribute("data-limit"),ariaLive:t.getAttribute("data-aria-polite"),theme:t.getAttribute("data-theme"),linkColor:t.getAttribute("data-link-color"),borderColor:t.getAttribute("data-border-color"),showReplies:n?r.asBoolean(n):null,profileScreenName:t.getAttribute("data-screen-name"),profileUserId:t.getAttribute("data-user-id"),favoritesScreenName:t.getAttribute("data-favorites-screen-name"),favoritesUserId:t.getAttribute("data-favorites-user-id"),likesScreenName:t.getAttribute("data-likes-screen-name"),likesUserId:t.getAttribute("data-likes-user-id"),listOwnerScreenName:t.getAttribute("data-list-owner-screen-name"),listOwnerUserId:t.getAttribute("data-list-owner-id"),listId:t.getAttribute("data-list-id"),listSlug:t.getAttribute("data-list-slug"),customTimelineId:t.getAttribute("data-custom-timeline-id"),staticContent:t.getAttribute("data-static-content"),url:t.href};return a.isPreconfigured&&(c.isSearchUrl(a.url)?d.publicError(f,t):d.publicLog(h,t)),"twitter-grid"===t.className&&d.publicLog(p,t),(a=i.aug(a,e)).dataSource=o(a),a.id=a.dataSource&&a.dataSource.id,a}(t),t.parentNode,t)})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(139)])},function(t,e,n){var r=n(0),i=n(138);t.exports=function(t){return"en"===t||r.contains(i,t)}},function(t,e){t.exports=["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl","ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur","he","th","cs","uk","vi","ro","bn","el","en-gb","gu","kn","mr","ta","bg","ca","hr","sr","sk"]},function(t,e,n){var r=n(3),i=n(0),o=n(19),s="collection:";function a(t,e){return r.collectionId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params.url,this.params.id);return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["collection"])}}),t.around("queryParams",function(t){return i.aug(t(),{collection_id:a(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!a(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(141)])},function(t,e,n){var r=n(3),i=n(0),o=n(19),s="event:";function a(t,e){return r.eventId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params.url,this.params.id);return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["event"])}}),t.around("queryParams",function(t){return i.aug(t(),{event_id:a(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!a(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(143)])},function(t,e,n){var r=n(3),i=n(0),o=n(19),s="likes:";function a(t){return r.likesScreenName(t.url)||t.screenName}t.exports=function(t){t.params({screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){var t=a(this.params)||this.params.userId;return s+t}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["likes"])}}),t.define("_getLikesQueryParam",function(){var t=a(this.params);return t?{screen_name:t}:{user_id:this.params.userId}}),t.around("queryParams",function(t){return i.aug(t(),this._getLikesQueryParam())}),t.before("initialize",function(){if(!a(this.params)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(145)])},function(t,e,n){var r=n(3),i=n(0),o=n(19),s="list:";function a(t){var e=r.listScreenNameAndSlug(t.url)||t;return i.compact({screen_name:e.ownerScreenName,user_id:e.ownerUserId,list_slug:e.slug})}t.exports=function(t){t.params({id:{},ownerScreenName:{},ownerUserId:{},slug:{},url:{}}),t.overrideProperty("id",{get:function(){var t,e,n;return this.params.id?s+this.params.id:(e=(t=a(this.params))&&t.list_slug.replace(/-/g,"_"),n=t&&(t.screen_name||t.user_id),s+(n+":")+e)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["list"])}}),t.define("_getListQueryParam",function(){return this.params.id?{list_id:this.params.id}:a(this.params)}),t.around("queryParams",function(t){return i.aug(t(),this._getListQueryParam())}),t.before("initialize",function(){var t=a(this.params);if(i.isEmptyObject(t)&&!this.params.id)throw new Error("qualified slug or list id required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(147)])},function(t,e,n){var r=n(3),i=n(5),o=n(0),s=n(19),a="profile:";function u(t,e){return r.screenName(t)||e}t.exports=function(t){t.params({showReplies:{fallback:!1,transform:i.asBoolean},screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){var t=u(this.params.url,this.params.screenName);return a+(t||this.params.userId)}}),t.overrideProperty("endpoint",{get:function(){return s.timeline(["profile"])}}),t.define("_getProfileQueryParam",function(){var t=u(this.params.url,this.params.screenName),e=t?{screen_name:t}:{user_id:this.params.userId};return o.aug(e,{with_replies:this.params.showReplies?"true":"false"})}),t.around("queryParams",function(t){return o.aug(t(),this._getProfileQueryParam())}),t.before("initialize",function(){if(!u(this.params.url,this.params.screenName)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(6)]).then(function(r){var o;try{o=n(90),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(3),o=n(0),s=n(13),a=n(14)(),u=n(68),c="blockquote.twitter-tweet, blockquote.twitter-video",d=/\btw-align-(left|right|center)\b/;t.exports=function(t,e){return a(t,c).map(function(t){return u(function(t){var e=s(t),n=t.getElementsByTagName("A"),a=n&&n[n.length-1],u=a&&i.status(a.href),c=t.getAttribute("data-conversation"),l="none"==c||"hidden"==c||r.present(t,"tw-hide-thread"),f=t.getAttribute("data-cards"),h="none"==f||"hidden"==f||r.present(t,"tw-hide-media"),p=t.getAttribute("data-align")||t.getAttribute("align"),m=t.getAttribute("data-link-color"),v=t.getAttribute("data-theme");return!p&&d.test(t.className)&&(p=RegExp.$1),o.aug(e,{tweetId:u,hideThread:l,hideCard:h,align:p,linkColor:m,theme:v,id:u})}(t),t.parentNode,t,e)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(7)]).then(function(r){var o;try{o=n(91),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(7)]).then(function(r){var o;try{o=n(92),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(0),o=n(13),s=n(14)(),a=n(69),u=n(5),c="a.twitter-share-button, a.twitter-mention-button, a.twitter-hashtag-button",d="twitter-hashtag-button",l="twitter-mention-button";t.exports=function(t){return s(t,c).map(function(t){return a(function(t){var e=o(t),n={screenName:t.getAttribute("data-button-screen-name"),text:t.getAttribute("data-text"),type:t.getAttribute("data-type"),size:t.getAttribute("data-size"),url:t.getAttribute("data-url"),hashtags:t.getAttribute("data-hashtags"),via:t.getAttribute("data-via"),buttonHashtag:t.getAttribute("data-button-hashtag")};return i.forIn(n,function(t,n){var r=e[t];e[t]=u.hasValue(r)?r:n}),e.screenName=e.screenName||e.screen_name,e.buttonHashtag=e.buttonHashtag||e.button_hashtag||e.hashtag,r.present(t,d)&&(e.type="hashtag"),r.present(t,l)&&(e.type="mention"),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(3).then(function(r){var o;try{o=n(93),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0);t.exports=r.aug({},n(155),n(156),n(157),n(158),n(159),n(160),n(161))},function(t,e,n){var r=n(60),i=n(17)(["userId"],{},r);t.exports={createDMButton:i}},function(t,e,n){var r=n(63),i=n(17)(["screenName"],{},r);t.exports={createFollowButton:i}},function(t,e,n){var r=n(64),i=n(17)(["momentId"],{},r);t.exports={createMoment:i}},function(t,e,n){var r=n(65),i=n(17)(["username"],{},r);t.exports={createPeriscopeOnAirButton:i}},function(t,e,n){var r=n(8),i=n(12),o=n(3),s=n(0),a=n(5),u=n(66),c=n(67),d=n(17)([],{},c),l=n(6),f="Embedded grids have been deprecated. Please use twttr.widgets.createTimeline instead. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564.",h={createTimeline:p,createGridFromCollection:function(t){var e=s.toRealArray(arguments).slice(1),n={sourceType:"collection",id:t};return e.unshift(n),i.publicLog(f),p.apply(this,e)}};function p(t){var e,n=s.toRealArray(arguments).slice(1);return a.isString(t)||a.isNumber(t)?l.reject("Embedded timelines with widget settings have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295."):s.isObject(t)?(t=t||{},n.forEach(function(t){s.isType("object",t)&&function(t){t.ariaLive=t.ariaPolite}(e=t)}),e||(e={},n.push(e)),t.lang=e.lang,t.tweetLimit=e.tweetLimit,t.showReplies=e.showReplies,e.dataSource=u(t),d.apply(this,n)):l.reject("data source must be an object.")}o.isTwitterURL(r.href)&&(h.createTimelinePreview=function(t,e,n){var r={previewParams:t,useLegacyDefaults:!0,isPreviewTimeline:!0};return r.dataSource=u(r),d(e,r,n)}),t.exports=h},function(t,e,n){var r,i=n(0),o=n(68),s=n(17),a=(r=s(["tweetId"],{},o),function(){return i.toRealArray(arguments).slice(1).forEach(function(t){i.isType("object",t)&&(t.hideCard="none"==t.cards||"hidden"==t.cards,t.hideThread="none"==t.conversation||"hidden"==t.conversation)}),r.apply(this,arguments)});t.exports={createTweet:a,createTweetEmbed:a,createVideo:a}},function(t,e,n){var r=n(0),i=n(69),o=n(17),s=o(["url"],{type:"share"},i),a=o(["buttonHashtag"],{type:"hashtag"},i),u=o(["screenName"],{type:"mention"},i);function c(t){return function(){return r.toRealArray(arguments).slice(1).forEach(function(t){r.isType("object",t)&&(t.screenName=t.screenName||t.screen_name,t.buttonHashtag=t.buttonHashtag||t.button_hashtag||t.hashtag)}),t.apply(this,arguments)}}t.exports={createShareButton:c(s),createHashtagButton:c(a),createMentionButton:c(u)}},function(t,e,n){var r,i,o,s=n(4),a=n(1),u=0,c=[],d=s.createElement("a");function l(){var t,e;for(u=1,t=0,e=c.length;t<e;t++)c[t]()}/^loade|c/.test(s.readyState)&&(u=1),s.addEventListener&&s.addEventListener("DOMContentLoaded",i=function(){s.removeEventListener("DOMContentLoaded",i,!1),l()},!1),d.doScroll&&s.attachEvent("onreadystatechange",r=function(){/^c/.test(s.readyState)&&(s.detachEvent("onreadystatechange",r),l())}),o=d.doScroll?function(t){a.self!=a.top?u?t():c.push(t):function(){try{d.doScroll("left")}catch(e){return setTimeout(function(){o(t)},50)}t()}()}:function(t){u?t():c.push(t)},t.exports=o},function(t,e,n){var r=n(44),i=n(9);t.exports=function(){i.set("buildVersion",r.version)}},function(t,e,n){n(165),n(85),n(168)},function(t,e,n){var r=n(166),i=n(29),o=n(70),s=new r,a=function(t){t.widgets&&1===t.widgets.length&&(s.start(),i.emitter.unbind(i.ALL_WIDGETS_RENDER_START,a))},u=function(t){var e;t.widgets&&1===t.widgets.length&&(e=t.widgets[0],s.end(),e.dataset&&e.dataset.tweetId&&o({duration:s.duration(),namespace:{element:"tweet",action:"render"},widgetIds:[e.dataset.tweetId]})),i.emitter.unbind(i.ALL_WIDGETS_RENDER_END,u)};i.emitter.bind(i.ALL_WIDGETS_RENDER_START,a),i.emitter.bind(i.ALL_WIDGETS_RENDER_END,u)},function(t,e,n){var r=n(167);function i(){}i.prototype.start=function(){this._startTime=r()},i.prototype.end=function(){this._duration=r()-this._startTime},i.prototype.duration=function(){return this._duration},t.exports=i},function(t,e,n){var r=n(1);t.exports=function(){return r.performance&&r.performance.now?r.performance.now():Date.now()}},function(t,e,n){var r=n(29),i=n(70),o=n(169),s=n(3),a=n(1),u=n(0),c=n(21),d=n(62);function l(t){return t.performance.getEntriesByType("resource").filter(function(t){return s.isTwimgURL(t.name)||s.isTwitterURL(t.name)}).reduce(function(t,e){return t[e.name]=e.duration,t},{})}r.emitter.bind(r.ALL_WIDGETS_AND_IMAGES_LOADED,function(t){var e,n,r=[];c.hasPerformanceInformation()&&(e=l(a),d.isSupported()||(r=function(t){return t.reduce(function(t,e){return u.aug(t,l(e.contentDocument.defaultView))},{})}(t)),n=u.aug({},e,r),Object.keys(o).forEach(function(t){!function(t,e,n){var r=Object.keys(t).reduce(function(e,r){return n(r)?e+t[r]:e},0);i({duration:r,namespace:{element:e,action:"resource"}})}(n,t,o[t])}))})},function(t,e,n){var r=n(3),i={all:function(){return!0},image:function(t){return r.isTwimgURL(t)},settings:function(t){return r.isSettingsURL(t)},widget_iframe:function(t){return r.isWidgetIframeURL(t)}};t.exports=i}])));
|
18 |
+
}
|
19 |
+
});
|
20 |
+
|
21 |
+
|
22 |
//Runs every time new tweets are loaded
|
23 |
function ctfScripts( $ctf ){
|
24 |
|
66 |
var replacementString = jQuery.trim(tag);
|
67 |
return ' <a href="https://twitter.com/'+ replacementString.substring(1) +'" target="_blank" rel="nofollow">' + replacementString + '</a>';
|
68 |
}
|
69 |
+
|
70 |
var tagRegex = /[\s][@]+[A-Za-z0-9-_]+/g;
|
71 |
ctfTextStr = ctfTextStr.replace( tagRegex , ctfReplaceTags );
|
72 |
|
81 |
|
82 |
} // End "ctfdata-disablelinks" check
|
83 |
|
84 |
+
// shorten long urls in tweets
|
85 |
+
$ctfItem.find('.ctf-tweet-text a').each(function() {
|
86 |
+
if (jQuery(this).text().indexOf('http') > -1 && jQuery(this).text().length > 63) {
|
87 |
+
jQuery(this).text(jQuery(this).text().substring(0,60)+'...');
|
88 |
+
}
|
89 |
+
});
|
90 |
+
|
91 |
}); // End .ctfItem loop
|
92 |
|
93 |
//Change color of retweet icon to match text
|
121 |
// Call Custom JS if it exists
|
122 |
if (typeof ctf_custom_js == 'function') ctf_custom_js($);
|
123 |
|
124 |
+
$ctf.find('.ctf-author-box-link p:empty').remove();
|
125 |
} // end ctfScripts()
|
126 |
|
127 |
function ctfLoadTweets( lastIDData, shortcodeData , $ctf, $ctfMore, numNeeded, persistentIndex ) {
|
js/ctf-scripts.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(t){var e=!1;function n(e){e.find(".ctf-item.ctf-new").each(function(){var n,r,i,o,u,a,s=t(this),c=s.find(".ctf-tweet-text-media-wrap"),d=s.find(".ctf-tweet-text").remove(".ctf-tweet-text-media-wrap"),f=" "+d.html();if("true"!=e.attr("data-ctfdisablelinks")&&void 0!==f){var l=e.attr("data-ctflinktextcolor"),h="";l&&(h=l.replace(";","").split("#")[1]),window.ctfLinkify=(n="[a-z\\d.-]+://",r="mailto:",i=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),o=new RegExp("^"+n,"i"),u={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},a={callback:function(t,e){return e?'<a href="'+e+'" title="'+e+'" target="_blank">'+t+"</a>":t},punct_regexp:/(?:[!?.,:;'"]|(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/},function(t,e){e=e||{};var n,s,c,d,f,l,h,p,m,v,g,w,y="",b=[];for(s in a)void 0===e[s]&&(e[s]=a[s]);for(;n=i.exec(t);)if(c=n[0],h=(l=i.lastIndex)-c.length,!/[\/:]/.test(t.charAt(h-1))){do{p=c,w=c.substr(-1),(g=u[w])&&(m=c.match(new RegExp("\\"+g+"(?!$)","g")),v=c.match(new RegExp("\\"+w,"g")),(m?m.length:0)<(v?v.length:0)&&(c=c.substr(0,c.length-1),l--)),e.punct_regexp&&(c=c.replace(e.punct_regexp,function(t){return l-=t.length,""}))}while(c.length&&c!==p);d=c,o.test(d)||(d=(-1!==d.indexOf("@")?d.indexOf(r)?r:"":d.indexOf("irc.")?d.indexOf("ftp.")?"http://":"ftp://":"irc://")+d),f!=h&&(b.push([t.slice(f,h)]),f=l),b.push([c,d])}for(b.push([t.substr(f)]),s=0;s<b.length;s++)y+=e.callback.apply(window,b[s]);return y||t});(f=ctfLinkify(f)).length>0&&(f=(f=f.replace(/<br>/g,"<br> ")).replace(/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,function(t){var e=jQuery.trim(t);return/^#[0-9A-F]{6}$/i.test(e)?e:' <a href="https://twitter.com/hashtag/'+e.substring(1)+'" target="_blank" rel="nofollow">'+e+"</a>"}));f=f.replace(/[\s][@]+[A-Za-z0-9-_]+/g,function(t){var e=jQuery.trim(t);return' <a href="https://twitter.com/'+e.substring(1)+'" target="_blank" rel="nofollow">'+e+"</a>"}),d.html(f.trim()),d.append(c),d.find("a").css("color","#"+h),c.css("color","#"+h)}s.find(".ctf-tweet-text a").each(function(){jQuery(this).text().indexOf("http")>-1&&jQuery(this).text().length>63&&jQuery(this).text(jQuery(this).text().substring(0,60)+"...")})}),e.find(".ctf-author-name, .ctf-tweet-date, .ctf-author-screenname, .ctf-twitterlink, .ctf-author-box-link, .ctf-retweet-text, .ctf-quoted-tweet").css("color",e.find(".ctf-tweet-text").css("color"));var n=e.find(".ctf-tweet-actions a").first();if(e.find(".ctf-twitterlink").css("line-height",n.height()+"px"),n.length){var r=parseInt(n.css("font-size").replace("px",""));e.find(".ctf-action-count").css({display:"block","font-size":r-4+"px","line-height":n.height()+"px"})}e.find(".ctf-header .ctf-header-link").hover(function(){e.find(".ctf-header .ctf-header-img-hover").fadeIn(200)},function(){e.find(".ctf-header .ctf-header-img-hover").stop().fadeOut(600)}),e.find(".ctf_more").unbind("click").bind("click",function(e){e.preventDefault(),t(this).hide().next(".ctf_remaining").show()}),"function"==typeof ctf_custom_js&&ctf_custom_js(t),e.find(".ctf-author-box-link p:empty").remove()}function r(t,e,r,i,o,u){i.addClass("ctf-loading").append('<div class="ctf-loader"></div>'),i.find(".ctf-loader").css("background-color",i.css("color")),jQuery.ajax({url:ctf.ajax_url,type:"post",data:{action:"ctf_get_more_posts",last_id_data:t,shortcode_data:e,num_needed:o,persistent_index:u},success:function(e){""!==t?(-1==e.indexOf("<meta charset")&&r.find(".ctf-item").removeClass("ctf-new").last().after(e),r.find(".ctf-out-of-tweets").length&&(i.hide(),r.find(".ctf-out-of-tweets p").eq(0).fadeIn().end().eq(1).delay(500).fadeIn())):r.find(".ctf-tweets").append(e),i.removeClass("ctf-loading").find(".ctf-loader").remove(),n(r)}})}t(".ctf").each(function(){e||void 0===t(this).attr("data-ctfintents")||(e=!0,Function&&Function.prototype&&Function.prototype.bind&&(/MSIE ([6789]|10)/.test(navigator.userAgent)||(window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.loaded&&window.twttr.widgets.load&&window.twttr.widgets.load(),window.__twttr&&window.__twttr.widgets&&window.__twttr.widgets.init||function(t){function e(e){for(var n,i,o=e[0],u=e[1],a=0,c=[];a<o.length;a++)i=o[a],r[i]&&c.push(r[i][0]),r[i]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(t[n]=u[n]);for(s&&s(e);c.length;)c.shift()()}var n={},r={1:0};function i(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(t){var e=[],n=r[t];if(0!==n)if(n)e.push(n[2]);else{var o=new Promise(function(e,i){n=r[t]=[e,i]});e.push(n[2]=o);var u,a=document.getElementsByTagName("head")[0],s=document.createElement("script");s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.src=function(t){return i.p+"js/"+({0:"moment~timeline~tweet",2:"dm_button",3:"button",4:"moment",5:"periscope_on_air",6:"timeline",7:"tweet"}[t]||t)+"."+{0:"ec04a6cb5ba879d0e0db41f211639fdf",2:"6542a7407a2eccac51f5c5e0fac5bb80",3:"d941c9a422e2e3faf474b82a1f39e936",4:"0a3cc02317b85399478995c763a1296c",5:"d26526abe761c4d8d8d71cf0ec565649",6:"0a7b4db67eacd23e35c5ce02e6ea3470",7:"b2d749028be81f16d9cb4994d9692feb"}[t]+".js"}(t),u=function(e){s.onerror=s.onload=null,clearTimeout(c);var n=r[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src,u=new Error("Loading chunk "+t+" failed.\n("+i+": "+o+")");u.type=i,u.request=o,n[1](u)}r[t]=void 0}};var c=setTimeout(function(){u({type:"timeout",target:s})},12e4);s.onerror=s.onload=u,a.appendChild(s)}return Promise.all(e)},i.m=t,i.c=n,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="https://platform.twitter.com/",i.oe=function(t){throw console.error(t),t};var o=window.__twttrll=window.__twttrll||[],u=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var s=u;i(i.s=94)}([function(t,e,n){var r=n(1);function i(t,e){var n;for(n in t)t.hasOwnProperty&&!t.hasOwnProperty(n)||e(n,t[n]);return t}function o(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function u(t){return t===Object(t)}function a(t){var e;if(!u(t))return!1;if(Object.keys)return!Object.keys(t).length;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}function s(t){return t?Array.prototype.slice.call(t):[]}t.exports={aug:function(t){return s(arguments).slice(1).forEach(function(e){i(e,function(e,n){t[e]=n})}),t},async:function(t,e){r.setTimeout(function(){t.call(e||null)},0)},compact:function t(e){return i(e,function(n,r){u(r)&&(t(r),a(r)&&delete e[n]),null!=r&&""!==r||delete e[n]}),e},contains:function(t,e){return!(!t||!t.indexOf)&&t.indexOf(e)>-1},forIn:i,isObject:u,isEmptyObject:a,toType:o,isType:function(t,e){return t==o(e)},toRealArray:s}},function(t,e){t.exports=window},function(t,e,n){var r=n(6);t.exports=function(){var t=this;this.promise=new r(function(e,n){t.resolve=e,t.reject=n})}},function(t,e,n){var r=n(11),i=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?(?:\/intent\/(?:follow|user)\/?\?screen_name=|(?:\/#!)?\/))@?([\w]+)(?:\?|&|$)/i,o=/(?:^|(?:https?:)?\/\/(?:www\.)?twitter\.com(?::\d+)?\/(?:#!\/)?[\w_]+\/status(?:es)?\/)(\d+)/i,u=/^http(s?):\/\/(\w+\.)*twitter\.com([:\/]|$)/i,a=/^http(s?):\/\/pbs\.twimg\.com\//,s=/^#?([^.,<>!\s\/#\-()'"]+)$/,c=/twitter\.com(?::\d{2,4})?\/intent\/(\w+)/,d=/^https?:\/\/(?:www\.)?twitter\.com\/\w+\/timelines\/(\d+)/i,f=/^https?:\/\/(?:www\.)?twitter\.com\/i\/moments\/(\d+)/i,l=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/(?:likes|favorites)/i,h=/^https?:\/\/(?:www\.)?twitter\.com\/(\w+)\/lists\/([\w-%]+)/i,p=/^https?:\/\/(?:www\.)?twitter\.com\/i\/live\/(\d+)/i,m=/^https?:\/\/syndication\.twitter\.com\/settings/i,v=/^https?:\/\/(localhost|platform)\.twitter\.com(?::\d+)?\/widgets\/widget_iframe\.(.+)/i,g=/^https?:\/\/(?:www\.)?twitter\.com\/search\?q=(\w+)/i;function w(t){return"string"==typeof t&&i.test(t)&&RegExp.$1.length<=20}function y(t){if(w(t))return RegExp.$1}function b(t,e){var n=r.decodeURL(t);if(e=e||!1,n.screen_name=y(t),n.screen_name)return r.url("https://twitter.com/intent/"+(e?"follow":"user"),n)}function E(t){return"string"==typeof t&&s.test(t)}function _(t){return"string"==typeof t&&o.test(t)}t.exports={isHashTag:E,hashTag:function(t,e){if(e=void 0===e||e,E(t))return(e?"#":"")+RegExp.$1},isScreenName:w,screenName:y,isStatus:_,status:function(t){return _(t)&&RegExp.$1},intentForProfileURL:b,intentForFollowURL:function(t){return b(t,!0)},isTwitterURL:function(t){return u.test(t)},isTwimgURL:function(t){return a.test(t)},isIntentURL:function(t){return c.test(t)},isSettingsURL:function(t){return m.test(t)},isWidgetIframeURL:function(t){return v.test(t)},isSearchUrl:function(t){return g.test(t)},regexen:{profile:i},momentId:function(t){return f.test(t)&&RegExp.$1},collectionId:function(t){return d.test(t)&&RegExp.$1},intentType:function(t){return c.test(t)&&RegExp.$1},likesScreenName:function(t){return l.test(t)&&RegExp.$1},listScreenNameAndSlug:function(t){var e,n,r;if(h.test(t)){e=RegExp.$1,n=RegExp.$2;try{r=decodeURIComponent(n)}catch(t){}return{ownerScreenName:e,slug:r||n}}return!1},eventId:function(t){return p.test(t)&&RegExp.$1}}},function(t,e){t.exports=document},function(t,e,n){var r=n(0),i=[!0,1,"1","on","ON","true","TRUE","yes","YES"],o=[!1,0,"0","off","OFF","false","FALSE","no","NO"];function u(t){return null!=t&&""!==t}function a(t){return c(t)&&t%1==0}function s(t){return c(t)&&!a(t)}function c(t){return u(t)&&!isNaN(t)}function d(t){return r.contains(o,t)}function f(t){return r.contains(i,t)}t.exports={hasValue:u,isInt:a,isFloat:s,isNumber:c,isString:function(t){return"string"===r.toType(t)},isArray:function(t){return u(t)&&"array"==r.toType(t)},isTruthValue:f,isFalseValue:d,asInt:function(t){if(a(t))return parseInt(t,10)},asFloat:function(t){if(s(t))return t},asNumber:function(t){if(c(t))return t},asBoolean:function(t){return!(!u(t)||!f(t)&&(d(t)||!t))}}},function(t,e,n){var r=n(1),i=n(21),o=n(48);i.hasPromiseSupport()||(r.Promise=o),t.exports=r.Promise},function(t,e,n){var r=n(0);t.exports=function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){var i=r.toRealArray(arguments);return t.apply(e,n.concat(i))}}},function(t,e){t.exports=location},function(t,e,n){var r=n(50);t.exports=new r("__twttr")},function(t,e,n){var r=n(0),i=/\b([\w-_]+)\b/g;function o(t){return new RegExp("\\b"+t+"\\b","g")}function u(t,e){t.classList?t.classList.add(e):o(e).test(t.className)||(t.className+=" "+e)}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(o(e)," ")}function s(t,e){return t.classList?t.classList.contains(e):r.contains(c(t),e)}function c(t){return r.toRealArray(t.classList?t.classList:t.className.match(i))}t.exports={add:u,remove:a,replace:function(t,e,n){if(t.classList&&s(t,e))return a(t,e),void u(t,n);t.className=t.className.replace(o(e),n)},toggle:function(t,e,n){return void 0===n&&t.classList&&t.classList.toggle?t.classList.toggle(e,n):(n?u(t,e):a(t,e),n)},present:s,list:c}},function(t,e,n){var r=n(5),i=n(0);function o(t){return encodeURIComponent(t).replace(/\+/g,"%2B").replace(/'/g,"%27")}function u(t){return decodeURIComponent(t)}function a(t){var e=[];return i.forIn(t,function(t,n){var u=o(t);i.isType("array",n)||(n=[n]),n.forEach(function(t){r.hasValue(t)&&e.push(u+"="+o(t))})}),e.sort().join("&")}function s(t){var e={};return t?(t.split("&").forEach(function(t){var n=t.split("="),r=u(n[0]),o=u(n[1]);if(2==n.length){if(!i.isType("array",e[r]))return r in e?(e[r]=[e[r]],void e[r].push(o)):void(e[r]=o);e[r].push(o)}}),e):{}}t.exports={url:function(t,e){return a(e).length>0?i.contains(t,"?")?t+"&"+a(e):t+"?"+a(e):t},decodeURL:function(t){var e=t&&t.split("?");return 2==e.length?s(e[1]):{}},decode:s,encode:a,encodePart:o,decodePart:u}},function(t,e,n){var r=n(8),i=n(1),o=n(0),u={},a=o.contains(r.href,"tw_debug=true");function s(){return i.performance&&+i.performance.now()||+new Date}function c(t,e){if(i.console&&i.console[t])switch(e.length){case 1:i.console[t](e[0]);break;case 2:i.console[t](e[0],e[1]);break;case 3:i.console[t](e[0],e[1],e[2]);break;case 4:i.console[t](e[0],e[1],e[2],e[3]);break;case 5:i.console[t](e[0],e[1],e[2],e[3],e[4]);break;default:0!==e.length&&i.console.warn&&i.console.warn("too many params passed to logger."+t)}}t.exports={devError:function(){},devInfo:function(){},devObject:function(t,e){},publicError:function(){c("error",o.toRealArray(arguments))},publicLog:function(){c("info",o.toRealArray(arguments))},time:function(t){a&&(u[t]=s())},timeEnd:function(t){a&&u[t]&&(s(),u[t])}}},function(t,e,n){var r=n(20),i=n(5),o=n(11),u=n(0),a=n(119);t.exports=function(t){var e=t.href&&t.href.split("?")[1],n=e?o.decode(e):{},s={lang:a(t),width:t.getAttribute("data-width")||t.getAttribute("width"),height:t.getAttribute("data-height")||t.getAttribute("height"),related:t.getAttribute("data-related"),partner:t.getAttribute("data-partner")};return i.asBoolean(t.getAttribute("data-dnt"))&&r.setOn(),u.forIn(s,function(t,e){var r=n[t];n[t]=i.hasValue(r)?r:e}),u.compact(n)}},function(t,e,n){var r=n(81),i=n(23);t.exports=function(){var t="data-twitter-extracted-"+i.generate();return function(e,n){return r(e,n).filter(function(e){return!e.hasAttribute(t)}).map(function(e){return e.setAttribute(t,"true"),e})}}},function(t,e){function n(t,e,n,r,i,o,u){this.factory=t,this.Sandbox=e,this.srcEl=o,this.targetEl=i,this.parameters=r,this.className=n,this.options=u}n.prototype.destroy=function(){this.srcEl=this.targetEl=null},t.exports=n},function(t,e){t.exports={DM_BUTTON:"twitter-dm-button",FOLLOW_BUTTON:"twitter-follow-button",HASHTAG_BUTTON:"twitter-hashtag-button",MENTION_BUTTON:"twitter-mention-button",MOMENT:"twitter-moment",PERISCOPE:"periscope-on-air",SHARE_BUTTON:"twitter-share-button",TIMELINE:"twitter-timeline",TWEET:"twitter-tweet"}},function(t,e,n){var r=n(6),i=n(20),o=n(53),u=n(52),a=n(35),s=n(5),c=n(0);t.exports=function(t,e,n){var d;return e=e||{},d="ƒ("+(t=t||[]).join(", ")+", target, [options]);",function(){var f,l,h,p,m=Array.prototype.slice.apply(arguments,[0,t.length]),v=Array.prototype.slice.apply(arguments,[t.length]);return v.forEach(function(t){t&&(t.nodeType!==Node.ELEMENT_NODE?c.isType("function",t)?f=t:c.isType("object",t)&&(l=t):h=t)}),m.length!==t.length||0===v.length?(f&&c.async(function(){f(!1)}),r.reject(new Error("Not enough parameters. Expected: "+d))):h?(l=c.aug({},l||{},e),t.forEach(function(t){l[t]=m.shift()}),s.asBoolean(l.dnt)&&i.setOn(),p=a.getExperiments().then(function(t){return o.addWidget(n(l,h,void 0,u.isHorizonTweetEnabled(t)))}),f&&p.then(f,function(){f(!1)}),p):(f&&c.async(function(){f(!1)}),r.reject(new Error("No target element specified. Expected: "+d)))}}},function(t,e,n){var r=n(102),i=n(2),o=n(0);function u(t,e){return function(){try{e.resolve(t.call(this))}catch(t){e.reject(t)}}}t.exports={sync:function(t,e){t.call(e)},read:function(t,e){var n=new i;return r.read(u(t,n),e),n.promise},write:function(t,e){var n=new i;return r.write(u(t,n),e),n.promise},defer:function(t,e,n){var a=new i;return o.isType("function",t)&&(n=e,e=t,t=1),r.defer(t,u(e,a),n),a.promise}}},function(t,e,n){var r=n(9),i=["https://syndication.twitter.com","https://cdn.syndication.twimg.com","https://localhost.twitter.com:8444"],o=["https://syndication.twitter.com","https://localhost.twitter.com:8445"],u=["https://platform.twitter.com/embed/index.html","https://localhost.twitter.com:8080",/https:\/\/ton\.smf1\.twitter\.com\/syndication-internal\/embed-iframe\/[0-9A-Za-z_-]+\/app\/index\.html/],a=function(t,e){return t.some(function(t){return t instanceof RegExp?t.test(e):t===e})},s=function(){var t=r.get("backendHost");return t&&a(i,t)?t:"https://cdn.syndication.twimg.com"},c=function(){var t=r.get("settingsSvcHost");return t&&a(o,t)?t:"https://syndication.twitter.com"};function d(t,e){var n=[t];return e.forEach(function(t){n.push(function(t){var e=(t||"").toString(),n="/"===e.slice(0,1)?1:0,r="/"===e.slice(-1)?-1:void 0;return e.slice(n,r)}(t))}),n.join("/")}t.exports={cookieConsent:function(t){var e=t||[];return e.unshift("cookie/consent"),d(c(),e)},embedIframe:function(){return(t=r.get("embedIframeURL"))&&a(u,t)?t:"https://platform.twitter.com/embed/index.html";var t},eventVideo:function(t){var e=t||[];return e.unshift("video/event"),d(s(),e)},grid:function(t){var e=t||[];return e.unshift("grid/collection"),d(s(),e)},moment:function(t){var e=t||[];return e.unshift("moments"),d(s(),e)},settings:function(t){var e=t||[];return e.unshift("settings"),d(c(),e)},timeline:function(t){var e=t||[];return e.unshift("timeline"),d(s(),e)},tweetBatch:function(t){var e=t||[];return e.unshift("tweets.json"),d(s(),e)},video:function(t){var e=t||[];return e.unshift("widgets/video"),d(s(),e)}}},function(t,e,n){var r=n(4),i=n(8),o=n(38),u=n(79),a=n(5),s=n(33),c=!1,d=/https?:\/\/([^\/]+).*/i;t.exports={setOn:function(){c=!0},enabled:function(t,e){return!!(c||a.asBoolean(s.val("dnt"))||u.isUrlSensitive(e||i.host)||o.isFramed()&&u.isUrlSensitive(o.rootDocumentLocation())||(t=d.test(t||r.referrer)&&RegExp.$1)&&u.isUrlSensitive(t))}}},function(t,e,n){var r=n(4),i=n(12),o=n(95),u=n(1),a=n(0),s=o.userAgent;function c(t){return/(Trident|MSIE|Edge[\/ ]?\d)/.test(t=t||s)}t.exports={retina:function(t){return(t=t||u).devicePixelRatio?t.devicePixelRatio>=1.5:!!t.matchMedia&&t.matchMedia("only screen and (min-resolution: 144dpi)").matches},anyIE:c,ie9:function(t){return/MSIE 9/.test(t=t||s)},ie10:function(t){return/MSIE 10/.test(t=t||s)},ios:function(t){return/(iPad|iPhone|iPod)/.test(t=t||s)},android:function(t){return/^Mozilla\/5\.0 \(Linux; (U; )?Android/.test(t=t||s)},canPostMessage:function(t,e){return e=e||s,(t=t||u).postMessage&&!(c(e)&&t.opener)},touch:function(t,e,n){return e=e||o,n=n||s,"ontouchstart"in(t=t||u)||/Opera Mini/.test(n)||e.msMaxTouchPoints>0},cssTransitions:function(){var t=r.body.style;return void 0!==t.transition||void 0!==t.webkitTransition||void 0!==t.mozTransition||void 0!==t.oTransition||void 0!==t.msTransition},hasPromiseSupport:function(){return!!(u.Promise&&u.Promise.resolve&&u.Promise.reject&&u.Promise.all&&u.Promise.race&&(new u.Promise(function(e){t=e}),a.isType("function",t)));var t},hasIntersectionObserverSupport:function(){return!!u.IntersectionObserver},hasPerformanceInformation:function(){return u.performance&&u.performance.getEntriesByType},hasLocalStorageSupport:function(){try{return u.localStorage.setItem("local_storage_support_test","true"),void 0!==u.localStorage}catch(t){return i.devError("window.localStorage is not supported:",t),!1}}}},function(t,e,n){var r=n(6),i=n(2);function o(t,e){return t.then(e,e)}function u(t){return t instanceof r}t.exports={always:o,allResolved:function(t){var e;return void 0===t?r.reject(new Error("undefined is not an object")):Array.isArray(t)?(e=t.length)?new r(function(n,r){var i=0,o=[];function a(){(i+=1)===e&&(0===o.length?r():n(o))}function s(t){o.push(t),a()}t.forEach(function(t){u(t)?t.then(s,a):s(t)})}):r.resolve([]):r.reject(new Error("Type error"))},some:function(t){var e;return e=(t=t||[]).length,t=t.filter(u),e?e!==t.length?r.reject("non-Promise passed to .some"):new r(function(e,n){var r=0;function i(){(r+=1)===t.length&&n()}t.forEach(function(t){t.then(e,i)})}):r.reject("no promises passed to .some")},isPromise:u,allSettled:function(t){function e(){}return r.all((t||[]).map(function(t){return o(t,e)}))},timeout:function(t,e){var n=new i;return setTimeout(function(){n.reject(new Error("Promise timed out"))},e),t.then(function(t){n.resolve(t)},function(t){n.reject(t)}),n.promise}}},function(t,e){var n=0,r=0;t.exports={generate:function(){return"i"+String(+new Date)+Math.floor(1e5*Math.random())+n++},deterministic:function(){return"i"+String(r++)}}},function(t,e,n){var r=n(49),i=n(51),o=n(0);t.exports=o.aug(r.get("events")||{},i.Emitter)},function(t,e,n){var r=n(26),i=n(110);t.exports=r.build([i])},function(t,e,n){var r=n(40),i=n(107),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(40),i=n(41),o=n(7);(r=Object.create(r)).build=o(r.build,null,i),t.exports=r},function(t,e,n){var r=n(83),i=n(75),o=n(84),u=n(8),a=n(71),s=n(74),c=n(20),d=n(5),f=n(23),l=n(0);function h(t){if(!t||!t.headers)throw new Error("unexpected response schema");return{html:t.body,config:t.config,pollInterval:1e3*parseInt(t.headers.xPolling,10)||null,maxCursorPosition:t.headers.maxPosition,minCursorPosition:t.headers.minPosition}}function p(t){if(t&&t.headers)throw new Error(t.headers.status);throw t instanceof Error?t:new Error(t)}t.exports=function(t){t.params({instanceId:{required:!0,fallback:f.deterministic},lang:{required:!0,transform:a.matchLanguage,fallback:"en"},tweetLimit:{transform:d.asInt}}),t.defineProperty("endpoint",{get:function(){throw new Error("endpoint not specified")}}),t.defineProperty("pollEndpoint",{get:function(){return this.endpoint}}),t.define("cbId",function(t){var e=t?"_new":"_old";return"tl_"+this.params.instanceId+"_"+this.id+e}),t.define("queryParams",function(){return{lang:this.params.lang,tz:s.getTimezoneOffset(),t:r(),domain:u.host,tweet_limit:this.params.tweetLimit,dnt:c.enabled()}}),t.define("fetch",function(){return i.fetch(this.endpoint,this.queryParams(),o,this.cbId()).then(h,p)}),t.define("poll",function(t,e){var n,r;return n={since_id:(t=t||{}).sinceId,max_id:t.maxId,min_position:t.minPosition,max_position:t.maxPosition},r=l.aug(this.queryParams(),n),i.fetch(this.pollEndpoint,r,o,this.cbId(e)).then(h,p)})}},function(t,e,n){var r=n(51).makeEmitter();t.exports={emitter:r,START:"start",ALL_WIDGETS_RENDER_START:"all_widgets_render_start",ALL_WIDGETS_RENDER_END:"all_widgets_render_end",ALL_WIDGETS_AND_IMAGES_LOADED:"all_widgets_and_images_loaded"}},function(t,e,n){var r=n(4),i=n(0);t.exports=function(t,e,n){var o;if(n=n||r,e=e||{},(t=t||{}).name){try{o=n.createElement('<iframe name="'+t.name+'"></iframe>')}catch(e){(o=n.createElement("iframe")).name=t.name}delete t.name}else o=n.createElement("iframe");return t.id&&(o.id=t.id,delete t.id),o.allowtransparency="true",o.scrolling="no",o.setAttribute("frameBorder",0),o.setAttribute("allowTransparency",!0),i.forIn(t,function(t,e){o.setAttribute(t,e)}),i.forIn(e,function(t,e){o.style[t]=e}),o}},function(t,e,n){var r=n(1).JSON;t.exports={stringify:r.stringify||r.encode,parse:r.parse||r.decode}},function(t,e,n){var r=n(0),i=n(43);t.exports={closest:function t(e,n,o){var u;if(n)return o=o||n&&n.ownerDocument,u=r.isType("function",e)?e:function(t){return function(e){return!!e.tagName&&i(e,t)}}(e),n===o?u(n)?n:void 0:u(n)?n:t(u,n.parentNode,o)}}},function(t,e,n){var r,i=n(4);function o(t){var e,n,o,u=0;for(r={},e=(t=t||i).getElementsByTagName("meta");e[u];u++){if(n=e[u],/^twitter:/.test(n.getAttribute("name")))o=n.getAttribute("name").replace(/^twitter:/,"");else{if(!/^twitter:/.test(n.getAttribute("property")))continue;o=n.getAttribute("property").replace(/^twitter:/,"")}r[o]=n.getAttribute("content")||n.getAttribute("value")}}o(),t.exports={init:o,val:function(t){return r[t]}}},function(t,e,n){var r=n(4),i=n(31),o=n(20),u=n(0),a=n(44),s=n(9),c=n(3),d=n(32),f=a.version,l=s.get("clientEventEndpoint")||"https://syndication.twitter.com/i/jot";function h(t){return u.aug({client:"tfw"},t||{})}function p(t,e,n){return e=e||{},u.aug({},e,{_category_:t,triggered_on:e.triggered_on||+new Date,dnt:o.enabled(n)})}t.exports={extractTermsFromDOM:function t(e,n){var r;return n=n||{},e&&e.nodeType===Node.ELEMENT_NODE?((r=e.getAttribute("data-scribe"))&&r.split(" ").forEach(function(t){var e=t.trim().split(":"),r=e[0],i=e[1];r&&i&&!n[r]&&(n[r]=i)}),t(e.parentNode,n)):n},clickEventElement:function(t){var e=d.closest("[data-expanded-url]",t),n=e&&e.getAttribute("data-expanded-url");return n&&c.isTwitterURL(n)?"twitter_url":"url"},flattenClientEventPayload:function(t,e){return u.aug({},e,{event_namespace:t})},formatGenericEventData:p,formatClientEventData:function(t,e,n){var i=t&&t.widget_origin||r.referrer;return(t=p("tfw_client_event",t,i)).client_version=f,t.format_version=void 0!==n?n:1,e||(t.widget_origin=i),t},formatClientEventNamespace:h,formatTweetAssociation:function(t,e){var n={};return(e=e||{}).association_namespace=h(t),n[1]=e,n},noticeSeen:function(t){return"notice"===t.element&&"seen"===t.action},splitLogEntry:function(t){var e,n,r,i,o;return t.item_ids&&t.item_ids.length>1?(e=Math.floor(t.item_ids.length/2),n=t.item_ids.slice(0,e),r={},i=t.item_ids.slice(e),o={},n.forEach(function(e){r[e]=t.item_details[e]}),i.forEach(function(e){o[e]=t.item_details[e]}),[u.aug({},t,{item_ids:n,item_details:r}),u.aug({},t,{item_ids:i,item_details:o})]):[t]},stringify:function(t){var e,n=Array.prototype.toJSON;return delete Array.prototype.toJSON,e=i.stringify(t),n&&(Array.prototype.toJSON=n),e},AUDIENCE_ENDPOINT:"https://syndication.twitter.com/i/jot/syndication",CLIENT_EVENT_ENDPOINT:l,RUFOUS_REDIRECT:"https://platform.twitter.com/jot.html"}},function(t,e,n){var r=n(113),i=n(116);function o(t){return r.settingsLoaded().then(function(e){return e[t]})}function u(){return o("experiments")}t.exports={shouldObtainCookieConsent:function(){return o("shouldObtainCookieConsent")},getExperiments:u,getExperiment:function(t){return u().then(function(e){if(!e[t])throw new Error("Experiment not found");return e[t]})},getActiveExperimentDataString:function(){return u().then(function(t){var e=Object.keys(t).reduce(function(e,n){var r;return t[n].version&&(r=n.split("_").slice(-1)[0],e.push(r+";"+t[n].bucket)),e},[]);return i(e.join(","))})},getExperimentKeys:function(){return u().then(function(t){return Object.keys(t)})},load:function(){r.load()}}},function(t,e,n){var r=n(10),i={},o=-1,u={};function a(t){return t.getAttribute("data-twitter-event-id")||(t.setAttribute("data-twitter-event-id",++o),o)}function s(t,e,n){var r=0,i=t&&t.length||0;for(r=0;r<i;r++)if(t[r].call(e,n,e),n.ceaseImmediately)return!1}function c(t,e,n){for(var i=n||t.target||t.srcElement,o=r.list(i).map(function(t){return"."+t}).concat(i.tagName),u=0,a=o.length;u<a;u++)if(!1===s(e[o[u]],i,t))return;t.cease||i!==this&&c.call(this,t,e,i.parentElement||i.parentNode)}function d(t){t&&t.preventDefault?t.preventDefault():t.returnValue=!1}function f(t){t&&(t.cease=!0)&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}t.exports={stop:function(t){return f(t),d(t),!1},stopPropagation:f,stopImmediatePropagation:function(t){t&&(t.ceaseImmediately=!0,f(t),t.stopImmediatePropagation())},preventDefault:d,delegate:function(t,e,n,r){var o=a(t);i[o]=i[o]||{},i[o][e]||(i[o][e]={},function(t,e,n,r){function i(r){c.call(t,r,n[e])}!function(t,e,n,r){t.id&&(u[t.id]=u[t.id]||[],u[t.id].push({el:t,listener:e,type:n,rootId:r}))}(t,i,e,r),t.addEventListener(e,i,!1)}(t,e,i[o],o)),i[o][e][n]=i[o][e][n]||[],i[o][e][n].push(r)},simulate:function(t,e,n){var r=a(e),o=i[r]&&i[r];c.call(e,{target:n},o[t])},removeDelegatesForWidget:function(t){var e=u[t];e&&(e.forEach(function(t){t.el.removeEventListener(t.type,t.listener,!1),delete i[t.rootId]}),delete u[t])}}},function(t,e,n){var r=n(26),i=n(125);t.exports=r.build([i])},function(t,e,n){var r=n(8),i=n(78),o=n(0),u=i.getCanonicalURL()||r.href,a=u;t.exports={isFramed:function(){return u!==a},rootDocumentLocation:function(t){return t&&o.isType("string",t)&&(u=t),u},currentDocumentLocation:function(){return a}}},function(t,e,n){var r=n(77),i=n(104),o=n(80),u=n(34),a=new(n(112))(function(t){var e,n,a;if(0!==t.length){if(s(t))return c(t);n=(e=r(t,function(t){return u.noticeSeen(t.input.namespace)})).true,a=e.false,n&&n.length>0&&(n=n.slice(0,1),o.canFlushOneItem(n[0])||(n[0].input.data.message=""),c(n)),a&&(s(a)?c:function(t){i.init(),t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,o=t.input.version;i.clientEvent(e,n,r,o)}),i.flush().then(function(){t.forEach(function(t){t.taskDoneDeferred.resolve()})},function(){t.forEach(function(t){t.taskDoneDeferred.reject()})})})(a)}});function s(t){return 1===t.length&&o.canFlushOneItem(t[0])}function c(t){t.forEach(function(t){var e=t.input.namespace,n=t.input.data,r=t.input.offsite,i=t.input.version;o.clientEvent(e,n,r,i),t.taskDoneDeferred.resolve()})}t.exports={scribe:function(t,e,n,r){return a.add({namespace:t,data:e,offsite:n,version:r})},pause:function(){a.pause()},resume:function(){a.resume()}}},function(t,e,n){var r=n(105),i=n(106),o=n(0);t.exports={couple:function(){return o.toRealArray(arguments)},build:function(t,e,n){var o=new t;return(e=i(r(e||[]))).forEach(function(t){t.call(null,o)}),o.build(n)}}},function(t,e,n){var r=n(108),i=n(0),o=n(42);function u(){this.Component=this.factory(),this._adviceArgs=[],this._lastArgs=[]}i.aug(u.prototype,{factory:o,build:function(t){var e=this;return this.Component,i.aug(this.Component.prototype.boundParams,t),this._adviceArgs.concat(this._lastArgs).forEach(function(t){(function(t,e,n){var r=this[e];if(!r)throw new Error(e+" does not exist");this[e]=t(r,n)}).apply(e.Component.prototype,t)}),delete this._lastArgs,delete this._adviceArgs,this.Component},params:function(t){var e=this.Component.prototype.paramConfigs;t=t||{},this.Component.prototype.paramConfigs=i.aug({},t,e)},define:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.override(t,e)},defineStatic:function(t,e){this.Component[t]=e},override:function(t,e){this.Component.prototype[t]=e},defineProperty:function(t,e){if(t in this.Component.prototype)throw new Error(t+" has previously been defined");this.overrideProperty(t,e)},overrideProperty:function(t,e){var n=i.aug({configurable:!0},e);Object.defineProperty(this.Component.prototype,t,n)},before:function(t,e){this._adviceArgs.push([r.before,t,e])},after:function(t,e){this._adviceArgs.push([r.after,t,e])},around:function(t,e){this._adviceArgs.push([r.around,t,e])},last:function(t,e){this._lastArgs.push([r.after,t,e])}}),t.exports=u},function(t,e,n){var r=n(0);function i(){return!0}function o(t){return t}t.exports=function(){function t(t){var e=this;t=t||{},this.params=Object.keys(this.paramConfigs).reduce(function(n,u){var a=[],s=e.boundParams,c=e.paramConfigs[u],d=c.validate||i,f=c.transform||o;if(u in s&&a.push(s[u]),u in t&&a.push(t[u]),a="fallback"in c?a.concat(c.fallback):a,n[u]=function(t,e,n){var i=null;return a.some(function(t){if(t=r.isType("function",t)?t():t,e(t))return i=n(t),!0}),i}(0,d,f),c.required&&null==n[u])throw new Error(u+" is a required parameter");return n},{}),this.initialize()}return r.aug(t.prototype,{paramConfigs:{},boundParams:{},initialize:function(){}}),t}},function(t,e,n){var r=n(1).HTMLElement,i=r.prototype.matches||r.prototype.matchesSelector||r.prototype.webkitMatchesSelector||r.prototype.mozMatchesSelector||r.prototype.msMatchesSelector||r.prototype.oMatchesSelector;t.exports=function(t,e){if(i)return i.call(t,e)}},function(t){t.exports={version:"2a81c84:1568701398616"}},function(t,e,n){var r,i=n(10),o=n(4),u=n(1),a=n(33),s=n(54),c=n(5),d=n(23);t.exports={inlineStyle:function(){var t="csptest"+d.generate(),e=o.createElement("div"),n=o.createElement("style"),f="."+t+" { visibility: hidden; }";return!!o.body&&(c.asBoolean(a.val("widgets:csp"))&&(r=!1),void 0!==r?r:(e.style.display="none",i.add(e,t),n.type="text/css",n.appendChild(o.createTextNode(f)),o.body.appendChild(n),o.body.appendChild(e),r="hidden"===u.getComputedStyle(e).visibility,s(e),s(n),r))}}},function(t,e,n){var r=n(1);t.exports=function(t,e,n){var i,o=0;return n=n||null,function u(){var a=n||this,s=arguments,c=+new Date;if(r.clearTimeout(i),c-o>e)return o=c,void t.apply(a,s);i=r.setTimeout(function(){u.apply(a,s)},e)}}},function(t,e){t.exports=function(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height}}},function(t,e,n){var r;r=function(){"use strict";function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,r=void 0,i=void 0,o=function(t,e){l[n]=t,l[n+1]=e,2===(n+=2)&&(i?i(h):w())},u="undefined"!=typeof window?window:void 0,a=u||{},s=a.MutationObserver||a.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var t=setTimeout;return function(){return t(h,1)}}var l=new Array(1e3);function h(){for(var t=0;t<n;t+=2)(0,l[t])(l[t+1]),l[t]=void 0,l[t+1]=void 0;n=0}var p,m,v,g,w=void 0;function y(t,e){var n=this,r=new this.constructor(_);void 0===r[E]&&I(r);var i=n._state;if(i){var u=arguments[i-1];o(function(){return P(i,r,u,n._result)})}else N(n,r,t,e);return r}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(_);return S(e,t),e}c?w=function(){return process.nextTick(h)}:s?(m=0,v=new s(h),g=document.createTextNode(""),v.observe(g,{characterData:!0}),w=function(){g.data=m=++m%2}):d?((p=new MessageChannel).port1.onmessage=h,w=function(){return p.port2.postMessage(0)}):w=void 0===u?function(){try{var t=Function("return this")().require("vertx");return void 0!==(r=t.runOnLoop||t.runOnContext)?function(){r(h)}:f()}catch(t){return f()}}():f();var E=Math.random().toString(36).substring(2);function _(){}var A=void 0,x=1,C=2,D={error:null};function T(t){try{return t.then}catch(t){return D.error=t,D}}function F(e,n,r){n.constructor===e.constructor&&r===y&&n.constructor.resolve===b?function(t,e){e._state===x?j(t,e._result):e._state===C?R(t,e._result):N(e,void 0,function(e){return S(t,e)},function(e){return R(t,e)})}(e,n):r===D?(R(e,D.error),D.error=null):void 0===r?j(e,n):t(r)?function(t,e,n){o(function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,function(n){r||(r=!0,e!==n?S(t,n):j(t,n))},function(e){r||(r=!0,R(t,e))},t._label);!r&&i&&(r=!0,R(t,i))},t)}(e,n,r):j(e,n)}function S(t,e){var n,r;t===e?R(t,new TypeError("You cannot resolve a promise with itself")):(r=typeof(n=e),null===n||"object"!==r&&"function"!==r?j(t,e):F(t,e,T(e)))}function B(t){t._onerror&&t._onerror(t._result),k(t)}function j(t,e){t._state===A&&(t._result=e,t._state=x,0!==t._subscribers.length&&o(k,t))}function R(t,e){t._state===A&&(t._state=C,t._result=e,o(B,t))}function N(t,e,n,r){var i=t._subscribers,u=i.length;t._onerror=null,i[u]=e,i[u+x]=n,i[u+C]=r,0===u&&t._state&&o(k,t)}function k(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,u=0;u<e.length;u+=3)r=e[u],i=e[u+n],r?P(n,r,i,o):i(o);t._subscribers.length=0}}function P(e,n,r,i){var o=t(r),u=void 0,a=void 0,s=void 0,c=void 0;if(o){if((u=function(t,e){try{return t(e)}catch(t){return D.error=t,D}}(r,i))===D?(c=!0,a=u.error,u.error=null):s=!0,n===u)return void R(n,new TypeError("A promises callback cannot return that same promise."))}else u=i,s=!0;n._state!==A||(o&&s?S(n,u):c?R(n,a):e===x?j(n,u):e===C&&R(n,u))}var L=0;function I(t){t[E]=L++,t._state=void 0,t._result=void 0,t._subscribers=[]}var z=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(_),this.promise[E]||I(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&j(this.promise,this._result))):R(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===b){var i=T(t);if(i===y&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===O){var o=new n(_);F(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===A&&(this._remaining--,t===C?R(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;N(t,void 0,function(t){return n._settledAt(x,e,t)},function(t){return n._settledAt(C,e,t)})},t}(),O=function(){function e(t){this[E]=L++,this._result=this._state=void 0,this._subscribers=[],_!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e(function(e){S(t,e)},function(e){R(t,e)})}catch(e){R(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})}):this.then(e,e)},e}();return O.prototype.then=y,O.all=function(t){return new z(this,t).promise},O.race=function(t){var n=this;return e(t)?new n(function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)}):new n(function(t,e){return e(new TypeError("You must pass an array to race."))})},O.resolve=b,O.reject=function(t){var e=new this(_);return R(e,t),e},O._setScheduler=function(t){i=t},O._setAsap=function(t){o=t},O._asap=o,O.polyfill=function(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=O},O.Promise=O,O},t.exports=r()},function(t,e,n){var r=n(50);t.exports=new r("twttr")},function(t,e,n){var r=n(1),i=n(0);function o(t){return i.isType("string",t)?t.split("."):i.isType("array",t)?t:[]}function u(t,e){(e=e||r)[t]=e[t]||{},Object.defineProperty(this,"base",{value:e[t]}),Object.defineProperty(this,"name",{value:t})}i.aug(u.prototype,{get:function(t){return o(t).reduce(function(t,e){if(i.isObject(t))return t[e]},this.base)},set:function(t,e,n){var r=o(t),u=function(t,e){var n=o(e).slice(0,-1);return n.reduce(function(t,e,r){if(t[e]=t[e]||{},!i.isObject(t[e]))throw new Error(n.slice(0,r+1).join(".")+" is already defined with a value.");return t[e]},t)}(this.base,t),a=r.slice(-1);return n&&a in u?u[a]:u[a]=e},init:function(t,e){return this.set(t,e,!0)},unset:function(t){var e=o(t),n=this.get(e.slice(0,-1));n&&delete n[e.slice(-1)]},aug:function(t){var e=this.get(t),n=i.toRealArray(arguments).slice(1);if(e=void 0!==e?e:{},n.unshift(e),!n.every(i.isObject))throw new Error("Cannot augment non-object.");return this.set(t,i.aug.apply(null,n))},call:function(t){var e=this.get(t),n=i.toRealArray(arguments).slice(1);if(!i.isType("function",e))throw new Error("Function "+t+"does not exist.");return e.apply(null,n)},fullPath:function(t){var e=o(t);return e.unshift(this.name),e.join(".")}}),t.exports=u},function(t,e,n){var r=n(0),i=n(7),o={bind:function(t,e){return this._handlers=this._handlers||{},this._handlers[t]=this._handlers[t]||[],this._handlers[t].push(e)},unbind:function(t,e){var n;this._handlers&&this._handlers[t]&&(e?(n=this._handlers[t].indexOf(e))>=0&&this._handlers[t].splice(n,1):this._handlers[t]=[])},trigger:function(t,e){var n=this._handlers&&this._handlers[t];(e=e||{}).type=t,n&&n.forEach(function(t){r.async(i(t,this,e))})}};t.exports={Emitter:o,makeEmitter:function(){return r.aug(function(){},o)}}},function(t,e){var n="tfw_horizon_tweet_embed_9555";t.exports={isHorizonTweetEnabled:function(t){return!(!t||!t[n]||"hte"!==t[n].bucket)}}},function(t,e,n){var r=n(101),i=n(76),o=n(6),u=n(22),a=n(7),s=n(0),c=new i(function(t){var e=function(t){return t.reduce(function(t,e){return t[e._className]=t[e._className]||[],t[e._className].push(e),t},{})}(t.map(r.fromRawTask));s.forIn(e,function(t,e){u.allSettled(e.map(function(t){return t.initialize()})).then(function(){e.forEach(function(t){o.all([t.hydrate(),t.insertIntoDom()]).then(a(t.render,t)).then(a(t.success,t),a(t.fail,t))})})})});t.exports={addWidget:function(t){return c.add(t)}}},function(t,e,n){var r=n(18);t.exports=function(t){return r.write(function(){t&&t.parentNode&&t.parentNode.removeChild(t)})}},function(t,e,n){n(12),t.exports={log:function(t,e){}}},function(t,e,n){var r=n(1);function i(t){return(t=t||r).getSelection&&t.getSelection()}t.exports={getSelection:i,getSelectedText:function(t){var e=i(t);return e?e.toString():""}}},function(t,e,n){var r=n(4),i=n(1),o=n(2);t.exports=function(t){var e=new o,n=r.createElement("img");return n.onload=n.onerror=function(){i.setTimeout(e.resolve,50)},n.src=t,i.setTimeout(e.reject,2e4),e.promise}},function(t,e,n){var r=n(111);t.exports=function(t){t.define("createElement",r),t.define("createFragment",r),t.define("htmlToElement",r),t.define("hasSelectedText",r),t.define("addRootClass",r),t.define("removeRootClass",r),t.define("hasRootClass",r),t.define("prependStyleSheet",r),t.define("appendStyleSheet",r),t.define("prependCss",r),t.define("appendCss",r),t.define("makeVisible",r),t.define("injectWidgetEl",r),t.define("matchHeightToContent",r),t.define("matchWidthToContent",r)}},function(t,e){t.exports=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments))}}},function(t,e,n){var r=n(15),i=n(120),o=n(61),u=n(16);t.exports=function(t,e,n){return new r(i,o,u.DM_BUTTON,t,e,n)}},function(t,e,n){var r=n(62),i=n(25);t.exports=r.isSupported()?r:i},function(t,e,n){var r=n(26),i=n(121);t.exports=r.build([i])},function(t,e,n){var r=n(15),i=n(124),o=n(37),u=n(16);t.exports=function(t,e,n){return new r(i,o,u.FOLLOW_BUTTON,t,e,n)}},function(t,e,n){var r=n(15),i=n(132),o=n(25),u=n(16);t.exports=function(t,e,n){return new r(i,o,u.MOMENT,t,e,n)}},function(t,e,n){var r=n(15),i=n(134),o=n(25),u=n(16);t.exports=function(t,e,n){return new r(i,o,u.PERISCOPE,t,e,n)}},function(t,e,n){var r=n(82),i=n(136),o=n(140),u=n(142),a=n(144),s=n(146),c={collection:i,event:o,likes:u,list:a,profile:s,url:f},d=[s,u,i,a,o];function f(t){return r(d,function(e){try{return new e(t)}catch(t){}})}t.exports=function(t){return t?function(t){var e,n;return e=(t.sourceType+"").toLowerCase(),(n=c[e])?new n(t):null}(t)||f(t):null}},function(t,e,n){var r=n(15),i=n(148),o=n(25),u=n(16);t.exports=function(t,e,n){return new r(i,o,u.TIMELINE,t,e,n)}},function(t,e,n){var r=n(15),i=n(4),o=n(37),u=n(150),a=n(61),s=n(151),c=n(16);t.exports=function(t,e,n,d){var f;return d?(f=i.createElement("div"),new r(u,o,c.TWEET,t,e,n,{sandboxWrapperEl:f})):new r(s,a,c.TWEET,t,e,n)}},function(t,e,n){var r=n(15),i=n(153),o=n(37),u=n(16);t.exports=function(t,e,n){var a=t&&t.type||"share",s="hashtag"==a?u.HASHTAG_BUTTON:"mention"==a?u.MENTION_BUTTON:u.SHARE_BUTTON;return new r(i,o,s,t,e,n)}},function(t,e,n){var r=n(39),i=n(38),o=n(0);t.exports=function(t){var e={widget_origin:i.rootDocumentLocation(),widget_frame:i.isFramed()?i.currentDocumentLocation():null,duration_ms:t.duration,item_ids:t.widgetIds||[]},n=o.aug(t.namespace,{page:"page",component:"performance"});r.scribe(n,e)}},function(t,e,n){var r=n(0),i=n(137),o=["ar","fa","he","ur"];t.exports={isRtlLang:function(t){return t=String(t).toLowerCase(),r.contains(o,t)},matchLanguage:function(t){return t=(t=(t||"").toLowerCase()).replace("_","-"),i(t)?t:(t=t.replace(/-.*/,""),i(t)?t:"en")}}},function(t){t.exports={tweetButtonHtmlPath:"/widgets/tweet_button.d6364fae9340b0be5f13818370141fd0.{{lang}}.html",followButtonHtmlPath:"/widgets/follow_button.d6364fae9340b0be5f13818370141fd0.{{lang}}.html",hubHtmlPath:"/widgets/hub.html",widgetIframeHtmlPath:"/widgets/widget_iframe.d6364fae9340b0be5f13818370141fd0.html",resourceBaseUrl:"https://platform.twitter.com"}},function(t,e,n){var r=n(3),i=n(98),o=n(24),u=n(11),a={favorite:["favorite","like"],follow:["follow"],like:["favorite","like"],retweet:["retweet"],tweet:["tweet"]};function s(t){this.srcEl=[],this.element=t}s.open=function(t,e,n){var s=(r.intentType(t)||"").toLowerCase();r.isTwitterURL(t)&&(function(t,e){i.open(t,{},e)}(t,n),e&&o.trigger("click",{target:e,region:"intent",type:"click",data:{}}),e&&a[s]&&a[s].forEach(function(n){o.trigger(n,{target:e,region:"intent",type:n,data:function(t,e){var n=u.decodeURL(e);switch(t){case"favorite":case"like":return{tweet_id:n.tweet_id};case"follow":return{screen_name:n.screen_name,user_id:n.user_id};case"retweet":return{source_tweet_id:n.tweet_id};default:return{}}}(s,t)})}))},t.exports=s},function(t,e){t.exports={getTimezoneOffset:function(){var t=(new Date).toString().match(/(GMT[+-]?\d+)/);return t&&t[0]||"GMT"}}},function(t,e,n){var r=n(4),i=n(9),o=n(2),u=n(0),a=n(11),s=0;t.exports={fetch:function(t,e,n,c){var d,f,l;return c=function(t){if(t)return t.replace(/[^\w$]/g,"_")}(c||"cb"+s++),d=i.fullPath(["callbacks",c]),f=r.createElement("script"),l=new o,e=u.aug({},e,{callback:d,suppress_response_codes:!0}),i.set(["callbacks",c],function(t){var e;t=(e=n(t||!1)).resp,e.success?l.resolve(t):l.reject(t),f.onload=f.onreadystatechange=null,f.parentNode&&f.parentNode.removeChild(f),i.unset(["callbacks",c])}),f.onerror=function(){l.reject(new Error("failed to fetch "+f.src))},f.src=a.url(t,e),f.async="async",r.body.appendChild(f),l.promise}}},function(t,e,n){var r=n(2),i=n(103),o=n(7);function u(t){this._inputsQueue=[],this._task=t,this._hasFlushBeenScheduled=!1}u.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._hasFlushBeenScheduled||(this._hasFlushBeenScheduled=!0,i(o(this._flush,this))),e.promise},u.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._hasFlushBeenScheduled=!1},t.exports=u},function(t,e){t.exports=function(t,e){return t.reduce(function(t,n){var r=e(n);return t[r]=t[r]||[],t[r].push(n),t},{})}},function(t,e,n){var r=n(4),i=n(8),o=n(3);function u(t,e){var n,r;return e=e||i,/^https?:\/\//.test(t)?t:/^\/\//.test(t)?e.protocol+t:(n=e.host+(e.port.length?":"+e.port:""),0!==t.indexOf("/")&&((r=e.pathname.split("/")).pop(),r.push(t),t="/"+r.join("/")),[e.protocol,"//",n,t].join(""))}t.exports={absolutize:u,getCanonicalURL:function(){for(var t,e=r.getElementsByTagName("link"),n=0;e[n];n++)if("canonical"==(t=e[n]).rel)return u(t.href)},getScreenNameFromPage:function(){for(var t,e,n,i=[r.getElementsByTagName("a"),r.getElementsByTagName("link")],u=0,a=0,s=/\bme\b/;t=i[u];u++)for(a=0;e=t[a];a++)if(s.test(e.rel)&&(n=o.screenName(e.href)))return n}}},function(t,e,n){var r=n(8),i=/^[^#?]*\.(gov|mil)(:\d+)?([#?].*)?$/i,o={};function u(t){return t in o?o[t]:o[t]=i.test(t)}t.exports={isUrlSensitive:u,isHostPageSensitive:function(){return u(r.host)}}},function(t,e,n){var r=n(20),i=n(55),o=n(11),u=n(34),a=n(0),s=n(9).get("scribeCallback"),c=2083,d=[],f=o.url(u.CLIENT_EVENT_ENDPOINT,{dnt:0,l:""}),l=encodeURIComponent(f).length;function h(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);i||o||(s&&s(arguments),p(u.formatClientEventNamespace(t),u.formatClientEventData(e,n,r),u.CLIENT_EVENT_ENDPOINT))}function p(t,e,n){var r,s;n&&a.isObject(t)&&a.isObject(e)&&(i.log(t,e),r=u.flattenClientEventPayload(t,e),s={l:u.stringify(r)},u.noticeSeen(t)&&(s.notice_seen=!0),r.dnt&&(s.dnt=1),w(o.url(n,s)))}function m(t,e,n,r){var i=!a.isObject(t),o=!!e&&!a.isObject(e);if(!i&&!o)return v(u.flattenClientEventPayload(u.formatClientEventNamespace(t),u.formatClientEventData(e,n,r)))}function v(t){return d.push(t),d}function g(t){return encodeURIComponent(t).length+3}function w(t){return(new Image).src=t}t.exports={canFlushOneItem:function(t){var e=g(u.stringify(t));return l+e<c},_enqueueRawObject:v,scribe:p,clientEvent:h,clientEvent2:function(t,e,n){return h(t,e,n,2)},enqueueClientEvent:m,flushClientEvents:function(){var t;return d.length>1&&m({page:"widgets_js",component:"scribe_pixel",action:"batch_log"},{}),t=d,d=[],t.reduce(function(e,n,r){var i=e.length,o=i&&e[i-1];return r+1==t.length&&n.event_namespace&&"batch_log"==n.event_namespace.action&&(n.message=["entries:"+r,"requests:"+i].join("/")),function t(e){return Array.isArray(e)||(e=[e]),e.reduce(function(e,n){var r,i=u.stringify(n),o=g(i);return l+o<c?e=e.concat(i):(r=u.splitLogEntry(n)).length>1&&(e=e.concat(t(r))),e},[])}(n).forEach(function(t){var n=g(t);(!o||o.urlLength+n>c)&&(o={urlLength:l,items:[]},e.push(o)),o.urlLength+=n,o.items.push(t)}),e},[]).map(function(t){var e={l:t.items};return r.enabled()&&(e.dnt=1),w(o.url(u.CLIENT_EVENT_ENDPOINT,e))})},interaction:function(t,e,n,r){var i=u.extractTermsFromDOM(t.target||t.srcElement);i.action=r||"click",h(i,e,n)}}},function(t,e,n){var r=n(0),i=n(43);t.exports=function(t,e){return i(t,e)?[t]:r.toRealArray(t.querySelectorAll(e))}},function(t,e){t.exports=function(t,e,n){for(var r,i=0;i<t.length;i++)if(r=e.call(n,t[i],i,t))return r}},function(t,e){t.exports=function(){return Math.floor(+new Date/9e5)}},function(t,e,n){var r=n(12);t.exports=function(t){var e,n;return e=t.headers&&t.headers.status,!(n=t&&!t.error&&200===e)&&t.headers&&t.headers.message&&r.publicError(t.headers.message),{success:n,resp:t}}},function(t,e,n){var r,i=n(29),o=0;function u(){r&&r.length===o&&(i.emitter.trigger(i.ALL_WIDGETS_AND_IMAGES_LOADED,r),r=null)}i.emitter.bind(i.ALL_WIDGETS_RENDER_END,function(t){r=t.widgets,u()}),t.exports={reportImagesLoadForAWidget:function(){o++,u()}}},,,,,,,,,function(t,e,n){var r,i=n(2),o=n(4),u=n(96),a=n(49),s=n(9),c=n(97),d=n(24),f=n(100),l=n(154),h=n(162),p=n(163),m=n(29),v=n(35);n(164),m.emitter.trigger(m.START),s.set("widgets.init",!0),a.set("init",!0),p(),r=new i,u.exposeReadyPromise(r.promise,a.base,"_e"),a.set("widgets",l),a.set("widgets.load",f.load),a.set("events",d),h(function(){v.load(),r.resolve(a.base),c.attachTo(o),f.loadPage()})},function(t,e){t.exports=navigator},function(t,e,n){var r=n(7);t.exports={exposeReadyPromise:function(t,e,n){e.ready=r(t.then,t),n&&Array.isArray(e[n])&&(e[n].forEach(r(t.then,t)),delete e[n])}}},function(t,e,n){var r=n(8),i=n(36),o=n(32),u=n(73),a=n(3);function s(t){var e,n,s;t.altKey||t.metaKey||t.shiftKey||(e=o.closest(function(t){return"A"===t.tagName||"AREA"===t.tagName},t.target))&&a.isIntentURL(e.href)&&(n=(n=(n=[s=e.href,"original_referer="+r.href].join(-1==s.indexOf("?")?"?":"&")).replace(/^http[:]/,"https:")).replace(/^\/\//,"https://"),u.open(n,e),i.preventDefault(t))}t.exports={attachTo:function(t){t.addEventListener("click",s,!1)}}},function(t,e,n){var r,i=n(1),o=n(99),u=n(36),a=n(32),s=n(21),c=n(3),d=n(23),f=n(0),l=i.screen.width,h=i.screen.height;function p(t,e){function n(t){return Math.round(t/2)}return t>e?{coordinate:0,size:e}:{coordinate:n(e)-n(t),size:t}}function m(t,e,n){var i,o;n=n||{},i=p((e=r.parse(e)).width,n.width||l),e.left=i.coordinate,e.width=i.size,o=p(e.height,n.height||h),e.top=o.coordinate,e.height=o.size,this.win=t,this.features=function(t){var e=[];return f.forIn(t,function(t,n){e.push(t+"="+n)}),e.join(",")}(e)}r=(new o).defaults({width:550,height:520,personalbar:"0",toolbar:"0",location:"1",scrollbars:"1",resizable:"1"}),m.prototype.open=function(t,e){var n=e&&"click"==e.type&&a.closest("a",e.target),r=e&&(e.altKey||e.metaKey||e.shiftKey),i=n&&(s.ios()||s.android());if(c.isTwitterURL(t))return r||i?this:(this.name="intent_"+d.generate(),this.popup=this.win.open(t,this.name,this.features),e&&u.preventDefault(e),this)},m.open=function(t,e,n){return new m(i,e).open(t,n)},t.exports=m},function(t,e,n){var r=n(5),i=n(0);function o(){this.assertions=[],this._defaults={}}o.prototype.assert=function(t,e){return this.assertions.push({fn:t,msg:e||"assertion failed"}),this},o.prototype.defaults=function(t){return this._defaults=t||this._defaults,this},o.prototype.require=function(t){var e=this;return(t=Array.isArray(t)?t:i.toRealArray(arguments)).forEach(function(t){e.assert(function(t){return function(e){return r.hasValue(e[t])}}(t),"required: "+t)}),this},o.prototype.parse=function(t){var e,n;if(e=i.aug({},this._defaults,t||{}),(n=this.assertions.reduce(function(t,n){return n.fn(e)||t.push(n.msg),t},[])).length>0)throw new Error(n.join("\n"));return e},t.exports=o},function(t,e,n){var r=n(4),i=n(52),o=n(6),u=n(22),a=n(53),s=n(33),c=n(9),d=n(39),f=n(24),l=n(5),h=n(0),p=n(35),m=n(117),v=n(29);function g(){var t=s.val("widgets:autoload")||!0;return!l.isFalseValue(t)&&(l.isTruthValue(t)?r.body:r.querySelectorAll(t))}function w(t){return p.getExperiments().then(function(e){return function(t,e){var n,i;return t=(t=t||r.body).length?h.toRealArray(t):[t],d.pause(),i=function(t,e){return t.reduce(function(t,n){return t.concat(m.reduce(function(t,r){return t.concat(r(n,e))},[]))},[])}(t,e),v.emitter.trigger(v.ALL_WIDGETS_RENDER_START,{widgets:i}),n=u.allResolved(i.map(function(t){return a.addWidget(t)})).then(function(t){f.trigger("loaded",{widgets:t}),t&&t.length&&v.emitter.trigger(v.ALL_WIDGETS_RENDER_END,{widgets:t})}),u.always(n,function(){d.resume()}),n}(t,i.isHorizonTweetEnabled(e))})}t.exports={load:w,loadPage:function(){var t=g();return!1===t?o.resolve():(c.set("widgets.loaded",!0),w(t))},_getPageLoadTarget:g}},function(t,e,n){var r=n(10),i=n(18),o=n(24),u=n(54),a=n(6),s=n(22);function c(t,e){this._widget=null,this._sandbox=null,this._hydrated=!1,this._insertedIntoDom=!1,this._Sandbox=t.Sandbox,this._factory=t.factory,this._widgetParams=t.parameters,this._resolve=e,this._className=t.className,this._renderedClassName=t.className+"-rendered",this._errorClassName=t.className+"-error",this._srcEl=t.srcEl,this._targetGlobal=function(t){return(t.srcEl||t.targetEl).ownerDocument.defaultView}(t),this._sandboxWrapperEl=t.options?t.options.sandboxWrapperEl:null,this._insertionStrategy=function(e){var n,r=t.srcEl,i=t.targetEl,o=t.options?t.options.sandboxWrapperEl:null;o?(o.appendChild(e),n=o):n=e,r?i.insertBefore(n,r):i.appendChild(n)}}c.fromRawTask=function(t){return new c(t.input,t.taskDoneDeferred.resolve)},c.prototype.initialize=function(){var t=this,e=new this._Sandbox(this._targetGlobal);return this._factory(this._widgetParams,e).then(function(n){return t._widget=n,t._sandbox=e,n._sandboxWrapperEl=t._sandboxWrapperEl,n})},c.prototype.insertIntoDom=function(){var t=this;return this._widget?this._sandbox.insert(this._widget.id,{class:[this._className,this._renderedClassName].join(" ")},null,this._insertionStrategy).then(function(){t._insertedIntoDom=!0}):a.reject(new Error("cannot insert widget into DOM before it is initialized"))},c.prototype.hydrate=function(){var t=this;return this._widget?this._widget.hydrate().then(function(){t._hydrated=!0}):a.reject(new Error("cannot hydrate widget before it is initialized"))},c.prototype.render=function(){var t=this;function e(e){return u(t._sandbox.sandboxEl).then(function(){return a.reject(e)})}return this._hydrated?this._insertedIntoDom?t._widget.render(t._sandbox).then(function(){return t._sandbox.onResize(function(){return t._widget.resize().then(function(){o.trigger("resize",{target:t._sandbox.sandboxEl})})}),t._widget.show()}).then(function(){return u(t._srcEl).then(function(){return t._sandbox.sandboxEl})},e):e(new Error("cannot render widget before DOM insertion")):e(new Error("cannot render widget before hydration"))},c.prototype.fail=function(){var t=this;return this._srcEl?s.always(i.write(function(){r.add(t._srcEl,t._errorClassName)}),function(){o.trigger("rendered",{target:t._srcEl}),t._resolve(t._srcEl)}):(t._resolve(),a.resolve())},c.prototype.success=function(){o.trigger("rendered",{target:this._sandbox.sandboxEl}),this._resolve(this._sandbox.sandboxEl)},t.exports=c},function(t,e,n){var r;!function(){"use strict";var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)};function o(){this.frames=[],this.lastId=0,this.raf=i,this.batch={hash:{},read:[],write:[],mode:null}}o.prototype.read=function(t,e){var n=this.add("read",t,e),r=n.id;return this.batch.read.push(n.id),"reading"===this.batch.mode||this.batch.scheduled?r:(this.scheduleBatch(),r)},o.prototype.write=function(t,e){var n=this.add("write",t,e),r=this.batch.mode,i=n.id;return this.batch.write.push(n.id),"writing"===r||"reading"===r||this.batch.scheduled?i:(this.scheduleBatch(),i)},o.prototype.defer=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=1);var r=this,i=t-1;return this.schedule(i,function(){r.run({fn:e,ctx:n})})},o.prototype.clear=function(t){if("function"==typeof t)return this.clearFrame(t);t=Number(t);var e=this.batch.hash[t];if(e){var n=this.batch[e.type],r=n.indexOf(t);delete this.batch.hash[t],~r&&n.splice(r,1)}},o.prototype.clearFrame=function(t){var e=this.frames.indexOf(t);~e&&this.frames.splice(e,1)},o.prototype.scheduleBatch=function(){var t=this;this.schedule(0,function(){t.batch.scheduled=!1,t.runBatch()}),this.batch.scheduled=!0},o.prototype.uniqueId=function(){return++this.lastId},o.prototype.flush=function(t){for(var e;e=t.shift();)this.run(this.batch.hash[e])},o.prototype.runBatch=function(){try{this.batch.mode="reading",this.flush(this.batch.read),this.batch.mode="writing",this.flush(this.batch.write),this.batch.mode=null}catch(t){throw this.runBatch(),t}},o.prototype.add=function(t,e,n){var r=this.uniqueId();return this.batch.hash[r]={id:r,fn:e,ctx:n,type:t}},o.prototype.run=function(t){var e=t.ctx||this,n=t.fn;if(delete this.batch.hash[t.id],!this.onError)return n.call(e);try{n.call(e)}catch(t){this.onError(t)}},o.prototype.loop=function(){var t,e=this,n=this.raf,r=!1;function i(){var t=e.frames.shift();e.frames.length?n(i):e.looping=!1,t&&t()}this.looping||(t=setTimeout(function(){r=!0,i()},500),n(function(){r||(clearTimeout(t),i())}),this.looping=!0)},o.prototype.schedule=function(t,e){return this.frames[t]?this.schedule(t+1,e):(this.loop(),this.frames[t]=e)};var u=new o;void 0!==t&&t.exports?t.exports=u:void 0===(r=function(){return u}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){var r=n(48).Promise;t.exports=r._asap},function(t,e,n){var r,i,o,u=n(4),a=n(1),s=n(30),c=n(20),d=n(2),f=n(6),l=n(55),h=n(34),p=n(0),m=n(25),v=n(9).get("scribeCallback"),g=Math.floor(1e3*Math.random())+"_",w="rufous-frame-"+g+"-",y="rufous-form-"+g+"-",b=0,E=!1,_=new d;function A(){var t=o.createElement("form"),e=o.createElement("input"),n=o.createElement("input");return b++,t.action=h.CLIENT_EVENT_ENDPOINT,t.method="POST",t.target=w+b,t.id=y+b,e.type="hidden",e.name="dnt",e.value=c.enabled(),n.type="hidden",n.name="tfw_redirect",n.value=h.RUFOUS_REDIRECT,t.appendChild(e),t.appendChild(n),t}function x(){var t=w+b;return s({id:t,name:t,width:0,height:0,border:0},{display:"none"},o.doc)}t.exports={clientEvent:function(t,e,n,i){(function(t,e){var n=!p.isObject(t),r=!!e&&!p.isObject(e);return n||r})(t,e)||(v&&v(arguments),_.promise.then(function(){!function(t,e){var n,i,u;p.isObject(t)&&p.isObject(e)&&(l.log(t,e),u=h.flattenClientEventPayload(t,e),(n=r.firstChild).value=+(+n.value||u.dnt||0),(i=o.createElement("input")).type="hidden",i.name="l",i.value=h.stringify(u),r.appendChild(i))}(h.formatClientEventNamespace(t),h.formatClientEventData(e,n,i))}))},flush:function(){return _.promise.then(function(){var t;return r.children.length<=2?f.reject():(t=f.all([o.doc.body.appendChild(r),o.doc.body.appendChild(i)]).then(function(t){var e=t[0],n=t[1];return n.addEventListener("load",function(){!function(t,e){return function(){var n=t.parentNode;n&&(n.removeChild(t),n.removeChild(e))}}(e,n)()}),e.submit(),t}),r=A(),i=x(),t)})},init:function(){return E?_.promise:((o=new m(a)).insert("rufous-sandbox",null,{display:"none"},function(t){u.body.appendChild(t)}).then(function(){o.setTitle("Twitter analytics iframe"),r=A(),i=x(),_.resolve([r,i])}),E=!0,_.promise)}}},function(t,e,n){var r=n(0);t.exports=function t(e){var n=[];return e.forEach(function(e){var i=r.isType("array",e)?t(e):[e];n=n.concat(i)}),n}},function(t,e){t.exports=function(t){return t.filter(function(e,n){return t.indexOf(e)===n})}},function(t,e,n){var r=n(41),i=n(0),o=n(109);function u(){r.apply(this,arguments)}u.prototype=Object.create(r.prototype),i.aug(u.prototype,{factory:o}),t.exports=u},function(t,e,n){var r=n(22),i=n(0),o=n(7);t.exports={before:function(t,e){return function(){var n,i=this,o=arguments;return n=e.apply(this,arguments),r.isPromise(n)?n.then(function(){return t.apply(i,o)}):t.apply(this,arguments)}},after:function(t,e){return function(){var n,i=this,o=arguments;function u(t,e){return r.isPromise(e)?e.then(function(){return t}):t}return n=t.apply(this,arguments),r.isPromise(n)?n.then(function(t){return u(t,e.apply(i,o))}):u(n,e.apply(this,arguments))}},around:function(t,e){return function(){var n=i.toRealArray(arguments);return n.unshift(o(t,this)),e.apply(this,n)}}}},function(t,e,n){var r=n(10),i=n(18),o=n(42),u=n(6),a=n(0);t.exports=function(){var t=o();function e(e){t.apply(this,arguments),Object.defineProperty(this,"targetGlobal",{value:e})}return e.prototype=Object.create(t.prototype),a.aug(e.prototype,{id:null,initialized:!1,width:0,height:0,sandboxEl:null,insert:function(){return u.reject()},onResize:function(){},addClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.add(e,t)})})},removeClass:function(t){var e=this.sandboxEl;return t=Array.isArray(t)?t:[t],i.write(function(){t.forEach(function(t){r.remove(e,t)})})},styleSelf:function(t){var e=this;return i.write(function(){a.forIn(t,function(t,n){e.sandboxEl.style[t]=n})})}}),e}},function(t,e,n){var r=n(4),i=n(10),o=n(18),u=n(56),a=n(26),s=n(57),c=n(45),d=n(46),f=n(30),l=n(12),h=n(47),p=n(2),m=n(6),v=n(0),g=n(9),w=n(23),y=n(7),b={allowfullscreen:"true"},E={position:"absolute",visibility:"hidden",display:"block",width:"0px",height:"0px",padding:"0",border:"none"},_={position:"static",visibility:"visible"};function A(t,e,n,r){return e=v.aug({id:t},b,e),n=v.aug({},E,n),f(e,n,r)}function x(t,e,n,i,u){var a=new p,s=w.generate(),c=A(t,e,n,u);return g.set(["sandbox",s],function(){var t=c.contentWindow.document;o.write(function(){t.write("<!DOCTYPE html><html><head></head><body></body></html>")}).then(function(){t.close(),a.resolve(c)})}),c.src=["javascript:",'document.write("");',"try { window.parent.document; }",'catch (e) { document.domain="'+r.domain+'"; }',"window.parent."+g.fullPath(["sandbox",s])+"();"].join(""),c.addEventListener("error",a.reject,!1),o.write(function(){i.parentNode.replaceChild(c,i)}),a.promise}t.exports=a.couple(n(58),function(t){t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this.win}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this.iframeEl}}),t.defineProperty("iframeEl",{get:function(){return this._iframe}}),t.defineProperty("rootEl",{get:function(){return this.doc&&this.doc.documentElement}}),t.defineProperty("widgetEl",{get:function(){return this.doc&&this.doc.body.firstElementChild}}),t.defineProperty("win",{get:function(){return this.iframeEl&&this.iframeEl.contentWindow}}),t.defineProperty("doc",{get:function(){return this.win&&this.win.document}}),t.define("_updateCachedDimensions",function(){var t=this;return o.read(function(){var e,n=h(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=h(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_setTargetToBlank",function(){var t=this.createElement("base");t.target="_blank",this.doc.head.appendChild(t)}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.define("setTitle",function(t){this.iframeEl.title=t}),t.override("createElement",function(t){return this.doc.createElement(t)}),t.override("createFragment",function(){return this.doc.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!u.getSelectedText(this.win)}),t.override("addRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this.rootEl;return t=Array.isArray(t)?t:[t],this.initialized?o.write(function(){t.forEach(function(t){i.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return i.present(this.rootEl,t)}),t.define("addStyleSheet",function(t,e){var n,r=new p;return this.initialized?((n=this.createElement("link")).type="text/css",n.rel="stylesheet",n.href=t,n.addEventListener("load",r.resolve,!1),n.addEventListener("error",r.reject,!1),o.write(y(e,null,n)).then(function(){return s(t).then(r.resolve,r.reject),r.promise})):m.reject(new Error("sandbox not initialized"))}),t.override("prependStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this.doc;return this.addStyleSheet(t,function(t){return e.head.appendChild(t)})}),t.define("addCss",function(t,e){var n;return c.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.doc.createTextNode(t)),o.write(y(e,null,n))):(l.devError("CSP enabled; cannot embed inline styles"),m.resolve())}),t.override("prependCss",function(t){var e=this.doc;return this.addCss(t,function(t){var n=e.head.firstElementChild;return n?e.head.insertBefore(t,n):e.head.appendChild(t)})}),t.override("appendCss",function(t){var e=this.doc;return this.addCss(t,function(t){return e.head.appendChild(t)})}),t.override("makeVisible",function(){var t=this;return this.styleSelf(_).then(function(){t._updateCachedDimensions()})}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this.widgetEl?m.reject(new Error("widget already injected")):o.write(function(){e.doc.body.appendChild(t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).height:0}),o.write(function(){e.sandboxEl.style.height=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.override("matchWidthToContent",function(){var t,e=this;return o.read(function(){t=e.widgetEl?h(e.widgetEl).width:0}),o.write(function(){e.sandboxEl.style.width=t+"px"}).then(function(){return e._updateCachedDimensions()})}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,r){var i=this,u=new p,a=this.targetGlobal.document,s=A(t,e,n,a);return o.write(y(r,null,s)),s.addEventListener("load",function(){(function(t){try{t.contentWindow.document}catch(t){return m.reject(t)}return m.resolve(t)})(s).then(null,y(x,null,t,e,n,s,a)).then(u.resolve,u.reject)},!1),s.addEventListener("error",u.reject,!1),u.promise.then(function(t){var e=d(i._didResize,50,i);return i._iframe=t,i.win.addEventListener("resize",e,!1),m.all([i._setTargetToBlank(),i.addRootClass("SandboxRoot"),i.prependCss(".SandboxRoot { display: none; }")])})}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){t.exports=function(){throw new Error("unimplemented method")}},function(t,e,n){var r=n(2),i=n(7),o=100,u=3e3;function a(t,e){this._inputsQueue=[],this._task=t,this._isPaused=!1,this._flushDelay=e&&e.flushDelay||o,this._pauseLength=e&&e.pauseLength||u,this._flushTimeout=void 0}a.prototype.add=function(t){var e=new r;return this._inputsQueue.push({input:t,taskDoneDeferred:e}),this._scheduleFlush(),e.promise},a.prototype._scheduleFlush=function(){this._isPaused||(clearTimeout(this._flushTimeout),this._flushTimeout=setTimeout(i(this._flush,this),this._flushDelay))},a.prototype._flush=function(){try{this._task.call(null,this._inputsQueue)}catch(t){this._inputsQueue.forEach(function(e){e.taskDoneDeferred.reject(t)})}this._inputsQueue=[],this._flushTimeout=void 0},a.prototype.pause=function(t){clearTimeout(this._flushTimeout),this._isPaused=!0,!t&&this._pauseLength&&setTimeout(i(this.resume,this),this._pauseLength)},a.prototype.resume=function(){this._isPaused=!1,this._scheduleFlush()},t.exports=a},function(t,e,n){var r,i=n(72),o=n(30),u=n(2),a=n(4),s=n(19),c=n(21),d=n(31),f=n(8),l=n(12),h=n(114),p=n(59),m=n(9),v=n(11),g=n(115),w=n(3),y=n(0),b=n(1),E=p(function(){return new u});function _(t){var e=t||{should_obtain_cookie_consent:!0,experiments:{}};return new g(e.should_obtain_cookie_consent,e.experiments)}t.exports={load:function(){var t,e,n,u;if(c.ie9()||c.ie10()||"http:"!==f.protocol&&"https:"!==f.protocol)return l.devError("Using default settings due to unsupported browser or protocol."),r=_(),void E().resolve();t={origin:f.origin},s.settings().indexOf("localhost")>-1&&(t.localSettings=!0),e=v.url(i.resourceBaseUrl+i.widgetIframeHtmlPath,t),n=function(t){var n;if(e.substr(0,t.origin.length)===t.origin&&w.isTwitterURL(t.origin))try{(n="string"==typeof t.data?d.parse(t.data):t.data).namespace===h.settings&&(r=_(n.settings),E().resolve())}catch(t){l.devError(t)}},b.addEventListener("message",n),u=o({src:e,title:"Twitter settings iframe"},{display:"none"}),a.body.appendChild(u)},settingsLoaded:function(){var t,e,n;return t=new u,e=m.get("experimentOverride"),E().promise.then(function(){e&&e.name&&e.assignment&&((n={})[e.name]={bucket:e.assignment},r.experiments=y.aug(r.experiments,n)),t.resolve(r)}).catch(function(e){t.reject(e)}),t.promise}}},function(t,e){t.exports={settings:"twttr.settings"}},function(t,e){t.exports=function(t,e){this.shouldObtainCookieConsent=t,this.experiments=e||{}}},function(t,e){t.exports=function(t){return t.split("").map(function(t){return t.charCodeAt(0).toString(16)}).join("")}},function(t,e,n){t.exports=[n(118),n(123),n(131),n(133),n(135),n(149),n(152)]},function(t,e,n){var r=n(11),i=n(5),o=n(0),u=n(13),a=n(14)(),s=n(60);t.exports=function(t){return a(t,"a.twitter-dm-button").map(function(t){return s(function(t){var e=t.getAttribute("data-show-screen-name"),n=u(t),a=t.getAttribute("href"),s=t.getAttribute("data-screen-name"),c=e?i.asBoolean(e):null,d=t.getAttribute("data-size"),f=r.decodeURL(a),l=f.recipient_id,h=t.getAttribute("data-text")||f.text,p=t.getAttribute("data-welcome-message-id")||f.welcomeMessageId;return o.aug(n,{screenName:s,showScreenName:c,size:d,text:h,userId:l,welcomeMessageId:p})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(0);t.exports=function t(e){var n;if(e)return n=e.lang||e.getAttribute("data-lang"),r.isType("string",n)?n:t(e.parentElement)}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(2).then(function(r){var o;try{o=n(86),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(122),i=n(1),o=n(10),u=n(36),a=n(18),s=n(56),c=n(26),d=n(57),f=n(45),l=n(47),h=n(7),p=n(46),m=n(6),v=n(0),g={position:"absolute",visibility:"hidden",display:"block",transform:"rotate(0deg)"},w={position:"static",visibility:"visible"};t.exports=c.couple(n(58),function(t){t.defineStatic("isSupported",function(){return!!i.HTMLElement.prototype.attachShadow&&f.inlineStyle()}),t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this._shadowHost}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this._shadowHost}}),t.define("_updateCachedDimensions",function(){var t=this;return a.read(function(){var e,n=l(t.sandboxEl);"visible"==t.sandboxEl.style.visibility?t._width=n.width:(e=l(t.sandboxEl.parentElement).width,t._width=Math.min(n.width,e)),t._height=n.height})}),t.define("_didResize",function(){var t=this,e=this._resizeHandlers.slice(0);return this._updateCachedDimensions().then(function(){e.forEach(function(e){e(t)})})}),t.override("createElement",function(t){return this.targetGlobal.document.createElement(t)}),t.override("createFragment",function(){return this.targetGlobal.document.createDocumentFragment()}),t.override("htmlToElement",function(t){var e;return(e=this.createElement("div")).innerHTML=t,e.firstElementChild}),t.override("hasSelectedText",function(){return!!s.getSelectedText(this.targetGlobal)}),t.override("addRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.add(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("removeRootClass",function(t){var e=this._shadowRootBody;return t=Array.isArray(t)?t:[t],this.initialized?a.write(function(){t.forEach(function(t){o.remove(e,t)})}):m.reject(new Error("sandbox not initialized"))}),t.override("hasRootClass",function(t){return o.present(this._shadowRootBody,t)}),t.override("addStyleSheet",function(t,e){return this.addCss('@import url("'+t+'");',e).then(function(){return d(t)})}),t.override("prependStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendStyleSheet",function(t){var e=this._shadowRoot;return this.addStyleSheet(t,function(t){return e.appendChild(t)})}),t.override("addCss",function(t,e){var n;return this.initialized?f.inlineStyle()?((n=this.createElement("style")).type="text/css",n.appendChild(this.targetGlobal.document.createTextNode(t)),a.write(h(e,null,n))):m.resolve():m.reject(new Error("sandbox not initialized"))}),t.override("prependCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){var n=e.firstElementChild;return n?e.insertBefore(t,n):e.appendChild(t)})}),t.override("appendCss",function(t){var e=this._shadowRoot;return this.addCss(t,function(t){return e.appendChild(t)})}),t.override("makeVisible",function(){return this.styleSelf(w)}),t.override("injectWidgetEl",function(t){var e=this;return this.initialized?this._shadowRootBody.firstElementChild?m.reject(new Error("widget already injected")):a.write(function(){e._shadowRootBody.appendChild(t)}).then(function(){return e._updateCachedDimensions()}).then(function(){var t=p(e._didResize,50,e);new r(e._shadowRootBody,t)}):m.reject(new Error("sandbox not initialized"))}),t.override("matchHeightToContent",function(){return m.resolve()}),t.override("matchWidthToContent",function(){return m.resolve()}),t.override("insert",function(t,e,n,r){var i=this.targetGlobal.document,o=this._shadowHost=i.createElement("twitter-widget"),s=this._shadowRoot=o.attachShadow({mode:"open"}),c=this._shadowRootBody=i.createElement("div");return v.forIn(e||{},function(t,e){o.setAttribute(t,e)}),o.id=t,s.appendChild(c),u.delegate(c,"click","A",function(t,e){e.hasAttribute("target")||e.setAttribute("target","_blank")}),m.all([this.styleSelf(g),this.addRootClass("SandboxRoot"),this.prependCss(".SandboxRoot { display: none; max-height: 10000px; }"),a.write(r.bind(null,o))])}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("initialize",function(){this._shadowHost=this._shadowRoot=this._shadowRootBody=null,this._width=this._height=0,this._resizeHandlers=[]}),t.after("styleSelf",function(){return this._updateCachedDimensions()})})},function(t,e){var n;(n=function(t,e){function r(t,e){if(t.resizedAttached){if(t.resizedAttached)return void t.resizedAttached.add(e)}else t.resizedAttached=new function(){var t,e;this.q=[],this.add=function(t){this.q.push(t)},this.call=function(){for(t=0,e=this.q.length;t<e;t++)this.q[t].call()}},t.resizedAttached.add(e);t.resizeSensor=document.createElement("div"),t.resizeSensor.className="resize-sensor";var n="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",r="position: absolute; left: 0; top: 0; transition: 0s;";t.resizeSensor.style.cssText=n,t.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+n+'"><div style="'+r+'"></div></div><div class="resize-sensor-shrink" style="'+n+'"><div style="'+r+' width: 200%; height: 200%"></div></div>',t.appendChild(t.resizeSensor),{fixed:1,absolute:1}[function(t,e){return t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue(e):t.style[e]}(t,"position")]||(t.style.position="relative");var i,o,u=t.resizeSensor.childNodes[0],a=u.childNodes[0],s=t.resizeSensor.childNodes[1],c=(s.childNodes[0],function(){a.style.width=u.offsetWidth+10+"px",a.style.height=u.offsetHeight+10+"px",u.scrollLeft=u.scrollWidth,u.scrollTop=u.scrollHeight,s.scrollLeft=s.scrollWidth,s.scrollTop=s.scrollHeight,i=t.offsetWidth,o=t.offsetHeight});c();var d=function(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener(e,n)},f=function(){t.offsetWidth==i&&t.offsetHeight==o||t.resizedAttached&&t.resizedAttached.call(),c()};d(u,"scroll",f),d(s,"scroll",f)}var i=Object.prototype.toString.call(t),o="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(o)for(var u=0,a=t.length;u<a;u++)r(t[u],e);else r(t,e);this.detach=function(){if(o)for(var e=0,r=t.length;e<r;e++)n.detach(t[e]);else n.detach(t)}}).detach=function(t){t.resizeSensor&&(t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached)},void 0!==t&&void 0!==t.exports?t.exports=n:window.ResizeSensor=n},function(t,e,n){var r=n(3),i=n(0),o=n(13),u=n(14)(),a=n(63),s=n(5);t.exports=function(t){return u(t,"a.twitter-follow-button").map(function(t){return a(function(t){var e=o(t),n={screenName:r.screenName(t.href),showScreenName:"false"!==t.getAttribute("data-show-screen-name"),showCount:"false"!==t.getAttribute("data-show-count"),size:t.getAttribute("data-size"),count:t.getAttribute("data-count"),preview:t.getAttribute("data-preview")};return i.forIn(n,function(t,n){var r=e[t];e[t]=s.hasValue(r)?r:n}),e.screenName=e.screenName||e.screen_name,e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(3).then(function(r){var o;try{o=n(87),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(18),i=n(126),o=n(59),u=n(30),a=n(2),s=n(6),c=n(7),d=n(0),f={position:"absolute",visibility:"hidden",width:"0px",height:"0px"},l={position:"static",visibility:"visible"},h={};i(function(t,e,n){var r=h[t];if(r)return e=e||1,n=n||1,r.styleSelf({width:e+"px",height:n+"px"}).then(function(){r.didResize()})}),t.exports=function(t){t.overrideProperty("id",{get:function(){return this.sandboxEl&&this.sandboxEl.id}}),t.overrideProperty("initialized",{get:function(){return!!this.iframeEl}}),t.overrideProperty("width",{get:function(){return this._width}}),t.overrideProperty("height",{get:function(){return this._height}}),t.overrideProperty("sandboxEl",{get:function(){return this.iframeEl}}),t.defineProperty("iframeEl",{get:function(){return this._iframe}}),t.define("updateCachedDimensions",function(){var t=this;return this.initialized?r.read(function(){t._width=t.sandboxEl.offsetWidth,t._height=t.sandboxEl.offsetHeight}):s.resolve()}),t.define("setTitle",function(t){this.iframeEl.title=t}),t.define("makeVisible",function(){return this.styleSelf(l)}),t.define("didResize",function(){var t=this,e=t._resizeHandlers.length>0;return this.updateCachedDimensions().then(function(){e&&t._resizeHandlers.forEach(function(e){e(t)})})}),t.define("loadDocument",function(t){var e=new a;return this.initialized?this.iframeEl.src?s.reject(new Error("widget already loaded")):(this.iframeEl.addEventListener("load",e.resolve,!1),this.iframeEl.addEventListener("error",e.reject,!1),this.iframeEl.src=t,e.promise):s.reject(new Error("sandbox not initialized"))}),t.after("initialize",function(){this._iframe=null,this._width=this._height=0,this._resizeHandlers=[]}),t.override("insert",function(t,e,n,i){var a=this;return e=d.aug({id:t},e),n=d.aug({},f,n),this._iframe=u(e,n),h[t]=this,this.onResize(o(function(){a.makeVisible()})),r.write(c(i,null,this._iframe))}),t.override("onResize",function(t){this._resizeHandlers.push(t)}),t.after("styleSelf",function(){return this.updateCachedDimensions()})}},function(t,e,n){var r=n(1),i=n(127),o=n(129),u=n(24),a=n(5),s=n(130);t.exports=function(t){function e(t,e){var n=s(this);u.trigger(t,{target:n,region:e,type:t,data:{}})}function n(e){var n=s(this),r=n&&n.id,i=a.asInt(e.width),o=a.asInt(e.height);r&&void 0!==i&&void 0!==o&&t(r,i,o)}(new i).attachReceiver(new o.Receiver(r,"twttr.button")).bind("twttr.private.trigger",e).bind("twttr.private.resizeButton",n),(new i).attachReceiver(new o.Receiver(r,"twttr.embed")).bind("twttr.private.trigger",e).bind("twttr.private.rendered",n).bind("twttr.private.resize",n)}},function(t,e,n){var r=n(31),i=n(128),o=n(0),u=n(6),a=n(22),s="2.0";function c(t){this.registry=t||{}}function d(t){var e,n;return e=o.isType("string",t),n=o.isType("number",t),e||n||null===t}function f(t,e){return{jsonrpc:s,id:d(t)?t:null,error:e}}c.prototype._invoke=function(t,e){var n,r,i;n=this.registry[t.method],r=t.params||[],r=o.isType("array",r)?r:[r];try{i=n.apply(e.source||null,r)}catch(t){i=u.reject(t.message)}return a.isPromise(i)?i:u.resolve(i)},c.prototype._processRequest=function(t,e){var n,r;return function(t){var e,n,r;return!!o.isObject(t)&&(e=t.jsonrpc===s,n=o.isType("string",t.method),r=!("id"in t)||d(t.id),e&&n&&r)}(t)?(n="params"in t&&(r=t.params,!o.isObject(r)||o.isType("function",r))?u.resolve(f(t.id,i.INVALID_PARAMS)):this.registry[t.method]?this._invoke(t,{source:e}).then(function(e){return n=t.id,{jsonrpc:s,id:n,result:e};var n},function(){return f(t.id,i.INTERNAL_ERROR)}):u.resolve(f(t.id,i.METHOD_NOT_FOUND)),null!=t.id?n:u.resolve()):u.resolve(f(t.id,i.INVALID_REQUEST))},c.prototype.attachReceiver=function(t){return t.attachTo(this),this},c.prototype.bind=function(t,e){return this.registry[t]=e,this},c.prototype.receive=function(t,e){var n,a,s,c=this;try{s=t,t=o.isType("string",s)?r.parse(s):s}catch(t){return u.resolve(f(null,i.PARSE_ERROR))}return e=e||null,a=((n=o.isType("array",t))?t:[t]).map(function(t){return c._processRequest(t,e)}),n?function(t){return u.all(t).then(function(t){return(t=t.filter(function(t){return void 0!==t})).length?t:void 0})}(a):a[0]},t.exports=c},function(t){t.exports={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INTERNAL_ERROR:{code:-32603,message:"Internal error"}}},function(t,e,n){var r=n(8),i=n(1),o=n(31),u=n(2),a=n(21),s=n(0),c=n(3),d=n(7),f=a.ie9();function l(t,e,n){var r;t&&t.postMessage&&(f?r=(n||"")+o.stringify(e):n?(r={})[n]=e:r=e,t.postMessage(r,"*"))}function h(t){return s.isType("string",t)?t:"JSONRPC"}function p(t,e){return e?s.isType("string",t)&&0===t.indexOf(e)?t.substring(e.length):t&&t[e]?t[e]:void 0:t}function m(t,e){var n=t.document;this.filter=h(e),this.server=null,this.isTwitterFrame=c.isTwitterURL(n.location.href),t.addEventListener("message",d(this._onMessage,this),!1)}function v(t,e){this.pending={},this.target=t,this.isTwitterHost=c.isTwitterURL(r.href),this.filter=h(e),i.addEventListener("message",d(this._onMessage,this),!1)}s.aug(m.prototype,{_onMessage:function(t){var e,n=this;this.server&&(this.isTwitterFrame&&!c.isTwitterURL(t.origin)||(e=p(t.data,this.filter))&&this.server.receive(e,t.source).then(function(e){e&&l(t.source,e,n.filter)}))},attachTo:function(t){this.server=t},detach:function(){this.server=null}}),s.aug(v.prototype,{_processResponse:function(t){var e=this.pending[t.id];e&&(e.resolve(t),delete this.pending[t.id])},_onMessage:function(t){var e;if((!this.isTwitterHost||c.isTwitterURL(t.origin))&&(e=p(t.data,this.filter))){if(s.isType("string",e))try{e=o.parse(e)}catch(t){return}(e=s.isType("array",e)?e:[e]).forEach(d(this._processResponse,this))}},send:function(t){var e=new u;return t.id?this.pending[t.id]=e:e.resolve(),l(this.target,t,this.filter),e.promise}}),t.exports={Receiver:m,Dispatcher:v,_stringifyPayload:function(t){return arguments.length>0&&(f=!!t),f}}},function(t,e,n){var r=n(4);t.exports=function(t){for(var e,n=r.getElementsByTagName("iframe"),i=0;n[i];i++)if((e=n[i]).contentWindow===t)return e}},function(t,e,n){var r=n(5),i=n(0),o=n(3),u=n(13),a=n(14)(),s=n(64);t.exports=function(t){return a(t,"a.twitter-moment").map(function(t){return s(function(t){var e=u(t),n={momentId:o.momentId(t.href),chrome:t.getAttribute("data-chrome"),limit:t.getAttribute("data-limit")};return i.forIn(n,function(t,n){var i=e[t];e[t]=r.hasValue(i)?i:n}),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(4)]).then(function(r){var o;try{o=n(88),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0),i=n(13),o=n(14)(),u=n(65),a=/^https?:\/\/(?:www\.)?(?:periscope|pscp)\.tv\/@?([a-zA-Z0-9_]+)\/?$/i;t.exports=function(t){return o(t,"a.periscope-on-air").map(function(t){return u(function(t){var e=i(t),n=t.getAttribute("href"),o=t.getAttribute("data-size"),u=a.exec(n)[1];return r.aug(e,{username:u,size:o})}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(5).then(function(r){var o;try{o=n(89),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(5),i=n(0),o=n(66),u=n(13),a=n(14)(),s=n(67),c=n(3),d=n(12);t.exports=function(t){return a(t,"a.twitter-timeline,div.twitter-timeline,a.twitter-grid").map(function(t){return s(function(t){var e=u(t),n=t.getAttribute("data-show-replies"),a={isPreconfigured:!!t.getAttribute("data-widget-id"),chrome:t.getAttribute("data-chrome"),tweetLimit:t.getAttribute("data-tweet-limit")||t.getAttribute("data-limit"),ariaLive:t.getAttribute("data-aria-polite"),theme:t.getAttribute("data-theme"),linkColor:t.getAttribute("data-link-color"),borderColor:t.getAttribute("data-border-color"),showReplies:n?r.asBoolean(n):null,profileScreenName:t.getAttribute("data-screen-name"),profileUserId:t.getAttribute("data-user-id"),favoritesScreenName:t.getAttribute("data-favorites-screen-name"),favoritesUserId:t.getAttribute("data-favorites-user-id"),likesScreenName:t.getAttribute("data-likes-screen-name"),likesUserId:t.getAttribute("data-likes-user-id"),listOwnerScreenName:t.getAttribute("data-list-owner-screen-name"),listOwnerUserId:t.getAttribute("data-list-owner-id"),listId:t.getAttribute("data-list-id"),listSlug:t.getAttribute("data-list-slug"),customTimelineId:t.getAttribute("data-custom-timeline-id"),staticContent:t.getAttribute("data-static-content"),url:t.href};return a.isPreconfigured&&(c.isSearchUrl(a.url)?d.publicError("Embedded Search timelines have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",t):d.publicLog("You may have been affected by an update to settings in embedded timelines. See https://twittercommunity.com/t/deprecating-widget-settings/102295.",t)),"twitter-grid"===t.className&&d.publicLog("Embedded grids have been deprecated and will now render as timelines. Please update your embed code to use the twitter-timeline class. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564.",t),(a=i.aug(a,e)).dataSource=o(a),a.id=a.dataSource&&a.dataSource.id,a}(t),t.parentNode,t)})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(139)])},function(t,e,n){var r=n(0),i=n(138);t.exports=function(t){return"en"===t||r.contains(i,t)}},function(t,e){t.exports=["hi","zh-cn","fr","zh-tw","msa","fil","fi","sv","pl","ja","ko","de","it","pt","es","ru","id","tr","da","no","nl","hu","fa","ar","ur","he","th","cs","uk","vi","ro","bn","el","en-gb","gu","kn","mr","ta","bg","ca","hr","sr","sk"]},function(t,e,n){var r=n(3),i=n(0),o=n(19);function u(t,e){return r.collectionId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){return"collection:"+u(this.params.url,this.params.id)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["collection"])}}),t.around("queryParams",function(t){return i.aug(t(),{collection_id:u(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!u(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(141)])},function(t,e,n){var r=n(3),i=n(0),o=n(19);function u(t,e){return r.eventId(t)||e}t.exports=function(t){t.params({id:{},url:{}}),t.overrideProperty("id",{get:function(){return"event:"+u(this.params.url,this.params.id)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["event"])}}),t.around("queryParams",function(t){return i.aug(t(),{event_id:u(this.params.url,this.params.id)})}),t.before("initialize",function(){if(!u(this.params.url,this.params.id))throw new Error("one of url or id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(143)])},function(t,e,n){var r=n(3),i=n(0),o=n(19);function u(t){return r.likesScreenName(t.url)||t.screenName}t.exports=function(t){t.params({screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){return"likes:"+(u(this.params)||this.params.userId)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["likes"])}}),t.define("_getLikesQueryParam",function(){var t=u(this.params);return t?{screen_name:t}:{user_id:this.params.userId}}),t.around("queryParams",function(t){return i.aug(t(),this._getLikesQueryParam())}),t.before("initialize",function(){if(!u(this.params)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(145)])},function(t,e,n){var r=n(3),i=n(0),o=n(19),u="list:";function a(t){var e=r.listScreenNameAndSlug(t.url)||t;return i.compact({screen_name:e.ownerScreenName,user_id:e.ownerUserId,list_slug:e.slug})}t.exports=function(t){t.params({id:{},ownerScreenName:{},ownerUserId:{},slug:{},url:{}}),t.overrideProperty("id",{get:function(){var t,e,n;return this.params.id?u+this.params.id:(e=(t=a(this.params))&&t.list_slug.replace(/-/g,"_"),n=t&&(t.screen_name||t.user_id),u+(n+":")+e)}}),t.overrideProperty("endpoint",{get:function(){return o.timeline(["list"])}}),t.define("_getListQueryParam",function(){return this.params.id?{list_id:this.params.id}:a(this.params)}),t.around("queryParams",function(t){return i.aug(t(),this._getListQueryParam())}),t.before("initialize",function(){var t=a(this.params);if(i.isEmptyObject(t)&&!this.params.id)throw new Error("qualified slug or list id required")})}},function(t,e,n){var r=n(27);t.exports=r.build([n(28),n(147)])},function(t,e,n){var r=n(3),i=n(5),o=n(0),u=n(19);function a(t,e){return r.screenName(t)||e}t.exports=function(t){t.params({showReplies:{fallback:!1,transform:i.asBoolean},screenName:{},userId:{},url:{}}),t.overrideProperty("id",{get:function(){return"profile:"+(a(this.params.url,this.params.screenName)||this.params.userId)}}),t.overrideProperty("endpoint",{get:function(){return u.timeline(["profile"])}}),t.define("_getProfileQueryParam",function(){var t=a(this.params.url,this.params.screenName),e=t?{screen_name:t}:{user_id:this.params.userId};return o.aug(e,{with_replies:this.params.showReplies?"true":"false"})}),t.around("queryParams",function(t){return o.aug(t(),this._getProfileQueryParam())}),t.before("initialize",function(){if(!a(this.params.url,this.params.screenName)&&!this.params.userId)throw new Error("screen name or user id is required")})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(6)]).then(function(r){var o;try{o=n(90),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(3),o=n(0),u=n(13),a=n(14)(),s=n(68),c=/\btw-align-(left|right|center)\b/;t.exports=function(t,e){return a(t,"blockquote.twitter-tweet, blockquote.twitter-video").map(function(t){return s(function(t){var e=u(t),n=t.getElementsByTagName("A"),a=n&&n[n.length-1],s=a&&i.status(a.href),d=t.getAttribute("data-conversation"),f="none"==d||"hidden"==d||r.present(t,"tw-hide-thread"),l=t.getAttribute("data-cards"),h="none"==l||"hidden"==l||r.present(t,"tw-hide-media"),p=t.getAttribute("data-align")||t.getAttribute("align"),m=t.getAttribute("data-link-color"),v=t.getAttribute("data-theme");return!p&&c.test(t.className)&&(p=RegExp.$1),o.aug(e,{tweetId:s,hideThread:f,hideCard:h,align:p,linkColor:m,theme:v,id:s})}(t),t.parentNode,t,e)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(7)]).then(function(r){var o;try{o=n(91),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return Promise.all([n.e(0),n.e(7)]).then(function(r){var o;try{o=n(92),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(10),i=n(0),o=n(13),u=n(14)(),a=n(69),s=n(5);t.exports=function(t){return u(t,"a.twitter-share-button, a.twitter-mention-button, a.twitter-hashtag-button").map(function(t){return a(function(t){var e=o(t),n={screenName:t.getAttribute("data-button-screen-name"),text:t.getAttribute("data-text"),type:t.getAttribute("data-type"),size:t.getAttribute("data-size"),url:t.getAttribute("data-url"),hashtags:t.getAttribute("data-hashtags"),via:t.getAttribute("data-via"),buttonHashtag:t.getAttribute("data-button-hashtag")};return i.forIn(n,function(t,n){var r=e[t];e[t]=s.hasValue(r)?r:n}),e.screenName=e.screenName||e.screen_name,e.buttonHashtag=e.buttonHashtag||e.button_hashtag||e.hashtag,r.present(t,"twitter-hashtag-button")&&(e.type="hashtag"),r.present(t,"twitter-mention-button")&&(e.type="mention"),e}(t),t.parentNode,t)})}},function(t,e,n){var r=n(2);t.exports=function(t,e){var i=new r;return n.e(3).then(function(r){var o;try{o=n(93),i.resolve(new o(t,e))}catch(t){i.reject(t)}}.bind(null,n)).catch(function(t){i.reject(t)}),i.promise}},function(t,e,n){var r=n(0);t.exports=r.aug({},n(155),n(156),n(157),n(158),n(159),n(160),n(161))},function(t,e,n){var r=n(60),i=n(17)(["userId"],{},r);t.exports={createDMButton:i}},function(t,e,n){var r=n(63),i=n(17)(["screenName"],{},r);t.exports={createFollowButton:i}},function(t,e,n){var r=n(64),i=n(17)(["momentId"],{},r);t.exports={createMoment:i}},function(t,e,n){var r=n(65),i=n(17)(["username"],{},r);t.exports={createPeriscopeOnAirButton:i}},function(t,e,n){var r=n(8),i=n(12),o=n(3),u=n(0),a=n(5),s=n(66),c=n(67),d=n(17)([],{},c),f=n(6),l={createTimeline:h,createGridFromCollection:function(t){var e=u.toRealArray(arguments).slice(1),n={sourceType:"collection",id:t};return e.unshift(n),i.publicLog("Embedded grids have been deprecated. Please use twttr.widgets.createTimeline instead. More info: https://twittercommunity.com/t/update-on-the-embedded-grid-display-type/119564."),h.apply(this,e)}};function h(t){var e,n=u.toRealArray(arguments).slice(1);return a.isString(t)||a.isNumber(t)?f.reject("Embedded timelines with widget settings have been deprecated. See https://twittercommunity.com/t/deprecating-widget-settings/102295."):u.isObject(t)?(t=t||{},n.forEach(function(t){u.isType("object",t)&&function(t){t.ariaLive=t.ariaPolite}(e=t)}),e||(e={},n.push(e)),t.lang=e.lang,t.tweetLimit=e.tweetLimit,t.showReplies=e.showReplies,e.dataSource=s(t),d.apply(this,n)):f.reject("data source must be an object.")}o.isTwitterURL(r.href)&&(l.createTimelinePreview=function(t,e,n){var r={previewParams:t,useLegacyDefaults:!0,isPreviewTimeline:!0};return r.dataSource=s(r),d(e,r,n)}),t.exports=l},function(t,e,n){var r,i=n(0),o=n(68),u=n(17),a=(r=u(["tweetId"],{},o),function(){return i.toRealArray(arguments).slice(1).forEach(function(t){i.isType("object",t)&&(t.hideCard="none"==t.cards||"hidden"==t.cards,t.hideThread="none"==t.conversation||"hidden"==t.conversation)}),r.apply(this,arguments)});t.exports={createTweet:a,createTweetEmbed:a,createVideo:a}},function(t,e,n){var r=n(0),i=n(69),o=n(17),u=o(["url"],{type:"share"},i),a=o(["buttonHashtag"],{type:"hashtag"},i),s=o(["screenName"],{type:"mention"},i);function c(t){return function(){return r.toRealArray(arguments).slice(1).forEach(function(t){r.isType("object",t)&&(t.screenName=t.screenName||t.screen_name,t.buttonHashtag=t.buttonHashtag||t.button_hashtag||t.hashtag)}),t.apply(this,arguments)}}t.exports={createShareButton:c(u),createHashtagButton:c(a),createMentionButton:c(s)}},function(t,e,n){var r,i,o,u=n(4),a=n(1),s=0,c=[],d=u.createElement("a");function f(){var t,e;for(s=1,t=0,e=c.length;t<e;t++)c[t]()}/^loade|c/.test(u.readyState)&&(s=1),u.addEventListener&&u.addEventListener("DOMContentLoaded",i=function(){u.removeEventListener("DOMContentLoaded",i,!1),f()},!1),d.doScroll&&u.attachEvent("onreadystatechange",r=function(){/^c/.test(u.readyState)&&(u.detachEvent("onreadystatechange",r),f())}),o=d.doScroll?function(t){a.self!=a.top?s?t():c.push(t):function(){try{d.doScroll("left")}catch(e){return setTimeout(function(){o(t)},50)}t()}()}:function(t){s?t():c.push(t)},t.exports=o},function(t,e,n){var r=n(44),i=n(9);t.exports=function(){i.set("buildVersion",r.version)}},function(t,e,n){n(165),n(85),n(168)},function(t,e,n){var r=n(166),i=n(29),o=n(70),u=new r,a=function(t){t.widgets&&1===t.widgets.length&&(u.start(),i.emitter.unbind(i.ALL_WIDGETS_RENDER_START,a))},s=function(t){var e;t.widgets&&1===t.widgets.length&&(e=t.widgets[0],u.end(),e.dataset&&e.dataset.tweetId&&o({duration:u.duration(),namespace:{element:"tweet",action:"render"},widgetIds:[e.dataset.tweetId]})),i.emitter.unbind(i.ALL_WIDGETS_RENDER_END,s)};i.emitter.bind(i.ALL_WIDGETS_RENDER_START,a),i.emitter.bind(i.ALL_WIDGETS_RENDER_END,s)},function(t,e,n){var r=n(167);function i(){}i.prototype.start=function(){this._startTime=r()},i.prototype.end=function(){this._duration=r()-this._startTime},i.prototype.duration=function(){return this._duration},t.exports=i},function(t,e,n){var r=n(1);t.exports=function(){return r.performance&&r.performance.now?r.performance.now():Date.now()}},function(t,e,n){var r=n(29),i=n(70),o=n(169),u=n(3),a=n(1),s=n(0),c=n(21),d=n(62);function f(t){return t.performance.getEntriesByType("resource").filter(function(t){return u.isTwimgURL(t.name)||u.isTwitterURL(t.name)}).reduce(function(t,e){return t[e.name]=e.duration,t},{})}r.emitter.bind(r.ALL_WIDGETS_AND_IMAGES_LOADED,function(t){var e,n,r=[];c.hasPerformanceInformation()&&(e=f(a),d.isSupported()||(r=function(t){return t.reduce(function(t,e){return s.aug(t,f(e.contentDocument.defaultView))},{})}(t)),n=s.aug({},e,r),Object.keys(o).forEach(function(t){!function(t,e,n){var r=Object.keys(t).reduce(function(e,r){return n(r)?e+t[r]:e},0);i({duration:r,namespace:{element:e,action:"resource"}})}(n,t,o[t])}))})},function(t,e,n){var r=n(3),i={all:function(){return!0},image:function(t){return r.isTwimgURL(t)},settings:function(t){return r.isSettingsURL(t)},widget_iframe:function(t){return r.isWidgetIframeURL(t)}};t.exports=i}]))))}),t(".ctf").each(function(){var e=t(this),i=parseInt(e.attr("data-ctfneeded"));e.width()<=480&&e.addClass("ctf-narrow"),e.width()<=320&&e.addClass("ctf-super-narrow"),n(e),setTimeout(function(){if(i>0){var t=e.find(".ctf-more"),n=e.find(".ctf-item").last().attr("id"),o=e.find(".ctf-item").length;r(n,e.attr("data-ctfshortcode"),e,t,i,o)}},500),e.find(".ctf-more").on("click",function(){var n=t(this),i=e.find(".ctf-item").last().attr("id"),o=e.find(".ctf-item").length;r(i,e.attr("data-ctfshortcode"),e,n,0,o)}),e.find(".ctf-author-box-link p:empty").remove()})}(jQuery);
|
views/admin/customize.php
CHANGED
@@ -18,6 +18,8 @@ settings_errors(); ?>
|
|
18 |
<input type="hidden" name="ctf_options[tab]" value="customize" />
|
19 |
<?php settings_fields( 'ctf_options' ); // matches the options name ?>
|
20 |
<?php do_settings_sections( 'ctf_options_general' ); // matches the section name ?>
|
|
|
|
|
21 |
<hr>
|
22 |
<a id="showhide"></a>
|
23 |
<?php do_settings_sections( 'ctf_options_showandhide' ); // matches the section name ?>
|
18 |
<input type="hidden" name="ctf_options[tab]" value="customize" />
|
19 |
<?php settings_fields( 'ctf_options' ); // matches the options name ?>
|
20 |
<?php do_settings_sections( 'ctf_options_general' ); // matches the section name ?>
|
21 |
+
<hr>
|
22 |
+
<?php do_settings_sections( 'ctf_options_layout' ); // matches the section name ?>
|
23 |
<hr>
|
24 |
<a id="showhide"></a>
|
25 |
<?php do_settings_sections( 'ctf_options_showandhide' ); // matches the section name ?>
|
views/admin/display.php
CHANGED
@@ -67,6 +67,11 @@
|
|
67 |
</tr>
|
68 |
|
69 |
<tr class="ctf_table_header"><td colspan=3><?php _e("Customize Options", 'custom-twitter-feeds' ); ?></td></tr>
|
|
|
|
|
|
|
|
|
|
|
70 |
<tr>
|
71 |
<td>class</td>
|
72 |
<td><?php _e( "A custom CSS class added to the feed", 'custom-twitter-feeds' ); ?></td>
|
@@ -86,7 +91,7 @@
|
|
86 |
<tr>
|
87 |
<td>include</td>
|
88 |
<td><?php _e( "Parts of the Tweet to include in the feed", 'custom-twitter-feeds' ); ?></td>
|
89 |
-
<td><code>[custom-twitter-feeds include="author,date,text,avatar"]</code></td>
|
90 |
</tr>
|
91 |
<tr>
|
92 |
<td>exclude</td>
|
@@ -183,6 +188,16 @@
|
|
183 |
<td><?php _e( "Weight of author info font inherit, bold, or normal", 'custom-twitter-feeds' ); ?></td>
|
184 |
<td><code>[custom-twitter-feeds authortextweight="bold"]</code></td>
|
185 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
<tr>
|
187 |
<td>datetextsize</td>
|
188 |
<td><?php _e( "Size of date info font in pixels", 'custom-twitter-feeds' ); ?></td>
|
67 |
</tr>
|
68 |
|
69 |
<tr class="ctf_table_header"><td colspan=3><?php _e("Customize Options", 'custom-twitter-feeds' ); ?></td></tr>
|
70 |
+
<tr class="ctf_pro">
|
71 |
+
<td>layout</td>
|
72 |
+
<td><?php _e("How posts are arranged visually in the feed.", 'custom-twitter-feeds' ); ?> 'list', 'carousel', or 'masonry'</td>
|
73 |
+
<td><code>[instagram-feed layout=carousel]</code></td>
|
74 |
+
</tr>
|
75 |
<tr>
|
76 |
<td>class</td>
|
77 |
<td><?php _e( "A custom CSS class added to the feed", 'custom-twitter-feeds' ); ?></td>
|
91 |
<tr>
|
92 |
<td>include</td>
|
93 |
<td><?php _e( "Parts of the Tweet to include in the feed", 'custom-twitter-feeds' ); ?></td>
|
94 |
+
<td><code>[custom-twitter-feeds include="author,date,text,avatar,logo"]</code></td>
|
95 |
</tr>
|
96 |
<tr>
|
97 |
<td>exclude</td>
|
188 |
<td><?php _e( "Weight of author info font inherit, bold, or normal", 'custom-twitter-feeds' ); ?></td>
|
189 |
<td><code>[custom-twitter-feeds authortextweight="bold"]</code></td>
|
190 |
</tr>
|
191 |
+
<tr>
|
192 |
+
<td>logosize</td>
|
193 |
+
<td><?php _e( "Size of Twitter logo in pixels", 'custom-twitter-feeds' ); ?></td>
|
194 |
+
<td><code>[custom-twitter-feeds logosize="16"]</code></td>
|
195 |
+
</tr>
|
196 |
+
<tr>
|
197 |
+
<td>logocolor</td>
|
198 |
+
<td><?php _e( "Color of Twitter logo. Any color hex code.", 'custom-twitter-feeds' ); ?></td>
|
199 |
+
<td><code>[custom-twitter-feeds logocolor="0ff"]</code></td>
|
200 |
+
</tr>
|
201 |
<tr>
|
202 |
<td>datetextsize</td>
|
203 |
<td><?php _e( "Size of date info font in pixels", 'custom-twitter-feeds' ); ?></td>
|