ThirstyAffiliates Affiliate Link Manager - Version 3.2.0

Version Description

  • Feature: Feature to determine what pages the current affiliate link is added to
  • Feature: Hide currently attached images from the media box to avoid inserting duplicate image to a thirsty link
  • Feature: Ability to set some link appearance settings on a per category level
  • Feature: Add ta link picker on Text Editor Widget
  • Feature: Ability to add link categories from the Quick Add form of the TA link picker
  • Feature: Polylang Support
  • Feature: WPML Support
  • Improvement: Allow sorting of thirsty links on cpt listing by link category and other headers
  • Improvement: Make settings page into a vertical orientation
  • Improvement: Set default redirect type to 302
  • Improvement: Tidy up code
  • Bug Fix: Console errors on inserting image into a thirsty link
  • Bug Fix: When editing the cloaked url, the final "/" character is not added back
  • Bug Fix: Last 7 days link performance report graph is not accurate
  • Bug Fix: Fix php notices on the log
Download this release

Release Info

Developer jkohlbach
Plugin Icon 128x128 ThirstyAffiliates Affiliate Link Manager
Version 3.2.0
Comparing to
See all releases

Code changes from version 3.1.3 to 3.2.0

Helpers/Helper_Functions.php CHANGED
@@ -225,7 +225,7 @@ class Helper_Functions {
225
  */
226
  public function check_if_valid_save_post_action( $post_id , $post_type ) {
227
 
228
- if ( get_post_type() != $post_type || empty( $_POST ) || wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) || !current_user_can( 'edit_page' , $post_id ) )
229
  return false;
230
  else
231
  return true;
@@ -267,7 +267,7 @@ class Helper_Functions {
267
  if ( $link_prefix === 'custom' )
268
  $link_prefix = get_option( 'ta_link_prefix_custom' , 'recommends' );
269
 
270
- return $link_prefix;
271
  }
272
 
273
  /**
@@ -333,6 +333,8 @@ class Helper_Functions {
333
  /**
334
  * Check if affiliate link needs to be uncloaked.
335
  *
 
 
336
  * @since 3.0.0
337
  * @access public
338
  *
@@ -341,30 +343,7 @@ class Helper_Functions {
341
  */
342
  public function is_uncloak_link( $thirstylink ) {
343
 
344
- // check if global setting for uncloak link is enabled.
345
- if ( get_option( 'ta_uncloak_link_per_link' ) !== 'yes' )
346
- return;
347
-
348
- // return (true) when uncloak link is enabled on a per post basis.
349
- if ( $thirstylink->get_prop( 'uncloak_link' ) == 'yes' )
350
- return true;
351
- elseif ( $thirstylink->get_prop( 'uncloak_link' ) == 'no' )
352
- return;
353
-
354
- $uncloak_categories = maybe_unserialize( get_option( 'ta_category_to_uncloak' ) );
355
- $link_categories = $thirstylink->get_prop( 'categories' );
356
-
357
- // skip when there are no categories to uncloak (false)
358
- if ( empty( $uncloak_categories ) || empty( $link_categories ) )
359
- return;
360
-
361
- foreach ( $link_categories as $category ) {
362
-
363
- if ( in_array( $category->term_id , $uncloak_categories ) )
364
- return true;
365
- }
366
-
367
- return;
368
  }
369
 
370
  /**
@@ -471,4 +450,46 @@ class Helper_Functions {
471
  return $options;
472
  }
473
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  }
225
  */
226
  public function check_if_valid_save_post_action( $post_id , $post_type ) {
227
 
228
+ if ( get_post_type() != $post_type || empty( $_POST ) || wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) || !current_user_can( 'edit_page' , $post_id ) )
229
  return false;
230
  else
231
  return true;
267
  if ( $link_prefix === 'custom' )
268
  $link_prefix = get_option( 'ta_link_prefix_custom' , 'recommends' );
269
 
270
+ return $link_prefix ? $link_prefix : 'recommends';
271
  }
272
 
273
  /**
333
  /**
334
  * Check if affiliate link needs to be uncloaked.
335
  *
336
+ * @deprecated 3.2.0
337
+ *
338
  * @since 3.0.0
339
  * @access public
340
  *
343
  */
344
  public function is_uncloak_link( $thirstylink ) {
345
 
346
+ return $thirstylink->is( 'uncloak_link' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  }
348
 
349
  /**
450
  return $options;
451
  }
452
 
453
+ /**
454
+ * Set default term when affiliate link is saved.
455
+ *
456
+ * @since 3.2.0
457
+ * @access public
458
+ *
459
+ * @param int $post_id Affiliate link post ID.
460
+ */
461
+ public function save_default_affiliate_link_category( $post_id ) {
462
+
463
+ $default_category = Plugin_Constants::DEFAULT_LINK_CATEGORY;
464
+ $taxonomy_slug = Plugin_Constants::AFFILIATE_LINKS_TAX;
465
+
466
+ if ( get_option( 'ta_disable_cat_auto_select' ) == 'yes' || get_the_terms( $post_id , $taxonomy_slug ) )
467
+ return;
468
+
469
+ // create the default term if it doesn't exist
470
+ if ( ! term_exists( $default_category , $taxonomy_slug ) )
471
+ wp_insert_term( $default_category , $taxonomy_slug );
472
+
473
+ $default_term = get_term_by( 'name' , $default_category , $taxonomy_slug );
474
+
475
+ wp_set_post_terms( $post_id , $default_term->term_id , $taxonomy_slug );
476
+ }
477
+
478
+ /**
479
+ * This function is an alias for WP get_option(), but will return the default value if option value is empty or invalid.
480
+ *
481
+ * @since 3.2.0
482
+ * @access public
483
+ *
484
+ * @param string $option_name Name of the option of value to fetch.
485
+ * @param mixed $default_value Defaut option value.
486
+ * @return mixed Option value.
487
+ */
488
+ public function get_option( $option_name , $default_value = '' ) {
489
+
490
+ $option_value = get_option( $option_name , $default_value );
491
+
492
+ return ( gettype( $option_value ) === gettype( $default_value ) && $option_value ) ? $option_value : $default_value;
493
+ }
494
+
495
  }
Helpers/Plugin_Constants.php CHANGED
@@ -27,7 +27,7 @@ class Plugin_Constants {
27
  // Plugin configuration constants
28
  const TOKEN = 'ta';
29
  const INSTALLED_VERSION = 'ta_installed_version';
30
- const VERSION = '3.1.3';
31
  const TEXT_DOMAIN = 'thirstyaffiliates';
32
  const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
33
  const META_DATA_PREFIX = '_ta_';
27
  // Plugin configuration constants
28
  const TOKEN = 'ta';
29
  const INSTALLED_VERSION = 'ta_installed_version';
30
+ const VERSION = '3.2.0';
31
  const TEXT_DOMAIN = 'thirstyaffiliates';
32
  const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
33
  const META_DATA_PREFIX = '_ta_';
Models/Affiliate_Link.php CHANGED
@@ -76,23 +76,25 @@ class Affiliate_Link {
76
  * @var array
77
  */
78
  protected $default_data = array(
79
- 'name' => '',
80
- 'slug' => '',
81
- 'date_created' => '',
82
- 'date_modified' => '',
83
- 'status' => '',
84
- 'permalink' => '',
85
- 'destination_url' => '',
86
- 'rel_tags' => '',
87
- 'redirect_type' => '',
88
- 'no_follow' => 'global',
89
- 'new_window' => 'global',
90
- 'uncloak_link' => 'global',
91
- 'pass_query_str' => 'global',
92
- 'image_ids' => array(),
93
- 'categories' => array(),
94
- 'category_slug' => '',
95
  'category_slug_id' => 0,
 
 
96
  );
97
 
98
  /**
@@ -195,17 +197,23 @@ class Affiliate_Link {
195
  $this->data[ $prop ] = $this->get_post_data_equivalent( $prop );
196
  break;
197
 
198
- case 'rel_tags' :
199
  case 'no_follow' :
200
  case 'new_window' :
 
 
 
 
 
 
 
201
  case 'uncloak_link' :
202
  case 'redirect_type' :
203
- case 'pass_query_str' :
204
  $raw_data = get_post_meta( $this->id , Plugin_Constants::META_DATA_PREFIX . $prop , true );
205
  $this->data[ $prop ] = ! empty( $raw_data ) ? $raw_data : $this->get_prop_global_option_value( $prop );
206
  break;
207
 
208
  case 'image_ids' :
 
209
  $raw_data = get_post_meta( $this->id , Plugin_Constants::META_DATA_PREFIX . $prop , true );
210
  $this->data[ $prop ] = ( is_array( $raw_data ) && ! empty( $raw_data ) ) ? $raw_data : $this->default_data[ $prop ];
211
  break;
@@ -364,23 +372,11 @@ class Affiliate_Link {
364
  $option = 'ta_additional_rel_tags';
365
  break;
366
 
367
- case 'no_follow' :
368
- $option = 'ta_no_follow';
369
- break;
370
-
371
- case 'new_window' :
372
- $option = 'ta_new_window';
373
- break;
374
-
375
  case 'redirect_type' :
376
  $option = 'ta_link_redirect_type';
377
  $default = '301';
378
  break;
379
 
380
- case 'pass_query_str' :
381
- $option = 'ta_pass_query_str';
382
- break;
383
-
384
  case 'uncloak_link' :
385
  return;
386
  break;
@@ -392,6 +388,8 @@ class Affiliate_Link {
392
  /**
393
  * Get the global value for the uncloak property.
394
  *
 
 
395
  * @since 3.0.0
396
  * @access public
397
  *
@@ -399,14 +397,56 @@ class Affiliate_Link {
399
  */
400
  public function get_global_uncloak_value() {
401
 
402
- $uncloak_cats = maybe_unserialize( get_option( 'ta_category_to_uncloak' , array() ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
 
404
- if ( ! is_array( $uncloak_cats ) || empty( $uncloak_cats ) )
405
  return 'no';
406
 
407
- foreach ( $uncloak_cats as $cat_id ) {
 
 
408
 
409
- if ( has_term( intval( $cat_id ) , Plugin_Constants::AFFILIATE_LINKS_TAX , $this->id ) )
 
 
 
 
 
 
 
 
 
410
  return 'yes';
411
  }
412
 
@@ -574,6 +614,42 @@ class Affiliate_Link {
574
 
575
  }
576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  /**
578
  * Count affiliate link clicks.
579
  *
@@ -597,4 +673,39 @@ class Affiliate_Link {
597
  return (int) $clicks;
598
  }
599
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
600
  }
76
  * @var array
77
  */
78
  protected $default_data = array(
79
+ 'name' => '',
80
+ 'slug' => '',
81
+ 'date_created' => '',
82
+ 'date_modified' => '',
83
+ 'status' => '',
84
+ 'permalink' => '',
85
+ 'destination_url' => '',
86
+ 'rel_tags' => '',
87
+ 'redirect_type' => '',
88
+ 'no_follow' => 'global',
89
+ 'new_window' => 'global',
90
+ 'uncloak_link' => 'global',
91
+ 'pass_query_str' => 'global',
92
+ 'image_ids' => array(),
93
+ 'categories' => array(),
94
+ 'category_slug' => '',
95
  'category_slug_id' => 0,
96
+ 'inserted_to' => array(),
97
+ 'scanned_inserted' => ''
98
  );
99
 
100
  /**
197
  $this->data[ $prop ] = $this->get_post_data_equivalent( $prop );
198
  break;
199
 
 
200
  case 'no_follow' :
201
  case 'new_window' :
202
+ case 'pass_query_str' :
203
+ $raw_data = get_post_meta( $this->id , Plugin_Constants::META_DATA_PREFIX . $prop , true );
204
+ $this->data[ $prop ] = ! empty( $raw_data ) ? $raw_data : $this->default_data[ $prop ];
205
+ break;
206
+
207
+ case 'rel_tags' :
208
+
209
  case 'uncloak_link' :
210
  case 'redirect_type' :
 
211
  $raw_data = get_post_meta( $this->id , Plugin_Constants::META_DATA_PREFIX . $prop , true );
212
  $this->data[ $prop ] = ! empty( $raw_data ) ? $raw_data : $this->get_prop_global_option_value( $prop );
213
  break;
214
 
215
  case 'image_ids' :
216
+ case 'inserted_to' :
217
  $raw_data = get_post_meta( $this->id , Plugin_Constants::META_DATA_PREFIX . $prop , true );
218
  $this->data[ $prop ] = ( is_array( $raw_data ) && ! empty( $raw_data ) ) ? $raw_data : $this->default_data[ $prop ];
219
  break;
372
  $option = 'ta_additional_rel_tags';
373
  break;
374
 
 
 
 
 
 
 
 
 
375
  case 'redirect_type' :
376
  $option = 'ta_link_redirect_type';
377
  $default = '301';
378
  break;
379
 
 
 
 
 
380
  case 'uncloak_link' :
381
  return;
382
  break;
388
  /**
389
  * Get the global value for the uncloak property.
390
  *
391
+ * @deprecated 3.2.0
392
+ *
393
  * @since 3.0.0
394
  * @access public
395
  *
397
  */
398
  public function get_global_uncloak_value() {
399
 
400
+ return $this->get_toggle_prop_global_value( 'uncloak_link' );
401
+ }
402
+
403
+ /**
404
+ * Get toggle property global value. This function also checks for "category" valued options.
405
+ *
406
+ * @since 3.2.0
407
+ * @access public
408
+ *
409
+ * @param string $toggle_prop Affiliate linkg toggle property name.
410
+ * @return string 'yes' if true, otherwise 'no'.
411
+ */
412
+ public function get_toggle_prop_global_value( $toggle_prop ) {
413
+
414
+ $global_props = apply_filters( 'ta_props_with_global_option' , array(
415
+ 'no_follow' => 'ta_no_follow',
416
+ 'new_window' => 'ta_new_window',
417
+ 'uncloak_link' => '',
418
+ 'pass_query_str' => 'ta_pass_query_str'
419
+ ) );
420
+ $global_props_cat = apply_filters( 'ta_prop_selected_categories_option' , array(
421
+ 'no_follow' => 'ta_no_follow_category',
422
+ 'new_window' => 'ta_new_window_category',
423
+ 'uncloak_link' => 'ta_category_to_uncloak',
424
+ 'pass_query_str' => 'ta_pass_query_str_category'
425
+ ) );
426
+
427
+ if ( ! array_key_exists( $toggle_prop , $global_props ) )
428
+ return 'no';
429
+
430
+ // get equivalent global value.
431
+ $prop_value = $toggle_prop == 'uncloak_link' ? 'category' : get_option( $global_props[ $toggle_prop ] );
432
 
433
+ if ( ! $prop_value )
434
  return 'no';
435
 
436
+ // if prop value is not set to 'category', then return option value.
437
+ if ( $prop_value != 'category' || ! array_key_exists( $toggle_prop , $global_props_cat ) )
438
+ return $prop_value;
439
 
440
+ $prop_cats = maybe_unserialize( get_option( $global_props_cat[ $toggle_prop ] , array() ) );
441
+ $link_cats = $this->get_prop( 'categories' );
442
+
443
+ // skip when there are no categories to check (false)
444
+ if ( ! is_array( $prop_cats ) || empty( $prop_cats ) || empty( $link_cats ) )
445
+ return 'no';
446
+
447
+ foreach ( $link_cats as $category ) {
448
+
449
+ if ( in_array( $category->term_id , $prop_cats ) )
450
  return 'yes';
451
  }
452
 
614
 
615
  }
616
 
617
+
618
+
619
+
620
+ /*
621
+ |--------------------------------------------------------------------------
622
+ | Utility Functions.
623
+ |--------------------------------------------------------------------------
624
+ */
625
+
626
+ /**
627
+ * Conditional function that checks if a property is true for the affiliate link. This function also checks global and category set values.
628
+ *
629
+ * @since 3.2.0
630
+ * @access public
631
+ *
632
+ * @param string $toggle_prop Affiliate link toggle property to check.
633
+ * @return boolean true | false.
634
+ */
635
+ public function is( $toggle_prop ) {
636
+
637
+ // check if global setting for uncloak link is enabled.
638
+ if ( $toggle_prop == 'uncloak_link' && get_option( 'ta_uncloak_link_per_link' ) !== 'yes' )
639
+ return;
640
+
641
+ $prop_value = $this->get_prop( $toggle_prop );
642
+
643
+ // if prop value is not set to 'global', then return with the boolean equivalent of its value.
644
+ if ( $prop_value != 'global' )
645
+ return $prop_value == 'yes' ? true : false;
646
+
647
+ // get property global value. Also checks for category selected options.
648
+ $prop_value = $this->get_toggle_prop_global_value( $toggle_prop );
649
+
650
+ return $prop_value == 'yes' ? true : false;
651
+ }
652
+
653
  /**
654
  * Count affiliate link clicks.
655
  *
673
  return (int) $clicks;
674
  }
675
 
676
+ /**
677
+ * Scan where links are inserted.
678
+ *
679
+ * @since 3.2.0
680
+ * @access public
681
+ *
682
+ * @return array List of WP_Post IDs where affiliate link is inserted in content.
683
+ */
684
+ public function scan_where_links_inserted() {
685
+
686
+ global $wpdb;
687
+
688
+ // prepare the query.
689
+ $post_ids = array();
690
+ $link_id = $this->get_id();
691
+ $link_slug = $this->get_prop( 'slug' );
692
+ $cpt_slug = Plugin_Constants::AFFILIATE_LINKS_CPT;
693
+ $query = "SELECT ID FROM $wpdb->posts WHERE ( post_content LIKE '%/$link_slug/%' OR post_content LIKE '%[thirstylink%ids=\"$link_id%' ) AND post_type NOT IN ( '$cpt_slug' , 'revision' ) AND post_status = 'publish'";
694
+
695
+ // fetch WP_Post IDs where link is inserted to.
696
+ $raw_ids = $wpdb->get_col( $query );
697
+
698
+ // save last scanned
699
+ update_post_meta( $this->get_id() , Plugin_Constants::META_DATA_PREFIX . 'scanned_inserted' , current_time( 'mysql' , true ) );
700
+
701
+ if ( ! is_array( $raw_ids ) || empty( $raw_ids ) )
702
+ return $post_ids;
703
+
704
+ // save to custom meta.
705
+ $post_ids = array_map( 'intval' , $raw_ids );
706
+ update_post_meta( $this->get_id() , Plugin_Constants::META_DATA_PREFIX . 'inserted_to' , $post_ids );
707
+
708
+ return $post_ids;
709
+ }
710
+
711
  }
Models/Affiliate_Links_CPT.php CHANGED
@@ -136,6 +136,15 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
136
 
137
  }
138
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Register the 'thirstylink' custom post type.
141
  *
@@ -248,6 +257,15 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
248
 
249
  }
250
 
 
 
 
 
 
 
 
 
 
251
  /**
252
  * Replace default post type permalink html with affiliate link ID.
253
  *
@@ -277,6 +295,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
277
  // normal
278
  add_meta_box( 'ta-urls-metabox', __( 'URLs', 'thirstyaffiliates' ), array( $this , 'urls_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
279
  add_meta_box( 'ta-attach-images-metabox', __( 'Attach Images', 'thirstyaffiliates' ), array( $this , 'attach_images_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
 
280
 
281
  // side
282
  add_meta_box( 'ta-save-affiliate-link-metabox-side', __( 'Save Affiliate Link', 'thirstyaffiliates' ), array( $this , 'save_affiliate_link_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'side' , 'high' );
@@ -338,10 +357,10 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
338
  $default_redirect_type = get_option( 'ta_link_redirect_type' , '301' );
339
  $post_redirect_type = $thirstylink->get_prop( 'redirect_type' , $default_redirect_type );
340
  $redirect_types = $this->_constants->REDIRECT_TYPES();
341
- $global_no_follow = get_option( 'ta_no_follow' ) == 'yes' ? 'yes' : 'no';
342
- $global_new_window = get_option( 'ta_new_window' ) == 'yes' ? 'yes' : 'no';
343
- $global_pass_query_str = get_option( 'ta_pass_query_str' ) == 'yes' ? 'yes' : 'no';
344
- $global_uncloak = $thirstylink->get_global_uncloak_value();
345
  $rel_tags = get_post_meta( $post->ID , Plugin_Constants::META_DATA_PREFIX . 'rel_tags' , true );
346
  $global_rel_tags = get_option( 'ta_additional_rel_tags' );
347
 
@@ -363,6 +382,75 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
363
 
364
  }
365
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  /**
367
  * Save thirstylink post.
368
  *
@@ -411,7 +499,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
411
  $thirstylink->save();
412
 
413
  // set default term
414
- $this->save_default_affiliate_link_category( $post_id );
415
 
416
  // add back save_post hooked action after saving
417
  add_action( 'save_post' , array( $this , 'save_post' ) );
@@ -422,6 +510,8 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
422
  /**
423
  * Set default term when affiliate link is saved.
424
  *
 
 
425
  * @since 3.0.0
426
  * @access public
427
  *
@@ -429,20 +519,17 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
429
  */
430
  public function save_default_affiliate_link_category( $post_id ) {
431
 
432
- $default_category = Plugin_Constants::DEFAULT_LINK_CATEGORY;
433
- $taxonomy_slug = Plugin_Constants::AFFILIATE_LINKS_TAX;
434
 
435
- if ( get_option( 'ta_disable_cat_auto_select' ) == 'yes' || get_the_terms( $post_id , $taxonomy_slug ) )
436
- return;
437
 
438
- // create the default term if it doesn't exist
439
- if ( ! term_exists( $default_category , $taxonomy_slug ) )
440
- wp_insert_term( $default_category , $taxonomy_slug );
441
 
442
- $default_term = get_term_by( 'name' , $default_category , $taxonomy_slug );
443
 
444
- wp_set_post_terms( $post_id , $default_term->term_id , $taxonomy_slug );
445
- }
 
 
 
446
 
447
  /**
448
  * Add custom column to thirsty link listings (Link ID).
@@ -451,7 +538,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
451
  * @access public
452
  *
453
  * @param array $columns Post type listing columns.
454
- * @return array
455
  */
456
  public function custom_post_listing_column( $columns ) {
457
 
@@ -476,6 +563,62 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
476
 
477
  }
478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
479
  /**
480
  * Add custom column to thirsty link listings (Link ID).
481
  *
@@ -522,6 +665,77 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
522
 
523
  }
524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
525
  /**
526
  * Add category slug to the permalink.
527
  *
@@ -558,6 +772,15 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
558
  return home_url( user_trailingslashit( $link_prefix . '/' . $link_cat . '/' . $post->post_name ) );
559
  }
560
 
 
 
 
 
 
 
 
 
 
561
  /**
562
  * Ajax get category slug.
563
  *
@@ -583,6 +806,38 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
583
  wp_die();
584
  }
585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
 
587
 
588
 
@@ -606,6 +861,7 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
606
  $this->register_thirstylink_category_custom_taxonomy();
607
 
608
  add_action( 'wp_ajax_ta_get_category_slug' , array( $this , 'ajax_get_category_slug' ) );
 
609
 
610
  }
611
 
@@ -627,7 +883,13 @@ class Affiliate_Links_CPT implements Model_Interface , Initiable_Interface {
627
 
628
  // custom column
629
  add_filter( 'manage_edit-thirstylink_columns' , array( $this , 'custom_post_listing_column' ) );
 
630
  add_action( 'manage_thirstylink_posts_custom_column', array( $this , 'custom_post_listing_column_value' ) , 10 , 2 );
 
 
 
 
 
631
 
632
  // filter to add category on permalink
633
  add_filter( 'post_type_link' , array( $this , 'add_category_slug_to_permalink' ) , 10 , 2 );
136
 
137
  }
138
 
139
+
140
+
141
+
142
+ /*
143
+ |--------------------------------------------------------------------------
144
+ | Register Post Type and Taxonomy
145
+ |--------------------------------------------------------------------------
146
+ */
147
+
148
  /**
149
  * Register the 'thirstylink' custom post type.
150
  *
257
 
258
  }
259
 
260
+
261
+
262
+
263
+ /*
264
+ |--------------------------------------------------------------------------
265
+ | UI and metabox related functions
266
+ |--------------------------------------------------------------------------
267
+ */
268
+
269
  /**
270
  * Replace default post type permalink html with affiliate link ID.
271
  *
295
  // normal
296
  add_meta_box( 'ta-urls-metabox', __( 'URLs', 'thirstyaffiliates' ), array( $this , 'urls_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
297
  add_meta_box( 'ta-attach-images-metabox', __( 'Attach Images', 'thirstyaffiliates' ), array( $this , 'attach_images_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal' );
298
+ add_meta_box( 'ta-inserted-link-scanner-metabox', __( 'Link Inserted Scanner', 'thirstyaffiliates' ), array( $this , 'inserted_link_scanner_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'normal', 'low' );
299
 
300
  // side
301
  add_meta_box( 'ta-save-affiliate-link-metabox-side', __( 'Save Affiliate Link', 'thirstyaffiliates' ), array( $this , 'save_affiliate_link_metabox' ) , Plugin_Constants::AFFILIATE_LINKS_CPT , 'side' , 'high' );
357
  $default_redirect_type = get_option( 'ta_link_redirect_type' , '301' );
358
  $post_redirect_type = $thirstylink->get_prop( 'redirect_type' , $default_redirect_type );
359
  $redirect_types = $this->_constants->REDIRECT_TYPES();
360
+ $global_no_follow = $thirstylink->get_toggle_prop_global_value( 'no_follow' );
361
+ $global_new_window = $thirstylink->get_toggle_prop_global_value( 'new_window' );
362
+ $global_pass_query_str = $thirstylink->get_toggle_prop_global_value( 'pass_query_str' );
363
+ $global_uncloak = $thirstylink->get_toggle_prop_global_value( 'uncloak_link' );
364
  $rel_tags = get_post_meta( $post->ID , Plugin_Constants::META_DATA_PREFIX . 'rel_tags' , true );
365
  $global_rel_tags = get_option( 'ta_additional_rel_tags' );
366
 
382
 
383
  }
384
 
385
+ /**
386
+ * Display inserted link scanner metabox
387
+ *
388
+ * @since 3.2.0
389
+ * @access public
390
+ *
391
+ * @param WP_Post $post Affiliate link WP_Post object.
392
+ */
393
+ public function inserted_link_scanner_metabox( $post ) {
394
+
395
+ $thirstylink = $this->get_thirstylink_post( $post->ID );
396
+ $spinner_image_src = $this->_constants->IMAGES_ROOT_URL() . 'spinner-2x.gif';
397
+ $inserted_to = $thirstylink->get_prop( 'inserted_to' );
398
+ $timezone = new \DateTimeZone( $this->_helper_functions->get_site_current_timezone() );
399
+ $last_scanned = \DateTime::createFromFormat( 'Y-m-d G:i:s' , $thirstylink->get_prop( 'scanned_inserted' ) );
400
+ $not_yet_scanned = __( 'Not yet scanned' , 'thirstyaffiliates' );
401
+
402
+ if ( $last_scanned )
403
+ $last_scanned->setTimezone( $timezone );
404
+
405
+ $last_scanned_txt = $last_scanned !== false ? __( 'Last scanned on:' , 'thirstyaffiliates' ) . ' <em>' . $last_scanned->format( 'F j, Y g:ia' ) . '</em>' : $not_yet_scanned;
406
+ $inserted_into_rows_html = $this->get_inserted_into_rows_html( $inserted_to );
407
+
408
+ include( $this->_constants->VIEWS_ROOT_PATH() . 'cpt/view-inserted-link-scanner-metabox.php' );
409
+ }
410
+
411
+ /**
412
+ * Get the HTML for inserted into table rows.
413
+ *
414
+ * @since 3.2.0
415
+ * @access private
416
+ *
417
+ * @param array $inserted_to WP_Post IDs where affiliate link is inserte to.
418
+ * @param Affiliate_Link $thirstylink Affiliate link object.
419
+ */
420
+ private function get_inserted_into_rows_html( $inserted_to ) {
421
+
422
+ global $wpdb;
423
+
424
+ if ( ! is_array( $inserted_to ) || empty( $inserted_to ) )
425
+ return '<tr><td colspan="4">' . __( 'No results found.' , 'thirstyaffiliates' ) . '</td></tr>';
426
+
427
+ $inserted_to_str = implode( ',' , $inserted_to );
428
+ $results = $wpdb->get_results( "SELECT ID , post_title , post_type FROM $wpdb->posts WHERE ID IN ( $inserted_to_str )" );
429
+
430
+ ob_start();
431
+ foreach ( $results as $object ) : ?>
432
+ <tr>
433
+ <td class="id"><?php echo esc_html( $object->ID ); ?></td>
434
+ <td class="title"><?php echo mb_strimwidth( esc_html( $object->post_title ) , 0 , 60 , "..." ); ?></td>
435
+ <td class="post-type"><?php echo esc_html( $object->post_type ); ?></td>
436
+ <td class="actions">
437
+ <a class="view" href="<?php echo get_permalink( $object->ID ); ?>" target="_blank"><span class="dashicons dashicons-admin-links"></span></a>
438
+ <a class="edit" href="<?php echo get_edit_post_link( $object->ID ); ?>" target="_blank"><span class="dashicons dashicons-edit"></span></a>
439
+ </td>
440
+ </tr>
441
+ <?php endforeach;
442
+ return ob_get_clean();
443
+ }
444
+
445
+
446
+
447
+
448
+ /*
449
+ |--------------------------------------------------------------------------
450
+ | Save Functions
451
+ |--------------------------------------------------------------------------
452
+ */
453
+
454
  /**
455
  * Save thirstylink post.
456
  *
499
  $thirstylink->save();
500
 
501
  // set default term
502
+ $this->_helper_functions->save_default_affiliate_link_category( $post_id );
503
 
504
  // add back save_post hooked action after saving
505
  add_action( 'save_post' , array( $this , 'save_post' ) );
510
  /**
511
  * Set default term when affiliate link is saved.
512
  *
513
+ * @deprecated 3.2.0 Moved to helper functions
514
+ *
515
  * @since 3.0.0
516
  * @access public
517
  *
519
  */
520
  public function save_default_affiliate_link_category( $post_id ) {
521
 
522
+ $this->_helper_functions->save_default_affiliate_link_category( $post_id );
523
+ }
524
 
 
 
525
 
 
 
 
526
 
 
527
 
528
+ /*
529
+ |--------------------------------------------------------------------------
530
+ | Affiliate Link listing related UI functions
531
+ |--------------------------------------------------------------------------
532
+ */
533
 
534
  /**
535
  * Add custom column to thirsty link listings (Link ID).
538
  * @access public
539
  *
540
  * @param array $columns Post type listing columns.
541
+ * @return array Filtered post type listing columns.
542
  */
543
  public function custom_post_listing_column( $columns ) {
544
 
563
 
564
  }
565
 
566
+ /**
567
+ * Add custom column to thirsty link listings (Link ID).
568
+ *
569
+ * @since 3.2.0
570
+ * @access public
571
+ *
572
+ * @param array $columns Post type listing sortable columns.
573
+ * @return array Filtered Post type listing sortable columns.
574
+ */
575
+ public function custom_post_listing_sortable_column( $columns ) {
576
+
577
+ $columns[ 'link_id' ] = 'ID';
578
+ $columns[ 'redirect_type' ] = '_ta_redirect_type';
579
+ $columns[ 'cloaked_url' ] = 'name';
580
+ $columns[ 'link_destination' ] = '_ta_destination_url';
581
+
582
+ return apply_filters( 'ta_post_listing_sortable_custom_columns' , $columns );
583
+ }
584
+
585
+ /**
586
+ * Add custom sorting support for TA custom columns with post meta values.
587
+ *
588
+ * @since 3.2.0
589
+ * @access public
590
+ *
591
+ * @param WP_Query $query Main WP_Query instance of the page.
592
+ */
593
+ public function custom_post_listing_column_custom_sorting( $query ) {
594
+
595
+ $post_type = get_post_type();
596
+ if ( !$post_type && isset( $_GET[ 'post_type' ] ) )
597
+ $post_type = $_GET[ 'post_type' ];
598
+
599
+ if ( ! is_admin() || $post_type !== Plugin_Constants::AFFILIATE_LINKS_CPT )
600
+ return;
601
+
602
+ $meta_key = $query->get( 'orderby' );
603
+ $default_keys = array( '_ta_redirect_type', '_ta_destination_url' );
604
+ $extend_keys = apply_filters( 'ta_post_listing_custom_sorting_keys' , array() );
605
+ $meta_keys = array_unique( array_merge( $default_keys , $extend_keys ) );
606
+
607
+
608
+ if ( ! in_array( $meta_key , $meta_keys ) )
609
+ return;
610
+
611
+ $meta_data = apply_filters( 'ta_post_listing_custom_sorting_metadata' , array(
612
+ 'meta_key' => $meta_key,
613
+ 'orderby' => 'meta_value',
614
+ ) , $meta_key , $meta_keys );
615
+
616
+ if ( ! $meta_data[ 'meta_key' ] || ! $meta_data[ 'orderby' ] )
617
+ return;
618
+
619
+ $query->set( 'meta_key' , $meta_key );
620
+ }
621
+
622
  /**
623
  * Add custom column to thirsty link listings (Link ID).
624
  *
665
 
666
  }
667
 
668
+ /**
669
+ * Setup the filter box for the list page so users can filter links by category
670
+ *
671
+ * @since 3.2.0
672
+ * @access public
673
+ *
674
+ * @global string $typenow Current post type context.
675
+ * @global WP_Query $wp_query Object that contains the main query of WP.
676
+ */
677
+ public function restrict_links_by_category() {
678
+
679
+ global $typenow , $wp_query;
680
+
681
+ if ( $typenow != Plugin_Constants::AFFILIATE_LINKS_CPT )
682
+ return;
683
+
684
+ $taxonomy = Plugin_Constants::AFFILIATE_LINKS_TAX;
685
+
686
+ wp_dropdown_categories( array(
687
+ 'show_option_all' => __( 'Show Link Categories' , 'thirstyaffiliates' ),
688
+ 'taxonomy' => $taxonomy,
689
+ 'name' => $taxonomy,
690
+ 'orderby' => 'name',
691
+ 'selected' => ( isset( $wp_query->query[ $taxonomy ] ) ? $wp_query->query[ $taxonomy ] : '' ),
692
+ 'hierarchical' => true,
693
+ 'depth' => 4,
694
+ 'show_count' => true,
695
+ 'hide_empty' => true
696
+ ) );
697
+ }
698
+
699
+ /**
700
+ * Convert category ID to slug to make the filter by category dropdown work.
701
+ *
702
+ * @since 3.2.0
703
+ * @access public
704
+ *
705
+ * @global string $typenow Current post type context.
706
+ *
707
+ * @param WP_Query $query Current page query.
708
+ * @return WP_Query Filtered current page query.
709
+ */
710
+ public function convert_cat_id_to_slug_in_query( $query ) {
711
+
712
+ global $typenow;
713
+
714
+ if ( $typenow != Plugin_Constants::AFFILIATE_LINKS_CPT )
715
+ return;
716
+
717
+ $qv = &$query->query_vars;
718
+ $taxonomy = Plugin_Constants::AFFILIATE_LINKS_TAX;
719
+
720
+ if ( isset( $qv[ $taxonomy ] ) && is_numeric( $qv[ $taxonomy ] ) ) {
721
+
722
+ $term = get_term_by( 'id' , $qv[ $taxonomy ] , $taxonomy );
723
+ $qv[ $taxonomy ] = is_object( $term ) ? $term->slug : '';
724
+
725
+ }
726
+
727
+ return $query;
728
+ }
729
+
730
+
731
+
732
+
733
+ /*
734
+ |--------------------------------------------------------------------------
735
+ | Affiliate Link Filters
736
+ |--------------------------------------------------------------------------
737
+ */
738
+
739
  /**
740
  * Add category slug to the permalink.
741
  *
772
  return home_url( user_trailingslashit( $link_prefix . '/' . $link_cat . '/' . $post->post_name ) );
773
  }
774
 
775
+
776
+
777
+
778
+ /*
779
+ |--------------------------------------------------------------------------
780
+ | AJAX functions.
781
+ |--------------------------------------------------------------------------
782
+ */
783
+
784
  /**
785
  * Ajax get category slug.
786
  *
806
  wp_die();
807
  }
808
 
809
+ /**
810
+ * Ajax link inserted scanner.
811
+ *
812
+ * @since 3.2.0
813
+ * @access public
814
+ */
815
+ public function ajax_link_inserted_scanner() {
816
+
817
+ if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX )
818
+ $response = array( 'status' => 'fail' , 'error_msg' => __( 'Invalid AJAX call' , 'thirstyaffiliates' ) );
819
+ elseif ( ! isset( $_POST[ 'link_id' ] ) )
820
+ $response = array( 'status' => 'fail' , 'error_msg' => __( 'Missing required post data' , 'thirstyaffiliates' ) );
821
+ else {
822
+
823
+ $link_id = (int) sanitize_text_field( $_POST[ 'link_id' ] );
824
+ $thirstylink = $this->get_thirstylink_post( $link_id );
825
+ $inserted_to = $thirstylink->scan_where_links_inserted();
826
+ $timezone = new \DateTimeZone( $this->_helper_functions->get_site_current_timezone() );
827
+ $last_scanned = \DateTime::createFromFormat( 'Y-m-d G:i:s' , get_post_meta( $link_id , Plugin_Constants::META_DATA_PREFIX . 'scanned_inserted' , true ) , $timezone );
828
+
829
+ $response = array(
830
+ 'status' => 'success',
831
+ 'results_markup' => $this->get_inserted_into_rows_html( $inserted_to ),
832
+ 'last_scanned' => __( 'Last scanned on:' , 'thirstyaffiliates' ) . ' <em>' . $last_scanned->format( 'F j, Y g:ia' ) . '</em>'
833
+ );
834
+ }
835
+
836
+ @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
837
+ echo wp_json_encode( $response );
838
+ wp_die();
839
+ }
840
+
841
 
842
 
843
 
861
  $this->register_thirstylink_category_custom_taxonomy();
862
 
863
  add_action( 'wp_ajax_ta_get_category_slug' , array( $this , 'ajax_get_category_slug' ) );
864
+ add_action( 'wp_ajax_ta_link_inserted_scanner' , array( $this , 'ajax_link_inserted_scanner' ) );
865
 
866
  }
