Event Tickets - Version 5.1.7

Version Description

Download this release

Release Info

Developer bordoni
Plugin Icon 128x128 Event Tickets
Version 5.1.7
Comparing to
See all releases

Code changes from version 5.1.6 to 5.1.7

common/lang/tribe-common-de_DE.mo CHANGED
Binary file
common/vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit51fc9e9b86075ccefa00f781edaf6b10::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitfd2c0c7c79c883e60f6515b57705ef5e::getLoader();
common/vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitbed81922805a85d1c1e326a8e0e4a32d::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit2531c61c88d37359a301531abc3f6d09::getLoader();
common/vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit51fc9e9b86075ccefa00f781edaf6b10
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit51fc9e9b86075ccefa00f781edaf6b10
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit51fc9e9b86075ccefa00f781edaf6b10', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit51fc9e9b86075ccefa00f781edaf6b10', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitfd2c0c7c79c883e60f6515b57705ef5e
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitfd2c0c7c79c883e60f6515b57705ef5e', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitfd2c0c7c79c883e60f6515b57705ef5e', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
common/vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitbed81922805a85d1c1e326a8e0e4a32d {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitbed81922805a85d1c1e326a8e0e4a32d {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitbed81922805a85d1c1e326a8e0e4a32d', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitbed81922805a85d1c1e326a8e0e4a32d', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit2531c61c88d37359a301531abc3f6d09 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit2531c61c88d37359a301531abc3f6d09', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit2531c61c88d37359a301531abc3f6d09', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
common/vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
@@ -234,10 +234,10 @@ class ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10
234
  public static function getInitializer(ClassLoader $loader)
235
  {
236
  return \Closure::bind(function () use ($loader) {
237
- $loader->prefixLengthsPsr4 = ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10::$prefixLengthsPsr4;
238
- $loader->prefixDirsPsr4 = ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10::$prefixDirsPsr4;
239
- $loader->prefixesPsr0 = ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10::$prefixesPsr0;
240
- $loader->classMap = ComposerStaticInit51fc9e9b86075ccefa00f781edaf6b10::$classMap;
241
 
242
  }, null, ClassLoader::class);
243
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
234
  public static function getInitializer(ClassLoader $loader)
235
  {
236
  return \Closure::bind(function () use ($loader) {
237
+ $loader->prefixLengthsPsr4 = ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e::$prefixLengthsPsr4;
238
+ $loader->prefixDirsPsr4 = ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e::$prefixDirsPsr4;
239
+ $loader->prefixesPsr0 = ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e::$prefixesPsr0;
240
+ $loader->classMap = ComposerStaticInitfd2c0c7c79c883e60f6515b57705ef5e::$classMap;
241
 
242
  }, null, ClassLoader::class);
243
  }
event-tickets.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Event Tickets
4
  Plugin URI: https://evnt.is/1acb
5
  Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
6
- Version: 5.1.6
7
  Author: The Events Calendar
8
  Author URI: https://evnt.is/1aor
9
  License: GPLv2 or later
3
  Plugin Name: Event Tickets
4
  Plugin URI: https://evnt.is/1acb
5
  Description: Event Tickets allows you to sell basic tickets and collect RSVPs from any post, page, or event.
6
+ Version: 5.1.7
7
  Author: The Events Calendar
8
  Author URI: https://evnt.is/1aor
9
  License: GPLv2 or later
lang/event-tickets-de_DE.mo CHANGED
Binary file
lang/event-tickets-el.mo CHANGED
Binary file
lang/event-tickets-it_IT.mo CHANGED
Binary file
lang/event-tickets-pt_PT.mo CHANGED
Binary file
lang/event-tickets-ro_RO.mo CHANGED
Binary file
lang/event-tickets.pot CHANGED
@@ -2,17 +2,17 @@
2
  # This file is distributed under the same license as the Event Tickets package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Event Tickets 5.1.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
7
- "POT-Creation-Date: 2021-07-07 10:17:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2021-07-07 10:17\n"
12
  "Last-Translator: \n"
13
  "Language-Team: \n"
14
 
15
- #. #-#-#-#-# event-tickets.pot (Event Tickets 5.1.6) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: event-tickets.php:62 src/Tribe/Admin/Notices.php:92 src/Tribe/Main.php:683
18
  #: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
@@ -81,7 +81,7 @@ msgstr ""
81
 
82
  #: src/Tickets/Commerce/Gateways/Legacy/Settings.php:133
83
  #: src/Tickets/Commerce/Gateways/Legacy/Settings.php:145
84
- #: src/Tribe/Attendees.php:547 src/admin-views/tribe-commerce-settings.php:93
85
  #: src/admin-views/tribe-commerce-settings.php:105
86
  msgid "Yes"
87
  msgstr ""
@@ -638,7 +638,7 @@ msgid "Includes ticketed attendees with orders marked Completed."
638
  msgstr ""
639
 
640
  #: src/Tribe/Admin/Columns/Tickets.php:56
641
- #: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:210
642
  #: src/Tribe/Commerce/PayPal/Main.php:458
643
  #: src/Tribe/Tabbed_View/Attendee_Report_Tab.php:22 src/admin-views/list.php:95
644
  msgid "Attendees"
@@ -926,145 +926,149 @@ msgstr ""
926
  msgid "Attendee Registration"
927
  msgstr ""
928
 
929
- #: src/Tribe/Attendees.php:82
930
  msgid "Post type"
931
  msgstr ""
932
 
933
- #: src/Tribe/Attendees.php:111
934
  msgctxt "attendee event actions"
935
  msgid "Edit %s"
936
  msgstr ""
937
 
938
- #: src/Tribe/Attendees.php:112
939
  msgctxt "attendee event actions"
940
  msgid "View %s"
941
  msgstr ""
942
 
943
- #: src/Tribe/Attendees.php:115
944
  msgctxt "attendee event actions"
945
  msgid "Edit"
946
  msgstr ""
947
 
948
- #: src/Tribe/Attendees.php:116
949
  msgctxt "attendee event actions"
950
  msgid "View"
951
  msgstr ""
952
 
953
- #: src/Tribe/Attendees.php:143
954
  msgctxt "attendee summary"
955
  msgid "Checked in:"
956
  msgstr ""
957
 
958
- #: src/Tribe/Attendees.php:208 src/admin-views/list.php:93
959
  msgid "See who purchased tickets to this event"
960
  msgstr ""
961
 
962
- #: src/Tribe/Attendees.php:318
963
  msgid "You need to select a user or type a valid email address"
964
  msgstr ""
965
 
966
- #: src/Tribe/Attendees.php:319
967
  msgid "Sending..."
968
  msgstr ""
969
 
970
- #: src/Tribe/Attendees.php:323
971
  msgid "You must first select one or more tickets before you can move them!"
972
  msgstr ""
973
 
974
- #: src/Tribe/Attendees.php:325
975
  msgid "Please confirm that you would like to delete this attendee."
976
  msgstr ""
977
 
978
- #: src/Tribe/Attendees.php:326
979
  msgid "Please confirm you would like to delete these attendees."
980
  msgstr ""
981
 
982
- #: src/Tribe/Attendees.php:361
983
  msgid "Columns"
984
  msgstr ""
985
 
986
- #: src/Tribe/Attendees.php:361
987
  msgid ""
988
  "You can use Screen Options to select which columns you want to see. The "
989
  "selection works in the table below, in the email, for print and for the CSV "
990
  "export."
991
  msgstr ""
992
 
993
- #: src/Tribe/Attendees.php:439
994
  msgid "%s - Attendee list"
995
  msgstr ""
996
 
997
- #: src/Tribe/Attendees.php:512
998
  msgctxt "attendee export"
999
  msgid "Order ID"
1000
  msgstr ""
1001
 
1002
- #: src/Tribe/Attendees.php:513
1003
  msgctxt "attendee export"
1004
  msgid "Order Status"
1005
  msgstr ""
1006
 
1007
- #: src/Tribe/Attendees.php:514
1008
  msgctxt "attendee export"
1009
  msgid "%s ID"
1010
  msgstr ""
1011
 
1012
- #: src/Tribe/Attendees.php:515
1013
  msgctxt "attendee export"
1014
  msgid "Ticket Holder Name"
1015
  msgstr ""
1016
 
1017
- #: src/Tribe/Attendees.php:516
1018
  msgctxt "attendee export"
1019
  msgid "Ticket Holder Email Address"
1020
  msgstr ""
1021
 
1022
- #: src/Tribe/Attendees.php:517
1023
  msgctxt "attendee export"
1024
  msgid "Purchaser Name"
1025
  msgstr ""
1026
 
1027
- #: src/Tribe/Attendees.php:518
1028
  msgctxt "attendee export"
1029
  msgid "Purchaser Email Address"
1030
  msgstr ""
1031
 
1032
- #: src/Tribe/Attendees.php:658
1033
  msgid "attendees"
1034
  msgstr ""
1035
 
1036
- #: src/Tribe/Attendees.php:696
1037
  msgid "Invalid Event ID"
1038
  msgstr ""
1039
 
1040
- #: src/Tribe/Attendees.php:713
1041
  msgid "Cheatin Huh?"
1042
  msgstr ""
1043
 
1044
- #: src/Tribe/Attendees.php:719
1045
  msgid "Empty user and email"
1046
  msgstr ""
1047
 
1048
- #: src/Tribe/Attendees.php:731
1049
  msgid "Invalid Email"
1050
  msgstr ""
1051
 
1052
- #: src/Tribe/Attendees.php:737 src/Tribe/Attendees.php:753
1053
  msgid "Invalid User ID"
1054
  msgstr ""
1055
 
1056
- #: src/Tribe/Attendees.php:773
1057
  msgid "Attendee List for: %s"
1058
  msgstr ""
1059
 
1060
- #: src/Tribe/Attendees.php:774
1061
  msgid "Error when sending the email"
1062
  msgstr ""
1063
 
1064
- #: src/Tribe/Attendees.php:781
1065
  msgid "Email sent successfully!"
1066
  msgstr ""
1067
 
 
 
 
 
1068
  #: src/Tribe/Attendees_Table.php:65
1069
  msgid "Number of attendees per page:"
1070
  msgstr ""
@@ -1113,15 +1117,11 @@ msgstr ""
1113
  msgid "View order"
1114
  msgstr ""
1115
 
1116
- #: src/Tribe/Attendees_Table.php:604
1117
  msgid "Print"
1118
  msgstr ""
1119
 
1120
  #: src/Tribe/Attendees_Table.php:605
1121
- msgid "Export"
1122
- msgstr ""
1123
-
1124
- #: src/Tribe/Attendees_Table.php:612
1125
  #: src/Tribe/Commerce/PayPal/Orders/Table.php:100 src/Tribe/Privacy.php:189
1126
  #: src/Tribe/Privacy.php:470 src/Tribe/Privacy.php:566
1127
  #: src/views/blocks/rsvp/form/email.php:32 src/views/tickets/rsvp.php:237
@@ -1130,68 +1130,68 @@ msgstr ""
1130
  msgid "Email"
1131
  msgstr ""
1132
 
1133
- #: src/Tribe/Attendees_Table.php:639 src/admin-views/list.php:41
1134
  msgid "Delete"
1135
  msgstr ""
1136
 
1137
- #: src/Tribe/Attendees_Table.php:640
1138
  msgid "Check in"
1139
  msgstr ""
1140
 
1141
- #: src/Tribe/Attendees_Table.php:641
1142
  msgid "Undo Check in"
1143
  msgstr ""
1144
 
1145
- #: src/Tribe/Attendees_Table.php:968
1146
  msgid "No matching attendees found."
1147
  msgstr ""
1148
 
1149
- #: src/Tribe/Attendees_Table.php:982
1150
  msgctxt "Attendees Table search options"
1151
  msgid "Search by Purchaser Name"
1152
  msgstr ""
1153
 
1154
- #: src/Tribe/Attendees_Table.php:983
1155
  msgctxt "Attendees Table search options"
1156
  msgid "Search by Purchaser Email"
1157
  msgstr ""
1158
 
1159
- #: src/Tribe/Attendees_Table.php:984
1160
  msgctxt "Attendees Table search options"
1161
  msgid "Search by Ticket Holder Name"
1162
  msgstr ""
1163
 
1164
- #: src/Tribe/Attendees_Table.php:985
1165
  msgctxt "Attendees Table search options"
1166
  msgid "Search by Ticket Holder Email"
1167
  msgstr ""
1168
 
1169
- #: src/Tribe/Attendees_Table.php:986
1170
  msgctxt "Attendees Table search options"
1171
  msgid "Search by User ID"
1172
  msgstr ""
1173
 
1174
- #: src/Tribe/Attendees_Table.php:987
1175
  msgctxt "Attendees Table search options"
1176
  msgid "Search by Order Status"
1177
  msgstr ""
1178
 
1179
- #: src/Tribe/Attendees_Table.php:988
1180
  msgctxt "Attendees Table search options"
1181
  msgid "Search by Order ID"
1182
  msgstr ""
1183
 
1184
- #: src/Tribe/Attendees_Table.php:989
1185
  msgctxt "Attendees Table search options"
1186
  msgid "Search by Security Code"
1187
  msgstr ""
1188
 
1189
- #: src/Tribe/Attendees_Table.php:990
1190
  msgctxt "Attendees Table search options"
1191
  msgid "Search by %s ID"
1192
  msgstr ""
1193
 
1194
- #: src/Tribe/Attendees_Table.php:991
1195
  msgctxt "Attendees Table search options"
1196
  msgid "Search by Product ID"
1197
  msgstr ""
@@ -1342,7 +1342,7 @@ msgstr ""
1342
 
1343
  #. Translators: %1$s: the post/event title, %2$d: the post/event ID.
1344
  #: src/Tribe/Commerce/Orders_Tabbed_View.php:36
1345
- #: src/admin-views/attendees.php:33
1346
  msgctxt "attendees report screen heading"
1347
  msgid "Attendees for: %1$s [#%2$d]"
1348
  msgstr ""
@@ -1535,7 +1535,6 @@ msgid "Order"
1535
  msgstr ""
1536
 
1537
  #: src/Tribe/Commerce/PayPal/Orders/Table.php:99
1538
- #: src/views/tickets/email.php:450
1539
  msgid "Purchaser"
1540
  msgstr ""
1541
 
@@ -3174,17 +3173,17 @@ msgstr ""
3174
  msgid "Undo Check In"
3175
  msgstr ""
3176
 
3177
- #: src/admin-views/attendees.php:67
3178
  msgctxt "attendee screen summary"
3179
  msgid "%s Details"
3180
  msgstr ""
3181
 
3182
- #: src/admin-views/attendees.php:109
3183
  msgctxt "attendee screen summary"
3184
  msgid "Overview"
3185
  msgstr ""
3186
 
3187
- #: src/admin-views/attendees.php:169
3188
  msgid "Search attendees"
3189
  msgstr ""
3190
 
@@ -3288,6 +3287,11 @@ msgctxt "ticket ID title attribute"
3288
  msgid "Edit %s ID: %d"
3289
  msgstr ""
3290
 
 
 
 
 
 
3291
  #: src/admin-views/editor/list-table.php:39
3292
  msgid "Available"
3293
  msgstr ""
@@ -4680,6 +4684,7 @@ msgstr ""
4680
 
4681
  #: src/views/registration/attendees/fields.php:15
4682
  #: src/views/registration-js/attendees/fields.php:19
 
4683
  msgid "Attendee"
4684
  msgstr ""
4685
 
@@ -4761,7 +4766,7 @@ msgstr ""
4761
 
4762
  #: src/views/tickets/email-non-attendance.php:39
4763
  #: src/views/tickets/email-ticket-type-moved.php:25
4764
- #: src/views/tickets/email-tickets-moved.php:26 src/views/tickets/email.php:59
4765
  msgid "Your tickets"
4766
  msgstr ""
4767
 
@@ -4804,16 +4809,16 @@ msgid_plural ""
4804
  msgstr[0] ""
4805
  msgstr[1] ""
4806
 
4807
- #: src/views/tickets/email.php:435
4808
  msgid "Ticket #"
4809
  msgstr ""
4810
 
4811
- #: src/views/tickets/email.php:442
4812
  msgctxt "ticket type email heading"
4813
  msgid "%s Type"
4814
  msgstr ""
4815
 
4816
- #: src/views/tickets/email.php:454
4817
  msgid "Security Code"
4818
  msgstr ""
4819
 
2
  # This file is distributed under the same license as the Event Tickets package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Event Tickets 5.1.7\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/event-tickets\n"
7
+ "POT-Creation-Date: 2021-07-30 07:08:07+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2021-07-30 07:08\n"
12
  "Last-Translator: \n"
13
  "Language-Team: \n"
14
 
15
+ #. #-#-#-#-# event-tickets.pot (Event Tickets 5.1.7) #-#-#-#-#
16
  #. Plugin Name of the plugin/theme
17
  #: event-tickets.php:62 src/Tribe/Admin/Notices.php:92 src/Tribe/Main.php:683
18
  #: src/Tribe/Privacy.php:59 src/admin-views/admin-welcome-message.php:58
81
 
82
  #: src/Tickets/Commerce/Gateways/Legacy/Settings.php:133
83
  #: src/Tickets/Commerce/Gateways/Legacy/Settings.php:145
84
+ #: src/Tribe/Attendees.php:549 src/admin-views/tribe-commerce-settings.php:93
85
  #: src/admin-views/tribe-commerce-settings.php:105
86
  msgid "Yes"
87
  msgstr ""
638
  msgstr ""
639
 
640
  #: src/Tribe/Admin/Columns/Tickets.php:56
641
+ #: src/Tribe/Admin/Manager/Service_Provider.php:173 src/Tribe/Attendees.php:212
642
  #: src/Tribe/Commerce/PayPal/Main.php:458
643
  #: src/Tribe/Tabbed_View/Attendee_Report_Tab.php:22 src/admin-views/list.php:95
644
  msgid "Attendees"
926
  msgid "Attendee Registration"
927
  msgstr ""
928
 
929
+ #: src/Tribe/Attendees.php:84
930
  msgid "Post type"
931
  msgstr ""
932
 
933
+ #: src/Tribe/Attendees.php:113
934
  msgctxt "attendee event actions"
935
  msgid "Edit %s"
936
  msgstr ""
937
 
938
+ #: src/Tribe/Attendees.php:114
939
  msgctxt "attendee event actions"
940
  msgid "View %s"
941
  msgstr ""
942
 
943
+ #: src/Tribe/Attendees.php:117
944
  msgctxt "attendee event actions"
945
  msgid "Edit"
946
  msgstr ""
947
 
948
+ #: src/Tribe/Attendees.php:118
949
  msgctxt "attendee event actions"
950
  msgid "View"
951
  msgstr ""
952
 
953
+ #: src/Tribe/Attendees.php:145
954
  msgctxt "attendee summary"
955
  msgid "Checked in:"
956
  msgstr ""
957
 
958
+ #: src/Tribe/Attendees.php:210 src/admin-views/list.php:93
959
  msgid "See who purchased tickets to this event"
960
  msgstr ""
961
 
962
+ #: src/Tribe/Attendees.php:320
963
  msgid "You need to select a user or type a valid email address"
964
  msgstr ""
965
 
966
+ #: src/Tribe/Attendees.php:321
967
  msgid "Sending..."
968
  msgstr ""
969
 
970
+ #: src/Tribe/Attendees.php:325
971
  msgid "You must first select one or more tickets before you can move them!"
972
  msgstr ""
973
 
974
+ #: src/Tribe/Attendees.php:327
975
  msgid "Please confirm that you would like to delete this attendee."
976
  msgstr ""
977
 
978
+ #: src/Tribe/Attendees.php:328
979
  msgid "Please confirm you would like to delete these attendees."
980
  msgstr ""
981
 
982
+ #: src/Tribe/Attendees.php:363
983
  msgid "Columns"
984
  msgstr ""
985
 
986
+ #: src/Tribe/Attendees.php:363
987
  msgid ""
988
  "You can use Screen Options to select which columns you want to see. The "
989
  "selection works in the table below, in the email, for print and for the CSV "
990
  "export."
991
  msgstr ""
992
 
993
+ #: src/Tribe/Attendees.php:441
994
  msgid "%s - Attendee list"
995
  msgstr ""
996
 
997
+ #: src/Tribe/Attendees.php:514
998
  msgctxt "attendee export"
999
  msgid "Order ID"
1000
  msgstr ""
1001
 
1002
+ #: src/Tribe/Attendees.php:515
1003
  msgctxt "attendee export"
1004
  msgid "Order Status"
1005
  msgstr ""
1006
 
1007
+ #: src/Tribe/Attendees.php:516
1008
  msgctxt "attendee export"
1009
  msgid "%s ID"
1010
  msgstr ""
1011
 
1012
+ #: src/Tribe/Attendees.php:517
1013
  msgctxt "attendee export"
1014
  msgid "Ticket Holder Name"
1015
  msgstr ""
1016
 
1017
+ #: src/Tribe/Attendees.php:518
1018
  msgctxt "attendee export"
1019
  msgid "Ticket Holder Email Address"
1020
  msgstr ""
1021
 
1022
+ #: src/Tribe/Attendees.php:519
1023
  msgctxt "attendee export"
1024
  msgid "Purchaser Name"
1025
  msgstr ""
1026
 
1027
+ #: src/Tribe/Attendees.php:520
1028
  msgctxt "attendee export"
1029
  msgid "Purchaser Email Address"
1030
  msgstr ""
1031
 
1032
+ #: src/Tribe/Attendees.php:660
1033
  msgid "attendees"
1034
  msgstr ""
1035
 
1036
+ #: src/Tribe/Attendees.php:698
1037
  msgid "Invalid Event ID"
1038
  msgstr ""
1039
 
1040
+ #: src/Tribe/Attendees.php:715
1041
  msgid "Cheatin Huh?"
1042
  msgstr ""
1043
 
1044
+ #: src/Tribe/Attendees.php:721
1045
  msgid "Empty user and email"
1046
  msgstr ""
1047
 
1048
+ #: src/Tribe/Attendees.php:733
1049
  msgid "Invalid Email"
1050
  msgstr ""
1051
 
1052
+ #: src/Tribe/Attendees.php:739 src/Tribe/Attendees.php:755
1053
  msgid "Invalid User ID"
1054
  msgstr ""
1055
 
1056
+ #: src/Tribe/Attendees.php:775
1057
  msgid "Attendee List for: %s"
1058
  msgstr ""
1059
 
1060
+ #: src/Tribe/Attendees.php:776
1061
  msgid "Error when sending the email"
1062
  msgstr ""
1063
 
1064
+ #: src/Tribe/Attendees.php:783
1065
  msgid "Email sent successfully!"
1066
  msgstr ""
1067
 
1068
+ #: src/Tribe/Attendees.php:998 src/Tribe/Attendees_Table.php:598
1069
+ msgid "Export"
1070
+ msgstr ""
1071
+
1072
  #: src/Tribe/Attendees_Table.php:65
1073
  msgid "Number of attendees per page:"
1074
  msgstr ""
1117
  msgid "View order"
1118
  msgstr ""
1119
 
1120
+ #: src/Tribe/Attendees_Table.php:597
1121
  msgid "Print"
1122
  msgstr ""
1123
 
1124
  #: src/Tribe/Attendees_Table.php:605
 
 
 
 
1125
  #: src/Tribe/Commerce/PayPal/Orders/Table.php:100 src/Tribe/Privacy.php:189
1126
  #: src/Tribe/Privacy.php:470 src/Tribe/Privacy.php:566
1127
  #: src/views/blocks/rsvp/form/email.php:32 src/views/tickets/rsvp.php:237
1130
  msgid "Email"
1131
  msgstr ""
1132
 
1133
+ #: src/Tribe/Attendees_Table.php:632 src/admin-views/list.php:41
1134
  msgid "Delete"
1135
  msgstr ""
1136
 
1137
+ #: src/Tribe/Attendees_Table.php:633
1138
  msgid "Check in"
1139
  msgstr ""
1140
 
1141
+ #: src/Tribe/Attendees_Table.php:634
1142
  msgid "Undo Check in"
1143
  msgstr ""
1144
 
1145
+ #: src/Tribe/Attendees_Table.php:961
1146
  msgid "No matching attendees found."
1147
  msgstr ""
1148
 
1149
+ #: src/Tribe/Attendees_Table.php:975
1150
  msgctxt "Attendees Table search options"
1151
  msgid "Search by Purchaser Name"
1152
  msgstr ""
1153
 
1154
+ #: src/Tribe/Attendees_Table.php:976
1155
  msgctxt "Attendees Table search options"
1156
  msgid "Search by Purchaser Email"
1157
  msgstr ""
1158
 
1159
+ #: src/Tribe/Attendees_Table.php:977
1160
  msgctxt "Attendees Table search options"
1161
  msgid "Search by Ticket Holder Name"
1162
  msgstr ""
1163
 
1164
+ #: src/Tribe/Attendees_Table.php:978
1165
  msgctxt "Attendees Table search options"
1166
  msgid "Search by Ticket Holder Email"
1167
  msgstr ""
1168
 
1169
+ #: src/Tribe/Attendees_Table.php:979
1170
  msgctxt "Attendees Table search options"
1171
  msgid "Search by User ID"
1172
  msgstr ""
1173
 
1174
+ #: src/Tribe/Attendees_Table.php:980
1175
  msgctxt "Attendees Table search options"
1176
  msgid "Search by Order Status"
1177
  msgstr ""
1178
 
1179
+ #: src/Tribe/Attendees_Table.php:981
1180
  msgctxt "Attendees Table search options"
1181
  msgid "Search by Order ID"
1182
  msgstr ""
1183
 
1184
+ #: src/Tribe/Attendees_Table.php:982
1185
  msgctxt "Attendees Table search options"
1186
  msgid "Search by Security Code"
1187
  msgstr ""
1188
 
1189
+ #: src/Tribe/Attendees_Table.php:983
1190
  msgctxt "Attendees Table search options"
1191
  msgid "Search by %s ID"
1192
  msgstr ""
1193
 
1194
+ #: src/Tribe/Attendees_Table.php:984
1195
  msgctxt "Attendees Table search options"
1196
  msgid "Search by Product ID"
1197
  msgstr ""
1342
 
1343
  #. Translators: %1$s: the post/event title, %2$d: the post/event ID.
1344
  #: src/Tribe/Commerce/Orders_Tabbed_View.php:36
1345
+ #: src/admin-views/attendees.php:34
1346
  msgctxt "attendees report screen heading"
1347
  msgid "Attendees for: %1$s [#%2$d]"
1348
  msgstr ""
1535
  msgstr ""
1536
 
1537
  #: src/Tribe/Commerce/PayPal/Orders/Table.php:99
 
1538
  msgid "Purchaser"
1539
  msgstr ""
1540
 
3173
  msgid "Undo Check In"
3174
  msgstr ""
3175
 
3176
+ #: src/admin-views/attendees.php:71
3177
  msgctxt "attendee screen summary"
3178
  msgid "%s Details"
3179
  msgstr ""
3180
 
3181
+ #: src/admin-views/attendees.php:113
3182
  msgctxt "attendee screen summary"
3183
  msgid "Overview"
3184
  msgstr ""
3185
 
3186
+ #: src/admin-views/attendees.php:173
3187
  msgid "Search attendees"
3188
  msgstr ""
3189
 
3287
  msgid "Edit %s ID: %d"
3288
  msgstr ""
3289
 
3290
+ #: src/admin-views/editor/list-row.php:128
3291
+ msgctxt "ticket ID title attribute"
3292
+ msgid "Delete %s ID: %d"
3293
+ msgstr ""
3294
+
3295
  #: src/admin-views/editor/list-table.php:39
3296
  msgid "Available"
3297
  msgstr ""
4684
 
4685
  #: src/views/registration/attendees/fields.php:15
4686
  #: src/views/registration-js/attendees/fields.php:19
4687
+ #: src/views/tickets/email.php:452
4688
  msgid "Attendee"
4689
  msgstr ""
4690
 
4766
 
4767
  #: src/views/tickets/email-non-attendance.php:39
4768
  #: src/views/tickets/email-ticket-type-moved.php:25
4769
+ #: src/views/tickets/email-tickets-moved.php:26 src/views/tickets/email.php:61
4770
  msgid "Your tickets"
4771
  msgstr ""
4772
 
4809
  msgstr[0] ""
4810
  msgstr[1] ""
4811
 
4812
+ #: src/views/tickets/email.php:437
4813
  msgid "Ticket #"
4814
  msgstr ""
4815
 
4816
+ #: src/views/tickets/email.php:444
4817
  msgctxt "ticket type email heading"
4818
  msgid "%s Type"
4819
  msgstr ""
4820
 
4821
+ #: src/views/tickets/email.php:456
4822
  msgid "Security Code"
4823
  msgstr ""
4824
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
 
3
  Contributors: theeventscalendar, brianjessee, camwynsp, paulkim, sc0ttkclark, aguseo, bordoni, borkweb, GeoffBel, geoffgraham, jentheo, leahkoerper, lucatume, neillmcshea, patriciahillebrandt, vicskf, zbtirrell, juanfra
4
  Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
5
- Requires at least: 4.9.14
6
- Tested up to: 5.7.2
7
- Stable tag: 5.1.6
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -178,6 +178,15 @@ Check out our extensive [knowledgebase](https://evnt.is/18wm) for articles on us
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
 
 
 
 
181
  = [5.1.6] 2021-07-07 =
182
 
183
  * Tweak - Added support for HTML in Ticket description field. [ET-1135]
2
 
3
  Contributors: theeventscalendar, brianjessee, camwynsp, paulkim, sc0ttkclark, aguseo, bordoni, borkweb, GeoffBel, geoffgraham, jentheo, leahkoerper, lucatume, neillmcshea, patriciahillebrandt, vicskf, zbtirrell, juanfra
4
  Tags: tickets, registration, The Events Calendar, RSVP, ticket sales, attendee management
5
+ Requires at least: 4.9.18
6
+ Tested up to: 5.8.0
7
+ Stable tag: 5.1.7
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
178
 
179
  == Changelog ==
180
 
181
+ = [5.1.7] 2021-08-03 =
182
+
183
+ * Feature - Added export button next to the page title on the Attendees page. [ET-1145]
184
+ * Tweak - Changed the word `Purchaser` to `Attendee` when email confirmation is sent for purchasing a ticket. [ETP-655]
185
+ * Tweak - Added `$attendees` parameter to the `tribe_report_page_after_text_label` action. [ET-1145]
186
+ * Tweak - Removed the edit column when printing the Attendees list. [ETP-702]
187
+ * Tweak - Added "Delete" functionality for the tickets area in the classic editor. [ET-1107]
188
+ * Language - 1 new strings added, 61 updated, 0 fuzzied, and 0 obsoleted
189
+
190
  = [5.1.6] 2021-07-07 =
191
 
192
  * Tweak - Added support for HTML in Ticket description field. [ET-1135]
src/Tribe/Attendees.php CHANGED
@@ -31,6 +31,8 @@ class Tribe__Tickets__Attendees {
31
  public function hook() {
32
  add_action( 'admin_menu', array( $this, 'register_page' ) );
33
 
 
 
34
  add_action( 'tribe_events_tickets_attendees_totals_top', array( $this, 'print_checkedin_totals' ), 0 );
35
  add_action( 'tribe_tickets_attendees_event_details_list_top', array( $this, 'event_details_top' ), 20 );
36
  add_action( 'tribe_tickets_plus_report_event_details_list_top', array( $this, 'event_details_top' ), 20 );
@@ -935,4 +937,65 @@ class Tribe__Tickets__Attendees {
935
  return $provider->update_attendee( $attendee, $attendee_data );
936
  }
937
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
938
  }
31
  public function hook() {
32
  add_action( 'admin_menu', array( $this, 'register_page' ) );
33
 
34
+ add_action( 'tribe_report_page_after_text_label', [ $this, 'include_export_button_title' ], 25, 2 );
35
+ add_action( 'tribe_tabbed_view_heading_after_text_label', [ $this, 'include_export_button_title' ], 25, 2 );
36
  add_action( 'tribe_events_tickets_attendees_totals_top', array( $this, 'print_checkedin_totals' ), 0 );
37
  add_action( 'tribe_tickets_attendees_event_details_list_top', array( $this, 'event_details_top' ), 20 );
38
  add_action( 'tribe_tickets_plus_report_event_details_list_top', array( $this, 'event_details_top' ), 20 );
937
  return $provider->update_attendee( $attendee, $attendee_data );
938
  }
939
 
940
+ /**
941
+ * Generate the export URL for exporting attendees.
942
+ *
943
+ * @since 5.1.7
944
+ *
945
+ * @return string Relative URL for the export.
946
+ */
947
+ public function get_export_url() {
948
+ return add_query_arg(
949
+ [
950
+ 'attendees_csv' => true,
951
+ 'attendees_csv_nonce' => wp_create_nonce( 'attendees_csv_nonce' ),
952
+ ]
953
+ );
954
+ }
955
+
956
+ /**
957
+ * Echo the button for the export that appears next to the attendees page title.
958
+ *
959
+ * @since 5.1.7
960
+ *
961
+ * @param int $event_id The Post ID of the event.
962
+ * @param Tribe__Tickets__Attendees $attendees The attendees object.
963
+ *
964
+ * @return string Relative URL for the export.
965
+ */
966
+ public function include_export_button_title( $event_id, Tribe__Tickets__Attendees $attendees = null ){
967
+
968
+ // Bail if not on the Attendees page.
969
+ if ( 'tickets-attendees' !== tribe_get_request_var( 'page' ) ) {
970
+ return;
971
+ }
972
+
973
+ // If this function is called from the tabbed-view.php file it does not send over $event_id or $attendees.
974
+ // If the $event_id is not an integer we can get the information from the get scope and find the data.
975
+ if ( ! is_int( $event_id ) &&
976
+ ! empty( tribe_get_request_var( 'event_id' ) )
977
+ ) {
978
+ $event_id = tribe_get_request_var( 'event_id' );
979
+ $attendees = tribe( 'tickets.attendees' );
980
+ $attendees->attendees_table->prepare_items();
981
+ }
982
+
983
+ // Bail early if there are no attendees.
984
+ if ( empty( $attendees ) ||
985
+ ! $attendees->attendees_table->has_items()
986
+ ) {
987
+ return;
988
+ }
989
+
990
+ // Bail early if user is not owner/have permissions.
991
+ if ( ! $this->user_can_manage_attendees( 0, $event_id ) ) {
992
+ return;
993
+ }
994
+
995
+ echo sprintf(
996
+ '<a target="_blank" href="%s" class="export action page-title-action" rel="noopener noreferrer">%s</a>',
997
+ esc_url( $export_url = $this->get_export_url() ),
998
+ esc_html__( 'Export', 'event-tickets' )
999
+ ) ;
1000
+ }
1001
  }
src/Tribe/Attendees_Table.php CHANGED
@@ -551,13 +551,6 @@ class Tribe__Tickets__Attendees_Table extends WP_List_Table {
551
  return;
552
  }
553
 
554
- $export_url = add_query_arg(
555
- [
556
- 'attendees_csv' => true,
557
- 'attendees_csv_nonce' => wp_create_nonce( 'attendees_csv_nonce' ),
558
- ]
559
- );
560
-
561
  /**
562
  * Include TB_iframe JS
563
  */
@@ -602,7 +595,7 @@ class Tribe__Tickets__Attendees_Table extends WP_List_Table {
602
  $nav = [
603
  'left' => [
604
  'print' => sprintf( '<input type="button" name="print" class="print button action" value="%s">', esc_attr__( 'Print', 'event-tickets' ) ),
605
- 'export' => sprintf( '<a target="_blank" href="%s" class="export button action">%s</a>', esc_url( $export_url ), esc_html__( 'Export', 'event-tickets' ) ),
606
  ],
607
  'right' => [],
608
  ];
551
  return;
552
  }
553
 
 
 
 
 
 
 
 
554
  /**
555
  * Include TB_iframe JS
556
  */
595
  $nav = [
596
  'left' => [
597
  'print' => sprintf( '<input type="button" name="print" class="print button action" value="%s">', esc_attr__( 'Print', 'event-tickets' ) ),
598
+ 'export' => sprintf( '<a target="_blank" href="%s" class="export button action" rel="noopener noreferrer">%s</a>', esc_url( tribe( 'tickets.attendees' )->get_export_url() ), esc_html__( 'Export', 'event-tickets' ) ),
599
  ],
600
  'right' => [],
601
  ];
src/Tribe/Main.php CHANGED
@@ -8,7 +8,7 @@ class Tribe__Tickets__Main {
8
  /**
9
  * Current version of this plugin
10
  */
11
- const VERSION = '5.1.6';
12
 
13
  /**
14
  * Used to store the version history.
8
  /**
9
  * Current version of this plugin
10
  */
11
+ const VERSION = '5.1.7';
12
 
13
  /**
14
  * Used to store the version history.
src/admin-views/attendees.php CHANGED
@@ -21,6 +21,7 @@ $singular = $pto->labels->singular_name;
21
  * @param Tribe__Tickets__Attendees $attendees The attendees object.
22
  */
23
  $show_title = apply_filters( 'tribe_tickets_attendees_show_title', is_admin(), $attendees );
 
24
  ?>
25
 
26
  <div class="wrap tribe-report-page">
@@ -39,10 +40,13 @@ $show_title = apply_filters( 'tribe_tickets_attendees_show_title', is_admin(), $
39
  * Add an action to render content after text title.
40
  *
41
  * @since 5.1.0
 
42
  *
43
  * @param int $event_id Post ID.
 
44
  */
45
- do_action( 'tribe_report_page_after_text_label', $event_id );
 
46
  ?>
47
  </h1>
48
  <?php endif; ?>
21
  * @param Tribe__Tickets__Attendees $attendees The attendees object.
22
  */
23
  $show_title = apply_filters( 'tribe_tickets_attendees_show_title', is_admin(), $attendees );
24
+ $export_url = tribe( 'tickets.attendees' )->get_export_url();
25
  ?>
26
 
27
  <div class="wrap tribe-report-page">
40
  * Add an action to render content after text title.
41
  *
42
  * @since 5.1.0
43
+ * @since 5.1.7 Added the attendees information.
44
  *
45
  * @param int $event_id Post ID.
46
+ * @param Tribe__Tickets__Attendees $attendees The attendees object.
47
  */
48
+ do_action( 'tribe_report_page_after_text_label', $event_id, $attendees );
49
+
50
  ?>
51
  </h1>
52
  <?php endif; ?>
src/admin-views/editor/list-row.php CHANGED
@@ -119,6 +119,18 @@ if (
119
  ) ),
120
  esc_html( $ticket->name )
121
  );
 
 
 
 
 
 
 
 
 
 
 
 
122
  ?>
123
  </td>
124
  </tr>
119
  ) ),
120
  esc_html( $ticket->name )
121
  );
122
+
123
+ printf(
124
+ "<button attr-provider='%s' attr-ticket-id='%s' title='%s' class='ticket_delete'><span class='ticket_delete_text'>%s</span></a>",
125
+ esc_attr( $ticket->provider_class ),
126
+ esc_attr( $ticket->ID ),
127
+ esc_attr( sprintf(
128
+ _x( 'Delete %s ID: %d', 'ticket ID title attribute', 'event-tickets' ),
129
+ tribe_get_ticket_label_singular( 'ticket_id_title_attribute' ),
130
+ $ticket->ID
131
+ ) ),
132
+ esc_html( $ticket->name )
133
+ );
134
  ?>
135
  </td>
136
  </tr>
src/modules/blocks/ticket/container-content/attendee-collection/iac-setting/template.js CHANGED
@@ -48,7 +48,7 @@ class IACSetting extends PureComponent {
48
  <RadioControl
49
  className="tribe-editor__ticket__iac-setting-input"
50
  id={ this.id }
51
- type="text"
52
  selected={ iac }
53
  onChange={ onChange }
54
  disabled={ isDisabled }
48
  <RadioControl
49
  className="tribe-editor__ticket__iac-setting-input"
50
  id={ this.id }
51
+ type="radio"
52
  selected={ iac }
53
  onChange={ onChange }
54
  disabled={ isDisabled }
src/resources/css/tickets-report-print.css CHANGED
@@ -15,6 +15,7 @@
15
  #wpfooter,
16
  .check-column,
17
  .column-check_in,
 
18
  #total_checkedin_wrapper,
19
  .column-meta_details,
20
  #show-settings-link,
15
  #wpfooter,
16
  .check-column,
17
  .column-check_in,
18
+ .column-edit_attendee,
19
  #total_checkedin_wrapper,
20
  .column-meta_details,
21
  #show-settings-link,
src/resources/css/tickets-report-print.min.css CHANGED
@@ -1 +1 @@
1
- @media print{#adminmenuback,#adminmenuwrap,#icon-edit,#show-settings-link,#total_checkedin_wrapper,#wpbody-content #update-nag,#wpbody-content .update-nag,#wpfooter,.check-column,.column-check_in,.column-meta_details,.event-actions,.nav-tab-wrapper,.row-actions,.screen-meta-toggle,.search-box,.tablenav,.wrap h2+h2{display:none}.wrap h2+h2{display:block}#wpfooter,#wpwrap #wpcontent{margin-left:0;padding-left:0}#wpwrap .wrap{margin:0}#wpwrap #wpbody-content{padding-bottom:0}.tribe-report-page form{display:block!important}.tribe-report-panel{margin:0 0 30px;border:0;box-shadow:none}.tribe-report-panel .about-description{display:none}.tribe-report-panel .welcome-panel-content{margin:0}.tribe-report-panel .welcome-panel-column{padding:0;width:32%;float:left;display:inline-block}.tribe-report-panel .welcome-panel-middle ul li strong{display:block}.tribe-report-panel .welcome-panel-last{border-left:0;float:right;width:25%}table.widefat.attendees{border-left:0;border-right:0}#wpwrap .widefat td,#wpwrap .widefat th{border-bottom:1px solid #e1e1e1;padding:0}#the-list tr{background:#fff;border:0}.wp-list-table thead tr{border-bottom:1px solid #e1e1e1}a.row-title{color:#000}.widefat tfoot tr th,.widefat thead tr th{background:none;text-shadow:none}.postbox h3{text-shadow:none}#total_tickets_sold{display:block}.ticket_list h4{font-size:13px}.ticket_list tr td{font-size:11px;line-height:1.4}.ticket_list tr td .totals{height:100px;line-height:2;padding-top:40px;width:75%}table{page-break-inside:auto}tr{page-break-after:auto;page-break-inside:avoid}thead{display:table-header-group}tfoot{display:table-footer-group}}
1
+ @media print{#adminmenuback,#adminmenuwrap,#icon-edit,#show-settings-link,#total_checkedin_wrapper,#wpbody-content #update-nag,#wpbody-content .update-nag,#wpfooter,.check-column,.column-check_in,.column-edit_attendee,.column-meta_details,.event-actions,.nav-tab-wrapper,.row-actions,.screen-meta-toggle,.search-box,.tablenav,.wrap h2+h2{display:none}.wrap h2+h2{display:block}#wpfooter,#wpwrap #wpcontent{margin-left:0;padding-left:0}#wpwrap .wrap{margin:0}#wpwrap #wpbody-content{padding-bottom:0}.tribe-report-page form{display:block!important}.tribe-report-panel{margin:0 0 30px;border:0;box-shadow:none}.tribe-report-panel .about-description{display:none}.tribe-report-panel .welcome-panel-content{margin:0}.tribe-report-panel .welcome-panel-column{padding:0;width:32%;float:left;display:inline-block}.tribe-report-panel .welcome-panel-middle ul li strong{display:block}.tribe-report-panel .welcome-panel-last{border-left:0;float:right;width:25%}table.widefat.attendees{border-left:0;border-right:0}#wpwrap .widefat td,#wpwrap .widefat th{border-bottom:1px solid #e1e1e1;padding:0}#the-list tr{background:#fff;border:0}.wp-list-table thead tr{border-bottom:1px solid #e1e1e1}a.row-title{color:#000}.widefat tfoot tr th,.widefat thead tr th{background:none;text-shadow:none}.postbox h3{text-shadow:none}#total_tickets_sold{display:block}.ticket_list h4{font-size:13px}.ticket_list tr td{font-size:11px;line-height:1.4}.ticket_list tr td .totals{height:100px;line-height:2;padding-top:40px;width:75%}table{page-break-inside:auto}tr{page-break-after:auto;page-break-inside:avoid}thead{display:table-header-group}tfoot{display:table-footer-group}}
src/resources/css/tickets-tables.css CHANGED
@@ -115,12 +115,13 @@
115
  }
116
 
117
  .tribe-tickets-editor-table .ticket_edit {
118
- width: 30px;
119
  }
120
 
121
  /* Edit button styles - separate for portability */
122
 
123
  .tribe-tickets-editor-table .ticket_edit_button,
 
124
  .tribe-tickets-editor-table .global_capacity_edit_button {
125
  background: none;
126
  border: 0;
@@ -129,24 +130,37 @@
129
  padding: 0;
130
  }
131
 
132
- .tribe-tickets-editor-table .ticket_edit_button:hover, .tribe-tickets-editor-table .global_capacity_edit_button:hover {
133
- color: #00a0d2;
134
  }
135
 
136
  .tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text,
137
  .tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text,
 
 
 
 
138
  .tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text,
139
- .tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text {
 
140
  font-size: 0;
141
  }
142
 
143
- .tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text::before, .tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text::before, .tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text::before, .tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text::before {
144
  content: '\f464';
145
  font-family: 'dashicons';
146
- font-size: x-large;
147
  vertical-align: top;
148
  }
149
 
 
 
 
 
 
 
 
 
150
  .tribe-tickets-editor-table .global_capacity_edit_button {
151
  vertical-align: middle;
152
  }
115
  }
116
 
117
  .tribe-tickets-editor-table .ticket_edit {
118
+ width: 60px;
119
  }
120
 
121
  /* Edit button styles - separate for portability */
122
 
123
  .tribe-tickets-editor-table .ticket_edit_button,
124
+ .tribe-tickets-editor-table .ticket_delete,
125
  .tribe-tickets-editor-table .global_capacity_edit_button {
126
  background: none;
127
  border: 0;
130
  padding: 0;
131
  }
132
 
133
+ .tribe-tickets-editor-table .ticket_edit_button:hover, .tribe-tickets-editor-table .ticket_delete:hover, .tribe-tickets-editor-table .global_capacity_edit_button:hover {
134
+ color: #727272;
135
  }
136
 
137
  .tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text,
138
  .tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text,
139
+ .tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text,
140
+ .tribe-tickets-editor-table .ticket_delete .ticket_edit_text,
141
+ .tribe-tickets-editor-table .ticket_delete .global_capacity_edit_text,
142
+ .tribe-tickets-editor-table .ticket_delete .ticket_delete_text,
143
  .tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text,
144
+ .tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text,
145
+ .tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text {
146
  font-size: 0;
147
  }
148
 
149
+ .tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text:before, .tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text:before, .tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text:before, .tribe-tickets-editor-table .ticket_delete .ticket_edit_text:before, .tribe-tickets-editor-table .ticket_delete .global_capacity_edit_text:before, .tribe-tickets-editor-table .ticket_delete .ticket_delete_text:before, .tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text:before, .tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text:before, .tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text:before {
150
  content: '\f464';
151
  font-family: 'dashicons';
152
+ font-size: 20px;
153
  vertical-align: top;
154
  }
155
 
156
+ .tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text:before, .tribe-tickets-editor-table .ticket_delete .ticket_delete_text:before, .tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text:before {
157
+ content: '\f182';
158
+ }
159
+
160
+ .tribe-tickets-editor-table .ticket_delete {
161
+ margin-left: 12px;
162
+ }
163
+
164
  .tribe-tickets-editor-table .global_capacity_edit_button {
165
  vertical-align: middle;
166
  }
src/resources/css/tickets-tables.min.css CHANGED
@@ -1 +1 @@
1
- #tribetickets{z-index:1}.tribe-tickets-editor-table{border-radius:3px;border-spacing:0;border:1px solid #ccc;margin:20px 0}.tribe-tickets-editor-table .table-header,.tribe-tickets-editor-table thead{background-color:#fafafa;border-bottom:1px solid #ccc}.tribe-tickets-editor-table tr{background-color:#fff}.tribe-tickets-editor-table tr td{border-bottom:1px solid #ccc}.tribe-tickets-editor-table tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.tribe-tickets-editor-table tr:first-child td:first-child{border-top-left-radius:3px}.tribe-tickets-editor-table tr:first-child td:last-child{border-top-right-radius:3px}.tribe-tickets-editor-table tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.tribe-tickets-editor-table tr:last-child td:first-child{border-bottom-left-radius:3px}.tribe-tickets-editor-table tr:last-child td:last-child{border-bottom-right-radius:3px}.tribe-tickets-editor-table tbody tr:only-child .tribe-tickets__tickets-editor-ticket-name-sortable,.tribe-tickets-editor-table tr.Tribe__Tickets__RSVP .tribe-tickets__tickets-editor-ticket-name-sortable{display:none}.tribe-tickets-editor-table td.column-primary .tribe-handle{color:#ccc;cursor:move;font-size:1.8em;margin-right:10px;position:relative;float:left}.tribe-tickets-editor-table .ui-sortable td.column-primary .tribe-handle{display:block}.tribe-tickets-editor-table .tribe-mobile-only{display:none}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name{display:table;table-layout:fixed;width:100%}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-sortable,.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title{display:table-cell;vertical-align:middle}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title .dashicons{heigth:16px;width:16px;line-height:16px}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title .dashicons:before{font-size:16px}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-sortable{width:32px}.tribe-tickets-editor-table .ticket_available,.tribe-tickets-editor-table .ticket_capacity,.tribe-tickets-editor-table .ticket_price{width:115px}.tribe-tickets-editor-table .ticket_edit{width:30px}.tribe-tickets-editor-table .global_capacity_edit_button,.tribe-tickets-editor-table .ticket_edit_button{background:none;border:0;color:#ccc;cursor:pointer;padding:0}.tribe-tickets-editor-table .global_capacity_edit_button:hover,.tribe-tickets-editor-table .ticket_edit_button:hover{color:#00a0d2}.tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text,.tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text,.tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text{font-size:0}.tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text:before,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text:before,.tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text:before,.tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text:before{content:"\f464";font-family:dashicons;font-size:x-large;vertical-align:top}.tribe-tickets-editor-table .global_capacity_edit_button{vertical-align:middle}#tribe_panel_settings .tribe-tickets-editor-table tbody tr{box-shadow:none}#tribe_panel_settings .tribe-tickets-editor-table tbody tr td{border-bottom:1px solid #ccc}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:last-child td,#tribe_panel_settings .tribe-tickets-editor-table tbody tr:nth-last-child(2) td{border-bottom:0}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:last-child td{border-top:1px dashed #ccc}.tribe-tickets-editor-table .tribe_capacity_table_ticket_list{color:#ccc}.tribe-tickets-editor-table .settings_total_global_stock{font-size:inherit;margin-left:-5px}.tribe-tickets-editor-table .settings_total_global_stock:disabled{background:none;border:0;box-shadow:none}@media screen and (max-width:782px){.tribe-tickets-editor-table .tribe-mobile-only{display:inline-block}#tribe_panel_settings .tribe-tickets-editor-table tbody tr{border-bottom:1px solid #ccc;display:block}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:after,#tribe_panel_settings .tribe-tickets-editor-table tbody tr:before{content:"";display:table}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:after{clear:both}#tribe_panel_settings .tribe-tickets-editor-table tbody tr td:last-child,#tribe_panel_settings .tribe-tickets-editor-table tbody tr td:nth-last-child(2){border-bottom:0}#tribe_panel_settings .tribe-tickets-editor-table tbody tr.tribe-tickets-editor-table-row-capacity-independent td:first-child,.tribe-tickets-editor-table .tribe-mobile-hidden{display:none}.tribe-tickets-editor-table td.ticket_edit{position:absolute;right:0;top:0;width:37px}.tribe-tickets-editor-table tr{position:relative;border-bottom:1px solid #ccc}.tribe-tickets-editor-table th:not(.column-primary){display:none}.tribe-tickets-editor-table.tribe-tickets-editor-capacity-table td:first-child,.tribe-tickets-editor-table.tribe-tickets-editor-capacity-table td[colspan="2"],.tribe-tickets-editor-table thead th.column-primary{width:100%}.tribe-tickets-editor-table tr td{border:0;box-sizing:border-box;display:block;float:left;min-height:36px;padding:6px;position:relative;width:50%}.tribe-tickets-editor-table .is-expanded{display:block;overflow:hidden}}
1
+ #tribetickets{z-index:1}.tribe-tickets-editor-table{border-radius:3px;border-spacing:0;border:1px solid #ccc;margin:20px 0}.tribe-tickets-editor-table .table-header,.tribe-tickets-editor-table thead{background-color:#fafafa;border-bottom:1px solid #ccc}.tribe-tickets-editor-table tr{background-color:#fff}.tribe-tickets-editor-table tr td{border-bottom:1px solid #ccc}.tribe-tickets-editor-table tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.tribe-tickets-editor-table tr:first-child td:first-child{border-top-left-radius:3px}.tribe-tickets-editor-table tr:first-child td:last-child{border-top-right-radius:3px}.tribe-tickets-editor-table tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.tribe-tickets-editor-table tr:last-child td:first-child{border-bottom-left-radius:3px}.tribe-tickets-editor-table tr:last-child td:last-child{border-bottom-right-radius:3px}.tribe-tickets-editor-table tbody tr:only-child .tribe-tickets__tickets-editor-ticket-name-sortable,.tribe-tickets-editor-table tr.Tribe__Tickets__RSVP .tribe-tickets__tickets-editor-ticket-name-sortable{display:none}.tribe-tickets-editor-table td.column-primary .tribe-handle{color:#ccc;cursor:move;font-size:1.8em;margin-right:10px;position:relative;float:left}.tribe-tickets-editor-table .ui-sortable td.column-primary .tribe-handle{display:block}.tribe-tickets-editor-table .tribe-mobile-only{display:none}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name{display:table;table-layout:fixed;width:100%}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-sortable,.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title{display:table-cell;vertical-align:middle}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title .dashicons{heigth:16px;width:16px;line-height:16px}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-title .dashicons:before{font-size:16px}.tribe-tickets-editor-table .tribe-tickets__tickets-editor-ticket-name-sortable{width:32px}.tribe-tickets-editor-table .ticket_available,.tribe-tickets-editor-table .ticket_capacity,.tribe-tickets-editor-table .ticket_price{width:115px}.tribe-tickets-editor-table .ticket_edit{width:60px}.tribe-tickets-editor-table .global_capacity_edit_button,.tribe-tickets-editor-table .ticket_delete,.tribe-tickets-editor-table .ticket_edit_button{background:none;border:0;color:#ccc;cursor:pointer;padding:0}.tribe-tickets-editor-table .global_capacity_edit_button:hover,.tribe-tickets-editor-table .ticket_delete:hover,.tribe-tickets-editor-table .ticket_edit_button:hover{color:#727272}.tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text,.tribe-tickets-editor-table .ticket_delete .global_capacity_edit_text,.tribe-tickets-editor-table .ticket_delete .ticket_delete_text,.tribe-tickets-editor-table .ticket_delete .ticket_edit_text,.tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text,.tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text,.tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text{font-size:0}.tribe-tickets-editor-table .global_capacity_edit_button .global_capacity_edit_text:before,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text:before,.tribe-tickets-editor-table .global_capacity_edit_button .ticket_edit_text:before,.tribe-tickets-editor-table .ticket_delete .global_capacity_edit_text:before,.tribe-tickets-editor-table .ticket_delete .ticket_delete_text:before,.tribe-tickets-editor-table .ticket_delete .ticket_edit_text:before,.tribe-tickets-editor-table .ticket_edit_button .global_capacity_edit_text:before,.tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text:before,.tribe-tickets-editor-table .ticket_edit_button .ticket_edit_text:before{content:"\f464";font-family:dashicons;font-size:20px;vertical-align:top}.tribe-tickets-editor-table .global_capacity_edit_button .ticket_delete_text:before,.tribe-tickets-editor-table .ticket_delete .ticket_delete_text:before,.tribe-tickets-editor-table .ticket_edit_button .ticket_delete_text:before{content:"\f182"}.tribe-tickets-editor-table .ticket_delete{margin-left:12px}.tribe-tickets-editor-table .global_capacity_edit_button{vertical-align:middle}#tribe_panel_settings .tribe-tickets-editor-table tbody tr{box-shadow:none}#tribe_panel_settings .tribe-tickets-editor-table tbody tr td{border-bottom:1px solid #ccc}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:last-child td,#tribe_panel_settings .tribe-tickets-editor-table tbody tr:nth-last-child(2) td{border-bottom:0}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:last-child td{border-top:1px dashed #ccc}.tribe-tickets-editor-table .tribe_capacity_table_ticket_list{color:#ccc}.tribe-tickets-editor-table .settings_total_global_stock{font-size:inherit;margin-left:-5px}.tribe-tickets-editor-table .settings_total_global_stock:disabled{background:none;border:0;box-shadow:none}@media screen and (max-width:782px){.tribe-tickets-editor-table .tribe-mobile-only{display:inline-block}#tribe_panel_settings .tribe-tickets-editor-table tbody tr{border-bottom:1px solid #ccc;display:block}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:after,#tribe_panel_settings .tribe-tickets-editor-table tbody tr:before{content:"";display:table}#tribe_panel_settings .tribe-tickets-editor-table tbody tr:after{clear:both}#tribe_panel_settings .tribe-tickets-editor-table tbody tr td:last-child,#tribe_panel_settings .tribe-tickets-editor-table tbody tr td:nth-last-child(2){border-bottom:0}#tribe_panel_settings .tribe-tickets-editor-table tbody tr.tribe-tickets-editor-table-row-capacity-independent td:first-child,.tribe-tickets-editor-table .tribe-mobile-hidden{display:none}.tribe-tickets-editor-table td.ticket_edit{position:absolute;right:0;top:0;width:37px}.tribe-tickets-editor-table tr{position:relative;border-bottom:1px solid #ccc}.tribe-tickets-editor-table th:not(.column-primary){display:none}.tribe-tickets-editor-table.tribe-tickets-editor-capacity-table td:first-child,.tribe-tickets-editor-table.tribe-tickets-editor-capacity-table td[colspan="2"],.tribe-tickets-editor-table thead th.column-primary{width:100%}.tribe-tickets-editor-table tr td{border:0;box-sizing:border-box;display:block;float:left;min-height:36px;padding:6px;position:relative;width:50%}.tribe-tickets-editor-table .is-expanded{display:block;overflow:hidden}}
src/resources/js/app/blocks.js CHANGED
@@ -47548,7 +47548,7 @@ var template_IACSetting = function (_PureComponent) {
47548
  wp.element.createElement(external_var_wp_components_root_wp_components_["RadioControl"], {
47549
  className: 'tribe-editor__ticket__iac-setting-input',
47550
  id: this.id,
47551
- type: 'text',
47552
  selected: iac,
47553
  onChange: onChange,
47554
  disabled: isDisabled,
47548
  wp.element.createElement(external_var_wp_components_root_wp_components_["RadioControl"], {
47549
  className: 'tribe-editor__ticket__iac-setting-input',
47550
  id: this.id,
47551
+ type: 'radio',
47552
  selected: iac,
47553
  onChange: onChange,
47554
  disabled: isDisabled,
src/resources/js/app/blocks.min.js CHANGED
@@ -11,4 +11,4 @@ var tribe="object"==typeof tribe?tribe:{};tribe.tickets=tribe.tickets||{},tribe.
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
- */var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,_=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,f=r?Symbol.for("react.suspense_list"):60120,T=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,M=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case l:case _:case o:case c:case s:case p:return e;default:switch(e=e&&e.$$typeof){case d:case m:case h:case T:case u:return e;default:return t}}case i:return t}}}function g(e){return E(e)===_}t.AsyncMode=l,t.ConcurrentMode=_,t.ContextConsumer=d,t.ContextProvider=u,t.Element=a,t.ForwardRef=m,t.Fragment=o,t.Lazy=h,t.Memo=T,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return g(e)||E(e)===l},t.isConcurrentMode=g,t.isContextConsumer=function(e){return E(e)===d},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===T},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===_||e===c||e===s||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===T||e.$$typeof===u||e.$$typeof===d||e.$$typeof===m||e.$$typeof===b||e.$$typeof===M||e.$$typeof===S||e.$$typeof===y)},t.typeOf=E},function(e,t,n){},function(e,t,n){},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var c,u=[],d=!1,l=-1;function _(){d&&c&&(d=!1,c.length?u=c.concat(u):l=-1,u.length&&m())}function m(){if(!d){var e=s(_);d=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||d||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.prependListener=f,a.prependOnceListener=f,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=Object.keys;e.exports=function(e,t){var n,a,i,o,s;if(e===t)return!0;if(n=r(e),a=r(t),n.length!==a.length)return!1;for(i=0;i<n.length;){if(void 0===(s=e[o=n[i]])&&!t.hasOwnProperty(o)||s!==t[o])return!1;i++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(110),a=n(325),i=n(15),o=n(34);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}var u=n(11),d=n.n(u),l=n(1),_=n.n(l),m=_.a.shape({trySubscribe:_.a.func.isRequired,tryUnsubscribe:_.a.func.isRequired,notifyNestedSubs:_.a.func.isRequired,isSubscribed:_.a.func.isRequired}),p=_.a.shape({subscribe:_.a.func.isRequired,dispatch:_.a.func.isRequired,getState:_.a.func.isRequired});d.a.forwardRef;!function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",r=function(t){c(a,t);var r=a.prototype;function a(n,r){var a;return(a=t.call(this,n,r)||this)[e]=n.store,a}return r.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.render=function(){return u.Children.only(this.props.children)},a}(u.Component);r.propTypes={store:p.isRequired,children:_.a.element.isRequired},r.childContextTypes=((t={})[e]=p.isRequired,t[n]=m,t)}();function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(){return(T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var y=n(493),b=n.n(y),M=n(327),S=n.n(M),E=n(491),g={notify:function(){}};var v=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=g}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,r=0;r<n.length;r++)n[r]()},get:function(){return t},subscribe:function(n){var r=!0;return t===e&&(t=e.slice()),t.push(n),function(){r&&null!==e&&(r=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=g)},e}(),k=void 0!==d.a.forwardRef,D=0,L={};function O(){}function Y(e,t){var n,r;void 0===t&&(t={});var a=t,i=a.getDisplayName,o=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,s=a.methodName,d=void 0===s?"connectAdvanced":s,l=a.renderCountProp,_=void 0===l?void 0:l,y=a.shouldHandleStateChanges,M=void 0===y||y,g=a.storeKey,Y=void 0===g?"store":g,w=a.withRef,j=void 0!==w&&w,I=h(a,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=Y+"Subscription",C=D++,x=((n={})[Y]=p,n[P]=m,n),R=((r={})[P]=m,r);return function(t){S()(Object(E.isValidElementType)(t),"You must pass a component to the function returned by "+d+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",r=o(n),a=T({},I,{getDisplayName:o,methodName:d,renderCountProp:_,shouldHandleStateChanges:M,storeKey:Y,withRef:j,displayName:r,wrappedComponentName:n,WrappedComponent:t}),i=function(n){function i(e,t){var a;return(a=n.call(this,e,t)||this).version=C,a.state={},a.renderCount=0,a.store=e[Y]||t[Y],a.propsMode=Boolean(e[Y]),a.setWrappedInstance=a.setWrappedInstance.bind(f(f(a))),S()(a.store,'Could not find "'+Y+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+Y+'" as a prop to "'+r+'".'),a.initSelector(),a.initSubscription(),a}c(i,n);var o=i.prototype;return o.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},o.componentDidMount=function(){M&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},o.componentWillReceiveProps=function(e){this.selector.run(e)},o.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},o.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=O,this.store=null,this.selector.run=O,this.selector.shouldComponentUpdate=!1},o.getWrappedInstance=function(){return S()(j,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+d+"() call."),this.wrappedInstance},o.setWrappedInstance=function(e){this.wrappedInstance=e},o.initSelector=function(){var t=e(this.store.dispatch,a);this.selector=function(e,t){var n={run:function(r){try{var a=e(t.getState(),r);(a!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=a,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},o.initSubscription=function(){if(M){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new v(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},o.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(L)):this.notifyNestedSubs()},o.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},o.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},o.addExtraProps=function(e){if(!(j||_||this.propsMode&&this.subscription))return e;var t=T({},e);return j&&(t.ref=this.setWrappedInstance),_&&(t[_]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},o.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(u.createElement)(t,this.addExtraProps(e.props))},i}(u.Component);return k&&(i.prototype.UNSAFE_componentWillReceiveProps=i.prototype.componentWillReceiveProps,delete i.prototype.componentWillReceiveProps),i.WrappedComponent=t,i.displayName=r,i.childContextTypes=R,i.contextTypes=x,i.propTypes=x,b()(i,t)}}var w=Object.prototype.hasOwnProperty;function j(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(j(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!w.call(t,n[a])||!j(e[n[a]],t[n[a]]))return!1;return!0}var P=n(16);function C(e){return function(t,n){var r=e(t,n);function a(){return r}return a.dependsOnOwnProps=!1,a}}function x(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function R(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=x(e);var a=r(t,n);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=x(a),a=r(t,n)),a},r}}var A=[function(e){return"function"==typeof e?R(e):void 0},function(e){return e?void 0:C((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?C((function(t){return Object(P.a)(e,t)})):void 0}];var H=[function(e){return"function"==typeof e?R(e):void 0},function(e){return e?void 0:C((function(){return{}}))}];function N(e,t,n){return T({},n,e,t)}var V=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,a=n.pure,i=n.areMergedPropsEqual,o=!1;return function(t,n,s){var c=e(t,n,s);return o?a&&i(c,r)||(r=c):(o=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return N}}];function F(e,t,n,r){return function(a,i){return n(e(a,i),t(r,i),i)}}function K(e,t,n,r,a){var i,o,s,c,u,d=a.areStatesEqual,l=a.areOwnPropsEqual,_=a.areStatePropsEqual,m=!1;function p(a,m){var p,f,T=!l(m,o),h=!d(a,i);return i=a,o=m,T&&h?(s=e(i,o),t.dependsOnOwnProps&&(c=t(r,o)),u=n(s,c,o)):T?(e.dependsOnOwnProps&&(s=e(i,o)),t.dependsOnOwnProps&&(c=t(r,o)),u=n(s,c,o)):h?(p=e(i,o),f=!_(p,s),s=p,f&&(u=n(s,c,o)),u):u}return function(a,d){return m?p(a,d):(s=e(i=a,o=d),c=t(r,o),u=n(s,c,o),m=!0,u)}}function W(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,i=h(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,i),s=r(e,i),c=a(e,i);return(i.pure?K:F)(o,s,c,e,i)}function U(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function z(e,t){return e===t}var G,B,q,J,$,Z,Q,X,ee,te,ne,re,ae=(q=(B=void 0===G?{}:G).connectHOC,J=void 0===q?Y:q,$=B.mapStateToPropsFactories,Z=void 0===$?H:$,Q=B.mapDispatchToPropsFactories,X=void 0===Q?A:Q,ee=B.mergePropsFactories,te=void 0===ee?V:ee,ne=B.selectorFactory,re=void 0===ne?W:ne,function(e,t,n,r){void 0===r&&(r={});var a=r,i=a.pure,o=void 0===i||i,s=a.areStatesEqual,c=void 0===s?z:s,u=a.areOwnPropsEqual,d=void 0===u?I:u,l=a.areStatePropsEqual,_=void 0===l?I:l,m=a.areMergedPropsEqual,p=void 0===m?I:m,f=h(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=U(e,Z,"mapStateToProps"),b=U(t,X,"mapDispatchToProps"),M=U(n,te,"mergeProps");return J(re,T({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:M,pure:o,areStatesEqual:c,areOwnPropsEqual:d,areStatePropsEqual:_,areMergedPropsEqual:p},f))}),ie=n(5),oe=n.n(ie),se=n(18),ce=n(31),ue=n.n(ce),de=n(32),le=n.n(de),_e=n(30),me=n.n(_e),pe=n(33),fe=n.n(pe),Te=n(21),he=n.n(Te),ye=n(26),be=n(24),Me=n(108),Se=n(238),Ee=n.n(Se);function ge(){return(ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ve=u.useLayoutEffect,ke=function(e){var t=Object(u.useRef)(e);return ve((function(){t.current=e})),t},De=function(e,t){"function"!=typeof e?e.current=t:e(t)},Le=function(e,t){var n=Object(u.useRef)();return Object(u.useCallback)((function(r){e.current=r,n.current&&De(n.current,null),n.current=t,t&&De(t,r)}),[t])},Oe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ye=function(e){Object.keys(Oe).forEach((function(t){e.style.setProperty(t,Oe[t],"important")}))},we=null;var je=function(){},Ie=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Pe=!!document.documentElement.currentStyle,Ce=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,i=e.onChange,o=void 0===i?je:i,s=e.onHeightChange,c=void 0===s?je:s,d=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var l,_=void 0!==d.value,m=Object(u.useRef)(null),p=Le(m,t),f=Object(u.useRef)(0),T=Object(u.useRef)(),h=function(){var e=m.current,t=n&&T.current?T.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,Ie.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(Pe&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){T.current=t;var i=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),we||((we=document.createElement("textarea")).setAttribute("tab-index","-1"),we.setAttribute("aria-hidden","true"),Ye(we)),null===we.parentNode&&document.body.appendChild(we);var a=e.paddingSize,i=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach((function(e){var t=e;we.style[t]=o[t]})),Ye(we),we.value=t;var c=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(we,e);we.value="x";var u=we.scrollHeight-a,d=u*n;"border-box"===s&&(d=d+a+i),c=Math.max(d,c);var l=u*r;return"border-box"===s&&(l=l+a+i),[c=Math.min(l,c),u]}(t,e.value||e.placeholder||"x",a,r),o=i[0],s=i[1];f.current!==o&&(f.current=o,e.style.setProperty("height",o+"px","important"),c(o,{rowHeight:s}))}};return Object(u.useLayoutEffect)(h),l=ke(h),Object(u.useLayoutEffect)((function(){var e=function(e){l.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(u.createElement)("textarea",ge({},d,{onChange:function(e){_||h(),o(e)},ref:p}))},xe=Object(u.forwardRef)(Ce),Re=n(22),Ae=(n(496),function(e){var t=e.goingCount,n=e.notGoingCount,r=e.showNotGoing;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__counters"},wp.element.createElement(Re.Counter,{className:"tribe-editor__rsvp-container-header__going-counter",count:t,label:Object(i.__)("Going","event-tickets")}),r&&wp.element.createElement(Re.Counter,{className:"tribe-editor__rsvp-container-header__not-going-counter",count:n,label:Object(i.__)("Not going","event-tickets")}))});Ae.propTypes={goingCount:_.a.number,notGoingCount:_.a.number,showNotGoing:_.a.bool};var He=Ae,Ne=n(13),Ve=n(20),Fe=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{goingCount:Ne.d.getRSVPGoingCount(e),notGoingCount:Ne.d.getRSVPNotGoingCount(e),showNotGoing:Ne.d.getRSVPNotGoingResponses(e)}})))(He),Ke=n(63),We=(n(497),wp.element.createElement(Re.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ke.Clipboard,null),text:Object(i.__)("This ticket has Attendee Information Fields configured.","event-tickets")})),Ue=function(e){var t,n,r,a,o=e.description,s=e.hasAttendeeInfoFields,c=e.isCreated,d=e.isDisabled,l=e.isSelected,_=e.onTempDescriptionChange,m=e.onTempTitleChange,p=e.tempDescription,f=e.tempTitle,T=e.title,h=e.available;return wp.element.createElement(u.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__header-details"},function(e,t,n,r,a,o){return n?wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__title-input-wrapper"},wp.element.createElement(Ee.a,{className:"tribe-editor__rsvp-container-header__title-input",value:a,placeholder:Object(i.__)("RSVP Title","event-tickets"),onChange:r,disabled:t}),e&&We):wp.element.createElement("h2",{className:"tribe-editor__rsvp-container-header__title"},o)}(s,d,l,m,f,T),function(e,t,n,r,a){return t?wp.element.createElement(xe,{className:"tribe-editor__rsvp-container-header__description-input",value:r,placeholder:Object(i.__)("RSVP description","event-tickets"),onChange:n,disabled:e}):a&&wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__description"},a)}(d,l,_,p,o),c&&(t=h,n=Object(i.__)("%d available","event-tickets"),r=n,a=wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__capacity-label-fallback"},Object(i.__)("Unlimited","event-tickets")),wp.element.createElement(be.NumericLabel,{className:"tribe-editor__rsvp-container-header__capacity-label",count:t,includeZero:!0,singular:n,plural:r,fallback:a}))),wp.element.createElement(Fe,null))};Ue.propTypes={available:_.a.number,description:_.a.string,hasAttendeeInfoFields:_.a.bool,isCreated:_.a.bool,isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,onTempDescriptionChange:_.a.func,onTempTitleChange:_.a.func,tempDescription:_.a.string,tempTitle:_.a.string,title:_.a.string};var ze=Ue,Ge=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Be=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{available:Ne.d.getRSVPAvailable(e),description:Ne.d.getRSVPDescription(e),hasAttendeeInfoFields:Ne.d.getRSVPHasAttendeeInfoFields(e),isCreated:Ne.d.getRSVPCreated(e),isDisabled:Ge(e),tempDescription:Ne.d.getRSVPTempDescription(e),tempTitle:Ne.d.getRSVPTempTitle(e),title:Ne.d.getRSVPTitle(e)}}),(function(e){return{onTempDescriptionChange:function(t){e(Ne.a.setRSVPTempDescription(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))},onTempTitleChange:function(t){e(Ne.a.setRSVPTempTitle(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))}}})))(ze),qe=n(67),Je=n.n(qe),$e=(n(499),wp.element.createElement(ye.Dashicon,{className:"tribe-editor__rsvp-duration__duration-tooltip-label",icon:"info-outline"})),Ze=function(e){var t=e.tooltipDisabled;return wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__rsvp-duration__duration-label",label:Object(i.__)("Duration","event-tickets"),tooltipDisabled:t,tooltipLabel:$e,tooltipText:Object(i.__)("By default, sales will begin as soon as you save the ticket and end when the event begins","event-tickets")})},Qe=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Xe=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Qe(e)}})))(Ze),et=n(9),tt=n.n(et),nt=n(38),rt=n.n(nt),at=(n(500),function(e){return wp.element.createElement(be.DateTimeRangePicker,tt()({className:"tribe-editor__rsvp-duration__duration-picker"},e))});at.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var it=at,ot=n(3),st=function(e){return function(t,n,r){var a={date:t,dayPickerInput:r};e(Ne.a.handleRSVPStartDate(a))}},ct=function(e){return function(t){return e(Ne.a.setRSVPTempStartTimeInput(t.target.value))}},ut=function(e){return function(t,n){e(Ne.a.handleRSVPStartTime(t)),n()}},dt=function(e){return function(t,n,r){var a={date:t,dayPickerInput:r};e(Ne.a.handleRSVPEndDate(a))}},lt=function(e){return function(t){return e(Ne.a.setRSVPTempEndTimeInput(t.target.value))}},_t=function(e){return function(t,n){e(Ne.a.handleRSVPEndTime(t)),n()}},mt=function(e,t){return function(n){var r=ot.moment.toMoment(n.target.value,ot.moment.TIME_FORMAT,!1);if(!r.isValid()){var a=Ne.d.getRSVPStartTimeInput(e);r=ot.moment.toMoment(a,ot.moment.TIME_FORMAT,!1)}var i=ot.moment.totalSeconds(r);t(Ne.a.handleRSVPStartTime(i))}},pt=function(e,t){return function(n){var r=ot.moment.toMoment(n.target.value,ot.moment.TIME_FORMAT,!1);if(!r.isValid()){var a=Ne.d.getRSVPEndTimeInput(e);r=ot.moment.toMoment(a,ot.moment.TIME_FORMAT,!1)}var i=ot.moment.totalSeconds(r);t(Ne.a.handleRSVPEndTime(i))}},ft=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=ot.globals.tecDateSettings().datepickerFormat?ot.moment.toFormat(ot.globals.tecDateSettings().datepickerFormat):"LL",n=Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e),r=Ne.d.getRSVPTempStartDateMoment(e),a=Ne.d.getRSVPTempEndDateMoment(e),i=r&&r.toDate(),o=a&&a.toDate();return{fromDate:i,fromDateInput:Ne.d.getRSVPTempStartDateInput(e),fromDateDisabled:n,fromDateFormat:t,fromTime:Ne.d.getRSVPTempStartTimeInput(e),fromTimeDisabled:n,toDate:o,toDateInput:Ne.d.getRSVPTempEndDateInput(e),toDateDisabled:n,toDateFormat:t,toTime:Ne.d.getRSVPTempEndTimeInput(e),toTimeDisabled:n,state:e}}),(function(e){return{onFromDateChange:st(e),onFromTimePickerChange:ct(e),onFromTimePickerClick:ut(e),onToDateChange:dt(e),onToTimePickerChange:lt(e),onToTimePickerClick:_t(e),dispatch:e}}),(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch,o=rt()(t,["dispatch"]);return tt()({},n,a,o,{onFromTimePickerBlur:mt(r,i),onToTimePickerBlur:pt(r,i)})})))(it),Tt=(n(501),function(e){var t=e.hasDurationError;return wp.element.createElement("div",{className:"tribe-editor__rsvp-duration"},wp.element.createElement(Xe,null),wp.element.createElement(ft,null),t&&wp.element.createElement("span",{className:"tribe-editor__rsvp-duration__error"},Object(i.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))}),ht=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasDurationError:Ne.d.getRSVPHasDurationError(e)}})))(Tt),yt=(n(502),function(e){var t=e.moveRSVP,n=e.removeRSVP,r=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__rsvp__content-row--move-delete"},wp.element.createElement(Re.Button,{type:"button",onClick:t,disabled:r},Object(i.__)("Move RSVP","event-tickets")),wp.element.createElement(Re.Button,{type:"button",onClick:n,disabled:r},Object(i.__)("Remove RSVP","event-tickets")))});yt.propTypes={moveRSVP:_.a.func.isRequired,removeRSVP:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var bt=yt,Mt=n(70),St=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e),rsvpId:Ne.d.getRSVPId(e),isDisabled:Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)}}),(function(e,t){return{moveRSVP:function(n){return e(Object(Mt.c)(n,t.clientId))},dispatch:e}}),(function(e,t,n){var r=t.dispatch,a=rt()(t,["dispatch"]);return tt()({},n,e,a,{removeRSVP:function(){window.confirm(Object(i.__)("Are you sure you want to delete this RSVP? It cannot be undone.","event-tickets"))&&(r(Ne.a.deleteRSVP()),e.created&&e.rsvpId&&r(Ne.e.deleteRSVP(e.rsvpId)),Object(se.dispatch)("core/editor").removeBlocks([n.clientId]))},moveRSVP:function(){return t.moveRSVP(e.rsvpId)}})})))(bt),Et=(n(503),Object(i.__)("+ Add","event-tickets")),gt=Object(i.__)("Edit","event-tickets"),vt=function(e){var t=e.attendeeRegistrationURL,n=e.hasAttendeeInfoFields,r=e.isCreated,a=e.isDisabled,o=e.isModalOpen,s=e.onClick,c=e.onClose,u=e.onIframeLoad,d=n?gt:Et;return wp.element.createElement(be.AttendeesRegistration,{helperText:Object(i.__)("Save your RSVP to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:a,isModalOpen:o,label:Object(i.__)("Attendee Information","event-tickets"),linkText:d,modalTitle:Object(i.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:u,showHelperText:!r,shouldCloseOnClickOutside:!1})};vt.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var kt=vt,Dt=function(e){return ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=attendee-registration&ticket_id="+Ne.d.getRSVPId(e)+"&tribe_events_modal=1"},Lt=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)||!Ne.d.getRSVPCreated(e)},Ot=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{attendeeRegistrationURL:Dt(e),hasAttendeeInfoFields:Ne.d.getRSVPHasAttendeeInfoFields(e),isCreated:Ne.d.getRSVPCreated(e),isDisabled:Lt(e),isModalOpen:Ne.d.getRSVPIsModalOpen(e)}}),(function(e,t){return{onClick:function(){e(Ne.a.setRSVPIsModalOpen(!0))},onClose:function(n){n.target.classList.contains("components-modal__content")||e(Ne.a.setRSVPIsModalOpen(t.clientId,!1))},onIframeLoad:function(t){var n=t.contentWindow,r=function(){t.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},a=n.document.querySelector("#event-tickets-attendee-information");a.addEventListener("submit",r);var i=function(){n.removeEventListener("unload",o),a.removeEventListener("submit",r)},o=function(){i();var t=n.document.querySelector("#tribe-tickets-attendee-sortables"),r=Boolean(t.firstElementChild);e(Ne.a.setRSVPHasAttendeeInfoFields(r)),e(Ne.a.setRSVPIsModalOpen(!1))};n.addEventListener("unload",o);var s=n.document.querySelector(".tribe-intro > a");s&&s.setAttribute("target","_blank")}}})))(kt),Yt=(n(504),function(){return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__labels"},wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label"},Object(i.__)("RSVP Capacity","event-tickets")),wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label-help"},Object(i.__)("Leave blank if unlimited","event-tickets")))}),wt=function(e){var t=e.capacityId,n=e.isDisabled,r=e.notGoingId,a=e.onTempCapacityChange,o=e.onTempNotGoingResponsesChange,s=e.tempCapacity,c=e.tempNotGoingResponses;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__options"},wp.element.createElement(Re.NumberInput,{className:"tribe-editor__rsvp-container-content__capacity-input",disabled:n,id:t,min:0,onChange:a,value:s}),wp.element.createElement(Re.Checkbox,{checked:c,className:"tribe-editor__rsvp-container-content__not-going-responses",disabled:n,id:r,label:Object(i.__)('Enable "Not Going" responses',"event-tickets"),onChange:o}))};wt.propTypes={capacityId:_.a.string.isRequired,isDisabled:_.a.bool.isRequired,notGoingId:_.a.string.isRequired,onTempCapacityChange:_.a.func.isRequired,onTempNotGoingResponsesChange:_.a.func.isRequired,tempCapacity:_.a.string.isRequired,tempNotGoingResponses:_.a.bool.isRequired};var jt=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.capacityId=Je()(),n.notGoingId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.isDisabled,n=e.onTempCapacityChange,r=e.onTempNotGoingResponsesChange,a=e.tempCapacity,i=e.tempNotGoingResponses,o=e.clientId,s={capacityId:this.capacityId,isDisabled:t,notGoingId:this.notGoingId,onTempCapacityChange:n,onTempNotGoingResponsesChange:r,tempCapacity:a,tempNotGoingResponses:i};return wp.element.createElement(u.Fragment,null,wp.element.createElement(Yt,null),wp.element.createElement(wt,s),wp.element.createElement(ht,null),this.props.hasBeenCreated&&wp.element.createElement(St,{clientId:o}),this.props.hasTicketsPlus&&wp.element.createElement(Ot,null))}}]),t}(u.PureComponent);jt.propTypes={clientId:_.a.string,hasTicketsPlus:_.a.bool,onTempCapacityChange:_.a.func,onTempNotGoingResponsesChange:_.a.func,tempCapacity:_.a.string,tempNotGoingResponses:_.a.bool,hasBeenCreated:_.a.bool};var It=jt,Pt=n(35),Ct=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},xt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isDisabled:Ct(e),tempCapacity:Ne.d.getRSVPTempCapacity(e),tempNotGoingResponses:Ne.d.getRSVPTempNotGoingResponses(e),hasBeenCreated:Ne.d.getRSVPCreated(e)}}),(function(e){return{onTempCapacityChange:function(t){e(Ne.a.setRSVPTempCapacity(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))},onTempNotGoingResponsesChange:function(t){e(Ne.a.setRSVPTempNotGoingResponses(t.target.checked)),e(Ne.a.setRSVPHasChanges(!0))}}})))(It),Rt=(n(505),function(e){var t=e.isDisabled;return wp.element.createElement(u.Fragment,null,t?wp.element.createElement(o.RSVPInactive,null):wp.element.createElement(o.RSVPActive,null),wp.element.createElement("span",{className:"tribe-editor__rsvp-container__icon-label"},Object(i.__)("RSVP","event-tickets")))});Rt.propTypes={isDisabled:_.a.bool.isRequired};var At=function(e){var t=e.isDisabled,n=e.isSelected,r=e.clientId;return wp.element.createElement(be.ContainerPanel,{className:he()("tribe-editor__rsvp-container",{"tribe-editor__rsvp-container--disabled":t}),layout:Me.a.rsvp,icon:wp.element.createElement(Rt,{isDisabled:t}),header:wp.element.createElement(Be,{isSelected:n}),content:wp.element.createElement(xt,{clientId:r})})};At.propTypes={isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,clientId:_.a.string.isRequired};var Ht=At,Nt=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Vt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Nt(e)}})))(Ht),Ft=function(e){var t=e.href,n=e.isDisabled;return wp.element.createElement(be.ActionButton,{asLink:!0,className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--attendees",disabled:n,href:t,icon:wp.element.createElement(o.Attendees,null),target:"_blank"},Object(i.__)("Attendees","event-tickets"))};Ft.propTypes={href:_.a.string,isDisabled:_.a.bool};var Kt=Ft,Wt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{href:ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=tickets-attendees&event_id="+Object(se.select)("core/editor").getCurrentPostId(),isDisabled:Ne.d.getRSVPIsLoading(e)}})))(Kt),Ut=n(43),zt=n.n(Ut),Gt=function(e){var t=e.isDisabled,n=e.onClick;return wp.element.createElement(be.ActionButton,{className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--settings",disabled:t,icon:wp.element.createElement(Ke.Cog,null),onClick:n},Object(i.__)("Settings","event-tickets"))};Gt.defaultProps={onClick:zt.a},Gt.propTypes={isDisabled:_.a.bool,onClick:_.a.func};var Bt=Gt,qt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Ne.d.getRSVPIsLoading(e)}}),(function(e){return{onClick:function(){return e(Ne.a.setRSVPSettingsOpen(!0))}}})))(Bt),Jt=(n(506),function(e){return e?Object(i.__)("Update RSVP","event-tickets"):Object(i.__)("Create RSVP","event-tickets")}),$t=Object(i.__)("Cancel","event-tickets"),Zt=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onWarningClick=function(){n.setState({isWarningOpen:!n.state.isWarningOpen})},n.getActions=function(){var e=n.props,t=e.created,r=(e.hasTicketsPlus,e.hasRecurrenceRules),a=e.isLoading,o=[wp.element.createElement(qt,null)];if(t&&o.push(wp.element.createElement(Wt,null)),r){var s=n.state.isWarningOpen?"no":"info-outline",c=n.state.isWarningOpen?Object(i.__)("Hide Warning","event-tickets"):Object(i.__)("Warning","event-tickets");o.push(wp.element.createElement(be.WarningButton,{icon:s,onClick:n.onWarningClick,isDisabled:a},c))}return o},n.state={isWarningOpen:!1},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.created,n=e.isCancelDisabled,r=e.isConfirmDisabled,a=e.onCancelClick,o=e.onConfirmClick,s=e.showCancel;return wp.element.createElement(u.Fragment,null,wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__rsvp__action-dashboard",actions:this.getActions(),cancelLabel:$t,confirmLabel:Jt(t),isCancelDisabled:n,isConfirmDisabled:r,onCancelClick:a,onConfirmClick:o,showCancel:s}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__rsvp__warning"},Object(i.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}]),t}(u.PureComponent);Zt.propTypes={created:_.a.bool.isRequired,hasTicketsPlus:_.a.bool.isRequired,hasRecurrenceRules:_.a.bool.isRequired,isCancelDisabled:_.a.bool.isRequired,isConfirmDisabled:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,onCancelClick:_.a.func.isRequired,onConfirmClick:_.a.func.isRequired,showCancel:_.a.bool.isRequired};var Qt=Zt,Xt=function(e){var t=!1;try{t=window.tribe[Pt.plugins.constants.EVENTS_PRO_PLUGIN].data.blocks.recurring.selectors.hasRules(e)}catch(e){}return t},en=function(e){return!Ne.d.getRSVPTempTitle(e)||!Ne.d.getRSVPHasChanges(e)||Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPHasDurationError(e)},tn=function(e,t){return function(){t(Ne.a.setRSVPTempDetails({tempTitle:Ne.d.getRSVPTitle(e),tempDescription:Ne.d.getRSVPDescription(e),tempCapacity:Ne.d.getRSVPCapacity(e),tempNotGoingResponses:Ne.d.getRSVPNotGoingResponses(e),tempStartDate:Ne.d.getRSVPStartDate(e),tempStartDateInput:Ne.d.getRSVPStartDateInput(e),tempStartDateMoment:Ne.d.getRSVPStartDateMoment(e),tempEndDate:Ne.d.getRSVPEndDate(e),tempEndDateInput:Ne.d.getRSVPEndDateInput(e),tempEndDateMoment:Ne.d.getRSVPEndDateMoment(e),tempStartTime:Ne.d.getRSVPStartTime(e),tempEndTime:Ne.d.getRSVPEndTime(e),tempStartTimeInput:Ne.d.getRSVPStartTimeInput(e),tempEndTimeInput:Ne.d.getRSVPEndTimeInput(e)})),t(Ne.a.setRSVPHasChanges(!1)),Object(se.dispatch)("core/editor").clearSelectedBlock()}},nn=function(e,t){return function(){var n={title:Ne.d.getRSVPTempTitle(e),description:Ne.d.getRSVPTempDescription(e),capacity:Ne.d.getRSVPTempCapacity(e),notGoingResponses:Ne.d.getRSVPTempNotGoingResponses(e),startDate:Ne.d.getRSVPTempStartDate(e),startDateInput:Ne.d.getRSVPTempStartDateInput(e),startDateMoment:Ne.d.getRSVPTempStartDateMoment(e),endDate:Ne.d.getRSVPTempEndDate(e),endDateInput:Ne.d.getRSVPTempEndDateInput(e),endDateMoment:Ne.d.getRSVPTempEndDateMoment(e),startTime:Ne.d.getRSVPTempStartTime(e),endTime:Ne.d.getRSVPTempEndTime(e),startTimeInput:Ne.d.getRSVPTempStartTimeInput(e),endTimeInput:Ne.d.getRSVPTempEndTimeInput(e)};Ne.d.getRSVPCreated(e)?t(Ne.e.updateRSVP(tt()({},n,{id:Ne.d.getRSVPId(e)}))):t(Ne.e.createRSVP(tt()({},n,{postId:Object(se.select)("core/editor").getCurrentPostId()})))}},rn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e),hasRecurrenceRules:Xt(e),hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isCancelDisabled:Ne.d.getRSVPIsLoading(e),isConfirmDisabled:en(e),isLoading:Ne.d.getRSVPIsLoading(e),showCancel:Ne.d.getRSVPCreated(e),state:e}}),null,(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch;return tt()({},n,a,{onCancelClick:tn(r,i),onConfirmClick:nn(r,i)})})))(Qt),an=(n(507),function(e){var t=e.image,n=e.isSettingsLoading,r=e.onRemove,a=e.onSelect,o={title:Object(i.__)("Ticket Header Image","event-tickets"),description:Object(i.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(i.__)("Upload Image","event-tickets"),image:t,onRemove:r,onSelect:a,removeButtonDisabled:n};return wp.element.createElement(Re.ImageUpload,o)});an.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var on=an,sn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{image:{id:Ne.d.getRSVPHeaderImageId(e),alt:Ne.d.getRSVPHeaderImageAlt(e),src:Ne.d.getRSVPHeaderImageSrc(e)},isSettingsLoading:Ne.d.getRSVPIsSettingsLoading(e)}}),(function(e){return{onSelect:function(t){return e(Ne.a.updateRSVPHeaderImage(t))},onRemove:function(){return e(Ne.a.deleteRSVPHeaderImage())}}})))(on),cn=(n(508),function(e){var t=e.isSettingsLoading,n=e.onCloseClick;return wp.element.createElement(be.SettingsDashboard,{className:he()("tribe-editor__rsvp__settings-dashboard",{"tribe-editor__rsvp__settings-dashboard--loading":t}),closeButtonDisabled:t,content:wp.element.createElement(u.Fragment,null,wp.element.createElement(sn,null),t&&wp.element.createElement(ye.Spinner,null)),onCloseClick:n})});cn.propTypes={isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var un=cn,dn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsLoading:Ne.d.getRSVPIsSettingsLoading(e)}}),(function(e){return{onCloseClick:function(){return e(Ne.a.setRSVPSettingsOpen(!1))}}})))(un),ln=function(e){var t=e.isSelected,n=e.isSettingsOpen;return t?n?wp.element.createElement(dn,null):wp.element.createElement(rn,null):null};ln.propTypes={isSelected:_.a.bool.isRequired,isSettingsOpen:_.a.bool.isRequired};var _n=ln,mn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsOpen:Ne.d.getRSVPSettingsOpen(e)}})))(_n),pn=n(95),fn={className:"tribe-editor__rsvp__inactive-block",icon:wp.element.createElement(o.RSVPInactive,null),layout:pn.a.rsvp},Tn=function(e){var t=e.created;return fn.title=t?Object(i.__)("RSVP is not currently active","event-tickets"):Object(i.__)("There is no RSVP configured","event-tickets"),fn.description=t?Object(i.__)("Edit this block to change RSVP settings.","event-tickets"):Object(i.__)("Edit this block to create an RSVP form.","event-tickets"),wp.element.createElement(pn.b,fn)};Tn.propTypes={created:_.a.bool.isRequired};var hn=Tn,yn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e)}})))(hn),bn=n(29),Mn=n(19),Sn=(n(509),function(e){function t(){var e,n,r,a;ue()(this,t);for(var o=arguments.length,s=Array(o),c=0;c<o;c++)s[c]=arguments[c];return n=r=me()(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.renderPostTypes=function(){return r.props.isFetchingPosts?wp.element.createElement(ye.Spinner,null):r.props.postOptions.length?wp.element.createElement(ye.MenuGroup,null,wp.element.createElement(ye.MenuItemsChoice,{choices:r.props.postOptions,value:r.props.postValue,onSelect:r.props.onPostSelect})):wp.element.createElement(ye.Notice,{isDismissible:!1,status:"warning"},Object(i.__)("No posts found","event-tickets"))},a=n,me()(r,a)}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.initialize()}},{key:"render",value:function(){return wp.element.createElement(ye.Modal,{title:this.props.title,onRequestClose:this.props.hideModal,className:"tribe-editor__tickets__move-modal"},wp.element.createElement("label",{htmlFor:"post_type"},Object(i.__)("You can optionally focus on a specific post type:","event-tickets")),wp.element.createElement(Re.Select,{id:"post_type",options:this.props.postTypeOptions,onChange:this.props.onPostTypeChange,value:this.props.postTypeOptionValue}),wp.element.createElement("label",{htmlFor:"search"},Object(i.__)("You can also enter keywords to help find the target event by title or description","event-tickets")),wp.element.createElement(Re.Input,{id:"search",type:"text",onChange:this.props.onSearchChange,value:this.props.search}),wp.element.createElement("label",null,Object(i.__)("Select the post you wish to move the ticket type to:","event-tickets")),this.renderPostTypes(),wp.element.createElement("footer",null,wp.element.createElement(ye.Button,{isLarge:!0,isPrimary:!0,isBusy:this.props.isModalSubmitting,disabled:!this.props.hasSelectedPost||this.props.isFetchingPosts,onClick:this.props.onSubmit},Object(i.__)("Finish!","event-tickets"))))}}]),t}(u.PureComponent));Sn.propTypes={hasSelectedPost:_.a.bool.isRequired,hideModal:_.a.func.isRequired,initialize:_.a.func.isRequired,isFetchingPosts:_.a.bool.isRequired,isModalSubmitting:_.a.bool.isRequired,onPostSelect:_.a.func.isRequired,onPostTypeChange:_.a.func.isRequired,onSearchChange:_.a.func.isRequired,onSubmit:_.a.func.isRequired,postOptions:_.a.arrayOf(_.a.object),postTypeOptions:_.a.arrayOf(_.a.object),postTypeOptionValue:_.a.object,postValue:_.a.string.isRequired,search:_.a.string.isRequired,title:_.a.string.isRequired},Sn.defaultProps={title:Object(i.__)("Move Ticket Types","event-tickets")};var En=Sn,gn=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasSelectedPost:bn.i(e),isFetchingPosts:bn.k(e),isFetchingPostTypes:bn.j(e),isModalSubmitting:bn.m(e),postOptions:bn.f(e),postTypeOptions:bn.h(e),postTypeOptionValue:bn.g(e),postValue:bn.d(e),search:bn.c(e)}}),(function(e,t){return{initialize:function(){return e({type:Mn.h})},hideModal:function(){return e(Object(Mt.a)())},onSearchChange:function(t){return e(Object(Mt.b)({search_terms:t.target.value}))},onPostTypeChange:function(t){return e(Object(Mt.b)({post_type:t.value}))},onPostSelect:function(t){return e(Object(Mt.b)({target_post_id:t}))},onSubmit:function(){return e({type:Mn.o})}}})))(En),vn=(n(510),function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){!this.props.rsvpId&&this.props.initializeRSVP()}},{key:"render",value:function(){var e=this.props,t=e.created,n=e.isInactive,r=e.isLoading,a=e.isSelected,i=e.clientId,o=e.isModalShowing;return wp.element.createElement(u.Fragment,null,!a&&(t&&n||!t)?wp.element.createElement(yn,null):wp.element.createElement("div",{className:he()("tribe-editor__rsvp",{"tribe-editor__rsvp--selected":a},{"tribe-editor__rsvp--loading":r})},wp.element.createElement(Vt,{isSelected:a,clientId:i}),wp.element.createElement(mn,{isSelected:a}),r&&wp.element.createElement(ye.Spinner,null)),o&&wp.element.createElement(gn,null))}}]),t}(u.PureComponent));vn.propTypes={clientId:_.a.string.isRequired,created:_.a.bool.isRequired,initializeRSVP:_.a.func.isRequired,isInactive:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,isModalShowing:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,rsvpId:_.a.number.isRequired};var kn=vn,Dn=n(58),Ln=n.n(Dn),On=n(53),Yn=n.n(On),wn=n(39),jn=n.n(wn),In=n(326),Pn=n.n(In),Cn=n(492),xn=n.n(Cn),Rn={},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){var n=function(n){function r(e){ue()(this,r);var t=me()(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.keys=[],t.saving=null,t.keys=t.generateKeys(),t}return fe()(r,n),le()(r,[{key:"generateKeys",value:function(){return jn()(this.attrs)?this.attrs:Yn()(this.attrs)?Ln()(this.attrs):(console.warn("Make sure attributes is from a valid type: Array or Object"),[])}},{key:"componentDidMount",value:function(){var e=this.props,t=e.setInitialState,n=e.attributes,r=void 0===n?{}:n,a=e.isolated;(0,e.onBlockCreated)(this.props),this.registerBlock(),this.blockCount()>1&&!a||t(tt()({},this.props,{get:function(e,t){return e in r?r[e]:t}}))}},{key:"componentWillUnmount",value:function(){var e=this.props.onBlockRemoved;this.unregisterBlock(),e(this.props)}},{key:"registerBlock",value:function(){var e=this.props.name;Rn[e]=e in Rn?Rn[e]+1:1}},{key:"unregisterBlock",value:function(){var e=this.props.name;Rn[e]-=1}},{key:"blockCount",value:function(){var e=this.props.name;return Rn[e]}},{key:"componentDidUpdate",value:function(){var e=this.calculateDiff();xn()(this.saving,e)||(this.saving=e,Pn()(e)||this.props.setAttributes(e))}},{key:"calculateDiff",value:function(){var e=this,t=this.attrs;return this.keys.reduce((function(n,r){return r in e.props&&!xn()(t[r],e.props[r])&&(n[r]=e.props[r]),n}),{})}},{key:"render",value:function(){return wp.element.createElement(t,this.props)}},{key:"attrs",get:function(){return e||this.props.attributes||{}}}]),r}(u.Component);return n.defaultProps={attributes:{},setInitialState:zt.a,setAttributes:zt.a,name:"",isolated:!1,onBlockCreated:zt.a,onBlockRemoved:zt.a},n.propTypes={setAttributes:_.a.func,setInitialState:_.a.func,attributes:_.a.object,name:_.a.string,isolated:_.a.bool,increaseRegister:_.a.func,decreaseRegister:_.a.func,onBlockCreated:_.a.func,onBlockRemoved:_.a.func},n.displayName="WithSaveData( "+(t.displayName||t.name||"Component "),n}},Hn=function(e){var t=Ne.d.getRSVPStartDateMoment(e),n=Ne.d.getRSVPStartTimeNoSeconds(e),r=Ne.d.getRSVPEndDateMoment(e),a=Ne.d.getRSVPEndTimeNoSeconds(e);if(!t||!r)return!1;var i=ot.moment.setTimeInSeconds(t.clone(),ot.time.toSeconds(n,ot.time.TIME_FORMAT_HH_MM)),o=ot.moment.setTimeInSeconds(r.clone(),ot.time.toSeconds(a,ot.time.TIME_FORMAT_HH_MM)),s=oe()();return!(s.isAfter(i)&&s.isBefore(o))},Nn=function(e,t){return function(){var n=Object(se.select)("core/editor").getCurrentPostId();e(Ne.e.getRSVP(n));var r=t.attributes,a=void 0===r?{}:r;parseInt(a.headerImageId,10)&&e(Ne.a.fetchRSVPHeaderImage(a.headerImageId)),a.goingCount&&e(Ne.a.setRSVPGoingCount(parseInt(a.goingCount,10))),a.notGoingCount&&e(Ne.a.setRSVPNotGoingCount(parseInt(a.notGoingCount,10)))}},Vn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=Ne.d.getRSVPId(e);return{created:Ne.d.getRSVPCreated(e),isInactive:Hn(e),isLoading:Ne.d.getRSVPIsLoading(e),isModalShowing:Object(bn.l)(e)&&Object(bn.e)(e)===t,rsvpId:t}}),(function(e,t){return{initializeRSVP:function(){return e(Ne.a.initializeRSVP())},onBlockRemoved:function(){return e(Ne.a.deleteRSVP())},setInitialState:Nn(e,t)}})),An())(kn),Fn=n(8),Kn={id:"rsvp",title:Object(i.__)("RSVP","event-tickets"),description:Object(i.__)("Find out who is planning to attend!","event-tickets"),icon:wp.element.createElement(o.RSVP,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{goingCount:{type:"integer",source:"meta",meta:Fn.g},notGoingCount:{type:"integer",source:"meta",meta:Fn.j},headerImageId:{type:"integer",source:"meta",meta:Fn.i}},edit:Vn,save:function(){return null}},Wn=n(96),Un=function(e){var t=e.onClick;return wp.element.createElement(be.ActionButton,{icon:wp.element.createElement(Ke.Cog,null),onClick:t},Object(i.__)("Settings","event-tickets"))};Un.propTypes={onClick:_.a.func};var zn=Un,Gn=n(4),Bn=Object(P.c)(Object(Ve.withStore)(),ae(null,(function(e){return{onClick:function(){return e(Gn.a.openSettings())}}})))(zn),qn=function(e){var t=e.href;return t?wp.element.createElement(be.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(o.Orders,null),target:"_blank"},Object(i.__)("Orders","event-tickets")):null};qn.propTypes={href:_.a.string.isRequired};var Jn=qn,$n=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=ot.globals.adminUrl(),n=Object(se.select)("core/editor").getCurrentPostType(),r=Object(se.select)("core/editor").getCurrentPostId(),a=Gn.f.getTicketsProvider(e),i=Gn.b.TICKET_ORDERS_PAGE_SLUG[a];return{href:i?t+"edit.php?post_type="+n+"&page="+i+"&event_id="+r:""}})))(Jn),Zn=function(e){var t=e.href;return e.canCreateTickets&&wp.element.createElement(be.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(o.Attendees,null),target:"_blank"},Object(i.__)("Attendees","event-tickets"))};Zn.propTypes={href:_.a.string.isRequired,canCreateTickets:_.a.bool};var Qn=Zn,Xn=Object(P.c)(Object(Ve.withStore)(),ae((function(){return{href:ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=tickets-attendees&event_id="+Object(se.select)("core/editor").getCurrentPostId(),canCreateTickets:Gn.f.canCreateTickets()}})))(Qn),er=(n(513),Object(i.__)("Add Tickets","event-tickets")),tr=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onWarningClick=function(){n.setState({isWarningOpen:!n.state.isWarningOpen})},n.getActions=function(){var e=n.props,t=e.hasCreatedTickets,r=e.hasOrdersPage,a=e.hasRecurrenceRules,o=(e.hasTicketsPlus,[wp.element.createElement(Bn,null)]);if(t&&(o.push(wp.element.createElement(Xn,null)),r&&o.push(wp.element.createElement($n,null))),a){var s=n.state.isWarningOpen?"no":"info-outline",c=n.state.isWarningOpen?Object(i.__)("Hide Warning","event-tickets"):Object(i.__)("Warning","event-tickets");o.push(wp.element.createElement(be.WarningButton,{icon:s,onClick:n.onWarningClick},c))}return o},n.state={isWarningOpen:!1},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props.onConfirmClick;return wp.element.createElement(u.Fragment,null,wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__tickets__action-dashboard",actions:this.getActions(),confirmLabel:er,onConfirmClick:e,showCancel:!1}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__tickets__warning"},Object(i.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}]),t}(u.PureComponent);tr.propTypes={hasCreatedTickets:_.a.bool,hasOrdersPage:_.a.bool,hasRecurrenceRules:_.a.bool,hasTicketsPlus:_.a.bool,onConfirmClick:_.a.func};var nr=tr,rr=function(e){var t=!1;try{t=window.tribe[Pt.plugins.constants.EVENTS_PRO_PLUGIN].data.blocks.recurring.selectors.hasRules(e)}catch(e){}return t},ar=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketsProvider(e),a=Gn.b.TICKET_ORDERS_PAGE_SLUG[n];return{hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOrdersPage:Boolean(a),hasRecurrenceRules:rr(e),hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),onConfirmClick:function(){var e=t.clientId,n=Object(se.select)("core/editor").getBlockCount,a=Object(se.dispatch)("core/editor").insertBlock,i=n(e);a(Object(r.createBlock)("tribe/tickets-item",{}),i,e)}}})))(nr),ir=(n(514),function(e){var t=e.label,n=e.items,r=e.right;return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-row"},wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-left"},t&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-label"},t),n&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-items"},n)),wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-right"},r))});ir.propTypes={label:_.a.string,items:_.a.string,right:_.a.node},ir.defaultProps={label:"",items:"",right:""};var or=ir,sr=(n(515),function(e){var t=e.isSettingsLoading,n=e.independentCapacity,r=e.sharedCapacity,a=e.independentAndSharedCapacity,o=e.independentTicketItems,s=e.sharedTicketItems,c=e.onSharedCapacityChange,u=wp.element.createElement(Re.NumberInput,{onChange:c,value:r,disabled:t,min:0});return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-table"},wp.element.createElement("h3",{className:"tribe-editor__tickets__capacity-table-title"},Object(i.__)("Capacity","event-tickets")),wp.element.createElement(or,{label:Object(i.__)("Shared capacity","event-tickets"),items:s,right:u}),wp.element.createElement(or,{label:Object(i.__)("Independent capacity","event-tickets"),items:o,right:n}),wp.element.createElement(or,{label:Object(i.__)("Total Capacity","event-tickets"),right:a}))});sr.propTypes={isSettingsLoading:_.a.bool,independentCapacity:_.a.number,sharedCapacity:_.a.string,independentAndSharedCapacity:_.a.number,independentTicketItems:_.a.string,sharedTicketItems:_.a.string,onSharedCapacityChange:_.a.func};var cr=sr,ur=function(e){var t=e.filter((function(e){return e.details.title})).map((function(e){return e.details.title})).join(", ");return t?" ("+t+") ":""},dr=function(e){var t=Gn.f.getIndependentTickets(e);return ur(t)},lr=function(e){var t=Gn.f.getSharedTickets(e);return ur(t)},_r=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e),independentCapacity:Gn.f.getIndependentTicketsCapacity(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),independentAndSharedCapacity:Gn.f.getIndependentAndSharedTicketsCapacity(e),independentTicketItems:dr(e),sharedTicketItems:lr(e)}}),(function(e){return{onSharedCapacityChange:function(t){e(Gn.a.setTicketsSharedCapacity(t.target.value)),e(Gn.a.setTicketsTempSharedCapacity(t.target.value))}}})))(cr),mr=(n(516),function(e){var t=e.image,n=e.isSettingsLoading,r=e.onRemove,a=e.onSelect,o={title:Object(i.__)("Ticket Header Image","event-tickets"),description:Object(i.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(i.__)("Upload Image","event-tickets"),image:t,onRemove:r,onSelect:a,removeButtonDisabled:n};return wp.element.createElement(Re.ImageUpload,o)});mr.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var pr=mr,fr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{image:{id:Gn.f.getTicketsHeaderImageId(e),alt:Gn.f.getTicketsHeaderImageAlt(e),src:Gn.f.getTicketsHeaderImageSrc(e)},isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}}),(function(e){return{onSelect:function(t){return e(Gn.a.updateTicketsHeaderImage(t))},onRemove:function(){return e(Gn.a.deleteTicketsHeaderImage())}}})))(pr),Tr=(n(517),function(e){var t=e.hasTicketsPlus,n=e.isSettingsLoading,r=e.onCloseClick;return wp.element.createElement(be.SettingsDashboard,{className:he()("tribe-editor__tickets__settings-dashboard",{"tribe-editor__tickets__settings-dashboard--loading":n}),closeButtonDisabled:n,content:wp.element.createElement(u.Fragment,null,t&&wp.element.createElement(_r,null),wp.element.createElement(fr,null),n&&wp.element.createElement(ye.Spinner,null)),onCloseClick:r})});Tr.propTypes={hasTicketsPlus:_.a.bool,isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var hr=Tr,yr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}}),(function(e){return{onCloseClick:function(){return e(Gn.a.closeSettings())}}})))(hr),br=function(e){var t=e.clientId,n=e.isSelected,r=e.isSettingsOpen;return n?r?wp.element.createElement(yr,null):wp.element.createElement(ar,{clientId:t}):null};br.propTypes={clientId:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool};var Mr=br,Sr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e)}})))(Mr),Er=(n(518),function(e){var t=e.available,n=e.total,r=wp.element.createElement(be.NumericLabel,{className:he()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--available","tribe-tooltip"),count:t,singular:Object(i.__)("%d ticket available","event-tickets"),plural:Object(i.__)("%d tickets available","event-tickets")}),a=wp.element.createElement(be.NumericLabel,{className:he()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--total"),count:n,singular:Object(i.__)("%d total ticket","event-tickets"),plural:Object(i.__)("%d total tickets","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__tickets__availability"},wp.element.createElement("span",{class:"tribe-tooltip",title:Object(i.__)("Ticket availability is based on the lowest number of inventory, stock, and capacity.","event-tickets")},r,wp.element.createElement("span",{className:"dashicons dashicons-info"})),a)});Er.propTypes={available:_.a.number,total:_.a.number};var gr=Er,vr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{total:Gn.f.getIndependentAndSharedTicketsCapacity(e),available:Gn.f.getIndependentAndSharedTicketsAvailable(e)}})))(gr),kr=(n(519),function(){return wp.element.createElement("div",{className:"tribe-editor__tickets__overlay"})}),Dr=function(e){var t=e.allTicketsPast,n=e.canCreateTickets,r=e.hasCreatedTickets,a=e.hasOverlay,s=e.showAvailability,c=e.showInactiveBlock,u={title:"",description:""};n?r?u.title=t?Object(i.__)("Tickets are no longer available","event-tickets"):Object(i.__)("Tickets are not yet available","event-tickets"):(u.title=Object(i.__)("There are no tickets yet","event-tickets"),u.description=Object(i.__)("Edit this block to create your first ticket.","event-tickets")):(u.title=Object(i.__)("There is no ecommerce available","event-tickets"),u.description=Object(i.__)("To create tickets, you'll need to enable an ecommerce solution.","event-tickets"));var d=he()({"tribe-editor__tickets__inner-blocks":!0,"tribe-editor__tickets__inner-blocks--show":!c});return wp.element.createElement("div",{className:"tribe-editor__tickets__container"},wp.element.createElement("div",{className:d},wp.element.createElement(Wn.InnerBlocks,{allowedBlocks:["tribe/tickets-item"]})),c&&wp.element.createElement(be.InactiveBlock,{layout:pn.a.ticket,title:u.title,description:u.description,icon:wp.element.createElement(o.TicketInactive,null)}),s&&wp.element.createElement(vr,null),a&&wp.element.createElement(kr,null))};Dr.propTypes={allTicketsPast:_.a.bool,canCreateTickets:_.a.bool,hasCreatedTickets:_.a.bool,hasOverlay:_.a.bool,showAvailability:_.a.bool,showInactiveBlock:_.a.bool};var Lr=Dr,Or=function(e,t){return Gn.f.getTicketsIsSettingsOpen(e)||!Gn.f.hasATicketSelected(e)&&!t.isSelected},Yr=function(e,t){var n=t.isSelected&&!Gn.f.hasTickets(e),r=!(t.isSelected||Gn.f.hasATicketSelected(e)||Gn.f.hasCreatedTickets(e)&&Gn.f.hasTicketOnSale(e));return n||r},wr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{allTicketsPast:Gn.f.allTicketsPast(e),canCreateTickets:Gn.f.canCreateTickets(),hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOverlay:Or(e,t),showAvailability:t.isSelected&&Gn.f.hasCreatedTickets(e),showInactiveBlock:Yr(e,t)}})))(Lr),jr=(n(520),Object(i.__)("It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ","event-tickets")),Ir=Object(i.__)("Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.","event-tickets"),Pr=function(e){var t=e.provider,n=e.onProviderChange,r=rt()(e,["provider","onProviderChange"]);return wp.element.createElement("div",{className:"tribe-editor__tickets-control-container"},wp.element.createElement("input",tt()({className:"tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio",type:"radio",id:t.class,name:t.class,onChange:n},r)),wp.element.createElement("label",{className:"tribe-editor__tickets-control__label",htmlFor:t.class},t.name))},Cr=function(e){var t=e.hasMultipleProviders,n=e.providers,r=e.selectedProvider,a=e.onProviderChange;return t&&wp.element.createElement(Wn.InspectorControls,{key:"inspector"},wp.element.createElement(ye.PanelBody,{title:Object(i.__)("Tickets Settings","event-tickets")},wp.element.createElement(ye.PanelRow,null,wp.element.createElement("fieldset",{className:"tribe-editor__tickets-controls-provider"},wp.element.createElement("legend",null,Object(i.__)("Sell tickets using","event-tickets")),wp.element.createElement("p",null,jr,wp.element.createElement("em",null,Ir)),n.map((function(e,t){return wp.element.createElement(Pr,{key:"provider-option-"+(t+1),provider:e,onProviderChange:a,checked:r===e.class})}))))))};Cr.propTypes={hasMultipleProviders:_.a.bool,providers:_.a.arrayOf(_.a.shape({name:_.a.string,class:_.a.string})),selectedProvider:_.a.string,onProviderChange:_.a.func};var xr=Cr,Rr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasMultipleProviders:Gn.f.hasMultipleTicketProviders(),providers:Gn.f.getTicketProviders(),selectedProvider:Gn.f.getTicketsProvider(e)}}),(function(e){return{onProviderChange:function(t){return e(Gn.a.setTicketsProvider(t.target.name))}}})),An())(xr),Ar=(n(521),function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.onBlockUpdate(this.props.isSelected)}},{key:"componentDidUpdate",value:function(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.canCreateTickets,r=e.isSettingsOpen,a=e.clientId;return wp.element.createElement("div",{className:he()("tribe-editor__tickets",{"tribe-editor__tickets--selected":t},{"tribe-editor__tickets--settings-open":r})},wp.element.createElement(wr,{isSelected:t}),n&&wp.element.createElement(Sr,{isSelected:t,clientId:a}),wp.element.createElement(Rr,null))}}]),t}(u.PureComponent));Ar.propTypes={canCreateTickets:_.a.bool,clientId:_.a.string,hasProviders:_.a.bool,header:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool,onBlockUpdate:_.a.func};var Hr=Ar,Nr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=Gn.f.getTicketsHeaderImageId(e);return{header:t?""+t:"",hasProviders:Gn.f.hasTicketProviders(),isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e),provider:Gn.f.getTicketsProvider(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),canCreateTickets:Gn.f.canCreateTickets()}}),(function(e){return{setInitialState:function(t){e(Gn.a.setTicketsInitialState(t))},onBlockUpdate:function(t){e(Gn.a.setTicketsIsSelected(t))},onBlockRemoved:function(){e(Gn.a.resetTicketsBlock())}}})),An())(Hr),Vr={id:"tickets",title:Object(i.__)("Tickets","event-tickets"),description:Object(i.__)("Sell tickets and register attendees.","event-tickets"),icon:wp.element.createElement(o.Tickets,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{sharedCapacity:{type:"string",source:"meta",meta:Fn.d},header:{type:"string",source:"meta",meta:Fn.i},provider:{type:"string",source:"meta",meta:Fn.e},tickets:{type:"array",source:"meta",meta:Fn.c}},edit:Nr,save:function(){return wp.element.createElement("div",null,wp.element.createElement(Wn.InnerBlocks.Content,null))}},Fr=(n(522),n(523),function(e){var t=e.hasAttendeeInfoFields,n=e.isDisabled,r=e.isSelected,a=e.onTempTitleChange,o=e.tempTitle,s=e.title,c=t&&wp.element.createElement(Re.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ke.Clipboard,null),text:Object(i.__)("This ticket has Attendee Information Fields configured.","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-title"},r?wp.element.createElement(u.Fragment,null,wp.element.createElement(Ee.a,{className:"tribe-editor__ticket__container-header-title-input",value:o,placeholder:Object(i.__)("Ticket Type *","event-tickets"),onChange:a,disabled:n,required:!0}),c):wp.element.createElement(u.Fragment,null,wp.element.createElement("h3",{className:"tribe-editor__ticket__container-header-title-label"},s),c,wp.element.createElement(Ke.Pencil,null)))});Fr.propTypes={hasAttendeeInfoFields:_.a.bool,isDisabled:_.a.bool,isSelected:_.a.bool,onTempTitleChange:_.a.func,tempTitle:_.a.string,title:_.a.string};var Kr=Fr,Wr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),tempTitle:Gn.f.getTicketTempTitle(e,t),title:Gn.f.getTicketTitle(e,t)}}),(function(e,t){return{onTempTitleChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempTitle(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Kr),Ur=(n(524),function(e){var t=e.isDisabled,n=e.isSelected,r=e.onTempDescriptionChange,a=e.tempDescription,o=e.description;return n?wp.element.createElement(xe,{className:"tribe-editor__ticket__container-header-description-input",value:a,placeholder:Object(i.__)("Description","event-tickets"),onChange:r,disabled:t}):wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-description"},o)});Ur.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,onTempDescriptionChange:_.a.func,tempDescription:_.a.string,description:_.a.string};var zr=Ur,Gr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),tempDescription:Gn.f.getTicketTempDescription(e,t),description:Gn.f.getTicketDescription(e,t)}}),(function(e,t){return{onTempDescriptionChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempDescription(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(zr),Br=n(23),qr=(n(525),function(e){var t=e.isDisabled,n=e.currencyPosition,r=e.currencySymbol,a=e.onTempPriceChange,o=e.tempPrice;return wp.element.createElement(u.Fragment,null,n===Br.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},r),wp.element.createElement(Ee.a,{className:"tribe-editor__ticket__container-header-price-input",value:o,placeholder:Object(i.__)("0","event-tickets"),onChange:a,disabled:t,type:"number",min:"0"}),n===Br.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},r))});qr.propTypes={isDisabled:_.a.bool,currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string};var Jr=function(e){var t=e.currencyPosition,n=e.currencySymbol,r=e.price;return wp.element.createElement(u.Fragment,null,t===Br.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n),wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-value"},r),t===Br.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n))};Jr.propTypes={currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,price:_.a.string};var $r=function(e){var t=e.isDisabled,n=e.isSelected,r=e.currencyPosition,a=e.currencySymbol,i=e.onTempPriceChange,o=e.tempPrice,s=e.price;return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-price"},n?wp.element.createElement(qr,{currencyPosition:r,currencySymbol:a,onTempPriceChange:i,tempPrice:o,isDisabled:t}):wp.element.createElement(Jr,{currencyPosition:r,currencySymbol:a,price:s}))};$r.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string,price:_.a.string};var Zr=$r,Qr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),currencyPosition:Gn.f.getTicketCurrencyPosition(e,t),currencySymbol:Gn.f.getTicketCurrencySymbol(e,t),tempPrice:Gn.f.getTicketTempPrice(e,t),price:Gn.f.getTicketPrice(e,t)||"0"}}),(function(e,t){return{onTempPriceChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempPrice(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Zr),Xr=(n(526),function(e){var t=e.children,n=e.className,r=e.value,a=e.total;if(0===r||0===a)return null;var i=void 0;try{i=ot.number.percentage(r,a)}catch(e){i=0}var o={width:Math.max(0,Math.min(100,i)).toFixed(2)+"%"};return wp.element.createElement("span",{className:he()("tribe-editor__quantity-bar__bar",n),style:o},t)});Xr.propTypes={children:_.a.node,className:_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.string),ot.TribePropTypes.nullType]),value:_.a.number,total:_.a.number},Xr.defaultProps={className:null,value:0,total:0};var ea=Xr,ta=function(e){var t=e.sharedSold,n=e.sold,r=e.capacity,a=e.total,o=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__quantity-bar"},!o&&wp.element.createElement(u.Fragment,null,wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--shared-sold",value:t,total:a}),wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--sold",value:n,total:a}),!!r&&!(r===a)&&wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--capacity",value:r,total:a},wp.element.createElement("span",{className:"tribe-editor__quantity-bar__bar-label"},Object(i.__)("cap","event-tickets")))))};ta.propTypes={sharedSold:_.a.number,capacity:_.a.number,sold:_.a.number,total:_.a.number,isDisabled:_.a.bool},ta.defaultProps={sharedSold:0,capacity:0,sold:0,total:0,isDisabled:!1};var na=ta,ra=(n(527),function(e){var t=e.isDisabled,n=e.isSelected,r=e.isShared,a=e.isUnlimited,o=e.sold,s=e.capacity,c=e.sharedSold,u=e.sharedCapacity,d=r?u:s;return!n&&wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-quantity tribe-tooltip",title:Object(i.__)("This pertains to Orders that have been marked Completed.","event-tickets")},wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-label"},a?Object(i.sprintf)(Object(i.__)("%d sold","event-tickets"),o):Object(i.sprintf)(Object(i.__)("%d of %d sold","event-tickets"),o,d),wp.element.createElement("span",{class:"dashicons dashicons-info"})),a?wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-unlimited"},Object(i.__)("unlimited","event-tickets")):wp.element.createElement(na,{sold:o,sharedSold:c,capacity:s,total:d,isDisabled:t}))});ra.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,isShared:_.a.bool,isUnlimited:_.a.bool,sold:_.a.number,capacity:_.a.number,sharedSold:_.a.number,sharedCapacity:_.a.number},ra.defaultProps={sold:0,sharedCapacity:0,capacity:0};var aa=ra,ia=function(e,t){return t?Gn.f.getSharedTicketsSold(e):0},oa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.isSharedTicket(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),isShared:n,isUnlimited:Gn.f.isUnlimitedTicket(e,t),sold:Gn.f.getTicketSold(e,t),capacity:Gn.f.getTicketCapacityInt(e,t),sharedSold:ia(e,n),sharedCapacity:Gn.f.getTicketsSharedCapacityInt(e)}})))(aa),sa=(n(528),function(e){var t=e.clientId,n=e.isSelected;return wp.element.createElement(u.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-details"},wp.element.createElement(Wr,{clientId:t,isSelected:n}),wp.element.createElement(Gr,{clientId:t,isSelected:n})),wp.element.createElement(Qr,{clientId:t,isSelected:n}),wp.element.createElement(oa,{clientId:t,isSelected:n}))});sa.propTypes={clientId:_.a.string,isSelected:_.a.bool};var ca=sa,ua=n(87),da=n.n(ua),la=n(111),_a=n.n(la),ma=n(494),pa=(n(529),Gn.b.INDEPENDENT),fa=Gn.b.SHARED,Ta=Gn.b.TICKET_TYPES,ha=Gn.d.CAPACITY_TYPE_OPTIONS,ya=function(e){var t=e.className,n=e.id,r=e.label,a=rt()(e,["className","id","label"]);return wp.element.createElement(Re.LabeledItem,{className:he()("tribe-editor__labeled-number-input",t),forId:n,label:r,isLabel:!0},wp.element.createElement(Re.NumberInput,a))};ya.propTypes={className:_.a.string,id:_.a.string,label:_.a.string};var ba=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getInputs=function(){var e=n.props,t=e.isDisabled,r=e.sharedCapacity,a=e.tempCapacityType,o=e.tempCapacity,s=e.tempSharedCapacity,c=e.onTempCapacityChange,u=e.onTempSharedCapacityChange,d=[];if(a===Ta[fa]&&""===r&&d.push(wp.element.createElement(ya,{key:"shared-capacity",className:he()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--shared-capacity"),id:n.ids.sharedCapacity,label:Object(i.__)("Set shared capacity:","event-tickets"),value:s,onChange:u,disabled:t,min:0,required:!0})),_a()([Ta[fa],Ta[pa]],a)){var l={},_=a===Ta[fa]?fa:pa;if(a===Ta[fa]&&(r||s)){var m=r||s;l.max=parseInt(m,10)||0}a===Ta[pa]&&(l.required=!0),l.label=a===Ta[fa]?Object(i.__)("(optional) Limit sales of this ticket to:","event-tickets"):Object(i.__)("Number of tickets available","event-tickets"),d.push(wp.element.createElement(ya,tt()({key:"capacity",className:he()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--capacity","tribe-editor__ticket__capacity-input-row--capacity-"+_),id:n.ids.capacity,value:o,onChange:c,disabled:t,min:0},l)))}return d},n.getCapacityForm=function(){var e=n.props,t=e.isDisabled,r=e.tempCapacityTypeOption,a=e.onTempCapacityTypeChange;return wp.element.createElement(u.Fragment,null,wp.element.createElement(Re.Select,{id:n.ids.select,className:"tribe-editor__ticket__capacity-type-select",backspaceRemovesValue:!1,value:r,isSearchable:!1,isDisabled:t,options:ha,onChange:a}),n.getInputs())},n.getNoPlusCapacityForm=function(){var e=n.props,t=e.isDisabled,r=e.tempCapacity,a=e.onTempCapacityNoPlusChange;return wp.element.createElement(u.Fragment,null,wp.element.createElement(Re.NumberInput,{className:"tribe-editor__ticket__capacity-input",id:n.ids.capacity,value:r,onChange:a,disabled:t,min:0}),wp.element.createElement("span",{className:"tribe-editor__ticket__capacity-input-helper-text"},Object(i.__)("Leave blank for unlimited","event-tickets")))},n.ids={select:Je()("capacity-type-"),capacity:Je()("capacity-"),sharedCapacity:Je()("shared-capacity-")},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props.hasTicketsPlus;return wp.element.createElement("div",{className:he()("tribe-editor__ticket__capacity","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--capacity")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__capacity-label-with-tooltip",forId:e?this.ids.select:this.ids.capacity,isLabel:!0,label:Object(i.__)("Ticket Capacity","event-tickets"),tooltipText:Object(i.__)("Ticket capacity will only be used by attendees buying this ticket type","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement("div",{className:"tribe-editor__ticket__capacity-form"},e?this.getCapacityForm():this.getNoPlusCapacityForm()))}}]),t}(u.PureComponent);ba.propTypes={hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,sharedCapacity:_.a.string,tempCapacity:_.a.string,tempCapacityType:_.a.string,tempCapacityTypeOption:ma.ReactSelectOption,tempSharedCapacity:_.a.string,onTempCapacityChange:_.a.func,onTempCapacityNoPlusChange:_.a.func,onTempCapacityTypeChange:_.a.func,onTempSharedCapacityChange:_.a.func};var Ma=ba,Sa=Gn.b.UNLIMITED,Ea=Gn.b.INDEPENDENT,ga=Gn.b.TICKET_TYPES,va=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isDisabled:Gn.f.isTicketDisabled(e,t),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),tempCapacity:Gn.f.getTicketTempCapacity(e,t),tempCapacityType:Gn.f.getTicketTempCapacityType(e,t),tempCapacityTypeOption:Gn.f.getTicketTempCapacityTypeOption(e,t),tempSharedCapacity:Gn.f.getTicketsTempSharedCapacity(e)}}),(function(e,t){var n=t.clientId;return{onTempCapacityChange:function(t){e(Gn.a.setTicketTempCapacity(n,t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityNoPlusChange:function(t){var r=t.target.value,a=""===da()(r)?ga[Sa]:ga[Ea];e(Gn.a.setTicketTempCapacityType(n,a)),e(Gn.a.setTicketTempCapacity(n,r)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityTypeChange:function(t){e(Gn.a.setTicketTempCapacityType(n,t.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempSharedCapacityChange:function(t){e(Gn.a.setTicketsTempSharedCapacity(t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))}}})))(Ma),ka=(n(530),function(e){var t=e.hasDurationError,n=rt()(e,["hasDurationError"]);return wp.element.createElement("div",{className:he()("tribe-editor__ticket__duration","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--duration")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__duration-label-with-tooltip",label:Object(i.__)("Sale Duration","event-tickets"),tooltipText:Object(i.__)("If you do not set a start sale date, tickets will be available immediately.","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(be.DateTimeRangePicker,tt()({className:"tribe-editor__ticket__duration-picker"},n)),t&&wp.element.createElement("span",{className:"tribe-editor__ticket__duration-error"},Object(i.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))});ka.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,hasDurationError:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Da=ka,La=function(e,t){return function(n,r,a){e(Gn.a.handleTicketStartDate(t.clientId,n,a))}},Oa=function(e,t){return function(n){e(Gn.a.setTicketTempStartTimeInput(t.clientId,n.target.value))}},Ya=function(e,t){return function(n,r){e(Gn.a.handleTicketStartTime(t.clientId,n)),r()}},wa=function(e,t){return function(n,r,a){e(Gn.a.handleTicketEndDate(t.clientId,n,a))}},ja=function(e,t){return function(n){e(Gn.a.setTicketTempEndTimeInput(t.clientId,n.target.value))}},Ia=function(e,t){return function(n,r){e(Gn.a.handleTicketEndTime(t.clientId,n)),r()}},Pa=function(e,t,n){return function(r){var a=ot.moment.toMoment(r.target.value,ot.moment.TIME_FORMAT,!1);if(!a.isValid()){var i=Gn.f.getTicketStartTimeInput(e,n);a=ot.moment.toMoment(i,ot.moment.TIME_FORMAT,!1)}var o=ot.moment.totalSeconds(a);t(Gn.a.handleTicketStartTime(n.clientId,o))}},Ca=function(e,t,n){return function(r){var a=ot.moment.toMoment(r.target.value,ot.moment.TIME_FORMAT,!1);if(!a.isValid()){var i=Gn.f.getTicketEndTimeInput(e,n);a=ot.moment.toMoment(i,ot.moment.TIME_FORMAT,!1)}var o=ot.moment.totalSeconds(a);t(Gn.a.handleTicketEndTime(n.clientId,o))}},xa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=ot.globals.tecDateSettings().datepickerFormat?ot.moment.toFormat(ot.globals.tecDateSettings().datepickerFormat):"LL",r=Gn.f.isTicketDisabled(e,t),a=Gn.f.getTicketTempStartDateMoment(e,t),i=Gn.f.getTicketTempEndDateMoment(e,t),o=a&&a.toDate(),s=i&&i.toDate();return{fromDate:o,fromDateInput:Gn.f.getTicketTempStartDateInput(e,t),fromDateDisabled:r,fromDateFormat:n,fromTime:Gn.f.getTicketTempStartTimeInput(e,t),fromTimeDisabled:r,hasDurationError:Gn.f.getTicketHasDurationError(e,t),toDate:s,toDateInput:Gn.f.getTicketTempEndDateInput(e,t),toDateDisabled:r,toDateFormat:n,toTime:Gn.f.getTicketTempEndTimeInput(e,t),toTimeDisabled:r,state:e}}),(function(e,t){return{onFromDateChange:La(e,t),onFromTimePickerChange:Oa(e,t),onFromTimePickerClick:Ya(e,t),onToDateChange:wa(e,t),onToTimePickerChange:ja(e,t),onToTimePickerClick:Ia(e,t),dispatch:e}}),(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch,o=rt()(t,["dispatch"]);return tt()({},n,a,o,{onFromTimePickerBlur:Pa(r,i,n),onToTimePickerBlur:Ca(r,i,n)})})))(Da),Ra=(n(531),function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.id=Je()("ticket-sku"),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.sku,n=e.isDisabled,r=e.onChange;return wp.element.createElement("div",{className:he()("tribe-editor__ticket__sku","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--sku")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__sku-label-with-tooltip",forId:this.id,isLabel:!0,label:Object(i.__)("Ticket SKU","event-tickets"),tooltipText:Object(i.__)("A unique identifying code for each ticket type you're selling","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(Re.Input,{className:"tribe-editor__ticket__sku-input",id:this.id,type:"text",value:t,onChange:r,disabled:n}))}}]),t}(u.PureComponent));Ra.propTypes={isDisabled:_.a.bool,onChange:_.a.func.isRequired,sku:_.a.string};var Aa=Ra,Ha=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),sku:Gn.f.getTicketTempSku(e,t)}}),(function(e,t){return{onChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempSku(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Aa),Na=n(263),Va=n.n(Na),Fa=(n(532),Gn.b.EDD),Ka=Gn.b.WOO,Wa=Gn.b.PROVIDER_TYPES,Ua=["edit-ticket","report"],za=function(e){var t=e.editTicketLink,n=e.isDisabled,r=e.provider,a=e.reportLink,o=e.showEcommerceOptions,s=function(e){var o=he()("tribe-editor__ticket__ecommerce-options-link","tribe-editor__ticket__ecommerce-options-link--"+e),s="report"===e?a:t,c="report"===e?Object(i.__)("View Sales Report","event-tickets"):function(e){var t="";return e===Fa?t=Object(i.__)("Edit Ticket in Easy Digital Downloads","event-tickets"):e===Ka&&(t=Object(i.__)("Edit Ticket in WooCommerce","event-tickets")),t}(r);return n?wp.element.createElement("span",{className:o},c):wp.element.createElement(Re.Link,{className:o,href:s,target:"_blank"},c)};return o&&wp.element.createElement(Re.LabeledItem,{className:he()("tribe-editor__ticket__ecommerce-options","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--ecommerce-options"),label:Object(i.__)("Ecommerce","event-tickets")},wp.element.createElement("div",{className:"tribe-editor__ticket__ecommerce-options-links"},Ua.map((function(e){return wp.element.createElement("span",{key:e,className:"tribe-editor__ticket__ecommerce-options-link-wrapper"},s(e))}))))};za.propTypes={editTicketLink:_.a.string,isDisabled:_.a.bool,provider:_.a.oneOf([].concat(Va()(Wa),[""])),reportLink:_.a.string,showEcommerceOptions:_.a.bool};var Ga=za,Ba=Gn.b.EDD,qa=Gn.b.WOO,Ja=function(e){return _a()([Ba,qa],e)},$a=function(e,t,n){var r="";Ja(n)&&(r=ot.globals.adminUrl()+"post.php?post="+Gn.f.getTicketId(e,t)+"&action=edit");return r},Za=function(e,t,n){var r="";if(Ja(n)){var a=ot.globals.adminUrl(),i=Gn.f.getTicketId(e,t),o="";n===Ba?o="edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download="+i:n===qa&&(o="admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids="+i),r=""+a+o}return r},Qa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketProvider(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),provider:n,editTicketLink:$a(e,t,n),reportLink:Za(e,t,n),showEcommerceOptions:Ja(n)}})))(Ga),Xa=(n(533),function(e){var t=e.moveTicket,n=e.removeTicket,r=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--move-delete"},wp.element.createElement(Re.Button,{type:"button",onClick:t,disabled:r},Object(i.__)("Move Ticket","event-tickets")),wp.element.createElement(Re.Button,{type:"button",onClick:n,disabled:r},Object(i.__)("Remove Ticket","event-tickets")))});Xa.propTypes={moveTicket:_.a.func.isRequired,removeTicket:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var ei=Xa,ti=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),ticketId:Gn.f.getTicketId(e,t)}}),(function(e,t){return{removeTicket:function(){e(Gn.a.deleteTicket(t.clientId))},moveTicket:function(n){return e(Object(Mt.c)(n,t.clientId))}}}),(function(e,t,n){return tt()({},e,t,n,{moveTicket:function(){return t.moveTicket(e.ticketId)}})})))(ei),ni=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getHeader=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__advanced-options-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__advanced-options-header-text"},Object(i.__)("Advanced Options","event-tickets")))},n.getContent=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(Ha,{clientId:n.props.clientId}),wp.element.createElement(Qa,{clientId:n.props.clientId}),n.props.hasBeenCreated&&wp.element.createElement(ti,{clientId:n.props.clientId}))},n.getRows=function(){return[{accordionId:n.accordionId,content:n.getContent(),contentClassName:"tribe-editor__ticket__advanced-options-content",header:n.getHeader(),headerAttrs:{disabled:n.props.isDisabled},headerClassName:"tribe-editor__ticket__advanced-options-header"}]},n.accordionId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){return wp.element.createElement(Re.Accordion,{className:"tribe-editor__ticket__advanced-options",rows:this.getRows()})}}]),t}(u.Component);ni.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool};var ri=ni,ai=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)}})))(ri),ii=(n(534),function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.id=Je()("ticket-iac"),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.iac,n=e.iacOptions,r=e.isDisabled,a=e.onChange;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--iac-setting-description"},Object(i.__)("Select the default way to sell tickets. Enabling Individual Attendee Collection will allow purchasers to enter a name and email for each ticket.","event-tickets")),wp.element.createElement("div",{className:he()("tribe-editor__ticket__iac-setting","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--iac-setting")},wp.element.createElement(ye.RadioControl,{className:"tribe-editor__ticket__iac-setting-input",id:this.id,type:"text",selected:t,onChange:a,disabled:r,options:n})))}}]),t}(u.PureComponent));ii.propTypes={isDisabled:_.a.bool,onChange:_.a.func.isRequired,iac:_.a.string,iacOptions:_.a.arrayOf(_.a.shape({label:_.a.string,value:_.a.string}))};var oi=ii,si=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),iac:Gn.f.getTicketTempIACSetting(e,t),iacOptions:ot.globals.iacVars().iacOptions}}),(function(e,t){return{onChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempIACSetting(r,n)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(oi),ci=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getHeader=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__attendee-collection-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__attendee-collection-header-text"},Object(i.__)("Attendee Collection","event-tickets")))},n.getContent=function(){return wp.element.createElement(si,{clientId:n.props.clientId})},n.getRows=function(){return[{accordionId:n.accordionId,content:n.getContent(),contentClassName:"tribe-editor__ticket__attendee-collection-content",header:n.getHeader(),headerAttrs:{disabled:n.props.isDisabled},headerClassName:"tribe-editor__ticket__attendee-collection-header"}]},n.accordionId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){return wp.element.createElement(Re.Accordion,{className:"tribe-editor__ticket__attendee-collection",rows:this.getRows()})}}]),t}(u.PureComponent);ci.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool};var ui=ci,di=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)}})))(ui),li=(n(535),Object(i.__)("+ Add","event-tickets")),_i=Object(i.__)("Edit","event-tickets"),mi=function(e){var t=e.attendeeRegistrationURL,n=e.hasAttendeeInfoFields,r=e.isCreated,a=e.isDisabled,o=e.isModalOpen,s=e.onClick,c=e.onClose,u=e.onIframeLoad,d=n?_i:li;return wp.element.createElement(be.AttendeesRegistration,{helperText:Object(i.__)("Save your ticket to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:a,isModalOpen:o,label:Object(i.__)("Attendee Information","event-tickets"),linkText:d,modalTitle:Object(i.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:u,showHelperText:!r,shouldCloseOnClickOutside:!1})};mi.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var pi=mi,fi=function(e,t){return ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=attendee-registration&ticket_id="+Gn.f.getTicketId(e,t)+"&tribe_events_modal=1"},Ti=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketHasBeenCreated(e,t);return{attendeeRegistrationURL:fi(e,t),hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isCreated:n,isDisabled:Gn.f.isTicketDisabled(e,t)||!n,isModalOpen:Gn.f.getTicketIsModalOpen(e,t)}}),(function(e,t){return{onClick:function(){e(Gn.a.setTicketIsModalOpen(t.clientId,!0))},onClose:function(n){n.target.classList.contains("components-modal__content")||e(Gn.a.setTicketIsModalOpen(t.clientId,!1)),"click"===n.type&&n.target.classList.contains("components-modal__screen-overlay")&&e(Gn.a.setTicketIsModalOpen(t.clientId,!1))},onIframeLoad:function(n){var r=n.contentWindow,a=function(){n.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},i=r.document.querySelector("#event-tickets-attendee-information");i.addEventListener("submit",a);var o=function(){r.removeEventListener("unload",s),i.removeEventListener("submit",a)},s=function(){o();var n=r.document.querySelector("#tribe-tickets-attendee-sortables"),a=Boolean(n.firstElementChild);e(Gn.a.setTicketHasAttendeeInfoFields(t.clientId,a)),e(Gn.a.setTicketIsModalOpen(t.clientId,!1))};r.addEventListener("unload",s);var c=r.document.querySelector(".tribe-intro > a");c&&c.setAttribute("target","_blank")}}})))(pi),hi=(n(536),function(e){var t=e.clientId,n=e.hasTicketsPlus,r=e.hasIacVars;return wp.element.createElement(u.Fragment,null,wp.element.createElement(va,{clientId:t}),wp.element.createElement(xa,{clientId:t}),wp.element.createElement(ai,{clientId:t}),n&&r&&wp.element.createElement(di,{clientId:t}),n&&wp.element.createElement(Ti,{clientId:t}))});hi.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool};var yi=hi,bi=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),hasIacVars:!Pn()(ot.globals.iacVars())}})))(yi),Mi=function(e){return e.isDisabled?wp.element.createElement(o.ClockInactive,null):wp.element.createElement(o.ClockActive,null)},Si=function(e){return e.isDisabled?wp.element.createElement(o.TicketInactive,null):wp.element.createElement(o.TicketActive,null)},Ei=function(e){var t=e.isDisabled,n=e.isFuture,r=e.isPast;return n||r?wp.element.createElement(Mi,{isDisabled:t}):wp.element.createElement(Si,{isDisabled:t})};Ei.propTypes={isDisabled:_.a.bool.isRequired,isFuture:_.a.bool,isPast:_.a.bool};var gi=function(e){var t=e.clientId,n=e.isDisabled,r=e.isFuture,a=e.isPast,i=e.isSelected;return wp.element.createElement(be.ContainerPanel,{className:"tribe-editor__ticket__container",layout:Me.a.ticket,icon:wp.element.createElement(Ei,{isDisabled:n,isFuture:r,isPast:a}),header:wp.element.createElement(ca,{clientId:t,isSelected:i}),content:wp.element.createElement(bi,{clientId:t})})};gi.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,isFuture:_.a.bool,isPast:_.a.bool,isSelected:_.a.bool};var vi=gi,ki=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),isFuture:Gn.f.isTicketFuture(e,t),isPast:Gn.f.isTicketPast(e,t)}})))(vi),Di=(n(537),function(e){return e?Object(i.__)("Update Ticket","event-tickets"):Object(i.__)("Create Ticket","event-tickets")}),Li=Object(i.__)("Cancel","event-tickets"),Oi=function(e){var t=e.hasBeenCreated,n=e.isCancelDisabled,r=e.isConfirmDisabled,a=e.onCancelClick,i=e.onConfirmClick;return wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__ticket__dashboard",cancelLabel:Li,confirmLabel:Di(t),isCancelDisabled:n,isConfirmDisabled:r,onCancelClick:a,onConfirmClick:i})};Oi.propTypes={hasBeenCreated:_.a.bool,isCancelDisabled:_.a.bool,isConfirmDisabled:_.a.bool,onCancelClick:_.a.func,onConfirmClick:_.a.func};var Yi=Oi,wi=function(e,t){return!Gn.f.isTicketValid(e,t)||!Gn.f.getTicketHasChanges(e,t)||Gn.f.isTicketDisabled(e,t)||Gn.f.getTicketHasDurationError(e,t)},ji=function(e,t,n){return function(){Gn.f.getTicketHasBeenCreated(e,n)?(t(Gn.a.setTicketTempDetails(n.clientId,{title:Gn.f.getTicketTitle(e,n),description:Gn.f.getTicketDescription(e,n),price:Gn.f.getTicketPrice(e,n),sku:Gn.f.getTicketSku(e,n),iac:Gn.f.getTicketIACSetting(e,n),startDate:Gn.f.getTicketStartDate(e,n),startDateInput:Gn.f.getTicketStartDateInput(e,n),startDateMoment:Gn.f.getTicketStartDateMoment(e,n),endDate:Gn.f.getTicketEndDate(e,n),endDateInput:Gn.f.getTicketEndDateInput(e,n),endDateMoment:Gn.f.getTicketEndDateMoment(e,n),startTime:Gn.f.getTicketStartTime(e,n),endTime:Gn.f.getTicketEndTime(e,n),startTimeInput:Gn.f.getTicketStartTimeInput(e,n),endTimeInput:Gn.f.getTicketEndTimeInput(e,n),capacityType:Gn.f.getTicketCapacityType(e,n),capacity:Gn.f.getTicketCapacity(e,n)})),t(Gn.a.setTicketsTempSharedCapacity(Gn.f.getTicketsSharedCapacity(e))),t(Gn.a.setTicketHasChanges(n.clientId,!1))):(t(Gn.a.removeTicketBlock(n.clientId)),Object(se.dispatch)("core/editor").removeBlocks(n.clientId)),Object(se.dispatch)("core/editor").clearSelectedBlock()}},Ii=function(e,t,n){return function(){return Gn.f.getTicketHasBeenCreated(e,n)?t(Gn.a.updateTicket(n.clientId)):t(Gn.a.createNewTicket(n.clientId))}},Pi=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isCancelDisabled:Gn.f.isTicketDisabled(e,t),isConfirmDisabled:wi(e,t),state:e}}),null,(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch;return tt()({},n,a,{onCancelClick:ji(r,i,n),onConfirmClick:Ii(r,i,n)})})))(Yi),Ci=function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.onBlockUpdate(this.props.isSelected)}},{key:"componentDidUpdate",value:function(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.hasTicketsPlus,r=e.isDisabled,a=e.isLoading,i=e.isSelected,o=e.isModalShowing;return e.showTicket?wp.element.createElement(u.Fragment,null,wp.element.createElement("article",{className:he()("tribe-editor__ticket",{"tribe-editor__ticket--disabled":r},{"tribe-editor__ticket--selected":i},{"tribe-editor__ticket--has-tickets-plus":n})},wp.element.createElement(ki,{clientId:t,isSelected:i}),wp.element.createElement(Pi,{clientId:t,isSelected:i}),a&&wp.element.createElement(ye.Spinner,null)),o&&wp.element.createElement(gn,null)):null}}]),t}(u.PureComponent);Ci.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,isLoading:_.a.bool,isModalShowing:_.a.bool,isSelected:_.a.bool,onBlockUpdate:_.a.func,removeTicketBlock:_.a.func,showTicket:_.a.bool};var xi=Ci,Ri=function(e,t){return Gn.f.getTicketsIsSelected(e)||Gn.f.hasATicketSelected(e)||Gn.f.isTicketOnSale(e,t)},Ai=Object(P.c)(Object(Ve.withStore)({isolated:!0}),ae((function(e,t){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),isLoading:Gn.f.getTicketIsLoading(e,t),isModalShowing:Object(bn.l)(e),modalTicketId:Object(bn.e)(e),showTicket:Ri(e,t),ticketId:Gn.f.getTicketId(e,t)}}),(function(e,t){var n=t.clientId;return{onBlockUpdate:function(t){return e(Gn.a.setTicketIsSelected(n,t))},setInitialState:function(t){e(Gn.a.registerTicketBlock(n)),e(Gn.a.setTicketInitialState(t))}}}),(function(e,t,n){return tt()({},e,t,n,{isModalShowing:e.isModalShowing&&e.modalTicketId===e.ticketId})})),An())(xi),Hi={id:"tickets-item",title:Object(i.__)("Event Ticket","event-tickets"),description:Object(i.__)("A single configured ticket type.","event-tickets"),icon:wp.element.createElement(o.Tickets,null),category:"tribe-tickets",keywords:["event","event-tickets","tribe"],parent:["tribe/tickets"],supports:{html:!1,customClassName:!1},attributes:{hasBeenCreated:{type:"boolean",default:!1},ticketId:{type:"integer",default:0}},edit:Ai,save:function(){return wp.element.createElement("div",null,wp.element.createElement(Wn.InnerBlocks.Content,null))}},Ni=n(55),Vi=n(109),Fi=(n(538),Object(i.__)("Who's Attending?","event-tickets")),Ki=Object(i.__)("(X) people are attending this event","event-tickets"),Wi=function(){return wp.element.createElement("div",{className:"tribe-editor__event-attendees__gravatars"},wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null))},Ui=function(){return wp.element.createElement("div",{className:"tribe-editor__event-attendees__subtitle"},wp.element.createElement("p",null,Ki))},zi=function(e){var t=e.isSelected,n=e.title,r=e.displayTitle,a=e.displaySubtitle,i=t||n?function(e){var t=e.isSelected,n=e.isEmpty,r=e.title,a=e.setTitle,i=he()({"tribe-editor__event-attendees__title":!0,"tribe-editor__event-attendees__title--selected":t}),o=he()({"tribe-editor__event-attendees__title-text":!0,"tribe-editor__event-attendees__title-text--empty":n&&t});return wp.element.createElement("div",{key:"tribe-events-attendees-label",className:i},wp.element.createElement(Ee.a,{id:"tribe-events-attendees-link",className:o,value:r,placeholder:Fi,onChange:a}))}(e):wp.element.createElement("span",{className:he()(["tribe-editor__event-attendees__title","tribe-editor__event-attendees__title--placeholder"])},Fi);return wp.element.createElement("div",{className:"tribe-editor__block tribe-editor__event-attendees"},r?i:"",a?wp.element.createElement(Ui,null):"",wp.element.createElement(Wi,null))},Gi=function(e){var t=e.isSelected,n=e.displayTitle,r=e.displaySubtitle,a=e.onSetDisplayTitleChange,o=e.onSetDisplaySubtitleChange;return t&&wp.element.createElement(Wn.InspectorControls,{key:"inspector"},wp.element.createElement(ye.PanelBody,{title:Object(i.__)("Attendees Settings","event-tickets")},wp.element.createElement(ye.ToggleControl,{label:Object(i.__)("Display Title","event-tickets"),checked:n,onChange:a}),wp.element.createElement(ye.ToggleControl,{label:Object(i.__)("Display Subtitle","event-tickets"),checked:r,onChange:o})))},Bi=function(e){return wp.element.createElement(u.Fragment,null,wp.element.createElement(zi,e),wp.element.createElement(Gi,e))};Bi.propTypes={setTitle:_.a.func,title:_.a.string,isSelected:_.a.bool,isEmpty:_.a.bool,displayTitle:_.a.bool,displaySubtitle:_.a.bool,onSetDisplaySubtitleChange:_.a.func,onSetDisplayTitleChange:_.a.func};var qi=Bi,Ji=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{title:Vi.c(e),displayTitle:Vi.b(e),displaySubtitle:Vi.a(e)}}),(function(e){return{setInitialState:function(t){return e(Ni.c(t))},setTitle:function(t){return e(Ni.d(t.target.value))},onSetDisplayTitleChange:function(t){return e(Ni.b(t))},onSetDisplaySubtitleChange:function(t){return e(Ni.a(t))}}})),An())(qi),$i=[Kn,Vr,Hi,{id:"attendees",title:Object(i.__)("Attendee List","event-tickets"),description:Object(i.__)("Show the gravatars of people coming to this event.","event-tickets"),icon:wp.element.createElement(o.Attendees,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,customClassName:!1},attributes:{title:{type:"html",default:Object(i.__)("Who's Attending?","event-tickets")},displayTitle:{type:"boolean",default:!0},displaySubtitle:{type:"boolean",default:!0}},edit:Ji,save:function(){return null}}];$i.forEach((function(e){return Object(r.registerBlockType)("tribe/"+e.id,e)})),Object(a.initStore)();t.default=$i}]);
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
+ */var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,_=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,f=r?Symbol.for("react.suspense_list"):60120,T=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,M=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case l:case _:case o:case c:case s:case p:return e;default:switch(e=e&&e.$$typeof){case d:case m:case h:case T:case u:return e;default:return t}}case i:return t}}}function g(e){return E(e)===_}t.AsyncMode=l,t.ConcurrentMode=_,t.ContextConsumer=d,t.ContextProvider=u,t.Element=a,t.ForwardRef=m,t.Fragment=o,t.Lazy=h,t.Memo=T,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return g(e)||E(e)===l},t.isConcurrentMode=g,t.isContextConsumer=function(e){return E(e)===d},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return E(e)===m},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===T},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===c},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===_||e===c||e===s||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===T||e.$$typeof===u||e.$$typeof===d||e.$$typeof===m||e.$$typeof===b||e.$$typeof===M||e.$$typeof===S||e.$$typeof===y)},t.typeOf=E},function(e,t,n){},function(e,t,n){},function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var c,u=[],d=!1,l=-1;function _(){d&&c&&(d=!1,c.length?u=c.concat(u):l=-1,u.length&&m())}function m(){if(!d){var e=s(_);d=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,d=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||d||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.prependListener=f,a.prependOnceListener=f,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=Object.keys;e.exports=function(e,t){var n,a,i,o,s;if(e===t)return!0;if(n=r(e),a=r(t),n.length!==a.length)return!1;for(i=0;i<n.length;){if(void 0===(s=e[o=n[i]])&&!t.hasOwnProperty(o)||s!==t[o])return!1;i++}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n;if(e===t)return!0;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(110),a=n(325),i=n(15),o=n(34);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}var u=n(11),d=n.n(u),l=n(1),_=n.n(l),m=_.a.shape({trySubscribe:_.a.func.isRequired,tryUnsubscribe:_.a.func.isRequired,notifyNestedSubs:_.a.func.isRequired,isSubscribed:_.a.func.isRequired}),p=_.a.shape({subscribe:_.a.func.isRequired,dispatch:_.a.func.isRequired,getState:_.a.func.isRequired});d.a.forwardRef;!function(e){var t;void 0===e&&(e="store");var n=e+"Subscription",r=function(t){c(a,t);var r=a.prototype;function a(n,r){var a;return(a=t.call(this,n,r)||this)[e]=n.store,a}return r.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.render=function(){return u.Children.only(this.props.children)},a}(u.Component);r.propTypes={store:p.isRequired,children:_.a.element.isRequired},r.childContextTypes=((t={})[e]=p.isRequired,t[n]=m,t)}();function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(){return(T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var y=n(493),b=n.n(y),M=n(327),S=n.n(M),E=n(491),g={notify:function(){}};var v=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=g}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,r=0;r<n.length;r++)n[r]()},get:function(){return t},subscribe:function(n){var r=!0;return t===e&&(t=e.slice()),t.push(n),function(){r&&null!==e&&(r=!1,t===e&&(t=e.slice()),t.splice(t.indexOf(n),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=g)},e}(),k=void 0!==d.a.forwardRef,D=0,L={};function O(){}function Y(e,t){var n,r;void 0===t&&(t={});var a=t,i=a.getDisplayName,o=void 0===i?function(e){return"ConnectAdvanced("+e+")"}:i,s=a.methodName,d=void 0===s?"connectAdvanced":s,l=a.renderCountProp,_=void 0===l?void 0:l,y=a.shouldHandleStateChanges,M=void 0===y||y,g=a.storeKey,Y=void 0===g?"store":g,w=a.withRef,j=void 0!==w&&w,I=h(a,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=Y+"Subscription",C=D++,x=((n={})[Y]=p,n[P]=m,n),R=((r={})[P]=m,r);return function(t){S()(Object(E.isValidElementType)(t),"You must pass a component to the function returned by "+d+". Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",r=o(n),a=T({},I,{getDisplayName:o,methodName:d,renderCountProp:_,shouldHandleStateChanges:M,storeKey:Y,withRef:j,displayName:r,wrappedComponentName:n,WrappedComponent:t}),i=function(n){function i(e,t){var a;return(a=n.call(this,e,t)||this).version=C,a.state={},a.renderCount=0,a.store=e[Y]||t[Y],a.propsMode=Boolean(e[Y]),a.setWrappedInstance=a.setWrappedInstance.bind(f(f(a))),S()(a.store,'Could not find "'+Y+'" in either the context or props of "'+r+'". Either wrap the root component in a <Provider>, or explicitly pass "'+Y+'" as a prop to "'+r+'".'),a.initSelector(),a.initSubscription(),a}c(i,n);var o=i.prototype;return o.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[P]=t||this.context[P],e},o.componentDidMount=function(){M&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},o.componentWillReceiveProps=function(e){this.selector.run(e)},o.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},o.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=O,this.store=null,this.selector.run=O,this.selector.shouldComponentUpdate=!1},o.getWrappedInstance=function(){return S()(j,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+d+"() call."),this.wrappedInstance},o.setWrappedInstance=function(e){this.wrappedInstance=e},o.initSelector=function(){var t=e(this.store.dispatch,a);this.selector=function(e,t){var n={run:function(r){try{var a=e(t.getState(),r);(a!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=a,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},o.initSubscription=function(){if(M){var e=(this.propsMode?this.props:this.context)[P];this.subscription=new v(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},o.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(L)):this.notifyNestedSubs()},o.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},o.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},o.addExtraProps=function(e){if(!(j||_||this.propsMode&&this.subscription))return e;var t=T({},e);return j&&(t.ref=this.setWrappedInstance),_&&(t[_]=this.renderCount++),this.propsMode&&this.subscription&&(t[P]=this.subscription),t},o.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(u.createElement)(t,this.addExtraProps(e.props))},i}(u.Component);return k&&(i.prototype.UNSAFE_componentWillReceiveProps=i.prototype.componentWillReceiveProps,delete i.prototype.componentWillReceiveProps),i.WrappedComponent=t,i.displayName=r,i.childContextTypes=R,i.contextTypes=x,i.propTypes=x,b()(i,t)}}var w=Object.prototype.hasOwnProperty;function j(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(j(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!w.call(t,n[a])||!j(e[n[a]],t[n[a]]))return!1;return!0}var P=n(16);function C(e){return function(t,n){var r=e(t,n);function a(){return r}return a.dependsOnOwnProps=!1,a}}function x(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function R(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=x(e);var a=r(t,n);return"function"==typeof a&&(r.mapToProps=a,r.dependsOnOwnProps=x(a),a=r(t,n)),a},r}}var A=[function(e){return"function"==typeof e?R(e):void 0},function(e){return e?void 0:C((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?C((function(t){return Object(P.a)(e,t)})):void 0}];var H=[function(e){return"function"==typeof e?R(e):void 0},function(e){return e?void 0:C((function(){return{}}))}];function N(e,t,n){return T({},n,e,t)}var V=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,a=n.pure,i=n.areMergedPropsEqual,o=!1;return function(t,n,s){var c=e(t,n,s);return o?a&&i(c,r)||(r=c):(o=!0,r=c),r}}}(e):void 0},function(e){return e?void 0:function(){return N}}];function F(e,t,n,r){return function(a,i){return n(e(a,i),t(r,i),i)}}function K(e,t,n,r,a){var i,o,s,c,u,d=a.areStatesEqual,l=a.areOwnPropsEqual,_=a.areStatePropsEqual,m=!1;function p(a,m){var p,f,T=!l(m,o),h=!d(a,i);return i=a,o=m,T&&h?(s=e(i,o),t.dependsOnOwnProps&&(c=t(r,o)),u=n(s,c,o)):T?(e.dependsOnOwnProps&&(s=e(i,o)),t.dependsOnOwnProps&&(c=t(r,o)),u=n(s,c,o)):h?(p=e(i,o),f=!_(p,s),s=p,f&&(u=n(s,c,o)),u):u}return function(a,d){return m?p(a,d):(s=e(i=a,o=d),c=t(r,o),u=n(s,c,o),m=!0,u)}}function W(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,i=h(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,i),s=r(e,i),c=a(e,i);return(i.pure?K:F)(o,s,c,e,i)}function U(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function z(e,t){return e===t}var G,B,q,J,$,Z,Q,X,ee,te,ne,re,ae=(q=(B=void 0===G?{}:G).connectHOC,J=void 0===q?Y:q,$=B.mapStateToPropsFactories,Z=void 0===$?H:$,Q=B.mapDispatchToPropsFactories,X=void 0===Q?A:Q,ee=B.mergePropsFactories,te=void 0===ee?V:ee,ne=B.selectorFactory,re=void 0===ne?W:ne,function(e,t,n,r){void 0===r&&(r={});var a=r,i=a.pure,o=void 0===i||i,s=a.areStatesEqual,c=void 0===s?z:s,u=a.areOwnPropsEqual,d=void 0===u?I:u,l=a.areStatePropsEqual,_=void 0===l?I:l,m=a.areMergedPropsEqual,p=void 0===m?I:m,f=h(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=U(e,Z,"mapStateToProps"),b=U(t,X,"mapDispatchToProps"),M=U(n,te,"mergeProps");return J(re,T({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:M,pure:o,areStatesEqual:c,areOwnPropsEqual:d,areStatePropsEqual:_,areMergedPropsEqual:p},f))}),ie=n(5),oe=n.n(ie),se=n(18),ce=n(31),ue=n.n(ce),de=n(32),le=n.n(de),_e=n(30),me=n.n(_e),pe=n(33),fe=n.n(pe),Te=n(21),he=n.n(Te),ye=n(26),be=n(24),Me=n(108),Se=n(238),Ee=n.n(Se);function ge(){return(ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ve=u.useLayoutEffect,ke=function(e){var t=Object(u.useRef)(e);return ve((function(){t.current=e})),t},De=function(e,t){"function"!=typeof e?e.current=t:e(t)},Le=function(e,t){var n=Object(u.useRef)();return Object(u.useCallback)((function(r){e.current=r,n.current&&De(n.current,null),n.current=t,t&&De(t,r)}),[t])},Oe={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ye=function(e){Object.keys(Oe).forEach((function(t){e.style.setProperty(t,Oe[t],"important")}))},we=null;var je=function(){},Ie=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],Pe=!!document.documentElement.currentStyle,Ce=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,i=e.onChange,o=void 0===i?je:i,s=e.onHeightChange,c=void 0===s?je:s,d=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);var l,_=void 0!==d.value,m=Object(u.useRef)(null),p=Le(m,t),f=Object(u.useRef)(0),T=Object(u.useRef)(),h=function(){var e=m.current,t=n&&T.current?T.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,Ie.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(Pe&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){T.current=t;var i=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),we||((we=document.createElement("textarea")).setAttribute("tab-index","-1"),we.setAttribute("aria-hidden","true"),Ye(we)),null===we.parentNode&&document.body.appendChild(we);var a=e.paddingSize,i=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach((function(e){var t=e;we.style[t]=o[t]})),Ye(we),we.value=t;var c=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize}(we,e);we.value="x";var u=we.scrollHeight-a,d=u*n;"border-box"===s&&(d=d+a+i),c=Math.max(d,c);var l=u*r;return"border-box"===s&&(l=l+a+i),[c=Math.min(l,c),u]}(t,e.value||e.placeholder||"x",a,r),o=i[0],s=i[1];f.current!==o&&(f.current=o,e.style.setProperty("height",o+"px","important"),c(o,{rowHeight:s}))}};return Object(u.useLayoutEffect)(h),l=ke(h),Object(u.useLayoutEffect)((function(){var e=function(e){l.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Object(u.createElement)("textarea",ge({},d,{onChange:function(e){_||h(),o(e)},ref:p}))},xe=Object(u.forwardRef)(Ce),Re=n(22),Ae=(n(496),function(e){var t=e.goingCount,n=e.notGoingCount,r=e.showNotGoing;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__counters"},wp.element.createElement(Re.Counter,{className:"tribe-editor__rsvp-container-header__going-counter",count:t,label:Object(i.__)("Going","event-tickets")}),r&&wp.element.createElement(Re.Counter,{className:"tribe-editor__rsvp-container-header__not-going-counter",count:n,label:Object(i.__)("Not going","event-tickets")}))});Ae.propTypes={goingCount:_.a.number,notGoingCount:_.a.number,showNotGoing:_.a.bool};var He=Ae,Ne=n(13),Ve=n(20),Fe=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{goingCount:Ne.d.getRSVPGoingCount(e),notGoingCount:Ne.d.getRSVPNotGoingCount(e),showNotGoing:Ne.d.getRSVPNotGoingResponses(e)}})))(He),Ke=n(63),We=(n(497),wp.element.createElement(Re.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ke.Clipboard,null),text:Object(i.__)("This ticket has Attendee Information Fields configured.","event-tickets")})),Ue=function(e){var t,n,r,a,o=e.description,s=e.hasAttendeeInfoFields,c=e.isCreated,d=e.isDisabled,l=e.isSelected,_=e.onTempDescriptionChange,m=e.onTempTitleChange,p=e.tempDescription,f=e.tempTitle,T=e.title,h=e.available;return wp.element.createElement(u.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__header-details"},function(e,t,n,r,a,o){return n?wp.element.createElement("div",{className:"tribe-editor__rsvp-container-header__title-input-wrapper"},wp.element.createElement(Ee.a,{className:"tribe-editor__rsvp-container-header__title-input",value:a,placeholder:Object(i.__)("RSVP Title","event-tickets"),onChange:r,disabled:t}),e&&We):wp.element.createElement("h2",{className:"tribe-editor__rsvp-container-header__title"},o)}(s,d,l,m,f,T),function(e,t,n,r,a){return t?wp.element.createElement(xe,{className:"tribe-editor__rsvp-container-header__description-input",value:r,placeholder:Object(i.__)("RSVP description","event-tickets"),onChange:n,disabled:e}):a&&wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__description"},a)}(d,l,_,p,o),c&&(t=h,n=Object(i.__)("%d available","event-tickets"),r=n,a=wp.element.createElement("span",{className:"tribe-editor__rsvp-container-header__capacity-label-fallback"},Object(i.__)("Unlimited","event-tickets")),wp.element.createElement(be.NumericLabel,{className:"tribe-editor__rsvp-container-header__capacity-label",count:t,includeZero:!0,singular:n,plural:r,fallback:a}))),wp.element.createElement(Fe,null))};Ue.propTypes={available:_.a.number,description:_.a.string,hasAttendeeInfoFields:_.a.bool,isCreated:_.a.bool,isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,onTempDescriptionChange:_.a.func,onTempTitleChange:_.a.func,tempDescription:_.a.string,tempTitle:_.a.string,title:_.a.string};var ze=Ue,Ge=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Be=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{available:Ne.d.getRSVPAvailable(e),description:Ne.d.getRSVPDescription(e),hasAttendeeInfoFields:Ne.d.getRSVPHasAttendeeInfoFields(e),isCreated:Ne.d.getRSVPCreated(e),isDisabled:Ge(e),tempDescription:Ne.d.getRSVPTempDescription(e),tempTitle:Ne.d.getRSVPTempTitle(e),title:Ne.d.getRSVPTitle(e)}}),(function(e){return{onTempDescriptionChange:function(t){e(Ne.a.setRSVPTempDescription(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))},onTempTitleChange:function(t){e(Ne.a.setRSVPTempTitle(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))}}})))(ze),qe=n(67),Je=n.n(qe),$e=(n(499),wp.element.createElement(ye.Dashicon,{className:"tribe-editor__rsvp-duration__duration-tooltip-label",icon:"info-outline"})),Ze=function(e){var t=e.tooltipDisabled;return wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__rsvp-duration__duration-label",label:Object(i.__)("Duration","event-tickets"),tooltipDisabled:t,tooltipLabel:$e,tooltipText:Object(i.__)("By default, sales will begin as soon as you save the ticket and end when the event begins","event-tickets")})},Qe=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Xe=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Qe(e)}})))(Ze),et=n(9),tt=n.n(et),nt=n(38),rt=n.n(nt),at=(n(500),function(e){return wp.element.createElement(be.DateTimeRangePicker,tt()({className:"tribe-editor__rsvp-duration__duration-picker"},e))});at.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var it=at,ot=n(3),st=function(e){return function(t,n,r){var a={date:t,dayPickerInput:r};e(Ne.a.handleRSVPStartDate(a))}},ct=function(e){return function(t){return e(Ne.a.setRSVPTempStartTimeInput(t.target.value))}},ut=function(e){return function(t,n){e(Ne.a.handleRSVPStartTime(t)),n()}},dt=function(e){return function(t,n,r){var a={date:t,dayPickerInput:r};e(Ne.a.handleRSVPEndDate(a))}},lt=function(e){return function(t){return e(Ne.a.setRSVPTempEndTimeInput(t.target.value))}},_t=function(e){return function(t,n){e(Ne.a.handleRSVPEndTime(t)),n()}},mt=function(e,t){return function(n){var r=ot.moment.toMoment(n.target.value,ot.moment.TIME_FORMAT,!1);if(!r.isValid()){var a=Ne.d.getRSVPStartTimeInput(e);r=ot.moment.toMoment(a,ot.moment.TIME_FORMAT,!1)}var i=ot.moment.totalSeconds(r);t(Ne.a.handleRSVPStartTime(i))}},pt=function(e,t){return function(n){var r=ot.moment.toMoment(n.target.value,ot.moment.TIME_FORMAT,!1);if(!r.isValid()){var a=Ne.d.getRSVPEndTimeInput(e);r=ot.moment.toMoment(a,ot.moment.TIME_FORMAT,!1)}var i=ot.moment.totalSeconds(r);t(Ne.a.handleRSVPEndTime(i))}},ft=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=ot.globals.tecDateSettings().datepickerFormat?ot.moment.toFormat(ot.globals.tecDateSettings().datepickerFormat):"LL",n=Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e),r=Ne.d.getRSVPTempStartDateMoment(e),a=Ne.d.getRSVPTempEndDateMoment(e),i=r&&r.toDate(),o=a&&a.toDate();return{fromDate:i,fromDateInput:Ne.d.getRSVPTempStartDateInput(e),fromDateDisabled:n,fromDateFormat:t,fromTime:Ne.d.getRSVPTempStartTimeInput(e),fromTimeDisabled:n,toDate:o,toDateInput:Ne.d.getRSVPTempEndDateInput(e),toDateDisabled:n,toDateFormat:t,toTime:Ne.d.getRSVPTempEndTimeInput(e),toTimeDisabled:n,state:e}}),(function(e){return{onFromDateChange:st(e),onFromTimePickerChange:ct(e),onFromTimePickerClick:ut(e),onToDateChange:dt(e),onToTimePickerChange:lt(e),onToTimePickerClick:_t(e),dispatch:e}}),(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch,o=rt()(t,["dispatch"]);return tt()({},n,a,o,{onFromTimePickerBlur:mt(r,i),onToTimePickerBlur:pt(r,i)})})))(it),Tt=(n(501),function(e){var t=e.hasDurationError;return wp.element.createElement("div",{className:"tribe-editor__rsvp-duration"},wp.element.createElement(Xe,null),wp.element.createElement(ft,null),t&&wp.element.createElement("span",{className:"tribe-editor__rsvp-duration__error"},Object(i.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))}),ht=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasDurationError:Ne.d.getRSVPHasDurationError(e)}})))(Tt),yt=(n(502),function(e){var t=e.moveRSVP,n=e.removeRSVP,r=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__rsvp__content-row--move-delete"},wp.element.createElement(Re.Button,{type:"button",onClick:t,disabled:r},Object(i.__)("Move RSVP","event-tickets")),wp.element.createElement(Re.Button,{type:"button",onClick:n,disabled:r},Object(i.__)("Remove RSVP","event-tickets")))});yt.propTypes={moveRSVP:_.a.func.isRequired,removeRSVP:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var bt=yt,Mt=n(70),St=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e),rsvpId:Ne.d.getRSVPId(e),isDisabled:Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)}}),(function(e,t){return{moveRSVP:function(n){return e(Object(Mt.c)(n,t.clientId))},dispatch:e}}),(function(e,t,n){var r=t.dispatch,a=rt()(t,["dispatch"]);return tt()({},n,e,a,{removeRSVP:function(){window.confirm(Object(i.__)("Are you sure you want to delete this RSVP? It cannot be undone.","event-tickets"))&&(r(Ne.a.deleteRSVP()),e.created&&e.rsvpId&&r(Ne.e.deleteRSVP(e.rsvpId)),Object(se.dispatch)("core/editor").removeBlocks([n.clientId]))},moveRSVP:function(){return t.moveRSVP(e.rsvpId)}})})))(bt),Et=(n(503),Object(i.__)("+ Add","event-tickets")),gt=Object(i.__)("Edit","event-tickets"),vt=function(e){var t=e.attendeeRegistrationURL,n=e.hasAttendeeInfoFields,r=e.isCreated,a=e.isDisabled,o=e.isModalOpen,s=e.onClick,c=e.onClose,u=e.onIframeLoad,d=n?gt:Et;return wp.element.createElement(be.AttendeesRegistration,{helperText:Object(i.__)("Save your RSVP to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:a,isModalOpen:o,label:Object(i.__)("Attendee Information","event-tickets"),linkText:d,modalTitle:Object(i.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:u,showHelperText:!r,shouldCloseOnClickOutside:!1})};vt.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var kt=vt,Dt=function(e){return ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=attendee-registration&ticket_id="+Ne.d.getRSVPId(e)+"&tribe_events_modal=1"},Lt=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)||!Ne.d.getRSVPCreated(e)},Ot=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{attendeeRegistrationURL:Dt(e),hasAttendeeInfoFields:Ne.d.getRSVPHasAttendeeInfoFields(e),isCreated:Ne.d.getRSVPCreated(e),isDisabled:Lt(e),isModalOpen:Ne.d.getRSVPIsModalOpen(e)}}),(function(e,t){return{onClick:function(){e(Ne.a.setRSVPIsModalOpen(!0))},onClose:function(n){n.target.classList.contains("components-modal__content")||e(Ne.a.setRSVPIsModalOpen(t.clientId,!1))},onIframeLoad:function(t){var n=t.contentWindow,r=function(){t.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},a=n.document.querySelector("#event-tickets-attendee-information");a.addEventListener("submit",r);var i=function(){n.removeEventListener("unload",o),a.removeEventListener("submit",r)},o=function(){i();var t=n.document.querySelector("#tribe-tickets-attendee-sortables"),r=Boolean(t.firstElementChild);e(Ne.a.setRSVPHasAttendeeInfoFields(r)),e(Ne.a.setRSVPIsModalOpen(!1))};n.addEventListener("unload",o);var s=n.document.querySelector(".tribe-intro > a");s&&s.setAttribute("target","_blank")}}})))(kt),Yt=(n(504),function(){return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__labels"},wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label"},Object(i.__)("RSVP Capacity","event-tickets")),wp.element.createElement("span",{className:"tribe-editor__rsvp-container-content__capacity-label-help"},Object(i.__)("Leave blank if unlimited","event-tickets")))}),wt=function(e){var t=e.capacityId,n=e.isDisabled,r=e.notGoingId,a=e.onTempCapacityChange,o=e.onTempNotGoingResponsesChange,s=e.tempCapacity,c=e.tempNotGoingResponses;return wp.element.createElement("div",{className:"tribe-editor__rsvp-container-content__options"},wp.element.createElement(Re.NumberInput,{className:"tribe-editor__rsvp-container-content__capacity-input",disabled:n,id:t,min:0,onChange:a,value:s}),wp.element.createElement(Re.Checkbox,{checked:c,className:"tribe-editor__rsvp-container-content__not-going-responses",disabled:n,id:r,label:Object(i.__)('Enable "Not Going" responses',"event-tickets"),onChange:o}))};wt.propTypes={capacityId:_.a.string.isRequired,isDisabled:_.a.bool.isRequired,notGoingId:_.a.string.isRequired,onTempCapacityChange:_.a.func.isRequired,onTempNotGoingResponsesChange:_.a.func.isRequired,tempCapacity:_.a.string.isRequired,tempNotGoingResponses:_.a.bool.isRequired};var jt=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.capacityId=Je()(),n.notGoingId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.isDisabled,n=e.onTempCapacityChange,r=e.onTempNotGoingResponsesChange,a=e.tempCapacity,i=e.tempNotGoingResponses,o=e.clientId,s={capacityId:this.capacityId,isDisabled:t,notGoingId:this.notGoingId,onTempCapacityChange:n,onTempNotGoingResponsesChange:r,tempCapacity:a,tempNotGoingResponses:i};return wp.element.createElement(u.Fragment,null,wp.element.createElement(Yt,null),wp.element.createElement(wt,s),wp.element.createElement(ht,null),this.props.hasBeenCreated&&wp.element.createElement(St,{clientId:o}),this.props.hasTicketsPlus&&wp.element.createElement(Ot,null))}}]),t}(u.PureComponent);jt.propTypes={clientId:_.a.string,hasTicketsPlus:_.a.bool,onTempCapacityChange:_.a.func,onTempNotGoingResponsesChange:_.a.func,tempCapacity:_.a.string,tempNotGoingResponses:_.a.bool,hasBeenCreated:_.a.bool};var It=jt,Pt=n(35),Ct=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},xt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isDisabled:Ct(e),tempCapacity:Ne.d.getRSVPTempCapacity(e),tempNotGoingResponses:Ne.d.getRSVPTempNotGoingResponses(e),hasBeenCreated:Ne.d.getRSVPCreated(e)}}),(function(e){return{onTempCapacityChange:function(t){e(Ne.a.setRSVPTempCapacity(t.target.value)),e(Ne.a.setRSVPHasChanges(!0))},onTempNotGoingResponsesChange:function(t){e(Ne.a.setRSVPTempNotGoingResponses(t.target.checked)),e(Ne.a.setRSVPHasChanges(!0))}}})))(It),Rt=(n(505),function(e){var t=e.isDisabled;return wp.element.createElement(u.Fragment,null,t?wp.element.createElement(o.RSVPInactive,null):wp.element.createElement(o.RSVPActive,null),wp.element.createElement("span",{className:"tribe-editor__rsvp-container__icon-label"},Object(i.__)("RSVP","event-tickets")))});Rt.propTypes={isDisabled:_.a.bool.isRequired};var At=function(e){var t=e.isDisabled,n=e.isSelected,r=e.clientId;return wp.element.createElement(be.ContainerPanel,{className:he()("tribe-editor__rsvp-container",{"tribe-editor__rsvp-container--disabled":t}),layout:Me.a.rsvp,icon:wp.element.createElement(Rt,{isDisabled:t}),header:wp.element.createElement(Be,{isSelected:n}),content:wp.element.createElement(xt,{clientId:r})})};At.propTypes={isDisabled:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,clientId:_.a.string.isRequired};var Ht=At,Nt=function(e){return Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPSettingsOpen(e)},Vt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Nt(e)}})))(Ht),Ft=function(e){var t=e.href,n=e.isDisabled;return wp.element.createElement(be.ActionButton,{asLink:!0,className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--attendees",disabled:n,href:t,icon:wp.element.createElement(o.Attendees,null),target:"_blank"},Object(i.__)("Attendees","event-tickets"))};Ft.propTypes={href:_.a.string,isDisabled:_.a.bool};var Kt=Ft,Wt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{href:ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=tickets-attendees&event_id="+Object(se.select)("core/editor").getCurrentPostId(),isDisabled:Ne.d.getRSVPIsLoading(e)}})))(Kt),Ut=n(43),zt=n.n(Ut),Gt=function(e){var t=e.isDisabled,n=e.onClick;return wp.element.createElement(be.ActionButton,{className:"tribe-editor__rsvp__action-button tribe-editor__rsvp__action-button--settings",disabled:t,icon:wp.element.createElement(Ke.Cog,null),onClick:n},Object(i.__)("Settings","event-tickets"))};Gt.defaultProps={onClick:zt.a},Gt.propTypes={isDisabled:_.a.bool,onClick:_.a.func};var Bt=Gt,qt=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isDisabled:Ne.d.getRSVPIsLoading(e)}}),(function(e){return{onClick:function(){return e(Ne.a.setRSVPSettingsOpen(!0))}}})))(Bt),Jt=(n(506),function(e){return e?Object(i.__)("Update RSVP","event-tickets"):Object(i.__)("Create RSVP","event-tickets")}),$t=Object(i.__)("Cancel","event-tickets"),Zt=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onWarningClick=function(){n.setState({isWarningOpen:!n.state.isWarningOpen})},n.getActions=function(){var e=n.props,t=e.created,r=(e.hasTicketsPlus,e.hasRecurrenceRules),a=e.isLoading,o=[wp.element.createElement(qt,null)];if(t&&o.push(wp.element.createElement(Wt,null)),r){var s=n.state.isWarningOpen?"no":"info-outline",c=n.state.isWarningOpen?Object(i.__)("Hide Warning","event-tickets"):Object(i.__)("Warning","event-tickets");o.push(wp.element.createElement(be.WarningButton,{icon:s,onClick:n.onWarningClick,isDisabled:a},c))}return o},n.state={isWarningOpen:!1},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.created,n=e.isCancelDisabled,r=e.isConfirmDisabled,a=e.onCancelClick,o=e.onConfirmClick,s=e.showCancel;return wp.element.createElement(u.Fragment,null,wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__rsvp__action-dashboard",actions:this.getActions(),cancelLabel:$t,confirmLabel:Jt(t),isCancelDisabled:n,isConfirmDisabled:r,onCancelClick:a,onConfirmClick:o,showCancel:s}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__rsvp__warning"},Object(i.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}]),t}(u.PureComponent);Zt.propTypes={created:_.a.bool.isRequired,hasTicketsPlus:_.a.bool.isRequired,hasRecurrenceRules:_.a.bool.isRequired,isCancelDisabled:_.a.bool.isRequired,isConfirmDisabled:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,onCancelClick:_.a.func.isRequired,onConfirmClick:_.a.func.isRequired,showCancel:_.a.bool.isRequired};var Qt=Zt,Xt=function(e){var t=!1;try{t=window.tribe[Pt.plugins.constants.EVENTS_PRO_PLUGIN].data.blocks.recurring.selectors.hasRules(e)}catch(e){}return t},en=function(e){return!Ne.d.getRSVPTempTitle(e)||!Ne.d.getRSVPHasChanges(e)||Ne.d.getRSVPIsLoading(e)||Ne.d.getRSVPHasDurationError(e)},tn=function(e,t){return function(){t(Ne.a.setRSVPTempDetails({tempTitle:Ne.d.getRSVPTitle(e),tempDescription:Ne.d.getRSVPDescription(e),tempCapacity:Ne.d.getRSVPCapacity(e),tempNotGoingResponses:Ne.d.getRSVPNotGoingResponses(e),tempStartDate:Ne.d.getRSVPStartDate(e),tempStartDateInput:Ne.d.getRSVPStartDateInput(e),tempStartDateMoment:Ne.d.getRSVPStartDateMoment(e),tempEndDate:Ne.d.getRSVPEndDate(e),tempEndDateInput:Ne.d.getRSVPEndDateInput(e),tempEndDateMoment:Ne.d.getRSVPEndDateMoment(e),tempStartTime:Ne.d.getRSVPStartTime(e),tempEndTime:Ne.d.getRSVPEndTime(e),tempStartTimeInput:Ne.d.getRSVPStartTimeInput(e),tempEndTimeInput:Ne.d.getRSVPEndTimeInput(e)})),t(Ne.a.setRSVPHasChanges(!1)),Object(se.dispatch)("core/editor").clearSelectedBlock()}},nn=function(e,t){return function(){var n={title:Ne.d.getRSVPTempTitle(e),description:Ne.d.getRSVPTempDescription(e),capacity:Ne.d.getRSVPTempCapacity(e),notGoingResponses:Ne.d.getRSVPTempNotGoingResponses(e),startDate:Ne.d.getRSVPTempStartDate(e),startDateInput:Ne.d.getRSVPTempStartDateInput(e),startDateMoment:Ne.d.getRSVPTempStartDateMoment(e),endDate:Ne.d.getRSVPTempEndDate(e),endDateInput:Ne.d.getRSVPTempEndDateInput(e),endDateMoment:Ne.d.getRSVPTempEndDateMoment(e),startTime:Ne.d.getRSVPTempStartTime(e),endTime:Ne.d.getRSVPTempEndTime(e),startTimeInput:Ne.d.getRSVPTempStartTimeInput(e),endTimeInput:Ne.d.getRSVPTempEndTimeInput(e)};Ne.d.getRSVPCreated(e)?t(Ne.e.updateRSVP(tt()({},n,{id:Ne.d.getRSVPId(e)}))):t(Ne.e.createRSVP(tt()({},n,{postId:Object(se.select)("core/editor").getCurrentPostId()})))}},rn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e),hasRecurrenceRules:Xt(e),hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isCancelDisabled:Ne.d.getRSVPIsLoading(e),isConfirmDisabled:en(e),isLoading:Ne.d.getRSVPIsLoading(e),showCancel:Ne.d.getRSVPCreated(e),state:e}}),null,(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch;return tt()({},n,a,{onCancelClick:tn(r,i),onConfirmClick:nn(r,i)})})))(Qt),an=(n(507),function(e){var t=e.image,n=e.isSettingsLoading,r=e.onRemove,a=e.onSelect,o={title:Object(i.__)("Ticket Header Image","event-tickets"),description:Object(i.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(i.__)("Upload Image","event-tickets"),image:t,onRemove:r,onSelect:a,removeButtonDisabled:n};return wp.element.createElement(Re.ImageUpload,o)});an.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var on=an,sn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{image:{id:Ne.d.getRSVPHeaderImageId(e),alt:Ne.d.getRSVPHeaderImageAlt(e),src:Ne.d.getRSVPHeaderImageSrc(e)},isSettingsLoading:Ne.d.getRSVPIsSettingsLoading(e)}}),(function(e){return{onSelect:function(t){return e(Ne.a.updateRSVPHeaderImage(t))},onRemove:function(){return e(Ne.a.deleteRSVPHeaderImage())}}})))(on),cn=(n(508),function(e){var t=e.isSettingsLoading,n=e.onCloseClick;return wp.element.createElement(be.SettingsDashboard,{className:he()("tribe-editor__rsvp__settings-dashboard",{"tribe-editor__rsvp__settings-dashboard--loading":t}),closeButtonDisabled:t,content:wp.element.createElement(u.Fragment,null,wp.element.createElement(sn,null),t&&wp.element.createElement(ye.Spinner,null)),onCloseClick:n})});cn.propTypes={isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var un=cn,dn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsLoading:Ne.d.getRSVPIsSettingsLoading(e)}}),(function(e){return{onCloseClick:function(){return e(Ne.a.setRSVPSettingsOpen(!1))}}})))(un),ln=function(e){var t=e.isSelected,n=e.isSettingsOpen;return t?n?wp.element.createElement(dn,null):wp.element.createElement(rn,null):null};ln.propTypes={isSelected:_.a.bool.isRequired,isSettingsOpen:_.a.bool.isRequired};var _n=ln,mn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsOpen:Ne.d.getRSVPSettingsOpen(e)}})))(_n),pn=n(95),fn={className:"tribe-editor__rsvp__inactive-block",icon:wp.element.createElement(o.RSVPInactive,null),layout:pn.a.rsvp},Tn=function(e){var t=e.created;return fn.title=t?Object(i.__)("RSVP is not currently active","event-tickets"):Object(i.__)("There is no RSVP configured","event-tickets"),fn.description=t?Object(i.__)("Edit this block to change RSVP settings.","event-tickets"):Object(i.__)("Edit this block to create an RSVP form.","event-tickets"),wp.element.createElement(pn.b,fn)};Tn.propTypes={created:_.a.bool.isRequired};var hn=Tn,yn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{created:Ne.d.getRSVPCreated(e)}})))(hn),bn=n(29),Mn=n(19),Sn=(n(509),function(e){function t(){var e,n,r,a;ue()(this,t);for(var o=arguments.length,s=Array(o),c=0;c<o;c++)s[c]=arguments[c];return n=r=me()(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.renderPostTypes=function(){return r.props.isFetchingPosts?wp.element.createElement(ye.Spinner,null):r.props.postOptions.length?wp.element.createElement(ye.MenuGroup,null,wp.element.createElement(ye.MenuItemsChoice,{choices:r.props.postOptions,value:r.props.postValue,onSelect:r.props.onPostSelect})):wp.element.createElement(ye.Notice,{isDismissible:!1,status:"warning"},Object(i.__)("No posts found","event-tickets"))},a=n,me()(r,a)}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.initialize()}},{key:"render",value:function(){return wp.element.createElement(ye.Modal,{title:this.props.title,onRequestClose:this.props.hideModal,className:"tribe-editor__tickets__move-modal"},wp.element.createElement("label",{htmlFor:"post_type"},Object(i.__)("You can optionally focus on a specific post type:","event-tickets")),wp.element.createElement(Re.Select,{id:"post_type",options:this.props.postTypeOptions,onChange:this.props.onPostTypeChange,value:this.props.postTypeOptionValue}),wp.element.createElement("label",{htmlFor:"search"},Object(i.__)("You can also enter keywords to help find the target event by title or description","event-tickets")),wp.element.createElement(Re.Input,{id:"search",type:"text",onChange:this.props.onSearchChange,value:this.props.search}),wp.element.createElement("label",null,Object(i.__)("Select the post you wish to move the ticket type to:","event-tickets")),this.renderPostTypes(),wp.element.createElement("footer",null,wp.element.createElement(ye.Button,{isLarge:!0,isPrimary:!0,isBusy:this.props.isModalSubmitting,disabled:!this.props.hasSelectedPost||this.props.isFetchingPosts,onClick:this.props.onSubmit},Object(i.__)("Finish!","event-tickets"))))}}]),t}(u.PureComponent));Sn.propTypes={hasSelectedPost:_.a.bool.isRequired,hideModal:_.a.func.isRequired,initialize:_.a.func.isRequired,isFetchingPosts:_.a.bool.isRequired,isModalSubmitting:_.a.bool.isRequired,onPostSelect:_.a.func.isRequired,onPostTypeChange:_.a.func.isRequired,onSearchChange:_.a.func.isRequired,onSubmit:_.a.func.isRequired,postOptions:_.a.arrayOf(_.a.object),postTypeOptions:_.a.arrayOf(_.a.object),postTypeOptionValue:_.a.object,postValue:_.a.string.isRequired,search:_.a.string.isRequired,title:_.a.string.isRequired},Sn.defaultProps={title:Object(i.__)("Move Ticket Types","event-tickets")};var En=Sn,gn=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasSelectedPost:bn.i(e),isFetchingPosts:bn.k(e),isFetchingPostTypes:bn.j(e),isModalSubmitting:bn.m(e),postOptions:bn.f(e),postTypeOptions:bn.h(e),postTypeOptionValue:bn.g(e),postValue:bn.d(e),search:bn.c(e)}}),(function(e,t){return{initialize:function(){return e({type:Mn.h})},hideModal:function(){return e(Object(Mt.a)())},onSearchChange:function(t){return e(Object(Mt.b)({search_terms:t.target.value}))},onPostTypeChange:function(t){return e(Object(Mt.b)({post_type:t.value}))},onPostSelect:function(t){return e(Object(Mt.b)({target_post_id:t}))},onSubmit:function(){return e({type:Mn.o})}}})))(En),vn=(n(510),function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){!this.props.rsvpId&&this.props.initializeRSVP()}},{key:"render",value:function(){var e=this.props,t=e.created,n=e.isInactive,r=e.isLoading,a=e.isSelected,i=e.clientId,o=e.isModalShowing;return wp.element.createElement(u.Fragment,null,!a&&(t&&n||!t)?wp.element.createElement(yn,null):wp.element.createElement("div",{className:he()("tribe-editor__rsvp",{"tribe-editor__rsvp--selected":a},{"tribe-editor__rsvp--loading":r})},wp.element.createElement(Vt,{isSelected:a,clientId:i}),wp.element.createElement(mn,{isSelected:a}),r&&wp.element.createElement(ye.Spinner,null)),o&&wp.element.createElement(gn,null))}}]),t}(u.PureComponent));vn.propTypes={clientId:_.a.string.isRequired,created:_.a.bool.isRequired,initializeRSVP:_.a.func.isRequired,isInactive:_.a.bool.isRequired,isLoading:_.a.bool.isRequired,isModalShowing:_.a.bool.isRequired,isSelected:_.a.bool.isRequired,rsvpId:_.a.number.isRequired};var kn=vn,Dn=n(58),Ln=n.n(Dn),On=n(53),Yn=n.n(On),wn=n(39),jn=n.n(wn),In=n(326),Pn=n.n(In),Cn=n(492),xn=n.n(Cn),Rn={},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){var n=function(n){function r(e){ue()(this,r);var t=me()(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.keys=[],t.saving=null,t.keys=t.generateKeys(),t}return fe()(r,n),le()(r,[{key:"generateKeys",value:function(){return jn()(this.attrs)?this.attrs:Yn()(this.attrs)?Ln()(this.attrs):(console.warn("Make sure attributes is from a valid type: Array or Object"),[])}},{key:"componentDidMount",value:function(){var e=this.props,t=e.setInitialState,n=e.attributes,r=void 0===n?{}:n,a=e.isolated;(0,e.onBlockCreated)(this.props),this.registerBlock(),this.blockCount()>1&&!a||t(tt()({},this.props,{get:function(e,t){return e in r?r[e]:t}}))}},{key:"componentWillUnmount",value:function(){var e=this.props.onBlockRemoved;this.unregisterBlock(),e(this.props)}},{key:"registerBlock",value:function(){var e=this.props.name;Rn[e]=e in Rn?Rn[e]+1:1}},{key:"unregisterBlock",value:function(){var e=this.props.name;Rn[e]-=1}},{key:"blockCount",value:function(){var e=this.props.name;return Rn[e]}},{key:"componentDidUpdate",value:function(){var e=this.calculateDiff();xn()(this.saving,e)||(this.saving=e,Pn()(e)||this.props.setAttributes(e))}},{key:"calculateDiff",value:function(){var e=this,t=this.attrs;return this.keys.reduce((function(n,r){return r in e.props&&!xn()(t[r],e.props[r])&&(n[r]=e.props[r]),n}),{})}},{key:"render",value:function(){return wp.element.createElement(t,this.props)}},{key:"attrs",get:function(){return e||this.props.attributes||{}}}]),r}(u.Component);return n.defaultProps={attributes:{},setInitialState:zt.a,setAttributes:zt.a,name:"",isolated:!1,onBlockCreated:zt.a,onBlockRemoved:zt.a},n.propTypes={setAttributes:_.a.func,setInitialState:_.a.func,attributes:_.a.object,name:_.a.string,isolated:_.a.bool,increaseRegister:_.a.func,decreaseRegister:_.a.func,onBlockCreated:_.a.func,onBlockRemoved:_.a.func},n.displayName="WithSaveData( "+(t.displayName||t.name||"Component "),n}},Hn=function(e){var t=Ne.d.getRSVPStartDateMoment(e),n=Ne.d.getRSVPStartTimeNoSeconds(e),r=Ne.d.getRSVPEndDateMoment(e),a=Ne.d.getRSVPEndTimeNoSeconds(e);if(!t||!r)return!1;var i=ot.moment.setTimeInSeconds(t.clone(),ot.time.toSeconds(n,ot.time.TIME_FORMAT_HH_MM)),o=ot.moment.setTimeInSeconds(r.clone(),ot.time.toSeconds(a,ot.time.TIME_FORMAT_HH_MM)),s=oe()();return!(s.isAfter(i)&&s.isBefore(o))},Nn=function(e,t){return function(){var n=Object(se.select)("core/editor").getCurrentPostId();e(Ne.e.getRSVP(n));var r=t.attributes,a=void 0===r?{}:r;parseInt(a.headerImageId,10)&&e(Ne.a.fetchRSVPHeaderImage(a.headerImageId)),a.goingCount&&e(Ne.a.setRSVPGoingCount(parseInt(a.goingCount,10))),a.notGoingCount&&e(Ne.a.setRSVPNotGoingCount(parseInt(a.notGoingCount,10)))}},Vn=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=Ne.d.getRSVPId(e);return{created:Ne.d.getRSVPCreated(e),isInactive:Hn(e),isLoading:Ne.d.getRSVPIsLoading(e),isModalShowing:Object(bn.l)(e)&&Object(bn.e)(e)===t,rsvpId:t}}),(function(e,t){return{initializeRSVP:function(){return e(Ne.a.initializeRSVP())},onBlockRemoved:function(){return e(Ne.a.deleteRSVP())},setInitialState:Nn(e,t)}})),An())(kn),Fn=n(8),Kn={id:"rsvp",title:Object(i.__)("RSVP","event-tickets"),description:Object(i.__)("Find out who is planning to attend!","event-tickets"),icon:wp.element.createElement(o.RSVP,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{goingCount:{type:"integer",source:"meta",meta:Fn.g},notGoingCount:{type:"integer",source:"meta",meta:Fn.j},headerImageId:{type:"integer",source:"meta",meta:Fn.i}},edit:Vn,save:function(){return null}},Wn=n(96),Un=function(e){var t=e.onClick;return wp.element.createElement(be.ActionButton,{icon:wp.element.createElement(Ke.Cog,null),onClick:t},Object(i.__)("Settings","event-tickets"))};Un.propTypes={onClick:_.a.func};var zn=Un,Gn=n(4),Bn=Object(P.c)(Object(Ve.withStore)(),ae(null,(function(e){return{onClick:function(){return e(Gn.a.openSettings())}}})))(zn),qn=function(e){var t=e.href;return t?wp.element.createElement(be.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(o.Orders,null),target:"_blank"},Object(i.__)("Orders","event-tickets")):null};qn.propTypes={href:_.a.string.isRequired};var Jn=qn,$n=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=ot.globals.adminUrl(),n=Object(se.select)("core/editor").getCurrentPostType(),r=Object(se.select)("core/editor").getCurrentPostId(),a=Gn.f.getTicketsProvider(e),i=Gn.b.TICKET_ORDERS_PAGE_SLUG[a];return{href:i?t+"edit.php?post_type="+n+"&page="+i+"&event_id="+r:""}})))(Jn),Zn=function(e){var t=e.href;return e.canCreateTickets&&wp.element.createElement(be.ActionButton,{asLink:!0,href:t,icon:wp.element.createElement(o.Attendees,null),target:"_blank"},Object(i.__)("Attendees","event-tickets"))};Zn.propTypes={href:_.a.string.isRequired,canCreateTickets:_.a.bool};var Qn=Zn,Xn=Object(P.c)(Object(Ve.withStore)(),ae((function(){return{href:ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=tickets-attendees&event_id="+Object(se.select)("core/editor").getCurrentPostId(),canCreateTickets:Gn.f.canCreateTickets()}})))(Qn),er=(n(513),Object(i.__)("Add Tickets","event-tickets")),tr=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onWarningClick=function(){n.setState({isWarningOpen:!n.state.isWarningOpen})},n.getActions=function(){var e=n.props,t=e.hasCreatedTickets,r=e.hasOrdersPage,a=e.hasRecurrenceRules,o=(e.hasTicketsPlus,[wp.element.createElement(Bn,null)]);if(t&&(o.push(wp.element.createElement(Xn,null)),r&&o.push(wp.element.createElement($n,null))),a){var s=n.state.isWarningOpen?"no":"info-outline",c=n.state.isWarningOpen?Object(i.__)("Hide Warning","event-tickets"):Object(i.__)("Warning","event-tickets");o.push(wp.element.createElement(be.WarningButton,{icon:s,onClick:n.onWarningClick},c))}return o},n.state={isWarningOpen:!1},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props.onConfirmClick;return wp.element.createElement(u.Fragment,null,wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__tickets__action-dashboard",actions:this.getActions(),confirmLabel:er,onConfirmClick:e,showCancel:!1}),this.state.isWarningOpen&&wp.element.createElement("div",{className:"tribe-editor__tickets__warning"},Object(i.__)("This is a recurring event. If you add tickets they will only show up on the next upcoming event in the recurrence pattern. The same ticket form will appear across all events in the series. Please configure your events accordingly.","event-tickets")))}}]),t}(u.PureComponent);tr.propTypes={hasCreatedTickets:_.a.bool,hasOrdersPage:_.a.bool,hasRecurrenceRules:_.a.bool,hasTicketsPlus:_.a.bool,onConfirmClick:_.a.func};var nr=tr,rr=function(e){var t=!1;try{t=window.tribe[Pt.plugins.constants.EVENTS_PRO_PLUGIN].data.blocks.recurring.selectors.hasRules(e)}catch(e){}return t},ar=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketsProvider(e),a=Gn.b.TICKET_ORDERS_PAGE_SLUG[n];return{hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOrdersPage:Boolean(a),hasRecurrenceRules:rr(e),hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),onConfirmClick:function(){var e=t.clientId,n=Object(se.select)("core/editor").getBlockCount,a=Object(se.dispatch)("core/editor").insertBlock,i=n(e);a(Object(r.createBlock)("tribe/tickets-item",{}),i,e)}}})))(nr),ir=(n(514),function(e){var t=e.label,n=e.items,r=e.right;return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-row"},wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-left"},t&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-label"},t),n&&wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-items"},n)),wp.element.createElement("span",{className:"tribe-editor__tickets__capacity-row-right"},r))});ir.propTypes={label:_.a.string,items:_.a.string,right:_.a.node},ir.defaultProps={label:"",items:"",right:""};var or=ir,sr=(n(515),function(e){var t=e.isSettingsLoading,n=e.independentCapacity,r=e.sharedCapacity,a=e.independentAndSharedCapacity,o=e.independentTicketItems,s=e.sharedTicketItems,c=e.onSharedCapacityChange,u=wp.element.createElement(Re.NumberInput,{onChange:c,value:r,disabled:t,min:0});return wp.element.createElement("div",{className:"tribe-editor__tickets__capacity-table"},wp.element.createElement("h3",{className:"tribe-editor__tickets__capacity-table-title"},Object(i.__)("Capacity","event-tickets")),wp.element.createElement(or,{label:Object(i.__)("Shared capacity","event-tickets"),items:s,right:u}),wp.element.createElement(or,{label:Object(i.__)("Independent capacity","event-tickets"),items:o,right:n}),wp.element.createElement(or,{label:Object(i.__)("Total Capacity","event-tickets"),right:a}))});sr.propTypes={isSettingsLoading:_.a.bool,independentCapacity:_.a.number,sharedCapacity:_.a.string,independentAndSharedCapacity:_.a.number,independentTicketItems:_.a.string,sharedTicketItems:_.a.string,onSharedCapacityChange:_.a.func};var cr=sr,ur=function(e){var t=e.filter((function(e){return e.details.title})).map((function(e){return e.details.title})).join(", ");return t?" ("+t+") ":""},dr=function(e){var t=Gn.f.getIndependentTickets(e);return ur(t)},lr=function(e){var t=Gn.f.getSharedTickets(e);return ur(t)},_r=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e),independentCapacity:Gn.f.getIndependentTicketsCapacity(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),independentAndSharedCapacity:Gn.f.getIndependentAndSharedTicketsCapacity(e),independentTicketItems:dr(e),sharedTicketItems:lr(e)}}),(function(e){return{onSharedCapacityChange:function(t){e(Gn.a.setTicketsSharedCapacity(t.target.value)),e(Gn.a.setTicketsTempSharedCapacity(t.target.value))}}})))(cr),mr=(n(516),function(e){var t=e.image,n=e.isSettingsLoading,r=e.onRemove,a=e.onSelect,o={title:Object(i.__)("Ticket Header Image","event-tickets"),description:Object(i.__)("Select an image from your Media Library to display on emailed tickets and RSVPs. For best results, use a .jpg, .png, or .gif at least 1160px wide.","event-tickets"),className:"tribe-editor__rsvp__image-upload",buttonDisabled:n,buttonLabel:Object(i.__)("Upload Image","event-tickets"),image:t,onRemove:r,onSelect:a,removeButtonDisabled:n};return wp.element.createElement(Re.ImageUpload,o)});mr.propTypes={image:_.a.shape({alt:_.a.string.isRequired,id:_.a.number.isRequired,src:_.a.string.isRequired}).isRequired,isSettingsLoading:_.a.bool.isRequired,onRemove:_.a.func.isRequired,onSelect:_.a.func.isRequired};var pr=mr,fr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{image:{id:Gn.f.getTicketsHeaderImageId(e),alt:Gn.f.getTicketsHeaderImageAlt(e),src:Gn.f.getTicketsHeaderImageSrc(e)},isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}}),(function(e){return{onSelect:function(t){return e(Gn.a.updateTicketsHeaderImage(t))},onRemove:function(){return e(Gn.a.deleteTicketsHeaderImage())}}})))(pr),Tr=(n(517),function(e){var t=e.hasTicketsPlus,n=e.isSettingsLoading,r=e.onCloseClick;return wp.element.createElement(be.SettingsDashboard,{className:he()("tribe-editor__tickets__settings-dashboard",{"tribe-editor__tickets__settings-dashboard--loading":n}),closeButtonDisabled:n,content:wp.element.createElement(u.Fragment,null,t&&wp.element.createElement(_r,null),wp.element.createElement(fr,null),n&&wp.element.createElement(ye.Spinner,null)),onCloseClick:r})});Tr.propTypes={hasTicketsPlus:_.a.bool,isSettingsLoading:_.a.bool.isRequired,onCloseClick:_.a.func.isRequired};var hr=Tr,yr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isSettingsLoading:Gn.f.getTicketsIsSettingsLoading(e)}}),(function(e){return{onCloseClick:function(){return e(Gn.a.closeSettings())}}})))(hr),br=function(e){var t=e.clientId,n=e.isSelected,r=e.isSettingsOpen;return n?r?wp.element.createElement(yr,null):wp.element.createElement(ar,{clientId:t}):null};br.propTypes={clientId:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool};var Mr=br,Sr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e)}})))(Mr),Er=(n(518),function(e){var t=e.available,n=e.total,r=wp.element.createElement(be.NumericLabel,{className:he()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--available","tribe-tooltip"),count:t,singular:Object(i.__)("%d ticket available","event-tickets"),plural:Object(i.__)("%d tickets available","event-tickets")}),a=wp.element.createElement(be.NumericLabel,{className:he()("tribe-editor__tickets__availability-label","tribe-editor__tickets__availability-label--total"),count:n,singular:Object(i.__)("%d total ticket","event-tickets"),plural:Object(i.__)("%d total tickets","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__tickets__availability"},wp.element.createElement("span",{class:"tribe-tooltip",title:Object(i.__)("Ticket availability is based on the lowest number of inventory, stock, and capacity.","event-tickets")},r,wp.element.createElement("span",{className:"dashicons dashicons-info"})),a)});Er.propTypes={available:_.a.number,total:_.a.number};var gr=Er,vr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{total:Gn.f.getIndependentAndSharedTicketsCapacity(e),available:Gn.f.getIndependentAndSharedTicketsAvailable(e)}})))(gr),kr=(n(519),function(){return wp.element.createElement("div",{className:"tribe-editor__tickets__overlay"})}),Dr=function(e){var t=e.allTicketsPast,n=e.canCreateTickets,r=e.hasCreatedTickets,a=e.hasOverlay,s=e.showAvailability,c=e.showInactiveBlock,u={title:"",description:""};n?r?u.title=t?Object(i.__)("Tickets are no longer available","event-tickets"):Object(i.__)("Tickets are not yet available","event-tickets"):(u.title=Object(i.__)("There are no tickets yet","event-tickets"),u.description=Object(i.__)("Edit this block to create your first ticket.","event-tickets")):(u.title=Object(i.__)("There is no ecommerce available","event-tickets"),u.description=Object(i.__)("To create tickets, you'll need to enable an ecommerce solution.","event-tickets"));var d=he()({"tribe-editor__tickets__inner-blocks":!0,"tribe-editor__tickets__inner-blocks--show":!c});return wp.element.createElement("div",{className:"tribe-editor__tickets__container"},wp.element.createElement("div",{className:d},wp.element.createElement(Wn.InnerBlocks,{allowedBlocks:["tribe/tickets-item"]})),c&&wp.element.createElement(be.InactiveBlock,{layout:pn.a.ticket,title:u.title,description:u.description,icon:wp.element.createElement(o.TicketInactive,null)}),s&&wp.element.createElement(vr,null),a&&wp.element.createElement(kr,null))};Dr.propTypes={allTicketsPast:_.a.bool,canCreateTickets:_.a.bool,hasCreatedTickets:_.a.bool,hasOverlay:_.a.bool,showAvailability:_.a.bool,showInactiveBlock:_.a.bool};var Lr=Dr,Or=function(e,t){return Gn.f.getTicketsIsSettingsOpen(e)||!Gn.f.hasATicketSelected(e)&&!t.isSelected},Yr=function(e,t){var n=t.isSelected&&!Gn.f.hasTickets(e),r=!(t.isSelected||Gn.f.hasATicketSelected(e)||Gn.f.hasCreatedTickets(e)&&Gn.f.hasTicketOnSale(e));return n||r},wr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{allTicketsPast:Gn.f.allTicketsPast(e),canCreateTickets:Gn.f.canCreateTickets(),hasCreatedTickets:Gn.f.hasCreatedTickets(e),hasOverlay:Or(e,t),showAvailability:t.isSelected&&Gn.f.hasCreatedTickets(e),showInactiveBlock:Yr(e,t)}})))(Lr),jr=(n(520),Object(i.__)("It looks like you have multiple ecommerce plugins active. We recommend running only one at a time. However, if you need to run multiple, please select which one to use to sell tickets for this event. ","event-tickets")),Ir=Object(i.__)("Note: adjusting this setting will only impact new tickets. Existing tickets will not change. We highly recommend that all tickets for one event use the same ecommerce plugin.","event-tickets"),Pr=function(e){var t=e.provider,n=e.onProviderChange,r=rt()(e,["provider","onProviderChange"]);return wp.element.createElement("div",{className:"tribe-editor__tickets-control-container"},wp.element.createElement("input",tt()({className:"tribe-editor__tickets-control__input tribe-editor__tickets-control__input--radio",type:"radio",id:t.class,name:t.class,onChange:n},r)),wp.element.createElement("label",{className:"tribe-editor__tickets-control__label",htmlFor:t.class},t.name))},Cr=function(e){var t=e.hasMultipleProviders,n=e.providers,r=e.selectedProvider,a=e.onProviderChange;return t&&wp.element.createElement(Wn.InspectorControls,{key:"inspector"},wp.element.createElement(ye.PanelBody,{title:Object(i.__)("Tickets Settings","event-tickets")},wp.element.createElement(ye.PanelRow,null,wp.element.createElement("fieldset",{className:"tribe-editor__tickets-controls-provider"},wp.element.createElement("legend",null,Object(i.__)("Sell tickets using","event-tickets")),wp.element.createElement("p",null,jr,wp.element.createElement("em",null,Ir)),n.map((function(e,t){return wp.element.createElement(Pr,{key:"provider-option-"+(t+1),provider:e,onProviderChange:a,checked:r===e.class})}))))))};Cr.propTypes={hasMultipleProviders:_.a.bool,providers:_.a.arrayOf(_.a.shape({name:_.a.string,class:_.a.string})),selectedProvider:_.a.string,onProviderChange:_.a.func};var xr=Cr,Rr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasMultipleProviders:Gn.f.hasMultipleTicketProviders(),providers:Gn.f.getTicketProviders(),selectedProvider:Gn.f.getTicketsProvider(e)}}),(function(e){return{onProviderChange:function(t){return e(Gn.a.setTicketsProvider(t.target.name))}}})),An())(xr),Ar=(n(521),function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.onBlockUpdate(this.props.isSelected)}},{key:"componentDidUpdate",value:function(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}},{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.canCreateTickets,r=e.isSettingsOpen,a=e.clientId;return wp.element.createElement("div",{className:he()("tribe-editor__tickets",{"tribe-editor__tickets--selected":t},{"tribe-editor__tickets--settings-open":r})},wp.element.createElement(wr,{isSelected:t}),n&&wp.element.createElement(Sr,{isSelected:t,clientId:a}),wp.element.createElement(Rr,null))}}]),t}(u.PureComponent));Ar.propTypes={canCreateTickets:_.a.bool,clientId:_.a.string,hasProviders:_.a.bool,header:_.a.string,isSelected:_.a.bool,isSettingsOpen:_.a.bool,onBlockUpdate:_.a.func};var Hr=Ar,Nr=Object(P.c)(Object(Ve.withStore)(),ae((function(e){var t=Gn.f.getTicketsHeaderImageId(e);return{header:t?""+t:"",hasProviders:Gn.f.hasTicketProviders(),isSettingsOpen:Gn.f.getTicketsIsSettingsOpen(e),provider:Gn.f.getTicketsProvider(e),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),canCreateTickets:Gn.f.canCreateTickets()}}),(function(e){return{setInitialState:function(t){e(Gn.a.setTicketsInitialState(t))},onBlockUpdate:function(t){e(Gn.a.setTicketsIsSelected(t))},onBlockRemoved:function(){e(Gn.a.resetTicketsBlock())}}})),An())(Hr),Vr={id:"tickets",title:Object(i.__)("Tickets","event-tickets"),description:Object(i.__)("Sell tickets and register attendees.","event-tickets"),icon:wp.element.createElement(o.Tickets,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,multiple:!1,customClassName:!1},attributes:{sharedCapacity:{type:"string",source:"meta",meta:Fn.d},header:{type:"string",source:"meta",meta:Fn.i},provider:{type:"string",source:"meta",meta:Fn.e},tickets:{type:"array",source:"meta",meta:Fn.c}},edit:Nr,save:function(){return wp.element.createElement("div",null,wp.element.createElement(Wn.InnerBlocks.Content,null))}},Fr=(n(522),n(523),function(e){var t=e.hasAttendeeInfoFields,n=e.isDisabled,r=e.isSelected,a=e.onTempTitleChange,o=e.tempTitle,s=e.title,c=t&&wp.element.createElement(Re.Tooltip,{labelClassName:"tribe-editor__ticket__container-header-clipboard-tooltip",label:wp.element.createElement(Ke.Clipboard,null),text:Object(i.__)("This ticket has Attendee Information Fields configured.","event-tickets")});return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-title"},r?wp.element.createElement(u.Fragment,null,wp.element.createElement(Ee.a,{className:"tribe-editor__ticket__container-header-title-input",value:o,placeholder:Object(i.__)("Ticket Type *","event-tickets"),onChange:a,disabled:n,required:!0}),c):wp.element.createElement(u.Fragment,null,wp.element.createElement("h3",{className:"tribe-editor__ticket__container-header-title-label"},s),c,wp.element.createElement(Ke.Pencil,null)))});Fr.propTypes={hasAttendeeInfoFields:_.a.bool,isDisabled:_.a.bool,isSelected:_.a.bool,onTempTitleChange:_.a.func,tempTitle:_.a.string,title:_.a.string};var Kr=Fr,Wr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),tempTitle:Gn.f.getTicketTempTitle(e,t),title:Gn.f.getTicketTitle(e,t)}}),(function(e,t){return{onTempTitleChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempTitle(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Kr),Ur=(n(524),function(e){var t=e.isDisabled,n=e.isSelected,r=e.onTempDescriptionChange,a=e.tempDescription,o=e.description;return n?wp.element.createElement(xe,{className:"tribe-editor__ticket__container-header-description-input",value:a,placeholder:Object(i.__)("Description","event-tickets"),onChange:r,disabled:t}):wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-description"},o)});Ur.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,onTempDescriptionChange:_.a.func,tempDescription:_.a.string,description:_.a.string};var zr=Ur,Gr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),tempDescription:Gn.f.getTicketTempDescription(e,t),description:Gn.f.getTicketDescription(e,t)}}),(function(e,t){return{onTempDescriptionChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempDescription(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(zr),Br=n(23),qr=(n(525),function(e){var t=e.isDisabled,n=e.currencyPosition,r=e.currencySymbol,a=e.onTempPriceChange,o=e.tempPrice;return wp.element.createElement(u.Fragment,null,n===Br.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},r),wp.element.createElement(Ee.a,{className:"tribe-editor__ticket__container-header-price-input",value:o,placeholder:Object(i.__)("0","event-tickets"),onChange:a,disabled:t,type:"number",min:"0"}),n===Br.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},r))});qr.propTypes={isDisabled:_.a.bool,currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string};var Jr=function(e){var t=e.currencyPosition,n=e.currencySymbol,r=e.price;return wp.element.createElement(u.Fragment,null,t===Br.PREFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n),wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-value"},r),t===Br.SUFFIX&&wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-price-currency"},n))};Jr.propTypes={currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,price:_.a.string};var $r=function(e){var t=e.isDisabled,n=e.isSelected,r=e.currencyPosition,a=e.currencySymbol,i=e.onTempPriceChange,o=e.tempPrice,s=e.price;return wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-price"},n?wp.element.createElement(qr,{currencyPosition:r,currencySymbol:a,onTempPriceChange:i,tempPrice:o,isDisabled:t}):wp.element.createElement(Jr,{currencyPosition:r,currencySymbol:a,price:s}))};$r.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,currencyPosition:_.a.oneOf(Br.PRICE_POSITIONS),currencySymbol:_.a.string,onTempPriceChange:_.a.func,tempPrice:_.a.string,price:_.a.string};var Zr=$r,Qr=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),currencyPosition:Gn.f.getTicketCurrencyPosition(e,t),currencySymbol:Gn.f.getTicketCurrencySymbol(e,t),tempPrice:Gn.f.getTicketTempPrice(e,t),price:Gn.f.getTicketPrice(e,t)||"0"}}),(function(e,t){return{onTempPriceChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempPrice(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Zr),Xr=(n(526),function(e){var t=e.children,n=e.className,r=e.value,a=e.total;if(0===r||0===a)return null;var i=void 0;try{i=ot.number.percentage(r,a)}catch(e){i=0}var o={width:Math.max(0,Math.min(100,i)).toFixed(2)+"%"};return wp.element.createElement("span",{className:he()("tribe-editor__quantity-bar__bar",n),style:o},t)});Xr.propTypes={children:_.a.node,className:_.a.oneOfType([_.a.string,_.a.arrayOf(_.a.string),ot.TribePropTypes.nullType]),value:_.a.number,total:_.a.number},Xr.defaultProps={className:null,value:0,total:0};var ea=Xr,ta=function(e){var t=e.sharedSold,n=e.sold,r=e.capacity,a=e.total,o=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__quantity-bar"},!o&&wp.element.createElement(u.Fragment,null,wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--shared-sold",value:t,total:a}),wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--sold",value:n,total:a}),!!r&&!(r===a)&&wp.element.createElement(ea,{className:"tribe-editor__quantity-bar__bar--capacity",value:r,total:a},wp.element.createElement("span",{className:"tribe-editor__quantity-bar__bar-label"},Object(i.__)("cap","event-tickets")))))};ta.propTypes={sharedSold:_.a.number,capacity:_.a.number,sold:_.a.number,total:_.a.number,isDisabled:_.a.bool},ta.defaultProps={sharedSold:0,capacity:0,sold:0,total:0,isDisabled:!1};var na=ta,ra=(n(527),function(e){var t=e.isDisabled,n=e.isSelected,r=e.isShared,a=e.isUnlimited,o=e.sold,s=e.capacity,c=e.sharedSold,u=e.sharedCapacity,d=r?u:s;return!n&&wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-quantity tribe-tooltip",title:Object(i.__)("This pertains to Orders that have been marked Completed.","event-tickets")},wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-label"},a?Object(i.sprintf)(Object(i.__)("%d sold","event-tickets"),o):Object(i.sprintf)(Object(i.__)("%d of %d sold","event-tickets"),o,d),wp.element.createElement("span",{class:"dashicons dashicons-info"})),a?wp.element.createElement("span",{className:"tribe-editor__ticket__container-header-quantity-unlimited"},Object(i.__)("unlimited","event-tickets")):wp.element.createElement(na,{sold:o,sharedSold:c,capacity:s,total:d,isDisabled:t}))});ra.propTypes={isDisabled:_.a.bool,isSelected:_.a.bool,isShared:_.a.bool,isUnlimited:_.a.bool,sold:_.a.number,capacity:_.a.number,sharedSold:_.a.number,sharedCapacity:_.a.number},ra.defaultProps={sold:0,sharedCapacity:0,capacity:0};var aa=ra,ia=function(e,t){return t?Gn.f.getSharedTicketsSold(e):0},oa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.isSharedTicket(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),isShared:n,isUnlimited:Gn.f.isUnlimitedTicket(e,t),sold:Gn.f.getTicketSold(e,t),capacity:Gn.f.getTicketCapacityInt(e,t),sharedSold:ia(e,n),sharedCapacity:Gn.f.getTicketsSharedCapacityInt(e)}})))(aa),sa=(n(528),function(e){var t=e.clientId,n=e.isSelected;return wp.element.createElement(u.Fragment,null,wp.element.createElement("div",{className:"tribe-editor__ticket__container-header-details"},wp.element.createElement(Wr,{clientId:t,isSelected:n}),wp.element.createElement(Gr,{clientId:t,isSelected:n})),wp.element.createElement(Qr,{clientId:t,isSelected:n}),wp.element.createElement(oa,{clientId:t,isSelected:n}))});sa.propTypes={clientId:_.a.string,isSelected:_.a.bool};var ca=sa,ua=n(87),da=n.n(ua),la=n(111),_a=n.n(la),ma=n(494),pa=(n(529),Gn.b.INDEPENDENT),fa=Gn.b.SHARED,Ta=Gn.b.TICKET_TYPES,ha=Gn.d.CAPACITY_TYPE_OPTIONS,ya=function(e){var t=e.className,n=e.id,r=e.label,a=rt()(e,["className","id","label"]);return wp.element.createElement(Re.LabeledItem,{className:he()("tribe-editor__labeled-number-input",t),forId:n,label:r,isLabel:!0},wp.element.createElement(Re.NumberInput,a))};ya.propTypes={className:_.a.string,id:_.a.string,label:_.a.string};var ba=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getInputs=function(){var e=n.props,t=e.isDisabled,r=e.sharedCapacity,a=e.tempCapacityType,o=e.tempCapacity,s=e.tempSharedCapacity,c=e.onTempCapacityChange,u=e.onTempSharedCapacityChange,d=[];if(a===Ta[fa]&&""===r&&d.push(wp.element.createElement(ya,{key:"shared-capacity",className:he()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--shared-capacity"),id:n.ids.sharedCapacity,label:Object(i.__)("Set shared capacity:","event-tickets"),value:s,onChange:u,disabled:t,min:0,required:!0})),_a()([Ta[fa],Ta[pa]],a)){var l={},_=a===Ta[fa]?fa:pa;if(a===Ta[fa]&&(r||s)){var m=r||s;l.max=parseInt(m,10)||0}a===Ta[pa]&&(l.required=!0),l.label=a===Ta[fa]?Object(i.__)("(optional) Limit sales of this ticket to:","event-tickets"):Object(i.__)("Number of tickets available","event-tickets"),d.push(wp.element.createElement(ya,tt()({key:"capacity",className:he()("tribe-editor__ticket__capacity-input-row","tribe-editor__ticket__capacity-input-row--capacity","tribe-editor__ticket__capacity-input-row--capacity-"+_),id:n.ids.capacity,value:o,onChange:c,disabled:t,min:0},l)))}return d},n.getCapacityForm=function(){var e=n.props,t=e.isDisabled,r=e.tempCapacityTypeOption,a=e.onTempCapacityTypeChange;return wp.element.createElement(u.Fragment,null,wp.element.createElement(Re.Select,{id:n.ids.select,className:"tribe-editor__ticket__capacity-type-select",backspaceRemovesValue:!1,value:r,isSearchable:!1,isDisabled:t,options:ha,onChange:a}),n.getInputs())},n.getNoPlusCapacityForm=function(){var e=n.props,t=e.isDisabled,r=e.tempCapacity,a=e.onTempCapacityNoPlusChange;return wp.element.createElement(u.Fragment,null,wp.element.createElement(Re.NumberInput,{className:"tribe-editor__ticket__capacity-input",id:n.ids.capacity,value:r,onChange:a,disabled:t,min:0}),wp.element.createElement("span",{className:"tribe-editor__ticket__capacity-input-helper-text"},Object(i.__)("Leave blank for unlimited","event-tickets")))},n.ids={select:Je()("capacity-type-"),capacity:Je()("capacity-"),sharedCapacity:Je()("shared-capacity-")},n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props.hasTicketsPlus;return wp.element.createElement("div",{className:he()("tribe-editor__ticket__capacity","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--capacity")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__capacity-label-with-tooltip",forId:e?this.ids.select:this.ids.capacity,isLabel:!0,label:Object(i.__)("Ticket Capacity","event-tickets"),tooltipText:Object(i.__)("Ticket capacity will only be used by attendees buying this ticket type","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement("div",{className:"tribe-editor__ticket__capacity-form"},e?this.getCapacityForm():this.getNoPlusCapacityForm()))}}]),t}(u.PureComponent);ba.propTypes={hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,sharedCapacity:_.a.string,tempCapacity:_.a.string,tempCapacityType:_.a.string,tempCapacityTypeOption:ma.ReactSelectOption,tempSharedCapacity:_.a.string,onTempCapacityChange:_.a.func,onTempCapacityNoPlusChange:_.a.func,onTempCapacityTypeChange:_.a.func,onTempSharedCapacityChange:_.a.func};var Ma=ba,Sa=Gn.b.UNLIMITED,Ea=Gn.b.INDEPENDENT,ga=Gn.b.TICKET_TYPES,va=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),isDisabled:Gn.f.isTicketDisabled(e,t),sharedCapacity:Gn.f.getTicketsSharedCapacity(e),tempCapacity:Gn.f.getTicketTempCapacity(e,t),tempCapacityType:Gn.f.getTicketTempCapacityType(e,t),tempCapacityTypeOption:Gn.f.getTicketTempCapacityTypeOption(e,t),tempSharedCapacity:Gn.f.getTicketsTempSharedCapacity(e)}}),(function(e,t){var n=t.clientId;return{onTempCapacityChange:function(t){e(Gn.a.setTicketTempCapacity(n,t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityNoPlusChange:function(t){var r=t.target.value,a=""===da()(r)?ga[Sa]:ga[Ea];e(Gn.a.setTicketTempCapacityType(n,a)),e(Gn.a.setTicketTempCapacity(n,r)),e(Gn.a.setTicketHasChanges(n,!0))},onTempCapacityTypeChange:function(t){e(Gn.a.setTicketTempCapacityType(n,t.value)),e(Gn.a.setTicketHasChanges(n,!0))},onTempSharedCapacityChange:function(t){e(Gn.a.setTicketsTempSharedCapacity(t.target.value)),e(Gn.a.setTicketHasChanges(n,!0))}}})))(Ma),ka=(n(530),function(e){var t=e.hasDurationError,n=rt()(e,["hasDurationError"]);return wp.element.createElement("div",{className:he()("tribe-editor__ticket__duration","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--duration")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__duration-label-with-tooltip",label:Object(i.__)("Sale Duration","event-tickets"),tooltipText:Object(i.__)("If you do not set a start sale date, tickets will be available immediately.","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(be.DateTimeRangePicker,tt()({className:"tribe-editor__ticket__duration-picker"},n)),t&&wp.element.createElement("span",{className:"tribe-editor__ticket__duration-error"},Object(i.__)("There is an error with the selected sales duration. Please fix the issue before saving.","event-tickets")))});ka.propTypes={fromDate:_.a.instanceOf(Date),fromDateInput:_.a.string,fromDateDisabled:_.a.bool,fromTime:_.a.string,fromTimeDisabled:_.a.bool,hasDurationError:_.a.bool,onFromDateChange:_.a.func,onFromTimePickerBlur:_.a.func,onFromTimePickerChange:_.a.func,onFromTimePickerClick:_.a.func,onToDateChange:_.a.func,onToTimePickerBlur:_.a.func,onToTimePickerChange:_.a.func,onToTimePickerClick:_.a.func,toDate:_.a.instanceOf(Date),toDateInput:_.a.string,toDateDisabled:_.a.bool,toTime:_.a.string,toTimeDisabled:_.a.bool};var Da=ka,La=function(e,t){return function(n,r,a){e(Gn.a.handleTicketStartDate(t.clientId,n,a))}},Oa=function(e,t){return function(n){e(Gn.a.setTicketTempStartTimeInput(t.clientId,n.target.value))}},Ya=function(e,t){return function(n,r){e(Gn.a.handleTicketStartTime(t.clientId,n)),r()}},wa=function(e,t){return function(n,r,a){e(Gn.a.handleTicketEndDate(t.clientId,n,a))}},ja=function(e,t){return function(n){e(Gn.a.setTicketTempEndTimeInput(t.clientId,n.target.value))}},Ia=function(e,t){return function(n,r){e(Gn.a.handleTicketEndTime(t.clientId,n)),r()}},Pa=function(e,t,n){return function(r){var a=ot.moment.toMoment(r.target.value,ot.moment.TIME_FORMAT,!1);if(!a.isValid()){var i=Gn.f.getTicketStartTimeInput(e,n);a=ot.moment.toMoment(i,ot.moment.TIME_FORMAT,!1)}var o=ot.moment.totalSeconds(a);t(Gn.a.handleTicketStartTime(n.clientId,o))}},Ca=function(e,t,n){return function(r){var a=ot.moment.toMoment(r.target.value,ot.moment.TIME_FORMAT,!1);if(!a.isValid()){var i=Gn.f.getTicketEndTimeInput(e,n);a=ot.moment.toMoment(i,ot.moment.TIME_FORMAT,!1)}var o=ot.moment.totalSeconds(a);t(Gn.a.handleTicketEndTime(n.clientId,o))}},xa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=ot.globals.tecDateSettings().datepickerFormat?ot.moment.toFormat(ot.globals.tecDateSettings().datepickerFormat):"LL",r=Gn.f.isTicketDisabled(e,t),a=Gn.f.getTicketTempStartDateMoment(e,t),i=Gn.f.getTicketTempEndDateMoment(e,t),o=a&&a.toDate(),s=i&&i.toDate();return{fromDate:o,fromDateInput:Gn.f.getTicketTempStartDateInput(e,t),fromDateDisabled:r,fromDateFormat:n,fromTime:Gn.f.getTicketTempStartTimeInput(e,t),fromTimeDisabled:r,hasDurationError:Gn.f.getTicketHasDurationError(e,t),toDate:s,toDateInput:Gn.f.getTicketTempEndDateInput(e,t),toDateDisabled:r,toDateFormat:n,toTime:Gn.f.getTicketTempEndTimeInput(e,t),toTimeDisabled:r,state:e}}),(function(e,t){return{onFromDateChange:La(e,t),onFromTimePickerChange:Oa(e,t),onFromTimePickerClick:Ya(e,t),onToDateChange:wa(e,t),onToTimePickerChange:ja(e,t),onToTimePickerClick:Ia(e,t),dispatch:e}}),(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch,o=rt()(t,["dispatch"]);return tt()({},n,a,o,{onFromTimePickerBlur:Pa(r,i,n),onToTimePickerBlur:Ca(r,i,n)})})))(Da),Ra=(n(531),function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.id=Je()("ticket-sku"),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.sku,n=e.isDisabled,r=e.onChange;return wp.element.createElement("div",{className:he()("tribe-editor__ticket__sku","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--sku")},wp.element.createElement(be.LabelWithTooltip,{className:"tribe-editor__ticket__sku-label-with-tooltip",forId:this.id,isLabel:!0,label:Object(i.__)("Ticket SKU","event-tickets"),tooltipText:Object(i.__)("A unique identifying code for each ticket type you're selling","event-tickets"),tooltipLabel:wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__tooltip-label",icon:"info-outline"})}),wp.element.createElement(Re.Input,{className:"tribe-editor__ticket__sku-input",id:this.id,type:"text",value:t,onChange:r,disabled:n}))}}]),t}(u.PureComponent));Ra.propTypes={isDisabled:_.a.bool,onChange:_.a.func.isRequired,sku:_.a.string};var Aa=Ra,Ha=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),sku:Gn.f.getTicketTempSku(e,t)}}),(function(e,t){return{onChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempSku(r,n.target.value)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(Aa),Na=n(263),Va=n.n(Na),Fa=(n(532),Gn.b.EDD),Ka=Gn.b.WOO,Wa=Gn.b.PROVIDER_TYPES,Ua=["edit-ticket","report"],za=function(e){var t=e.editTicketLink,n=e.isDisabled,r=e.provider,a=e.reportLink,o=e.showEcommerceOptions,s=function(e){var o=he()("tribe-editor__ticket__ecommerce-options-link","tribe-editor__ticket__ecommerce-options-link--"+e),s="report"===e?a:t,c="report"===e?Object(i.__)("View Sales Report","event-tickets"):function(e){var t="";return e===Fa?t=Object(i.__)("Edit Ticket in Easy Digital Downloads","event-tickets"):e===Ka&&(t=Object(i.__)("Edit Ticket in WooCommerce","event-tickets")),t}(r);return n?wp.element.createElement("span",{className:o},c):wp.element.createElement(Re.Link,{className:o,href:s,target:"_blank"},c)};return o&&wp.element.createElement(Re.LabeledItem,{className:he()("tribe-editor__ticket__ecommerce-options","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--ecommerce-options"),label:Object(i.__)("Ecommerce","event-tickets")},wp.element.createElement("div",{className:"tribe-editor__ticket__ecommerce-options-links"},Ua.map((function(e){return wp.element.createElement("span",{key:e,className:"tribe-editor__ticket__ecommerce-options-link-wrapper"},s(e))}))))};za.propTypes={editTicketLink:_.a.string,isDisabled:_.a.bool,provider:_.a.oneOf([].concat(Va()(Wa),[""])),reportLink:_.a.string,showEcommerceOptions:_.a.bool};var Ga=za,Ba=Gn.b.EDD,qa=Gn.b.WOO,Ja=function(e){return _a()([Ba,qa],e)},$a=function(e,t,n){var r="";Ja(n)&&(r=ot.globals.adminUrl()+"post.php?post="+Gn.f.getTicketId(e,t)+"&action=edit");return r},Za=function(e,t,n){var r="";if(Ja(n)){var a=ot.globals.adminUrl(),i=Gn.f.getTicketId(e,t),o="";n===Ba?o="edit.php?page=edd-reports&view=sales&post_type=download&tab=logs&download="+i:n===qa&&(o="admin.php?page=wc-reports&tab=orders&report=sales_by_product&product_ids="+i),r=""+a+o}return r},Qa=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketProvider(e,t);return{isDisabled:Gn.f.isTicketDisabled(e,t),provider:n,editTicketLink:$a(e,t,n),reportLink:Za(e,t,n),showEcommerceOptions:Ja(n)}})))(Ga),Xa=(n(533),function(e){var t=e.moveTicket,n=e.removeTicket,r=e.isDisabled;return wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--move-delete"},wp.element.createElement(Re.Button,{type:"button",onClick:t,disabled:r},Object(i.__)("Move Ticket","event-tickets")),wp.element.createElement(Re.Button,{type:"button",onClick:n,disabled:r},Object(i.__)("Remove Ticket","event-tickets")))});Xa.propTypes={moveTicket:_.a.func.isRequired,removeTicket:_.a.func.isRequired,isDisabled:_.a.bool.isRequired};var ei=Xa,ti=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),ticketId:Gn.f.getTicketId(e,t)}}),(function(e,t){return{removeTicket:function(){e(Gn.a.deleteTicket(t.clientId))},moveTicket:function(n){return e(Object(Mt.c)(n,t.clientId))}}}),(function(e,t,n){return tt()({},e,t,n,{moveTicket:function(){return t.moveTicket(e.ticketId)}})})))(ei),ni=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getHeader=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__advanced-options-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__advanced-options-header-text"},Object(i.__)("Advanced Options","event-tickets")))},n.getContent=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(Ha,{clientId:n.props.clientId}),wp.element.createElement(Qa,{clientId:n.props.clientId}),n.props.hasBeenCreated&&wp.element.createElement(ti,{clientId:n.props.clientId}))},n.getRows=function(){return[{accordionId:n.accordionId,content:n.getContent(),contentClassName:"tribe-editor__ticket__advanced-options-content",header:n.getHeader(),headerAttrs:{disabled:n.props.isDisabled},headerClassName:"tribe-editor__ticket__advanced-options-header"}]},n.accordionId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){return wp.element.createElement(Re.Accordion,{className:"tribe-editor__ticket__advanced-options",rows:this.getRows()})}}]),t}(u.Component);ni.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool};var ri=ni,ai=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)}})))(ri),ii=(n(534),function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.id=Je()("ticket-iac"),n}return fe()(t,e),le()(t,[{key:"render",value:function(){var e=this.props,t=e.iac,n=e.iacOptions,r=e.isDisabled,a=e.onChange;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"tribe-editor__ticket__content-row--iac-setting-description"},Object(i.__)("Select the default way to sell tickets. Enabling Individual Attendee Collection will allow purchasers to enter a name and email for each ticket.","event-tickets")),wp.element.createElement("div",{className:he()("tribe-editor__ticket__iac-setting","tribe-editor__ticket__content-row","tribe-editor__ticket__content-row--iac-setting")},wp.element.createElement(ye.RadioControl,{className:"tribe-editor__ticket__iac-setting-input",id:this.id,type:"radio",selected:t,onChange:a,disabled:r,options:n})))}}]),t}(u.PureComponent));ii.propTypes={isDisabled:_.a.bool,onChange:_.a.func.isRequired,iac:_.a.string,iacOptions:_.a.arrayOf(_.a.shape({label:_.a.string,value:_.a.string}))};var oi=ii,si=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),iac:Gn.f.getTicketTempIACSetting(e,t),iacOptions:ot.globals.iacVars().iacOptions}}),(function(e,t){return{onChange:function(n){var r=t.clientId;e(Gn.a.setTicketTempIACSetting(r,n)),e(Gn.a.setTicketHasChanges(r,!0))}}})))(oi),ci=function(e){function t(e){ue()(this,t);var n=me()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getHeader=function(){return wp.element.createElement(u.Fragment,null,wp.element.createElement(ye.Dashicon,{className:"tribe-editor__ticket__attendee-collection-header-icon",icon:"arrow-down"}),wp.element.createElement("span",{className:"tribe-editor__ticket__attendee-collection-header-text"},Object(i.__)("Attendee Collection","event-tickets")))},n.getContent=function(){return wp.element.createElement(si,{clientId:n.props.clientId})},n.getRows=function(){return[{accordionId:n.accordionId,content:n.getContent(),contentClassName:"tribe-editor__ticket__attendee-collection-content",header:n.getHeader(),headerAttrs:{disabled:n.props.isDisabled},headerClassName:"tribe-editor__ticket__attendee-collection-header"}]},n.accordionId=Je()(),n}return fe()(t,e),le()(t,[{key:"render",value:function(){return wp.element.createElement(Re.Accordion,{className:"tribe-editor__ticket__attendee-collection",rows:this.getRows()})}}]),t}(u.PureComponent);ci.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,hasBeenCreated:_.a.bool};var ui=ci,di=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t)}})))(ui),li=(n(535),Object(i.__)("+ Add","event-tickets")),_i=Object(i.__)("Edit","event-tickets"),mi=function(e){var t=e.attendeeRegistrationURL,n=e.hasAttendeeInfoFields,r=e.isCreated,a=e.isDisabled,o=e.isModalOpen,s=e.onClick,c=e.onClose,u=e.onIframeLoad,d=n?_i:li;return wp.element.createElement(be.AttendeesRegistration,{helperText:Object(i.__)("Save your ticket to enable attendee information fields","event-tickets"),iframeURL:t,isDisabled:a,isModalOpen:o,label:Object(i.__)("Attendee Information","event-tickets"),linkText:d,modalTitle:Object(i.__)("Attendee Information","event-tickets"),onClick:s,onClose:c,onIframeLoad:u,showHelperText:!r,shouldCloseOnClickOutside:!1})};mi.propTypes={attendeeRegistrationURL:_.a.string.isRequired,hasAttendeeInfoFields:_.a.bool.isRequired,isCreated:_.a.bool.isRequired,isDisabled:_.a.bool.isRequired,isModalOpen:_.a.bool.isRequired,onClick:_.a.func.isRequired,onClose:_.a.func.isRequired,onIframeLoad:_.a.func.isRequired};var pi=mi,fi=function(e,t){return ot.globals.adminUrl()+"edit.php?post_type="+Object(se.select)("core/editor").getCurrentPostType()+"&page=attendee-registration&ticket_id="+Gn.f.getTicketId(e,t)+"&tribe_events_modal=1"},Ti=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){var n=Gn.f.getTicketHasBeenCreated(e,t);return{attendeeRegistrationURL:fi(e,t),hasAttendeeInfoFields:Gn.f.getTicketHasAttendeeInfoFields(e,t),isCreated:n,isDisabled:Gn.f.isTicketDisabled(e,t)||!n,isModalOpen:Gn.f.getTicketIsModalOpen(e,t)}}),(function(e,t){return{onClick:function(){e(Gn.a.setTicketIsModalOpen(t.clientId,!0))},onClose:function(n){n.target.classList.contains("components-modal__content")||e(Gn.a.setTicketIsModalOpen(t.clientId,!1)),"click"===n.type&&n.target.classList.contains("components-modal__screen-overlay")&&e(Gn.a.setTicketIsModalOpen(t.clientId,!1))},onIframeLoad:function(n){var r=n.contentWindow,a=function(){n.nextSibling.classList.add("tribe-editor__attendee-registration__modal-overlay--show")},i=r.document.querySelector("#event-tickets-attendee-information");i.addEventListener("submit",a);var o=function(){r.removeEventListener("unload",s),i.removeEventListener("submit",a)},s=function(){o();var n=r.document.querySelector("#tribe-tickets-attendee-sortables"),a=Boolean(n.firstElementChild);e(Gn.a.setTicketHasAttendeeInfoFields(t.clientId,a)),e(Gn.a.setTicketIsModalOpen(t.clientId,!1))};r.addEventListener("unload",s);var c=r.document.querySelector(".tribe-intro > a");c&&c.setAttribute("target","_blank")}}})))(pi),hi=(n(536),function(e){var t=e.clientId,n=e.hasTicketsPlus,r=e.hasIacVars;return wp.element.createElement(u.Fragment,null,wp.element.createElement(va,{clientId:t}),wp.element.createElement(xa,{clientId:t}),wp.element.createElement(ai,{clientId:t}),n&&r&&wp.element.createElement(di,{clientId:t}),n&&wp.element.createElement(Ti,{clientId:t}))});hi.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool};var yi=hi,bi=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),hasIacVars:!Pn()(ot.globals.iacVars())}})))(yi),Mi=function(e){return e.isDisabled?wp.element.createElement(o.ClockInactive,null):wp.element.createElement(o.ClockActive,null)},Si=function(e){return e.isDisabled?wp.element.createElement(o.TicketInactive,null):wp.element.createElement(o.TicketActive,null)},Ei=function(e){var t=e.isDisabled,n=e.isFuture,r=e.isPast;return n||r?wp.element.createElement(Mi,{isDisabled:t}):wp.element.createElement(Si,{isDisabled:t})};Ei.propTypes={isDisabled:_.a.bool.isRequired,isFuture:_.a.bool,isPast:_.a.bool};var gi=function(e){var t=e.clientId,n=e.isDisabled,r=e.isFuture,a=e.isPast,i=e.isSelected;return wp.element.createElement(be.ContainerPanel,{className:"tribe-editor__ticket__container",layout:Me.a.ticket,icon:wp.element.createElement(Ei,{isDisabled:n,isFuture:r,isPast:a}),header:wp.element.createElement(ca,{clientId:t,isSelected:i}),content:wp.element.createElement(bi,{clientId:t})})};gi.propTypes={clientId:_.a.string.isRequired,isDisabled:_.a.bool,isFuture:_.a.bool,isPast:_.a.bool,isSelected:_.a.bool};var vi=gi,ki=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{isDisabled:Gn.f.isTicketDisabled(e,t),isFuture:Gn.f.isTicketFuture(e,t),isPast:Gn.f.isTicketPast(e,t)}})))(vi),Di=(n(537),function(e){return e?Object(i.__)("Update Ticket","event-tickets"):Object(i.__)("Create Ticket","event-tickets")}),Li=Object(i.__)("Cancel","event-tickets"),Oi=function(e){var t=e.hasBeenCreated,n=e.isCancelDisabled,r=e.isConfirmDisabled,a=e.onCancelClick,i=e.onConfirmClick;return wp.element.createElement(be.ActionDashboard,{className:"tribe-editor__ticket__dashboard",cancelLabel:Li,confirmLabel:Di(t),isCancelDisabled:n,isConfirmDisabled:r,onCancelClick:a,onConfirmClick:i})};Oi.propTypes={hasBeenCreated:_.a.bool,isCancelDisabled:_.a.bool,isConfirmDisabled:_.a.bool,onCancelClick:_.a.func,onConfirmClick:_.a.func};var Yi=Oi,wi=function(e,t){return!Gn.f.isTicketValid(e,t)||!Gn.f.getTicketHasChanges(e,t)||Gn.f.isTicketDisabled(e,t)||Gn.f.getTicketHasDurationError(e,t)},ji=function(e,t,n){return function(){Gn.f.getTicketHasBeenCreated(e,n)?(t(Gn.a.setTicketTempDetails(n.clientId,{title:Gn.f.getTicketTitle(e,n),description:Gn.f.getTicketDescription(e,n),price:Gn.f.getTicketPrice(e,n),sku:Gn.f.getTicketSku(e,n),iac:Gn.f.getTicketIACSetting(e,n),startDate:Gn.f.getTicketStartDate(e,n),startDateInput:Gn.f.getTicketStartDateInput(e,n),startDateMoment:Gn.f.getTicketStartDateMoment(e,n),endDate:Gn.f.getTicketEndDate(e,n),endDateInput:Gn.f.getTicketEndDateInput(e,n),endDateMoment:Gn.f.getTicketEndDateMoment(e,n),startTime:Gn.f.getTicketStartTime(e,n),endTime:Gn.f.getTicketEndTime(e,n),startTimeInput:Gn.f.getTicketStartTimeInput(e,n),endTimeInput:Gn.f.getTicketEndTimeInput(e,n),capacityType:Gn.f.getTicketCapacityType(e,n),capacity:Gn.f.getTicketCapacity(e,n)})),t(Gn.a.setTicketsTempSharedCapacity(Gn.f.getTicketsSharedCapacity(e))),t(Gn.a.setTicketHasChanges(n.clientId,!1))):(t(Gn.a.removeTicketBlock(n.clientId)),Object(se.dispatch)("core/editor").removeBlocks(n.clientId)),Object(se.dispatch)("core/editor").clearSelectedBlock()}},Ii=function(e,t,n){return function(){return Gn.f.getTicketHasBeenCreated(e,n)?t(Gn.a.updateTicket(n.clientId)):t(Gn.a.createNewTicket(n.clientId))}},Pi=Object(P.c)(Object(Ve.withStore)(),ae((function(e,t){return{hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isCancelDisabled:Gn.f.isTicketDisabled(e,t),isConfirmDisabled:wi(e,t),state:e}}),null,(function(e,t,n){var r=e.state,a=rt()(e,["state"]),i=t.dispatch;return tt()({},n,a,{onCancelClick:ji(r,i,n),onConfirmClick:Ii(r,i,n)})})))(Yi),Ci=function(e){function t(){return ue()(this,t),me()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return fe()(t,e),le()(t,[{key:"componentDidMount",value:function(){this.props.onBlockUpdate(this.props.isSelected)}},{key:"componentDidUpdate",value:function(e){e.isSelected!==this.props.isSelected&&this.props.onBlockUpdate(this.props.isSelected)}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.hasTicketsPlus,r=e.isDisabled,a=e.isLoading,i=e.isSelected,o=e.isModalShowing;return e.showTicket?wp.element.createElement(u.Fragment,null,wp.element.createElement("article",{className:he()("tribe-editor__ticket",{"tribe-editor__ticket--disabled":r},{"tribe-editor__ticket--selected":i},{"tribe-editor__ticket--has-tickets-plus":n})},wp.element.createElement(ki,{clientId:t,isSelected:i}),wp.element.createElement(Pi,{clientId:t,isSelected:i}),a&&wp.element.createElement(ye.Spinner,null)),o&&wp.element.createElement(gn,null)):null}}]),t}(u.PureComponent);Ci.propTypes={clientId:_.a.string.isRequired,hasTicketsPlus:_.a.bool,isDisabled:_.a.bool,isLoading:_.a.bool,isModalShowing:_.a.bool,isSelected:_.a.bool,onBlockUpdate:_.a.func,removeTicketBlock:_.a.func,showTicket:_.a.bool};var xi=Ci,Ri=function(e,t){return Gn.f.getTicketsIsSelected(e)||Gn.f.hasATicketSelected(e)||Gn.f.isTicketOnSale(e,t)},Ai=Object(P.c)(Object(Ve.withStore)({isolated:!0}),ae((function(e,t){return{hasTicketsPlus:Pt.plugins.selectors.hasPlugin(e)(Pt.plugins.constants.TICKETS_PLUS),hasBeenCreated:Gn.f.getTicketHasBeenCreated(e,t),isDisabled:Gn.f.isTicketDisabled(e,t),isLoading:Gn.f.getTicketIsLoading(e,t),isModalShowing:Object(bn.l)(e),modalTicketId:Object(bn.e)(e),showTicket:Ri(e,t),ticketId:Gn.f.getTicketId(e,t)}}),(function(e,t){var n=t.clientId;return{onBlockUpdate:function(t){return e(Gn.a.setTicketIsSelected(n,t))},setInitialState:function(t){e(Gn.a.registerTicketBlock(n)),e(Gn.a.setTicketInitialState(t))}}}),(function(e,t,n){return tt()({},e,t,n,{isModalShowing:e.isModalShowing&&e.modalTicketId===e.ticketId})})),An())(xi),Hi={id:"tickets-item",title:Object(i.__)("Event Ticket","event-tickets"),description:Object(i.__)("A single configured ticket type.","event-tickets"),icon:wp.element.createElement(o.Tickets,null),category:"tribe-tickets",keywords:["event","event-tickets","tribe"],parent:["tribe/tickets"],supports:{html:!1,customClassName:!1},attributes:{hasBeenCreated:{type:"boolean",default:!1},ticketId:{type:"integer",default:0}},edit:Ai,save:function(){return wp.element.createElement("div",null,wp.element.createElement(Wn.InnerBlocks.Content,null))}},Ni=n(55),Vi=n(109),Fi=(n(538),Object(i.__)("Who's Attending?","event-tickets")),Ki=Object(i.__)("(X) people are attending this event","event-tickets"),Wi=function(){return wp.element.createElement("div",{className:"tribe-editor__event-attendees__gravatars"},wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null),wp.element.createElement(o.AttendeesGravatar,null))},Ui=function(){return wp.element.createElement("div",{className:"tribe-editor__event-attendees__subtitle"},wp.element.createElement("p",null,Ki))},zi=function(e){var t=e.isSelected,n=e.title,r=e.displayTitle,a=e.displaySubtitle,i=t||n?function(e){var t=e.isSelected,n=e.isEmpty,r=e.title,a=e.setTitle,i=he()({"tribe-editor__event-attendees__title":!0,"tribe-editor__event-attendees__title--selected":t}),o=he()({"tribe-editor__event-attendees__title-text":!0,"tribe-editor__event-attendees__title-text--empty":n&&t});return wp.element.createElement("div",{key:"tribe-events-attendees-label",className:i},wp.element.createElement(Ee.a,{id:"tribe-events-attendees-link",className:o,value:r,placeholder:Fi,onChange:a}))}(e):wp.element.createElement("span",{className:he()(["tribe-editor__event-attendees__title","tribe-editor__event-attendees__title--placeholder"])},Fi);return wp.element.createElement("div",{className:"tribe-editor__block tribe-editor__event-attendees"},r?i:"",a?wp.element.createElement(Ui,null):"",wp.element.createElement(Wi,null))},Gi=function(e){var t=e.isSelected,n=e.displayTitle,r=e.displaySubtitle,a=e.onSetDisplayTitleChange,o=e.onSetDisplaySubtitleChange;return t&&wp.element.createElement(Wn.InspectorControls,{key:"inspector"},wp.element.createElement(ye.PanelBody,{title:Object(i.__)("Attendees Settings","event-tickets")},wp.element.createElement(ye.ToggleControl,{label:Object(i.__)("Display Title","event-tickets"),checked:n,onChange:a}),wp.element.createElement(ye.ToggleControl,{label:Object(i.__)("Display Subtitle","event-tickets"),checked:r,onChange:o})))},Bi=function(e){return wp.element.createElement(u.Fragment,null,wp.element.createElement(zi,e),wp.element.createElement(Gi,e))};Bi.propTypes={setTitle:_.a.func,title:_.a.string,isSelected:_.a.bool,isEmpty:_.a.bool,displayTitle:_.a.bool,displaySubtitle:_.a.bool,onSetDisplaySubtitleChange:_.a.func,onSetDisplayTitleChange:_.a.func};var qi=Bi,Ji=Object(P.c)(Object(Ve.withStore)(),ae((function(e){return{title:Vi.c(e),displayTitle:Vi.b(e),displaySubtitle:Vi.a(e)}}),(function(e){return{setInitialState:function(t){return e(Ni.c(t))},setTitle:function(t){return e(Ni.d(t.target.value))},onSetDisplayTitleChange:function(t){return e(Ni.b(t))},onSetDisplaySubtitleChange:function(t){return e(Ni.a(t))}}})),An())(qi),$i=[Kn,Vr,Hi,{id:"attendees",title:Object(i.__)("Attendee List","event-tickets"),description:Object(i.__)("Show the gravatars of people coming to this event.","event-tickets"),icon:wp.element.createElement(o.Attendees,null),category:"tribe-tickets",keywords:["event","events-gutenberg","tribe"],supports:{html:!1,customClassName:!1},attributes:{title:{type:"html",default:Object(i.__)("Who's Attending?","event-tickets")},displayTitle:{type:"boolean",default:!0},displaySubtitle:{type:"boolean",default:!0}},edit:Ji,save:function(){return null}}];$i.forEach((function(e){return Object(r.registerBlockType)("tribe/"+e.id,e)})),Object(a.initStore)();t.default=$i}]);
src/resources/js/tickets-attendees.js CHANGED
@@ -39,7 +39,7 @@ var tribe_event_tickets_attendees = tribe_event_tickets_attendees || {};
39
  var $table = $( 'table.wp-list-table.attendees' ),
40
  $visible_columns = $table.find( 'thead th:visible' ).length,
41
  $header_and_data = $table.find( 'th,td' ),
42
- hidden_in_print = 2;
43
 
44
  // make the visible columns stretch to fill the available width
45
  $header_and_data.css( {'width': 100 / ($visible_columns - hidden_in_print) + '%'} );
39
  var $table = $( 'table.wp-list-table.attendees' ),
40
  $visible_columns = $table.find( 'thead th:visible' ).length,
41
  $header_and_data = $table.find( 'th,td' ),
42
+ hidden_in_print = 3;
43
 
44
  // make the visible columns stretch to fill the available width
45
  $header_and_data.css( {'width': 100 / ($visible_columns - hidden_in_print) + '%'} );
src/resources/js/tickets-attendees.min.js CHANGED
@@ -1 +1 @@
1
- var tribe_event_tickets_attendees=tribe_event_tickets_attendees||{};!function(t,e){e.count_columns=function(e){var n=0,i=e.find("td, th");return i.length?(i.each(function(){var e=parseInt(t(this).attr("colspan"),10);n+=1+(e=e>1?e-1:0)}),n):0},e.remove_tickets=function(e){t("#the-list").find("tr").each(function(){var n=t(this),i=n.find(".check-column").find("input").val();if("string"==typeof i){var a=i.match(/^[0-9]+/);a.length&&-1!==e.indexOf(parseInt(a[0],10))&&n.remove()}})},t(function(){"undefined"!=typeof AttendeesPointer&&AttendeesPointer.length&&(options=t.extend(AttendeesPointer.options,{close:function(){t.post(Attendees.ajaxurl,{pointer:AttendeesPointer.pointer_id,action:"dismiss-wp-pointer"})},open:function(t,e){e.pointer.css({top:parseInt(e.pointer.css("top").replace("px",""),10)+5}).find(".wp-pointer-arrow").css({right:"50px",left:"auto"}),e.element.on({click:function(){e.element.pointer("close")}})}}),t(AttendeesPointer.target).pointer(options).pointer("open").pointer("widget"));function n(e){t.isArray(e)||(e=[e]);var n=parseInt(.7*t(window).width(),10);n=n>800?800:n;var i=parseInt(.9*t(window).height(),10);i=i>800?800:i;var a="&ticket_ids="+e.join("|")+"&width="+n+"&height="+i,o=Attendees.move_url.replace("&TB_",a+"&TB_");tb_show(null,o,!1)}var i,a;t("input.print").on("click",function(){t(window).trigger("attendees-report-before-print.tribe-tickets");var e=t("table.wp-list-table.attendees"),n=e.find("thead th:visible").length,i=e.find("th,td");i.css({width:100/(n-2)+"%"}),window.print(),i.css({width:""}),t(window).trigger("attendees-report-after-print.tribe-tickets")}),t(".tribe-attendees-email").on({submit:function(e){t(".tribe-attendees-email").hide(),t(document.getElementById("tribe-loading")).show()}}),t("span.trash a").on("click",function(t){return confirm(Attendees.confirmation)}),t(".event-tickets__attendees-admin-form").on("submit",function(e){if("delete_attendee"===t("#bulk-action-selector-top").val()&&t(this).serialize().includes("&attendee"))return confirm(Attendees.bulk_confirmation)}),t(".tickets_checkin").on("click",function(e){var n=jQuery(this);n.prop("disabled",!0);var i={action:"tribe-ticket-checkin",provider:n.attr("data-provider"),attendee_id:n.attr("data-attendee-id"),nonce:Attendees.checkin_nonce};n.attr("data-event-id")&&(i.event_ID=n.attr("data-event-id")),t.post(Attendees.ajaxurl,i,function(e){e.success&&(n.closest("tr").addClass("tickets_checked"),t("#total_checkedin").text(parseInt(t("#total_checkedin").text())+1)),n.prop("disabled",!1)},"json"),e.preventDefault()}),t(".tickets_uncheckin").on("click",function(e){var n=jQuery(this);n.prop("disabled",!0);var i={action:"tribe-ticket-uncheckin",provider:n.attr("data-provider"),attendee_id:n.attr("data-attendee-id"),nonce:Attendees.uncheckin_nonce};n.attr("data-event-id")&&(i.event_ID=n.attr("data-event-id")),t.post(Attendees.ajaxurl,i,function(e){e.success&&(n.closest("tr").removeClass("tickets_checked"),t("#total_checkedin").text(parseInt(t("#total_checkedin").text())-1)),n.prop("disabled",!1)},"json"),e.preventDefault()}),t("table.wp-list-table").on("click",".row-actions .move-ticket",function(e){var i=t(this).parents("tr").find('input[name="attendee[]"]').val().match(/^[0-9]+/);return i&&n(i),e.stopPropagation(),!1}),t("#doaction, #doaction2").on("click",function(e){var i;switch(t(e.currentTarget).attr("id")){case"doaction":i="action";break;case"doaction2":i="action2"}if(void 0!==i&&"move"===t('select[name="'+i+'"]').val()){var a=jQuery('input[name="attendee[]"]:checked');if(a.length){var o=[];a.each(function(){var e=t(this).val().match(/^[0-9]+/);e&&o.push(e.toString())}),n(o)}else alert(Attendees.cannot_move);return e.stopPropagation(),!1}}),i=t(".ticket-history"),(a=t(".hide-ticket-history")).hide(),i.on("click",function(n){var i=t(this),a=i.siblings(".hide-ticket-history"),o=parseInt(i.data("ticket-id"),10),r=i.data("check");if(o&&r){var c,s=t(document.getElementById("ticket-history-"+o));return s.length?(s.show(),i.hide(),a.show()):(c={action:"get_ticket_history",check:r,ticket_id:o},t.post(Attendees.ajaxurl,c,function(n){if(void 0!==n.data&&"string"==typeof n.data.html){var r=i.parents("tr"),c=e.count_columns(r),s=t('<tr id="ticket-history-'+o+'"> <td colspan="'+c+'">'+n.data.html+"</td></tr>");s.hide().insertAfter(r).slideDown(),i.hide(),a.show()}})),n.stopPropagation(),!1}}),a.on("click",function(e){var n=t(this),i=n.siblings(".ticket-history"),a=parseInt(i.data("ticket-id"),10);t(document.getElementById("ticket-history-"+a)).hide(),i.show(),n.hide()})})}(jQuery,tribe_event_tickets_attendees);
1
+ var tribe_event_tickets_attendees=tribe_event_tickets_attendees||{};!function(t,e){e.count_columns=function(e){var n=0,i=e.find("td, th");return i.length?(i.each(function(){var e=parseInt(t(this).attr("colspan"),10);n+=1+(e=e>1?e-1:0)}),n):0},e.remove_tickets=function(e){t("#the-list").find("tr").each(function(){var n=t(this),i=n.find(".check-column").find("input").val();if("string"==typeof i){var a=i.match(/^[0-9]+/);a.length&&-1!==e.indexOf(parseInt(a[0],10))&&n.remove()}})},t(function(){"undefined"!=typeof AttendeesPointer&&AttendeesPointer.length&&(options=t.extend(AttendeesPointer.options,{close:function(){t.post(Attendees.ajaxurl,{pointer:AttendeesPointer.pointer_id,action:"dismiss-wp-pointer"})},open:function(t,e){e.pointer.css({top:parseInt(e.pointer.css("top").replace("px",""),10)+5}).find(".wp-pointer-arrow").css({right:"50px",left:"auto"}),e.element.on({click:function(){e.element.pointer("close")}})}}),t(AttendeesPointer.target).pointer(options).pointer("open").pointer("widget"));function n(e){t.isArray(e)||(e=[e]);var n=parseInt(.7*t(window).width(),10);n=n>800?800:n;var i=parseInt(.9*t(window).height(),10);i=i>800?800:i;var a="&ticket_ids="+e.join("|")+"&width="+n+"&height="+i,o=Attendees.move_url.replace("&TB_",a+"&TB_");tb_show(null,o,!1)}var i,a;t("input.print").on("click",function(){t(window).trigger("attendees-report-before-print.tribe-tickets");var e=t("table.wp-list-table.attendees"),n=e.find("thead th:visible").length,i=e.find("th,td");i.css({width:100/(n-3)+"%"}),window.print(),i.css({width:""}),t(window).trigger("attendees-report-after-print.tribe-tickets")}),t(".tribe-attendees-email").on({submit:function(e){t(".tribe-attendees-email").hide(),t(document.getElementById("tribe-loading")).show()}}),t("span.trash a").on("click",function(t){return confirm(Attendees.confirmation)}),t(".event-tickets__attendees-admin-form").on("submit",function(e){if("delete_attendee"===t("#bulk-action-selector-top").val()&&t(this).serialize().includes("&attendee"))return confirm(Attendees.bulk_confirmation)}),t(".tickets_checkin").on("click",function(e){var n=jQuery(this);n.prop("disabled",!0);var i={action:"tribe-ticket-checkin",provider:n.attr("data-provider"),attendee_id:n.attr("data-attendee-id"),nonce:Attendees.checkin_nonce};n.attr("data-event-id")&&(i.event_ID=n.attr("data-event-id")),t.post(Attendees.ajaxurl,i,function(e){e.success&&(n.closest("tr").addClass("tickets_checked"),t("#total_checkedin").text(parseInt(t("#total_checkedin").text())+1)),n.prop("disabled",!1)},"json"),e.preventDefault()}),t(".tickets_uncheckin").on("click",function(e){var n=jQuery(this);n.prop("disabled",!0);var i={action:"tribe-ticket-uncheckin",provider:n.attr("data-provider"),attendee_id:n.attr("data-attendee-id"),nonce:Attendees.uncheckin_nonce};n.attr("data-event-id")&&(i.event_ID=n.attr("data-event-id")),t.post(Attendees.ajaxurl,i,function(e){e.success&&(n.closest("tr").removeClass("tickets_checked"),t("#total_checkedin").text(parseInt(t("#total_checkedin").text())-1)),n.prop("disabled",!1)},"json"),e.preventDefault()}),t("table.wp-list-table").on("click",".row-actions .move-ticket",function(e){var i=t(this).parents("tr").find('input[name="attendee[]"]').val().match(/^[0-9]+/);return i&&n(i),e.stopPropagation(),!1}),t("#doaction, #doaction2").on("click",function(e){var i;switch(t(e.currentTarget).attr("id")){case"doaction":i="action";break;case"doaction2":i="action2"}if(void 0!==i&&"move"===t('select[name="'+i+'"]').val()){var a=jQuery('input[name="attendee[]"]:checked');if(a.length){var o=[];a.each(function(){var e=t(this).val().match(/^[0-9]+/);e&&o.push(e.toString())}),n(o)}else alert(Attendees.cannot_move);return e.stopPropagation(),!1}}),i=t(".ticket-history"),(a=t(".hide-ticket-history")).hide(),i.on("click",function(n){var i=t(this),a=i.siblings(".hide-ticket-history"),o=parseInt(i.data("ticket-id"),10),r=i.data("check");if(o&&r){var c,s=t(document.getElementById("ticket-history-"+o));return s.length?(s.show(),i.hide(),a.show()):(c={action:"get_ticket_history",check:r,ticket_id:o},t.post(Attendees.ajaxurl,c,function(n){if(void 0!==n.data&&"string"==typeof n.data.html){var r=i.parents("tr"),c=e.count_columns(r),s=t('<tr id="ticket-history-'+o+'"> <td colspan="'+c+'">'+n.data.html+"</td></tr>");s.hide().insertAfter(r).slideDown(),i.hide(),a.show()}})),n.stopPropagation(),!1}}),a.on("click",function(e){var n=t(this),i=n.siblings(".ticket-history"),a=parseInt(i.data("ticket-id"),10);t(document.getElementById("ticket-history-"+a)).hide(),i.show(),n.hide()})})}(jQuery,tribe_event_tickets_attendees);
src/resources/postcss/tickets-report-print.pcss CHANGED
@@ -5,6 +5,7 @@
5
  #wpfooter,
6
  .check-column,
7
  .column-check_in,
 
8
  #total_checkedin_wrapper,
9
  .column-meta_details,
10
  #show-settings-link,
5
  #wpfooter,
6
  .check-column,
7
  .column-check_in,
8
+ .column-edit_attendee,
9
  #total_checkedin_wrapper,
10
  .column-meta_details,
11
  #show-settings-link,
src/resources/postcss/tickets-tables.pcss CHANGED
@@ -123,11 +123,12 @@
123
  }
