Version Description
- 2019-01-08 =
- Fixed: possible conflict with other plugins using webpack. Thanks, Julien;
- Fixed: creating a new WooCommerce email now defaults to the Woo template page tab instead of standard templates tab;
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (New) |
Version | 3.17.2 |
Comparing to | |
See all releases |
Code changes from version 3.17.1 to 3.17.2
- assets/css/{admin.2b483264.css → admin.6bc44435.css} +5 -41
- assets/css/manifest.json +3 -3
- assets/css/{newsletter_editor.d9d8c341.css → newsletter_editor.6aeaa8ed.css} +0 -62
- assets/css/{public.cae357df.css → public.3f0def3b.css} +0 -3
- assets/js/admin.169f324b.js +0 -6
- assets/js/admin.266a2f4c.js +6 -0
- assets/js/{admin_vendor.169f324b.js → admin_vendor.266a2f4c.js} +1 -1
assets/css/{admin.2b483264.css → admin.6bc44435.css}
RENAMED
@@ -2011,8 +2011,8 @@ span.CodeMirror-selectedtext { background: none; }
|
|
2011 |
border: 1px solid #ccc;
|
2012 |
position: relative;
|
2013 |
background-color: #fff;
|
2014 |
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2) inset 0 0 20px rgba(0,0,0,0.1);
|
2015 |
-
box-shadow: 0 0 5px rgba(0,0,0,0.2) inset 0 0 20px rgba(0,0,0,0.1);
|
2016 |
}
|
2017 |
#mailpoet_form_editor:before,
|
2018 |
#mailpoet_form_editor:after {
|
@@ -2024,16 +2024,12 @@ span.CodeMirror-selectedtext { background: none; }
|
|
2024 |
bottom: 12px;
|
2025 |
background: transparent;
|
2026 |
-webkit-transform: skew(-5deg) rotate(-5deg);
|
2027 |
-
-moz-transform: skew(-5deg) rotate(-5deg);
|
2028 |
-ms-transform: skew(-5deg) rotate(-5deg);
|
2029 |
-
-o-transform: skew(-5deg) rotate(-5deg);
|
2030 |
-webkit-transform: skew(-5deg) rotate(-5deg);
|
2031 |
-moz-transform: skew(-5deg) rotate(-5deg);
|
2032 |
-o-transform: skew(-5deg) rotate(-5deg);
|
2033 |
-ms-transform: skew(-5deg) rotate(-5deg);
|
2034 |
transform: skew(-5deg) rotate(-5deg);
|
2035 |
-
rgba(0,0,0,0.3)
|
2036 |
-
rgba(0,0,0,0.3)
|
2037 |
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.3);
|
2038 |
box-shadow: 0 6px 12px rgba(0,0,0,0.3);
|
2039 |
z-index: -1;
|
@@ -2042,9 +2038,7 @@ rgba(0,0,0,0.3)
|
|
2042 |
left: auto;
|
2043 |
right: 12px;
|
2044 |
-webkit-transform: skew(5deg) rotate(5deg);
|
2045 |
-
-moz-transform: skew(5deg) rotate(5deg);
|
2046 |
-ms-transform: skew(5deg) rotate(5deg);
|
2047 |
-
-o-transform: skew(5deg) rotate(5deg);
|
2048 |
-webkit-transform: skew(5deg) rotate(5deg);
|
2049 |
-moz-transform: skew(5deg) rotate(5deg);
|
2050 |
-o-transform: skew(5deg) rotate(5deg);
|
@@ -2974,9 +2968,6 @@ textarea.parsley-error {
|
|
2974 |
-o-transition: all 0.3s ease-in;
|
2975 |
-ms-transition: all 0.3s ease-in;
|
2976 |
transition: all 0.3s ease-in;
|
2977 |
-
-o-transition: all 0.3s ease-in;
|
2978 |
-
-moz-transition: all 0.3s ease-in;
|
2979 |
-
-webkit-transition: all 0.3s ease-in;
|
2980 |
}
|
2981 |
.parsley-errors-list.filled {
|
2982 |
opacity: 1;
|
@@ -4380,38 +4371,23 @@ tr.introjs-showElement > th {
|
|
4380 |
@-webkit-keyframes mailpoet_in_app_dot_pulse {
|
4381 |
0% {
|
4382 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
|
|
4383 |
}
|
4384 |
70% {
|
4385 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
|
|
4386 |
}
|
4387 |
100% {
|
4388 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
|
|
4389 |
}
|
4390 |
}
|
4391 |
-
.mailpoet_in_app_announcement_free_welcome_emails {
|
4392 |
-
text-align: center;
|
4393 |
-
}
|
4394 |
-
.mailpoet_in_app_announcement_free_welcome_emails h2 {
|
4395 |
-
font-size: 28px;
|
4396 |
-
}
|
4397 |
-
.mailpoet_in_app_announcement_free_welcome_emails img {
|
4398 |
-
width: 640px;
|
4399 |
-
margin-top: -20px;
|
4400 |
-
}
|
4401 |
-
.mailpoet_in_app_announcement_free_welcome_emails_dot {
|
4402 |
-
position: relative;
|
4403 |
-
top: -3px;
|
4404 |
-
left: 8px;
|
4405 |
-
}
|
4406 |
-
.mailpoet_in_app_announcement_background_videos,
|
4407 |
.mailpoet_drag_and_drop_tutorial {
|
4408 |
text-align: center;
|
4409 |
}
|
4410 |
-
.mailpoet_in_app_announcement_background_videos h2,
|
4411 |
.mailpoet_drag_and_drop_tutorial h2 {
|
4412 |
font-size: 28px;
|
4413 |
}
|
4414 |
-
.mailpoet_in_app_announcement_background_videos video,
|
4415 |
.mailpoet_drag_and_drop_tutorial video {
|
4416 |
margin-top: 20px;
|
4417 |
}
|
@@ -4423,68 +4399,56 @@ tr.introjs-showElement > th {
|
|
4423 |
}
|
4424 |
@-moz-keyframes mailpoet_in_app_dot_pulse {
|
4425 |
0% {
|
4426 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4427 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4428 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4429 |
}
|
4430 |
70% {
|
4431 |
-
-moz-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4432 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4433 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4434 |
}
|
4435 |
100% {
|
4436 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4437 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4438 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4439 |
}
|
4440 |
}
|
4441 |
@-webkit-keyframes mailpoet_in_app_dot_pulse {
|
4442 |
0% {
|
4443 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4444 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4445 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4446 |
}
|
4447 |
70% {
|
4448 |
-
-moz-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4449 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4450 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4451 |
}
|
4452 |
100% {
|
4453 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4454 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4455 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4456 |
}
|
4457 |
}
|
4458 |
@-o-keyframes mailpoet_in_app_dot_pulse {
|
4459 |
0% {
|
4460 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4461 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4462 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4463 |
}
|
4464 |
70% {
|
4465 |
-
-moz-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4466 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4467 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4468 |
}
|
4469 |
100% {
|
4470 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4471 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4472 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4473 |
}
|
4474 |
}
|
4475 |
@keyframes mailpoet_in_app_dot_pulse {
|
4476 |
0% {
|
4477 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4478 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4479 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4480 |
}
|
4481 |
70% {
|
4482 |
-
-moz-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4483 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4484 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4485 |
}
|
4486 |
100% {
|
4487 |
-
-moz-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4488 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4489 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4490 |
}
|
2011 |
border: 1px solid #ccc;
|
2012 |
position: relative;
|
2013 |
background-color: #fff;
|
2014 |
+
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.1);
|
2015 |
+
box-shadow: 0 0 5px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.1);
|
2016 |
}
|
2017 |
#mailpoet_form_editor:before,
|
2018 |
#mailpoet_form_editor:after {
|
2024 |
bottom: 12px;
|
2025 |
background: transparent;
|
2026 |
-webkit-transform: skew(-5deg) rotate(-5deg);
|
|
|
2027 |
-ms-transform: skew(-5deg) rotate(-5deg);
|
|
|
2028 |
-webkit-transform: skew(-5deg) rotate(-5deg);
|
2029 |
-moz-transform: skew(-5deg) rotate(-5deg);
|
2030 |
-o-transform: skew(-5deg) rotate(-5deg);
|
2031 |
-ms-transform: skew(-5deg) rotate(-5deg);
|
2032 |
transform: skew(-5deg) rotate(-5deg);
|
|
|
|
|
2033 |
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.3);
|
2034 |
box-shadow: 0 6px 12px rgba(0,0,0,0.3);
|
2035 |
z-index: -1;
|
2038 |
left: auto;
|
2039 |
right: 12px;
|
2040 |
-webkit-transform: skew(5deg) rotate(5deg);
|
|
|
2041 |
-ms-transform: skew(5deg) rotate(5deg);
|
|
|
2042 |
-webkit-transform: skew(5deg) rotate(5deg);
|
2043 |
-moz-transform: skew(5deg) rotate(5deg);
|
2044 |
-o-transform: skew(5deg) rotate(5deg);
|
2968 |
-o-transition: all 0.3s ease-in;
|
2969 |
-ms-transition: all 0.3s ease-in;
|
2970 |
transition: all 0.3s ease-in;
|
|
|
|
|
|
|
2971 |
}
|
2972 |
.parsley-errors-list.filled {
|
2973 |
opacity: 1;
|
4371 |
@-webkit-keyframes mailpoet_in_app_dot_pulse {
|
4372 |
0% {
|
4373 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4374 |
+
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4375 |
}
|
4376 |
70% {
|
4377 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4378 |
+
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4379 |
}
|
4380 |
100% {
|
4381 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4382 |
+
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4383 |
}
|
4384 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4385 |
.mailpoet_drag_and_drop_tutorial {
|
4386 |
text-align: center;
|
4387 |
}
|
|
|
4388 |
.mailpoet_drag_and_drop_tutorial h2 {
|
4389 |
font-size: 28px;
|
4390 |
}
|
|
|
4391 |
.mailpoet_drag_and_drop_tutorial video {
|
4392 |
margin-top: 20px;
|
4393 |
}
|
4399 |
}
|
4400 |
@-moz-keyframes mailpoet_in_app_dot_pulse {
|
4401 |
0% {
|
|
|
4402 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4403 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4404 |
}
|
4405 |
70% {
|
|
|
4406 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4407 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4408 |
}
|
4409 |
100% {
|
|
|
4410 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4411 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4412 |
}
|
4413 |
}
|
4414 |
@-webkit-keyframes mailpoet_in_app_dot_pulse {
|
4415 |
0% {
|
|
|
4416 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4417 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4418 |
}
|
4419 |
70% {
|
|
|
4420 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4421 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4422 |
}
|
4423 |
100% {
|
|
|
4424 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4425 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4426 |
}
|
4427 |
}
|
4428 |
@-o-keyframes mailpoet_in_app_dot_pulse {
|
4429 |
0% {
|
|
|
4430 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4431 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4432 |
}
|
4433 |
70% {
|
|
|
4434 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4435 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4436 |
}
|
4437 |
100% {
|
|
|
4438 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4439 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4440 |
}
|
4441 |
}
|
4442 |
@keyframes mailpoet_in_app_dot_pulse {
|
4443 |
0% {
|
|
|
4444 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4445 |
box-shadow: 0 0 0 0 rgba(255,83,1,0.4);
|
4446 |
}
|
4447 |
70% {
|
|
|
4448 |
-webkit-box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4449 |
box-shadow: 0 0 0 10px rgba(255,83,1,0);
|
4450 |
}
|
4451 |
100% {
|
|
|
4452 |
-webkit-box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4453 |
box-shadow: 0 0 0 0 rgba(255,83,1,0);
|
4454 |
}
|
assets/css/manifest.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"admin-global.css": "admin-global.bcd24dab.css",
|
3 |
-
"admin.css": "admin.
|
4 |
"importExport.css": "importExport.b3745466.css",
|
5 |
-
"newsletter_editor.css": "newsletter_editor.
|
6 |
-
"public.css": "public.
|
7 |
"rtl.css": "rtl.58324dad.css"
|
8 |
}
|
1 |
{
|
2 |
"admin-global.css": "admin-global.bcd24dab.css",
|
3 |
+
"admin.css": "admin.6bc44435.css",
|
4 |
"importExport.css": "importExport.b3745466.css",
|
5 |
+
"newsletter_editor.css": "newsletter_editor.6aeaa8ed.css",
|
6 |
+
"public.css": "public.3f0def3b.css",
|
7 |
"rtl.css": "rtl.58324dad.css"
|
8 |
}
|
assets/css/{newsletter_editor.d9d8c341.css → newsletter_editor.6aeaa8ed.css}
RENAMED
@@ -1041,11 +1041,7 @@ select.mailpoet_font-size {
|
|
1041 |
}
|
1042 |
.mailpoet_input,
|
1043 |
.mailpoet_select {
|
1044 |
-
-webkit-border-radius: 1px;
|
1045 |
-
-moz-border-radius: 1px;
|
1046 |
border-radius: 1px;
|
1047 |
-
-webkit-box-shadow: none !important;
|
1048 |
-
-moz-box-shadow: none !important;
|
1049 |
box-shadow: none !important;
|
1050 |
appearance: none;
|
1051 |
padding: 3px;
|
@@ -1080,8 +1076,6 @@ select.mailpoet_font-size {
|
|
1080 |
cursor: pointer;
|
1081 |
animate: 0.2s;
|
1082 |
background: #fff;
|
1083 |
-
-webkit-border-radius: 3px;
|
1084 |
-
-moz-border-radius: 3px;
|
1085 |
border-radius: 3px;
|
1086 |
border: 1px solid #ddd;
|
1087 |
}
|
@@ -1089,8 +1083,6 @@ select.mailpoet_font-size {
|
|
1089 |
border: 1px solid #333;
|
1090 |
height: 26px;
|
1091 |
width: 13px;
|
1092 |
-
-webkit-border-radius: 3px;
|
1093 |
-
-moz-border-radius: 3px;
|
1094 |
border-radius: 3px;
|
1095 |
background: #a4a4a4;
|
1096 |
cursor: pointer;
|
@@ -1106,8 +1098,6 @@ select.mailpoet_font-size {
|
|
1106 |
cursor: pointer;
|
1107 |
animate: 0.2s;
|
1108 |
background: #fff;
|
1109 |
-
-webkit-border-radius: 3px;
|
1110 |
-
-moz-border-radius: 3px;
|
1111 |
border-radius: 3px;
|
1112 |
border: 1px solid #ddd;
|
1113 |
}
|
@@ -1115,8 +1105,6 @@ select.mailpoet_font-size {
|
|
1115 |
border: 1px solid #333;
|
1116 |
height: 26px;
|
1117 |
width: 13px;
|
1118 |
-
-webkit-border-radius: 3px;
|
1119 |
-
-moz-border-radius: 3px;
|
1120 |
border-radius: 3px;
|
1121 |
background: #a4a4a4;
|
1122 |
cursor: pointer;
|
@@ -1146,8 +1134,6 @@ select.mailpoet_font-size {
|
|
1146 |
border: 1px solid #333;
|
1147 |
height: 26px;
|
1148 |
width: 13px;
|
1149 |
-
-webkit-border-radius: 3px;
|
1150 |
-
-moz-border-radius: 3px;
|
1151 |
border-radius: 3px;
|
1152 |
background: #a4a4a4;
|
1153 |
cursor: pointer;
|
@@ -1200,8 +1186,6 @@ select.mailpoet_font-size {
|
|
1200 |
background-color: #f8f8f8;
|
1201 |
padding: 6px 20px;
|
1202 |
color: #a4a4a4;
|
1203 |
-
-webkit-border-radius: 3px;
|
1204 |
-
-moz-border-radius: 3px;
|
1205 |
border-radius: 3px;
|
1206 |
line-height: normal;
|
1207 |
vertical-align: top;
|
@@ -1295,7 +1279,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1295 |
#mailpoet_editor {
|
1296 |
width: 100%;
|
1297 |
clear: both;
|
1298 |
-
position: relative;
|
1299 |
}
|
1300 |
#mailpoet_editor_heading {
|
1301 |
padding-left: 15px;
|
@@ -1391,11 +1374,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1391 |
.mailpoet_breadcrumbs p {
|
1392 |
margin: 0;
|
1393 |
}
|
1394 |
-
.mailpoet_editor_announcement {
|
1395 |
-
position: absolute;
|
1396 |
-
right: 20px;
|
1397 |
-
top: 90px;
|
1398 |
-
}
|
1399 |
#mailpoet_editor_sidebar {
|
1400 |
border-left: #ddd;
|
1401 |
border-bottom: #ddd;
|
@@ -1476,11 +1454,7 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1476 |
width: 70px;
|
1477 |
height: 70px;
|
1478 |
background-color: #fff;
|
1479 |
-
-webkit-border-radius: 3px;
|
1480 |
-
-moz-border-radius: 3px;
|
1481 |
border-radius: 3px;
|
1482 |
-
-webkit-box-shadow: 1px 2px #d8d8d8;
|
1483 |
-
-moz-box-shadow: 1px 2px #d8d8d8;
|
1484 |
box-shadow: 1px 2px #d8d8d8;
|
1485 |
color: #aaa;
|
1486 |
fill: #aaa;
|
@@ -1509,8 +1483,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1509 |
border: 1px solid #0074a2;
|
1510 |
color: #0074a2;
|
1511 |
fill: #0074a2;
|
1512 |
-
-webkit-box-shadow: none;
|
1513 |
-
-moz-box-shadow: none;
|
1514 |
box-shadow: none;
|
1515 |
}
|
1516 |
.mailpoet_widget.mailpoet_droppable_active .mailpoet_widget_title {
|
@@ -1530,8 +1502,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1530 |
height: calc(100% - 60px);
|
1531 |
transition: width 0.5s;
|
1532 |
border: 20px solid #fff;
|
1533 |
-
-webkit-border-radius: 20px;
|
1534 |
-
-moz-border-radius: 20px;
|
1535 |
border-radius: 20px;
|
1536 |
box-sizing: border-box;
|
1537 |
background: #fff;
|
@@ -1612,8 +1582,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1612 |
margin-left: 5px;
|
1613 |
}
|
1614 |
.mailpoet_save_options {
|
1615 |
-
-webkit-border-radius: 3px;
|
1616 |
-
-moz-border-radius: 3px;
|
1617 |
border-radius: 3px;
|
1618 |
position: absolute;
|
1619 |
right: 0;
|
@@ -1652,8 +1620,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1652 |
}
|
1653 |
.mailpoet_save_as_template_container,
|
1654 |
.mailpoet_export_template_container {
|
1655 |
-
-webkit-border-radius: 3px;
|
1656 |
-
-moz-border-radius: 3px;
|
1657 |
border-radius: 3px;
|
1658 |
display: inline-block;
|
1659 |
position: absolute;
|
@@ -1852,8 +1818,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1852 |
.mailpoet_delete_block_activated {
|
1853 |
height: auto;
|
1854 |
width: auto;
|
1855 |
-
-webkit-border-radius: 3px;
|
1856 |
-
-moz-border-radius: 3px;
|
1857 |
border-radius: 3px;
|
1858 |
background-color: #e64047;
|
1859 |
padding: 3px 5px;
|
@@ -1932,8 +1896,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1932 |
min-width: 2px;
|
1933 |
min-height: 2px;
|
1934 |
z-index: 1;
|
1935 |
-
-webkit-box-shadow: 0px 0px 1px 0px #0074a2;
|
1936 |
-
-moz-box-shadow: 0px 0px 1px 0px #0074a2;
|
1937 |
box-shadow: 0px 0px 1px 0px #0074a2;
|
1938 |
}
|
1939 |
.mailpoet_drop_marker::before,
|
@@ -1984,8 +1946,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
1984 |
}
|
1985 |
.mailpoet_drop_active > .mailpoet_container > div > .mailpoet_container_empty {
|
1986 |
background-color: #0074a2;
|
1987 |
-
-webkit-box-shadow: inset 1px 2px 1px #025c80;
|
1988 |
-
-moz-box-shadow: inset 1px 2px 1px #025c80;
|
1989 |
box-shadow: inset 1px 2px 1px #025c80;
|
1990 |
color: #fff;
|
1991 |
}
|
@@ -2006,8 +1966,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2006 |
position: relative;
|
2007 |
top: 5px;
|
2008 |
background: #0074a2;
|
2009 |
-
-webkit-border-radius: 3px;
|
2010 |
-
-moz-border-radius: 3px;
|
2011 |
border-radius: 3px;
|
2012 |
display: inline-block;
|
2013 |
width: 30px;
|
@@ -2051,8 +2009,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2051 |
.mailpoet_image_resize_handle {
|
2052 |
position: relative;
|
2053 |
background: #0074a2;
|
2054 |
-
-webkit-border-radius: 3px;
|
2055 |
-
-moz-border-radius: 3px;
|
2056 |
border-radius: 3px;
|
2057 |
display: inline-block;
|
2058 |
width: 20px;
|
@@ -2098,7 +2054,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2098 |
left: 0;
|
2099 |
pointer-events: none;
|
2100 |
border: 1px solid rgba(255,255,255,0);
|
2101 |
-
-webkit-transition: 0.3s;
|
2102 |
transition: 0.3s;
|
2103 |
}
|
2104 |
.mailpoet_block:hover > .mailpoet_block_highlight {
|
@@ -2225,12 +2180,8 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2225 |
background-color: #f2f2f2;
|
2226 |
margin: 20px;
|
2227 |
padding: 15px;
|
2228 |
-
-webkit-box-shadow: inset 1px 2px 1px #a4a4a4;
|
2229 |
-
-moz-box-shadow: inset 1px 2px 1px #a4a4a4;
|
2230 |
box-shadow: inset 1px 2px 1px #a4a4a4;
|
2231 |
color: #656565;
|
2232 |
-
-webkit-border-radius: 3px;
|
2233 |
-
-moz-border-radius: 3px;
|
2234 |
border-radius: 3px;
|
2235 |
transition: background 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
|
2236 |
}
|
@@ -2320,8 +2271,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2320 |
max-height: 400px;
|
2321 |
}
|
2322 |
.mailpoet_settings_posts_single_post {
|
2323 |
-
-webkit-border-radius: 1px;
|
2324 |
-
-moz-border-radius: 1px;
|
2325 |
border-radius: 1px;
|
2326 |
width: 100%;
|
2327 |
margin-top: 5px;
|
@@ -2565,8 +2514,6 @@ span.select2-container--open > span.select2-dropdown li.select2-results__option
|
|
2565 |
.select2 input,
|
2566 |
.select2 input:focus {
|
2567 |
border-color: none;
|
2568 |
-
-webkit-box-shadow: none;
|
2569 |
-
-moz-box-shadow: none;
|
2570 |
box-shadow: none;
|
2571 |
margin: 0;
|
2572 |
padding: 0;
|
@@ -2578,20 +2525,15 @@ div.mce-toolbar-grp.mce-container {
|
|
2578 |
position: absolute;
|
2579 |
}
|
2580 |
.mce-tinymce.mce-tinymce-inline {
|
2581 |
-
-webkit-border-radius: 3px;
|
2582 |
-
-moz-border-radius: 3px;
|
2583 |
border-radius: 3px;
|
2584 |
background-color: #f8f8f8;
|
2585 |
border: 1px solid #ddd;
|
2586 |
-
-webkit-box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.05);
|
2587 |
-
-moz-box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.05);
|
2588 |
box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.05);
|
2589 |
}
|
2590 |
.mce-window div.mce-container-body.mce-abs-layout {
|
2591 |
overflow: hidden;
|
2592 |
}
|
2593 |
.mce-window .mce-window-head div.mce-dragh {
|
2594 |
-
width: -webkit-calc(100% - 36px);
|
2595 |
width: calc(100% - 36px);
|
2596 |
}
|
2597 |
.mce-i-mailpoet_shortcodes:before {
|
@@ -2649,13 +2591,9 @@ body {
|
|
2649 |
max-width: calc(100% - 12px);
|
2650 |
}
|
2651 |
.sp-replacer {
|
2652 |
-
-webkit-border-radius: 3px;
|
2653 |
-
-moz-border-radius: 3px;
|
2654 |
border-radius: 3px;
|
2655 |
padding: 0;
|
2656 |
border: 0;
|
2657 |
-
-webkit-box-shadow: 1px 2px #d8d8d8;
|
2658 |
-
-moz-box-shadow: 1px 2px #d8d8d8;
|
2659 |
box-shadow: 1px 2px #d8d8d8;
|
2660 |
}
|
2661 |
.sp-preview {
|
1041 |
}
|
1042 |
.mailpoet_input,
|
1043 |
.mailpoet_select {
|
|
|
|
|
1044 |
border-radius: 1px;
|
|
|
|
|
1045 |
box-shadow: none !important;
|
1046 |
appearance: none;
|
1047 |
padding: 3px;
|
1076 |
cursor: pointer;
|
1077 |
animate: 0.2s;
|
1078 |
background: #fff;
|
|
|
|
|
1079 |
border-radius: 3px;
|
1080 |
border: 1px solid #ddd;
|
1081 |
}
|
1083 |
border: 1px solid #333;
|
1084 |
height: 26px;
|
1085 |
width: 13px;
|
|
|
|
|
1086 |
border-radius: 3px;
|
1087 |
background: #a4a4a4;
|
1088 |
cursor: pointer;
|
1098 |
cursor: pointer;
|
1099 |
animate: 0.2s;
|
1100 |
background: #fff;
|
|
|
|
|
1101 |
border-radius: 3px;
|
1102 |
border: 1px solid #ddd;
|
1103 |
}
|
1105 |
border: 1px solid #333;
|
1106 |
height: 26px;
|
1107 |
width: 13px;
|
|
|
|
|
1108 |
border-radius: 3px;
|
1109 |
background: #a4a4a4;
|
1110 |
cursor: pointer;
|
1134 |
border: 1px solid #333;
|
1135 |
height: 26px;
|
1136 |
width: 13px;
|
|
|
|
|
1137 |
border-radius: 3px;
|
1138 |
background: #a4a4a4;
|
1139 |
cursor: pointer;
|
1186 |
background-color: #f8f8f8;
|
1187 |
padding: 6px 20px;
|
1188 |
color: #a4a4a4;
|
|
|
|
|
1189 |
border-radius: 3px;
|
1190 |
line-height: normal;
|
1191 |
vertical-align: top;
|
1279 |
#mailpoet_editor {
|
1280 |
width: 100%;
|
1281 |
clear: both;
|
|
|
1282 |
}
|
1283 |
#mailpoet_editor_heading {
|
1284 |
padding-left: 15px;
|
1374 |
.mailpoet_breadcrumbs p {
|
1375 |
margin: 0;
|
1376 |
}
|
|
|
|
|
|
|
|
|
|
|
1377 |
#mailpoet_editor_sidebar {
|
1378 |
border-left: #ddd;
|
1379 |
border-bottom: #ddd;
|
1454 |
width: 70px;
|
1455 |
height: 70px;
|
1456 |
background-color: #fff;
|
|
|
|
|
1457 |
border-radius: 3px;
|
|
|
|
|
1458 |
box-shadow: 1px 2px #d8d8d8;
|
1459 |
color: #aaa;
|
1460 |
fill: #aaa;
|
1483 |
border: 1px solid #0074a2;
|
1484 |
color: #0074a2;
|
1485 |
fill: #0074a2;
|
|
|
|
|
1486 |
box-shadow: none;
|
1487 |
}
|
1488 |
.mailpoet_widget.mailpoet_droppable_active .mailpoet_widget_title {
|
1502 |
height: calc(100% - 60px);
|
1503 |
transition: width 0.5s;
|
1504 |
border: 20px solid #fff;
|
|
|
|
|
1505 |
border-radius: 20px;
|
1506 |
box-sizing: border-box;
|
1507 |
background: #fff;
|
1582 |
margin-left: 5px;
|
1583 |
}
|
1584 |
.mailpoet_save_options {
|
|
|
|
|
1585 |
border-radius: 3px;
|
1586 |
position: absolute;
|
1587 |
right: 0;
|
1620 |
}
|
1621 |
.mailpoet_save_as_template_container,
|
1622 |
.mailpoet_export_template_container {
|
|
|
|
|
1623 |
border-radius: 3px;
|
1624 |
display: inline-block;
|
1625 |
position: absolute;
|
1818 |
.mailpoet_delete_block_activated {
|
1819 |
height: auto;
|
1820 |
width: auto;
|
|
|
|
|
1821 |
border-radius: 3px;
|
1822 |
background-color: #e64047;
|
1823 |
padding: 3px 5px;
|
1896 |
min-width: 2px;
|
1897 |
min-height: 2px;
|
1898 |
z-index: 1;
|
|
|
|
|
1899 |
box-shadow: 0px 0px 1px 0px #0074a2;
|
1900 |
}
|
1901 |
.mailpoet_drop_marker::before,
|
1946 |
}
|
1947 |
.mailpoet_drop_active > .mailpoet_container > div > .mailpoet_container_empty {
|
1948 |
background-color: #0074a2;
|
|
|
|
|
1949 |
box-shadow: inset 1px 2px 1px #025c80;
|
1950 |
color: #fff;
|
1951 |
}
|
1966 |
position: relative;
|
1967 |
top: 5px;
|
1968 |
background: #0074a2;
|
|
|
|
|
1969 |
border-radius: 3px;
|
1970 |
display: inline-block;
|
1971 |
width: 30px;
|
2009 |
.mailpoet_image_resize_handle {
|
2010 |
position: relative;
|
2011 |
background: #0074a2;
|
|
|
|
|
2012 |
border-radius: 3px;
|
2013 |
display: inline-block;
|
2014 |
width: 20px;
|
2054 |
left: 0;
|
2055 |
pointer-events: none;
|
2056 |
border: 1px solid rgba(255,255,255,0);
|
|
|
2057 |
transition: 0.3s;
|
2058 |
}
|
2059 |
.mailpoet_block:hover > .mailpoet_block_highlight {
|
2180 |
background-color: #f2f2f2;
|
2181 |
margin: 20px;
|
2182 |
padding: 15px;
|
|
|
|
|
2183 |
box-shadow: inset 1px 2px 1px #a4a4a4;
|
2184 |
color: #656565;
|
|
|
|
|
2185 |
border-radius: 3px;
|
2186 |
transition: background 250ms cubic-bezier(0.42, 0, 0.58, 1) /* ease-in-out */;
|
2187 |
}
|
2271 |
max-height: 400px;
|
2272 |
}
|
2273 |
.mailpoet_settings_posts_single_post {
|
|
|
|
|
2274 |
border-radius: 1px;
|
2275 |
width: 100%;
|
2276 |
margin-top: 5px;
|
2514 |
.select2 input,
|
2515 |
.select2 input:focus {
|
2516 |
border-color: none;
|
|
|
|
|
2517 |
box-shadow: none;
|
2518 |
margin: 0;
|
2519 |
padding: 0;
|
2525 |
position: absolute;
|
2526 |
}
|
2527 |
.mce-tinymce.mce-tinymce-inline {
|
|
|
|
|
2528 |
border-radius: 3px;
|
2529 |
background-color: #f8f8f8;
|
2530 |
border: 1px solid #ddd;
|
|
|
|
|
2531 |
box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.05);
|
2532 |
}
|
2533 |
.mce-window div.mce-container-body.mce-abs-layout {
|
2534 |
overflow: hidden;
|
2535 |
}
|
2536 |
.mce-window .mce-window-head div.mce-dragh {
|
|
|
2537 |
width: calc(100% - 36px);
|
2538 |
}
|
2539 |
.mce-i-mailpoet_shortcodes:before {
|
2591 |
max-width: calc(100% - 12px);
|
2592 |
}
|
2593 |
.sp-replacer {
|
|
|
|
|
2594 |
border-radius: 3px;
|
2595 |
padding: 0;
|
2596 |
border: 0;
|
|
|
|
|
2597 |
box-shadow: 1px 2px #d8d8d8;
|
2598 |
}
|
2599 |
.sp-preview {
|
assets/css/{public.cae357df.css → public.3f0def3b.css}
RENAMED
@@ -27,9 +27,6 @@ textarea.parsley-error {
|
|
27 |
-o-transition: all 0.3s ease-in;
|
28 |
-ms-transition: all 0.3s ease-in;
|
29 |
transition: all 0.3s ease-in;
|
30 |
-
-o-transition: all 0.3s ease-in;
|
31 |
-
-moz-transition: all 0.3s ease-in;
|
32 |
-
-webkit-transition: all 0.3s ease-in;
|
33 |
}
|
34 |
.parsley-errors-list.filled {
|
35 |
opacity: 1;
|
27 |
-o-transition: all 0.3s ease-in;
|
28 |
-ms-transition: all 0.3s ease-in;
|
29 |
transition: all 0.3s ease-in;
|
|
|
|
|
|
|
30 |
}
|
31 |
.parsley-errors-list.filled {
|
32 |
opacity: 1;
|
assets/js/admin.169f324b.js
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
webpackJsonp([2],{225:function(module,__webpack_exports__,__webpack_require__){"use strict";function Tabs(props){var tabLinks=tabs.map(function(tab){var tabClasses=__WEBPACK_IMPORTED_MODULE_3_classnames___default()("nav-tab",{"nav-tab-active":props.tab===tab.name});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{key:"tab-".concat(tab.name),className:tabClasses,to:tab.link},tab.label)});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",{className:"nav-tab-wrapper"},tabLinks)}var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_3_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),tabs=[{name:"knowledgeBase",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];Tabs.propTypes={tab:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string},Tabs.defaultProps={tab:"knowledgeBase"},__webpack_exports__.a=Tabs},322:function(module,exports,__webpack_require__){function _toConsumableArray(arr){return arrayWithoutHoles(arr)||iterableToArray(arr)||nonIterableSpread()}var arrayWithoutHoles=__webpack_require__(527),iterableToArray=__webpack_require__(528),nonIterableSpread=__webpack_require__(536);module.exports=_toConsumableArray},368:function(module,__webpack_exports__,__webpack_require__){"use strict";function confirmAlert(props){__WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(ConfirmAlert,props),document.getElementById("mailpoet_confirm_alert_holder"))}__webpack_exports__.a=confirmAlert;var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mailpoet__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_10_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_dom__),ConfirmAlert=function(_React$Component){function ConfirmAlert(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,ConfirmAlert),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(ConfirmAlert).call(this,props)),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"componentWillUpdate",function(){_this.state.show||_this.setState({show:!0})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onClose",function(){_this.setState({show:!1})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onConfirm",function(){_this.onClose(),_this.props.onConfirm()}),_this.state={show:!0},_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(ConfirmAlert,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(ConfirmAlert,[{key:"render",value:function(){var _this$props=this.props,title=_this$props.title,message=_this$props.message,confirmLabel=_this$props.confirmLabel,cancelLabel=_this$props.cancelLabel;return this.state.show&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_modal_overlay"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup",tabIndex:"-1"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_wrapper"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"mailpoet_modal_close",onClick:this.onClose}),title&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_title"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h2",null,title)),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_body clearfix"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",{className:"mailpoet_hp_email_label"},message),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"button button-secondary",onClick:this.onClose},cancelLabel),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"button button-primary",onClick:this.onConfirm},confirmLabel)))))}}]),ConfirmAlert}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(ConfirmAlert,"propTypes",{title:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,message:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,cancelLabel:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,confirmLabel:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,onConfirm:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(ConfirmAlert,"defaultProps",{title:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmTitle"),cancelLabel:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("cancelLabel"),confirmLabel:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmLabel")})},369:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_7_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_underscore__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__=__webpack_require__(312),__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__=__webpack_require__(321),intervalField=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__),{name:"intervalType",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.intervalValues}),timeOfDayField={name:"timeOfDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues},weekDayField={name:"weekDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues},monthDayField={name:"monthDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.monthDayValues},nthWeekDayField={name:"nthWeekDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.nthWeekDayValues},NotificationScheduling=function(_React$Component){function NotificationScheduling(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NotificationScheduling);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NotificationScheduling)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getCurrentValue",function(){return _this.props.item[_this.props.field.name]||{}}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(name,value){var oldValue=_this.getCurrentValue(),newValue={};return newValue[name]=value,_this.props.onValueChange({target:{name:_this.props.field.name,value:__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.extend({},oldValue,newValue)}})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleIntervalChange",function(event){return _this.handleValueChange("intervalType",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleTimeOfDayChange",function(event){return _this.handleValueChange("timeOfDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleWeekDayChange",function(event){return _this.handleValueChange("weekDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleMonthDayChange",function(event){return _this.handleValueChange("monthDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleNthWeekDayChange",function(event){return _this.handleValueChange("nthWeekDay",event.target.value)}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NotificationScheduling,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NotificationScheduling,[{key:"render",value:function(){var timeOfDaySelection,weekDaySelection,monthDaySelection,nthWeekDaySelection,value=this.getCurrentValue();return"immediately"!==value.intervalType&&(timeOfDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:timeOfDayField,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==value.intervalType&&"nthWeekDay"!==value.intervalType||(weekDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:weekDayField,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===value.intervalType&&(monthDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:monthDayField,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===value.intervalType&&(nthWeekDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:nthWeekDayField,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:intervalField,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),nthWeekDaySelection,monthDaySelection,weekDaySelection,timeOfDaySelection)}}]),NotificationScheduling}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);NotificationScheduling.propTypes={item:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.object.isRequired,field:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string}).isRequired,onValueChange:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func.isRequired},__webpack_exports__.a=NotificationScheduling},375:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),KeyValueTable=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("table",{className:"widefat fixed",style:{maxWidth:props.max_width}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tbody",null,props.rows.map(function(row){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",{key:"row_".concat(row.key)},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"row-title"},row.key),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",null,row.value))})))};KeyValueTable.propTypes={max_width:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,rows:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({key:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,value:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element]).isRequired})).isRequired},KeyValueTable.defaultProps={max_width:"auto"},__webpack_exports__.a=KeyValueTable},376:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),TasksListDataRow=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column column-primary"},props.task.id),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.type),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.newsletter?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:props.task.newsletter.preview_url,"data-newsletter-id":props.task.newsletter.newsletter_id,"data-queue-id":props.task.newsletter.queue_id,target:"_blank"},props.task.newsletter.subject||__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("preview")):__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("none")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.priority),props.show_scheduled_at?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column-date"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Date.format(1e3*props.task.scheduled_at))):null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column-date"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Date.format(1e3*props.task.updated_at))))};TasksListDataRow.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,task:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,type:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,priority:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,updated_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,status:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,newsletter:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({newsletter_id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,queue_id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,preview_url:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,subject:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string})}).isRequired},TasksListDataRow.defaultProps={show_scheduled_at:!1,task:{newsletter:null}},__webpack_exports__.a=TasksListDataRow},521:function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_4_settings_tabs_js__=(__webpack_require__(522),__webpack_require__(526),__webpack_require__(575),__webpack_require__(579),__webpack_require__(581)),__WEBPACK_IMPORTED_MODULE_7_settings_reinstall_from_scratch_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_settings_tabs_js__),__webpack_require__(583),__webpack_require__(593),__webpack_require__(595)),__WEBPACK_IMPORTED_MODULE_8_subscribers_importExport_import_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_settings_reinstall_from_scratch_js__),__webpack_require__(596)),__WEBPACK_IMPORTED_MODULE_9_subscribers_importExport_export_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_subscribers_importExport_import_js__),__webpack_require__(599));__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_subscribers_importExport_export_js__),__webpack_require__(600),__webpack_require__(609),__webpack_require__(611)},522:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_subscribers_list_jsx__=__webpack_require__(523),__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx__=__webpack_require__(524),__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx__),container=document.getElementById("subscribers_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/new",component:__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/edit/:id",component:__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3_subscribers_list_jsx__.a}))),container)},523:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_9_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_jquery__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_11_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_classnames__),__WEBPACK_IMPORTED_MODULE_12_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_12_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types__),__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx__=__webpack_require__(353),__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx__),columns=[{name:"email",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status"),sortable:!0},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lists")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberTrashed"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberDeleted"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberRestored"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onNoItemsFound:function(group){return"bounced"===group&&!window.mailpoet_premium_active&&!window.mss_active&&__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bouncedSubscribersHelp")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bouncedSubscribersPremiumButtonText"))))}},bulkActions=[{name:"moveToList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToList"),onSelect:function(){var field={id:"move_to_segment",name:"move_to_segment",endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#move_to_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"addToList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("addToList"),onSelect:function(){var field={id:"add_to_segment",name:"add_to_segment",endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#add_to_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("removeFromList"),onSelect:function(){var field={id:"remove_from_segment",name:"remove_from_segment",endpoint:"segments",filter:function(segment){return!("default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#remove_from_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromAllLists",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("removeFromAllLists"),onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("resendConfirmationEmail"),onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"trash",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"),link:function(subscriber){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{to:"/edit/".concat(subscriber.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"))}},{name:"trash",display:function(subscriber){return 0===Number(subscriber.wp_user_id)}}],SubscriberList=function(_React$Component){function SubscriberList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SubscriberList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SubscriberList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getSegmentFromId",function(segmentId){var result=!1;return window.mailpoet_segments.forEach(function(segment){segment.id===segmentId&&(result=segment)}),result}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(subscriber,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_11_classnames___default()("manage-column","column-primary","has-row-actions","column-username"),status="";switch(subscriber.status){case"subscribed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribed");break;case"unconfirmed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("unconfirmed");break;case"unsubscribed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("unsubscribed");break;case"bounced":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bounced");break;default:status="Invalid"}var segments=!1;if(subscriber.subscriptions.length>0){var subscribedSegments=[];subscriber.subscriptions.forEach(function(subscription){var segment=_this.getSegmentFromId(subscription.segment_id);!1!==segment&&"subscribed"===subscription.status&&subscribedSegments.push(segment.name)}),segments=__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("span",null,subscribedSegments.join(", "))}return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"row-title",to:"/edit/".concat(subscriber.id)},subscriber.email)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",{style:{margin:0}},subscriber.first_name," ",subscriber.last_name),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status")},status),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lists")},segments),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribedOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(subscriber.created_at))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(subscriber.updated_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SubscriberList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SubscriberList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"page-title-action",to:"/new"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("new")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import#step1"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("import")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("export"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,messages:messages,sort_by:"created_at",sort_order:"desc"}))}}]),SubscriberList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);SubscriberList.propTypes={location:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object}).isRequired},__webpack_exports__.a=SubscriberList},524:function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(525)}).call(exports,__webpack_require__(11))},525:function(module,__webpack_exports__,__webpack_require__){"use strict";function beforeFormContent(subscriber){if(Number(subscriber.wp_user_id)>0)return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"description"},__WEBPACK_IMPORTED_MODULE_11_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(match,i){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{key:i,href:"user-edit.php?user_id=".concat(subscriber.wp_user_id)},match)}))}function afterFormContent(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"description"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("tip"))," ",__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("customFieldsTip"))}Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array__=__webpack_require__(316),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_10_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_11_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_11_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_react_string_replace__),fields=[{name:"email",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("email"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"first_name",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("firstname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"last_name",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("lastname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"status",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("status"),type:"select",values:{subscribed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscribed"),unconfirmed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unconfirmed"),unsubscribed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unsubscribed"),bounced:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("bounced")},filter:function(subscriber,value){return!(Number(subscriber.wp_user_id)>0&&"unconfirmed"===value)}},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("lists"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("selectList"),tip:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(subscriber){return!1===__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array___default()(subscriber.subscriptions)?null:subscriber.subscriptions.filter(function(subscription){return"subscribed"===subscription.status}).map(function(subscription){return subscription.segment_id})},filter:function(segment){return!segment.deleted_at&&"default"===segment.type},getLabel:function(segment){return"".concat(segment.name," (").concat(segment.subscribers,")")},getSearchLabel:function(segment,subscriber){var label="";return void 0!==subscriber.subscriptions&&subscriber.subscriptions.forEach(function(subscription){if(segment.id===subscription.segment_id&&(label=segment.name,"unsubscribed"===subscription.status)){var unsubscribedAt=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Date.format(subscription.updated_at);label+=" (%$1s)".replace("%$1s",__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unsubscribedOn").replace("%$1s",unsubscribedAt))}}),label}}];(window.mailpoet_custom_fields||[]).forEach(function(customField){var field={name:"cf_".concat(customField.id),label:customField.name,type:customField.type};switch(customField.params&&(field.params=customField.params),customField.params.values&&(field.values=customField.params.values),customField.type){case"date":field.year_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("year"),field.month_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("month"),field.day_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("day");break;case"select":field.placeholder="-";break;default:field.placeholder=""}fields.push(field)});var messages={onUpdate:function(){__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriberUpdated"))},onCreate:function(){__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriberAdded")),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}},SubscriberForm=function(_React$Component){function SubscriberForm(){return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SubscriberForm),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SubscriberForm).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SubscriberForm,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SubscriberForm,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriber"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_router_dom__.b,{className:"page-title-action",to:"/"},__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("backToList"))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_form_jsx___default.a,{endpoint:"subscribers",fields:fields,params:this.props.match.params,messages:messages,beforeFormContent:beforeFormContent,afterFormContent:afterFormContent}))}}]),SubscriberForm}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);SubscriberForm.propTypes={match:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.default=SubscriberForm},526:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(322),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_7_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12_newsletters_types_jsx__=__webpack_require__(537),__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_jsx__=__webpack_require__(538),__WEBPACK_IMPORTED_MODULE_14_newsletters_send_jsx__=__webpack_require__(544),__WEBPACK_IMPORTED_MODULE_15_newsletters_send_congratulate_congratulate_jsx__=__webpack_require__(563),__WEBPACK_IMPORTED_MODULE_16_newsletters_types_standard_jsx__=__webpack_require__(568),__WEBPACK_IMPORTED_MODULE_17_newsletters_types_notification_notification_jsx__=__webpack_require__(569),__WEBPACK_IMPORTED_MODULE_18_newsletters_types_welcome_welcome_jsx__=__webpack_require__(570),__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx__=__webpack_require__(363),__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx__),__WEBPACK_IMPORTED_MODULE_20_newsletters_listings_standard_jsx__=__webpack_require__(571),__WEBPACK_IMPORTED_MODULE_21_newsletters_listings_welcome_jsx__=__webpack_require__(572),__WEBPACK_IMPORTED_MODULE_22_newsletters_listings_notification_jsx__=__webpack_require__(573),__WEBPACK_IMPORTED_MODULE_23_newsletters_listings_notification_history_jsx__=__webpack_require__(574);((function(_React$Component){function App(){return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,App),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(App).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(App,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(App,[{key:"render",value:function(){return this.props.children}}]),App})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component)).propTypes={children:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.element.isRequired};var container=document.getElementById("newsletters_container");if(container){var routes=[{path:"/standard/(.*)?",component:__WEBPACK_IMPORTED_MODULE_20_newsletters_listings_standard_jsx__.a},{path:"/welcome/(.*)?",component:__WEBPACK_IMPORTED_MODULE_21_newsletters_listings_welcome_jsx__.a},{path:"/notification/history/:parent_id/(.*)?",component:__WEBPACK_IMPORTED_MODULE_23_newsletters_listings_notification_history_jsx__.a},{path:"/notification/(.*)?",component:__WEBPACK_IMPORTED_MODULE_22_newsletters_listings_notification_jsx__.a},{path:"/new/standard",component:__WEBPACK_IMPORTED_MODULE_16_newsletters_types_standard_jsx__.a},{path:"/new/notification",component:__WEBPACK_IMPORTED_MODULE_17_newsletters_types_notification_notification_jsx__.a},{path:"/new/welcome",component:__WEBPACK_IMPORTED_MODULE_18_newsletters_types_welcome_welcome_jsx__.a},{path:"/new",component:__WEBPACK_IMPORTED_MODULE_12_newsletters_types_jsx__.a},{name:"template",path:"/template/:id",component:__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_jsx__.a},{path:"/send/congratulate/:id",component:__WEBPACK_IMPORTED_MODULE_15_newsletters_send_congratulate_congratulate_jsx__.a},{path:"/send/:id",component:__WEBPACK_IMPORTED_MODULE_14_newsletters_send_jsx__.a}];routes=__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_before_router",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(routes).concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(function(){return window.mailpoet_automatic_emails?__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.map(window.mailpoet_automatic_emails,function(automaticEmail){return{path:"new/".concat(automaticEmail.slug),name:automaticEmail.slug,component:__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx___default.a,data:{email:automaticEmail}}}):null}()))),window.mailpoet_listing=__WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.c,{to:"/standard"})}}),routes.map(function(route){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.d,{key:route.path,path:route.path,component:route.component,name:route.name||null,data:route.data||null,render:route.render})}))),container)}},527:function(module,exports,__webpack_require__){function _arrayWithoutHoles(arr){if(_Array$isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}var _Array$isArray=__webpack_require__(316);module.exports=_arrayWithoutHoles},528:function(module,exports,__webpack_require__){function _iterableToArray(iter){if(_isIterable(Object(iter))||"[object Arguments]"===Object.prototype.toString.call(iter))return _Array$from(iter)}var _Array$from=__webpack_require__(529),_isIterable=__webpack_require__(533);module.exports=_iterableToArray},529:function(module,exports,__webpack_require__){module.exports=__webpack_require__(530)},530:function(module,exports,__webpack_require__){__webpack_require__(197),__webpack_require__(531),module.exports=__webpack_require__(15).Array.from},531:function(module,exports,__webpack_require__){"use strict";var ctx=__webpack_require__(52),$export=__webpack_require__(20),toObject=__webpack_require__(200),call=__webpack_require__(365),isArrayIter=__webpack_require__(366),toLength=__webpack_require__(305),createProperty=__webpack_require__(532),getIterFn=__webpack_require__(317);$export($export.S+$export.F*!__webpack_require__(367)(function(iter){Array.from(iter)}),"Array",{from:function(arrayLike){var length,result,step,iterator,O=toObject(arrayLike),C="function"==typeof this?this:Array,aLen=arguments.length,mapfn=aLen>1?arguments[1]:void 0,mapping=void 0!==mapfn,index=0,iterFn=getIterFn(O);if(mapping&&(mapfn=ctx(mapfn,aLen>2?arguments[2]:void 0,2)),void 0==iterFn||C==Array&&isArrayIter(iterFn))for(length=toLength(O.length),result=new C(length);length>index;index++)createProperty(result,index,mapping?mapfn(O[index],index):O[index]);else for(iterator=iterFn.call(O),result=new C;!(step=iterator.next()).done;index++)createProperty(result,index,mapping?call(iterator,mapfn,[step.value,index],!0):step.value);return result.length=index,result}})},532:function(module,exports,__webpack_require__){"use strict";var $defineProperty=__webpack_require__(34),createDesc=__webpack_require__(195);module.exports=function(object,index,value){index in object?$defineProperty.f(object,index,createDesc(0,value)):object[index]=value}},533:function(module,exports,__webpack_require__){module.exports=__webpack_require__(534)},534:function(module,exports,__webpack_require__){__webpack_require__(222),__webpack_require__(197),module.exports=__webpack_require__(535)},535:function(module,exports,__webpack_require__){var classof=__webpack_require__(318),ITERATOR=__webpack_require__(25)("iterator"),Iterators=__webpack_require__(53);module.exports=__webpack_require__(15).isIterable=function(it){var O=Object(it);return void 0!==O[ITERATOR]||"@@iterator"in O||Iterators.hasOwnProperty(classof(O))}},536:function(module,exports){function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}module.exports=_nonIterableSpread},537:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(322),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_13_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_13_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_underscore__),__WEBPACK_IMPORTED_MODULE_14_react_router_dom__=__webpack_require__(14),NewsletterTypes=function(_React$Component){function NewsletterTypes(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterTypes);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterTypes)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"setupNewsletter",function(type){void 0!==type&&(_this.props.history.push("/new/".concat(type)),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}))}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getAutomaticEmails",function(){return window.mailpoet_automatic_emails?__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.map(window.mailpoet_automatic_emails,function(automaticEmail){var email=automaticEmail,onClick=window.mailpoet_premium_active?__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(_this.setupNewsletter,automaticEmail.slug):void 0;return email.action=function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary",onClick:onClick,role:"button",tabIndex:0,disabled:!window.mailpoet_premium_active},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp")))}(),email}):[]}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"createNewsletter",function(type){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:type,subject:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("draftNewsletterTitle")}}).done(function(response){_this.props.history.push("/template/".concat(response.data.id))}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(NewsletterTypes,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(NewsletterTypes,[{key:"render",value:function(){var createStandardNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.createNewsletter,"standard"),createNotificationNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.setupNewsletter,"notification"),createWelcomeNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.setupNewsletter,"welcome"),defaultTypes=[{slug:"standard",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("regularNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("regularNewsletterTypeDescription"),action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:createStandardNewsletter,role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("create"))}()},{slug:"welcome",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("welcomeNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails",action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary",onClick:createWelcomeNewsletter,"data-automation-id":"create_welcome",onKeyDown:function(event){["keydown","keypress"].includes(event.type)&&["Enter"," "].includes(event.key)&&(event.preventDefault(),createWelcomeNewsletter())},role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp"))}()},{slug:"notification",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications",action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:createNotificationNewsletter,role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp"))}()}],types=__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_types",defaultTypes.concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(this.getAutomaticEmails())),this),badgeClassName=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("pickCampaignType")),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("ul",{className:"mailpoet_boxes clearfix"},types.map(function(type){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("li",{key:type.slug,"data-type":type.slug,className:"mailpoet_newsletter_types"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_thumbnail"},type.thumbnailImage?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("img",{src:type.thumbnailImage,alt:""}):null),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_description"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h3",null,type.title," ",type.beta?"(".concat(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("beta"),")"):""),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",null,type.description),type.videoGuide&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:badgeClassName,href:type.videoGuide,target:"_blank"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",{className:"dashicons dashicons-format-video"}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("seeVideoGuide"))),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_actions"},type.action)))},this)))}}]),NewsletterTypes}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterTypes,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_14_react_router_dom__.f)(NewsletterTypes)},538:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_12_common_loading_jsx__=__webpack_require__(539),__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_tabs_jsx__=__webpack_require__(540),__WEBPACK_IMPORTED_MODULE_14_newsletters_templates_template_box_jsx__=__webpack_require__(541),__WEBPACK_IMPORTED_MODULE_15_newsletters_templates_import_template_jsx__=__webpack_require__(542),__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_17_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_17_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_underscore__),__WEBPACK_IMPORTED_MODULE_18_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_18_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_prop_types__),getEditorUrl=function(id){return"admin.php?page=mailpoet-newsletter-editor&id=".concat(id)},templatesCategories=[{name:"standard",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabStandardTitle")},{name:"welcome",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabWelcomeTitle")},{name:"notification",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&templatesCategories.push({name:"woocommerce",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabWoocommerceTitle")}),templatesCategories.push.apply(templatesCategories,[{name:"all",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allTemplates")},{name:"recent",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("recentlySent")},{name:"saved",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("savedTemplates")}]);var NewsletterTemplates=function(_React$Component){function NewsletterTemplates(props){var _this;return __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterTemplates),_this=__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterTemplates).call(this,props)),_this.state={loading:!0,templates:{},emailType:null,selectedTab:""},_this.templates={},_this.addTemplate=_this.addTemplate.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateDelete=_this.afterTemplateDelete.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateSelect=_this.afterTemplateSelect.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateImport=_this.afterTemplateImport.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits___default()(NewsletterTemplates,_React$Component),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass___default()(NewsletterTemplates,[{key:"componentWillMount",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(response){0===response.data.length&&(response.data=[{name:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),response.data.forEach(_this2.addTemplate),_this2.sortTemplates()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this2.selectInitialTab()})}},{key:"addTemplate",value:function(template){var categories,_this3=this,categoriesNames=templatesCategories.map(function(category){return category.name});try{categories=JSON.parse(template.categories).filter(function(name){return-1!==categoriesNames.indexOf(name)})}catch(err){categories=[]}0===categories.length&&categories.push("saved"),categories.forEach(function(category){void 0===_this3.templates[category]&&(_this3.templates[category]=[]),_this3.templates[category].unshift(template)})}},{key:"sortTemplates",value:function(){var _this4=this;__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default()(this.templates).forEach(function(category){_this4.templates[category].sort(function(a,b){return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(a.id,10)<__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(b.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var emailType,_this5=this,selectedTab="standard";__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(response){emailType=response.data.type,__WEBPACK_IMPORTED_MODULE_17_underscore___default.a.findWhere(templatesCategories,{name:response.data.type})&&(selectedTab=response.data.type)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this5.setState({templates:_this5.templates,emailType:emailType,selectedTab:selectedTab,loading:!1})})}},{key:"afterTemplateDelete",value:function(success,id){var _this6=this;success&&__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default()(this.templates).forEach(function(category){_this6.templates[category]=_this6.templates[category].filter(function(template){return template.id!==id})}),this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(success,id){success?window.location=getEditorUrl(id):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(success,template){success&&this.addTemplate(template),this.setState({templates:this.templates,selectedTab:success?"saved":"import",loading:!1})}},{key:"render",value:function(){var _this7=this;if(this.state.loading)return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_common_loading_jsx__.a,null);var tabs=templatesCategories.concat({name:"import",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabImportTitle")}),selectedTab=this.state.selectedTab,content=null;if("import"===selectedTab)content=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15_newsletters_templates_import_template_jsx__.a,{beforeImport:function(){return _this7.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var templates=this.state.templates[this.state.selectedTab]||[];templates=0===templates.length?this.state.loading?null:__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("noTemplates")):templates.map(function(template,index){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_newsletters_templates_template_box_jsx__.a,__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({key:template.id,index:index,newsletterId:_this7.props.match.params.id,beforeDelete:function(){return _this7.setState({loading:!0})},afterDelete:_this7.afterTemplateDelete,beforeSelect:function(){return _this7.setState({loading:!0})},afterSelect:_this7.afterTemplateSelect},template))}),content=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("ul",{className:"mailpoet_boxes clearfix"},templates)}var breadcrumb=__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_template_breadcrumb",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default.a,{step:"template"}),this.state.emailType,"template");return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("selectTemplateTitle")),breadcrumb,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_tabs_jsx__.a,{tabs:tabs,selected:this.state.selectedTab,select:function(name){return _this7.setState({selectedTab:name})}}),content)}}]),NewsletterTemplates}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);NewsletterTemplates.propTypes={match:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.a=NewsletterTemplates},539:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_5_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__),__WEBPACK_IMPORTED_MODULE_6_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_6_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_mailpoet__),Loading=function(_React$Component){function Loading(){return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,Loading),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(Loading).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(Loading,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(Loading,[{key:"componentWillMount",value:function(){__WEBPACK_IMPORTED_MODULE_6_mailpoet___default.a.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){__WEBPACK_IMPORTED_MODULE_6_mailpoet___default.a.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),Loading}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);__webpack_exports__.a=Loading},540:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react_tooltip__=__webpack_require__(181),__WEBPACK_IMPORTED_MODULE_2_react_tooltip___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_tooltip__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__),__WEBPACK_IMPORTED_MODULE_4_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_4_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_string_replace__),tooltipText=__WEBPACK_IMPORTED_MODULE_4_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("tooltipTemplateTabs"),/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"https://mailpoet.polldaddy.com/s/select-template-feedback",key:"feedback",target:"_blank",rel:"noopener noreferrer"},match)}),Tabs=function(_ref){var tabs=_ref.tabs,selected=_ref.selected,select=_ref.select;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"wp-filter hide-if-no-js"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("ul",{className:"filter-links"},tabs.map(function(_ref2){var name=_ref2.name,label=_ref2.label;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",{key:name},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"javascript:",className:selected===name?"current":"",onClick:function(){return select(name)}}," ",label))})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"feedback-tooltip newsletter-templates-feedback","data-event":"click","data-tip":!0,"data-for":"feedback-newsletter-templates-tabs"},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("feedback")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_tooltip___default.a,{globalEventOff:"click",multiline:!0,id:"feedback-newsletter-templates-tabs",efect:"solid",place:"bottom"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{style:{pointerEvents:"all",display:"inline-block"}},tooltipText)))};Tabs.propTypes={selected:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,select:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,tabs:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({label:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,name:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired}).isRequired).isRequired},__webpack_exports__.a=Tabs},541:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mailpoet__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_common_confirm_alert_jsx__=__webpack_require__(368),TemplateBox=function(_React$Component){function TemplateBox(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,TemplateBox),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(TemplateBox).call(this,props)),_this.onPreview=_this.onPreview.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.onDelete=_this.onDelete.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.onSelect=_this.onSelect.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(TemplateBox,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(TemplateBox,[{key:"onDelete",value:function(){var _this$props=this.props,id=_this$props.id,name=_this$props.name,beforeDelete=_this$props.beforeDelete,afterDelete=_this$props.afterDelete,onConfirm=function(){beforeDelete(),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:id}}).done(function(){afterDelete(!0,id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterDelete(!1)})};Object(__WEBPACK_IMPORTED_MODULE_9_common_confirm_alert_jsx__.a)({message:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmTemplateDeletion").replace("%$1s",name),onConfirm:onConfirm})}},{key:"onPreview",value:function(){__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Modal.popup({title:this.props.name,template:'<div class="mailpoet_boxes_preview" style="background-color: {{ body.globalStyles.body.backgroundColor }}"><img src="{{ thumbnail }}" /></div>',data:this.props})}},{key:"onSelect",value:function(){var _this$props2=this.props,newsletterId=_this$props2.newsletterId,name=_this$props2.name,beforeSelect=_this$props2.beforeSelect,afterSelect=_this$props2.afterSelect;beforeSelect(),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":name}),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:newsletterId,template_id:this.props.id}}).done(function(response){afterSelect(!0,response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterSelect(!1)})}},{key:"render",value:function(){var _this$props3=this.props,index=_this$props3.index,name=_this$props3.name,thumbnail=_this$props3.thumbnail,readonly=_this$props3.readonly,deleteLink=__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_delete button button-secondary"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{href:"javascript:;",onClick:this.onDelete},__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("delete"))),preview="";return"string"==typeof thumbnail&&thumbnail.length>0&&(preview=__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{href:"javascript:;",onClick:this.onPreview},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("img",{src:thumbnail,alt:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("templatePreview")}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_overlay"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"mailpoet_more_details"},__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("zoom"))))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_thumbnail"},preview),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_description"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h3",null,name)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_actions"},"1"!==readonly&&deleteLink,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"select_template_".concat(index),onClick:this.onSelect,role:"button",tabIndex:0}," ",__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("select")," ")))}}]),TemplateBox}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);TemplateBox.propTypes={index:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number.isRequired,id:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,newsletterId:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,name:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,thumbnail:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,readonly:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,beforeDelete:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,afterDelete:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,beforeSelect:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,afterSelect:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired},__webpack_exports__.a=TemplateBox},542:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify__=__webpack_require__(323),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_8_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_underscore__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_help_tooltip_jsx__=__webpack_require__(180),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),ImportTemplate=function(_React$Component){function ImportTemplate(props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,ImportTemplate),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(ImportTemplate).call(this,props)),_this.fileRef=__WEBPACK_IMPORTED_MODULE_7_react___default.a.createRef(),_this.handleSubmit=_this.handleSubmit.bind(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(ImportTemplate,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(ImportTemplate,[{key:"saveTemplate",value:function(_saveTemplate){var template=_saveTemplate,_this$props=this.props,beforeImport=_this$props.beforeImport,afterImport=_this$props.afterImport;__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.isUndefined(template.body)||(template.body=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default()(template.body));try{template.categories=JSON.parse(template.categories)}catch(err){template.categories=[]}-1===template.categories.indexOf("saved")&&template.categories.push("saved"),-1===template.categories.indexOf("standard")&&-1===template.categories.indexOf("welcome")&&-1===template.categories.indexOf("notification")&&template.categories.push("standard"),template.categories=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default()(template.categories),beforeImport(),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:template}).done(function(response){afterImport(!0,response.data)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterImport(!1)})}},{key:"handleSubmit",value:function(e){var _this2=this;if(e.preventDefault(),__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.size(this.fileRef.current.files)<=0)return!1;var file=__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.first(this.fileRef.current.files),reader=new FileReader;return reader.onload=function(evt){try{_this2.saveTemplate(JSON.parse(evt.target.result)),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(err){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("templateFileMalformedError"))}},reader.readAsText(file),!0}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("importTemplateTitle"),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_help_tooltip_jsx__.default,{tooltip:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("form",{onSubmit:this.handleSubmit},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("input",{type:"file",placeholder:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("input",{className:"button button-primary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("upload")}))))}}]),ImportTemplate}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);ImportTemplate.propTypes={beforeImport:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func.isRequired,afterImport:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func.isRequired},__webpack_exports__.a=ImportTemplate},544:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify__=__webpack_require__(323),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_3_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_create_react_class__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),__WEBPACK_IMPORTED_MODULE_5_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_5_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_underscore__),__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_7_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_7_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_send_standard_jsx__=__webpack_require__(545),__WEBPACK_IMPORTED_MODULE_9_newsletters_send_notification_jsx__=__webpack_require__(549),__WEBPACK_IMPORTED_MODULE_10_newsletters_send_welcome_jsx__=__webpack_require__(550),__WEBPACK_IMPORTED_MODULE_11_help_tooltip_jsx__=__webpack_require__(180),__WEBPACK_IMPORTED_MODULE_12_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_12_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_jquery__),__WEBPACK_IMPORTED_MODULE_13_common_thumbnail_jsx__=__webpack_require__(370),__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_15_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_15_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_prop_types__),__WEBPACK_IMPORTED_MODULE_16_react_router_dom__=__webpack_require__(14),NewsletterSend=__WEBPACK_IMPORTED_MODULE_3_create_react_class___default()({displayName:"NewsletterSend",propTypes:{match:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.string}).isRequired}).isRequired,history:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.func.isRequired}).isRequired},getInitialState:function(){return{fields:[],item:{},loading:!0}},componentDidMount:function(){this.loadItem(this.props.match.params.id),__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley()},componentWillReceiveProps:function(props){this.loadItem(props.match.params.id)},getFieldsByNewsletter:function(newsletter){return this.getSubtype(newsletter).getFields(newsletter)},getSendButtonOptions:function(){return this.getSubtype(this.state.item).getSendButtonOptions(this.state.item)},getSubtype:function(newsletter){switch(newsletter.type){case"notification":return __WEBPACK_IMPORTED_MODULE_9_newsletters_send_notification_jsx__.a;case"welcome":return __WEBPACK_IMPORTED_MODULE_10_newsletters_send_welcome_jsx__.a;default:return __WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_newsletter_fields",__WEBPACK_IMPORTED_MODULE_8_newsletters_send_standard_jsx__.a,newsletter)}},isValid:function(){return __WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().isValid()},loadItem:function(id){var _this=this;this.setState({loading:!0}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){_this.setState({loading:!1,item:response.data,fields:_this.getFieldsByNewsletter(response.data)})}).fail(function(){_this.setState({loading:!1,item:{}},function(){_this.props.history.push("/new")})})},saveTemplate:function(response,done){var _this2=this;Object(__WEBPACK_IMPORTED_MODULE_13_common_thumbnail_jsx__.fromUrl)(response.meta.preview_url).then(function(thumbnail){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:response.data.id,name:response.data.subject,thumbnail:thumbnail,body:__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify___default()(response.data.body),categories:'["recent"]'}}).then(done).fail(function(err){_this2.showError(err),_this2.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),done()})}).catch(function(err){_this2.showError({errors:[err]})})},handleSend:function(e){var _this3=this;return e.preventDefault(),this.isValid()?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!0),this.saveNewsletter(e).done(function(){_this3.setState({loading:!0})}).done(function(response){switch(response.data.type){case"notification":case"welcome":return _this3.activateNewsletter(response);default:return _this3.sendNewsletter(response)}}).fail(function(err){_this3.showError(err),_this3.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})):__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().validate()},sendNewsletter:function(newsletter){var _this4=this;return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:this.state.item.id}},this.state.item)).done(function(response){_this4.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),void _this4.props.history.push("/send/congratulate/".concat(_this4.state.item.id));_this4.props.history.push(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/".concat(_this4.state.item.type||""),_this4.state.item));var customResponse=__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_response",_this4.state.item,response);__WEBPACK_IMPORTED_MODULE_5_underscore___default.a.isFunction(customResponse)?customResponse():"scheduled"===response.data.status?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterHasBeenScheduled")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterBeingSent")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})}).fail(function(err){_this4.showError(err),_this4.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})},activateNewsletter:function(newsletter){var _this5=this;return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:this.props.match.params.id,status:"active"}}).done(function(response){_this5.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),void _this5.props.history.push("/send/congratulate/".concat(_this5.state.item.id));_this5.props.history.push("/".concat(_this5.state.item.type||""));var opts=_this5.state.item.options;"welcome"===response.data.type?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("welcomeEmailActivated")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":opts.event,Delay:"".concat(opts.afterTimeNumber," ").concat(opts.afterTimeType)})):"notification"===response.data.type&&(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("postNotificationActivated")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:opts.intervalType})),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})}).fail(function(err){_this5.showError(err),_this5.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})},handleResume:function(e){var _this6=this;return e.preventDefault(),this.isValid()?this.saveNewsletter(e).done(function(){_this6.setState({loading:!0})}).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:_this6.state.item.id}}).done(function(){_this6.props.history.push("/".concat(_this6.state.item.type||"")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}).fail(function(err){_this6.showError(err)}).always(function(){_this6.setState({loading:!1})}):__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().validate(),!1},handleSave:function(e){var _this7=this;e.preventDefault(),this.saveNewsletter(e).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterUpdated"))}).done(function(){_this7.props.history.push("/".concat(_this7.state.item.type||""))}).fail(function(err){_this7.showError(err)})},handleRedirectToDesign:function(e){var _this8=this;e.preventDefault();var redirectTo=e.target.href;this.saveNewsletter(e).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterUpdated"))}).done(function(){window.location=redirectTo}).fail(function(err){_this8.showError(err)})},saveNewsletter:function(){var data=this.state.item;data.queue=void 0,this.setState({loading:!0});var IGNORED_NEWSLETTER_PROPERTIES=["preheader","body","created_at","deleted_at","hash","status","updated_at","type"],newsletterData=__WEBPACK_IMPORTED_MODULE_5_underscore___default.a.omit(data,IGNORED_NEWSLETTER_PROPERTIES);return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:newsletterData})},showError:function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})},handleFormChange:function(e){var item=this.state.item;return item[e.target.name]=e.target.value,this.setState({item:item}),!0},render:function(){var isPaused="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,fields=this.state.fields.map(function(field){var newField=field;return"segments"!==field.name&&"options"!==field.name||(newField.disabled=isPaused),newField}),sendButtonOptions=this.getSendButtonOptions(),breadcrumb=__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_breadcrumb",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx___default.a,{step:"send"}),this.state.item.type,"send");return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("finalNewsletterStep")),breadcrumb,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_form_form_jsx___default.a,{id:"mailpoet_newsletter",fields:fields,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",{className:"submit"},isPaused?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("resume")}):__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({className:"button button-primary",type:"button",onClick:this.handleSend,value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("send")},sendButtonOptions))," ",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",{className:"button button-secondary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("saveDraftAndClose")})," ",__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("orSimply")," ",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(this.props.match.params.id),onClick:this.handleRedirectToDesign},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("goBackToDesign")),"."),!isPaused&&sendButtonOptions.disabled&&"disabled"===sendButtonOptions.disabled&&__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_help_tooltip_jsx__.default,{tooltip:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}});__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_16_react_router_dom__.f)(NewsletterSend)},545:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof__=__webpack_require__(340),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_mailpoet__),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_13_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_13_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_prop_types__),__WEBPACK_IMPORTED_MODULE_14_newsletters_send_date_time_jsx__=__webpack_require__(546),currentTime=window.mailpoet_current_time||"00:00",defaultDateTime="".concat(window.mailpoet_current_date," 00:00:00"),timeOfDayItems=window.mailpoet_schedule_time_of_day,dateDisplayFormat=window.mailpoet_date_display_format,dateStorageFormat=window.mailpoet_date_storage_format,StandardScheduling=function(_React$Component){function StandardScheduling(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,StandardScheduling);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(StandardScheduling)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getCurrentValue",function(){var schedulingOptions={isScheduled:"0",scheduledAt:defaultDateTime};return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.defaults(_this.props.item[_this.props.field.name]||{},schedulingOptions)}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDateValidation",function(){return{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"isScheduled",function(){return"1"===_this.getCurrentValue().isScheduled}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleCheckboxChange",function(event){var changeEvent=event;return changeEvent.target.value=event.target.checked?"1":"0",_this.handleValueChange(changeEvent)}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(event){var oldValue=_this.getCurrentValue(),newValue={};return newValue[event.target.name]=event.target.value,_this.props.onValueChange({target:{name:_this.props.field.name,value:__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.extend({},oldValue,newValue)}})}),_this}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(StandardScheduling,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(StandardScheduling,[{key:"render",value:function(){var schedulingOptions;return this.isScheduled()&&(schedulingOptions=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",{id:"mailpoet_scheduling"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_newsletters_send_date_time_jsx__.a,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:defaultDateTime,timeOfDayItems:timeOfDayItems,dateDisplayFormat:dateDisplayFormat,dateStorageFormat:dateStorageFormat})," ",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("websiteTimeIs")," ",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("code",null,currentTime)))),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),schedulingOptions)}}]),StandardScheduling}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);StandardScheduling.propTypes={item:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.object,field:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.bool}).isRequired,onValueChange:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.func.isRequired},StandardScheduling.defaultProps={item:{}};var fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("segments"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("segmentsTip"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return"".concat(segment.name," (").concat(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(segment.subscribers,10).toLocaleString(),")")},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.map(segmentIds,function(id){return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("scheduleIt"),type:"reactComponent",component:StandardScheduling}];fields=__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(newsletter){var newsletterOptions=newsletter||{},isScheduled="object"===__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof___default()(newsletterOptions.options)&&"1"===newsletterOptions.options.isScheduled,options={value:isScheduled?__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("schedule"):__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("send")};return"sent"!==newsletterOptions.status&&"sending"!==newsletterOptions.status||(options.disabled="disabled"),options}}},546:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray__=__webpack_require__(359),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_newsletters_send_date_text_jsx__=__webpack_require__(547),__WEBPACK_IMPORTED_MODULE_11_newsletters_send_time_select_jsx__=__webpack_require__(548),DateTime=function(_React$Component){function DateTime(_props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,DateTime),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(DateTime).call(this,_props)),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDateTime",function(){return[_this.state.date,_this.state.time].join(_this.DATE_TIME_SEPARATOR)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"DATE_TIME_SEPARATOR"," "),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"buildStateFromProps",function(props){var value=props.value||_this.props.defaultDateTime,_value$split=value.split(_this.DATE_TIME_SEPARATOR),_value$split2=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray___default()(_value$split,2);return{date:_value$split2[0],time:_value$split2[1]}}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleChange",function(event){var newState={};newState[event.target.name]=event.target.value,_this.setState(newState,_this.propagateChange)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"propagateChange",function(){_this.props.onChange&&_this.props.onChange({target:{name:_this.props.name||"",value:_this.getDateTime()}})}),_this.state=_this.buildStateFromProps(_props),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(DateTime,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(DateTime,[{key:"componentWillReceiveProps",value:function(nextProps){this.setState(this.buildStateFromProps(nextProps))}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_send_date_text_jsx__.a,{name:"date",value:this.state.date,onChange:this.handleChange,displayFormat:this.props.dateDisplayFormat,storageFormat:this.props.dateStorageFormat,disabled:this.props.disabled,validation:this.props.dateValidation}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_send_time_select_jsx__.a,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),DateTime}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);DateTime.propTypes={defaultDateTime:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,dateDisplayFormat:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,dateStorageFormat:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,onChange:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func,name:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string,disabled:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool,dateValidation:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.object.isRequired,timeValidation:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.any,timeOfDayItems:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string).isRequired},DateTime.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0},__webpack_exports__.a=DateTime},547:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_9_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_jquery__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_mailpoet__),__WEBPACK_IMPORTED_MODULE_12_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_12_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types__),datepickerTranslations={closeText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("close"),currentText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("today"),nextText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("next"),prevText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("previous"),monthNames:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("january"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("february"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("march"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("april"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("may"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("june"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("july"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("august"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("september"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("october"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("november"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("december")],monthNamesShort:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("januaryShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("februaryShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("marchShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("aprilShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("juneShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("julyShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("augustShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("septemberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("octoberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("novemberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("decemberShort")],dayNames:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sunday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("monday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("friday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturday")],dayNamesShort:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sundayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mondayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("fridayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturdayShort")],dayNamesMin:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sundayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mondayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("fridayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturdayMin")]},DateText=function(_React$Component){function DateText(props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,DateText),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(DateText).call(this,props)),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onChange",function(event){var changeEvent=event,displayDate=changeEvent.target.value,storageDate=_this.getStorageDate(displayDate);changeEvent.target.value=storageDate,_this.props.onChange(changeEvent)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getFieldName",function(){return _this.props.name||"date"}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDisplayDate",function(date){var formatting={parseFormat:_this.props.storageFormat,format:_this.props.displayFormat};return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(date,formatting)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getStorageDate",function(date){var formatting={parseFormat:_this.props.displayFormat,format:_this.props.storageFormat};return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(date,formatting)}),_this.dateInput=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createRef(),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(DateText,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(DateText,[{key:"componentDidMount",value:function(){var $element=__WEBPACK_IMPORTED_MODULE_9_jquery___default()(this.dateInput.current),that=this;$element.datepicker&&(__WEBPACK_IMPORTED_MODULE_9_jquery___default.a.datepicker.parseDate=function(format,value){return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.toDate(value,{parseFormat:this.props.displayFormat,format:format})},__WEBPACK_IMPORTED_MODULE_9_jquery___default.a.datepicker.formatDate=function(format,value){return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(value,{format:format})},$element.datepicker(__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.extend({dateFormat:this.props.displayFormat,isRTL:!1,onSelect:function(value){that.onChange({target:{name:that.getFieldName(),value:value}})}},datepickerTranslations)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&__WEBPACK_IMPORTED_MODULE_9_jquery___default()(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("input",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({type:"text",size:"30",name:this.getFieldName(),value:this.getDisplayDate(this.props.value),readOnly:!0,disabled:this.props.disabled,onChange:this.onChange,ref:this.dateInput},this.props.validation))}}]),DateText}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);DateText.propTypes={displayFormat:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,onChange:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.func.isRequired,name:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string,storageFormat:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,value:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.bool.isRequired,validation:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object.isRequired},DateText.defaultProps={name:"date"},__webpack_exports__.a=DateText},548:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),TimeSelect=function(_React$Component){function TimeSelect(){return __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,TimeSelect),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(TimeSelect).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(TimeSelect,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(TimeSelect,[{key:"render",value:function(){var _this=this,options=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys___default()(this.props.timeOfDayItems).map(function(value){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("option",{key:"option-".concat(_this.props.timeOfDayItems[value]),value:value},_this.props.timeOfDayItems[value])});return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("select",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),options)}}]),TimeSelect}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);TimeSelect.propTypes={timeOfDayItems:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string).isRequired,name:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,value:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,onChange:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,validation:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object},TimeSelect.defaultProps={name:"time",disabled:!1,validation:{}},__webpack_exports__.a=TimeSelect},549:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_1_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_1_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_underscore__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_4_newsletters_types_notification_scheduling_jsx__=__webpack_require__(369),fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"options",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("selectFrequency"),type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_4_newsletters_types_notification_scheduling_jsx__.a},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segments"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentsTip"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return"".concat(segment.name," (").concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(segment.subscribers,10).toLocaleString(),")")},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return __WEBPACK_IMPORTED_MODULE_1_underscore___default.a.map(segmentIds,function(id){return __WEBPACK_IMPORTED_MODULE_1_underscore___default.a.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(){return{value:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("activate")}}}},550:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_2_newsletters_types_welcome_scheduling_jsx__=__webpack_require__(320),fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"options",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_2_newsletters_types_welcome_scheduling_jsx__.default},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(){return{value:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("activate")}}}},563:function(module,__webpack_exports__,__webpack_require__){"use strict";function successPageClosed(){return __WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_congratulate_after_first_newsletter:!1}}).always(function(){window.location=window.mailpoet_main_page})}function renderSuccess(newsletter,testingPassed){return testingPassed&&__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Cron testing done",{"Cron is working":"true"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__success_jsx__.a,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:successPageClosed,newsletter:newsletter})}function renderFail(){return __WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Cron testing done",{"Cron is working":"false"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__fail_jsx__.a,{failClicked:function(){window.location=window.mailpoet_main_page}})}function renderLoading(showRichLoadingScreen){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__loading_jsx__.a,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:successPageClosed,showRichLoadingScreen:showRichLoadingScreen})}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_moment__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_9_moment___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__),__WEBPACK_IMPORTED_MODULE_10__success_jsx__=__webpack_require__(564),__WEBPACK_IMPORTED_MODULE_11__fail_jsx__=__webpack_require__(565),__WEBPACK_IMPORTED_MODULE_12__loading_jsx__=__webpack_require__(566),Congratulate=function(_React$Component){function Congratulate(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,Congratulate),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(Congratulate).call(this,props)),_this.state={loading:!0,fail:!1,newsletter:null,testingPassed:!1,timeStart:__WEBPACK_IMPORTED_MODULE_9_moment___default()(),minimumLoadingTimePassed:!1},_this.tick=_this.tick.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(Congratulate,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(Congratulate,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentWillReceiveProps",value:function(props){this.loadNewsletter(props.match.params.id)}},{key:"tick",value:function(){__WEBPACK_IMPORTED_MODULE_9_moment___default()().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),__WEBPACK_IMPORTED_MODULE_9_moment___default()().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||setTimeout(this.tick,2e3)}},{key:"loadNewsletter",value:function(id){var _this2=this;__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){return _this2.newsletterLoaded(response.data)})}},{key:"newsletterLoaded",value:function(newsletter){"standard"!==newsletter.type||"scheduled"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,minimumLoadingTimePassed:!0}):"sent"===newsletter.status||"sending"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,testingPassed:!0}):this.setState({newsletter:newsletter})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?renderLoading(!!this.state.newsletter):this.state.error?renderFail():renderSuccess(this.state.newsletter,this.state.testingPassed)}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),Congratulate}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);Congratulate.propTypes={match:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.a=Congratulate},564:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderHeader(newsletter){return"welcome"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===newsletter.status?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsScheduleSuccessHeader"):__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsSendSuccessHeader")}function Success(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_congratulate_success"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,renderHeader(props.newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:props.illustrationImageUrl,alt:"",width:"750",height:"250"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("button",{className:"button",onClick:props.successClicked},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("close")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__);Success.propTypes={successClicked:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,illustrationImageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,newsletter:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,type:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired}).isRequired},__webpack_exports__.a=Success},565:function(module,__webpack_exports__,__webpack_require__){"use strict";function Fail(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_centered"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("congratulationsSendFailHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(match,i){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{key:i,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work"},match)})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("button",{className:"button",onClick:props.failClicked},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("close")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_string_replace__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__);Fail.propTypes={failClicked:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired},__webpack_exports__.a=Fail},566:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderRichData(showRichData,illustrationImageUrl){return showRichData?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",{className:"mailpoet_newsletter_loading_header"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsLoadingHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:illustrationImageUrl,alt:"",width:"800px",height:"266px"})):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null)}function Loading(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_newsletter_loading"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_loading_jsx__.a,null),renderRichData(props.showRichLoadingScreen,props.illustrationImageUrl))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_loading_jsx__=__webpack_require__(567);Loading.propTypes={illustrationImageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,showRichLoadingScreen:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool.isRequired},__webpack_exports__.a=Loading},567:function(module,__webpack_exports__,__webpack_require__){"use strict";function Loading(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_loading"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);__webpack_exports__.a=Loading},568:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11_react_router_dom__=__webpack_require__(14),NewsletterStandard=function(_React$Component){function NewsletterStandard(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterStandard);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterStandard)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"showTemplateSelection",function(newsletterId){_this.props.history.push("/template/".concat(newsletterId))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterStandard,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterStandard,[{key:"componentDidMount",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("regularNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default.a,{step:"type"}))}}]),NewsletterStandard}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterStandard,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_11_react_router_dom__.f)(NewsletterStandard)},569:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_11_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_underscore__),__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__=__webpack_require__(369),__WEBPACK_IMPORTED_MODULE_13_react_router_dom__=__webpack_require__(14),field={name:"options",type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__.a},NewsletterNotification=function(_React$Component){function NewsletterNotification(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterNotification);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterNotification)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"state",{options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(event){var state=_this.state;state[event.target.name]=event.target.value,_this.setState(state)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleNext",function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:__WEBPACK_IMPORTED_MODULE_11_underscore___default.a.extend({},_this.state,{type:"notification",subject:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("draftPostNotificationTitle")})}).done(function(response){_this.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"showTemplateSelection",function(newsletterId){_this.props.history.push("/template/".concat(newsletterId))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterNotification,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterNotification,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h3",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("selectFrequency")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__.a,{item:this.state,field:field,onValueChange:this.handleValueChange}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("next")})))}}]),NewsletterNotification}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterNotification,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_13_react_router_dom__.f)(NewsletterNotification)},570:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_7_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_underscore__),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__=__webpack_require__(320),field={name:"options",label:"Event",type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__.default},NewsletterWelcome=function(_React$Component){function NewsletterWelcome(props){var _this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterWelcome),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterWelcome).call(this,props));var availableSegments=window.mailpoet_segments||[],defaultSegment=1;return availableSegments=availableSegments.filter(function(segment){return"default"===segment.type}),__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.size(availableSegments)>0&&(defaultSegment=__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.first(availableSegments).id),_this.state={options:{event:"segment",segment:defaultSegment,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},_this.handleValueChange=_this.handleValueChange.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.handleNext=_this.handleNext.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterWelcome,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterWelcome,[{key:"handleValueChange",value:function(event){var state=this.state;state[event.target.name]=event.target.value,this.setState(state)}},{key:"handleNext",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.extend({},this.state,{type:"welcome",subject:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("draftNewsletterTitle")})}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(newsletterId){this.props.history.push("/template/".concat(newsletterId))}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("welcomeNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h3",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("selectEventToSendWelcomeEmail")),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("next")})))}}]),NewsletterWelcome}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);NewsletterWelcome.propTypes={history:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func.isRequired}).isRequired},__webpack_exports__.a=NewsletterWelcome},571:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_2_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__),__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_5_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_5_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__),__WEBPACK_IMPORTED_MODULE_6_common_confirm_alert_jsx__=__webpack_require__(368),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__=__webpack_require__(202),mailpoetTrackingEnabled=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__),!!window.mailpoet_tracking_enabled),messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)}},columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("status")},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("lists")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("sentOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],confirmEdit=function(newsletter){var redirectToEditing=function(){window.location.href="?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)};newsletter.queue&&"sending"===newsletter.status&&null===newsletter.queue.status?Object(__WEBPACK_IMPORTED_MODULE_6_common_confirm_alert_jsx__.a)({message:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("confirmEdit"),onConfirm:redirectToEditing}):redirectToEditing()},newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("preview"))}},{name:"edit",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("edit"),onClick:confirmEdit},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}];__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_standard_actions",__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_standard_actions",newsletterActions);var NewsletterListStandard=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListStandard",propTypes:{location:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.QueueMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=__WEBPACK_IMPORTED_MODULE_2_classnames___default()("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return confirmEdit(newsletter)}},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("sentOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,newsletter.sent_at?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Date.format(newsletter.sent_at):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("notSentYet"))))},render:function(){var _this=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default.a,{tab:"standard"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"standard",base_url:"standard",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListStandard},572:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_2_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__),__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__=__webpack_require__(202),__WEBPACK_IMPORTED_MODULE_8_classnames__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__),__webpack_require__(13)),__WEBPACK_IMPORTED_MODULE_8_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks__),mailpoetRoles=window.mailpoet_roles||{},mailpoetSegments=window.mailpoet_segments||{},mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("status"),width:145},{name:"settings",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("settings")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("preview"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"edit",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))}},{name:"trash"}];__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_welcome_notification_actions",__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_welcome_notification_actions",newsletterActions);var NewsletterListWelcome=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListWelcome",propTypes:{location:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.CronMixin],updateStatus:function(e){var _this=this;e.persist(),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEmailActivated")),_this.forceUpdate()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEmailActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){var totalSentMessage=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sentToXSubscribers").replace("%$1d",newsletter.total_sent.toLocaleString()),totalScheduledMessage=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("scheduledToXSubscribers").replace("%$1d",newsletter.total_scheduled.toLocaleString());return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"active"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("active")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"draft"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("inactive")))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,totalSentMessage," ",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("br",null),totalScheduledMessage))},renderSettings:function(newsletter){var sendingEvent,sendingDelay,segment;switch(newsletter.options.event){case"user":sendingEvent="mailpoet_all"===newsletter.options.role?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventWPUserAnyRole"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",mailpoetRoles[newsletter.options.role]);break;default:if(void 0===(segment=__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.find(mailpoetSegments,function(seg){return Number(seg.id)===Number(newsletter.options.segment)})))return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"mailpoet_error"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingToSegmentsNotSpecified"));sendingEvent=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventSegment").replace("%$1s",segment.name)}if(sendingEvent&&"immediate"!==newsletter.options.afterTimeType){switch(newsletter.options.afterTimeType){case"hours":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayHours").replace("%$1d",newsletter.options.afterTimeNumber);break;case"days":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayDays").replace("%$1d",newsletter.options.afterTimeNumber);break;case"weeks":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayWeeks").replace("%$1d",newsletter.options.afterTimeNumber);break;default:sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayInvalid")}sendingEvent+=" [".concat(sendingDelay,"].")}return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",null,sendingEvent)},renderItem:function(newsletter,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_8_classnames___default()("manage-column","column-primary","has-row-actions");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("status")},this.renderStatus(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("settings")},this.renderSettings(newsletter)),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,newsletter.total_sent>0&&newsletter.statistics)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx___default.a,{tab:"welcome"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"welcome",base_url:"welcome",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListWelcome},573:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_3_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__),__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__=__webpack_require__(202),__WEBPACK_IMPORTED_MODULE_9_classnames__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__),__webpack_require__(13)),__WEBPACK_IMPORTED_MODULE_9_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__=__webpack_require__(321),messages=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__),{onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)}}),columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status"),width:100},{name:"settings",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("settings")},{name:"history",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("history"),width:100},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("preview"))}},{name:"edit",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],NewsletterListNotification=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListNotification",propTypes:{location:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__.CronMixin],updateStatus:function(e){var _this=this;e.persist(),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationActivated")),_this.forceUpdate()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"active"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("active")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"draft"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("inactive")))},renderSettings:function(newsletter){var sendingFrequency,segments=newsletter.segments.map(function(segment){return segment.name}),sendingToSegments=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("ifNewContentToSegments").replace("%$1s",segments.join(", "));if(0===segments.length)return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"mailpoet_error"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendingToSegmentsNotSpecified"));switch(newsletter.options.intervalType){case"daily":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendDaily").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"weekly":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendWeekly").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues[newsletter.options.weekDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"monthly":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendMonthly").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.monthDayValues[newsletter.options.monthDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"nthWeekDay":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendNthWeekDay").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.nthWeekDayValues[newsletter.options.nthWeekDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues[newsletter.options.weekDay]).replace("%$3s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"immediately":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendImmediately");break;default:sendingFrequency="Invalid sending frequency"}return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",null,sendingFrequency," ",sendingToSegments)},renderHistoryLink:function(newsletter){return 0===Number(newsletter.children_count)?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("notSentYet"):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{"data-automation-id":"history-".concat(newsletter.id),to:"/notification/history/".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("viewHistory"))},renderItem:function(newsletter,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_9_classnames___default()("manage-column","column-primary","has-row-actions");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status")},this.renderStatus(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("settings")},this.renderSettings(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("history")},this.renderHistoryLink(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx___default.a,{tab:"notification"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification",base_url:"notification",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListNotification},574:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_3_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_6_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_6_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__=__webpack_require__(202),mailpoetTrackingEnabled=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__),!!window.mailpoet_tracking_enabled),columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("subject")},{name:"status",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("status")},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("lists")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("sentOn")}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("preview"))}}];__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_notification_history_actions",__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_notification_history_actions",newsletterActions);var NewsletterListNotificationHistory=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListNotificationHistory",propTypes:{location:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.QueueMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=__WEBPACK_IMPORTED_MODULE_3_classnames___default()("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("sentOn")},newsletter.sent_at?__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Date.format(newsletter.sent_at):__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("notSentYet")))},render:function(){var _this=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default.a,{tab:"notification"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{className:"page-title-action",to:"/notification"},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("backToPostNotifications")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:this.renderItem,columns:columns,item_actions:newsletterActions,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListNotificationHistory},575:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_segments_list_jsx__=__webpack_require__(576),__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx__=__webpack_require__(577),__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx__),container=document.getElementById("segments_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/new",component:__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/edit/:id",component:__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3_segments_list_jsx__.a}))),container)},576:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_10_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx__),columns=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("name"),sortable:!0},{name:"description",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("description")},{name:"subscribed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subscribed")},{name:"unconfirmed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unconfirmed")},{name:"unsubscribed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unsubscribed")},{name:"bounced",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("bounced")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{to:"/edit/".concat(item.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))},display:function(segment){return"wp_users"!==segment.type}},{name:"duplicate_segment",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(item,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:item.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("listDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"!==segment.type}},{name:"read_more",link:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"http://docs.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("readMore"))},display:function(segment){return"wp_users"===segment.type}},{name:"synchronize_segment",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("forceSync"),onClick:function(item,refresh){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!0),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize"}).done(function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!1),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("listSynchronized").replace("%$1s",item.name)),refresh()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!1),response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"===segment.type}},{name:"view_subscribers",link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:item.subscribers_url},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("viewSubscribers"))}},{name:"trash",display:function(segment){return"wp_users"!==segment.type}}],SegmentList=function(_React$Component){function SegmentList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SegmentList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SegmentList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(segment,actions){var segmentName,rowClasses=__WEBPACK_IMPORTED_MODULE_10_classnames___default()("manage-column","column-primary","has-row-actions"),subscribed=Number(segment.subscribers_count.subscribed||0),unconfirmed=Number(segment.subscribers_count.unconfirmed||0),unsubscribed=Number(segment.subscribers_count.unsubscribed||0),bounced=Number(segment.subscribers_count.bounced||0);return segmentName="wp_users"===segment.type?__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("span",{className:"row-title"},segment.name):__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"row-title",to:"/edit/".concat(segment.id)},segment.name),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,segmentName),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("description")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,segment.description)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subscribed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,subscribed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unconfirmed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,unconfirmed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unsubscribed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,unsubscribed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("bounced")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,bounced.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(segment.created_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SegmentList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SegmentList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"page-title-action",to:"/new"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("new"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,sort_by:"name",sort_order:"asc"}))}}]),SegmentList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);SegmentList.propTypes={location:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object}).isRequired},__webpack_exports__.a=SegmentList},577:function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(578)}).call(exports,__webpack_require__(11))},578:function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_3_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_4_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_4_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__),fields=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("name"),type:"text"},{name:"description",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("description"),type:"textarea",tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentDescriptionTip")}],messages={onUpdate:function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentUpdated"))},onCreate:function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentAdded")),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},SegmentForm=function(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segment"),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__.b,{className:"page-title-action",to:"/"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("backToList"))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_form_form_jsx___default.a,{endpoint:"segments",fields:fields,params:props.match.params,messages:messages}))};SegmentForm.propTypes={match:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.default=SegmentForm},579:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3__list_jsx__=__webpack_require__(580),container=document.getElementById("forms_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3__list_jsx__.a})),container)},580:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_8_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_10_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_jquery__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx__),columns=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("formName"),sortable:!0},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("segments")},{name:"signups",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("signups")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"),link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id=".concat(item.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(item,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:item.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("formDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],FormList=function(_React$Component){function FormList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,FormList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(FormList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"createForm",function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(response){window.location=window.mailpoet_form_edit_url+response.data.id}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(form,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_8_classnames___default()("manage-column","column-primary","has-row-actions"),segments=window.mailpoet_segments.filter(function(segment){return-1!==__WEBPACK_IMPORTED_MODULE_10_jquery___default.a.inArray(segment.id,form.segments)}).map(function(segment){return segment.name}).join(", ");return"user"===form.settings.segments_selected_by&&(segments="".concat(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("userChoice")," ").concat(segments)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id=".concat(form.id)},form.name)),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("segments")},segments),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("signups")},form.signups),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(form.created_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(FormList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(FormList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("new"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions}))}}]),FormList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);FormList.propTypes={location:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object}).isRequired},__webpack_exports__.a=FormList},581:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(30),__webpack_require__(5),__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,jQuery,mp){var MailPoet=mp;0!==jQuery("#mailpoet_settings").length&&(MailPoet.Router=new(Backbone.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(group){this.tabs("mta"),jQuery("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),jQuery(".mailpoet_settings_submit").hide(),null===group?jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(jQuery("#mailpoet_mta_spf")["mailpoet"===group?"hide":"show"](),jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),jQuery('.mailpoet_sending_method[data-group="'+group+'"]').show(),jQuery("#mailpoet_sending_method_setup").fadeIn())},tabs:function(tab){jQuery(".nav-tab-wrapper a").removeClass("nav-tab-active"),jQuery(".mailpoet_tab_panel, .mailpoet_section").hide(),jQuery('a.nav-tab[href="#'+tab+'"]').addClass("nav-tab-active").blur(),jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').length>0&&jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').show(),jQuery(".mailpoet_settings_submit").show(),MailPoet.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":tab})}})),jQuery(document).ready(function(){Backbone.History.started||Backbone.history.start()}))}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},583:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_help_knowledge_base_jsx__=__webpack_require__(584),__WEBPACK_IMPORTED_MODULE_4_help_system_info_jsx__=__webpack_require__(585),__WEBPACK_IMPORTED_MODULE_5_help_system_status_jsx__=__webpack_require__(586),__WEBPACK_IMPORTED_MODULE_6_help_your_privacy_jsx__=__webpack_require__(592),container=document.getElementById("help_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.c,{to:"/knowledgeBase"})}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/knowledgeBase",component:__WEBPACK_IMPORTED_MODULE_3_help_knowledge_base_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/systemStatus",component:__WEBPACK_IMPORTED_MODULE_5_help_system_status_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/systemInfo",component:__WEBPACK_IMPORTED_MODULE_4_help_system_info_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/yourPrivacy",component:__WEBPACK_IMPORTED_MODULE_6_help_your_privacy_jsx__.a}))),container)},584:function(module,__webpack_exports__,__webpack_require__){"use strict";function KnowledgeBase(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__.a,{tab:"knowledgeBase"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("knowledgeBaseIntro")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("ul",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/116-common-problems"},"Common Problems")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/165-newsletters"},"Newsletters")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/156-migration-questions"},"Migration Questions")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/149-sending-methods"},"Sending Methods")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/114-getting-started"},"Getting Started")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("knowledgeBaseButton")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=KnowledgeBase},585:function(module,__webpack_exports__,__webpack_require__){"use strict";function handleFocus(event){event.target.select()}function printData(data){if(__WEBPACK_IMPORTED_MODULE_3_underscore___default.a.isObject(data)){var printableData=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys___default()(data).map(function(key){return"".concat(key,": ").concat(data[key])});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("textarea",{readOnly:!0,onFocus:handleFocus,value:printableData.join("\n"),style:{width:"100%",height:"400px"}})}return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("systemInfoDataError"))}function SystemInfo(){var systemInfoData=window.systemInfoData;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tabs_jsx__.a,{tab:"systemInfo"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("systemInfoIntro"))),printData(systemInfoData))}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_3_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_underscore__),__WEBPACK_IMPORTED_MODULE_4__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=SystemInfo},586:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderStatusMessage(status,error,link){var noticeType=status?"success":"error",noticeMessage=status?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusConnectionSuccessful"):"".concat(__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusConnectionUnsuccessful")," ").concat(error);return link&&(noticeMessage=__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default()(noticeMessage,/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:"".concat(link),key:"kb-link"},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline notice-".concat(noticeType),style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,noticeMessage))}function renderCronSection(data){var status=data.cron.isReachable,url=data.cron.url;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:url,target:"_blank"},url)),renderStatusMessage(status,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),"//beta.docs.mailpoet.com/article/231-sending-does-not-work"))}function renderMSSSection(data){if(data.mss.enabled){var status=data.mss.enabled.isReachable;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusMSSTitle")),renderStatusMessage(status,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}function SystemStatus(){var systemStatusData=window.systemStatusData;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__tabs_jsx__.a,{tab:"systemStatus"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,systemStatusData.mss.enabled?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusIntroCronMSS"):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusIntroCron"))),renderCronSection(systemStatusData),renderMSSSection(systemStatusData),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__cron_status_jsx__.a,{status_data:systemStatusData.cronStatus}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__queue_status_jsx__.a,{status_data:systemStatusData.queueStatus}))}var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_string_replace__),__WEBPACK_IMPORTED_MODULE_3__cron_status_jsx__=__webpack_require__(587),__WEBPACK_IMPORTED_MODULE_4__queue_status_jsx__=__webpack_require__(589),__WEBPACK_IMPORTED_MODULE_5__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=SystemStatus},587:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__=__webpack_require__(375),__WEBPACK_IMPORTED_MODULE_4_common_print_boolean_jsx__=__webpack_require__(588),CronStatus=function(props){var status=props.status_data,activeStatusMapping={active:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("running"),inactive:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("cronWaiting")};return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronStatusTitle")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__.a,{max_width:"400px",rows:[{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("accessible"),value:__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_common_print_boolean_jsx__.a,null,status.accessible)},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("status"),value:activeStatusMapping[status.status]?activeStatusMapping[status.status]:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastUpdated"),value:status.updated_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.updated_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastRunStarted"),value:status.run_accessed_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.run_started_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastRunCompleted"),value:status.run_completed_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.run_completed_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastSeenError"),value:status.last_error||__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")}]}))};CronStatus.propTypes={status_data:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({accessible:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,updated_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,run_accessed_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,run_completed_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number}).isRequired},CronStatus.defaultProps={status_data:{accessible:null,status:null,updated_at:null,run_accessed_at:null,run_completed_at:null}},__webpack_exports__.a=CronStatus},588:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),PrintBoolean=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",null,!0===props.children&&props.truthy||!1===props.children&&props.falsy||props.unknown)};PrintBoolean.propTypes={truthy:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,falsy:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,unknown:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,children:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool},PrintBoolean.defaultProps={truthy:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("yes"),falsy:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("no"),unknown:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("unknown"),children:null},__webpack_exports__.a=PrintBoolean},589:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__=__webpack_require__(375),__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__=__webpack_require__(590),__WEBPACK_IMPORTED_MODULE_5__tasks_list_tasks_list_data_row_jsx__=__webpack_require__(376),QueueStatus=function(props){var status=props.status_data;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusQueueTitle")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__.a,{max_width:"400px",rows:[{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("status"),value:"paused"===status.status?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("paused"):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("running")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("startedAt"),value:status.started?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.started):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sentEmails"),value:status.sent||0},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("retryAttempt"),value:status.retry_attempt||__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("retryAt"),value:status.retry_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.retry_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("error"),value:status.error?status.error.error_message:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalCompletedTasks"),value:status.tasksStatusCounts.completed},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalRunningTasks"),value:status.tasksStatusCounts.running},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalPausedTasks"),value:status.tasksStatusCounts.paused},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalScheduledTasks"),value:status.tasksStatusCounts.scheduled}]}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("scheduledTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{show_scheduled_at:!0,tasks:status.latestTasks.filter(function(task){return"scheduled"===task.status})}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("runningTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{tasks:status.latestTasks.filter(function(task){return null===task.status})}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("completedTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{tasks:status.latestTasks.filter(function(task){return"completed"===task.status})}))};QueueStatus.propTypes={status_data:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,started:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,sent:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,retry_attempt:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,retry_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,error:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({operation:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,error_message:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string}),tasksStatusCounts:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({completed:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,running:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,paused:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,scheduled:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired}).isRequired,latestTasks:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5__tasks_list_tasks_list_data_row_jsx__.a.propTypes.task).isRequired}).isRequired},QueueStatus.defaultProps={status_data:{status:null,started:null,sent:null,retry_attempt:null,retry_at:null,error:null}},__webpack_exports__.a=QueueStatus},590:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__=__webpack_require__(376),__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__=__webpack_require__(591),TasksList=function(props){var colsCount=props.show_scheduled_at?6:5;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("table",{className:"widefat fixed striped"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("thead",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__.a,{show_scheduled_at:props.show_scheduled_at})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tbody",null,props.tasks.length?props.tasks.map(function(task){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__.a,{key:task.id,task:task,show_scheduled_at:props.show_scheduled_at})}):__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",{className:"no-items"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{colSpan:colsCount},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("nothingToShow")))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tfoot",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__.a,{show_scheduled_at:props.show_scheduled_at})))};TasksList.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,tasks:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__.a.propTypes.task).isRequired},TasksList.defaultProps={show_scheduled_at:!1},__webpack_exports__.a=TasksList},591:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),TasksListLabelsRow=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},"Id"),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("type")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("email")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("priority")),props.show_scheduled_at?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("scheduledAt")):null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("updatedAt")))};TasksListLabelsRow.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool},TasksListLabelsRow.defaultProps={show_scheduled_at:!1},__webpack_exports__.a=TasksListLabelsRow},592:function(module,__webpack_exports__,__webpack_require__){"use strict";function YourPrivacy(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__.a,{tab:"yourPrivacy"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent1")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent2")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent3")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyButton")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=YourPrivacy},593:function(module,__webpack_exports__,__webpack_require__){"use strict";function Intro(){if(!(introActive||innerWidth<=960)){var intro=__WEBPACK_IMPORTED_MODULE_1_intro_js___default()();intro.setOptions({steps:introSteps,nextLabel:"".concat(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introNext")," →"),prevLabel:"← ".concat(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introBack")),skipLabel:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introSkip"),doneLabel:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),intro.onbeforechange(function(){var step=intro._currentStep,element=introSteps[step].element;intro._introItems[step].element="string"==typeof element?document.querySelector(element):element}),intro.onafterchange(function(targetElement){if("fixed"===getComputedStyle(targetElement).getPropertyValue("position")){var helperLayer=document.querySelector(".introjs-helperLayer"),referenceLayer=document.querySelector(".introjs-tooltipReferenceLayer");referenceLayer.style.top="".concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(referenceLayer.style.top,10)-pageYOffset,"px"),helperLayer.style.top="".concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(helperLayer.style.top,10)-pageYOffset,"px")}}),intro.onexit(function(){introActive=!1,document.body.classList.remove("mailpoet-intro-active")}),intro.onskip(function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),intro.start(),introActive=!0,document.body.classList.add("mailpoet-intro-active")}}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_1_intro_js__=__webpack_require__(594),__WEBPACK_IMPORTED_MODULE_1_intro_js___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_intro_js__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),introSteps=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introForms")},{element:"#hs-beacon:not(.hs-beacon-hidden) iframe, .olark-launch-button",intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introEmails")}],introActive=!1;__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.showIntro=Intro},594:function(module,exports,__webpack_require__){!function(f){module.exports=f(),module.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),f().apply(this,arguments)}}(function(){function IntroJs(obj){this._targetElement=obj,this._introItems=[],this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function _introForElement(targetElm,group){var allIntroSteps=targetElm.querySelectorAll("*[data-intro]"),introItems=[];if(this._options.steps)_forEach(this._options.steps,function(step){var currentItem=_cloneObject(step);if(currentItem.step=introItems.length+1,"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),void 0===currentItem.element||null===currentItem.element){var floatingElementQuery=document.querySelector(".introjsFloatingElement");null===floatingElementQuery&&(floatingElementQuery=document.createElement("div"),floatingElementQuery.className="introjsFloatingElement",document.body.appendChild(floatingElementQuery)),currentItem.element=floatingElementQuery,currentItem.position="floating"}currentItem.scrollTo=currentItem.scrollTo||this._options.scrollTo,void 0===currentItem.disableInteraction&&(currentItem.disableInteraction=this._options.disableInteraction),null!==currentItem.element&&introItems.push(currentItem)}.bind(this));else{var disableInteraction,elmsLength=allIntroSteps.length;if(elmsLength<1)return!1;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&"none"!==currentElement.style.display){var step=parseInt(currentElement.getAttribute("data-step"),10);disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,step>0&&(introItems[step-1]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:parseInt(currentElement.getAttribute("data-step"),10),tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction})}}.bind(this));var nextStep=0;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&null===currentElement.getAttribute("data-step")){for(;;){if(void 0===introItems[nextStep])break;nextStep++}disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,introItems[nextStep]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:nextStep+1,tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction}}}.bind(this))}for(var tempIntroItems=[],z=0;z<introItems.length;z++)introItems[z]&&tempIntroItems.push(introItems[z]);return introItems=tempIntroItems,introItems.sort(function(a,b){return a.step-b.step}),this._introItems=introItems,_addOverlayLayer.call(this,targetElm)&&(_nextStep.call(this),this._options.keyboardNavigation&&DOMEvent.on(window,"keydown",_onKeyDown,this,!0),DOMEvent.on(window,"resize",_onResize,this,!0)),!1}function _onResize(){this.refresh.call(this)}function _onKeyDown(e){var code=null===e.code?e.which:e.code;if(null===code&&(code=null===e.charCode?e.keyCode:e.charCode),"Escape"!==code&&27!==code||!0!==this._options.exitOnEsc){if("ArrowLeft"===code||37===code)_previousStep.call(this);else if("ArrowRight"===code||39===code)_nextStep.call(this);else if("Enter"===code||13===code){var target=e.target||e.srcElement;target&&target.className.match("introjs-prevbutton")?_previousStep.call(this):target&&target.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),_exitIntro.call(this,this._targetElement)):target&&target.getAttribute("data-stepnumber")?target.click():_nextStep.call(this),e.preventDefault?e.preventDefault():e.returnValue=!1}}else _exitIntro.call(this,this._targetElement)}function _cloneObject(object){if(null===object||"object"!=typeof object||void 0!==object.nodeType)return object;var temp={};for(var key in object)void 0!==window.jQuery&&object[key]instanceof window.jQuery?temp[key]=object[key]:temp[key]=_cloneObject(object[key]);return temp}function _goToStep(step){this._currentStep=step-2,void 0!==this._introItems&&_nextStep.call(this)}function _goToStepNumber(step){this._currentStepNumber=step,void 0!==this._introItems&&_nextStep.call(this)}function _nextStep(){this._direction="forward",void 0!==this._currentStepNumber&&_forEach(this._introItems,function(item,i){item.step===this._currentStepNumber&&(this._currentStep=i-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;return void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void _exitIntro.call(this,this._targetElement)):void _showElement.call(this,nextStep)}function _previousStep(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;if(void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep)return++this._currentStep,!1;_showElement.call(this,nextStep)}function _refresh(){if(_setHelperLayerPosition.call(this,document.querySelector(".introjs-helperLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var oldHelperNumberLayer=document.querySelector(".introjs-helperNumberLayer"),oldArrowLayer=document.querySelector(".introjs-arrow"),oldtooltipContainer=document.querySelector(".introjs-tooltip");_placeTooltip.call(this,this._introItems[this._currentStep].element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer)}return _reAlignHints.call(this),this}function _exitIntro(targetElement,force){var continueExit=!0;if(void 0!==this._introBeforeExitCallback&&(continueExit=this._introBeforeExitCallback.call(this)),force||!1!==continueExit){var overlayLayers=targetElement.querySelectorAll(".introjs-overlay");overlayLayers&&overlayLayers.length&&_forEach(overlayLayers,function(overlayLayer){overlayLayer.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(overlayLayer),500)}.bind(this));var helperLayer=targetElement.querySelector(".introjs-helperLayer");helperLayer&&helperLayer.parentNode.removeChild(helperLayer);var referenceLayer=targetElement.querySelector(".introjs-tooltipReferenceLayer");referenceLayer&&referenceLayer.parentNode.removeChild(referenceLayer);var disableInteractionLayer=targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);var floatingElement=document.querySelector(".introjsFloatingElement");floatingElement&&floatingElement.parentNode.removeChild(floatingElement),_removeShowElement();_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),DOMEvent.off(window,"keydown",_onKeyDown,this,!0),DOMEvent.off(window,"resize",_onResize,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function _placeTooltip(targetElement,tooltipLayer,arrowLayer,helperNumberLayer,hintMode){var currentStepObj,tooltipOffset,targetOffset,windowSize,currentTooltipPosition,tooltipCssClass="";if(hintMode=hintMode||!1,tooltipLayer.style.top=null,tooltipLayer.style.right=null,tooltipLayer.style.bottom=null,tooltipLayer.style.left=null,tooltipLayer.style.marginLeft=null,tooltipLayer.style.marginTop=null,arrowLayer.style.display="inherit",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.top=null,helperNumberLayer.style.left=null),this._introItems[this._currentStep]){currentStepObj=this._introItems[this._currentStep],tooltipCssClass="string"==typeof currentStepObj.tooltipClass?currentStepObj.tooltipClass:this._options.tooltipClass,tooltipLayer.className=("introjs-tooltip "+tooltipCssClass).replace(/^\s+|\s+$/g,""),tooltipLayer.setAttribute("role","dialog"),currentTooltipPosition=this._introItems[this._currentStep].position,"floating"!==currentTooltipPosition&&(currentTooltipPosition=_determineAutoPosition.call(this,targetElement,tooltipLayer,currentTooltipPosition));var tooltipLayerStyleLeft;switch(targetOffset=_getOffset(targetElement),tooltipOffset=_getOffset(tooltipLayer),windowSize=_getWinSize(),_addClass(tooltipLayer,"introjs-"+currentTooltipPosition),currentTooltipPosition){case"top-right-aligned":arrowLayer.className="introjs-arrow bottom-right";var tooltipLayerStyleRight=0;_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-middle-aligned":arrowLayer.className="introjs-arrow bottom-middle";var tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2;hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-left-aligned":case"top":arrowLayer.className="introjs-arrow bottom",tooltipLayerStyleLeft=hintMode?0:15,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"right":tooltipLayer.style.left=targetOffset.width+20+"px",targetOffset.top+tooltipOffset.height>windowSize.height?(arrowLayer.className="introjs-arrow left-bottom",tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px"):arrowLayer.className="introjs-arrow left";break;case"left":hintMode||!0!==this._options.showStepNumbers||(tooltipLayer.style.top="15px"),targetOffset.top+tooltipOffset.height>windowSize.height?(tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px",arrowLayer.className="introjs-arrow right-bottom"):arrowLayer.className="introjs-arrow right",tooltipLayer.style.right=targetOffset.width+20+"px";break;case"floating":arrowLayer.style.display="none",tooltipLayer.style.left="50%",tooltipLayer.style.top="50%",tooltipLayer.style.marginLeft="-"+tooltipOffset.width/2+"px",tooltipLayer.style.marginTop="-"+tooltipOffset.height/2+"px",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.left="-"+(tooltipOffset.width/2+18)+"px",helperNumberLayer.style.top="-"+(tooltipOffset.height/2+18)+"px");break;case"bottom-right-aligned":arrowLayer.className="introjs-arrow top-right",tooltipLayerStyleRight=0,_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px";break;case"bottom-middle-aligned":arrowLayer.className="introjs-arrow top-middle",tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2,hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.top=targetOffset.height+20+"px";break;default:arrowLayer.className="introjs-arrow top",tooltipLayerStyleLeft=0,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px"}}}function _checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer){return targetOffset.left+tooltipLayerStyleLeft+tooltipOffset.width>windowSize.width?(tooltipLayer.style.left=windowSize.width-tooltipOffset.width-targetOffset.left+"px",!1):(tooltipLayer.style.left=tooltipLayerStyleLeft+"px",!0)}function _checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer){return targetOffset.left+targetOffset.width-tooltipLayerStyleRight-tooltipOffset.width<0?(tooltipLayer.style.left=-targetOffset.left+"px",!1):(tooltipLayer.style.right=tooltipLayerStyleRight+"px",!0)}function _determineAutoPosition(targetElement,tooltipLayer,desiredTooltipPosition){var possiblePositions=this._options.positionPrecedence.slice(),windowSize=_getWinSize(),tooltipHeight=_getOffset(tooltipLayer).height+10,tooltipWidth=_getOffset(tooltipLayer).width+20,targetElementRect=targetElement.getBoundingClientRect(),calculatedPosition="floating";targetElementRect.bottom+tooltipHeight+tooltipHeight>windowSize.height&&_removeEntry(possiblePositions,"bottom"),targetElementRect.top-tooltipHeight<0&&_removeEntry(possiblePositions,"top"),targetElementRect.right+tooltipWidth>windowSize.width&&_removeEntry(possiblePositions,"right"),targetElementRect.left-tooltipWidth<0&&_removeEntry(possiblePositions,"left");var desiredAlignment=function(pos){var hyphenIndex=pos.indexOf("-");return-1!==hyphenIndex?pos.substr(hyphenIndex):""}(desiredTooltipPosition||"");return desiredTooltipPosition&&(desiredTooltipPosition=desiredTooltipPosition.split("-")[0]),possiblePositions.length&&(calculatedPosition="auto"!==desiredTooltipPosition&&possiblePositions.indexOf(desiredTooltipPosition)>-1?desiredTooltipPosition:possiblePositions[0]),-1!==["top","bottom"].indexOf(calculatedPosition)&&(calculatedPosition+=_determineAutoAlignment(targetElementRect.left,tooltipWidth,windowSize,desiredAlignment)),calculatedPosition}function _determineAutoAlignment(offsetLeft,tooltipWidth,windowSize,desiredAlignment){var halfTooltipWidth=tooltipWidth/2,winWidth=Math.min(windowSize.width,window.screen.width),possibleAlignments=["-left-aligned","-middle-aligned","-right-aligned"];return winWidth-offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-left-aligned"),(offsetLeft<halfTooltipWidth||winWidth-offsetLeft<halfTooltipWidth)&&_removeEntry(possibleAlignments,"-middle-aligned"),offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-right-aligned"),possibleAlignments.length?-1!==possibleAlignments.indexOf(desiredAlignment)?desiredAlignment:possibleAlignments[0]:"-middle-aligned"}function _removeEntry(stringArray,stringToRemove){stringArray.indexOf(stringToRemove)>-1&&stringArray.splice(stringArray.indexOf(stringToRemove),1)}function _setHelperLayerPosition(helperLayer){if(helperLayer){if(!this._introItems[this._currentStep])return;var currentElement=this._introItems[this._currentStep],elementPosition=_getOffset(currentElement.element),widthHeightPadding=this._options.helperElementPadding;_isFixed(currentElement.element)?_addClass(helperLayer,"introjs-fixedTooltip"):_removeClass(helperLayer,"introjs-fixedTooltip"),"floating"===currentElement.position&&(widthHeightPadding=0),helperLayer.style.cssText="width: "+(elementPosition.width+widthHeightPadding)+"px; height:"+(elementPosition.height+widthHeightPadding)+"px; top:"+(elementPosition.top-widthHeightPadding/2)+"px;left: "+(elementPosition.left-widthHeightPadding/2)+"px;"}}function _disableInteraction(){var disableInteractionLayer=document.querySelector(".introjs-disableInteraction");null===disableInteractionLayer&&(disableInteractionLayer=document.createElement("div"),disableInteractionLayer.className="introjs-disableInteraction",this._targetElement.appendChild(disableInteractionLayer)),_setHelperLayerPosition.call(this,disableInteractionLayer)}function _setAnchorAsButton(anchor){anchor.setAttribute("role","button"),anchor.tabIndex=0}function _showElement(targetElement){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,targetElement.element);var nextTooltipButton,prevTooltipButton,skipTooltipButton,scrollParent,self=this,oldHelperLayer=document.querySelector(".introjs-helperLayer"),oldReferenceLayer=document.querySelector(".introjs-tooltipReferenceLayer"),highlightClass="introjs-helperLayer";if("string"==typeof targetElement.highlightClass&&(highlightClass+=" "+targetElement.highlightClass),"string"==typeof this._options.highlightClass&&(highlightClass+=" "+this._options.highlightClass),null!==oldHelperLayer){var oldHelperNumberLayer=oldReferenceLayer.querySelector(".introjs-helperNumberLayer"),oldtooltipLayer=oldReferenceLayer.querySelector(".introjs-tooltiptext"),oldArrowLayer=oldReferenceLayer.querySelector(".introjs-arrow"),oldtooltipContainer=oldReferenceLayer.querySelector(".introjs-tooltip");if(skipTooltipButton=oldReferenceLayer.querySelector(".introjs-skipbutton"),prevTooltipButton=oldReferenceLayer.querySelector(".introjs-prevbutton"),nextTooltipButton=oldReferenceLayer.querySelector(".introjs-nextbutton"),oldHelperLayer.className=highlightClass,oldtooltipContainer.style.opacity=0,oldtooltipContainer.style.display="none",null!==oldHelperNumberLayer){var lastIntroItem=this._introItems[targetElement.step-2>=0?targetElement.step-2:0];(null!==lastIntroItem&&"forward"===this._direction&&"floating"===lastIntroItem.position||"backward"===this._direction&&"floating"===targetElement.position)&&(oldHelperNumberLayer.style.opacity=0)}scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,oldHelperLayer),_setHelperLayerPosition.call(self,oldReferenceLayer);_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),_removeShowElement(),self._lastShowElementTimer&&window.clearTimeout(self._lastShowElementTimer),self._lastShowElementTimer=window.setTimeout(function(){null!==oldHelperNumberLayer&&(oldHelperNumberLayer.innerHTML=targetElement.step),oldtooltipLayer.innerHTML=targetElement.intro,oldtooltipContainer.style.display="block",_placeTooltip.call(self,targetElement.element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer),self._options.showBullets&&(oldReferenceLayer.querySelector(".introjs-bullets li > a.active").className="",oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber="'+targetElement.step+'"]').className="active"),oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+_getProgress.call(self)+"%;",oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",_getProgress.call(self)),oldtooltipContainer.style.opacity=1,oldHelperNumberLayer&&(oldHelperNumberLayer.style.opacity=1),void 0!==skipTooltipButton&&null!==skipTooltipButton&&/introjs-donebutton/gi.test(skipTooltipButton.className)?skipTooltipButton.focus():void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_scrollTo.call(self,targetElement.scrollTo,targetElement,oldtooltipLayer)},350)}else{var helperLayer=document.createElement("div"),referenceLayer=document.createElement("div"),arrowLayer=document.createElement("div"),tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),bulletsLayer=document.createElement("div"),progressLayer=document.createElement("div"),buttonsLayer=document.createElement("div");helperLayer.className=highlightClass,referenceLayer.className="introjs-tooltipReferenceLayer",scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,helperLayer),_setHelperLayerPosition.call(self,referenceLayer),this._targetElement.appendChild(helperLayer),this._targetElement.appendChild(referenceLayer),arrowLayer.className="introjs-arrow",tooltipTextLayer.className="introjs-tooltiptext",tooltipTextLayer.innerHTML=targetElement.intro,bulletsLayer.className="introjs-bullets",!1===this._options.showBullets&&(bulletsLayer.style.display="none");var ulContainer=document.createElement("ul");ulContainer.setAttribute("role","tablist");var anchorClick=function(){self.goToStep(this.getAttribute("data-stepnumber"))};_forEach(this._introItems,function(item,i){var innerLi=document.createElement("li"),anchorLink=document.createElement("a");innerLi.setAttribute("role","presentation"),anchorLink.setAttribute("role","tab"),anchorLink.onclick=anchorClick,i===targetElement.step-1&&(anchorLink.className="active"),_setAnchorAsButton(anchorLink),anchorLink.innerHTML=" ",anchorLink.setAttribute("data-stepnumber",item.step),innerLi.appendChild(anchorLink),ulContainer.appendChild(innerLi)}),bulletsLayer.appendChild(ulContainer),progressLayer.className="introjs-progress",!1===this._options.showProgress&&(progressLayer.style.display="none");var progressBar=document.createElement("div");progressBar.className="introjs-progressbar",progressBar.setAttribute("role","progress"),progressBar.setAttribute("aria-valuemin",0),progressBar.setAttribute("aria-valuemax",100),progressBar.setAttribute("aria-valuenow",_getProgress.call(this)),progressBar.style.cssText="width:"+_getProgress.call(this)+"%;",progressLayer.appendChild(progressBar),buttonsLayer.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(buttonsLayer.style.display="none"),tooltipLayer.className="introjs-tooltip",tooltipLayer.appendChild(tooltipTextLayer),tooltipLayer.appendChild(bulletsLayer),tooltipLayer.appendChild(progressLayer);var helperNumberLayer=document.createElement("span");!0===this._options.showStepNumbers&&(helperNumberLayer.className="introjs-helperNumberLayer",helperNumberLayer.innerHTML=targetElement.step,referenceLayer.appendChild(helperNumberLayer)),tooltipLayer.appendChild(arrowLayer),referenceLayer.appendChild(tooltipLayer),nextTooltipButton=document.createElement("a"),nextTooltipButton.onclick=function(){self._introItems.length-1!==self._currentStep&&_nextStep.call(self)},_setAnchorAsButton(nextTooltipButton),nextTooltipButton.innerHTML=this._options.nextLabel,prevTooltipButton=document.createElement("a"),prevTooltipButton.onclick=function(){0!==self._currentStep&&_previousStep.call(self)},_setAnchorAsButton(prevTooltipButton),prevTooltipButton.innerHTML=this._options.prevLabel,skipTooltipButton=document.createElement("a"),skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton ",_setAnchorAsButton(skipTooltipButton),skipTooltipButton.innerHTML=this._options.skipLabel,skipTooltipButton.onclick=function(){self._introItems.length-1===self._currentStep&&"function"==typeof self._introCompleteCallback&&self._introCompleteCallback.call(self),self._introItems.length-1!==self._currentStep&&"function"==typeof self._introExitCallback&&self._introExitCallback.call(self),self._introSkipCallback.call(self),_exitIntro.call(self,self._targetElement)},buttonsLayer.appendChild(skipTooltipButton),this._introItems.length>1&&(buttonsLayer.appendChild(prevTooltipButton),buttonsLayer.appendChild(nextTooltipButton)),tooltipLayer.appendChild(buttonsLayer),_placeTooltip.call(self,targetElement.element,tooltipLayer,arrowLayer,helperNumberLayer),_scrollTo.call(this,targetElement.scrollTo,targetElement,tooltipLayer)}var disableInteractionLayer=self._targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer),targetElement.disableInteraction&&_disableInteraction.call(self),0===this._currentStep&&this._introItems.length>1?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&_addClass(nextTooltipButton,"introjs-fullbutton")):void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.doneLabel,_addClass(skipTooltipButton,"introjs-donebutton")),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&_addClass(prevTooltipButton,"introjs-fullbutton")):void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)),prevTooltipButton.setAttribute("role","button"),nextTooltipButton.setAttribute("role","button"),skipTooltipButton.setAttribute("role","button"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_setShowElement(targetElement),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,targetElement.element)}function _scrollTo(scrollTo,targetElement,tooltipLayer){if("off"!==scrollTo){var rect;if(this._options.scrollToElement&&(rect="tooltip"===scrollTo?tooltipLayer.getBoundingClientRect():targetElement.element.getBoundingClientRect(),!_elementInViewport(targetElement.element))){var winHeight=_getWinSize().height;rect.bottom-(rect.bottom-rect.top)<0||targetElement.element.clientHeight>winHeight?window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)-this._options.scrollPadding):window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)+this._options.scrollPadding)}}}function _removeShowElement(){_forEach(document.querySelectorAll(".introjs-showElement"),function(elm){_removeClass(elm,/introjs-[a-zA-Z]+/g)})}function _setShowElement(targetElement){var parentElm;if(targetElement.element instanceof SVGElement)for(parentElm=targetElement.element.parentNode;null!==targetElement.element.parentNode&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();)"svg"===parentElm.tagName.toLowerCase()&&_addClass(parentElm,"introjs-showElement introjs-relativePosition"),parentElm=parentElm.parentNode;_addClass(targetElement.element,"introjs-showElement");var currentElementPosition=_getPropValue(targetElement.element,"position");for("absolute"!==currentElementPosition&&"relative"!==currentElementPosition&&"fixed"!==currentElementPosition&&_addClass(targetElement.element,"introjs-relativePosition"),parentElm=targetElement.element.parentNode;null!==parentElm&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();){var zIndex=_getPropValue(parentElm,"z-index"),opacity=parseFloat(_getPropValue(parentElm,"opacity")),transform=_getPropValue(parentElm,"transform")||_getPropValue(parentElm,"-webkit-transform")||_getPropValue(parentElm,"-moz-transform")||_getPropValue(parentElm,"-ms-transform")||_getPropValue(parentElm,"-o-transform");(/[0-9]+/.test(zIndex)||opacity<1||"none"!==transform&&void 0!==transform)&&_addClass(parentElm,"introjs-fixParent"),parentElm=parentElm.parentNode}}function _forEach(arr,forEachFnc,completeFnc){if(arr)for(var i=0,len=arr.length;i<len;i++)forEachFnc(arr[i],i);"function"==typeof completeFnc&&completeFnc()}function _addClass(element,className){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre+" "+className)}else if(void 0!==element.classList){var classes=className.split(" ");_forEach(classes,function(cls){element.classList.add(cls)})}else element.className.match(className)||(element.className+=" "+className)}function _removeClass(element,classNameRegex){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre.replace(classNameRegex,"").replace(/^\s+|\s+$/g,""))}else element.className=element.className.replace(classNameRegex,"").replace(/^\s+|\s+$/g,"")}function _getPropValue(element,propName){var propValue="";return element.currentStyle?propValue=element.currentStyle[propName]:document.defaultView&&document.defaultView.getComputedStyle&&(propValue=document.defaultView.getComputedStyle(element,null).getPropertyValue(propName)),propValue&&propValue.toLowerCase?propValue.toLowerCase():propValue}function _isFixed(element){var p=element.parentNode;return!(!p||"HTML"===p.nodeName)&&("fixed"===_getPropValue(element,"position")||_isFixed(p))}function _getWinSize(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var D=document.documentElement;return{width:D.clientWidth,height:D.clientHeight}}function _elementInViewport(el){var rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom+80<=window.innerHeight&&rect.right<=window.innerWidth}function _addOverlayLayer(targetElm){var overlayLayer=document.createElement("div"),styleText="",self=this;if(overlayLayer.className="introjs-overlay",targetElm.tagName&&"body"!==targetElm.tagName.toLowerCase()){var elementPosition=_getOffset(targetElm);elementPosition&&(styleText+="width: "+elementPosition.width+"px; height:"+elementPosition.height+"px; top:"+elementPosition.top+"px;left: "+elementPosition.left+"px;",overlayLayer.style.cssText=styleText)}else styleText+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",overlayLayer.style.cssText=styleText;return targetElm.appendChild(overlayLayer),overlayLayer.onclick=function(){!0===self._options.exitOnOverlayClick&&_exitIntro.call(self,targetElm)},window.setTimeout(function(){styleText+="opacity: "+self._options.overlayOpacity.toString()+";",overlayLayer.style.cssText=styleText},10),!0}function _removeHintTooltip(){var tooltip=document.querySelector(".introjs-hintReference");if(tooltip){var step=tooltip.getAttribute("data-step");return tooltip.parentNode.removeChild(tooltip),step}}function _populateHints(targetElm){if(this._introItems=[],this._options.hints)_forEach(this._options.hints,function(hint){var currentItem=_cloneObject(hint);"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),currentItem.hintPosition=currentItem.hintPosition||this._options.hintPosition,currentItem.hintAnimation=currentItem.hintAnimation||this._options.hintAnimation,null!==currentItem.element&&this._introItems.push(currentItem)}.bind(this));else{var hints=targetElm.querySelectorAll("*[data-hint]");if(!hints||!hints.length)return!1;_forEach(hints,function(currentElement){var hintAnimation=currentElement.getAttribute("data-hintanimation");hintAnimation=hintAnimation?"true"===hintAnimation:this._options.hintAnimation,this._introItems.push({element:currentElement,hint:currentElement.getAttribute("data-hint"),hintPosition:currentElement.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:hintAnimation,tooltipClass:currentElement.getAttribute("data-tooltipclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}_addHints.call(this),DOMEvent.on(document,"click",_removeHintTooltip,this,!1),DOMEvent.on(window,"resize",_reAlignHints,this,!0)}function _reAlignHints(){_forEach(this._introItems,function(item){void 0!==item.targetElement&&_alignHintPosition.call(this,item.hintPosition,item.element,item.targetElement)}.bind(this))}function _hintQuerySelectorAll(selector){var hintsWrapper=document.querySelector(".introjs-hints");return hintsWrapper?hintsWrapper.querySelectorAll(selector):[]}function _hideHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];_removeHintTooltip.call(this),hint&&_addClass(hint,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,stepId)}function _hideHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_hideHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _showHints(){var hints=_hintQuerySelectorAll(".introjs-hint");hints&&hints.length?_forEach(hints,function(hint){_showHint.call(this,hint.getAttribute("data-step"))}.bind(this)):_populateHints.call(this,this._targetElement)}function _showHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&_removeClass(hint,/introjs-hidehint/g)}function _removeHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_removeHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _removeHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&hint.parentNode.removeChild(hint)}function _addHints(){var self=this,hintsWrapper=document.querySelector(".introjs-hints");null===hintsWrapper&&(hintsWrapper=document.createElement("div"),hintsWrapper.className="introjs-hints");var getHintClick=function(i){return function(e){var evt=e||window.event;evt.stopPropagation&&evt.stopPropagation(),null!==evt.cancelBubble&&(evt.cancelBubble=!0),_showHintDialog.call(self,i)}};_forEach(this._introItems,function(item,i){if(!document.querySelector('.introjs-hint[data-step="'+i+'"]')){var hint=document.createElement("a");_setAnchorAsButton(hint),hint.onclick=getHintClick(i),hint.className="introjs-hint",item.hintAnimation||_addClass(hint,"introjs-hint-no-anim"),_isFixed(item.element)&&_addClass(hint,"introjs-fixedhint");var hintDot=document.createElement("div");hintDot.className="introjs-hint-dot";var hintPulse=document.createElement("div");hintPulse.className="introjs-hint-pulse",hint.appendChild(hintDot),hint.appendChild(hintPulse),hint.setAttribute("data-step",i),item.targetElement=item.element,item.element=hint,_alignHintPosition.call(this,item.hintPosition,hint,item.targetElement),hintsWrapper.appendChild(hint)}}.bind(this)),document.body.appendChild(hintsWrapper),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}function _alignHintPosition(position,hint,element){var offset=_getOffset.call(this,element);switch(position){default:case"top-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+"px";break;case"top-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+"px";break;case"bottom-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"bottom-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"middle-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"bottom-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"top-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+"px"}}function _showHintDialog(stepId){var hintElement=document.querySelector('.introjs-hint[data-step="'+stepId+'"]'),item=this._introItems[stepId];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,hintElement,item,stepId);var removedStep=_removeHintTooltip.call(this);if(parseInt(removedStep,10)!==stepId){var tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),arrowLayer=document.createElement("div"),referenceLayer=document.createElement("div");tooltipLayer.className="introjs-tooltip",tooltipLayer.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},tooltipTextLayer.className="introjs-tooltiptext";var tooltipWrapper=document.createElement("p");tooltipWrapper.innerHTML=item.hint;var closeButton=document.createElement("a");closeButton.className=this._options.buttonClass,closeButton.setAttribute("role","button"),closeButton.innerHTML=this._options.hintButtonLabel,closeButton.onclick=_hideHint.bind(this,stepId),tooltipTextLayer.appendChild(tooltipWrapper),tooltipTextLayer.appendChild(closeButton),arrowLayer.className="introjs-arrow",tooltipLayer.appendChild(arrowLayer),tooltipLayer.appendChild(tooltipTextLayer),this._currentStep=hintElement.getAttribute("data-step"),referenceLayer.className="introjs-tooltipReferenceLayer introjs-hintReference",referenceLayer.setAttribute("data-step",hintElement.getAttribute("data-step")),_setHelperLayerPosition.call(this,referenceLayer),referenceLayer.appendChild(tooltipLayer),document.body.appendChild(referenceLayer),_placeTooltip.call(this,hintElement,tooltipLayer,arrowLayer,null,!0)}}function _getOffset(element){var body=document.body,docEl=document.documentElement,scrollTop=window.pageYOffset||docEl.scrollTop||body.scrollTop,scrollLeft=window.pageXOffset||docEl.scrollLeft||body.scrollLeft,x=element.getBoundingClientRect();return{top:x.top+scrollTop,width:x.width,height:x.height,left:x.left+scrollLeft}}function _getScrollParent(element){var style=window.getComputedStyle(element),excludeStaticParent="absolute"===style.position,overflowRegex=/(auto|scroll)/;if("fixed"===style.position)return document.body;for(var parent=element;parent=parent.parentElement;)if(style=window.getComputedStyle(parent),(!excludeStaticParent||"static"!==style.position)&&overflowRegex.test(style.overflow+style.overflowY+style.overflowX))return parent;return document.body}function _scrollParentToElement(parent,element){parent.scrollTop=element.offsetTop-parent.offsetTop}function _getProgress(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}function _mergeOptions(obj1,obj2){var attrname,obj3={};for(attrname in obj1)obj3[attrname]=obj1[attrname];for(attrname in obj2)obj3[attrname]=obj2[attrname];return obj3}var _stamp=function(){var keys={};return function(obj,key){return key=key||"introjs-stamp",keys[key]=keys[key]||0,void 0===obj[key]&&(obj[key]=keys[key]++),obj[key]}}(),DOMEvent=function(){function DOMEvent(){var events_key="introjs_event";this._id=function(obj,type,listener,context){return type+_stamp(listener)+(context?"_"+_stamp(context):"")},this.on=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=function(e){return listener.call(context||obj,e||window.event)};"addEventListener"in obj?obj.addEventListener(type,handler,useCapture):"attachEvent"in obj&&obj.attachEvent("on"+type,handler),obj[events_key]=obj[events_key]||{},obj[events_key][id]=handler},this.off=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=obj[events_key]&&obj[events_key][id];"removeEventListener"in obj?obj.removeEventListener(type,handler,useCapture):"detachEvent"in obj&&obj.detachEvent("on"+type,handler),obj[events_key][id]=null}}return new DOMEvent}(),introJs=function(targetElm){var instance;if("object"==typeof targetElm)instance=new IntroJs(targetElm);else if("string"==typeof targetElm){var targetElement=document.querySelector(targetElm);if(!targetElement)throw new Error("There is no element with given selector.");instance=new IntroJs(targetElement)}else instance=new IntroJs(document.body);return introJs.instances[_stamp(instance,"introjs-instance")]=instance,instance};return introJs.version="2.9.0",introJs.instances={},introJs.fn=IntroJs.prototype={clone:function(){return new IntroJs(this)},setOption:function(option,value){return this._options[option]=value,this},setOptions:function(options){return this._options=_mergeOptions(this._options,options),this},start:function(group){return _introForElement.call(this,this._targetElement,group),this},goToStep:function(step){return _goToStep.call(this,step),this},addStep:function(options){return this._options.steps||(this._options.steps=[]),this._options.steps.push(options),this},addSteps:function(steps){if(steps.length){for(var index=0;index<steps.length;index++)this.addStep(steps[index]);return this}},goToStepNumber:function(step){return _goToStepNumber.call(this,step),this},nextStep:function(){return _nextStep.call(this),this},previousStep:function(){return _previousStep.call(this),this},exit:function(force){return _exitIntro.call(this,this._targetElement,force),this},refresh:function(){return _refresh.call(this),this},onbeforechange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=providedCallback,this},onchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=providedCallback,this},onafterchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=providedCallback,this},oncomplete:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=providedCallback,this},onhintsadded:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=providedCallback,this},onhintclick:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=providedCallback,this},onhintclose:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=providedCallback,this},onexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=providedCallback,this},onskip:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=providedCallback,this},onbeforeexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=providedCallback,this},addHints:function(){return _populateHints.call(this,this._targetElement),this},hideHint:function(stepId){return _hideHint.call(this,stepId),this},hideHints:function(){return _hideHints.call(this),this},showHint:function(stepId){return _showHint.call(this,stepId),this},showHints:function(){return _showHints.call(this),this},removeHints:function(){return _removeHints.call(this),this},removeHint:function(stepId){return _removeHint.call(this,stepId),this},showHintDialog:function(stepId){return _showHintDialog.call(this,stepId),this}},introJs})},595:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(MailPoet){function eventHandler(){return confirm(MailPoet.I18n.t("reinstallConfirmation"))&&(MailPoet.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){MailPoet.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})),!1}var element;(element=document.getElementById("mailpoet_reinstall"))&&element.addEventListener("click",eventHandler,!1)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},596:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(30),__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(205),__webpack_require__(597),__webpack_require__(598),__webpack_require__(0)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,_,jQuery,MailPoet,Handlebars,Papa,AsyncQueue,Moment){jQuery("#mailpoet_subscribers_import").length&&jQuery(document).ready(function(){function showCurrentStep(){MailPoet.Notice.hide(),MailPoet.Modal.loading(!1),jQuery('#mailpoet_subscribers_import > div[id^="step"]').hide(),jQuery(location.hash).show()}var router;jQuery('input[name="select_method"]').attr("checked",!1),router=new(Backbone.Router.extend({routes:{"":"home",step1:"step1",step2:"step2",step3:"step3"},home:function(){this.navigate("step1",{trigger:!0})}})),router.on("route:step1",function(){function toggleNextStepButton(element,condition){if("on"===condition)return void element.closest("table a").removeClass("button-disabled");element.closest("table a").addClass("button-disabled")}function parseCSV(isFile){var processedSubscribers=[],parsedEmails=[],duplicateEmails=[],invalidEmails=[],emailColumnPosition=null,columnCount=null,isHeaderFound=!1,detectAndCleanupEmail=function(emailString){var test,email=jQuery("<div />").html(emailString).text();return email=email.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),test=/<(.*?)>/.exec(email),test&&(email=test[1].trim()),test=/mailto:(?:\s+)?(.*)/.exec(email),test&&(email=test[1].trim()),!!window.mailpoet_email_regex.test(email)&&email};return{skipEmptyLines:!0,delimiter:"",newline:"",comments:!1,error:function(){MailPoet.Notice.hide(),MailPoet.Notice.error(MailPoet.I18n.t("dataProcessingError"))},complete:function(CSV){var email,emailAddress,rowData,rowColumnCount,errorNotice;Object.keys(CSV.data).forEach(function(rowCount){rowData=CSV.data[rowCount].map(function(el){return el.trim()}),rowColumnCount=rowData.length,null===columnCount&&(columnCount=rowColumnCount),rowColumnCount===columnCount&&(null===emailColumnPosition?(Object.keys(rowData).forEach(function(column){emailAddress=detectAndCleanupEmail(rowData[column]),null===emailColumnPosition&&window.mailpoet_email_regex.test(emailAddress)&&(emailColumnPosition=column,parsedEmails[emailAddress]=!0,rowData[column]=emailAddress,processedSubscribers[emailAddress]=rowData)}),null===emailColumnPosition&&0===parseInt(rowCount,10)&&(isHeaderFound=!0,processedSubscribers[0]=rowData)):""!==rowData[emailColumnPosition]&&(email=detectAndCleanupEmail(rowData[emailColumnPosition]),_.has(parsedEmails,email)?duplicateEmails.push(email):window.mailpoet_email_regex.test(email)?(parsedEmails[email]=!0,rowData[emailColumnPosition]=email,processedSubscribers[email]=rowData):invalidEmails.push(rowData[emailColumnPosition])))}),processedSubscribers=_.values(processedSubscribers),processedSubscribers&&(isHeaderFound&&processedSubscribers.length>=2||!isHeaderFound&&processedSubscribers.length>=1)?(window.importData.step1={header:window.mailpoet_email_regex.test(processedSubscribers[0][emailColumnPosition])?null:processedSubscribers.shift(),subscribers:processedSubscribers,subscribersCount:processedSubscribers.length,duplicate:duplicateEmails,invalid:invalidEmails},MailPoet.trackEvent("Subscribers import started",{source:isFile?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})):(MailPoet.Modal.loading(!1),errorNotice=MailPoet.I18n.t("noValidRecords"),errorNotice=errorNotice.replace("[link]",MailPoet.I18n.t("csvKBLink")),errorNotice=errorNotice.replace("[/link]","</a>"),MailPoet.Notice.error(errorNotice))}}}function displayMailChimpLists(data){var listSelectElement=mailChimpListsContainerElement.find("select");listSelectElement.data("select2")?(listSelectElement.select2("data",data),listSelectElement.trigger("change")):listSelectElement.select2({data:data,width:"20em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).change(function(){null!==jQuery(this).val()?toggleNextStepButton(mailChimpProcessButtonElement,"on"):toggleNextStepButton(mailChimpProcessButtonElement,"off")}).trigger("change"),mailChimpListsContainerElement.show()}var methodProcessContainerTemplate,currentStepE,methodSelectionElement,pasteInputElement,pasteInputPlaceholderElement,pasteProcessButtonElement,mailChimpKeyInputElement,mailChimpKeyVerifyButtonElement,mailChimpListsContainerElement,mailChimpProcessButtonElement,uploadElement,uploadProcessButtonElement;if(window.mailpoetColumns=jQuery.map(window.mailpoetColumns,function(column){var col=column;return col.validation_rule=!1,col}),void 0!==window.importData.step1)return void showCurrentStep();methodProcessContainerTemplate=Handlebars.compile(jQuery("#method_process_template").html()),jQuery(".mailpoet_method_process").html(methodProcessContainerTemplate()),currentStepE=jQuery(location.hash),methodSelectionElement=jQuery("#select_method"),pasteInputElement=jQuery("#paste_input"),pasteInputPlaceholderElement=pasteInputElement.data("placeholder").replace(/\\n/g,"\n"),pasteProcessButtonElement=jQuery("#method_paste > div.mailpoet_method_process").find("a.mailpoet_process"),mailChimpKeyInputElement=jQuery("#mailchimp_key"),mailChimpKeyVerifyButtonElement=jQuery("#mailchimp_key_verify"),mailChimpListsContainerElement=jQuery("#mailchimp_lists"),mailChimpProcessButtonElement=jQuery("#method_mailchimp > div.mailpoet_method_process").find("a.mailpoet_process"),uploadElement=jQuery("#file_local"),uploadProcessButtonElement=jQuery("#method_file > div.mailpoet_method_process").find("a.mailpoet_process"),methodSelectionElement.change(function(){var availableMethods=jQuery(':radio[name="select_method"]'),selectedMethod=availableMethods.index(availableMethods.filter(":checked"));MailPoet.Notice.hide(),currentStepE.find(".inside").children('div[id^="method_"]').hide(),currentStepE.find(".inside").children('div[id^="method_"]:eq('+selectedMethod+")").show().find("table").show()}),showCurrentStep(),pasteInputElement.attr("value",pasteInputPlaceholderElement).css("color","#999").focus(function(){jQuery(this).val()===pasteInputPlaceholderElement&&jQuery(this).attr("value","").css("color","#222")}).blur(function(){""===jQuery(this).val()&&jQuery(this).attr("value",pasteInputPlaceholderElement).css("color","#999")}).keyup(function(){toggleNextStepButton(pasteProcessButtonElement,""!==this.value.trim()?"on":"off")}),pasteProcessButtonElement.click(function(){var pasteSize=encodeURI(pasteInputElement.val()).split(/%..|./).length-1;if(MailPoet.Notice.hide(),pasteSize>window.maxPostSizeBytes)return void MailPoet.Notice.error(MailPoet.I18n.t("maxPostSizeNotice"));MailPoet.Modal.loading(!0),setTimeout(function(){Papa.parse(pasteInputElement.val(),parseCSV(!1))},10)}),uploadElement.change(function(){var ext=this.value.match(/[^.]+$/);MailPoet.Notice.hide(),null!==ext&&"csv"===ext[0].toLowerCase()||(this.value="",MailPoet.Notice.error(MailPoet.I18n.t("wrongFileFormat"))),toggleNextStepButton(uploadProcessButtonElement,""!==this.value.trim()?"on":"off")}),uploadProcessButtonElement.click(function(){""!==uploadElement.val().trim()&&(MailPoet.Modal.loading(!0),setTimeout(function(){uploadElement.parse({config:parseCSV(!0)})},10))}),mailChimpKeyInputElement.keyup(function(){""!==this.value.trim()&&/[a-zA-Z0-9]{32}-/.exec(this.value.trim())||(mailChimpListsContainerElement.hide(),jQuery(".mailpoet_mailchimp-key-status").html("").removeClass("mailpoet_mailchimp-ok mailpoet_mailchimp-error"),toggleNextStepButton(mailChimpProcessButtonElement,"off"))}),mailChimpKeyVerifyButtonElement.click(function(){MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:mailChimpKeyInputElement.val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){jQuery(".mailpoet_mailchimp-key-status").html("").removeClass().addClass("mailpoet_mailchimp-key-status mailpoet_mailchimp-ok"),0===response.data.length?(jQuery(".mailpoet_mailchimp-key-status").html(MailPoet.I18n.t("noMailChimpLists")),mailChimpListsContainerElement.hide(),toggleNextStepButton(mailChimpProcessButtonElement,"off")):displayMailChimpLists(response.data)}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),mailChimpProcessButtonElement.click(function(){mailChimpProcessButtonElement.closest("table a").hasClass("button-disabled")||(MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:mailChimpKeyInputElement.val(),lists:mailChimpListsContainerElement.find("select").val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){window.importData.step1=response.data,MailPoet.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))})}),router.on("route:step2",function(){function toggleNextStepButton(condition){if("on"===condition)return void nextStepButton.removeClass("button-disabled");nextStepButton.addClass("button-disabled")}function enableSegmentSelection(segments){segmentSelectElement.data("select2")&&(segmentSelectElement.html("").select2("destroy"),toggleNextStepButton("off")),segmentSelectElement.select2({data:segments,width:"20em",templateResult:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"},templateSelection:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"}}).change(function(){var segmentSelectionNotice=jQuery('[data-id="notice_segmentSelection"]');this.value?(jQuery('[data-id="notice_segmentSelection"]').remove(),jQuery(".mailpoet_notice.error:visible").length||toggleNextStepButton("on")):(segmentSelectionNotice.length||MailPoet.Notice.error(MailPoet.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0}),toggleNextStepButton("off"))})}function filterSubscribers(){var displayedColumns,subscribersClone=jQuery.extend(!0,{},subscribers),preventNextStep=!1;jQuery('[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]').remove(),displayedColumns=jQuery.map(jQuery(".mailpoet_subscribers_column_data_match"),function(element,elementIndex){var columnId=jQuery(element).data("column-id"),validationRule=jQuery(element).data("validation-rule");return jQuery(element).val(columnId).trigger("change"),{id:columnId,index:elementIndex,validationRule:validationRule,element:element}}),jQuery.map(window.mailpoetColumns,function(column){var firstRowData,validationRule,testedFormat,allowedDateFormats,matchedColumn=_.find(displayedColumns,function(data){return data.id===column.id});"email"===column.id&&(window.mailpoet_email_regex.test(subscribersClone.subscribers[0][matchedColumn.index])?MailPoet.Notice.hide("invalidEmail"):(preventNextStep=!0,jQuery('[data-id="notice_invalidEmail"]').length||MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidElement"),{static:!0,scroll:!0,hideClose:!0,id:"invalidEmail"}))),"date"===column.type&&matchedColumn&&(allowedDateFormats=[Moment.ISO_8601,"YYYY/MM/DD","MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD","YYYY/DD/MM","MM/YYYY","YYYY/MM","YYYY"],firstRowData=subscribersClone.subscribers[0][matchedColumn.index],validationRule=!1,""===firstRowData.trim()?(subscribersClone.subscribers[0][matchedColumn.index]='<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+MailPoet.I18n.t("emptyFirstRowDate")+"</span> ",preventNextStep=!0):Object.keys(allowedDateFormats).forEach(function(format){if(testedFormat=allowedDateFormats[format],Moment(firstRowData,testedFormat,!0).isValid())return validationRule="function"==typeof testedFormat?"datetime":testedFormat,void jQuery(matchedColumn.element).data("validation-rule",validationRule);"datetime"===validationRule&&(validationRule=Moment.ISO_8601)}),jQuery.map(subscribersClone.subscribers,function(dataSubscribers,index){var data=dataSubscribers,rowData=data[matchedColumn.index],date=Moment(rowData,testedFormat,!0);index!==fillerPosition&&""!==rowData.trim()&&(date.isValid()?data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match" title="'+MailPoet.I18n.t("verifyDateMatch")+'">'+MailPoet.Date.format(date)+"</span> "):(data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+new Handlebars.SafeString(MailPoet.I18n.t("dateMatchError"))+"</span> "),preventNextStep=!0))}),preventNextStep&&!jQuery(".mailpoet_invalidDate").length&&MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidDate"),{static:!0,scroll:!0,hideClose:!0,id:"invalidDate"}))}),jQuery("#subscribers_data > table > tbody").html(subscribersDataTemplatePartial(subscribersClone)),preventNextStep?toggleNextStepButton("off"):!jQuery(".mailpoet_notice.error:visible").length&&segmentSelectElement.val()&&toggleNextStepButton("on")}var nextStepButton,previousStepButton,subscribers,subscribersDataTemplate,subscribersDataTemplatePartial,subscribersDataParseResultsTemplate,segmentSelectElement,maxRowsToShow,filler,fillerArray,fillerPosition,importResults,duplicates;if(void 0===window.importData.step1)return void router.navigate("step1",{trigger:!0});nextStepButton=jQuery("#step2_process"),previousStepButton=jQuery("#return_to_step1"),subscribers=jQuery.extend(!0,{},window.importData.step1),subscribersDataTemplate=Handlebars.compile(jQuery("#subscribers_data_template").html()),subscribersDataTemplatePartial=Handlebars.compile(jQuery("#subscribers_data_template_partial").html()),subscribersDataParseResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_parse_results_template").html()),segmentSelectElement=jQuery("#mailpoet_segments_select"),maxRowsToShow=10,filler=". . .",fillerArray=Array.apply(null,new Array(subscribers.subscribers[0].length)).map(String.prototype.valueOf,filler),showCurrentStep(),jQuery("#subscribers_data_parse_results:visible").html(""),jQuery("#subscribers_data_import_results:visible").hide(),(subscribers.invalid.length||subscribers.duplicate.length)&&(duplicates={},subscribers.duplicate.forEach(function(subscriberEmail){duplicates[subscriberEmail]=(duplicates[subscriberEmail]||0)+1}),subscribers.duplicate=[],Object.keys(duplicates).forEach(function(email){duplicates[email]>1?subscribers.duplicate.push(email+" (x"+duplicates[email]+")"):subscribers.duplicate.push(email)}),importResults={notice:MailPoet.I18n.t("importNoticeSkipped").replace("%1$s","<strong>"+(subscribers.invalid.length+subscribers.duplicate.length)+"</strong>"),invalid:subscribers.invalid.length?MailPoet.I18n.t("importNoticeInvalid").replace("%1$s","<strong>"+subscribers.invalid.length.toLocaleString()+"</strong>").replace("%2$s",subscribers.invalid.join(", ")):null,duplicate:subscribers.duplicate.length?MailPoet.I18n.t("importNoticeDuplicate").replace("%1$s","<strong>"+subscribers.duplicate.length+"</strong>").replace("%2$s",subscribers.duplicate.join(", ")):null},jQuery("#subscribers_data_parse_results").html(subscribersDataParseResultsTemplate(importResults))),jQuery(".mailpoet_subscribers_data_parse_results_details_show").click(function(){var details=jQuery(".mailpoet_subscribers_data_parse_results_details");jQuery(details).toggle(),this.text=jQuery(details).is(":visible")?MailPoet.I18n.t("hideDetails"):MailPoet.I18n.t("showDetails")}),window.mailpoetSegments.length?jQuery(".mailpoet_segments").show():jQuery(".mailpoet_no_segments").show(),jQuery(".mailpoet_create_segment").click(function(){MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewList"),template:jQuery("#new_segment_template").html()}),jQuery("#new_segment_name").keypress(function(e){13===e.which&&jQuery("#new_segment_process").click()}),jQuery("#new_segment_process").click(function(){var segmentName=jQuery("#new_segment_name").val().trim(),segmentDescription=jQuery("#new_segment_description").val().trim();MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:segmentName,description:segmentDescription}}).done(function(response){var selectedValues;window.mailpoetSegments.push({id:response.data.id,name:response.data.name,subscriberCount:0}),selectedValues=segmentSelectElement.val(),null===selectedValues?selectedValues=[response.data.id]:selectedValues.push(response.data.id),enableSegmentSelection(window.mailpoetSegments),segmentSelectElement.val(selectedValues).trigger("change"),jQuery(".mailpoet_segments:hidden").show(),jQuery(".mailpoet_no_segments:visible").hide(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&(MailPoet.Notice.hide(),MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#new_segment_name"}))})}),jQuery("#new_segment_cancel").click(function(){MailPoet.Modal.close()})}),Handlebars.registerPartial("subscribers_data_template_partial",subscribersDataTemplatePartial),Handlebars.registerHelper("show_and_match_columns",function(helperSubscribers,options){var columnData,columnId,headerName,headerNameMatch,displayedColumns=[],displayedColumnsIds=[];return Object.keys(helperSubscribers.subscribers[0]).forEach(function(i){columnData=helperSubscribers.subscribers[0][i],columnId="ignore",columnData%1!=0&&window.mailpoet_email_regex.test(columnData)?columnId="email":helperSubscribers.header&&(headerName=helperSubscribers.header[i],headerNameMatch=window.mailpoetColumns.map(function(el){return el.name}).indexOf(headerName),-1!==headerNameMatch?columnId=window.mailpoetColumns[headerNameMatch].id:headerName&&(/first|first name|given name/i.test(headerName)?columnId="first_name":/last|last name/i.test(headerName)&&(columnId="last_name"))),columnId="ignore"!==columnId&&-1===displayedColumnsIds.indexOf(columnId)?columnId:"ignore",displayedColumns[i]={column_id:columnId},displayedColumnsIds.push(columnId)}),options.fn(displayedColumns)}),Handlebars.registerHelper("sanitize_data",function(data){return data instanceof Handlebars.SafeString?data:new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data))}),Handlebars.registerHelper("calculate_index",function(rawIndex){var index=parseInt(rawIndex,10);return index===maxRowsToShow&&subscribers.subscribersCount>maxRowsToShow+1?(fillerPosition=index,filler):index===subscribers.subscribers.length-1?subscribers.subscribersCount.toLocaleString():index+1}),subscribers.subscribersCount>maxRowsToShow+1&&subscribers.subscribers.splice(maxRowsToShow,subscribers.subscribersCount-(maxRowsToShow+1),fillerArray),jQuery("#subscribers_data > table").html(subscribersDataTemplate(subscribers)),jQuery("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).on("select2:selecting",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.args.data.id;"create"===selectedOptionId?(selectEvent.preventDefault(),jQuery(selectElement).select2("close"),MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewField"),template:jQuery("#form_template_field_form").html()}),jQuery("#form_field_new").parsley().on("form:submit",function(){var data=jQuery(this.$element).mailpoetSerializeObject();return MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:data}).done(function(response){var newColumnData={id:response.data.id,name:response.data.name,type:response.data.type,params:response.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:MailPoet.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(newColumnData),window.mailpoetColumns.push(newColumnData),jQuery("select.mailpoet_subscribers_column_data_match").each(function(){jQuery(this).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}})}),jQuery(selectElement).data("column-id",newColumnData.id),jQuery(selectElement).data("validation-rule",!1),filterSubscribers(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#field_name"})}),!1})):jQuery("select.mailpoet_subscribers_column_data_match").each(function(){var element=this,elementId=jQuery(element).val();elementId===selectedOptionId&&"ignore"!==elementId&&(confirm(MailPoet.I18n.t("selectedValueAlreadyMatched")+" "+MailPoet.I18n.t("confirmCorrespondingColumn"))?jQuery(element).data("column-id","ignore"):(selectEvent.preventDefault(),jQuery(selectElement).select2("close")))})}).on("select2:select",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.data.id;jQuery(selectElement).data("column-id",selectedOptionId),filterSubscribers()}),previousStepButton.off().on("click",function(){router.navigate("step1",{trigger:!0})}),nextStepButton.off().on("click",function(){var clickSubscribers,splitSubscribers,columns={},queue=new jQuery.AsyncQueue,batchNumber=0,timestamp=Date.now()/1e3,clickImportResults={created:0,updated:0,errors:[],segments:[]};jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),splitSubscribers=function(localSubscribers,size){return localSubscribers.reduce(function(res,item,index){return index%size==0&&res.push([]),res[res.length-1].push(item),res},[])},clickSubscribers=splitSubscribers(window.importData.step1.subscribers,2e3),_.each(jQuery("select.mailpoet_subscribers_column_data_match"),function(column,columnIndex){var columnId=jQuery(column).data("column-id"),validationRule=jQuery(column).data("validation-rule");"ignore"!==columnId&&(columns[columnId]={index:columnIndex,validation_rule:validationRule})}),_.each(clickSubscribers,function(){queue.add(function(addQueue){addQueue.pause(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:JSON.stringify({columns:columns,subscribers:clickSubscribers[batchNumber],timestamp:timestamp,segments:segmentSelectElement.val(),updateSubscribers:"yes"===jQuery(':radio[name="subscriber_update_option"]:checked').val()})}).done(function(response){clickImportResults.created+=response.data.created,clickImportResults.updated+=response.data.updated,clickImportResults.segments=response.data.segments,clickImportResults.added_to_segment_with_welcome_notification=response.data.added_to_segment_with_welcome_notification,addQueue.run()}).fail(function(response){MailPoet.Modal.loading(!1),response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}),batchNumber+=1})}),queue.run(),queue.onComplete(function(){MailPoet.Modal.loading(!1),clickImportResults.errors.length>0&&!clickImportResults.updated&&!clickImportResults.created?MailPoet.Notice.error(_.flatten(clickImportResults.errors)):(window.mailpoetSegments=clickImportResults.segments,clickImportResults.segments=_.map(segmentSelectElement.select2("data"),function(data){return data.name}),window.importData.step2=clickImportResults,enableSegmentSelection(window.mailpoetSegments),router.navigate("step3",{trigger:!0}))}))}),filterSubscribers(),enableSegmentSelection(window.mailpoetSegments)}),router.on("route:step3",function(){var subscribersDataImportResultsTemplate,exportMenuElement,importResults;if(void 0===window.importData.step2)return void router.navigate("step2",{trigger:!0});showCurrentStep(),window.importData.step2.errors.length>0&&MailPoet.Notice.error(_.flatten(window.importData.step2.errors)),MailPoet.trackEvent("Subscribers import finished",{"Subscribers created":window.importData.step2.created,"Subscribers updated":window.importData.step2.updated,"MailPoet Free version":window.mailpoet_version}),subscribersDataImportResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_import_results_template").html()),exportMenuElement=jQuery("span.mailpoet_export"),importResults={created:!!window.importData.step2.created&&MailPoet.I18n.t("subscribersCreated").replace("%1$s","<strong>"+window.importData.step2.created.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),updated:!!window.importData.step2.updated&&MailPoet.I18n.t("subscribersUpdated").replace("%1$s","<strong>"+window.importData.step2.updated.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),no_action:!window.importData.step2.created&&!window.importData.step2.updated,added_to_segment_with_welcome_notification:window.importData.step2.added_to_segment_with_welcome_notification},jQuery("#subscribers_data_import_results").html(subscribersDataImportResultsTemplate(importResults)).show(),jQuery("a.mailpoet_import_again").off().click(function(){jQuery("#subscribers_data_import_results").hide(),router.navigate("step1",{trigger:!0})}),jQuery("a.mailpoet_view_subscribers").off().click(function(){window.location.href="admin.php?page=mailpoet-subscribers"}),importResults.created&&exportMenuElement.not(":visible")&&exportMenuElement.show(),window.importData.step2=void 0}),Backbone.History.started||Backbone.history.start()})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},597:function(module,exports){/*!
|
2 |
-
Papa Parse
|
3 |
-
v4.1.1
|
4 |
-
https://github.com/mholt/PapaParse
|
5 |
-
*/
|
6 |
-
!function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){return void 0===e||null===e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(function(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i||"false"!=i&&"FALSE"!=i&&o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[",","\t","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,void 0!==i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,(void 0===n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){return l.test(e)?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||!1!==a&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if(void 0===w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="\ufeff",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,void 0!==module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){if("INPUT"!=S(this).prop("tagName").toUpperCase()||"file"!=S(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this)},598:function(module,exports){!function($){$.AsyncQueue=function(){var failureFunc,completeFunc,lastCallbackData,_run,that=this,queue=[],paused=!1;return _run=function(){var f=queue.shift();f?(f.apply(that,[that]),!1===paused&&_run()):completeFunc&&completeFunc.apply(that)},this.onFailure=function(func){failureFunc=func},this.onComplete=function(func){completeFunc=func},this.add=function(func){return queue.push(func),this},this.storeData=function(dataObject){return lastCallbackData=dataObject,this},this.lastCallbackData=function(){return lastCallbackData},this.run=function(){paused=!1,_run()},this.pause=function(){return paused=!0,this},this.failure=function(){if(paused=!0,failureFunc){var args=[that];for(i=0;i<arguments.length;i++)args.push(arguments[i]);failureFunc.apply(that,args)}},this}}(jQuery)},599:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(205)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,jQuery,MailPoet,Handlebars){jQuery("#mailpoet_subscribers_export").length&&jQuery(document).ready(function(){function toggleNextStepButton(condition){"on"===condition?nextStepButton.removeClass("button-disabled"):nextStepButton.addClass("button-disabled")}var segmentsContainerElement,subscriberFieldsContainerElement,nextStepButton,renderSegmentsAndFields,subscribersExportTemplate;window.exportData.segments&&(subscribersExportTemplate=Handlebars.compile(jQuery("#mailpoet_subscribers_export_template").html()),jQuery("#mailpoet_subscribers_export > div.inside").html(subscribersExportTemplate(window.exportData)),segmentsContainerElement=jQuery("#export_lists"),subscriberFieldsContainerElement=jQuery("#export_columns"),nextStepButton=jQuery("a.mailpoet_export_process"),renderSegmentsAndFields=function(container,data){container.data("select2")&&container.html("").select2("destroy"),container.select2({data:data,width:"20em",templateResult:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name},templateSelection:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name}}).on("select2:selecting",function(selectEvent){var allOptions,selectElement=this,selectedOptionId=selectEvent.params.args.data.id,fieldsToExclude=["select","deselect"];_.contains(fieldsToExclude,selectedOptionId)&&(selectEvent.preventDefault(),"deselect"===selectedOptionId?jQuery(selectElement).val("").trigger("change"):(allOptions=[],_.each(container.find("option"),function(field){_.contains(fieldsToExclude,field.value)||allOptions.push(field.value)}),jQuery(selectElement).val(allOptions).trigger("change")),jQuery(selectElement).select2("close"))}).on("change",function(){toggleNextStepButton(window.exportData.segments&&segmentsContainerElement.select2("data").length&&subscriberFieldsContainerElement.select2("data").length||!window.exportData.segments&&subscriberFieldsContainerElement.select2("data").length?"on":"off")})},window.segments.forEach(function(item){segmentsContainerElement.append(jQuery("<option></option>").attr("value",item.id).text(item.name))}),renderSegmentsAndFields(segmentsContainerElement,window.segments),renderSegmentsAndFields(subscriberFieldsContainerElement,window.subscriberFieldsSelect2),subscriberFieldsContainerElement.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),nextStepButton.click(function(){var exportFormat;jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),exportFormat=jQuery(':radio[name="option_format"]:checked').val(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:JSON.stringify({export_format_option:exportFormat,segments:!!window.exportData.segments&&segmentsContainerElement.val(),subscriber_fields:subscriberFieldsContainerElement.val()})}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){var resultMessage=MailPoet.I18n.t("exportMessage").replace("%1$s","<strong>"+parseInt(response.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+response.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");jQuery("#export_result_notice").html("<p>"+resultMessage+"</p>").show(),window.location.href=response.data.exportFileURL,MailPoet.trackEvent("Subscribers export completed",{"Total exported":response.data.totalExported,"File Format":exportFormat,"MailPoet Free version":window.mailpoet_version})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))}))})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},600:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3__steps_controller_jsx__=__webpack_require__(601),container=document.getElementById("welcome_wizard_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.c,{to:"/steps/1"})}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/steps/:step",component:__WEBPACK_IMPORTED_MODULE_3__steps_controller_jsx__.a}))),container)},601:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__=__webpack_require__(224),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11__header_jsx__=__webpack_require__(602),__WEBPACK_IMPORTED_MODULE_12__steps_sender_step_jsx__=__webpack_require__(604),__WEBPACK_IMPORTED_MODULE_13__steps_migrated_user_step_jsx__=__webpack_require__(605),__WEBPACK_IMPORTED_MODULE_14__steps_help_info_step_jsx__=__webpack_require__(606),__WEBPACK_IMPORTED_MODULE_15__steps_usage_tracking_step_jsx__=__webpack_require__(607),__WEBPACK_IMPORTED_MODULE_16__steps_woo_commerce_step_jsx__=__webpack_require__(608),WelcomeWizardStepsController=function(_React$Component){function WelcomeWizardStepsController(props){var _this;return __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,WelcomeWizardStepsController),_this=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(WelcomeWizardStepsController).call(this,props)),_this.state={stepsCount:window.is_woocommerce_active?4:3,shouldSetSender:!window.is_mp2_migration_complete,loading:!1,sender:window.sender_data},_this.finishWizard=_this.finishWizard.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.updateSettings=_this.updateSettings.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.activateTracking=_this.activateTracking.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.updateSender=_this.updateSender.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.submitSender=_this.submitSender.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.showWooCommerceStepOrFinish=_this.showWooCommerceStepOrFinish.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.componentDidUpdate(),_this}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(WelcomeWizardStepsController,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(WelcomeWizardStepsController,[{key:"componentDidUpdate",value:function(){var step=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(this.props.match.params.step,10);(step>this.state.stepsCount||step<1)&&this.props.history.push("/steps/1")}},{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"showWooCommerceStepOrFinish",value:function(){4===this.state.stepsCount?this.props.history.push("/steps/4"):this.finishWizard()}},{key:"updateSettings",value:function(data){var _this2=this;return this.setState({loading:!0}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:data}).then(function(){return _this2.setState({loading:!1})}).fail(function(response){_this2.setState({loading:!1}),response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"activateTracking",value:function(){var _this3=this;this.updateSettings({analytics:{enabled:!0}}).then(function(){return _this3.showWooCommerceStepOrFinish()})}},{key:"updateSender",value:function(data){this.setState({sender:__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default()({},this.state.sender,data)})}},{key:"submitSender",value:function(){var _this4=this;this.updateSettings({sender:this.state.sender}).then(function(){return _this4.props.history.push("/steps/2")})}},{key:"render",value:function(){var _this5=this,step=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(this.props.match.params.step,10);return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__header_jsx__.a,{current_step:step,steps_count:this.state.stepsCount,logo_src:window.mailpoet_logo_url}),1===step&&this.state.shouldSetSender?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__steps_sender_step_jsx__.a,{update_sender:this.updateSender,submit_sender:this.submitSender,finish:this.finishWizard,loading:this.state.loading,sender:this.state.sender}):null,1!==step||this.state.shouldSetSender?null:__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__steps_migrated_user_step_jsx__.a,{next:function(){return _this5.props.history.push("/steps/2")}}),2===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__steps_help_info_step_jsx__.a,{next:function(){return _this5.props.history.push("/steps/3")}}):null,3===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__steps_usage_tracking_step_jsx__.a,{skip_action:this.showWooCommerceStepOrFinish,allow_action:this.activateTracking,allow_text:4===this.state.stepsCount?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allowAndContinue"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allowAndFinish"),loading:this.state.loading}):null,4===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__steps_woo_commerce_step_jsx__.a,{next:this.finishWizard,screenshot_src:window.woocommerce_screenshot_url,loading:this.state.loading}):null)}}]),WelcomeWizardStepsController}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);WelcomeWizardStepsController.propTypes={match:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({step:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string}).isRequired}).isRequired,history:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}).isRequired},__webpack_exports__.a=WelcomeWizardStepsController},602:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2__common_stepped_progess_bar_jsx__=__webpack_require__(603),WelcomeWizardHeader=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_centered_column mailpoet_welcome_wizard_header"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("img",{src:props.logo_src,width:"200",alt:"MailPoet logo"}),props.current_step<=props.steps_count?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__common_stepped_progess_bar_jsx__.a,{steps_count:props.steps_count,step:props.current_step}):null)};WelcomeWizardHeader.propTypes={current_step:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,steps_count:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,logo_src:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired},__webpack_exports__.a=WelcomeWizardHeader},603:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(322),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),SteppedProgressBar=function(props){return props.step>props.steps_count?null:__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_stepped_progress_bar"},__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(Array(props.steps_count).keys()).map(function(step){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_stepped_progress_bar_step ".concat(step<props.step?"active":""),key:"step_".concat(step),style:{width:"".concat(Math.floor(100/props.steps_count),"%")}})}))};SteppedProgressBar.propTypes={steps_count:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,step:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired},__webpack_exports__.a=SteppedProgressBar},604:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_3_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_jquery__),WelcomeWizardSenderStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardLetsStartTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardSenderText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("form",{id:"mailpoet_sender_form",className:"mailpoet_welcome_wizard_centered_column ".concat(props.loading?"mailpoet_sender_form_loading":""),onSubmit:function(e){e.preventDefault(),__WEBPACK_IMPORTED_MODULE_3_jquery___default()("#mailpoet_sender_form").parsley().validate()&&props.submit_sender()}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("label",{htmlFor:"senderName"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderName"),":",__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:props.sender?props.sender.name:"","data-parsley-required":!0,onChange:function(e){return props.update_sender({name:e.target.value})}})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("label",{htmlFor:"senderAddress"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderAddress"),":",__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:props.sender?props.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(e){return props.update_sender({address:e.target.value})}})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{className:"button button-primary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next")}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{onClick:props.finish,href:"#finish"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("noThanksSkip"))))};WelcomeWizardSenderStep.propTypes={finish:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,update_sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,submit_sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,address:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string})},WelcomeWizardSenderStep.defaultProps={sender:null},__webpack_exports__.a=WelcomeWizardSenderStep},605:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),WelcomeWizardMigratedUserStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardLetsStartTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardSenderMigratedUserText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next"))))};WelcomeWizardMigratedUserStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired},__webpack_exports__.a=WelcomeWizardMigratedUserStep},606:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_string_replace__),WelcomeWizardHelpInfoStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_welcome_wizard_support_button"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardYouCanContactText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)}))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_badge mailpoet_badge_video mailpoet_welcome_wizard_video_badge"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"dashicons dashicons-format-video"}),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("seeVideoGuide")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardAboutVideosText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)}))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_welcome_wizard_mail_icon"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardAboutCourseText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://newsletters.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0",allowtransparency:"true"})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next")))};WelcomeWizardHelpInfoStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired},__webpack_exports__.a=WelcomeWizardHelpInfoStep},607:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_string_replace__),WelcomeWizardUsageTrackingStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardUsageTrackingStepTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardTrackingText"),/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{key:"docs_link",href:"https://beta.docs.mailpoet.com/article/130-sharing-your-data-with-us",target:"_blank",rel:"noopener noreferrer"},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button",onClick:props.skip_action,disabled:props.loading},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("skip")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.allow_action,disabled:props.loading},props.allow_text)))};WelcomeWizardUsageTrackingStep.propTypes={allow_action:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,allow_text:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,skip_action:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired},__webpack_exports__.a=WelcomeWizardUsageTrackingStep},608:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),WelcomeWizardWooCommerceStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardWooCommerceStepTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardHelpingShopOwnersText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardWooCommerceEmailsText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("img",{src:props.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next,disabled:props.loading},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("gotIt"))))};WelcomeWizardWooCommerceStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,screenshot_src:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired},__webpack_exports__.a=WelcomeWizardWooCommerceStep},609:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_0_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_dom__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2__new_subscriber_announcement_jsx__=__webpack_require__(610),container=document.getElementById("new_subscriber_announcement");container&&__WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__new_subscriber_announcement_jsx__.a,{installedAt:window.mailpoet_installed_at,imageUrl:window.mailpoet_new_subscriber_announcement_image}),container)},610:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_moment__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_3_moment___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__),__WEBPACK_IMPORTED_MODULE_4_announcements_in_app_announcement_jsx__=__webpack_require__(319),NewSubscriberNotificationAnnouncement=function(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_announcements_in_app_announcement_jsx__.a,{validUntil:__WEBPACK_IMPORTED_MODULE_3_moment___default()(props.installedAt).add(3,"months").toDate(),height:"700px",showOnlyOnceSlug:"new_subscriber_notification",showToNewUser:!1},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"new_subscriber_notification_announcement"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:props.imageUrl,width:"600px",height:"460px",alt:""}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementParagraph1"),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("br",null),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementParagraph2"))))};NewSubscriberNotificationAnnouncement.propTypes={installedAt:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,imageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired},__webpack_exports__.a=NewSubscriberNotificationAnnouncement},611:function(module,__webpack_exports__,__webpack_require__){"use strict";function displayPoll(){if(window.mailpoet_display_nps_poll&&window.satismeter&&window.mailpoet_installed_at_isoFormat){window.satismeter({writeKey:window.mailpoet_is_new_user?"6L479eVPXk7pBn6S":"k0aJAsQAWI2ERyGv",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat},events:{submit:function(response){response.rating>=9&&response.completed&&showReviewRequestModal()}}})}}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate__=__webpack_require__(336),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2_react_dom_server__=__webpack_require__(362),__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom_server__),__WEBPACK_IMPORTED_MODULE_3_review_request_jsx__=__webpack_require__(612),showReviewRequestModal=function(){return __WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.Modal.popup({width:800,template:__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default.a.renderToString(Object(__WEBPACK_IMPORTED_MODULE_3_review_request_jsx__.a)({username:window.mailpoet_current_wp_user_firstname||window.mailpoet_current_wp_user.user_login,reviewRequestIllustrationUrl:window.mailpoet_review_request_illustration_url,installedDaysAgo:window.mailpoet_installed_days_ago})),onInit:function(){document.getElementById("mailpoet_review_request_not_now").addEventListener("click",function(){return __WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.Modal.close()})}})};__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate___default()(displayPoll)},612:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),ReviewRequest=function(props){var days=props.installedDaysAgo,usingForPhrase=days>30?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestUsingForMonths").replace("[months]",Math.round(days/30)):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestUsingForDays").replace("[days]",days);return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_review_request"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("img",{src:props.reviewRequestIllustrationUrl,height:"200",width:"200",alt:""}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestHeading")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestDidYouKnow").replace("[username]",props.username)),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,usingForPhrase),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{href:"http://bit.ly/2Bi124o",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestRateUsNow"))),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{id:"mailpoet_review_request_not_now"},__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestNotNow"))))};ReviewRequest.propTypes={installedDaysAgo:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,reviewRequestIllustrationUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,username:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired},__webpack_exports__.a=ReviewRequest}},[521]);
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin.266a2f4c.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
mailpoetJsonp([2],{225:function(module,__webpack_exports__,__webpack_require__){"use strict";function Tabs(props){var tabLinks=tabs.map(function(tab){var tabClasses=__WEBPACK_IMPORTED_MODULE_3_classnames___default()("nav-tab",{"nav-tab-active":props.tab===tab.name});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{key:"tab-".concat(tab.name),className:tabClasses,to:tab.link},tab.label)});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",{className:"nav-tab-wrapper"},tabLinks)}var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_3_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),tabs=[{name:"knowledgeBase",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabKnowledgeBaseTitle"),link:"/knowledgeBase"},{name:"systemStatus",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabSystemStatusTitle"),link:"/systemStatus"},{name:"systemInfo",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabSystemInfoTitle"),link:"/systemInfo"},{name:"yourPrivacy",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("tabYourPrivacyTitle"),link:"/yourPrivacy"}];Tabs.propTypes={tab:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string},Tabs.defaultProps={tab:"knowledgeBase"},__webpack_exports__.a=Tabs},321:function(module,exports,__webpack_require__){function _toConsumableArray(arr){return arrayWithoutHoles(arr)||iterableToArray(arr)||nonIterableSpread()}var arrayWithoutHoles=__webpack_require__(524),iterableToArray=__webpack_require__(525),nonIterableSpread=__webpack_require__(533);module.exports=_toConsumableArray},366:function(module,__webpack_exports__,__webpack_require__){"use strict";function confirmAlert(props){__WEBPACK_IMPORTED_MODULE_10_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(ConfirmAlert,props),document.getElementById("mailpoet_confirm_alert_holder"))}__webpack_exports__.a=confirmAlert;var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mailpoet__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_10_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_react_dom__),ConfirmAlert=function(_React$Component){function ConfirmAlert(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,ConfirmAlert),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(ConfirmAlert).call(this,props)),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"componentWillUpdate",function(){_this.state.show||_this.setState({show:!0})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onClose",function(){_this.setState({show:!1})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onConfirm",function(){_this.onClose(),_this.props.onConfirm()}),_this.state={show:!0},_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(ConfirmAlert,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(ConfirmAlert,[{key:"render",value:function(){var _this$props=this.props,title=_this$props.title,message=_this$props.message,confirmLabel=_this$props.confirmLabel,cancelLabel=_this$props.cancelLabel;return this.state.show&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_modal_overlay"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup",tabIndex:"-1"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_wrapper"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"mailpoet_modal_close",onClick:this.onClose}),title&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_title"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h2",null,title)),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_popup_body clearfix"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",{className:"mailpoet_hp_email_label"},message),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"button button-secondary",onClick:this.onClose},cancelLabel),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("button",{className:"button button-primary",onClick:this.onConfirm},confirmLabel)))))}}]),ConfirmAlert}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(ConfirmAlert,"propTypes",{title:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,message:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,cancelLabel:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,confirmLabel:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,onConfirm:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(ConfirmAlert,"defaultProps",{title:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmTitle"),cancelLabel:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("cancelLabel"),confirmLabel:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmLabel")})},367:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_7_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_underscore__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__=__webpack_require__(312),__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__=__webpack_require__(320),intervalField=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__),{name:"intervalType",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.intervalValues}),timeOfDayField={name:"timeOfDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues},weekDayField={name:"weekDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues},monthDayField={name:"monthDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.monthDayValues},nthWeekDayField={name:"nthWeekDay",values:__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.nthWeekDayValues},NotificationScheduling=function(_React$Component){function NotificationScheduling(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NotificationScheduling);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NotificationScheduling)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getCurrentValue",function(){return _this.props.item[_this.props.field.name]||{}}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(name,value){var oldValue=_this.getCurrentValue(),newValue={};return newValue[name]=value,_this.props.onValueChange({target:{name:_this.props.field.name,value:__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.extend({},oldValue,newValue)}})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleIntervalChange",function(event){return _this.handleValueChange("intervalType",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleTimeOfDayChange",function(event){return _this.handleValueChange("timeOfDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleWeekDayChange",function(event){return _this.handleValueChange("weekDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleMonthDayChange",function(event){return _this.handleValueChange("monthDay",event.target.value)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleNthWeekDayChange",function(event){return _this.handleValueChange("nthWeekDay",event.target.value)}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NotificationScheduling,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NotificationScheduling,[{key:"render",value:function(){var timeOfDaySelection,weekDaySelection,monthDaySelection,nthWeekDaySelection,value=this.getCurrentValue();return"immediately"!==value.intervalType&&(timeOfDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:timeOfDayField,item:this.getCurrentValue(),onValueChange:this.handleTimeOfDayChange})),"weekly"!==value.intervalType&&"nthWeekDay"!==value.intervalType||(weekDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:weekDayField,item:this.getCurrentValue(),onValueChange:this.handleWeekDayChange})),"monthly"===value.intervalType&&(monthDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:monthDayField,item:this.getCurrentValue(),onValueChange:this.handleMonthDayChange})),"nthWeekDay"===value.intervalType&&(nthWeekDaySelection=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:nthWeekDayField,item:this.getCurrentValue(),onValueChange:this.handleNthWeekDayChange})),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_fields_select_jsx__.a,{field:intervalField,item:this.getCurrentValue(),onValueChange:this.handleIntervalChange,automationId:"newsletter_interval_type"}),nthWeekDaySelection,monthDaySelection,weekDaySelection,timeOfDaySelection)}}]),NotificationScheduling}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);NotificationScheduling.propTypes={item:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.object.isRequired,field:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string}).isRequired,onValueChange:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func.isRequired},__webpack_exports__.a=NotificationScheduling},373:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),KeyValueTable=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("table",{className:"widefat fixed",style:{maxWidth:props.max_width}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tbody",null,props.rows.map(function(row){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",{key:"row_".concat(row.key)},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"row-title"},row.key),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",null,row.value))})))};KeyValueTable.propTypes={max_width:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,rows:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({key:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,value:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element]).isRequired})).isRequired},KeyValueTable.defaultProps={max_width:"auto"},__webpack_exports__.a=KeyValueTable},374:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),TasksListDataRow=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column column-primary"},props.task.id),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.type),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.newsletter?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:props.task.newsletter.preview_url,"data-newsletter-id":props.task.newsletter.newsletter_id,"data-queue-id":props.task.newsletter.queue_id,target:"_blank"},props.task.newsletter.subject||__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("preview")):__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("none")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column"},props.task.priority),props.show_scheduled_at?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column-date"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Date.format(1e3*props.task.scheduled_at))):null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{className:"column-date"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Date.format(1e3*props.task.updated_at))))};TasksListDataRow.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,task:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,type:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,priority:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,updated_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number,status:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,newsletter:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({newsletter_id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,queue_id:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,preview_url:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,subject:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string})}).isRequired},TasksListDataRow.defaultProps={show_scheduled_at:!1,task:{newsletter:null}},__webpack_exports__.a=TasksListDataRow},375:function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(610)},518:function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_4_settings_tabs_js__=(__webpack_require__(519),__webpack_require__(523),__webpack_require__(572),__webpack_require__(576),__webpack_require__(578)),__WEBPACK_IMPORTED_MODULE_7_settings_reinstall_from_scratch_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_settings_tabs_js__),__webpack_require__(580),__webpack_require__(590),__webpack_require__(592)),__WEBPACK_IMPORTED_MODULE_8_subscribers_importExport_import_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_settings_reinstall_from_scratch_js__),__webpack_require__(593)),__WEBPACK_IMPORTED_MODULE_9_subscribers_importExport_export_js__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_subscribers_importExport_import_js__),__webpack_require__(596));__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_subscribers_importExport_export_js__),__webpack_require__(597),__webpack_require__(606),__webpack_require__(611)},519:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_subscribers_list_jsx__=__webpack_require__(520),__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx__=__webpack_require__(521),__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx__),container=document.getElementById("subscribers_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/new",component:__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/edit/:id",component:__WEBPACK_IMPORTED_MODULE_4_subscribers_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3_subscribers_list_jsx__.a}))),container)},520:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_9_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_jquery__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_11_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_classnames__),__WEBPACK_IMPORTED_MODULE_12_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_12_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types__),__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx__=__webpack_require__(352),__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx__),columns=[{name:"email",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscriber"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status"),sortable:!0},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lists")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribedOn"),sortable:!0},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberTrashed"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberDeleted"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneSubscriberRestored"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onNoItemsFound:function(group){return"bounced"===group&&!window.mailpoet_premium_active&&!window.mss_active&&__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bouncedSubscribersHelp")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"admin.php?page=mailpoet-premium",className:"button-primary"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bouncedSubscribersPremiumButtonText"))))}},bulkActions=[{name:"moveToList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToList"),onSelect:function(){var field={id:"move_to_segment",name:"move_to_segment",endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#move_to_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersMovedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"addToList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("addToList"),onSelect:function(){var field={id:"add_to_segment",name:"add_to_segment",endpoint:"segments",filter:function(segment){return!(segment.deleted_at||"default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#add_to_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersAddedToList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromList",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("removeFromList"),onSelect:function(){var field={id:"remove_from_segment",name:"remove_from_segment",endpoint:"segments",filter:function(segment){return!("default"!==segment.type)}};return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_form_fields_selection_jsx___default.a,{field:field})},getData:function(){return{segment_id:Number(__WEBPACK_IMPORTED_MODULE_9_jquery___default()("#remove_from_segment").val())}},onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRemovedFromList").replace("%$1d",Number(response.meta.count).toLocaleString()).replace("%$2s",response.meta.segment))}},{name:"removeFromAllLists",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("removeFromAllLists"),onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleSubscribersRemovedFromAllLists").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"sendConfirmationEmail",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("resendConfirmationEmail"),onSuccess:function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleConfirmationEmailsSent").replace("%$1d",Number(response.meta.count).toLocaleString()))}},{name:"trash",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"),link:function(subscriber){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{to:"/edit/".concat(subscriber.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"))}},{name:"trash",display:function(subscriber){return 0===Number(subscriber.wp_user_id)}}],SubscriberList=function(_React$Component){function SubscriberList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SubscriberList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SubscriberList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getSegmentFromId",function(segmentId){var result=!1;return window.mailpoet_segments.forEach(function(segment){segment.id===segmentId&&(result=segment)}),result}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(subscriber,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_11_classnames___default()("manage-column","column-primary","has-row-actions","column-username"),status="";switch(subscriber.status){case"subscribed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribed");break;case"unconfirmed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("unconfirmed");break;case"unsubscribed":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("unsubscribed");break;case"bounced":status=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("bounced");break;default:status="Invalid"}var segments=!1;if(subscriber.subscriptions.length>0){var subscribedSegments=[];subscriber.subscriptions.forEach(function(subscription){var segment=_this.getSegmentFromId(subscription.segment_id);!1!==segment&&"subscribed"===subscription.status&&subscribedSegments.push(segment.name)}),segments=__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("span",null,subscribedSegments.join(", "))}return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"row-title",to:"/edit/".concat(subscriber.id)},subscriber.email)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",{style:{margin:0}},subscriber.first_name," ",subscriber.last_name),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status")},status),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lists")},segments),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subscribedOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(subscriber.created_at))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(subscriber.updated_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SubscriberList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SubscriberList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"page-title-action",to:"/new"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("new")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"page-title-action",href:"?page=mailpoet-import#step1"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("import")),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{id:"mailpoet_export_button",className:"page-title-action",href:"?page=mailpoet-export"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("export"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"subscribers",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,messages:messages,sort_by:"created_at",sort_order:"desc"}))}}]),SubscriberList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);SubscriberList.propTypes={location:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object}).isRequired},__webpack_exports__.a=SubscriberList},521:function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(522)}).call(exports,__webpack_require__(11))},522:function(module,__webpack_exports__,__webpack_require__){"use strict";function beforeFormContent(subscriber){if(Number(subscriber.wp_user_id)>0)return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"description"},__WEBPACK_IMPORTED_MODULE_11_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("WPUserEditNotice"),/\[link\](.*?)\[\/link\]/g,function(match,i){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{key:i,href:"user-edit.php?user_id=".concat(subscriber.wp_user_id)},match)}))}function afterFormContent(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"description"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("tip"))," ",__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("customFieldsTip"))}Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array__=__webpack_require__(316),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_10_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_11_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_11_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_react_string_replace__),fields=[{name:"email",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("email"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"first_name",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("firstname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"last_name",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("lastname"),type:"text",disabled:function(subscriber){return Number(subscriber.wp_user_id>0)}},{name:"status",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("status"),type:"select",values:{subscribed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscribed"),unconfirmed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unconfirmed"),unsubscribed:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unsubscribed"),bounced:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("bounced")},filter:function(subscriber,value){return!(Number(subscriber.wp_user_id)>0&&"unconfirmed"===value)}},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("lists"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("selectList"),tip:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("welcomeEmailTip"),api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,selected:function(subscriber){return!1===__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_core_js_array_is_array___default()(subscriber.subscriptions)?null:subscriber.subscriptions.filter(function(subscription){return"subscribed"===subscription.status}).map(function(subscription){return subscription.segment_id})},filter:function(segment){return!segment.deleted_at&&"default"===segment.type},getLabel:function(segment){return"".concat(segment.name," (").concat(segment.subscribers,")")},getSearchLabel:function(segment,subscriber){var label="";return void 0!==subscriber.subscriptions&&subscriber.subscriptions.forEach(function(subscription){if(segment.id===subscription.segment_id&&(label=segment.name,"unsubscribed"===subscription.status)){var unsubscribedAt=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Date.format(subscription.updated_at);label+=" (%$1s)".replace("%$1s",__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("unsubscribedOn").replace("%$1s",unsubscribedAt))}}),label}}];(window.mailpoet_custom_fields||[]).forEach(function(customField){var field={name:"cf_".concat(customField.id),label:customField.name,type:customField.type};switch(customField.params&&(field.params=customField.params),customField.params.values&&(field.values=customField.params.values),customField.type){case"date":field.year_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("year"),field.month_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("month"),field.day_placeholder=__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("day");break;case"select":field.placeholder="-";break;default:field.placeholder=""}fields.push(field)});var messages={onUpdate:function(){__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriberUpdated"))},onCreate:function(){__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriberAdded")),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Subscribers > Add new",{"MailPoet Free version":window.mailpoet_version})}},SubscriberForm=function(_React$Component){function SubscriberForm(){return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SubscriberForm),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SubscriberForm).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SubscriberForm,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SubscriberForm,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("subscriber"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_router_dom__.b,{className:"page-title-action",to:"/"},__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("backToList"))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_form_form_jsx___default.a,{automationId:"subscriber_edit_form",endpoint:"subscribers",fields:fields,params:this.props.match.params,messages:messages,beforeFormContent:beforeFormContent,afterFormContent:afterFormContent}))}}]),SubscriberForm}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);SubscriberForm.propTypes={match:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.default=SubscriberForm},523:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(321),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_7_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12_newsletters_types_jsx__=__webpack_require__(534),__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_jsx__=__webpack_require__(535),__WEBPACK_IMPORTED_MODULE_14_newsletters_send_jsx__=__webpack_require__(541),__WEBPACK_IMPORTED_MODULE_15_newsletters_send_congratulate_congratulate_jsx__=__webpack_require__(560),__WEBPACK_IMPORTED_MODULE_16_newsletters_types_standard_jsx__=__webpack_require__(565),__WEBPACK_IMPORTED_MODULE_17_newsletters_types_notification_notification_jsx__=__webpack_require__(566),__WEBPACK_IMPORTED_MODULE_18_newsletters_types_welcome_welcome_jsx__=__webpack_require__(567),__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx__=__webpack_require__(361),__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx__),__WEBPACK_IMPORTED_MODULE_20_newsletters_listings_standard_jsx__=__webpack_require__(568),__WEBPACK_IMPORTED_MODULE_21_newsletters_listings_welcome_jsx__=__webpack_require__(569),__WEBPACK_IMPORTED_MODULE_22_newsletters_listings_notification_jsx__=__webpack_require__(570),__WEBPACK_IMPORTED_MODULE_23_newsletters_listings_notification_history_jsx__=__webpack_require__(571);((function(_React$Component){function App(){return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,App),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(App).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(App,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(App,[{key:"render",value:function(){return this.props.children}}]),App})(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component)).propTypes={children:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.element.isRequired};var container=document.getElementById("newsletters_container");if(container){var routes=[{path:"/standard/(.*)?",component:__WEBPACK_IMPORTED_MODULE_20_newsletters_listings_standard_jsx__.a},{path:"/welcome/(.*)?",component:__WEBPACK_IMPORTED_MODULE_21_newsletters_listings_welcome_jsx__.a},{path:"/notification/history/:parent_id/(.*)?",component:__WEBPACK_IMPORTED_MODULE_23_newsletters_listings_notification_history_jsx__.a},{path:"/notification/(.*)?",component:__WEBPACK_IMPORTED_MODULE_22_newsletters_listings_notification_jsx__.a},{path:"/new/standard",component:__WEBPACK_IMPORTED_MODULE_16_newsletters_types_standard_jsx__.a},{path:"/new/notification",component:__WEBPACK_IMPORTED_MODULE_17_newsletters_types_notification_notification_jsx__.a},{path:"/new/welcome",component:__WEBPACK_IMPORTED_MODULE_18_newsletters_types_welcome_welcome_jsx__.a},{path:"/new",component:__WEBPACK_IMPORTED_MODULE_12_newsletters_types_jsx__.a},{name:"template",path:"/template/:id",component:__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_jsx__.a},{path:"/send/congratulate/:id",component:__WEBPACK_IMPORTED_MODULE_15_newsletters_send_congratulate_congratulate_jsx__.a},{path:"/send/:id",component:__WEBPACK_IMPORTED_MODULE_14_newsletters_send_jsx__.a}];routes=__WEBPACK_IMPORTED_MODULE_9_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_before_router",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(routes).concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(function(){return window.mailpoet_automatic_emails?__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.map(window.mailpoet_automatic_emails,function(automaticEmail){return{path:"new/".concat(automaticEmail.slug),name:automaticEmail.slug,component:__WEBPACK_IMPORTED_MODULE_19_newsletters_types_automatic_emails_events_list_jsx___default.a,data:{email:automaticEmail}}}):null}()))),window.mailpoet_listing=__WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.c,{to:"/standard"})}}),routes.map(function(route){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.d,{key:route.path,path:route.path,component:route.component,name:route.name||null,data:route.data||null,render:route.render})}))),container)}},524:function(module,exports,__webpack_require__){function _arrayWithoutHoles(arr){if(_Array$isArray(arr)){for(var i=0,arr2=new Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}}var _Array$isArray=__webpack_require__(316);module.exports=_arrayWithoutHoles},525:function(module,exports,__webpack_require__){function _iterableToArray(iter){if(_isIterable(Object(iter))||"[object Arguments]"===Object.prototype.toString.call(iter))return _Array$from(iter)}var _Array$from=__webpack_require__(526),_isIterable=__webpack_require__(530);module.exports=_iterableToArray},526:function(module,exports,__webpack_require__){module.exports=__webpack_require__(527)},527:function(module,exports,__webpack_require__){__webpack_require__(197),__webpack_require__(528),module.exports=__webpack_require__(15).Array.from},528:function(module,exports,__webpack_require__){"use strict";var ctx=__webpack_require__(52),$export=__webpack_require__(20),toObject=__webpack_require__(200),call=__webpack_require__(363),isArrayIter=__webpack_require__(364),toLength=__webpack_require__(305),createProperty=__webpack_require__(529),getIterFn=__webpack_require__(317);$export($export.S+$export.F*!__webpack_require__(365)(function(iter){Array.from(iter)}),"Array",{from:function(arrayLike){var length,result,step,iterator,O=toObject(arrayLike),C="function"==typeof this?this:Array,aLen=arguments.length,mapfn=aLen>1?arguments[1]:void 0,mapping=void 0!==mapfn,index=0,iterFn=getIterFn(O);if(mapping&&(mapfn=ctx(mapfn,aLen>2?arguments[2]:void 0,2)),void 0==iterFn||C==Array&&isArrayIter(iterFn))for(length=toLength(O.length),result=new C(length);length>index;index++)createProperty(result,index,mapping?mapfn(O[index],index):O[index]);else for(iterator=iterFn.call(O),result=new C;!(step=iterator.next()).done;index++)createProperty(result,index,mapping?call(iterator,mapfn,[step.value,index],!0):step.value);return result.length=index,result}})},529:function(module,exports,__webpack_require__){"use strict";var $defineProperty=__webpack_require__(34),createDesc=__webpack_require__(195);module.exports=function(object,index,value){index in object?$defineProperty.f(object,index,createDesc(0,value)):object[index]=value}},530:function(module,exports,__webpack_require__){module.exports=__webpack_require__(531)},531:function(module,exports,__webpack_require__){__webpack_require__(222),__webpack_require__(197),module.exports=__webpack_require__(532)},532:function(module,exports,__webpack_require__){var classof=__webpack_require__(318),ITERATOR=__webpack_require__(25)("iterator"),Iterators=__webpack_require__(53);module.exports=__webpack_require__(15).isIterable=function(it){var O=Object(it);return void 0!==O[ITERATOR]||"@@iterator"in O||Iterators.hasOwnProperty(classof(O))}},533:function(module,exports){function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}module.exports=_nonIterableSpread},534:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(321),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_13_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_13_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_underscore__),__WEBPACK_IMPORTED_MODULE_14_react_router_dom__=__webpack_require__(14),NewsletterTypes=function(_React$Component){function NewsletterTypes(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterTypes);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterTypes)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"setupNewsletter",function(type){void 0!==type&&(_this.props.history.push("/new/".concat(type)),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}))}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getAutomaticEmails",function(){return window.mailpoet_automatic_emails?__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.map(window.mailpoet_automatic_emails,function(automaticEmail){var email=automaticEmail,onClick=window.mailpoet_premium_active?__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(_this.setupNewsletter,automaticEmail.slug):void 0;return email.action=function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary",onClick:onClick,role:"button",tabIndex:0,disabled:!window.mailpoet_premium_active},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp")))}(),email}):[]}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"createNewsletter",function(type){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.trackEvent("Emails > Type selected",{"MailPoet Free version":window.mailpoet_version,"Email type":type}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:type,subject:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("draftNewsletterTitle")}}).done(function(response){_this.props.history.push("/template/".concat(response.data.id))}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(NewsletterTypes,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(NewsletterTypes,[{key:"render",value:function(){var createStandardNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.createNewsletter,"standard"),createNotificationNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.setupNewsletter,"notification"),createWelcomeNewsletter=__WEBPACK_IMPORTED_MODULE_13_underscore___default.a.partial(this.setupNewsletter,"welcome"),defaultTypes=[{slug:"standard",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("regularNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("regularNewsletterTypeDescription"),action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"create_standard",onClick:createStandardNewsletter,role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("create"))}()},{slug:"welcome",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("welcomeNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("welcomeNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/254-video-guide-to-welcome-emails",action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary",onClick:createWelcomeNewsletter,"data-automation-id":"create_welcome",onKeyDown:function(event){["keydown","keypress"].includes(event.type)&&["Enter"," "].includes(event.key)&&(event.preventDefault(),createWelcomeNewsletter())},role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp"))}()},{slug:"notification",title:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeTitle"),description:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeDescription"),videoGuide:"https://beta.docs.mailpoet.com/article/210-video-guide-to-post-notifications",action:function(){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"create_notification",onClick:createNotificationNewsletter,role:"button",tabIndex:0},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("setUp"))}()}],types=__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_types",defaultTypes.concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(this.getAutomaticEmails())),this),badgeClassName=!0===window.mailpoet_is_new_user?"mailpoet_badge mailpoet_badge_video":"mailpoet_badge mailpoet_badge_video mailpoet_badge_video_grey";return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("pickCampaignType")),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("ul",{className:"mailpoet_boxes clearfix"},types.map(function(type){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("li",{key:type.slug,"data-type":type.slug,className:"mailpoet_newsletter_types"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_thumbnail"},type.thumbnailImage?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("img",{src:type.thumbnailImage,alt:""}):null),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_description"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h3",null,type.title," ",type.beta?"(".concat(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("beta"),")"):""),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",null,type.description),type.videoGuide&&__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("a",{className:badgeClassName,href:type.videoGuide,target:"_blank"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",{className:"dashicons dashicons-format-video"}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("seeVideoGuide"))),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_actions"},type.action)))},this)))}}]),NewsletterTypes}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterTypes,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_14_react_router_dom__.f)(NewsletterTypes)},535:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_12_common_loading_jsx__=__webpack_require__(536),__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_tabs_jsx__=__webpack_require__(537),__WEBPACK_IMPORTED_MODULE_14_newsletters_templates_template_box_jsx__=__webpack_require__(538),__WEBPACK_IMPORTED_MODULE_15_newsletters_templates_import_template_jsx__=__webpack_require__(539),__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_17_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_17_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_underscore__),__WEBPACK_IMPORTED_MODULE_18_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_18_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_prop_types__),getEditorUrl=function(id){return"admin.php?page=mailpoet-newsletter-editor&id=".concat(id)},templatesCategories=[{name:"standard",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabStandardTitle")},{name:"welcome",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabWelcomeTitle")},{name:"notification",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabNotificationTitle")}];window.mailpoet_woocommerce_active&&templatesCategories.push({name:"woocommerce",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabWoocommerceTitle")}),templatesCategories.push.apply(templatesCategories,[{name:"all",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allTemplates")},{name:"recent",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("recentlySent")},{name:"saved",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("savedTemplates")}]);var NewsletterTemplates=function(_React$Component){function NewsletterTemplates(props){var _this;return __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterTemplates),_this=__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterTemplates).call(this,props)),_this.state={loading:!0,templates:{},emailType:null,selectedTab:""},_this.templates={},_this.addTemplate=_this.addTemplate.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateDelete=_this.afterTemplateDelete.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateSelect=_this.afterTemplateSelect.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.afterTemplateImport=_this.afterTemplateImport.bind(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_inherits___default()(NewsletterTemplates,_React$Component),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_createClass___default()(NewsletterTemplates,[{key:"componentWillMount",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"getAll"}).done(function(response){0===response.data.length&&(response.data=[{name:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("mailpoetGuideTemplateTitle"),categories:'["welcome", "notification", "standard", "woocommerce"]',readonly:"1"}]),response.data.forEach(_this2.addTemplate),_this2.sortTemplates()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this2.selectInitialTab()})}},{key:"addTemplate",value:function(template){var categories,_this3=this,categoriesNames=templatesCategories.map(function(category){return category.name});try{categories=JSON.parse(template.categories).filter(function(name){return-1!==categoriesNames.indexOf(name)})}catch(err){categories=[]}0===categories.length&&categories.push("saved"),categories.forEach(function(category){void 0===_this3.templates[category]&&(_this3.templates[category]=[]),_this3.templates[category].unshift(template)})}},{key:"sortTemplates",value:function(){var _this4=this;__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default()(this.templates).forEach(function(category){_this4.templates[category].sort(function(a,b){return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(a.id,10)<__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(b.id,10)?1:-1})})}},{key:"selectInitialTab",value:function(){var emailType,_this5=this,selectedTab="standard";__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:this.props.match.params.id}}).done(function(response){emailType=response.data.type,__WEBPACK_IMPORTED_MODULE_17_underscore___default.a.findWhere(templatesCategories,{name:response.data.type})?selectedTab=response.data.type:"automatic"===response.data.type&&__WEBPACK_IMPORTED_MODULE_17_underscore___default.a.findWhere(templatesCategories,{name:response.data.options.group})&&(selectedTab=response.data.options.group)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}).always(function(){_this5.setState({templates:_this5.templates,emailType:emailType,selectedTab:selectedTab,loading:!1})})}},{key:"afterTemplateDelete",value:function(success,id){var _this6=this;success&&__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_core_js_object_keys___default()(this.templates).forEach(function(category){_this6.templates[category]=_this6.templates[category].filter(function(template){return template.id!==id})}),this.setState({templates:this.templates,loading:!1})}},{key:"afterTemplateSelect",value:function(success,id){success?window.location=getEditorUrl(id):this.setState({loading:!1})}},{key:"afterTemplateImport",value:function(success,template){success&&this.addTemplate(template),this.setState({templates:this.templates,selectedTab:success?"saved":"import",loading:!1})}},{key:"render",value:function(){var _this7=this;if(this.state.loading)return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_common_loading_jsx__.a,null);var tabs=templatesCategories.concat({name:"import",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("tabImportTitle")}),selectedTab=this.state.selectedTab,content=null;if("import"===selectedTab)content=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15_newsletters_templates_import_template_jsx__.a,{beforeImport:function(){return _this7.setState({loading:!0})},afterImport:this.afterTemplateImport});else{var templates=this.state.templates[this.state.selectedTab]||[];templates=0===templates.length?this.state.loading?null:__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("noTemplates")):templates.map(function(template,index){return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_newsletters_templates_template_box_jsx__.a,__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({key:template.id,index:index,newsletterId:_this7.props.match.params.id,beforeDelete:function(){return _this7.setState({loading:!0})},afterDelete:_this7.afterTemplateDelete,beforeSelect:function(){return _this7.setState({loading:!0})},afterSelect:_this7.afterTemplateSelect},template))}),content=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("ul",{className:"mailpoet_boxes clearfix"},templates)}var breadcrumb=__WEBPACK_IMPORTED_MODULE_16_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_template_breadcrumb",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_breadcrumb_jsx___default.a,{step:"template"}),this.state.emailType,"template");return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("selectTemplateTitle")),breadcrumb,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13_newsletters_templates_tabs_jsx__.a,{tabs:tabs,selected:this.state.selectedTab,select:function(name){return _this7.setState({selectedTab:name})}}),content)}}]),NewsletterTemplates}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);NewsletterTemplates.propTypes={match:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_18_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.a=NewsletterTemplates},536:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_5_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__),__WEBPACK_IMPORTED_MODULE_6_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_6_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_mailpoet__),Loading=function(_React$Component){function Loading(){return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,Loading),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(Loading).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(Loading,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(Loading,[{key:"componentWillMount",value:function(){__WEBPACK_IMPORTED_MODULE_6_mailpoet___default.a.Modal.loading(!0)}},{key:"componentWillUnmount",value:function(){__WEBPACK_IMPORTED_MODULE_6_mailpoet___default.a.Modal.loading(!1)}},{key:"render",value:function(){return null}}]),Loading}(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);__webpack_exports__.a=Loading},537:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react_tooltip__=__webpack_require__(181),__WEBPACK_IMPORTED_MODULE_2_react_tooltip___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_tooltip__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__),__WEBPACK_IMPORTED_MODULE_4_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_4_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_string_replace__),tooltipText=__WEBPACK_IMPORTED_MODULE_4_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("tooltipTemplateTabs"),/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"https://mailpoet.polldaddy.com/s/select-template-feedback",key:"feedback",target:"_blank",rel:"noopener noreferrer"},match)}),Tabs=function(_ref){var tabs=_ref.tabs,selected=_ref.selected,select=_ref.select;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"wp-filter hide-if-no-js"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("ul",{className:"filter-links"},tabs.map(function(_ref2){var name=_ref2.name,label=_ref2.label;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",{key:name},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"javascript:",className:selected===name?"current":"",onClick:function(){return select(name)}}," ",label))})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"feedback-tooltip newsletter-templates-feedback","data-event":"click","data-tip":!0,"data-for":"feedback-newsletter-templates-tabs"},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("feedback")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_tooltip___default.a,{globalEventOff:"click",multiline:!0,id:"feedback-newsletter-templates-tabs",efect:"solid",place:"bottom"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{style:{pointerEvents:"all",display:"inline-block"}},tooltipText)))};Tabs.propTypes={selected:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,select:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,tabs:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({label:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,name:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired}).isRequired).isRequired},__webpack_exports__.a=Tabs},538:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mailpoet__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_common_confirm_alert_jsx__=__webpack_require__(366),TemplateBox=function(_React$Component){function TemplateBox(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,TemplateBox),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(TemplateBox).call(this,props)),_this.onPreview=_this.onPreview.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.onDelete=_this.onDelete.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.onSelect=_this.onSelect.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(TemplateBox,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(TemplateBox,[{key:"onDelete",value:function(){var _this$props=this.props,id=_this$props.id,name=_this$props.name,beforeDelete=_this$props.beforeDelete,afterDelete=_this$props.afterDelete,onConfirm=function(){beforeDelete(),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"delete",data:{id:id}}).done(function(){afterDelete(!0,id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterDelete(!1)})};Object(__WEBPACK_IMPORTED_MODULE_9_common_confirm_alert_jsx__.a)({message:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("confirmTemplateDeletion").replace("%$1s",name),onConfirm:onConfirm})}},{key:"onPreview",value:function(){__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Modal.popup({title:this.props.name,template:'<div class="mailpoet_boxes_preview" style="background-color: {{ body.globalStyles.body.backgroundColor }}"><img src="{{ thumbnail }}" /></div>',data:this.props})}},{key:"onSelect",value:function(){var _this$props2=this.props,newsletterId=_this$props2.newsletterId,name=_this$props2.name,beforeSelect=_this$props2.beforeSelect,afterSelect=_this$props2.afterSelect;beforeSelect(),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.trackEvent("Emails > Template selected",{"MailPoet Free version":window.mailpoet_version,"Email name":name}),__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:{id:newsletterId,template_id:this.props.id}}).done(function(response){afterSelect(!0,response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterSelect(!1)})}},{key:"render",value:function(){var _this$props3=this.props,index=_this$props3.index,name=_this$props3.name,thumbnail=_this$props3.thumbnail,readonly=_this$props3.readonly,deleteLink=__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_delete button button-secondary"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{href:"javascript:;",onClick:this.onDelete},__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("delete"))),preview="";return"string"==typeof thumbnail&&thumbnail.length>0&&(preview=__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{href:"javascript:;",onClick:this.onPreview},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("img",{src:thumbnail,alt:__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("templatePreview")}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_overlay"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"mailpoet_more_details"},__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("zoom"))))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("li",{className:"mailpoet_template_boxes","data-automation-id":"select_template_box"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_thumbnail"},preview),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_description"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h3",null,name)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mailpoet_actions"},"1"!==readonly&&deleteLink,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{className:"button button-primary","data-automation-id":"select_template_".concat(index),onClick:this.onSelect,role:"button",tabIndex:0}," ",__WEBPACK_IMPORTED_MODULE_7_mailpoet___default.a.I18n.t("select")," ")))}}]),TemplateBox}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);TemplateBox.propTypes={index:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.number.isRequired,id:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,newsletterId:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,name:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,thumbnail:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,readonly:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,beforeDelete:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,afterDelete:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,beforeSelect:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,afterSelect:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired},__webpack_exports__.a=TemplateBox},539:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify__=__webpack_require__(322),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_8_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_underscore__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_help_tooltip_jsx__=__webpack_require__(180),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),ImportTemplate=function(_React$Component){function ImportTemplate(props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,ImportTemplate),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(ImportTemplate).call(this,props)),_this.fileRef=__WEBPACK_IMPORTED_MODULE_7_react___default.a.createRef(),_this.handleSubmit=_this.handleSubmit.bind(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(ImportTemplate,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(ImportTemplate,[{key:"saveTemplate",value:function(_saveTemplate){var template=_saveTemplate,_this$props=this.props,beforeImport=_this$props.beforeImport,afterImport=_this$props.afterImport;__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.isUndefined(template.body)||(template.body=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default()(template.body));try{template.categories=JSON.parse(template.categories)}catch(err){template.categories=[]}-1===template.categories.indexOf("saved")&&template.categories.push("saved"),-1===template.categories.indexOf("standard")&&-1===template.categories.indexOf("welcome")&&-1===template.categories.indexOf("notification")&&template.categories.push("standard"),template.categories=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_json_stringify___default()(template.categories),beforeImport(),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:template}).done(function(response){afterImport(!0,response.data)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0}),afterImport(!1)})}},{key:"handleSubmit",value:function(e){var _this2=this;if(e.preventDefault(),__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.size(this.fileRef.current.files)<=0)return!1;var file=__WEBPACK_IMPORTED_MODULE_8_underscore___default.a.first(this.fileRef.current.files),reader=new FileReader;return reader.onload=function(evt){try{_this2.saveTemplate(JSON.parse(evt.target.result)),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.trackEvent("Emails > Template imported",{"MailPoet Free version":window.mailpoet_version})}catch(err){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("templateFileMalformedError"))}},reader.readAsText(file),!0}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("importTemplateTitle"),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_help_tooltip_jsx__.default,{tooltip:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("helpTooltipTemplateUpload"),place:"right",className:"tooltip-help-import-template"})),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("form",{onSubmit:this.handleSubmit},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("input",{type:"file",placeholder:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("selectJsonFileToUpload"),ref:this.fileRef}),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("input",{className:"button button-primary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("upload")}))))}}]),ImportTemplate}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);ImportTemplate.propTypes={beforeImport:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func.isRequired,afterImport:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.func.isRequired},__webpack_exports__.a=ImportTemplate},541:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify__=__webpack_require__(322),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_3_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_create_react_class__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),__WEBPACK_IMPORTED_MODULE_5_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_5_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_underscore__),__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_7_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_7_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_send_standard_jsx__=__webpack_require__(542),__WEBPACK_IMPORTED_MODULE_9_newsletters_send_notification_jsx__=__webpack_require__(546),__WEBPACK_IMPORTED_MODULE_10_newsletters_send_welcome_jsx__=__webpack_require__(547),__WEBPACK_IMPORTED_MODULE_11_help_tooltip_jsx__=__webpack_require__(180),__WEBPACK_IMPORTED_MODULE_12_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_12_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_jquery__),__WEBPACK_IMPORTED_MODULE_13_common_thumbnail_jsx__=__webpack_require__(368),__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_15_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_15_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_prop_types__),__WEBPACK_IMPORTED_MODULE_16_react_router_dom__=__webpack_require__(14),NewsletterSend=__WEBPACK_IMPORTED_MODULE_3_create_react_class___default()({displayName:"NewsletterSend",propTypes:{match:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.string}).isRequired}).isRequired,history:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_15_prop_types___default.a.func.isRequired}).isRequired},getInitialState:function(){return{fields:[],item:{},loading:!0}},componentDidMount:function(){this.loadItem(this.props.match.params.id),__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley()},componentWillReceiveProps:function(props){this.loadItem(props.match.params.id)},getFieldsByNewsletter:function(newsletter){return this.getSubtype(newsletter).getFields(newsletter)},getSendButtonOptions:function(){return this.getSubtype(this.state.item).getSendButtonOptions(this.state.item)},getSubtype:function(newsletter){switch(newsletter.type){case"notification":return __WEBPACK_IMPORTED_MODULE_9_newsletters_send_notification_jsx__.a;case"welcome":return __WEBPACK_IMPORTED_MODULE_10_newsletters_send_welcome_jsx__.a;default:return __WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_newsletter_fields",__WEBPACK_IMPORTED_MODULE_8_newsletters_send_standard_jsx__.a,newsletter)}},isValid:function(){return __WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().isValid()},loadItem:function(id){var _this=this;this.setState({loading:!0}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){_this.setState({loading:!1,item:response.data,fields:_this.getFieldsByNewsletter(response.data)})}).fail(function(){_this.setState({loading:!1,item:{}},function(){_this.props.history.push("/new")})})},saveTemplate:function(response,done){var _this2=this;Object(__WEBPACK_IMPORTED_MODULE_13_common_thumbnail_jsx__.fromUrl)(response.meta.preview_url).then(function(thumbnail){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletterTemplates",action:"save",data:{newsletter_id:response.data.id,name:response.data.subject,thumbnail:thumbnail,body:__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_json_stringify___default()(response.data.body),categories:'["recent"]'}}).then(done).fail(function(err){_this2.showError(err),_this2.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),done()})}).catch(function(err){_this2.showError({errors:[err]})})},handleSend:function(e){var _this3=this;return e.preventDefault(),this.isValid()?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!0),this.saveNewsletter(e).done(function(){_this3.setState({loading:!0})}).done(function(response){switch(response.data.type){case"notification":case"welcome":return _this3.activateNewsletter(response);default:return _this3.sendNewsletter(response)}}).fail(function(err){_this3.showError(err),_this3.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})):__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().validate()},sendNewsletter:function(newsletter){var _this4=this;return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_parameters",{api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"add",data:{newsletter_id:this.state.item.id}},this.state.item)).done(function(response){_this4.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),void _this4.props.history.push("/send/congratulate/".concat(_this4.state.item.id));_this4.props.history.push(__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_response_redirect","/".concat(_this4.state.item.type||""),_this4.state.item));var customResponse=__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_server_request_response",_this4.state.item,response);__WEBPACK_IMPORTED_MODULE_5_underscore___default.a.isFunction(customResponse)?customResponse():"scheduled"===response.data.status?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterHasBeenScheduled")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Newsletter sent",{scheduled:!0,"MailPoet Free version":window.mailpoet_version})):(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterBeingSent")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Newsletter sent",{scheduled:!1,"MailPoet Free version":window.mailpoet_version})),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})}).fail(function(err){_this4.showError(err),_this4.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})},activateNewsletter:function(newsletter){var _this5=this;return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:this.props.match.params.id,status:"active"}}).done(function(response){_this5.saveTemplate(newsletter,function(){if(window.mailpoet_show_congratulate_after_first_newsletter)return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1),void _this5.props.history.push("/send/congratulate/".concat(_this5.state.item.id));_this5.props.history.push("/".concat(_this5.state.item.type||""));var opts=_this5.state.item.options;"welcome"===response.data.type?(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("welcomeEmailActivated")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Welcome email activated",{"MailPoet Free version":window.mailpoet_version,"List type":opts.event,Delay:"".concat(opts.afterTimeNumber," ").concat(opts.afterTimeType)})):"notification"===response.data.type&&(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("postNotificationActivated")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.trackEvent("Emails > Post notifications activated",{"MailPoet Free version":window.mailpoet_version,Frequency:opts.intervalType})),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})}).fail(function(err){_this5.showError(err),_this5.setState({loading:!1}),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.loading(!1)})},handleResume:function(e){var _this6=this;return e.preventDefault(),this.isValid()?this.saveNewsletter(e).done(function(){_this6.setState({loading:!0})}).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"sendingQueue",action:"resume",data:{newsletter_id:_this6.state.item.id}}).done(function(){_this6.props.history.push("/".concat(_this6.state.item.type||"")),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterSendingHasBeenResumed"))}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}).fail(function(err){_this6.showError(err)}).always(function(){_this6.setState({loading:!1})}):__WEBPACK_IMPORTED_MODULE_12_jquery___default()("#mailpoet_newsletter").parsley().validate(),!1},handleSave:function(e){var _this7=this;e.preventDefault(),this.saveNewsletter(e).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterUpdated"))}).done(function(){_this7.props.history.push("/".concat(_this7.state.item.type||""))}).fail(function(err){_this7.showError(err)})},handleRedirectToDesign:function(e){var _this8=this;e.preventDefault();var redirectTo=e.target.href;this.saveNewsletter(e).done(function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("newsletterUpdated"))}).done(function(){window.location=redirectTo}).fail(function(err){_this8.showError(err)})},saveNewsletter:function(){var data=this.state.item;data.queue=void 0,this.setState({loading:!0});var IGNORED_NEWSLETTER_PROPERTIES=["preheader","body","created_at","deleted_at","hash","status","updated_at","type"],newsletterData=__WEBPACK_IMPORTED_MODULE_5_underscore___default.a.omit(data,IGNORED_NEWSLETTER_PROPERTIES);return __WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"save",data:newsletterData})},showError:function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})},handleFormChange:function(e){var item=this.state.item;return item[e.target.name]=e.target.value,this.setState({item:item}),!0},render:function(){var isPaused="sending"===this.state.item.status&&this.state.item.queue&&"paused"===this.state.item.queue.status,fields=this.state.fields.map(function(field){var newField=field;return"segments"!==field.name&&"options"!==field.name||(newField.disabled=isPaused),newField}),sendButtonOptions=this.getSendButtonOptions(),breadcrumb=__WEBPACK_IMPORTED_MODULE_14_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_send_breadcrumb",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_newsletters_breadcrumb_jsx___default.a,{step:"send"}),this.state.item.type,"send");return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("finalNewsletterStep")),breadcrumb,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_form_form_jsx___default.a,{id:"mailpoet_newsletter",fields:fields,automationId:"newsletter_send_form",item:this.state.item,loading:this.state.loading,onChange:this.handleFormChange,onSubmit:this.handleSave},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",{className:"submit"},isPaused?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleResume,value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("resume")}):__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({className:"button button-primary",type:"button",onClick:this.handleSend,value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("send")},sendButtonOptions))," ",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("input",{className:"button button-secondary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("saveDraftAndClose")})," ",__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("orSimply")," ",__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(this.props.match.params.id),onClick:this.handleRedirectToDesign},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("goBackToDesign")),"."),!isPaused&&sendButtonOptions.disabled&&"disabled"===sendButtonOptions.disabled&&__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_help_tooltip_jsx__.default,{tooltip:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("helpTooltipSendEmail"),tooltipId:"helpTooltipSendEmail"})))}});__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_16_react_router_dom__.f)(NewsletterSend)},542:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof__=__webpack_require__(339),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_mailpoet__),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_13_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_13_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_prop_types__),__WEBPACK_IMPORTED_MODULE_14_newsletters_send_date_time_jsx__=__webpack_require__(543),currentTime=window.mailpoet_current_time||"00:00",defaultDateTime="".concat(window.mailpoet_current_date," 00:00:00"),timeOfDayItems=window.mailpoet_schedule_time_of_day,dateDisplayFormat=window.mailpoet_date_display_format,dateStorageFormat=window.mailpoet_date_storage_format,StandardScheduling=function(_React$Component){function StandardScheduling(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,StandardScheduling);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(StandardScheduling)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getCurrentValue",function(){var schedulingOptions={isScheduled:"0",scheduledAt:defaultDateTime};return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.defaults(_this.props.item[_this.props.field.name]||{},schedulingOptions)}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDateValidation",function(){return{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("noScheduledDateError"),"data-parsley-errors-container":"#mailpoet_scheduling"}}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"isScheduled",function(){return"1"===_this.getCurrentValue().isScheduled}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleCheckboxChange",function(event){var changeEvent=event;return changeEvent.target.value=event.target.checked?"1":"0",_this.handleValueChange(changeEvent)}),__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(event){var oldValue=_this.getCurrentValue(),newValue={};return newValue[event.target.name]=event.target.value,_this.props.onValueChange({target:{name:_this.props.field.name,value:__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.extend({},oldValue,newValue)}})}),_this}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(StandardScheduling,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(StandardScheduling,[{key:"render",value:function(){var schedulingOptions;return this.isScheduled()&&(schedulingOptions=__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",{id:"mailpoet_scheduling"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14_newsletters_send_date_time_jsx__.a,{name:"scheduledAt",value:this.getCurrentValue().scheduledAt,onChange:this.handleValueChange,disabled:this.props.field.disabled,dateValidation:this.getDateValidation(),defaultDateTime:defaultDateTime,timeOfDayItems:timeOfDayItems,dateDisplayFormat:dateDisplayFormat,dateStorageFormat:dateStorageFormat})," ",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("websiteTimeIs")," ",__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("code",null,currentTime)))),__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("input",{type:"checkbox",value:"1",checked:this.isScheduled(),disabled:this.props.field.disabled,name:"isScheduled",onChange:this.handleCheckboxChange}),schedulingOptions)}}]),StandardScheduling}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);StandardScheduling.propTypes={item:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.object,field:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.bool}).isRequired,onValueChange:__WEBPACK_IMPORTED_MODULE_13_prop_types___default.a.func.isRequired},StandardScheduling.defaultProps={item:{}};var fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("segments"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("segmentsTip"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return"".concat(segment.name," (").concat(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(segment.subscribers,10).toLocaleString(),")")},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.map(segmentIds,function(id){return __WEBPACK_IMPORTED_MODULE_10_underscore___default.a.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]},{name:"options",label:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("scheduleIt"),type:"reactComponent",component:StandardScheduling}];fields=__WEBPACK_IMPORTED_MODULE_12_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(newsletter){var newsletterOptions=newsletter||{},isScheduled="object"===__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_typeof___default()(newsletterOptions.options)&&"1"===newsletterOptions.options.isScheduled,options={value:isScheduled?__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("schedule"):__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("send")};return"sent"!==newsletterOptions.status&&"sending"!==newsletterOptions.status||(options.disabled="disabled"),options}}},543:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray__=__webpack_require__(358),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10_newsletters_send_date_text_jsx__=__webpack_require__(544),__WEBPACK_IMPORTED_MODULE_11_newsletters_send_time_select_jsx__=__webpack_require__(545),DateTime=function(_React$Component){function DateTime(_props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,DateTime),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(DateTime).call(this,_props)),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDateTime",function(){return[_this.state.date,_this.state.time].join(_this.DATE_TIME_SEPARATOR)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"DATE_TIME_SEPARATOR"," "),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"buildStateFromProps",function(props){var value=props.value||_this.props.defaultDateTime,_value$split=value.split(_this.DATE_TIME_SEPARATOR),_value$split2=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_slicedToArray___default()(_value$split,2);return{date:_value$split2[0],time:_value$split2[1]}}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleChange",function(event){var newState={};newState[event.target.name]=event.target.value,_this.setState(newState,_this.propagateChange)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"propagateChange",function(){_this.props.onChange&&_this.props.onChange({target:{name:_this.props.name||"",value:_this.getDateTime()}})}),_this.state=_this.buildStateFromProps(_props),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(DateTime,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(DateTime,[{key:"componentWillReceiveProps",value:function(nextProps){this.setState(this.buildStateFromProps(nextProps))}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("span",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_send_date_text_jsx__.a,{name:"date",value:this.state.date,onChange:this.handleChange,displayFormat:this.props.dateDisplayFormat,storageFormat:this.props.dateStorageFormat,disabled:this.props.disabled,validation:this.props.dateValidation}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_newsletters_send_time_select_jsx__.a,{name:"time",value:this.state.time,onChange:this.handleChange,disabled:this.props.disabled,validation:this.props.timeValidation,timeOfDayItems:this.props.timeOfDayItems}))}}]),DateTime}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);DateTime.propTypes={defaultDateTime:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,dateDisplayFormat:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,dateStorageFormat:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string.isRequired,onChange:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func,name:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string,disabled:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.bool,dateValidation:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.object.isRequired,timeValidation:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.any,timeOfDayItems:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.string).isRequired},DateTime.defaultProps={onChange:void 0,name:"",disabled:!1,timeValidation:void 0},__webpack_exports__.a=DateTime},544:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_9_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_jquery__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_mailpoet__),__WEBPACK_IMPORTED_MODULE_12_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_12_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_prop_types__),datepickerTranslations={closeText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("close"),currentText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("today"),nextText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("next"),prevText:__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("previous"),monthNames:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("january"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("february"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("march"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("april"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("may"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("june"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("july"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("august"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("september"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("october"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("november"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("december")],monthNamesShort:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("januaryShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("februaryShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("marchShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("aprilShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("juneShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("julyShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("augustShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("septemberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("octoberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("novemberShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("decemberShort")],dayNames:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sunday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("monday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("friday"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturday")],dayNamesShort:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sundayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mondayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursdayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("fridayShort"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturdayShort")],dayNamesMin:[__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("sundayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("mondayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("tuesdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("wednesdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("thursdayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("fridayMin"),__WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.I18n.t("saturdayMin")]},DateText=function(_React$Component){function DateText(props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,DateText),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(DateText).call(this,props)),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"onChange",function(event){var changeEvent=event,displayDate=changeEvent.target.value,storageDate=_this.getStorageDate(displayDate);changeEvent.target.value=storageDate,_this.props.onChange(changeEvent)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getFieldName",function(){return _this.props.name||"date"}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getDisplayDate",function(date){var formatting={parseFormat:_this.props.storageFormat,format:_this.props.displayFormat};return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(date,formatting)}),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"getStorageDate",function(date){var formatting={parseFormat:_this.props.displayFormat,format:_this.props.storageFormat};return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(date,formatting)}),_this.dateInput=__WEBPACK_IMPORTED_MODULE_8_react___default.a.createRef(),_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(DateText,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(DateText,[{key:"componentDidMount",value:function(){var $element=__WEBPACK_IMPORTED_MODULE_9_jquery___default()(this.dateInput.current),that=this;$element.datepicker&&(__WEBPACK_IMPORTED_MODULE_9_jquery___default.a.datepicker.parseDate=function(format,value){return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.toDate(value,{parseFormat:this.props.displayFormat,format:format})},__WEBPACK_IMPORTED_MODULE_9_jquery___default.a.datepicker.formatDate=function(format,value){return __WEBPACK_IMPORTED_MODULE_11_mailpoet___default.a.Date.format(value,{format:format})},$element.datepicker(__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.extend({dateFormat:this.props.displayFormat,isRTL:!1,onSelect:function(value){that.onChange({target:{name:that.getFieldName(),value:value}})}},datepickerTranslations)),this.datepickerInitialized=!0)}},{key:"componentWillUnmount",value:function(){this.datepickerInitialized&&__WEBPACK_IMPORTED_MODULE_9_jquery___default()(this.dateInput.current).datepicker("destroy")}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("input",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({type:"text",size:"30",name:this.getFieldName(),value:this.getDisplayDate(this.props.value),readOnly:!0,disabled:this.props.disabled,onChange:this.onChange,ref:this.dateInput},this.props.validation))}}]),DateText}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);DateText.propTypes={displayFormat:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,onChange:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.func.isRequired,name:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string,storageFormat:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,value:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.bool.isRequired,validation:__WEBPACK_IMPORTED_MODULE_12_prop_types___default.a.object.isRequired},DateText.defaultProps={name:"date"},__webpack_exports__.a=DateText},545:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__=__webpack_require__(39),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),TimeSelect=function(_React$Component){function TimeSelect(){return __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,TimeSelect),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(TimeSelect).apply(this,arguments))}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(TimeSelect,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(TimeSelect,[{key:"render",value:function(){var _this=this,options=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_object_keys___default()(this.props.timeOfDayItems).map(function(value){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("option",{key:"option-".concat(_this.props.timeOfDayItems[value]),value:value},_this.props.timeOfDayItems[value])});return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("select",__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_extends___default()({name:this.props.name||"time",value:this.props.value,disabled:this.props.disabled,onChange:this.props.onChange},this.props.validation),options)}}]),TimeSelect}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);TimeSelect.propTypes={timeOfDayItems:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.objectOf(__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string).isRequired,name:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string,value:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string.isRequired,disabled:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.bool,onChange:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired,validation:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.object},TimeSelect.defaultProps={name:"time",disabled:!1,validation:{}},__webpack_exports__.a=TimeSelect},546:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_1_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_1_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_underscore__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_4_newsletters_types_notification_scheduling_jsx__=__webpack_require__(367),fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("postNotificationSubjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"options",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("selectFrequency"),type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_4_newsletters_types_notification_scheduling_jsx__.a},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segments"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentsTip"),type:"selection",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("selectSegmentPlaceholder"),id:"mailpoet_segments",api_version:window.mailpoet_api_version,endpoint:"segments",multiple:!0,filter:function(segment){return!segment.deleted_at},getLabel:function(segment){return"".concat(segment.name," (").concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(segment.subscribers,10).toLocaleString(),")")},transformChangedValue:function(segmentIds){var allSegments=this.getItems();return __WEBPACK_IMPORTED_MODULE_1_underscore___default.a.map(segmentIds,function(id){return __WEBPACK_IMPORTED_MODULE_1_underscore___default.a.find(allSegments,function(segment){return segment.id===id})})},validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("noSegmentsSelectedError")}},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=__WEBPACK_IMPORTED_MODULE_3_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(){return{value:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("activate")}}}},547:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_2_newsletters_types_welcome_scheduling_jsx__=__webpack_require__(319),fields=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("subjectLine"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("subjectLineTip"),type:"text",validation:{"data-parsley-required":!0,"data-parsley-required-message":__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("emptySubjectLineError")}},{name:"options",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sendWelcomeEmailWhen"),type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_2_newsletters_types_welcome_scheduling_jsx__.default},{name:"sender",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sender"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderTip"),fields:[{name:"sender_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderNamePlaceholder"),validation:{"data-parsley-required":!0}},{name:"sender_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("senderAddressPlaceholder"),validation:{"data-parsley-required":!0,"data-parsley-type":"email"}}]},{name:"reply-to",label:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyTo"),tip:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToTip"),inline:!0,fields:[{name:"reply_to_name",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToNamePlaceholder")},{name:"reply_to_address",type:"text",placeholder:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("replyToAddressPlaceholder"),validation:{"data-parsley-type":"email"}}]}];fields=__WEBPACK_IMPORTED_MODULE_1_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_3rd_step_fields",fields),__webpack_exports__.a={getFields:function(){return fields},getSendButtonOptions:function(){return{value:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("activate")}}}},560:function(module,__webpack_exports__,__webpack_require__){"use strict";function successPageClosed(){return __WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_congratulate_after_first_newsletter:!1}}).always(function(){window.location=window.mailpoet_main_page})}function renderSuccess(newsletter,testingPassed){return testingPassed&&__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Cron testing done",{"Cron is working":"true"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__success_jsx__.a,{illustrationImageUrl:window.mailpoet_congratulations_success_image,successClicked:successPageClosed,newsletter:newsletter})}function renderFail(){return __WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.trackEvent("Cron testing done",{"Cron is working":"false"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__fail_jsx__.a,{failClicked:function(){window.location=window.mailpoet_main_page}})}function renderLoading(showRichLoadingScreen){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__loading_jsx__.a,{illustrationImageUrl:window.mailpoet_congratulations_loading_image,successClicked:successPageClosed,showRichLoadingScreen:showRichLoadingScreen})}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_moment__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_9_moment___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_moment__),__WEBPACK_IMPORTED_MODULE_10__success_jsx__=__webpack_require__(561),__WEBPACK_IMPORTED_MODULE_11__fail_jsx__=__webpack_require__(562),__WEBPACK_IMPORTED_MODULE_12__loading_jsx__=__webpack_require__(563),Congratulate=function(_React$Component){function Congratulate(props){var _this;return __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,Congratulate),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(Congratulate).call(this,props)),_this.state={loading:!0,fail:!1,newsletter:null,testingPassed:!1,timeStart:__WEBPACK_IMPORTED_MODULE_9_moment___default()(),minimumLoadingTimePassed:!1},_this.tick=_this.tick.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(Congratulate,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(Congratulate,[{key:"componentDidMount",value:function(){this.loadNewsletter(this.props.match.params.id),this.tick()}},{key:"componentWillReceiveProps",value:function(props){this.loadNewsletter(props.match.params.id)}},{key:"tick",value:function(){__WEBPACK_IMPORTED_MODULE_9_moment___default()().subtract(20,"second").isAfter(this.state.timeStart)&&this.setState({error:!0,loading:!1}),this.state.loading&&this.loadNewsletter(this.props.match.params.id),__WEBPACK_IMPORTED_MODULE_9_moment___default()().subtract(6,"seconds").isAfter(this.state.timeStart)&&this.setState({minimumLoadingTimePassed:!0}),!this.state.loading&&this.state.minimumLoadingTimePassed||setTimeout(this.tick,2e3)}},{key:"loadNewsletter",value:function(id){var _this2=this;__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"get",data:{id:id}}).done(function(response){return _this2.newsletterLoaded(response.data)})}},{key:"newsletterLoaded",value:function(newsletter){"standard"!==newsletter.type||"scheduled"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,minimumLoadingTimePassed:!0}):"sent"===newsletter.status||"sending"===newsletter.status?this.setState({newsletter:newsletter,loading:!1,testingPassed:!0}):this.setState({newsletter:newsletter})}},{key:"renderContent",value:function(){return this.state.loading||!this.state.minimumLoadingTimePassed?renderLoading(!!this.state.newsletter):this.state.error?renderFail():renderSuccess(this.state.newsletter,this.state.testingPassed)}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"newsletter_congratulate_page"},this.renderContent())}}]),Congratulate}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);Congratulate.propTypes={match:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.a=Congratulate},561:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderHeader(newsletter){return"welcome"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsWelcomeEmailSuccessHeader"):"notification"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsPostNotificationSuccessHeader"):"automatic"===newsletter.type?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsWooSuccessHeader"):"scheduled"===newsletter.status?__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsScheduleSuccessHeader"):__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsSendSuccessHeader")}function Success(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_congratulate_success"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,renderHeader(props.newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:props.illustrationImageUrl,alt:"",width:"750",height:"250"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("button",{className:"button",onClick:props.successClicked},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("close")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__);Success.propTypes={successClicked:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,illustrationImageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,newsletter:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,type:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired}).isRequired},__webpack_exports__.a=Success},562:function(module,__webpack_exports__,__webpack_require__){"use strict";function Fail(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_centered"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("congratulationsSendFailHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("congratulationsSendFailExplain"),/\[link\](.*?)\[\/link\]/g,function(match,i){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{key:i,target:"_blank",rel:"noopener noreferrer",href:"https://kb.mailpoet.com/article/231-sending-does-not-work"},match)})),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("button",{className:"button",onClick:props.failClicked},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("close")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_string_replace__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__);Fail.propTypes={failClicked:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired},__webpack_exports__.a=Fail},563:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderRichData(showRichData,illustrationImageUrl){return showRichData?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",{className:"mailpoet_newsletter_loading_header"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("congratulationsLoadingHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:illustrationImageUrl,alt:"",width:"800px",height:"266px"})):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null)}function Loading(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_newsletter_loading"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_loading_jsx__.a,null),renderRichData(props.showRichLoadingScreen,props.illustrationImageUrl))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_loading_jsx__=__webpack_require__(564);Loading.propTypes={illustrationImageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,showRichLoadingScreen:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool.isRequired},__webpack_exports__.a=Loading},564:function(module,__webpack_exports__,__webpack_require__){"use strict";function Loading(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_loading"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_1"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_2"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"mailpoet_modal_loading mailpoet_modal_loading_3"}))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);__webpack_exports__.a=Loading},565:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11_react_router_dom__=__webpack_require__(14),NewsletterStandard=function(_React$Component){function NewsletterStandard(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterStandard);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterStandard)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"showTemplateSelection",function(newsletterId){_this.props.history.push("/template/".concat(newsletterId))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterStandard,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterStandard,[{key:"componentDidMount",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:{type:"standard"}}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("regularNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default.a,{step:"type"}))}}]),NewsletterStandard}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterStandard,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_11_react_router_dom__.f)(NewsletterStandard)},566:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_11_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_underscore__),__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__=__webpack_require__(367),__WEBPACK_IMPORTED_MODULE_13_react_router_dom__=__webpack_require__(14),field={name:"options",type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__.a},NewsletterNotification=function(_React$Component){function NewsletterNotification(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterNotification);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterNotification)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"state",{options:{intervalType:"daily",timeOfDay:0,weekDay:1,monthDay:0,nthWeekDay:1}}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleValueChange",function(event){var state=_this.state;state[event.target.name]=event.target.value,_this.setState(state)}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"handleNext",function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:__WEBPACK_IMPORTED_MODULE_11_underscore___default.a.extend({},_this.state,{type:"notification",subject:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("draftPostNotificationTitle")})}).done(function(response){_this.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"showTemplateSelection",function(newsletterId){_this.props.history.push("/template/".concat(newsletterId))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterNotification,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterNotification,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("postNotificationNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_newsletters_breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("h3",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("selectFrequency")),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_newsletters_types_notification_scheduling_jsx__.a,{item:this.state,field:field,onValueChange:this.handleValueChange}),__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("next")})))}}]),NewsletterNotification}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component);__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(NewsletterNotification,"propTypes",{history:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func.isRequired}).isRequired}),__webpack_exports__.a=Object(__WEBPACK_IMPORTED_MODULE_13_react_router_dom__.f)(NewsletterNotification)},567:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_6_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__),__WEBPACK_IMPORTED_MODULE_7_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_7_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_underscore__),__WEBPACK_IMPORTED_MODULE_8_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_8_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mailpoet__),__WEBPACK_IMPORTED_MODULE_9_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_9_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_prop_types__),__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx__=__webpack_require__(35),__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx__),__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__=__webpack_require__(319),field={name:"options",label:"Event",type:"reactComponent",component:__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__.default},NewsletterWelcome=function(_React$Component){function NewsletterWelcome(props){var _this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,NewsletterWelcome),_this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(NewsletterWelcome).call(this,props));var availableSegments=window.mailpoet_segments||[],defaultSegment=1;return availableSegments=availableSegments.filter(function(segment){return"default"===segment.type}),__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.size(availableSegments)>0&&(defaultSegment=__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.first(availableSegments).id),_this.state={options:{event:"segment",segment:defaultSegment,role:"subscriber",afterTimeNumber:1,afterTimeType:"immediate"}},_this.handleValueChange=_this.handleValueChange.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.handleNext=_this.handleNext.bind(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(NewsletterWelcome,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(NewsletterWelcome,[{key:"handleValueChange",value:function(event){var state=this.state;state[event.target.name]=event.target.value,this.setState(state)}},{key:"handleNext",value:function(){var _this2=this;__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"create",data:__WEBPACK_IMPORTED_MODULE_7_underscore___default.a.extend({},this.state,{type:"welcome",subject:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("draftNewsletterTitle")})}).done(function(response){_this2.showTemplateSelection(response.data.id)}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"showTemplateSelection",value:function(newsletterId){this.props.history.push("/template/".concat(newsletterId))}},{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("welcomeNewsletterTypeTitle")),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__breadcrumb_jsx___default.a,{step:"type"}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("h3",null,__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("selectEventToSendWelcomeEmail")),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__scheduling_jsx__.default,{item:this.state,field:field,onValueChange:this.handleValueChange}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"submit"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("input",{className:"button button-primary",type:"button",onClick:this.handleNext,value:__WEBPACK_IMPORTED_MODULE_8_mailpoet___default.a.I18n.t("next")})))}}]),NewsletterWelcome}(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);NewsletterWelcome.propTypes={history:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_9_prop_types___default.a.func.isRequired}).isRequired},__webpack_exports__.a=NewsletterWelcome},568:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_2_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__),__WEBPACK_IMPORTED_MODULE_3_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_mailpoet__),__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_5_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_5_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__),__WEBPACK_IMPORTED_MODULE_6_common_confirm_alert_jsx__=__webpack_require__(366),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__=__webpack_require__(202),mailpoetTrackingEnabled=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__),!!window.mailpoet_tracking_enabled),messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(message)}},columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("status")},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("lists")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("sentOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],confirmEdit=function(newsletter){var redirectToEditing=function(){window.location.href="?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)};newsletter.queue&&"sending"===newsletter.status&&null===newsletter.queue.status?Object(__WEBPACK_IMPORTED_MODULE_6_common_confirm_alert_jsx__.a)({message:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("confirmEdit"),onConfirm:redirectToEditing}):redirectToEditing()},newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("preview"))}},{name:"edit",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("edit"),onClick:confirmEdit},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}];__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_standard_actions",__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_4_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_standard_actions",newsletterActions);var NewsletterListStandard=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListStandard",propTypes:{location:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.QueueMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=__WEBPACK_IMPORTED_MODULE_2_classnames___default()("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"javascript:;",onClick:function(){return confirmEdit(newsletter)}},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("sentOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,newsletter.sent_at?__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.Date.format(newsletter.sent_at):__WEBPACK_IMPORTED_MODULE_3_mailpoet___default.a.I18n.t("notSentYet"))))},render:function(){var _this=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default.a,{tab:"standard"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"standard",base_url:"standard",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListStandard},569:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_2_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__),__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__=__webpack_require__(202),__WEBPACK_IMPORTED_MODULE_8_classnames__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__),__webpack_require__(13)),__WEBPACK_IMPORTED_MODULE_8_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_10_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_underscore__),__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks__),mailpoetRoles=window.mailpoet_roles||{},mailpoetSegments=window.mailpoet_segments||{},mailpoetTrackingEnabled=!!window.mailpoet_tracking_enabled,messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("status"),width:145},{name:"settings",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("settings")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("preview"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"edit",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))}},{name:"trash"}];__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_welcome_notification_actions",__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_11_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_welcome_notification_actions",newsletterActions);var NewsletterListWelcome=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListWelcome",propTypes:{location:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_7_newsletters_listings_mixins_jsx__.CronMixin],updateStatus:function(e){var _this=this;e.persist(),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEmailActivated")),_this.forceUpdate()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEmailActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){var totalSentMessage=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sentToXSubscribers").replace("%$1d",newsletter.total_sent.toLocaleString()),totalScheduledMessage=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("scheduledToXSubscribers").replace("%$1d",newsletter.total_scheduled.toLocaleString());return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"active"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("active")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"draft"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("inactive")))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,totalSentMessage," ",__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("br",null),totalScheduledMessage))},renderSettings:function(newsletter){var sendingEvent,sendingDelay,segment;switch(newsletter.options.event){case"user":sendingEvent="mailpoet_all"===newsletter.options.role?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventWPUserAnyRole"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventWPUserWithRole").replace("%$1s",mailpoetRoles[newsletter.options.role]);break;default:if(void 0===(segment=__WEBPACK_IMPORTED_MODULE_10_underscore___default.a.find(mailpoetSegments,function(seg){return Number(seg.id)===Number(newsletter.options.segment)})))return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"mailpoet_error"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingToSegmentsNotSpecified"));sendingEvent=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("welcomeEventSegment").replace("%$1s",segment.name)}if(sendingEvent&&"immediate"!==newsletter.options.afterTimeType){switch(newsletter.options.afterTimeType){case"hours":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayHours").replace("%$1d",newsletter.options.afterTimeNumber);break;case"days":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayDays").replace("%$1d",newsletter.options.afterTimeNumber);break;case"weeks":sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayWeeks").replace("%$1d",newsletter.options.afterTimeNumber);break;default:sendingDelay=__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("sendingDelayInvalid")}sendingEvent+=" [".concat(sendingDelay,"].")}return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",null,sendingEvent)},renderItem:function(newsletter,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_8_classnames___default()("manage-column","column-primary","has-row-actions");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("status")},this.renderStatus(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("settings")},this.renderSettings(newsletter)),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,newsletter.total_sent>0&&newsletter.statistics)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_newsletters_listings_tabs_jsx___default.a,{tab:"welcome"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"welcome",base_url:"welcome",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListWelcome},570:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_3_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__),__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__=__webpack_require__(202),__WEBPACK_IMPORTED_MODULE_9_classnames__=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__),__webpack_require__(13)),__WEBPACK_IMPORTED_MODULE_9_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__=__webpack_require__(320),messages=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__),{onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterTrashed"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterDeleted"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("oneNewsletterRestored"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("multipleNewslettersRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(message)}}),columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("subject"),sortable:!0},{name:"status",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status"),width:100},{name:"settings",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("settings")},{name:"history",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("history"),width:100},{name:"updated_at",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn"),sortable:!0}],bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("preview"))}},{name:"edit",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("edit"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("duplicate"),onClick:function(newsletter,refresh){return __WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"duplicate",data:{id:newsletter.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("newsletterDuplicated").replace("%$1s",response.data.subject)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],NewsletterListNotification=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListNotification",propTypes:{location:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_mixins_jsx__.CronMixin],updateStatus:function(e){var _this=this;e.persist(),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"newsletters",action:"setStatus",data:{id:Number(e.target.getAttribute("data-id")),status:e.target.value}}).done(function(response){"active"===response.data.status&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationActivated")),_this.forceUpdate()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("postNotificationActivationFailed")),e.target.value=response.status})},renderStatus:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("select",{"data-id":newsletter.id,defaultValue:newsletter.status,onChange:this.updateStatus},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"active"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("active")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("option",{value:"draft"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("inactive")))},renderSettings:function(newsletter){var sendingFrequency,segments=newsletter.segments.map(function(segment){return segment.name}),sendingToSegments=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("ifNewContentToSegments").replace("%$1s",segments.join(", "));if(0===segments.length)return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",{className:"mailpoet_error"},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendingToSegmentsNotSpecified"));switch(newsletter.options.intervalType){case"daily":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendDaily").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"weekly":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendWeekly").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues[newsletter.options.weekDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"monthly":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendMonthly").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.monthDayValues[newsletter.options.monthDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"nthWeekDay":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendNthWeekDay").replace("%$1s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.nthWeekDayValues[newsletter.options.nthWeekDay]).replace("%$2s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.weekDayValues[newsletter.options.weekDay]).replace("%$3s",__WEBPACK_IMPORTED_MODULE_11_newsletters_scheduling_common_jsx__.timeOfDayValues[newsletter.options.timeOfDay]);break;case"immediately":sendingFrequency=__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("sendImmediately");break;default:sendingFrequency="Invalid sending frequency"}return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span",null,sendingFrequency," ",sendingToSegments)},renderHistoryLink:function(newsletter){return 0===Number(newsletter.children_count)?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("notSentYet"):__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{"data-automation-id":"history-".concat(newsletter.id),to:"/notification/history/".concat(newsletter.id)},__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("viewHistory"))},renderItem:function(newsletter,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_9_classnames___default()("manage-column","column-primary","has-row-actions");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{className:"row-title",href:"?page=mailpoet-newsletter-editor&id=".concat(newsletter.id)},newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("status")},this.renderStatus(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("settings")},this.renderSettings(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("history")},this.renderHistoryLink(newsletter)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("lastModifiedOn")},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Date.format(newsletter.updated_at))))},render:function(){var _this2=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_newsletters_listings_tabs_jsx___default.a,{tab:"notification"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification",base_url:"notification",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:newsletterActions,messages:messages,auto_refresh:!0,sort_by:"updated_at",sort_order:"desc",afterGetItems:function(state){_this2.checkMailerStatus(state),_this2.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListNotification},571:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_create_react_class__=__webpack_require__(55),__WEBPACK_IMPORTED_MODULE_1_create_react_class___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_3_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks__=__webpack_require__(23),__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks__),__WEBPACK_IMPORTED_MODULE_6_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_6_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx__),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__=__webpack_require__(201),__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx__),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__=__webpack_require__(203),__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx__),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__=__webpack_require__(204),__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx__),__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__=__webpack_require__(202),mailpoetTrackingEnabled=(__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__),!!window.mailpoet_tracking_enabled),columns=[{name:"subject",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("subject")},{name:"status",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("status")},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("lists")},{name:"statistics",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("statistics"),display:mailpoetTrackingEnabled},{name:"sent_at",label:__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("sentOn")}],newsletterActions=[{name:"view",link:function(newsletter){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("preview"))}}];__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default.a.addFilter("mailpoet_newsletters_listings_notification_history_actions",__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin.addStatsCTAAction),newsletterActions=__WEBPACK_IMPORTED_MODULE_5_wp_js_hooks___default.a.applyFilters("mailpoet_newsletters_listings_notification_history_actions",newsletterActions);var NewsletterListNotificationHistory=__WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({displayName:"NewsletterListNotificationHistory",propTypes:{location:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object}).isRequired},mixins:[__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.QueueMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.StatisticsMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.MailerMixin,__WEBPACK_IMPORTED_MODULE_11_newsletters_listings_mixins_jsx__.CronMixin],renderItem:function(newsletter,actions,meta){var rowClasses=__WEBPACK_IMPORTED_MODULE_3_classnames___default()("manage-column","column-primary","has-row-actions"),segments=newsletter.segments.map(function(segment){return segment.name}).join(", ");return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{href:newsletter.preview_url,target:"_blank"},newsletter.queue.newsletter_rendered_subject||newsletter.subject)),actions),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("status")},this.renderQueueStatus(newsletter,meta.mta_log)),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("lists")},segments),!0===mailpoetTrackingEnabled?__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("statistics")},this.renderStatistics(newsletter,void 0,meta.current_time)):null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("sentOn")},newsletter.sent_at?__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Date.format(newsletter.sent_at):__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("notSentYet")))},render:function(){var _this=this;return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_newsletters_listings_heading_jsx___default.a,null),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10_announcements_feature_announcement_jsx___default.a,{hasNews:window.mailpoet_feature_announcement_has_news}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_newsletters_listings_tabs_jsx___default.a,{tab:"notification"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.b,{className:"page-title-action",to:"/notification"},__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.I18n.t("backToPostNotifications")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,endpoint:"newsletters",type:"notification_history",base_url:"notification/history/:parent_id",onRenderItem:this.renderItem,columns:columns,item_actions:newsletterActions,auto_refresh:!0,sort_by:"sent_at",sort_order:"desc",afterGetItems:function(state){_this.checkMailerStatus(state),_this.checkCronStatus(state)}}))}});__webpack_exports__.a=NewsletterListNotificationHistory},572:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_segments_list_jsx__=__webpack_require__(573),__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx__=__webpack_require__(574),__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx__),container=document.getElementById("segments_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/new",component:__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/edit/:id",component:__WEBPACK_IMPORTED_MODULE_4_segments_form_jsx___default.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3_segments_list_jsx__.a}))),container)},573:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_10_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx__),columns=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("name"),sortable:!0},{name:"description",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("description")},{name:"subscribed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subscribed")},{name:"unconfirmed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unconfirmed")},{name:"unsubscribed",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unsubscribed")},{name:"bounced",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("bounced")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneSegmentRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleSegmentsRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{to:"/edit/".concat(item.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))},display:function(segment){return"wp_users"!==segment.type}},{name:"duplicate_segment",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(item,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"duplicate",data:{id:item.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("listDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"!==segment.type}},{name:"read_more",link:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"http://docs.mailpoet.com/article/133-the-wordpress-users-list",target:"_blank",rel:"noopener noreferrer"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("readMore"))},display:function(segment){return"wp_users"===segment.type}},{name:"synchronize_segment",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("forceSync"),onClick:function(item,refresh){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!0),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"segments",action:"synchronize"}).done(function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!1),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("listSynchronized").replace("%$1s",item.name)),refresh()}).fail(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Modal.loading(!1),response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})},display:function(segment){return"wp_users"===segment.type}},{name:"view_subscribers",link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:item.subscribers_url},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("viewSubscribers"))}},{name:"trash",display:function(segment){return"wp_users"!==segment.type}}],SegmentList=function(_React$Component){function SegmentList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,SegmentList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(SegmentList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(segment,actions){var segmentName,rowClasses=__WEBPACK_IMPORTED_MODULE_10_classnames___default()("manage-column","column-primary","has-row-actions"),subscribed=Number(segment.subscribers_count.subscribed||0),unconfirmed=Number(segment.subscribers_count.unconfirmed||0),unsubscribed=Number(segment.subscribers_count.unsubscribed||0),bounced=Number(segment.subscribers_count.bounced||0);return segmentName="wp_users"===segment.type?__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("span",{className:"row-title"},segment.name):__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"row-title",to:"/edit/".concat(segment.id)},segment.name),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,segmentName),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("description")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,segment.description)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("subscribed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,subscribed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unconfirmed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,unconfirmed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("unsubscribed")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,unsubscribed.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("bounced")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,bounced.toLocaleString())),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(segment.created_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(SegmentList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(SegmentList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8_react_router_dom__.b,{className:"page-title-action",to:"/new"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("new"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"segments",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions,sort_by:"name",sort_order:"asc"}))}}]),SegmentList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);SegmentList.propTypes={location:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object}).isRequired},__webpack_exports__.a=SegmentList},574:function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Form=__webpack_require__(575)}).call(exports,__webpack_require__(11))},575:function(module,__webpack_exports__,__webpack_require__){"use strict";Object.defineProperty(__webpack_exports__,"__esModule",{value:!0});var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_form_form_jsx__=__webpack_require__(217),__WEBPACK_IMPORTED_MODULE_3_form_form_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_form_form_jsx__),__WEBPACK_IMPORTED_MODULE_4_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_4_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__),fields=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("name"),type:"text"},{name:"description",label:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("description"),type:"textarea",tip:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentDescriptionTip")}],messages={onUpdate:function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentUpdated"))},onCreate:function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segmentAdded")),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.trackEvent("Lists > Add new",{"MailPoet Free version":window.mailpoet_version})}},SegmentForm=function(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("segment"),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_react_router_dom__.b,{className:"page-title-action",to:"/"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("backToList"))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_form_form_jsx___default.a,{endpoint:"segments",fields:fields,params:props.match.params,messages:messages}))};SegmentForm.propTypes={match:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.shape({id:__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string}).isRequired}).isRequired},__webpack_exports__.default=SegmentForm},576:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3__list_jsx__=__webpack_require__(577),container=document.getElementById("forms_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"*",component:__WEBPACK_IMPORTED_MODULE_3__list_jsx__.a})),container)},577:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__=__webpack_require__(16),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty__),__WEBPACK_IMPORTED_MODULE_7_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_7_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react__),__WEBPACK_IMPORTED_MODULE_8_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_8_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_10_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_jquery__),__WEBPACK_IMPORTED_MODULE_11_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_11_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_prop_types__),__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx__=__webpack_require__(41),__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx__),columns=[{name:"name",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("formName"),sortable:!0},{name:"segments",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("segments")},{name:"signups",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("signups")},{name:"created_at",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn"),sortable:!0}],messages={onTrash:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormTrashed"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsTrashed").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onDelete:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormDeleted"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsDeleted").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)},onRestore:function(response){var count=Number(response.meta.count),message=null;message=1===count?__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("oneFormRestored"):__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("multipleFormsRestored").replace("%$1d",count.toLocaleString()),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(message)}},bulkActions=[{name:"trash",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("moveToTrash"),onSuccess:messages.onTrash}],itemActions=[{name:"edit",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"),link:function(item){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{href:"admin.php?page=mailpoet-form-editor&id=".concat(item.id)},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("edit"))}},{name:"duplicate",label:__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("duplicate"),onClick:function(item,refresh){return __WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"duplicate",data:{id:item.id}}).done(function(response){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.success(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("formDuplicated").replace("%$1s",response.data.name)),refresh()}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{name:"trash"}],FormList=function(_React$Component){function FormList(){var _getPrototypeOf2,_this;__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_classCallCheck___default()(this,FormList);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,(_getPrototypeOf2=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_getPrototypeOf___default()(FormList)).call.apply(_getPrototypeOf2,[this].concat(args))),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"createForm",function(){__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"forms",action:"create"}).done(function(response){window.location=window.mailpoet_form_edit_url+response.data.id}).fail(function(response){response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_defineProperty___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this)),"renderItem",function(form,actions){var rowClasses=__WEBPACK_IMPORTED_MODULE_8_classnames___default()("manage-column","column-primary","has-row-actions"),segments=window.mailpoet_segments.filter(function(segment){return-1!==__WEBPACK_IMPORTED_MODULE_10_jquery___default.a.inArray(segment.id,form.segments)}).map(function(segment){return segment.name}).join(", ");return"user"===form.settings.segments_selected_by&&(segments="".concat(__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("userChoice")," ").concat(segments)),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:rowClasses},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("strong",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"row-title",href:"admin.php?page=mailpoet-form-editor&id=".concat(form.id)},form.name)),actions),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("segments")},segments),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("signups")},form.signups),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("td",{className:"column-date","data-colname":__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("createdOn")},__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("abbr",null,__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Date.format(form.created_at))))}),_this}return __WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_inherits___default()(FormList,_React$Component),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_createClass___default()(FormList,[{key:"render",value:function(){return __WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("h1",{className:"title"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("pageTitle")," ",__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement("a",{className:"page-title-action",href:"javascript:;",onClick:this.createForm,"data-automation-id":"create_new_form"},__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.I18n.t("new"))),__WEBPACK_IMPORTED_MODULE_7_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__listing_listing_jsx___default.a,{limit:window.mailpoet_listing_per_page,location:this.props.location,params:this.props.match.params,messages:messages,search:!1,endpoint:"forms",onRenderItem:this.renderItem,columns:columns,bulk_actions:bulkActions,item_actions:itemActions}))}}]),FormList}(__WEBPACK_IMPORTED_MODULE_7_react___default.a.Component);FormList.propTypes={location:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object.isRequired,match:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_11_prop_types___default.a.object}).isRequired},__webpack_exports__.a=FormList},578:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(30),__webpack_require__(5),__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,jQuery,mp){var MailPoet=mp;0!==jQuery("#mailpoet_settings").length&&(MailPoet.Router=new(Backbone.Router.extend({routes:{"":"defaultRoute","mta(/:group)":"sendingMethodGroup","(:tab)":"tabs"},defaultRoute:function(){this.tabs("basics")},sendingMethodGroup:function(group){this.tabs("mta"),jQuery("#mailpoet_sending_method_setup, .mailpoet_sending_method").hide(),jQuery(".mailpoet_settings_submit").hide(),null===group?jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").fadeIn():(jQuery("#mailpoet_mta_spf")["mailpoet"===group?"hide":"show"](),jQuery(".mailpoet_sending_methods, .mailpoet_sending_methods_help").hide(),jQuery('.mailpoet_sending_method[data-group="'+group+'"]').show(),jQuery("#mailpoet_sending_method_setup").fadeIn())},tabs:function(tab){jQuery(".nav-tab-wrapper a").removeClass("nav-tab-active"),jQuery(".mailpoet_tab_panel, .mailpoet_section").hide(),jQuery('a.nav-tab[href="#'+tab+'"]').addClass("nav-tab-active").blur(),jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').length>0&&jQuery('.mailpoet_tab_panel[data-tab="'+tab+'"]').show(),jQuery(".mailpoet_settings_submit").show(),MailPoet.trackEvent("User has clicked a tab in Settings",{"MailPoet Free version":window.mailpoet_version,"Tab ID":tab})}})),jQuery(document).ready(function(){Backbone.History.started||Backbone.history.start()}))}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},580:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3_help_knowledge_base_jsx__=__webpack_require__(581),__WEBPACK_IMPORTED_MODULE_4_help_system_info_jsx__=__webpack_require__(582),__WEBPACK_IMPORTED_MODULE_5_help_system_status_jsx__=__webpack_require__(583),__WEBPACK_IMPORTED_MODULE_6_help_your_privacy_jsx__=__webpack_require__(589),container=document.getElementById("help_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.e,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.c,{to:"/knowledgeBase"})}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/knowledgeBase",component:__WEBPACK_IMPORTED_MODULE_3_help_knowledge_base_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/systemStatus",component:__WEBPACK_IMPORTED_MODULE_5_help_system_status_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/systemInfo",component:__WEBPACK_IMPORTED_MODULE_4_help_system_info_jsx__.a}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/yourPrivacy",component:__WEBPACK_IMPORTED_MODULE_6_help_your_privacy_jsx__.a}))),container)},581:function(module,__webpack_exports__,__webpack_require__){"use strict";function KnowledgeBase(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__.a,{tab:"knowledgeBase"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("knowledgeBaseIntro")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("ul",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/116-common-problems"},"Common Problems")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/165-newsletters"},"Newsletters")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/156-migration-questions"},"Migration Questions")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/149-sending-methods"},"Sending Methods")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/139-subscription-forms"},"Subscription Forms")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/114-getting-started"},"Getting Started")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/123-newsletter-designer"},"Newsletter Designer")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("li",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/category/121-subscribers-and-lists"},"Subscribers and Lists"))),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"http://beta.docs.mailpoet.com/",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("knowledgeBaseButton")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=KnowledgeBase},582:function(module,__webpack_exports__,__webpack_require__){"use strict";function handleFocus(event){event.target.select()}function printData(data){if(__WEBPACK_IMPORTED_MODULE_3_underscore___default.a.isObject(data)){var printableData=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys___default()(data).map(function(key){return"".concat(key,": ").concat(data[key])});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("textarea",{readOnly:!0,onFocus:handleFocus,value:printableData.join("\n"),style:{width:"100%",height:"400px"}})}return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("systemInfoDataError"))}function SystemInfo(){var systemInfoData=window.systemInfoData;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tabs_jsx__.a,{tab:"systemInfo"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("systemInfoIntro"))),printData(systemInfoData))}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys__=__webpack_require__(40),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_keys__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_underscore__=__webpack_require__(4),__WEBPACK_IMPORTED_MODULE_3_underscore___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_underscore__),__WEBPACK_IMPORTED_MODULE_4__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=SystemInfo},583:function(module,__webpack_exports__,__webpack_require__){"use strict";function renderStatusMessage(status,error,link){var noticeType=status?"success":"error",noticeMessage=status?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusConnectionSuccessful"):"".concat(__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusConnectionUnsuccessful")," ").concat(error);return link&&(noticeMessage=__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default()(noticeMessage,/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:"".concat(link),key:"kb-link"},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline notice-".concat(noticeType),style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,noticeMessage))}function renderCronSection(data){var status=data.cron.isReachable,url=data.cron.url;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{href:url,target:"_blank"},url)),renderStatusMessage(status,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronConnectionUnsuccessfulInfo"),"//beta.docs.mailpoet.com/article/231-sending-does-not-work"))}function renderMSSSection(data){if(data.mss.enabled){var status=data.mss.enabled.isReachable;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusMSSTitle")),renderStatusMessage(status,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusMSSConnectionUnsuccessfulInfo"),!1))}}function SystemStatus(){var systemStatusData=window.systemStatusData;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5__tabs_jsx__.a,{tab:"systemStatus"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_notice notice inline",style:{marginTop:"1em"}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,systemStatusData.mss.enabled?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusIntroCronMSS"):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusIntroCron"))),renderCronSection(systemStatusData),renderMSSSection(systemStatusData),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__cron_status_jsx__.a,{status_data:systemStatusData.cronStatus}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__queue_status_jsx__.a,{status_data:systemStatusData.queueStatus}))}var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_2_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_string_replace__),__WEBPACK_IMPORTED_MODULE_3__cron_status_jsx__=__webpack_require__(584),__WEBPACK_IMPORTED_MODULE_4__queue_status_jsx__=__webpack_require__(586),__WEBPACK_IMPORTED_MODULE_5__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=SystemStatus},584:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__=__webpack_require__(373),__WEBPACK_IMPORTED_MODULE_4_common_print_boolean_jsx__=__webpack_require__(585),CronStatus=function(props){var status=props.status_data,activeStatusMapping={active:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("running"),inactive:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("cronWaiting")};return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusCronStatusTitle")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__.a,{max_width:"400px",rows:[{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("accessible"),value:__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_common_print_boolean_jsx__.a,null,status.accessible)},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("status"),value:activeStatusMapping[status.status]?activeStatusMapping[status.status]:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastUpdated"),value:status.updated_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.updated_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastRunStarted"),value:status.run_accessed_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.run_started_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastRunCompleted"),value:status.run_completed_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.run_completed_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("lastSeenError"),value:status.last_error||__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")}]}))};CronStatus.propTypes={status_data:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({accessible:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool,status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,updated_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,run_accessed_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,run_completed_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number}).isRequired},CronStatus.defaultProps={status_data:{accessible:null,status:null,updated_at:null,run_accessed_at:null,run_completed_at:null}},__webpack_exports__.a=CronStatus},585:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),PrintBoolean=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",null,!0===props.children&&props.truthy||!1===props.children&&props.falsy||props.unknown)};PrintBoolean.propTypes={truthy:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,falsy:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,unknown:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,children:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool},PrintBoolean.defaultProps={truthy:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("yes"),falsy:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("no"),unknown:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("unknown"),children:null},__webpack_exports__.a=PrintBoolean},586:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__=__webpack_require__(373),__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__=__webpack_require__(587),__WEBPACK_IMPORTED_MODULE_5__tasks_list_tasks_list_data_row_jsx__=__webpack_require__(374),QueueStatus=function(props){var status=props.status_data;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("systemStatusQueueTitle")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_common_key_value_table_jsx__.a,{max_width:"400px",rows:[{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("status"),value:"paused"===status.status?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("paused"):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("running")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("startedAt"),value:status.started?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.started):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("unknown")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("sentEmails"),value:status.sent||0},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("retryAttempt"),value:status.retry_attempt||__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("retryAt"),value:status.retry_at?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.Date.full(1e3*status.retry_at):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("error"),value:status.error?status.error.error_message:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("none")},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalCompletedTasks"),value:status.tasksStatusCounts.completed},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalRunningTasks"),value:status.tasksStatusCounts.running},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalPausedTasks"),value:status.tasksStatusCounts.paused},{key:__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("totalScheduledTasks"),value:status.tasksStatusCounts.scheduled}]}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("scheduledTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{show_scheduled_at:!0,tasks:status.latestTasks.filter(function(task){return"scheduled"===task.status})}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("runningTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{tasks:status.latestTasks.filter(function(task){return null===task.status})}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h4",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("completedTasks")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_tasks_list_jsx__.a,{tasks:status.latestTasks.filter(function(task){return"completed"===task.status})}))};QueueStatus.propTypes={status_data:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({status:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,started:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,sent:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,retry_attempt:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,retry_at:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number,error:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({operation:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string,error_message:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string}),tasksStatusCounts:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.shape({completed:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,running:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,paused:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,scheduled:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired}).isRequired,latestTasks:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5__tasks_list_tasks_list_data_row_jsx__.a.propTypes.task).isRequired}).isRequired},QueueStatus.defaultProps={status_data:{status:null,started:null,sent:null,retry_attempt:null,retry_at:null,error:null}},__webpack_exports__.a=QueueStatus},587:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__=__webpack_require__(374),__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__=__webpack_require__(588),TasksList=function(props){var colsCount=props.show_scheduled_at?6:5;return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("table",{className:"widefat fixed striped"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("thead",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__.a,{show_scheduled_at:props.show_scheduled_at})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tbody",null,props.tasks.length?props.tasks.map(function(task){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__.a,{key:task.id,task:task,show_scheduled_at:props.show_scheduled_at})}):__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",{className:"no-items"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("td",{colSpan:colsCount},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("nothingToShow")))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tfoot",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__tasks_list_labels_row_jsx__.a,{show_scheduled_at:props.show_scheduled_at})))};TasksList.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,tasks:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_3__tasks_list_data_row_jsx__.a.propTypes.task).isRequired},TasksList.defaultProps={show_scheduled_at:!1},__webpack_exports__.a=TasksList},588:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),TasksListLabelsRow=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("tr",null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},"Id"),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("type")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("email")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("priority")),props.show_scheduled_at?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("scheduledAt")):null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("th",{className:"row-title"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("updatedAt")))};TasksListLabelsRow.propTypes={show_scheduled_at:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool},TasksListLabelsRow.defaultProps={show_scheduled_at:!1},__webpack_exports__.a=TasksListLabelsRow},589:function(module,__webpack_exports__,__webpack_require__){"use strict";function YourPrivacy(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__.a,{tab:"yourPrivacy"}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent1")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent2")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyContent3")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:"https://www.mailpoet.com/privacy-notice/",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.I18n.t("yourPrivacyButton")))}var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2__tabs_jsx__=__webpack_require__(225);__webpack_exports__.a=YourPrivacy},590:function(module,__webpack_exports__,__webpack_require__){"use strict";function Intro(){if(!(introActive||innerWidth<=960)){var intro=__WEBPACK_IMPORTED_MODULE_1_intro_js___default()();intro.setOptions({steps:introSteps,nextLabel:"".concat(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introNext")," →"),prevLabel:"← ".concat(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introBack")),skipLabel:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introSkip"),doneLabel:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introDone"),positionPrecedence:["right","left","bottom","top"],buttonClass:"button",hidePrev:!0,hideNext:!0,helperElementPadding:12,scrollToElement:!1,showStepNumbers:!1,tooltipPosition:"auto"}),intro.onbeforechange(function(){var step=intro._currentStep,element=introSteps[step].element;intro._introItems[step].element="string"==typeof element?document.querySelector(element):element}),intro.onafterchange(function(targetElement){if("fixed"===getComputedStyle(targetElement).getPropertyValue("position")){var helperLayer=document.querySelector(".introjs-helperLayer"),referenceLayer=document.querySelector(".introjs-tooltipReferenceLayer");referenceLayer.style.top="".concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(referenceLayer.style.top,10)-pageYOffset,"px"),helperLayer.style.top="".concat(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default()(helperLayer.style.top,10)-pageYOffset,"px")}}),intro.onexit(function(){introActive=!1,document.body.classList.remove("mailpoet-intro-active")}),intro.onskip(function(){__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{show_intro:0}})}),intro.start(),introActive=!0,document.body.classList.add("mailpoet-intro-active")}}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_1_intro_js__=__webpack_require__(591),__WEBPACK_IMPORTED_MODULE_1_intro_js___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_intro_js__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),introSteps=[{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-segments]").parentNode,intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introLists")},{element:document.querySelector("#toplevel_page_mailpoet-newsletters > ul > li > a[href*=mailpoet-forms]").parentNode,intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introForms")},{element:"#hs-beacon:not(.hs-beacon-hidden) iframe, .olark-launch-button",intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introChat")},{element:"#mailpoet-new-email",intro:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("introEmails")}],introActive=!1;__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.showIntro=Intro},591:function(module,exports,__webpack_require__){!function(f){module.exports=f(),module.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),f().apply(this,arguments)}}(function(){function IntroJs(obj){this._targetElement=obj,this._introItems=[],this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function _introForElement(targetElm,group){var allIntroSteps=targetElm.querySelectorAll("*[data-intro]"),introItems=[];if(this._options.steps)_forEach(this._options.steps,function(step){var currentItem=_cloneObject(step);if(currentItem.step=introItems.length+1,"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),void 0===currentItem.element||null===currentItem.element){var floatingElementQuery=document.querySelector(".introjsFloatingElement");null===floatingElementQuery&&(floatingElementQuery=document.createElement("div"),floatingElementQuery.className="introjsFloatingElement",document.body.appendChild(floatingElementQuery)),currentItem.element=floatingElementQuery,currentItem.position="floating"}currentItem.scrollTo=currentItem.scrollTo||this._options.scrollTo,void 0===currentItem.disableInteraction&&(currentItem.disableInteraction=this._options.disableInteraction),null!==currentItem.element&&introItems.push(currentItem)}.bind(this));else{var disableInteraction,elmsLength=allIntroSteps.length;if(elmsLength<1)return!1;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&"none"!==currentElement.style.display){var step=parseInt(currentElement.getAttribute("data-step"),10);disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,step>0&&(introItems[step-1]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:parseInt(currentElement.getAttribute("data-step"),10),tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction})}}.bind(this));var nextStep=0;_forEach(allIntroSteps,function(currentElement){if((!group||currentElement.getAttribute("data-intro-group")===group)&&null===currentElement.getAttribute("data-step")){for(;;){if(void 0===introItems[nextStep])break;nextStep++}disableInteraction=void 0!==currentElement.getAttribute("data-disable-interaction")?!!currentElement.getAttribute("data-disable-interaction"):this._options.disableInteraction,introItems[nextStep]={element:currentElement,intro:currentElement.getAttribute("data-intro"),step:nextStep+1,tooltipClass:currentElement.getAttribute("data-tooltipclass"),highlightClass:currentElement.getAttribute("data-highlightclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:currentElement.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:disableInteraction}}}.bind(this))}for(var tempIntroItems=[],z=0;z<introItems.length;z++)introItems[z]&&tempIntroItems.push(introItems[z]);return introItems=tempIntroItems,introItems.sort(function(a,b){return a.step-b.step}),this._introItems=introItems,_addOverlayLayer.call(this,targetElm)&&(_nextStep.call(this),this._options.keyboardNavigation&&DOMEvent.on(window,"keydown",_onKeyDown,this,!0),DOMEvent.on(window,"resize",_onResize,this,!0)),!1}function _onResize(){this.refresh.call(this)}function _onKeyDown(e){var code=null===e.code?e.which:e.code;if(null===code&&(code=null===e.charCode?e.keyCode:e.charCode),"Escape"!==code&&27!==code||!0!==this._options.exitOnEsc){if("ArrowLeft"===code||37===code)_previousStep.call(this);else if("ArrowRight"===code||39===code)_nextStep.call(this);else if("Enter"===code||13===code){var target=e.target||e.srcElement;target&&target.className.match("introjs-prevbutton")?_previousStep.call(this):target&&target.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),_exitIntro.call(this,this._targetElement)):target&&target.getAttribute("data-stepnumber")?target.click():_nextStep.call(this),e.preventDefault?e.preventDefault():e.returnValue=!1}}else _exitIntro.call(this,this._targetElement)}function _cloneObject(object){if(null===object||"object"!=typeof object||void 0!==object.nodeType)return object;var temp={};for(var key in object)void 0!==window.jQuery&&object[key]instanceof window.jQuery?temp[key]=object[key]:temp[key]=_cloneObject(object[key]);return temp}function _goToStep(step){this._currentStep=step-2,void 0!==this._introItems&&_nextStep.call(this)}function _goToStepNumber(step){this._currentStepNumber=step,void 0!==this._introItems&&_nextStep.call(this)}function _nextStep(){this._direction="forward",void 0!==this._currentStepNumber&&_forEach(this._introItems,function(item,i){item.step===this._currentStepNumber&&(this._currentStep=i-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;return void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void _exitIntro.call(this,this._targetElement)):void _showElement.call(this,nextStep)}function _previousStep(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var nextStep=this._introItems[this._currentStep],continueStep=!0;if(void 0!==this._introBeforeChangeCallback&&(continueStep=this._introBeforeChangeCallback.call(this,nextStep.element)),!1===continueStep)return++this._currentStep,!1;_showElement.call(this,nextStep)}function _refresh(){if(_setHelperLayerPosition.call(this,document.querySelector(".introjs-helperLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),_setHelperLayerPosition.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var oldHelperNumberLayer=document.querySelector(".introjs-helperNumberLayer"),oldArrowLayer=document.querySelector(".introjs-arrow"),oldtooltipContainer=document.querySelector(".introjs-tooltip");_placeTooltip.call(this,this._introItems[this._currentStep].element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer)}return _reAlignHints.call(this),this}function _exitIntro(targetElement,force){var continueExit=!0;if(void 0!==this._introBeforeExitCallback&&(continueExit=this._introBeforeExitCallback.call(this)),force||!1!==continueExit){var overlayLayers=targetElement.querySelectorAll(".introjs-overlay");overlayLayers&&overlayLayers.length&&_forEach(overlayLayers,function(overlayLayer){overlayLayer.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(overlayLayer),500)}.bind(this));var helperLayer=targetElement.querySelector(".introjs-helperLayer");helperLayer&&helperLayer.parentNode.removeChild(helperLayer);var referenceLayer=targetElement.querySelector(".introjs-tooltipReferenceLayer");referenceLayer&&referenceLayer.parentNode.removeChild(referenceLayer);var disableInteractionLayer=targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer);var floatingElement=document.querySelector(".introjsFloatingElement");floatingElement&&floatingElement.parentNode.removeChild(floatingElement),_removeShowElement();_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),DOMEvent.off(window,"keydown",_onKeyDown,this,!0),DOMEvent.off(window,"resize",_onResize,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function _placeTooltip(targetElement,tooltipLayer,arrowLayer,helperNumberLayer,hintMode){var currentStepObj,tooltipOffset,targetOffset,windowSize,currentTooltipPosition,tooltipCssClass="";if(hintMode=hintMode||!1,tooltipLayer.style.top=null,tooltipLayer.style.right=null,tooltipLayer.style.bottom=null,tooltipLayer.style.left=null,tooltipLayer.style.marginLeft=null,tooltipLayer.style.marginTop=null,arrowLayer.style.display="inherit",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.top=null,helperNumberLayer.style.left=null),this._introItems[this._currentStep]){currentStepObj=this._introItems[this._currentStep],tooltipCssClass="string"==typeof currentStepObj.tooltipClass?currentStepObj.tooltipClass:this._options.tooltipClass,tooltipLayer.className=("introjs-tooltip "+tooltipCssClass).replace(/^\s+|\s+$/g,""),tooltipLayer.setAttribute("role","dialog"),currentTooltipPosition=this._introItems[this._currentStep].position,"floating"!==currentTooltipPosition&&(currentTooltipPosition=_determineAutoPosition.call(this,targetElement,tooltipLayer,currentTooltipPosition));var tooltipLayerStyleLeft;switch(targetOffset=_getOffset(targetElement),tooltipOffset=_getOffset(tooltipLayer),windowSize=_getWinSize(),_addClass(tooltipLayer,"introjs-"+currentTooltipPosition),currentTooltipPosition){case"top-right-aligned":arrowLayer.className="introjs-arrow bottom-right";var tooltipLayerStyleRight=0;_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-middle-aligned":arrowLayer.className="introjs-arrow bottom-middle";var tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2;hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"top-left-aligned":case"top":arrowLayer.className="introjs-arrow bottom",tooltipLayerStyleLeft=hintMode?0:15,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.bottom=targetOffset.height+20+"px";break;case"right":tooltipLayer.style.left=targetOffset.width+20+"px",targetOffset.top+tooltipOffset.height>windowSize.height?(arrowLayer.className="introjs-arrow left-bottom",tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px"):arrowLayer.className="introjs-arrow left";break;case"left":hintMode||!0!==this._options.showStepNumbers||(tooltipLayer.style.top="15px"),targetOffset.top+tooltipOffset.height>windowSize.height?(tooltipLayer.style.top="-"+(tooltipOffset.height-targetOffset.height-20)+"px",arrowLayer.className="introjs-arrow right-bottom"):arrowLayer.className="introjs-arrow right",tooltipLayer.style.right=targetOffset.width+20+"px";break;case"floating":arrowLayer.style.display="none",tooltipLayer.style.left="50%",tooltipLayer.style.top="50%",tooltipLayer.style.marginLeft="-"+tooltipOffset.width/2+"px",tooltipLayer.style.marginTop="-"+tooltipOffset.height/2+"px",void 0!==helperNumberLayer&&null!==helperNumberLayer&&(helperNumberLayer.style.left="-"+(tooltipOffset.width/2+18)+"px",helperNumberLayer.style.top="-"+(tooltipOffset.height/2+18)+"px");break;case"bottom-right-aligned":arrowLayer.className="introjs-arrow top-right",tooltipLayerStyleRight=0,_checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px";break;case"bottom-middle-aligned":arrowLayer.className="introjs-arrow top-middle",tooltipLayerStyleLeftRight=targetOffset.width/2-tooltipOffset.width/2,hintMode&&(tooltipLayerStyleLeftRight+=5),_checkLeft(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,tooltipLayer)&&(tooltipLayer.style.right=null,_checkRight(targetOffset,tooltipLayerStyleLeftRight,tooltipOffset,windowSize,tooltipLayer)),tooltipLayer.style.top=targetOffset.height+20+"px";break;default:arrowLayer.className="introjs-arrow top",tooltipLayerStyleLeft=0,_checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer),tooltipLayer.style.top=targetOffset.height+20+"px"}}}function _checkRight(targetOffset,tooltipLayerStyleLeft,tooltipOffset,windowSize,tooltipLayer){return targetOffset.left+tooltipLayerStyleLeft+tooltipOffset.width>windowSize.width?(tooltipLayer.style.left=windowSize.width-tooltipOffset.width-targetOffset.left+"px",!1):(tooltipLayer.style.left=tooltipLayerStyleLeft+"px",!0)}function _checkLeft(targetOffset,tooltipLayerStyleRight,tooltipOffset,tooltipLayer){return targetOffset.left+targetOffset.width-tooltipLayerStyleRight-tooltipOffset.width<0?(tooltipLayer.style.left=-targetOffset.left+"px",!1):(tooltipLayer.style.right=tooltipLayerStyleRight+"px",!0)}function _determineAutoPosition(targetElement,tooltipLayer,desiredTooltipPosition){var possiblePositions=this._options.positionPrecedence.slice(),windowSize=_getWinSize(),tooltipHeight=_getOffset(tooltipLayer).height+10,tooltipWidth=_getOffset(tooltipLayer).width+20,targetElementRect=targetElement.getBoundingClientRect(),calculatedPosition="floating";targetElementRect.bottom+tooltipHeight+tooltipHeight>windowSize.height&&_removeEntry(possiblePositions,"bottom"),targetElementRect.top-tooltipHeight<0&&_removeEntry(possiblePositions,"top"),targetElementRect.right+tooltipWidth>windowSize.width&&_removeEntry(possiblePositions,"right"),targetElementRect.left-tooltipWidth<0&&_removeEntry(possiblePositions,"left");var desiredAlignment=function(pos){var hyphenIndex=pos.indexOf("-");return-1!==hyphenIndex?pos.substr(hyphenIndex):""}(desiredTooltipPosition||"");return desiredTooltipPosition&&(desiredTooltipPosition=desiredTooltipPosition.split("-")[0]),possiblePositions.length&&(calculatedPosition="auto"!==desiredTooltipPosition&&possiblePositions.indexOf(desiredTooltipPosition)>-1?desiredTooltipPosition:possiblePositions[0]),-1!==["top","bottom"].indexOf(calculatedPosition)&&(calculatedPosition+=_determineAutoAlignment(targetElementRect.left,tooltipWidth,windowSize,desiredAlignment)),calculatedPosition}function _determineAutoAlignment(offsetLeft,tooltipWidth,windowSize,desiredAlignment){var halfTooltipWidth=tooltipWidth/2,winWidth=Math.min(windowSize.width,window.screen.width),possibleAlignments=["-left-aligned","-middle-aligned","-right-aligned"];return winWidth-offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-left-aligned"),(offsetLeft<halfTooltipWidth||winWidth-offsetLeft<halfTooltipWidth)&&_removeEntry(possibleAlignments,"-middle-aligned"),offsetLeft<tooltipWidth&&_removeEntry(possibleAlignments,"-right-aligned"),possibleAlignments.length?-1!==possibleAlignments.indexOf(desiredAlignment)?desiredAlignment:possibleAlignments[0]:"-middle-aligned"}function _removeEntry(stringArray,stringToRemove){stringArray.indexOf(stringToRemove)>-1&&stringArray.splice(stringArray.indexOf(stringToRemove),1)}function _setHelperLayerPosition(helperLayer){if(helperLayer){if(!this._introItems[this._currentStep])return;var currentElement=this._introItems[this._currentStep],elementPosition=_getOffset(currentElement.element),widthHeightPadding=this._options.helperElementPadding;_isFixed(currentElement.element)?_addClass(helperLayer,"introjs-fixedTooltip"):_removeClass(helperLayer,"introjs-fixedTooltip"),"floating"===currentElement.position&&(widthHeightPadding=0),helperLayer.style.cssText="width: "+(elementPosition.width+widthHeightPadding)+"px; height:"+(elementPosition.height+widthHeightPadding)+"px; top:"+(elementPosition.top-widthHeightPadding/2)+"px;left: "+(elementPosition.left-widthHeightPadding/2)+"px;"}}function _disableInteraction(){var disableInteractionLayer=document.querySelector(".introjs-disableInteraction");null===disableInteractionLayer&&(disableInteractionLayer=document.createElement("div"),disableInteractionLayer.className="introjs-disableInteraction",this._targetElement.appendChild(disableInteractionLayer)),_setHelperLayerPosition.call(this,disableInteractionLayer)}function _setAnchorAsButton(anchor){anchor.setAttribute("role","button"),anchor.tabIndex=0}function _showElement(targetElement){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,targetElement.element);var nextTooltipButton,prevTooltipButton,skipTooltipButton,scrollParent,self=this,oldHelperLayer=document.querySelector(".introjs-helperLayer"),oldReferenceLayer=document.querySelector(".introjs-tooltipReferenceLayer"),highlightClass="introjs-helperLayer";if("string"==typeof targetElement.highlightClass&&(highlightClass+=" "+targetElement.highlightClass),"string"==typeof this._options.highlightClass&&(highlightClass+=" "+this._options.highlightClass),null!==oldHelperLayer){var oldHelperNumberLayer=oldReferenceLayer.querySelector(".introjs-helperNumberLayer"),oldtooltipLayer=oldReferenceLayer.querySelector(".introjs-tooltiptext"),oldArrowLayer=oldReferenceLayer.querySelector(".introjs-arrow"),oldtooltipContainer=oldReferenceLayer.querySelector(".introjs-tooltip");if(skipTooltipButton=oldReferenceLayer.querySelector(".introjs-skipbutton"),prevTooltipButton=oldReferenceLayer.querySelector(".introjs-prevbutton"),nextTooltipButton=oldReferenceLayer.querySelector(".introjs-nextbutton"),oldHelperLayer.className=highlightClass,oldtooltipContainer.style.opacity=0,oldtooltipContainer.style.display="none",null!==oldHelperNumberLayer){var lastIntroItem=this._introItems[targetElement.step-2>=0?targetElement.step-2:0];(null!==lastIntroItem&&"forward"===this._direction&&"floating"===lastIntroItem.position||"backward"===this._direction&&"floating"===targetElement.position)&&(oldHelperNumberLayer.style.opacity=0)}scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,oldHelperLayer),_setHelperLayerPosition.call(self,oldReferenceLayer);_forEach(document.querySelectorAll(".introjs-fixParent"),function(parent){_removeClass(parent,/introjs-fixParent/g)}),_removeShowElement(),self._lastShowElementTimer&&window.clearTimeout(self._lastShowElementTimer),self._lastShowElementTimer=window.setTimeout(function(){null!==oldHelperNumberLayer&&(oldHelperNumberLayer.innerHTML=targetElement.step),oldtooltipLayer.innerHTML=targetElement.intro,oldtooltipContainer.style.display="block",_placeTooltip.call(self,targetElement.element,oldtooltipContainer,oldArrowLayer,oldHelperNumberLayer),self._options.showBullets&&(oldReferenceLayer.querySelector(".introjs-bullets li > a.active").className="",oldReferenceLayer.querySelector('.introjs-bullets li > a[data-stepnumber="'+targetElement.step+'"]').className="active"),oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+_getProgress.call(self)+"%;",oldReferenceLayer.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",_getProgress.call(self)),oldtooltipContainer.style.opacity=1,oldHelperNumberLayer&&(oldHelperNumberLayer.style.opacity=1),void 0!==skipTooltipButton&&null!==skipTooltipButton&&/introjs-donebutton/gi.test(skipTooltipButton.className)?skipTooltipButton.focus():void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_scrollTo.call(self,targetElement.scrollTo,targetElement,oldtooltipLayer)},350)}else{var helperLayer=document.createElement("div"),referenceLayer=document.createElement("div"),arrowLayer=document.createElement("div"),tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),bulletsLayer=document.createElement("div"),progressLayer=document.createElement("div"),buttonsLayer=document.createElement("div");helperLayer.className=highlightClass,referenceLayer.className="introjs-tooltipReferenceLayer",scrollParent=_getScrollParent(targetElement.element),scrollParent!==document.body&&_scrollParentToElement(scrollParent,targetElement.element),_setHelperLayerPosition.call(self,helperLayer),_setHelperLayerPosition.call(self,referenceLayer),this._targetElement.appendChild(helperLayer),this._targetElement.appendChild(referenceLayer),arrowLayer.className="introjs-arrow",tooltipTextLayer.className="introjs-tooltiptext",tooltipTextLayer.innerHTML=targetElement.intro,bulletsLayer.className="introjs-bullets",!1===this._options.showBullets&&(bulletsLayer.style.display="none");var ulContainer=document.createElement("ul");ulContainer.setAttribute("role","tablist");var anchorClick=function(){self.goToStep(this.getAttribute("data-stepnumber"))};_forEach(this._introItems,function(item,i){var innerLi=document.createElement("li"),anchorLink=document.createElement("a");innerLi.setAttribute("role","presentation"),anchorLink.setAttribute("role","tab"),anchorLink.onclick=anchorClick,i===targetElement.step-1&&(anchorLink.className="active"),_setAnchorAsButton(anchorLink),anchorLink.innerHTML=" ",anchorLink.setAttribute("data-stepnumber",item.step),innerLi.appendChild(anchorLink),ulContainer.appendChild(innerLi)}),bulletsLayer.appendChild(ulContainer),progressLayer.className="introjs-progress",!1===this._options.showProgress&&(progressLayer.style.display="none");var progressBar=document.createElement("div");progressBar.className="introjs-progressbar",progressBar.setAttribute("role","progress"),progressBar.setAttribute("aria-valuemin",0),progressBar.setAttribute("aria-valuemax",100),progressBar.setAttribute("aria-valuenow",_getProgress.call(this)),progressBar.style.cssText="width:"+_getProgress.call(this)+"%;",progressLayer.appendChild(progressBar),buttonsLayer.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(buttonsLayer.style.display="none"),tooltipLayer.className="introjs-tooltip",tooltipLayer.appendChild(tooltipTextLayer),tooltipLayer.appendChild(bulletsLayer),tooltipLayer.appendChild(progressLayer);var helperNumberLayer=document.createElement("span");!0===this._options.showStepNumbers&&(helperNumberLayer.className="introjs-helperNumberLayer",helperNumberLayer.innerHTML=targetElement.step,referenceLayer.appendChild(helperNumberLayer)),tooltipLayer.appendChild(arrowLayer),referenceLayer.appendChild(tooltipLayer),nextTooltipButton=document.createElement("a"),nextTooltipButton.onclick=function(){self._introItems.length-1!==self._currentStep&&_nextStep.call(self)},_setAnchorAsButton(nextTooltipButton),nextTooltipButton.innerHTML=this._options.nextLabel,prevTooltipButton=document.createElement("a"),prevTooltipButton.onclick=function(){0!==self._currentStep&&_previousStep.call(self)},_setAnchorAsButton(prevTooltipButton),prevTooltipButton.innerHTML=this._options.prevLabel,skipTooltipButton=document.createElement("a"),skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton ",_setAnchorAsButton(skipTooltipButton),skipTooltipButton.innerHTML=this._options.skipLabel,skipTooltipButton.onclick=function(){self._introItems.length-1===self._currentStep&&"function"==typeof self._introCompleteCallback&&self._introCompleteCallback.call(self),self._introItems.length-1!==self._currentStep&&"function"==typeof self._introExitCallback&&self._introExitCallback.call(self),self._introSkipCallback.call(self),_exitIntro.call(self,self._targetElement)},buttonsLayer.appendChild(skipTooltipButton),this._introItems.length>1&&(buttonsLayer.appendChild(prevTooltipButton),buttonsLayer.appendChild(nextTooltipButton)),tooltipLayer.appendChild(buttonsLayer),_placeTooltip.call(self,targetElement.element,tooltipLayer,arrowLayer,helperNumberLayer),_scrollTo.call(this,targetElement.scrollTo,targetElement,tooltipLayer)}var disableInteractionLayer=self._targetElement.querySelector(".introjs-disableInteraction");disableInteractionLayer&&disableInteractionLayer.parentNode.removeChild(disableInteractionLayer),targetElement.disableInteraction&&_disableInteraction.call(self),0===this._currentStep&&this._introItems.length>1?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&_addClass(nextTooltipButton,"introjs-fullbutton")):void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.doneLabel,_addClass(skipTooltipButton,"introjs-donebutton")),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&_addClass(prevTooltipButton,"introjs-fullbutton")):void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.className=this._options.buttonClass+" introjs-skipbutton"),void 0!==prevTooltipButton&&null!==prevTooltipButton&&(prevTooltipButton.className=this._options.buttonClass+" introjs-prevbutton"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&(nextTooltipButton.className=this._options.buttonClass+" introjs-nextbutton"),void 0!==skipTooltipButton&&null!==skipTooltipButton&&(skipTooltipButton.innerHTML=this._options.skipLabel)),prevTooltipButton.setAttribute("role","button"),nextTooltipButton.setAttribute("role","button"),skipTooltipButton.setAttribute("role","button"),void 0!==nextTooltipButton&&null!==nextTooltipButton&&nextTooltipButton.focus(),_setShowElement(targetElement),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,targetElement.element)}function _scrollTo(scrollTo,targetElement,tooltipLayer){if("off"!==scrollTo){var rect;if(this._options.scrollToElement&&(rect="tooltip"===scrollTo?tooltipLayer.getBoundingClientRect():targetElement.element.getBoundingClientRect(),!_elementInViewport(targetElement.element))){var winHeight=_getWinSize().height;rect.bottom-(rect.bottom-rect.top)<0||targetElement.element.clientHeight>winHeight?window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)-this._options.scrollPadding):window.scrollBy(0,rect.top-(winHeight/2-rect.height/2)+this._options.scrollPadding)}}}function _removeShowElement(){_forEach(document.querySelectorAll(".introjs-showElement"),function(elm){_removeClass(elm,/introjs-[a-zA-Z]+/g)})}function _setShowElement(targetElement){var parentElm;if(targetElement.element instanceof SVGElement)for(parentElm=targetElement.element.parentNode;null!==targetElement.element.parentNode&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();)"svg"===parentElm.tagName.toLowerCase()&&_addClass(parentElm,"introjs-showElement introjs-relativePosition"),parentElm=parentElm.parentNode;_addClass(targetElement.element,"introjs-showElement");var currentElementPosition=_getPropValue(targetElement.element,"position");for("absolute"!==currentElementPosition&&"relative"!==currentElementPosition&&"fixed"!==currentElementPosition&&_addClass(targetElement.element,"introjs-relativePosition"),parentElm=targetElement.element.parentNode;null!==parentElm&&parentElm.tagName&&"body"!==parentElm.tagName.toLowerCase();){var zIndex=_getPropValue(parentElm,"z-index"),opacity=parseFloat(_getPropValue(parentElm,"opacity")),transform=_getPropValue(parentElm,"transform")||_getPropValue(parentElm,"-webkit-transform")||_getPropValue(parentElm,"-moz-transform")||_getPropValue(parentElm,"-ms-transform")||_getPropValue(parentElm,"-o-transform");(/[0-9]+/.test(zIndex)||opacity<1||"none"!==transform&&void 0!==transform)&&_addClass(parentElm,"introjs-fixParent"),parentElm=parentElm.parentNode}}function _forEach(arr,forEachFnc,completeFnc){if(arr)for(var i=0,len=arr.length;i<len;i++)forEachFnc(arr[i],i);"function"==typeof completeFnc&&completeFnc()}function _addClass(element,className){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre+" "+className)}else if(void 0!==element.classList){var classes=className.split(" ");_forEach(classes,function(cls){element.classList.add(cls)})}else element.className.match(className)||(element.className+=" "+className)}function _removeClass(element,classNameRegex){if(element instanceof SVGElement){var pre=element.getAttribute("class")||"";element.setAttribute("class",pre.replace(classNameRegex,"").replace(/^\s+|\s+$/g,""))}else element.className=element.className.replace(classNameRegex,"").replace(/^\s+|\s+$/g,"")}function _getPropValue(element,propName){var propValue="";return element.currentStyle?propValue=element.currentStyle[propName]:document.defaultView&&document.defaultView.getComputedStyle&&(propValue=document.defaultView.getComputedStyle(element,null).getPropertyValue(propName)),propValue&&propValue.toLowerCase?propValue.toLowerCase():propValue}function _isFixed(element){var p=element.parentNode;return!(!p||"HTML"===p.nodeName)&&("fixed"===_getPropValue(element,"position")||_isFixed(p))}function _getWinSize(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var D=document.documentElement;return{width:D.clientWidth,height:D.clientHeight}}function _elementInViewport(el){var rect=el.getBoundingClientRect();return rect.top>=0&&rect.left>=0&&rect.bottom+80<=window.innerHeight&&rect.right<=window.innerWidth}function _addOverlayLayer(targetElm){var overlayLayer=document.createElement("div"),styleText="",self=this;if(overlayLayer.className="introjs-overlay",targetElm.tagName&&"body"!==targetElm.tagName.toLowerCase()){var elementPosition=_getOffset(targetElm);elementPosition&&(styleText+="width: "+elementPosition.width+"px; height:"+elementPosition.height+"px; top:"+elementPosition.top+"px;left: "+elementPosition.left+"px;",overlayLayer.style.cssText=styleText)}else styleText+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",overlayLayer.style.cssText=styleText;return targetElm.appendChild(overlayLayer),overlayLayer.onclick=function(){!0===self._options.exitOnOverlayClick&&_exitIntro.call(self,targetElm)},window.setTimeout(function(){styleText+="opacity: "+self._options.overlayOpacity.toString()+";",overlayLayer.style.cssText=styleText},10),!0}function _removeHintTooltip(){var tooltip=document.querySelector(".introjs-hintReference");if(tooltip){var step=tooltip.getAttribute("data-step");return tooltip.parentNode.removeChild(tooltip),step}}function _populateHints(targetElm){if(this._introItems=[],this._options.hints)_forEach(this._options.hints,function(hint){var currentItem=_cloneObject(hint);"string"==typeof currentItem.element&&(currentItem.element=document.querySelector(currentItem.element)),currentItem.hintPosition=currentItem.hintPosition||this._options.hintPosition,currentItem.hintAnimation=currentItem.hintAnimation||this._options.hintAnimation,null!==currentItem.element&&this._introItems.push(currentItem)}.bind(this));else{var hints=targetElm.querySelectorAll("*[data-hint]");if(!hints||!hints.length)return!1;_forEach(hints,function(currentElement){var hintAnimation=currentElement.getAttribute("data-hintanimation");hintAnimation=hintAnimation?"true"===hintAnimation:this._options.hintAnimation,this._introItems.push({element:currentElement,hint:currentElement.getAttribute("data-hint"),hintPosition:currentElement.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:hintAnimation,tooltipClass:currentElement.getAttribute("data-tooltipclass"),position:currentElement.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}_addHints.call(this),DOMEvent.on(document,"click",_removeHintTooltip,this,!1),DOMEvent.on(window,"resize",_reAlignHints,this,!0)}function _reAlignHints(){_forEach(this._introItems,function(item){void 0!==item.targetElement&&_alignHintPosition.call(this,item.hintPosition,item.element,item.targetElement)}.bind(this))}function _hintQuerySelectorAll(selector){var hintsWrapper=document.querySelector(".introjs-hints");return hintsWrapper?hintsWrapper.querySelectorAll(selector):[]}function _hideHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];_removeHintTooltip.call(this),hint&&_addClass(hint,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,stepId)}function _hideHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_hideHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _showHints(){var hints=_hintQuerySelectorAll(".introjs-hint");hints&&hints.length?_forEach(hints,function(hint){_showHint.call(this,hint.getAttribute("data-step"))}.bind(this)):_populateHints.call(this,this._targetElement)}function _showHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&_removeClass(hint,/introjs-hidehint/g)}function _removeHints(){_forEach(_hintQuerySelectorAll(".introjs-hint"),function(hint){_removeHint.call(this,hint.getAttribute("data-step"))}.bind(this))}function _removeHint(stepId){var hint=_hintQuerySelectorAll('.introjs-hint[data-step="'+stepId+'"]')[0];hint&&hint.parentNode.removeChild(hint)}function _addHints(){var self=this,hintsWrapper=document.querySelector(".introjs-hints");null===hintsWrapper&&(hintsWrapper=document.createElement("div"),hintsWrapper.className="introjs-hints");var getHintClick=function(i){return function(e){var evt=e||window.event;evt.stopPropagation&&evt.stopPropagation(),null!==evt.cancelBubble&&(evt.cancelBubble=!0),_showHintDialog.call(self,i)}};_forEach(this._introItems,function(item,i){if(!document.querySelector('.introjs-hint[data-step="'+i+'"]')){var hint=document.createElement("a");_setAnchorAsButton(hint),hint.onclick=getHintClick(i),hint.className="introjs-hint",item.hintAnimation||_addClass(hint,"introjs-hint-no-anim"),_isFixed(item.element)&&_addClass(hint,"introjs-fixedhint");var hintDot=document.createElement("div");hintDot.className="introjs-hint-dot";var hintPulse=document.createElement("div");hintPulse.className="introjs-hint-pulse",hint.appendChild(hintDot),hint.appendChild(hintPulse),hint.setAttribute("data-step",i),item.targetElement=item.element,item.element=hint,_alignHintPosition.call(this,item.hintPosition,hint,item.targetElement),hintsWrapper.appendChild(hint)}}.bind(this)),document.body.appendChild(hintsWrapper),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}function _alignHintPosition(position,hint,element){var offset=_getOffset.call(this,element);switch(position){default:case"top-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+"px";break;case"top-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+"px";break;case"bottom-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"bottom-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"middle-left":hint.style.left=offset.left+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-right":hint.style.left=offset.left+offset.width-20+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"middle-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+(offset.height-20)/2+"px";break;case"bottom-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+offset.height-20+"px";break;case"top-middle":hint.style.left=offset.left+(offset.width-20)/2+"px",hint.style.top=offset.top+"px"}}function _showHintDialog(stepId){var hintElement=document.querySelector('.introjs-hint[data-step="'+stepId+'"]'),item=this._introItems[stepId];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,hintElement,item,stepId);var removedStep=_removeHintTooltip.call(this);if(parseInt(removedStep,10)!==stepId){var tooltipLayer=document.createElement("div"),tooltipTextLayer=document.createElement("div"),arrowLayer=document.createElement("div"),referenceLayer=document.createElement("div");tooltipLayer.className="introjs-tooltip",tooltipLayer.onclick=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},tooltipTextLayer.className="introjs-tooltiptext";var tooltipWrapper=document.createElement("p");tooltipWrapper.innerHTML=item.hint;var closeButton=document.createElement("a");closeButton.className=this._options.buttonClass,closeButton.setAttribute("role","button"),closeButton.innerHTML=this._options.hintButtonLabel,closeButton.onclick=_hideHint.bind(this,stepId),tooltipTextLayer.appendChild(tooltipWrapper),tooltipTextLayer.appendChild(closeButton),arrowLayer.className="introjs-arrow",tooltipLayer.appendChild(arrowLayer),tooltipLayer.appendChild(tooltipTextLayer),this._currentStep=hintElement.getAttribute("data-step"),referenceLayer.className="introjs-tooltipReferenceLayer introjs-hintReference",referenceLayer.setAttribute("data-step",hintElement.getAttribute("data-step")),_setHelperLayerPosition.call(this,referenceLayer),referenceLayer.appendChild(tooltipLayer),document.body.appendChild(referenceLayer),_placeTooltip.call(this,hintElement,tooltipLayer,arrowLayer,null,!0)}}function _getOffset(element){var body=document.body,docEl=document.documentElement,scrollTop=window.pageYOffset||docEl.scrollTop||body.scrollTop,scrollLeft=window.pageXOffset||docEl.scrollLeft||body.scrollLeft,x=element.getBoundingClientRect();return{top:x.top+scrollTop,width:x.width,height:x.height,left:x.left+scrollLeft}}function _getScrollParent(element){var style=window.getComputedStyle(element),excludeStaticParent="absolute"===style.position,overflowRegex=/(auto|scroll)/;if("fixed"===style.position)return document.body;for(var parent=element;parent=parent.parentElement;)if(style=window.getComputedStyle(parent),(!excludeStaticParent||"static"!==style.position)&&overflowRegex.test(style.overflow+style.overflowY+style.overflowX))return parent;return document.body}function _scrollParentToElement(parent,element){parent.scrollTop=element.offsetTop-parent.offsetTop}function _getProgress(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}function _mergeOptions(obj1,obj2){var attrname,obj3={};for(attrname in obj1)obj3[attrname]=obj1[attrname];for(attrname in obj2)obj3[attrname]=obj2[attrname];return obj3}var _stamp=function(){var keys={};return function(obj,key){return key=key||"introjs-stamp",keys[key]=keys[key]||0,void 0===obj[key]&&(obj[key]=keys[key]++),obj[key]}}(),DOMEvent=function(){function DOMEvent(){var events_key="introjs_event";this._id=function(obj,type,listener,context){return type+_stamp(listener)+(context?"_"+_stamp(context):"")},this.on=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=function(e){return listener.call(context||obj,e||window.event)};"addEventListener"in obj?obj.addEventListener(type,handler,useCapture):"attachEvent"in obj&&obj.attachEvent("on"+type,handler),obj[events_key]=obj[events_key]||{},obj[events_key][id]=handler},this.off=function(obj,type,listener,context,useCapture){var id=this._id.apply(this,arguments),handler=obj[events_key]&&obj[events_key][id];"removeEventListener"in obj?obj.removeEventListener(type,handler,useCapture):"detachEvent"in obj&&obj.detachEvent("on"+type,handler),obj[events_key][id]=null}}return new DOMEvent}(),introJs=function(targetElm){var instance;if("object"==typeof targetElm)instance=new IntroJs(targetElm);else if("string"==typeof targetElm){var targetElement=document.querySelector(targetElm);if(!targetElement)throw new Error("There is no element with given selector.");instance=new IntroJs(targetElement)}else instance=new IntroJs(document.body);return introJs.instances[_stamp(instance,"introjs-instance")]=instance,instance};return introJs.version="2.9.0",introJs.instances={},introJs.fn=IntroJs.prototype={clone:function(){return new IntroJs(this)},setOption:function(option,value){return this._options[option]=value,this},setOptions:function(options){return this._options=_mergeOptions(this._options,options),this},start:function(group){return _introForElement.call(this,this._targetElement,group),this},goToStep:function(step){return _goToStep.call(this,step),this},addStep:function(options){return this._options.steps||(this._options.steps=[]),this._options.steps.push(options),this},addSteps:function(steps){if(steps.length){for(var index=0;index<steps.length;index++)this.addStep(steps[index]);return this}},goToStepNumber:function(step){return _goToStepNumber.call(this,step),this},nextStep:function(){return _nextStep.call(this),this},previousStep:function(){return _previousStep.call(this),this},exit:function(force){return _exitIntro.call(this,this._targetElement,force),this},refresh:function(){return _refresh.call(this),this},onbeforechange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=providedCallback,this},onchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=providedCallback,this},onafterchange:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=providedCallback,this},oncomplete:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=providedCallback,this},onhintsadded:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=providedCallback,this},onhintclick:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=providedCallback,this},onhintclose:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=providedCallback,this},onexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=providedCallback,this},onskip:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=providedCallback,this},onbeforeexit:function(providedCallback){if("function"!=typeof providedCallback)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=providedCallback,this},addHints:function(){return _populateHints.call(this,this._targetElement),this},hideHint:function(stepId){return _hideHint.call(this,stepId),this},hideHints:function(){return _hideHints.call(this),this},showHint:function(stepId){return _showHint.call(this,stepId),this},showHints:function(){return _showHints.call(this),this},removeHints:function(){return _removeHints.call(this),this},removeHint:function(stepId){return _removeHint.call(this,stepId),this},showHintDialog:function(stepId){return _showHintDialog.call(this,stepId),this}},introJs})},592:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(2)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(MailPoet){function eventHandler(){return confirm(MailPoet.I18n.t("reinstallConfirmation"))&&(MailPoet.trackEvent("User has reinstalled MailPoet via Settings",{"MailPoet Free version":window.mailpoet_version}),MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"setup",action:"reset"}).always(function(){MailPoet.Modal.loading(!1)}).done(function(){window.location="admin.php?page=mailpoet-newsletters"}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})),!1}var element;(element=document.getElementById("mailpoet_reinstall"))&&element.addEventListener("click",eventHandler,!1)}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},593:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(30),__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(205),__webpack_require__(594),__webpack_require__(595),__webpack_require__(0)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(Backbone,_,jQuery,MailPoet,Handlebars,Papa,AsyncQueue,Moment){jQuery("#mailpoet_subscribers_import").length&&jQuery(document).ready(function(){function showCurrentStep(){MailPoet.Notice.hide(),MailPoet.Modal.loading(!1),jQuery('#mailpoet_subscribers_import > div[id^="step"]').hide(),jQuery(location.hash).show()}var router;jQuery('input[name="select_method"]').attr("checked",!1),router=new(Backbone.Router.extend({routes:{"":"home",step1:"step1",step2:"step2",step3:"step3"},home:function(){this.navigate("step1",{trigger:!0})}})),router.on("route:step1",function(){function toggleNextStepButton(element,condition){if("on"===condition)return void element.closest("table a").removeClass("button-disabled");element.closest("table a").addClass("button-disabled")}function parseCSV(isFile){var processedSubscribers=[],parsedEmails=[],duplicateEmails=[],invalidEmails=[],emailColumnPosition=null,columnCount=null,isHeaderFound=!1,detectAndCleanupEmail=function(emailString){var test,email=jQuery("<div />").html(emailString).text();return email=email.toLowerCase().replace(/^["';.,\s]+|[^\x20-\x7E]+$|["';.,_\s]+$/g,"").replace(/\s+|%\d+|,+/g,""),test=/<(.*?)>/.exec(email),test&&(email=test[1].trim()),test=/mailto:(?:\s+)?(.*)/.exec(email),test&&(email=test[1].trim()),!!window.mailpoet_email_regex.test(email)&&email};return{skipEmptyLines:!0,delimiter:"",newline:"",comments:!1,error:function(){MailPoet.Notice.hide(),MailPoet.Notice.error(MailPoet.I18n.t("dataProcessingError"))},complete:function(CSV){var email,emailAddress,rowData,rowColumnCount,errorNotice;Object.keys(CSV.data).forEach(function(rowCount){rowData=CSV.data[rowCount].map(function(el){return el.trim()}),rowColumnCount=rowData.length,null===columnCount&&(columnCount=rowColumnCount),rowColumnCount===columnCount&&(null===emailColumnPosition?(Object.keys(rowData).forEach(function(column){emailAddress=detectAndCleanupEmail(rowData[column]),null===emailColumnPosition&&window.mailpoet_email_regex.test(emailAddress)&&(emailColumnPosition=column,parsedEmails[emailAddress]=!0,rowData[column]=emailAddress,processedSubscribers[emailAddress]=rowData)}),null===emailColumnPosition&&0===parseInt(rowCount,10)&&(isHeaderFound=!0,processedSubscribers[0]=rowData)):""!==rowData[emailColumnPosition]&&(email=detectAndCleanupEmail(rowData[emailColumnPosition]),_.has(parsedEmails,email)?duplicateEmails.push(email):window.mailpoet_email_regex.test(email)?(parsedEmails[email]=!0,rowData[emailColumnPosition]=email,processedSubscribers[email]=rowData):invalidEmails.push(rowData[emailColumnPosition])))}),processedSubscribers=_.values(processedSubscribers),processedSubscribers&&(isHeaderFound&&processedSubscribers.length>=2||!isHeaderFound&&processedSubscribers.length>=1)?(window.importData.step1={header:window.mailpoet_email_regex.test(processedSubscribers[0][emailColumnPosition])?null:processedSubscribers.shift(),subscribers:processedSubscribers,subscribersCount:processedSubscribers.length,duplicate:duplicateEmails,invalid:invalidEmails},MailPoet.trackEvent("Subscribers import started",{source:isFile?"file upload":"pasted data","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})):(MailPoet.Modal.loading(!1),errorNotice=MailPoet.I18n.t("noValidRecords"),errorNotice=errorNotice.replace("[link]",MailPoet.I18n.t("csvKBLink")),errorNotice=errorNotice.replace("[/link]","</a>"),MailPoet.Notice.error(errorNotice))}}}function displayMailChimpLists(data){var listSelectElement=mailChimpListsContainerElement.find("select");listSelectElement.data("select2")?(listSelectElement.select2("data",data),listSelectElement.trigger("change")):listSelectElement.select2({data:data,width:"20em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).change(function(){null!==jQuery(this).val()?toggleNextStepButton(mailChimpProcessButtonElement,"on"):toggleNextStepButton(mailChimpProcessButtonElement,"off")}).trigger("change"),mailChimpListsContainerElement.show()}var methodProcessContainerTemplate,currentStepE,methodSelectionElement,pasteInputElement,pasteInputPlaceholderElement,pasteProcessButtonElement,mailChimpKeyInputElement,mailChimpKeyVerifyButtonElement,mailChimpListsContainerElement,mailChimpProcessButtonElement,uploadElement,uploadProcessButtonElement;if(window.mailpoetColumns=jQuery.map(window.mailpoetColumns,function(column){var col=column;return col.validation_rule=!1,col}),void 0!==window.importData.step1)return void showCurrentStep();methodProcessContainerTemplate=Handlebars.compile(jQuery("#method_process_template").html()),jQuery(".mailpoet_method_process").html(methodProcessContainerTemplate()),currentStepE=jQuery(location.hash),methodSelectionElement=jQuery("#select_method"),pasteInputElement=jQuery("#paste_input"),pasteInputPlaceholderElement=pasteInputElement.data("placeholder").replace(/\\n/g,"\n"),pasteProcessButtonElement=jQuery("#method_paste > div.mailpoet_method_process").find("a.mailpoet_process"),mailChimpKeyInputElement=jQuery("#mailchimp_key"),mailChimpKeyVerifyButtonElement=jQuery("#mailchimp_key_verify"),mailChimpListsContainerElement=jQuery("#mailchimp_lists"),mailChimpProcessButtonElement=jQuery("#method_mailchimp > div.mailpoet_method_process").find("a.mailpoet_process"),uploadElement=jQuery("#file_local"),uploadProcessButtonElement=jQuery("#method_file > div.mailpoet_method_process").find("a.mailpoet_process"),methodSelectionElement.change(function(){var availableMethods=jQuery(':radio[name="select_method"]'),selectedMethod=availableMethods.index(availableMethods.filter(":checked"));MailPoet.Notice.hide(),currentStepE.find(".inside").children('div[id^="method_"]').hide(),currentStepE.find(".inside").children('div[id^="method_"]:eq('+selectedMethod+")").show().find("table").show()}),showCurrentStep(),pasteInputElement.attr("value",pasteInputPlaceholderElement).css("color","#999").focus(function(){jQuery(this).val()===pasteInputPlaceholderElement&&jQuery(this).attr("value","").css("color","#222")}).blur(function(){""===jQuery(this).val()&&jQuery(this).attr("value",pasteInputPlaceholderElement).css("color","#999")}).keyup(function(){toggleNextStepButton(pasteProcessButtonElement,""!==this.value.trim()?"on":"off")}),pasteProcessButtonElement.click(function(){var pasteSize=encodeURI(pasteInputElement.val()).split(/%..|./).length-1;if(MailPoet.Notice.hide(),pasteSize>window.maxPostSizeBytes)return void MailPoet.Notice.error(MailPoet.I18n.t("maxPostSizeNotice"));MailPoet.Modal.loading(!0),setTimeout(function(){Papa.parse(pasteInputElement.val(),parseCSV(!1))},10)}),uploadElement.change(function(){var ext=this.value.match(/[^.]+$/);MailPoet.Notice.hide(),null!==ext&&"csv"===ext[0].toLowerCase()||(this.value="",MailPoet.Notice.error(MailPoet.I18n.t("wrongFileFormat"))),toggleNextStepButton(uploadProcessButtonElement,""!==this.value.trim()?"on":"off")}),uploadProcessButtonElement.click(function(){""!==uploadElement.val().trim()&&(MailPoet.Modal.loading(!0),setTimeout(function(){uploadElement.parse({config:parseCSV(!0)})},10))}),mailChimpKeyInputElement.keyup(function(){""!==this.value.trim()&&/[a-zA-Z0-9]{32}-/.exec(this.value.trim())||(mailChimpListsContainerElement.hide(),jQuery(".mailpoet_mailchimp-key-status").html("").removeClass("mailpoet_mailchimp-ok mailpoet_mailchimp-error"),toggleNextStepButton(mailChimpProcessButtonElement,"off"))}),mailChimpKeyVerifyButtonElement.click(function(){MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpLists",data:{api_key:mailChimpKeyInputElement.val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){jQuery(".mailpoet_mailchimp-key-status").html("").removeClass().addClass("mailpoet_mailchimp-key-status mailpoet_mailchimp-ok"),0===response.data.length?(jQuery(".mailpoet_mailchimp-key-status").html(MailPoet.I18n.t("noMailChimpLists")),mailChimpListsContainerElement.hide(),toggleNextStepButton(mailChimpProcessButtonElement,"off")):displayMailChimpLists(response.data)}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}),mailChimpProcessButtonElement.click(function(){mailChimpProcessButtonElement.closest("table a").hasClass("button-disabled")||(MailPoet.Modal.loading(!0),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"importExport",action:"getMailChimpSubscribers",data:{api_key:mailChimpKeyInputElement.val(),lists:mailChimpListsContainerElement.find("select").val()}}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){window.importData.step1=response.data,MailPoet.trackEvent("Subscribers import started",{source:"MailChimp","MailPoet Free version":window.mailpoet_version}),router.navigate("step2",{trigger:!0})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))})}),router.on("route:step2",function(){function toggleNextStepButton(condition){if("on"===condition)return void nextStepButton.removeClass("button-disabled");nextStepButton.addClass("button-disabled")}function enableSegmentSelection(segments){segmentSelectElement.data("select2")&&(segmentSelectElement.html("").select2("destroy"),toggleNextStepButton("off")),segmentSelectElement.select2({data:segments,width:"20em",templateResult:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"},templateSelection:function(item){var i=item;return i.subscriberCount=parseInt(i.subscriberCount,10),i.name+" ("+i.subscriberCount.toLocaleString()+")"}}).change(function(){var segmentSelectionNotice=jQuery('[data-id="notice_segmentSelection"]');this.value?(jQuery('[data-id="notice_segmentSelection"]').remove(),jQuery(".mailpoet_notice.error:visible").length||toggleNextStepButton("on")):(segmentSelectionNotice.length||MailPoet.Notice.error(MailPoet.I18n.t("segmentSelectionRequired"),{static:!0,scroll:!0,id:"notice_segmentSelection",hideClose:!0}),toggleNextStepButton("off"))})}function filterSubscribers(){var displayedColumns,subscribersClone=jQuery.extend(!0,{},subscribers),preventNextStep=!1;jQuery('[data-id="notice_invalidEmail"], [data-id="notice_invalidDate"]').remove(),displayedColumns=jQuery.map(jQuery(".mailpoet_subscribers_column_data_match"),function(element,elementIndex){var columnId=jQuery(element).data("column-id"),validationRule=jQuery(element).data("validation-rule");return jQuery(element).val(columnId).trigger("change"),{id:columnId,index:elementIndex,validationRule:validationRule,element:element}}),jQuery.map(window.mailpoetColumns,function(column){var firstRowData,validationRule,testedFormat,allowedDateFormats,matchedColumn=_.find(displayedColumns,function(data){return data.id===column.id});"email"===column.id&&(window.mailpoet_email_regex.test(subscribersClone.subscribers[0][matchedColumn.index])?MailPoet.Notice.hide("invalidEmail"):(preventNextStep=!0,jQuery('[data-id="notice_invalidEmail"]').length||MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidElement"),{static:!0,scroll:!0,hideClose:!0,id:"invalidEmail"}))),"date"===column.type&&matchedColumn&&(allowedDateFormats=[Moment.ISO_8601,"YYYY/MM/DD","MM/DD/YYYY","DD/MM/YYYY","YYYY/MM/DD","YYYY/DD/MM","MM/YYYY","YYYY/MM","YYYY"],firstRowData=subscribersClone.subscribers[0][matchedColumn.index],validationRule=!1,""===firstRowData.trim()?(subscribersClone.subscribers[0][matchedColumn.index]='<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+MailPoet.I18n.t("emptyFirstRowDate")+"</span> ",preventNextStep=!0):Object.keys(allowedDateFormats).forEach(function(format){if(testedFormat=allowedDateFormats[format],Moment(firstRowData,testedFormat,!0).isValid())return validationRule="function"==typeof testedFormat?"datetime":testedFormat,void jQuery(matchedColumn.element).data("validation-rule",validationRule);"datetime"===validationRule&&(validationRule=Moment.ISO_8601)}),jQuery.map(subscribersClone.subscribers,function(dataSubscribers,index){var data=dataSubscribers,rowData=data[matchedColumn.index],date=Moment(rowData,testedFormat,!0);index!==fillerPosition&&""!==rowData.trim()&&(date.isValid()?data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match" title="'+MailPoet.I18n.t("verifyDateMatch")+'">'+MailPoet.Date.format(date)+"</span> "):(data[matchedColumn.index]=new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data[matchedColumn.index])+'<span class="mailpoet_data_match mailpoet_import_error" title="'+MailPoet.I18n.t("noDateFieldMatch")+'">'+new Handlebars.SafeString(MailPoet.I18n.t("dateMatchError"))+"</span> "),preventNextStep=!0))}),preventNextStep&&!jQuery(".mailpoet_invalidDate").length&&MailPoet.Notice.error(MailPoet.I18n.t("columnContainsInvalidDate"),{static:!0,scroll:!0,hideClose:!0,id:"invalidDate"}))}),jQuery("#subscribers_data > table > tbody").html(subscribersDataTemplatePartial(subscribersClone)),preventNextStep?toggleNextStepButton("off"):!jQuery(".mailpoet_notice.error:visible").length&&segmentSelectElement.val()&&toggleNextStepButton("on")}var nextStepButton,previousStepButton,subscribers,subscribersDataTemplate,subscribersDataTemplatePartial,subscribersDataParseResultsTemplate,segmentSelectElement,maxRowsToShow,filler,fillerArray,fillerPosition,importResults,duplicates;if(void 0===window.importData.step1)return void router.navigate("step1",{trigger:!0});nextStepButton=jQuery("#step2_process"),previousStepButton=jQuery("#return_to_step1"),subscribers=jQuery.extend(!0,{},window.importData.step1),subscribersDataTemplate=Handlebars.compile(jQuery("#subscribers_data_template").html()),subscribersDataTemplatePartial=Handlebars.compile(jQuery("#subscribers_data_template_partial").html()),subscribersDataParseResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_parse_results_template").html()),segmentSelectElement=jQuery("#mailpoet_segments_select"),maxRowsToShow=10,filler=". . .",fillerArray=Array.apply(null,new Array(subscribers.subscribers[0].length)).map(String.prototype.valueOf,filler),showCurrentStep(),jQuery("#subscribers_data_parse_results:visible").html(""),jQuery("#subscribers_data_import_results:visible").hide(),(subscribers.invalid.length||subscribers.duplicate.length)&&(duplicates={},subscribers.duplicate.forEach(function(subscriberEmail){duplicates[subscriberEmail]=(duplicates[subscriberEmail]||0)+1}),subscribers.duplicate=[],Object.keys(duplicates).forEach(function(email){duplicates[email]>1?subscribers.duplicate.push(email+" (x"+duplicates[email]+")"):subscribers.duplicate.push(email)}),importResults={notice:MailPoet.I18n.t("importNoticeSkipped").replace("%1$s","<strong>"+(subscribers.invalid.length+subscribers.duplicate.length)+"</strong>"),invalid:subscribers.invalid.length?MailPoet.I18n.t("importNoticeInvalid").replace("%1$s","<strong>"+subscribers.invalid.length.toLocaleString()+"</strong>").replace("%2$s",subscribers.invalid.join(", ")):null,duplicate:subscribers.duplicate.length?MailPoet.I18n.t("importNoticeDuplicate").replace("%1$s","<strong>"+subscribers.duplicate.length+"</strong>").replace("%2$s",subscribers.duplicate.join(", ")):null},jQuery("#subscribers_data_parse_results").html(subscribersDataParseResultsTemplate(importResults))),jQuery(".mailpoet_subscribers_data_parse_results_details_show").click(function(){var details=jQuery(".mailpoet_subscribers_data_parse_results_details");jQuery(details).toggle(),this.text=jQuery(details).is(":visible")?MailPoet.I18n.t("hideDetails"):MailPoet.I18n.t("showDetails")}),window.mailpoetSegments.length?jQuery(".mailpoet_segments").show():jQuery(".mailpoet_no_segments").show(),jQuery(".mailpoet_create_segment").click(function(){MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewList"),template:jQuery("#new_segment_template").html()}),jQuery("#new_segment_name").keypress(function(e){13===e.which&&jQuery("#new_segment_process").click()}),jQuery("#new_segment_process").click(function(){var segmentName=jQuery("#new_segment_name").val().trim(),segmentDescription=jQuery("#new_segment_description").val().trim();MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"addSegment",data:{name:segmentName,description:segmentDescription}}).done(function(response){var selectedValues;window.mailpoetSegments.push({id:response.data.id,name:response.data.name,subscriberCount:0}),selectedValues=segmentSelectElement.val(),null===selectedValues?selectedValues=[response.data.id]:selectedValues.push(response.data.id),enableSegmentSelection(window.mailpoetSegments),segmentSelectElement.val(selectedValues).trigger("change"),jQuery(".mailpoet_segments:hidden").show(),jQuery(".mailpoet_no_segments:visible").hide(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&(MailPoet.Notice.hide(),MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#new_segment_name"}))})}),jQuery("#new_segment_cancel").click(function(){MailPoet.Modal.close()})}),Handlebars.registerPartial("subscribers_data_template_partial",subscribersDataTemplatePartial),Handlebars.registerHelper("show_and_match_columns",function(helperSubscribers,options){var columnData,columnId,headerName,headerNameMatch,displayedColumns=[],displayedColumnsIds=[];return Object.keys(helperSubscribers.subscribers[0]).forEach(function(i){columnData=helperSubscribers.subscribers[0][i],columnId="ignore",columnData%1!=0&&window.mailpoet_email_regex.test(columnData)?columnId="email":helperSubscribers.header&&(headerName=helperSubscribers.header[i],headerNameMatch=window.mailpoetColumns.map(function(el){return el.name}).indexOf(headerName),-1!==headerNameMatch?columnId=window.mailpoetColumns[headerNameMatch].id:headerName&&(/first|first name|given name/i.test(headerName)?columnId="first_name":/last|last name/i.test(headerName)&&(columnId="last_name"))),columnId="ignore"!==columnId&&-1===displayedColumnsIds.indexOf(columnId)?columnId:"ignore",displayedColumns[i]={column_id:columnId},displayedColumnsIds.push(columnId)}),options.fn(displayedColumns)}),Handlebars.registerHelper("sanitize_data",function(data){return data instanceof Handlebars.SafeString?data:new Handlebars.SafeString(Handlebars.Utils.escapeExpression(data))}),Handlebars.registerHelper("calculate_index",function(rawIndex){var index=parseInt(rawIndex,10);return index===maxRowsToShow&&subscribers.subscribersCount>maxRowsToShow+1?(fillerPosition=index,filler):index===subscribers.subscribers.length-1?subscribers.subscribersCount.toLocaleString():index+1}),subscribers.subscribersCount>maxRowsToShow+1&&subscribers.subscribers.splice(maxRowsToShow,subscribers.subscribersCount-(maxRowsToShow+1),fillerArray),jQuery("#subscribers_data > table").html(subscribersDataTemplate(subscribers)),jQuery("select.mailpoet_subscribers_column_data_match").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}}).on("select2:selecting",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.args.data.id;"create"===selectedOptionId?(selectEvent.preventDefault(),jQuery(selectElement).select2("close"),MailPoet.Modal.popup({title:MailPoet.I18n.t("addNewField"),template:jQuery("#form_template_field_form").html()}),jQuery("#form_field_new").parsley().on("form:submit",function(){var data=jQuery(this.$element).mailpoetSerializeObject();return MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"customFields",action:"save",data:data}).done(function(response){var newColumnData={id:response.data.id,name:response.data.name,type:response.data.type,params:response.data.params,custom:!0};2===window.mailpoetColumnsSelect2.length&&window.mailpoetColumnsSelect2.push({name:MailPoet.I18n.t("userColumns"),children:[]}),window.mailpoetColumnsSelect2[2].children.push(newColumnData),window.mailpoetColumns.push(newColumnData),jQuery("select.mailpoet_subscribers_column_data_match").each(function(){jQuery(this).html("").select2("destroy").select2({data:window.mailpoetColumnsSelect2,width:"15em",templateResult:function(item){return item.name},templateSelection:function(item){return item.name}})}),jQuery(selectElement).data("column-id",newColumnData.id),jQuery(selectElement).data("validation-rule",!1),filterSubscribers(),MailPoet.Modal.close()}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{positionAfter:"#field_name"})}),!1})):jQuery("select.mailpoet_subscribers_column_data_match").each(function(){var element=this,elementId=jQuery(element).val();elementId===selectedOptionId&&"ignore"!==elementId&&(confirm(MailPoet.I18n.t("selectedValueAlreadyMatched")+" "+MailPoet.I18n.t("confirmCorrespondingColumn"))?jQuery(element).data("column-id","ignore"):(selectEvent.preventDefault(),jQuery(selectElement).select2("close")))})}).on("select2:select",function(selectEvent){var selectElement=this,selectedOptionId=selectEvent.params.data.id;jQuery(selectElement).data("column-id",selectedOptionId),filterSubscribers()}),previousStepButton.off().on("click",function(){router.navigate("step1",{trigger:!0})}),nextStepButton.off().on("click",function(){var clickSubscribers,splitSubscribers,columns={},queue=new jQuery.AsyncQueue,batchNumber=0,timestamp=Date.now()/1e3,clickImportResults={created:0,updated:0,errors:[],segments:[]};jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),splitSubscribers=function(localSubscribers,size){return localSubscribers.reduce(function(res,item,index){return index%size==0&&res.push([]),res[res.length-1].push(item),res},[])},clickSubscribers=splitSubscribers(window.importData.step1.subscribers,2e3),_.each(jQuery("select.mailpoet_subscribers_column_data_match"),function(column,columnIndex){var columnId=jQuery(column).data("column-id"),validationRule=jQuery(column).data("validation-rule");"ignore"!==columnId&&(columns[columnId]={index:columnIndex,validation_rule:validationRule})}),_.each(clickSubscribers,function(){queue.add(function(addQueue){addQueue.pause(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processImport",data:JSON.stringify({columns:columns,subscribers:clickSubscribers[batchNumber],timestamp:timestamp,segments:segmentSelectElement.val(),updateSubscribers:"yes"===jQuery(':radio[name="subscriber_update_option"]:checked').val()})}).done(function(response){clickImportResults.created+=response.data.created,clickImportResults.updated+=response.data.updated,clickImportResults.segments=response.data.segments,clickImportResults.added_to_segment_with_welcome_notification=response.data.added_to_segment_with_welcome_notification,addQueue.run()}).fail(function(response){MailPoet.Modal.loading(!1),response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}),batchNumber+=1})}),queue.run(),queue.onComplete(function(){MailPoet.Modal.loading(!1),clickImportResults.errors.length>0&&!clickImportResults.updated&&!clickImportResults.created?MailPoet.Notice.error(_.flatten(clickImportResults.errors)):(window.mailpoetSegments=clickImportResults.segments,clickImportResults.segments=_.map(segmentSelectElement.select2("data"),function(data){return data.name}),window.importData.step2=clickImportResults,enableSegmentSelection(window.mailpoetSegments),router.navigate("step3",{trigger:!0}))}))}),filterSubscribers(),enableSegmentSelection(window.mailpoetSegments)}),router.on("route:step3",function(){var subscribersDataImportResultsTemplate,exportMenuElement,importResults;if(void 0===window.importData.step2)return void router.navigate("step2",{trigger:!0});showCurrentStep(),window.importData.step2.errors.length>0&&MailPoet.Notice.error(_.flatten(window.importData.step2.errors)),MailPoet.trackEvent("Subscribers import finished",{"Subscribers created":window.importData.step2.created,"Subscribers updated":window.importData.step2.updated,"MailPoet Free version":window.mailpoet_version}),subscribersDataImportResultsTemplate=Handlebars.compile(jQuery("#subscribers_data_import_results_template").html()),exportMenuElement=jQuery("span.mailpoet_export"),importResults={created:!!window.importData.step2.created&&MailPoet.I18n.t("subscribersCreated").replace("%1$s","<strong>"+window.importData.step2.created.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),updated:!!window.importData.step2.updated&&MailPoet.I18n.t("subscribersUpdated").replace("%1$s","<strong>"+window.importData.step2.updated.toLocaleString()+"</strong>").replace("%2$s",'"'+window.importData.step2.segments.join('", "')+'"'),no_action:!window.importData.step2.created&&!window.importData.step2.updated,added_to_segment_with_welcome_notification:window.importData.step2.added_to_segment_with_welcome_notification},jQuery("#subscribers_data_import_results").html(subscribersDataImportResultsTemplate(importResults)).show(),jQuery("a.mailpoet_import_again").off().click(function(){jQuery("#subscribers_data_import_results").hide(),router.navigate("step1",{trigger:!0})}),jQuery("a.mailpoet_view_subscribers").off().click(function(){window.location.href="admin.php?page=mailpoet-subscribers"}),importResults.created&&exportMenuElement.not(":visible")&&exportMenuElement.show(),window.importData.step2=void 0}),Backbone.History.started||Backbone.history.start()})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},594:function(module,exports){/*!
|
2 |
+
Papa Parse
|
3 |
+
v4.1.1
|
4 |
+
https://github.com/mholt/PapaParse
|
5 |
+
*/
|
6 |
+
!function(e){"use strict";function t(t,r){if(r=r||{},r.worker&&w.WORKERS_SUPPORTED){var n=h();return n.userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=m(r.step),r.chunk=m(r.chunk),r.complete=m(r.complete),r.error=m(r.error),delete r.worker,void n.postMessage({input:t,config:r,workerId:n.id})}var o=null;return"string"==typeof t?o=r.download?new i(r):new a(r):(e.File&&t instanceof File||t instanceof Object)&&(o=new s(r)),o.stream(t)}function r(e,t){function n(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function i(e,t){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=e instanceof Array&&e.length>0,i=!(t[0]instanceof Array);if(n){for(var a=0;a<e.length;a++)a>0&&(r+=u),r+=s(e[a],a);t.length>0&&(r+=f)}for(var o=0;o<t.length;o++){for(var h=n?e.length:t[o].length,d=0;h>d;d++){d>0&&(r+=u);var c=n&&i?e[d]:d;r+=s(t[o][c],d)}o<t.length-1&&(r+=f)}return r}function s(e,t){return void 0===e||null===e?"":(e=e.toString().replace(/"/g,'""'),"boolean"==typeof o&&o||o instanceof Array&&o[t]||a(e,w.BAD_DELIMITERS)||e.indexOf(u)>-1||" "==e.charAt(0)||" "==e.charAt(e.length-1)?'"'+e+'"':e)}function a(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return!0;return!1}var o=!1,u=",",f="\r\n";if(function(){"object"==typeof t&&("string"==typeof t.delimiter&&1==t.delimiter.length&&-1==w.BAD_DELIMITERS.indexOf(t.delimiter)&&(u=t.delimiter),("boolean"==typeof t.quotes||t.quotes instanceof Array)&&(o=t.quotes),"string"==typeof t.newline&&(f=t.newline))}(),"string"==typeof e&&(e=JSON.parse(e)),e instanceof Array){if(!e.length||e[0]instanceof Array)return i(null,e);if("object"==typeof e[0])return i(n(e[0]),e)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),e.data instanceof Array&&(e.fields||(e.fields=e.data[0]instanceof Array?e.fields:n(e.data[0])),e.data[0]instanceof Array||"object"==typeof e.data[0]||(e.data=[e.data])),i(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input"}function n(t){function r(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),this._handle=new o(t),this._handle.streamer=this,this._config=t}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this._completeResults={data:[],errors:[],meta:{}},r.call(this,t),this.parseChunk=function(t){var r=this._partialLine+t;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var i=n.meta.cursor;this._finished||(this._partialLine=r.substring(i-this._baseIndex),this._baseIndex=i),n&&n.data&&(this._rowCount+=n.data.length);var s=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(k)e.postMessage({results:n,workerId:w.WORKER_ID,finished:s});else if(m(this._config.chunk)){if(this._config.chunk(n,this._handle),this._paused)return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),!s||!m(this._config.complete)||n&&n.meta.aborted||this._config.complete(this._completeResults),s||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(t){m(this._config.error)?this._config.error(t):k&&this._config.error&&e.postMessage({workerId:w.WORKER_ID,error:t,finished:!1})}}function i(e){function t(e){var t=e.getResponseHeader("Content-Range");return parseInt(t.substr(t.lastIndexOf("/")+1))}e=e||{},e.chunkSize||(e.chunkSize=w.RemoteChunkSize),n.call(this,e);var r;this._nextChunk=k?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(r=new XMLHttpRequest,k||(r.onload=g(this._chunkLoaded,this),r.onerror=g(this._chunkError,this)),r.open("GET",this._input,!k),this._config.chunkSize){var e=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+e),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(t){this._chunkError(t.message)}k&&0==r.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==r.readyState){if(r.status<200||r.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>t(r),this.parseChunk(r.responseText)}},this._chunkError=function(e){var t=r.statusText||e;this._sendError(t)}}function s(e){e=e||{},e.chunkSize||(e.chunkSize=w.LocalChunkSize),n.call(this,e);var t,r,i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,i?(t=new FileReader,t.onload=g(this._chunkLoaded,this),t.onerror=g(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function a(e){e=e||{},n.call(this,e);var t,r;this.stream=function(e){return t=e,r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):"",this._finished=!r,this.parseChunk(t)}}}function o(e){function t(){if(b&&c&&(f("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+w.DefaultDelimiter+"'"),c=!1),e.skipEmptyLines)for(var t=0;t<b.data.length;t++)1==b.data[t].length&&""==b.data[t][0]&&b.data.splice(t--,1);return r()&&n(),i()}function r(){return e.header&&0==y.length}function n(){if(b){for(var e=0;r()&&e<b.data.length;e++)for(var t=0;t<b.data[e].length;t++)y.push(b.data[e][t]);b.data.splice(0,1)}}function i(){if(!b||!e.header&&!e.dynamicTyping)return b;for(var t=0;t<b.data.length;t++){for(var r={},n=0;n<b.data[t].length;n++){if(e.dynamicTyping){var i=b.data[t][n];b.data[t][n]="true"==i||"TRUE"==i||"false"!=i&&"FALSE"!=i&&o(i)}e.header&&(n>=y.length?(r.__parsed_extra||(r.__parsed_extra=[]),r.__parsed_extra.push(b.data[t][n])):r[y[n]]=b.data[t][n])}e.header&&(b.data[t]=r,n>y.length?f("FieldMismatch","TooManyFields","Too many fields: expected "+y.length+" fields but parsed "+n,t):n<y.length&&f("FieldMismatch","TooFewFields","Too few fields: expected "+y.length+" fields but parsed "+n,t))}return e.header&&b.meta&&(b.meta.fields=y),b}function s(t){for(var r,n,i,s=[",","\t","|",";",w.RECORD_SEP,w.UNIT_SEP],a=0;a<s.length;a++){var o=s[a],f=0,h=0;i=void 0;for(var d=new u({delimiter:o,preview:10}).parse(t),c=0;c<d.data.length;c++){var l=d.data[c].length;h+=l,void 0!==i?l>1&&(f+=Math.abs(l-i),i=l):i=l}h/=d.data.length,(void 0===n||n>f)&&h>1.99&&(n=f,r=o)}return e.delimiter=r,{successful:!!r,bestDelimiter:r}}function a(e){e=e.substr(0,1048576);var t=e.split("\r");if(1==t.length)return"\n";for(var r=0,n=0;n<t.length;n++)"\n"==t[n][0]&&r++;return r>=t.length/2?"\r\n":"\r"}function o(e){return l.test(e)?parseFloat(e):e}function f(e,t,r,n){b.errors.push({type:e,code:t,message:r,row:n})}var h,d,c,l=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,p=this,g=0,v=!1,k=!1,y=[],b={data:[],errors:[],meta:{}};if(m(e.step)){var R=e.step;e.step=function(n){if(b=n,r())t();else{if(t(),0==b.data.length)return;g+=n.data.length,e.preview&&g>e.preview?d.abort():R(b,p)}}}this.parse=function(r,n,i){if(e.newline||(e.newline=a(r)),c=!1,!e.delimiter){var o=s(r);o.successful?e.delimiter=o.bestDelimiter:(c=!0,e.delimiter=w.DefaultDelimiter),b.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,h=r,d=new u(f),b=d.parse(h,n,i),t(),v?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return v},this.pause=function(){v=!0,d.abort(),h=h.substr(d.getCharIndex())},this.resume=function(){v=!1,p.streamer.parseChunk(h)},this.aborted=function(){return k},this.abort=function(){k=!0,d.abort(),b.meta.aborted=!0,m(e.complete)&&e.complete(b),h=""}}function u(e){e=e||{};var t=e.delimiter,r=e.newline,n=e.comments,i=e.step,s=e.preview,a=e.fastMode;if(("string"!=typeof t||w.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),n===t)throw"Comment character same as delimiter";!0===n?n="#":("string"!=typeof n||w.BAD_DELIMITERS.indexOf(n)>-1)&&(n=!1),"\n"!=r&&"\r"!=r&&"\r\n"!=r&&(r="\n");var o=0,u=!1;this.parse=function(e,f,h){function d(e){b.push(e),S=o}function c(t){return h?p():(t||(t=e.substr(o)),w.push(t),o=g,d(w),y&&_(),p())}function l(t){o=t,d(w),w=[],O=e.indexOf(r,o)}function p(e){return{data:b,errors:R,meta:{delimiter:t,linebreak:r,aborted:u,truncated:!!e,cursor:S+(f||0)}}}function _(){i(p()),b=[],R=[]}if("string"!=typeof e)throw"Input must be a string";var g=e.length,m=t.length,v=r.length,k=n.length,y="function"==typeof i;o=0;var b=[],R=[],w=[],S=0;if(!e)return p();if(a||!1!==a&&-1===e.indexOf('"')){for(var E=e.split(r),C=0;C<E.length;C++){var w=E[C];if(o+=w.length,C!==E.length-1)o+=r.length;else if(h)return p();if(!n||w.substr(0,k)!=n){if(y){if(b=[],d(w.split(t)),_(),u)return p()}else d(w.split(t));if(s&&C>=s)return b=b.slice(0,s),p(!0)}}return p()}for(var x=e.indexOf(t,o),O=e.indexOf(r,o);;)if('"'!=e[o])if(n&&0===w.length&&e.substr(o,k)===n){if(-1==O)return p();o=O+v,O=e.indexOf(r,o),x=e.indexOf(t,o)}else if(-1!==x&&(O>x||-1===O))w.push(e.substring(o,x)),o=x+m,x=e.indexOf(t,o);else{if(-1===O)break;if(w.push(e.substring(o,O)),l(O+v),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0)}else{var I=o;for(o++;;){var I=e.indexOf('"',I+1);if(-1===I)return h||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:o}),c();if(I===g-1){var D=e.substring(o,I).replace(/""/g,'"');return c(D)}if('"'!=e[I+1]){if(e[I+1]==t){w.push(e.substring(o,I).replace(/""/g,'"')),o=I+1+m,x=e.indexOf(t,o),O=e.indexOf(r,o);break}if(e.substr(I+1,v)===r){if(w.push(e.substring(o,I).replace(/""/g,'"')),l(I+1+v),x=e.indexOf(t,o),y&&(_(),u))return p();if(s&&b.length>=s)return p(!0);break}}else I++}}return c()},this.abort=function(){u=!0},this.getCharIndex=function(){return o}}function h(){if(!w.WORKERS_SUPPORTED)return!1;if(!y&&null===w.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var t=new e.Worker(w.SCRIPT_PATH||v);return t.onmessage=d,t.id=R++,b[t.id]=t,t}function d(e){var t=e.data,r=b[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i=function(){n=!0,c(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},s={abort:i,pause:l,resume:l};if(m(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else m(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&c(t.workerId,t.results)}function c(e,t){var r=b[e];m(r.userComplete)&&r.userComplete(t),r.terminate(),delete b[e]}function l(){throw"Not implemented."}function p(t){var r=t.data;if(void 0===w.WORKER_ID&&r&&(w.WORKER_ID=r.workerId),"string"==typeof r.input)e.postMessage({workerId:w.WORKER_ID,results:w.parse(r.input,r.config),finished:!0});else if(e.File&&r.input instanceof File||r.input instanceof Object){var n=w.parse(r.input,r.config);n&&e.postMessage({workerId:w.WORKER_ID,results:n,finished:!0})}}function _(e){if("object"!=typeof e)return e;var t=e instanceof Array?[]:{};for(var r in e)t[r]=_(e[r]);return t}function g(e,t){return function(){e.apply(t,arguments)}}function m(e){return"function"==typeof e}var v,k=!e.document&&!!e.postMessage,y=!1,b={},R=0,w={};if(w.parse=t,w.unparse=r,w.RECORD_SEP=String.fromCharCode(30),w.UNIT_SEP=String.fromCharCode(31),w.BYTE_ORDER_MARK="\ufeff",w.BAD_DELIMITERS=["\r","\n",'"',w.BYTE_ORDER_MARK],w.WORKERS_SUPPORTED=!!e.Worker,w.SCRIPT_PATH=null,w.LocalChunkSize=10485760,w.RemoteChunkSize=5242880,w.DefaultDelimiter=",",w.Parser=u,w.ParserHandle=o,w.NetworkStreamer=i,w.FileStreamer=s,w.StringStreamer=a,void 0!==module&&module.exports?module.exports=w:m(e.define)&&e.define.amd?e.define(function(){return w}):e.Papa=w,e.jQuery){var S=e.jQuery;S.fn.parse=function(t){function r(){if(0==a.length)return void(m(t.complete)&&t.complete());var e=a[0];if(m(t.before)){var r=t.before(e.file,e.inputElem);if("object"==typeof r){if("abort"==r.action)return void n("AbortError",e.file,e.inputElem,r.reason);if("skip"==r.action)return void i();"object"==typeof r.config&&(e.instanceConfig=S.extend(e.instanceConfig,r.config))}else if("skip"==r)return void i()}var s=e.instanceConfig.complete;e.instanceConfig.complete=function(t){m(s)&&s(t,e.file,e.inputElem),i()},w.parse(e.file,e.instanceConfig)}function n(e,r,n,i){m(t.error)&&t.error({name:e},r,n,i)}function i(){a.splice(0,1),r()}var s=t.config||{},a=[];return this.each(function(){if("INPUT"!=S(this).prop("tagName").toUpperCase()||"file"!=S(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0==this.files.length)return!0;for(var r=0;r<this.files.length;r++)a.push({file:this.files[r],inputElem:this,instanceConfig:S.extend({},s)})}),r(),this}}k?e.onmessage=p:w.WORKERS_SUPPORTED&&(v=function(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}(),document.body?document.addEventListener("DOMContentLoaded",function(){y=!0},!0):y=!0),i.prototype=Object.create(n.prototype),i.prototype.constructor=i,s.prototype=Object.create(n.prototype),s.prototype.constructor=s,a.prototype=Object.create(a.prototype),a.prototype.constructor=a}("undefined"!=typeof window?window:this)},595:function(module,exports){!function($){$.AsyncQueue=function(){var failureFunc,completeFunc,lastCallbackData,_run,that=this,queue=[],paused=!1;return _run=function(){var f=queue.shift();f?(f.apply(that,[that]),!1===paused&&_run()):completeFunc&&completeFunc.apply(that)},this.onFailure=function(func){failureFunc=func},this.onComplete=function(func){completeFunc=func},this.add=function(func){return queue.push(func),this},this.storeData=function(dataObject){return lastCallbackData=dataObject,this},this.lastCallbackData=function(){return lastCallbackData},this.run=function(){paused=!1,_run()},this.pause=function(){return paused=!0,this},this.failure=function(){if(paused=!0,failureFunc){var args=[that];for(i=0;i<arguments.length;i++)args.push(arguments[i]);failureFunc.apply(that,args)}},this}}(jQuery)},596:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(4),__webpack_require__(5),__webpack_require__(2),__webpack_require__(205)],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(_,jQuery,MailPoet,Handlebars){jQuery("#mailpoet_subscribers_export").length&&jQuery(document).ready(function(){function toggleNextStepButton(condition){"on"===condition?nextStepButton.removeClass("button-disabled"):nextStepButton.addClass("button-disabled")}var segmentsContainerElement,subscriberFieldsContainerElement,nextStepButton,renderSegmentsAndFields,subscribersExportTemplate;window.exportData.segments&&(subscribersExportTemplate=Handlebars.compile(jQuery("#mailpoet_subscribers_export_template").html()),jQuery("#mailpoet_subscribers_export > div.inside").html(subscribersExportTemplate(window.exportData)),segmentsContainerElement=jQuery("#export_lists"),subscriberFieldsContainerElement=jQuery("#export_columns"),nextStepButton=jQuery("a.mailpoet_export_process"),renderSegmentsAndFields=function(container,data){container.data("select2")&&container.html("").select2("destroy"),container.select2({data:data,width:"20em",templateResult:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name},templateSelection:function(item){return item.subscriberCount>0?item.name+" ("+parseInt(item.subscriberCount,10).toLocaleString()+")":item.name}}).on("select2:selecting",function(selectEvent){var allOptions,selectElement=this,selectedOptionId=selectEvent.params.args.data.id,fieldsToExclude=["select","deselect"];_.contains(fieldsToExclude,selectedOptionId)&&(selectEvent.preventDefault(),"deselect"===selectedOptionId?jQuery(selectElement).val("").trigger("change"):(allOptions=[],_.each(container.find("option"),function(field){_.contains(fieldsToExclude,field.value)||allOptions.push(field.value)}),jQuery(selectElement).val(allOptions).trigger("change")),jQuery(selectElement).select2("close"))}).on("change",function(){toggleNextStepButton(window.exportData.segments&&segmentsContainerElement.select2("data").length&&subscriberFieldsContainerElement.select2("data").length||!window.exportData.segments&&subscriberFieldsContainerElement.select2("data").length?"on":"off")})},window.segments.forEach(function(item){segmentsContainerElement.append(jQuery("<option></option>").attr("value",item.id).text(item.name))}),renderSegmentsAndFields(segmentsContainerElement,window.segments),renderSegmentsAndFields(subscriberFieldsContainerElement,window.subscriberFieldsSelect2),subscriberFieldsContainerElement.val(["email","first_name","last_name","list_status","global_status"]).trigger("change"),nextStepButton.click(function(){var exportFormat;jQuery(this).hasClass("button-disabled")||(MailPoet.Modal.loading(!0),exportFormat=jQuery(':radio[name="option_format"]:checked').val(),MailPoet.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"ImportExport",action:"processExport",data:JSON.stringify({export_format_option:exportFormat,segments:!!window.exportData.segments&&segmentsContainerElement.val(),subscriber_fields:subscriberFieldsContainerElement.val()})}).always(function(){MailPoet.Modal.loading(!1)}).done(function(response){var resultMessage=MailPoet.I18n.t("exportMessage").replace("%1$s","<strong>"+parseInt(response.data.totalExported,10).toLocaleString()+"</strong>").replace("[link]",'<a href="'+response.data.exportFileURL+'" target="_blank" >').replace("[/link]","</a>");jQuery("#export_result_notice").html("<p>"+resultMessage+"</p>").show(),window.location.href=response.data.exportFileURL,MailPoet.trackEvent("Subscribers export completed",{"Total exported":response.data.totalExported,"File Format":exportFormat,"MailPoet Free version":window.mailpoet_version})}).fail(function(response){response.errors.length>0&&MailPoet.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})}))}))})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},597:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_1_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__),__WEBPACK_IMPORTED_MODULE_2_react_router_dom__=__webpack_require__(14),__WEBPACK_IMPORTED_MODULE_3__steps_controller_jsx__=__webpack_require__(598),container=document.getElementById("welcome_wizard_container");container&&__WEBPACK_IMPORTED_MODULE_1_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.a,null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",null,__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{exact:!0,path:"/",render:function(){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.c,{to:"/steps/1"})}}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2_react_router_dom__.d,{path:"/steps/:step",component:__WEBPACK_IMPORTED_MODULE_3__steps_controller_jsx__.a}))),container)},598:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__=__webpack_require__(224),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__=__webpack_require__(29),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_8_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_8_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_prop_types__),__WEBPACK_IMPORTED_MODULE_9_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_9_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__),__WEBPACK_IMPORTED_MODULE_10_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mailpoet__),__WEBPACK_IMPORTED_MODULE_11__header_jsx__=__webpack_require__(599),__WEBPACK_IMPORTED_MODULE_12__steps_sender_step_jsx__=__webpack_require__(601),__WEBPACK_IMPORTED_MODULE_13__steps_migrated_user_step_jsx__=__webpack_require__(602),__WEBPACK_IMPORTED_MODULE_14__steps_help_info_step_jsx__=__webpack_require__(603),__WEBPACK_IMPORTED_MODULE_15__steps_usage_tracking_step_jsx__=__webpack_require__(604),__WEBPACK_IMPORTED_MODULE_16__steps_woo_commerce_step_jsx__=__webpack_require__(605),WelcomeWizardStepsController=function(_React$Component){function WelcomeWizardStepsController(props){var _this;return __WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_classCallCheck___default()(this,WelcomeWizardStepsController),_this=__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_getPrototypeOf___default()(WelcomeWizardStepsController).call(this,props)),_this.state={stepsCount:window.is_woocommerce_active?4:3,shouldSetSender:!window.is_mp2_migration_complete,loading:!1,sender:window.sender_data},_this.finishWizard=_this.finishWizard.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.updateSettings=_this.updateSettings.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.activateTracking=_this.activateTracking.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.updateSender=_this.updateSender.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.submitSender=_this.submitSender.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.showWooCommerceStepOrFinish=_this.showWooCommerceStepOrFinish.bind(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.componentDidUpdate(),_this}return __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_inherits___default()(WelcomeWizardStepsController,_React$Component),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_createClass___default()(WelcomeWizardStepsController,[{key:"componentDidUpdate",value:function(){var step=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(this.props.match.params.step,10);(step>this.state.stepsCount||step<1)&&this.props.history.push("/steps/1")}},{key:"finishWizard",value:function(){this.setState({loading:!0}),window.location=window.finish_wizard_url}},{key:"showWooCommerceStepOrFinish",value:function(){4===this.state.stepsCount?this.props.history.push("/steps/4"):this.finishWizard()}},{key:"updateSettings",value:function(data){var _this2=this;return this.setState({loading:!0}),__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:data}).then(function(){return _this2.setState({loading:!1})}).fail(function(response){_this2.setState({loading:!1}),response.errors.length>0&&__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.Notice.error(response.errors.map(function(error){return error.message}),{scroll:!0})})}},{key:"activateTracking",value:function(){var _this3=this;this.updateSettings({analytics:{enabled:!0}}).then(function(){return _this3.showWooCommerceStepOrFinish()})}},{key:"updateSender",value:function(data){this.setState({sender:__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default()({},this.state.sender,data)})}},{key:"submitSender",value:function(){var _this4=this;this.updateSettings({sender:this.state.sender}).then(function(){return _this4.props.history.push("/steps/2")})}},{key:"render",value:function(){var _this5=this,step=__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_core_js_parse_int___default()(this.props.match.params.step,10);return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__header_jsx__.a,{current_step:step,steps_count:this.state.stepsCount,logo_src:window.mailpoet_logo_url}),1===step&&this.state.shouldSetSender?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__steps_sender_step_jsx__.a,{update_sender:this.updateSender,submit_sender:this.submitSender,finish:this.finishWizard,loading:this.state.loading,sender:this.state.sender}):null,1!==step||this.state.shouldSetSender?null:__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__steps_migrated_user_step_jsx__.a,{next:function(){return _this5.props.history.push("/steps/2")}}),2===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__steps_help_info_step_jsx__.a,{next:function(){return _this5.props.history.push("/steps/3")}}):null,3===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__steps_usage_tracking_step_jsx__.a,{skip_action:this.showWooCommerceStepOrFinish,allow_action:this.activateTracking,allow_text:4===this.state.stepsCount?__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allowAndContinue"):__WEBPACK_IMPORTED_MODULE_10_mailpoet___default.a.I18n.t("allowAndFinish"),loading:this.state.loading}):null,4===step?__WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__steps_woo_commerce_step_jsx__.a,{next:this.finishWizard,screenshot_src:window.woocommerce_screenshot_url,loading:this.state.loading}):null)}}]),WelcomeWizardStepsController}(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);WelcomeWizardStepsController.propTypes={match:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({params:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({step:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.string}).isRequired}).isRequired,history:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.shape({push:__WEBPACK_IMPORTED_MODULE_8_prop_types___default.a.func.isRequired}).isRequired},__webpack_exports__.a=WelcomeWizardStepsController},599:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2__common_stepped_progess_bar_jsx__=__webpack_require__(600),WelcomeWizardHeader=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_centered_column mailpoet_welcome_wizard_header"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("img",{src:props.logo_src,width:"200",alt:"MailPoet logo"}),props.current_step<=props.steps_count?__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__common_stepped_progess_bar_jsx__.a,{steps_count:props.steps_count,step:props.current_step}):null)};WelcomeWizardHeader.propTypes={current_step:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,steps_count:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired,logo_src:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired},__webpack_exports__.a=WelcomeWizardHeader},600:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__=__webpack_require__(321),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),SteppedProgressBar=function(props){return props.step>props.steps_count?null:__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_stepped_progress_bar"},__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_toConsumableArray___default()(Array(props.steps_count).keys()).map(function(step){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_stepped_progress_bar_step ".concat(step<props.step?"active":""),key:"step_".concat(step),style:{width:"".concat(Math.floor(100/props.steps_count),"%")}})}))};SteppedProgressBar.propTypes={steps_count:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,step:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired},__webpack_exports__.a=SteppedProgressBar},601:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_jquery__=__webpack_require__(5),__WEBPACK_IMPORTED_MODULE_3_jquery___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_jquery__),WelcomeWizardSenderStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardLetsStartTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardSenderText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("form",{id:"mailpoet_sender_form",className:"mailpoet_welcome_wizard_centered_column ".concat(props.loading?"mailpoet_sender_form_loading":""),onSubmit:function(e){e.preventDefault(),__WEBPACK_IMPORTED_MODULE_3_jquery___default()("#mailpoet_sender_form").parsley().validate()&&props.submit_sender()}},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("label",{htmlFor:"senderName"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderName"),":",__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{name:"senderName",type:"text",placeholder:"John Doe",value:props.sender?props.sender.name:"","data-parsley-required":!0,onChange:function(e){return props.update_sender({name:e.target.value})}})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("label",{htmlFor:"senderAddress"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("senderAddress"),":",__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{name:"senderAddress",type:"text",placeholder:"john@doe.com",value:props.sender?props.sender.address:"","data-parsley-required":!0,"data-parsley-type":"email",onChange:function(e){return props.update_sender({address:e.target.value})}})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("input",{className:"button button-primary",type:"submit",value:__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next")}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{onClick:props.finish,href:"#finish"},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("noThanksSkip"))))};WelcomeWizardSenderStep.propTypes={finish:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired,update_sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,submit_sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,sender:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({name:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,address:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string})},WelcomeWizardSenderStep.defaultProps={sender:null},__webpack_exports__.a=WelcomeWizardSenderStep},602:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),WelcomeWizardMigratedUserStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardLetsStartTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardSenderMigratedUserText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next"))))};WelcomeWizardMigratedUserStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired},__webpack_exports__.a=WelcomeWizardMigratedUserStep},603:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_string_replace__),WelcomeWizardHelpInfoStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_welcome_wizard_support_button"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardYouCanContactText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)}))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_badge mailpoet_badge_video mailpoet_welcome_wizard_video_badge"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"dashicons dashicons-format-video"}),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("seeVideoGuide")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardAboutVideosText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)}))),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_help_info_block"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{className:"mailpoet_welcome_wizard_mail_icon"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardAboutCourseText"),/\[strong\](.*?)\[\/strong\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("strong",{key:match},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("iframe",{id:"mailpoet_form_iframe",width:"100%",scrolling:"no",frameBorder:"0",title:"Apply to course",src:"https://newsletters.mailpoet.com?mailpoet_form_iframe=13",className:"mailpoet_form_iframe",marginWidth:"0",marginHeight:"0",allowtransparency:"true"})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("next")))};WelcomeWizardHelpInfoStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired},__webpack_exports__.a=WelcomeWizardHelpInfoStep},604:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_react_string_replace__=__webpack_require__(36),__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_string_replace__),WelcomeWizardUsageTrackingStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardUsageTrackingStepTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_3_react_string_replace___default()(__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardTrackingText"),/\[link\](.*?)\[\/link\]/g,function(match){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("a",{key:"docs_link",href:"https://beta.docs.mailpoet.com/article/130-sharing-your-data-with-us",target:"_blank",rel:"noopener noreferrer"},match)})),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button",onClick:props.skip_action,disabled:props.loading},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("skip")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.allow_action,disabled:props.loading},props.allow_text)))};WelcomeWizardUsageTrackingStep.propTypes={allow_action:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,allow_text:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,skip_action:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired},__webpack_exports__.a=WelcomeWizardUsageTrackingStep},605:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),WelcomeWizardWooCommerceStep=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_content mailpoet_welcome_wizard_centered_column"},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardWooCommerceStepTitle")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardHelpingShopOwnersText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("welcomeWizardWooCommerceEmailsText")),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("img",{src:props.screenshot_src,className:"mailpoet_welcome_wizard_woo_screenshot",alt:"WooCommerce email"}),__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("div",{className:"mailpoet_welcome_wizard_step_controls\n ".concat(props.loading?"mailpoet_welcome_wizard_step_controls_loading":"")},__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("button",{className:"button button-primary",onClick:props.next,disabled:props.loading},__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("gotIt"))))};WelcomeWizardWooCommerceStep.propTypes={next:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,screenshot_src:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string.isRequired,loading:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool.isRequired},__webpack_exports__.a=WelcomeWizardWooCommerceStep},606:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react_dom__=__webpack_require__(19),__WEBPACK_IMPORTED_MODULE_0_react_dom___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_dom__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2__new_subscriber_announcement_jsx__=__webpack_require__(607),container=document.getElementById("new_subscriber_announcement");container&&__WEBPACK_IMPORTED_MODULE_0_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__new_subscriber_announcement_jsx__.a,{installedAt:window.mailpoet_installed_at,imageUrl:window.mailpoet_new_subscriber_announcement_image}),container)},607:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_0_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_mailpoet__),__WEBPACK_IMPORTED_MODULE_3_moment__=__webpack_require__(0),__WEBPACK_IMPORTED_MODULE_3_moment___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_moment__),__WEBPACK_IMPORTED_MODULE_4_announcements_in_app_announcement_jsx__=__webpack_require__(608),NewSubscriberNotificationAnnouncement=function(props){return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_announcements_in_app_announcement_jsx__.a,{validUntil:__WEBPACK_IMPORTED_MODULE_3_moment___default()(props.installedAt).add(3,"months").toDate(),height:"700px",showOnlyOnceSlug:"new_subscriber_notification",showToNewUser:!1},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div",{className:"new_subscriber_notification_announcement"},__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("h1",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementHeader")),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("img",{src:props.imageUrl,width:"600px",height:"460px",alt:""}),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementParagraph1"),__WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("br",null),__WEBPACK_IMPORTED_MODULE_2_mailpoet___default.a.I18n.t("announcementParagraph2"))))};NewSubscriberNotificationAnnouncement.propTypes={installedAt:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,imageUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired},__webpack_exports__.a=NewSubscriberNotificationAnnouncement},608:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__=__webpack_require__(224),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign__),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__=__webpack_require__(6),__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck__),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__=__webpack_require__(7),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass__),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__=__webpack_require__(8),__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn__),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__=__webpack_require__(9),__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf__),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__=__webpack_require__(10),__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits__),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__=__webpack_require__(12),__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized__),__WEBPACK_IMPORTED_MODULE_7_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_7_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__),__WEBPACK_IMPORTED_MODULE_8_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_8_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__),__WEBPACK_IMPORTED_MODULE_9_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_mailpoet__),__WEBPACK_IMPORTED_MODULE_10__in_app_announcement_dot_jsx__=__webpack_require__(609),InAppAnnouncement=function(_React$Component){function InAppAnnouncement(props){var _this;return __WEBPACK_IMPORTED_MODULE_1__babel_runtime_corejs2_helpers_classCallCheck___default()(this,InAppAnnouncement),_this=__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_helpers_possibleConstructorReturn___default()(this,__WEBPACK_IMPORTED_MODULE_4__babel_runtime_corejs2_helpers_getPrototypeOf___default()(InAppAnnouncement).call(this,props)),_this.saveDisplayed=_this.saveDisplayed.bind(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_helpers_assertThisInitialized___default()(_this))),_this.state={announcementsSettings:window.mailpoet_in_app_announcements||null},_this}return __WEBPACK_IMPORTED_MODULE_5__babel_runtime_corejs2_helpers_inherits___default()(InAppAnnouncement,_React$Component),__WEBPACK_IMPORTED_MODULE_2__babel_runtime_corejs2_helpers_createClass___default()(InAppAnnouncement,[{key:"saveDisplayed",value:function(){var _this2=this,settings=__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_object_assign___default()({},this.state.announcementsSettings);return settings.displayed.push(this.props.showOnlyOnceSlug),__WEBPACK_IMPORTED_MODULE_9_mailpoet___default.a.Ajax.post({api_version:window.mailpoet_api_version,endpoint:"settings",action:"set",data:{in_app_announcements:settings}}).always(function(){return _this2.setState({announcementsSettings:settings})})}},{key:"render",value:function(){var _this3=this;return null!==this.props.showToNewUser&&window.mailpoet_is_new_user!==this.props.showToNewUser?null:null!==this.props.validUntil&&this.props.validUntil<new Date?null:null!==this.props.showToPremiumUser&&window.mailpoet_premium_active!==this.props.showToPremiumUser?null:this.props.showOnlyOnceSlug&&this.state.announcementsSettings.displayed.includes(this.props.showOnlyOnceSlug)?null:__WEBPACK_IMPORTED_MODULE_8_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__in_app_announcement_dot_jsx__.a,{className:this.props.className,width:this.props.width,height:this.props.height,onUserTrigger:function(){_this3.props.showOnlyOnceSlug&&_this3.saveDisplayed()}},this.props.children)}}]),InAppAnnouncement}(__WEBPACK_IMPORTED_MODULE_8_react___default.a.Component),validateBooleanWithWindowDependency=function(props,propName,componentName,windowProperty){var propValue=props[propName];return null!==propValue&&!0!==propValue&&!1!==propValue?new Error("Invalid property in ".concat(componentName,". newUser must be of type boolean")):null!==propValue&&void 0===window[windowProperty]?new Error("Missing data for evaluation of ".concat(componentName," display condition. ").concat(propName," requires window.").concat(windowProperty)):null};InAppAnnouncement.propTypes={width:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,height:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,className:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,children:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.element.isRequired,validUntil:__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.instanceOf(Date),showToNewUser:function(props,propName,componentName){return validateBooleanWithWindowDependency(props,propName,componentName,"mailpoet_is_new_user")},showToPremiumUser:function(props,propName,componentName){return validateBooleanWithWindowDependency(props,propName,componentName,"mailpoet_premium_active")},showOnlyOnceSlug:function(props,propName,componentName){var propValue=props[propName];return null!==propValue&&"string"!=typeof propValue?new Error("Invalid property in ".concat(componentName,". ").concat(propName," must be of type string")):null===propValue?null:void 0===window.mailpoet_in_app_announcements?new Error("Missing data for evaluation of ".concat(componentName," display condition. ").concat(propName," requires window.mailpoet_in_app_announcements")):null}},InAppAnnouncement.defaultProps={width:"900px",height:"600px",className:null,validUntil:null,showToNewUser:null,showToPremiumUser:null,showOnlyOnceSlug:null},__webpack_exports__.a=InAppAnnouncement},609:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_0_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__),__WEBPACK_IMPORTED_MODULE_1_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_1_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__),__WEBPACK_IMPORTED_MODULE_2_react_dom_server__=__webpack_require__(375),__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom_server__),__WEBPACK_IMPORTED_MODULE_3_classnames__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_3_classnames___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_classnames__),__WEBPACK_IMPORTED_MODULE_4_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_4_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_mailpoet__),InAppAnnouncementDot=function(props){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement("span",{role:"button",tabIndex:"-1",className:__WEBPACK_IMPORTED_MODULE_3_classnames___default()("mailpoet_in_app_announcement_pulsing_dot",props.className),onClick:function(){__WEBPACK_IMPORTED_MODULE_4_mailpoet___default.a.Modal.popup({template:__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default.a.renderToString(props.children),width:props.width,height:props.height}),props.onUserTrigger&&props.onUserTrigger()}})};InAppAnnouncementDot.propTypes={children:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.element.isRequired,width:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,height:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,className:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,onUserTrigger:__WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func},InAppAnnouncementDot.defaultProps={width:"auto",height:"auto",className:null,onUserTrigger:null},__webpack_exports__.a=InAppAnnouncementDot},610:function(module,exports,__webpack_require__){"use strict";function aa(a,b,e,c,g,d,h,f){if(!a){if(a=void 0,void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var B=[e,c,g,d,h,f],A=0;a=Error(b.replace(/%s/g,function(){return B[A++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}function u(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)e+="&args[]="+encodeURIComponent(arguments[c+1]);aa(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e)}function M(a){if(null==a)return null;if("function"==typeof a)return a.displayName||a.name||null;if("string"==typeof a)return a;switch(a){case G:return"ConcurrentMode";case z:return"Fragment";case y:return"Portal";case D:return"Profiler";case C:return"StrictMode";case I:return"Suspense"}if("object"==typeof a)switch(a.$$typeof){case F:return"Context.Consumer";case E:return"Context.Provider";case H:var b=a.render;return b=b.displayName||b.name||"",a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case J:return M(a.type);case L:if(a=1===a._status?a._result:null)return M(a)}return null}function N(a,b){for(var e=a._threadCount;e<=b;e++)a[e]=a._currentValue2,a._threadCount=e+1}function da(a,b,e){var c=a.contextType;if("object"==typeof c&&null!==c)return N(c,e),c[e];if(a=a.contextTypes){e={};for(var g in a)e[g]=b[g];b=e}else b=ca;return b}function ja(a){return!!fa.call(ia,a)||!fa.call(ha,a)&&(ea.test(a)?ia[a]=!0:(ha[a]=!0,!1))}function ka(a,b,e,c){if(null!==e&&0===e.type)return!1;switch(typeof b){case"function":case"symbol":return!0;case"boolean":return!c&&(null!==e?!e.acceptsBooleans:"data-"!==(a=a.toLowerCase().slice(0,5))&&"aria-"!==a);default:return!1}}function la(a,b,e,c){if(null===b||void 0===b||ka(a,b,e,c))return!0;if(c)return!1;if(null!==e)switch(e.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Q(a,b,e,c,g){this.acceptsBooleans=2===b||3===b||4===b,this.attributeName=c,this.attributeNamespace=g,this.mustUseProperty=e,this.propertyName=a,this.type=b}function T(a){return a[1].toUpperCase()}function U(a){if("boolean"==typeof a||"number"==typeof a)return""+a;a=""+a;var b=ma.exec(a);if(b){var c,e="",g=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}g!==c&&(e+=a.substring(g,c)),g=c+1,e+=b}a=g!==c?e+a.substring(g,c):e}return a}function oa(a,b,e,c){for(;na;)na=!1,e=a(b,c);return e}function ra(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Aa(a){if(void 0===a||null===a)return a;var b="";return q.Children.forEach(a,function(a){null!=a&&(b+=a)}),b}function Da(a,b){void 0===a&&u("152",M(b)||"Component")}function Ea(a,b,e){for(;q.isValidElement(a);){var g=a,d=g.type;if("function"!=typeof d)break;!function(g,c){var d=da(c,b,e),f=[],h=!1,l={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===f)return null},enqueueReplaceState:function(a,b){h=!0,f=[b]},enqueueSetState:function(a,b){if(null===f)return null;f.push(b)}},k=void 0;if(c.prototype&&c.prototype.isReactComponent){if(k=new c(g.props,d,l),"function"==typeof c.getDerivedStateFromProps){var r=c.getDerivedStateFromProps.call(null,g.props,k.state);null!=r&&(k.state=p({},k.state,r))}}else if(k=c(g.props,d,l),null==(k=oa(c,g.props,k,d))||null==k.render)return a=k,void Da(a,c);if(k.props=g.props,k.context=d,k.updater=l,l=k.state,void 0===l&&(k.state=l=null),"function"==typeof k.UNSAFE_componentWillMount||"function"==typeof k.componentWillMount)if("function"==typeof k.componentWillMount&&"function"!=typeof c.getDerivedStateFromProps&&k.componentWillMount(),"function"==typeof k.UNSAFE_componentWillMount&&"function"!=typeof c.getDerivedStateFromProps&&k.UNSAFE_componentWillMount(),f.length){l=f;var m=h;if(f=null,h=!1,m&&1===l.length)k.state=l[0];else{r=m?l[0]:k.state;var t=!0;for(m=m?1:0;m<l.length;m++){var v=l[m];null!=(v="function"==typeof v?v.call(k,r,g.props,d):v)&&(t?(t=!1,r=p({},r,v)):p(r,v))}k.state=r}}else f=null;if(a=k.render(),Da(a,c),g=void 0,"function"==typeof k.getChildContext&&"object"==typeof(d=c.childContextTypes)){g=k.getChildContext();for(var K in g)K in d||u("108",M(c)||"Unknown",K)}g&&(b=p({},b,g))}(g,d)}return{child:a,context:b}}for(var p=__webpack_require__(43),q=__webpack_require__(1),w="function"==typeof Symbol&&Symbol.for,y=w?Symbol.for("react.portal"):60106,z=w?Symbol.for("react.fragment"):60107,C=w?Symbol.for("react.strict_mode"):60108,D=w?Symbol.for("react.profiler"):60114,E=w?Symbol.for("react.provider"):60109,F=w?Symbol.for("react.context"):60110,G=w?Symbol.for("react.concurrent_mode"):60111,H=w?Symbol.for("react.forward_ref"):60112,I=w?Symbol.for("react.suspense"):60113,J=w?Symbol.for("react.memo"):60115,L=w?Symbol.for("react.lazy"):60116,ba=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ca={},O=new Uint16Array(16),P=0;15>P;P++)O[P]=P+1;O[15]=0;var ea=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fa=Object.prototype.hasOwnProperty,ha={},ia={},R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){R[a]=new Q(a,0,!1,a,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];R[b]=new Q(b,1,!1,a[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){R[a]=new Q(a,2,!1,a.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){R[a]=new Q(a,2,!1,a,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){R[a]=new Q(a,3,!1,a.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(a){R[a]=new Q(a,3,!0,a,null)}),["capture","download"].forEach(function(a){R[a]=new Q(a,4,!1,a,null)}),["cols","rows","size","span"].forEach(function(a){R[a]=new Q(a,6,!1,a,null)}),["rowSpan","start"].forEach(function(a){R[a]=new Q(a,5,!1,a.toLowerCase(),null)});var S=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(S,T);R[b]=new Q(b,1,!1,a,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(S,T);R[b]=new Q(b,1,!1,a,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(S,T);R[b]=new Q(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")}),R.tabIndex=new Q("tabIndex",1,!1,"tabindex",null);var ma=/["'&<>]/,na=!1,V=0,pa={readContext:function(a){var b=V;return N(a,b),a[b]}},qa={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},sa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ta=p({menuitem:!0},sa),W={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ua=["Webkit","ms","Moz","O"];Object.keys(W).forEach(function(a){ua.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1),W[b]=W[a]})});var va=/([A-Z])/g,wa=/^ms-/,X=q.Children.toArray,Y=ba.ReactCurrentOwner,xa={listing:!0,pre:!0,textarea:!0},ya=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,za={},Z={},Ba=Object.prototype.hasOwnProperty,Ca={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},Fa=function(){function a(b,e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");q.isValidElement(b)?b.type!==z?b=[b]:(b=b.props.children,b=q.isValidElement(b)?[b]:X(b)):b=X(b),b={type:null,domNamespace:qa.html,children:b,childIndex:0,context:ca,footer:""};var c=O[0];if(0===c){var g=O;c=g.length;var d=2*c;65536>=d||u("304");var h=new Uint16Array(d);for(h.set(g),O=h,O[0]=c+1,g=c;g<d-1;g++)O[g]=g+1;O[d-1]=0}else O[0]=O[c];this.threadID=c,this.stack=[b],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=e,this.suspenseDepth=0,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return a.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0;var a=this.threadID;O[a]=O[0],O[0]=a}},a.prototype.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,g=this.threadID;N(c,g);var d=c[g];this.contextStack[b]=c,this.contextValueStack[b]=d,c[g]=a.props.value},a.prototype.popProvider=function(){var a=this.contextIndex,e=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null,this.contextValueStack[a]=null,this.contextIndex--,e[this.threadID]=c},a.prototype.read=function(a){if(this.exhausted)return null;var b=V;V=this.threadID;var c=Y.currentDispatcher;Y.currentDispatcher=pa;try{for(var g=[""],d=!1;g[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;O[h]=O[0],O[0]=h;break}var f=this.stack[this.stack.length-1];if(d||f.childIndex>=f.children.length){var B=f.footer;if(""!==B&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===f.type)this.currentSelectValue=null;else if(null!=f.type&&null!=f.type.type&&f.type.type.$$typeof===E)this.popProvider(f.type);else if(f.type===I){this.suspenseDepth--;var A=g.pop();if(d){d=!1;var n=f.fallbackFrame;n||u("303"),this.stack.push(n);continue}g[this.suspenseDepth]+=A}g[this.suspenseDepth]+=B}else{var l=f.children[f.childIndex++],k="";try{k+=this.render(l,f.context,f.domNamespace)}catch(r){throw r}g.length<=this.suspenseDepth&&g.push(""),g[this.suspenseDepth]+=k}}return g[0]}finally{Y.currentDispatcher=c,V=b}},a.prototype.render=function(a,e,c){if("string"==typeof a||"number"==typeof a)return""===(c=""+a)?"":this.makeStaticMarkup?U(c):this.previousWasTextNode?"\x3c!-- --\x3e"+U(c):(this.previousWasTextNode=!0,U(c));if(e=Ea(a,e,this.threadID),a=e.child,e=e.context,null===a||!1===a)return"";if(!q.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===y&&u("257"),u("258",b.toString())}return a=X(a),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""}),""}if("string"==typeof(b=a.type))return this.renderDOM(a,e,c);switch(b){case C:case G:case D:case z:return a=X(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""}),"";case I:u("294")}if("object"==typeof b&&null!==b)switch(b.$$typeof){case H:var d=b.render(a.props,a.ref);return d=oa(b.render,a.props,d,a.ref),d=X(d),this.stack.push({type:null,domNamespace:c,children:d,childIndex:0,context:e,footer:""}),"";case J:return a=[q.createElement(b.type,p({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:e,footer:""}),"";case E:return b=X(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""},this.pushProvider(a),this.stack.push(c),"";case F:b=a.type,d=a.props;var h=this.threadID;return N(b,h),b=X(d.children(b[h])),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:e,footer:""}),"";case L:u("295")}u("130",null==b?b:typeof b,"")},a.prototype.renderDOM=function(a,e,c){var b=a.type.toLowerCase();c===qa.html&&ra(b),za.hasOwnProperty(b)||(ya.test(b)||u("65",b),za[b]=!0);var d=a.props;if("input"===b)d=p({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===b){var h=d.value;if(null==h){h=d.defaultValue;var f=d.children;null!=f&&(null!=h&&u("92"),Array.isArray(f)&&(1>=f.length||u("93"),f=f[0]),h=""+f),null==h&&(h="")}d=p({},d,{value:void 0,children:""+h})}else if("select"===b)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=p({},d,{value:void 0});else if("option"===b){f=this.currentSelectValue;var B=Aa(d.children);if(null!=f){var A=null!=d.value?d.value+"":B;if(h=!1,Array.isArray(f)){for(var n=0;n<f.length;n++)if(""+f[n]===A){h=!0;break}}else h=""+f===A;d=p({selected:void 0,children:void 0},d,{selected:h,children:B})}}(h=d)&&(ta[b]&&(null!=h.children||null!=h.dangerouslySetInnerHTML)&&u("137",b,""),null!=h.dangerouslySetInnerHTML&&(null!=h.children&&u("60"),"object"==typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML||u("61")),null!=h.style&&"object"!=typeof h.style&&u("62","")),h=d,f=this.makeStaticMarkup,B=1===this.stack.length,A="<"+a.type;for(x in h)if(Ba.call(h,x)){var l=h[x];if(null!=l){if("style"===x){n=void 0;var k="",r="";for(n in l)if(l.hasOwnProperty(n)){var m=0===n.indexOf("--"),t=l[n];if(null!=t){var v=n;if(Z.hasOwnProperty(v))v=Z[v];else{var K=v.replace(va,"-$1").toLowerCase().replace(wa,"-ms-");v=Z[v]=K}k+=r+v+":",r=n,m=null==t||"boolean"==typeof t||""===t?"":m||"number"!=typeof t||0===t||W.hasOwnProperty(r)&&W[r]?(""+t).trim():t+"px",k+=m,r=";"}}l=k||null}n=null;b:if(m=b,t=h,-1===m.indexOf("-"))m="string"==typeof t.is;else switch(m){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":m=!1;break b;default:m=!0}m?Ca.hasOwnProperty(x)||(n=x,n=ja(n)&&null!=l?n+'="'+U(l)+'"':""):(m=x,n=l,l=R.hasOwnProperty(m)?R[m]:null,(t="style"!==m)&&(t=null!==l?0===l.type:2<m.length&&("o"===m[0]||"O"===m[0])&&("n"===m[1]||"N"===m[1])),t||la(m,n,l,!1)?n="":null!==l?(m=l.attributeName,l=l.type,n=3===l||4===l&&!0===n?m+'=""':m+'="'+U(n)+'"'):n=ja(m)?m+'="'+U(n)+'"':""),n&&(A+=" "+n)}}f||B&&(A+=' data-reactroot=""');var x=A;h="",sa.hasOwnProperty(b)?x+="/>":(x+=">",h="</"+a.type+">");a:{if(null!=(f=d.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break a}}else if("string"==typeof(f=d.children)||"number"==typeof f){f=U(f);break a}f=null}return null!=f?(d=[],xa[b]&&"\n"===f.charAt(0)&&(x+="\n"),x+=f):d=X(d.children),a=a.type,c=null==c||"http://www.w3.org/1999/xhtml"===c?ra(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c,this.stack.push({domNamespace:c,type:b,children:d,childIndex:0,context:e,footer:h}),this.previousWasTextNode=!1,x},a}(),Ga={renderToString:function(a){a=new Fa(a,!1);try{return a.read(1/0)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new Fa(a,!0);try{return a.read(1/0)}finally{a.destroy()}},renderToNodeStream:function(){u("207")},renderToStaticNodeStream:function(){u("208")},version:"16.6.3"},Ha={default:Ga},Ia=Ha&&Ga||Ha;module.exports=Ia.default||Ia},611:function(module,__webpack_exports__,__webpack_require__){"use strict";function displayPoll(){if(window.mailpoet_display_nps_poll&&window.satismeter&&window.mailpoet_installed_at_isoFormat){window.satismeter({writeKey:window.mailpoet_is_new_user?"6L479eVPXk7pBn6S":"k0aJAsQAWI2ERyGv",userId:window.mailpoet_current_wp_user.ID+window.mailpoet_site_url,traits:{name:window.mailpoet_current_wp_user.user_nicename,email:window.mailpoet_current_wp_user.user_email,createdAt:window.mailpoet_installed_at_isoFormat},events:{submit:function(response){response.rating>=9&&response.completed&&showReviewRequestModal()}}})}}var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate__=__webpack_require__(335),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate__),__WEBPACK_IMPORTED_MODULE_1_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_1_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_mailpoet__),__WEBPACK_IMPORTED_MODULE_2_react_dom_server__=__webpack_require__(375),__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom_server__),__WEBPACK_IMPORTED_MODULE_3_review_request_jsx__=__webpack_require__(612),showReviewRequestModal=function(){return __WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.Modal.popup({width:800,template:__WEBPACK_IMPORTED_MODULE_2_react_dom_server___default.a.renderToString(Object(__WEBPACK_IMPORTED_MODULE_3_review_request_jsx__.a)({username:window.mailpoet_current_wp_user_firstname||window.mailpoet_current_wp_user.user_login,reviewRequestIllustrationUrl:window.mailpoet_review_request_illustration_url,installedDaysAgo:window.mailpoet_installed_days_ago})),onInit:function(){document.getElementById("mailpoet_review_request_not_now").addEventListener("click",function(){return __WEBPACK_IMPORTED_MODULE_1_mailpoet___default.a.Modal.close()})}})};__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_core_js_set_immediate___default()(displayPoll)},612:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_mailpoet__=__webpack_require__(2),__WEBPACK_IMPORTED_MODULE_0_mailpoet___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_mailpoet__),__WEBPACK_IMPORTED_MODULE_1_prop_types__=__webpack_require__(3),__WEBPACK_IMPORTED_MODULE_1_prop_types___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__),__WEBPACK_IMPORTED_MODULE_2_react__=__webpack_require__(1),__WEBPACK_IMPORTED_MODULE_2_react___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__),ReviewRequest=function(props){var days=props.installedDaysAgo,usingForPhrase=days>30?__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestUsingForMonths").replace("[months]",Math.round(days/30)):__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestUsingForDays").replace("[days]",days);return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("div",{className:"mailpoet_review_request"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("img",{src:props.reviewRequestIllustrationUrl,height:"200",width:"200",alt:""}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("h2",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestHeading")),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestDidYouKnow").replace("[username]",props.username)),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,usingForPhrase),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{href:"http://bit.ly/2Bi124o",target:"_blank",rel:"noopener noreferrer",className:"button button-primary"},__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestRateUsNow"))),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("p",null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement("a",{id:"mailpoet_review_request_not_now"},__WEBPACK_IMPORTED_MODULE_0_mailpoet___default.a.I18n.t("reviewRequestNotNow"))))};ReviewRequest.propTypes={installedDaysAgo:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.number.isRequired,reviewRequestIllustrationUrl:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,username:__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired},__webpack_exports__.a=ReviewRequest}},[518]);
|
assets/js/{admin_vendor.169f324b.js → admin_vendor.266a2f4c.js}
RENAMED
@@ -1,15 +1,15 @@
|
|
1 |
-
webpackJsonp([0],[function(module,exports,__webpack_require__){(function(module){!function(global,factory){module.exports=factory()}(0,function(){"use strict";function hooks(){return hookCallback.apply(null,arguments)}function isArray(input){return input instanceof Array||"[object Array]"===Object.prototype.toString.call(input)}function isObject(input){return null!=input&&"[object Object]"===Object.prototype.toString.call(input)}function isObjectEmpty(obj){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(obj).length;var k;for(k in obj)if(obj.hasOwnProperty(k))return!1;return!0}function isUndefined(input){return void 0===input}function isNumber(input){return"number"==typeof input||"[object Number]"===Object.prototype.toString.call(input)}function isDate(input){return input instanceof Date||"[object Date]"===Object.prototype.toString.call(input)}function map(arr,fn){var i,res=[];for(i=0;i<arr.length;++i)res.push(fn(arr[i],i));return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b)hasOwnProp(b,i)&&(a[i]=b[i]);return hasOwnProp(b,"toString")&&(a.toString=b.toString),hasOwnProp(b,"valueOf")&&(a.valueOf=b.valueOf),a}function createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(m){return null==m._pf&&(m._pf=defaultParsingFlags()),m._pf}function isValid(m){if(null==m._isValid){var flags=getParsingFlags(m),parsedParts=some.call(flags.parsedDateParts,function(i){return null!=i}),isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.weekdayMismatch&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||flags.meridiem&&parsedParts);if(m._strict&&(isNowValid=isNowValid&&0===flags.charsLeftOver&&0===flags.unusedTokens.length&&void 0===flags.bigHour),null!=Object.isFrozen&&Object.isFrozen(m))return isNowValid;m._isValid=isNowValid}return m._isValid}function createInvalid(flags){var m=createUTC(NaN);return null!=flags?extend(getParsingFlags(m),flags):getParsingFlags(m).userInvalidated=!0,m}function copyConfig(to,from){var i,prop,val;if(isUndefined(from._isAMomentObject)||(to._isAMomentObject=from._isAMomentObject),isUndefined(from._i)||(to._i=from._i),isUndefined(from._f)||(to._f=from._f),isUndefined(from._l)||(to._l=from._l),isUndefined(from._strict)||(to._strict=from._strict),isUndefined(from._tzm)||(to._tzm=from._tzm),isUndefined(from._isUTC)||(to._isUTC=from._isUTC),isUndefined(from._offset)||(to._offset=from._offset),isUndefined(from._pf)||(to._pf=getParsingFlags(from)),isUndefined(from._locale)||(to._locale=from._locale),momentProperties.length>0)for(i=0;i<momentProperties.length;i++)prop=momentProperties[i],val=from[prop],isUndefined(val)||(to[prop]=val);return to}function Moment(config){copyConfig(this,config),this._d=new Date(null!=config._d?config._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===updateInProgress&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(obj){return obj instanceof Moment||null!=obj&&null!=obj._isAMomentObject}function absFloor(number){return number<0?Math.ceil(number)||0:Math.floor(number)}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return 0!==coercedNumber&&isFinite(coercedNumber)&&(value=absFloor(coercedNumber)),value}function compareArrays(array1,array2,dontConvert){var i,len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0;for(i=0;i<len;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function warn(msg){!1===hooks.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+msg)}function deprecate(msg,fn){var firstTime=!0;return extend(function(){if(null!=hooks.deprecationHandler&&hooks.deprecationHandler(null,msg),firstTime){for(var arg,args=[],i=0;i<arguments.length;i++){if(arg="","object"==typeof arguments[i]){arg+="\n["+i+"] ";for(var key in arguments[0])arg+=key+": "+arguments[0][key]+", ";arg=arg.slice(0,-2)}else arg=arguments[i];args.push(arg)}warn(msg+"\nArguments: "+Array.prototype.slice.call(args).join("")+"\n"+(new Error).stack),firstTime=!1}return fn.apply(this,arguments)},fn)}function deprecateSimple(name,msg){null!=hooks.deprecationHandler&&hooks.deprecationHandler(name,msg),deprecations[name]||(warn(msg),deprecations[name]=!0)}function isFunction(input){return input instanceof Function||"[object Function]"===Object.prototype.toString.call(input)}function set(config){var prop,i;for(i in config)prop=config[i],isFunction(prop)?this[i]=prop:this["_"+i]=prop;this._config=config,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(parentConfig,childConfig){var prop,res=extend({},parentConfig);for(prop in childConfig)hasOwnProp(childConfig,prop)&&(isObject(parentConfig[prop])&&isObject(childConfig[prop])?(res[prop]={},extend(res[prop],parentConfig[prop]),extend(res[prop],childConfig[prop])):null!=childConfig[prop]?res[prop]=childConfig[prop]:delete res[prop]);for(prop in parentConfig)hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])&&(res[prop]=extend({},res[prop]));return res}function Locale(config){null!=config&&this.set(config)}function calendar(key,mom,now){var output=this._calendar[key]||this._calendar.sameElse;return isFunction(output)?output.call(mom,now):output}function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];return format||!formatUpper?format:(this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)}),this._longDateFormat[key])}function invalidDate(){return this._invalidDate}function ordinal(number){return this._ordinal.replace("%d",number)}function relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return isFunction(output)?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)}function pastFuture(diff,output){var format=this._relativeTime[diff>0?"future":"past"];return isFunction(format)?format(output):format.replace(/%s/i,output)}function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+"s"]=aliases[shorthand]=unit}function normalizeUnits(units){return"string"==typeof units?aliases[units]||aliases[units.toLowerCase()]:void 0}function normalizeObjectUnits(inputObject){var normalizedProp,prop,normalizedInput={};for(prop in inputObject)hasOwnProp(inputObject,prop)&&(normalizedProp=normalizeUnits(prop))&&(normalizedInput[normalizedProp]=inputObject[prop]);return normalizedInput}function addUnitPriority(unit,priority){priorities[unit]=priority}function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj)units.push({unit:u,priority:priorities[u]});return units.sort(function(a,b){return a.priority-b.priority}),units}function zeroFill(number,targetLength,forceSign){var absNumber=""+Math.abs(number),zerosToFill=targetLength-absNumber.length;return(number>=0?forceSign?"+":"":"-")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}function addFormatToken(token,padded,ordinal,callback){var func=callback;"string"==typeof callback&&(func=function(){return this[callback]()}),token&&(formatTokenFunctions[token]=func),padded&&(formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}),ordinal&&(formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token)})}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|\]$/g,""):input.replace(/\\/g,"")}function makeFormatFunction(format){var i,length,array=format.match(formattingTokens);for(i=0,length=array.length;i<length;i++)formatTokenFunctions[array[i]]?array[i]=formatTokenFunctions[array[i]]:array[i]=removeFormattingTokens(array[i]);return function(mom){var i,output="";for(i=0;i<length;i++)output+=isFunction(array[i])?array[i].call(mom,format):array[i];return output}}function formatMoment(m,format){return m.isValid()?(format=expandFormat(format,m.localeData()),formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format),formatFunctions[format](m)):m.localeData().invalidDate()}function expandFormat(format,locale){function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input}var i=5;for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format);)format=format.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format}function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token,config){return hasOwnProp(regexes,token)?regexes[token](config._strict,config._locale):new RegExp(unescapeFormat(token))}function unescapeFormat(s){return regexEscape(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}))}function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function addParseToken(token,callback){var i,func=callback;for("string"==typeof token&&(token=[token]),isNumber(callback)&&(func=function(input,array){array[callback]=toInt(input)}),i=0;i<token.length;i++)tokens[token[i]]=func}function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{},callback(input,config._w,config,token)})}function addTimeToArrayFromToken(token,input,config){null!=input&&hasOwnProp(tokens,token)&&tokens[token](input,config._a,config,token)}function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4==0&&year%100!=0||year%400==0}function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(unit,keepTime){return function(value){return null!=value?(set$1(this,unit,value),hooks.updateOffset(this,keepTime),this):get(this,unit)}}function get(mom,unit){return mom.isValid()?mom._d["get"+(mom._isUTC?"UTC":"")+unit]():NaN}function set$1(mom,unit,value){mom.isValid()&&!isNaN(value)&&("FullYear"===unit&&isLeapYear(mom.year())&&1===mom.month()&&29===mom.date()?mom._d["set"+(mom._isUTC?"UTC":"")+unit](value,mom.month(),daysInMonth(value,mom.month())):mom._d["set"+(mom._isUTC?"UTC":"")+unit](value))}function stringGet(units){return units=normalizeUnits(units),isFunction(this[units])?this[units]():this}function stringSet(units,value){if("object"==typeof units){units=normalizeObjectUnits(units);for(var prioritized=getPrioritizedUnits(units),i=0;i<prioritized.length;i++)this[prioritized[i].unit](units[prioritized[i].unit])}else if(units=normalizeUnits(units),isFunction(this[units]))return this[units](value);return this}function mod(n,x){return(n%x+x)%x}function daysInMonth(year,month){if(isNaN(year)||isNaN(month))return NaN;var modMonth=mod(month,12);return year+=(month-modMonth)/12,1===modMonth?isLeapYear(year)?29:28:31-modMonth%7%2}function localeMonths(m,format){return m?isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?"format":"standalone"][m.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(m,format){return m?isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?"format":"standalone"][m.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)mom=createUTC([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(mom,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(mom,"").toLocaleLowerCase();return strict?"MMM"===format?(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):"MMM"===format?-1!==(ii=indexOf.call(this._shortMonthsParse,llc))?ii:(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._longMonthsParse,llc))?ii:(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null)}function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact)return handleStrictParse.call(this,monthName,format,strict);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(mom=createUTC([2e3,i]),strict&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(mom,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(mom,"").replace(".","")+"$","i")),strict||this._monthsParse[i]||(regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"MMMM"===format&&this._longMonthsParse[i].test(monthName))return i;if(strict&&"MMM"===format&&this._shortMonthsParse[i].test(monthName))return i;if(!strict&&this._monthsParse[i].test(monthName))return i}}function setMonth(mom,value){var dayOfMonth;if(!mom.isValid())return mom;if("string"==typeof value)if(/^\d+$/.test(value))value=toInt(value);else if(value=mom.localeData().monthsParse(value),!isNumber(value))return mom;return dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value)),mom._d["set"+(mom._isUTC?"UTC":"")+"Month"](value,dayOfMonth),mom}function getSetMonth(value){return null!=value?(setMonth(this,value),hooks.updateOffset(this,!0),this):get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<12;i++)mom=createUTC([2e3,i]),shortPieces.push(this.monthsShort(mom,"")),longPieces.push(this.months(mom,"")),mixedPieces.push(this.months(mom,"")),mixedPieces.push(this.monthsShort(mom,""));for(shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<12;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]);for(i=0;i<24;i++)mixedPieces[i]=regexEscape(mixedPieces[i]);this._monthsRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i")}function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);return y<100&&y>=0&&isFinite(date.getFullYear())&&date.setFullYear(y),date}function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));return y<100&&y>=0&&isFinite(date.getUTCFullYear())&&date.setUTCFullYear(y),date}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy;return-(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7+fwd-1}function dayOfYearFromWeeks(year,week,weekday,dow,doy){var resYear,resDayOfYear,localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset;return dayOfYear<=0?(resYear=year-1,resDayOfYear=daysInYear(resYear)+dayOfYear):dayOfYear>daysInYear(year)?(resYear=year+1,resDayOfYear=dayOfYear-daysInYear(year)):(resYear=year,resDayOfYear=dayOfYear),{year:resYear,dayOfYear:resDayOfYear}}function weekOfYear(mom,dow,doy){var resWeek,resYear,weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1;return week<1?(resYear=mom.year()-1,resWeek=week+weeksInYear(resYear,dow,doy)):week>weeksInYear(mom.year(),dow,doy)?(resWeek=week-weeksInYear(mom.year(),dow,doy),resYear=mom.year()+1):(resYear=mom.year(),resWeek=week),{week:resWeek,year:resYear}}function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7}function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week}function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(input){var week=this.localeData().week(this);return null==input?week:this.add(7*(input-week),"d")}function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return null==input?week:this.add(7*(input-week),"d")}function parseWeekday(input,locale){return"string"!=typeof input?input:isNaN(input)?(input=locale.weekdaysParse(input),"number"==typeof input?input:null):parseInt(input,10)}function parseIsoWeekday(input,locale){return"string"==typeof input?locale.weekdaysParse(input)%7||7:isNaN(input)?null:input}function localeWeekdays(m,format){return m?isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?"format":"standalone"][m.day()]:isArray(this._weekdays)?this._weekdays:this._weekdays.standalone}function localeWeekdaysShort(m){return m?this._weekdaysShort[m.day()]:this._weekdaysShort}function localeWeekdaysMin(m){return m?this._weekdaysMin[m.day()]:this._weekdaysMin}function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)mom=createUTC([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(mom,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(mom,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(mom,"").toLocaleLowerCase();return strict?"dddd"===format?(ii=indexOf.call(this._weekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"dddd"===format?-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._minWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null)}function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,weekdayName,format,strict);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(mom=createUTC([2e3,1]).day(i),strict&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(mom,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(mom,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(mom,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"dddd"===format&&this._fullWeekdaysParse[i].test(weekdayName))return i;if(strict&&"ddd"===format&&this._shortWeekdaysParse[i].test(weekdayName))return i;if(strict&&"dd"===format&&this._minWeekdaysParse[i].test(weekdayName))return i;if(!strict&&this._weekdaysParse[i].test(weekdayName))return i}}function getSetDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var day=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=input?(input=parseWeekday(input,this.localeData()),this.add(input-day,"d")):day}function getSetLocaleDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var weekday=(this.day()+7-this.localeData()._week.dow)%7;return null==input?weekday:this.add(input-weekday,"d")}function getSetISODayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;if(null!=input){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7)}return this.day()||7}function weekdaysRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,minp,shortp,longp,minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<7;i++)mom=createUTC([2e3,1]).day(i),minp=this.weekdaysMin(mom,""),shortp=this.weekdaysShort(mom,""),longp=this.weekdays(mom,""),minPieces.push(minp),shortPieces.push(shortp),longPieces.push(longp),mixedPieces.push(minp),mixedPieces.push(shortp),mixedPieces.push(longp);for(minPieces.sort(cmpLenRev),shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<7;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]),mixedPieces[i]=regexEscape(mixedPieces[i]);this._weekdaysRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+minPieces.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}function matchMeridiem(isStrict,locale){return locale._meridiemParse}function localeIsPM(input){return"p"===(input+"").toLowerCase().charAt(0)}function localeMeridiem(hours,minutes,isLower){return hours>11?isLower?"pm":"PM":isLower?"am":"AM"}function normalizeLocale(key){return key?key.toLowerCase().replace("_","-"):key}function chooseLocale(names){for(var j,next,locale,split,i=0;i<names.length;){for(split=normalizeLocale(names[i]).split("-"),j=split.length,next=normalizeLocale(names[i+1]),next=next?next.split("-"):null;j>0;){if(locale=loadLocale(split.slice(0,j).join("-")))return locale;if(next&&next.length>=j&&compareArrays(split,next,!0)>=j-1)break;j--}i++}return globalLocale}function loadLocale(name){var oldLocale=null;if(!locales[name]&&void 0!==module&&module&&module.exports)try{oldLocale=globalLocale._abbr;__webpack_require__(230)("./"+name),getSetGlobalLocale(oldLocale)}catch(e){}return locales[name]}function getSetGlobalLocale(key,values){var data;return key&&(data=isUndefined(values)?getLocale(key):defineLocale(key,values),data?globalLocale=data:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+key+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(name,config){if(null!==config){var locale,parentConfig=baseConfig;if(config.abbr=name,null!=locales[name])deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),parentConfig=locales[name]._config;else if(null!=config.parentLocale)if(null!=locales[config.parentLocale])parentConfig=locales[config.parentLocale]._config;else{if(null==(locale=loadLocale(config.parentLocale)))return localeFamilies[config.parentLocale]||(localeFamilies[config.parentLocale]=[]),localeFamilies[config.parentLocale].push({name:name,config:config}),null;parentConfig=locale._config}return locales[name]=new Locale(mergeConfigs(parentConfig,config)),localeFamilies[name]&&localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config)}),getSetGlobalLocale(name),locales[name]}return delete locales[name],null}function updateLocale(name,config){if(null!=config){var locale,tmpLocale,parentConfig=baseConfig;tmpLocale=loadLocale(name),null!=tmpLocale&&(parentConfig=tmpLocale._config),config=mergeConfigs(parentConfig,config),locale=new Locale(config),locale.parentLocale=locales[name],locales[name]=locale,getSetGlobalLocale(name)}else null!=locales[name]&&(null!=locales[name].parentLocale?locales[name]=locales[name].parentLocale:null!=locales[name]&&delete locales[name]);return locales[name]}function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr&&(key=key._locale._abbr),!key)return globalLocale;if(!isArray(key)){if(locale=loadLocale(key))return locale;key=[key]}return chooseLocale(key)}function listLocales(){return keys(locales)}function checkOverflow(m){var overflow,a=m._a;return a&&-2===getParsingFlags(m).overflow&&(overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||24===a[HOUR]&&(0!==a[MINUTE]||0!==a[SECOND]||0!==a[MILLISECOND])?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)&&(overflow=DATE),getParsingFlags(m)._overflowWeeks&&-1===overflow&&(overflow=WEEK),getParsingFlags(m)._overflowWeekday&&-1===overflow&&(overflow=WEEKDAY),getParsingFlags(m).overflow=overflow),m}function defaults(a,b,c){return null!=a?a:null!=b?b:c}function currentDateArray(config){var nowValue=new Date(hooks.now());return config._useUTC?[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()]:[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()]}function configFromArray(config){var i,date,currentDate,expectedWeekday,yearToUse,input=[];if(!config._d){for(currentDate=currentDateArray(config),config._w&&null==config._a[DATE]&&null==config._a[MONTH]&&dayOfYearFromWeekInfo(config),null!=config._dayOfYear&&(yearToUse=defaults(config._a[YEAR],currentDate[YEAR]),(config._dayOfYear>daysInYear(yearToUse)||0===config._dayOfYear)&&(getParsingFlags(config)._overflowDayOfYear=!0),date=createUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;i<3&&null==config._a[i];++i)config._a[i]=input[i]=currentDate[i];for(;i<7;i++)config._a[i]=input[i]=null==config._a[i]?2===i?1:0:config._a[i];24===config._a[HOUR]&&0===config._a[MINUTE]&&0===config._a[SECOND]&&0===config._a[MILLISECOND]&&(config._nextDay=!0,config._a[HOUR]=0),config._d=(config._useUTC?createUTCDate:createDate).apply(null,input),expectedWeekday=config._useUTC?config._d.getUTCDay():config._d.getDay(),null!=config._tzm&&config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),config._nextDay&&(config._a[HOUR]=24),config._w&&void 0!==config._w.d&&config._w.d!==expectedWeekday&&(getParsingFlags(config).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;if(w=config._w,null!=w.GG||null!=w.W||null!=w.E)dow=1,doy=4,weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year),week=defaults(w.W,1),((weekday=defaults(w.E,1))<1||weekday>7)&&(weekdayOverflow=!0);else{dow=config._locale._week.dow,doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year),week=defaults(w.w,curWeek.week),null!=w.d?((weekday=w.d)<0||weekday>6)&&(weekdayOverflow=!0):null!=w.e?(weekday=w.e+dow,(w.e<0||w.e>6)&&(weekdayOverflow=!0)):weekday=dow}week<1||week>weeksInYear(weekYear,dow,doy)?getParsingFlags(config)._overflowWeeks=!0:null!=weekdayOverflow?getParsingFlags(config)._overflowWeekday=!0:(temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear)}function configFromISO(config){var i,l,allowTime,dateFormat,timeFormat,tzFormat,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string);if(match){for(getParsingFlags(config).iso=!0,i=0,l=isoDates.length;i<l;i++)if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0],allowTime=!1!==isoDates[i][2];break}if(null==dateFormat)return void(config._isValid=!1);if(match[3]){for(i=0,l=isoTimes.length;i<l;i++)if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||" ")+isoTimes[i][0];break}if(null==timeFormat)return void(config._isValid=!1)}if(!allowTime&&null!=timeFormat)return void(config._isValid=!1);if(match[4]){if(!tzRegex.exec(match[4]))return void(config._isValid=!1);tzFormat="Z"}config._f=dateFormat+(timeFormat||"")+(tzFormat||""),configFromStringAndFormat(config)}else config._isValid=!1}function extractFromRFC2822Strings(yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr){var result=[untruncateYear(yearStr),defaultLocaleMonthsShort.indexOf(monthStr),parseInt(dayStr,10),parseInt(hourStr,10),parseInt(minuteStr,10)];return secondStr&&result.push(parseInt(secondStr,10)),result}function untruncateYear(yearStr){var year=parseInt(yearStr,10);return year<=49?2e3+year:year<=999?1900+year:year}function preprocessRFC2822(s){return s.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function checkWeekday(weekdayStr,parsedInput,config){if(weekdayStr){if(defaultLocaleWeekdaysShort.indexOf(weekdayStr)!==new Date(parsedInput[0],parsedInput[1],parsedInput[2]).getDay())return getParsingFlags(config).weekdayMismatch=!0,config._isValid=!1,!1}return!0}function calculateOffset(obsOffset,militaryOffset,numOffset){if(obsOffset)return obsOffsets[obsOffset];if(militaryOffset)return 0;var hm=parseInt(numOffset,10),m=hm%100;return(hm-m)/100*60+m}function configFromRFC2822(config){var match=rfc2822.exec(preprocessRFC2822(config._i));if(match){var parsedArray=extractFromRFC2822Strings(match[4],match[3],match[2],match[5],match[6],match[7]);if(!checkWeekday(match[1],parsedArray,config))return;config._a=parsedArray,config._tzm=calculateOffset(match[8],match[9],match[10]),config._d=createUTCDate.apply(null,config._a),config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),getParsingFlags(config).rfc2822=!0}else config._isValid=!1}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(null!==matched)return void(config._d=new Date(+matched[1]));configFromISO(config),!1===config._isValid&&(delete config._isValid,configFromRFC2822(config),!1===config._isValid&&(delete config._isValid,hooks.createFromInputFallback(config)))}function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601)return void configFromISO(config);if(config._f===hooks.RFC_2822)return void configFromRFC2822(config);config._a=[],getParsingFlags(config).empty=!0;var i,parsedInput,tokens,token,skipped,string=""+config._i,stringLength=string.length,totalParsedInputLength=0;for(tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[],i=0;i<tokens.length;i++)token=tokens[i],parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&getParsingFlags(config).unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token]?(parsedInput?getParsingFlags(config).empty=!1:getParsingFlags(config).unusedTokens.push(token),addTimeToArrayFromToken(token,parsedInput,config)):config._strict&&!parsedInput&&getParsingFlags(config).unusedTokens.push(token);getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&getParsingFlags(config).unusedInput.push(string),config._a[HOUR]<=12&&!0===getParsingFlags(config).bigHour&&config._a[HOUR]>0&&(getParsingFlags(config).bigHour=void 0),getParsingFlags(config).parsedDateParts=config._a.slice(0),getParsingFlags(config).meridiem=config._meridiem,config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem),configFromArray(config),checkOverflow(config)}function meridiemFixWrap(locale,hour,meridiem){var isPm;return null==meridiem?hour:null!=locale.meridiemHour?locale.meridiemHour(hour,meridiem):null!=locale.isPM?(isPm=locale.isPM(meridiem),isPm&&hour<12&&(hour+=12),isPm||12!==hour||(hour=0),hour):hour}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(0===config._f.length)return getParsingFlags(config).invalidFormat=!0,void(config._d=new Date(NaN));for(i=0;i<config._f.length;i++)currentScore=0,tempConfig=copyConfig({},config),null!=config._useUTC&&(tempConfig._useUTC=config._useUTC),tempConfig._f=config._f[i],configFromStringAndFormat(tempConfig),isValid(tempConfig)&&(currentScore+=getParsingFlags(tempConfig).charsLeftOver,currentScore+=10*getParsingFlags(tempConfig).unusedTokens.length,getParsingFlags(tempConfig).score=currentScore,(null==scoreToBeat||currentScore<scoreToBeat)&&(scoreToBeat=currentScore,bestMoment=tempConfig));extend(config,bestMoment||tempConfig)}function configFromObject(config){if(!config._d){var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10)}),configFromArray(config)}}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));return res._nextDay&&(res.add(1,"d"),res._nextDay=void 0),res}function prepareConfig(config){var input=config._i,format=config._f;return config._locale=config._locale||getLocale(config._l),null===input||void 0===format&&""===input?createInvalid({nullInput:!0}):("string"==typeof input&&(config._i=input=config._locale.preparse(input)),isMoment(input)?new Moment(checkOverflow(input)):(isDate(input)?config._d=input:isArray(format)?configFromStringAndArray(config):format?configFromStringAndFormat(config):configFromInput(config),isValid(config)||(config._d=null),config))}function configFromInput(config){var input=config._i;isUndefined(input)?config._d=new Date(hooks.now()):isDate(input)?config._d=new Date(input.valueOf()):"string"==typeof input?configFromString(config):isArray(input)?(config._a=map(input.slice(0),function(obj){return parseInt(obj,10)}),configFromArray(config)):isObject(input)?configFromObject(config):isNumber(input)?config._d=new Date(input):hooks.createFromInputFallback(config)}function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};return!0!==locale&&!1!==locale||(strict=locale,locale=void 0),(isObject(input)&&isObjectEmpty(input)||isArray(input)&&0===input.length)&&(input=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=isUTC,c._l=locale,c._i=input,c._f=format,c._strict=strict,createFromConfig(c)}function createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!1)}function pickBy(fn,moments){var res,i;if(1===moments.length&&isArray(moments[0])&&(moments=moments[0]),!moments.length)return createLocal();for(res=moments[0],i=1;i<moments.length;++i)moments[i].isValid()&&!moments[i][fn](res)||(res=moments[i]);return res}function min(){return pickBy("isBefore",[].slice.call(arguments,0))}function max(){return pickBy("isAfter",[].slice.call(arguments,0))}function isDurationValid(m){for(var key in m)if(-1===indexOf.call(ordering,key)||null!=m[key]&&isNaN(m[key]))return!1;for(var unitHasDecimal=!1,i=0;i<ordering.length;++i)if(m[ordering[i]]){if(unitHasDecimal)return!1;parseFloat(m[ordering[i]])!==toInt(m[ordering[i]])&&(unitHasDecimal=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._isValid=isDurationValid(normalizedInput),this._milliseconds=+milliseconds+1e3*seconds+6e4*minutes+1e3*hours*60*60,this._days=+days+7*weeks,this._months=+months+3*quarters+12*years,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(obj){return obj instanceof Duration}function absRound(number){return number<0?-1*Math.round(-1*number):Math.round(number)}function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset(),sign="+";return offset<0&&(offset=-offset,sign="-"),sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~offset%60,2)})}function offsetFromString(matcher,string){var matches=(string||"").match(matcher);if(null===matches)return null;var chunk=matches[matches.length-1]||[],parts=(chunk+"").match(chunkOffset)||["-",0,0],minutes=60*parts[1]+toInt(parts[2]);return 0===minutes?0:"+"===parts[0]?minutes:-minutes}function cloneWithOffset(input,model){var res,diff;return model._isUTC?(res=model.clone(),diff=(isMoment(input)||isDate(input)?input.valueOf():createLocal(input).valueOf())-res.valueOf(),res._d.setTime(res._d.valueOf()+diff),hooks.updateOffset(res,!1),res):createLocal(input).local()}function getDateOffset(m){return 15*-Math.round(m._d.getTimezoneOffset()/15)}function getSetOffset(input,keepLocalTime,keepMinutes){var localAdjust,offset=this._offset||0;if(!this.isValid())return null!=input?this:NaN;if(null!=input){if("string"==typeof input){if(null===(input=offsetFromString(matchShortOffset,input)))return this}else Math.abs(input)<16&&!keepMinutes&&(input*=60);return!this._isUTC&&keepLocalTime&&(localAdjust=getDateOffset(this)),this._offset=input,this._isUTC=!0,null!=localAdjust&&this.add(localAdjust,"m"),offset!==input&&(!keepLocalTime||this._changeInProgress?addSubtract(this,createDuration(input-offset,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?offset:getDateOffset(this)}function getSetZone(input,keepLocalTime){return null!=input?("string"!=typeof input&&(input=-input),this.utcOffset(input,keepLocalTime),this):-this.utcOffset()}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){return this._isUTC&&(this.utcOffset(0,keepLocalTime),this._isUTC=!1,keepLocalTime&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var tZone=offsetFromString(matchOffset,this._i);null!=tZone?this.utcOffset(tZone):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(input){return!!this.isValid()&&(input=input?createLocal(input).utcOffset():0,(this.utcOffset()-input)%60==0)}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var c={};if(copyConfig(c,this),c=prepareConfig(c),c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function createDuration(input,key){var sign,ret,diffRes,duration=input,match=null;return isDuration(input)?duration={ms:input._milliseconds,d:input._days,M:input._months}:isNumber(input)?(duration={},key?duration[key]=input:duration.milliseconds=input):(match=aspNetRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(1e3*match[MILLISECOND]))*sign}):(match=isoRegex.exec(input))?(sign="-"===match[1]?-1:(match[1],1),duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)}):null==duration?duration={}:"object"==typeof duration&&("from"in duration||"to"in duration)&&(diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to)),duration={},duration.ms=diffRes.milliseconds,duration.M=diffRes.months),ret=new Duration(duration),isDuration(input)&&hasOwnProp(input,"_locale")&&(ret._locale=input._locale),ret}function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};return res.months=other.month()-base.month()+12*(other.year()-base.year()),base.clone().add(res.months,"M").isAfter(other)&&--res.months,res.milliseconds=+other-+base.clone().add(res.months,"M"),res}function momentsDifference(base,other){var res;return base.isValid()&&other.isValid()?(other=cloneWithOffset(other,base),base.isBefore(other)?res=positiveMomentsDifference(base,other):(res=positiveMomentsDifference(other,base),res.milliseconds=-res.milliseconds,res.months=-res.months),res):{milliseconds:0,months:0}}function createAdder(direction,name){return function(val,period){var dur,tmp;return null===period||isNaN(+period)||(deprecateSimple(name,"moment()."+name+"(period, number) is deprecated. Please use moment()."+name+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),tmp=val,val=period,period=tmp),val="string"==typeof val?+val:val,dur=createDuration(val,period),addSubtract(this,dur,direction),this}}function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);mom.isValid()&&(updateOffset=null==updateOffset||updateOffset,months&&setMonth(mom,get(mom,"Month")+months*isAdding),days&&set$1(mom,"Date",get(mom,"Date")+days*isAdding),milliseconds&&mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding),updateOffset&&hooks.updateOffset(mom,days||months))}function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,"days",!0);return diff<-6?"sameElse":diff<-1?"lastWeek":diff<0?"lastDay":diff<1?"sameDay":diff<2?"nextDay":diff<7?"nextWeek":"sameElse"}function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf("day"),format=hooks.calendarFormat(this,sod)||"sameElse",output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)))}function clone(){return new Moment(this)}function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()>localInput.valueOf():localInput.valueOf()<this.clone().startOf(units).valueOf())}function isBefore(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()<localInput.valueOf():this.clone().endOf(units).valueOf()<localInput.valueOf())}function isBetween(from,to,units,inclusivity){return inclusivity=inclusivity||"()",("("===inclusivity[0]?this.isAfter(from,units):!this.isBefore(from,units))&&(")"===inclusivity[1]?this.isBefore(to,units):!this.isAfter(to,units))}function isSame(input,units){var inputMs,localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(units||"millisecond"),"millisecond"===units?this.valueOf()===localInput.valueOf():(inputMs=localInput.valueOf(),this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf()))}function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units)}function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units)}function diff(input,units,asFloat){var that,zoneDelta,output;if(!this.isValid())return NaN;if(that=cloneWithOffset(input,this),!that.isValid())return NaN;switch(zoneDelta=6e4*(that.utcOffset()-this.utcOffset()),units=normalizeUnits(units)){case"year":output=monthDiff(this,that)/12;break;case"month":output=monthDiff(this,that);break;case"quarter":output=monthDiff(this,that)/3;break;case"second":output=(this-that)/1e3;break;case"minute":output=(this-that)/6e4;break;case"hour":output=(this-that)/36e5;break;case"day":output=(this-that-zoneDelta)/864e5;break;case"week":output=(this-that-zoneDelta)/6048e5;break;default:output=this-that}return asFloat?output:absFloor(output)}function monthDiff(a,b){var anchor2,adjust,wholeMonthDiff=12*(b.year()-a.year())+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,"months");return b-anchor<0?(anchor2=a.clone().add(wholeMonthDiff-1,"months"),adjust=(b-anchor)/(anchor-anchor2)):(anchor2=a.clone().add(wholeMonthDiff+1,"months"),adjust=(b-anchor)/(anchor2-anchor)),-(wholeMonthDiff+adjust)||0}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(keepOffset){if(!this.isValid())return null;var utc=!0!==keepOffset,m=utc?this.clone().utc():this;return m.year()<0||m.year()>9999?formatMoment(m,utc?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?utc?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",formatMoment(m,"Z")):formatMoment(m,utc?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var func="moment",zone="";this.isLocal()||(func=0===this.utcOffset()?"moment.utc":"moment.parseZone",zone="Z");var prefix="["+func+'("]',year=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",suffix=zone+'[")]';return this.format(prefix+year+"-MM-DD[T]HH:mm:ss.SSS"+suffix)}function format(inputString){inputString||(inputString=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var output=formatMoment(this,inputString);return this.localeData().postformat(output)}function from(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix)}function to(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix)}function locale(key){var newLocaleData;return void 0===key?this._locale._abbr:(newLocaleData=getLocale(key),null!=newLocaleData&&(this._locale=newLocaleData),this)}function localeData(){return this._locale}function startOf(units){switch(units=normalizeUnits(units)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===units&&this.weekday(0),"isoWeek"===units&&this.isoWeekday(1),"quarter"===units&&this.month(3*Math.floor(this.month()/3)),this}function endOf(units){return void 0===(units=normalizeUnits(units))||"millisecond"===units?this:("date"===units&&(units="day"),this.startOf(units).add(1,"isoWeek"===units?"week":units).subtract(1,"ms"))}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter)}function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;return null==input?weekOfYear(this,dow,doy).year:(weeksTarget=weeksInYear(input,dow,doy),week>weeksTarget&&(week=weeksTarget),setWeekAll.call(this,input,week,weekday,dow,doy))}function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);return this.year(date.getUTCFullYear()),this.month(date.getUTCMonth()),this.date(date.getUTCDate()),this}function getSetQuarter(input){return null==input?Math.ceil((this.month()+1)/3):this.month(3*(input-1)+this.month()%3)}function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==input?dayOfYear:this.add(input-dayOfYear,"d")}function parseMs(input,array){array[MILLISECOND]=toInt(1e3*("0."+input))}function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}function createUnix(input){return createLocal(1e3*input)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(string){return string}function get$1(format,index,field,setter){var locale=getLocale(),utc=createUTC().set(setter,index);return locale[field](utc,format)}function listMonthsImpl(format,index,field){if(isNumber(format)&&(index=format,format=void 0),format=format||"",null!=index)return get$1(format,index,field,"month");var i,out=[];for(i=0;i<12;i++)out[i]=get$1(format,i,field,"month");return out}function listWeekdaysImpl(localeSorted,format,index,field){"boolean"==typeof localeSorted?(isNumber(format)&&(index=format,format=void 0),format=format||""):(format=localeSorted,index=format,localeSorted=!1,isNumber(format)&&(index=format,format=void 0),format=format||"");var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(null!=index)return get$1(format,(index+shift)%7,field,"day");var i,out=[];for(i=0;i<7;i++)out[i]=get$1(format,(i+shift)%7,field,"day");return out}function listMonths(format,index){return listMonthsImpl(format,index,"months")}function listMonthsShort(format,index){return listMonthsImpl(format,index,"monthsShort")}function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdays")}function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysShort")}function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysMin")}function abs(){var data=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),data.milliseconds=mathAbs(data.milliseconds),data.seconds=mathAbs(data.seconds),data.minutes=mathAbs(data.minutes),data.hours=mathAbs(data.hours),data.months=mathAbs(data.months),data.years=mathAbs(data.years),this}function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);return duration._milliseconds+=direction*other._milliseconds,duration._days+=direction*other._days,duration._months+=direction*other._months,duration._bubble()}function add$1(input,value){return addSubtract$1(this,input,value,1)}function subtract$1(input,value){return addSubtract$1(this,input,value,-1)}function absCeil(number){return number<0?Math.floor(number):Math.ceil(number)}function bubble(){var seconds,minutes,hours,years,monthsFromDays,milliseconds=this._milliseconds,days=this._days,months=this._months,data=this._data;return milliseconds>=0&&days>=0&&months>=0||milliseconds<=0&&days<=0&&months<=0||(milliseconds+=864e5*absCeil(monthsToDays(months)+days),days=0,months=0),data.milliseconds=milliseconds%1e3,seconds=absFloor(milliseconds/1e3),data.seconds=seconds%60,minutes=absFloor(seconds/60),data.minutes=minutes%60,hours=absFloor(minutes/60),data.hours=hours%24,days+=absFloor(hours/24),monthsFromDays=absFloor(daysToMonths(days)),months+=monthsFromDays,days-=absCeil(monthsToDays(monthsFromDays)),years=absFloor(months/12),months%=12,data.days=days,data.months=months,data.years=years,this}function daysToMonths(days){return 4800*days/146097}function monthsToDays(months){return 146097*months/4800}function as(units){if(!this.isValid())return NaN;var days,months,milliseconds=this._milliseconds;if("month"===(units=normalizeUnits(units))||"year"===units)return days=this._days+milliseconds/864e5,months=this._months+daysToMonths(days),"month"===units?months:months/12;switch(days=this._days+Math.round(monthsToDays(this._months)),units){case"week":return days/7+milliseconds/6048e5;case"day":return days+milliseconds/864e5;case"hour":return 24*days+milliseconds/36e5;case"minute":return 1440*days+milliseconds/6e4;case"second":return 86400*days+milliseconds/1e3;case"millisecond":return Math.floor(864e5*days)+milliseconds;default:throw new Error("Unknown unit "+units)}}function valueOf$1(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12):NaN}function makeAs(alias){return function(){return this.as(alias)}}function clone$1(){return createDuration(this)}function get$2(units){return units=normalizeUnits(units),this.isValid()?this[units+"s"]():NaN}function makeGetter(name){return function(){return this.isValid()?this._data[name]:NaN}}function weeks(){return absFloor(this.days()/7)}function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs(),seconds=round(duration.as("s")),minutes=round(duration.as("m")),hours=round(duration.as("h")),days=round(duration.as("d")),months=round(duration.as("M")),years=round(duration.as("y")),a=seconds<=thresholds.ss&&["s",seconds]||seconds<thresholds.s&&["ss",seconds]||minutes<=1&&["m"]||minutes<thresholds.m&&["mm",minutes]||hours<=1&&["h"]||hours<thresholds.h&&["hh",hours]||days<=1&&["d"]||days<thresholds.d&&["dd",days]||months<=1&&["M"]||months<thresholds.M&&["MM",months]||years<=1&&["y"]||["yy",years];return a[2]=withoutSuffix,a[3]=+posNegDuration>0,a[4]=locale,substituteTimeAgo.apply(null,a)}function getSetRelativeTimeRounding(roundingFunction){return void 0===roundingFunction?round:"function"==typeof roundingFunction&&(round=roundingFunction,!0)}function getSetRelativeTimeThreshold(threshold,limit){return void 0!==thresholds[threshold]&&(void 0===limit?thresholds[threshold]:(thresholds[threshold]=limit,"s"===threshold&&(thresholds.ss=limit-1),!0))}function humanize(withSuffix){if(!this.isValid())return this.localeData().invalidDate();var locale=this.localeData(),output=relativeTime$1(this,!withSuffix,locale);return withSuffix&&(output=locale.pastFuture(+this,output)),locale.postformat(output)}function sign(x){return(x>0)-(x<0)||+x}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var minutes,hours,years,seconds=abs$1(this._milliseconds)/1e3,days=abs$1(this._days),months=abs$1(this._months);minutes=absFloor(seconds/60),hours=absFloor(minutes/60),seconds%=60,minutes%=60,years=absFloor(months/12),months%=12;var Y=years,M=months,D=days,h=hours,m=minutes,s=seconds?seconds.toFixed(3).replace(/\.?0+$/,""):"",total=this.asSeconds();if(!total)return"P0D";var totalSign=total<0?"-":"",ymSign=sign(this._months)!==sign(total)?"-":"",daysSign=sign(this._days)!==sign(total)?"-":"",hmsSign=sign(this._milliseconds)!==sign(total)?"-":"";return totalSign+"P"+(Y?ymSign+Y+"Y":"")+(M?ymSign+M+"M":"")+(D?daysSign+D+"D":"")+(h||m||s?"T":"")+(h?hmsSign+h+"H":"")+(m?hmsSign+m+"M":"")+(s?hmsSign+s+"S":"")}var hookCallback,some;some=Array.prototype.some?Array.prototype.some:function(fun){for(var t=Object(this),len=t.length>>>0,i=0;i<len;i++)if(i in t&&fun.call(this,t[i],i,t))return!0;return!1};var momentProperties=hooks.momentProperties=[],updateInProgress=!1,deprecations={};hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null;var keys;keys=Object.keys?Object.keys:function(obj){var i,res=[];for(i in obj)hasOwnProp(obj,i)&&res.push(i);return res};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},defaultDayOfMonthOrdinalParse=/\d{1,2}/,defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},aliases={},priorities={},formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={},match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes={},tokens={},YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var y=this.year();return y<=9999?""+y:"+"+y}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addUnitAlias("year","y"),addUnitPriority("year",1),addRegexToken("Y",matchSigned),addRegexToken("YY",match1to2,match2),addRegexToken("YYYY",match1to4,match4),addRegexToken("YYYYY",match1to6,match6),addRegexToken("YYYYYY",match1to6,match6),addParseToken(["YYYYY","YYYYYY"],YEAR),addParseToken("YYYY",function(input,array){array[YEAR]=2===input.length?hooks.parseTwoDigitYear(input):toInt(input)}),addParseToken("YY",function(input,array){array[YEAR]=hooks.parseTwoDigitYear(input)}),addParseToken("Y",function(input,array){array[YEAR]=parseInt(input,10)}),hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};var indexOf,getSetYear=makeGetSet("FullYear",!0);indexOf=Array.prototype.indexOf?Array.prototype.indexOf:function(o){var i;for(i=0;i<this.length;++i)if(this[i]===o)return i;return-1},addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(format){return this.localeData().monthsShort(this,format)}),addFormatToken("MMMM",0,0,function(format){return this.localeData().months(this,format)}),addUnitAlias("month","M"),addUnitPriority("month",8),addRegexToken("M",match1to2),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",function(isStrict,locale){return locale.monthsShortRegex(isStrict)}),addRegexToken("MMMM",function(isStrict,locale){return locale.monthsRegex(isStrict)}),addParseToken(["M","MM"],function(input,array){array[MONTH]=toInt(input)-1}),addParseToken(["MMM","MMMM"],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);null!=month?array[MONTH]=month:getParsingFlags(config).invalidMonth=input});var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addUnitAlias("week","w"),addUnitAlias("isoWeek","W"),addUnitPriority("week",5),addUnitPriority("isoWeek",5),addRegexToken("w",match1to2),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(input,week,config,token){week[token.substr(0,1)]=toInt(input)});var defaultLocaleWeek={dow:0,doy:6};addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(format){return this.localeData().weekdaysMin(this,format)}),addFormatToken("ddd",0,0,function(format){return this.localeData().weekdaysShort(this,format)}),addFormatToken("dddd",0,0,function(format){return this.localeData().weekdays(this,format)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addUnitAlias("day","d"),addUnitAlias("weekday","e"),addUnitAlias("isoWeekday","E"),addUnitPriority("day",11),addUnitPriority("weekday",11),addUnitPriority("isoWeekday",11),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",function(isStrict,locale){return locale.weekdaysMinRegex(isStrict)}),addRegexToken("ddd",function(isStrict,locale){return locale.weekdaysShortRegex(isStrict)}),addRegexToken("dddd",function(isStrict,locale){return locale.weekdaysRegex(isStrict)}),addWeekParseToken(["dd","ddd","dddd"],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);null!=weekday?week.d=weekday:getParsingFlags(config).invalidWeekday=input}),addWeekParseToken(["d","e","E"],function(input,week,config,token){week[token]=toInt(input)});var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),meridiem("a",!0),meridiem("A",!1),addUnitAlias("hour","h"),addUnitPriority("hour",13),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2),addRegexToken("h",match1to2),addRegexToken("k",match1to2),addRegexToken("HH",match1to2,match2),addRegexToken("hh",match1to2,match2),addRegexToken("kk",match1to2,match2),addRegexToken("hmm",match3to4),addRegexToken("hmmss",match5to6),addRegexToken("Hmm",match3to4),addRegexToken("Hmmss",match5to6),addParseToken(["H","HH"],HOUR),addParseToken(["k","kk"],function(input,array,config){var kInput=toInt(input);array[HOUR]=24===kInput?0:kInput}),addParseToken(["a","A"],function(input,array,config){config._isPm=config._locale.isPM(input),config._meridiem=input}),addParseToken(["h","hh"],function(input,array,config){array[HOUR]=toInt(input),getParsingFlags(config).bigHour=!0}),addParseToken("hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos)),getParsingFlags(config).bigHour=!0}),addParseToken("hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2)),getParsingFlags(config).bigHour=!0}),addParseToken("Hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos))}),addParseToken("Hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2))});var globalLocale,defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0),baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((\-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(config){config._d=new Date(config._i+(config._useUTC?" UTC":""))}),hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other<this?this:other:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other>this?this:other:createInvalid()}),now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(input,array,config){config._useUTC=!0,config._tzm=offsetFromString(matchShortOffset,input)});var chunkOffset=/([\+\-]|\d\d)/gi;hooks.updateOffset=function(){};var aspNetRegex=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var add=createAdder(1,"add"),subtract=createAdder(-1,"subtract");hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(key){return void 0===key?this.localeData():this.locale(key)});addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addUnitAlias("weekYear","gg"),addUnitAlias("isoWeekYear","GG"),addUnitPriority("weekYear",1),addUnitPriority("isoWeekYear",1),addRegexToken("G",matchSigned),addRegexToken("g",matchSigned),addRegexToken("GG",match1to2,match2),addRegexToken("gg",match1to2,match2),addRegexToken("GGGG",match1to4,match4),addRegexToken("gggg",match1to4,match4),addRegexToken("GGGGG",match1to6,match6),addRegexToken("ggggg",match1to6,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(input,week,config,token){week[token.substr(0,2)]=toInt(input)}),addWeekParseToken(["gg","GG"],function(input,week,config,token){week[token]=hooks.parseTwoDigitYear(input)}),addFormatToken("Q",0,"Qo","quarter"),addUnitAlias("quarter","Q"),addUnitPriority("quarter",7),addRegexToken("Q",match1),addParseToken("Q",function(input,array){array[MONTH]=3*(toInt(input)-1)}),addFormatToken("D",["DD",2],"Do","date"),addUnitAlias("date","D"),addUnitPriority("date",9),addRegexToken("D",match1to2),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(isStrict,locale){return isStrict?locale._dayOfMonthOrdinalParse||locale._ordinalParse:locale._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(input,array){array[DATE]=toInt(input.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addUnitAlias("dayOfYear","DDD"),addUnitPriority("dayOfYear",4),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(input,array,config){config._dayOfYear=toInt(input)}),addFormatToken("m",["mm",2],0,"minute"),addUnitAlias("minute","m"),addUnitPriority("minute",14),addRegexToken("m",match1to2),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addUnitAlias("second","s"),addUnitPriority("second",15),addRegexToken("s",match1to2),addRegexToken("ss",match1to2,match2),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addUnitAlias("millisecond","ms"),addUnitPriority("millisecond",16),addRegexToken("S",match1to3,match1),addRegexToken("SS",match1to3,match2),addRegexToken("SSS",match1to3,match3);var token;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);var getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var proto=Moment.prototype;proto.add=add,proto.calendar=calendar$1,proto.clone=clone,proto.diff=diff,proto.endOf=endOf,proto.format=format,proto.from=from,proto.fromNow=fromNow,proto.to=to,proto.toNow=toNow,proto.get=stringGet,proto.invalidAt=invalidAt,proto.isAfter=isAfter,proto.isBefore=isBefore,proto.isBetween=isBetween,proto.isSame=isSame,proto.isSameOrAfter=isSameOrAfter,proto.isSameOrBefore=isSameOrBefore,proto.isValid=isValid$2,proto.lang=lang,proto.locale=locale,proto.localeData=localeData,proto.max=prototypeMax,proto.min=prototypeMin,proto.parsingFlags=parsingFlags,proto.set=stringSet,proto.startOf=startOf,proto.subtract=subtract,proto.toArray=toArray,proto.toObject=toObject,proto.toDate=toDate,proto.toISOString=toISOString,proto.inspect=inspect,proto.toJSON=toJSON,proto.toString=toString,proto.unix=unix,proto.valueOf=valueOf,proto.creationData=creationData,proto.year=getSetYear,proto.isLeapYear=getIsLeapYear,proto.weekYear=getSetWeekYear,proto.isoWeekYear=getSetISOWeekYear,proto.quarter=proto.quarters=getSetQuarter,proto.month=getSetMonth,proto.daysInMonth=getDaysInMonth,proto.week=proto.weeks=getSetWeek,proto.isoWeek=proto.isoWeeks=getSetISOWeek,proto.weeksInYear=getWeeksInYear,proto.isoWeeksInYear=getISOWeeksInYear,proto.date=getSetDayOfMonth,proto.day=proto.days=getSetDayOfWeek,proto.weekday=getSetLocaleDayOfWeek,proto.isoWeekday=getSetISODayOfWeek,proto.dayOfYear=getSetDayOfYear,proto.hour=proto.hours=getSetHour,proto.minute=proto.minutes=getSetMinute,proto.second=proto.seconds=getSetSecond,proto.millisecond=proto.milliseconds=getSetMillisecond,proto.utcOffset=getSetOffset,proto.utc=setOffsetToUTC,proto.local=setOffsetToLocal,proto.parseZone=setOffsetToParsedOffset,proto.hasAlignedHourOffset=hasAlignedHourOffset,proto.isDST=isDaylightSavingTime,proto.isLocal=isLocal,proto.isUtcOffset=isUtcOffset,proto.isUtc=isUtc,proto.isUTC=isUtc,proto.zoneAbbr=getZoneAbbr,proto.zoneName=getZoneName,proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth),proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear),proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);var proto$1=Locale.prototype;proto$1.calendar=calendar,proto$1.longDateFormat=longDateFormat,proto$1.invalidDate=invalidDate,proto$1.ordinal=ordinal,proto$1.preparse=preParsePostFormat,proto$1.postformat=preParsePostFormat,proto$1.relativeTime=relativeTime,proto$1.pastFuture=pastFuture,proto$1.set=set,proto$1.months=localeMonths,proto$1.monthsShort=localeMonthsShort,proto$1.monthsParse=localeMonthsParse,proto$1.monthsRegex=monthsRegex,proto$1.monthsShortRegex=monthsShortRegex,proto$1.week=localeWeek,proto$1.firstDayOfYear=localeFirstDayOfYear,proto$1.firstDayOfWeek=localeFirstDayOfWeek,proto$1.weekdays=localeWeekdays,proto$1.weekdaysMin=localeWeekdaysMin,proto$1.weekdaysShort=localeWeekdaysShort,proto$1.weekdaysParse=localeWeekdaysParse,proto$1.weekdaysRegex=weekdaysRegex,proto$1.weekdaysShortRegex=weekdaysShortRegex,proto$1.weekdaysMinRegex=weekdaysMinRegex,proto$1.isPM=localeIsPM,proto$1.meridiem=localeMeridiem,getSetGlobalLocale("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10;return number+(1===toInt(number%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th")}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs,asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asYears=makeAs("y"),milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years"),round=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,M:11},abs$1=Math.abs,proto$2=Duration.prototype;return proto$2.isValid=isValid$1,proto$2.abs=abs,proto$2.add=add$1,proto$2.subtract=subtract$1,proto$2.as=as,proto$2.asMilliseconds=asMilliseconds,proto$2.asSeconds=asSeconds,proto$2.asMinutes=asMinutes,proto$2.asHours=asHours,proto$2.asDays=asDays,proto$2.asWeeks=asWeeks,proto$2.asMonths=asMonths,proto$2.asYears=asYears,proto$2.valueOf=valueOf$1,proto$2._bubble=bubble,proto$2.clone=clone$1,proto$2.get=get$2,proto$2.milliseconds=milliseconds,proto$2.seconds=seconds,proto$2.minutes=minutes,proto$2.hours=hours,proto$2.days=days,proto$2.weeks=weeks,proto$2.months=months,proto$2.years=years,proto$2.humanize=humanize,proto$2.toISOString=toISOString$1,proto$2.toString=toISOString$1,proto$2.toJSON=toISOString$1,proto$2.locale=locale,proto$2.localeData=localeData,proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),proto$2.lang=lang,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",matchSigned),addRegexToken("X",matchTimestamp),addParseToken("X",function(input,array,config){config._d=new Date(1e3*parseFloat(input,10))}),addParseToken("x",function(input,array,config){config._d=new Date(toInt(input))}),hooks.version="2.22.1",function(callback){hookCallback=callback}(createLocal),hooks.fn=proto,hooks.min=min,hooks.max=max,hooks.now=now,hooks.utc=createUTC,hooks.unix=createUnix,hooks.months=listMonths,hooks.isDate=isDate,hooks.locale=getSetGlobalLocale,hooks.invalid=createInvalid,hooks.duration=createDuration,hooks.isMoment=isMoment,hooks.weekdays=listWeekdays,hooks.parseZone=createInZone,hooks.localeData=getLocale,hooks.isDuration=isDuration,hooks.monthsShort=listMonthsShort,hooks.weekdaysMin=listWeekdaysMin,hooks.defineLocale=defineLocale,hooks.updateLocale=updateLocale,hooks.locales=listLocales,hooks.weekdaysShort=listWeekdaysShort,hooks.normalizeUnits=normalizeUnits,hooks.relativeTimeRounding=getSetRelativeTimeRounding,hooks.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks.calendarFormat=getCalendarFormat,hooks.prototype=proto,hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},hooks})}).call(exports,__webpack_require__(207)(module))},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.React=__webpack_require__(237)}).call(exports,__webpack_require__(11))},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(){var MailPoet={};return window.MailPoet=MailPoet,MailPoet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),__webpack_require__(206),__webpack_require__(229),__webpack_require__(231),__webpack_require__(208),__webpack_require__(209),__webpack_require__(232),__webpack_require__(233),__webpack_require__(234)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(235)()},function(module,exports,__webpack_require__){(function(global){module.exports=global._=__webpack_require__(228)}).call(exports,__webpack_require__(11))},function(module,exports){module.exports=jQuery},function(module,exports){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}module.exports=_classCallCheck},function(module,exports,__webpack_require__){function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),_Object$defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}var _Object$defineProperty=__webpack_require__(339);module.exports=_createClass},function(module,exports,__webpack_require__){function _possibleConstructorReturn(self,call){return!call||"object"!==_typeof(call)&&"function"!=typeof call?assertThisInitialized(self):call}var _typeof=__webpack_require__(340),assertThisInitialized=__webpack_require__(12);module.exports=_possibleConstructorReturn},function(module,exports,__webpack_require__){function _getPrototypeOf(o){return module.exports=_getPrototypeOf=_Object$setPrototypeOf?_Object$getPrototypeOf:function(o){return o.__proto__||_Object$getPrototypeOf(o)},_getPrototypeOf(o)}var _Object$getPrototypeOf=__webpack_require__(441),_Object$setPrototypeOf=__webpack_require__(351);module.exports=_getPrototypeOf},function(module,exports,__webpack_require__){function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=_Object$create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&setPrototypeOf(subClass,superClass)}var _Object$create=__webpack_require__(447),setPrototypeOf=__webpack_require__(450);module.exports=_inherits},,function(module,exports){function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}module.exports=_assertThisInitialized},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.ClassNames=__webpack_require__(244)}).call(exports,__webpack_require__(11))},function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_1__HashRouter__=(__webpack_require__(463),__webpack_require__(464));__webpack_require__.d(__webpack_exports__,"a",function(){return __WEBPACK_IMPORTED_MODULE_1__HashRouter__.a});var __WEBPACK_IMPORTED_MODULE_2__Link__=__webpack_require__(355);__webpack_require__.d(__webpack_exports__,"b",function(){return __WEBPACK_IMPORTED_MODULE_2__Link__.a});var __WEBPACK_IMPORTED_MODULE_6__Redirect__=(__webpack_require__(465),__webpack_require__(467),__webpack_require__(468),__webpack_require__(470));__webpack_require__.d(__webpack_exports__,"c",function(){return __WEBPACK_IMPORTED_MODULE_6__Redirect__.a});var __WEBPACK_IMPORTED_MODULE_7__Route__=__webpack_require__(356);__webpack_require__.d(__webpack_exports__,"d",function(){return __WEBPACK_IMPORTED_MODULE_7__Route__.a});var __WEBPACK_IMPORTED_MODULE_10__Switch__=(__webpack_require__(313),__webpack_require__(472),__webpack_require__(474));__webpack_require__.d(__webpack_exports__,"e",function(){return __WEBPACK_IMPORTED_MODULE_10__Switch__.a});var __WEBPACK_IMPORTED_MODULE_13__withRouter__=(__webpack_require__(476),__webpack_require__(477),__webpack_require__(478));__webpack_require__.d(__webpack_exports__,"f",function(){return __WEBPACK_IMPORTED_MODULE_13__withRouter__.a})},function(module,exports){var core=module.exports={version:"2.6.0"};"number"==typeof __e&&(__e=core)},function(module,exports,__webpack_require__){function _defineProperty(obj,key,value){return key in obj?_Object$defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var _Object$defineProperty=__webpack_require__(339);module.exports=_defineProperty},,,function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.ReactDOM=__webpack_require__(240)}).call(exports,__webpack_require__(11))},function(module,exports,__webpack_require__){var global=__webpack_require__(22),core=__webpack_require__(15),ctx=__webpack_require__(52),hide=__webpack_require__(47),has=__webpack_require__(49),$export=function(type,name,source){var key,own,out,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports.prototype,target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{}).prototype;IS_GLOBAL&&(source=name);for(key in source)(own=!IS_FORCED&&target&&void 0!==target[key])&&has(exports,key)||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(a,b,c){if(this instanceof C){switch(arguments.length){case 0:return new C;case 1:return new C(a);case 2:return new C(a,b)}return new C(a,b,c)}return C.apply(this,arguments)};return F.prototype=C.prototype,F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports.virtual||(exports.virtual={}))[key]=out,type&$export.R&&expProto&&!expProto[key]&&hide(expProto,key,out)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},function(module,exports,__webpack_require__){function defineProp(name,value){return delete module.exports[name],module.exports[name]=value,value}var Parser=__webpack_require__(184),DomHandler=__webpack_require__(261);module.exports={Parser:Parser,Tokenizer:__webpack_require__(185),ElementType:__webpack_require__(28),DomHandler:DomHandler,get FeedHandler(){return defineProp("FeedHandler",__webpack_require__(263))},get Stream(){return defineProp("Stream",__webpack_require__(264))},get WritableStream(){return defineProp("WritableStream",__webpack_require__(189))},get ProxyHandler(){return defineProp("ProxyHandler",__webpack_require__(271))},get DomUtils(){return defineProp("DomUtils",__webpack_require__(272))},get CollectingHandler(){return defineProp("CollectingHandler",__webpack_require__(284))},DefaultHandler:DomHandler,get RssHandler(){return defineProp("RssHandler",this.FeedHandler)},parseDOM:function(data,options){var handler=new DomHandler(options);return new Parser(handler,options).end(data),handler.dom},parseFeed:function(feed,options){var handler=new module.exports.FeedHandler(options);return new Parser(handler,options).end(feed),handler.dom},createDomStream:function(cb,options,elementCb){var handler=new DomHandler(cb,options,elementCb);return new Parser(handler,options)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},,function(module,exports,__webpack_require__){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}};module.exports=invariant},function(module,exports,__webpack_require__){var store=__webpack_require__(307)("wks"),uid=__webpack_require__(220),Symbol=__webpack_require__(22).Symbol,USE_SYMBOL="function"==typeof Symbol;(module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&Symbol[name]||(USE_SYMBOL?Symbol:uid)("Symbol."+name))}).store=store},function(module,exports,__webpack_require__){"use strict";var warning=function(){};module.exports=warning},,function(module,exports){module.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(elem){return"tag"===elem.type||"script"===elem.type||"style"===elem.type}}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(496)},function(module,exports,__webpack_require__){(function(global){module.exports=global.Backbone=__webpack_require__(582)}).call(exports,__webpack_require__(11))},,function(module,exports,__webpack_require__){var isObject=__webpack_require__(37);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(32),IE8_DOM_DEFINE=__webpack_require__(337),toPrimitive=__webpack_require__(301),dP=Object.defineProperty;exports.f=__webpack_require__(38)?Object.defineProperty:function(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");return"value"in Attributes&&(O[P]=Attributes.value),O}},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.NewsletterCreationBreadcrumb=__webpack_require__(507)}).call(exports,__webpack_require__(11))},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.ReactStringReplace=__webpack_require__(412)}).call(exports,__webpack_require__(11))},function(module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},function(module,exports,__webpack_require__){module.exports=!__webpack_require__(48)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(module,exports,__webpack_require__){function _extends(){return module.exports=_extends=_Object$assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}var _Object$assign=__webpack_require__(224);module.exports=_extends},function(module,exports,__webpack_require__){module.exports=__webpack_require__(457)},function(module,exports,__webpack_require__){(function(global){global.MailPoetLib||(global.MailPoetLib={}),module.exports=global.MailPoetLib.Listing=__webpack_require__(480)}).call(exports,__webpack_require__(11))},,function(module,exports,__webpack_require__){"use strict";function toObject(val){if(null===val||void 0===val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}/*
|
1 |
+
mailpoetJsonp([0],[function(module,exports,__webpack_require__){(function(module){!function(global,factory){module.exports=factory()}(0,function(){"use strict";function hooks(){return hookCallback.apply(null,arguments)}function isArray(input){return input instanceof Array||"[object Array]"===Object.prototype.toString.call(input)}function isObject(input){return null!=input&&"[object Object]"===Object.prototype.toString.call(input)}function isObjectEmpty(obj){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(obj).length;var k;for(k in obj)if(obj.hasOwnProperty(k))return!1;return!0}function isUndefined(input){return void 0===input}function isNumber(input){return"number"==typeof input||"[object Number]"===Object.prototype.toString.call(input)}function isDate(input){return input instanceof Date||"[object Date]"===Object.prototype.toString.call(input)}function map(arr,fn){var i,res=[];for(i=0;i<arr.length;++i)res.push(fn(arr[i],i));return res}function hasOwnProp(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function extend(a,b){for(var i in b)hasOwnProp(b,i)&&(a[i]=b[i]);return hasOwnProp(b,"toString")&&(a.toString=b.toString),hasOwnProp(b,"valueOf")&&(a.valueOf=b.valueOf),a}function createUTC(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(m){return null==m._pf&&(m._pf=defaultParsingFlags()),m._pf}function isValid(m){if(null==m._isValid){var flags=getParsingFlags(m),parsedParts=some.call(flags.parsedDateParts,function(i){return null!=i}),isNowValid=!isNaN(m._d.getTime())&&flags.overflow<0&&!flags.empty&&!flags.invalidMonth&&!flags.invalidWeekday&&!flags.weekdayMismatch&&!flags.nullInput&&!flags.invalidFormat&&!flags.userInvalidated&&(!flags.meridiem||flags.meridiem&&parsedParts);if(m._strict&&(isNowValid=isNowValid&&0===flags.charsLeftOver&&0===flags.unusedTokens.length&&void 0===flags.bigHour),null!=Object.isFrozen&&Object.isFrozen(m))return isNowValid;m._isValid=isNowValid}return m._isValid}function createInvalid(flags){var m=createUTC(NaN);return null!=flags?extend(getParsingFlags(m),flags):getParsingFlags(m).userInvalidated=!0,m}function copyConfig(to,from){var i,prop,val;if(isUndefined(from._isAMomentObject)||(to._isAMomentObject=from._isAMomentObject),isUndefined(from._i)||(to._i=from._i),isUndefined(from._f)||(to._f=from._f),isUndefined(from._l)||(to._l=from._l),isUndefined(from._strict)||(to._strict=from._strict),isUndefined(from._tzm)||(to._tzm=from._tzm),isUndefined(from._isUTC)||(to._isUTC=from._isUTC),isUndefined(from._offset)||(to._offset=from._offset),isUndefined(from._pf)||(to._pf=getParsingFlags(from)),isUndefined(from._locale)||(to._locale=from._locale),momentProperties.length>0)for(i=0;i<momentProperties.length;i++)prop=momentProperties[i],val=from[prop],isUndefined(val)||(to[prop]=val);return to}function Moment(config){copyConfig(this,config),this._d=new Date(null!=config._d?config._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===updateInProgress&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(obj){return obj instanceof Moment||null!=obj&&null!=obj._isAMomentObject}function absFloor(number){return number<0?Math.ceil(number)||0:Math.floor(number)}function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;return 0!==coercedNumber&&isFinite(coercedNumber)&&(value=absFloor(coercedNumber)),value}function compareArrays(array1,array2,dontConvert){var i,len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0;for(i=0;i<len;i++)(dontConvert&&array1[i]!==array2[i]||!dontConvert&&toInt(array1[i])!==toInt(array2[i]))&&diffs++;return diffs+lengthDiff}function warn(msg){!1===hooks.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+msg)}function deprecate(msg,fn){var firstTime=!0;return extend(function(){if(null!=hooks.deprecationHandler&&hooks.deprecationHandler(null,msg),firstTime){for(var arg,args=[],i=0;i<arguments.length;i++){if(arg="","object"==typeof arguments[i]){arg+="\n["+i+"] ";for(var key in arguments[0])arg+=key+": "+arguments[0][key]+", ";arg=arg.slice(0,-2)}else arg=arguments[i];args.push(arg)}warn(msg+"\nArguments: "+Array.prototype.slice.call(args).join("")+"\n"+(new Error).stack),firstTime=!1}return fn.apply(this,arguments)},fn)}function deprecateSimple(name,msg){null!=hooks.deprecationHandler&&hooks.deprecationHandler(name,msg),deprecations[name]||(warn(msg),deprecations[name]=!0)}function isFunction(input){return input instanceof Function||"[object Function]"===Object.prototype.toString.call(input)}function set(config){var prop,i;for(i in config)prop=config[i],isFunction(prop)?this[i]=prop:this["_"+i]=prop;this._config=config,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(parentConfig,childConfig){var prop,res=extend({},parentConfig);for(prop in childConfig)hasOwnProp(childConfig,prop)&&(isObject(parentConfig[prop])&&isObject(childConfig[prop])?(res[prop]={},extend(res[prop],parentConfig[prop]),extend(res[prop],childConfig[prop])):null!=childConfig[prop]?res[prop]=childConfig[prop]:delete res[prop]);for(prop in parentConfig)hasOwnProp(parentConfig,prop)&&!hasOwnProp(childConfig,prop)&&isObject(parentConfig[prop])&&(res[prop]=extend({},res[prop]));return res}function Locale(config){null!=config&&this.set(config)}function calendar(key,mom,now){var output=this._calendar[key]||this._calendar.sameElse;return isFunction(output)?output.call(mom,now):output}function longDateFormat(key){var format=this._longDateFormat[key],formatUpper=this._longDateFormat[key.toUpperCase()];return format||!formatUpper?format:(this._longDateFormat[key]=formatUpper.replace(/MMMM|MM|DD|dddd/g,function(val){return val.slice(1)}),this._longDateFormat[key])}function invalidDate(){return this._invalidDate}function ordinal(number){return this._ordinal.replace("%d",number)}function relativeTime(number,withoutSuffix,string,isFuture){var output=this._relativeTime[string];return isFunction(output)?output(number,withoutSuffix,string,isFuture):output.replace(/%d/i,number)}function pastFuture(diff,output){var format=this._relativeTime[diff>0?"future":"past"];return isFunction(format)?format(output):format.replace(/%s/i,output)}function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+"s"]=aliases[shorthand]=unit}function normalizeUnits(units){return"string"==typeof units?aliases[units]||aliases[units.toLowerCase()]:void 0}function normalizeObjectUnits(inputObject){var normalizedProp,prop,normalizedInput={};for(prop in inputObject)hasOwnProp(inputObject,prop)&&(normalizedProp=normalizeUnits(prop))&&(normalizedInput[normalizedProp]=inputObject[prop]);return normalizedInput}function addUnitPriority(unit,priority){priorities[unit]=priority}function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj)units.push({unit:u,priority:priorities[u]});return units.sort(function(a,b){return a.priority-b.priority}),units}function zeroFill(number,targetLength,forceSign){var absNumber=""+Math.abs(number),zerosToFill=targetLength-absNumber.length;return(number>=0?forceSign?"+":"":"-")+Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber}function addFormatToken(token,padded,ordinal,callback){var func=callback;"string"==typeof callback&&(func=function(){return this[callback]()}),token&&(formatTokenFunctions[token]=func),padded&&(formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2])}),ordinal&&(formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token)})}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|\]$/g,""):input.replace(/\\/g,"")}function makeFormatFunction(format){var i,length,array=format.match(formattingTokens);for(i=0,length=array.length;i<length;i++)formatTokenFunctions[array[i]]?array[i]=formatTokenFunctions[array[i]]:array[i]=removeFormattingTokens(array[i]);return function(mom){var i,output="";for(i=0;i<length;i++)output+=isFunction(array[i])?array[i].call(mom,format):array[i];return output}}function formatMoment(m,format){return m.isValid()?(format=expandFormat(format,m.localeData()),formatFunctions[format]=formatFunctions[format]||makeFormatFunction(format),formatFunctions[format](m)):m.localeData().invalidDate()}function expandFormat(format,locale){function replaceLongDateFormatTokens(input){return locale.longDateFormat(input)||input}var i=5;for(localFormattingTokens.lastIndex=0;i>=0&&localFormattingTokens.test(format);)format=format.replace(localFormattingTokens,replaceLongDateFormatTokens),localFormattingTokens.lastIndex=0,i-=1;return format}function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return isStrict&&strictRegex?strictRegex:regex}}function getParseRegexForToken(token,config){return hasOwnProp(regexes,token)?regexes[token](config._strict,config._locale):new RegExp(unescapeFormat(token))}function unescapeFormat(s){return regexEscape(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4}))}function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function addParseToken(token,callback){var i,func=callback;for("string"==typeof token&&(token=[token]),isNumber(callback)&&(func=function(input,array){array[callback]=toInt(input)}),i=0;i<token.length;i++)tokens[token[i]]=func}function addWeekParseToken(token,callback){addParseToken(token,function(input,array,config,token){config._w=config._w||{},callback(input,config._w,config,token)})}function addTimeToArrayFromToken(token,input,config){null!=input&&hasOwnProp(tokens,token)&&tokens[token](input,config._a,config,token)}function daysInYear(year){return isLeapYear(year)?366:365}function isLeapYear(year){return year%4==0&&year%100!=0||year%400==0}function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(unit,keepTime){return function(value){return null!=value?(set$1(this,unit,value),hooks.updateOffset(this,keepTime),this):get(this,unit)}}function get(mom,unit){return mom.isValid()?mom._d["get"+(mom._isUTC?"UTC":"")+unit]():NaN}function set$1(mom,unit,value){mom.isValid()&&!isNaN(value)&&("FullYear"===unit&&isLeapYear(mom.year())&&1===mom.month()&&29===mom.date()?mom._d["set"+(mom._isUTC?"UTC":"")+unit](value,mom.month(),daysInMonth(value,mom.month())):mom._d["set"+(mom._isUTC?"UTC":"")+unit](value))}function stringGet(units){return units=normalizeUnits(units),isFunction(this[units])?this[units]():this}function stringSet(units,value){if("object"==typeof units){units=normalizeObjectUnits(units);for(var prioritized=getPrioritizedUnits(units),i=0;i<prioritized.length;i++)this[prioritized[i].unit](units[prioritized[i].unit])}else if(units=normalizeUnits(units),isFunction(this[units]))return this[units](value);return this}function mod(n,x){return(n%x+x)%x}function daysInMonth(year,month){if(isNaN(year)||isNaN(month))return NaN;var modMonth=mod(month,12);return year+=(month-modMonth)/12,1===modMonth?isLeapYear(year)?29:28:31-modMonth%7%2}function localeMonths(m,format){return m?isArray(this._months)?this._months[m.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(format)?"format":"standalone"][m.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(m,format){return m?isArray(this._monthsShort)?this._monthsShort[m.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(format)?"format":"standalone"][m.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(monthName,format,strict){var i,ii,mom,llc=monthName.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)mom=createUTC([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(mom,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(mom,"").toLocaleLowerCase();return strict?"MMM"===format?(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):"MMM"===format?-1!==(ii=indexOf.call(this._shortMonthsParse,llc))?ii:(ii=indexOf.call(this._longMonthsParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._longMonthsParse,llc))?ii:(ii=indexOf.call(this._shortMonthsParse,llc),-1!==ii?ii:null)}function localeMonthsParse(monthName,format,strict){var i,mom,regex;if(this._monthsParseExact)return handleStrictParse.call(this,monthName,format,strict);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(mom=createUTC([2e3,i]),strict&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(mom,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(mom,"").replace(".","")+"$","i")),strict||this._monthsParse[i]||(regex="^"+this.months(mom,"")+"|^"+this.monthsShort(mom,""),this._monthsParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"MMMM"===format&&this._longMonthsParse[i].test(monthName))return i;if(strict&&"MMM"===format&&this._shortMonthsParse[i].test(monthName))return i;if(!strict&&this._monthsParse[i].test(monthName))return i}}function setMonth(mom,value){var dayOfMonth;if(!mom.isValid())return mom;if("string"==typeof value)if(/^\d+$/.test(value))value=toInt(value);else if(value=mom.localeData().monthsParse(value),!isNumber(value))return mom;return dayOfMonth=Math.min(mom.date(),daysInMonth(mom.year(),value)),mom._d["set"+(mom._isUTC?"UTC":"")+"Month"](value,dayOfMonth),mom}function getSetMonth(value){return null!=value?(setMonth(this,value),hooks.updateOffset(this,!0),this):get(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&isStrict?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(isStrict){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),isStrict?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&isStrict?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<12;i++)mom=createUTC([2e3,i]),shortPieces.push(this.monthsShort(mom,"")),longPieces.push(this.months(mom,"")),mixedPieces.push(this.months(mom,"")),mixedPieces.push(this.monthsShort(mom,""));for(shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<12;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]);for(i=0;i<24;i++)mixedPieces[i]=regexEscape(mixedPieces[i]);this._monthsRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i")}function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);return y<100&&y>=0&&isFinite(date.getFullYear())&&date.setFullYear(y),date}function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));return y<100&&y>=0&&isFinite(date.getUTCFullYear())&&date.setUTCFullYear(y),date}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy;return-(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7+fwd-1}function dayOfYearFromWeeks(year,week,weekday,dow,doy){var resYear,resDayOfYear,localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset;return dayOfYear<=0?(resYear=year-1,resDayOfYear=daysInYear(resYear)+dayOfYear):dayOfYear>daysInYear(year)?(resYear=year+1,resDayOfYear=dayOfYear-daysInYear(year)):(resYear=year,resDayOfYear=dayOfYear),{year:resYear,dayOfYear:resDayOfYear}}function weekOfYear(mom,dow,doy){var resWeek,resYear,weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1;return week<1?(resYear=mom.year()-1,resWeek=week+weeksInYear(resYear,dow,doy)):week>weeksInYear(mom.year(),dow,doy)?(resWeek=week-weeksInYear(mom.year(),dow,doy),resYear=mom.year()+1):(resYear=mom.year(),resWeek=week),{week:resWeek,year:resYear}}function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7}function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week}function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(input){var week=this.localeData().week(this);return null==input?week:this.add(7*(input-week),"d")}function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return null==input?week:this.add(7*(input-week),"d")}function parseWeekday(input,locale){return"string"!=typeof input?input:isNaN(input)?(input=locale.weekdaysParse(input),"number"==typeof input?input:null):parseInt(input,10)}function parseIsoWeekday(input,locale){return"string"==typeof input?locale.weekdaysParse(input)%7||7:isNaN(input)?null:input}function localeWeekdays(m,format){return m?isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?"format":"standalone"][m.day()]:isArray(this._weekdays)?this._weekdays:this._weekdays.standalone}function localeWeekdaysShort(m){return m?this._weekdaysShort[m.day()]:this._weekdaysShort}function localeWeekdaysMin(m){return m?this._weekdaysMin[m.day()]:this._weekdaysMin}function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)mom=createUTC([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(mom,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(mom,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(mom,"").toLocaleLowerCase();return strict?"dddd"===format?(ii=indexOf.call(this._weekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null):(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"dddd"===format?-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):"ddd"===format?-1!==(ii=indexOf.call(this._shortWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._minWeekdaysParse,llc),-1!==ii?ii:null):-1!==(ii=indexOf.call(this._minWeekdaysParse,llc))?ii:-1!==(ii=indexOf.call(this._weekdaysParse,llc))?ii:(ii=indexOf.call(this._shortWeekdaysParse,llc),-1!==ii?ii:null)}function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,weekdayName,format,strict);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(mom=createUTC([2e3,1]).day(i),strict&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(mom,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(mom,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(mom,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(regex="^"+this.weekdays(mom,"")+"|^"+this.weekdaysShort(mom,"")+"|^"+this.weekdaysMin(mom,""),this._weekdaysParse[i]=new RegExp(regex.replace(".",""),"i")),strict&&"dddd"===format&&this._fullWeekdaysParse[i].test(weekdayName))return i;if(strict&&"ddd"===format&&this._shortWeekdaysParse[i].test(weekdayName))return i;if(strict&&"dd"===format&&this._minWeekdaysParse[i].test(weekdayName))return i;if(!strict&&this._weekdaysParse[i].test(weekdayName))return i}}function getSetDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var day=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=input?(input=parseWeekday(input,this.localeData()),this.add(input-day,"d")):day}function getSetLocaleDayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;var weekday=(this.day()+7-this.localeData()._week.dow)%7;return null==input?weekday:this.add(input-weekday,"d")}function getSetISODayOfWeek(input){if(!this.isValid())return null!=input?this:NaN;if(null!=input){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7)}return this.day()||7}function weekdaysRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(isStrict){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length}var i,mom,minp,shortp,longp,minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[];for(i=0;i<7;i++)mom=createUTC([2e3,1]).day(i),minp=this.weekdaysMin(mom,""),shortp=this.weekdaysShort(mom,""),longp=this.weekdays(mom,""),minPieces.push(minp),shortPieces.push(shortp),longPieces.push(longp),mixedPieces.push(minp),mixedPieces.push(shortp),mixedPieces.push(longp);for(minPieces.sort(cmpLenRev),shortPieces.sort(cmpLenRev),longPieces.sort(cmpLenRev),mixedPieces.sort(cmpLenRev),i=0;i<7;i++)shortPieces[i]=regexEscape(shortPieces[i]),longPieces[i]=regexEscape(longPieces[i]),mixedPieces[i]=regexEscape(mixedPieces[i]);this._weekdaysRegex=new RegExp("^("+mixedPieces.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+longPieces.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+shortPieces.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+minPieces.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase)})}function matchMeridiem(isStrict,locale){return locale._meridiemParse}function localeIsPM(input){return"p"===(input+"").toLowerCase().charAt(0)}function localeMeridiem(hours,minutes,isLower){return hours>11?isLower?"pm":"PM":isLower?"am":"AM"}function normalizeLocale(key){return key?key.toLowerCase().replace("_","-"):key}function chooseLocale(names){for(var j,next,locale,split,i=0;i<names.length;){for(split=normalizeLocale(names[i]).split("-"),j=split.length,next=normalizeLocale(names[i+1]),next=next?next.split("-"):null;j>0;){if(locale=loadLocale(split.slice(0,j).join("-")))return locale;if(next&&next.length>=j&&compareArrays(split,next,!0)>=j-1)break;j--}i++}return globalLocale}function loadLocale(name){var oldLocale=null;if(!locales[name]&&void 0!==module&&module&&module.exports)try{oldLocale=globalLocale._abbr;__webpack_require__(230)("./"+name),getSetGlobalLocale(oldLocale)}catch(e){}return locales[name]}function getSetGlobalLocale(key,values){var data;return key&&(data=isUndefined(values)?getLocale(key):defineLocale(key,values),data?globalLocale=data:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+key+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(name,config){if(null!==config){var locale,parentConfig=baseConfig;if(config.abbr=name,null!=locales[name])deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),parentConfig=locales[name]._config;else if(null!=config.parentLocale)if(null!=locales[config.parentLocale])parentConfig=locales[config.parentLocale]._config;else{if(null==(locale=loadLocale(config.parentLocale)))return localeFamilies[config.parentLocale]||(localeFamilies[config.parentLocale]=[]),localeFamilies[config.parentLocale].push({name:name,config:config}),null;parentConfig=locale._config}return locales[name]=new Locale(mergeConfigs(parentConfig,config)),localeFamilies[name]&&localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config)}),getSetGlobalLocale(name),locales[name]}return delete locales[name],null}function updateLocale(name,config){if(null!=config){var locale,tmpLocale,parentConfig=baseConfig;tmpLocale=loadLocale(name),null!=tmpLocale&&(parentConfig=tmpLocale._config),config=mergeConfigs(parentConfig,config),locale=new Locale(config),locale.parentLocale=locales[name],locales[name]=locale,getSetGlobalLocale(name)}else null!=locales[name]&&(null!=locales[name].parentLocale?locales[name]=locales[name].parentLocale:null!=locales[name]&&delete locales[name]);return locales[name]}function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr&&(key=key._locale._abbr),!key)return globalLocale;if(!isArray(key)){if(locale=loadLocale(key))return locale;key=[key]}return chooseLocale(key)}function listLocales(){return keys(locales)}function checkOverflow(m){var overflow,a=m._a;return a&&-2===getParsingFlags(m).overflow&&(overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||24===a[HOUR]&&(0!==a[MINUTE]||0!==a[SECOND]||0!==a[MILLISECOND])?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(m)._overflowDayOfYear&&(overflow<YEAR||overflow>DATE)&&(overflow=DATE),getParsingFlags(m)._overflowWeeks&&-1===overflow&&(overflow=WEEK),getParsingFlags(m)._overflowWeekday&&-1===overflow&&(overflow=WEEKDAY),getParsingFlags(m).overflow=overflow),m}function defaults(a,b,c){return null!=a?a:null!=b?b:c}function currentDateArray(config){var nowValue=new Date(hooks.now());return config._useUTC?[nowValue.getUTCFullYear(),nowValue.getUTCMonth(),nowValue.getUTCDate()]:[nowValue.getFullYear(),nowValue.getMonth(),nowValue.getDate()]}function configFromArray(config){var i,date,currentDate,expectedWeekday,yearToUse,input=[];if(!config._d){for(currentDate=currentDateArray(config),config._w&&null==config._a[DATE]&&null==config._a[MONTH]&&dayOfYearFromWeekInfo(config),null!=config._dayOfYear&&(yearToUse=defaults(config._a[YEAR],currentDate[YEAR]),(config._dayOfYear>daysInYear(yearToUse)||0===config._dayOfYear)&&(getParsingFlags(config)._overflowDayOfYear=!0),date=createUTCDate(yearToUse,0,config._dayOfYear),config._a[MONTH]=date.getUTCMonth(),config._a[DATE]=date.getUTCDate()),i=0;i<3&&null==config._a[i];++i)config._a[i]=input[i]=currentDate[i];for(;i<7;i++)config._a[i]=input[i]=null==config._a[i]?2===i?1:0:config._a[i];24===config._a[HOUR]&&0===config._a[MINUTE]&&0===config._a[SECOND]&&0===config._a[MILLISECOND]&&(config._nextDay=!0,config._a[HOUR]=0),config._d=(config._useUTC?createUTCDate:createDate).apply(null,input),expectedWeekday=config._useUTC?config._d.getUTCDay():config._d.getDay(),null!=config._tzm&&config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),config._nextDay&&(config._a[HOUR]=24),config._w&&void 0!==config._w.d&&config._w.d!==expectedWeekday&&(getParsingFlags(config).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;if(w=config._w,null!=w.GG||null!=w.W||null!=w.E)dow=1,doy=4,weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year),week=defaults(w.W,1),((weekday=defaults(w.E,1))<1||weekday>7)&&(weekdayOverflow=!0);else{dow=config._locale._week.dow,doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year),week=defaults(w.w,curWeek.week),null!=w.d?((weekday=w.d)<0||weekday>6)&&(weekdayOverflow=!0):null!=w.e?(weekday=w.e+dow,(w.e<0||w.e>6)&&(weekdayOverflow=!0)):weekday=dow}week<1||week>weeksInYear(weekYear,dow,doy)?getParsingFlags(config)._overflowWeeks=!0:null!=weekdayOverflow?getParsingFlags(config)._overflowWeekday=!0:(temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),config._a[YEAR]=temp.year,config._dayOfYear=temp.dayOfYear)}function configFromISO(config){var i,l,allowTime,dateFormat,timeFormat,tzFormat,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string);if(match){for(getParsingFlags(config).iso=!0,i=0,l=isoDates.length;i<l;i++)if(isoDates[i][1].exec(match[1])){dateFormat=isoDates[i][0],allowTime=!1!==isoDates[i][2];break}if(null==dateFormat)return void(config._isValid=!1);if(match[3]){for(i=0,l=isoTimes.length;i<l;i++)if(isoTimes[i][1].exec(match[3])){timeFormat=(match[2]||" ")+isoTimes[i][0];break}if(null==timeFormat)return void(config._isValid=!1)}if(!allowTime&&null!=timeFormat)return void(config._isValid=!1);if(match[4]){if(!tzRegex.exec(match[4]))return void(config._isValid=!1);tzFormat="Z"}config._f=dateFormat+(timeFormat||"")+(tzFormat||""),configFromStringAndFormat(config)}else config._isValid=!1}function extractFromRFC2822Strings(yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr){var result=[untruncateYear(yearStr),defaultLocaleMonthsShort.indexOf(monthStr),parseInt(dayStr,10),parseInt(hourStr,10),parseInt(minuteStr,10)];return secondStr&&result.push(parseInt(secondStr,10)),result}function untruncateYear(yearStr){var year=parseInt(yearStr,10);return year<=49?2e3+year:year<=999?1900+year:year}function preprocessRFC2822(s){return s.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function checkWeekday(weekdayStr,parsedInput,config){if(weekdayStr){if(defaultLocaleWeekdaysShort.indexOf(weekdayStr)!==new Date(parsedInput[0],parsedInput[1],parsedInput[2]).getDay())return getParsingFlags(config).weekdayMismatch=!0,config._isValid=!1,!1}return!0}function calculateOffset(obsOffset,militaryOffset,numOffset){if(obsOffset)return obsOffsets[obsOffset];if(militaryOffset)return 0;var hm=parseInt(numOffset,10),m=hm%100;return(hm-m)/100*60+m}function configFromRFC2822(config){var match=rfc2822.exec(preprocessRFC2822(config._i));if(match){var parsedArray=extractFromRFC2822Strings(match[4],match[3],match[2],match[5],match[6],match[7]);if(!checkWeekday(match[1],parsedArray,config))return;config._a=parsedArray,config._tzm=calculateOffset(match[8],match[9],match[10]),config._d=createUTCDate.apply(null,config._a),config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm),getParsingFlags(config).rfc2822=!0}else config._isValid=!1}function configFromString(config){var matched=aspNetJsonRegex.exec(config._i);if(null!==matched)return void(config._d=new Date(+matched[1]));configFromISO(config),!1===config._isValid&&(delete config._isValid,configFromRFC2822(config),!1===config._isValid&&(delete config._isValid,hooks.createFromInputFallback(config)))}function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601)return void configFromISO(config);if(config._f===hooks.RFC_2822)return void configFromRFC2822(config);config._a=[],getParsingFlags(config).empty=!0;var i,parsedInput,tokens,token,skipped,string=""+config._i,stringLength=string.length,totalParsedInputLength=0;for(tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[],i=0;i<tokens.length;i++)token=tokens[i],parsedInput=(string.match(getParseRegexForToken(token,config))||[])[0],parsedInput&&(skipped=string.substr(0,string.indexOf(parsedInput)),skipped.length>0&&getParsingFlags(config).unusedInput.push(skipped),string=string.slice(string.indexOf(parsedInput)+parsedInput.length),totalParsedInputLength+=parsedInput.length),formatTokenFunctions[token]?(parsedInput?getParsingFlags(config).empty=!1:getParsingFlags(config).unusedTokens.push(token),addTimeToArrayFromToken(token,parsedInput,config)):config._strict&&!parsedInput&&getParsingFlags(config).unusedTokens.push(token);getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength,string.length>0&&getParsingFlags(config).unusedInput.push(string),config._a[HOUR]<=12&&!0===getParsingFlags(config).bigHour&&config._a[HOUR]>0&&(getParsingFlags(config).bigHour=void 0),getParsingFlags(config).parsedDateParts=config._a.slice(0),getParsingFlags(config).meridiem=config._meridiem,config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem),configFromArray(config),checkOverflow(config)}function meridiemFixWrap(locale,hour,meridiem){var isPm;return null==meridiem?hour:null!=locale.meridiemHour?locale.meridiemHour(hour,meridiem):null!=locale.isPM?(isPm=locale.isPM(meridiem),isPm&&hour<12&&(hour+=12),isPm||12!==hour||(hour=0),hour):hour}function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(0===config._f.length)return getParsingFlags(config).invalidFormat=!0,void(config._d=new Date(NaN));for(i=0;i<config._f.length;i++)currentScore=0,tempConfig=copyConfig({},config),null!=config._useUTC&&(tempConfig._useUTC=config._useUTC),tempConfig._f=config._f[i],configFromStringAndFormat(tempConfig),isValid(tempConfig)&&(currentScore+=getParsingFlags(tempConfig).charsLeftOver,currentScore+=10*getParsingFlags(tempConfig).unusedTokens.length,getParsingFlags(tempConfig).score=currentScore,(null==scoreToBeat||currentScore<scoreToBeat)&&(scoreToBeat=currentScore,bestMoment=tempConfig));extend(config,bestMoment||tempConfig)}function configFromObject(config){if(!config._d){var i=normalizeObjectUnits(config._i);config._a=map([i.year,i.month,i.day||i.date,i.hour,i.minute,i.second,i.millisecond],function(obj){return obj&&parseInt(obj,10)}),configFromArray(config)}}function createFromConfig(config){var res=new Moment(checkOverflow(prepareConfig(config)));return res._nextDay&&(res.add(1,"d"),res._nextDay=void 0),res}function prepareConfig(config){var input=config._i,format=config._f;return config._locale=config._locale||getLocale(config._l),null===input||void 0===format&&""===input?createInvalid({nullInput:!0}):("string"==typeof input&&(config._i=input=config._locale.preparse(input)),isMoment(input)?new Moment(checkOverflow(input)):(isDate(input)?config._d=input:isArray(format)?configFromStringAndArray(config):format?configFromStringAndFormat(config):configFromInput(config),isValid(config)||(config._d=null),config))}function configFromInput(config){var input=config._i;isUndefined(input)?config._d=new Date(hooks.now()):isDate(input)?config._d=new Date(input.valueOf()):"string"==typeof input?configFromString(config):isArray(input)?(config._a=map(input.slice(0),function(obj){return parseInt(obj,10)}),configFromArray(config)):isObject(input)?configFromObject(config):isNumber(input)?config._d=new Date(input):hooks.createFromInputFallback(config)}function createLocalOrUTC(input,format,locale,strict,isUTC){var c={};return!0!==locale&&!1!==locale||(strict=locale,locale=void 0),(isObject(input)&&isObjectEmpty(input)||isArray(input)&&0===input.length)&&(input=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=isUTC,c._l=locale,c._i=input,c._f=format,c._strict=strict,createFromConfig(c)}function createLocal(input,format,locale,strict){return createLocalOrUTC(input,format,locale,strict,!1)}function pickBy(fn,moments){var res,i;if(1===moments.length&&isArray(moments[0])&&(moments=moments[0]),!moments.length)return createLocal();for(res=moments[0],i=1;i<moments.length;++i)moments[i].isValid()&&!moments[i][fn](res)||(res=moments[i]);return res}function min(){return pickBy("isBefore",[].slice.call(arguments,0))}function max(){return pickBy("isAfter",[].slice.call(arguments,0))}function isDurationValid(m){for(var key in m)if(-1===indexOf.call(ordering,key)||null!=m[key]&&isNaN(m[key]))return!1;for(var unitHasDecimal=!1,i=0;i<ordering.length;++i)if(m[ordering[i]]){if(unitHasDecimal)return!1;parseFloat(m[ordering[i]])!==toInt(m[ordering[i]])&&(unitHasDecimal=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(duration){var normalizedInput=normalizeObjectUnits(duration),years=normalizedInput.year||0,quarters=normalizedInput.quarter||0,months=normalizedInput.month||0,weeks=normalizedInput.week||0,days=normalizedInput.day||0,hours=normalizedInput.hour||0,minutes=normalizedInput.minute||0,seconds=normalizedInput.second||0,milliseconds=normalizedInput.millisecond||0;this._isValid=isDurationValid(normalizedInput),this._milliseconds=+milliseconds+1e3*seconds+6e4*minutes+1e3*hours*60*60,this._days=+days+7*weeks,this._months=+months+3*quarters+12*years,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(obj){return obj instanceof Duration}function absRound(number){return number<0?-1*Math.round(-1*number):Math.round(number)}function offset(token,separator){addFormatToken(token,0,0,function(){var offset=this.utcOffset(),sign="+";return offset<0&&(offset=-offset,sign="-"),sign+zeroFill(~~(offset/60),2)+separator+zeroFill(~~offset%60,2)})}function offsetFromString(matcher,string){var matches=(string||"").match(matcher);if(null===matches)return null;var chunk=matches[matches.length-1]||[],parts=(chunk+"").match(chunkOffset)||["-",0,0],minutes=60*parts[1]+toInt(parts[2]);return 0===minutes?0:"+"===parts[0]?minutes:-minutes}function cloneWithOffset(input,model){var res,diff;return model._isUTC?(res=model.clone(),diff=(isMoment(input)||isDate(input)?input.valueOf():createLocal(input).valueOf())-res.valueOf(),res._d.setTime(res._d.valueOf()+diff),hooks.updateOffset(res,!1),res):createLocal(input).local()}function getDateOffset(m){return 15*-Math.round(m._d.getTimezoneOffset()/15)}function getSetOffset(input,keepLocalTime,keepMinutes){var localAdjust,offset=this._offset||0;if(!this.isValid())return null!=input?this:NaN;if(null!=input){if("string"==typeof input){if(null===(input=offsetFromString(matchShortOffset,input)))return this}else Math.abs(input)<16&&!keepMinutes&&(input*=60);return!this._isUTC&&keepLocalTime&&(localAdjust=getDateOffset(this)),this._offset=input,this._isUTC=!0,null!=localAdjust&&this.add(localAdjust,"m"),offset!==input&&(!keepLocalTime||this._changeInProgress?addSubtract(this,createDuration(input-offset,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?offset:getDateOffset(this)}function getSetZone(input,keepLocalTime){return null!=input?("string"!=typeof input&&(input=-input),this.utcOffset(input,keepLocalTime),this):-this.utcOffset()}function setOffsetToUTC(keepLocalTime){return this.utcOffset(0,keepLocalTime)}function setOffsetToLocal(keepLocalTime){return this._isUTC&&(this.utcOffset(0,keepLocalTime),this._isUTC=!1,keepLocalTime&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var tZone=offsetFromString(matchOffset,this._i);null!=tZone?this.utcOffset(tZone):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(input){return!!this.isValid()&&(input=input?createLocal(input).utcOffset():0,(this.utcOffset()-input)%60==0)}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var c={};if(copyConfig(c,this),c=prepareConfig(c),c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function createDuration(input,key){var sign,ret,diffRes,duration=input,match=null;return isDuration(input)?duration={ms:input._milliseconds,d:input._days,M:input._months}:isNumber(input)?(duration={},key?duration[key]=input:duration.milliseconds=input):(match=aspNetRegex.exec(input))?(sign="-"===match[1]?-1:1,duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(1e3*match[MILLISECOND]))*sign}):(match=isoRegex.exec(input))?(sign="-"===match[1]?-1:(match[1],1),duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)}):null==duration?duration={}:"object"==typeof duration&&("from"in duration||"to"in duration)&&(diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to)),duration={},duration.ms=diffRes.milliseconds,duration.M=diffRes.months),ret=new Duration(duration),isDuration(input)&&hasOwnProp(input,"_locale")&&(ret._locale=input._locale),ret}function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(",","."));return(isNaN(res)?0:res)*sign}function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};return res.months=other.month()-base.month()+12*(other.year()-base.year()),base.clone().add(res.months,"M").isAfter(other)&&--res.months,res.milliseconds=+other-+base.clone().add(res.months,"M"),res}function momentsDifference(base,other){var res;return base.isValid()&&other.isValid()?(other=cloneWithOffset(other,base),base.isBefore(other)?res=positiveMomentsDifference(base,other):(res=positiveMomentsDifference(other,base),res.milliseconds=-res.milliseconds,res.months=-res.months),res):{milliseconds:0,months:0}}function createAdder(direction,name){return function(val,period){var dur,tmp;return null===period||isNaN(+period)||(deprecateSimple(name,"moment()."+name+"(period, number) is deprecated. Please use moment()."+name+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),tmp=val,val=period,period=tmp),val="string"==typeof val?+val:val,dur=createDuration(val,period),addSubtract(this,dur,direction),this}}function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);mom.isValid()&&(updateOffset=null==updateOffset||updateOffset,months&&setMonth(mom,get(mom,"Month")+months*isAdding),days&&set$1(mom,"Date",get(mom,"Date")+days*isAdding),milliseconds&&mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding),updateOffset&&hooks.updateOffset(mom,days||months))}function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,"days",!0);return diff<-6?"sameElse":diff<-1?"lastWeek":diff<0?"lastDay":diff<1?"sameDay":diff<2?"nextDay":diff<7?"nextWeek":"sameElse"}function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf("day"),format=hooks.calendarFormat(this,sod)||"sameElse",output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)))}function clone(){return new Moment(this)}function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()>localInput.valueOf():localInput.valueOf()<this.clone().startOf(units).valueOf())}function isBefore(input,units){var localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(isUndefined(units)?"millisecond":units),"millisecond"===units?this.valueOf()<localInput.valueOf():this.clone().endOf(units).valueOf()<localInput.valueOf())}function isBetween(from,to,units,inclusivity){return inclusivity=inclusivity||"()",("("===inclusivity[0]?this.isAfter(from,units):!this.isBefore(from,units))&&(")"===inclusivity[1]?this.isBefore(to,units):!this.isAfter(to,units))}function isSame(input,units){var inputMs,localInput=isMoment(input)?input:createLocal(input);return!(!this.isValid()||!localInput.isValid())&&(units=normalizeUnits(units||"millisecond"),"millisecond"===units?this.valueOf()===localInput.valueOf():(inputMs=localInput.valueOf(),this.clone().startOf(units).valueOf()<=inputMs&&inputMs<=this.clone().endOf(units).valueOf()))}function isSameOrAfter(input,units){return this.isSame(input,units)||this.isAfter(input,units)}function isSameOrBefore(input,units){return this.isSame(input,units)||this.isBefore(input,units)}function diff(input,units,asFloat){var that,zoneDelta,output;if(!this.isValid())return NaN;if(that=cloneWithOffset(input,this),!that.isValid())return NaN;switch(zoneDelta=6e4*(that.utcOffset()-this.utcOffset()),units=normalizeUnits(units)){case"year":output=monthDiff(this,that)/12;break;case"month":output=monthDiff(this,that);break;case"quarter":output=monthDiff(this,that)/3;break;case"second":output=(this-that)/1e3;break;case"minute":output=(this-that)/6e4;break;case"hour":output=(this-that)/36e5;break;case"day":output=(this-that-zoneDelta)/864e5;break;case"week":output=(this-that-zoneDelta)/6048e5;break;default:output=this-that}return asFloat?output:absFloor(output)}function monthDiff(a,b){var anchor2,adjust,wholeMonthDiff=12*(b.year()-a.year())+(b.month()-a.month()),anchor=a.clone().add(wholeMonthDiff,"months");return b-anchor<0?(anchor2=a.clone().add(wholeMonthDiff-1,"months"),adjust=(b-anchor)/(anchor-anchor2)):(anchor2=a.clone().add(wholeMonthDiff+1,"months"),adjust=(b-anchor)/(anchor2-anchor)),-(wholeMonthDiff+adjust)||0}function toString(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(keepOffset){if(!this.isValid())return null;var utc=!0!==keepOffset,m=utc?this.clone().utc():this;return m.year()<0||m.year()>9999?formatMoment(m,utc?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?utc?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",formatMoment(m,"Z")):formatMoment(m,utc?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var func="moment",zone="";this.isLocal()||(func=0===this.utcOffset()?"moment.utc":"moment.parseZone",zone="Z");var prefix="["+func+'("]',year=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",suffix=zone+'[")]';return this.format(prefix+year+"-MM-DD[T]HH:mm:ss.SSS"+suffix)}function format(inputString){inputString||(inputString=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var output=formatMoment(this,inputString);return this.localeData().postformat(output)}function from(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({to:this,from:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function fromNow(withoutSuffix){return this.from(createLocal(),withoutSuffix)}function to(time,withoutSuffix){return this.isValid()&&(isMoment(time)&&time.isValid()||createLocal(time).isValid())?createDuration({from:this,to:time}).locale(this.locale()).humanize(!withoutSuffix):this.localeData().invalidDate()}function toNow(withoutSuffix){return this.to(createLocal(),withoutSuffix)}function locale(key){var newLocaleData;return void 0===key?this._locale._abbr:(newLocaleData=getLocale(key),null!=newLocaleData&&(this._locale=newLocaleData),this)}function localeData(){return this._locale}function startOf(units){switch(units=normalizeUnits(units)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===units&&this.weekday(0),"isoWeek"===units&&this.isoWeekday(1),"quarter"===units&&this.month(3*Math.floor(this.month()/3)),this}function endOf(units){return void 0===(units=normalizeUnits(units))||"millisecond"===units?this:("date"===units&&(units="day"),this.startOf(units).add(1,"isoWeek"===units?"week":units).subtract(1,"ms"))}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray(){var m=this;return[m.year(),m.month(),m.date(),m.hour(),m.minute(),m.second(),m.millisecond()]}function toObject(){var m=this;return{years:m.year(),months:m.month(),date:m.date(),hours:m.hours(),minutes:m.minutes(),seconds:m.seconds(),milliseconds:m.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function addWeekYearFormatToken(token,getter){addFormatToken(0,[token,token.length],0,getter)}function getSetWeekYear(input){return getSetWeekYearHelper.call(this,input,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(input){return getSetWeekYearHelper.call(this,input,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var weekInfo=this.localeData()._week;return weeksInYear(this.year(),weekInfo.dow,weekInfo.doy)}function getSetWeekYearHelper(input,week,weekday,dow,doy){var weeksTarget;return null==input?weekOfYear(this,dow,doy).year:(weeksTarget=weeksInYear(input,dow,doy),week>weeksTarget&&(week=weeksTarget),setWeekAll.call(this,input,week,weekday,dow,doy))}function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);return this.year(date.getUTCFullYear()),this.month(date.getUTCMonth()),this.date(date.getUTCDate()),this}function getSetQuarter(input){return null==input?Math.ceil((this.month()+1)/3):this.month(3*(input-1)+this.month()%3)}function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==input?dayOfYear:this.add(input-dayOfYear,"d")}function parseMs(input,array){array[MILLISECOND]=toInt(1e3*("0."+input))}function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}function createUnix(input){return createLocal(1e3*input)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(string){return string}function get$1(format,index,field,setter){var locale=getLocale(),utc=createUTC().set(setter,index);return locale[field](utc,format)}function listMonthsImpl(format,index,field){if(isNumber(format)&&(index=format,format=void 0),format=format||"",null!=index)return get$1(format,index,field,"month");var i,out=[];for(i=0;i<12;i++)out[i]=get$1(format,i,field,"month");return out}function listWeekdaysImpl(localeSorted,format,index,field){"boolean"==typeof localeSorted?(isNumber(format)&&(index=format,format=void 0),format=format||""):(format=localeSorted,index=format,localeSorted=!1,isNumber(format)&&(index=format,format=void 0),format=format||"");var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(null!=index)return get$1(format,(index+shift)%7,field,"day");var i,out=[];for(i=0;i<7;i++)out[i]=get$1(format,(i+shift)%7,field,"day");return out}function listMonths(format,index){return listMonthsImpl(format,index,"months")}function listMonthsShort(format,index){return listMonthsImpl(format,index,"monthsShort")}function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdays")}function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysShort")}function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,"weekdaysMin")}function abs(){var data=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),data.milliseconds=mathAbs(data.milliseconds),data.seconds=mathAbs(data.seconds),data.minutes=mathAbs(data.minutes),data.hours=mathAbs(data.hours),data.months=mathAbs(data.months),data.years=mathAbs(data.years),this}function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);return duration._milliseconds+=direction*other._milliseconds,duration._days+=direction*other._days,duration._months+=direction*other._months,duration._bubble()}function add$1(input,value){return addSubtract$1(this,input,value,1)}function subtract$1(input,value){return addSubtract$1(this,input,value,-1)}function absCeil(number){return number<0?Math.floor(number):Math.ceil(number)}function bubble(){var seconds,minutes,hours,years,monthsFromDays,milliseconds=this._milliseconds,days=this._days,months=this._months,data=this._data;return milliseconds>=0&&days>=0&&months>=0||milliseconds<=0&&days<=0&&months<=0||(milliseconds+=864e5*absCeil(monthsToDays(months)+days),days=0,months=0),data.milliseconds=milliseconds%1e3,seconds=absFloor(milliseconds/1e3),data.seconds=seconds%60,minutes=absFloor(seconds/60),data.minutes=minutes%60,hours=absFloor(minutes/60),data.hours=hours%24,days+=absFloor(hours/24),monthsFromDays=absFloor(daysToMonths(days)),months+=monthsFromDays,days-=absCeil(monthsToDays(monthsFromDays)),years=absFloor(months/12),months%=12,data.days=days,data.months=months,data.years=years,this}function daysToMonths(days){return 4800*days/146097}function monthsToDays(months){return 146097*months/4800}function as(units){if(!this.isValid())return NaN;var days,months,milliseconds=this._milliseconds;if("month"===(units=normalizeUnits(units))||"year"===units)return days=this._days+milliseconds/864e5,months=this._months+daysToMonths(days),"month"===units?months:months/12;switch(days=this._days+Math.round(monthsToDays(this._months)),units){case"week":return days/7+milliseconds/6048e5;case"day":return days+milliseconds/864e5;case"hour":return 24*days+milliseconds/36e5;case"minute":return 1440*days+milliseconds/6e4;case"second":return 86400*days+milliseconds/1e3;case"millisecond":return Math.floor(864e5*days)+milliseconds;default:throw new Error("Unknown unit "+units)}}function valueOf$1(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12):NaN}function makeAs(alias){return function(){return this.as(alias)}}function clone$1(){return createDuration(this)}function get$2(units){return units=normalizeUnits(units),this.isValid()?this[units+"s"]():NaN}function makeGetter(name){return function(){return this.isValid()?this._data[name]:NaN}}function weeks(){return absFloor(this.days()/7)}function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture)}function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs(),seconds=round(duration.as("s")),minutes=round(duration.as("m")),hours=round(duration.as("h")),days=round(duration.as("d")),months=round(duration.as("M")),years=round(duration.as("y")),a=seconds<=thresholds.ss&&["s",seconds]||seconds<thresholds.s&&["ss",seconds]||minutes<=1&&["m"]||minutes<thresholds.m&&["mm",minutes]||hours<=1&&["h"]||hours<thresholds.h&&["hh",hours]||days<=1&&["d"]||days<thresholds.d&&["dd",days]||months<=1&&["M"]||months<thresholds.M&&["MM",months]||years<=1&&["y"]||["yy",years];return a[2]=withoutSuffix,a[3]=+posNegDuration>0,a[4]=locale,substituteTimeAgo.apply(null,a)}function getSetRelativeTimeRounding(roundingFunction){return void 0===roundingFunction?round:"function"==typeof roundingFunction&&(round=roundingFunction,!0)}function getSetRelativeTimeThreshold(threshold,limit){return void 0!==thresholds[threshold]&&(void 0===limit?thresholds[threshold]:(thresholds[threshold]=limit,"s"===threshold&&(thresholds.ss=limit-1),!0))}function humanize(withSuffix){if(!this.isValid())return this.localeData().invalidDate();var locale=this.localeData(),output=relativeTime$1(this,!withSuffix,locale);return withSuffix&&(output=locale.pastFuture(+this,output)),locale.postformat(output)}function sign(x){return(x>0)-(x<0)||+x}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var minutes,hours,years,seconds=abs$1(this._milliseconds)/1e3,days=abs$1(this._days),months=abs$1(this._months);minutes=absFloor(seconds/60),hours=absFloor(minutes/60),seconds%=60,minutes%=60,years=absFloor(months/12),months%=12;var Y=years,M=months,D=days,h=hours,m=minutes,s=seconds?seconds.toFixed(3).replace(/\.?0+$/,""):"",total=this.asSeconds();if(!total)return"P0D";var totalSign=total<0?"-":"",ymSign=sign(this._months)!==sign(total)?"-":"",daysSign=sign(this._days)!==sign(total)?"-":"",hmsSign=sign(this._milliseconds)!==sign(total)?"-":"";return totalSign+"P"+(Y?ymSign+Y+"Y":"")+(M?ymSign+M+"M":"")+(D?daysSign+D+"D":"")+(h||m||s?"T":"")+(h?hmsSign+h+"H":"")+(m?hmsSign+m+"M":"")+(s?hmsSign+s+"S":"")}var hookCallback,some;some=Array.prototype.some?Array.prototype.some:function(fun){for(var t=Object(this),len=t.length>>>0,i=0;i<len;i++)if(i in t&&fun.call(this,t[i],i,t))return!0;return!1};var momentProperties=hooks.momentProperties=[],updateInProgress=!1,deprecations={};hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null;var keys;keys=Object.keys?Object.keys:function(obj){var i,res=[];for(i in obj)hasOwnProp(obj,i)&&res.push(i);return res};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},defaultDayOfMonthOrdinalParse=/\d{1,2}/,defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},aliases={},priorities={},formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={},match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,regexes={},tokens={},YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var y=this.year();return y<=9999?""+y:"+"+y}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addUnitAlias("year","y"),addUnitPriority("year",1),addRegexToken("Y",matchSigned),addRegexToken("YY",match1to2,match2),addRegexToken("YYYY",match1to4,match4),addRegexToken("YYYYY",match1to6,match6),addRegexToken("YYYYYY",match1to6,match6),addParseToken(["YYYYY","YYYYYY"],YEAR),addParseToken("YYYY",function(input,array){array[YEAR]=2===input.length?hooks.parseTwoDigitYear(input):toInt(input)}),addParseToken("YY",function(input,array){array[YEAR]=hooks.parseTwoDigitYear(input)}),addParseToken("Y",function(input,array){array[YEAR]=parseInt(input,10)}),hooks.parseTwoDigitYear=function(input){return toInt(input)+(toInt(input)>68?1900:2e3)};var indexOf,getSetYear=makeGetSet("FullYear",!0);indexOf=Array.prototype.indexOf?Array.prototype.indexOf:function(o){var i;for(i=0;i<this.length;++i)if(this[i]===o)return i;return-1},addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(format){return this.localeData().monthsShort(this,format)}),addFormatToken("MMMM",0,0,function(format){return this.localeData().months(this,format)}),addUnitAlias("month","M"),addUnitPriority("month",8),addRegexToken("M",match1to2),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",function(isStrict,locale){return locale.monthsShortRegex(isStrict)}),addRegexToken("MMMM",function(isStrict,locale){return locale.monthsRegex(isStrict)}),addParseToken(["M","MM"],function(input,array){array[MONTH]=toInt(input)-1}),addParseToken(["MMM","MMMM"],function(input,array,config,token){var month=config._locale.monthsParse(input,token,config._strict);null!=month?array[MONTH]=month:getParsingFlags(config).invalidMonth=input});var MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addUnitAlias("week","w"),addUnitAlias("isoWeek","W"),addUnitPriority("week",5),addUnitPriority("isoWeek",5),addRegexToken("w",match1to2),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(input,week,config,token){week[token.substr(0,1)]=toInt(input)});var defaultLocaleWeek={dow:0,doy:6};addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(format){return this.localeData().weekdaysMin(this,format)}),addFormatToken("ddd",0,0,function(format){return this.localeData().weekdaysShort(this,format)}),addFormatToken("dddd",0,0,function(format){return this.localeData().weekdays(this,format)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addUnitAlias("day","d"),addUnitAlias("weekday","e"),addUnitAlias("isoWeekday","E"),addUnitPriority("day",11),addUnitPriority("weekday",11),addUnitPriority("isoWeekday",11),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",function(isStrict,locale){return locale.weekdaysMinRegex(isStrict)}),addRegexToken("ddd",function(isStrict,locale){return locale.weekdaysShortRegex(isStrict)}),addRegexToken("dddd",function(isStrict,locale){return locale.weekdaysRegex(isStrict)}),addWeekParseToken(["dd","ddd","dddd"],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);null!=weekday?week.d=weekday:getParsingFlags(config).invalidWeekday=input}),addWeekParseToken(["d","e","E"],function(input,week,config,token){week[token]=toInt(input)});var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),meridiem("a",!0),meridiem("A",!1),addUnitAlias("hour","h"),addUnitPriority("hour",13),addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2),addRegexToken("h",match1to2),addRegexToken("k",match1to2),addRegexToken("HH",match1to2,match2),addRegexToken("hh",match1to2,match2),addRegexToken("kk",match1to2,match2),addRegexToken("hmm",match3to4),addRegexToken("hmmss",match5to6),addRegexToken("Hmm",match3to4),addRegexToken("Hmmss",match5to6),addParseToken(["H","HH"],HOUR),addParseToken(["k","kk"],function(input,array,config){var kInput=toInt(input);array[HOUR]=24===kInput?0:kInput}),addParseToken(["a","A"],function(input,array,config){config._isPm=config._locale.isPM(input),config._meridiem=input}),addParseToken(["h","hh"],function(input,array,config){array[HOUR]=toInt(input),getParsingFlags(config).bigHour=!0}),addParseToken("hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos)),getParsingFlags(config).bigHour=!0}),addParseToken("hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2)),getParsingFlags(config).bigHour=!0}),addParseToken("Hmm",function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos)),array[MINUTE]=toInt(input.substr(pos))}),addParseToken("Hmmss",function(input,array,config){var pos1=input.length-4,pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1)),array[MINUTE]=toInt(input.substr(pos1,2)),array[SECOND]=toInt(input.substr(pos2))});var globalLocale,defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0),baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((\-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(config){config._d=new Date(config._i+(config._useUTC?" UTC":""))}),hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other<this?this:other:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var other=createLocal.apply(null,arguments);return this.isValid()&&other.isValid()?other>this?this:other:createInvalid()}),now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(input,array,config){config._useUTC=!0,config._tzm=offsetFromString(matchShortOffset,input)});var chunkOffset=/([\+\-]|\d\d)/gi;hooks.updateOffset=function(){};var aspNetRegex=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var add=createAdder(1,"add"),subtract=createAdder(-1,"subtract");hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(key){return void 0===key?this.localeData():this.locale(key)});addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addUnitAlias("weekYear","gg"),addUnitAlias("isoWeekYear","GG"),addUnitPriority("weekYear",1),addUnitPriority("isoWeekYear",1),addRegexToken("G",matchSigned),addRegexToken("g",matchSigned),addRegexToken("GG",match1to2,match2),addRegexToken("gg",match1to2,match2),addRegexToken("GGGG",match1to4,match4),addRegexToken("gggg",match1to4,match4),addRegexToken("GGGGG",match1to6,match6),addRegexToken("ggggg",match1to6,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(input,week,config,token){week[token.substr(0,2)]=toInt(input)}),addWeekParseToken(["gg","GG"],function(input,week,config,token){week[token]=hooks.parseTwoDigitYear(input)}),addFormatToken("Q",0,"Qo","quarter"),addUnitAlias("quarter","Q"),addUnitPriority("quarter",7),addRegexToken("Q",match1),addParseToken("Q",function(input,array){array[MONTH]=3*(toInt(input)-1)}),addFormatToken("D",["DD",2],"Do","date"),addUnitAlias("date","D"),addUnitPriority("date",9),addRegexToken("D",match1to2),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(isStrict,locale){return isStrict?locale._dayOfMonthOrdinalParse||locale._ordinalParse:locale._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(input,array){array[DATE]=toInt(input.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addUnitAlias("dayOfYear","DDD"),addUnitPriority("dayOfYear",4),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(input,array,config){config._dayOfYear=toInt(input)}),addFormatToken("m",["mm",2],0,"minute"),addUnitAlias("minute","m"),addUnitPriority("minute",14),addRegexToken("m",match1to2),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addUnitAlias("second","s"),addUnitPriority("second",15),addRegexToken("s",match1to2),addRegexToken("ss",match1to2,match2),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormat
|