867
 
883
 
884
  // custom column
885
  add_filter( 'manage_edit-thirstylink_columns' , array( $this , 'custom_post_listing_column' ) );
886
+ add_filter( 'manage_edit-thirstylink_sortable_columns', array( $this , 'custom_post_listing_sortable_column' ) );
887
  add_action( 'manage_thirstylink_posts_custom_column', array( $this , 'custom_post_listing_column_value' ) , 10 , 2 );
888
+ add_action( 'pre_get_posts' , array( $this , 'custom_post_listing_column_custom_sorting' ) );
889
+
890
+ // filter by category
891
+ add_action( 'restrict_manage_posts' , array( $this , 'restrict_links_by_category' ) );
892
+ add_filter( 'parse_query' , array( $this , 'convert_cat_id_to_slug_in_query' ) );
893
 
894
  // filter to add category on permalink
895
  add_filter( 'post_type_link' , array( $this , 'add_category_slug_to_permalink' ) , 10 , 2 );
Models/Bootstrap.php CHANGED
@@ -240,6 +240,10 @@ class Bootstrap implements Model_Interface {
240
  if ( !get_option( Plugin_Constants::CLEAN_UP_PLUGIN_OPTIONS , false ) )
241
  update_option( Plugin_Constants::CLEAN_UP_PLUGIN_OPTIONS , 'no' );
242
 
 
 
 
 
243
  }
244
 
245
  /**
240
  if ( !get_option( Plugin_Constants::CLEAN_UP_PLUGIN_OPTIONS , false ) )
241
  update_option( Plugin_Constants::CLEAN_UP_PLUGIN_OPTIONS , 'no' );
242
 
243
+ // set redirect type default to '302' on activation.
244
+ if ( ! get_option( 'ta_link_redirect_type' , false ) )
245
+ update_option( 'ta_link_redirect_type' , 302 );
246
+
247
  }
248
 
249
  /**
Models/Link_Fixer.php CHANGED
@@ -140,12 +140,10 @@ class Link_Fixer implements Model_Interface , Initiable_Interface {
140
 
141
  $class = str_replace( 'thirstylinkimg' , 'thirstylink' , $class );
142
  $class .= ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" && strpos( $class , 'thirstylink' ) === false ) ? ' thirstylink' : '';
143
- $nofollow = $thirstylink->get_prop( 'no_follow' ) == 'global' ? get_option( 'ta_no_follow' ) : $thirstylink->get_prop( 'no_follow' );
144
- $new_window = $thirstylink->get_prop( 'new_window' ) == 'global' ? get_option( 'ta_new_window' ) : $thirstylink->get_prop( 'new_window' );
145
- $href = ( $this->_helper_functions->is_uncloak_link( $thirstylink ) ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
146
- $rel = $nofollow == "yes" ? 'nofollow' : '';
147
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
148
- $target = $new_window == "yes" ? '_blank' : '';
149
  $title = get_option( 'ta_disable_title_attribute' ) != 'yes' ? esc_attr( str_replace( '"' , '' , $thirstylink->get_prop( 'name' ) ) ) : '';
150
  $title = str_replace( '&#039;' , '\'' , $title );
151
 
140
 
141
  $class = str_replace( 'thirstylinkimg' , 'thirstylink' , $class );
142
  $class .= ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" && strpos( $class , 'thirstylink' ) === false ) ? ' thirstylink' : '';
143
+ $href = ( $thirstylink->is( 'uncloak_link' ) ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
144
+ $rel = $thirstylink->is( 'no_follow' ) ? 'nofollow' : '';
 
 
145
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
146
+ $target = $thirstylink->is( 'new_window' ) ? '_blank' : '';
147
  $title = get_option( 'ta_disable_title_attribute' ) != 'yes' ? esc_attr( str_replace( '"' , '' , $thirstylink->get_prop( 'name' ) ) ) : '';
148
  $title = str_replace( '&#039;' , '\'' , $title );
149
 
Models/Link_Picker.php CHANGED
@@ -199,11 +199,9 @@ class Link_Picker implements Model_Interface {
199
  foreach( $affiliate_links as $link_id ) {
200
 
201
  $thirstylink = new Affiliate_Link( $link_id );
202
- $nofollow = $thirstylink->get_prop( 'no_follow' ) == 'global' ? get_option( 'ta_no_follow' ) : $thirstylink->get_prop( 'no_follow' );
203
- $new_window = $thirstylink->get_prop( 'new_window' ) == 'global' ? get_option( 'ta_new_window' ) : $thirstylink->get_prop( 'new_window' );
204
- $rel = $nofollow == 'yes' ? 'nofollow' : '';
205
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
206
- $target = $new_window == 'yes' ? '_blank' : '';
207
  $class = ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" ) ? 'thirstylink' : '';
208
  $title = ( get_option( 'ta_disable_title_attribute' ) !== "yes" ) ? $thirstylink->get_prop( 'name' ) : '';
209
  $other_atts = esc_attr( json_encode( apply_filters( 'ta_link_insert_extend_data_attributes' , array() , $thirstylink , $post_id ) ) );
@@ -255,7 +253,7 @@ class Link_Picker implements Model_Interface {
255
  data-rel="' . esc_attr( $rel ) . '"
256
  data-target="' . esc_attr( $target ) . '"
257
  data-link-id="' . esc_attr( $thirstylink->get_id() ) . '"
258
- data-link-insertion-type="' . esc_attr( get_option( 'ta_link_insertion_type' , 'link' ) ) . '"
259
  data-other-atts="' . $other_atts . '">';
260
  $result_markup .= '<strong>' . $link_id . '</strong> : <span>' . $thirstylink->get_prop( 'name' ) . '</span></li>';
261
 
@@ -380,12 +378,19 @@ class Link_Picker implements Model_Interface {
380
  $global_no_follow = get_option( 'ta_no_follow' ) == 'yes' ? 'yes' : 'no';
381
  $global_new_window = get_option( 'ta_new_window' ) == 'yes' ? 'yes' : 'no';
382
  $html_editor = isset( $_REQUEST[ 'html_editor' ] ) ? sanitize_text_field( $_REQUEST[ 'html_editor' ] ) : false;
 
 
 
 
 
 
383
 
384
  wp_enqueue_script('editor');
 
385
  wp_dequeue_script('jquery-ui-sortable');
386
  wp_dequeue_script('admin-scripts');
387
  wp_enqueue_script( 'ta_quick_add_affiliate_link_js' , $this->_constants->JS_ROOT_URL() . 'app/quick_add_affiliate_link/dist/quick-add-affiliate-link.js' , array() , $this->_constants->VERSION() );
388
- wp_enqueue_style( 'ta_quick_add_affiliate_link_css' , $this->_constants->JS_ROOT_URL() . 'app/quick_add_affiliate_link/dist/quick-add-affiliate-link.css' , array( 'dashicons' ) , $this->_constants->VERSION() , 'all' );
389
 
390
  include( $this->_constants->VIEWS_ROOT_PATH() . 'linkpicker/quick-add-affiliate-link.php' );
391
 
@@ -415,9 +420,31 @@ class Link_Picker implements Model_Interface {
415
  // save affiliate link
416
  $thirstylink->save();
417
 
 
 
 
 
418
  return $thirstylink;
419
  }
420
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  /**
422
  * AJAX function to process quick add affiliate link.
423
  *
@@ -434,11 +461,9 @@ class Link_Picker implements Model_Interface {
434
 
435
  $thirstylink = $this->process_quick_add_affiliate_link();
436
  $post_id = isset( $_POST[ 'post_id' ] ) ? intval( sanitize_text_field( $_POST[ 'post_id' ] ) ) : 0;
437
- $nofollow = $thirstylink->get_prop( 'no_follow' ) == 'global' ? get_option( 'ta_no_follow' ) : $thirstylink->get_prop( 'no_follow' );
438
- $new_window = $thirstylink->get_prop( 'new_window' ) == 'global' ? get_option( 'ta_new_window' ) : $thirstylink->get_prop( 'new_window' );
439
- $rel = $nofollow == 'yes' ? 'nofollow' : '';
440
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
441
- $target = $new_window == 'yes' ? '_blank' : '';
442
  $class = ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" ) ? 'thirstylink' : '';
443
  $title = ( get_option( 'ta_disable_title_attribute' ) !== "yes" ) ? $thirstylink->get_prop( 'name' ) : '';
444
 
@@ -451,7 +476,7 @@ class Link_Picker implements Model_Interface {
451
  'title' => str_replace( '"' , '' , $title ),
452
  'rel' => $rel,
453
  'target' => $target,
454
- 'link_insertion_type' => get_option( 'ta_link_insertion_type' , 'link' ),
455
  'other_atts' => apply_filters( 'ta_link_insert_extend_data_attributes' , array() , $thirstylink , $post_id )
456
  );
457
 
199
  foreach( $affiliate_links as $link_id ) {
200
 
201
  $thirstylink = new Affiliate_Link( $link_id );
202
+ $rel = $thirstylink->is( 'no_follow' ) ? 'nofollow' : '';
 
 
203
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
204
+ $target = $thirstylink->is( 'new_window' ) ? '_blank' : '';
205
  $class = ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" ) ? 'thirstylink' : '';
206
  $title = ( get_option( 'ta_disable_title_attribute' ) !== "yes" ) ? $thirstylink->get_prop( 'name' ) : '';
207
  $other_atts = esc_attr( json_encode( apply_filters( 'ta_link_insert_extend_data_attributes' , array() , $thirstylink , $post_id ) ) );
253
  data-rel="' . esc_attr( $rel ) . '"
254
  data-target="' . esc_attr( $target ) . '"
255
  data-link-id="' . esc_attr( $thirstylink->get_id() ) . '"
256
+ data-link-insertion-type="' . esc_attr( $this->_helper_functions->get_option( 'ta_link_insertion_type' , 'link' ) ) . '"
257
  data-other-atts="' . $other_atts . '">';
258
  $result_markup .= '<strong>' . $link_id . '</strong> : <span>' . $thirstylink->get_prop( 'name' ) . '</span></li>';
259
 
378
  $global_no_follow = get_option( 'ta_no_follow' ) == 'yes' ? 'yes' : 'no';
379
  $global_new_window = get_option( 'ta_new_window' ) == 'yes' ? 'yes' : 'no';
380
  $html_editor = isset( $_REQUEST[ 'html_editor' ] ) ? sanitize_text_field( $_REQUEST[ 'html_editor' ] ) : false;
381
+ $categories = get_terms( Plugin_Constants::AFFILIATE_LINKS_TAX , array(
382
+ 'hide_empty' => false,
383
+ ) );
384
+
385
+ wp_enqueue_style( 'ta_quick_add_affiliate_link_css' , $this->_constants->JS_ROOT_URL() . 'app/quick_add_affiliate_link/dist/quick-add-affiliate-link.css' , array( 'dashicons' ) , $this->_constants->VERSION() , 'all' );
386
+ wp_enqueue_style( 'selectize' , $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.default.css' , array() , Plugin_Constants::VERSION , 'all' );
387
 
388
  wp_enqueue_script('editor');
389
+ wp_dequeue_script('jquery-ui-core');
390
  wp_dequeue_script('jquery-ui-sortable');
391
  wp_dequeue_script('admin-scripts');
392
  wp_enqueue_script( 'ta_quick_add_affiliate_link_js' , $this->_constants->JS_ROOT_URL() . 'app/quick_add_affiliate_link/dist/quick-add-affiliate-link.js' , array() , $this->_constants->VERSION() );
393
+ wp_enqueue_script( 'selectize', $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.min.js' , array( 'jquery' , 'jquery-ui-core' , 'jquery-ui-sortable' ) , Plugin_Constants::VERSION );
394
 
395
  include( $this->_constants->VIEWS_ROOT_PATH() . 'linkpicker/quick-add-affiliate-link.php' );
396
 
420
  // save affiliate link
421
  $thirstylink->save();
422
 
423
+ // save categories
424
+ $this->quick_add_save_categories( $thirstylink );
425
+ $this->_helper_functions->save_default_affiliate_link_category( $thirstylink->get_id() );
426
+
427
  return $thirstylink;
428
  }
429
 
430
+ /**
431
+ * Quick add: Save categories for affiliate link on.
432
+ *
433
+ * @since 3.2.0
434
+ * @access private
435
+ *
436
+ * @param Affiliate_Link $thirstylink Affiliate link object.
437
+ */
438
+ private function quick_add_save_categories( $thirstylink ) {
439
+
440
+ $categories = array();
441
+ if ( isset( $_POST[ 'ta_link_categories' ] ) )
442
+ $categories = array_map( 'intval' , $_POST[ 'ta_link_categories' ] );
443
+
444
+ if ( ! empty( $categories ) )
445
+ wp_set_post_terms( $thirstylink->get_id() , $categories , Plugin_Constants::AFFILIATE_LINKS_TAX );
446
+ }
447
+
448
  /**
449
  * AJAX function to process quick add affiliate link.
450
  *
461
 
462
  $thirstylink = $this->process_quick_add_affiliate_link();
463
  $post_id = isset( $_POST[ 'post_id' ] ) ? intval( sanitize_text_field( $_POST[ 'post_id' ] ) ) : 0;
464
+ $rel = $thirstylink->is( 'no_follow' ) ? 'nofollow' : '';
 
 
465
  $rel .= ' ' . $thirstylink->get_prop( 'rel_tags' );
466
+ $target = $thirstylink->is( 'new_window' ) ? '_blank' : '';
467
  $class = ( get_option( 'ta_disable_thirsty_link_class' ) !== "yes" ) ? 'thirstylink' : '';
468
  $title = ( get_option( 'ta_disable_title_attribute' ) !== "yes" ) ? $thirstylink->get_prop( 'name' ) : '';
469
 
476
  'title' => str_replace( '"' , '' , $title ),
477
  'rel' => $rel,
478
  'target' => $target,
479
+ 'link_insertion_type' => $this->_helper_functions->get_option( 'ta_link_insertion_type' , 'link' ),
480
  'other_atts' => apply_filters( 'ta_link_insert_extend_data_attributes' , array() , $thirstylink , $post_id )
481
  );
482
 
Models/Rewrites_Redirection.php CHANGED
@@ -251,9 +251,8 @@ class Rewrites_Redirection implements Model_Interface , Deactivatable_Interface
251
  public function pass_query_string_to_destination_url( $redirect_url , $thirstylink ) {
252
 
253
  $query_string = isset( $_SERVER[ 'QUERY_STRING' ] ) ? $_SERVER[ 'QUERY_STRING' ] : '';
254
- $pass_query_str = $thirstylink->get_prop( 'pass_query_str' ) == 'global' ? get_option( 'ta_pass_query_str' ) : $thirstylink->get_prop( 'pass_query_str' );
255
 
256
- if ( ! $query_string || $pass_query_str !== 'yes' )
257
  return $redirect_url;
258
 
259
  $connector = ( strpos( $redirect_url , '?' ) === false ) ? '?' : '&';
251
  public function pass_query_string_to_destination_url( $redirect_url , $thirstylink ) {
252
 
253
  $query_string = isset( $_SERVER[ 'QUERY_STRING' ] ) ? $_SERVER[ 'QUERY_STRING' ] : '';
 
254
 
255
+ if ( ! $query_string || ! $thirstylink->is( 'pass_query_str' ) )
256
  return $redirect_url;
257
 
258
  $connector = ( strpos( $redirect_url , '?' ) === false ) ? '?' : '&';
Models/Script_Loader.php CHANGED
@@ -132,13 +132,13 @@ class Script_Loader implements Model_Interface {
132
  }
133
 
134
  // Link picker styles and scripts.
135
- if ( is_admin() && current_user_can( 'edit_posts' ) && ! in_array( $screen->base , array( 'widgets' , 'customize' ) ) ) {
136
 
137
  wp_enqueue_style( 'thirstyaffiliates-tinymce' , $this->_constants->CSS_ROOT_URL() . 'admin/tinymce/editor.css' , array( 'thickbox' ) , Plugin_Constants::VERSION , 'screen' );
138
 
139
  wp_enqueue_script( 'ta_editor_js', $this->_constants->JS_ROOT_URL() . 'app/ta-editor.js', array( 'jquery' , 'thickbox' ), Plugin_Constants::VERSION , true );
140
  wp_localize_script( 'ta_editor_js' , 'ta_editor_var' , apply_filters( 'ta_editor_linkpicker_jsvars' , array(
141
- 'insertion_type' => get_option( 'ta_link_insertion_type' , 'link' ),
142
  'disable_qtag_buttons' => get_option( 'ta_disable_text_editor_buttons' , 'no' ),
143
  'html_editor_enable_aff_link_btn' => current_user_can( apply_filters( 'ta_enable_advance_link_picker' , 'edit_posts' ) ),
144
  'html_editor_enable_quick_add_btn' => current_user_can( apply_filters( 'ta_enable_quick_add_affiliate_link' , 'publish_posts' ) ),
@@ -148,6 +148,11 @@ class Script_Loader implements Model_Interface {
148
  'html_editor_quick_add_title' => __( 'Open quick add affiliate link dialog' , 'thirstyaffiliates' ),
149
  'simple_search_placeholder' => __( 'Type to search affiliate link' , 'thirstyaffiliates' )
150
  ) ) );
 
 
 
 
 
151
  }
152
 
153
 
@@ -155,13 +160,9 @@ class Script_Loader implements Model_Interface {
155
 
156
  // Settings
157
 
158
- // wp_enqueue_style( 'select2' , $this->_constants->CSS_ROOT_URL() . 'lib/select2/select2.min.css' , array() , Plugin_Constants::VERSION , 'all' );
159
- wp_enqueue_style( 'chosen' , $this->_constants->JS_ROOT_URL() . 'lib/chosen/chosen.min.css' , array() , Plugin_Constants::VERSION , 'all' );
160
  wp_enqueue_style( 'selectize' , $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.default.css' , array() , Plugin_Constants::VERSION , 'all' );
161
  wp_enqueue_style( 'ta_settings_css' , $this->_constants->CSS_ROOT_URL() . 'admin/ta-settings.css' , array() , Plugin_Constants::VERSION , 'all' );
162
 
163
- // wp_enqueue_script( 'select2', $this->_constants->JS_ROOT_URL() . 'lib/select2/select2.min.js', array( 'jquery' ), Plugin_Constants::VERSION , true );
164
- wp_enqueue_script( 'chosen' , $this->_constants->JS_ROOT_URL() . 'lib/chosen/chosen.jquery.min.js' , array( 'jquery' ) , Plugin_Constants::VERSION , true );
165
  wp_enqueue_script( 'selectize', $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.min.js' , array( 'jquery' , 'jquery-ui-core' , 'jquery-ui-sortable' ) , Plugin_Constants::VERSION , true );
166
  wp_enqueue_script( 'ta_settings_js', $this->_constants->JS_ROOT_URL() . 'app/ta-settings.js', array( 'jquery' ), Plugin_Constants::VERSION , true );
167
  wp_localize_script( 'ta_settings_js' , 'ta_settings_var' , array(
@@ -227,7 +228,7 @@ class Script_Loader implements Model_Interface {
227
 
228
  } elseif ( $screen->id === 'edit-thirstylink' ) {
229
 
230
- wp_enqueue_style( 'tap_affiliate_link_list' , $this->_constants->CSS_ROOT_URL() . 'admin/ta-affiliate-link-list.css' , array() , Plugin_Constants::VERSION , 'all' );
231
  }
232
 
233
  if ( get_option( 'ta_guided_tour_status' ) == 'open' && array_key_exists( $screen->id , $this->_guided_tour->get_screens() ) ) {
@@ -270,10 +271,12 @@ class Script_Loader implements Model_Interface {
270
 
271
  if ( apply_filters( 'ta_enqueue_tajs_script' , ( get_option( 'ta_enable_link_fixer' , 'yes' ) === 'yes' || get_option( 'ta_enable_stats_reporting_module' , 'yes' ) === 'yes' ) ) ) {
272
 
 
 
273
  // load main frontend script that holds the link fixer and stat record JS code
274
  wp_enqueue_script( 'ta_main_js' , $this->_constants->JS_ROOT_URL() . 'app/ta.js' , array() , Plugin_Constants::VERSION , true );
275
  wp_localize_script( 'ta_main_js' , 'thirsty_global_vars' , array(
276
- 'home_url' => str_replace( array( 'http:' , 'https:' ) , '' , home_url('/') ),
277
  'ajax_url' => admin_url( 'admin-ajax.php' ),
278
  'link_fixer_enabled' => get_option( 'ta_enable_link_fixer' , 'yes' ),
279
  'link_prefix' => $this->_helper_functions->get_thirstylink_link_prefix(),
132
  }
133
 
134
  // Link picker styles and scripts.
135
+ if ( is_admin() && current_user_can( 'edit_posts' ) && ! in_array( $screen->base , array( 'customize' ) ) ) {
136
 
137
  wp_enqueue_style( 'thirstyaffiliates-tinymce' , $this->_constants->CSS_ROOT_URL() . 'admin/tinymce/editor.css' , array( 'thickbox' ) , Plugin_Constants::VERSION , 'screen' );
138
 
139
  wp_enqueue_script( 'ta_editor_js', $this->_constants->JS_ROOT_URL() . 'app/ta-editor.js', array( 'jquery' , 'thickbox' ), Plugin_Constants::VERSION , true );
140
  wp_localize_script( 'ta_editor_js' , 'ta_editor_var' , apply_filters( 'ta_editor_linkpicker_jsvars' , array(
141
+ 'insertion_type' => $this->_helper_functions->get_option( 'ta_link_insertion_type' , 'link' ),
142
  'disable_qtag_buttons' => get_option( 'ta_disable_text_editor_buttons' , 'no' ),
143
  'html_editor_enable_aff_link_btn' => current_user_can( apply_filters( 'ta_enable_advance_link_picker' , 'edit_posts' ) ),
144
  'html_editor_enable_quick_add_btn' => current_user_can( apply_filters( 'ta_enable_quick_add_affiliate_link' , 'publish_posts' ) ),
148
  'html_editor_quick_add_title' => __( 'Open quick add affiliate link dialog' , 'thirstyaffiliates' ),
149
  'simple_search_placeholder' => __( 'Type to search affiliate link' , 'thirstyaffiliates' )
150
  ) ) );
151
+
152
+ if ( in_array( $screen->base , array( 'widgets' ) ) ) {
153
+ wp_enqueue_script( 'ta_tinymce_widget_editor', $this->_constants->JS_ROOT_URL() . 'lib/thirstymce/widget-editor.js', array( 'jquery' , 'thickbox' ), Plugin_Constants::VERSION , true );
154
+ wp_localize_script( 'ta_tinymce_widget_editor' , 'ta_widget_editor_url' , $this->_constants->JS_ROOT_URL() . 'lib/thirstymce' );
155
+ }
156
  }
157
 
158
 
160
 
161
  // Settings
162
 
 
 
163
  wp_enqueue_style( 'selectize' , $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.default.css' , array() , Plugin_Constants::VERSION , 'all' );
164
  wp_enqueue_style( 'ta_settings_css' , $this->_constants->CSS_ROOT_URL() . 'admin/ta-settings.css' , array() , Plugin_Constants::VERSION , 'all' );
165
 
 
 
166
  wp_enqueue_script( 'selectize', $this->_constants->JS_ROOT_URL() . 'lib/selectize/selectize.min.js' , array( 'jquery' , 'jquery-ui-core' , 'jquery-ui-sortable' ) , Plugin_Constants::VERSION , true );
167
  wp_enqueue_script( 'ta_settings_js', $this->_constants->JS_ROOT_URL() . 'app/ta-settings.js', array( 'jquery' ), Plugin_Constants::VERSION , true );
168
  wp_localize_script( 'ta_settings_js' , 'ta_settings_var' , array(
228
 
229
  } elseif ( $screen->id === 'edit-thirstylink' ) {
230
 
231
+ wp_enqueue_style( 'ta_affiliate_link_list' , $this->_constants->CSS_ROOT_URL() . 'admin/ta-affiliate-link-list.css' , array() , Plugin_Constants::VERSION , 'all' );
232
  }
233
 
234
  if ( get_option( 'ta_guided_tour_status' ) == 'open' && array_key_exists( $screen->id , $this->_guided_tour->get_screens() ) ) {
271
 
272
  if ( apply_filters( 'ta_enqueue_tajs_script' , ( get_option( 'ta_enable_link_fixer' , 'yes' ) === 'yes' || get_option( 'ta_enable_stats_reporting_module' , 'yes' ) === 'yes' ) ) ) {
273
 
274
+ $home_url = parse_url( home_url() );
275
+
276
  // load main frontend script that holds the link fixer and stat record JS code
277
  wp_enqueue_script( 'ta_main_js' , $this->_constants->JS_ROOT_URL() . 'app/ta.js' , array() , Plugin_Constants::VERSION , true );
278
  wp_localize_script( 'ta_main_js' , 'thirsty_global_vars' , array(
279
+ 'home_url' => '//' . $home_url[ 'host' ] . '/', // str_replace( array( 'http:' , 'https:' ) , '' , home_url('/') ),
280
  'ajax_url' => admin_url( 'admin-ajax.php' ),
281
  'link_fixer_enabled' => get_option( 'ta_enable_link_fixer' , 'yes' ),
282
  'link_prefix' => $this->_helper_functions->get_thirstylink_link_prefix(),
Models/Settings.php CHANGED
@@ -222,6 +222,14 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
222
  'import_global_settings'
223
  ) );
224
 
 
 
 
 
 
 
 
 
225
  $this->_settings_sections = apply_filters( 'ta_settings_option_sections' , array(
226
  'ta_general_settings' => array(
227
  'title' => __( 'General' , 'thirstyaffiliates' ) ,
@@ -343,30 +351,73 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
343
  'desc' => __( "This is the type of redirect ThirstyAffiliates will use to redirect the user to your affiliate link." , 'thirstyaffiliates' ),
344
  'type' => 'radio',
345
  'options' => $this->_constants->REDIRECT_TYPES(),
 
346
  ),
347
 
348
  array(
349
  'id' => 'ta_no_follow',
350
  'title' => __( 'Use no follow on links?' , 'thirstyaffiliates' ),
351
  'desc' => __( "Add the nofollow attribute to links so search engines don't index them." , 'thirstyaffiliates' ),
352
- 'type' => 'toggle',
353
- 'default' => 'no'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  ),
355
 
356
  array(
357
  'id' => 'ta_new_window',
358
  'title' => __( 'Open links in new window?' , 'thirstyaffiliates' ),
359
  'desc' => __( "Make links open in a new browser tab by default." , 'thirstyaffiliates' ),
360
- 'type' => 'toggle',
361
- 'default' => 'no'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  ),
363
 
364
  array(
365
  'id' => 'ta_pass_query_str',
366
  'title' => __( 'Pass query strings to destination url?' , 'thirstyaffiliates' ),
367
  'desc' => __( "Enabling this option will pass all of the query strings present after the cloaked url to the destination url automatically when redirecting." , 'thirstyaffiliates' ),
368
- 'type' => 'toggle',
369
- 'default' => 'no'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  ),
371
 
372
  array(
@@ -395,7 +446,7 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
395
  'title' => __( 'Select Category to Uncloak' , 'thirstyaffiliates' ),
396
  'desc' => __( "The links assigned to the selected category will be uncloaked." , 'thirstyaffiliates' ),
397
  'type' => 'multiselect',
398
- 'options' => $this->_helper_functions->get_all_category_as_options(),
399
  'default' => array(),
400
  'condition_cb' => function() { return get_option( 'ta_uncloak_link_per_link' ) === 'yes'; },
401
  'placeholder' => __( 'Select category...' , 'thirstyaffiliates' )
@@ -997,39 +1048,34 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
997
  */