124
 
125
  .ticket_edit {
126
- width: 30px;
127
  }
128
 
129
  /* Edit button styles - separate for portability */
130
  .ticket_edit_button,
 
131
  .global_capacity_edit_button {
132
  background: none;
133
  border: 0;
@@ -136,20 +137,31 @@
136
  padding: 0;
137
 
138
  &:hover {
139
- color: #00a0d2;
140
  }
141
 
142
  .ticket_edit_text,
143
- .global_capacity_edit_text {
 
144
  font-size: 0;
145
 
146
- &::before {
147
  content: '\f464';
148
  font-family: 'dashicons';
149
- font-size: x-large;
150
  vertical-align: top;
151
  }
152
  }
 
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  .global_capacity_edit_button {
123
  }
124
 
125
  .ticket_edit {
126
+ width: 60px;
127
  }
128
 
129
  /* Edit button styles - separate for portability */
130
  .ticket_edit_button,
131
+ .ticket_delete,
132
  .global_capacity_edit_button {
133
  background: none;
134
  border: 0;
137
  padding: 0;
138
 
139
  &:hover {
140
+ color: #727272;
141
  }
142
 
143
  .ticket_edit_text,
144
+ .global_capacity_edit_text,
145
+ .ticket_delete_text {
146
  font-size: 0;
147
 
148
+ &:before {
149
  content: '\f464';
150
  font-family: 'dashicons';
151
+ font-size: 20px;
152
  vertical-align: top;
153
  }
154
  }
155
+
156
+ .ticket_delete_text {
157
+ &:before {
158
+ content: '\f182';
159
+ }
160
+ }
161
+ }
162
+
163
+ .ticket_delete {
164
+ margin-left: 12px;
165
  }
166
 
167
  .global_capacity_edit_button {
src/views/tickets/email.php CHANGED
@@ -46,11 +46,13 @@
46
  * @since 4.7.6 Ability to filter ticket image.
47
  * @since 4.10.9 Use function for text.
48
  * @since 5.0.3 Update comments for single ticket array.
 
49
  *
50
- * @version 5.0.3
51
  *
52
  * @var array $tickets An array of tickets in the format documented above.
53
  */
 
54
  ?>
55
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
56
  <html xmlns="http://www.w3.org/1999/xhtml">
@@ -447,7 +449,7 @@
447
  <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php echo $ticket['ticket_name']; ?></span>
448
  </td>
449
  <td class="ticket-details" valign="top" align="left" width="120" style="padding: 0 !important; width:120px; margin:0 !important;">
450
- <h6 style="color:#909090 !important; margin:0 0 10px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important;"><?php esc_html_e( 'Purchaser', 'event-tickets' ); ?></h6>
451
  <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php echo $ticket['holder_name']; ?></span>
452
  </td>
453
  <td class="ticket-details new-row new-left-row" valign="top" align="left" width="120" style="padding: 0; width:120px; margin:0 !important;">
46
  * @since 4.7.6 Ability to filter ticket image.
47
  * @since 4.10.9 Use function for text.
48
  * @since 5.0.3 Update comments for single ticket array.
49
+ * @since 5.1.7 Changed the word `Purchaser` to `Attendee` in the ticket details.
50
  *
51
+ * @version 5.1.7
52
  *
53
  * @var array $tickets An array of tickets in the format documented above.
54
  */
55
+
56
  ?>
57
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
58
  <html xmlns="http://www.w3.org/1999/xhtml">
449
  <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php echo $ticket['ticket_name']; ?></span>
450
  </td>
451
  <td class="ticket-details" valign="top" align="left" width="120" style="padding: 0 !important; width:120px; margin:0 !important;">
452
+ <h6 style="color:#909090 !important; margin:0 0 10px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important;"><?php esc_html_e( 'Attendee', 'event-tickets' ); ?></h6>
453
  <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php echo $ticket['holder_name']; ?></span>
454
  </td>
455
  <td class="ticket-details new-row new-left-row" valign="top" align="left" width="120" style="padding: 0; width:120px; margin:0 !important;">
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInite5f624b5332bfb4f841080a8eb73bd2d::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit07e5cda9dc500c8f528b296fec2275bb::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInite5f624b5332bfb4f841080a8eb73bd2d
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInite5f624b5332bfb4f841080a8eb73bd2d
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInite5f624b5332bfb4f841080a8eb73bd2d', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInite5f624b5332bfb4f841080a8eb73bd2d', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit07e5cda9dc500c8f528b296fec2275bb
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit07e5cda9dc500c8f528b296fec2275bb', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit07e5cda9dc500c8f528b296fec2275bb', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit07e5cda9dc500c8f528b296fec2275bb::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
@@ -177,9 +177,9 @@ class ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d
177
  public static function getInitializer(ClassLoader $loader)
178
  {
179
  return \Closure::bind(function () use ($loader) {
180
- $loader->prefixLengthsPsr4 = ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d::$prefixLengthsPsr4;
181
- $loader->prefixDirsPsr4 = ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d::$prefixDirsPsr4;
182
- $loader->classMap = ComposerStaticInite5f624b5332bfb4f841080a8eb73bd2d::$classMap;
183
 
184
  }, null, ClassLoader::class);
185
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit07e5cda9dc500c8f528b296fec2275bb
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
177
  public static function getInitializer(ClassLoader $loader)
178
  {
179
  return \Closure::bind(function () use ($loader) {
180
+ $loader->prefixLengthsPsr4 = ComposerStaticInit07e5cda9dc500c8f528b296fec2275bb::$prefixLengthsPsr4;
181
+ $loader->prefixDirsPsr4 = ComposerStaticInit07e5cda9dc500c8f528b296fec2275bb::$prefixDirsPsr4;
182
+ $loader->classMap = ComposerStaticInit07e5cda9dc500c8f528b296fec2275bb::$classMap;
183
 
184
  }, null, ClassLoader::class);
185
  }