998
  public function render_select_option_field( $option ) {
999
 
1000
- $allow_deselect = isset( $option[ 'allow_deselect' ] ) && $option[ 'allow_deselect' ]; ?>
1001
 
1002
  <tr valign="top" class="<?php echo esc_attr( $option[ 'id' ] ) . '-row'; ?>">
1003
  <th scope="row"><?php echo sanitize_text_field( $option[ 'title' ] ); ?></th>
1004
 
1005
- <td class="forminp forminp-<?php echo sanitize_title( $option[ 'type' ] ) ?>">
1006
  <select
1007
  data-placeholder = "<?php echo isset( $option[ 'placeholder' ] ) ? $option[ 'placeholder' ] : 'Choose an option...' ; ?>"
1008
  name = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1009
  id = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1010
- class = "option-field chosen-select <?php echo isset( $option[ 'class' ] ) ? esc_attr( $option[ 'class' ] ) : ''; ?>"
1011
  style = "<?php echo isset( $option[ 'style' ] ) ? $option[ 'style' ] : 'width:360px;'; ?>">
1012
 
1013
- <?php if ( $allow_deselect ) { ?>
1014
- <option value=""></option>
1015
- <?php } ?>
1016
-
1017
  <?php foreach ( $option[ 'options' ] as $opt_key => $opt_text ) { ?>
1018
 
1019
- <option value="<?php echo $opt_key; ?>" <?php echo get_option( $option[ 'id' ] ) === $opt_key ? 'selected' : ''; ?>><?php echo $opt_text; ?></option>
1020
 
1021
  <?php } ?>
1022
  </select>
1023
- <br>
1024
  <p class="desc"><?php echo isset( $option[ 'desc' ] ) ? $option[ 'desc' ] : ''; ?></p>
1025
  </td>
1026
 
1027
  <script>
1028
  jQuery( document ).ready( function( $ ) {
1029
 
1030
- <?php echo $allow_deselect ? 'var allow_deselect = true;' : 'var allow_deselect = false;'; ?>
1031
-
1032
- $( '#<?php echo esc_attr( $option[ 'id' ] ); ?>' ).chosen( { allow_single_deselect : allow_deselect } );
1033
 
1034
  } );
1035
  </script>
@@ -1062,8 +1108,9 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
1062
  data-placeholder = "<?php echo isset( $option[ 'placeholder' ] ) ? $option[ 'placeholder' ] : 'Choose an option...' ; ?>"
1063
  name = "<?php echo esc_attr( $option[ 'id' ] ); ?>[]"
1064
  id = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1065
- class = "option-field chosen-select <?php echo isset( $option[ 'class' ] ) ? esc_attr( $option[ 'class' ] ) : ''; ?>"
1066
- style = "<?php echo isset( $option[ 'style' ] ) ? $option[ 'style' ] : 'width:360px;'; ?>">
 
1067
 
1068
  <?php foreach ( $option[ 'options' ] as $opt_key => $opt_text ) { ?>
1069
 
@@ -1078,7 +1125,9 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
1078
  <script>
1079
  jQuery( document ).ready( function( $ ) {
1080
 
1081
- $( '#<?php echo esc_attr( $option[ 'id' ] ); ?>' ).chosen();
 
 
1082
 
1083
  } );
1084
  </script>
222
  'import_global_settings'
223
  ) );
224
 
225
+ // Toggle options for settings with 'category' as an option.
226
+ $toggle_cat_options = array(
227
+ 'yes' => __( 'Yes' , 'thirstyaffiliates' ),
228
+ 'no' => __( 'No' , 'thirstyaffiliates' ),
229
+ 'category' => __( 'Per category' , 'thirstyaffiliates' )
230
+ );
231
+ $all_categories = $this->_helper_functions->get_all_category_as_options();
232
+
233
  $this->_settings_sections = apply_filters( 'ta_settings_option_sections' , array(
234
  'ta_general_settings' => array(
235
  'title' => __( 'General' , 'thirstyaffiliates' ) ,
351
  'desc' => __( "This is the type of redirect ThirstyAffiliates will use to redirect the user to your affiliate link." , 'thirstyaffiliates' ),
352
  'type' => 'radio',
353
  'options' => $this->_constants->REDIRECT_TYPES(),
354
+ 'default' => 302
355
  ),
356
 
357
  array(
358
  'id' => 'ta_no_follow',
359
  'title' => __( 'Use no follow on links?' , 'thirstyaffiliates' ),
360
  'desc' => __( "Add the nofollow attribute to links so search engines don't index them." , 'thirstyaffiliates' ),
361
+ 'type' => 'select',
362
+ 'options' => $toggle_cat_options,
363
+ 'default' => 'no',
364
+ 'class' => 'toggle-cat'
365
+ ),
366
+
367
+ array(
368
+ 'id' => 'ta_no_follow_category',
369
+ 'title' => __( 'No follow categories' , 'thirstyaffiliates' ),
370
+ 'desc' => __( "The links assigned to the selected category will be set as \"no follow\"." , 'thirstyaffiliates' ),
371
+ 'type' => 'multiselect',
372
+ 'options' => $all_categories,
373
+ 'default' => array(),
374
+ 'placeholder' => __( 'Select category...' , 'thirstyaffiliates' ),
375
+ 'class' => 'toggle-cat-select toggle-cat-ta_no_follow',
376
+ 'required' => true,
377
  ),
378
 
379
  array(
380
  'id' => 'ta_new_window',
381
  'title' => __( 'Open links in new window?' , 'thirstyaffiliates' ),
382
  'desc' => __( "Make links open in a new browser tab by default." , 'thirstyaffiliates' ),
383
+ 'type' => 'select',
384
+ 'options' => $toggle_cat_options,
385
+ 'default' => 'no',
386
+ 'class' => 'toggle-cat'
387
+ ),
388
+
389
+ array(
390
+ 'id' => 'ta_new_window_category',
391
+ 'title' => __( 'New window categories' , 'thirstyaffiliates' ),
392
+ 'desc' => __( "The links assigned to the selected category will be set as \"new window\"." , 'thirstyaffiliates' ),
393
+ 'type' => 'multiselect',
394
+ 'options' => $all_categories,
395
+ 'default' => array(),
396
+ 'placeholder' => __( 'Select category...' , 'thirstyaffiliates' ),
397
+ 'class' => 'toggle-cat-select toggle-cat-ta_new_window',
398
+ 'required' => true,
399
  ),
400
 
401
  array(
402
  'id' => 'ta_pass_query_str',
403
  'title' => __( 'Pass query strings to destination url?' , 'thirstyaffiliates' ),
404
  'desc' => __( "Enabling this option will pass all of the query strings present after the cloaked url to the destination url automatically when redirecting." , 'thirstyaffiliates' ),
405
+ 'type' => 'select',
406
+ 'options' => $toggle_cat_options,
407
+ 'default' => 'no',
408
+ 'class' => 'toggle-cat',
409
+ ),
410
+
411
+ array(
412
+ 'id' => 'ta_pass_query_str_category',
413
+ 'title' => __( 'Pass query strings categories' , 'thirstyaffiliates' ),
414
+ 'desc' => __( "The links assigned to the selected category will be set as \"pass query strings\"." , 'thirstyaffiliates' ),
415
+ 'type' => 'multiselect',
416
+ 'options' => $all_categories,
417
+ 'default' => array(),
418
+ 'placeholder' => __( 'Select category...' , 'thirstyaffiliates' ),
419
+ 'class' => 'toggle-cat-select toggle-cat-ta_pass_query_str',
420
+ 'required' => true,
421
  ),
422
 
423
  array(
446
  'title' => __( 'Select Category to Uncloak' , 'thirstyaffiliates' ),
447
  'desc' => __( "The links assigned to the selected category will be uncloaked." , 'thirstyaffiliates' ),
448
  'type' => 'multiselect',
449
+ 'options' => $all_categories,
450
  'default' => array(),
451
  'condition_cb' => function() { return get_option( 'ta_uncloak_link_per_link' ) === 'yes'; },
452
  'placeholder' => __( 'Select category...' , 'thirstyaffiliates' )
1048
  */
1049
  public function render_select_option_field( $option ) {
1050
 
1051
+ $option_value = $this->_helper_functions->get_option( $option[ 'id' ] , $option[ 'default' ] ); ?>
1052
 
1053
  <tr valign="top" class="<?php echo esc_attr( $option[ 'id' ] ) . '-row'; ?>">
1054
  <th scope="row"><?php echo sanitize_text_field( $option[ 'title' ] ); ?></th>
1055
 
1056
+ <td class="forminp forminp-<?php echo sanitize_title( $option[ 'type' ] ) ?> <?php echo isset( $option[ 'class' ] ) ? esc_attr( $option[ 'class' ] ) : ''; ?>">
1057
  <select
1058
  data-placeholder = "<?php echo isset( $option[ 'placeholder' ] ) ? $option[ 'placeholder' ] : 'Choose an option...' ; ?>"
1059
  name = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1060
  id = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1061
+ class = "option-field selectize-select <?php echo isset( $option[ 'class' ] ) ? esc_attr( $option[ 'class' ] ) : ''; ?>"
1062
  style = "<?php echo isset( $option[ 'style' ] ) ? $option[ 'style' ] : 'width:360px;'; ?>">
1063
 
 
 
 
 
1064
  <?php foreach ( $option[ 'options' ] as $opt_key => $opt_text ) { ?>
1065
 
1066
+ <option value="<?php echo $opt_key; ?>" <?php selected( $option_value , $opt_key ); ?>><?php echo $opt_text; ?></option>
1067
 
1068
  <?php } ?>
1069
  </select>
 
1070
  <p class="desc"><?php echo isset( $option[ 'desc' ] ) ? $option[ 'desc' ] : ''; ?></p>
1071
  </td>
1072
 
1073
  <script>
1074
  jQuery( document ).ready( function( $ ) {
1075
 
1076
+ $( '#<?php echo esc_attr( $option[ 'id' ] ); ?>' ).selectize({
1077
+ searchField : 'text'
1078
+ });
1079
 
1080
  } );
1081
  </script>
1108
  data-placeholder = "<?php echo isset( $option[ 'placeholder' ] ) ? $option[ 'placeholder' ] : 'Choose an option...' ; ?>"
1109
  name = "<?php echo esc_attr( $option[ 'id' ] ); ?>[]"
1110
  id = "<?php echo esc_attr( $option[ 'id' ] ); ?>"
1111
+ class = "option-field selectize-select <?php echo isset( $option[ 'class' ] ) ? esc_attr( $option[ 'class' ] ) : ''; ?>"
1112
+ style = "<?php echo isset( $option[ 'style' ] ) ? $option[ 'style' ] : 'width:360px;'; ?>"
1113
+ <?php echo isset( $option[ 'required' ] ) && $option[ 'required' ] ? 'required' : '' ?>>
1114
 
1115
  <?php foreach ( $option[ 'options' ] as $opt_key => $opt_text ) { ?>
1116
 
1125
  <script>
1126
  jQuery( document ).ready( function( $ ) {
1127
 
1128
+ $( '#<?php echo esc_attr( $option[ 'id' ] ); ?>' ).selectize({
1129
+ plugins : [ 'remove_button' , 'drag_drop' ]
1130
+ });
1131
 
1132
  } );
1133
  </script>
Models/Shortcodes.php CHANGED
@@ -150,6 +150,8 @@ class Shortcodes implements Model_Interface {
150
 
151
  global $post;
152
 
 
 
153
  $atts = shortcode_atts( array(
154
  'ids' => '',
155
  'linkid' => '',
@@ -185,7 +187,7 @@ class Shortcodes implements Model_Interface {
185
 
186
  // load thirstylink
187
  $thirstylink = new Affiliate_Link( $link_id );
188
- $uncloak_link = $this->_helper_functions->is_uncloak_link( $thirstylink );
189
 
190
  // get the link URL
191
  $link_attributes[ 'href' ] = ( $uncloak_link ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
@@ -200,16 +202,14 @@ class Shortcodes implements Model_Interface {
200
  // check for nofollow defaults if no value is set
201
  if ( empty( $link_attributes[ 'rel' ] ) ) {
202
 
203
- $nofollow = $thirstylink->get_prop( 'no_follow' ) == 'global' ? get_option( 'ta_no_follow' ) : $thirstylink->get_prop( 'no_follow' );
204
- $link_attributes[ 'rel' ] = $nofollow == 'yes' ? 'nofollow' : '';
205
  $link_attributes[ 'rel' ] .= ' ' . $thirstylink->get_prop( 'rel_tags' );
206
  }
207
 
208
  // check for new window defaults if no value is set
209
  if ( empty( $link_attributes[ 'target' ] ) ) {
210
 
211
- $new_window = $thirstylink->get_prop( 'new_window' ) == 'global' ? get_option( 'ta_new_window' ) : $thirstylink->get_prop( 'new_window' );
212
- $link_attributes[ 'target' ] = $new_window == 'yes' ? '_blank' : '';
213
  }
214
 
215
  // provide default class value if it is not set
@@ -228,7 +228,7 @@ class Shortcodes implements Model_Interface {
228
  $link_attributes[ 'data-linkid' ] = $link_id;
229
 
230
  // allow the ability to add custom link attributes
231
- $link_attributes = apply_filters( 'ta_link_insert_extend_data_attributes' , $link_attributes , $thirstylink , $post->ID );
232
 
233
  // Build the link ready for output
234
  $output .= '<a';
150
 
151
  global $post;
152
 
153
+ $post_id = is_a( $post , 'WP_Post' ) ? $post->ID : 0;
154
+
155
  $atts = shortcode_atts( array(
156
  'ids' => '',
157
  'linkid' => '',
187
 
188
  // load thirstylink
189
  $thirstylink = new Affiliate_Link( $link_id );
190
+ $uncloak_link = $thirstylink->is( 'uncloak_link' );
191
 
192
  // get the link URL
193
  $link_attributes[ 'href' ] = ( $uncloak_link ) ? apply_filters( 'ta_uncloak_link_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink ) : $thirstylink->get_prop( 'permalink' );
202
  // check for nofollow defaults if no value is set
203
  if ( empty( $link_attributes[ 'rel' ] ) ) {
204
 
205
+ $link_attributes[ 'rel' ] = $thirstylink->is( 'no_follow' ) ? 'nofollow' : '';
 
206
  $link_attributes[ 'rel' ] .= ' ' . $thirstylink->get_prop( 'rel_tags' );
207
  }
208
 
209
  // check for new window defaults if no value is set
210
  if ( empty( $link_attributes[ 'target' ] ) ) {
211
 
212
+ $link_attributes[ 'target' ] = $thirstylink->is( 'new_window' ) ? '_blank' : '';
 
213
  }
214
 
215
  // provide default class value if it is not set
228
  $link_attributes[ 'data-linkid' ] = $link_id;
229
 
230
  // allow the ability to add custom link attributes
231
+ $link_attributes = apply_filters( 'ta_link_insert_extend_data_attributes' , $link_attributes , $thirstylink , $post_id );
232
 
233
  // Build the link ready for output
234
  $output .= '<a';
Models/Stats_Reporting.php CHANGED
@@ -125,6 +125,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
125
  *
126
  * @since 3.0.0
127
  * @since 3.1.0 Set to save additional information: $cloaked_url , $redirect_url and $redirect_type.
 
128
  * @access private
129
  *
130
  * @global wpdb $wpdb Object that contains a set of functions used to interact with a database.
@@ -134,8 +135,9 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
134
  * @param string cloaked_url Affiliate link cloaked url.
135
  * @param string $redirect_url Link to where user is redirected to.
136
  * @param string $redirect_type Redirect type (301,302, etc.)
 
137
  */
138
- private function save_click_data( $thirstylink , $http_referer , $cloaked_url , $redirect_url , $redirect_type ) {
139
 
140
  global $wpdb;
141
 
@@ -162,15 +164,20 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
162
  'http_referer' => $http_referer,
163
  'cloaked_url' => $cloaked_url,
164
  'redirect_url' => $redirect_url,
165
- 'redirect_type' => $redirect_type
 
166
  ), $thirstylink );
167
 
168
  foreach ( $meta_data as $key => $value ) {
169
 
 
 
 
 
170
  $wpdb->insert(
171
  $link_click_meta_db,
172
  array(
173
- 'click_id' => $click_id,
174
  'meta_key' => $key,
175
  'meta_value' => $value
176
  )
@@ -208,6 +215,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
208
  *
209
  * @since 3.0.0
210
  * @since 3.1.0 Updated save_click_data function call to include new required arguments.
 
211
  * @access public
212
  */
213
  public function ajax_save_click_data_on_redirect() {
@@ -218,6 +226,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
218
  $link_id = isset( $_REQUEST[ 'link_id' ] ) ? (int) sanitize_text_field( $_REQUEST[ 'link_id' ] ) : 0;
219
  $http_referer = isset( $_REQUEST[ 'page' ] ) ? esc_url_raw( $_REQUEST[ 'page' ] ) : '';
220
  $cloaked_url = isset( $_REQUEST[ 'href' ] ) ? esc_url_raw( $_REQUEST[ 'href' ] ) : '';
 
221
 
222
  if ( ! $link_id )
223
  $link_id = url_to_postid( $cloaked_url );
@@ -228,7 +237,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
228
  $redirect_url = apply_filters( 'ta_filter_redirect_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink );
229
  $redirect_type = $thirstylink->get_prop( 'redirect_type' );
230
 
231
- $this->save_click_data( $thirstylink , $http_referer , $cloaked_url , $redirect_url , $redirect_type );
232
  }
233
 
234
  wp_die();
@@ -589,8 +598,14 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
589
 
590
  case '7day' :
591
  default :
 
 
 
 
 
 
592
  $data[ 'type' ] = '7day';
593
- $data[ 'start_date' ] = new \DateTime( 'now -6 days' , $timezone );
594
  $data[ 'end_date' ] = $now;
595
  break;
596
  }
@@ -643,7 +658,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
643
  foreach ( $months as $key => $month ) {
644
 
645
  $month_time = $this->get_month_first_day_datetime_obj( $month );
646
- $next_month = $this->get_month_first_day_datetime_obj( $months[ $key + 1 ] );
647
 
648
  $flot_data[] = array(
649
  'timestamp' => $month_time->format( 'U' ),
125
  *
126
  * @since 3.0.0
127
  * @since 3.1.0 Set to save additional information: $cloaked_url , $redirect_url and $redirect_type.
128
+ * @since 3.2.0 Set to save additonal information: keyword.
129
  * @access private
130
  *
131
  * @global wpdb $wpdb Object that contains a set of functions used to interact with a database.
135
  * @param string cloaked_url Affiliate link cloaked url.
136
  * @param string $redirect_url Link to where user is redirected to.
137
  * @param string $redirect_type Redirect type (301,302, etc.)
138
+ * @param string $keyword Affiliate link keyword.
139
  */
140
+ private function save_click_data( $thirstylink , $http_referer , $cloaked_url , $redirect_url , $redirect_type , $keyword = '' ) {
141
 
142
  global $wpdb;
143
 
164
  'http_referer' => $http_referer,
165
  'cloaked_url' => $cloaked_url,
166
  'redirect_url' => $redirect_url,
167
+ 'redirect_type' => $redirect_type,
168
+ 'keyword' => $keyword,
169
  ), $thirstylink );
170
 
171
  foreach ( $meta_data as $key => $value ) {
172
 
173
+ // make sure there is a key and a value before saving.
174
+ if ( ! $key || ! $value )
175
+ continue;
176
+
177
  $wpdb->insert(
178
  $link_click_meta_db,
179
  array(
180
+ 'click_id' => $click_id,
181
  'meta_key' => $key,
182
  'meta_value' => $value
183
  )
215
  *
216
  * @since 3.0.0
217
  * @since 3.1.0 Updated save_click_data function call to include new required arguments.
218
+ * @since 3.2.0 Updated save_click_data function call to include keyword argument.
219
  * @access public
220
  */
221
  public function ajax_save_click_data_on_redirect() {
226
  $link_id = isset( $_REQUEST[ 'link_id' ] ) ? (int) sanitize_text_field( $_REQUEST[ 'link_id' ] ) : 0;
227
  $http_referer = isset( $_REQUEST[ 'page' ] ) ? esc_url_raw( $_REQUEST[ 'page' ] ) : '';
228
  $cloaked_url = isset( $_REQUEST[ 'href' ] ) ? esc_url_raw( $_REQUEST[ 'href' ] ) : '';
229
+ $keyword = isset( $_REQUEST[ 'keyword' ] ) ? sanitize_text_field( $_REQUEST[ 'keyword' ] ) : '';
230
 
231
  if ( ! $link_id )
232
  $link_id = url_to_postid( $cloaked_url );
237
  $redirect_url = apply_filters( 'ta_filter_redirect_url' , $thirstylink->get_prop( 'destination_url' ) , $thirstylink );
238
  $redirect_type = $thirstylink->get_prop( 'redirect_type' );
239
 
240
+ $this->save_click_data( $thirstylink , $http_referer , $cloaked_url , $redirect_url , $redirect_type , $keyword );
241
  }
242
 
243
  wp_die();
598
 
599
  case '7day' :
600
  default :
601
+ $start_date = new \DateTime( 'now -6 days' , $timezone );
602
+
603
+ // set hours, minutes and seconds to zero
604
+ $start_date->setTime( 0 , 0 , 0 );
605
+ $now->setTime( 23 , 59 , 59 );
606
+
607
  $data[ 'type' ] = '7day';
608
+ $data[ 'start_date' ] = $start_date;
609
  $data[ 'end_date' ] = $now;
610
  break;
611
  }
658
  foreach ( $months as $key => $month ) {
659
 
660
  $month_time = $this->get_month_first_day_datetime_obj( $month );
661
+ $next_month = isset( $months[ $key + 1 ] ) ? $this->get_month_first_day_datetime_obj( $months[ $key + 1 ] ) : new \DateTime( 'now' , $timezone );
662
 
663
  $flot_data[] = array(
664
  'timestamp' => $month_time->format( 'U' ),
css/admin/ta-settings.css CHANGED
@@ -1,3 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .ta-settings .form-table td,
2
  .ta-settings .form-table th {
3
  vertical-align: top;
@@ -23,12 +76,6 @@
23
  tr.ta_link_prefix_custom-row {
24
  display: none;
25
  }
26
- .ta-settings .uncloak-links-select2 , .ta-settings .select2 {
27
- width: 100%;
28
- }
29
- .ta_category_to_uncloak-row span.select2-selection__clear {
30
- display: none;
31
- }
32
  tr.ta_social_links-row ul {
33
  margin: 0;
34
  }
@@ -41,3 +88,15 @@ tr.ta_social_links-row ul li:nth-child(1) a {
41
  tr.ta_social_links-row ul li:nth-child(2) a {
42
  margin-right: 10px;
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wpbody-content {
2
+ padding-bottom: 10px;
3
+ overflow: hidden !important;
4
+ margin-bottom: 45px;
5
+ }
6
+ #wpbody-content .ta-settings {
7
+ position: relative;
8
+ }
9
+ #wpbody-content .ta-settings .nav-tab-wrapper {
10
+ float: left;
11
+ width: 150px;
12
+ border: 0;
13
+ margin-left: 20px;
14
+ }
15
+ #wpbody-content .ta-settings .nav-tab-wrapper a {
16
+ width: 100%;
17
+ float: right;
18
+ clear: right;
19
+ position: relative;
20
+ z-index: 3;
21
+ }
22
+ #wpbody-content .ta-settings .nav-tab-wrapper a.nav-tab-active {
23
+ border-right: 1px solid #f1f1f1;
24
+ }
25
+ #wpbody-content .ta-settings .nav-tab-wrapper a:last-child {
26
+ border-bottom: 1px solid #ccc;
27
+ }
28
+ #wpbody-content .ta-settings > form {
29
+ position: relative;
30
+ float:left;
31
+ padding-left: 20px;
32
+ width: -moz-calc(100% - 190px);
33
+ width: -webkit-calc(100% - 190px);
34
+ width: -o-calc(100% - 190px);
35
+ width: calc(100% - 190px);
36
+ }
37
+ #wpbody-content .ta-settings > form:before {
38
+ content: '';
39
+ position: absolute;
40
+ z-index: 1;
41
+ top: 0;
42
+ left:-1px;
43
+ display: block;
44
+ width: 1px;
45
+ height: 3000px;
46
+ border-left:1px solid #ccc;
47
+ }
48
+ #wpbody-content .ta-settings:after,
49
+ #wpbody-content .ta-settings .nav-tab-wrapper:after {
50
+ content: '';
51
+ display: table;
52
+ clear: both;
53
+ }
54
  .ta-settings .form-table td,
55
  .ta-settings .form-table th {
56
  vertical-align: top;
76
  tr.ta_link_prefix_custom-row {
77
  display: none;
78
  }
 
 
 
 
 
 
79
  tr.ta_social_links-row ul {
80
  margin: 0;
81
  }
88
  tr.ta_social_links-row ul li:nth-child(2) a {
89
  margin-right: 10px;
90
  }
91
+ td.forminp .selectize-input {
92
+ padding: 5px 8px;
93
+ }
94
+ td.forminp.toggle-cat select,
95
+ td.forminp.toggle-cat .selectize-input {
96
+ width: 120px !important;
97
+ display: inline-block;
98
+ }
99
+ td.forminp.toggle-cat .desc {
100
+ display: inline;
101
+ margin-left: 5px;
102
+ }
js/app/advance_link_picker/dist/advance-link-picker.js CHANGED
@@ -11,7 +11,7 @@
11
  *
12
  * Date: 2017-03-20T18:59Z
13
  */
14
- !function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):Ee.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(Le)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function v(){se.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),xe.ready()}function m(){this.expando=xe.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Fe.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&We.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Xe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Xe[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=_e.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Be(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",_e.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function k(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;n<r;n++)_e.set(e[n],"globalEval",!t||_e.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Qe.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Ve.exec(o)||["",""])[1].toLowerCase(),u=Ye[s]||Ye._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=k(f.appendChild(o),"script"),l&&C(a),n)for(c=0;o=a[c++];)Ge.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function P(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(_e.hasData(e)&&(o=_e.access(e),a=_e.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Fe.hasData(e)&&(s=Fe.access(e),u=xe.extend({},s),Fe.set(t,u))}}function H(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&nt.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),O(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(k(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,k(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Ge.test(l.type||"")&&!_e.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(it,""),c))}return e}function _(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(k(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&C(k(r,"script")),r.parentNode.removeChild(r));return e}function F(e,t,n){var r,i,o,a,s=e.style;return n=n||st(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&at.test(a)&&ot.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=dt.length;n--;)if((e=dt[n]+t)in pt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=R(e)||e),t}function W(e,t,n){var r=We.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+$e[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+$e[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+$e[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+$e[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+$e[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=st(e),o=F(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return at.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){gt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){ht=void 0}),ht=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=$e[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Be(e),v=_e.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=_e.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(v?"hidden"in v&&(g=v.hidden):v=_e.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),_e.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?v[r]:0,r,d),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=ht||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Le)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Et.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Le)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Pt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,ve=ge.toString,me=ve.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&ve.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(/^-ms-/,"ms-").replace(/-([a-z])/g,be)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var we=/*!
15
  * Sizzle CSS Selector Engine v2.3.3
16
  * https://sizzlejs.com/
17
  *
@@ -21,4 +21,4 @@
21
  *
22
  * Date: 2016-08-08
23
  */
24
- function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==L&&A(t),t=t||L,P)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!H||!H.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=C(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=ve.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[M]&&(i=v(i)),o&&!o[M]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],v=a.length,m=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:g(m,d,e,s,u),x=n?o||(r?e:v||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",v=r&&[],m=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!P);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&v.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(v,m,a,s);if(r){if(p>0)for(;h--;)v[h]||m[h]||(m[h]=G.call(u));m=g(m)}Q.apply(u,m),l&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),v};return i?r(a):a}var x,b,w,T,k,C,S,E,j,N,D,A,L,q,P,H,O,_,F,M="sizzle"+1*new Date,R=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,P=!k(L),R!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&P)return t.getElementsByClassName(e)},O=[],H=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||H.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(b.matchesSelector=he.test(_=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),O.push("!=",re)}),H=H.length&&new RegExp(H.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(q.compareDocumentPosition),F=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===R&&F(R,e)?-1:t===L||t.ownerDocument===R&&F(R,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&P&&!z[n+" "]&&(!O||!O.test(n))&&(!H||!H.test(n)))try{var r=_.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:b.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(d=v,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(me,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ye).toLowerCase(),function(t){var n;do{if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,C=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=m(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&C(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&P&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ye),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!P,n,!t||ve.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=we,xe.expr=we.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=we.uniqueSort,xe.text=we.getText,xe.isXMLDoc=we.isXML,xe.contains=we.contains,xe.escapeSelector=we.escape;var Te=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},ke=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ce=xe.expr.match.needsContext,Se=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ee=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&Ce.test(e)?xe(e):e||[],!1).length}});var je,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||je,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ne.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Se.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,je=xe(se);var De=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!Ce.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return ke((e.parentNode||{}).firstChild,e)},children:function(e){return ke(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Ae[e]||xe.uniqueSort(i),De.test(e)&&i.reverse()),this.pushStack(i)}});var Le=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var qe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&qe.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var Pe=xe.Deferred();xe.fn.ready=function(e){return Pe.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||Pe.resolveWith(se,[xe]))}}),xe.ready.then=Pe.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var He=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Oe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Oe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(Le)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var _e=new m,Fe=new m,Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Re=/[A-Z]/g;xe.extend({hasData:function(e){return Fe.hasData(e)||_e.hasData(e)},data:function(e,t,n){return Fe.access(e,t,n)},removeData:function(e,t){Fe.remove(e,t)},_data:function(e,t,n){return _e.access(e,t,n)},_removeData:function(e,t){_e.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Fe.get(a),1===a.nodeType&&!_e.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));_e.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Fe.set(this,e)}):He(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Fe.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Fe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Fe.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_e.get(e,t),n&&(!r||Array.isArray(n)?r=_e.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _e.get(e,n)||_e.access(e,n,{empty:xe.Callbacks("once memory").add(function(){_e.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=_e.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,We=new RegExp("^(?:([+-])=|)("+Ie+")([a-z%]*)$","i"),$e=["Top","Right","Bottom","Left"],Be=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},ze=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Xe={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Be(this)?xe(this).show():xe(this).hide()})}});var Ue=/^(?:checkbox|radio)$/i,Ve=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ge=/^$|\/(?:java|ecma)script/i,Ye={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Qe=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Je=se.documentElement,Ke=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=_e.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(Je,i),n.guid||(n.guid=xe.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Le)||[""],l=t.length;l--;)s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=_e.hasData(e)&&_e.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Le)||[""],l=t.length;l--;)if(s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||xe.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&_e.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(_e.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,it=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=k(s),o=k(e),r=0,i=o.length;r<i;r++)H(o[r],a[r]);if(t)if(n)for(o=o||k(e),a=a||k(s),r=0,i=o.length;r<i;r++)P(o[r],a[r]);else P(e,s);return a=k(s,"script"),a.length>0&&C(a,!u&&k(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Oe(n)){if(t=n[_e.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[_e.expando]=void 0}n[Fe.expando]&&(n[Fe.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return _(this,e,!0)},remove:function(e){return _(this,e)},text:function(e){return He(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(k(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return He(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ye[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(k(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(k(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var ot=/^margin/,at=new RegExp("^("+Ie+")(?!px)[a-z%]+$","i"),st=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Je.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,Je.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var ut=/^(none|table(?!-c[ea]).+)/,lt=/^--/,ct={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","Moz","ms"],pt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=F(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=lt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=We.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return lt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=F(e,t,r)),"normal"===i&&t in ft&&(i=ft[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!ut.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):ze(e,ct,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&st(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=We.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(F(e,"marginLeft"))||e.getBoundingClientRect().left-ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+$e[r]+t]=o[r]||o[r-2]||o[0];return i}},ot.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return He(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=st(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(Le);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Be).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||_e.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=_e.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&mt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=_e.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(ht=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),ht=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){gt||(gt=!0,X())},xe.fx.stop=function(){gt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var yt,xt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return He(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Le);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||xe.find.attr;xt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=xt[a],xt[a]=i,i=null!=n(e,t,r)?a:null,xt[a]=o),i}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return He(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Le)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(Le)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&_e.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":_e.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(/\r/g,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,Tt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(_e.get(s,"events")||{})[e.type]&&_e.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Oe(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Oe(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=_e.access(r,t);i||r.addEventListener(e,n,!0),_e.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=_e.access(r,t)-1;i?_e.access(r,t,i):(r.removeEventListener(e,n,!0),_e.remove(r,t))}}});var kt=o.location,Ct=xe.now(),St=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Et=/\[\]$/,jt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Nt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(/\r?\n/g,"\r\n")}}):{name:t.name,value:n.replace(/\r?\n/g,"\r\n")}}).get()}});var Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lt=/^(?:GET|HEAD)$/,qt={},Pt={},Ht="*/".concat("*"),Ot=se.createElement("a");Ot.href=kt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:At.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te(qt),ajaxTransport:te(Pt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",C.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,C,n)),h=oe(g,h,C,u),u?(g.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=C.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",u?y.resolveWith(v,[c,T,C]):y.rejectWith(v,[C,T,p]),C.statusCode(b),b=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[C,g,u?c:p]),x.fireWith(v,[C,T]),d&&(m.trigger("ajaxComplete",[C,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?xe(v):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},k="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Dt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),n(0,t),this}};if(y.promise(C),g.url=((e||g.url||kt.href)+"").replace(/^\/\//,kt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Le)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Ot.protocol+"//"+Ot.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne(qt,g,t,C),f)return C;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Lt.test(g.type),a=g.url.replace(/#.*$/,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(/%20/g,"+")):(h=g.url.slice(a.length),g.data&&(a+=(St.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(/([?&])_=[^&]*/,"$1"),h=(St.test(a)?"&":"?")+"_="+Ct+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&C.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Ht+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)C.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(v,C,g)||f))return C.abort();if(k="abort",x.add(g.complete),C.done(g.success),C.fail(g.error),r=ne(Pt,g,t,C)){if(C.readyState=1,d&&m.trigger("ajaxSend",[C,g]),f)return C;g.async&&g.timeout>0&&(l=o.setTimeout(function(){C.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},Ft=xe.ajaxSettings.xhr();ye.cors=!!Ft&&"withCredentials"in Ft,ye.ajax=Ft=!!Ft,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Ft&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(_t[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Mt=[],Rt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||xe.expando+"_"+Ct++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Rt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Rt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Se.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||Je})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return He(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=F(e,t),at.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return He(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var It=o.jQuery,Wt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Wt),e&&o.jQuery===xe&&(o.jQuery=It),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(4)(e))},function(e,t,n){"use strict";function r(){var e,t,n,r=(0,o.default)("#advanced_add_affiliate_link"),i=r.find(".search-panel"),a=r.find(".results-panel"),s=a.find("ul.results-list"),u=2,l=!0,c=void 0;i.on("keyup","#thirstylink-search",function(){var r=(0,o.default)(this),i=a.find(".load-more-results");if(!(l&&r.val().length<3)){if(c&&n!==r.val()&&(c.abort(),c=null),e||(e=s.html()),s.html("<li class='spinner'><i style='background-image: url("+Options.spinner_image+");'></i><span>"+Options.searching_text+"</span></li>"),(""==r.val()||r.val().length<3)&&!l)return u=2,s.html(e).show(),void i.show();if(n===r.val())return u=2,s.html(t).show(),void i.show();u=1,i.hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:r.val(),paged:u,advance:!0,post_id:Options.post_id},function(e){n=r.val(),l=!1,"success"==e.status&&(t=e.search_query_markup,s.html(e.search_query_markup).show(),u++,e.count<1?i.hide():i.show())},"json")}}),a.on("click",".load-more-results",function(){var e=(0,o.default)(this),t=i.find("#thirstylink-search");e.hasClass("fetching")||(e.addClass("fetching").css("padding-top","4px").find(".spinner").show(),e.find(".button-text").hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:t.val(),paged:u,advance:!0},function(t){if(e.removeClass("fetching").find(".spinner").hide(),e.find(".button-text").show(),"success"==t.status){if(u++,t.count<1)return void e.hide();s.append(t.search_query_markup)}},"json"))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(){var e,t,r,o,s,u,l,c,f,d,p,h,g,v,m,y=(0,a.default)(this).closest("li.thirstylink"),x=(0,a.default)(this).data("type"),b=n.data("htmleditor"),w="";if(parent.ThirstyLinkPicker.linkNode||b){if(e=b?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),t=y.data("linkid"),r=y.data("class"),o=r?' class="'+r+'"':"",s=y.data("href"),u=y.data("title"),l=u?' title="'+u+'"':"",c=y.find("span.name").text(),f=y.data("rel"),d=y.data("target"),v=y.data("other-atts"),!/^(?:[a-z]+:|#|\?|\.|\/)/.test(s))return;if("object"==(void 0===v?"undefined":i(v))&&Object.keys(v).length>0)for(var T in v)w+=T+'="'+v[T]+'" ';if("shortcode"==x)c=e.trim()?e:c,p='[thirstylink ids="'+t+'"]'+c+"[/thirstylink]",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(p):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(p),parent.ThirstyLinkPicker.inputInstance.reset());else if("image"==x)""!=r&&(o=' class="thirstylinkimg"'),g=(0,a.default)(this).data("imgid"),a.default.post(parent.ajaxurl,{action:"ta_get_image_markup_by_id",imgid:g},function(e){"success"==e.status&&(h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e.image_markup+"</a>",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(h):(parent.ThirstyLinkPicker.editor.selection.setContent(h),parent.ThirstyLinkPicker.inputInstance.reset())),parent.ThirstyLinkPicker.close_thickbox()},"json");else if(c=e.trim()?e:c,b)h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(h);else{if(m={class:r,title:u,href:s,rel:f,target:d,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===v?"undefined":i(v))&&Object.keys(v).length>0)for(T in v)m[T]=v[T];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,m),e.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(c),parent.ThirstyLinkPicker.inputInstance.reset()}g||parent.ThirstyLinkPicker.close_thickbox()}}var t=(0,a.default)("#advanced_add_affiliate_link"),n=t.find(".results-panel ul.results-list");n.on("click",".actions .insert-link-button",e),n.on("click",".actions .insert-shortcode-button",e),n.on("click",".images-block .images img",e),n.on("click",".actions .insert-image-button",function(){var e=(0,a.default)(this).closest(".thirstylink"),t=e.find(".images-block"),n=e.hasClass("show");(0,a.default)(".results-panel").find(".images-block").removeClass("show").hide(),n||t.slideDown("fast").addClass("show")})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u);n(3),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)()})}]);
11
  *
12
  * Date: 2017-03-20T18:59Z
13
  */
14
+ !function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):De.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(He)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){se.removeEventListener("DOMContentLoaded",m),o.removeEventListener("load",m),xe.ready()}function v(){this.expando=xe.expando+v.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:We.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Ie.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&ze.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ge[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ge[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Re.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ue(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Re.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function k(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function C(e,t){for(var n=0,r=e.length;n<r;n++)Re.set(e[n],"globalEval",!t||Re.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[s]||Ke._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=k(f.appendChild(o),"script"),l&&C(a),n)for(c=0;o=a[c++];)Je.test(o.type||"")&&n.push(o);return f}function E(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function L(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function P(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Re.hasData(e)&&(o=Re.access(e),a=Re.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Ie.hasData(e)&&(s=Ie.access(e),u=xe.extend({},s),Ie.set(t,u))}}function H(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function O(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),O(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(k(i,"script"),L),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,k(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Je.test(l.type||"")&&!Re.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(ut,""),c))}return e}function _(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(k(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&C(k(r,"script")),r.parentNode.removeChild(r));return e}function F(e,t,n){var r,i,o,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&ct.test(a)&&lt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in vt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in vt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=R(e)||e),t}function W(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+Xe[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+Xe[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+Xe[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+Xe[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+Xe[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=ft(e),o=F(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return ct.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){xt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){yt=void 0}),yt=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Ue(e),m=Re.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],bt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;g=!0}p[r]=m&&m[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=m&&m.display,null==l&&(l=Re.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(m?"hidden"in m&&(g=m.hidden):m=Re.access(e,"fxshow",{display:l}),o&&(m.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Re.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?m[r]:0,r,d),r in m||(m[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(He)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||Lt.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(He)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,me=ge.toString,ve=me.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,we=/^-ms-/,Te=/-([a-z])/g,ke=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&me.call(n)===ve)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(we,"ms-").replace(Te,ke)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(be,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var Ce=/*!
15
  * Sizzle CSS Selector Engine v2.3.3
16
  * https://sizzlejs.com/
17
  *
21
  *
22
  * Date: 2016-08-08
23
  */
24
+ function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==L&&A(t),t=t||L,P)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&F(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!H||!H.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=C(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=me.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function m(e,t,n,i,o,a){return i&&!i[M]&&(i=m(i)),o&&!o[M]&&(o=m(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],m=a.length,v=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,d,e,s,u),x=n?o||(r?e:m||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(m,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return m(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&v(e.slice(s,r)),r<i&&v(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",m=r&&[],v=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===L||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===L||(A(c),s=!P);d=e[f++];)if(d(c,a||L,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(m,v,a,s);if(r){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=G.call(u));v=g(v)}Q.apply(u,v),l&&!r&&v.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),m};return i?r(a):a}var x,b,w,T,k,C,S,E,j,N,D,A,L,q,P,H,O,_,F,M="sizzle"+1*new Date,R=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,q=L.documentElement,P=!k(L),R!==L&&(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(L.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(L.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!L.getElementsByName||!L.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&P){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&P)return t.getElementsByClassName(e)},O=[],H=[],(b.qsa=he.test(L.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||H.push("~="),e.querySelectorAll(":checked").length||H.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||H.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=L.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&H.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(b.matchesSelector=he.test(_=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),O.push("!=",re)}),H=H.length&&new RegExp(H.join("|")),O=O.length&&new RegExp(O.join("|")),t=he.test(q.compareDocumentPosition),F=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument===R&&F(R,e)?-1:t===L||t.ownerDocument===R&&F(R,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===L?-1:t===L?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},L):L},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==L&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&P&&!z[n+" "]&&(!O||!O.test(n))&&(!H||!H.test(n)))try{var r=_.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,L,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==L&&A(e),F(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==L&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:b.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(d=m,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,C=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=C(e)),n=t.length;n--;)o=v(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},E=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&C(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&P&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(ve,ye),me.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!P,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=Ce,xe.expr=Ce.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=Ce.uniqueSort,xe.text=Ce.getText,xe.isXMLDoc=Ce.isXML,xe.contains=Ce.contains,xe.escapeSelector=Ce.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ee=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},je=xe.expr.match.needsContext,Ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,De=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&je.test(e)?xe(e):e||[],!1).length}});var Ae,Le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Le.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ne.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,Ae=xe(se);var qe=/^(?:parents|prev(?:Until|All))/,Pe={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!je.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ee((e.parentNode||{}).firstChild,e)},children:function(e){return Ee(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Pe[e]||xe.uniqueSort(i),qe.test(e)&&i.reverse()),this.pushStack(i)}});var He=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&Oe.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var _e=xe.Deferred();xe.fn.ready=function(e){return _e.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||_e.resolveWith(se,[xe]))}}),xe.ready.then=_e.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",m),o.addEventListener("load",m));var Fe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};v.uid=1,v.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(He)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Re=new v,Ie=new v,We=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/[A-Z]/g;xe.extend({hasData:function(e){return Ie.hasData(e)||Re.hasData(e)},data:function(e,t,n){return Ie.access(e,t,n)},removeData:function(e,t){Ie.remove(e,t)},_data:function(e,t,n){return Re.access(e,t,n)},_removeData:function(e,t){Re.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Ie.get(a),1===a.nodeType&&!Re.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Re.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Ie.set(this,e)}):Fe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Ie.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Ie.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ie.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Re.get(e,t),n&&(!r||Array.isArray(n)?r=Re.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Re.get(e,n)||Re.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Re.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Re.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ze=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},Ve=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ge={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?xe(this).show():xe(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var Ze=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=se.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(et,i),n.guid||(n.guid=xe.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(He)||[""],l=t.length;l--;)s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,m=Re.hasData(e)&&Re.get(e);if(m&&(u=m.events)){for(t=(t||"").match(He)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||xe.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Re.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Re.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=k(s),o=k(e),r=0,i=o.length;r<i;r++)H(o[r],a[r]);if(t)if(n)for(o=o||k(e),a=a||k(s),r=0,i=o.length;r<i;r++)P(o[r],a[r]);else P(e,s);return a=k(s,"script"),a.length>0&&C(a,!u&&k(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[Re.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Re.expando]=void 0}n[Ie.expando]&&(n[Ie.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return _(this,e,!0)},remove:function(e){return _(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(k(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(k(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return O(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(k(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var lt=/^margin/,ct=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",et.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,et.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var dt=/^(none|table(?!-c[ea]).+)/,pt=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],vt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=F(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=pt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=ze.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return pt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=F(e,t,r)),"normal"===i&&t in gt&&(i=gt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!dt.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):Ve(e,ht,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&ft(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=ze.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(F(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ft(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var yt,xt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(He);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Re.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Re.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Re.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(yt=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),yt=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){xt||(xt=!0,X())},xe.fx.stop=function(){xt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Tt,kt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Fe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(He);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=kt[t]||xe.find.attr;kt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=kt[a],kt[a]=i,i=null!=n(e,t,r)?a:null,kt[a]=o),i}});var Ct=/^(?:input|select|textarea|button)$/i,St=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Fe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(He)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(He)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(He)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Re.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Re.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Et,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var jt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!jt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,jt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Re.get(s,"events")||{})[e.type]&&Re.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Me(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Me(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Re.access(r,t);i||r.addEventListener(e,n,!0),Re.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Re.access(r,t)-1;i?Re.access(r,t,i):(r.removeEventListener(e,n,!0),Re.remove(r,t))}}});var Nt=o.location,Dt=xe.now(),At=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var Lt=/\[\]$/,qt=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Ht.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ot=/%20/g,_t=/#.*$/,Ft=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,It=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Bt={},zt="*/".concat("*"),Xt=se.createElement("a");Xt.href=Nt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:Rt.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te($t),ajaxTransport:te(Bt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",C.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,C,n)),h=oe(g,h,C,u),u?(g.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=C.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(t||T)+"",u?y.resolveWith(m,[c,T,C]):y.rejectWith(m,[C,T,p]),C.statusCode(b),b=void 0,d&&v.trigger(u?"ajaxSuccess":"ajaxError",[C,g,u?c:p]),x.fireWith(m,[C,T]),d&&(v.trigger("ajaxComplete",[C,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),m=g.context||g,v=g.context&&(m.nodeType||m.jquery)?xe(m):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},k="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Mt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),n(0,t),this}};if(y.promise(C),g.url=((e||g.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(He)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne($t,g,t,C),f)return C;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!It.test(g.type),a=g.url.replace(_t,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ot,"+")):(h=g.url.slice(a.length),g.data&&(a+=(At.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(Ft,"$1"),h=(At.test(a)?"&":"?")+"_="+Dt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&C.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&C.setRequestHeader("Content-Type",g.contentType),C.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)C.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(m,C,g)||f))return C.abort();if(k="abort",x.add(g.complete),C.done(g.success),C.fail(g.error),r=ne(Bt,g,t,C)){if(C.readyState=1,d&&v.trigger("ajaxSend",[C,g]),f)return C;g.async&&g.timeout>0&&(l=o.setTimeout(function(){C.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return C},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=xe.ajaxSettings.xhr();ye.cors=!!Vt&&"withCredentials"in Vt,ye.ajax=Vt=!!Vt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Vt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||xe.expando+"_"+Dt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ne.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||et})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Fe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=F(e,t),ct.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Fe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var Qt=o.jQuery,Jt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Jt),e&&o.jQuery===xe&&(o.jQuery=Qt),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(4)(e))},function(e,t,n){"use strict";function r(){var e,t,n,r=(0,o.default)("#advanced_add_affiliate_link"),i=r.find(".search-panel"),a=r.find(".results-panel"),s=a.find("ul.results-list"),u=2,l=!0,c=void 0;i.on("keyup","#thirstylink-search",function(){var r=(0,o.default)(this),i=a.find(".load-more-results");if(!(l&&r.val().length<3)){if(c&&n!==r.val()&&(c.abort(),c=null),e||(e=s.html()),s.html("<li class='spinner'><i style='background-image: url("+Options.spinner_image+");'></i><span>"+Options.searching_text+"</span></li>"),(""==r.val()||r.val().length<3)&&!l)return u=2,s.html(e).show(),void i.show();if(n===r.val())return u=2,s.html(t).show(),void i.show();u=1,i.hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:r.val(),paged:u,advance:!0,post_id:Options.post_id},function(e){n=r.val(),l=!1,"success"==e.status&&(t=e.search_query_markup,s.html(e.search_query_markup).show(),u++,e.count<1?i.hide():i.show())},"json")}}),a.on("click",".load-more-results",function(){var e=(0,o.default)(this),t=i.find("#thirstylink-search");e.hasClass("fetching")||(e.addClass("fetching").css("padding-top","4px").find(".spinner").show(),e.find(".button-text").hide(),c=o.default.post(parent.ajaxurl,{action:"search_affiliate_links_query",keyword:t.val(),paged:u,advance:!0},function(t){if(e.removeClass("fetching").find(".spinner").hide(),e.find(".button-text").show(),"success"==t.status){if(u++,t.count<1)return void e.hide();s.append(t.search_query_markup)}},"json"))})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(){var e,t,r,o,s,u,l,c,f,d,p,h,g,m,v,y=(0,a.default)(this).closest("li.thirstylink"),x=(0,a.default)(this).data("type"),b=n.data("htmleditor"),w="";if(parent.ThirstyLinkPicker.linkNode||b){if(e=b?parent.ThirstyLinkPicker.get_html_editor_selection().text:parent.ThirstyLinkPicker.editor.selection.getContent(),t=y.data("linkid"),r=y.data("class"),o=r?' class="'+r+'"':"",s=y.data("href"),u=y.data("title"),l=u?' title="'+u+'"':"",c=y.find("span.name").text(),f=y.data("rel"),d=y.data("target"),m=y.data("other-atts"),!/^(?:[a-z]+:|#|\?|\.|\/)/.test(s))return;if("object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(var T in m)w+=T+'="'+m[T]+'" ';if("shortcode"==x)c=e.trim()?e:c,p='[thirstylink ids="'+t+'"]'+c+"[/thirstylink]",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(p):(parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.selection.setContent(p),parent.ThirstyLinkPicker.inputInstance.reset());else if("image"==x)""!=r&&(o=' class="thirstylinkimg"'),g=(0,a.default)(this).data("imgid"),a.default.post(parent.ajaxurl,{action:"ta_get_image_markup_by_id",imgid:g},function(e){"success"==e.status&&(h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e.image_markup+"</a>",b?parent.ThirstyLinkPicker.replace_html_editor_selected_text(h):(parent.ThirstyLinkPicker.close_thickbox(),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,""),parent.ThirstyLinkPicker.editor.execCommand("mceInsertContent",!1,h),parent.ThirstyLinkPicker.inputInstance.reset())),parent.ThirstyLinkPicker.close_thickbox()},"json");else if(c=e.trim()?e:c,b)h="<a"+o+l+' href="'+s+'" rel="'+f+'" target="'+d+'" '+w+">"+e+"</a>",parent.ThirstyLinkPicker.replace_html_editor_selected_text(h);else{if(v={class:r,title:u,href:s,rel:f,target:d,"data-wplink-edit":null,"data-thirstylink-edit":null},"object"==(void 0===m?"undefined":i(m))&&Object.keys(m).length>0)for(T in m)v[T]=m[T];parent.ThirstyLinkPicker.editor.execCommand("Unlink",!1,!1),parent.ThirstyLinkPicker.editor.execCommand("mceInsertLink",!1,v),e.trim()||parent.ThirstyLinkPicker.editor.selection.setContent(c),parent.ThirstyLinkPicker.inputInstance.reset()}g||parent.ThirstyLinkPicker.close_thickbox()}}var t=(0,a.default)("#advanced_add_affiliate_link"),n=t.find(".results-panel ul.results-list");n.on("click",".actions .insert-link-button",e),n.on("click",".actions .insert-shortcode-button",e),n.on("click",".images-block .images img",e),n.on("click",".actions .insert-image-button",function(){var e=(0,a.default)(this).closest(".thirstylink"),t=e.find(".images-block"),n=e.hasClass("show");(0,a.default)(".results-panel").find(".images-block").removeClass("show").hide(),n||t.slideDown("fast").addClass("show")})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u);n(3),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)()})}]);
js/app/affiliate_link_page/dist/affiliate-link-page.css CHANGED
@@ -1 +1 @@
1
- label.info-label{margin:0 10px 5px 0;display:inline-block}label.info-label .tooltip{display:inline-block;width:12px;height:12px;position:relative;top:1px;text-align:center;font-size:9px;font-family:Verdana;background-size:12px 12px;background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDkyIDkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA5MiA5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8Zz4KCTxwYXRoIGQ9Ik00NS4zODYsMC4wMDRDMTkuOTgzLDAuMzQ0LTAuMzMzLDIxLjIxNSwwLjAwNSw0Ni42MTljMC4zNCwyNS4zOTMsMjEuMjA5LDQ1LjcxNSw0Ni42MTEsNDUuMzc3ICAgYzI1LjM5OC0wLjM0Miw0NS43MTgtMjEuMjEzLDQ1LjM4LTQ2LjYxNUM5MS42NTYsMTkuOTg2LDcwLjc4Ni0wLjMzNSw0NS4zODYsMC4wMDR6IE00NS4yNSw3NGwtMC4yNTQtMC4wMDQgICBjLTMuOTEyLTAuMTE2LTYuNjctMi45OTgtNi41NTktNi44NTJjMC4xMDktMy43ODgsMi45MzQtNi41MzgsNi43MTctNi41MzhsMC4yMjcsMC4wMDRjNC4wMjEsMC4xMTksNi43NDgsMi45NzIsNi42MzUsNi45MzcgICBDNTEuOTA0LDcxLjM0Niw0OS4xMjMsNzQsNDUuMjUsNzR6IE02MS43MDUsNDEuMzQxYy0wLjkyLDEuMzA3LTIuOTQzLDIuOTMtNS40OTIsNC45MTZsLTIuODA3LDEuOTM4ICAgYy0xLjU0MSwxLjE5OC0yLjQ3MSwyLjMyNS0yLjgyLDMuNDM0Yy0wLjI3NSwwLjg3My0wLjQxLDEuMTA0LTAuNDM0LDIuODhsLTAuMDA0LDAuNDUxSDM5LjQzbDAuMDMxLTAuOTA3ICAgYzAuMTMxLTMuNzI4LDAuMjIzLTUuOTIxLDEuNzY4LTcuNzMzYzIuNDI0LTIuODQ2LDcuNzcxLTYuMjg5LDcuOTk4LTYuNDM1YzAuNzY2LTAuNTc3LDEuNDEyLTEuMjM0LDEuODkzLTEuOTM2ICAgYzEuMTI1LTEuNTUxLDEuNjIzLTIuNzcyLDEuNjIzLTMuOTcyYzAtMS42NjUtMC40OTQtMy4yMDUtMS40NzEtNC41NzZjLTAuOTM5LTEuMzIzLTIuNzIzLTEuOTkzLTUuMzAzLTEuOTkzICAgYy0yLjU1OSwwLTQuMzExLDAuODEyLTUuMzU5LDIuNDc4Yy0xLjA3OCwxLjcxMy0xLjYyMywzLjUxMi0xLjYyMyw1LjM1djAuNDU3SDI3LjkzNmwwLjAyLTAuNDc3ICAgYzAuMjg1LTYuNzY5LDIuNzAxLTExLjY0Myw3LjE3OC0xNC40ODdDMzcuOTQ3LDE4LjkxOCw0MS40NDcsMTgsNDUuNTMxLDE4YzUuMzQ2LDAsOS44NTksMS4yOTksMTMuNDEyLDMuODYxICAgYzMuNiwyLjU5Niw1LjQyNiw2LjQ4NCw1LjQyNiwxMS41NTZDNjQuMzY5LDM2LjI1NCw2My40NzMsMzguOTE5LDYxLjcwNSw0MS4zNDF6IiBmaWxsPSIjNzU3NTc1Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}label.info-label.block{display:block}.ta-form-input{height:31px;font-size:14px;border:1px solid #dfdfdf;width:100%;margin:0 0 5px;padding:5px}.clearfix:after{content:"";clear:both;display:table}.ta-input-description{color:#909090;padding-left:2px;font-style:italic;font-size:10px}div#edit-slug-box{padding-left:0}.submitdelete{color:red;font-weight:400;text-decoration:underline;margin-left:5px}#thirsty_image_holder{background:#fff;overflow:hidden;padding:0 0 20px;margin:10px 0 0;border:1px solid #dfdfdf;text-align:center}#thirsty_image_holder .thirsty-attached-image{position:relative;border:1px solid #eee;padding:5px;margin-left:20px;margin-top:20px;float:left}#thirsty_image_holder .thirsty-remove-img{position:absolute;top:-8px;right:-8px;background:#c00;color:#fff;font-size:16px;font-weight:700;line-height:.7em;padding:2px 3px 4px;border-radius:50px;cursor:pointer}#ta_upload_insert_img,#ta_upload_media_manager{margin-top:5px}#ta_upload_insert_img a{text-decoration:none}.wp-media-buttons-icon:before{content:"\F104";font-family:dashicons;font-size:12px}.attachments-browser .media-toolbar-secondary{width:300px;max-width:300px}.attachments-browser .media-toolbar-primary{width:200px;max-width:200px}
1
+ label.info-label{margin:0 10px 5px 0;display:inline-block}label.info-label .tooltip{display:inline-block;width:12px;height:12px;position:relative;top:1px;text-align:center;font-size:9px;font-family:Verdana;background-size:12px 12px;background-image:url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDkyIDkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA5MiA5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8Zz4KCTxwYXRoIGQ9Ik00NS4zODYsMC4wMDRDMTkuOTgzLDAuMzQ0LTAuMzMzLDIxLjIxNSwwLjAwNSw0Ni42MTljMC4zNCwyNS4zOTMsMjEuMjA5LDQ1LjcxNSw0Ni42MTEsNDUuMzc3ICAgYzI1LjM5OC0wLjM0Miw0NS43MTgtMjEuMjEzLDQ1LjM4LTQ2LjYxNUM5MS42NTYsMTkuOTg2LDcwLjc4Ni0wLjMzNSw0NS4zODYsMC4wMDR6IE00NS4yNSw3NGwtMC4yNTQtMC4wMDQgICBjLTMuOTEyLTAuMTE2LTYuNjctMi45OTgtNi41NTktNi44NTJjMC4xMDktMy43ODgsMi45MzQtNi41MzgsNi43MTctNi41MzhsMC4yMjcsMC4wMDRjNC4wMjEsMC4xMTksNi43NDgsMi45NzIsNi42MzUsNi45MzcgICBDNTEuOTA0LDcxLjM0Niw0OS4xMjMsNzQsNDUuMjUsNzR6IE02MS43MDUsNDEuMzQxYy0wLjkyLDEuMzA3LTIuOTQzLDIuOTMtNS40OTIsNC45MTZsLTIuODA3LDEuOTM4ICAgYy0xLjU0MSwxLjE5OC0yLjQ3MSwyLjMyNS0yLjgyLDMuNDM0Yy0wLjI3NSwwLjg3My0wLjQxLDEuMTA0LTAuNDM0LDIuODhsLTAuMDA0LDAuNDUxSDM5LjQzbDAuMDMxLTAuOTA3ICAgYzAuMTMxLTMuNzI4LDAuMjIzLTUuOTIxLDEuNzY4LTcuNzMzYzIuNDI0LTIuODQ2LDcuNzcxLTYuMjg5LDcuOTk4LTYuNDM1YzAuNzY2LTAuNTc3LDEuNDEyLTEuMjM0LDEuODkzLTEuOTM2ICAgYzEuMTI1LTEuNTUxLDEuNjIzLTIuNzcyLDEuNjIzLTMuOTcyYzAtMS42NjUtMC40OTQtMy4yMDUtMS40NzEtNC41NzZjLTAuOTM5LTEuMzIzLTIuNzIzLTEuOTkzLTUuMzAzLTEuOTkzICAgYy0yLjU1OSwwLTQuMzExLDAuODEyLTUuMzU5LDIuNDc4Yy0xLjA3OCwxLjcxMy0xLjYyMywzLjUxMi0xLjYyMyw1LjM1djAuNDU3SDI3LjkzNmwwLjAyLTAuNDc3ICAgYzAuMjg1LTYuNzY5LDIuNzAxLTExLjY0Myw3LjE3OC0xNC40ODdDMzcuOTQ3LDE4LjkxOCw0MS40NDcsMTgsNDUuNTMxLDE4YzUuMzQ2LDAsOS44NTksMS4yOTksMTMuNDEyLDMuODYxICAgYzMuNiwyLjU5Niw1LjQyNiw2LjQ4NCw1LjQyNiwxMS41NTZDNjQuMzY5LDM2LjI1NCw2My40NzMsMzguOTE5LDYxLjcwNSw0MS4zNDF6IiBmaWxsPSIjNzU3NTc1Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==)}label.info-label.block{display:block}.ta-form-input{height:31px;font-size:14px;border:1px solid #dfdfdf;width:100%;margin:0 0 5px;padding:5px}.clearfix:after{content:"";clear:both;display:table}.ta-input-description{color:#909090;padding-left:2px;font-style:italic;font-size:10px}div#edit-slug-box{padding-left:0}.submitdelete{color:red;font-weight:400;text-decoration:underline;margin-left:5px}#thirsty_image_holder{background:#fff;overflow:hidden;padding:0 0 20px;margin:10px 0 0;border:1px solid #dfdfdf;text-align:center}#thirsty_image_holder .thirsty-attached-image{position:relative;border:1px solid #eee;padding:5px;margin-left:20px;margin-top:20px;float:left}#thirsty_image_holder .thirsty-remove-img{position:absolute;top:-8px;right:-8px;background:#c00;color:#fff;font-size:16px;font-weight:700;line-height:.7em;padding:2px 3px 4px;border-radius:50px;cursor:pointer}#ta_upload_insert_img,#ta_upload_media_manager{margin-top:5px}#ta_upload_insert_img a{text-decoration:none}.wp-media-buttons-icon:before{content:"\F104";font-family:dashicons;font-size:12px}.attachments-browser .media-toolbar-secondary{width:300px;max-width:300px}.attachments-browser .media-toolbar-primary{width:200px;max-width:200px}#ta-inserted-link-scanner-metabox .inside{position:relative;overflow:hidden}#ta-inserted-link-scanner-metabox .inside .overlay{display:none;position:absolute;top:0;left:0;background-repeat:no-repeat;background-position:50%;background-color:hsla(0,0%,100%,.64);width:100%;height:1000px;z-index:10}.scanned-inserted-status{margin-bottom:15px}.scanned-inserted-status:after{content:"";display:table;clear:both}.scanned-inserted-status #inserted-link-scan-trigger{float:left;margin-right:8px}.scanned-inserted-status .last-scanned{float:left;margin-top:5px}.inserted-into-table table{width:100%;border:1px solid #dadada;border-collapse:collapse}.inserted-into-table table tr td,.inserted-into-table table tr th{border-bottom:1px solid #dadada;padding:5px 10px;margin:0}.inserted-into-table table tr .id{width:50px}.inserted-into-table table tr .post-type{width:100px}.inserted-into-table table tr .actions{text-align:right;width:60px}.inserted-into-table table tr .actions a{text-decoration:none;color:#2c3e50}.inserted-into-table table tr .actions a.view{color:#0085ba}.inserted-into-table table tr .actions a:hover{opacity:.7}
js/app/affiliate_link_page/dist/affiliate-link-page.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";(function(e){var n,r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/*!
2
  * jQuery JavaScript Library v3.2.1
3
  * https://jquery.com/
4
  *
@@ -11,7 +11,7 @@
11
  *
12
  * Date: 2017-03-20T18:59Z
13
  */
14
- !function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):Se.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(qe)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function v(){se.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),xe.ready()}function m(){this.expando=xe.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Pe.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&We.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Xe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Xe[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Fe.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Be(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Fe.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function C(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function E(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Qe.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Ve.exec(o)||["",""])[1].toLowerCase(),u=Ye[s]||Ye._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=C(f.appendChild(o),"script"),l&&k(a),n)for(c=0;o=a[c++];)Ge.test(o.type||"")&&n.push(o);return f}function S(){return!0}function j(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=j;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function q(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function L(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Pe.hasData(e)&&(s=Pe.access(e),u=xe.extend({},s),Pe.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function H(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&nt.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),H(o,t,n,r)});if(d&&(i=E(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(C(i,"script"),q),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,C(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,L),f=0;f<u;f++)l=a[f],Ge.test(l.type||"")&&!Fe.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(it,""),c))}return e}function F(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(C(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&k(C(r,"script")),r.parentNode.removeChild(r));return e}function P(e,t,n){var r,i,o,a,s=e.style;return n=n||st(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&at.test(a)&&ot.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function R(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=dt.length;n--;)if((e=dt[n]+t)in pt)return e}function I(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=R(e)||e),t}function W(e,t,n){var r=We.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+$e[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+$e[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+$e[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+$e[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+$e[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=st(e),o=P(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return at.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){gt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){ht=void 0}),ht=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=$e[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Be(e),v=Fe.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=Fe.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(v?"hidden"in v&&(g=v.hidden):v=Fe.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Fe.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?v[r]:0,r,d),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=ht||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:ht||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(qe)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||St.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(qe)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===_t;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,ve=ge.toString,me=ve.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&ve.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(/^-ms-/,"ms-").replace(/-([a-z])/g,be)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var we=/*!
15
  * Sizzle CSS Selector Engine v2.3.3
16
  * https://sizzlejs.com/
17
  *
@@ -21,4 +21,4 @@
21
  *
22
  * Date: 2016-08-08
23
  */
24
- function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:R)!==q&&A(t),t=t||q,_)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&P(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=k(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=ve.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return S(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[I,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===I&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[M]&&(i=v(i)),o&&!o[M]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],v=a.length,m=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:g(m,d,e,s,u),x=n?o||(r?e:v||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",v=r&&[],m=[],y=j,x=r||o&&w.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,T=x.length;for(l&&(j=a===q||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===q||(A(c),s=!_);d=e[f++];)if(d(c,a||q,s)){u.push(c);break}l&&(I=b)}i&&((c=!d&&c)&&p--,r&&v.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(v,m,a,s);if(r){if(p>0)for(;h--;)v[h]||m[h]||(m[h]=G.call(u));m=g(m)}Q.apply(u,m),l&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(I=b,j=y),v};return i?r(a):a}var x,b,w,T,C,k,E,S,j,N,D,A,q,L,_,O,H,F,P,M="sizzle"+1*new Date,R=e.document,I=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,L=q.documentElement,_=!C(q),R!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(q.getElementsByClassName),b.getById=i(function(e){return L.appendChild(e).id=M,!q.getElementsByName||!q.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&_){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&_)return t.getElementsByClassName(e)},H=[],O=[],(b.qsa=he.test(q.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||O.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=he.test(F=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){b.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),H.push("!=",re)}),O=O.length&&new RegExp(O.join("|")),H=H.length&&new RegExp(H.join("|")),t=he.test(L.compareDocumentPosition),P=t||he.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===R&&P(R,e)?-1:t===q||t.ownerDocument===R&&P(R,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===R?-1:u[r]===R?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&_&&!z[n+" "]&&(!H||!H.test(n))&&(!O||!O.test(n)))try{var r=F.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&A(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:b.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(d=v,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p&&l[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[I,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===I&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[I,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(me,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ye).toLowerCase(),function(t){var n;do{if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,k=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},E=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=m(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&k(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&_&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ye),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||E(e,d))(r,t,!_,n,!t||ve.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=we,xe.expr=we.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=we.uniqueSort,xe.text=we.getText,xe.isXMLDoc=we.isXML,xe.contains=we.contains,xe.escapeSelector=we.escape;var Te=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},Ce=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ke=xe.expr.match.needsContext,Ee=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Se=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&ke.test(e)?xe(e):e||[],!1).length}});var je,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||je,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ne.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ee.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,je=xe(se);var De=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!ke.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Te(e,"parentNode")},parentsUntil:function(e,t,n){return Te(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Te(e,"nextSibling")},prevAll:function(e){return Te(e,"previousSibling")},nextUntil:function(e,t,n){return Te(e,"nextSibling",n)},prevUntil:function(e,t,n){return Te(e,"previousSibling",n)},siblings:function(e){return Ce((e.parentNode||{}).firstChild,e)},children:function(e){return Ce(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Ae[e]||xe.uniqueSort(i),De.test(e)&&i.reverse()),this.pushStack(i)}});var qe=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var Le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&Le.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var _e=xe.Deferred();xe.fn.ready=function(e){return _e.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||_e.resolveWith(se,[xe]))}}),xe.ready.then=_e.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var Oe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},He=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},He(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(qe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Fe=new m,Pe=new m,Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Re=/[A-Z]/g;xe.extend({hasData:function(e){return Pe.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Pe.access(e,t,n)},removeData:function(e,t){Pe.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Pe.get(a),1===a.nodeType&&!Fe.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Fe.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Pe.set(this,e)}):Oe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Pe.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Pe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Pe.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||Array.isArray(n)?r=Fe.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Fe.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,We=new RegExp("^(?:([+-])=|)("+Ie+")([a-z%]*)$","i"),$e=["Top","Right","Bottom","Left"],Be=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},ze=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Xe={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Be(this)?xe(this).show():xe(this).hide()})}});var Ue=/^(?:checkbox|radio)$/i,Ve=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ge=/^$|\/(?:java|ecma)script/i,Ye={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ye.optgroup=Ye.option,Ye.tbody=Ye.tfoot=Ye.colgroup=Ye.caption=Ye.thead,Ye.th=Ye.td;var Qe=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Je=se.documentElement,Ke=/^key/,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Fe.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(Je,i),n.guid||(n.guid=xe.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(qe)||[""],l=t.length;l--;)s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Fe.hasData(e)&&Fe.get(e);if(v&&(u=v.events)){for(t=(t||"").match(qe)||[""],l=t.length;l--;)if(s=et.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||xe.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Fe.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?S:j,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=S,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=S,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=S,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ze.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=j),this.each(function(){xe.event.remove(this,e,n,t)})}});var tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,rt=/^true\/(.*)/,it=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=C(s),o=C(e),r=0,i=o.length;r<i;r++)O(o[r],a[r]);if(t)if(n)for(o=o||C(e),a=a||C(s),r=0,i=o.length;r<i;r++)_(o[r],a[r]);else _(e,s);return a=C(s,"script"),a.length>0&&k(a,!u&&C(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(He(n)){if(t=n[Fe.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Fe.expando]=void 0}n[Pe.expando]&&(n[Pe.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return F(this,e,!0)},remove:function(e){return F(this,e)},text:function(e){return Oe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(C(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Oe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Ye[(Ve.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(C(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return H(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(C(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var ot=/^margin/,at=new RegExp("^("+Ie+")(?!px)[a-z%]+$","i"),st=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Je.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,Je.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var ut=/^(none|table(?!-c[ea]).+)/,lt=/^--/,ct={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","Moz","ms"],pt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=P(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=lt.test(t),c=e.style;if(l||(t=I(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=We.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return lt.test(t)||(t=I(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=P(e,t,r)),"normal"===i&&t in ft&&(i=ft[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!ut.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):ze(e,ct,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&st(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=We.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(P(e,"marginLeft"))||e.getBoundingClientRect().left-ze(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+$e[r]+t]=o[r]||o[r-2]||o[0];return i}},ot.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Oe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=st(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,We.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(qe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Be).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Fe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Fe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&mt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(ht=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),ht=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){gt||(gt=!0,X())},xe.fx.stop=function(){gt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var yt,xt=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Oe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(qe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=xt[t]||xe.find.attr;xt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=xt[a],xt[a]=i,i=null!=n(e,t,r)?a:null,xt[a]=o),i}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Oe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(qe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(qe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(/\r/g,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,Tt.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Fe.get(s,"events")||{})[e.type]&&Fe.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&He(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!He(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Fe.access(r,t);i||r.addEventListener(e,n,!0),Fe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Fe.access(r,t)-1;i?Fe.access(r,t,i):(r.removeEventListener(e,n,!0),Fe.remove(r,t))}}});var Ct=o.location,kt=xe.now(),Et=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var St=/\[\]$/,jt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Nt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(/\r?\n/g,"\r\n")}}):{name:t.name,value:n.replace(/\r?\n/g,"\r\n")}}).get()}});var Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qt=/^(?:GET|HEAD)$/,Lt={},_t={},Ot="*/".concat("*"),Ht=se.createElement("a");Ht.href=Ct.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:At.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ot,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te(Lt),ajaxTransport:te(_t),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,k,n)),h=oe(g,h,k,u),u?(g.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(t||T)+"",u?y.resolveWith(v,[c,T,k]):y.rejectWith(v,[k,T,p]),k.statusCode(b),b=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,g,u?c:p]),x.fireWith(v,[k,T]),d&&(m.trigger("ajaxComplete",[k,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?xe(v):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},C="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Dt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),n(0,t),this}};if(y.promise(k),g.url=((e||g.url||Ct.href)+"").replace(/^\/\//,Ct.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(qe)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Ht.protocol+"//"+Ht.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne(Lt,g,t,k),f)return k;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!qt.test(g.type),a=g.url.replace(/#.*$/,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(/%20/g,"+")):(h=g.url.slice(a.length),g.data&&(a+=(Et.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(/([?&])_=[^&]*/,"$1"),h=(Et.test(a)?"&":"?")+"_="+kt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&k.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&k.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&k.setRequestHeader("Content-Type",g.contentType),k.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Ot+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)k.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(v,k,g)||f))return k.abort();if(C="abort",x.add(g.complete),k.done(g.success),k.fail(g.error),r=ne(_t,g,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,g]),f)return k;g.async&&g.timeout>0&&(l=o.setTimeout(function(){k.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ft={0:200,1223:204},Pt=xe.ajaxSettings.xhr();ye.cors=!!Pt&&"withCredentials"in Pt,ye.ajax=Pt=!!Pt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Pt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ft[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Mt=[],Rt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||xe.expando+"_"+kt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Rt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Rt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ee.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=E([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||Je})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Oe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=P(e,t),at.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Oe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var It=o.jQuery,Wt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Wt),e&&o.jQuery===xe&&(o.jQuery=It),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(5)(e))},function(e,t,n){"use strict";function r(){var e=(0,o.default)("#ta-attach-images-metabox");e.on("click","#ta_upload_media_manager",function(t){if(t.preventDefault(),n)return void n.open();var n=wp.media({title:(0,o.default)(this).data("uploader-title"),library:{type:"image"},button:{text:(0,o.default)(this).data("uploader-button-text"),close:!0},multiple:!0});n.on("select",function(){var t=n.state().get("selection"),r=(0,o.default)("input[name=post_ID]").val(),i=[],a=(0,o.default)("#thirsty_image_holder");e.find("#thirsty_image_holder").length<=0&&e.find(".inside").append("<div id='thirsty_image_holder'></div>"),t.map(function(e){e=e.toJSON(),i.push(e.id)}),i.length>0&&o.default.ajax({url:ajaxurl,type:"POST",data:{action:"ta_add_attachments_to_affiliate_link",attachment_ids:i,affiliate_link_id:r},dataType:"json"}).done(function(t){"success"===t.status?e.find("#thirsty_image_holder").append(t.added_attachments_markup):(alert(t.error_msg),console.log(t))}).fail(function(e){alert(e),console.log("Failed to add attachments to affiliate link")}).always(function(){a.find(".thirsty-attached-image").length>0&&a.show(),tb_remove()})}),n.open()}),e.on("click",".thirsty-remove-img",function(){var e=(0,o.default)(this);if(e.hasClass("removing"))return!1;e.addClass("removing");var t=e.attr("id"),n=(0,o.default)("input[name=post_ID]").val(),r=e.closest(".thirsty-attached-image"),i=(0,o.default)("#thirsty_image_holder");o.default.ajax({url:ajaxurl,type:"POST",data:{action:"ta_remove_attachment_to_affiliate_link",attachment_id:t,affiliate_link_id:n},dataType:"json"}).done(function(e){"success"===e.status?(r.fadeOut(300).delay(300).remove(),i.find(".thirsty-attached-image").length<=0&&i.hide()):(alert(e.error_msg),console.log(e))}).fail(function(e){alert("Failed to remove attachment from affiliate link"),console.log(e)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){var e=(0,o.default)("#ta-urls-metabox");e.on("click","button.edit-ta-slug",function(){e.find(".cloaked-fields").hide(),e.find(".slug-fields").fadeIn(200)}),e.on("click","button.save-ta-slug",function(){var t=e.find("input#ta_slug").val(),n=e.find("input#ta_cloaked_url").val(),r=n.replace(/[^\/]+\/?$/g,"");t=""==t?n.match(/[^\/]+$/):t,e.find("input#ta_cloaked_url").val(r+t),e.find(".slug-fields").hide(),e.find(".cloaked-fields").fadeIn(200)})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(e,t){o.default.post(ajaxurl,{action:"ta_get_category_slug",term_id:e},function(n){"success"==n.status?r.append("<option value='"+e+"' data-slug='"+n.category_slug+"'>"+t+"</option>").trigger("change"):(alert(n.error_msg),console.log(n))},"json")}function t(){var e=n.find("input[type='checkbox']:checked"),t=[],i=[],a=void 0,s=void 0,u=void 0,l=void 0;if(!(e.length<1)){for(l=0;l<e.length;l++)u=(0,o.default)(e[l]).parent().text().trim(),t.push(u),i[u]=l;t=t.sort(function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),e>t?1:e<t?-1:0}),s=i[t[0]],a=(0,o.default)(e[s]),o.default.post(ajaxurl,{action:"ta_get_category_slug",term_id:a.val()},function(e){"success"==e.status?(r.find("option:first-child").data("slug",e.category_slug).attr("data-slug",e.category_slug),r.trigger("change")):(alert(e.error_msg),console.log(e))},"json")}}var n=(0,o.default)("#thirstylink-categorychecklist"),r=(0,o.default)("select[name='ta_category_slug']");n.on("change","input[type='checkbox']",function(){var n=(0,o.default)(this).val(),i=(0,o.default)(this).parent().text(),a=(0,o.default)(this).prop("checked");t(),a?e(n,i):(r.find("option[value='"+n+"']").remove(),r.trigger("change"))}),(0,o.default)(document).on("DOMNodeInserted","#thirstylink-categorychecklist",function(){var n=(0,o.default)("#thirstylink-categorychecklist li").first(),i=n.find("input[type='checkbox']").val(),a=n.find("label").text(),s=n.find("input[type='checkbox']").prop("checked");t(),s?e(i,a):r.find("option[value='"+i+"']").remove()}),(0,o.default)(document).on("change","select[name='ta_category_slug']",function(){var e=(0,o.default)(this),t=e.find("option:selected").data("slug"),n=e.data("home-link-prefix"),r=(0,o.default)("#ta_slug").val(),i=(0,o.default)("#ta_cloaked_url");(0,o.default)(this).find("option").length<=1?i.val(n+r+"/"):i.val(n+t+"/"+r+"/")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u),c=n(3),f=r(c);n(4),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)(),(0,f.default)()})}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){"use strict";(function(e){var n,r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/*!
2
  * jQuery JavaScript Library v3.2.1
3
  * https://jquery.com/
4
  *
11
  *
12
  * Date: 2017-03-20T18:59Z
13
  */
14
+ !function(t,n){"object"===i(e)&&"object"===i(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,a){function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function u(e){var t=!!e&&"length"in e&&e.length,n=xe.type(e);return"function"!==n&&!xe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function l(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return xe.isFunction(t)?xe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?xe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?xe.grep(e,function(e){return de.call(t,e)>-1!==n}):De.test(t)?xe.filter(t,e,n):(t=xe.filter(t,e),xe.grep(e,function(e){return de.call(t,e)>-1!==n&&1===e.nodeType}))}function f(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function d(e){var t={};return xe.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function p(e){return e}function h(e){throw e}function g(e,t,n,r){var i;try{e&&xe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&xe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function v(){se.removeEventListener("DOMContentLoaded",v),o.removeEventListener("load",v),xe.ready()}function m(){this.expando=xe.expando+m.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:We.test(e)?JSON.parse(e):e)}function x(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($e,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Re.set(e,t,n)}else n=void 0;return n}function b(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return xe.css(e,t,"")},u=s(),l=n&&n[3]||(xe.cssNumber[t]?"":"px"),c=(xe.cssNumber[t]||"px"!==l&&+u)&&ze.exec(xe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do{o=o||".5",c/=o,xe.style(e,t,c+l)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function w(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ge[r];return i||(t=n.body.appendChild(n.createElement(r)),i=xe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ge[r]=i,i)}function T(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Ie.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Ue(r)&&(i[o]=w(r))):"none"!==n&&(i[o]="none",Ie.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function C(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&l(e,t)?xe.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)Ie.set(e[n],"globalEval",!t||Ie.get(t[n],"globalEval"))}function S(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===xe.type(o))xe.merge(d,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(Qe.exec(o)||["",""])[1].toLowerCase(),u=Ke[s]||Ke._default,a.innerHTML=u[1]+xe.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;xe.merge(d,a.childNodes),a=f.firstChild,a.textContent=""}else d.push(t.createTextNode(o));for(f.textContent="",p=0;o=d[p++];)if(r&&xe.inArray(o,r)>-1)i&&i.push(o);else if(l=xe.contains(o.ownerDocument,o),a=C(f.appendChild(o),"script"),l&&k(a),n)for(c=0;o=a[c++];)Je.test(o.type||"")&&n.push(o);return f}function j(){return!0}function E(){return!1}function N(){try{return se.activeElement}catch(e){}}function D(e,t,n,r,o,a){var s,u;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)D(e,u,n,r,t[u],a);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=E;else if(!o)return e;return 1===a&&(s=o,o=function(e){return xe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=xe.guid++)),e.each(function(){xe.event.add(this,t,o,r,n)})}function A(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?xe(">tbody",e)[0]||e:e}function _(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function q(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function L(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Ie.hasData(e)&&(o=Ie.access(e),a=Ie.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)xe.event.add(t,i,l[i][n])}Re.hasData(e)&&(s=Re.access(e),u=xe.extend({},s),Re.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function H(e,t,n,r){t=ce.apply([],t);var i,o,a,u,l,c,f=0,d=e.length,p=d-1,h=t[0],g=xe.isFunction(h);if(g||d>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),H(o,t,n,r)});if(d&&(i=S(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=xe.map(C(i,"script"),_),u=a.length;f<d;f++)l=i,f!==p&&(l=xe.clone(l,!0,!0),u&&xe.merge(a,C(l,"script"))),n.call(e[f],l,f);if(u)for(c=a[a.length-1].ownerDocument,xe.map(a,q),f=0;f<u;f++)l=a[f],Je.test(l.type||"")&&!Ie.access(l,"globalEval")&&xe.contains(c,l)&&(l.src?xe._evalUrl&&xe._evalUrl(l.src):s(l.textContent.replace(ut,""),c))}return e}function F(e,t,n){for(var r,i=t?xe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||xe.cleanData(C(r)),r.parentNode&&(n&&xe.contains(r.ownerDocument,r)&&k(C(r,"script")),r.parentNode.removeChild(r));return e}function P(e,t,n){var r,i,o,a,s=e.style;return n=n||ft(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||xe.contains(e.ownerDocument,e)||(a=xe.style(e,t)),!ye.pixelMarginRight()&&ct.test(a)&&lt.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function M(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in mt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=vt.length;n--;)if((e=vt[n]+t)in mt)return e}function R(e){var t=xe.cssProps[e];return t||(t=xe.cssProps[e]=I(e)||e),t}function W(e,t,n){var r=ze.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $(e,t,n,r,i){var o,a=0;for(o=n===(r?"border":"content")?4:"width"===t?1:0;o<4;o+=2)"margin"===n&&(a+=xe.css(e,n+Xe[o],!0,i)),r?("content"===n&&(a-=xe.css(e,"padding"+Xe[o],!0,i)),"margin"!==n&&(a-=xe.css(e,"border"+Xe[o]+"Width",!0,i))):(a+=xe.css(e,"padding"+Xe[o],!0,i),"padding"!==n&&(a+=xe.css(e,"border"+Xe[o]+"Width",!0,i)));return a}function B(e,t,n){var r,i=ft(e),o=P(e,t,i),a="border-box"===xe.css(e,"boxSizing",!1,i);return ct.test(o)?o:(r=a&&(ye.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),(o=parseFloat(o)||0)+$(e,t,n||(a?"border":"content"),r,i)+"px")}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function X(){xt&&(!1===se.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(X):o.setTimeout(X,xe.fx.interval),xe.fx.tick())}function U(){return o.setTimeout(function(){yt=void 0}),yt=xe.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Xe[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&Ue(e),v=Ie.get(e,"fxshow");n.queue||(a=xe._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,xe.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],bt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||xe.style(e,r)}if((u=!xe.isEmptyObject(t))||!xe.isEmptyObject(p)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=Ie.get(e,"display")),c=xe.css(e,"display"),"none"===c&&(l?c=l:(T([e],!0),l=e.style.display||l,c=xe.css(e,"display"),T([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===xe.css(e,"float")&&(u||(d.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in p)u||(v?"hidden"in v&&(g=v.hidden):v=Ie.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&T([e],!0),d.done(function(){g||T([e]),Ie.remove(e,"fxshow");for(r in p)xe.style(e,r,p[r])})),u=G(g?v[r]:0,r,d),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=xe.camelCase(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=xe.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=xe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||U(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:xe.extend({},t),opts:xe.extend(!0,{specialEasing:{},easing:xe.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||U(),duration:n.duration,tweens:[],createTween:function(t,n){var r=xe.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return xe.isFunction(r.stop)&&(xe._queueHooks(l.elem,l.opts.queue).stop=xe.proxy(r.stop,r)),r;return xe.map(c,G,l),xe.isFunction(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),xe.fx.timer(xe.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Oe)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e,t,n,r){var o;if(Array.isArray(t))xe.each(t,function(t,o){n||_t.test(e)?r(e,o):ee(e+"["+("object"===(void 0===o?"undefined":i(o))&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==xe.type(t))r(e,t);else for(o in t)ee(e+"["+o+"]",t[o],n,r)}function te(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Oe)||[];if(xe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ne(e,t,n,r){function i(s){var u;return o[s]=!0,xe.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Bt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function re(e,t){var n,r,i=xe.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&xe.extend(!0,e,r),e}function ie(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function oe(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var ae=[],se=o.document,ue=Object.getPrototypeOf,le=ae.slice,ce=ae.concat,fe=ae.push,de=ae.indexOf,pe={},he=pe.toString,ge=pe.hasOwnProperty,ve=ge.toString,me=ve.call(Object),ye={},xe=function e(t,n){return new e.fn.init(t,n)},be=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,we=/^-ms-/,Te=/-([a-z])/g,Ce=function(e,t){return t.toUpperCase()};xe.fn=xe.prototype={jquery:"3.2.1",constructor:xe,length:0,toArray:function(){return le.call(this)},get:function(e){return null==e?le.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=xe.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return xe.each(this,e)},map:function(e){return this.pushStack(xe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(le.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:ae.sort,splice:ae.splice},xe.extend=xe.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===(void 0===s?"undefined":i(s))||xe.isFunction(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)n=s[t],r=e[t],s!==r&&(c&&r&&(xe.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,a=n&&Array.isArray(n)?n:[]):a=n&&xe.isPlainObject(n)?n:{},s[t]=xe.extend(c,a,r)):void 0!==r&&(s[t]=r));return s},xe.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===xe.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=xe.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==he.call(e))&&(!(t=ue(e))||"function"==typeof(n=ge.call(t,"constructor")&&t.constructor)&&ve.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"===(void 0===e?"undefined":i(e))||"function"==typeof e?pe[he.call(e)]||"object":void 0===e?"undefined":i(e)},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(we,"ms-").replace(Te,Ce)},each:function(e,t){var n,r=0;if(u(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(be,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(u(Object(e))?xe.merge(n,"string"==typeof e?[e]:e):fe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(u(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return ce.apply([],a)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),xe.isFunction(e))return r=le.call(arguments,2),i=function(){return e.apply(t||this,r.concat(le.call(arguments)))},i.guid=e.guid=e.guid||xe.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(xe.fn[Symbol.iterator]=ae[Symbol.iterator]),xe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){pe["[object "+t+"]"]=t.toLowerCase()});var ke=/*!
15
  * Sizzle CSS Selector Engine v2.3.3
16
  * https://sizzlejs.com/
17
  *
21
  *
22
  * Date: 2016-08-08
23
  */
24
+ function(e){function t(e,t,n,r){var i,o,a,s,u,c,d,p=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:I)!==_&&A(t),t=t||_,L)){if(11!==h&&(u=ge.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&P(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!z[e+" "]&&(!O||!O.test(e))){if(1!==h)p=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(xe,be):t.setAttribute("id",s=M),c=k(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);d=c.join(","),p=ve.test(e)&&l(t.parentNode)||t}if(d)try{return Q.apply(n,p.querySelectorAll(d)),n}catch(e){}finally{s===M&&t.removeAttribute("id")}}}return j(e.replace(oe,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=_.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=W++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,d=[R,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[M]||(t[M]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===R&&l[1]===s)return d[2]=l[2];if(c[o]=d,d[2]=e(t,n,u))return!0}return!1}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[M]&&(i=v(i)),o&&!o[M]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,d=[],p=[],v=a.length,m=r||h(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?m:g(m,d,e,s,u),x=n?o||(r?e:v||i)?[]:a:y;if(n&&n(y,x,s,u),i)for(l=g(x,p),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[p[c]]=!(y[p[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?K(r,f):d[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return K(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==E)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[d(p(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&p(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s<r&&m(e.slice(s,r)),r<i&&m(e=e.slice(r)),r<i&&f(e))}c.push(n)}return p(c)}function y(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",v=r&&[],m=[],y=E,x=r||o&&w.find.TAG("*",l),b=R+=null==y?1:Math.random()||.1,T=x.length;for(l&&(E=a===_||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===_||(A(c),s=!L);d=e[f++];)if(d(c,a||_,s)){u.push(c);break}l&&(R=b)}i&&((c=!d&&c)&&p--,r&&v.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(v,m,a,s);if(r){if(p>0)for(;h--;)v[h]||m[h]||(m[h]=G.call(u));m=g(m)}Q.apply(u,m),l&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(R=b,E=y),v};return i?r(a):a}var x,b,w,T,C,k,S,j,E,N,D,A,_,q,L,O,H,F,P,M="sizzle"+1*new Date,I=e.document,R=0,W=0,$=n(),B=n(),z=n(),X=function(e,t){return e===t&&(D=!0),0},U={}.hasOwnProperty,V=[],G=V.pop,Y=V.push,Q=V.push,J=V.slice,K=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Z="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ce=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,me=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){A()},Te=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(V=J.call(I.childNodes),I.childNodes),V[I.childNodes.length].nodeType}catch(e){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},A=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:I;return r!==_&&9===r.nodeType&&r.documentElement?(_=r,q=_.documentElement,L=!C(_),I!==_&&(n=_.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(_.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=he.test(_.getElementsByClassName),b.getById=i(function(e){return q.appendChild(e).id=M,!_.getElementsByName||!_.getElementsByName(M).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(me,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&L)return t.getElementsByClassName(e)},H=[],O=[],(b.qsa=he.test(_.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+M+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||O.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=_.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),q.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=he.test(F=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){b.disconnectedMatch=F.call(e,"*"),F.call(e,"[s!='']:x"),H.push("!=",re)}),O=O.length&&new RegExp(O.join("|")),H=H.length&&new RegExp(H.join("|")),t=he.test(q.compareDocumentPosition),P=t||he.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===_||e.ownerDocument===I&&P(I,e)?-1:t===_||t.ownerDocument===I&&P(I,t)?1:N?K(N,e)-K(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===_?-1:t===_?1:i?-1:o?1:N?K(N,e)-K(N,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===I?-1:u[r]===I?1:0},_):_},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==_&&A(e),n=n.replace(ue,"='$1']"),b.matchesSelector&&L&&!z[n+" "]&&(!H||!H.test(n))&&(!O||!O.test(n)))try{var r=F.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,_,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==_&&A(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==_&&A(e);var n=w.attrHandle[t.toLowerCase()],r=n&&U.call(w.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==r?r:b.attributes||!L?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,N=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(me,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(me,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(me,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s,x=!1;if(v){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(d=v,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===R&&l[1],x=p&&l[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[R,p,x];break}}else if(y&&(d=t,f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===R&&l[1],x=p),!1===x)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++x||(y&&(f=d[M]||(d[M]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[R,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=K(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(oe,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(me,ye),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(me,ye).toLowerCase(),function(t){var n;do{if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===_.activeElement&&(!_.hasFocus||_.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,k=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=B[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=ae.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=se.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(oe," ")}),s=s.slice(r.length));for(a in w.filter)!(i=fe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):B(e,u).slice(0)},S=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=k(e)),n=t.length;n--;)o=m(t[n]),o[M]?r.push(o):i.push(o);o=z(e,y(i,r)),o.selector=e}return o},j=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,d=!r&&k(e=c.selector||e);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(me,ye),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(me,ye),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return Q.apply(n,r),n;break}}return(c||S(e,d))(r,t,!L,n,!t||ve.test(e)&&l(t.parentNode)||t),n},b.sortStable=M.split("").sort(X).join("")===M,b.detectDuplicates=!!D,A(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(_.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(o);xe.find=ke,xe.expr=ke.selectors,xe.expr[":"]=xe.expr.pseudos,xe.uniqueSort=xe.unique=ke.uniqueSort,xe.text=ke.getText,xe.isXMLDoc=ke.isXML,xe.contains=ke.contains,xe.escapeSelector=ke.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&xe(e).is(n))break;r.push(e)}return r},je=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ee=xe.expr.match.needsContext,Ne=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,De=/^.[^:#\[\.,]*$/;xe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?xe.find.matchesSelector(r,e)?[r]:[]:xe.find.matches(e,xe.grep(t,function(e){return 1===e.nodeType}))},xe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(xe(e).filter(function(){for(t=0;t<r;t++)if(xe.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)xe.find(e,i[t],n);return r>1?xe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&Ee.test(e)?xe(e):e||[],!1).length}});var Ae,_e=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(xe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:_e.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof xe?t[0]:t,xe.merge(this,xe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),Ne.test(r[1])&&xe.isPlainObject(t))for(r in t)xe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe.isFunction(e)?void 0!==n.ready?n.ready(e):e(xe):xe.makeArray(e,this)}).prototype=xe.fn,Ae=xe(se);var qe=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};xe.fn.extend({has:function(e){var t=xe(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(xe.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&xe(e);if(!Ee.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&xe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?xe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(xe(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(xe.uniqueSort(xe.merge(this.get(),xe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),xe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return je((e.parentNode||{}).firstChild,e)},children:function(e){return je(e.firstChild)},contents:function(e){return l(e,"iframe")?e.contentDocument:(l(e,"template")&&(e=e.content||e),xe.merge([],e.childNodes))}},function(e,t){xe.fn[e]=function(n,r){var i=xe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=xe.filter(r,i)),this.length>1&&(Le[e]||xe.uniqueSort(i),qe.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;xe.Callbacks=function(e){e="string"==typeof e?d(e):xe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){xe.each(n,function(n,r){xe.isFunction(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==xe.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return xe.each(arguments,function(e,t){for(var n;(n=xe.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?xe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},xe.extend({Deferred:function(e){var t=[["notify","progress",xe.Callbacks("memory"),xe.Callbacks("memory"),2],["resolve","done",xe.Callbacks("once memory"),xe.Callbacks("once memory"),0,"resolved"],["reject","fail",xe.Callbacks("once memory"),xe.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return xe.Deferred(function(n){xe.each(t,function(t,r){var i=xe.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&xe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<s)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===(void 0===o?"undefined":i(o))||"function"==typeof o)&&o.then,xe.isFunction(c)?r?c.call(o,a(s,t,p,r),a(s,t,h,r)):(s++,c.call(o,a(s,t,p,r),a(s,t,h,r),a(s,t,p,t.notifyWith))):(n!==p&&(u=void 0,l=[o]),(r||t.resolveWith)(u,l))}},f=r?c:function(){try{c()}catch(r){xe.Deferred.exceptionHook&&xe.Deferred.exceptionHook(r,f.stackTrace),e+1>=s&&(n!==h&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?f():(xe.Deferred.getStackHook&&(f.stackTrace=xe.Deferred.getStackHook()),o.setTimeout(f))}}var s=0;return xe.Deferred(function(i){t[0][3].add(a(0,i,xe.isFunction(r)?r:p,i.notifyWith)),t[1][3].add(a(0,i,xe.isFunction(e)?e:p)),t[2][3].add(a(0,i,xe.isFunction(n)?n:h))}).promise()},promise:function(e){return null!=e?xe.extend(e,r):r}},a={};return xe.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[0][2].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=le.call(arguments),o=xe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?le.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(g(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||xe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)g(i[n],a(n),o.reject);return o.promise()}});var He=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;xe.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&He.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},xe.readyException=function(e){o.setTimeout(function(){throw e})};var Fe=xe.Deferred();xe.fn.ready=function(e){return Fe.then(e).catch(function(e){xe.readyException(e)}),this},xe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--xe.readyWait:xe.isReady)||(xe.isReady=!0,!0!==e&&--xe.readyWait>0||Fe.resolveWith(se,[xe]))}}),xe.ready.then=Fe.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?o.setTimeout(xe.ready):(se.addEventListener("DOMContentLoaded",v),o.addEventListener("load",v));var Pe=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===xe.type(r)){o=!0;for(u in r)e(t,n,u,r[u],!0,a,s)}else if(void 0!==i&&(o=!0,xe.isFunction(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(xe(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},Me=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};m.uid=1,m.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Me(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[xe.camelCase(t)]=n;else for(r in t)i[xe.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][xe.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(xe.camelCase):(t=xe.camelCase(t),t=t in r?[t]:t.match(Oe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||xe.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!xe.isEmptyObject(t)}};var Ie=new m,Re=new m,We=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$e=/[A-Z]/g;xe.extend({hasData:function(e){return Re.hasData(e)||Ie.hasData(e)},data:function(e,t,n){return Re.access(e,t,n)},removeData:function(e,t){Re.remove(e,t)},_data:function(e,t,n){return Ie.access(e,t,n)},_removeData:function(e,t){Ie.remove(e,t)}}),xe.fn.extend({data:function(e,t){var n,r,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=Re.get(a),1===a.nodeType&&!Ie.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=xe.camelCase(r.slice(5)),x(a,r,o[r])));Ie.set(a,"hasDataAttrs",!0)}return o}return"object"===(void 0===e?"undefined":i(e))?this.each(function(){Re.set(this,e)}):Pe(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Re.get(a,e)))return n;if(void 0!==(n=x(a,e)))return n}else this.each(function(){Re.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Re.remove(this,e)})}}),xe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Ie.get(e,t),n&&(!r||Array.isArray(n)?r=Ie.access(e,t,xe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=xe.queue(e,t),r=n.length,i=n.shift(),o=xe._queueHooks(e,t),a=function(){xe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ie.get(e,n)||Ie.access(e,n,{empty:xe.Callbacks("once memory").add(function(){Ie.remove(e,[t+"queue",n])})})}}),xe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?xe.queue(this[0],e):void 0===t?this:this.each(function(){var n=xe.queue(this,e,t);xe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&xe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){xe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=xe.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Ie.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Be=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ze=new RegExp("^(?:([+-])=|)("+Be+")([a-z%]*)$","i"),Xe=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&xe.contains(e.ownerDocument,e)&&"none"===xe.css(e,"display")},Ve=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ge={};xe.fn.extend({show:function(){return T(this,!0)},hide:function(){return T(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?xe(this).show():xe(this).hide()})}});var Ye=/^(?:checkbox|radio)$/i,Qe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Je=/^$|\/(?:java|ecma)script/i,Ke={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td;var Ze=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var et=se.documentElement,tt=/^key/,nt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rt=/^([^.]*)(?:\.(.+)|)/;xe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Ie.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&xe.find.matchesSelector(et,i),n.guid||(n.guid=xe.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==xe&&xe.event.triggered!==t.type?xe.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],l=t.length;l--;)s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(f=xe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=xe.event.special[p]||{},c=xe.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&xe.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),xe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Ie.hasData(e)&&Ie.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Oe)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(f=xe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||xe.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)xe.event.remove(e,p+t[l],n,r,!0);xe.isEmptyObject(u)&&Ie.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=xe.event.fix(e),u=new Array(arguments.length),l=(Ie.get(this,"events")||{})[s.type]||[],c=xe.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=xe.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((xe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?xe(i,this).index(l)>-1:xe.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(xe.Event.prototype,e,{enumerable:!0,configurable:!0,get:xe.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[xe.expando]?e:new xe.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&l(this,"input"))return this.click(),!1},_default:function(e){return l(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},xe.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},xe.Event=function(e,t){if(!(this instanceof xe.Event))return new xe.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?j:E,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&xe.extend(this,t),this.timeStamp=e&&e.timeStamp||xe.now(),this[xe.expando]=!0},xe.Event.prototype={constructor:xe.Event,isDefaultPrevented:E,isPropagationStopped:E,isImmediatePropagationStopped:E,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=j,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=j,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=j,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},xe.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&tt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&nt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},xe.event.addProp),xe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){xe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||xe.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),xe.fn.extend({on:function(e,t,n,r){return D(this,e,t,n,r)},one:function(e,t,n,r){return D(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,xe(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"===(void 0===e?"undefined":i(e))){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=E),this.each(function(){xe.event.remove(this,e,n,t)})}});var it=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ot=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;xe.extend({htmlPrefilter:function(e){return e.replace(it,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=xe.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||xe.isXMLDoc(e)))for(a=C(s),o=C(e),r=0,i=o.length;r<i;r++)O(o[r],a[r]);if(t)if(n)for(o=o||C(e),a=a||C(s),r=0,i=o.length;r<i;r++)L(o[r],a[r]);else L(e,s);return a=C(s,"script"),a.length>0&&k(a,!u&&C(e,"script")),s},cleanData:function(e){for(var t,n,r,i=xe.event.special,o=0;void 0!==(n=e[o]);o++)if(Me(n)){if(t=n[Ie.expando]){if(t.events)for(r in t.events)i[r]?xe.event.remove(n,r):xe.removeEvent(n,r,t.handle);n[Ie.expando]=void 0}n[Re.expando]&&(n[Re.expando]=void 0)}}}),xe.fn.extend({detach:function(e){return F(this,e,!0)},remove:function(e){return F(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?xe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return H(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return H(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(xe.cleanData(C(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return xe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ot.test(e)&&!Ke[(Qe.exec(e)||["",""])[1].toLowerCase()]){e=xe.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(xe.cleanData(C(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return H(this,arguments,function(t){var n=this.parentNode;xe.inArray(this,e)<0&&(xe.cleanData(C(this)),n&&n.replaceChild(t,this))},e)}}),xe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){xe.fn[e]=function(e){for(var n,r=[],i=xe(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),xe(i[a])[t](n),fe.apply(r,n.get());return this.pushStack(r)}});var lt=/^margin/,ct=new RegExp("^("+Be+")(?!px)[a-z%]+$","i"),ft=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)};!function(){function e(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",et.appendChild(a);var e=o.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,et.removeChild(a),s=null}}var t,n,r,i,a=se.createElement("div"),s=se.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),xe.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),n},pixelMarginRight:function(){return e(),r},reliableMarginLeft:function(){return e(),i}}))}();var dt=/^(none|table(?!-c[ea]).+)/,pt=/^--/,ht={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},vt=["Webkit","Moz","ms"],mt=se.createElement("div").style;xe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=P(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=xe.camelCase(t),l=pt.test(t),c=e.style;if(l||(t=R(u)),s=xe.cssHooks[t]||xe.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:c[t];a=void 0===n?"undefined":i(n),"string"===a&&(o=ze.exec(n))&&o[1]&&(n=b(e,t,o),a="number"),null!=n&&n===n&&("number"===a&&(n+=o&&o[3]||(xe.cssNumber[u]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=xe.camelCase(t);return pt.test(t)||(t=R(s)),a=xe.cssHooks[t]||xe.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=P(e,t,r)),"normal"===i&&t in gt&&(i=gt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),xe.each(["height","width"],function(e,t){xe.cssHooks[t]={get:function(e,n,r){if(n)return!dt.test(xe.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?B(e,t,r):Ve(e,ht,function(){return B(e,t,r)})},set:function(e,n,r){var i,o=r&&ft(e),a=r&&$(e,t,r,"border-box"===xe.css(e,"boxSizing",!1,o),o);return a&&(i=ze.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=xe.css(e,t)),W(e,n,a)}}}),xe.cssHooks.marginLeft=M(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(P(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),xe.each({margin:"",padding:"",border:"Width"},function(e,t){xe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Xe[r]+t]=o[r]||o[r-2]||o[0];return i}},lt.test(e)||(xe.cssHooks[e+t].set=W)}),xe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ft(e),i=t.length;a<i;a++)o[t[a]]=xe.css(e,t[a],!1,r);return o}return void 0!==n?xe.style(e,t,n):xe.css(e,t)},e,t,arguments.length>1)}}),xe.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||xe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(xe.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=xe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=xe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){xe.fx.step[e.prop]?xe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[xe.cssProps[e.prop]]&&!xe.cssHooks[e.prop]?e.elem[e.prop]=e.now:xe.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},xe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},xe.fx=z.prototype.init,xe.fx.step={};var yt,xt,bt=/^(?:toggle|show|hide)$/,wt=/queueHooks$/;xe.Animation=xe.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return b(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){xe.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),xe.speed=function(e,t,n){var r=e&&"object"===(void 0===e?"undefined":i(e))?xe.extend({},e):{complete:n||!n&&t||xe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!xe.isFunction(t)&&t};return xe.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in xe.fx.speeds?r.duration=xe.fx.speeds[r.duration]:r.duration=xe.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){xe.isFunction(r.old)&&r.old.call(this),r.queue&&xe.dequeue(this,r.queue)},r},xe.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=xe.isEmptyObject(e),o=xe.speed(t,n,r),a=function(){var t=J(this,xe.extend({},e),o);(i||Ie.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=xe.timers,a=Ie.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||xe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Ie.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=xe.timers,a=r?r.length:0;for(n.finish=!0,xe.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),xe.each(["toggle","show","hide"],function(e,t){var n=xe.fn[t];xe.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),xe.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){xe.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),xe.timers=[],xe.fx.tick=function(){var e,t=0,n=xe.timers;for(yt=xe.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||xe.fx.stop(),yt=void 0},xe.fx.timer=function(e){xe.timers.push(e),xe.fx.start()},xe.fx.interval=13,xe.fx.start=function(){xt||(xt=!0,X())},xe.fx.stop=function(){xt=null},xe.fx.speeds={slow:600,fast:200,_default:400},xe.fn.delay=function(e,t){return e=xe.fx?xe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Tt,Ct=xe.expr.attrHandle;xe.fn.extend({attr:function(e,t){return Pe(this,xe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){xe.removeAttr(this,e)})}}),xe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?xe.prop(e,t,n):(1===o&&xe.isXMLDoc(e)||(i=xe.attrHooks[t.toLowerCase()]||(xe.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void xe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=xe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&l(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?xe.removeAttr(e,n):e.setAttribute(n,n),n}},xe.each(xe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ct[t]||xe.find.attr;Ct[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Ct[a],Ct[a]=i,i=null!=n(e,t,r)?a:null,Ct[a]=o),i}});var kt=/^(?:input|select|textarea|button)$/i,St=/^(?:a|area)$/i;xe.fn.extend({prop:function(e,t){return Pe(this,xe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[xe.propFix[e]||e]})}}),xe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&xe.isXMLDoc(e)||(t=xe.propFix[t]||t,i=xe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=xe.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||St.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(xe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),xe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){xe.propFix[this.toLowerCase()]=this}),xe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).addClass(e.call(this,t,Z(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(xe.isFunction(e))return this.each(function(t){xe(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e);return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):xe.isFunction(e)?this.each(function(n){xe(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=xe(this),o=e.match(Oe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Ie.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ie.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var jt=/\r/g;xe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=xe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,xe(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=xe.map(i,function(e){return null==e?"":e+""})),(t=xe.valHooks[this.type]||xe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=xe.valHooks[i.type]||xe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(jt,""):null==n?"":n)}}}),xe.extend({valHooks:{option:{get:function(e){var t=xe.find.attr(e,"value");return null!=t?t:K(xe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(n=i[r],(n.selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!l(n.parentNode,"optgroup"))){if(t=xe(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=xe.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=xe.inArray(xe.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),xe.each(["radio","checkbox"],function(){xe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=xe.inArray(xe(e).val(),t)>-1}},ye.checkOn||(xe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=/^(?:focusinfocus|focusoutblur)$/;xe.extend(xe.event,{trigger:function(e,t,n,r){var a,s,u,l,c,f,d,p=[n||se],h=ge.call(e,"type")?e.type:e,g=ge.call(e,"namespace")?e.namespace.split("."):[];if(s=u=n=n||se,3!==n.nodeType&&8!==n.nodeType&&!Et.test(h+xe.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),c=h.indexOf(":")<0&&"on"+h,e=e[xe.expando]?e:new xe.Event(h,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:xe.makeArray(t,[e]),d=xe.event.special[h]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!xe.isWindow(n)){for(l=d.delegateType||h,Et.test(l+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(n.ownerDocument||se)&&p.push(u.defaultView||u.parentWindow||o)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)e.type=a>1?l:d.bindType||h,f=(Ie.get(s,"events")||{})[e.type]&&Ie.get(s,"handle"),f&&f.apply(s,t),(f=c&&s[c])&&f.apply&&Me(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=h,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Me(n)||c&&xe.isFunction(n[h])&&!xe.isWindow(n)&&(u=n[c],u&&(n[c]=null),xe.event.triggered=h,n[h](),xe.event.triggered=void 0,u&&(n[c]=u)),e.result}},simulate:function(e,t,n){var r=xe.extend(new xe.Event,n,{type:e,isSimulated:!0});xe.event.trigger(r,null,t)}}),xe.fn.extend({trigger:function(e,t){return this.each(function(){xe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return xe.event.trigger(e,t,n,!0)}}),xe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){xe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),xe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in o,ye.focusin||xe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){xe.event.simulate(t,e.target,xe.event.fix(e))};xe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Ie.access(r,t);i||r.addEventListener(e,n,!0),Ie.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Ie.access(r,t)-1;i?Ie.access(r,t,i):(r.removeEventListener(e,n,!0),Ie.remove(r,t))}}});var Nt=o.location,Dt=xe.now(),At=/\?/;xe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||xe.error("Invalid XML: "+e),t};var _t=/\[\]$/,qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;xe.param=function(e,t){var n,r=[],i=function(e,t){var n=xe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!xe.isPlainObject(e))xe.each(e,function(){i(this.name,this.value)});else for(n in e)ee(n,e[n],t,i);return r.join("&")},xe.fn.extend({serialize:function(){return xe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=xe.prop(this,"elements");return e?xe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!xe(this).is(":disabled")&&Ot.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Ye.test(e))}).map(function(e,t){var n=xe(this).val();return null==n?null:Array.isArray(n)?xe.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}});var Ht=/%20/g,Ft=/#.*$/,Pt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Rt=/^(?:GET|HEAD)$/,Wt=/^\/\//,$t={},Bt={},zt="*/".concat("*"),Xt=se.createElement("a");Xt.href=Nt.href,xe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:It.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":xe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?re(re(e,xe.ajaxSettings),t):re(xe.ajaxSettings,e)},ajaxPrefilter:te($t),ajaxTransport:te(Bt),ajax:function(e,t){function n(e,t,n,i){var u,c,p,h,w,T=t;f||(f=!0,l&&o.clearTimeout(l),r=void 0,s=i||"",k.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(h=ie(g,k,n)),h=oe(g,h,k,u),u?(g.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(xe.lastModified[a]=w),(w=k.getResponseHeader("etag"))&&(xe.etag[a]=w)),204===e||"HEAD"===g.type?T="nocontent":304===e?T="notmodified":(T=h.state,c=h.data,p=h.error,u=!p)):(p=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(t||T)+"",u?y.resolveWith(v,[c,T,k]):y.rejectWith(v,[k,T,p]),k.statusCode(b),b=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[k,g,u?c:p]),x.fireWith(v,[k,T]),d&&(m.trigger("ajaxComplete",[k,g]),--xe.active||xe.event.trigger("ajaxStop")))}"object"===(void 0===e?"undefined":i(e))&&(t=e,e=void 0),t=t||{};var r,a,s,u,l,c,f,d,p,h,g=xe.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?xe(v):xe.event,y=xe.Deferred(),x=xe.Callbacks("once memory"),b=g.statusCode||{},w={},T={},C="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(f){if(!u)for(u={};t=Mt.exec(s);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?s:null},setRequestHeader:function(e,t){return null==f&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),n(0,t),this}};if(y.promise(k),g.url=((e||g.url||Nt.href)+"").replace(Wt,Nt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=(g.dataType||"*").toLowerCase().match(Oe)||[""],null==g.crossDomain){c=se.createElement("a");try{c.href=g.url,c.href=c.href,g.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=xe.param(g.data,g.traditional)),ne($t,g,t,k),f)return k;d=xe.event&&g.global,d&&0==xe.active++&&xe.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!Rt.test(g.type),a=g.url.replace(Ft,""),g.hasContent?g.data&&g.processData&&0===(g.contentType||"").indexOf("application/x-www-form-urlencoded")&&(g.data=g.data.replace(Ht,"+")):(h=g.url.slice(a.length),g.data&&(a+=(At.test(a)?"&":"?")+g.data,delete g.data),!1===g.cache&&(a=a.replace(Pt,"$1"),h=(At.test(a)?"&":"?")+"_="+Dt+++h),g.url=a+h),g.ifModified&&(xe.lastModified[a]&&k.setRequestHeader("If-Modified-Since",xe.lastModified[a]),xe.etag[a]&&k.setRequestHeader("If-None-Match",xe.etag[a])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&k.setRequestHeader("Content-Type",g.contentType),k.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+zt+"; q=0.01":""):g.accepts["*"]);for(p in g.headers)k.setRequestHeader(p,g.headers[p]);if(g.beforeSend&&(!1===g.beforeSend.call(v,k,g)||f))return k.abort();if(C="abort",x.add(g.complete),k.done(g.success),k.fail(g.error),r=ne(Bt,g,t,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,g]),f)return k;g.async&&g.timeout>0&&(l=o.setTimeout(function(){k.abort("timeout")},g.timeout));try{f=!1,r.send(w,n)}catch(e){if(f)throw e;n(-1,e)}}else n(-1,"No Transport");return k},getJSON:function(e,t,n){return xe.get(e,t,n,"json")},getScript:function(e,t){return xe.get(e,void 0,t,"script")}}),xe.each(["get","post"],function(e,t){xe[t]=function(e,n,r,i){return xe.isFunction(n)&&(i=i||r,r=n,n=void 0),xe.ajax(xe.extend({url:e,type:t,dataType:i,data:n,success:r},xe.isPlainObject(e)&&e))}}),xe._evalUrl=function(e){return xe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},xe.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe.isFunction(e)&&(e=e.call(this[0])),t=xe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe.isFunction(e)?this.each(function(t){xe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=xe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe.isFunction(e);return this.each(function(n){xe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){xe(this).replaceWith(this.childNodes)}),this}}),xe.expr.pseudos.hidden=function(e){return!xe.expr.pseudos.visible(e)},xe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},xe.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Vt=xe.ajaxSettings.xhr();ye.cors=!!Vt&&"withCredentials"in Vt,ye.ajax=Vt=!!Vt,xe.ajaxTransport(function(e){var t,n;if(ye.cors||Vt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),xe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),xe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return xe.globalEval(e),e}}}),xe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),xe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=xe("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;xe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||xe.expando+"_"+Dt++;return this[e]=!0,e}}),xe.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=xe.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||xe.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?xe(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),a&&xe.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),xe.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=Ne.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=S([e],t,o),o&&o.length&&xe(o).remove(),xe.merge([],i.childNodes))},xe.fn.load=function(e,t,n){var r,o,a,s=this,u=e.indexOf(" ");return u>-1&&(r=K(e.slice(u)),e=e.slice(0,u)),xe.isFunction(t)?(n=t,t=void 0):t&&"object"===(void 0===t?"undefined":i(t))&&(o="POST"),s.length>0&&xe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?xe("<div>").append(xe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},xe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){xe.fn[t]=function(e){return this.on(t,e)}}),xe.expr.pseudos.animated=function(e){return xe.grep(xe.timers,function(t){return e===t.elem}).length},xe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=xe.css(e,"position"),f=xe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=xe.css(e,"top"),u=xe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),xe.isFunction(t)&&(t=t.call(e,n,xe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},xe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){xe.offset.setOffset(this,e,t)});var t,n,r,i,o=this[0];if(o)return o.getClientRects().length?(r=o.getBoundingClientRect(),t=o.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===xe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),l(e[0],"html")||(r=e.offset()),r={top:r.top+xe.css(e[0],"borderTopWidth",!0),left:r.left+xe.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-xe.css(n,"marginTop",!0),left:t.left-r.left-xe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===xe.css(e,"position");)e=e.offsetParent;return e||et})}}),xe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;xe.fn[e]=function(r){return Pe(this,function(e,r,i){var o;if(xe.isWindow(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),xe.each(["top","left"],function(e,t){xe.cssHooks[t]=M(ye.pixelPosition,function(e,n){if(n)return n=P(e,t),ct.test(n)?xe(e).position()[t]+"px":n})}),xe.each({Height:"height",Width:"width"},function(e,t){xe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){xe.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Pe(this,function(t,n,i){var o;return xe.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?xe.css(t,n,s):xe.style(t,n,i,s)},t,a?i:void 0,a)}})}),xe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),xe.holdReady=function(e){e?xe.readyWait++:xe.ready(!0)},xe.isArray=Array.isArray,xe.parseJSON=JSON.parse,xe.nodeName=l,n=[],void 0!==(r=function(){return xe}.apply(t,n))&&(e.exports=r);var Qt=o.jQuery,Jt=o.$;return xe.noConflict=function(e){return o.$===xe&&(o.$=Jt),e&&o.jQuery===xe&&(o.jQuery=Qt),xe},a||(o.jQuery=o.$=xe),xe})}).call(t,n(6)(e))},function(e,t,n){"use strict";function r(){var e=(0,a.default)("#ta-attach-images-metabox"),t=e.find("#thirsty_image_holder");e.on("click","#ta_upload_media_manager",function(n){if(n.preventDefault(),r)return void r.open();var r=wp.media({title:(0,a.default)(this).data("uploader-title"),library:{type:"image"},button:{text:(0,a.default)(this).data("uploader-button-text"),close:!0},multiple:!0});r.on("select",function(){var n=r.state().get("selection"),o=(0,a.default)("input[name=post_ID]").val(),s=[],u=(0,a.default)("#thirsty_image_holder");e.find("#thirsty_image_holder").length<=0&&e.find(".inside").append("<div id='thirsty_image_holder'></div>"),n.map(function(e){e=e.toJSON(),s.push(e.id)}),s.length>0&&a.default.ajax({url:ajaxurl,type:"POST",data:{action:"ta_add_attachments_to_affiliate_link",attachment_ids:s,affiliate_link_id:o},dataType:"json"}).done(function(n){if("success"===n.status){var r=t.data("attachments"),o=void 0;"object"==(void 0===r?"undefined":i(r))&&(o=t.data("attachments").map(function(e){return parseInt(e,10)}),o=a.default.unique(o.concat(s)),t.data("attachments",o)),e.find("#thirsty_image_holder").append(n.added_attachments_markup)}else alert(n.error_msg),console.log(n)}).fail(function(e){alert(e),console.log("Failed to add attachments to affiliate link")}).always(function(){u.find(".thirsty-attached-image").length>0&&u.show(),tb_remove()})}),r.open()}),e.on("click",".thirsty-remove-img",function(){var e=(0,a.default)(this);if(e.hasClass("removing"))return!1;e.addClass("removing");var n=parseInt(e.attr("id")),r=(0,a.default)("input[name=post_ID]").val(),o=e.closest(".thirsty-attached-image"),s=(0,a.default)("#thirsty_image_holder");a.default.ajax({url:ajaxurl,type:"POST",data:{action:"ta_remove_attachment_to_affiliate_link",attachment_id:n,affiliate_link_id:r},dataType:"json"}).done(function(e){if("success"===e.status){var r=t.data("attachments"),a=void 0;"object"==(void 0===r?"undefined":i(r))&&(a=t.data("attachments").map(function(e){return parseInt(e,10)}),a=new Set(a),a.delete(n),t.data("attachments",Array.from(a))),o.fadeOut(300).delay(300).remove(),s.find(".thirsty-attached-image").length<=0&&s.hide()}else alert(e.error_msg),console.log(e)}).fail(function(e){alert("Failed to remove attachment from affiliate link"),console.log(e)})});var n=function(){var e=(0,a.default)(".media-modal-content ul.attachments li.attachment"),n=t.data("attachments"),r=void 0;"object"==(void 0===n?"undefined":i(n))&&(r=n.map(function(e){return parseInt(e,10)}),e.each(function(){var e=(0,a.default)(this),t=(0,a.default)(this).data("id");e.show(),a.default.inArray(t,r)>-1&&e.hide()}))};e.on("click","#ta_upload_media_manager",n),(0,a.default)("body").on("click",".media-modal-content .media-menu-item",n),(0,a.default)(document).on("DOMNodeInserted",function(e){var n=(0,a.default)(e.target),r=t.data("attachments"),o=void 0;n.hasClass("attachment")&&"object"==(void 0===r?"undefined":i(r))&&(o=n.data("id"),r=r.map(function(e){return parseInt(e,10)}),a.default.inArray(o,r)>-1&&n.remove())})}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r;var o=n(0),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t,n){"use strict";function r(){var e=(0,o.default)("#ta-urls-metabox");e.on("click","button.edit-ta-slug",function(){e.find(".cloaked-fields").hide(),e.find(".slug-fields").fadeIn(200)}),e.on("click","button.save-ta-slug",function(){var t=e.find("input#ta_slug").val(),n=e.find("input#ta_cloaked_url").val(),r=n.replace(/[^\/]+\/?$/g,"");/^([a-z0-9-]+)$/.test(t)?(t=""==t?n.match(/[^\/]+$/):t,e.find("input#ta_cloaked_url").val(r+t+"/"),e.find(".slug-fields").hide(),e.find(".cloaked-fields").fadeIn(200)):(0,o.default)("input#publish").click()})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){function e(e,t){o.default.post(ajaxurl,{action:"ta_get_category_slug",term_id:e},function(n){"success"==n.status?r.append("<option value='"+e+"' data-slug='"+n.category_slug+"'>"+t+"</option>").trigger("change"):(alert(n.error_msg),console.log(n))},"json")}function t(){var e=n.find("input[type='checkbox']:checked"),t=[],i=[],a=void 0,s=void 0,u=void 0,l=void 0;if(!(e.length<1)){for(l=0;l<e.length;l++)u=(0,o.default)(e[l]).parent().text().trim(),t.push(u),i[u]=l;t=t.sort(function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),e>t?1:e<t?-1:0}),s=i[t[0]],a=(0,o.default)(e[s]),o.default.post(ajaxurl,{action:"ta_get_category_slug",term_id:a.val()},function(e){"success"==e.status?(r.find("option:first-child").data("slug",e.category_slug).attr("data-slug",e.category_slug),r.trigger("change")):(alert(e.error_msg),console.log(e))},"json")}}var n=(0,o.default)("#thirstylink-categorychecklist"),r=(0,o.default)("select[name='ta_category_slug']");n.on("change","input[type='checkbox']",function(){var n=(0,o.default)(this).val(),i=(0,o.default)(this).parent().text(),a=(0,o.default)(this).prop("checked");t(),a?e(n,i):(r.find("option[value='"+n+"']").remove(),r.trigger("change"))}),(0,o.default)(document).on("DOMNodeInserted","#thirstylink-categorychecklist",function(){var n=(0,o.default)("#thirstylink-categorychecklist li").first(),i=n.find("input[type='checkbox']").val(),a=n.find("label").text(),s=n.find("input[type='checkbox']").prop("checked");t(),s?e(i,a):r.find("option[value='"+i+"']").remove()}),(0,o.default)(document).on("change","select[name='ta_category_slug']",function(){var e=(0,o.default)(this),t=e.find("option:selected").data("slug"),n=e.data("home-link-prefix"),r=(0,o.default)("#ta_slug").val(),i=(0,o.default)("#ta_cloaked_url");(0,o.default)(this).find("option").length<=1?i.val(n+r+"/"):i.val(n+t+"/"+r+"/")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(){var e=(0,o.default)("#ta-inserted-link-scanner-metabox");e.on("click","#inserted-link-scan-trigger",function(){var t=(0,o.default)(this),n=e.find(".inside"),r=n.find(".inserted-into-table table tbody"),i=n.find(".overlay"),a=n.find(".scanned-inserted-status .last-scanned"),s=(0,o.default)("input#post_ID").val();t.prop("disabled",!0),i.css("height",n.height()).show(),o.default.post(ajaxurl,{action:"ta_link_inserted_scanner",link_id:s},function(e){"success"==e.status?(r.html(e.results_markup),a.html(e.last_scanned)):(alert(e.error_msg),console.log(e)),t.prop("disabled",!1),i.hide()},"json")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t){},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(0),o=r(i),a=n(1),s=r(a),u=n(2),l=r(u),c=n(3),f=r(c),d=n(4),p=r(d);n(5),(0,o.default)(document).ready(function(){(0,s.default)(),(0,l.default)(),(0,f.default)(),(0,p.default)()})}]);
js/app/ta-settings.js CHANGED
@@ -2,6 +2,12 @@ jQuery( document ).ready( function($){
2
 
3
  // Functions
4
  thirstySettings = {
 
 
 
 
 
 
5
  customLinkPrefix : function() {
6
 
7
  $settingsBlock.on( 'change' , '#ta_link_prefix' , function() {
@@ -26,6 +32,12 @@ jQuery( document ).ready( function($){
26
  $settingsBlock.find( '#ta_link_prefix' ).trigger( 'change' );
27
 
28
  },
 
 
 
 
 
 
29
  validLinkPrefix : function() {
30
 
31
  if ( $settingsBlock.find( '#ta_link_prefix' ).length > 0 ) {
@@ -53,6 +65,44 @@ jQuery( document ).ready( function($){
53
 
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
  };
58
 
@@ -61,5 +111,6 @@ jQuery( document ).ready( function($){
61
  // initialize custom link prefix settings display
62
  thirstySettings.customLinkPrefix();
63
  thirstySettings.validLinkPrefix();
 
64
 
65
  });
2
 
3
  // Functions
4
  thirstySettings = {
5
+
6
+ /**
7
+ * Event function that toggles if custom link prefix option is to be shown or not.
8
+ *
9
+ * @since 3.0.0
10
+ */
11
  customLinkPrefix : function() {
12
 
13
  $settingsBlock.on( 'change' , '#ta_link_prefix' , function() {
32
  $settingsBlock.find( '#ta_link_prefix' ).trigger( 'change' );
33
 
34
  },
35
+
36
+ /**
37
+ * Event function that checks on submit if the selected link prefix is valid or not.
38
+ *
39
+ * @since 3.0.0
40
+ */
41
  validLinkPrefix : function() {
42
 
43
  if ( $settingsBlock.find( '#ta_link_prefix' ).length > 0 ) {
65
 
66
  }
67
 
68
+ },
69
+
70
+ /**
71
+ * Event function that show/hides the category select field for toggle options that have the 'category' option.
72
+ *
73
+ * @since 3.2.0
74
+ */
75
+ toggleCat : function() {
76
+
77
+ $settingsBlock.on( 'change' , 'select.toggle-cat' , function() {
78
+
79
+ var $cat_select = $settingsBlock.find( 'select.toggle-cat-' + $(this).prop( 'id' ) ),
80
+ $cat_select_row = $cat_select.closest( 'tr' ),
81
+ option_value = $(this).val();
82
+
83
+ if ( $cat_select.length < 1 || $cat_select_row.length < 1 )
84
+ return;
85
+
86
+ if ( option_value == 'category' ) {
87
+
88
+ $cat_select.prop( 'disabled' , false );
89
+ $cat_select.prop( 'required' , true );
90
+ $cat_select.selectize({
91
+ plugins : [ 'remove_button' , 'drag_drop' ]
92
+ });
93
+ $cat_select_row.show();
94
+
95
+ } else {
96
+
97
+ $cat_select.prop( 'disabled' , true );
98
+ $cat_select[0].selectize.destroy();
99
+ $cat_select.prop( 'required' , false );
100
+ $cat_select_row.hide();
101
+ }
102
+
103
+ } );
104
+
105
+ $settingsBlock.find( 'select.toggle-cat' ).trigger( 'change' );
106
  }
107
  };
108
 
111
  // initialize custom link prefix settings display
112
  thirstySettings.customLinkPrefix();
113
  thirstySettings.validLinkPrefix();
114
+ thirstySettings.toggleCat();
115
 
116
  });
js/app/ta.js CHANGED
@@ -4,30 +4,50 @@ jQuery( document ).ready( function($) {
4
 
5
  thirstyFunctions = {
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * Record link clicks AJAX event trigger.
9
  *
10
  * @since 3.0.0
 
11
  */
12
- recordLinkStat : function() {
13
 
14
- $( 'body' ).on( 'click' , 'a' , function(e) {
 
 
 
15
 
16
- var $link = $(this),
17
- href = $link.attr( 'href' ),
18
- linkID = $(this).data( 'linkid' );
19
 
20
- if ( thirstyFunctions.isThirstyLink( href ) || linkID ) {
 
 
21
 
22
- $.post( thirsty_global_vars.ajax_url , {
23
- action : 'ta_click_data_redirect',
24
- href : href,
25
- page : window.location.href,
26
- link_id : linkID
27
- } );
28
- }
29
 
30
- });
 
 
 
 
 
 
 
31
  },
32
 
33
  /**
@@ -137,7 +157,7 @@ jQuery( document ).ready( function($) {
137
  });
138
 
139
  // Initiate record link click stat function
140
- thirstyFunctions.recordLinkStat();
141
 
142
  // Initialize uncloak links function
143
  thirstyFunctions.linkFixer();
4
 
5
  thirstyFunctions = {
6
 
7
+ /**
8
+ * Function that holds all of the necessary events to trigger a record link stat.
9
+ *
10
+ * @since 3.2.0
11
+ */
12
+ recordLinkStatEvents : function() {
13
+
14
+ // record link on normal click
15
+ $( 'body' ).on( 'click' , 'a' , function(e) {
16
+ thirstyFunctions.recordLinkStat( $(this) );
17
+ });
18
+
19
+ },
20
+
21
  /**
22
  * Record link clicks AJAX event trigger.
23
  *
24
  * @since 3.0.0
25
+ * @since 3.2.0 Removed event trigger. Added keyword variable in the AJAX trigger.
26
  */
27
+ recordLinkStat : function( $link ) {
28
 
29
+ var href = $link.attr( 'href' ),
30
+ linkID = $link.data( 'linkid' ),
31
+ keyword = $link.text(),
32
+ imgsrc;
33
 
34
+ // get image filename and use it as keyword.
35
+ if ( ! keyword && $link.find( 'img' ).length ) {
 
36
 
37
+ imgsrc = $link.find( 'img' ).prop( 'src' ).split('/');
38
+ keyword = imgsrc[ imgsrc.length - 1 ];
39
+ }
40
 
41
+ if ( thirstyFunctions.isThirstyLink( href ) || linkID ) {
 
 
 
 
 
 
42
 
43
+ $.post( thirsty_global_vars.ajax_url , {
44
+ action : 'ta_click_data_redirect',
45
+ href : href,
46
+ page : window.location.href,
47
+ link_id : linkID,
48
+ keyword : keyword
49
+ } );
50
+ }
51
  },
52
 
53
  /**
157
  });
158
 
159
  // Initiate record link click stat function
160
+ thirstyFunctions.recordLinkStatEvents();
161
 
162
  // Initialize uncloak links function
163
  thirstyFunctions.linkFixer();
js/lib/thirstymce/widget-editor.js ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Register mce buttons on the widget WP editor.
2
+ jQuery( document ).on( 'wp-before-tinymce-init' , function( event , init ) {
3
+ init.toolbar1 += ',thirstyaffiliates_button,thirstyaffiliates_quickaddlink_button';
4
+ } );
5
+
6
+ jQuery( document ).on( 'tinymce-editor-setup', function( event, editor ) {
7
+
8
+ // don't run the file if global variable is not defined.
9
+ if( typeof parent.ta_editor_var != 'object' )
10
+ return;
11
+
12
+ var $ = window.jQuery,
13
+ linkNode,
14
+ inputInstance = {
15
+ reset : function() {}
16
+ },
17
+ thirstylink_apply_key_command = navigator.platform.match(/Mac/i) ? '⌘⌥K' : 'Ctrl+Alt+K',
18
+ thirstylink_quick_add_key_command = navigator.platform.match(/Mac/i) ? '⌘⇧K' : 'Ctrl+Shift+K';
19
+
20
+ // get the selected link
21
+ function getSelectedLink() {
22
+ var href, html,
23
+ node = editor.selection.getNode(),
24
+ link = editor.dom.getParent( node, 'a[href]' );
25
+
26
+ if ( ! link ) {
27
+ html = editor.selection.getContent({ format: 'raw' });
28
+
29
+ if ( html && html.indexOf( '</a>' ) !== -1 ) {
30
+ href = html.match( /href="([^">]+)"/ );
31
+
32
+ if ( href && href[1] ) {
33
+ link = editor.$( 'a[href="' + href[1] + '"]', node )[0];
34
+ }
35
+
36
+ if ( link ) {
37
+ editor.selection.select( link );
38
+ }
39
+ }
40
+ }
41
+
42
+ return link;
43
+ }
44
+
45
+ // remove affiliate link placeholder
46
+ function removePlaceholders() {
47
+ editor.$( 'a' ).each( function( i, element ) {
48
+ var $element = editor.$( element );
49
+
50
+ if ( $element.attr( 'href' ) === '_wp_thirstylink_placeholder' ) {
51
+ editor.dom.remove( element, true );
52
+ } else if ( $element.attr( 'data-thirstylink-edit' ) ) {
53
+ $element.attr( 'data-thirstylink-edit', null );
54
+ }
55
+ });
56
+ }
57
+
58
+ /*
59
+ |--------------------------------------------------------------------------
60
+ | TinyMCE Custom Commands
61
+ |--------------------------------------------------------------------------
62
+ */
63
+
64
+ editor.addCommand( 'thirstylink_advance' , function() {
65
+
66
+ var post_id = $( '#post_ID' ).val(),
67
+ style = parent.ta_editor_var.insertion_type === "shortcode" ? 'box-shadow: none; border: 1px solid #999; text-decoration: none; color: inherit;' : '';
68
+
69
+ removePlaceholders();
70
+ editor.execCommand( 'mceInsertLink', false, {
71
+ class : 'thirstylink',
72
+ title : '_title_placeholder',
73
+ style : style,
74
+ href : '_wp_thirstylink_placeholder',
75
+ rel : '_rel_placeholder',
76
+ target : '_target_placeholder' }
77
+ );
78
+
79
+ linkNode = editor.$( 'a[href="_wp_thirstylink_placeholder"]' )[0];
80
+
81
+ ThirstyLinkPicker.editor = editor;
82
+ ThirstyLinkPicker.linkNode = linkNode;
83
+ ThirstyLinkPicker.inputInstance = inputInstance;
84
+
85
+ editor.execCommand( "Unlink" , false , false );
86
+
87
+ tb_show( 'Add Affiliate Link' , window.ajaxurl + '?action=ta_advanced_add_affiliate_link&post_id=' + post_id + '&height=640&width=640&TB_iframe=false' );
88
+ ThirstyLinkPicker.resize_thickbox();
89
+
90
+ inputInstance.reset();
91
+ } );
92
+
93
+ editor.addCommand( 'thirstylink_quick_add' , function() {
94
+
95
+ var selection = editor.selection.getContent(),
96
+ post_id = $( '#post_ID' ).val();
97
+
98
+ ThirstyLinkPicker.editor = editor;
99
+
100
+ tb_show( 'Quick Add Affiliate Link' , window.ajaxurl + '?action=ta_quick_add_affiliate_link_thickbox&post_id=' + post_id + '&height=500&width=500&selection=' + selection + '&TB_iframe=false' );
101
+ ThirstyLinkPicker.resize_thickbox();
102
+ } );
103
+
104
+ /*
105
+ |--------------------------------------------------------------------------
106
+ | TinyMCE Custom Buttons
107
+ |--------------------------------------------------------------------------
108
+ */
109
+
110
+ // add affiliate link button
111
+ editor.addButton( 'thirstyaffiliates_button' , {
112
+ title : 'Add Affiliate Link (' + thirstylink_apply_key_command + ')',
113
+ image : ta_widget_editor_url + '/img/aff.gif',
114
+ icon : 'test_icon',
115
+ cmd : 'thirstylink_advance'
116
+ });
117
+
118
+ // quick add affiliate link post
119
+ editor.addButton( 'thirstyaffiliates_quickaddlink_button' , {
120
+ title : 'Quick Add Affiliate Link (' + thirstylink_quick_add_key_command + ')',
121
+ image : ta_widget_editor_url + '/img/aff-new.gif',
122
+ cmd : 'thirstylink_quick_add'
123
+ });
124
+
125
+ /*
126
+ |--------------------------------------------------------------------------
127
+ | TinyMCE Custom keyboard shortcuts
128
+ |--------------------------------------------------------------------------
129
+ */
130
+
131
+ editor.addShortcut( 'meta+alt+k' , 'Add Affiliate Link' , 'thirstylink_advance' );
132
+ editor.addShortcut( 'meta+shift+k' , 'Quick Add Affiliate Link' , 'thirstylink_quick_add' );
133
+
134
+ });
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: affiliate, link, affiliate link management, link cloaker, link redirect, s
5
  Requires at least: 3.4
6
  Requires PHP: 5.6
7
  Tested up to: 4.9.1
8
- Stable tag: 3.1.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -159,9 +159,26 @@ See our [Knowledge Base](https://thirstyaffiliates.com/knowledge-base/?utm_sourc
159
 
160
  == Changelog ==
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  = 3.1.3 =
163
  * Improvement: Add a small "Edit" link on read only fields on the List view
164
- * Bug Fix: When migrated, geolocation URLs still have the &amp ;. It needs to be changed to &
165
 
166
  = 3.1.2 =
167
  * Bug Fix: Fix link fixer script to detect links with either http or https protocol
5
  Requires at least: 3.4
6
  Requires PHP: 5.6
7
  Tested up to: 4.9.1
8
+ Stable tag: 3.2.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
159
 
160
  == Changelog ==
161
 
162
+ = 3.2.0 =
163
+ * Feature: Feature to determine what pages the current affiliate link is added to
164
+ * Feature: Hide currently attached images from the media box to avoid inserting duplicate image to a thirsty link
165
+ * Feature: Ability to set some link appearance settings on a per category level
166
+ * Feature: Add ta link picker on Text Editor Widget
167
+ * Feature: Ability to add link categories from the Quick Add form of the TA link picker
168
+ * Feature: Polylang Support
169
+ * Feature: WPML Support
170
+ * Improvement: Allow sorting of thirsty links on cpt listing by link category and other headers
171
+ * Improvement: Make settings page into a vertical orientation
172
+ * Improvement: Set default redirect type to 302
173
+ * Improvement: Tidy up code
174
+ * Bug Fix: Console errors on inserting image into a thirsty link
175
+ * Bug Fix: When editing the cloaked url, the final "/" character is not added back
176
+ * Bug Fix: Last 7 days link performance report graph is not accurate
177
+ * Bug Fix: Fix php notices on the log
178
+
179
  = 3.1.3 =
180
  * Improvement: Add a small "Edit" link on read only fields on the List view
181
+ * Bug Fix: When migrated, geolocation URLs still have the &amp;. It needs to be changed to &
182
 
183
  = 3.1.2 =
184
  * Bug Fix: Fix link fixer script to detect links with either http or https protocol
thirstyaffiliates.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ThirstyAffiliates
4
  * Plugin URI: http://thirstyaffiliates.com/
5
  * Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
6
- * Version: 3.1.3
7
  * Author: Rymera Web Co
8
  * Author URI: https://rymera.com.au/
9
  * Requires at least: 4.4.2
3
  * Plugin Name: ThirstyAffiliates
4
  * Plugin URI: http://thirstyaffiliates.com/
5
  * Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
6
+ * Version: 3.2.0
7
  * Author: Rymera Web Co
8
  * Author URI: https://rymera.com.au/
9
  * Requires at least: 4.4.2
views/cpt/view-attach-images-metabox.php CHANGED
@@ -28,7 +28,7 @@ if ( function_exists( 'wp_enqueue_media' ) && $legacy_uploader != 'yes' ) : ?>
28
  </script>
29
 
30
  <?php if ( ! empty( $attachments ) ) : ?>
31
- <div id="thirsty_image_holder">
32
  <?php foreach ( $attachments as $attachment_id ) {
33
  $img = wp_get_attachment_image_src( $attachment_id , 'full' );
34
  include( $this->_constants->VIEWS_ROOT_PATH() . 'cpt/view-attach-images-metabox-single-image.php' );
28
  </script>
29
 
30
  <?php if ( ! empty( $attachments ) ) : ?>
31
+ <div id="thirsty_image_holder" data-attachments="<?php echo esc_attr( json_encode( $attachments ) ); ?>">
32
  <?php foreach ( $attachments as $attachment_id ) {
33
  $img = wp_get_attachment_image_src( $attachment_id , 'full' );
34
  include( $this->_constants->VIEWS_ROOT_PATH() . 'cpt/view-attach-images-metabox-single-image.php' );
views/cpt/view-inserted-link-scanner-metabox.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2
+
3
+ <div class="scanned-inserted-status">
4
+ <button id="inserted-link-scan-trigger" class="button-primary" type="button"><?php _e( 'Start Scan' , 'thirstyaffiliates' ); ?></button>
5
+ <span class="last-scanned"><?php echo $last_scanned_txt; ?></span>
6
+ </div>
7
+
8
+ <div class="inserted-into-table">
9
+ <table>
10
+ <thead>
11
+ <tr>
12
+ <th class="id"><?php _e( 'ID' , 'thirstyaffiliates' ); ?></th>
13
+ <th class="title"><?php _e( 'Title' , 'thirstyaffiliates' ); ?></th>
14
+ <th class="post-type"><?php _e( 'Post Type' , 'thirstyaffiliates' ); ?></th>
15
+ <th class="actions"></th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <?php echo $inserted_into_rows_html; ?>
20
+ </tbody>
21
+ </table>
22
+ </div>
23
+
24
+ <div class="overlay" style="background-image:url(<?php echo esc_url( $spinner_image_src ); ?>);"></div>
views/cpt/view-urls-metabox.php CHANGED
@@ -20,7 +20,7 @@ wp_nonce_field( 'thirsty_affiliates_cpt_nonce', '_thirstyaffiliates_nonce' ); ?>
20
  <a class="button" href="<?php echo esc_attr( $thirstylink->get_prop( 'permalink' ) ); ?>" target="_blank"><?php _e( 'Visit Link' , 'thirstyaffiliates' ); ?></a>
21
  </span>
22
  <span class="slug-fields" style="display: none;">
23
- <input type="text" class="ta-form-input" id="ta_slug" name="post_name" value="<?php echo esc_attr( $thirstylink->get_prop( 'slug' ) ); ?>">
24
  <button type="button" class="save-ta-slug button"><?php _e( 'Save' , 'thirstyaffiliates' ); ?></button>
25
  </span>
26
  </p>
20
  <a class="button" href="<?php echo esc_attr( $thirstylink->get_prop( 'permalink' ) ); ?>" target="_blank"><?php _e( 'Visit Link' , 'thirstyaffiliates' ); ?></a>
21
  </span>
22
  <span class="slug-fields" style="display: none;">
23
+ <input type="text" class="ta-form-input" id="ta_slug" name="post_name" pattern="[a-z0-9-]+" value="<?php echo esc_attr( $thirstylink->get_prop( 'slug' ) ); ?>">
24
  <button type="button" class="save-ta-slug button"><?php _e( 'Save' , 'thirstyaffiliates' ); ?></button>
25
  </span>
26
  </p>
views/linkpicker/quick-add-affiliate-link.php CHANGED
@@ -67,6 +67,17 @@
67
  <select>
68
  </div>
69
 
 
 
 
 
 
 
 
 
 
 
 
70
  <?php do_action( 'ta_quick_add_affiliate_link_form' ); ?>
71
 
72
  <div class="field-row submit-row">
@@ -86,7 +97,15 @@
86
  </form>
87
  </div>
88
 
89
- <script>function dummySubmitFunc( event ) { event.preventDefault(); }</script>
 
 
 
 
 
 
 
 
90
  </body>
91
 
92
  </html>
67
  <select>
68
  </div>
69
 
70
+ <div class="field-row link-categories">
71
+ <label for="ta_link_categories">
72
+ <?php _e( 'Link Categories' , 'thirstyaffiliates' ); ?>
73
+ </label>
74
+ <select multiple id="link_categories" name="ta_link_categories[]" data-placeholder="<?php esc_attr_e( 'Select categories...' , 'thirstyaffiliates' ); ?>">
75
+ <?php foreach ( $categories as $category ) : ?>
76
+ <option value="<?php echo $category->term_id; ?>"><?php echo $category->name; ?></option>
77
+ <?php endforeach; ?>
78
+ </select>
79
+ </div>
80
+
81
  <?php do_action( 'ta_quick_add_affiliate_link_form' ); ?>
82
 
83
  <div class="field-row submit-row">
97
  </form>
98
  </div>
99
 
100
+ <script>
101
+ jQuery( document ).ready( function( $ ) {
102
+ $( 'select#link_categories' ).selectize({
103
+ plugins : [ 'remove_button' , 'drag_drop' ]
104
+ });
105
+ });
106
+
107
+ function dummySubmitFunc( event ) { event.preventDefault(); }
108
+ </script>
109
  </body>
110
 
111
  </html>
views/reports/link-performance-report.php CHANGED
@@ -32,6 +32,8 @@
32
 
33
  <div class="chart-sidebar">
34
 
 
 
35
  <ul class="chart-legend">
36
  <li style="border-color: #3498db">
37
  <?php _e( 'General' , 'thirstyaffiliates' ); ?>
@@ -39,6 +41,8 @@
39
  </li>
40
  </ul>
41
 
 
 
42
  <div class="add-legend">
43
  <label for="add-report-data"><?php _e( 'Fetch report for specific link:' , 'thirstyaffiliates' ); ?></label>
44
  <div class="input-wrap">
32
 
33
  <div class="chart-sidebar">
34
 
35
+ <?php do_action( 'ta_before_stats_reporting_chart_legend' ); ?>
36
+
37
  <ul class="chart-legend">
38
  <li style="border-color: #3498db">
39
  <?php _e( 'General' , 'thirstyaffiliates' ); ?>
41
  </li>
42
  </ul>
43
 
44
+ <?php do_action( 'ta_after_stats_reporting_chart_legend' ); ?>
45
+
46
  <div class="add-legend">
47
  <label for="add-report-data"><?php _e( 'Fetch report for specific link:' , 'thirstyaffiliates' ); ?></label>
48
  <div class="input-wrap">
wpml-config.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <custom-types>
3
+ <custom-type translate="0">thirstylink</custom-type>
4
+ </custom-types>
5
+ <taxonomies>
6
+ <taxonomy translate="0">thirstylink-category</taxonomy>
7
+ </taxonomies>
8
+ </wpml-config>