Version Description
Download this release
Release Info
Developer | flixos90 |
Plugin | Site Kit by Google |
Version | 1.10.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.10.0
- dist/assets/css/admin.css +258 -122
- dist/assets/css/adminbar.css +3 -0
- dist/assets/css/wpdashboard.css +17 -12
- dist/assets/js/ads.js +0 -1
- dist/assets/js/chunk-googlesitekit-adminbar-2251fc60b8ace67e074e.js +0 -39
- dist/assets/js/chunk-googlesitekit-adminbar-ea54613856d9a3d69f8a.js +39 -0
- dist/assets/js/chunk-googlesitekit-setup-wizard-1e21b4ac2926615f8918.js +7 -0
- dist/assets/js/chunk-googlesitekit-setup-wizard-202a8f53c46e62aeded3.js +0 -7
- dist/assets/js/chunk-googlesitekit-setup-wizard-proxy-29b0da81d821910655c6.js +0 -5
- dist/assets/js/chunk-googlesitekit-setup-wizard-proxy-d428c7c56939886fd958.js +5 -0
- dist/assets/js/chunk-googlesitekit-setup-wrapper-7305879f043f669e374f.js +1 -0
- dist/assets/js/chunk-googlesitekit-setup-wrapper-e13346873edace467a15.js +0 -1
- dist/assets/js/googlesitekit-activation.js +12 -12
- dist/assets/js/googlesitekit-admin.js +2 -2
- dist/assets/js/googlesitekit-adminbar-loader.js +2 -2
- dist/assets/js/googlesitekit-api.js +5 -5
- dist/assets/js/googlesitekit-dashboard-details.js +4 -7
dist/assets/css/admin.css
CHANGED
@@ -5973,39 +5973,9 @@ a.mdc-list-item {
|
|
5973 |
.googlesitekit-plugin .mdc-switch + label {
|
5974 |
margin-left: 10px; }
|
5975 |
|
5976 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__text-label {
|
5977 |
-
color: #757575; }
|
5978 |
-
|
5979 |
.googlesitekit-plugin .mdc-tab.mdc-tab--active .mdc-tab__text-label {
|
5980 |
color: #1a73e8; }
|
5981 |
|
5982 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__icon {
|
5983 |
-
color: #1a73e8;
|
5984 |
-
fill: currentColor; }
|
5985 |
-
|
5986 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple::before, .googlesitekit-plugin .mdc-tab .mdc-tab__ripple::after {
|
5987 |
-
background-color: #1a73e8; }
|
5988 |
-
|
5989 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple:hover::before {
|
5990 |
-
opacity: 0.04; }
|
5991 |
-
|
5992 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple:not(.mdc-ripple-upgraded):focus::before, .googlesitekit-plugin .mdc-tab .mdc-tab__ripple.mdc-ripple-upgraded--background-focused::before {
|
5993 |
-
transition-duration: 75ms;
|
5994 |
-
opacity: 0.12; }
|
5995 |
-
|
5996 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple:not(.mdc-ripple-upgraded)::after {
|
5997 |
-
transition: opacity 150ms linear; }
|
5998 |
-
|
5999 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple:not(.mdc-ripple-upgraded):active::after {
|
6000 |
-
transition-duration: 75ms;
|
6001 |
-
opacity: 0.12; }
|
6002 |
-
|
6003 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple.mdc-ripple-upgraded {
|
6004 |
-
--mdc-ripple-fg-opacity: 0.12; }
|
6005 |
-
|
6006 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__text-label {
|
6007 |
-
color: #1a73e8; }
|
6008 |
-
|
6009 |
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple::before, .googlesitekit-plugin .mdc-tab .mdc-tab__ripple::after {
|
6010 |
background-color: #1a73e8; }
|
6011 |
|
@@ -6033,9 +6003,6 @@ a.mdc-list-item {
|
|
6033 |
color: #1a73e8;
|
6034 |
outline: none; }
|
6035 |
|
6036 |
-
.googlesitekit-plugin .mdc-tab .mdc-tab__text-label {
|
6037 |
-
color: #757575; }
|
6038 |
-
|
6039 |
.googlesitekit-plugin .mdc-text-field {
|
6040 |
width: 250px; }
|
6041 |
.googlesitekit-plugin .mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input {
|
@@ -6244,6 +6211,9 @@ a.mdc-list-item {
|
|
6244 |
overflow: hidden;
|
6245 |
position: absolute !important;
|
6246 |
width: 1px; }
|
|
|
|
|
|
|
6247 |
|
6248 |
/*
|
6249 |
* Components
|
@@ -6817,6 +6787,46 @@ a.mdc-list-item {
|
|
6817 |
.googlesitekit-data-block .googlesitekit-data-block__source {
|
6818 |
margin-top: 12px; } }
|
6819 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6820 |
/**
|
6821 |
* Error text styles.
|
6822 |
*
|
@@ -7347,9 +7357,9 @@ a.mdc-list-item {
|
|
7347 |
margin-top: 25px; }
|
7348 |
|
7349 |
/**
|
7350 |
-
*
|
7351 |
*
|
7352 |
-
* Site Kit by Google, Copyright
|
7353 |
*
|
7354 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
7355 |
* you may not use this file except in compliance with the License.
|
@@ -7363,77 +7373,12 @@ a.mdc-list-item {
|
|
7363 |
* See the License for the specific language governing permissions and
|
7364 |
* limitations under the License.
|
7365 |
*/
|
7366 |
-
.googlesitekit-pagespeed-
|
7367 |
-
text-align: center; }
|
7368 |
-
|
7369 |
-
.googlesitekit-pagespeed-report__heading-wrapper {
|
7370 |
-
align-items: flex-start;
|
7371 |
display: flex;
|
7372 |
-
|
7373 |
-
justify-content: space-between;
|
7374 |
-
margin-right: 16px; }
|
7375 |
-
@media (min-width: 600px) {
|
7376 |
-
.googlesitekit-pagespeed-report__heading-wrapper {
|
7377 |
-
margin-right: 0; } }
|
7378 |
-
.googlesitekit-pagespeed-report__heading-wrapper h3 {
|
7379 |
-
flex: 1;
|
7380 |
-
margin-top: 0; }
|
7381 |
-
|
7382 |
-
.googlesitekit-pagespeed-report__score-category-wrapper {
|
7383 |
-
align-items: center;
|
7384 |
-
display: inline-flex; }
|
7385 |
-
.googlesitekit-pagespeed-report__score-category-wrapper--fast {
|
7386 |
-
color: #178239; }
|
7387 |
-
.googlesitekit-pagespeed-report__score-category-wrapper--average {
|
7388 |
-
color: #e67700; }
|
7389 |
-
.googlesitekit-pagespeed-report__score-category-wrapper--slow {
|
7390 |
-
color: #c7221f; }
|
7391 |
-
|
7392 |
-
.googlesitekit-pagespeed-report__score-icon {
|
7393 |
-
display: inline-block;
|
7394 |
-
margin-left: 10px;
|
7395 |
-
margin-top: 1px; }
|
7396 |
-
.googlesitekit-pagespeed-report__score-icon::before {
|
7397 |
-
background-position: center center;
|
7398 |
-
background-repeat: no-repeat;
|
7399 |
-
background-size: contain;
|
7400 |
-
border-radius: 50%;
|
7401 |
-
content: "";
|
7402 |
-
display: inline-block;
|
7403 |
-
height: 17px;
|
7404 |
-
width: 17px; }
|
7405 |
-
.googlesitekit-pagespeed-report__score-icon--fast::before {
|
7406 |
-
background-color: #178239;
|
7407 |
-
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2212%22%20viewBox%3D%220%200%2016%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M0%206.414L1.415%205l5.292%205.292-1.414%201.415z%22%2F%3E%3Cpath%20d%3D%22M14.146.146l1.415%201.414L5.414%2011.707%204%2010.292z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
7408 |
-
border: 4px solid #178239; }
|
7409 |
-
.googlesitekit-pagespeed-report__score-icon--average::before {
|
7410 |
-
background-color: #e67700;
|
7411 |
-
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%222%22%20height%3D%2212%22%20viewBox%3D%220%200%202%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M0%200h2v7H0zM0%2010h2v2H0z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
7412 |
-
border: 4px solid #e67700; }
|
7413 |
-
.googlesitekit-pagespeed-report__score-icon--slow::before {
|
7414 |
-
background-color: #fff;
|
7415 |
-
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2228%22%20height%3D%2225%22%20viewBox%3D%220%200%2028%2025%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.332%2024.75h21.335c2.182%200%203.542-2.366%202.451-4.25L16.451%202.07C15.36.184%2012.64.184%2011.549%202.07L.882%2020.5c-1.091%201.884.269%204.25%202.45%204.25zM14%2014.833a1.42%201.42%200%200%201-1.417-1.416v-2.834c0-.779.638-1.416%201.417-1.416.78%200%201.417.637%201.417%201.416v2.834A1.42%201.42%200%200%201%2014%2014.833zm1.417%205.667h-2.834v-2.833h2.834V20.5z%22%20fill%3D%22%23c7221f%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E");
|
7416 |
-
border-radius: 0; }
|
7417 |
-
|
7418 |
-
.googlesitekit-pagespeed-report__scale {
|
7419 |
-
color: #757575;
|
7420 |
-
font-size: 0.75rem; }
|
7421 |
|
7422 |
-
.googlesitekit-pagespeed-
|
7423 |
-
|
7424 |
-
.googlesitekit-pagespeed-report__scale-range::before {
|
7425 |
-
border-radius: 4px;
|
7426 |
-
content: "";
|
7427 |
-
display: inline-block;
|
7428 |
-
height: 8px;
|
7429 |
-
margin: 1px 8px;
|
7430 |
-
width: 16px; }
|
7431 |
-
.googlesitekit-pagespeed-report__scale-range--fast::before {
|
7432 |
-
background-color: #178239; }
|
7433 |
-
.googlesitekit-pagespeed-report__scale-range--average::before {
|
7434 |
-
background-color: #e67700; }
|
7435 |
-
.googlesitekit-pagespeed-report__scale-range--slow::before {
|
7436 |
-
background-color: #c7221f; }
|
7437 |
|
7438 |
/**
|
7439 |
* Page header styles.
|
@@ -7529,11 +7474,11 @@ a.mdc-list-item {
|
|
7529 |
position: relative;
|
7530 |
width: 1em; }
|
7531 |
.googlesitekit-percentage-circle--fast {
|
7532 |
-
color: #
|
7533 |
.googlesitekit-percentage-circle--average {
|
7534 |
-
color: #
|
7535 |
.googlesitekit-percentage-circle--slow {
|
7536 |
-
color: #
|
7537 |
.googlesitekit-percentage-circle::after {
|
7538 |
background-color: #fff;
|
7539 |
border-radius: 50%;
|
@@ -8375,13 +8320,13 @@ a.mdc-list-item {
|
|
8375 |
transform: rotate(360deg); }
|
8376 |
.googlesitekit-percentage-circle--fast .googlesitekit-percentage-circle__bar,
|
8377 |
.googlesitekit-percentage-circle--fast .googlesitekit-percentage-circle__fill {
|
8378 |
-
border-color: #
|
8379 |
.googlesitekit-percentage-circle--average .googlesitekit-percentage-circle__bar,
|
8380 |
.googlesitekit-percentage-circle--average .googlesitekit-percentage-circle__fill {
|
8381 |
-
border-color: #
|
8382 |
.googlesitekit-percentage-circle--slow .googlesitekit-percentage-circle__bar,
|
8383 |
.googlesitekit-percentage-circle--slow .googlesitekit-percentage-circle__fill {
|
8384 |
-
border-color: #
|
8385 |
|
8386 |
/**
|
8387 |
* Post searcher styles.
|
@@ -8557,6 +8502,8 @@ a.mdc-list-item {
|
|
8557 |
@media (min-width: 960px) {
|
8558 |
.googlesitekit-publisher-win .googlesitekit-publisher-win__detect {
|
8559 |
margin-left: 48px; } }
|
|
|
|
|
8560 |
.googlesitekit-publisher-win .googlesitekit-publisher-win__stats {
|
8561 |
margin-bottom: 24px; }
|
8562 |
.googlesitekit-publisher-win.win-stats-increase .googlesitekit-publisher-win__stats {
|
@@ -8672,13 +8619,15 @@ a.mdc-list-item {
|
|
8672 |
padding: 24px; } }
|
8673 |
.googlesitekit-details-widget .googlesitekit-table,
|
8674 |
.googlesitekit-alltraffic-widget .googlesitekit-table,
|
8675 |
-
.googlesitekit-wp-dashboard .googlesitekit-table
|
8676 |
-
.googlesitekit-pagespeed-report .googlesitekit-table {
|
8677 |
padding: 0; }
|
8678 |
.googlesitekit-table .googlesitekit-table__wrapper {
|
8679 |
border-collapse: collapse;
|
8680 |
table-layout: fixed;
|
8681 |
width: 100%; }
|
|
|
|
|
|
|
8682 |
.googlesitekit-table .googlesitekit-table__head-row {
|
8683 |
border-bottom: 1px solid #e6e6e6; }
|
8684 |
.googlesitekit-table .googlesitekit-table__head-item {
|
@@ -8688,11 +8637,14 @@ a.mdc-list-item {
|
|
8688 |
-ms-hyphens: auto;
|
8689 |
hyphens: auto;
|
8690 |
outline: 0;
|
8691 |
-
padding: 0
|
8692 |
position: relative;
|
8693 |
text-align: right;
|
8694 |
text-decoration: none;
|
8695 |
white-space: normal; }
|
|
|
|
|
|
|
8696 |
@media (min-width: 960px) {
|
8697 |
.googlesitekit-table .googlesitekit-table__head-item {
|
8698 |
padding: 0 12px 12px 12px; } }
|
@@ -8704,10 +8656,7 @@ a.mdc-list-item {
|
|
8704 |
.googlesitekit-table .googlesitekit-table__head-item--primary {
|
8705 |
width: 50%; }
|
8706 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
8707 |
-
padding-right:
|
8708 |
-
@media (min-width: 600px) {
|
8709 |
-
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
8710 |
-
padding-right: 0; } }
|
8711 |
@media (min-width: 960px) {
|
8712 |
.googlesitekit-table .googlesitekit-table__head-item[data-tooltip]::before {
|
8713 |
background: rgba(0, 0, 0, 0.7);
|
@@ -8736,8 +8685,11 @@ a.mdc-list-item {
|
|
8736 |
.googlesitekit-table .googlesitekit-table__body-row {
|
8737 |
border-bottom: 1px solid #e6e6e6; }
|
8738 |
.googlesitekit-table .googlesitekit-table__body-item {
|
8739 |
-
padding: 8px;
|
8740 |
text-align: right; }
|
|
|
|
|
|
|
8741 |
@media (min-width: 960px) {
|
8742 |
.googlesitekit-table .googlesitekit-table__body-item {
|
8743 |
padding: 12px; } }
|
@@ -8752,10 +8704,7 @@ a.mdc-list-item {
|
|
8752 |
.googlesitekit-table .googlesitekit-table__body-item .googlesitekit-mini-chart {
|
8753 |
display: block; } }
|
8754 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
8755 |
-
padding-right:
|
8756 |
-
@media (min-width: 600px) {
|
8757 |
-
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
8758 |
-
padding-right: 0; } }
|
8759 |
.googlesitekit-table--with-list .googlesitekit-table__body-row {
|
8760 |
transition: background-color 0.2s ease-in-out; }
|
8761 |
.googlesitekit-table--with-list .googlesitekit-table__body-row:last-child {
|
@@ -8947,6 +8896,171 @@ a.mdc-list-item {
|
|
8947 |
.googlesitekit-dashboard-single-url .googlesitekit-dashboard-single-url__title {
|
8948 |
margin: 0 0 10px 0; }
|
8949 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8950 |
/**
|
8951 |
* Dashboard splash styles.
|
8952 |
*
|
@@ -9911,7 +10025,9 @@ a.mdc-list-item {
|
|
9911 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item--nomargin {
|
9912 |
margin: 0; }
|
9913 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item-type {
|
|
|
9914 |
font-size: 0.75rem;
|
|
|
9915 |
margin: 0 0 8px 0; }
|
9916 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item-data {
|
9917 |
color: #5b5b61;
|
@@ -10061,3 +10177,23 @@ a.mdc-list-item {
|
|
10061 |
.googlesitekit-plugin .googlesitekit-margin-bottom-0 {
|
10062 |
margin-bottom: 0 !important; }
|
10063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5973 |
.googlesitekit-plugin .mdc-switch + label {
|
5974 |
margin-left: 10px; }
|
5975 |
|
|
|
|
|
|
|
5976 |
.googlesitekit-plugin .mdc-tab.mdc-tab--active .mdc-tab__text-label {
|
5977 |
color: #1a73e8; }
|
5978 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5979 |
.googlesitekit-plugin .mdc-tab .mdc-tab__ripple::before, .googlesitekit-plugin .mdc-tab .mdc-tab__ripple::after {
|
5980 |
background-color: #1a73e8; }
|
5981 |
|
6003 |
color: #1a73e8;
|
6004 |
outline: none; }
|
6005 |
|
|
|
|
|
|
|
6006 |
.googlesitekit-plugin .mdc-text-field {
|
6007 |
width: 250px; }
|
6008 |
.googlesitekit-plugin .mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input {
|
6211 |
overflow: hidden;
|
6212 |
position: absolute !important;
|
6213 |
width: 1px; }
|
6214 |
+
@media (max-width: 599px) {
|
6215 |
+
.googlesitekit-plugin .hidden-on-mobile {
|
6216 |
+
display: none; } }
|
6217 |
|
6218 |
/*
|
6219 |
* Components
|
6787 |
.googlesitekit-data-block .googlesitekit-data-block__source {
|
6788 |
margin-top: 12px; } }
|
6789 |
|
6790 |
+
/**
|
6791 |
+
* DeviceSizeTabBar styles.
|
6792 |
+
*
|
6793 |
+
* Site Kit by Google, Copyright 2020 Google LLC
|
6794 |
+
*
|
6795 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6796 |
+
* you may not use this file except in compliance with the License.
|
6797 |
+
* You may obtain a copy of the License at
|
6798 |
+
*
|
6799 |
+
* https://www.apache.org/licenses/LICENSE-2.0
|
6800 |
+
*
|
6801 |
+
* Unless required by applicable law or agreed to in writing, software
|
6802 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
6803 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
6804 |
+
* See the License for the specific language governing permissions and
|
6805 |
+
* limitations under the License.
|
6806 |
+
*/
|
6807 |
+
.googlesitekit-device-size-tab-bar {
|
6808 |
+
border-radius: 8px;
|
6809 |
+
overflow: hidden;
|
6810 |
+
width: auto; }
|
6811 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab {
|
6812 |
+
background: #fff;
|
6813 |
+
height: 32px;
|
6814 |
+
width: 56px; }
|
6815 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab:first-child {
|
6816 |
+
border-bottom-left-radius: 8px;
|
6817 |
+
border-top-left-radius: 8px; }
|
6818 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab:last-child {
|
6819 |
+
border-bottom-right-radius: 8px;
|
6820 |
+
border-top-right-radius: 8px; }
|
6821 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab svg path {
|
6822 |
+
fill: #5f6368; }
|
6823 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab.mdc-tab--active {
|
6824 |
+
background: #1a73e8; }
|
6825 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab.mdc-tab--active svg path {
|
6826 |
+
fill: #fff; }
|
6827 |
+
.googlesitekit-device-size-tab-bar .mdc-tab-scroller__scroll-content button.mdc-tab .mdc-tab-indicator {
|
6828 |
+
display: none; }
|
6829 |
+
|
6830 |
/**
|
6831 |
* Error text styles.
|
6832 |
*
|
7357 |
margin-top: 25px; }
|
7358 |
|
7359 |
/**
|
7360 |
+
* PageSpeed Insights Dashboard Widget styles.
|
7361 |
*
|
7362 |
+
* Site Kit by Google, Copyright 2020 Google LLC
|
7363 |
*
|
7364 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
7365 |
* you may not use this file except in compliance with the License.
|
7373 |
* See the License for the specific language governing permissions and
|
7374 |
* limitations under the License.
|
7375 |
*/
|
7376 |
+
.googlesitekit-pagespeed-widget header {
|
|
|
|
|
|
|
|
|
7377 |
display: flex;
|
7378 |
+
justify-content: space-between; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7379 |
|
7380 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__data-src-tabs {
|
7381 |
+
display: flex; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7382 |
|
7383 |
/**
|
7384 |
* Page header styles.
|
7474 |
position: relative;
|
7475 |
width: 1em; }
|
7476 |
.googlesitekit-percentage-circle--fast {
|
7477 |
+
color: #188038; }
|
7478 |
.googlesitekit-percentage-circle--average {
|
7479 |
+
color: #e37400; }
|
7480 |
.googlesitekit-percentage-circle--slow {
|
7481 |
+
color: #d93025; }
|
7482 |
.googlesitekit-percentage-circle::after {
|
7483 |
background-color: #fff;
|
7484 |
border-radius: 50%;
|
8320 |
transform: rotate(360deg); }
|
8321 |
.googlesitekit-percentage-circle--fast .googlesitekit-percentage-circle__bar,
|
8322 |
.googlesitekit-percentage-circle--fast .googlesitekit-percentage-circle__fill {
|
8323 |
+
border-color: #188038; }
|
8324 |
.googlesitekit-percentage-circle--average .googlesitekit-percentage-circle__bar,
|
8325 |
.googlesitekit-percentage-circle--average .googlesitekit-percentage-circle__fill {
|
8326 |
+
border-color: #e37400; }
|
8327 |
.googlesitekit-percentage-circle--slow .googlesitekit-percentage-circle__bar,
|
8328 |
.googlesitekit-percentage-circle--slow .googlesitekit-percentage-circle__fill {
|
8329 |
+
border-color: #d93025; }
|
8330 |
|
8331 |
/**
|
8332 |
* Post searcher styles.
|
8502 |
@media (min-width: 960px) {
|
8503 |
.googlesitekit-publisher-win .googlesitekit-publisher-win__detect {
|
8504 |
margin-left: 48px; } }
|
8505 |
+
.googlesitekit-publisher-win .googlesitekit-publisher-win__link a {
|
8506 |
+
font-size: 1.1rem; }
|
8507 |
.googlesitekit-publisher-win .googlesitekit-publisher-win__stats {
|
8508 |
margin-bottom: 24px; }
|
8509 |
.googlesitekit-publisher-win.win-stats-increase .googlesitekit-publisher-win__stats {
|
8619 |
padding: 24px; } }
|
8620 |
.googlesitekit-details-widget .googlesitekit-table,
|
8621 |
.googlesitekit-alltraffic-widget .googlesitekit-table,
|
8622 |
+
.googlesitekit-wp-dashboard .googlesitekit-table {
|
|
|
8623 |
padding: 0; }
|
8624 |
.googlesitekit-table .googlesitekit-table__wrapper {
|
8625 |
border-collapse: collapse;
|
8626 |
table-layout: fixed;
|
8627 |
width: 100%; }
|
8628 |
+
@media (max-width: 599px) {
|
8629 |
+
.googlesitekit-table .googlesitekit-table__wrapper.googlesitekit-table__wrapper--mobile-2-col .googlesitekit-table__head-item--primary {
|
8630 |
+
width: 75%; } }
|
8631 |
.googlesitekit-table .googlesitekit-table__head-row {
|
8632 |
border-bottom: 1px solid #e6e6e6; }
|
8633 |
.googlesitekit-table .googlesitekit-table__head-item {
|
8637 |
-ms-hyphens: auto;
|
8638 |
hyphens: auto;
|
8639 |
outline: 0;
|
8640 |
+
padding: 0 4px 8px 4px;
|
8641 |
position: relative;
|
8642 |
text-align: right;
|
8643 |
text-decoration: none;
|
8644 |
white-space: normal; }
|
8645 |
+
@media (min-width: 600px) {
|
8646 |
+
.googlesitekit-table .googlesitekit-table__head-item {
|
8647 |
+
padding: 0 8px 8px 8px; } }
|
8648 |
@media (min-width: 960px) {
|
8649 |
.googlesitekit-table .googlesitekit-table__head-item {
|
8650 |
padding: 0 12px 12px 12px; } }
|
8656 |
.googlesitekit-table .googlesitekit-table__head-item--primary {
|
8657 |
width: 50%; }
|
8658 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
8659 |
+
padding-right: 0; }
|
|
|
|
|
|
|
8660 |
@media (min-width: 960px) {
|
8661 |
.googlesitekit-table .googlesitekit-table__head-item[data-tooltip]::before {
|
8662 |
background: rgba(0, 0, 0, 0.7);
|
8685 |
.googlesitekit-table .googlesitekit-table__body-row {
|
8686 |
border-bottom: 1px solid #e6e6e6; }
|
8687 |
.googlesitekit-table .googlesitekit-table__body-item {
|
8688 |
+
padding: 8px 4px;
|
8689 |
text-align: right; }
|
8690 |
+
@media (min-width: 600px) {
|
8691 |
+
.googlesitekit-table .googlesitekit-table__body-item {
|
8692 |
+
padding: 8px; } }
|
8693 |
@media (min-width: 960px) {
|
8694 |
.googlesitekit-table .googlesitekit-table__body-item {
|
8695 |
padding: 12px; } }
|
8704 |
.googlesitekit-table .googlesitekit-table__body-item .googlesitekit-mini-chart {
|
8705 |
display: block; } }
|
8706 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
8707 |
+
padding-right: 0; }
|
|
|
|
|
|
|
8708 |
.googlesitekit-table--with-list .googlesitekit-table__body-row {
|
8709 |
transition: background-color 0.2s ease-in-out; }
|
8710 |
.googlesitekit-table--with-list .googlesitekit-table__body-row:last-child {
|
8896 |
.googlesitekit-dashboard-single-url .googlesitekit-dashboard-single-url__title {
|
8897 |
margin: 0 0 10px 0; }
|
8898 |
|
8899 |
+
/**
|
8900 |
+
* DashboardPageSpeed styles.
|
8901 |
+
*
|
8902 |
+
* Site Kit by Google, Copyright 2020 Google LLC
|
8903 |
+
*
|
8904 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8905 |
+
* you may not use this file except in compliance with the License.
|
8906 |
+
* You may obtain a copy of the License at
|
8907 |
+
*
|
8908 |
+
* https://www.apache.org/licenses/LICENSE-2.0
|
8909 |
+
*
|
8910 |
+
* Unless required by applicable law or agreed to in writing, software
|
8911 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
8912 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
8913 |
+
* See the License for the specific language governing permissions and
|
8914 |
+
* limitations under the License.
|
8915 |
+
*/
|
8916 |
+
.googlesitekit-pagespeed-widget .googlesitekit-cta-link {
|
8917 |
+
white-space: nowrap; }
|
8918 |
+
|
8919 |
+
.googlesitekit-pagespeed-widget .googlesitekit-table {
|
8920 |
+
border-spacing: 0;
|
8921 |
+
padding: 0;
|
8922 |
+
width: 100%; }
|
8923 |
+
.googlesitekit-pagespeed-widget .googlesitekit-table thead {
|
8924 |
+
display: none; }
|
8925 |
+
|
8926 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__header {
|
8927 |
+
align-items: flex-end;
|
8928 |
+
background: #fafafa;
|
8929 |
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
8930 |
+
display: flex;
|
8931 |
+
justify-content: space-between; }
|
8932 |
+
@media (max-width: 449px) {
|
8933 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__header {
|
8934 |
+
align-items: center;
|
8935 |
+
flex-direction: column-reverse;
|
8936 |
+
justify-content: flex-end; } }
|
8937 |
+
|
8938 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__data-src-tabs button.mdc-tab {
|
8939 |
+
font-size: 0.875rem;
|
8940 |
+
letter-spacing: 0.25px;
|
8941 |
+
line-height: 1.25rem;
|
8942 |
+
margin: 0 10px;
|
8943 |
+
text-transform: none; }
|
8944 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__data-src-tabs button.mdc-tab .mdc-tab-indicator__content--underline {
|
8945 |
+
border-top-left-radius: 3px;
|
8946 |
+
border-top-right-radius: 3px;
|
8947 |
+
height: 3px; }
|
8948 |
+
|
8949 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__device-size-tab-bar-wrapper {
|
8950 |
+
padding: 12px;
|
8951 |
+
width: auto; }
|
8952 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-widget__device-size-tab-bar-wrapper .googlesitekit-device-size-tab-bar {
|
8953 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
|
8954 |
+
|
8955 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics--field-data-unavailable {
|
8956 |
+
align-items: center;
|
8957 |
+
display: flex;
|
8958 |
+
height: auto;
|
8959 |
+
justify-content: center;
|
8960 |
+
padding: 16px; }
|
8961 |
+
@media (min-width: 600px) {
|
8962 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics--field-data-unavailable {
|
8963 |
+
min-height: 285px;
|
8964 |
+
padding: 24px; } }
|
8965 |
+
|
8966 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics__field-data-unavailable-content {
|
8967 |
+
display: flex;
|
8968 |
+
flex-direction: column;
|
8969 |
+
justify-content: flex-start;
|
8970 |
+
max-width: 600px;
|
8971 |
+
width: 75%; }
|
8972 |
+
@media (max-width: 599px) {
|
8973 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics__field-data-unavailable-content {
|
8974 |
+
width: 100%; } }
|
8975 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics__field-data-unavailable-content h3 {
|
8976 |
+
font-size: 1.25rem;
|
8977 |
+
line-height: 1.75rem;
|
8978 |
+
margin: 0 0 0.25rem; }
|
8979 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics__field-data-unavailable-content p {
|
8980 |
+
font-size: 0.875rem;
|
8981 |
+
line-height: 1.25rem;
|
8982 |
+
margin: 0.25rem 0; }
|
8983 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-insights-web-vitals-metrics__field-data-unavailable-content a {
|
8984 |
+
margin: 0; }
|
8985 |
+
|
8986 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row {
|
8987 |
+
align-items: center;
|
8988 |
+
display: flex;
|
8989 |
+
justify-content: space-between;
|
8990 |
+
padding: 18px 16px; }
|
8991 |
+
@media (min-width: 600px) {
|
8992 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row {
|
8993 |
+
padding: 18px 24px; } }
|
8994 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row p {
|
8995 |
+
color: #6e7275;
|
8996 |
+
font-size: 0.875rem;
|
8997 |
+
letter-spacing: 0.2px;
|
8998 |
+
line-height: 1.25rem; }
|
8999 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row--first {
|
9000 |
+
padding: 12px 16px 8px 16px; }
|
9001 |
+
@media (min-width: 600px) {
|
9002 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row--first {
|
9003 |
+
padding: 18px 24px 12px 24px; } }
|
9004 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row--last {
|
9005 |
+
padding: 8px 16px 12px 16px; }
|
9006 |
+
@media (min-width: 600px) {
|
9007 |
+
.googlesitekit-pagespeed-widget .googlesitekit-pagespeed-report__row--last {
|
9008 |
+
padding: 12px 24px 18px 24px; } }
|
9009 |
+
|
9010 |
+
/**
|
9011 |
+
* ReportMetric styles.
|
9012 |
+
*
|
9013 |
+
* Site Kit by Google, Copyright 2020 Google LLC
|
9014 |
+
*
|
9015 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9016 |
+
* you may not use this file except in compliance with the License.
|
9017 |
+
* You may obtain a copy of the License at
|
9018 |
+
*
|
9019 |
+
* https://www.apache.org/licenses/LICENSE-2.0
|
9020 |
+
*
|
9021 |
+
* Unless required by applicable law or agreed to in writing, software
|
9022 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
9023 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
9024 |
+
* See the License for the specific language governing permissions and
|
9025 |
+
* limitations under the License.
|
9026 |
+
*/
|
9027 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric__title {
|
9028 |
+
color: #000;
|
9029 |
+
font-size: 1rem;
|
9030 |
+
letter-spacing: 0.1px;
|
9031 |
+
line-height: 1.5rem; }
|
9032 |
+
|
9033 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric-value-container {
|
9034 |
+
align-items: flex-end;
|
9035 |
+
display: flex;
|
9036 |
+
flex-direction: column;
|
9037 |
+
font-size: 0.75rem;
|
9038 |
+
justify-content: center;
|
9039 |
+
letter-spacing: 0.3px;
|
9040 |
+
line-height: 1rem;
|
9041 |
+
text-align: right; }
|
9042 |
+
|
9043 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric-value__display-value,
|
9044 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric-value__rating {
|
9045 |
+
width: auto; }
|
9046 |
+
|
9047 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric-value__display-value {
|
9048 |
+
font-size: 1rem;
|
9049 |
+
line-height: 1.5rem;
|
9050 |
+
white-space: nowrap; }
|
9051 |
+
|
9052 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric-value__rating {
|
9053 |
+
text-transform: uppercase; }
|
9054 |
+
|
9055 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric--fast {
|
9056 |
+
color: #188038; }
|
9057 |
+
|
9058 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric--average {
|
9059 |
+
color: #e37400; }
|
9060 |
+
|
9061 |
+
.googlesitekit-pagespeed-report-metric .googlesitekit-pagespeed-report-metric--slow {
|
9062 |
+
color: #d93025; }
|
9063 |
+
|
9064 |
/**
|
9065 |
* Dashboard splash styles.
|
9066 |
*
|
10025 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item--nomargin {
|
10026 |
margin: 0; }
|
10027 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item-type {
|
10028 |
+
color: #757575;
|
10029 |
font-size: 0.75rem;
|
10030 |
+
font-weight: inherit;
|
10031 |
margin: 0 0 8px 0; }
|
10032 |
.googlesitekit-settings-module .googlesitekit-settings-module__meta-item-data {
|
10033 |
color: #5b5b61;
|
10177 |
.googlesitekit-plugin .googlesitekit-margin-bottom-0 {
|
10178 |
margin-bottom: 0 !important; }
|
10179 |
|
10180 |
+
/**
|
10181 |
+
* Text alignment utility styles.
|
10182 |
+
*
|
10183 |
+
* Site Kit by Google, Copyright 2020 Google LLC
|
10184 |
+
*
|
10185 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
10186 |
+
* you may not use this file except in compliance with the License.
|
10187 |
+
* You may obtain a copy of the License at
|
10188 |
+
*
|
10189 |
+
* https://www.apache.org/licenses/LICENSE-2.0
|
10190 |
+
*
|
10191 |
+
* Unless required by applicable law or agreed to in writing, software
|
10192 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
10193 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10194 |
+
* See the License for the specific language governing permissions and
|
10195 |
+
* limitations under the License.
|
10196 |
+
*/
|
10197 |
+
.googlesitekit-plugin .googlesitekit-text-align-center {
|
10198 |
+
text-align: center; }
|
10199 |
+
|
dist/assets/css/adminbar.css
CHANGED
@@ -195,6 +195,9 @@
|
|
195 |
overflow: hidden;
|
196 |
position: absolute !important;
|
197 |
width: 1px; }
|
|
|
|
|
|
|
198 |
|
199 |
:root {
|
200 |
--mdc-layout-grid-margin-desktop: 24px;
|
195 |
overflow: hidden;
|
196 |
position: absolute !important;
|
197 |
width: 1px; }
|
198 |
+
@media (max-width: 599px) {
|
199 |
+
.googlesitekit-plugin .hidden-on-mobile {
|
200 |
+
display: none; } }
|
201 |
|
202 |
:root {
|
203 |
--mdc-layout-grid-margin-desktop: 24px;
|
dist/assets/css/wpdashboard.css
CHANGED
@@ -195,6 +195,9 @@
|
|
195 |
overflow: hidden;
|
196 |
position: absolute !important;
|
197 |
width: 1px; }
|
|
|
|
|
|
|
198 |
|
199 |
/*
|
200 |
* Components
|
@@ -784,13 +787,15 @@
|
|
784 |
padding: 24px; } }
|
785 |
.googlesitekit-details-widget .googlesitekit-table,
|
786 |
.googlesitekit-alltraffic-widget .googlesitekit-table,
|
787 |
-
.googlesitekit-wp-dashboard .googlesitekit-table
|
788 |
-
.googlesitekit-pagespeed-report .googlesitekit-table {
|
789 |
padding: 0; }
|
790 |
.googlesitekit-table .googlesitekit-table__wrapper {
|
791 |
border-collapse: collapse;
|
792 |
table-layout: fixed;
|
793 |
width: 100%; }
|
|
|
|
|
|
|
794 |
.googlesitekit-table .googlesitekit-table__head-row {
|
795 |
border-bottom: 1px solid #e6e6e6; }
|
796 |
.googlesitekit-table .googlesitekit-table__head-item {
|
@@ -800,11 +805,14 @@
|
|
800 |
-ms-hyphens: auto;
|
801 |
hyphens: auto;
|
802 |
outline: 0;
|
803 |
-
padding: 0
|
804 |
position: relative;
|
805 |
text-align: right;
|
806 |
text-decoration: none;
|
807 |
white-space: normal; }
|
|
|
|
|
|
|
808 |
@media (min-width: 960px) {
|
809 |
.googlesitekit-table .googlesitekit-table__head-item {
|
810 |
padding: 0 12px 12px 12px; } }
|
@@ -816,10 +824,7 @@
|
|
816 |
.googlesitekit-table .googlesitekit-table__head-item--primary {
|
817 |
width: 50%; }
|
818 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
819 |
-
padding-right:
|
820 |
-
@media (min-width: 600px) {
|
821 |
-
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
822 |
-
padding-right: 0; } }
|
823 |
@media (min-width: 960px) {
|
824 |
.googlesitekit-table .googlesitekit-table__head-item[data-tooltip]::before {
|
825 |
background: rgba(0, 0, 0, 0.7);
|
@@ -848,8 +853,11 @@
|
|
848 |
.googlesitekit-table .googlesitekit-table__body-row {
|
849 |
border-bottom: 1px solid #e6e6e6; }
|
850 |
.googlesitekit-table .googlesitekit-table__body-item {
|
851 |
-
padding: 8px;
|
852 |
text-align: right; }
|
|
|
|
|
|
|
853 |
@media (min-width: 960px) {
|
854 |
.googlesitekit-table .googlesitekit-table__body-item {
|
855 |
padding: 12px; } }
|
@@ -864,10 +872,7 @@
|
|
864 |
.googlesitekit-table .googlesitekit-table__body-item .googlesitekit-mini-chart {
|
865 |
display: block; } }
|
866 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
867 |
-
padding-right:
|
868 |
-
@media (min-width: 600px) {
|
869 |
-
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
870 |
-
padding-right: 0; } }
|
871 |
.googlesitekit-table--with-list .googlesitekit-table__body-row {
|
872 |
transition: background-color 0.2s ease-in-out; }
|
873 |
.googlesitekit-table--with-list .googlesitekit-table__body-row:last-child {
|
195 |
overflow: hidden;
|
196 |
position: absolute !important;
|
197 |
width: 1px; }
|
198 |
+
@media (max-width: 599px) {
|
199 |
+
.googlesitekit-plugin .hidden-on-mobile {
|
200 |
+
display: none; } }
|
201 |
|
202 |
/*
|
203 |
* Components
|
787 |
padding: 24px; } }
|
788 |
.googlesitekit-details-widget .googlesitekit-table,
|
789 |
.googlesitekit-alltraffic-widget .googlesitekit-table,
|
790 |
+
.googlesitekit-wp-dashboard .googlesitekit-table {
|
|
|
791 |
padding: 0; }
|
792 |
.googlesitekit-table .googlesitekit-table__wrapper {
|
793 |
border-collapse: collapse;
|
794 |
table-layout: fixed;
|
795 |
width: 100%; }
|
796 |
+
@media (max-width: 599px) {
|
797 |
+
.googlesitekit-table .googlesitekit-table__wrapper.googlesitekit-table__wrapper--mobile-2-col .googlesitekit-table__head-item--primary {
|
798 |
+
width: 75%; } }
|
799 |
.googlesitekit-table .googlesitekit-table__head-row {
|
800 |
border-bottom: 1px solid #e6e6e6; }
|
801 |
.googlesitekit-table .googlesitekit-table__head-item {
|
805 |
-ms-hyphens: auto;
|
806 |
hyphens: auto;
|
807 |
outline: 0;
|
808 |
+
padding: 0 4px 8px 4px;
|
809 |
position: relative;
|
810 |
text-align: right;
|
811 |
text-decoration: none;
|
812 |
white-space: normal; }
|
813 |
+
@media (min-width: 600px) {
|
814 |
+
.googlesitekit-table .googlesitekit-table__head-item {
|
815 |
+
padding: 0 8px 8px 8px; } }
|
816 |
@media (min-width: 960px) {
|
817 |
.googlesitekit-table .googlesitekit-table__head-item {
|
818 |
padding: 0 12px 12px 12px; } }
|
824 |
.googlesitekit-table .googlesitekit-table__head-item--primary {
|
825 |
width: 50%; }
|
826 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__head-item:last-child {
|
827 |
+
padding-right: 0; }
|
|
|
|
|
|
|
828 |
@media (min-width: 960px) {
|
829 |
.googlesitekit-table .googlesitekit-table__head-item[data-tooltip]::before {
|
830 |
background: rgba(0, 0, 0, 0.7);
|
853 |
.googlesitekit-table .googlesitekit-table__body-row {
|
854 |
border-bottom: 1px solid #e6e6e6; }
|
855 |
.googlesitekit-table .googlesitekit-table__body-item {
|
856 |
+
padding: 8px 4px;
|
857 |
text-align: right; }
|
858 |
+
@media (min-width: 600px) {
|
859 |
+
.googlesitekit-table .googlesitekit-table__body-item {
|
860 |
+
padding: 8px; } }
|
861 |
@media (min-width: 960px) {
|
862 |
.googlesitekit-table .googlesitekit-table__body-item {
|
863 |
padding: 12px; } }
|
872 |
.googlesitekit-table .googlesitekit-table__body-item .googlesitekit-mini-chart {
|
873 |
display: block; } }
|
874 |
.googlesitekit-table-overflow .googlesitekit-table .googlesitekit-table__body-item:last-child {
|
875 |
+
padding-right: 0; }
|
|
|
|
|
|
|
876 |
.googlesitekit-table--with-list .googlesitekit-table__body-row {
|
877 |
transition: background-color 0.2s ease-in-out; }
|
878 |
.googlesitekit-table--with-list .googlesitekit-table__body-row:last-child {
|
dist/assets/js/ads.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){function r(r){for(var _,i,a=r[0],u=r[1],p=r[2],l=0,s=[];l<a.length;l++)i=a[l],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(_ in u)Object.prototype.hasOwnProperty.call(u,_)&&(e[_]=u[_]);for(c&&c(r);s.length;)s.shift()();return n.push.apply(n,p||[]),t()}function t(){for(var e,r=0;r<n.length;r++){for(var t=n[r],_=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(_=!1)}_&&(n.splice(r--,1),e=__webpack_require__(__webpack_require__.s=t[0]))}return e}var _={},o={1:0},n=[];function __webpack_require__(r){if(_[r])return _[r].exports;var t=_[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.m=e,__webpack_require__.c=_,__webpack_require__.d=function(e,r,t){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,r){if(1&r&&(e=__webpack_require__(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(__webpack_require__.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var _ in e)__webpack_require__.d(t,_,function(r){return e[r]}.bind(null,_));return t},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="";var i=window.webpackJsonp=window.webpackJsonp||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var u=0;u<i.length;u++)r(i[u]);var c=a;n.push([545,0]),t()}({545:function(e,r,t){(function(e){void 0===e.googlesitekit&&(e.googlesitekit={}),e.googlesitekit.canAdsRun=!0,document.addEventListener("DOMContentLoaded",(function(){e.googlesitekit.canAdsRun=!0})),e.googlesitekit.data&&e.googlesitekit.data.dispatch&&e.googlesitekit.data.stores&&e.googlesitekit.data.stores["modules/adsense"]&&e.googlesitekit.data.dispatch("modules/adsense").receiveIsAdBlockerActive(!1)}).call(this,t(16))}});
|
|
dist/assets/js/chunk-googlesitekit-adminbar-2251fc60b8ace67e074e.js
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[,function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"e",(function(){return d})),a.d(t,"f",(function(){return u})),a.d(t,"g",(function(){return g})),a.d(t,"h",(function(){return p})),a.d(t,"b",(function(){return b})),a.d(t,"i",(function(){return v})),a.d(t,"j",(function(){return y})),a.d(t,"k",(function(){return E})),a.d(t,"c",(function(){return D})),a.d(t,"l",(function(){return A})),a.d(t,"m",(function(){return N})),a.d(t,"n",(function(){return x})),a.d(t,"o",(function(){return I})),a.d(t,"p",(function(){return L})),a.d(t,"q",(function(){return R})),a.d(t,"r",(function(){return M})),a.d(t,"s",(function(){return W}));var n=a(110);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._element||n,r=i.__experimentalCreateInterpolateElement,o=i.Children,s=i.cloneElement,c=i.Component,l=i.concatChildren,d=i.createContext,u=i.createElement,g=i.createPortal,p=i.createRef,m=i.findDOMNode,h=i.forwardRef,b=i.Fragment,f=i.isEmptyElement,v=i.isValidElement,y=i.lazy,_=i.memo,k=i.Platform,O=i.RawHTML,E=i.render,S=i.renderToString,j=i.StrictMode,D=i.Suspense,w=i.switchChildrenNodeName,C=i.unmountComponentAtNode,A=i.useCallback,N=i.useContext,T=i.useDebugValue,x=i.useEffect,P=i.useImperativeHandle,I=i.useLayoutEffect,L=i.useMemo,R=i.useReducer,M=i.useRef,W=i.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:r,Children:o,cloneElement:s,Component:c,concatChildren:l,createContext:d,createElement:u,createPortal:g,createRef:p,findDOMNode:m,forwardRef:h,Fragment:b,isEmptyElement:f,isValidElement:v,lazy:y,memo:_,Platform:k,RawHTML:O,render:E,renderToString:S,StrictMode:j,Suspense:D,switchChildrenNodeName:w,unmountComponentAtNode:C,useCallback:A,useContext:N,useDebugValue:T,useEffect:x,useImperativeHandle:P,useLayoutEffect:I,useMemo:L,useReducer:R,useRef:M,useState:W})}).call(this,a(16))},,function(e,t,a){"use strict";(function(e,n){a.d(t,"s",(function(){return j})),a.d(t,"q",(function(){return D})),a.d(t,"n",(function(){return C})),a.d(t,"r",(function(){return A})),a.d(t,"h",(function(){return N})),a.d(t,"c",(function(){return T})),a.d(t,"f",(function(){return x})),a.d(t,"j",(function(){return P})),a.d(t,"l",(function(){return I})),a.d(t,"m",(function(){return L})),a.d(t,"y",(function(){return R})),a.d(t,"z",(function(){return M})),a.d(t,"b",(function(){return W})),a.d(t,"w",(function(){return U})),a.d(t,"u",(function(){return H})),a.d(t,"e",(function(){return F})),a.d(t,"p",(function(){return q})),a.d(t,"i",(function(){return z}));var i=a(14),r=a.n(i),o=a(51),s=a.n(o),c=a(35),l=a.n(c),d=(a(1),a(11)),u=a(12),g=a(0),p=a(39),m=a(202),h=a(31);a.d(t,"a",(function(){return h.a}));var b=a(50);a.d(t,"x",(function(){return b.c}));var f=a(20),v=a(58);a.d(t,"t",(function(){return v.a}));var y=a(62);a.d(t,"v",(function(){return y.a}));var _=a(56);a.d(t,"d",(function(){return _.b})),a.d(t,"k",(function(){return _.c}));a(44);var k=a(63);function O(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?O(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):O(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}a.d(t,"o",(function(){return k.a})),a.d(t,"g",(function(){return f.b}));var S=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(d.isFinite)(e)?e:Number(e),Object(d.isFinite)(e)||(console.warn("Invalid number",e,l()(e)),e=0),t)return D(e,{style:"currency",currency:t});var a={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(g.sprintf)(// translators: %s: an abbreviated number in millions.
|
2 |
-
Object(g.__)("%sM","google-site-kit"),D(S(e),e%10==0?{}:a)):1e4<=e?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
|
3 |
-
Object(g.__)("%sK","google-site-kit"),D(S(e))):1e3<=e?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
|
4 |
-
Object(g.__)("%sK","google-site-kit"),D(S(e),e%10==0?{}:a)):e.toString()},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?w():a,i=s()(t,["locale"]);return new Intl.NumberFormat(n,i).format(e)},w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(d.get)(t,["googlesitekit","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language},C=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},A=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},N=function(e,t){var a=1e3*C("day"),n=e.getTime(),i=t.getTime();return Math.round(Math.abs(n-i)/a)},T=function(e,t){if("0"===e||0===e||isNaN(e))return"";var a=((t-e)/e*100).toFixed(1);return isNaN(a)||"Infinity"===a?"":a},x=function(e,t){return Object(d.map)(e,(function(e,a){return[e[0],e[t]||(0===a?"":0)]}))},P=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.googlesitekit,a=t.modules;return a?Object.keys(a).reduce((function(e,t){return"object"!==l()(a[t])?e:void 0===a[t].slug||void 0===a[t].name||a[t].slug!==t?e:E({},e,r()({},t,a[t]))}),{}):{}},I=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.googlesitekit,i=n.admin,r=i.connectURL,o=i.adminRoot,s=n.setup.needReauthenticate,c=P(n)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},d=Object(p.a)(o,E({page:t&&a&&c?c:"googlesitekit-dashboard",slug:t,reAuth:a},l));if(!s)return d;var u=encodeURIComponent(Object(m.a)(d));return d=o+"?"+u,Object(p.a)(r,{redirect:d,status:a})},L=function(t,a){var n=e.googlesitekit.admin.adminRoot;return t||(t="googlesitekit-dashboard"),a=E({page:t},a),Object(p.a)(n,a)},R=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},M=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},W=function(e,t,a){return e.setModuleActive(t,a).then((function(e){var a=P();return a[t]&&(a[t].active=e.active),Object(b.c)("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},U=function(t,a,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.googlesitekit,o=P(r)[t],s=o.settings,c=o.setupComplete,l=i||document.getElementById("confirm-changes-".concat(t));if(c&&l){var u=!!Object.keys(a).find((function(e){var t=a[e];return!Object(d.isEqual)(n[e],s[t])}));return i||(l.disabled=!u),u}},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(u.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(f.b)(e,t),1)},F=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(d.unescape)(t)};function q(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e.googlesitekit){var s=n.createElement(h.a,{id:t,width:i,height:r,className:o});return a?s=n.createElement(h.a,{id:"".concat(t,"-disabled"),width:i,height:r,className:o}):"pagespeed-insights"===t&&(s=n.createElement("img",{src:e.googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:o})),s}}function z(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,n=a.blogPrefix;return a.isNetworkMode?t:n+t}}).call(this,a(16),a(10))},,,,,,,,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return p})),a.d(t,"c",(function(){return m}));var n=a(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||n,r=i.addAction,o=i.addFilter,s=i.removeAction,c=i.removeFilter,l=i.hasAction,d=i.hasFilter,u=i.removeAllActions,g=i.removeAllFilters,p=i.doAction,m=i.applyFilters,h=i.currentAction,b=i.currentFilter,f=i.doingAction,v=i.doingFilter,y=i.didAction,_=i.didFilter,k=i.actions,O=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:r,addFilter:o,removeAction:s,removeFilter:c,hasAction:l,hasFilter:d,removeAllActions:u,removeAllFilters:g,doAction:p,applyFilters:m,currentAction:h,currentFilter:b,doingAction:f,doingFilter:v,didAction:y,didFilter:_,actions:k,filters:O})}).call(this,a(16))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return v})),a.d(t,"b",(function(){return y}));var n=a(14),i=a.n(n),r=a(11),o=a(54),s=a(39),c=a(12),l=a(44),d=a(52),u=a(20),g=a(56),p=a(84),m=a(109),h=a(28);function b(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function f(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="core",y="modules",_=function(e,t){var a=f({data:{}},e);return a.data=f({dateRange:t},a.data),a},k={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(a,n){try{var i=[],o=Object(d.b)();Object(r.each)(e,(function(e){var a=_(e,o);a.key=Object(h.c)(a.type,a.identifier,a.datapoint,a.data);var n=Object(h.b)(a.key,a.maxAge);void 0!==n&&(i[a.key]=n,t.resolve(a,n))})),a(i)}catch(e){n()}}))},combinedGet:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],i=25,l=Object(d.b)();Object(r.each)(e,(function(e){var a=_(e,l);a.key=Object(h.c)(a.type,a.identifier,a.datapoint,a.data);var r=Object(h.b)(a.key,a.maxAge);void 0!==r?(setTimeout((function(){t.resolve(a,r)}),i),i+=25):n.push(a)})),n=Object(r.sortBy)(n,"priority");var u=[],p=[],m={},b=!!n.find((function(e){return e.priority<10}));Object(r.each)(n,(function(e,t){!a&&10<=e.priority&&b?p.push(e):m[e.key]?m[e.key].push(t):(m[e.key]=[t],u.push(e))}));var f=10,v=u.slice(0,f),y=u.slice(f);if(y=y.concat(p),0!==v.length||0!==y.length){0<y.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(y,!0)}),50):this.maxRequests=10;var k=null!==Object(g.c)("datacache");return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/data/",{datacache:k||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(r.each)(e,(function(e,a){m[a]?(t.handleWPError(e),Object(r.each)(m[a],(function(a){var i=n[a];Object(h.e)(i.key,e),t.resolve(i,e)})),0===y.length&&Object(c.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+a)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(c.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],a=Object(r.intersection)(t,Object.keys(e));if(Object(r.isEqual)(t,a)){console.warn("WP Error in data response",e);var n=e.data;if(n&&n.reason){var i=0;["authError","insufficientPermissions"].includes(n.reason)&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(p.a),1),i++),"forbidden"===n.reason&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(m.a),1),i++),i&&Object(c.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(c.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+i}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:function(t,a,n){var i=Object(h.c)(t,a,n);Object(h.d)(),Object.keys(e.googlesitekit.admin.datacache).forEach((function(t){0!==t.indexOf(i+"::")&&t!==i||delete e.googlesitekit.admin.datacache[t]})),Object.keys(Object(l.a)()).forEach((function(e){0!==e.indexOf("googlesitekit_".concat(i,"::"))&&e!=="googlesitekit_".concat(i)||Object(l.a)().removeItem(e)}))},collectModuleData:function(e,t){var a=Object(c.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==a.length&&this.combinedGet(a)},get:function(e,t,a){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=Object(h.c)(e,t,a,i);if(!r){var l=Object(h.b)(c,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),i)}).then((function(e){return r||Object(h.e)(c,e),Promise.resolve(e)})).catch((function(e){return n.handleWPError(e),Promise.reject(e)}))},set:function(e,t,a,n){var i={};return i.data=n,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),data:i,method:"POST"}).then((function(n){return k.invalidateCacheGroup(e,t,a),new Promise((function(e){e(n)}))}))},setModuleActive:function(e,t){return this.set(v,"modules","activation",{slug:e,active:t})}};Object(c.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(c.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",k.collectModuleData.bind(k)),t.c=k}).call(this,a(16))},,,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"p",(function(){return h})),a.d(t,"i",(function(){return d})),a.d(t,"j",(function(){return u})),a.d(t,"m",(function(){return g})),a.d(t,"n",(function(){return p})),a.d(t,"l",(function(){return m})),a.d(t,"k",(function(){return d})),a.d(t,"e",(function(){return b})),a.d(t,"c",(function(){return v})),a.d(t,"d",(function(){return y})),a.d(t,"f",(function(){return _})),a.d(t,"h",(function(){return k})),a.d(t,"a",(function(){return O})),a.d(t,"q",(function(){return E})),a.d(t,"o",(function(){return S})),a.d(t,"s",(function(){return j})),a.d(t,"r",(function(){return D})),a.d(t,"g",(function(){return w}));var n=a(11),i=a(0),r=a(3),o=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,a=t[0].values,n=t[1].values,i=a[0],o=a[1],s=a[2],c=a[3],l=a[4],d=a[5];return{totalUsers:i,totalSessions:o,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(r.c)(n[0],a[0]),totalSessionsChange:Object(r.c)(n[1],a[1]),averageBounceRateChange:Object(r.c)(n[2],a[2]),averageSessionDurationChange:Object(r.c)(n[3],a[3]),goalCompletions:l,goalCompletionsChange:Object(r.c)(n[4],a[4]),totalPageViews:d,totalPageViewsChange:Object(r.c)(n[5],a[5])}},s=a(37),c=a.n(s),l=a(23),d=function(e){return(parseInt(e,10)||0)>0};function u(e){return e===l.a||d(e)}function g(e){return"string"==typeof e&&e.match(/^UA-\d+-\d+$/)}function p(e){return e===l.f||g(e)}function m(e){return e===l.e||d(e)}function h(e){if(!g(e))return!1;var t=e.match(/^UA-(\d+)-(\d+)/),a=c()(t,3);return{accountID:a[1],propertyID:e,number:a[2]}}var b=function(e){if(!e||!e.length)return null;var t=e[0].data,a=t.rows,i=t.totals[0].values[0],r=[["Source","Percent"]];return Object(n.each)(a,(function(e){var t=e.metrics[0].values[0]/i;if(1>100*t)return!1;var a=e.dimensions[0].replace(/\(none\)/gi,"direct");r.push([a,t])})),r};function f(e,t){var a=[];return Object(n.each)(e,(function(e){if(e.metrics){var n=e.metrics[0].values,i=e.dimensions[0],r=i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8),o=new Date(r);a.push([o,n[t]])}})),a}var v=function(e,t,a){if(!e||!e.length)return null;var r=e[0].data.rows;if(!r)return!1;var o=r.length;if(2*a>o){for(var s=new Date,c=0;a>c;c++){var l=(s.getMonth()+1).toString(),d=s.getDate().toString(),u=s.getFullYear().toString()+(2>l.length?"0":"")+l+(2>d.length?"0":"")+d;if(c>o){var g={dimensions:[u],metrics:[{values:[0,0,0,0,0]}]};r.unshift(g)}s.setDate(s.getDate()-1)}r.push([0,0])}var p=[Object(i.__)("Users","google-site-kit"),Object(i.__)("Sessions","google-site-kit"),Object(i.__)("Bounce Rate","google-site-kit"),Object(i.__)("Session Duration","google-site-kit")],m=[[{type:"date",label:Object(i.__)("Day","google-site-kit")},{type:"number",label:p[t]},{type:"number",label:Object(i.__)("Previous month","google-site-kit")}]],h=r.slice(r.length-a,r.length),b=r.slice(0,r.length-a),v=f(h,t),y=f(b,t);return Object(n.each)(v,(function(e,t){e[0]&&e[1]&&y[t]&&m.push([e[0],e[1],y[t][1]])})),m},y=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,a=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(n.each)(t,(function(e){var t=e.metrics[0].values,n=e.dimensions[0],i=n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8),r=new Date(i);a.push([r,t[0],t[1],t[4]])})),a},_=function(e){return!(!e.error||!e.error.status)&&function(e,t){var a="";switch(e){case"INVALID_ARGUMENT":a=Object(i.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":a=Object(i.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":a=Object(i.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":a=Object(i.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":a=Object(i.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":a=Object(i.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":a=Object(i.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:a=t}return a}(e.error.status,e.error.message)},k=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,a=!0;return Object(n.each)(t,(function(e){0!==parseInt(e)&&(a=!1)})),a}return!1},O={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},E={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},S={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},j={metrics:[{expression:"ga:users",alias:"Total Users"}]},D={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},w=function(){return{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}],orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(95),i=a.n(n),r=a(1),o=function(e){return function(t){return function FilteredComponent(a){return Object(r.f)(r.b,{},"",Object(r.f)(t,a),e)}}},s=function(t,a){return function(n){return function InnerComponent(r){return e.createElement(t,i()({},r,a,{OriginalComponent:n}))}}}}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(95),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(11),f=a(12),v=a(0),y=a(3),_=a(60),k=a(49),O=a(112);t.a=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!!(e.code&&e.message&&e.data&&e.data.status)&&e.message};return function(u){function NewComponent(e){var t;o()(this,NewComponent),(t=d()(this,g()(NewComponent).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(f.a)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){t.setState({data:!1})}));var n=function(e,a){var n=t.props,i=n.handleDataError,r=n.handleDataSuccess,o=a.datapoint,c=a.identifier,d=a.toState,u=l(e);u?(t.setState({error:u,module:c}),i&&i(u)):s(e,o,a)?(i&&i(u),t.setState({zeroData:!0})):r&&r(),t.setState({requestDataToState:d,data:e,datapoint:o,module:c})};return Object(b.each)(a,(function(e){Array.isArray(e.context)?Object(b.each)(e.context,(function(t){Object(f.b)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(f.b)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),t}return m()(NewComponent,u),c()(NewComponent,[{key:"render",value:function(){var a=this.state,o=a.data,s=a.datapoint,c=a.module,l=a.zeroData,d=a.error,u=a.requestDataToState;if(!o)return n;var g=Object(y.j)(),p=c?g[c].name:Object(v.__)("Site Kit","google-site-kit");return c&&g[c].active&&!g[c].setupComplete?Object(O.a)(c,r.inGrid,r.fullWidth,r.createGrid):d?"string"!=typeof d?d:Object(k.a)(p,d,r.inGrid,r.fullWidth,r.createGrid):l?Object(_.a)(p,r.inGrid,r.fullWidth,r.createGrid):e.createElement(t,i()({data:o,datapoint:s,requestDataToState:u},this.props))}}]),NewComponent}(h.a)}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"f",(function(){return r})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return c})),a.d(t,"g",(function(){return l})),a.d(t,"b",(function(){return d}));var n="modules/analytics",i="account_create",r="property_create",o="profile_create",s="analyticsAccountCreate",c="analyticsSetup",l="https://www.googleapis.com/auth/analytics.provision",d="https://www.googleapis.com/auth/analytics.edit"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(154),y=a(155),_=function(t){function Layout(){return i()(this,Layout),c()(this,d()(Layout).apply(this,arguments))}return g()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,a=t.header,n=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,d=t.footerContent,u=t.className,g=t.fill,p=t.relative;return e.createElement("div",{className:f()("googlesitekit-layout",u,{"googlesitekit-layout--fill":g,"googlesitekit-layout--relative":p})},a&&e.createElement(v.a,{title:r,ctaLabel:o,ctaLink:s}),i,n&&e.createElement(y.a,{ctaLabel:c,ctaLink:l,footerContent:d}))}}]),Layout}(p.a);_.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},_.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=_}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return i}));var n="core/user",i="missing_required_scopes"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function Link(){return i()(this,Link),c()(this,d()(Link).apply(this,arguments))}return g()(Link,t),o()(Link,[{key:"render",value:function(){var t=this.props,a=t.dangerouslySetInnerHTML,n=t.onClick,i=t.href,r=t.children,o=t.className,s=t.arrow,c=t.external,l=t.inverse,d=t.back,u=t.small,g=t.inherit,p=t.caps,m=t.danger,h=t.disabled,b=t.id,v=i&&!h,y=v?"a":"button";return e.createElement(y,{className:f()("googlesitekit-cta-link",o,{"googlesitekit-cta-link--arrow":s,"googlesitekit-cta-link--external":c,"googlesitekit-cta-link--inverse":l,"googlesitekit-cta-link--back":d,"googlesitekit-cta-link--small":u,"googlesitekit-cta-link--inherit":g,"googlesitekit-cta-link--caps":p,"googlesitekit-cta-link--danger":m,"googlesitekit-cta-link--disabled":h}),onClick:n,id:b,href:v?i:void 0,target:v&&c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,disabled:h,dangerouslySetInnerHTML:a},r)}}]),Link}(p.a);v.propTypes={dangerouslySetInnerHTML:h.a.shape({__html:h.a.string}),onClick:h.a.func,href:h.a.string,children:h.a.oneOfType([h.a.string.isRequired,h.a.array.isRequired]),className:h.a.string,arrow:h.a.bool,external:h.a.bool,inverse:h.a.bool,back:h.a.bool,small:h.a.bool,inherit:h.a.bool,caps:h.a.bool,danger:h.a.bool,disabled:h.a.bool},v.defaultProps={dangerouslySetInnerHTML:void 0,onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=v}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return u})),a.d(t,"c",(function(){return g}));var n=a(35),i=a.n(n),r=a(11),o=a(44),s=a(62),c=function(){e.googlesitekit.admin=e.googlesitekit.admin||{},"string"==typeof e.googlesitekit.admin.datacache&&(e.googlesitekit.admin.datacache=JSON.parse(e.googlesitekit.admin.datacache)),"object"!==i()(e.googlesitekit.admin.datacache)&&(e.googlesitekit.admin.datacache={})},l=function(t,a){if(void 0!==a&&(!a||"object"!==i()(a)||!a.error&&!a.errors)){c(),e.googlesitekit.admin.datacache[t]=Object(r.cloneDeep)(a);var n={value:a,date:Date.now()/1e3};Object(o.a)().setItem("googlesitekit_"+t,JSON.stringify(n))}},d=function(t,a){if(!e.googlesitekit.admin.nojscache){if(c(),void 0!==e.googlesitekit.admin.datacache[t])return e.googlesitekit.admin.datacache[t];var n=JSON.parse(Object(o.a)().getItem("googlesitekit_"+t));return n&&"object"===i()(n)&&n.date&&(!a||Date.now()/1e3-n.date<a)?(e.googlesitekit.admin.datacache[t]=Object(r.cloneDeep)(n.value),Object(r.cloneDeep)(e.googlesitekit.admin.datacache[t])):void 0}},u=function(t){c(),delete e.googlesitekit.admin.datacache[t],Object(o.a)().removeItem("googlesitekit_"+t)},g=function(e,t,a){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=[],o=[e,t,a],c=0,l=o;c<l.length;c++){var d=l[c];if(!d||!d.length)break;r.push(d)}return 3===r.length&&n&&"object"===i()(n)&&Object.keys(n).length&&r.push(Object(s.a)(n)),r.join("::")}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function PreviewBlock(){return i()(this,PreviewBlock),c()(this,d()(PreviewBlock).apply(this,arguments))}return g()(PreviewBlock,t),o()(PreviewBlock,[{key:"render",value:function(){var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.padding;return e.createElement("div",{className:f()("googlesitekit-preview-block",{"googlesitekit-preview-block--padding":r}),style:{width:a,height:n}},e.createElement("div",{className:f()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===i})}))}}]),PreviewBlock}(p.a);v.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},v.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(18),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(2),f=a.n(b),v=a(15),y=a.n(v),_=a(107),k=a(63),O=a(59),E=function(t){function DataBlock(e){var t;return i()(this,DataBlock),(t=c()(this,d()(DataBlock).call(this,e))).handleClick=t.handleClick.bind(g()(t)),t.handleKeyPress=t.handleKeyPress.bind(g()(t)),t}return m()(DataBlock,t),o()(DataBlock,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,a=t.stat,n=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||n(a)}},{key:"render",value:function(){var t=this.props,a=t.className,n=t.title,i=t.datapoint,r=t.datapointUnit,o=t.change,s=t.changeDataUnit,c=t.context,l=t.period,d=t.selected,u=t.handleStatSelection,g=t.source,p=t.sparkline,m=t.invertChangeColor,b="button"===c?"button":"",f=p;return f&&m&&(f=Object(h.d)(p,{invertChangeColor:m})),e.createElement("div",{className:y()("googlesitekit-data-block",a,"googlesitekit-data-block--".concat(c),{"googlesitekit-data-block--selected":d}),tabIndex:"button"===c?"0":"-1",role:u&&b,onClick:u&&this.handleClick,onKeyPress:u&&this.handleKeyPress,"aria-label":u&&n,"aria-pressed":u&&d},e.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},n),e.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(i).concat(r))),f&&e.createElement("div",{className:"googlesitekit-data-block__sparkline"},f),e.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},e.createElement("div",{className:"googlesitekit-data-block__change"},""===o&&e.createElement(h.b,null," "),o&&e.createElement(h.b,null,e.createElement("span",{className:"googlesitekit-data-block__arrow"},e.createElement(_.a,{direction:0<parseFloat(o)?"up":"down",invertColor:m})),e.createElement("span",{className:"googlesitekit-data-block__value"},"".concat(Object(k.b)(Math.abs(o))).concat(s," ").concat(l)))),g&&e.createElement(O.a,{className:"googlesitekit-data-block__source",name:g.name,href:g.link})))}}]),DataBlock}(h.a);E.propTypes={stat:f.a.number,onClick:f.a.func,className:f.a.string,title:f.a.string,datapoint:f.a.oneOfType([f.a.string,f.a.number]),datapointUnit:f.a.string,change:f.a.oneOfType([f.a.string,f.a.number]),changeDataUnit:f.a.string,context:f.a.string,period:f.a.string,selected:f.a.bool,handleStatSelection:f.a.func,invertChangeColor:f.a.bool},E.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,invertChangeColor:!1},t.a=E}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(2),r=a.n(i),o=a(15),s=a.n(o),c=function SvgIcon(t){var a=t.id,i=t.className,r=t.height,o=t.width,c="".concat(e.googlesitekit.admin.assetsRoot,"svg/svg.svg");return n.createElement("svg",{className:s()("svg",i),height:r,width:o},n.createElement("use",{xlinkHref:"".concat(c,"#").concat(a)}))};c.propTypes={id:r.a.string.isRequired,className:r.a.string,height:r.a.string,width:r.a.string},c.defaultProps={className:"",height:20,width:20},t.a=c}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(85),i=a.n(n);a.d(t,"k",(function(){return i.a})),a.d(t,"a",(function(){return n.HelperText})),a.d(t,"b",(function(){return n.Input}));var r=a(142);a.d(t,"g",(function(){return r.a}));var o=a(219);a.d(t,"e",(function(){return o.a}));var s=a(105),c=a.n(s);a.d(t,"j",(function(){return c.a})),a.d(t,"i",(function(){return s.Option}));var l=a(218);a.d(t,"h",(function(){return l.a}));var d=a(215);a.d(t,"d",(function(){return d.a}));var u=a(216);a.d(t,"c",(function(){return u.a}));var g=a(214);a.d(t,"f",(function(){return g.a}))},function(e,t,a){"use strict";(function(e,n){a.d(t,"b",(function(){return S})),a.d(t,"a",(function(){return j}));var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(2),v=a.n(f),y=a(15),_=a.n(y),k=a(11),O=a(59),E=a(26),S=function(t,a,n){var i=[],r=n.links,o=n.source,s=n.showURLs;n.cap&&(t=t.slice(0,n.cap)),Object(k.each)(t,(function(t,a){var n=[],o=r&&r[a];Object(k.each)(t,(function(a,i){"string"==typeof a&&(a=a.replace(/\(none\)/gi,"direct")),n.push(e.createElement("td",{key:"cell-"+i,className:"googlesitekit-table__body-item"},t[0]===a&&o?e.createElement("div",{className:"googlesitekit-table__body-item-content"},e.createElement(E.a,{className:"googlesitekit-table__body-item-link",href:o,external:!0,inherit:!0},a),s&&e.createElement(E.a,{className:"googlesitekit-table__body-item-url",href:o,inherit:!0,external:!0},o)):e.createElement("div",{className:"googlesitekit-table__body-item-content"},a)))})),i.push(e.createElement("tr",{key:"tr-"+a,className:"googlesitekit-table__body-row"},n))}));var c=t&&t[0]&&t[0].length?t[0].length:1;return e.createElement("div",{className:_()("googlesitekit-table",{"googlesitekit-table--with-list":!n||!n.disableListMode})},e.createElement("table",{className:_()("googlesitekit-table__wrapper","googlesitekit-table__wrapper--".concat(c,"-col"))},e.createElement("thead",{className:"googlesitekit-table__head"},e.createElement("tr",{key:"gksc_data_row_header-wrap",style:n&&n.hideHeader?{display:"none"}:{},className:"googlesitekit-table__head-row"},a.map((function(t,a){return e.createElement("th",{key:"gksc_data_row_header-".concat(a),className:_()("googlesitekit-table__head-item",{"googlesitekit-table__head-item--primary":t.primary}),"data-tooltip":t.tooltip},t.title)})))),e.createElement("tbody",{className:"googlesitekit-table__body"},i)),o&&e.createElement(O.a,{className:"googlesitekit-table__source",name:o.name,href:o.link}))},j=function(t){function TableOverflowContainer(){var e;return r()(this,TableOverflowContainer),(e=l()(this,u()(TableOverflowContainer).call(this))).state={isScrolling:!1},e.scrollRef=Object(b.h)(),e.updateFadeOnScroll=e.updateFadeOnScroll.bind(p()(e)),e}return h()(TableOverflowContainer,t),s()(TableOverflowContainer,[{key:"componentDidMount",value:function(){var e=this;e.updateFadeOnScroll(),this.resize=Object(k.debounce)((function(){e.updateFadeOnScroll()}),100),n.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){n.removeEventListener("resize",this.resize)}},{key:"updateFadeOnScroll",value:function(){var e=this.scrollRef.current,t=e.scrollLeft,a=e.scrollWidth-e.offsetWidth,n=t<a-16&&0<a-16;this.setState({isScrolling:n})}},{key:"render",value:function(){var t=this.props.children,a=this.state.isScrolling;return e.createElement("div",{onScroll:Object(k.debounce)(this.updateFadeOnScroll,100),className:_()("googlesitekit-table-overflow",{"googlesitekit-table-overflow--gradient":a})},e.createElement("div",{ref:this.scrollRef,className:"googlesitekit-table-overflow__container"},t))}}]),TableOverflowContainer}(b.a);j.propTypes={children:v.a.element}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(14),i=a.n(n),r=a(4),o=a.n(r),s=a(5),c=a.n(s),l=a(6),d=a.n(l),u=a(7),g=a.n(u),p=a(8),m=a.n(p),h=a(18),b=a.n(h),f=a(9),v=a.n(f),y=a(1),_=a(2),k=a.n(_),O=a(15),E=a.n(O),S=a(11),j=a(31),D=a(58),w=a(28),C=a(30),A=a(36),N=a(103),T=a(108),x=a(26),P=function(t){function Notification(e){var t;return c()(this,Notification),(t=g()(this,m()(Notification).call(this,e))).state={isClosed:!1},t.cardRef=Object(y.h)(),t.handleDismiss=t.handleDismiss.bind(b()(t)),t.handleCTAClick=t.handleCTAClick.bind(b()(t)),0<t.props.dismissExpires&&t.expireDismiss(),t.props.showOnce&&Object(w.e)("notification::displayed::".concat(t.props.id),new Date),t}return v()(Notification,t),d()(Notification,[{key:"handleDismiss",value:function(e){var t;return o.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.persist(),e.preventDefault(),!(t=this.props.onDismiss)){a.next=6;break}return a.next=6,o.a.awrap(t(e));case 6:this.dismiss();case 7:case"end":return a.stop()}}),null,this)}},{key:"dismiss",value:function(){var e=this,t=this.cardRef.current;this.setState({isClosed:!0}),setTimeout((function(){Object(w.e)("notification::dismissed::".concat(e.props.id),new Date),t.style.display="none";var a=new Event("notificationDismissed");document.dispatchEvent(a)}),350)}},{key:"handleCTAClick",value:function(e){var t,a,n;return o.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.persist(),t=this.props,a=t.isDismissable,!(n=t.onCTAClick)){i.next=5;break}return i.next=5,o.a.awrap(n(e));case 5:a&&this.dismiss();case 6:case"end":return i.stop()}}),null,this)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,a=e.dismissExpires,n=Object(w.b)("notification::dismissed::".concat(t));if(n){var i=new Date(n);i.setSeconds(i.getSeconds()+parseInt(a,10)),i<new Date&&Object(w.a)("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var t,a=this.state.isClosed,n=this.props,r=n.children,o=n.id,s=n.title,c=n.description,l=n.blockData,d=n.winImage,u=n.smallImage,g=n.format,p=n.learnMoreURL,m=n.learnMoreDescription,h=n.learnMoreLabel,b=n.ctaLink,f=n.ctaLabel,v=n.ctaTarget,_=n.type,k=n.dismiss,O=n.isDismissable,P=n.logo,I=n.module,L=n.moduleName,R=n.pageIndex;if(Object(w.b)("notification::dismissed::".concat(o)))return null;var M,W=a?"is-closed":"is-open",U="large"===g&&"win-stats-increase"===_,H="mdc-layout-grid__cell--span-12";"large"===g?(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",U&&(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===g&&(H="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),M="win-warning"===_?e.createElement(N.a,null):"win-error"===_?e.createElement(T.a,null):"";var F=e.createElement(y.b,null,l&&e.createElement("div",{className:"mdc-layout-grid__inner"},Object(S.map)(l,(function(t,a){return e.createElement("div",{key:a,className:E()("mdc-layout-grid__cell",{"mdc-layout-grid__cell--span-5-desktop":U,"mdc-layout-grid__cell--span-4-desktop":!U})},e.createElement("div",{className:"googlesitekit-publisher-win__stats"},e.createElement(C.a,t)))})))),q=e.createElement(y.b,null,s&&e.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},s),c&&e.createElement("div",{className:"googlesitekit-publisher-win__desc"},e.createElement("p",null,Object(y.i)(c)?c:e.createElement("span",{dangerouslySetInnerHTML:Object(D.a)(c,{ALLOWED_TAGS:["strong","em","br","a"],ALLOWED_ATTR:["href"]})}),h&&e.createElement(y.b,null," ",e.createElement(x.a,{href:p,external:!0,inherit:!0},h),m),R&&e.createElement("span",{className:"googlesitekit-publisher-win__detect"},R))),r),z=I?e.createElement(j.a,{id:I,height:"19",width:"19"}):e.createElement(j.a,{id:"logo-g",height:"34",width:"32"});return e.createElement("section",{ref:this.cardRef,className:E()("googlesitekit-publisher-win",(t={},i()(t,"googlesitekit-publisher-win--".concat(g),g),i()(t,"googlesitekit-publisher-win--".concat(_),_),i()(t,"googlesitekit-publisher-win--".concat(W),W),t))},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},P&&e.createElement("div",{className:E()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",{"mdc-layout-grid__cell--order-2-phone":U,"mdc-layout-grid__cell--order-1-tablet":U})},e.createElement("div",{className:"googlesitekit-publisher-win__logo"},z),L&&e.createElement("div",{className:"googlesitekit-publisher-win__module-name"},L)),u&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:u})),e.createElement("div",{className:E()("mdc-layout-grid__cell",H)},U?e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},q),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},F)):e.createElement(y.b,null,q,F),b&&e.createElement(A.a,{href:b,target:v,onClick:this.handleCTAClick},f),O&&k&&e.createElement(x.a,{onClick:this.handleDismiss},k)),d&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement("div",{className:"googlesitekit-publisher-win__image-large"},e.createElement("img",{alt:"",src:d}))),("win-error"===_||"win-warning"===_)&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("div",{className:"googlesitekit-publisher-win__icons"},M)))))}}]),Notification}(y.a);P.propTypes={id:k.a.string.isRequired,title:k.a.string.isRequired,description:k.a.node,learnMoreURL:k.a.string,learnMoreDescription:k.a.string,learnMoreLabel:k.a.string,blockData:k.a.array,winImage:k.a.string,smallImage:k.a.string,format:k.a.string,ctaLink:k.a.string,ctaLabel:k.a.string,type:k.a.string,dismiss:k.a.string,isDismissable:k.a.bool,logo:k.a.bool,module:k.a.string,moduleName:k.a.string,pageIndex:k.a.string,dismissExpires:k.a.number,showOnce:k.a.bool,onCTAClick:k.a.func,onDismiss:k.a.func},P.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1},t.a=P}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(32),y=function(t){function Button(e){var t;return i()(this,Button),(t=c()(this,d()(Button).call(this,e))).buttonRef=Object(p.h)(),t}return g()(Button,t),o()(Button,[{key:"componentDidMount",value:function(){new v.g(this.buttonRef.current)}},{key:"render",value:function(){var t=this.props,a=t.onClick,n=t.children,i=t.href,r=t.text,o=t.className,s=t.danger,c=t.disabled,l=t.target,d=t.id,u=t.icon,g=t.trailingIcon,p=t.ariaHaspopup,m=t.ariaExpanded,h=t.ariaControls,b=i&&!c?"a":"button";return e.createElement(b,{className:f()("mdc-button",o,{"mdc-button--raised":!r,"mdc-button--danger":s}),onClick:a,href:c?void 0:i,ref:this.buttonRef,disabled:!!c,target:l||"_self",id:d,"aria-haspopup":p,"aria-expanded":m,"aria-controls":h},u&&u,e.createElement("span",{className:"mdc-button__label"},n),g&&g)}}]),Button}(p.a);y.propTypes={onClick:h.a.func,children:h.a.string.isRequired,href:h.a.string,text:h.a.bool,className:h.a.string,danger:h.a.bool,disabled:h.a.bool,icon:h.a.element,trailingIcon:h.a.element,ariaHaspopup:h.a.string,ariaExpanded:h.a.bool,ariaControls:h.a.string},y.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=y}).call(this,a(10))},,,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(26),y=function(t){function CTA(){return i()(this,CTA),c()(this,d()(CTA).apply(this,arguments))}return g()(CTA,t),o()(CTA,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description,i=t.ctaLink,r=t.ctaLabel,o=t.error,s=t.onClick;return e.createElement("div",{className:f()("googlesitekit-cta",{"googlesitekit-cta--error":o})},a&&e.createElement("h3",{className:"googlesitekit-cta__title"},a),n&&e.createElement("p",{className:"googlesitekit-cta__description"},n),r&&e.createElement(v.a,{href:i,onClick:s,inverse:!o,caps:!0,arrow:!0},r))}}]),CTA}(p.a);y.propTypes={title:h.a.string.isRequired,description:h.a.string,ctaLink:h.a.string,ctaLabel:h.a.string,error:h.a.bool,onClick:h.a.func},y.defaultProps={title:"",description:"",ctaLink:"",ctaLabel:"",error:!1,onClick:function(){}},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function ProgressBar(){return i()(this,ProgressBar),c()(this,d()(ProgressBar).apply(this,arguments))}return g()(ProgressBar,t),o()(ProgressBar,[{key:"render",value:function(){var t=this.props,a=t.className,n=t.small,i=t.compress,r=t.height,o=r?Math.round(r/2):null;return e.createElement("div",{role:"progressbar",style:{marginTop:o,marginBottom:o},className:f()("mdc-linear-progress","mdc-linear-progress--indeterminate",a,{"mdc-linear-progress--small":n,"mdc-linear-progress--compress":i})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),ProgressBar}(p.a);v.propTypes={className:h.a.string,small:h.a.bool,compress:h.a.bool},v.defaultProps={className:"",small:!1,compress:!1},t.a=v}).call(this,a(10))},,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return d}));var n,i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=function(t){var a=e[t];if(!a)return!1;try{var n="__storage_test__";return a.setItem(n,n),a.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==a.length}},l=function(){function NullStorage(){r()(this,NullStorage)}return s()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),d=function(){return n||(n=c("sessionStorage")?e.sessionStorage:c("localStorage")?e.localStorage:new l),n}}).call(this,a(16))},function(e,t,a){"use strict";function n(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function r(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(29),y=function(t){function PreviewTable(){return i()(this,PreviewTable),c()(this,d()(PreviewTable).apply(this,arguments))}return g()(PreviewTable,t),o()(PreviewTable,[{key:"render",value:function(){for(var t=this.props,a=t.rows,n=t.rowHeight,i=t.padding,r=[],o=0;a>o;o++)r.push(e.createElement("div",{className:"googlesitekit-preview-table__row",key:"table-row-"+o},e.createElement(v.a,{width:"100%",height:n+"px"})));return e.createElement("div",{className:f()("googlesitekit-preview-table",{"googlesitekit-preview-table--padding":i})},r)}}]),PreviewTable}(p.a);y.propTypes={rows:h.a.number,rowHeight:h.a.number,padding:h.a.bool},y.defaultProps={rows:11,rowHeight:35,padding:!1},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(11),i=a(3);function r(e){var t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]],a=0,r=0,o=0,s=0,c=e.length;Object(n.each)(e,(function(e){var n=new Date(e.keys[0]);t.push([n.getMonth()+1+"/"+n.getUTCDate(),e.clicks,e.impressions,e.ctr,e.position]),a+=e.clicks,r+=e.impressions,o+=e.ctr,s+=e.position}));var l=a,d=r;a=Object(i.s)(a),r=Object(i.s)(r);var u=(o/c*100).toFixed(1),g=o/c,p=(s/c).toFixed(1);return{dataMap:t,totalClicks:a,totalClicksRaw:l,totalImpressions:r,totalImpressionsRaw:d,averageCTR:u,averageCTRRaw:g,averagePosition:p}}var o=function(e){var t=Math.floor(e.length/2),a=r(e.slice(t)),n=r(e.slice(0,t));return{dataMap:a.dataMap,totalClicks:a.totalClicks,totalImpressions:a.totalImpressions,averageCTR:a.averageCTR,averagePosition:a.averagePosition,totalClicksChange:Object(i.c)(n.totalClicksRaw,a.totalClicksRaw),totalImpressionsChange:Object(i.c)(n.totalImpressionsRaw,a.totalImpressionsRaw),averageCTRChange:Object(i.c)(n.averageCTRRaw,a.averageCTRRaw),averagePositionChange:Object(i.c)(n.averagePosition,a.averagePosition)}},s=function(e){if(!e.length)return!0;var t=o(e),a=t.totalClicks,n=t.totalImpressions,i=t.averageCTR,r=t.averagePosition;return 0===parseInt(a)&&0===parseInt(n)&&0===parseInt(i)&&0===parseInt(r)}},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=function(t){function DashboardModuleHeader(){return i()(this,DashboardModuleHeader),c()(this,d()(DashboardModuleHeader).apply(this,arguments))}return g()(DashboardModuleHeader,t),o()(DashboardModuleHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description;return e.createElement("header",{className:"googlesitekit-dashboard-module-header"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-module-header__title "},a),n&&e.createElement("p",{className:"googlesitekit-dashboard-module-header__description"},n))))}}]),DashboardModuleHeader}(p.a);b.propTypes={title:h.a.string,description:h.a.string},b.defaultProps={title:"",description:""},t.a=b}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(3),r=a(40),o=a(74),s=a(158);t.a=function(t,a){var c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],d=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=e.createElement(r.a
|
5 |
-
/* translators: %s: module name */,{title:Object(n.sprintf)(Object(n.__)("Data error in %s","google-site-kit"),t),description:a,error:!0});return"Invalid Credentials"===a&&Object(i.u)(s.a),Object(o.a)(u,c,l,d)}}).call(this,a(10))},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n=a(12),i=a(0);function r(){var e=Object(n.c)("googlesitekit.dateRange","last-28-days").match(/last-(\d+)-days/);if(e&&e[1])return Object(i.sprintf)(
|
6 |
-
/* translators: %s: Number of days matched. */
|
7 |
-
Object(i._n)("%s day","%s days",parseInt(e[1],10),"google-site-kit"),e[1]);throw new Error("Unrecognized date range slug used in `googlesitekit.dateRange`.")}function o(){return Object(n.c)("googlesitekit.dateRange","last-28-days")}},function(e,t,a){"use strict";a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return g})),a.d(t,"b",(function(){return p}));var n=a(4),i=a.n(n),r=a(11),o=a(3),s=a(19),c=a(13),l=a(121);a.d(t,"e",(function(){return l.a}));a(71);var d=a(89);a.d(t,"c",(function(){return d.a})),a.d(t,"d",(function(){return d.b}));a(100);function u(e){var t=[[{type:"date",label:"Day"},{type:"number",label:"RPM"},{type:"number",label:"Earnings"},{type:"number",label:"Impressions"}]];return Object(r.each)(e,(function(e){var a=new Date(e[0]);t.push([a,e[2],e[1],e[3]])})),{dataMap:t}}var g=function(){var e,t,a,n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=Object(o.j)(),t=e.adsense.active,a=e.analytics.active,n=!0,!t||!a){r.next=7;break}return r.next=7,i.a.awrap(c.c.get(c.b,"analytics","report",s.a).then((function(e){e&&(n=!0)})).catch((function(e){400===e.code&&"INVALID_ARGUMENT"===e.message&&(n=!1)})));case 7:return r.abrupt("return",new Promise((function(e){e(n)})));case 8:case"end":return r.stop()}}))},p=function(e,t,a){if(!a.data||!a.data.dateRange||"last-28-days"!==a.data.dateRange)return!1;var n=[];return e.totals&&(n=e.totals),0===(n=n.filter((function(e){return 0<e}))).length}},function(e,t,a){"use strict";(function(e){var n=a(27),i=a.n(n),r=e._googlesitekitAPIFetchData||{},o=r.nonce,s=r.nonceEndpoint,c=r.preloadedData,l=r.rootURL;i.a.nonceEndpoint=s,i.a.nonceMiddleware=i.a.createNonceMiddleware(o),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(l),i.a.preloadingMiddleware=i.a.createPreloadingMiddleware(c),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),t.default=i.a}).call(this,a(16))},,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(138),f=a(61),v=function(t){function Sparkline(){return i()(this,Sparkline),c()(this,d()(Sparkline).apply(this,arguments))}return g()(Sparkline,t),o()(Sparkline,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.change,i=t.instanceId,r=t.invertChangeColor,o=t.loadSmall,s=t.loadCompressed,c=t.loadHeight,l=t.loadText;if(!a)return"loading...";var d=r?"red":"green",u=r?"green":"red",g={title:"",backgroundColor:"transparent",curveType:"line",width:"100%",height:"50",enableInteractivity:!1,chartArea:{height:"100%",width:"100%"},legend:{position:"none"},axisFontSize:0,hAxis:{baselineColor:"none",ticks:[]},vAxis:{baselineColor:"none",ticks:[]},axes:[],colors:[0<=(parseFloat(n)||0)?d:u]};return e.createElement("div",{className:"googlesitekit-analytics-sparkline-chart-wrap"},e.createElement(f.a,{data:a,options:g,id:"googlesitekit-sparkline-".concat(i),loadSmall:o,loadCompressed:s,loadHeight:c,loadText:l}))}}]),Sparkline}(p.a);v.propTypes={instanceId:h.a.number.isRequired,invertChangeColor:h.a.bool,loadSmall:h.a.bool,loadCompressed:h.a.bool,loadHeight:h.a.number,loadText:h.a.bool},v.defaultProps={invertChangeColor:!1,loadSmall:!0,loadCompressed:!0,loadHeight:46,loadText:!1},t.a=Object(b.a)(v)}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(90),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:n.a.sanitize(e,t)}}},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(0),y=a(26),_=function(t){function SourceLink(){return i()(this,SourceLink),c()(this,d()(SourceLink).apply(this,arguments))}return g()(SourceLink,t),o()(SourceLink,[{key:"render",value:function(){var t=this.props,a=t.name,n=t.href,i=t.className,r=t.external;return e.createElement("div",{className:f()("googlesitekit-source-link",i)},[Object(v.__)("Source:","google-site-kit")," ",e.createElement(y.a,{key:"link",href:n,external:r,inherit:!0},a)])}}]),SourceLink}(p.a);_.propTypes={name:h.a.string,href:h.a.string,className:h.a.string,external:h.a.bool},_.defaultProps={name:"",href:"",className:"",external:!1},t.a=_}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(40),r=a(74);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=e.createElement(i.a
|
8 |
-
/* translators: %s: Module name */,{title:Object(n.sprintf)(Object(n.__)("%s Gathering Data","google-site-kit"),t)
|
9 |
-
/* translators: %s: Module name */,description:Object(n.sprintf)(Object(n.__)("%s data is not yet available, please check back later.","google-site-kit"),t)});return Object(r.a)(c,a,o,s)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i,r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(18),m=a.n(p),h=a(9),b=a.n(h),f=a(4),v=a.n(f),y=a(1),_=a(2),k=a.n(_),O=a(0),E=a(11),S=a(41);function j(){var t;return v.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(!i){a.next=2;break}return a.abrupt("return",i);case 2:return e.google&&e.google.charts?i=Promise.resolve():((t=document.createElement("script")).type="text/javascript",i=new Promise((function(a){t.onload=a,e.document.head.appendChild(t),t.src="https://www.gstatic.com/charts/loader.js"}))),a.abrupt("return",i);case 4:case"end":return a.stop()}}))}var D=function(t){function GoogleChart(e){var t;return o()(this,GoogleChart),(t=d()(this,g()(GoogleChart).call(this,e))).state={loading:!0,chart:null},t.onChartsLoad=t.onChartsLoad.bind(m()(t)),t.waitForChart=t.waitForChart.bind(m()(t)),t.getData=t.getData.bind(m()(t)),t.prepareChart=t.prepareChart.bind(m()(t)),t.drawChart=t.drawChart.bind(m()(t)),t.updateChart=t.updateChart.bind(m()(t)),t.chartRef=Object(y.h)(),t.resize=Object(E.debounce)(t.drawChart,100),t}return b()(GoogleChart,t),c()(GoogleChart,[{key:"onChartsLoad",value:function(){this.getData(),this.prepareChart(),this.drawChart(),this.setState({loading:!1})}},{key:"componentDidMount",value:function(){return v.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v.a.awrap(j());case 2:e.google.charts.load("current",{packages:["corechart"]}),e.google.charts.setOnLoadCallback(this.onChartsLoad),e.addEventListener("resize",this.resize);case 5:case"end":return t.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props.selectedStats;0!==t.length&&JSON.stringify(t)!==JSON.stringify(e.selectedStats)&&this.updateChart()}},{key:"componentWillUnmount",value:function(){e.removeEventListener("resize",this.resize)}},{key:"waitForChart",value:function(e){setTimeout((function(){e()}),500)}},{key:"getData",value:function(){return e.google&&e.google.visualization&&e.google.visualization.arrayToDataTable(this.props.data)}},{key:"prepareChart",value:function(){var t=this.chartRef.current;if(e.google&&t){var a="pie"===this.props.chartType?new e.google.visualization.PieChart(t):new e.google.visualization.LineChart(t);this.setState({chart:a})}else this.waitForChart(this.prepareChart)}},{key:"drawChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=this.getData();null!==i&&null!==e?(e.draw(i,n),0!==a.length&&this.updateChart()):this.waitForChart(this.drawChart)}},{key:"updateChart",value:function(){var t=this.state.chart,a=this.props,n=a.selectedStats,i=a.options,r=a.singleStat,o=this.getData();if(null!==o&&null!==t){var s=new e.google.visualization.DataView(o);if(!r){var c=[0];c=c.concat(n.map((function(e){return e+1}))),s.setColumns(c)}t.draw(s,i)}else this.waitForChart(this.drawChart)}},{key:"render",value:function(){var e=this.state.loading,t=this.props,a=t.className,i=t.loadSmall,r=t.loadCompressed,o=t.loadHeight,s=t.loadText;return n.createElement("div",{className:"googlesitekit-graph-wrapper"},n.createElement("div",{ref:this.chartRef,className:"googlesitekit-line-chart"},n.createElement("div",{className:"googlesitekit-chart-loading"},e&&n.createElement("div",{className:"googlesitekit-chart-loading__wrapper"},s&&n.createElement("p",null,Object(O.__)("Loading chart…","google-site-kit")),n.createElement(S.a,{className:a,small:i,compress:r,height:o})))))}}]),GoogleChart}(y.a);D.propTypes={selectedStats:k.a.array,options:k.a.object.isRequired,id:k.a.string,singleStat:k.a.bool,className:k.a.string,loadSmall:k.a.bool,loadCompressed:k.a.bool,loadHeight:k.a.number,loadText:k.a.bool},D.defaultProps={selectedStats:[],id:"",singleStat:!0,className:"",loadSmall:!1,loadCompressed:!1,loadHeight:null,loadText:!0},t.a=D}).call(this,a(16),a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(35),i=a.n(n),r=a(120),o=a.n(r),s=function(e){return o()(JSON.stringify(function e(t){var a={};Object.keys(t).sort().forEach((function(n){var r=t[n];r&&"object"===i()(r)&&!Array.isArray(r)&&(r=e(r)),a[n]=r}));return a}(e)))}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return c}));var n=a(51),i=a.n(n),r=a(11),o=a(0);function s(){Object(o.setLocaleData)(e.googlesitekit.locale,"google-site-kit")}var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?l():a,r=i()(t,["locale"]);return new Intl.NumberFormat(n,r).format(e)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(r.get)(t,["googlesitekit","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,a(16))},,,,function(e,t,a){"use strict";(function(e){a.d(t,"b",(function(){return d})),a.d(t,"d",(function(){return u})),a.d(t,"a",(function(){return g})),a.d(t,"c",(function(){return p}));var n,i=a(4),r=a.n(i),o=(a(73),["localStorage","sessionStorage"]),s=[].concat(o),c=function(t){var a,n;return r.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=e[t]){i.next=3;break}return i.abrupt("return",!1);case 3:return i.prev=3,n="__storage_test__",a.setItem(n,n),a.removeItem(n),i.abrupt("return",!0);case 10:return i.prev=10,i.t0=i.catch(3),i.abrupt("return",i.t0 instanceof DOMException&&(22===i.t0.code||1014===i.t0.code||"QuotaExceededError"===i.t0.name||"NS_ERROR_DOM_QUOTA_REACHED"===i.t0.name)&&0!==a.length);case 13:case"end":return i.stop()}}),null,null,[[3,10]])},l=function(){var t,a,i,o,l,d;return r.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:if(!(e.googlesitekit&&e.googlesitekit.admin&&e.googlesitekit.admin.nojscache)){u.next=2;break}return u.abrupt("return",null);case 2:if(void 0!==n){u.next=34;break}t=!0,a=!1,i=void 0,u.prev=6,o=s[Symbol.iterator]();case 8:if(t=(l=o.next()).done){u.next=19;break}if(d=l.value,!n){u.next=12;break}return u.abrupt("continue",16);case 12:return u.next=14,r.a.awrap(c(d));case 14:if(!u.sent){u.next=16;break}n=e[d];case 16:t=!0,u.next=8;break;case 19:u.next=25;break;case 21:u.prev=21,u.t0=u.catch(6),a=!0,i=u.t0;case 25:u.prev=25,u.prev=26,t||null==o.return||o.return();case 28:if(u.prev=28,!a){u.next=31;break}throw i;case 31:return u.finish(28);case 32:return u.finish(25);case 33:void 0===n&&(n=null);case 34:return u.abrupt("return",n);case 35:case"end":return u.stop()}}),null,null,[[6,21,25,33],[26,,28,32]])},d=function(e){var t,a,n,i,o=arguments;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:null,s.next=3,r.a.awrap(l());case 3:if(!(a=s.sent)){s.next=10;break}if(!(n=a.getItem("".concat("googlesitekit_").concat(e)))){s.next=10;break}if(!(i=JSON.parse(n)).timestamp||!(null===t||Math.round(Date.now()/1e3)-i.timestamp<t)){s.next=10;break}return s.abrupt("return",{cacheHit:!0,value:i.value});case 10:return s.abrupt("return",{cacheHit:!1,value:void 0});case 11:case"end":return s.stop()}}))},u=function(t,a){var n,i,o=arguments;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:void 0,s.next=3,r.a.awrap(l());case 3:if(!(i=s.sent)){s.next=14;break}return s.prev=5,i.setItem("".concat("googlesitekit_").concat(t),JSON.stringify({timestamp:n||Math.round(Date.now()/1e3),value:a})),s.abrupt("return",!0);case 10:return s.prev=10,s.t0=s.catch(5),e.console.warn("Encountered an unexpected storage error:",s.t0),s.abrupt("return",!1);case 14:return s.abrupt("return",!1);case 15:case"end":return s.stop()}}),null,null,[[5,10]])},g=function(t){var a;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.a.awrap(l());case 2:if(!(a=n.sent)){n.next=13;break}return n.prev=4,a.removeItem("".concat("googlesitekit_").concat(t)),n.abrupt("return",!0);case 9:return n.prev=9,n.t0=n.catch(4),e.console.warn("Encountered an unexpected storage error:",n.t0),n.abrupt("return",!1);case 13:return n.abrupt("return",!1);case 14:case"end":return n.stop()}}),null,null,[[4,9]])},p=function(){var t,a,n,i;return r.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.a.awrap(l());case 2:if(!(t=o.sent)){o.next=14;break}for(o.prev=4,a=[],n=0;n<t.length;n++)0===(i=t.key(n)).indexOf("googlesitekit_")&&a.push(i.substring("googlesitekit_".length));return o.abrupt("return",a);case 10:return o.prev=10,o.t0=o.catch(4),e.console.warn("Encountered an unexpected storage error:",o.t0),o.abrupt("return",[]);case 14:return o.abrupt("return",[]);case 15:case"end":return o.stop()}}),null,null,[[4,10]])}}).call(this,a(16))},,,,function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"g",(function(){return s})),a.d(t,"f",(function(){return c})),a.d(t,"a",(function(){return l})),a.d(t,"i",(function(){return d})),a.d(t,"h",(function(){return u})),a.d(t,"k",(function(){return g})),a.d(t,"m",(function(){return p})),a.d(t,"j",(function(){return m})),a.d(t,"l",(function(){return h})),a.d(t,"o",(function(){return b})),a.d(t,"n",(function(){return f}));var n="none",i="multiple",r="disapproved",o="graylisted",s="pending",c="no-client",l="approved",d="none",u="added",g=function(e){var t=e.accounts,a=e.clients,r=e.alerts,s=e.error,d=e.previousAccountID,u=e.previousClientID;return void 0===t||void 0===d?v(s):m({accounts:t,previousAccountID:d})?void 0!==a&&void 0!==u?void 0===r?y(s):r.some((function(e){return"GRAYLISTED_PUBLISHER"===e.type}))?o:h({clients:a,previousClientID:u})?l:c:void 0:t.length?i:n},p=function(e){var t=e.urlChannels,a=e.siteURL;if(void 0!==t&&void 0!==a)return t.some((function(e){return 0<=a.indexOf(e.urlPattern)}))?u:d},m=function(e){var t=e.accounts,a=e.previousAccountID;if(void 0!==t&&t.length){if(t.length>1){if(!a)return;return t.reduce((function(e,t){return t.id===a?a:e}),void 0)}return t[0].id}},h=function(e){var t=e.clients,a=e.previousClientID;if(void 0!==t){var n=t.filter((function(e){return"AFC"===e.productCode}));if(n.length){if(n.length>1&&a){var i=n.reduce((function(e,t){return t.id===a?a:e}),"");if(i)return i}return n[0].id}}},b=function(e){return e===o||e===s},f=function(e){return v(e)||y(e)},v=function(e){return _(e,"noAdSenseAccount")?n:_(e,"disapprovedAccount")?r:void 0},y=function(e){if(_(e,"accountPendingReview"))return s},_=function(e,t){return!(!e||!e.data)&&t===e.data.reason}},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(15),h=a.n(m),b=a(2),f=a.n(b),v=a(12),y=a(31),_=a(140),k=function(t){function PageHeader(){return i()(this,PageHeader),c()(this,d()(PageHeader).apply(this,arguments))}return g()(PageHeader,t),o()(PageHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.icon,i=t.iconWidth,r=t.iconHeight,o=t.iconID,s=t.className,c=t.status,l=t.statusText,d=t.fullWidth?"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t":"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t",u=Object(v.c)("googlesitekit.showDateRangeSelector-".concat(o),!1),g=!(""===c&&!u);return e.createElement("header",{className:"googlesitekit-page-header"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:d},n&&e.createElement(y.a,{id:o,height:r,width:i,className:"googlesitekit-page-header__icon"}),e.createElement("h1",{className:h()("googlesitekit-page-header__title",s)},a)),g&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--align-right-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement("div",{className:"googlesitekit-page-header__details"},c&&e.createElement("span",{className:h()("googlesitekit-page-header__status","googlesitekit-page-header__status--".concat(c))},l),u&&e.createElement("span",{className:"googlesitekit-page-header__range"},e.createElement(_.a,null))))))}}]),PageHeader}(p.a);k.propTypes={title:f.a.string,icon:f.a.bool,iconID:f.a.string,iconWidth:f.a.string,iconHeight:f.a.string,className:f.a.string,status:f.a.string,statusText:f.a.string,fullWidth:f.a.bool},k.defaultProps={title:"",icon:!1,iconID:"",iconWidth:"",iconHeight:"",className:"googlesitekit-heading-3",status:"",statusText:"",fullWidth:!1},t.a=k}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(1),i=a(24);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.createElement(n.b,null,a&&r&&o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(i.a,{fill:!0},e.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))))),a&&!r&&o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(i.a,{fill:!0},e.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))))),a&&r&&!o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},t),a&&!r&&!o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},t),!a&&!r&&o&&e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))),!a&&!r&&!o&&t)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(26);t.a=function HelpLink(){var t=Object(n.__)("Need help?","google-site-kit");return e.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(128),b=a(151),f=a(153),v=function(t){function Header(){return r()(this,Header),l()(this,u()(Header).apply(this,arguments))}return p()(Header,t),s()(Header,[{key:"render",value:function(){var t=e.googlesitekit.setup.isAuthenticated;return n.createElement(m.b,null,n.createElement("header",{className:"googlesitekit-header"},n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(h.a,null)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&n.createElement(b.a,null))))),n.createElement(f.a,null))}}]),Header}(m.a);t.a=v}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(34),h=function(t){function GenericError(){return i()(this,GenericError),c()(this,d()(GenericError).apply(this,arguments))}return g()(GenericError,t),o()(GenericError,[{key:"render",value:function(){return e.createElement(m.a,this.props)}}]),GenericError}(p.a);t.a=h}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function ModuleSettingsWarning(){return i()(this,ModuleSettingsWarning),c()(this,d()(ModuleSettingsWarning).apply(this,arguments))}return g()(ModuleSettingsWarning,e),o()(ModuleSettingsWarning,[{key:"render",value:function(){return null}}]),ModuleSettingsWarning}(a(1).a);t.a=Object(p.a)("googlesitekit.ModuleSettingsWarning")(m)},function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"c",(function(){return y})),a.d(t,"b",(function(){return _}));var n=a(51),i=a.n(n),r=a(14),o=a.n(r),s=a(4),c=a.n(s),l=a(21),d=a.n(l),u=a(17),g=a.n(u),p=a(67);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var b=g.a.createRegistryControl,f=function(e){var t;d()(e,"storeName is required to create a snapshot store.");var a={},n={deleteSnapshot:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})),restoreSnapshot:c.a.mark((function e(){var t,a,n,i,r,o,s=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.clearAfterRestore,n=void 0===a||a,e.next=3,{payload:{},type:"RESTORE_SNAPSHOT"};case 3:if(i=e.sent,r=i.cacheHit,o=i.value,!r){e.next=12;break}return e.next=9,{payload:{snapshot:o},type:"SET_STATE_FROM_SNAPSHOT"};case 9:if(!n){e.next=12;break}return e.next=12,{payload:{},type:"DELETE_SNAPSHOT"};case 12:return e.abrupt("return",r);case 13:case"end":return e.stop()}}),e)})),createSnapshot:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"CREATE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))},r=(t={},o()(t,"DELETE_SNAPSHOT",(function(){return Object(p.a)("datastore::cache::".concat(e))})),o()(t,"CREATE_SNAPSHOT",b((function(t){return function(){return Object(p.d)("datastore::cache::".concat(e),t.stores[e].store.getState())}}))),o()(t,"RESTORE_SNAPSHOT",(function(){return Object(p.b)("datastore::cache::".concat(e),3600)})),t);return{INITIAL_STATE:a,actions:n,controls:r,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;switch(n){case"SET_STATE_FROM_SNAPSHOT":var o=r.snapshot,s=(o.error,i()(o,["error"]));return h({},s);default:return h({},e)}}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Object.values(e.stores).filter((function(e){return Object.keys(e.getActions()).includes("restoreSnapshot")}))},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().createSnapshot()})))},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().restoreSnapshot()})))}},function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"a",(function(){return c}));a(1);var n=a(0);function i(e){return.9<=e?"fast":.5<=e?"average":"slow"}var r=function(e){var t=i(e);return"fast"===t?Object(n.__)("Fast","google-site-kit"):"average"===t?Object(n.__)("Average","google-site-kit"):Object(n.__)("Slow","google-site-kit")},o=function PageSpeedReportScoreCategoryWrapper(t){var a=t.score,n=t.children,r="googlesitekit-pagespeed-report__score-category-wrapper googlesitekit-pagespeed-report__score-category-wrapper--".concat(i(a)),o="googlesitekit-pagespeed-report__score-icon googlesitekit-pagespeed-report__score-icon--".concat(i(a));return e.createElement("span",{className:r},n," ",e.createElement("span",{className:o}))},s=function PageSpeedReportScoreGauge(t){var a=t.score,r=parseInt(100*a,10),o="\n\t\tgooglesitekit-percentage-circle\n\t\tgooglesitekit-percentage-circle--".concat(i(a),"\n\t\tgooglesitekit-percentage-circle--percent-").concat(r,"\n\t");return e.createElement("div",{className:"googlesitekit-pagespeed-report__score-gauge"},e.createElement("div",{className:o},e.createElement("div",{className:"googlesitekit-percentage-circle__text"},r),e.createElement("div",{className:"googlesitekit-percentage-circle__slice"},e.createElement("div",{className:"googlesitekit-percentage-circle__bar"}),e.createElement("div",{className:"googlesitekit-percentage-circle__fill"}))),e.createElement("span",{className:"googlesitekit-pagespeed-report__score-gauge-label screen-reader-only"},Object(n.__)("Performance","google-site-kit")))},c=function PageSpeedReportScale(){return e.createElement("div",{className:"googlesitekit-pagespeed-report__scale"},e.createElement("span",null,Object(n.__)("Scale:","google-site-kit")),e.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--fast"},Object(n.__)("90-100 (fast)","google-site-kit")),e.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--average"},Object(n.__)("50-89 (average)","google-site-kit")),e.createElement("span",{className:"googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--slow"},Object(n.__)("0-49 (slow)","google-site-kit")))}}).call(this,a(10))},,,,function(e,t,a){"use strict";(function(e,n){var i=a(37),r=a.n(i),o=(a(1),a(141)),s=a.n(o),c=a(0),l=a(17),d=a.n(l),u=a(34),g=a(3),p=a(25),m=d.a.useSelect,h={siteverification:"site-verification",webmasters:"search-console"};t.a=function DashboardAuthAlert(){var t,a,i,o,l,d=m((function(e){return e(p.b).getUnsatisfiedScopes()})),b=m((function(t){return t(p.b).getConnectURL({redirectURL:e.location.href})}));if(void 0===d||void 0===b)return null;switch(d.some((function(e){return!e.match(/^https:\/\/www.googleapis.com\/auth\//)}))?t="generic":(i=d,o=Object(g.j)(),t=(a=i.map((function(e){return e.match(/^https:\/\/www.googleapis.com\/auth\/([a-z]+)/)})).map((function(e){var t=r()(e,2)[1];return h[t]||t})).map((function(e){var t;return(null===(t=o[e])||void 0===t?void 0:t.name)||!1}))).some((function(e){return!1===e}))?"generic":1<(a=s()(a)).length?"multiple":"single"),t){case"multiple":
|
10 |
-
/* translators: used between list items, there is a space after the comma. */
|
11 |
-
var f=Object(c.__)(", ","google-site-kit");l=Object(c.sprintf)(
|
12 |
-
/* translators: %s: List of product names */
|
13 |
-
Object(c.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for: %s – make sure to approve all permissions at the authentication stage.","google-site-kit"),a.join(f));break;case"single":l=Object(c.sprintf)(
|
14 |
-
/* translators: %1$s: Product name */
|
15 |
-
Object(c.__)("Site Kit can’t access the relevant data from %1$s because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for %1$s – make sure to approve all permissions at the authentication stage.","google-site-kit"),a[0]);break;case"generic":l=Object(c.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup – make sure to approve all permissions at the authentication stage.","google-site-kit")}return n.createElement(u.a,{id:"authentication error",title:Object(c.__)("Site Kit can’t access necessary data","google-site-kit"),description:l,format:"small",type:"win-error",isDismissable:!1,ctaLink:b,ctaLabel:Object(c.__)("Redo setup","google-site-kit")})}}).call(this,a(16),a(10))},,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(2),v=a.n(f),y=a(0),_=a(3),k=a(97),O=a(13),E=a(40),S=a(77),j=function(t){function AnalyticsInactiveCTA(){return s()(this,AnalyticsInactiveCTA),u()(this,p()(AnalyticsInactiveCTA).apply(this,arguments))}return h()(AnalyticsInactiveCTA,t),l()(AnalyticsInactiveCTA,[{key:"render",value:function(){var t=this.props,a=t.title,i=void 0===a?Object(y.__)("Learn more about what visitors do on your site.","google-site-kit"):a,r=t.description,o=void 0===r?Object(y.__)("Connecting with Google Analytics to see unique vistors, goal completions, top pages and more.","google-site-kit"):r,s=t.ctaLabel,c=void 0===s?Object(y.__)("Set up Analytics","google-site-kit"):s;return e.googlesitekit.permissions.canManageOptions?n.createElement(E.a,{title:i,description:o,onClick:AnalyticsInactiveCTA.setupAnalyticsClick,ctaLabel:c}):null}}],[{key:"setupAnalyticsClick",value:function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(Object(_.b)(O.c,"analytics",!0));case 3:return t.next=5,r.a.awrap(Object(k.a)());case 5:e.location=Object(_.l)("analytics",!0),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),Object(_.u)(S.a,{id:"analytics-setup-error",title:Object(y.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"});case 11:case"end":return t.stop()}}),null,null,[[0,8]])}}]),AnalyticsInactiveCTA}(b.a);j.propTypes={title:v.a.string,description:v.a.string,ctaLabel:v.a.string},j.defaultProps={},t.a=j}).call(this,a(16),a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return p.b}));var n=a(17),i=a.n(n),r=a(14),o=a.n(r),s=a(4),c=a.n(s),l=a(21),d=a.n(l),u=a(42),g=a.n(u),p=a(25);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var b=i.a.createRegistrySelector,f={authentication:void 0,isFetchingAuthentication:!1},v={fetchAuthentication:c.a.mark((function e(){var t,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_AUTHENTICATION"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_AUTHENTICATION"};case 5:return t=e.sent,e.next=8,v.receiveAuthentication(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_AUTHENTICATION"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),a=e.t0,e.next=17,{payload:{error:a},type:"CATCH_FETCH_AUTHENTICATION"};case 17:return e.abrupt("return",{response:t,error:a});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveAuthentication:function(e){return d()(e,"authentication is required."),{payload:{authentication:e},type:"RECEIVE_AUTHENTICATION"}}},y=o()({},"FETCH_AUTHENTICATION",(function(){return g.a.get("core","user","authentication",void 0,{useCache:!1})})),_={getAuthentication:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.commonActions.getRegistry();case 2:if(t=e.sent,(0,t.select)(p.b).getAuthentication()){e.next=7;break}return e.next=7,v.fetchAuthentication();case 7:case"end":return e.stop()}}),e)}))},k={getAuthentication:function(e){return e.authentication},isAuthenticated:b((function(e){return function(){return(e(p.b).getAuthentication()||{}).authenticated}})),getGrantedScopes:b((function(e){return function(){return(e(p.b).getAuthentication()||{}).grantedScopes}})),getRequiredScopes:b((function(e){return function(){return(e(p.b).getAuthentication()||{}).requiredScopes}})),getUnsatisfiedScopes:b((function(e){return function(){return(e(p.b).getAuthentication()||{}).unsatisfiedScopes}}))},O={INITIAL_STATE:f,actions:v,controls:y,reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"START_FETCH_AUTHENTICATION":return h({},e,{isFetchingAuthentication:!0});case"RECEIVE_AUTHENTICATION":return h({},e,{authentication:n.authentication});case"FINISH_FETCH_AUTHENTICATION":return h({},e,{isFetchingAuthentication:!1});case"CATCH_FETCH_AUTHENTICATION":return h({},e,{error:n.error,isFetchingAuthentication:!1});default:return h({},e)}},resolvers:_,selectors:k};function E(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function S(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?E(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):E(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var j={isFetchingDisconnect:!1,disconnected:void 0},D={disconnect:c.a.mark((function e(){var t,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_DISCONNECT"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_DISCONNECT"};case 5:return t=e.sent,e.next=8,D.receiveDisconnected(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_DISCONNECT"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),a=e.t0,e.next=17,{payload:{error:a},type:"CATCH_FETCH_DISCONNECT"};case 17:return e.abrupt("return",{response:t,error:a});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveDisconnected:function(e){return d()(void 0!==e,"disconnect is required."),{payload:{disconnected:e},type:"RECEIVE_DISCONNECT"}}},w=o()({},"FETCH_DISCONNECT",(function(){return g.a.set("core","user","disconnect")})),C={INITIAL_STATE:j,actions:D,controls:w,reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"START_FETCH_DISCONNECT":return S({},e,{isFetchingDisconnect:!0});case"RECEIVE_DISCONNECT":return S({},e,{disconnected:n.disconnected});case"FINISH_FETCH_DISCONNECT":return S({},e,{isFetchingDisconnect:!1});case"CATCH_FETCH_DISCONNECT":return S({},e,{error:n.error,isFetchingDisconnect:!1});default:return S({},e)}},resolvers:{},selectors:{isDoingDisconnect:function(e){return e.isFetchingDisconnect}}};function A(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var N={INITIAL_STATE:{error:void 0},actions:{},controls:{},reducer:function(e){return function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?A(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):A(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},e)},resolvers:{},selectors:{getError:function(e){return e.error}}},T=a(101),x=Object(T.a)("core","user","notifications",{server:!1});function P(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function I(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?P(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):P(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var L={INITIAL_STATE:{permissionError:null},actions:{clearPermissionScopeError:function(){return{payload:{},type:"CLEAR_PERMISSION_SCOPE_ERROR"}},setPermissionScopeError:function(e){return d()(e,"permissionError is required."),{payload:{permissionError:e},type:"SET_PERMISSION_SCOPE_ERROR"}}},controls:{},reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"CLEAR_PERMISSION_SCOPE_ERROR":return I({},e,{permissionError:null});case"SET_PERMISSION_SCOPE_ERROR":return I({},e,{permissionError:n.permissionError});default:return I({},e)}},resolvers:{},selectors:{getPermissionScopeError:function(e){return e.permissionError}}},R=a(126),M=i.a.combineStores(i.a.commonStore,O,C,N,x,L,R.a);M.INITIAL_STATE,M.actions,M.controls,M.reducer,M.resolvers,M.selectors;i.a.registerStore(p.b,M)},,function(e,t,a){"use strict";function n(e){return"string"==typeof e&&!!e.match(/^pub-\d+$/)}function i(e){return"string"==typeof e&&!!e.match(/^ca-pub-\d+$/)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return i}));var n=a(119),i=a.n(n)()(e)}).call(this,a(16))},function(e,t,a){"use strict";var n=a(2),i=a.n(n),r=function DisplaySetting(e){return e.value||" "};r.propTypes={value:i.a.oneOfType([i.a.string,i.a.bool,i.a.number])},t.a=r},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(200),f=a.n(b),v=a(15),y=a.n(v),_=a(138),k=a(0),O=a(36),E=a(26),S=a(32),j=function(t){function Dialog(){var e;return i()(this,Dialog),(e=c()(this,d()(Dialog).call(this))).state={attributes:[Object(k.__)("Audience overview","google-site-kit"),Object(k.__)("Top pages","google-site-kit"),Object(k.__)("Top acquisition sources","google-site-kit"),Object(k.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(p.h)(),e}return g()(Dialog,t),o()(Dialog,[{key:"componentDidMount",value:function(){new S.d(this.dialogRef.current)}},{key:"render",value:function(){var t=this.props,a=t.dialogActive,n=t.handleDialog,i=t.title,r=t.provides,o=t.handleConfirm,s=t.subtitle,c=t.confirmButton,l=t.dependentModules,d=t.instanceId,u=t.danger,g="googlesitekit-dialog-label-".concat(d),p="googlesitekit-dialog-description-".concat(d),m=!(!r||!r.length);return e.createElement("div",{ref:this.dialogRef,className:y()("mdc-dialog",{"mdc-dialog--open":a}),role:"alertdialog","aria-modal":"true","aria-labelledby":i?g:void 0,"aria-describedby":m?p:void 0,"aria-hidden":a?"false":"true",tabIndex:"-1"},e.createElement("div",{className:"mdc-dialog__scrim"}," "),e.createElement(f.a,{active:a},e.createElement("div",null,e.createElement("div",{className:"mdc-dialog__container"},e.createElement("div",{className:"mdc-dialog__surface"},i&&e.createElement("h2",{id:g,className:"mdc-dialog__title"},i),s&&e.createElement("p",{className:"mdc-dialog__lead"},s),m&&e.createElement("section",{id:p,className:"mdc-dialog__content"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},r.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),l&&e.createElement("p",{className:"mdc-dialog__dependecies"},e.createElement("strong",null,Object(k.__)("Note: ","google-site-kit")),l),e.createElement("footer",{className:"mdc-dialog__actions"},e.createElement(O.a,{onClick:o,danger:u},c||Object(k.__)("Disconnect","google-site-kit")),e.createElement(E.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(k.__)("Cancel","google-site-kit"))))))))}}]),Dialog}(p.a);j.propTypes={dialogActive:h.a.bool,handleDialog:h.a.func,handleConfirm:h.a.func.isRequired,title:h.a.string,description:h.a.string,confirmButton:h.a.string,danger:h.a.bool},j.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null,danger:!1},t.a=Object(_.a)(j)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(2),f=a.n(b),v=a(0),y=a(13),_=a(34),k=function(t){function Alert(e){var t;return o()(this,Alert),(t=d()(this,g()(Alert).call(this,e))).state={isLoading:!0,alerts:[],error:!1,message:""},t}return m()(Alert,t),c()(Alert,[{key:"componentDidMount",value:function(){this.getAlert()}},{key:"getAlert",value:function(){var e,t;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.props.module,a.next=4,i.a.awrap(y.c.get(y.b,e,"notifications",{},!1));case 4:t=a.sent,this.setState({isLoading:!1,error:!1,alerts:t}),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(0),this.setState({isLoading:!1,error:a.t0.code});case 11:case"end":return a.stop()}}),null,this,[[0,8]])}},{key:"render",value:function(){var t=this.state,a=t.alerts,n=t.error,i=t.isLoading;if(n||i||!a||!a.length)return null;var r=a.map((function(t){return e.createElement(_.a,{id:t.id,key:t.id,title:t.title,description:t.message||t.description,dismiss:Object(v.__)("Dismiss","google-site-kit"),isDismissable:t.isDismissible,format:"small",ctaLink:t.ctaURL,ctaLabel:t.ctaLabel,ctaTarget:t.ctaTarget,type:t.severity})}));return e.createElement(h.b,null,r)}}]),Alert}(h.a);k.propTypes={module:f.a.string.isRequired},t.a=k}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(14),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(2),v=a.n(f),y=a(0),_=a(3),k=a(61),O=a(22),E=a(13),S=a(26),j=a(29),D=a(19);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var C=function(t){function DashboardAcquisitionPieChart(){return s()(this,DashboardAcquisitionPieChart),u()(this,p()(DashboardAcquisitionPieChart).apply(this,arguments))}return h()(DashboardAcquisitionPieChart,t),l()(DashboardAcquisitionPieChart,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.source;if(!a||a.error||!a.length)return null;var i=Object(D.e)(a);return e.createElement("div",{className:"googlesitekit-chart googlesitekit-chart--pie"},e.createElement(k.a,{data:i,options:{chartArea:{width:"100%",height:"100%"},backgroundColor:"transparent",height:250,legend:{alignment:"center",textStyle:{color:"#5b5b61",fontSize:12}},slices:{0:{color:"#178EC5"},1:{color:"#54B23B"},2:{color:"#EB5729"},3:{color:"#ECED33"},4:{color:"#34CBE3"},5:{color:"#82E88E"}},title:null,width:"100%"},chartType:"pie",id:"overview-piechart",loadHeight:205}),n&&e.createElement("div",{className:"googlesitekit-chart__source"},[Object(y.__)("Source:","google-site-kit")," ",e.createElement(S.a,{key:"link",href:Object(_.m)("googlesitekit-module-analytics"),inherit:!0},Object(y._x)("Analytics","Service name","google-site-kit"))]))}}]),DashboardAcquisitionPieChart}(b.a);C.defaultProps={source:!1},C.propTypes={source:v.a.bool},t.a=Object(O.a)(C,[{type:E.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},D.r,{url:n.googlesitekit.permaLink}),priority:1,maxAge:Object(_.n)("day"),context:["Dashboard","Single"]}],e.createElement(j.a,{width:"282px",height:"282px",shape:"circular"}),{},D.h,D.f)}).call(this,a(10),a(16))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=function(e){function Modal(e){var t;return i()(this,Modal),(t=c()(this,d()(Modal).call(this,e))).el=document.createElement("div"),t.root=document.querySelector(".googlesitekit-plugin")||document.body,t}return g()(Modal,e),o()(Modal,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(p.g)(this.props.children,this.el)}}]),Modal}(p.a)},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return d}));var n=a(4),i=a.n(n),r=a(14),o=a.n(r),s=a(13);function c(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?c(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var d=function(){var t,a,n,r,o,c;return i.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,i.a.awrap(s.c.get(s.a,"user","authentication",{timestamp:Date.now()}));case 3:t=d.sent,a=t.authenticated,n=t.requiredScopes,r=t.grantedScopes,o=t.unsatisfiedScopes,c=void 0===o?[]:o,e.googlesitekit.setup=l({},e.googlesitekit.setup||{},{isAuthenticated:a,requiredScopes:n,grantedScopes:r,unsatisfiedScopes:c,needReauthenticate:0<c.length}),d.next=14;break;case 12:d.prev=12,d.t0=d.catch(0);case 14:case"end":return d.stop()}}),null,null,[[0,12]])}}).call(this,a(16))},,,function(e,t,a){"use strict";a.d(t,"d",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return c}));var n=a(204),i=a(39),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.siteURL,a="https://www.google.com/adsense/signup/new",n={source:"site-kit",utm_source:"site-kit",utm_medium:"wordpress_signup"};return t&&(n.url=t),Object(i.a)(a,n)},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.userEmail,n=l({accountID:t,userEmail:a,path:"/home"});return Object(i.a)(n,{source:"site-kit"})},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.siteURL,n=e.userEmail,r=l({accountID:t,userEmail:n,path:"/sites/my-sites"}),o={source:"site-kit"};return a&&(o.url=d(a)||a),Object(i.a)(r,o)},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.siteURL,n=e.userEmail,r=l({accountID:t,userEmail:n,path:"/myads/sites/preview"}),o={source:"site-kit"};return a&&(o.url=d(a)||a),Object(i.a)(r,o)},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.userEmail,n=e.path,i=void 0===n?"/home":n,r="https://www.google.com/adsense/new";return a&&(r+="/u/".concat(a)),t&&(r+="/".concat(t),i&&(r+=i)),r},d=function(e){var t=new URL(e);return Object(n.parse)(t.hostname).domain}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return p}));var n=a(14),i=a.n(n),r=a(4),o=a.n(r),s=a(21),c=a.n(s),l=a(42),d=a.n(l);function u(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function g(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?u(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var p=function(t,a,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.client,l=void 0===s||s,u=r.server,p=void 0===u||u,m=r.storeName,h=void 0===m?void 0:m;c()(t,"type is required."),c()(a,"identifier is required."),c()(n,"datapoint is required.");var b=h||"".concat(t,"/").concat(a),f={serverNotifications:p?void 0:{},clientNotifications:l?void 0:{},isFetchingNotifications:!1},v={addNotification:function(e){return c()(e,"notification is required."),{payload:{notification:e},type:"ADD_NOTIFICATION"}},removeNotification:function(e){return c()(e,"id is required."),{payload:{id:e},type:"REMOVE_NOTIFICATION"}},fetchNotifications:o.a.mark((function e(){var t,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_NOTIFICATIONS"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_NOTIFICATIONS"};case 5:return t=e.sent,e.next=8,v.receiveNotifications(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_NOTIFICATIONS"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),a=e.t0,e.next=17,{payload:{error:a},type:"CATCH_FETCH_NOTIFICATIONS"};case 17:return e.abrupt("return",{response:t,error:a});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveNotifications:function(e){return c()(e,"notifications is required."),{payload:{notifications:e},type:"RECEIVE_NOTIFICATIONS"}}},y=i()({},"FETCH_NOTIFICATIONS",(function(){return d.a.get(t,a,n)})),_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,a=arguments.length>1?arguments[1]:void 0,n=a.type,r=a.payload;switch(n){case"ADD_NOTIFICATION":var o=r.notification;return g({},t,{clientNotifications:g({},t.clientNotifications||{},i()({},o.id,o))});case"REMOVE_NOTIFICATION":var s=r.id;if(void 0===t.clientNotifications||void 0===t.clientNotifications[s])return void 0!==t.serverNotifications&&void 0!==t.serverNotifications[s]&&e.console.warn('Cannot remove server-side notification with ID "'.concat(s,'"; this may be changed in a future release.')),g({},t);var c=g({},t.clientNotifications);return delete c[s],g({},t,{clientNotifications:c});case"START_FETCH_NOTIFICATIONS":return g({},t,{isFetchingNotifications:!0});case"RECEIVE_NOTIFICATIONS":var l=r.notifications;return g({},t,{isFetchingNotifications:!1,serverNotifications:l.reduce((function(e,t){return g({},e,i()({},t.id,t))}),{})});case"FINISH_FETCH_NOTIFICATIONS":return g({},t,{isFetchingNotifications:!1});case"CATCH_FETCH_NOTIFICATIONS":return g({},t,{error:r.error,isFetchingNotifications:!1});default:return g({},t)}},k={getNotifications:o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.fetchNotifications();case 2:case"end":return e.stop()}}),e)}))};p||delete k.getNotifications;var O={getNotifications:function(e){var t=e.serverNotifications,a=e.clientNotifications;return void 0===t&&void 0===a?t:Object.values(g({},t||{},{},a||{}))}};return{STORE_NAME:b,INITIAL_STATE:f,actions:v,controls:y,reducer:_,resolvers:k,selectors:O}}}).call(this,a(16))},,function(e,t,a){"use strict";(function(e){a(1);t.a=function Warning(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))}}).call(this,a(10))},,,,function(e,t,a){"use strict";(function(e){a(1);var n=a(2),i=a.n(n),r=a(15),o=a.n(r);function ChangeArrow(t){var a=t.direction,n=t.invertColor;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(a),{"googlesitekit-change-arrow--inverted-color":n}),width:"9",height:"9",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:i.a.string,invertColor:i.a.bool},ChangeArrow.defaultProps={direction:"up",invertColor:!1},t.a=ChangeArrow}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);t.a=function Error(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},e.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(34);t.a=function DashboardPermissionAlert(){return e.createElement(i.a,{id:"permission error",title:Object(n.__)("Permissions issue accessing data","google-site-kit"),description:Object(n.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})}}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(138),y=a(32),_=function(t){function Switch(e){var t;return i()(this,Switch),(t=c()(this,d()(Switch).call(this,e))).switchRef=Object(p.h)(),t}return g()(Switch,t),o()(Switch,[{key:"componentDidMount",value:function(){new y.h(this.switchRef.current)}},{key:"render",value:function(){var t=this.props,a=t.id,n=void 0===a?"googlesitekit-switch-".concat(this.props.instanceId):a,i=t.onClick,r=t.label,o=t.checked,s=t.disabled,c=t.hideLabel;return e.createElement(p.b,null,e.createElement("div",{"aria-checked":o?"true":"false",className:f()("mdc-switch",{"mdc-switch--checked":o,"mdc-switch--disabled":s}),onClick:i,onKeyPress:function(e){"function"==typeof i&&"Enter"===e.code&&i(e)},role:"switch",ref:this.switchRef,tabIndex:0},e.createElement("div",{className:"mdc-switch__track"}," "),e.createElement("div",{className:"mdc-switch__thumb-underlay"},e.createElement("div",{className:"mdc-switch__thumb"},e.createElement("input",{type:"checkbox",id:n,className:"mdc-switch__native-control",role:"switch",checked:o,disabled:s,onChange:function(){}})))),e.createElement("label",{className:f()({"screen-reader-only":c}),htmlFor:n},r))}}]),Switch}(p.a);_.propTypes={id:h.a.string,onClick:h.a.func,label:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,hideLabel:h.a.bool,instanceId:h.a.number.isRequired},_.defaultProps={checked:!1,disabled:!1,hideLabel:!0},t.a=Object(v.a)(_)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(0),r=a(3),o=a(40),s=a(74);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],d=Object(r.j)()[t].name,u=e.createElement(o.a
|
16 |
-
/* translators: %s: Module name */,{title:Object(i.sprintf)(Object(i.__)("%s activation","google-site-kit"),d)
|
17 |
-
/* translators: %s: Module name */,description:Object(i.sprintf)(Object(i.__)("%s module needs to be configured","google-site-kit"),d),ctaLabel:Object(i.__)("Complete activation","google-site-kit"),onClick:function(){n.location=Object(r.l)(t,!0)}});return Object(s.a)(u,a,c,l)}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(3),b=a(31),f=a(36),v=function(t){function AdSenseDashboardOutro(){return i()(this,AdSenseDashboardOutro),c()(this,d()(AdSenseDashboardOutro).apply(this,arguments))}return g()(AdSenseDashboardOutro,t),o()(AdSenseDashboardOutro,[{key:"render",value:function(){var t=Object(h.j)().adsense.accountURL;return e.createElement("section",{className:"googlesitekit-module-outro"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("div",{className:"googlesitekit-module-outro__logo"},e.createElement(b.a,{id:"adsense",height:"36",width:"42"}),e.createElement(b.a,{id:"plus",height:"13",width:"13"}),e.createElement(b.a,{id:"analytics",height:"36",width:"34"})),e.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-module-outro__title "},Object(m.__)("Connect Analytics with AdSense to create a powerful team that shows robust metrics for your site.","google-site-kit")),e.createElement("div",{className:"googlesitekit-module-outro__button"},e.createElement(f.a,{href:t,target:"_blank"},Object(m.__)("Connect Accounts","google-site-kit")))))))}}]),AdSenseDashboardOutro}(p.a);t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(14),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(11),v=a(0),y=a(3),_=a(52),k=a(22),O=a(13),E=a(33),S=a(46),j=a(115),D=a(19);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var C=function(t){function AnalyticsDashboardWidgetTopAcquisitionSources(){return s()(this,AnalyticsDashboardWidgetTopAcquisitionSources),u()(this,p()(AnalyticsDashboardWidgetTopAcquisitionSources).apply(this,arguments))}return h()(AnalyticsDashboardWidgetTopAcquisitionSources,t),l()(AnalyticsDashboardWidgetTopAcquisitionSources,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(_.a)(),n=[{title:Object(v.__)("Medium","google-site-kit"),tooltip:Object(v.__)("Medium refers to where your traffic originated from","google-site-kit")},{title:Object(v.__)("Users","google-site-kit"),tooltip:Object(v.__)("Number of users that originated from that traffic","google-site-kit")},{title:Object(v.__)("New Users","google-site-kit"),
|
18 |
-
/* translators: %s: date range */
|
19 |
-
tooltip:Object(v.sprintf)(Object(v.__)("Number of new users to visit your page over last %s","google-site-kit"),a)},{title:Object(v.__)("Sessions","google-site-kit"),
|
20 |
-
/* translators: %s: date range */
|
21 |
-
tooltip:Object(v.sprintf)(Object(v.__)("Number of sessions users had on your website over last %s","google-site-kit"),a)},{title:Object(v.__)("Percentage","google-site-kit"),tooltip:Object(v.__)("Percentage of sessions","google-site-kit")}],i=t[0].data.totals[0].values[0],r=Object(f.map)(t[0].data.rows,(function(t,a){var n=t.metrics[0].values[0]/i*100;return!(1>n)&&[t.dimensions[0],Object(y.q)(t.metrics[0].values[0]),Object(y.q)(t.metrics[0].values[1]),Object(y.q)(t.metrics[0].values[2]),e.createElement(b.b,{key:"minichart-analytics-top-as-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")," ",e.createElement(j.a,{percent:n.toFixed(1),index:a})))]})),o=Object(E.b)(r,n,{hideHeader:!1,chartsEnabled:!1});return e.createElement("div",{className:"googlesitekit-details-widget"},e.createElement(E.a,null,o))}}]),AnalyticsDashboardWidgetTopAcquisitionSources}(b.a);t.a=Object(k.a)(C,[{type:O.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},D.r,{url:n.googlesitekit.permaLink}),priority:1,maxAge:Object(y.n)("day"),context:["Single","Dashboard"]}],e.createElement(S.a,{rows:4,rowHeight:50}),{},D.h)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(61),h=a(168),b=function(t){function MiniChart(){return i()(this,MiniChart),c()(this,d()(MiniChart).apply(this,arguments))}return g()(MiniChart,t),o()(MiniChart,[{key:"render",value:function(){var t=this.props,a=t.index,n=t.percent,i={backgroundColor:"transparent",chartArea:{width:"100%",height:"100%"},enableInteractivity:!1,height:28,legend:{position:"none"},slices:{0:{color:h.a[a]},1:{color:"#e6e6e6"}},title:null,tooltip:{trigger:"none"},width:28},r=[["source","percent"],["",+n],["",100-n]];return e.createElement("div",{className:"googlesitekit-mini-chart"},e.createElement(m.a,{data:r,options:i,chartType:"pie",loadSmall:!0,loadCompressed:!0,loadHeight:24,loadText:!1,id:"minichart"+a}))}}]),MiniChart}(p.a);t.a=b}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return AdSenseLinkCTA}));a(1);var n=a(0),i=a(40);function AdSenseLinkCTA(){return e.createElement(i.a,{title:Object(n.__)("Link Analytics and AdSense","google-site-kit"),description:Object(n.__)("Get reports for your top earning pages by linking your Analytics and AdSense accounts.","google-site-kit"),ctaLink:"https://support.google.com/adsense/answer/6084409",ctaLabel:Object(n.__)("Learn more","google-site-kit")})}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(11),b=a(0),f=a(3),v=a(22),y=a(13),_=a(33),k=a(46),O=function(t){function SearchConsoleDashboardWidgetKeywordTable(){return r()(this,SearchConsoleDashboardWidgetKeywordTable),l()(this,u()(SearchConsoleDashboardWidgetKeywordTable).apply(this,arguments))}return p()(SearchConsoleDashboardWidgetKeywordTable,t),s()(SearchConsoleDashboardWidgetKeywordTable,[{key:"render",value:function(){var t=this.props.data,a=[{title:Object(b.__)("Keyword","google-site-kit"),tooltip:Object(b.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(b.__)("Clicks","google-site-kit"),tooltip:Object(b.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(b.__)("Impressions","google-site-kit"),tooltip:Object(b.__)("Counted each time your content appears in search results","google-site-kit")}],n=Object(f.j)()["search-console"].settings.propertyID,i=[],r=Object(h.map)(t,(function(e,t){var a=e.keys[0];return i[t]=Object(b.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%1$s&query=!%2$s&num_of_days=28",n,a),[a,Object(f.q)(e.clicks),Object(f.q)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(_.b)(r,a,o);return e.createElement(_.a,null,s)}}]),SearchConsoleDashboardWidgetKeywordTable}(m.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n.googlesitekit.permaLink,dimensions:"query",limit:10},priority:1,maxAge:Object(f.n)("day"),context:["Single","Dashboard"]}],e.createElement(k.a,{padding:!0}),{createGrid:!0},(function(e){return!e.length}))}).call(this,a(10),a(16))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function DashboardSearchFunnelInner(){return i()(this,DashboardSearchFunnelInner),c()(this,d()(DashboardSearchFunnelInner).apply(this,arguments))}return g()(DashboardSearchFunnelInner,e),o()(DashboardSearchFunnelInner,[{key:"render",value:function(){return null}}]),DashboardSearchFunnelInner}(a(1).a);t.a=Object(p.a)("googlesitekit.DashboardSearchFunnel")(m)},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(89);function i(e){if(Object(n.b)(e))return e.match(/pub-\d+$/)[0]}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return h}));var n=a(4),i=a.n(n),r=a(14),o=a.n(r),s=a(54),c=a(39),l=a(123),d=a(124),u=a(125),g=a(45);function p(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function m(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h=function(t){var a,n,r,o,l;return i.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:return a=e.googlesitekit.admin,n=a.homeURL,r=a.ampMode,o={tagverify:1,timestamp:Date.now()},d.next=4,i.a.awrap(b(Object(c.a)(n,o),t));case 4:if((l=d.sent)||"secondary"!==r){d.next=9;break}return d.next=8,i.a.awrap(Object(s.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,i.a.awrap(b(Object(c.a)(e.link,m({},o,{amp:1})),t));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop()}}))})).pop()})));case 8:l=d.sent;case 9:return d.abrupt("return",Promise.resolve(l||null));case 10:case"end":return d.stop()}}))},b=function(e,t){var a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return a=n.sent,n.abrupt("return",f(a,t)||null);case 7:return n.prev=7,n.t0=n.catch(0),n.abrupt("return",null);case 10:case"end":return n.stop()}}),null,null,[[0,7]])},f=function(e,t){var a=({adsense:d.a,analytics:u.a,tagmanager:g.d,setup:l.a}[t]||[]).find((function(t){return t.test(e)}));return!!a&&a.exec(e)[1]}}).call(this,a(16))},function(e,t,a){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},function(e,t,a){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},function(e,t,a){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(14),o=a.n(r),s=a(21),c=a.n(s),l=a(39),d=a(17),u=a.n(d),g=a(25);function p(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function m(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h=u.a.createRegistrySelector,b={connectURL:void 0,user:void 0,verified:void 0},f={receiveConnectURL:function(e){return c()(e,"connectURL is required."),{payload:{connectURL:e},type:"RECEIVE_CONNECT_URL"}},receiveUserInfo:function(e){return c()(e,"userInfo is required."),{payload:{user:e},type:"RECEIVE_USER_INFO"}},receiveUserIsVerified:function(e){return c()(void 0!==e,"userIsVerified is required."),{payload:{verified:e},type:"RECEIVE_USER_IS_VERIFIED"}}},v={getConnectURL:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.a.commonActions.getRegistry();case 2:if(a=t.sent,!(0,a.select)(g.b).getConnectURL()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.connectURL,t.next=12,f.receiveConnectURL(n);case 12:case"end":return t.stop()}}),t)})),getUser:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.a.commonActions.getRegistry();case 2:if(a=t.sent,void 0===(0,a.select)(g.b).getUser()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.user,t.next=12,f.receiveUserInfo(n);case 12:case"end":return t.stop()}}),t)})),isVerified:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.a.commonActions.getRegistry();case 2:if(a=t.sent,void 0===(0,a.select)(g.b).isVerified()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.verified,t.next=12,f.receiveUserIsVerified(n);case 12:case"end":return t.stop()}}),t)}))},y={getUser:function(e){return e.user},getConnectURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.additionalScopes,n=void 0===a?[]:a,i=t.redirectURL,r=void 0===i?void 0:i,o=e.connectURL,s={redirect:r};if(void 0!==o)return(null==n?void 0:n.length)?Object(l.a)(o,m({},s,{additional_scopes:n})):Object(l.a)(o,s)},getID:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.id:t}})),getName:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.name:t}})),getEmail:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.email:t}})),getPicture:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.picture:t}})),isVerified:function(e){return e.verified}};t.a={INITIAL_STATE:b,actions:f,controls:{},reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"RECEIVE_CONNECT_URL":return m({},e,{connectURL:n.connectURL});case"RECEIVE_USER_INFO":return m({},e,{user:n.user});case"RECEIVE_USER_IS_VERIFIED":return m({},e,{verified:n.verified});default:return m({},e)}},resolvers:v,selectors:y}}).call(this,a(16))},,function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(31);t.a=function Logo(){return e.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},e.createElement(i.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),e.createElement(i.a,{id:"logo-sitekit",className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),e.createElement("span",{className:"screen-reader-text"},Object(n.__)("Site Kit by Google Logo","google-site-kit")))}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return Root}));a(1);var n=a(2),i=a.n(n),r=a(17),o=a.n(r),s=a(130),c=a(131),l=a(132),d=a(133);function Root(t){var a=t.children,n=t.registry,i=t.dataAPIContext,r=t.dataAPIModuleArgs;return e.createElement(o.a.RegistryProvider,{value:n},e.createElement(s.a,null,e.createElement(l.a,null,a,i&&e.createElement(d.a,{context:i,args:r})),e.createElement(c.a,null)))}Root.propTypes={children:i.a.node.isRequired,registry:i.a.object,dataAPIContext:i.a.string,dataAPIModuleArgs:i.a.object},Root.defaultProps={registry:o.a}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(2),b=a.n(h),f=a(0),v=a(34),y=function(t){function ErrorHandler(e){var t;return r()(this,ErrorHandler),(t=l()(this,u()(ErrorHandler).call(this,e))).state={error:null,info:null},t}return p()(ErrorHandler,t),s()(ErrorHandler,[{key:"componentDidCatch",value:function(t,a){e.console.error("Caught an error:",t,a),this.setState({error:t,info:a})}},{key:"render",value:function(){var e=this.props.children,t=this.state,a=t.error,i=t.info;return a?n.createElement(v.a,{id:"googlesitekit-error",title:Object(f.__)("Site Kit encountered an error","google-site-kit"),description:n.createElement("code",null,a.message),isDismissable:!1,format:"small",type:"win-error"},n.createElement("pre",null,i.componentStack)):e}}]),ErrorHandler}(m.a);y.defaultProps={},y.propTypes={children:b.a.node.isRequired},t.a=y}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(1),s=a(0),c=a(17),l=a.n(c),d=a(87),u=a(92),g=a(96),p=a(79),m=l.a.useSelect,h=l.a.useDispatch,b=l.a.useRegistry;t.a=function PermissionsModal(){var t,a,i,c=b(),l=m((function(e){return e(d.a).getPermissionScopeError()})),f=m((function(t){var a;return t(d.a).getConnectURL({additionalScopes:null==l?void 0:null===(a=l.data)||void 0===a?void 0:a.scopes,redirectURL:e.location.href})})),v=h(d.a).clearPermissionScopeError,y=Object(o.l)((function(){v()}),[v]),_=Object(o.l)((function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.a.awrap(Object(p.c)(c));case 2:e.location.assign(f);case 3:case"end":return t.stop()}}))}),[c,f]);return Object(o.n)((function(){var e,t,a;r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.skipModal)||!(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(a=t.scopes)||void 0===a?void 0:a.length)){n.next=3;break}return n.next=3,r.a.awrap(_());case 3:case"end":return n.stop()}}))}),[_,l]),l?(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(a=t.scopes)||void 0===a?void 0:a.length)?(null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.skipModal)?null:n.createElement(g.a,null,n.createElement(u.a,{title:Object(s.__)("Additional Permissions Required","google-site-kit"),subtitle:l.message,confirmButton:Object(s.__)("Proceed","google-site-kit"),dialogActive:!0,handleConfirm:_,handleDialog:y})):(e.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",l),null):null}}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(4),i=a.n(n),r=a(37),o=a.n(r),s=a(1),c=a(17),l=a.n(c),d=a(79),u=l.a.useRegistry;t.a=function RestoreSnapshots(e){var t=e.children,a=u(),n=Object(s.s)(!1),r=o()(n,2),c=r[0],l=r[1];return Object(s.n)((function(){c||i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(d.b)(a));case 2:l(!0);case 3:case"end":return e.stop()}}))}),[a,c]),c?t:null}},function(e,t,a){"use strict";a.d(t,"a",(function(){return CollectModuleData}));var n=a(1),i=a(12);a(13);function CollectModuleData(e){var t=e.context,a=e.args;return Object(n.n)((function(){Object(i.d)("googlesitekit.moduleLoaded",t,a)}),[t,a]),null}},,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(18),h=a.n(m),b=a(9),f=a.n(b),v=a(1),y=a(2),_=a.n(y),k=a(15),O=a.n(k),E=a(0),S=a(12),j=a(3),D=a(31),w=a(36),C=a(26),A=a(13),N=a(32),T=function(t){function OptimizeSetup(e){var t;s()(this,OptimizeSetup),t=u()(this,p()(OptimizeSetup).call(this,e));var a=Object(j.j)(),n=a.optimize.settings,i=n.optimizeID,r=n.ampExperimentJSON,o=(a.analytics||{}).settings,c=a.tagmanager||{},l=c.active,d=c.settings,g=!!o&&o.useSnippet,m=!(!l||!d)&&d.useSnippet;return t.state={optimizeID:i||"",analyticsUseSnippet:g,gtmUseSnippet:m,errorCode:!1,errorMsg:"",ampExperimentJSON:r||"",ampExperimentJSONValidated:!0,OptimizeIDValidated:!0},t.handleOptimizeIDEntry=t.handleOptimizeIDEntry.bind(h()(t)),t.handleSubmit=t.handleSubmit.bind(h()(t)),t.renderInstructionInfo=t.renderInstructionInfo.bind(h()(t)),t.handleAMPOptimizeEntry=t.handleAMPOptimizeEntry.bind(h()(t)),t}return f()(OptimizeSetup,t),l()(OptimizeSetup,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(S.b)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed",(function(t,a){return"optimize"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(S.g)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(j.w)("optimize",{optimizeID:"optimizeID",ampExperimentJSON:"ampExperimentJSON"},this.state)}}},{key:"handleSubmit",value:function(){var e,t,a,n,i,o,s=this;return r.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=this.state,t=e.optimizeID,a=e.ampExperimentJSON,n=e.OptimizeIDValidated,i=this.props.finishSetup,n&&0!==t.length){c.next=4;break}return c.abrupt("return",!1);case 4:return o={optimizeID:t,ampExperimentJSON:a},c.next=7,r.a.awrap(A.c.set(A.b,"optimize","settings",o).then((function(){i&&i(),Object(j.j)().optimize.settings.optimizeID=t,s._isMounted&&s.setState({isSaving:!1})})).catch((function(e){s._isMounted&&s.setState({errorCode:!0,errorMsg:e.errorMsg})})));case 7:return c.abrupt("return",c.sent);case 8:case"end":return c.stop()}}),null,this)}},{key:"handleOptimizeIDEntry",value:function(e){var t=Object(j.z)(e.target.value);this._isMounted&&this.setState({optimizeID:e.target.value,OptimizeIDValidated:t})}},{key:"handleAMPOptimizeEntry",value:function(e){var t=Object(j.y)(e.target.value);this._isMounted&&this.setState({ampExperimentJSON:e.target.value,ampExperimentJSONValidated:t})}},{key:"renderInfo",value:function(){var t=this.state.optimizeID;return e.createElement(v.b,null,t?e.createElement("div",null,Object(E.__)("Your Optimize Container ID","google-site-kit"),": ",e.createElement("strong",null,t)):e.createElement("div",null,Object(E.__)('Optimize Container ID missing, press "edit" to add',"google-site-kit"),"."))}},{key:"renderInstructionInfo",value:function(){var t=this.state,a=t.analyticsUseSnippet,n=t.gtmUseSnippet,i=t.optimizeID;return!a&&n?e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("You are using auto insert snippet with Tag Manager","google-site-kit")),e.createElement("p",null,e.createElement("a",{href:"https://support.google.com/optimize/answer/6314801"},Object(E.__)("Click here","google-site-kit"))," ",Object(E.__)("for how to implement Optimize tag through your Tag Manager","google-site-kit"))):a?null:e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("You disabled analytics auto insert snippet. If You are using Google Analytics code snippet, add the code below:","google-site-kit")),e.createElement("pre",null,'ga("require", "',i||"GTM-XXXXXXX",'");'),e.createElement("p",null,e.createElement("a",{href:"https://support.google.com/optimize/answer/6262084"},Object(E.__)("Click here","google-site-kit"))," ",Object(E.__)("for how to implement Optimize tag in Google Analytics Code Snippet","google-site-kit")))}},{key:"renderAMPSnippet",value:function(){var t=this.state,a=t.analyticsUseSnippet,i=t.ampExperimentJSON,r=t.ampExperimentJSONValidated,o=n.googlesitekit.admin.ampEnabled;return a&&o?e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("Please input your AMP experiment settings in JSON format below.","google-site-kit")," ",e.createElement(C.a,{href:"https://developers.google.com/optimize/devguides/amp-experiments",external:!0,inherit:!0},Object(E.__)("Learn More.","google-site-kit"))),e.createElement(N.k,{className:O()("mdc-text-field",{"mdc-text-field--error":!r}),name:"amp-experiment",onChange:this.handleAMPOptimizeEntry,textarea:!0},e.createElement(N.b,{inputType:"textarea",value:null===i?"":i})),!r&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error: AMP experiment settings are not in a valid JSON format.","google-site-kit"))):null}},{key:"renderForm",value:function(){var t=this.state,a=t.optimizeID,n=t.errorCode,i=t.errorMsg,r=t.OptimizeIDValidated;return e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("Please copy and paste your Optimize ID to complete your setup.","google-site-kit")," ",e.createElement(C.a,{href:"https://support.google.com/optimize/answer/6211921",external:!0,inherit:!0},Object(E.__)("You can locate this here.","google-site-kit"))),n&&0<i.length&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error:","google-site-kit")," ",i),e.createElement("div",{className:"googlesitekit-setup-module__inputs"},e.createElement(N.k,{className:O()("mdc-text-field",{"mdc-text-field--error":n||!r}),label:Object(E.__)("Optimize Container ID","google-site-kit"),name:"optimizeID",onChange:this.handleOptimizeIDEntry,helperText:e.createElement(N.a,null,Object(E.__)("Format: GTM-XXXXXXX or OPT-XXXXXXX","google-site-kit")),outlined:!0,required:!0},e.createElement(N.b,{value:a}))),!r&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error: Not a valid Optimize ID.","google-site-kit")),this.renderAMPSnippet(),this.renderInstructionInfo())}},{key:"render",value:function(){var t=this.props,a=t.onSettingsPage,n=t.isEditing;return e.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--optimize"},!a&&e.createElement(v.b,null,e.createElement("div",{className:"googlesitekit-setup-module__logo"},e.createElement(D.a,{id:"optimize",width:"33",height:"33"})),e.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(E._x)("Optimize","Service name","google-site-kit"))),n&&this.renderForm(),!n&&this.renderInfo(),!a&&e.createElement("div",{className:"googlesitekit-setup-module__action"},e.createElement(w.a,{onClick:this.handleSubmit},Object(E.__)("Configure Optimize","google-site-kit"))))}}]),OptimizeSetup}(v.a);T.propTypes={onSettingsPage:_.a.bool,finishSetup:_.a.func,isEditing:_.a.bool},T.defaultProps={onSettingsPage:!0,isEditing:!1},t.a=T}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e,n){a.d(t,"b",(function(){return S})),a.d(t,"a",(function(){return j}));var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(11),b=a(0),f=a(3),v=a(22),y=a(49),_=a(13),k=a(33),O=a(80),E=function(t){function PageSpeedInsightsDashboardWidgetHomepageSpeedColumn(){return r()(this,PageSpeedInsightsDashboardWidgetHomepageSpeedColumn),l()(this,u()(PageSpeedInsightsDashboardWidgetHomepageSpeedColumn).apply(this,arguments))}return p()(PageSpeedInsightsDashboardWidgetHomepageSpeedColumn,t),s()(PageSpeedInsightsDashboardWidgetHomepageSpeedColumn,[{key:"componentDidMount",value:function(){var e=this.props,t=e.data,a=e.handleDataLoaded;t&&a&&a()}},{key:"render",value:function(){var t=this.props,a=t.data,n=t.title;if(!a||a.error)return null;if(!function(e){return!!Object(h.get)(e,"categories.performance.score")}(a))return Object(y.a)(Object(b._x)("PageSpeed Insights","Service name","google-site-kit"),Object(b.__)("An unknown error occurred while trying to fetch PageSpeed Insights data. Please try again later.","google-site-kit"),!0);var i=a.categories.performance.score,r=Object(O.d)(i),o=a.audits.interactive.displayValue,s=Object(k.b)([[Object(b.__)("Real user speed data","google-site-kit"),e.createElement(O.b,{key:"0",score:i},r)],[Object(b.__)("Time to become fully interactive","google-site-kit"),e.createElement(O.b,{key:"0",score:i},o)]],[],{hideHeader:!0,disableListMode:!0,chartsEnabled:!1,links:[]});return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement("div",{className:"googlesitekit-pagespeed-report__heading-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 "},n),e.createElement(O.c,{score:i})),e.createElement(k.a,null,s))}}]),PageSpeedInsightsDashboardWidgetHomepageSpeedColumn}(m.a),S=Object(v.a)(E,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:n.googlesitekit.permaLink,strategy:"mobile",dateRange:null},priority:10,maxAge:Object(f.n)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0}),j=Object(v.a)(E,[{type:_.b,identifier:"pagespeed-insights",datapoint:"pagespeed",data:{url:n.googlesitekit.permaLink,strategy:"desktop",dateRange:null},priority:10,maxAge:Object(f.n)("day"),context:["Single","Dashboard"]}],null,{inGrid:!0})}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e,n){var i=a(14),r=a.n(i),o=a(4),s=a.n(o),c=a(5),l=a.n(c),d=a(6),u=a.n(d),g=a(7),p=a.n(g),m=a(8),h=a.n(m),b=a(18),f=a.n(b),v=a(9),y=a.n(v),_=a(1),k=a(2),O=a.n(k),E=a(11),S=a(15),j=a.n(S),D=a(0),w=a(12),C=a(31),A=a(122),N=a(3),T=a(45),x=a(32),P=a(36),I=a(91),L=a(26),R=a(111),M=a(13),W=a(41),U="web",H="amp",F=function(t){function TagmanagerSetup(t){var a;l()(this,TagmanagerSetup),a=p()(this,h()(TagmanagerSetup).call(this,t));var n=e.googlesitekit.admin,i=n.ampEnabled,r=n.ampMode,o=Object(N.j)().tagmanager.settings,s="primary"===r?H:[U,H];return a.state={ampEnabled:i,isLoading:!0,isSecondaryAMP:"secondary"===r,accounts:[],containers:[],containersAMP:[],errorCode:!1,errorMsg:"",existingContainer:"",selectedAccount:o.accountID,selectedContainer:o.containerID,selectedContainerAMP:o.ampContainerID,containersLoading:!1,usageContext:i?s:U,hasExistingTag:!1,useSnippet:o.useSnippet},a.handleSubmit=a.handleSubmit.bind(f()(a)),a.renderAccountDropdownForm=a.renderAccountDropdownForm.bind(f()(a)),a.handleAccountChange=a.handleAccountChange.bind(f()(a)),a.refetchAccount=a.refetchAccount.bind(f()(a)),a}return y()(TagmanagerSetup,t),u()(TagmanagerSetup,[{key:"setState",value:function(){this._isMounted&&_.a.prototype.setState.apply(this,arguments)}},{key:"componentDidMount",value:function(){var e,t,a,n=this;return s.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e=this.props,t=e.isOpen,a=e.onSettingsPage,this._isMounted=!0,!a||t){i.next=4;break}return i.abrupt("return");case 4:return i.next=6,s.a.awrap(this.loadAccountsContainers());case 6:Object(w.b)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed",(function(e,t){return"tagmanager"!==t.replace("-module","")?e:n.props.isEditing?n.handleSubmit():void 0})),this.toggleConfirmChangesButton();case 8:case"end":return i.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(w.g)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed")}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){var e={selectedContainer:"containerID",selectedContainerAMP:"ampContainerID",selectedAccount:"accountID",useSnippet:"useSnippet"};this.canSaveSettings()||(e={}),Object(N.w)("tagmanager",e,this.state)}}},{key:"loadAccountsContainers",value:function(){var e,t,a,n,i,r;return s.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,s.a.awrap(Object(A.a)("tagmanager"));case 2:if(!(e=o.sent)){o.next=20;break}return o.prev=4,o.next=7,s.a.awrap(M.c.get(M.b,"tagmanager","tag-permission",{tag:e}));case 7:t=o.sent,a=t.account,n=t.container,i=Object(T.a)([n]).byContext(U),r=Object(T.a)([n]).byContext(H),this.setState({isLoading:!1,existingContainer:e,selectedAccount:a.accountId,selectedContainer:Object(E.get)(i,[0,"publicId"]),selectedContainerAMP:Object(E.get)(r,[0,"publicId"]),accounts:[a],hasExistingTag:!0}),o.next=18;break;case 15:o.prev=15,o.t0=o.catch(4),this.setState({isLoading:!1,errorCode:o.t0.code,errorMsg:o.t0.message,errorReason:!(!o.t0.data||!o.t0.data.reason)&&o.t0.data.reason,existingContainer:e,hasExistingTag:!!e});case 18:o.next=22;break;case 20:return o.next=22,s.a.awrap(this.requestTagManagerAccountsContainers());case 22:case"end":return o.stop()}}),null,this,[[4,15]])}},{key:"requestTagManagerAccounts",value:function(){var e,t;return s.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.selectedAccount,a.next=4,s.a.awrap(M.c.get(M.b,"tagmanager","accounts"));case 4:t=a.sent,this.validateAccounts(t,e),this.setState({isLoading:!1,accounts:t}),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(0),this.setState({isLoading:!1,errorCode:a.t0.code,errorMsg:a.t0.message});case 12:case"end":return a.stop()}}),null,this,[[0,9]])}},{key:"requestTagManagerAccountsContainers",value:function(){var e,t,a,n,i,r,o,c,l,d,u,g,p;return s.a.async((function(m){for(;;)switch(m.prev=m.next){case 0:return m.prev=0,e=this.state,t=e.selectedAccount,a=e.usageContext,n=this.state,i=n.selectedContainer,r=n.selectedContainerAMP,o={accountID:t,usageContext:a},m.next=6,s.a.awrap(M.c.get(M.b,"tagmanager","accounts-containers",o));case 6:c=m.sent,l=c.accounts,d=c.containers,this.validateAccounts(l,t),u=d.map((function(e){return e.publicId})),Object(T.c)(i)&&!u.includes(i)&&(i=""),Object(T.c)(r)&&!u.includes(r)&&(r=""),g=Object(T.a)(d).byContext(U),p=Object(T.a)(d).byContext(H),this.setState({isLoading:!1,accounts:l,containers:g,containersAMP:p,selectedAccount:t||Object(E.get)(d,[0,"accountId"]),selectedContainer:i||Object(E.get)(g,[0,"publicId"]),selectedContainerAMP:r||Object(E.get)(p,[0,"publicId"]),errorCode:!1,errorMsg:""}),m.next=21;break;case 18:m.prev=18,m.t0=m.catch(0),this.setState({isLoading:!1,errorCode:m.t0.code,errorMsg:m.t0.message});case 21:case"end":return m.stop()}}),null,this,[[0,18]])}},{key:"validateAccounts",value:function(e,t){if(!t&&0===e.length)throw{code:"accountEmpty",message:Object(D.__)("We didn’t find an associated Google Tag Manager account, would you like to set it up now? If you’ve just set up an account please re-fetch your account to sync it with Site Kit.","google-site-kit")};if(Object(T.b)(t)&&!e.find((function(e){return e.accountId===t})))throw{code:"insufficientPermissions",message:Object(D.__)("You currently don’t have access to this Google Tag Manager account. You can either request access from your team, or remove this Google Tag Manager snippet and connect to a different account.","google-site-kit")}}},{key:"requestTagManagerContainers",value:function(e){var t,a;return s.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return this.setState({containersLoading:!0}),n.prev=1,t={accountID:e,usageContext:this.state.usageContext},n.next=5,s.a.awrap(M.c.get(M.b,"tagmanager","containers",t));case 5:a=n.sent,this.setState({containersLoading:!1,containers:Object(T.a)(a).byContext(U),containersAMP:Object(T.a)(a).byContext(H),errorCode:!1}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(1),this.setState({containersLoading:!1,errorCode:n.t0.code,errorMsg:n.t0.message});case 12:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"handleSubmit",value:function(){var e,t,a,n,i,r,o,c,l,d;return s.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return e=this.state,t=e.hasExistingTag,a=e.selectedAccount,n=e.selectedContainer,i=e.selectedContainerAMP,r=e.usageContext,o=e.useSnippet,c=this.props.finishSetup,u.prev=2,l={accountID:a,containerID:n,ampContainerID:i,usageContext:r,useSnippet:!t&&o},u.next=6,s.a.awrap(M.c.set(M.b,"tagmanager","settings",l));case 6:d=u.sent,c&&c(),Object(N.j)().tagmanager.settings=d,this.setState({isSaving:!1}),u.next=16;break;case 12:throw u.prev=12,u.t0=u.catch(2),this.setState({isLoading:!1,isSaving:!1,errorCode:u.t0.code,errorMsg:u.t0.message}),u.t0;case 16:case"end":return u.stop()}}),null,this,[[2,12]])}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.dataset.value;n!==a&&(this.setState({selectedAccount:n,selectedContainer:"",selectedContainerAMP:""}),Object(T.b)(n)&&this.requestTagManagerContainers(n))}},{key:"refetchAccount",value:function(e){e.preventDefault(),this.setState({isLoading:!0,errorCode:!1,errorMsg:"",selectedAccount:"",selectedContainer:"",selectedContainerAMP:""},this.requestTagManagerAccounts)}},{key:"renderSettingsInfo",value:function(){var e=Object(N.j)().tagmanager.settings,t=this.state,a=t.ampEnabled,i=t.isSecondaryAMP,r=t.hasExistingTag,o=t.isLoading,s=e.accountID,c=e.useSnippet;return o?n.createElement(W.a,null):n.createElement(_.b,null,n.createElement("div",{className:"googlesitekit-settings-module__meta-items"},n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(D.__)("Account","google-site-kit")),n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(I.a,{value:s}))),(!a||i)&&n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},i&&Object(D.__)("Web Container ID","google-site-kit"),!a&&Object(D.__)("Container ID","google-site-kit")),n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(I.a,{value:e.containerID}))),a&&n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},i&&Object(D.__)("AMP Container ID","google-site-kit"),!i&&Object(D.__)("Container ID","google-site-kit")),n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(I.a,{value:e.ampContainerID})))),n.createElement("div",{className:"googlesitekit-settings-module__meta-items"},n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("p",{className:"googlesitekit-settings-module__meta-item-type"},Object(D.__)("Tag Manager Code Snippet","google-site-kit")),n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-data"},c&&Object(D.__)("Snippet is inserted","google-site-kit"),!c&&Object(D.__)("Snippet is not inserted","google-site-kit")),r&&n.createElement("p",null,Object(D.__)("Placing two tags at the same time is not recommended.","google-site-kit")))))}},{key:"renderAccountDropdownForm",value:function(){var e=this,t=this.state,a=t.ampEnabled,i=t.accounts,r=t.selectedAccount,o=t.containers,s=t.containersAMP,c=t.existingContainer,l=t.hasExistingTag,d=t.isLoading,u=t.isSecondaryAMP,g=t.errorCode,p=t.useSnippet,m=this.props.onSettingsPage;if(d)return n.createElement(W.a,null);if("tag_manager_existing_tag_permission"===g)return null;if("accountEmpty"===g)return this.renderCreateAccount();if("account_create"===r)return n.createElement(_.b,null,n.createElement("p",null,Object(D.__)("To create a new account, click the button below which will open the Google Tag Manager account creation screen in a new window.","google-site-kit")),n.createElement("p",null,Object(D.__)("Once completed, click the link below to re-fetch your accounts to continue.","google-site-kit")),this.renderCreateAccount());var h=!a||u,b=a;return n.createElement(_.b,null,l&&n.createElement("p",null,Object(D.sprintf)(// translators: %s: the existing container ID.
|
22 |
-
Object(D.__)("An existing tag was found on your site (%s). If you later decide to replace this tag, Site Kit can place the new tag for you. Make sure you remove the old tag first.","google-site-kit"),c)),!l&&!u&&n.createElement("p",null,Object(D.__)("Please select your Tag Manager account and container below, the snippet will be inserted automatically on your site.","google-site-kit")),!l&&u&&n.createElement("p",null,Object(D.__)("Looks like your site is using paired AMP. Please select your Tag Manager account and relevant containers below, the snippets will be inserted automatically on your site.","google-site-kit")),n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(x.j,{className:"googlesitekit-tagmanager__select-account",enhanced:!0,name:"accounts",label:Object(D.__)("Account","google-site-kit"),value:r,disabled:l,onEnhancedChange:this.handleAccountChange,outlined:!0},[].concat(i).concat(l?[]:{name:Object(D.__)("Set up a new account","google-site-kit"),accountId:"account_create"}).map((function(e){return n.createElement(x.i,{key:e.accountId,value:e.accountId},e.name)}))),h&&this.renderContainerSelect({selectedStateKey:"selectedContainer",containers:o,label:b?Object(D.__)("Web Container","google-site-kit"):null,type:U}),b&&this.renderContainerSelect({selectedStateKey:"selectedContainerAMP",containers:s,label:h?Object(D.__)("AMP Container","google-site-kit"):null,type:H})),m&&n.createElement(_.b,null,l&&n.createElement("p",null,Object(D.__)("Placing two tags at the same time is not recommended.","google-site-kit")),n.createElement(R.a,{id:"tagmanagerUseSnippet",onClick:function(){return e.setState({useSnippet:!p})},name:"useSnippet",checked:p,label:Object(D.__)("Let Site Kit place code on your site","google-site-kit"),hideLabel:!1}),n.createElement("p",null,p?Object(D.__)("Site Kit will add the code automatically","google-site-kit"):Object(D.__)("Site Kit will not add the code to your site","google-site-kit"))),!m&&n.createElement("div",{className:"googlesitekit-setup-module__action"},n.createElement(P.a,{onClick:this.handleSubmit,disabled:!this.canSaveSettings()},Object(D.__)("Confirm & Continue","google-site-kit"))))}},{key:"renderContainerSelect",value:function(e){var t=this,a=e.label,i=e.selectedStateKey,o=e.containers,s=e.type,c=this.state,l=c.containersLoading,d=c.selectedAccount,u=c.hasExistingTag,g=!!o.length;return l?n.createElement(W.a,{small:!0}):n.createElement(x.j,{className:"\n\t\t\t\t\tgooglesitekit-tagmanager__select-container\n\t\t\t\t\tgooglesitekit-tagmanager__select-container--".concat(s,"\n\t\t\t\t"),label:a||Object(D.__)("Container","google-site-kit"),value:g?this.state[i]:"container_create",onEnhancedChange:function(e,a){return t.setState(r()({},i,a.dataset.value))},disabled:u||!Object(T.b)(d),enhanced:!0,outlined:!0},[].concat(o).concat(u?[]:{name:Object(D.__)("Set up a new container","google-site-kit"),publicId:"container_create"}).map((function(e,t){var a=e.name,i=e.publicId;return n.createElement(x.i,{key:t,value:i},a)})))}},{key:"canSaveSettings",value:function(){var e=this.state,t=e.ampEnabled,a=e.isSecondaryAMP,n=e.errorCode,i=e.isLoading,r=e.selectedAccount,o=e.selectedContainer,s=e.selectedContainerAMP;return!(i||"tag_manager_existing_tag_permission"===n||!Object(T.b)(r))&&(!!(t&&!a||Object(T.c)(o)||"container_create"===o)&&!(t&&!Object(T.c)(s)&&"container_create"!==s))}},{key:"renderCreateAccount",value:function(){return n.createElement("div",{className:"googlesitekit-setup-module__action"},n.createElement(P.a,{onClick:TagmanagerSetup.createNewAccount},Object(D.__)("Create an account","google-site-kit")),n.createElement("div",{className:"googlesitekit-setup-module__sub-action"},n.createElement(L.a,{onClick:this.refetchAccount},Object(D.__)("Re-fetch My Account","google-site-kit"))))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,i=this.props.onSettingsPage;if(0===a.length)return null;var r=!i||"insufficientPermissions"!==t;return n.createElement("div",{className:j()({"googlesitekit-error-text":r})},n.createElement("p",null,r?Object(D.sprintf)(
|
23 |
-
/* translators: %s: Error message */
|
24 |
-
Object(D.__)("Error: %s","google-site-kit"),a):a))}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return n.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--tag-manager"},!t&&n.createElement(_.b,null,n.createElement("div",{className:"googlesitekit-setup-module__logo"},n.createElement(C.a,{id:"tagmanager",width:"33",height:"33"})),n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(D._x)("Tag Manager","Service name","google-site-kit"))),this.renderErrorOrNotice(),a&&this.renderAccountDropdownForm(),!a&&this.renderSettingsInfo())}}],[{key:"createNewAccount",value:function(t){t.preventDefault(),e.open("https://tagmanager.google.com/#/admin/accounts/create","_blank")}}]),TagmanagerSetup}(_.a);F.propTypes={onSettingsPage:O.a.bool,finishSetup:O.a.func,isEditing:O.a.bool},F.defaultProps={onSettingsPage:!0,isEditing:!1},t.a=F}).call(this,a(16),a(10))},,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(18),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(0),f=a(12),v=a(32),y=function(t){function DateRangeSelector(e){var t;return i()(this,DateRangeSelector),(t=c()(this,d()(DateRangeSelector).call(this,e))).dateRangeHook="googlesitekit.dateRange",t.dateRangeHandlerHook="googlesitekit.dateRageHandler",t.dateRangeHookAddedHook="googlesitekit.dateRageHookAddedHandler",t.state={context:"Dashboard",dateValue:Object(f.c)(t.dateRangeHook,"last-28-days")},Object(f.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector",(function(e){t.setState({context:e}),Object(f.f)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector")})),t.handleSelection=t.handleSelection.bind(g()(t)),t}return m()(DateRangeSelector,t),o()(DateRangeSelector,[{key:"componentDidMount",value:function(){var e=this;Object(f.a)("hookAdded",this.dateRangeHookAddedHook,(function(t){e.dateRangeHook===t&&e.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){Object(f.f)("hookAdded",this.dateRangeHookAddedHook)}},{key:"handleSelection",value:function(e,t){var a=this.state.context,n=t.getAttribute("data-value");return Object(f.g)(this.dateRangeHook,this.dateRangeHandlerHook),Object(f.b)(this.dateRangeHook,this.dateRangeHandlerHook,(function(){return n})),Object(f.d)("googlesitekit.moduleDataReset"),Object(f.d)("googlesitekit.moduleLoaded",a),this.setState({dateValue:Object(f.c)(this.dateRangeHook,"last-28-days")}),!1}},{key:"render",value:function(){var t=this.state.dateValue,a={
|
25 |
-
/* translators: %s: Number of days to request data. */
|
26 |
-
"last-7-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",7,"google-site-kit"),7),
|
27 |
-
/* translators: %s: Number of days to request data. */
|
28 |
-
"last-14-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",14,"google-site-kit"),14),
|
29 |
-
/* translators: %s: Number of days to request data. */
|
30 |
-
"last-28-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",28,"google-site-kit"),28),
|
31 |
-
/* translators: %s: Number of days to request data. */
|
32 |
-
"last-90-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",90,"google-site-kit"),90)};return e.createElement(v.j,{enhanced:!0,className:"mdc-select--minimal",name:"time_period",label:"",onEnhancedChange:this.handleSelection,value:t},Object.keys(a).map((function(t){return e.createElement(v.i,{key:t,value:t},a[t])})))}}]),DateRangeSelector}(h.a);t.a=y}).call(this,a(10))},,,,,,,,,,,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(18),h=a.n(m),b=a(9),f=a.n(b),v=a(1),y=a(0),_=a(3),k=a(92),O=a(36),E=a(152),S=a(96),j=function(t){function UserMenu(e){var t;return s()(this,UserMenu),(t=u()(this,p()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(v.h)(),t.menuRef=Object(v.h)(),t}return f()(UserMenu,t),l()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,a){var n=e.googlesitekit.admin.proxyPermissionsURL;if("keydown"===a.type&&(13===a.keyCode||32===a.keyCode)||"click"===a.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(_.d)(),document.location=Object(_.m)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e.googlesitekit.admin,a=t.userData,i=a.email,r=void 0===i?"":i,o=a.picture,s=void 0===o?"":o,c=t.proxyPermissionsURL,l=this.state,d=l.dialogActive,u=l.menuOpen;return n.createElement(v.b,null,n.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},n.createElement(O.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:s?n.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},n.createElement("img",{className:"mdc-button__icon--image",src:s,alt:Object(y.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:u,ariaControls:"user-menu"},r),n.createElement(E.a,{ref:this.menuRef,menuOpen:u,menuItems:[Object(y.__)("Disconnect","google-site-kit")].concat(c?[Object(y.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),n.createElement(S.a,null,n.createElement(k.a,{dialogActive:d,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Disconnect","google-site-kit"),subtitle:Object(y.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(y.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(v.a);t.a=j}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(32),f=function(t){function Menu(e){var t;return i()(this,Menu),(t=c()(this,d()(Menu).call(this,e))).menuRef=Object(p.h)(),t}return g()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new b.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,a=t.menuOpen,n=t.menuItems,i=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!a,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(t,a){return e.createElement("li",{key:a,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,a),onKeyDown:i.bind(null,a)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(p.a);f.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=f}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function ErrorNotification(){return i()(this,ErrorNotification),c()(this,d()(ErrorNotification).apply(this,arguments))}return g()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(a(1).a);t.a=Object(p.a)("googlesitekit.ErrorNotification")(m)},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(26),y=function(t){function LayoutHeader(){return i()(this,LayoutHeader),c()(this,d()(LayoutHeader).apply(this,arguments))}return g()(LayoutHeader,t),o()(LayoutHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.ctaLabel,i=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":i,"mdc-layout-grid__cell--span-12-desktop":!i,"mdc-layout-grid__cell--span-8-tablet":!i})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},a)),i&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(v.a,{href:i,external:!0,inherit:!0},n)))))}}]),LayoutHeader}(p.a);y.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},y.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(59),f=function(t){function LayoutFooter(){return i()(this,LayoutFooter),c()(this,d()(LayoutFooter).apply(this,arguments))}return g()(LayoutFooter,t),o()(LayoutFooter,[{key:"render",value:function(){var t=this.props,a=t.ctaLabel,n=t.ctaLink,i=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&a&&e.createElement(b.a,{className:"googlesitekit-data-block__source",name:a,href:n,external:!0}),i))))}}]),LayoutFooter}(p.a);f.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=f}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(18),m=a.n(p),h=a(9),b=a.n(h),f=a(1),v=a(15),y=a.n(v),_=a(65),k=a(0),O=a(157),E=a(159),S=a(93),j=a(160),D=a(60),w=a(49),C=a(41),A=a(113),N=a(53),T=a(78),x=a(3),P=a(75),I=a(76),L=a(72),R=a(24),M=Object(_.a)("googlesitekit.AdSenseDashboardZeroData")((function(){return null})),W=function(t){function AdSenseDashboardWidget(e){var t;return o()(this,AdSenseDashboardWidget),(t=d()(this,g()(AdSenseDashboardWidget).call(this,e))).state={receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0,zeroData:!1},t.handleDataError=t.handleDataError.bind(m()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(m()(t)),t.handleZeroData=t.handleZeroData.bind(m()(t)),t}return b()(AdSenseDashboardWidget,t),c()(AdSenseDashboardWidget,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(N.a)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleZeroData",value:function(){this.setState({zeroData:!0,loading:!1})}},{key:"render",value:function(){var t=this,a=Object(x.j)(),n=this.state,i=n.receivingData,r=n.error,o=n.loading,s=n.isAdSenseConnected,c=n.zeroData,l=a.adsense.homepage,d=o||!i||c?"googlesitekit-nodata":"";return e.createElement(f.b,null,e.createElement(I.a,null),e.createElement("div",{className:d},e.createElement(S.a,{module:"adsense"})),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},!r&&a.adsense.setupComplete?e.createElement(L.a,{title:Object(k._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"connected",statusText:Object(k.__)("AdSense is connected","google-site-kit")}):e.createElement(L.a,{title:Object(k._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"not-connected",statusText:Object(k.__)("AdSense is not connected","google-site-kit")}),o&&e.createElement(C.a,null)),c&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(R.a,{fill:!0},e.createElement(M,null))),!i&&(r?Object(w.a)(Object(k._x)("AdSense","Service name","google-site-kit"),r,!0,!0,!0):Object(D.a)(Object(k._x)("AdSense","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",d)},e.createElement(T.a,{slug:"adsense",context:"module-dashboard"}),e.createElement(R.a,{header:!0,title:Object(k.__)("Estimated earnings","google-site-kit"),headerCtaLabel:Object(k.__)("Advanced Settings","google-site-kit"),headerCtaLink:l},e.createElement(O.a,{handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",d)},e.createElement(R.a,{header:!0,title:Object(k.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(k.__)("Advanced Settings","google-site-kit"),headerCtaLink:l},e.createElement(E.a,{handleDataError:function(e){e||t.handleZeroData()}}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",d)},e.createElement(j.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(P.a,null))))),!s&&e.createElement(A.a,null))}}]),AdSenseDashboardWidget}(f.a);t.a=W}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(3),b=a(30),f=a(29),v=a(22),y=a(13),_=a(53),k=function(t){function AdSenseEstimateEarningsWidget(e){var t;return i()(this,AdSenseEstimateEarningsWidget),(t=c()(this,d()(AdSenseEstimateEarningsWidget).call(this,e))).state={refetch:!1,today:!1,yesterday:!1,sevenDays:!1,month:!1,twentyEightDays:!1,sameDayLastWeek:!1,prev7Days:!1,monthLastYear:!1,prev28Days:!1,error:!1,message:""},t}return g()(AdSenseEstimateEarningsWidget,t),o()(AdSenseEstimateEarningsWidget,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.today,a=e.yesterday,n=e.sevenDays,i=e.month,r=e.twentyEightDays,o=e.sameDayLastWeek,s=e.prev7Days,c=e.monthLastYear,l=e.prev28Days;if(!(t&&a&&n&&i&&r&&o&&s&&c&&l))return null;var d=t.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),u=!!d&&d.currency,g=t.totals?[{className:"googlesitekit-data-block--today",title:Object(m.__)("Today so far","google-site-kit"),datapoint:Object(h.s)(t.totals[0],u)},{className:"googlesitekit-data-block--yesterday",title:Object(m.__)("Yesterday","google-site-kit"),datapoint:Object(h.s)(a.totals[0],u),change:o.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--7days",title:Object(m.__)("Last 7 days","google-site-kit"),datapoint:Object(h.s)(n.totals[0],u),change:s.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--month",title:Object(m.__)("This month","google-site-kit"),datapoint:Object(h.s)(i.totals[0],u),change:c.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--28days",title:Object(m.__)("Last 28 days","google-site-kit"),datapoint:Object(h.s)(r.totals[0],u),change:l.totals[0],changeDataUnit:"%"}]:[];return AdSenseEstimateEarningsWidget.renderLayout(g)}}],[{key:"renderLayout",value:function(t){return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},t.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(b.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))}))))}},{key:"renderPreviews",value:function(){for(var t=[],a=0;5>a;a++)t.push(e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(f.a,{width:"100%",height:"104px"})));return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},t))}}]),AdSenseEstimateEarningsWidget}(p.a);t.a=Object(v.a)(k,[{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"yesterday"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.yesterday)return{yesterday:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"same-day-last-week"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sameDayLastWeek)return{sameDayLastWeek:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-7-days"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sevenDays)return{sevenDays:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-7-days"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev7Days)return{prev7Days:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.month)return{month:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month-last-year"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.monthLastYear)return{monthLastYear:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],k.renderPreviews(),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(0),b=a(34),f=function(t){function InvalidCredentialsWarning(){return r()(this,InvalidCredentialsWarning),l()(this,u()(InvalidCredentialsWarning).apply(this,arguments))}return p()(InvalidCredentialsWarning,t),s()(InvalidCredentialsWarning,[{key:"render",value:function(){return e.createElement(b.a,{id:"notification-id",title:Object(h.__)("Security Token Error","google-site-kit"),description:Object(h.__)("We’re unable to retrieve your data because your security token is expired or revoked. Please ","google-site-kit"),learnMoreURL:n.googlesitekit.admin.connectURL,learnMoreLabel:Object(h.__)("reauthenticate your account","google-site-kit"),format:"small",type:"win-error"})}}]),InvalidCredentialsWarning}(m.a);t.a=f}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(11),b=a(3),f=a(13),v=a(30),y=a(29),_=a(53),k=a(22),O=function(t){function AdSensePerformanceWidget(e){var t;return i()(this,AdSensePerformanceWidget),(t=c()(this,d()(AdSensePerformanceWidget).call(this,e))).state={twentyEightDays:!1,prev28Days:!1},t}return g()(AdSensePerformanceWidget,t),o()(AdSensePerformanceWidget,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.twentyEightDays,n=t.prev28Days,i=a.totals?[{className:"googlesitekit-data-block--page-rpm",title:Object(m.__)("Page RPM","google-site-kit"),datapoint:Object(b.s)(a.totals[1]),change:Object(h.isUndefined)(n.totals)?0:n.totals[1],changeDataUnit:"%"},{className:"googlesitekit-data-block--impression",title:Object(m.__)("Impressions","google-site-kit"),datapoint:Object(b.s)(a.totals[2]),change:Object(h.isUndefined)(n.totals)?0:n.totals[2],changeDataUnit:"%"}]:[];return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},i.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(v.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))}))))}}]),AdSensePerformanceWidget}(p.a);t.a=Object(k.a)(O,[{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(b.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(b.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],e.createElement(y.a,{width:"100%",height:"250px"}),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function DashboardAdSenseTopPages(){return i()(this,DashboardAdSenseTopPages),c()(this,d()(DashboardAdSenseTopPages).apply(this,arguments))}return g()(DashboardAdSenseTopPages,e),o()(DashboardAdSenseTopPages,[{key:"render",value:function(){return null}}]),DashboardAdSenseTopPages}(a(1).a);t.a=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTable")(m)},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(48),b=a(162),f=a(163),v=a(78),y=function(t){function DashboardEarnings(){return i()(this,DashboardEarnings),c()(this,d()(DashboardEarnings).apply(this,arguments))}return g()(DashboardEarnings,t),o()(DashboardEarnings,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(h.a,{title:Object(m.__)("Earnings","google-site-kit"),description:Object(m.__)("How much you’re earning from your content through AdSense.","google-site-kit")}),e.createElement(v.a,{slug:"adsense",context:"module-sitekit-dashboard"})),e.createElement(f.a,null),e.createElement(b.a,null))}}]),DashboardEarnings}(p.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function DashboardAdSenseTopEarningPagesSmall(){return i()(this,DashboardAdSenseTopEarningPagesSmall),c()(this,d()(DashboardAdSenseTopEarningPagesSmall).apply(this,arguments))}return g()(DashboardAdSenseTopEarningPagesSmall,e),o()(DashboardAdSenseTopEarningPagesSmall,[{key:"render",value:function(){return null}}]),DashboardAdSenseTopEarningPagesSmall}(a(1).a);t.a=Object(p.a)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall")(m)},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(53),b=a(24),f=a(22),v=a(13),y=a(29),_=a(3),k=a(30),O=a(57),E=function(t){function AdSenseDashboardMainSummary(e){var t;return i()(this,AdSenseDashboardMainSummary),(t=c()(this,d()(AdSenseDashboardMainSummary).call(this,e))).state={today:!1,period:!1,daily:!1},t}return g()(AdSenseDashboardMainSummary,t),o()(AdSenseDashboardMainSummary,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.today,n=t.period,i=t.daily;if(!(a&&n&&i&&n.totals))return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement(y.a,{width:"100%",height:"276px",padding:!0})));var r=Object(h.f)(i.rows),o=Object(_.m)("googlesitekit-module-adsense",{}),s=n.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),c=!!s&&s.currency;return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-rpm",title:Object(m.__)("RPM","google-site-kit"),datapoint:Object(_.s)(n.totals[1],c),source:{name:Object(m._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:i&&e.createElement(O.a,{data:Object(_.f)(r.dataMap,2),change:1,loadSmall:!1}),context:"compact"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-earnings",title:Object(m.__)("Total Earnings","google-site-kit"),datapoint:Object(_.s)(n.totals[0],c),source:{name:Object(m._x)("AdSense","Service name","google-site-kit"),link:o},change:a.totals[0],changeDataUnit:"$",sparkline:i&&e.createElement(O.a,{data:Object(_.f)(r.dataMap,1),change:1,loadSmall:!1}),context:"compact"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-impressions",title:Object(m.__)("Ad Impressions","google-site-kit"),datapoint:Object(_.s)(n.totals[2]),source:{name:Object(m._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:i&&e.createElement(O.a,{data:Object(_.f)(r.dataMap,3),change:1,loadSmall:!1}),context:"compact"})))))))}}]),AdSenseDashboardMainSummary}(p.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(_.n)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:v.b,identifier:"adsense",datapoint:"earnings",data:{},priority:1,maxAge:Object(_.n)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.period)return{period:a}}},{type:v.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month",dimensions:["DATE"]},priority:1,maxAge:Object(_.n)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.daily)return{daily:a}}}],e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement(y.a,{width:"100%",height:"276px",padding:!0}))),{inGrid:!0,createGrid:!0},h.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(18),m=a.n(p),h=a(9),b=a.n(h),f=a(1),v=a(15),y=a.n(v),_=a(0),k=a(76),O=a(165),E=a(166),S=a(167),j=a(114),D=a(24),w=a(72),C=a(94),A=a(93),N=a(41),T=a(60),x=a(49),P=a(113),I=a(53),L=a(52),R=a(75),M=function(t){function AnalyticsDashboardWidget(e){var t;return o()(this,AnalyticsDashboardWidget),(t=d()(this,g()(AnalyticsDashboardWidget).call(this,e))).state={selectedStats:[0],receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0},t.handleStatSelection=t.handleStatSelection.bind(m()(t)),t.buildSeries=t.buildSeries.bind(m()(t)),t.handleDataError=t.handleDataError.bind(m()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(m()(t)),t}return b()(AnalyticsDashboardWidget,t),c()(AnalyticsDashboardWidget,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(I.a)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleStatSelection",value:function(e){this.setState({selectedStats:[e]})}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,loading:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return{0:{color:t[e],targetAxisIndex:0},1:{color:t[e],targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}}},{key:"render",value:function(){var t=this.state,a=t.selectedStats,n=t.error,i=t.receivingData,r=t.loading,o=t.isAdSenseConnected,s=this.buildSeries(),c=!r&&i?"":"googlesitekit-nodata",l=Object(L.a)();return e.createElement(f.b,null,e.createElement(k.a,null),e.createElement(A.a,{module:"analytics"}),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--analytics"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(w.a,{title:Object(_._x)("Analytics","Service name","google-site-kit"),icon:!0,iconWidth:"24",iconHeight:"26",iconID:"analytics",status:"connected",statusText:Object(_.__)("Analytics is connected","google-site-kit")}),r&&e.createElement(N.a,null)),!i&&(n?Object(x.a)(Object(_._x)("Analytics","Service name","google-site-kit"),n,!0,!0,!0):Object(T.a)(Object(_._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0
|
33 |
-
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Audience overview for the last %s","google-site-kit"),l),headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),headerCtaLink:"http://analytics.google.com"},e.createElement(S.a,{selectedStats:a,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),e.createElement(O.a,{selectedStats:a,series:s,vAxes:null,dateRangeSlug:Object(L.b)()}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0,footer:!0
|
34 |
-
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Top content over the last %s","google-site-kit"),l),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement(E.a,null))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0,footer:!0
|
35 |
-
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Top acquisition sources over the last %s","google-site-kit"),l),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(C.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(j.a,null)))))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(R.a,null))))),!r&&!o&&e.createElement(P.a,null))}}]),AnalyticsDashboardWidget}(f.a);t.a=M}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(0),v=a(3),y=a(61),_=a(22),k=a(13),O=a(19),E=a(29),S=function(t){function AnalyticsDashboardWidgetSiteStats(e){var t;return r()(this,AnalyticsDashboardWidgetSiteStats),(t=l()(this,u()(AnalyticsDashboardWidgetSiteStats).call(this,e))).setOptions=t.setOptions.bind(p()(t)),t}return h()(AnalyticsDashboardWidgetSiteStats,t),s()(AnalyticsDashboardWidgetSiteStats,[{key:"setOptions",value:function(){var t=this.props,a=t.series,n=t.vAxes,i={chart:{title:""===e.googlesitekit.pageTitle?"":Object(f.__)("Users Traffic Summary","google-site-kit")},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return i.series=a,i.vAxes=n,i}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,i=e.dateRangeSlug;if(!t||!t.length)return null;var r=i?i.match(/\d+/).map(Number)[0]:28,o=Object(O.c)(t,a,r);if(!o)return null;var s=this.setOptions();return n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement(y.a,{selectedStats:a,data:o,options:s}))))}}]),AnalyticsDashboardWidgetSiteStats}(b.a);t.a=Object(_.a)(S,[{type:k.b,identifier:"analytics",datapoint:"report",data:O.q,priority:1,maxAge:Object(v.n)("day"),context:"Single"}],n.createElement(E.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(37),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(15),f=a.n(b),v=a(11),y=a(2),_=a.n(y),k=a(0),O=a(3),E=a(22),S=a(13),j=a(33),D=a(46),w=a(19),C=function(t){function AnalyticsDashboardWidgetTopPagesTable(){return o()(this,AnalyticsDashboardWidgetTopPagesTable),d()(this,g()(AnalyticsDashboardWidgetTopPagesTable).apply(this,arguments))}return m()(AnalyticsDashboardWidgetTopPagesTable,t),c()(AnalyticsDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.colspan;if(!a||!a.length)return null;var r=[{title:Object(k.__)("Title","google-site-kit"),tooltip:Object(k.__)("Page Title","google-site-kit"),primary:!0},{title:Object(k.__)("Pageviews","google-site-kit"),tooltip:Object(k.__)("Pageviews","google-site-kit")},{title:Object(k.__)("Unique Pageviews","google-site-kit"),tooltip:Object(k.__)("Unique Pageviews","google-site-kit")},{title:Object(k.__)("Bounce Rate","google-site-kit"),tooltip:Object(k.__)("Bounce Rate","google-site-kit")}],o=[],s=Object(v.map)(a[0].data.rows,(function(t,a){var n=Number(t.metrics[0].values[2]),r=i()(t.dimensions,2),s=r[0],c=r[1];return o[a]=AnalyticsDashboardWidgetTopPagesTable.addDeepLink(c),[s,Object(O.q)(t.metrics[0].values[0]),Object(O.q)(t.metrics[0].values[1]),e.createElement(h.b,{key:"minichart-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")))]})),c={hideHeader:!1,chartsEnabled:!1,links:o},l=Object(j.b)(s,r,c);return e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-".concat(n))},e.createElement(j.a,null,l))}}],[{key:"addDeepLink",value:function(e){var t=Object(O.j)().analytics.settings,a=t.accountID,n=t.internalWebPropertyID,i=t.profileID;return a?"https://analytics.google.com/analytics/web/#/report/content-drilldown/a".concat(a,"w").concat(n,"p").concat(i,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:").concat(encodeURIComponent(e.replace(/\//g,"~2F"))):"https://analytics.google.com/analytics/web/"}}]),AnalyticsDashboardWidgetTopPagesTable}(h.a);C.propTypes={data:_.a.array,colspan:_.a.number},C.defaultProps={data:null,colspan:12},t.a=Object(E.a)(C,[{type:S.b,identifier:"analytics",datapoint:"report",data:Object(w.g)(),priority:1,maxAge:Object(O.n)("day"),context:["Single","Dashboard"]}],e.createElement(D.a,{padding:!0}),{createGrid:!0})}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(11),f=a(0),v=a(3),y=a(30),_=a(22),k=a(13),O=a(19),E=a(29),S=function(t){function AnalyticsDashboardWidgetOverview(e){var t;return i()(this,AnalyticsDashboardWidgetOverview),(t=c()(this,d()(AnalyticsDashboardWidgetOverview).call(this,e))).state={report:!1,directTotalUsers:!1},t}return g()(AnalyticsDashboardWidgetOverview,t),o()(AnalyticsDashboardWidgetOverview,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props.requestDataToState;this.setState(e)}},{key:"render",value:function(){var t=this.props,a=t.selectedStats,n=t.handleStatSelection,i=this.state,r=i.report,o=i.directTotalUsers;if(!r||!r.length||!o)return null;var s=Object(O.b)(r);if(!s)return null;var c=s.totalSessions,l=s.averageBounceRate,d=s.averageSessionDuration,u=s.totalUsersChange,g=s.totalSessionsChange,p=s.averageBounceRateChange,m=s.averageSessionDurationChange,h=[{className:"googlesitekit-data-block--users googlesitekit-data-block--button-1",title:Object(f.__)("Users","google-site-kit"),datapoint:Object(v.s)(o),change:u,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--sessions googlesitekit-data-block--button-2",title:Object(f.__)("Sessions","google-site-kit"),datapoint:Object(v.s)(c),change:g,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--bounce googlesitekit-data-block--button-3",title:Object(f.__)("Bounce Rate","google-site-kit"),datapoint:Number(l).toFixed(2),change:p,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n,datapointUnit:"%",invertChangeColor:!0},{className:"googlesitekit-data-block--duration googlesitekit-data-block--button-4",title:Object(f.__)("Session Duration","google-site-kit"),datapoint:Object(v.r)(d),change:m,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},h.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection,datapointUnit:t.datapointUnit,invertChangeColor:t.invertChangeColor}))}))))}}]),AnalyticsDashboardWidgetOverview}(p.a);S.propTypes={handleDataError:h.a.func.isRequired},t.a=Object(_.a)(S,[{type:k.b,identifier:"analytics",datapoint:"report",data:O.o,priority:1,maxAge:Object(v.n)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.report)return{report:a}}},{type:k.b,identifier:"analytics",datapoint:"report",data:O.s,priority:1,maxAge:Object(v.n)("day"),context:["Single"],toState:function(e,t){var a=t.data;if(!e.directTotalUsers)return{directTotalUsers:Object(b.get)(a,"[0].data.totals[0].values[0]")}}}],e.createElement(E.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},O.h,O.f)}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=["#178EC5","#54B23B","#EB5729","#ECED33","#34CBE3","#82E88E"]},function(e,t,a){"use strict";(function(e,n){var i=a(35),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(170),v=a(86),y=a(3),_=function(t){function AnalyticsAdminbarWidget(){return s()(this,AnalyticsAdminbarWidget),u()(this,p()(AnalyticsAdminbarWidget).apply(this,arguments))}return h()(AnalyticsAdminbarWidget,t),l()(AnalyticsAdminbarWidget,[{key:"render",value:function(){return"undefined"!==r()(e.googlesitekit.permaLink)&&""===e.googlesitekit.permaLink?null:Object(y.j)().analytics.active?n.createElement(f.a,null):n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(v.a,null)))}}]),AnalyticsAdminbarWidget}(b.a);t.a=_}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(14),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(0),v=a(3),y=a(30),_=a(22),k=a(13),O=a(19),E=a(29);function S(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var j=function(t){function AnalyticsAdminbarWidgetOverview(){return s()(this,AnalyticsAdminbarWidgetOverview),u()(this,p()(AnalyticsAdminbarWidgetOverview).apply(this,arguments))}return h()(AnalyticsAdminbarWidgetOverview,t),l()(AnalyticsAdminbarWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||t.error||!t.length)return null;var a=Object(O.b)(t);if(!a)return null;var n=a.totalUsers,i=a.totalSessions,r=a.totalUsersChange,o=a.totalSessionsChange;return e.createElement(b.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{className:"overview-total-users",title:Object(f.__)("Total Users","google-site-kit"),datapoint:Object(v.s)(n),change:r,changeDataUnit:"%"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{className:"overview-total-sessions",title:Object(f.__)("Total Sessions","google-site-kit"),datapoint:Object(v.s)(i),change:o,changeDataUnit:"%"})))}}]),AnalyticsAdminbarWidgetOverview}(b.a);t.a=Object(_.a)(j,[{type:k.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},O.o,{url:n.googlesitekit.permaLink}),priority:1,maxAge:Object(v.n)("day"),context:"Adminbar"}],e.createElement(b.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(E.a,{width:"auto",height:"59px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(E.a,{width:"auto",height:"59px"}))),{inGrid:!0},O.h,O.f)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(18),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(15),f=a.n(b),v=a(0),y=a(24),_=a(48),k=a(60),O=a(49),E=a(112),S=a(94),j=a(172),D=a(3),w=function(t){function AnalyticsAllTraffic(e){var t;return i()(this,AnalyticsAllTraffic),(t=c()(this,d()(AnalyticsAllTraffic).call(this,e))).state={receivingData:!0,error:!1},t.handleDataError=t.handleDataError.bind(g()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(g()(t)),t}return m()(AnalyticsAllTraffic,t),o()(AnalyticsAllTraffic,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0})}},{key:"getErrorDataComponent",value:function(){var e=Object(D.j)().analytics,t=e.active,a=e.setupComplete,n=this.state,i=n.error,r=n.receivingData;return t&&!a?Object(E.a)("analytics",!0,!0,!0):r?null:i?Object(O.a)(Object(v._x)("Analytics","Service name","google-site-kit"),i,!0,!0,!0):Object(k.a)(Object(v._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)}},{key:"render",value:function(){var t=this.state,a=t.error,n=t.receivingData,i=a||!n?"googlesitekit-nodata":"";return e.createElement(h.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(_.a,{description:Object(v.__)("How people found your site.","google-site-kit"),title:Object(v.__)("All Traffic","google-site-kit")})),this.getErrorDataComponent(),e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",i)},e.createElement(y.a,{className:"googlesitekit-dashboard-all-traffic"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(S.a,{source:!0,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(j.a,null)))))))}}]),AnalyticsAllTraffic}(h.a);t.a=w}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(11),h=a(0),b=a(3),f=a(22),v=a(13),y=a(33),_=a(115),k=a(46),O=a(19),E=function(t){function AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources(){return i()(this,AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources),c()(this,d()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources).apply(this,arguments))}return g()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources,t),o()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Source","google-site-kit"),primary:!0},{title:Object(h.__)("Percent","google-site-kit")}],n=t[0].data.totals[0].values[0],i=Object(m.map)(t[0].data.rows,(function(t,a){var i=t.metrics[0].values[0]/n*100;return!(1>i)&&[t.dimensions[0],e.createElement(p.b,{key:"minichart-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(i.toFixed(2),"%")," ",e.createElement(_.a,{percent:i.toFixed(1),index:a})))]})),r=Object(y.b)(i,a,{hideHeader:!0,chartsEnabled:!0});return e.createElement("div",{className:"googlesitekit-alltraffic-widget"},e.createElement(y.a,null,r))}}]),AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources}(p.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"analytics",datapoint:"report",data:O.r,priority:1,maxAge:Object(b.n)("day"),context:"Dashboard"}],e.createElement(k.a,{rows:3,rowHeight:50}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(14),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(11),v=a(0),y=a(3),_=a(19),k=a(30),O=a(22),E=a(13),S=a(57),j=a(40),D=a(29);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function C(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var A=function(t){function AnalyticsDashboardWidgetTopLevel(e){var t;return s()(this,AnalyticsDashboardWidgetTopLevel),(t=u()(this,p()(AnalyticsDashboardWidgetTopLevel).call(this,e))).state={accounts:!1,goals:!1,directTotalUsers:!1},t}return h()(AnalyticsDashboardWidgetTopLevel,t),l()(AnalyticsDashboardWidgetTopLevel,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.overview,i=t.extractedAnalytics,r=t.goals,o=t.directTotalUsers,s=e.googlesitekit.permaLink,c=Object(y.m)("googlesitekit-module-analytics",{}),l="",d="",u="",g="",p="";return a&&(l=a.totalUsersChange,d=a.goalCompletions,u=a.goalCompletionsChange,g=a.averageBounceRate,p=a.averageBounceRateChange),n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(k.a,{className:"overview-total-users",title:Object(v.__)("Unique Visitors from Search","google-site-kit"),datapoint:Object(y.s)(o),change:l,changeDataUnit:"%",source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.f)(i,1),change:l})})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},s&&n.createElement(k.a,{className:"overview-bounce-rate",title:Object(v.__)("Bounce Rate","google-site-kit"),datapoint:Number(g).toFixed(2),datapointUnit:Object(v.__)("%","google-site-kit"),change:p,changeDataUnit:"%",invertChangeColor:!0,source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.f)(i,2),change:p})}),!s&&r&&Object(f.isEmpty)(r.items)&&n.createElement(j.a,{title:Object(v.__)("Use goals to measure success.","google-site-kit"),description:Object(v.__)("Goals measure how well your site or app fulfills your target objectives.","google-site-kit"),ctaLink:"https://support.google.com/analytics/answer/1032415?hl=en#create_or_edit_goals",ctaLabel:Object(v.__)("Create a new goal","google-site-kit")}),!s&&r&&!Object(f.isEmpty)(r.items)&&n.createElement(k.a,{className:"overview-goals-completed",title:Object(v.__)("Goals Completed","google-site-kit"),datapoint:Object(y.s)(d),change:u,changeDataUnit:"%",source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.f)(i,3),change:u})}),!s&&!r&&n.createElement(D.a,{width:"100%",height:"202px"})))}}]),AnalyticsDashboardWidgetTopLevel}(b.a);t.a=Object(O.a)(A,[{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.o,{url:e.googlesitekit.permaLink}),priority:1,maxAge:Object(y.n)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.overview)return{overview:Object(_.b)(a)}}},{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.s,{url:e.googlesitekit.permaLink}),priority:1,maxAge:Object(y.n)("day"),context:["Dashboard"],toState:function(e,t){var a=t.data;if(!e.directTotalUsers)return{directTotalUsers:Object(f.get)(a,"[0].data.totals[0].values[0]")}}},{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.q,{url:e.googlesitekit.permaLink}),priority:1,maxAge:Object(y.n)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.extractedAnalytics)return{extractedAnalytics:Object(_.d)(a)}}},{type:E.b,identifier:"analytics",datapoint:"goals",data:{url:e.googlesitekit.permaLink},priority:1,maxAge:Object(y.n)("hour"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.goals)return{goals:a}}}],n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(D.a,{width:"100%",height:"202px"})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(D.a,{width:"100%",height:"202px"}))),{inGrid:!0},(function(e,t){return"report"===t&&Object(_.h)(e)}),_.f)}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(3),b=a(175),f=a(30),v=a(40),y=a(22),_=a(13),k=a(19),O=function(t){function WPAnalyticsDashboardWidgetOverview(){return i()(this,WPAnalyticsDashboardWidgetOverview),c()(this,d()(WPAnalyticsDashboardWidgetOverview).apply(this,arguments))}return g()(WPAnalyticsDashboardWidgetOverview,t),o()(WPAnalyticsDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(k.b)(t);if(!a)return null;var n=a.totalUsers,i=a.averageSessionDuration,r=a.totalUsersChange,o=a.averageSessionDurationChange;return e.createElement(p.b,null,t.length?e.createElement(p.b,null,e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-users",title:Object(m.__)("Total Unique Visitors","google-site-kit"),datapoint:Object(h.s)(n),change:r,changeDataUnit:"%"}),e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-average-session-duration",title:Object(m.__)("Avg. Time on Page","google-site-kit"),datapoint:Object(h.r)(i),change:o,changeDataUnit:"%"})):e.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},e.createElement(v.a,{title:Object(m.__)("Analytics Gathering Data","google-site-kit"),description:Object(m.__)("Analytics data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),WPAnalyticsDashboardWidgetOverview}(p.a);t.a=Object(y.a)(O,[{type:_.b,identifier:"analytics",datapoint:"report",data:k.o,priority:1,maxAge:Object(h.n)("day"),context:["WPDashboard"]}],e.createElement(b.a,{width:"23%",height:"94px",count:2}),{},k.h,k.f)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(2),h=a.n(m),b=a(29),f=function(t){function PreviewBlocks(){return i()(this,PreviewBlocks),c()(this,d()(PreviewBlocks).apply(this,arguments))}return g()(PreviewBlocks,t),o()(PreviewBlocks,[{key:"render",value:function(){for(var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.count,o=[],s=0;s++<r;)o.push(e.createElement(b.a,{width:a,height:n,shape:i,key:s}));return o}}]),PreviewBlocks}(p.a);f.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,count:h.a.number},f.defaultProps={width:"100px",height:"100px",shape:"square",count:1},t.a=f}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(48),b=a(24),f=a(114),v=a(94),y=function(t){function AnalyticsDashboardDetailsWidgetTopAcquisitionSources(){return i()(this,AnalyticsDashboardDetailsWidgetTopAcquisitionSources),c()(this,d()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources).apply(this,arguments))}return g()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources,t),o()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(h.a,{title:Object(m.__)("All Traffic","google-site-kit"),description:Object(m.__)("How people found your page.","google-site-kit")})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{className:"googlesitekit-analytics-acquisition-sources",footer:!0,headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(m.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(m._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(v.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(f.a,null)))))))}}]),AnalyticsDashboardDetailsWidgetTopAcquisitionSources}(p.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(37),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(11),f=a(0),v=a(3),y=a(22),_=a(13),k=a(33),O=a(46),E=a(19),S=function(t){function WPAnalyticsDashboardWidgetTopPagesTable(){return o()(this,WPAnalyticsDashboardWidgetTopPagesTable),d()(this,g()(WPAnalyticsDashboardWidgetTopPagesTable).apply(this,arguments))}return m()(WPAnalyticsDashboardWidgetTopPagesTable,t),c()(WPAnalyticsDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props.data;if(Object(E.h)(t))return null;var a=[],n=Object(b.map)(t[0].data.rows,(function(e,t){var n=i()(e.dimensions,2),r=n[0],o=n[1];return a[t]=o.startsWith("/")?o:"/"+o,[r,Object(v.q)(e.metrics[0].values[0])]})),r=[{title:Object(f.__)("Title","google-site-kit"),tooltip:Object(f.__)("Page Title","google-site-kit"),primary:!0},{title:Object(f.__)("Pageviews","google-site-kit"),tooltip:Object(f.__)("Pageviews","google-site-kit")}],o={chartsEnabled:!0,links:a,cap:5,showURLs:!0},s=Object(k.b)(n,r,o);return e.createElement("div",{className:"googlesitekit-search-console-widget"},e.createElement("h2",{className:"googlesitekit-search-console-widget__title"},Object(f.__)("Top content over the last 28 days","google-site-kit")),e.createElement(k.a,null,s))}}]),WPAnalyticsDashboardWidgetTopPagesTable}(h.a);t.a=Object(y.a)(S,[{type:_.b,identifier:"analytics",datapoint:"report",data:Object(E.g)(),priority:1,maxAge:Object(v.n)("day"),context:"WPDashboard"}],e.createElement(O.a,{rows:6}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(11),h=a(0),b=a(3),f=a(22),v=a(13),y=a(33),_=a(24),k=a(46),O=a(74),E=a(116),S=a(19),j=function(t){function AnalyticsAdSenseDashboardWidgetTopPagesTable(){return i()(this,AnalyticsAdSenseDashboardWidgetTopPagesTable),c()(this,d()(AnalyticsAdSenseDashboardWidgetTopPagesTable).apply(this,arguments))}return g()(AnalyticsAdSenseDashboardWidgetTopPagesTable,t),o()(AnalyticsAdSenseDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props.data;if(Object(S.h)(t))return null;var a=[{title:Object(h.__)("Page Title","google-site-kit"),tooltip:Object(h.__)("Page Title","google-site-kit"),primary:!0},{title:Object(h.__)("Earnings","google-site-kit"),tooltip:Object(h.__)("Earnings","google-site-kit")},{title:Object(h.__)("Page RPM","google-site-kit"),tooltip:Object(h.__)("Page RPM","google-site-kit")},{title:Object(h.__)("Impressions","google-site-kit"),tooltip:Object(h.__)("Impressions","google-site-kit")}],n=Object(m.map)(t[0].data.rows,(function(e){return[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2),Number(e.metrics[0].values[1]).toFixed(2),Object(b.q)(e.metrics[0].values[2])]})),i=Object(b.j)().analytics.settings,r=i.accountID,o=i.internalWebPropertyID,s=i.profileID,c="https://analytics.google.com/analytics/web/?pli=1#/report/content-pages/a".concat(r,"w").concat(o,"p").concat(s,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:~2F"),l={hideHeader:!1,chartsEnabled:!1,links:Object(m.map)(t[0].data.rows,(function(e){var t=e.dimensions[1].replace(/\//g,"~2F");return c+t}))},d=Object(y.b)(n,a,l);return AnalyticsAdSenseDashboardWidgetTopPagesTable.renderLayout(e.createElement(y.a,null,d))}}],[{key:"renderLayout",value:function(t){var a=Object(b.j)().adsense.accountURL;return e.createElement(_.a,{header:!0,title:Object(h.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(h.__)("Advanced Settings","google-site-kit"),headerCtaLink:a},t)}}]),AnalyticsAdSenseDashboardWidgetTopPagesTable}(p.a);t.a=Object(f.a)(j,[{type:v.b,identifier:"analytics",datapoint:"report",data:S.a,priority:1,maxAge:Object(b.n)("day"),context:"Single"}],j.renderLayout(e.createElement(k.a,{padding:!0})),{createGrid:!0},(function(){return!1}),(function(t){return t.code&&t.message&&t.data&&t.data.status?"badRequest"===t.data.reason?j.renderLayout(Object(O.a)(e.createElement(E.a,null),!1,!1,!0)):t.message:!!t.error&&(400===t.error.code&&"INVALID_ARGUMENT"===t.error.status&&Object(b.j)().analytics.active?null:t.error.message?t.error.message:t.error.errors&&t.error.errors[0]&&t.error.errors[0].message?t.error.errors[0].message:Object(h.__)("Unidentified error","google-site-kit"))}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(37),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(9),m=a.n(p),h=a(1),b=a(11),f=a(0),v=a(3),y=a(19),_=a(22),k=a(13),O=a(33),E=a(46),S=a(24),j=function(t){function AnalyticsDashboardWidgetPopularPagesTable(){return o()(this,AnalyticsDashboardWidgetPopularPagesTable),d()(this,g()(AnalyticsDashboardWidgetPopularPagesTable).apply(this,arguments))}return m()(AnalyticsDashboardWidgetPopularPagesTable,t),c()(AnalyticsDashboardWidgetPopularPagesTable,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(f.__)("Most popular content","google-site-kit"),primary:!0},{title:Object(f.__)("Views","google-site-kit")}],n=[],r=Object(b.map)(t[0].data.rows,(function(e,t){var a=i()(e.dimensions,2),r=a[0],o=a[1];return n[t]=o.startsWith("/")?o:"/"+o,[r,Object(v.q)(e.metrics[0].values[0])]})),o={hideHeader:!1,chartsEnabled:!1,links:n,showURLs:!0},s=Object(O.b)(r,a,o);return AnalyticsDashboardWidgetPopularPagesTable.renderLayout(e.createElement(O.a,null,s))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(S.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(f._x)("Analytics","Service name","google-site-kit"),footerCtaLink:Object(v.j)().analytics.homepage,fill:!0},t))}}]),AnalyticsDashboardWidgetPopularPagesTable}(h.a);t.a=Object(_.a)(j,[{type:k.b,identifier:"analytics",datapoint:"report",data:Object(y.g)(),priority:1,maxAge:Object(v.n)("day"),context:["Single","Dashboard"]}],j.renderLayout(e.createElement(E.a,{padding:!0})),{inGrid:!0,createGrid:!0},y.h)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(11),h=a(0),b=a(3),f=a(22),v=a(13),y=a(33),_=a(46),k=a(24),O=a(116),E=a(19),S=function(t){function AdSenseDashboardWidgetTopPagesTableSmall(){return i()(this,AdSenseDashboardWidgetTopPagesTableSmall),c()(this,d()(AdSenseDashboardWidgetTopPagesTableSmall).apply(this,arguments))}return g()(AdSenseDashboardWidgetTopPagesTableSmall,t),o()(AdSenseDashboardWidgetTopPagesTableSmall,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Top Earning Pages","google-site-kit"),tooltip:Object(h.__)("Top Earning Pages","google-site-kit"),primary:!0},{title:Object(h.__)("Revenue","google-site-kit"),tooltip:Object(h.__)("Revenue","google-site-kit")}],n=[],i=Object(m.map)(t[0].data.rows,(function(e,t){return n[t]=e.dimensions[1],[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2)]})),r={hideHeader:!1,chartsEnabled:!1,cap:5,links:n},o=Object(y.b)(i,a,r);return AdSenseDashboardWidgetTopPagesTableSmall.renderLayout(e.createElement(y.a,null,o))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-top-earnings-pages",footer:!0,footerCtaLabel:Object(h._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"http://analytics.google.com",fill:!0},t))}}]),AdSenseDashboardWidgetTopPagesTableSmall}(p.a);t.a=Object(f.a)(S,[{type:v.b,identifier:"analytics",datapoint:"report",data:E.a,priority:1,maxAge:Object(b.n)("day"),context:"Dashboard"}],S.renderLayout(e.createElement(_.a,{rows:5,padding:!0})),{inGrid:!0,createGrid:!0},E.h,(function(t){if(t.code&&t.message&&t.data&&t.data.status)return"badRequest"===t.data.reason?e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-top-earnings-pages",fill:!0},e.createElement(O.a,null))):t.message;if(t&&t.errors){var a=Object.values(t.errors);if(a[0]&&a[0][0])return a[0][0]}return!1}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(0),b=a(24),f=a(48),v=a(182),y=function(t){function DashboardSpeed(){return r()(this,DashboardSpeed),l()(this,u()(DashboardSpeed).apply(this,arguments))}return p()(DashboardSpeed,t),s()(DashboardSpeed,[{key:"render",value:function(){var t=e.googlesitekit.permaLink?Object(h.__)("How fast this page is.","google-site-kit"):Object(h.__)("How fast your home page is.","google-site-kit");return n.createElement(m.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(f.a,{title:Object(h.__)("Speed","google-site-kit"),description:t})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(b.a,{className:"googlesitekit-pagespeed-report"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement(v.a,null))))))}}]),DashboardSpeed}(m.a);t.a=y}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function DashboardSpeedInner(){return i()(this,DashboardSpeedInner),c()(this,d()(DashboardSpeedInner).apply(this,arguments))}return g()(DashboardSpeedInner,e),o()(DashboardSpeedInner,[{key:"render",value:function(){return null}}]),DashboardSpeedInner}(a(1).a);t.a=Object(p.a)("googlesitekit.DashboardSpeed")(m)},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(0),v=a(136),y=a(80),_=a(59),k=a(41),O=a(49),E=function(t){function PageSpeedInsightsDashboardWidgetHomepageSpeed(e){var t;return r()(this,PageSpeedInsightsDashboardWidgetHomepageSpeed),(t=l()(this,u()(PageSpeedInsightsDashboardWidgetHomepageSpeed).call(this,e))).state={loading:!0,error:!1},t.handleDataLoaded=t.handleDataLoaded.bind(p()(t)),t.handleDataError=t.handleDataError.bind(p()(t)),t}return h()(PageSpeedInsightsDashboardWidgetHomepageSpeed,t),s()(PageSpeedInsightsDashboardWidgetHomepageSpeed,[{key:"handleDataLoaded",value:function(){this.setState({loading:!1})}},{key:"handleDataError",value:function(e){this.setState({error:e})}},{key:"render",value:function(){var t=this.state,a=t.loading,i=t.error,r={name:Object(f._x)("PageSpeed Insights","Service name","google-site-kit"),link:Object(f.sprintf)("https://developers.google.com/speed/pagespeed/insights/?url=%s",e.googlesitekit.permaLink||e.googlesitekit.admin.siteURL)};return i?n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},Object(O.a)(Object(f._x)("PageSpeed Insights","Service name","google-site-kit"),i,!0,!0,!1)):n.createElement(b.b,null,a&&n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement("div",{className:"googlesitekit-pagespeed-report__loading"},n.createElement(k.a,null),n.createElement("p",null,Object(f.__)("PageSpeed Insights is preparing data…","google-site-kit")))),n.createElement(v.b,{handleDataLoaded:this.handleDataLoaded,handleDataError:this.handleDataError,title:Object(f.__)("Mobile","google-site-kit")}),n.createElement(v.a,{title:Object(f.__)("Desktop","google-site-kit")}),!a&&n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(_.a,{name:r.name,href:r.link,external:!0})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right-tablet "},n.createElement(y.a,null))))}}]),PageSpeedInsightsDashboardWidgetHomepageSpeed}(b.a);t.a=E}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=(a(1),a(0)),s=a(3),c=a(40),l=a(13),d=a(77);t.a=function PageSpeedInsightsCTA(){var t=Object(s.j)()["pagespeed-insights"],a=t.active,i=t.setupComplete;if(!e.googlesitekit.permissions.canManageOptions&&!i)return null;return n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(c.a,{title:!i&&a?Object(o.__)("Complete PageSpeed Insights activation.","google-site-kit"):Object(o.__)("Activate PageSpeed Insights.","google-site-kit"),description:Object(o.__)("Google PageSpeed Insights gives you metrics about performance, accessibility, SEO and PWA.","google-site-kit"),ctaLink:"#",ctaLabel:!i&&a?Object(o.__)("Complete activation","google-site-kit"):Object(o.__)("Activate PageSpeed Insights","google-site-kit"),onClick:function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(Object(s.b)(l.c,"pagespeed-insights",!0));case 3:e.location=Object(s.l)("pagespeed-insights"),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),Object(s.u)(d.a,{id:"pagespeed-insights-setup-error",title:Object(o.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"});case 9:case"end":return t.stop()}}),null,null,[[0,6]])}}))}}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(14),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),d=a.n(l),u=a(8),g=a.n(u),p=a(18),m=a.n(p),h=a(9),b=a.n(h),f=a(1),v=a(15),y=a.n(v),_=a(0),k=a(76),O=a(186),E=a(117),S=a(187),j=a(72),D=a(24),w=a(93),C=a(41),A=a(60),N=a(49),T=a(52),x=a(75),P=a(3);function I(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var L=function(t){function GoogleSitekitSearchConsoleDashboardWidget(e){var t;return o()(this,GoogleSitekitSearchConsoleDashboardWidget),(t=d()(this,g()(GoogleSitekitSearchConsoleDashboardWidget).call(this,e))).state={selectedStats:[0,1],receivingData:!0,error:!1,loading:!0},t.handleStatSelection=t.handleStatSelection.bind(m()(t)),t.buildSeries=t.buildSeries.bind(m()(t)),t.buildVAxes=t.buildVAxes.bind(m()(t)),t.handleDataError=t.handleDataError.bind(m()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(m()(t)),t}return b()(GoogleSitekitSearchConsoleDashboardWidget,t),c()(GoogleSitekitSearchConsoleDashboardWidget,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleStatSelection",value:function(e){var t=this.state.selectedStats,a=t.slice();t.includes(e)?a=t.filter((function(t){return e!==t})):a.push(e),0!==a.length&&this.setState({selectedStats:a})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return e.map((function(e,a){return{color:t[e],targetAxisIndex:a}}))}},{key:"buildVAxes",value:function(){var e=this.state.selectedStats,t={0:Object(_.__)("Clicks","google-site-kit"),1:Object(_.__)("Impressions","google-site-kit"),2:Object(_.__)("Average CTR","google-site-kit"),3:Object(_.__)("Average Position","google-site-kit")};return e.map((function(e){var a={};return 3===e&&(a.direction=-1),function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({title:t[e]},a)}))}},{key:"render",value:function(){var t=this.state,a=t.selectedStats,n=t.receivingData,i=t.error,r=t.loading,o=this.buildSeries(),s=this.buildVAxes(),c=!r&&n?"":"googlesitekit-nodata",l=Object(T.a)(),d=Object(_.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(P.j)()["search-console"].settings.propertyID);return e.createElement(f.b,null,e.createElement(k.a,null),e.createElement(w.a,{module:"search-console"}),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--search-console"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(j.a,{title:Object(_._x)("Search Console","Service name","google-site-kit"),icon:!0,iconWidth:"23",iconHeight:"21",iconID:"search-console",status:"connected",statusText:Object(_.__)("Search Console is connected","google-site-kit")}),r&&e.createElement(C.a,null)),!n&&(i?Object(N.a)(Object(_._x)("Search Console","Service name","google-site-kit"),i,!0,!0,!0):Object(A.a)(Object(_._x)("Search Console","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0
|
36 |
-
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Overview for the last %s","google-site-kit"),l),headerCtaLabel:Object(_.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:d},e.createElement(S.a,{selectedStats:a,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),e.createElement(O.a,{selectedStats:a,series:o,vAxes:s}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a
|
37 |
-
/* translators: %s: date range */,{title:Object(_.sprintf)(Object(_.__)("Top search queries over the last %s","google-site-kit"),l),header:!0,footer:!0,headerCtaLabel:Object(_.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:d,footerCtaLabel:Object(_._x)("Search Console","Service name","google-site-kit"),footerCtaLink:d},e.createElement(E.a,null))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(x.a,null))))))}}]),GoogleSitekitSearchConsoleDashboardWidget}(f.a);t.a=L}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(0),v=a(3),y=a(22),_=a(13),k=a(61),O=a(29),E=a(47),S=function(t){function SearchConsoleDashboardWidgetSiteStats(e){var t;return r()(this,SearchConsoleDashboardWidgetSiteStats),(t=l()(this,u()(SearchConsoleDashboardWidgetSiteStats).call(this,e))).setOptions=t.setOptions.bind(p()(t)),t}return h()(SearchConsoleDashboardWidgetSiteStats,t),s()(SearchConsoleDashboardWidgetSiteStats,[{key:"setOptions",value:function(){var t=this.props,a=t.selectedStats,n=t.series,i=t.vAxes,r=e.googlesitekit.pageTitle,o=Object(f.__)("Search Traffic Summary","google-site-kit");r&&r.length&&(
|
38 |
-
/* translators: %s: page title */
|
39 |
-
o=Object(f.sprintf)(Object(f.__)("Search Traffic Summary for %s","google-site-kit"),Object(v.e)(r)));var s={chart:{title:o},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return s.series=n,s.vAxes=i,3<=a.length&&(s.vAxis.textPosition="none",s.vAxis.gridlines.color="#fff",s.vAxis.minorGridlines.color="#fff",s.chartArea.width="98%"),s}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats;if(!t||!t.length)return null;var i=this.setOptions(),r=Object(E.a)(t);return n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement(k.a,{selectedStats:a,data:r.dataMap,options:i,singleStat:!1}))))}}]),SearchConsoleDashboardWidgetSiteStats}(b.a);t.a=Object(y.a)(S,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(v.n)("day"),context:"Single"}],n.createElement(O.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(3),b=a(30),f=a(22),v=a(13),y=a(29),_=a(47),k=a(2),O=a.n(k),E=function(t){function SearchConsoleDashboardWidgetOverview(){return i()(this,SearchConsoleDashboardWidgetOverview),c()(this,d()(SearchConsoleDashboardWidgetOverview).apply(this,arguments))}return g()(SearchConsoleDashboardWidgetOverview,t),o()(SearchConsoleDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.selectedStats,i=t.handleStatSelection;if(!a||!a.length)return null;var r=Object(_.a)(a),o=r.totalClicks,s=r.totalImpressions,c=r.averageCTR,l=r.averagePosition,d=r.totalClicksChange,u=r.totalImpressionsChange,g=r.averageCTRChange,h=r.averagePositionChange,f=[{className:"googlesitekit-data-block--clicks googlesitekit-data-block--button-1",title:Object(m.__)("Total Clicks","google-site-kit"),datapoint:o,change:d,changeDataUnit:"%",context:"button",selected:n.includes(0),handleStatSelection:i},{className:"googlesitekit-data-block--impressions googlesitekit-data-block--button-2",title:Object(m.__)("Total Impressions","google-site-kit"),datapoint:s,change:u,changeDataUnit:"%",context:"button",selected:n.includes(1),handleStatSelection:i},{className:"googlesitekit-data-block--ctr googlesitekit-data-block--button-3",title:Object(m.__)("Average CTR","google-site-kit"),datapoint:c+"%",change:g,changeDataUnit:"%",context:"button",selected:n.includes(2),handleStatSelection:i},{className:"googlesitekit-data-block--position googlesitekit-data-block--button-4",title:Object(m.__)("Average Position","google-site-kit"),datapoint:l,change:h,changeDataUnit:"%",context:"button",selected:n.includes(3),handleStatSelection:i}];return e.createElement(p.b,null,e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},f.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))})))))}}]),SearchConsoleDashboardWidgetOverview}(p.a);E.propTypes={handleDataError:O.a.func.isRequired},t.a=Object(f.a)(E,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(h.n)("day"),context:["Single","Dashboard"]}],e.createElement(y.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(35),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(189),v=function(t){function GoogleSitekitSearchConsoleAdminbarWidget(){return s()(this,GoogleSitekitSearchConsoleAdminbarWidget),u()(this,p()(GoogleSitekitSearchConsoleAdminbarWidget).apply(this,arguments))}return h()(GoogleSitekitSearchConsoleAdminbarWidget,t),l()(GoogleSitekitSearchConsoleAdminbarWidget,[{key:"render",value:function(){return"undefined"!==r()(e.googlesitekit.permaLink)&&""===e.googlesitekit.permaLink?null:n.createElement(f.a,null)}}]),GoogleSitekitSearchConsoleAdminbarWidget}(b.a);t.a=v}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(0),b=a(3),f=a(30),v=a(22),y=a(13),_=a(47),k=a(29),O=function(t){function SearchConsoleAdminbarWidgetOverview(){return r()(this,SearchConsoleAdminbarWidgetOverview),l()(this,u()(SearchConsoleAdminbarWidgetOverview).apply(this,arguments))}return p()(SearchConsoleAdminbarWidgetOverview,t),s()(SearchConsoleAdminbarWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||t.error)return null;var a=Object(_.a)(t),n=a.totalClicks,i=a.totalImpressions,r=a.totalClicksChange,o=a.totalImpressionsChange;return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(f.a,{className:"overview-total-impressions",title:Object(h.__)("Total Impressions","google-site-kit"),datapoint:i,change:o,changeDataUnit:"%"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(f.a,{className:"overview-total-clicks",title:Object(h.__)("Total Clicks","google-site-kit"),datapoint:n,change:r,changeDataUnit:"%"})))}}]),SearchConsoleAdminbarWidgetOverview}(m.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n.googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(b.n)("day"),context:"Adminbar"}],e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"auto",height:"59px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"auto",height:"59px"}))),{inGrid:!0},_.b)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(191),h=function(t){function WPSearchConsoleDashboardWidget(){return i()(this,WPSearchConsoleDashboardWidget),c()(this,d()(WPSearchConsoleDashboardWidget).apply(this,arguments))}return g()(WPSearchConsoleDashboardWidget,t),o()(WPSearchConsoleDashboardWidget,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement(m.a,null))}}]),WPSearchConsoleDashboardWidget}(p.a);t.a=h}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(3),b=a(29),f=a(30),v=a(22),y=a(13),_=a(47),k=a(40),O=function(t){function WPSearchConsoleDashboardWidgetOverview(){return i()(this,WPSearchConsoleDashboardWidgetOverview),c()(this,d()(WPSearchConsoleDashboardWidgetOverview).apply(this,arguments))}return g()(WPSearchConsoleDashboardWidgetOverview,t),o()(WPSearchConsoleDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(_.a)(t),n=a.totalClicks,i=a.totalImpressions,r=a.totalClicksChange,o=a.totalImpressionsChange;return e.createElement(p.b,null,t.length?e.createElement(p.b,null,e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-impressions",title:Object(m.__)("Total Impressions","google-site-kit"),datapoint:i,change:o,changeDataUnit:"%"}),e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-clicks",title:Object(m.__)("Total Clicks","google-site-kit"),datapoint:n,change:r,changeDataUnit:"%"})):e.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},e.createElement(k.a,{title:Object(m.__)("Search Console Data Empty","google-site-kit"),description:Object(m.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),WPSearchConsoleDashboardWidgetOverview}(p.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(h.n)("day"),context:["WPDashboard"]}],e.createElement(b.a,{width:"23%",height:"94px",count:2}),{},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(15),b=a.n(h),f=a(0),v=a(3),y=a(24),_=a(48),k=a(86),O=a(118),E=function(t){function DashboardSearchFunnel(){return r()(this,DashboardSearchFunnel),l()(this,u()(DashboardSearchFunnel).apply(this,arguments))}return p()(DashboardSearchFunnel,t),s()(DashboardSearchFunnel,[{key:"render",value:function(){var t=Object(v.j)(),a=e.googlesitekit.permissions.canManageOptions,i=t.analytics.active||a?12:6;return n.createElement(m.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(_.a,{title:Object(f.__)("Search Funnel","google-site-kit"),description:Object(f.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit")})),n.createElement("div",{className:b()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-".concat(i))},n.createElement(y.a,{className:"googlesitekit-analytics-search-funnel"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement(O.a,null),!t.analytics.active&&n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(k.a,null)))))))}}]),DashboardSearchFunnel}(m.a);t.a=E}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(9),p=a.n(g),m=a(1),h=a(0),b=a(30),f=a(22),v=a(13),y=a(47),_=a(57),k=a(29),O=a(3),E=a(40),S=function(t){function SearchConsoleDashboardWidgetTopLevel(){return r()(this,SearchConsoleDashboardWidgetTopLevel),l()(this,u()(SearchConsoleDashboardWidgetTopLevel).apply(this,arguments))}return p()(SearchConsoleDashboardWidgetTopLevel,t),s()(SearchConsoleDashboardWidgetTopLevel,[{key:"render",value:function(){var t=this.props.data,a=t.error;if(a)return Object(O.x)("plugin_setup","search_console_error",a.message),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(E.a,{title:Object(h.__)("Something went wrong","google-site-kit"),description:a.message,error:!0}));if(!t)return null;if(!t.length)return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(E.a,{title:Object(h.__)("Search Console Data Empty","google-site-kit"),description:Object(h.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""}));var n=Object(O.m)("googlesitekit-module-search-console",{}),i=Object(y.a)(t),r=i.totalClicks,o=i.totalImpressions,s=i.totalClicksChange,c=i.totalImpressionsChange,l=i.dataMap;return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{className:"overview-total-impressions",title:Object(h.__)("Impressions","google-site-kit"),datapoint:o,change:c,changeDataUnit:"%",source:{name:Object(h._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:e.createElement(_.a,{data:Object(O.f)(l,2),change:c})})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{className:"overview-total-clicks",title:Object(h.__)("Clicks","google-site-kit"),datapoint:r,change:s,changeDataUnit:"%",source:{name:Object(h._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:e.createElement(_.a,{data:Object(O.f)(l,1),change:s})})))}}]),SearchConsoleDashboardWidgetTopLevel}(m.a);t.a=Object(f.a)(S,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n.googlesitekit.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(O.n)("day"),context:["Single","Dashboard"]}],e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"100%",height:"202px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"100%",height:"202px"}))),{inGrid:!0},y.b)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(24),b=a(118),f=a(3),v=a(86),y=a(48),_=function(t){function DashboardDetailsSearchFunnel(){return i()(this,DashboardDetailsSearchFunnel),c()(this,d()(DashboardDetailsSearchFunnel).apply(this,arguments))}return g()(DashboardDetailsSearchFunnel,t),o()(DashboardDetailsSearchFunnel,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(y.a,{description:Object(m.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),title:Object(m.__)("Search Funnel","google-site-kit")})),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e.createElement(h.a,{className:"googlesitekit-analytics-search-funnel"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement(b.a,null),!Object(f.j)().analytics.active&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(v.a,null)))))))}}]),DashboardDetailsSearchFunnel}(p.a);t.a=_}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(117),b=a(48),f=a(24),v=a(3),y=function(t){function DashboardDetailsWidgetKeywordsTable(){return i()(this,DashboardDetailsWidgetKeywordsTable),c()(this,d()(DashboardDetailsWidgetKeywordsTable).apply(this,arguments))}return g()(DashboardDetailsWidgetKeywordsTable,t),o()(DashboardDetailsWidgetKeywordsTable,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{title:Object(m.__)("Top Queries","google-site-kit"),description:Object(m.__)("What people searched for to find your page.","google-site-kit")})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(f.a,{footer:!0,footerCtaLabel:Object(m._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(m.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(v.j)()["search-console"].settings.propertyID)},e.createElement(h.a,null))))}}]),DashboardDetailsWidgetKeywordsTable}(p.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(11),h=a(0),b=a(3),f=a(22),v=a(13),y=a(33),_=a(46),k=a(24),O=a(47),E=function(t){function DashboardWidgetPopularKeywordsTable(){return i()(this,DashboardWidgetPopularKeywordsTable),c()(this,d()(DashboardWidgetPopularKeywordsTable).apply(this,arguments))}return g()(DashboardWidgetPopularKeywordsTable,t),o()(DashboardWidgetPopularKeywordsTable,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Top search queries for your site","google-site-kit"),tooltip:Object(h.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(h.__)("Clicks","google-site-kit"),tooltip:Object(h.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(h.__)("Impressions","google-site-kit"),tooltip:Object(h.__)("Counted each time your content appears in search results","google-site-kit")}],n=Object(b.j)()["search-console"].settings.propertyID,i=[],r=Object(m.map)(t,(function(e,t){var a=e.keys[0];return i[t]=Object(h.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%1$s&query=!%2$s&num_of_days=28",n,a),[a,Object(b.q)(e.clicks),Object(b.q)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(y.b)(r,a,o);return DashboardWidgetPopularKeywordsTable.renderLayout(e.createElement(y.a,null,s))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(h._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(h.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(b.j)()["search-console"].settings.propertyID),fill:!0},t))}}]),DashboardWidgetPopularKeywordsTable}(p.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"query",limit:10},priority:1,maxAge:Object(b.n)("day"),context:["Dashboard"]}],E.renderLayout(e.createElement(_.a,{padding:!0})),{inGrid:!0,createGrid:!0},O.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(0),h=a(198),b=a(48),f=function(t){function DashboardPopularity(){return i()(this,DashboardPopularity),c()(this,d()(DashboardPopularity).apply(this,arguments))}return g()(DashboardPopularity,t),o()(DashboardPopularity,[{key:"render",value:function(){return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{title:Object(m.__)("Popularity","google-site-kit"),description:Object(m.__)("Your most popular pages and how people found them from Search.","google-site-kit")})),e.createElement(h.a,null))}}]),DashboardPopularity}(p.a);t.a=f}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(65),m=function(e){function DashboardPopularityInner(){return i()(this,DashboardPopularityInner),c()(this,d()(DashboardPopularityInner).apply(this,arguments))}return g()(DashboardPopularityInner,e),o()(DashboardPopularityInner,[{key:"render",value:function(){return null}}]),DashboardPopularityInner}(a(1).a);t.a=Object(p.a)("googlesitekit.DashboardPopularity")(m)},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),d=a(7),u=a.n(d),g=a(8),p=a.n(g),m=a(18),h=a.n(m),b=a(9),f=a.n(b),v=a(1),y=a(11),_=a(207),k=a.n(_),O=a(0),E=a(3),S=a(13),j=a(36),D=a(24),w=function(t){function PostSearcher(e){var t;return s()(this,PostSearcher),(t=u()(this,p()(PostSearcher).call(this,e))).state={isSearching:!1,results:[],error:!1,message:""},t.postSearch=t.postSearch.bind(h()(t)),t.onClick=t.onClick.bind(h()(t)),t.onConfirm=t.onConfirm.bind(h()(t)),t}return f()(PostSearcher,t),l()(PostSearcher,[{key:"postSearch",value:function(e,t){var a;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t([Object(O.__)("Loading…","google-site-kit")]),n.prev=1,n.next=4,r.a.awrap(S.c.get(S.a,"search","post-search",{query:encodeURIComponent(e)}));case 4:0<(a=n.sent).length?t(Object(y.map)(a,(function(e){return e.post_title}))):t([Object(O.__)("No results found","google-site-kit")]),this.setState({isSearching:!0,results:a,error:!1,message:""}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(1),t([Object(O.__)("No results found","google-site-kit")]),this.setState({isSearching:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"getURLPathname",value:function(e){try{var t=new URL(e);return Object(y.trim)(t.pathname,"/")}catch(e){return!1}}},{key:"onConfirm",value:function(e){this.setState({selection:e})}},{key:"onClick",value:function(){var e=this.state,t=e.results,a=e.selection,n=Object(y.find)(t,(function(e){return e.post_title===a}));document.location=Object(E.m)("googlesitekit-dashboard",{id:n.id,permaLink:n.permalink,pageTitle:a})}},{key:"render",value:function(){var t=e.googlesitekit.modules,a=t.analytics&&t.analytics.active?"mdc-layout-grid__cell mdc-layout-grid__cell--span-12":"mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop";return n.createElement("div",{className:a},n.createElement(D.a,{title:Object(O.__)("Search for individual page or post information","google-site-kit"),header:!0},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement("div",{className:"googlesitekit-post-searcher"},n.createElement("label",{className:"googlesitekit-post-searcher__label",htmlFor:"autocomplete"},Object(O.__)("Title or URL","google-site-kit")),n.createElement(k.a,{id:"autocomplete",source:Object(y.debounce)(this.postSearch,200),minLength:2,onConfirm:this.onConfirm,showNoOptionsFound:!1}),n.createElement("div",{className:"googlesitekit-post-searcher__button-wrapper"},n.createElement(j.a,{onClick:this.onClick,className:"googlesitekit-post-searcher__button"},Object(O.__)("View Data","google-site-kit")))))))))}}]),PostSearcher}(v.a);t.a=w}).call(this,a(16),a(10))},,,,,,,,,,,function(e,t,a){"use strict";(function(e,t){a(1);var n=a(20),i=a(3),r=a(156),o=a(161),s=a(12),c="adsense";Object(s.b)("googlesitekit.SetupModuleShowLink","googlesitekit.adsenseSetupModuleShowLink",(function(t,a){return!("adsense"===a&&!e.googlesitekit.canAdsRun)&&t}));var l=Object(i.j)();if(l.adsense.active){var d=Object(n.a)(t.createElement(r.a,null)),u=Object(n.a)(t.createElement(o.a,null));if(l[c].setupComplete)Object(s.b)("googlesitekit.ModuleApp-".concat(c),"googlesitekit.ModuleApp",d),Object(s.b)("googlesitekit.DashboardModule","googlesitekit.DashboardEarningModule",u,50);else{var g=e.googlesitekit.admin,p=g.reAuth,m=g.currentScreen,h=m?m.id:null;p||"site-kit_page_googlesitekit-module-adsense"!==h||(e.location=Object(i.m)("googlesitekit-module-".concat(c),{reAuth:!0,slug:c})),Object(s.b)("googlesitekit.Connected-".concat(c),"googlesitekit.AdSenseModuleConnected",(function(e){var t=l[c].settings;return!(e||void 0===t||"graylisted"!==t.accountStatus&&"pending"!==t.accountStatus)||e}))}Object(s.b)("googlesitekit.ModulesNotificationsRequest","googlesitekit.adsenseNotifications",(function(e){return e.push({identifier:"adsense"}),e}))}}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,t){a(1);var n=a(12),i=a(3),r=a(20),o=a(164),s=a(169),c=a(171),l=a(173),d=a(174),u=a(176),g=a(177),p=a(178),m=a(179),h=a(180),b="analytics",f=Object(r.a)(e.createElement(s.a,null));Object(n.b)("googlesitekit.AdminbarModules","googlesitekit.Analytics",f,11);var v=Object(i.j)();if(!v[b].setupComplete){var y=t.googlesitekit.admin,_=y.reAuth,k=y.currentScreen,O=k?k.id:null;_||"site-kit_page_googlesitekit-module-analytics"!==O||(t.location=Object(i.m)("googlesitekit-module-".concat(b),{reAuth:!0,slug:b}))}if(v.analytics.active){var E=Object(r.a)(e.createElement(o.a,null)),S=Object(r.a)(e.createElement(c.a,null)),j=Object(r.a)(e.createElement(d.a,null)),D=Object(r.a)(e.createElement(g.a,null)),w=Object(r.a)(e.createElement(l.a,null)),C=Object(r.a)(e.createElement(u.a,null)),A=Object(r.a)(e.createElement(p.a,null)),N=Object(r.a)(e.createElement(m.a,null)),T=Object(r.a)(e.createElement(h.a,null));Object(n.b)("googlesitekit.DashboardModule","googlesitekit.Analytics",S,9),Object(n.b)("googlesitekit.DashboardSearchFunnel","googlesitekit.Analytics",w,11),Object(n.b)("googlesitekit.DashboardPopularity","googlesitekit.Analytics",N,20),Object(n.b)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall","googlesitekit.Analytics",T,20),Object(n.b)("googlesitekit.DashboardDetailsModule","googlesitekit.Analytics",C,20),Object(n.b)("googlesitekit.WPDashboardHeader","googlesitekit.Analytics",j),Object(n.b)("googlesitekit.WPDashboardModule","googlesitekit.Analytics",D),v[b].setupComplete&&Object(n.b)("googlesitekit.ModuleApp-"+b,"googlesitekit.Analytics",E),Object(n.b)("googlesitekit.AnalyticsAdSenseTopPagesTable","googlesitekit.Analytics",A,11),Object(n.b)("googlesitekit.showDateRangeSelector-".concat(b),"googlesitekit.analyticsShowDateRangeSelector",(function(){return!0}))}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){a(1);var t=a(12),n=a(20),i=a(181),r=a(183),o=a(184),s=a(3),c=Object(s.j)()["pagespeed-insights"],l=c.active,d=c.setupComplete;if(l&&d){var u=Object(n.a)(e.createElement(i.a,null)),g=Object(n.a)(e.createElement(r.a,null));Object(t.b)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",u,45),Object(t.b)("googlesitekit.DashboardDetailsModule","googlesitekit.PageSpeedInsights",u,45),Object(t.b)("googlesitekit.DashboardSpeed","googlesitekit.PageSpeedInsightsHomepageSpeed",g)}else{var p=Object(n.a)(e.createElement(o.a,null));Object(t.b)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",p,45)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var t=a(12),n=a(20),i=a(199),r=a(185),o=a(188),s=a(190),c=a(192),l=a(193),d=a(195),u=a(196),g=a(194),p=a(197),m="search-console",h=Object(n.a)(e.createElement(r.a,null)),b=Object(n.a)(e.createElement(o.a,null)),f=Object(n.a)(e.createElement(s.a,null)),v=Object(n.a)(e.createElement(c.a,null)),y=Object(n.a)(e.createElement(l.a,null)),_=Object(n.a)(e.createElement(g.a,null)),k=Object(n.a)(e.createElement(d.a,null)),O=Object(n.a)(e.createElement(u.a,null)),E=Object(n.a)(e.createElement(p.a,null)),S=Object(n.a)(e.createElement(i.a,null));Object(t.b)("googlesitekit.DashboardModule","googlesitekit.SearchConsole",v,11),Object(t.b)("googlesitekit.DashboardModule","googlesitekit.DashboardPopularityModule",E,40),Object(t.b)("googlesitekit.DashboardSearchFunnel","googlesitekit.SearchConsoleSearchFunnel",y),Object(t.b)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",_),Object(t.b)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",k,40),Object(t.b)("googlesitekit.DashboardPopularity","googlesitekit.SearchConsoleDashboardPopularity",O),Object(t.b)("googlesitekit.DashboardPopularity","googlesitekit.DashboardPPostSearcherModule",S,30),Object(t.b)("googlesitekit.WPDashboardHeader","googlesitekit.SearchConsole",f,11),Object(t.b)("googlesitekit.ModuleApp-"+m,"googlesitekit.ModuleApp",h),Object(t.b)("googlesitekit.showDateRangeSelector-".concat(m),"googlesitekit.searchConsoleShowDateRangeSelector",(function(){return!0})),Object(t.b)("googlesitekit.AdminbarModules","googlesitekit.SearchConsole",b)}).call(this,a(10))},,,,function(e,t,a){"use strict";a(210),a(211);var n=a(12),i=a(0),r=a(135),o=a(3),s="optimize";Object(o.j)().optimize.active&&(Object(n.b)("googlesitekit.ModuleSettingsDetails-".concat(s),"googlesitekit.OptimizeModuleSettingsDetails",Object(o.g)(r.a,{onSettingsPage:!0})),Object(n.b)("googlesitekit.ModuleSetup-".concat(s),"googlesitekit.OptimizeModuleSetupWizard",Object(o.g)(r.a,{onSettingsPage:!1})),Object(n.b)("googlesitekit.SetupWinNotification-".concat(s),"googlesitekit.OptimizeSetupWinNotification",(function(e){return e.description=Object(i.__)("To set up experiments and see the results, go to ","google-site-kit"),e.learnMore.label="Optimize",e.learnMore.url="https://optimize.withgoogle.com/",e})));a(212),a(213);var c=a(137);Object(o.j)().tagmanager.active&&(Object(n.b)("googlesitekit.ModuleSettingsDetails-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSettingsDetails",Object(o.g)(c.a,{onSettingsPage:!0})),Object(n.b)("googlesitekit.ModuleSetup-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSetupWizard",Object(o.g)(c.a,{onSettingsPage:!1})))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t),function(e,n){a.d(t,"GoogleSitekitAdminbar",(function(){return O})),a.d(t,"init",(function(){return E}));var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),d=a(8),u=a.n(d),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=(a(217),a(0)),v=a(3),y=a(26),_=a(563),k=a(129),O=function(t){function GoogleSitekitAdminbar(e){var t;return r()(this,GoogleSitekitAdminbar),(t=l()(this,u()(GoogleSitekitAdminbar).call(this,e))).handleMoreDetailsLink=t.handleMoreDetailsLink.bind(p()(t)),t}return h()(GoogleSitekitAdminbar,t),s()(GoogleSitekitAdminbar,[{key:"handleMoreDetailsLink",value:function(){var t=e.googlesitekit,a=t.permaLink,n=t.postID,i=t.postType,r=t.pageTitle,o=Object(v.m)("googlesitekit-dashboard",{permaLink:a,id:n,postType:i,pageTitle:r});Object(v.x)("admin_bar","post_details_click"),document.location=o}},{key:"render",value:function(){var t=e.googlesitekit,a=t.pageTitle,i=t.permaLink;return n.createElement(b.b,null,n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle "},n.createElement("div",{className:"googlesitekit-adminbar__subtitle"},Object(f.__)("Stats for","google-site-kit")),n.createElement("div",{className:"googlesitekit-adminbar__title"},a?Object(v.e)(a):i)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--align-middle "},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement(_.a,null))),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle "},n.createElement(y.a,{className:"googlesitekit-adminbar__link",href:"#",onClick:this.handleMoreDetailsLink},Object(f.__)("More details","google-site-kit"))))),n.createElement(y.a,{className:"googlesitekit-adminbar__link googlesitekit-adminbar__link--mobile",href:"#",onClick:this.handleMoreDetailsLink},Object(f.__)("More details","google-site-kit")))}}]),GoogleSitekitAdminbar}(b.a);function E(){var e=document.getElementById("js-googlesitekit-adminbar-modules");e&&(Object(v.o)(),Object(b.k)(n.createElement(k.a,{dataAPIContext:"Adminbar"},n.createElement(O,null)),e))}}.call(this,a(16),a(10))},,,,,,,,,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),d=a.n(l),u=a(9),g=a.n(u),p=a(1),m=a(65),h=function(t){function AdminbarModules(){return i()(this,AdminbarModules),c()(this,d()(AdminbarModules).apply(this,arguments))}return g()(AdminbarModules,t),o()(AdminbarModules,[{key:"render",value:function(){return e.createElement(p.b,null)}}]),AdminbarModules}(p.a);t.a=Object(m.a)("googlesitekit.AdminbarModules")(h)}).call(this,a(10))}]]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/assets/js/chunk-googlesitekit-adminbar-ea54613856d9a3d69f8a.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[1],[,function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"f",(function(){return d})),a.d(t,"g",(function(){return g})),a.d(t,"h",(function(){return m})),a.d(t,"b",(function(){return b})),a.d(t,"i",(function(){return v})),a.d(t,"j",(function(){return y})),a.d(t,"k",(function(){return E})),a.d(t,"c",(function(){return D})),a.d(t,"l",(function(){return A})),a.d(t,"m",(function(){return N})),a.d(t,"n",(function(){return P})),a.d(t,"o",(function(){return L})),a.d(t,"p",(function(){return I})),a.d(t,"q",(function(){return R})),a.d(t,"r",(function(){return M})),a.d(t,"s",(function(){return W}));var n=a(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._element||n,r=i.__experimentalCreateInterpolateElement,o=i.Children,s=i.cloneElement,c=i.Component,l=i.concatChildren,u=i.createContext,d=i.createElement,g=i.createPortal,m=i.createRef,p=i.findDOMNode,h=i.forwardRef,b=i.Fragment,f=i.isEmptyElement,v=i.isValidElement,y=i.lazy,_=i.memo,k=i.Platform,O=i.RawHTML,E=i.render,S=i.renderToString,j=i.StrictMode,D=i.Suspense,w=i.switchChildrenNodeName,C=i.unmountComponentAtNode,A=i.useCallback,N=i.useContext,x=i.useDebugValue,P=i.useEffect,T=i.useImperativeHandle,L=i.useLayoutEffect,I=i.useMemo,R=i.useReducer,M=i.useRef,W=i.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:r,Children:o,cloneElement:s,Component:c,concatChildren:l,createContext:u,createElement:d,createPortal:g,createRef:m,findDOMNode:p,forwardRef:h,Fragment:b,isEmptyElement:f,isValidElement:v,lazy:y,memo:_,Platform:k,RawHTML:O,render:E,renderToString:S,StrictMode:j,Suspense:D,switchChildrenNodeName:w,unmountComponentAtNode:C,useCallback:A,useContext:N,useDebugValue:x,useEffect:P,useImperativeHandle:T,useLayoutEffect:L,useMemo:I,useReducer:R,useRef:M,useState:W})}).call(this,a(16))},,function(e,t,a){"use strict";(function(e,n){a.d(t,"t",(function(){return w})),a.d(t,"r",(function(){return C})),a.d(t,"o",(function(){return N})),a.d(t,"s",(function(){return x})),a.d(t,"i",(function(){return P})),a.d(t,"c",(function(){return T})),a.d(t,"g",(function(){return L})),a.d(t,"k",(function(){return I})),a.d(t,"m",(function(){return R})),a.d(t,"n",(function(){return M})),a.d(t,"z",(function(){return W})),a.d(t,"A",(function(){return U})),a.d(t,"b",(function(){return q})),a.d(t,"x",(function(){return H})),a.d(t,"v",(function(){return F})),a.d(t,"f",(function(){return z})),a.d(t,"q",(function(){return G})),a.d(t,"j",(function(){return B}));var i=a(4),r=a.n(i),o=a(11),s=a.n(o),c=a(49),l=a.n(c),u=a(33),d=a.n(u),g=(a(1),a(12)),m=a(13),p=a(0),h=a(37),b=a(154),f=a(30);a.d(t,"a",(function(){return f.a}));var v=a(50);a.d(t,"y",(function(){return v.c}));var y=a(21),_=a(57);a.d(t,"u",(function(){return _.a}));var k=a(56);a.d(t,"w",(function(){return k.a}));var O=a(54);a.d(t,"d",(function(){return O.b})),a.d(t,"l",(function(){return O.c}));a(40);var E=a(60);function S(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function j(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(a,!0).forEach((function(t){s()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}a.d(t,"p",(function(){return E.a})),a.d(t,"e",(function(){return y.a})),a.d(t,"h",(function(){return y.b}));var D=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(g.isFinite)(e)?e:Number(e),Object(g.isFinite)(e)||(console.warn("Invalid number",e,d()(e)),e=0),t)return C(e,{style:"currency",currency:t});var a={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
|
2 |
+
Object(p.__)("%sM","google-site-kit"),C(D(e),e%10==0?{}:a)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
3 |
+
Object(p.__)("%sK","google-site-kit"),C(D(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
4 |
+
Object(p.__)("%sK","google-site-kit"),C(D(e),e%10==0?{}:a)):e.toString()},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?A():a,i=l()(t,["locale"]);return new Intl.NumberFormat(n,i).format(e)},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(g.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language},N=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},x=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},P=function(e,t){var a=1e3*N("day"),n=e.getTime(),i=t.getTime();return Math.round(Math.abs(n-i)/a)},T=function(e,t){if("0"===e||0===e||isNaN(e))return"";var a=((t-e)/e*100).toFixed(1);return isNaN(a)||"Infinity"===a?"":a},L=function(e,t){return Object(g.map)(e,(function(e,a){return[e[0],e[t]||(0===a?"":0)]}))},I=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e._googlesitekitLegacyData,a=t.modules;return a?Object.keys(a).reduce((function(e,t){return"object"!==d()(a[t])?e:void 0===a[t].slug||void 0===a[t].name||a[t].slug!==t?e:j({},e,s()({},t,a[t]))}),{}):{}},R=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e._googlesitekitLegacyData,i=n.admin,r=i.connectURL,o=i.adminRoot,s=n.setup.needReauthenticate,c=I(n)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},u=Object(h.a)(o,j({page:t&&a&&c?c:"googlesitekit-dashboard",slug:t,reAuth:a},l));if(!s)return u;var d=encodeURIComponent(Object(b.a)(u));return u=o+"?"+d,Object(h.a)(r,{redirect:u,status:a})},M=function(t,a){var n=e._googlesitekitLegacyData.admin.adminRoot;return t||(t="googlesitekit-dashboard"),a=j({page:t},a),Object(h.a)(n,a)},W=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},U=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},q=function(e,t,a){var n,i,o,s,c=arguments;return r.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:return n=c.length>3&&void 0!==c[3]?c[3]:v.c,i=c.length>4&&void 0!==c[4]?c[4]:I,l.next=4,r.a.awrap(e.setModuleActive(t,a));case 4:return o=l.sent,(s=i())[t]&&(s[t].active=a),l.next=9,r.a.awrap(n("".concat(t,"_setup"),a?"module_activate":"module_deactivate",t));case 9:return l.abrupt("return",o);case 10:case"end":return l.stop()}}))},H=function(t,a,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e._googlesitekitLegacyData,o=I(r)[t],s=o.settings,c=o.setupComplete,l=i||document.getElementById("confirm-changes-".concat(t));if(c&&l){var u=!!Object.keys(a).find((function(e){var t=a[e];return!Object(g.isEqual)(n[e],s[t])}));return i||(l.disabled=!u),u}},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(m.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(y.b)(e,t),1)},z=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(g.unescape)(t)};function G(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e._googlesitekitLegacyData){var s=n.createElement(f.a,{id:t,width:i,height:r,className:o});return a?s=n.createElement(f.a,{id:"".concat(t,"-disabled"),width:i,height:r,className:o}):"pagespeed-insights"===t&&(s=n.createElement("img",{src:e._googlesitekitLegacyData.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:o})),s}}function B(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,n=a.blogPrefix;return a.isNetworkMode?t:n+t}}).call(this,a(16),a(10))},,,,,,,,,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return m})),a.d(t,"c",(function(){return p}));var n=a(100);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||n,r=i.addAction,o=i.addFilter,s=i.removeAction,c=i.removeFilter,l=i.hasAction,u=i.hasFilter,d=i.removeAllActions,g=i.removeAllFilters,m=i.doAction,p=i.applyFilters,h=i.currentAction,b=i.currentFilter,f=i.doingAction,v=i.doingFilter,y=i.didAction,_=i.didFilter,k=i.actions,O=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:r,addFilter:o,removeAction:s,removeFilter:c,hasAction:l,hasFilter:u,removeAllActions:d,removeAllFilters:g,doAction:m,applyFilters:p,currentAction:h,currentFilter:b,doingAction:f,doingFilter:v,didAction:y,didFilter:_,actions:k,filters:O})}).call(this,a(16))},function(e,t,a){"use strict";var n=a(11),i=a.n(n),r=a(12),o=a(58),s=a(37),c=a(13),l=a(55),u=a(21),d=a(54),g=a(94),m=a(131),p=a(29),h=a(71);a.d(t,"a",(function(){return h.a})),a.d(t,"b",(function(){return h.b}));var b=a(106);function f(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function v(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?f(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):f(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var y=function(e,t){var a=v({data:{}},e);return a.data=v({dateRange:t},a.data),a},_={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(a,n){try{var i=[],o=Object(l.b)();Object(r.each)(e,(function(e){var a=y(e,o);a.key=Object(p.c)(a.type,a.identifier,a.datapoint,a.data);var n=Object(p.b)(a.key,a.maxAge);void 0!==n&&(i[a.key]=n,t.resolve(a,n))})),a(i)}catch(e){n()}}))},combinedGet:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],i=25,u=Object(l.b)();Object(r.each)(e,(function(e){var a=y(e,u);a.key=Object(p.c)(a.type,a.identifier,a.datapoint,a.data);var r=Object(p.b)(a.key,a.maxAge);void 0!==r?(setTimeout((function(){t.resolve(a,r)}),i),i+=25):n.push(a)})),n=Object(r.sortBy)(n,"priority");var g=[],m=[],h={},b=!!n.find((function(e){return e.priority<10}));Object(r.each)(n,(function(e,t){!a&&10<=e.priority&&b?m.push(e):h[e.key]?h[e.key].push(t):(h[e.key]=[t],g.push(e))}));var f=10,v=g.slice(0,f),_=g.slice(f);if(_=_.concat(m),0!==v.length||0!==_.length){0<_.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(_,!0)}),50):this.maxRequests=10;var k=null!==Object(d.c)("datacache");return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/data/",{datacache:k||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(r.each)(e,(function(e,a){h[a]?(t.handleWPError(e),Object(r.each)(h[a],(function(a){var i=n[a];Object(p.e)(i.key,e),t.resolve(i,e)})),0===_.length&&Object(c.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+a)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(c.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],a=Object(r.intersection)(t,Object.keys(e));if(Object(r.isEqual)(t,a)){console.warn("WP Error in data response",e);var n=e.data;if(n&&n.reason){var i=0;["authError","insufficientPermissions"].includes(n.reason)&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(g.a),1),i++),"forbidden"===n.reason&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(m.a),1),i++),i&&Object(c.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(c.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+i}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:b.a,collectModuleData:function(e,t){var a=Object(c.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==a.length&&this.combinedGet(a)},get:function(e,t,a){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=Object(p.c)(e,t,a,i);if(!r){var l=Object(p.b)(c,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),i)}).then((function(e){return r||Object(p.e)(c,e),Promise.resolve(e)})).catch((function(e){return n.handleWPError(e),Promise.reject(e)}))},set:function(e,t,a,n){var i={};return i.data=n,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),data:i,method:"POST"}).then((function(n){return _.invalidateCacheGroup(e,t,a),new Promise((function(e){e(n)}))}))},setModuleActive:function(e,t){return this.set(h.a,"modules","activation",{slug:e,active:t})}};Object(c.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(c.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",_.collectModuleData.bind(_)),t.c=_},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"p",(function(){return b})),a.d(t,"i",(function(){return d})),a.d(t,"j",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"n",(function(){return p})),a.d(t,"l",(function(){return h})),a.d(t,"k",(function(){return d})),a.d(t,"e",(function(){return f})),a.d(t,"c",(function(){return y})),a.d(t,"d",(function(){return _})),a.d(t,"f",(function(){return k})),a.d(t,"h",(function(){return O})),a.d(t,"a",(function(){return E})),a.d(t,"q",(function(){return S})),a.d(t,"o",(function(){return j})),a.d(t,"s",(function(){return D})),a.d(t,"r",(function(){return w})),a.d(t,"g",(function(){return C}));var n=a(12),i=a(0),r=a(3),o=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,a=t[0].values,n=t[1].values,i=a[0],o=a[1],s=a[2],c=a[3],l=a[4],u=a[5];return{totalUsers:i,totalSessions:o,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(r.c)(n[0],a[0]),totalSessionsChange:Object(r.c)(n[1],a[1]),averageBounceRateChange:Object(r.c)(n[2],a[2]),averageSessionDurationChange:Object(r.c)(n[3],a[3]),goalCompletions:l,goalCompletionsChange:Object(r.c)(n[4],a[4]),totalPageViews:u,totalPageViewsChange:Object(r.c)(n[5],a[5])}},s=function(e){if("string"==typeof e&&e.match(/[0-9]{8}/)){var t=e.slice(0,4),a=Number(e.slice(4,6))-1,n=e.slice(6,8);return new Date(t,a.toString(),n)}return!1},c=a(38),l=a.n(c),u=a(22),d=function(e){return(parseInt(e,10)||0)>0};function g(e){return e===u.a||d(e)}function m(e){return"string"==typeof e&&e.match(/^UA-\d+-\d+$/)}function p(e){return e===u.f||m(e)}function h(e){return e===u.e||d(e)}function b(e){if(!m(e))return!1;var t=e.match(/^UA-(\d+)-(\d+)/),a=l()(t,3);return{accountID:a[1],propertyID:e,number:a[2]}}var f=function(e){if(!e||!e.length)return null;var t=e[0].data,a=t.rows,i=t.totals[0].values[0],r=[["Source","Percent"]];return Object(n.each)(a,(function(e){var t=e.metrics[0].values[0]/i;if(1>100*t)return!1;var a=e.dimensions[0].replace(/\(none\)/gi,"direct");r.push([a,t])})),r};function v(e,t){var a=[];return Object(n.each)(e,(function(e){if(e.metrics){var n=e.metrics[0].values,i=e.dimensions[0],r=s(i);a.push([r,n[t]])}})),a}var y=function(e,t,a){if(!e||!e.length)return null;var r=e[0].data.rows;if(!r)return!1;var o=r.length;if(2*a>o){for(var s=new Date,c=0;a>c;c++){var l=(s.getMonth()+1).toString(),u=s.getDate().toString(),d=s.getFullYear().toString()+(2>l.length?"0":"")+l+(2>u.length?"0":"")+u;if(c>o){var g={dimensions:[d],metrics:[{values:[0,0,0,0,0]}]};r.unshift(g)}s.setDate(s.getDate()-1)}r.push([0,0])}var m=[Object(i.__)("Users","google-site-kit"),Object(i.__)("Sessions","google-site-kit"),Object(i.__)("Bounce Rate","google-site-kit"),Object(i.__)("Session Duration","google-site-kit")],p=[[{type:"date",label:Object(i.__)("Day","google-site-kit")},{type:"number",label:m[t]},{type:"number",label:Object(i.__)("Previous period","google-site-kit")}]],h=r.slice(r.length-a,r.length),b=r.slice(0,r.length-a),f=v(h,t),y=v(b,t);return Object(n.each)(f,(function(e,t){e[0]&&e[1]&&y[t]&&p.push([e[0],e[1],y[t][1]])})),p},_=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,a=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(n.each)(t,(function(e){var t=e.metrics[0].values,n=e.dimensions[0],i=s(n);a.push([i,t[0],t[1],t[4]])})),a},k=function(e){return!(!e.error||!e.error.status)&&function(e,t){var a="";switch(e){case"INVALID_ARGUMENT":a=Object(i.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":a=Object(i.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":a=Object(i.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":a=Object(i.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":a=Object(i.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":a=Object(i.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":a=Object(i.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:a=t}return a}(e.error.status,e.error.message)},O=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,a=!0;return Object(n.each)(t,(function(e){0!==parseInt(e)&&(a=!1)})),a}return!1},E={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},S={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},j={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},D={metrics:[{expression:"ga:users",alias:"Total Users"}]},w={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},C=function(){return{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}],orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(87),i=a.n(n),r=a(1),o=function(e){return function(t){return function FilteredComponent(a){return Object(r.f)(r.b,{},"",Object(r.f)(t,a),e)}}},s=function(t,a){return function(n){return function InnerComponent(r){return e.createElement(t,i()({},r,a,{OriginalComponent:n}))}}}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"f",(function(){return r})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return c})),a.d(t,"g",(function(){return l})),a.d(t,"b",(function(){return u}));var n="modules/analytics",i="account_create",r="property_create",o="profile_create",s="analyticsAccountCreate",c="analyticsSetup",l="https://www.googleapis.com/auth/analytics.provision",u="https://www.googleapis.com/auth/analytics.edit"},function(e,t,a){"use strict";(function(e){var n=a(87),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(12),f=a(13),v=a(0),y=a(3),_=a(63),k=a(64),O=a(116);t.a=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!!(e.code&&e.message&&e.data&&e.data.status)&&e.message};return function(d){function NewComponent(e){var t;o()(this,NewComponent),(t=u()(this,g()(NewComponent).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(f.a)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){t.setState({data:!1})}));var n=function(e,a){var n=t.props,i=n.handleDataError,r=n.handleDataSuccess,o=a.datapoint,c=a.identifier,u=a.toState,d=l(e);d?(t.setState({error:d,module:c}),i&&i(d)):s(e,o,a)?(i&&i(d),t.setState({zeroData:!0})):r&&r(),t.setState({requestDataToState:u,data:e,datapoint:o,module:c})};return Object(b.each)(a,(function(e){Array.isArray(e.context)?Object(b.each)(e.context,(function(t){Object(f.b)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(f.b)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),t}return p()(NewComponent,d),c()(NewComponent,[{key:"render",value:function(){var a=this.state,o=a.data,s=a.datapoint,c=a.module,l=a.zeroData,u=a.error,d=a.requestDataToState;if(!o)return n;var g=Object(y.k)(),m=c?g[c].name:Object(v.__)("Site Kit","google-site-kit");return c&&g[c].active&&!g[c].setupComplete?Object(O.a)(c,r.inGrid,r.fullWidth,r.createGrid):u?"string"!=typeof u?u:Object(k.a)(m,u,r.inGrid,r.fullWidth,r.createGrid):l?Object(_.a)(m,r.inGrid,r.fullWidth,r.createGrid):e.createElement(t,i()({data:o,datapoint:s,requestDataToState:d},this.props))}}]),NewComponent}(h.a)}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return i}));var n="core/user",i="missing_required_scopes"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=function(t){function Link(){return i()(this,Link),c()(this,u()(Link).apply(this,arguments))}return g()(Link,t),o()(Link,[{key:"render",value:function(){var t=this.props,a=t.dangerouslySetInnerHTML,n=t.onClick,i=t.href,r=t.children,o=t.className,s=t.arrow,c=t.external,l=t.inverse,u=t.back,d=t.small,g=t.inherit,m=t.caps,p=t.danger,h=t.disabled,b=t.id,v=i&&!h,y=v?"a":"button";return e.createElement(y,{className:f()("googlesitekit-cta-link",o,{"googlesitekit-cta-link--arrow":s,"googlesitekit-cta-link--external":c,"googlesitekit-cta-link--inverse":l,"googlesitekit-cta-link--back":u,"googlesitekit-cta-link--small":d,"googlesitekit-cta-link--inherit":g,"googlesitekit-cta-link--caps":m,"googlesitekit-cta-link--danger":p,"googlesitekit-cta-link--disabled":h}),onClick:n,id:b,href:v?i:void 0,target:v&&c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,disabled:h,dangerouslySetInnerHTML:a},r)}}]),Link}(m.a);v.propTypes={dangerouslySetInnerHTML:h.a.shape({__html:h.a.string}),onClick:h.a.func,href:h.a.string,children:h.a.oneOfType([h.a.string.isRequired,h.a.array.isRequired]),className:h.a.string,arrow:h.a.bool,external:h.a.bool,inverse:h.a.bool,back:h.a.bool,small:h.a.bool,inherit:h.a.bool,caps:h.a.bool,danger:h.a.bool,disabled:h.a.bool},v.defaultProps={dangerouslySetInnerHTML:void 0,onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(146),y=a(147),_=function(t){function Layout(){return i()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return g()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,a=t.header,n=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,g=t.fill,m=t.relative;return e.createElement("div",{className:f()("googlesitekit-layout",d,{"googlesitekit-layout--fill":g,"googlesitekit-layout--relative":m})},a&&e.createElement(v.a,{title:r,ctaLabel:o,ctaLink:s}),i,n&&e.createElement(y.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(m.a);_.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},_.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=_}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=function(t){function PreviewBlock(){return i()(this,PreviewBlock),c()(this,u()(PreviewBlock).apply(this,arguments))}return g()(PreviewBlock,t),o()(PreviewBlock,[{key:"render",value:function(){var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.padding;return e.createElement("div",{className:f()("googlesitekit-preview-block",{"googlesitekit-preview-block--padding":r}),style:{width:a,height:n}},e.createElement("div",{className:f()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===i})}))}}]),PreviewBlock}(m.a);v.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},v.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return g}));var n=a(33),i=a.n(n),r=a(12),o=a(40),s=a(56),c=function(){e._googlesitekitLegacyData.admin=e._googlesitekitLegacyData.admin||{},"string"==typeof e._googlesitekitLegacyData.admin.datacache&&(e._googlesitekitLegacyData.admin.datacache=JSON.parse(e._googlesitekitLegacyData.admin.datacache)),"object"!==i()(e._googlesitekitLegacyData.admin.datacache)&&(e._googlesitekitLegacyData.admin.datacache={})},l=function(t,a){if(void 0!==a&&(!a||"object"!==i()(a)||!a.error&&!a.errors)){c(),e._googlesitekitLegacyData.admin.datacache[t]=Object(r.cloneDeep)(a);var n={value:a,date:Date.now()/1e3};Object(o.a)().setItem("googlesitekit_"+t,JSON.stringify(n))}},u=function(t,a){if(!e._googlesitekitLegacyData.admin.nojscache){if(c(),void 0!==e._googlesitekitLegacyData.admin.datacache[t])return e._googlesitekitLegacyData.admin.datacache[t];var n=JSON.parse(Object(o.a)().getItem("googlesitekit_"+t));return n&&"object"===i()(n)&&n.date&&(!a||Date.now()/1e3-n.date<a)?(e._googlesitekitLegacyData.admin.datacache[t]=Object(r.cloneDeep)(n.value),Object(r.cloneDeep)(e._googlesitekitLegacyData.admin.datacache[t])):void 0}},d=function(t){c(),delete e._googlesitekitLegacyData.admin.datacache[t],Object(o.a)().removeItem("googlesitekit_"+t)},g=function(e,t,a){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=[],o=[e,t,a],c=0,l=o;c<l.length;c++){var u=l[c];if(!u||!u.length)break;r.push(u)}return 3===r.length&&n&&"object"===i()(n)&&Object.keys(n).length&&r.push(Object(s.a)(n)),r.join("::")}}).call(this,a(16))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(2),r=a.n(i),o=a(17),s=a.n(o),c=function SvgIcon(t){var a=t.id,i=t.className,r=t.height,o=t.width,c="".concat(e._googlesitekitLegacyData.admin.assetsRoot,"svg/svg.svg");return n.createElement("svg",{className:s()("svg",i),height:r,width:o},n.createElement("use",{xlinkHref:"".concat(c,"#").concat(a)}))};c.propTypes={id:r.a.string.isRequired,className:r.a.string,height:r.a.string,width:r.a.string},c.defaultProps={className:"",height:20,width:20},t.a=c}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(18),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(2),f=a.n(b),v=a(17),y=a.n(v),_=a(129),k=a(60),O=a(77),E=function(t){function DataBlock(e){var t;return i()(this,DataBlock),(t=c()(this,u()(DataBlock).call(this,e))).handleClick=t.handleClick.bind(g()(t)),t.handleKeyPress=t.handleKeyPress.bind(g()(t)),t}return p()(DataBlock,t),o()(DataBlock,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,a=t.stat,n=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||n(a)}},{key:"render",value:function(){var t=this.props,a=t.className,n=t.title,i=t.datapoint,r=t.datapointUnit,o=t.change,s=t.changeDataUnit,c=t.context,l=t.period,u=t.selected,d=t.handleStatSelection,g=t.source,m=t.sparkline,p=t.invertChangeColor,b="button"===c?"button":"",f=m;return f&&p&&(f=Object(h.d)(m,{invertChangeColor:p})),e.createElement("div",{className:y()("googlesitekit-data-block",a,"googlesitekit-data-block--".concat(c),{"googlesitekit-data-block--selected":u}),tabIndex:"button"===c?"0":"-1",role:d&&b,onClick:d&&this.handleClick,onKeyPress:d&&this.handleKeyPress,"aria-label":d&&n,"aria-pressed":d&&u},e.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},n),e.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(i).concat(r))),f&&e.createElement("div",{className:"googlesitekit-data-block__sparkline"},f),e.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},e.createElement("div",{className:"googlesitekit-data-block__change"},""===o&&e.createElement(h.b,null," "),o&&e.createElement(h.b,null,e.createElement("span",{className:"googlesitekit-data-block__arrow"},e.createElement(_.a,{direction:0<parseFloat(o)?"up":"down",invertColor:p})),e.createElement("span",{className:"googlesitekit-data-block__value"},"".concat(Object(k.b)(Math.abs(o))).concat(s," ").concat(l)))),g&&e.createElement(O.a,{className:"googlesitekit-data-block__source",name:g.name,href:g.link})))}}]),DataBlock}(h.a);E.propTypes={stat:f.a.number,onClick:f.a.func,className:f.a.string,title:f.a.string,datapoint:f.a.oneOfType([f.a.string,f.a.number]),datapointUnit:f.a.string,change:f.a.oneOfType([f.a.string,f.a.number]),changeDataUnit:f.a.string,context:f.a.string,period:f.a.string,selected:f.a.bool,handleStatSelection:f.a.func,invertChangeColor:f.a.bool},E.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,invertChangeColor:!1},t.a=E}).call(this,a(10))},function(e,t,a){"use strict";var n=a(88),i=a.n(n);a.d(t,"k",(function(){return i.a})),a.d(t,"a",(function(){return n.HelperText})),a.d(t,"b",(function(){return n.Input}));var r=a(145);a.d(t,"g",(function(){return r.a}));var o=a(221);a.d(t,"e",(function(){return o.a}));var s=a(112),c=a.n(s);a.d(t,"j",(function(){return c.a})),a.d(t,"i",(function(){return s.Option}));var l=a(222);a.d(t,"h",(function(){return l.a}));var u=a(218);a.d(t,"d",(function(){return u.a}));var d=a(219);a.d(t,"c",(function(){return d.a}));var g=a(217);a.d(t,"f",(function(){return g.a}))},,function(e,t,a){"use strict";(function(e){var n=a(11),i=a.n(n),r=a(4),o=a.n(r),s=a(5),c=a.n(s),l=a(6),u=a.n(l),d=a(7),g=a.n(d),m=a(8),p=a.n(m),h=a(18),b=a.n(h),f=a(9),v=a.n(f),y=a(1),_=a(2),k=a.n(_),O=a(17),E=a.n(O),S=a(12),j=a(30),D=a(57),w=a(29),C=a(31),A=a(39),N=a(114),x=a(130),P=a(25),T=function(t){function Notification(e){var t;return c()(this,Notification),(t=g()(this,p()(Notification).call(this,e))).state={isClosed:!1},t.cardRef=Object(y.h)(),t.handleDismiss=t.handleDismiss.bind(b()(t)),t.handleCTAClick=t.handleCTAClick.bind(b()(t)),0<t.props.dismissExpires&&t.expireDismiss(),t.props.showOnce&&Object(w.e)("notification::displayed::".concat(t.props.id),new Date),t}return v()(Notification,t),u()(Notification,[{key:"handleDismiss",value:function(e){var t;return o.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.persist(),e.preventDefault(),!(t=this.props.onDismiss)){a.next=6;break}return a.next=6,o.a.awrap(t(e));case 6:this.dismiss();case 7:case"end":return a.stop()}}),null,this)}},{key:"dismiss",value:function(){var e=this,t=this.cardRef.current;this.setState({isClosed:!0}),setTimeout((function(){Object(w.e)("notification::dismissed::".concat(e.props.id),new Date),t.style.display="none";var a=new Event("notificationDismissed");document.dispatchEvent(a)}),350)}},{key:"handleCTAClick",value:function(e){var t,a,n;return o.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.persist(),t=this.props,a=t.isDismissable,!(n=t.onCTAClick)){i.next=5;break}return i.next=5,o.a.awrap(n(e));case 5:a&&this.dismiss();case 6:case"end":return i.stop()}}),null,this)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,a=e.dismissExpires,n=Object(w.b)("notification::dismissed::".concat(t));if(n){var i=new Date(n);i.setSeconds(i.getSeconds()+parseInt(a,10)),i<new Date&&Object(w.a)("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var t,a=this.state.isClosed,n=this.props,r=n.children,o=n.id,s=n.title,c=n.description,l=n.blockData,u=n.winImage,d=n.smallImage,g=n.format,m=n.learnMoreURL,p=n.learnMoreDescription,h=n.learnMoreLabel,b=n.ctaLink,f=n.ctaLabel,v=n.ctaTarget,_=n.type,k=n.dismiss,O=n.isDismissable,T=n.logo,L=n.module,I=n.moduleName,R=n.pageIndex,M=n.anchorLink,W=n.anchorLinkLabel;if(Object(w.b)("notification::dismissed::".concat(o)))return null;var U,q=a?"is-closed":"is-open",H="large"===g&&"win-stats-increase"===_,F="mdc-layout-grid__cell--span-12";"large"===g?(F="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",H&&(F="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===g&&(F="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),U="win-warning"===_?e.createElement(N.a,null):"win-error"===_?e.createElement(x.a,null):"";var z=e.createElement(y.b,null,l&&e.createElement("div",{className:"mdc-layout-grid__inner"},Object(S.map)(l,(function(t,a){return e.createElement("div",{key:a,className:E()("mdc-layout-grid__cell",{"mdc-layout-grid__cell--span-5-desktop":H,"mdc-layout-grid__cell--span-4-desktop":!H})},e.createElement("div",{className:"googlesitekit-publisher-win__stats"},e.createElement(C.a,t)))})))),G=e.createElement(y.b,null,s&&e.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},s),M&&W&&e.createElement("p",{className:"googlesitekit-publisher-win__link"},e.createElement(P.a,{href:M},W)),c&&e.createElement("div",{className:"googlesitekit-publisher-win__desc"},e.createElement("p",null,Object(y.i)(c)?c:e.createElement("span",{dangerouslySetInnerHTML:Object(D.a)(c,{ALLOWED_TAGS:["strong","em","br","a"],ALLOWED_ATTR:["href"]})}),h&&e.createElement(y.b,null," ",e.createElement(P.a,{href:m,external:!0,inherit:!0},h),p),R&&e.createElement("span",{className:"googlesitekit-publisher-win__detect"},R))),r),B=L?e.createElement(j.a,{id:L,height:"19",width:"19"}):e.createElement(j.a,{id:"logo-g",height:"34",width:"32"});return e.createElement("section",{ref:this.cardRef,className:E()("googlesitekit-publisher-win",(t={},i()(t,"googlesitekit-publisher-win--".concat(g),g),i()(t,"googlesitekit-publisher-win--".concat(_),_),i()(t,"googlesitekit-publisher-win--".concat(q),q),t))},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},T&&e.createElement("div",{className:E()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",{"mdc-layout-grid__cell--order-2-phone":H,"mdc-layout-grid__cell--order-1-tablet":H})},e.createElement("div",{className:"googlesitekit-publisher-win__logo"},B),I&&e.createElement("div",{className:"googlesitekit-publisher-win__module-name"},I)),d&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:d})),e.createElement("div",{className:E()("mdc-layout-grid__cell",F)},H?e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},G),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},z)):e.createElement(y.b,null,G,z),b&&e.createElement(A.a,{href:b,target:v,onClick:this.handleCTAClick},f),O&&k&&e.createElement(P.a,{onClick:this.handleDismiss},k)),u&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement("div",{className:"googlesitekit-publisher-win__image-large"},e.createElement("img",{alt:"",src:u}))),("win-error"===_||"win-warning"===_)&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("div",{className:"googlesitekit-publisher-win__icons"},U)))))}}]),Notification}(y.a);T.propTypes={id:k.a.string.isRequired,title:k.a.string.isRequired,description:k.a.node,learnMoreURL:k.a.string,learnMoreDescription:k.a.string,learnMoreLabel:k.a.string,blockData:k.a.array,winImage:k.a.string,smallImage:k.a.string,format:k.a.string,ctaLink:k.a.string,ctaLabel:k.a.string,type:k.a.string,dismiss:k.a.string,isDismissable:k.a.bool,logo:k.a.bool,module:k.a.string,moduleName:k.a.string,pageIndex:k.a.string,dismissExpires:k.a.number,showOnce:k.a.bool,onCTAClick:k.a.func,onDismiss:k.a.func,anchorLink:k.a.string,anchorLinkLabel:k.a.string},T.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1},t.a=T}).call(this,a(10))},,function(e,t,a){"use strict";(function(e,n){a.d(t,"b",(function(){return D})),a.d(t,"a",(function(){return w}));var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(18),m=a.n(g),p=a(9),h=a.n(p),b=a(11),f=a.n(b),v=a(1),y=a(2),_=a.n(y),k=a(17),O=a.n(k),E=a(12),S=a(77),j=a(25),D=function(t,a,n){var i=[],r=n.links,o=n.source,s=n.showURLs;n.cap&&(t=t.slice(0,n.cap)),Object(E.each)(t,(function(t,a){var o=[],c=r&&r[a];Object(E.each)(t,(function(a,i){"string"==typeof a&&(a=a.replace(/\(none\)/gi,"direct"));var r=n&&n.hideColumns&&n.hideColumns.mobile.includes(i);o.push(e.createElement("td",{key:"cell-"+i,className:O()("googlesitekit-table__body-item",{"hidden-on-mobile":r})},t[0]===a&&c?e.createElement("div",{className:"googlesitekit-table__body-item-content"},e.createElement(j.a,{className:"googlesitekit-table__body-item-link",href:c,external:!0,inherit:!0},a),s&&e.createElement(j.a,{className:"googlesitekit-table__body-item-url",href:c,inherit:!0,external:!0},c)):e.createElement("div",{className:"googlesitekit-table__body-item-content"},a)))})),i.push(e.createElement("tr",{key:"tr-"+a,className:"googlesitekit-table__body-row"},o))}));var c=t&&t[0]&&t[0].length?t[0].length:1,l=n.hideColumns&&n.hideColumns.mobile&&n.hideColumns.mobile.length>0?c-n.hideColumns.mobile.length:c;return e.createElement("div",{className:O()("googlesitekit-table",{"googlesitekit-table--with-list":!n||!n.disableListMode})},e.createElement("table",{className:O()("googlesitekit-table__wrapper","googlesitekit-table__wrapper--".concat(c,"-col"),f()({},"googlesitekit-table__wrapper--mobile-".concat(l,"-col"),l!==c))},e.createElement("thead",{className:"googlesitekit-table__head"},e.createElement("tr",{key:"gksc_data_row_header-wrap",style:n&&n.hideHeader?{display:"none"}:{},className:"googlesitekit-table__head-row"},a.map((function(t,a){var i=n&&n.hideColumns&&n.hideColumns.mobile.includes(a);return e.createElement("th",{key:"gksc_data_row_header-".concat(a),className:O()("googlesitekit-table__head-item",{"googlesitekit-table__head-item--primary":t.primary},{"hidden-on-mobile":i}),"data-tooltip":t.tooltip},t.title)})))),e.createElement("tbody",{className:"googlesitekit-table__body"},i)),o&&e.createElement(S.a,{className:"googlesitekit-table__source",name:o.name,href:o.link}))},w=function(t){function TableOverflowContainer(){var e;return r()(this,TableOverflowContainer),(e=l()(this,d()(TableOverflowContainer).call(this))).state={isScrolling:!1},e.scrollRef=Object(v.h)(),e.updateFadeOnScroll=e.updateFadeOnScroll.bind(m()(e)),e}return h()(TableOverflowContainer,t),s()(TableOverflowContainer,[{key:"componentDidMount",value:function(){var e=this;e.updateFadeOnScroll(),this.resize=Object(E.debounce)((function(){e.updateFadeOnScroll()}),100),n.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){n.removeEventListener("resize",this.resize)}},{key:"updateFadeOnScroll",value:function(){var e=this.scrollRef.current,t=e.scrollLeft,a=e.scrollWidth-e.offsetWidth,n=t<a-16&&0<a-16;this.setState({isScrolling:n})}},{key:"render",value:function(){var t=this.props.children,a=this.state.isScrolling;return e.createElement("div",{onScroll:Object(E.debounce)(this.updateFadeOnScroll,100),className:O()("googlesitekit-table-overflow",{"googlesitekit-table-overflow--gradient":a})},e.createElement("div",{ref:this.scrollRef,className:"googlesitekit-table-overflow__container"},t))}}]),TableOverflowContainer}(v.a);w.propTypes={children:_.a.element}}).call(this,a(10),a(16))},,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(32),y=function(t){function Button(e){var t;return i()(this,Button),(t=c()(this,u()(Button).call(this,e))).buttonRef=Object(m.h)(),t}return g()(Button,t),o()(Button,[{key:"componentDidMount",value:function(){new v.g(this.buttonRef.current)}},{key:"render",value:function(){var t=this.props,a=t.onClick,n=t.children,i=t.href,r=t.text,o=t.className,s=t.danger,c=t.disabled,l=t.target,u=t.id,d=t.icon,g=t.trailingIcon,m=t.ariaHaspopup,p=t.ariaExpanded,h=t.ariaControls,b=i&&!c?"a":"button";return e.createElement(b,{className:f()("mdc-button",o,{"mdc-button--raised":!r,"mdc-button--danger":s}),onClick:a,href:c?void 0:i,ref:this.buttonRef,disabled:!!c,target:l||"_self",id:u,"aria-haspopup":m,"aria-expanded":p,"aria-controls":h},d&&d,e.createElement("span",{className:"mdc-button__label"},n),g&&g)}}]),Button}(m.a);y.propTypes={onClick:h.a.func,children:h.a.string.isRequired,href:h.a.string,text:h.a.bool,className:h.a.string,danger:h.a.bool,disabled:h.a.bool,icon:h.a.element,trailingIcon:h.a.element,ariaHaspopup:h.a.string,ariaExpanded:h.a.bool,ariaControls:h.a.string},y.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return u}));var n,i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=function(t){var a=e[t];if(!a)return!1;try{var n="__storage_test__";return a.setItem(n,n),a.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==a.length}},l=function(){function NullStorage(){r()(this,NullStorage)}return s()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),u=function(){return n||(n=c("sessionStorage")?e.sessionStorage:c("localStorage")?e.localStorage:new l),n}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(25),y=function(t){function CTA(){return i()(this,CTA),c()(this,u()(CTA).apply(this,arguments))}return g()(CTA,t),o()(CTA,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description,i=t.ctaLink,r=t.ctaLabel,o=t.error,s=t.onClick;return e.createElement("div",{className:f()("googlesitekit-cta",{"googlesitekit-cta--error":o})},a&&e.createElement("h3",{className:"googlesitekit-cta__title"},a),n&&e.createElement("p",{className:"googlesitekit-cta__description"},n),r&&e.createElement(v.a,{href:i,onClick:s,inverse:!o,caps:!0,arrow:!0},r))}}]),CTA}(m.a);y.propTypes={title:h.a.string.isRequired,description:h.a.string,ctaLink:h.a.string,ctaLabel:h.a.string,error:h.a.bool,onClick:h.a.func},y.defaultProps={title:"",description:"",ctaLink:"",ctaLabel:"",error:!1,onClick:function(){}},t.a=y}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return f}));var n=a(4),i=a.n(n),r=a(11),o=a.n(r),s=a(20),c=a.n(s),l=a(101),u=a.n(l),d=a(66),g=a(3);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h=function(e){return p({},e)},b=function(){return{}},f=function(t){var a,n,r=t.baseName,s=t.controlCallback,l=t.reducerCallback,m=void 0===l?h:l,f=t.argsToParams,v=void 0===f?b:f;c()(r,"baseName is required."),c()("function"==typeof s,"controlCallback is required and must be a function."),c()("function"==typeof m,"reducerCallback must be a function."),c()("function"==typeof v,"argsToParams must be a function.");try{v(),n=!1}catch(e){n=!0}var y=Object(d.b)(r),_=Object(d.a)(r),k="FETCH_".concat(_),O="START_".concat(k),E="FINISH_".concat(k),S="CATCH_".concat(k),j="RECEIVE_".concat(_),D="fetch".concat(y),w="receive".concat(y),C="isFetching".concat(y),A=o()({},C,{}),N=(a={},o()(a,D,i.a.mark((function t(){var a,n,r,o=arguments;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,r=v.apply(void 0,o),t.next=9;break;case 4:return t.prev=4,t.t0=t.catch(0),e.console.error(t.t0.message),n=t.t0,t.abrupt("return",{response:a,error:n});case 9:return t.next=11,{payload:{params:r},type:O};case 11:return t.prev=11,t.next=14,{payload:{params:r},type:k};case 14:return a=t.sent,t.next=17,N[w](a,r);case 17:return t.next=19,{payload:{params:r},type:E};case 19:t.next=26;break;case 21:return t.prev=21,t.t1=t.catch(11),n=t.t1,t.next=26,{payload:{error:n,params:r},type:S};case 26:return t.abrupt("return",{response:a,error:n});case 27:case"end":return t.stop()}}),t,null,[[0,4],[11,21]])}))),o()(a,w,(function(e,t){return c()(void 0!==e,"response is required."),n?c()(u()(t),"params is required."):t={},{payload:{response:e,params:t},type:j}})),a),x=o()({},k,(function(e){var t=e.payload;return s(t.params)})),P=o()({},C,(function(e){if(void 0===e[C])return!1;var t;try{for(var a=arguments.length,n=new Array(a>1?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t=v.apply(void 0,n)}catch(e){return!1}return!!e[C][Object(g.w)(t)]}));return{INITIAL_STATE:A,actions:N,controls:x,reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case O:var i=n.params;return p({},e,o()({},C,p({},e[C],o()({},Object(g.w)(i),!0))));case j:var r=n.response,s=n.params;return m(e,r,s);case E:var c=n.params;return p({},e,o()({},C,p({},e[C],o()({},Object(g.w)(c),!1))));case S:var l=n.error,u=n.params;return p({},e,o()({error:l},C,p({},e[C],o()({},Object(g.w)(u),!1))));default:return p({},e)}},resolvers:{},selectors:P}}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=function(t){function ProgressBar(){return i()(this,ProgressBar),c()(this,u()(ProgressBar).apply(this,arguments))}return g()(ProgressBar,t),o()(ProgressBar,[{key:"render",value:function(){var t=this.props,a=t.className,n=t.small,i=t.compress,r=t.height,o=r?Math.round(r/2):null;return e.createElement("div",{role:"progressbar",style:{marginTop:o,marginBottom:o},className:f()("mdc-linear-progress","mdc-linear-progress--indeterminate",a,{"mdc-linear-progress--small":n,"mdc-linear-progress--compress":i})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),ProgressBar}(m.a);v.propTypes={className:h.a.string,small:h.a.bool,compress:h.a.bool},v.defaultProps={className:"",small:!1,compress:!1},t.a=v}).call(this,a(10))},,function(e,t,a){"use strict";function n(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function r(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(28),y=function(t){function PreviewTable(){return i()(this,PreviewTable),c()(this,u()(PreviewTable).apply(this,arguments))}return g()(PreviewTable,t),o()(PreviewTable,[{key:"render",value:function(){for(var t=this.props,a=t.rows,n=t.rowHeight,i=t.padding,r=[],o=0;a>o;o++)r.push(e.createElement("div",{className:"googlesitekit-preview-table__row",key:"table-row-"+o},e.createElement(v.a,{width:"100%",height:n+"px"})));return e.createElement("div",{className:f()("googlesitekit-preview-table",{"googlesitekit-preview-table--padding":i})},r)}}]),PreviewTable}(m.a);y.propTypes={rows:h.a.number,rowHeight:h.a.number,padding:h.a.bool},y.defaultProps={rows:11,rowHeight:35,padding:!1},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(12),i=a(3);function r(e){var t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]],a=0,r=0,o=0,s=0,c=e.length;Object(n.each)(e,(function(e){var n=new Date(e.keys[0]);t.push([n.getMonth()+1+"/"+n.getUTCDate(),e.clicks,e.impressions,e.ctr,e.position]),a+=e.clicks,r+=e.impressions,o+=e.ctr,s+=e.position}));var l=a,u=r;a=Object(i.t)(a),r=Object(i.t)(r);var d=(o/c*100).toFixed(1),g=o/c,m=(s/c).toFixed(1);return{dataMap:t,totalClicks:a,totalClicksRaw:l,totalImpressions:r,totalImpressionsRaw:u,averageCTR:d,averageCTRRaw:g,averagePosition:m}}var o=function(e){var t=Math.floor(e.length/2),a=r(e.slice(t)),n=r(e.slice(0,t));return{dataMap:a.dataMap,totalClicks:a.totalClicks,totalImpressions:a.totalImpressions,averageCTR:a.averageCTR,averagePosition:a.averagePosition,totalClicksChange:Object(i.c)(n.totalClicksRaw,a.totalClicksRaw),totalImpressionsChange:Object(i.c)(n.totalImpressionsRaw,a.totalImpressionsRaw),averageCTRChange:Object(i.c)(n.averageCTRRaw,a.averageCTRRaw),averagePositionChange:Object(i.c)(n.averagePosition,a.averagePosition)}},s=function(e){if(!e.length)return!0;var t=o(e),a=t.totalClicks,n=t.totalImpressions,i=t.averageCTR,r=t.averagePosition;return 0===parseInt(a)&&0===parseInt(n)&&0===parseInt(i)&&0===parseInt(r)}},,,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=function(t){function DashboardModuleHeader(){return i()(this,DashboardModuleHeader),c()(this,u()(DashboardModuleHeader).apply(this,arguments))}return g()(DashboardModuleHeader,t),o()(DashboardModuleHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description;return e.createElement("header",{className:"googlesitekit-dashboard-module-header"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-module-header__title "},a),n&&e.createElement("p",{className:"googlesitekit-dashboard-module-header__description"},n))))}}]),DashboardModuleHeader}(m.a);b.propTypes={title:h.a.string,description:h.a.string},b.defaultProps={title:"",description:""},t.a=b}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"f",(function(){return d})),a.d(t,"a",(function(){return g})),a.d(t,"b",(function(){return m}));var n=a(4),i=a.n(n),r=a(12),o=a(3),s=a(19),c=a(14),l=a(123);a.d(t,"e",(function(){return l.a}));a(70);var u=a(93);a.d(t,"c",(function(){return u.a})),a.d(t,"d",(function(){return u.b}));a(108);function d(e){var t=[[{type:"date",label:"Day"},{type:"number",label:"RPM"},{type:"number",label:"Earnings"},{type:"number",label:"Impressions"}]];return Object(r.each)(e,(function(e){var a=new Date(e[0]);t.push([a,e[2],e[1],e[3]])})),{dataMap:t}}var g=function(){var e,t,a,n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=Object(o.k)(),t=e.adsense.active,a=e.analytics.active,n=!0,!t||!a){r.next=7;break}return r.next=7,i.a.awrap(c.c.get(c.b,"analytics","report",s.a).then((function(e){e&&(n=!0)})).catch((function(e){400===e.code&&"INVALID_ARGUMENT"===e.message&&(n=!1)})));case 7:return r.abrupt("return",new Promise((function(e){e(n)})));case 8:case"end":return r.stop()}}))},m=function(e,t,a){if(!a.data||!a.data.dateRange||"last-28-days"!==a.data.dateRange)return!1;var n=[];return e.totals&&(n=e.totals),0===(n=n.filter((function(e){return 0<e}))).length}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n=a(13),i=a(0);function r(){var e=Object(n.c)("googlesitekit.dateRange","last-28-days").match(/last-(\d+)-days/);if(e&&e[1])return Object(i.sprintf)(
|
5 |
+
/* translators: %s: Number of days matched. */
|
6 |
+
Object(i._n)("%s day","%s days",parseInt(e[1],10),"google-site-kit"),e[1]);throw new Error("Unrecognized date range slug used in `googlesitekit.dateRange`.")}function o(){return Object(n.c)("googlesitekit.dateRange","last-28-days")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(33),i=a.n(n),r=a(105),o=a.n(r),s=function(e){return o()(JSON.stringify(function e(t){var a={};Object.keys(t).sort().forEach((function(n){var r=t[n];r&&"object"===i()(r)&&!Array.isArray(r)&&(r=e(r)),a[n]=r}));return a}(e)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(79),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:n.a.sanitize(e,t)}}},function(e,t,a){"use strict";(function(e){var n=a(27),i=a.n(n),r=e._googlesitekitAPIFetchData||{},o=r.nonce,s=r.nonceEndpoint,c=r.preloadedData,l=r.rootURL;i.a.nonceEndpoint=s,i.a.nonceMiddleware=i.a.createNonceMiddleware(o),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(l),i.a.preloadingMiddleware=i.a.createPreloadingMiddleware(c),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),t.default=i.a}).call(this,a(16))},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return c}));var n=a(49),i=a.n(n),r=a(12),o=a(0);function s(){Object(o.setLocaleData)(e._googlesitekitLegacyData.locale,"google-site-kit")}var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?l():a,r=i()(t,["locale"]);return new Intl.NumberFormat(n,r).format(e)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(r.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(142),f=a(65),v=function(t){function Sparkline(){return i()(this,Sparkline),c()(this,u()(Sparkline).apply(this,arguments))}return g()(Sparkline,t),o()(Sparkline,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.change,i=t.instanceId,r=t.invertChangeColor,o=t.loadSmall,s=t.loadCompressed,c=t.loadHeight,l=t.loadText;if(!a)return"loading...";var u=r?"red":"green",d=r?"green":"red",g={title:"",backgroundColor:"transparent",curveType:"line",width:"100%",height:"50",enableInteractivity:!1,chartArea:{height:"100%",width:"100%"},legend:{position:"none"},axisFontSize:0,hAxis:{baselineColor:"none",ticks:[]},vAxis:{baselineColor:"none",ticks:[]},axes:[],colors:[0<=(parseFloat(n)||0)?u:d]};return e.createElement("div",{className:"googlesitekit-analytics-sparkline-chart-wrap"},e.createElement(f.a,{data:a,options:g,id:"googlesitekit-sparkline-".concat(i),loadSmall:o,loadCompressed:s,loadHeight:c,loadText:l}))}}]),Sparkline}(m.a);v.propTypes={instanceId:h.a.number.isRequired,invertChangeColor:h.a.bool,loadSmall:h.a.bool,loadCompressed:h.a.bool,loadHeight:h.a.number,loadText:h.a.bool},v.defaultProps={invertChangeColor:!1,loadSmall:!0,loadCompressed:!0,loadHeight:46,loadText:!1},t.a=Object(b.a)(v)}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(41),r=a(80);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=e.createElement(i.a
|
7 |
+
/* translators: %s: Module name */,{title:Object(n.sprintf)(Object(n.__)("%s Gathering Data","google-site-kit"),t)
|
8 |
+
/* translators: %s: Module name */,description:Object(n.sprintf)(Object(n.__)("%s data is not yet available, please check back later.","google-site-kit"),t)});return Object(r.a)(c,a,o,s)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(3),r=a(41),o=a(80),s=a(163);t.a=function(t,a){var c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]&&arguments[4],d=e.createElement(r.a
|
9 |
+
/* translators: %s: module name */,{title:Object(n.sprintf)(Object(n.__)("Data error in %s","google-site-kit"),t),description:a,error:!0});return"Invalid Credentials"===a&&Object(i.v)(s.a),Object(o.a)(d,c,l,u)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i,r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(18),p=a.n(m),h=a(9),b=a.n(h),f=a(4),v=a.n(f),y=a(1),_=a(2),k=a.n(_),O=a(0),E=a(12),S=a(44);function j(){var t;return v.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(!i){a.next=2;break}return a.abrupt("return",i);case 2:return e.google&&e.google.charts?i=Promise.resolve():((t=document.createElement("script")).type="text/javascript",i=new Promise((function(a){t.onload=a,e.document.head.appendChild(t),t.src="https://www.gstatic.com/charts/loader.js"}))),a.abrupt("return",i);case 4:case"end":return a.stop()}}))}var D=function(t){function GoogleChart(e){var t;return o()(this,GoogleChart),(t=u()(this,g()(GoogleChart).call(this,e))).state={loading:!0,chart:null},t.onChartsLoad=t.onChartsLoad.bind(p()(t)),t.waitForChart=t.waitForChart.bind(p()(t)),t.getData=t.getData.bind(p()(t)),t.prepareChart=t.prepareChart.bind(p()(t)),t.drawChart=t.drawChart.bind(p()(t)),t.updateChart=t.updateChart.bind(p()(t)),t.chartRef=Object(y.h)(),t.resize=Object(E.debounce)(t.drawChart,100),t}return b()(GoogleChart,t),c()(GoogleChart,[{key:"onChartsLoad",value:function(){this.getData(),this.prepareChart(),this.drawChart(),this.setState({loading:!1})}},{key:"componentDidMount",value:function(){return v.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v.a.awrap(j());case 2:e.google.charts.load("current",{packages:["corechart"]}),e.google.charts.setOnLoadCallback(this.onChartsLoad),e.addEventListener("resize",this.resize);case 5:case"end":return t.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props.selectedStats;0!==t.length&&JSON.stringify(t)!==JSON.stringify(e.selectedStats)&&this.updateChart()}},{key:"componentWillUnmount",value:function(){e.removeEventListener("resize",this.resize)}},{key:"waitForChart",value:function(e){setTimeout((function(){e()}),500)}},{key:"getData",value:function(){return e.google&&e.google.visualization&&e.google.visualization.arrayToDataTable(this.props.data)}},{key:"prepareChart",value:function(){var t=this.chartRef.current;if(e.google&&t){var a="pie"===this.props.chartType?new e.google.visualization.PieChart(t):new e.google.visualization.LineChart(t);this.setState({chart:a})}else this.waitForChart(this.prepareChart)}},{key:"drawChart",value:function(){var e=this.state.chart,t=this.props,a=t.selectedStats,n=t.options,i=this.getData();null!==i&&null!==e?(e.draw(i,n),0!==a.length&&this.updateChart()):this.waitForChart(this.drawChart)}},{key:"updateChart",value:function(){var t=this.state.chart,a=this.props,n=a.selectedStats,i=a.options,r=a.singleStat,o=this.getData();if(null!==o&&null!==t){var s=new e.google.visualization.DataView(o);if(!r){var c=[0];c=c.concat(n.map((function(e){return e+1}))),s.setColumns(c)}t.draw(s,i)}else this.waitForChart(this.drawChart)}},{key:"render",value:function(){var e=this.state.loading,t=this.props,a=t.className,i=t.loadSmall,r=t.loadCompressed,o=t.loadHeight,s=t.loadText;return n.createElement("div",{className:"googlesitekit-graph-wrapper"},n.createElement("div",{ref:this.chartRef,className:"googlesitekit-line-chart"},n.createElement("div",{className:"googlesitekit-chart-loading"},e&&n.createElement("div",{className:"googlesitekit-chart-loading__wrapper"},s&&n.createElement("p",null,Object(O.__)("Loading chart…","google-site-kit")),n.createElement(S.a,{className:a,small:i,compress:r,height:o})))))}}]),GoogleChart}(y.a);D.propTypes={selectedStats:k.a.array,options:k.a.object.isRequired,id:k.a.string,singleStat:k.a.bool,className:k.a.string,loadSmall:k.a.bool,loadCompressed:k.a.bool,loadHeight:k.a.number,loadText:k.a.bool},D.defaultProps={selectedStats:[],id:"",singleStat:!0,className:"",loadSmall:!1,loadCompressed:!1,loadHeight:null,loadText:!0},t.a=D}).call(this,a(16),a(10))},function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return i}));var n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},i=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()}},,function(e,t,a){"use strict";(function(e){a.d(t,"b",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"a",(function(){return g})),a.d(t,"c",(function(){return m}));var n,i=a(4),r=a.n(i),o=(a(81),["localStorage","sessionStorage"]),s=[].concat(o),c=function(t){var a,n;return r.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=e[t]){i.next=3;break}return i.abrupt("return",!1);case 3:return i.prev=3,n="__storage_test__",a.setItem(n,n),a.removeItem(n),i.abrupt("return",!0);case 10:return i.prev=10,i.t0=i.catch(3),i.abrupt("return",i.t0 instanceof DOMException&&(22===i.t0.code||1014===i.t0.code||"QuotaExceededError"===i.t0.name||"NS_ERROR_DOM_QUOTA_REACHED"===i.t0.name)&&0!==a.length);case 13:case"end":return i.stop()}}),null,null,[[3,10]])},l=function(){var t,a,i,o,l,u;return r.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(!(e._googlesitekitLegacyData&&e._googlesitekitLegacyData.admin&&e._googlesitekitLegacyData.admin.nojscache)){d.next=2;break}return d.abrupt("return",null);case 2:if(void 0!==n){d.next=34;break}t=!0,a=!1,i=void 0,d.prev=6,o=s[Symbol.iterator]();case 8:if(t=(l=o.next()).done){d.next=19;break}if(u=l.value,!n){d.next=12;break}return d.abrupt("continue",16);case 12:return d.next=14,r.a.awrap(c(u));case 14:if(!d.sent){d.next=16;break}n=e[u];case 16:t=!0,d.next=8;break;case 19:d.next=25;break;case 21:d.prev=21,d.t0=d.catch(6),a=!0,i=d.t0;case 25:d.prev=25,d.prev=26,t||null==o.return||o.return();case 28:if(d.prev=28,!a){d.next=31;break}throw i;case 31:return d.finish(28);case 32:return d.finish(25);case 33:void 0===n&&(n=null);case 34:return d.abrupt("return",n);case 35:case"end":return d.stop()}}),null,null,[[6,21,25,33],[26,,28,32]])},u=function(e){var t,a,n,i,o=arguments;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:null,s.next=3,r.a.awrap(l());case 3:if(!(a=s.sent)){s.next=10;break}if(!(n=a.getItem("".concat("googlesitekit_").concat(e)))){s.next=10;break}if(!(i=JSON.parse(n)).timestamp||!(null===t||Math.round(Date.now()/1e3)-i.timestamp<t)){s.next=10;break}return s.abrupt("return",{cacheHit:!0,value:i.value});case 10:return s.abrupt("return",{cacheHit:!1,value:void 0});case 11:case"end":return s.stop()}}))},d=function(t,a){var n,i,o=arguments;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:void 0,s.next=3,r.a.awrap(l());case 3:if(!(i=s.sent)){s.next=14;break}return s.prev=5,i.setItem("".concat("googlesitekit_").concat(t),JSON.stringify({timestamp:n||Math.round(Date.now()/1e3),value:a})),s.abrupt("return",!0);case 10:return s.prev=10,s.t0=s.catch(5),e.console.warn("Encountered an unexpected storage error:",s.t0),s.abrupt("return",!1);case 14:return s.abrupt("return",!1);case 15:case"end":return s.stop()}}),null,null,[[5,10]])},g=function(t){var a;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.a.awrap(l());case 2:if(!(a=n.sent)){n.next=13;break}return n.prev=4,a.removeItem("".concat("googlesitekit_").concat(t)),n.abrupt("return",!0);case 9:return n.prev=9,n.t0=n.catch(4),e.console.warn("Encountered an unexpected storage error:",n.t0),n.abrupt("return",!1);case 13:return n.abrupt("return",!1);case 14:case"end":return n.stop()}}),null,null,[[4,9]])},m=function(){var t,a,n,i;return r.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.a.awrap(l());case 2:if(!(t=o.sent)){o.next=14;break}for(o.prev=4,a=[],n=0;n<t.length;n++)0===(i=t.key(n)).indexOf("googlesitekit_")&&a.push(i.substring("googlesitekit_".length));return o.abrupt("return",a);case 10:return o.prev=10,o.t0=o.catch(4),e.console.warn("Encountered an unexpected storage error:",o.t0),o.abrupt("return",[]);case 14:return o.abrupt("return",[]);case 15:case"end":return o.stop()}}),null,null,[[4,10]])}}).call(this,a(16))},,function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"g",(function(){return s})),a.d(t,"f",(function(){return c})),a.d(t,"a",(function(){return l})),a.d(t,"i",(function(){return u})),a.d(t,"h",(function(){return d})),a.d(t,"k",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"j",(function(){return p})),a.d(t,"l",(function(){return h})),a.d(t,"o",(function(){return b})),a.d(t,"n",(function(){return f}));var n="none",i="multiple",r="disapproved",o="graylisted",s="pending",c="no-client",l="approved",u="none",d="added",g=function(e){var t=e.accounts,a=e.clients,r=e.alerts,s=e.error,u=e.previousAccountID,d=e.previousClientID;return void 0===t||void 0===u?v(s):p({accounts:t,previousAccountID:u})?void 0!==a&&void 0!==d?void 0===r?y(s):r.some((function(e){return"GRAYLISTED_PUBLISHER"===e.type}))?o:h({clients:a,previousClientID:d})?l:c:void 0:t.length?i:n},m=function(e){var t=e.urlChannels,a=e.siteURL;if(void 0!==t&&void 0!==a)return t.some((function(e){return 0<=a.indexOf(e.urlPattern)}))?d:u},p=function(e){var t=e.accounts,a=e.previousAccountID;if(void 0!==t&&t.length){if(t.length>1){if(!a)return;return t.reduce((function(e,t){return t.id===a?a:e}),void 0)}return t[0].id}},h=function(e){var t=e.clients,a=e.previousClientID;if(void 0!==t){var n=t.filter((function(e){return"AFC"===e.productCode}));if(n.length){if(n.length>1&&a){var i=n.reduce((function(e,t){return t.id===a?a:e}),"");if(i)return i}return n[0].id}}},b=function(e){return e===o||e===s},f=function(e){return v(e)||y(e)},v=function(e){return _(e,"noAdSenseAccount")?n:_(e,"disapprovedAccount")?r:void 0},y=function(e){if(_(e,"accountPendingReview"))return s},_=function(e,t){return!(!e||!e.data)&&t===e.data.reason}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}));var n="core",i="modules"},,,,,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(0),y=a(25),_=function(t){function SourceLink(){return i()(this,SourceLink),c()(this,u()(SourceLink).apply(this,arguments))}return g()(SourceLink,t),o()(SourceLink,[{key:"render",value:function(){var t=this.props,a=t.name,n=t.href,i=t.className,r=t.external;return e.createElement("div",{className:f()("googlesitekit-source-link",i)},[Object(v.__)("Source:","google-site-kit")," ",e.createElement(y.a,{key:"link",href:n,external:r,inherit:!0},a)])}}]),SourceLink}(m.a);_.propTypes={name:h.a.string,href:h.a.string,className:h.a.string,external:h.a.bool},_.defaultProps={name:"",href:"",className:"",external:!1},t.a=_}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(17),h=a.n(p),b=a(2),f=a.n(b),v=a(13),y=a(30),_=a(144),k=function(t){function PageHeader(){return i()(this,PageHeader),c()(this,u()(PageHeader).apply(this,arguments))}return g()(PageHeader,t),o()(PageHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.icon,i=t.iconWidth,r=t.iconHeight,o=t.iconID,s=t.className,c=t.status,l=t.statusText,u=t.fullWidth?"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-12\n\t\t\t":"\n\t\t\tmdc-layout-grid__cell\n\t\t\tmdc-layout-grid__cell--span-4-phone\n\t\t\tmdc-layout-grid__cell--span-4-tablet\n\t\t\tmdc-layout-grid__cell--span-6-desktop\n\t\t\t",d=Object(v.c)("googlesitekit.showDateRangeSelector-".concat(o),!1),g=!(""===c&&!d);return e.createElement("header",{className:"googlesitekit-page-header"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:u},n&&e.createElement(y.a,{id:o,height:r,width:i,className:"googlesitekit-page-header__icon"}),e.createElement("h1",{className:h()("googlesitekit-page-header__title",s)},a)),g&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--align-right-tablet mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement("div",{className:"googlesitekit-page-header__details"},c&&e.createElement("span",{className:h()("googlesitekit-page-header__status","googlesitekit-page-header__status--".concat(c))},l),d&&e.createElement("span",{className:"googlesitekit-page-header__range"},e.createElement(_.a,null))))))}}]),PageHeader}(m.a);k.propTypes={title:f.a.string,icon:f.a.bool,iconID:f.a.string,iconWidth:f.a.string,iconHeight:f.a.string,className:f.a.string,status:f.a.string,statusText:f.a.string,fullWidth:f.a.bool},k.defaultProps={title:"",icon:!1,iconID:"",iconWidth:"",iconHeight:"",className:"googlesitekit-heading-3",status:"",statusText:"",fullWidth:!1},t.a=k}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return i}));var n=a(109),i=a.n(n)()(e)}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(1),i=a(26);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.createElement(n.b,null,a&&r&&o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(i.a,{fill:!0},e.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))))),a&&!r&&o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(i.a,{fill:!0},e.createElement("div",{className:"mdc-layout-grid mdc-layout-grid--fill"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))))),a&&r&&!o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},t),a&&!r&&!o&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},t),!a&&!r&&o&&e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},t))),!a&&!r&&!o&&t)}}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(25);t.a=function HelpLink(){var t=Object(n.__)("Need help?","google-site-kit");return e.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(133),b=a(158),f=a(160),v=function(t){function Header(){return r()(this,Header),l()(this,d()(Header).apply(this,arguments))}return m()(Header,t),s()(Header,[{key:"render",value:function(){var t=e._googlesitekitLegacyData.setup.isAuthenticated;return n.createElement(p.b,null,n.createElement("header",{className:"googlesitekit-header"},n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(h.a,null)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&n.createElement(b.a,null))))),n.createElement(f.a,null))}}]),Header}(p.a);t.a=v}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(34),h=function(t){function GenericError(){return i()(this,GenericError),c()(this,u()(GenericError).apply(this,arguments))}return g()(GenericError,t),o()(GenericError,[{key:"render",value:function(){return e.createElement(p.a,this.props)}}]),GenericError}(m.a);t.a=h}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function ModuleSettingsWarning(){return i()(this,ModuleSettingsWarning),c()(this,u()(ModuleSettingsWarning).apply(this,arguments))}return g()(ModuleSettingsWarning,e),o()(ModuleSettingsWarning,[{key:"render",value:function(){return null}}]),ModuleSettingsWarning}(a(1).a);t.a=Object(m.a)("googlesitekit.ModuleSettingsWarning")(p)},function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"c",(function(){return y})),a.d(t,"b",(function(){return _}));var n=a(49),i=a.n(n),r=a(11),o=a.n(r),s=a(4),c=a.n(s),l=a(20),u=a.n(l),d=a(15),g=a.n(d),m=a(68);function p(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var b=g.a.createRegistryControl,f=function(e){var t;u()(e,"storeName is required to create a snapshot store.");var a={},n={deleteSnapshot:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})),restoreSnapshot:c.a.mark((function e(){var t,a,n,i,r,o,s=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},a=t.clearAfterRestore,n=void 0===a||a,e.next=3,{payload:{},type:"RESTORE_SNAPSHOT"};case 3:if(i=e.sent,r=i.cacheHit,o=i.value,!r){e.next=12;break}return e.next=9,{payload:{snapshot:o},type:"SET_STATE_FROM_SNAPSHOT"};case 9:if(!n){e.next=12;break}return e.next=12,{payload:{},type:"DELETE_SNAPSHOT"};case 12:return e.abrupt("return",r);case 13:case"end":return e.stop()}}),e)})),createSnapshot:c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"CREATE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))},r=(t={},o()(t,"DELETE_SNAPSHOT",(function(){return Object(m.a)("datastore::cache::".concat(e))})),o()(t,"CREATE_SNAPSHOT",b((function(t){return function(){return Object(m.d)("datastore::cache::".concat(e),t.stores[e].store.getState())}}))),o()(t,"RESTORE_SNAPSHOT",(function(){return Object(m.b)("datastore::cache::".concat(e),3600)})),t);return{INITIAL_STATE:a,actions:n,controls:r,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.payload;switch(n){case"SET_STATE_FROM_SNAPSHOT":var o=r.snapshot,s=(o.error,i()(o,["error"]));return h({},s);default:return h({},e)}}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Object.values(e.stores).filter((function(e){return Object.keys(e.getActions()).includes("restoreSnapshot")}))},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().createSnapshot()})))},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().restoreSnapshot()})))}},,,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(2),v=a.n(f),y=a(0),_=a(3),k=a(103),O=a(14),E=a(41),S=a(84),j=function(t){function AnalyticsInactiveCTA(){return s()(this,AnalyticsInactiveCTA),d()(this,m()(AnalyticsInactiveCTA).apply(this,arguments))}return h()(AnalyticsInactiveCTA,t),l()(AnalyticsInactiveCTA,[{key:"render",value:function(){var t=this.props,a=t.title,i=void 0===a?Object(y.__)("Learn more about what visitors do on your site.","google-site-kit"):a,r=t.description,o=void 0===r?Object(y.__)("Connecting with Google Analytics to see unique vistors, goal completions, top pages and more.","google-site-kit"):r,s=t.ctaLabel,c=void 0===s?Object(y.__)("Set up Analytics","google-site-kit"):s;return e._googlesitekitLegacyData.permissions.canManageOptions?n.createElement(E.a,{title:i,description:o,onClick:AnalyticsInactiveCTA.setupAnalyticsClick,ctaLabel:c}):null}}],[{key:"setupAnalyticsClick",value:function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(Object(_.b)(O.c,"analytics",!0));case 3:return t.next=5,r.a.awrap(Object(k.a)());case 5:e.location=Object(_.m)("analytics",!0),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),Object(_.v)(S.a,{id:"analytics-setup-error",title:Object(y.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"});case 11:case"end":return t.stop()}}),null,null,[[0,8]])}}]),AnalyticsInactiveCTA}(b.a);j.propTypes={title:v.a.string,description:v.a.string,ctaLabel:v.a.string},j.defaultProps={},t.a=j}).call(this,a(16),a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return d.b}));var n=a(15),i=a.n(n),r=a(4),o=a.n(r),s=a(11),c=a.n(s),l=a(42),u=a.n(l),d=a(24),g=a(43);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var p=i.a.createRegistrySelector,h=Object(g.a)({baseName:"getAuthentication",controlCallback:function(){return u.a.get("core","user","authentication",void 0,{useCache:!1})},reducerCallback:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},e,{authentication:t})}}),b={authentication:void 0},f={getAuthentication:o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.commonActions.getRegistry();case 2:if(t=e.sent,(0,t.select)(d.b).getAuthentication()){e.next=7;break}return e.next=7,h.actions.fetchGetAuthentication();case 7:case"end":return e.stop()}}),e)}))},v={getAuthentication:function(e){return e.authentication},isAuthenticated:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).authenticated}})),getGrantedScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).grantedScopes}})),getRequiredScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).requiredScopes}})),getUnsatisfiedScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).unsatisfiedScopes}})),needsReauthentication:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).needsReauthentication}}))},y=i.a.combineStores(h,{INITIAL_STATE:b,resolvers:f,selectors:v}),_=(y.INITIAL_STATE,y.actions,y.controls,y.reducer,y.resolvers,y.selectors,y);function k(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var O=i.a.createRegistrySelector,E=Object(g.a)({baseName:"disconnect",controlCallback:function(){return u.a.set("core","user","disconnect")},reducerCallback:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?k(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):k(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},e,{disconnected:t})}}),S={disconnected:void 0},j={disconnect:o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,E.actions.fetchDisconnect();case 2:case"end":return e.stop()}}),e)}))},D={isDoingDisconnect:O((function(e){return function(){return e(d.b).isFetchingDisconnect()}}))},w=i.a.combineStores(E,{INITIAL_STATE:S,actions:j,selectors:D}),C=(w.INITIAL_STATE,w.actions,w.controls,w.reducer,w.resolvers,w.selectors,w);function A(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var N={INITIAL_STATE:{error:void 0},actions:{},controls:{},reducer:function(e){return function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?A(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):A(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},e)},resolvers:{},selectors:{getError:function(e){return e.error}}},x=a(110),P=Object(x.a)("core","user","notifications",{server:!1}),T=a(20),L=a.n(T);function I(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function R(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(a,!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var M={INITIAL_STATE:{permissionError:null},actions:{clearPermissionScopeError:function(){return{payload:{},type:"CLEAR_PERMISSION_SCOPE_ERROR"}},setPermissionScopeError:function(e){return L()(e,"permissionError is required."),{payload:{permissionError:e},type:"SET_PERMISSION_SCOPE_ERROR"}}},controls:{},reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"CLEAR_PERMISSION_SCOPE_ERROR":return R({},e,{permissionError:null});case"SET_PERMISSION_SCOPE_ERROR":return R({},e,{permissionError:n.permissionError});default:return R({},e)}},resolvers:{},selectors:{getPermissionScopeError:function(e){return e.permissionError}}},W=a(128),U=i.a.combineStores(i.a.commonStore,_,C,N,P,M,W.a);U.INITIAL_STATE,U.actions,U.controls,U.reducer,U.resolvers,U.selectors;i.a.registerStore(d.b,U)},,,function(e,t,a){"use strict";function n(e){return"string"==typeof e&&!!e.match(/^pub-\d+$/)}function i(e){return"string"==typeof e&&!!e.match(/^ca-pub-\d+$/)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}))},function(e,t,a){"use strict";(function(e,n){var i=a(38),r=a.n(i),o=(a(1),a(156)),s=a.n(o),c=a(0),l=a(15),u=a.n(l),d=a(34),g=a(3),m=a(24),p=u.a.useSelect,h={siteverification:"site-verification",webmasters:"search-console"};t.a=function DashboardAuthAlert(){var t,a,i,o,l,u=p((function(e){return e(m.b).getUnsatisfiedScopes()})),b=p((function(t){return t(m.b).getConnectURL({redirectURL:e.location.href})}));if(void 0===u||void 0===b)return null;switch(u.some((function(e){return!e.match(/^https:\/\/www.googleapis.com\/auth\//)}))?t="generic":(i=u,o=Object(g.k)(),t=(a=i.map((function(e){return e.match(/^https:\/\/www.googleapis.com\/auth\/([a-z]+)/)})).map((function(e){var t=r()(e,2)[1];return h[t]||t})).map((function(e){var t;return(null===(t=o[e])||void 0===t?void 0:t.name)||!1}))).some((function(e){return!1===e}))?"generic":1<(a=s()(a)).length?"multiple":"single"),t){case"multiple":
|
10 |
+
/* translators: used between list items, there is a space after the comma. */
|
11 |
+
var f=Object(c.__)(", ","google-site-kit");l=Object(c.sprintf)(
|
12 |
+
/* translators: %s: List of product names */
|
13 |
+
Object(c.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for: %s – make sure to approve all permissions at the authentication stage.","google-site-kit"),a.join(f));break;case"single":l=Object(c.sprintf)(
|
14 |
+
/* translators: %1$s: Product name */
|
15 |
+
Object(c.__)("Site Kit can’t access the relevant data from %1$s because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for %1$s – make sure to approve all permissions at the authentication stage.","google-site-kit"),a[0]);break;case"generic":l=Object(c.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup – make sure to approve all permissions at the authentication stage.","google-site-kit")}return n.createElement(d.a,{id:"authentication error",title:Object(c.__)("Site Kit can’t access necessary data","google-site-kit"),description:l,format:"small",type:"win-error",isDismissable:!1,ctaLink:b,ctaLabel:Object(c.__)("Redo setup","google-site-kit")})}}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(2),i=a.n(n),r=function DisplaySetting(e){return e.value||" "};r.propTypes={value:i.a.oneOfType([i.a.string,i.a.bool,i.a.number])},t.a=r},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(203),f=a.n(b),v=a(17),y=a.n(v),_=a(142),k=a(0),O=a(39),E=a(25),S=a(32),j=function(t){function Dialog(){var e;return i()(this,Dialog),(e=c()(this,u()(Dialog).call(this))).state={attributes:[Object(k.__)("Audience overview","google-site-kit"),Object(k.__)("Top pages","google-site-kit"),Object(k.__)("Top acquisition sources","google-site-kit"),Object(k.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(m.h)(),e}return g()(Dialog,t),o()(Dialog,[{key:"componentDidMount",value:function(){new S.d(this.dialogRef.current)}},{key:"render",value:function(){var t=this.props,a=t.dialogActive,n=t.handleDialog,i=t.title,r=t.provides,o=t.handleConfirm,s=t.subtitle,c=t.confirmButton,l=t.dependentModules,u=t.instanceId,d=t.danger,g="googlesitekit-dialog-label-".concat(u),m="googlesitekit-dialog-description-".concat(u),p=!(!r||!r.length);return e.createElement("div",{ref:this.dialogRef,className:y()("mdc-dialog",{"mdc-dialog--open":a}),role:"alertdialog","aria-modal":"true","aria-labelledby":i?g:void 0,"aria-describedby":p?m:void 0,"aria-hidden":a?"false":"true",tabIndex:"-1"},e.createElement("div",{className:"mdc-dialog__scrim"}," "),e.createElement(f.a,{active:a},e.createElement("div",null,e.createElement("div",{className:"mdc-dialog__container"},e.createElement("div",{className:"mdc-dialog__surface"},i&&e.createElement("h2",{id:g,className:"mdc-dialog__title"},i),s&&e.createElement("p",{className:"mdc-dialog__lead"},s),p&&e.createElement("section",{id:m,className:"mdc-dialog__content"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},r.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),l&&e.createElement("p",{className:"mdc-dialog__dependecies"},e.createElement("strong",null,Object(k.__)("Note: ","google-site-kit")),l),e.createElement("footer",{className:"mdc-dialog__actions"},e.createElement(O.a,{onClick:o,danger:d},c||Object(k.__)("Disconnect","google-site-kit")),e.createElement(E.a,{className:"mdc-dialog__cancel-button",onClick:function(){return n()},inherit:!0},Object(k.__)("Cancel","google-site-kit"))))))))}}]),Dialog}(m.a);j.propTypes={dialogActive:h.a.bool,handleDialog:h.a.func,handleConfirm:h.a.func.isRequired,title:h.a.string,description:h.a.string,confirmButton:h.a.string,danger:h.a.bool},j.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null,danger:!1},t.a=Object(_.a)(j)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(2),f=a.n(b),v=a(0),y=a(14),_=a(34),k=function(t){function Alert(e){var t;return o()(this,Alert),(t=u()(this,g()(Alert).call(this,e))).state={isLoading:!0,alerts:[],error:!1,message:""},t}return p()(Alert,t),c()(Alert,[{key:"componentDidMount",value:function(){this.getAlert()}},{key:"getAlert",value:function(){var e,t;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.props.module,a.next=4,i.a.awrap(y.c.get(y.b,e,"notifications",{},!1));case 4:t=a.sent,this.setState({isLoading:!1,error:!1,alerts:t}),a.next=11;break;case 8:a.prev=8,a.t0=a.catch(0),this.setState({isLoading:!1,error:a.t0.code});case 11:case"end":return a.stop()}}),null,this,[[0,8]])}},{key:"render",value:function(){var t=this.state,a=t.alerts,n=t.error,i=t.isLoading;if(n||i||!a||!a.length)return null;var r=a.map((function(t){return e.createElement(_.a,{id:t.id,key:t.id,title:t.title,description:t.message||t.description,dismiss:Object(v.__)("Dismiss","google-site-kit"),isDismissable:t.isDismissible,format:"small",ctaLink:t.ctaURL,ctaLabel:t.ctaLabel,ctaTarget:t.ctaTarget,type:t.severity})}));return e.createElement(h.b,null,r)}}]),Alert}(h.a);k.propTypes={module:f.a.string.isRequired},t.a=k}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(11),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(2),v=a.n(f),y=a(0),_=a(3),k=a(65),O=a(23),E=a(14),S=a(25),j=a(28),D=a(19);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var C=function(t){function DashboardAcquisitionPieChart(){return s()(this,DashboardAcquisitionPieChart),d()(this,m()(DashboardAcquisitionPieChart).apply(this,arguments))}return h()(DashboardAcquisitionPieChart,t),l()(DashboardAcquisitionPieChart,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.source;if(!a||a.error||!a.length)return null;var i=Object(D.e)(a);return e.createElement("div",{className:"googlesitekit-chart googlesitekit-chart--pie"},e.createElement(k.a,{data:i,options:{chartArea:{width:"100%",height:"100%"},backgroundColor:"transparent",height:250,legend:{alignment:"center",textStyle:{color:"#5b5b61",fontSize:12}},slices:{0:{color:"#178EC5"},1:{color:"#54B23B"},2:{color:"#EB5729"},3:{color:"#ECED33"},4:{color:"#34CBE3"},5:{color:"#82E88E"}},title:null,width:"100%"},chartType:"pie",id:"overview-piechart",loadHeight:205}),n&&e.createElement("div",{className:"googlesitekit-chart__source"},[Object(y.__)("Source:","google-site-kit")," ",e.createElement(S.a,{key:"link",href:Object(_.n)("googlesitekit-module-analytics"),inherit:!0},Object(y._x)("Analytics","Service name","google-site-kit"))]))}}]),DashboardAcquisitionPieChart}(b.a);C.defaultProps={source:!1},C.propTypes={source:v.a.bool},t.a=Object(O.a)(C,[{type:E.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},D.r,{url:n._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(_.o)("day"),context:["Dashboard","Single"]}],e.createElement(j.a,{width:"282px",height:"282px",shape:"circular"}),{},D.h,D.f)}).call(this,a(10),a(16))},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=function(e){function Modal(e){var t;return i()(this,Modal),(t=c()(this,u()(Modal).call(this,e))).el=document.createElement("div"),t.root=document.querySelector(".googlesitekit-plugin")||document.body,t}return g()(Modal,e),o()(Modal,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(m.g)(this.props.children,this.el)}}]),Modal}(m.a)},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return u}));var n=a(4),i=a.n(n),r=a(11),o=a.n(r),s=a(14);function c(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?c(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var u=function(){var t,a,n,r,o,c;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,i.a.awrap(s.c.get(s.a,"user","authentication",{timestamp:Date.now()}));case 3:t=u.sent,a=t.authenticated,n=t.requiredScopes,r=t.grantedScopes,o=t.unsatisfiedScopes,c=void 0===o?[]:o,e._googlesitekitLegacyData.setup=l({},e._googlesitekitLegacyData.setup||{},{isAuthenticated:a,requiredScopes:n,grantedScopes:r,unsatisfiedScopes:c,needReauthenticate:0<c.length}),u.next=14;break;case 12:u.prev=12,u.t0=u.catch(0);case 14:case"end":return u.stop()}}),null,null,[[0,12]])}}).call(this,a(16))},,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r}));var n=a(40),i=a(29),r=function(t,a,r){var o=Object(i.c)(t,a,r);Object(i.d)(),Object.keys(e._googlesitekitLegacyData.admin.datacache).forEach((function(t){0!==t.indexOf(o+"::")&&t!==o||delete e._googlesitekitLegacyData.admin.datacache[t]})),Object.keys(Object(n.a)()).forEach((function(e){0!==e.indexOf("googlesitekit_".concat(o,"::"))&&e!=="googlesitekit_".concat(o)||Object(n.a)().removeItem(e)}))}}).call(this,a(16))},,function(e,t,a){"use strict";a.d(t,"d",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return c}));var n=a(206),i=a(37),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.siteURL,a="https://www.google.com/adsense/signup/new",n={source:"site-kit",utm_source:"site-kit",utm_medium:"wordpress_signup"};return t&&(n.url=t),Object(i.a)(a,n)},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.userEmail,n=l({accountID:t,userEmail:a,path:"/home"});return Object(i.a)(n,{source:"site-kit"})},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.siteURL,n=e.userEmail,r=l({accountID:t,userEmail:n,path:"/sites/my-sites"}),o={source:"site-kit"};return a&&(o.url=u(a)||a),Object(i.a)(r,o)},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.siteURL,n=e.userEmail,r=l({accountID:t,userEmail:n,path:"/myads/sites/preview"}),o={source:"site-kit"};return a&&(o.url=u(a)||a),Object(i.a)(r,o)},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.accountID,a=e.userEmail,n=e.path,i=void 0===n?"/home":n,r="https://www.google.com/adsense/new";return a&&(r+="/u/".concat(a)),t&&(r+="/".concat(t),i&&(r+=i)),r},u=function(e){var t=new URL(e);return Object(n.parse)(t.hostname).domain}},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return b}));var n=a(4),i=a.n(n),r=a(11),o=a.n(r),s=a(20),c=a.n(s),l=a(42),u=a.n(l),d=a(15),g=a.n(d),m=a(43);function p(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function h(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var b=function(t,a,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.client,l=void 0===s||s,d=r.server,p=void 0===d||d,b=r.storeName,f=void 0===b?void 0:b;c()(t,"type is required."),c()(a,"identifier is required."),c()(n,"datapoint is required.");var v=f||"".concat(t,"/").concat(a),y={serverNotifications:p?void 0:{},clientNotifications:l?void 0:{}},_=Object(m.a)({baseName:"getNotifications",controlCallback:function(){return u.a.get(t,a,n)},reducerCallback:function(e,t){return h({},e,{serverNotifications:t.reduce((function(e,t){return h({},e,o()({},t.id,t))}),{})})}}),k={addNotification:function(e){return c()(e,"notification is required."),{payload:{notification:e},type:"ADD_NOTIFICATION"}},removeNotification:function(e){return c()(e,"id is required."),{payload:{id:e},type:"REMOVE_NOTIFICATION"}}},O={},E=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,a=arguments.length>1?arguments[1]:void 0,n=a.type,i=a.payload;switch(n){case"ADD_NOTIFICATION":var r=i.notification;return h({},t,{clientNotifications:h({},t.clientNotifications||{},o()({},r.id,r))});case"REMOVE_NOTIFICATION":var s=i.id;if(void 0===t.clientNotifications||void 0===t.clientNotifications[s])return void 0!==t.serverNotifications&&void 0!==t.serverNotifications[s]&&e.console.warn('Cannot remove server-side notification with ID "'.concat(s,'"; this may be changed in a future release.')),h({},t);var c=h({},t.clientNotifications);return delete c[s],h({},t,{clientNotifications:c});default:return h({},t)}},S={getNotifications:i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_.actions.fetchGetNotifications();case 2:case"end":return e.stop()}}),e)}))};p||delete S.getNotifications;var j={getNotifications:function(e){var t=e.serverNotifications,a=e.clientNotifications;return void 0===t&&void 0===a?t:Object.values(h({},t||{},{},a||{}))}},D=g.a.combineStores(_,{INITIAL_STATE:y,actions:k,controls:O,reducer:E,resolvers:S,selectors:j});return h({},D,{STORE_NAME:v})}}).call(this,a(16))},,,,function(e,t,a){"use strict";(function(e){a(1);t.a=function Warning(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(142),y=a(32),_=function(t){function Switch(e){var t;return i()(this,Switch),(t=c()(this,u()(Switch).call(this,e))).switchRef=Object(m.h)(),t}return g()(Switch,t),o()(Switch,[{key:"componentDidMount",value:function(){new y.h(this.switchRef.current)}},{key:"render",value:function(){var t=this.props,a=t.id,n=void 0===a?"googlesitekit-switch-".concat(this.props.instanceId):a,i=t.onClick,r=t.label,o=t.checked,s=t.disabled,c=t.hideLabel;return e.createElement(m.b,null,e.createElement("div",{"aria-checked":o?"true":"false",className:f()("mdc-switch",{"mdc-switch--checked":o,"mdc-switch--disabled":s}),onClick:i,onKeyPress:function(e){"function"==typeof i&&"Enter"===e.code&&i(e)},role:"switch",ref:this.switchRef,tabIndex:0},e.createElement("div",{className:"mdc-switch__track"}," "),e.createElement("div",{className:"mdc-switch__thumb-underlay"},e.createElement("div",{className:"mdc-switch__thumb"},e.createElement("input",{type:"checkbox",id:n,className:"mdc-switch__native-control",role:"switch",checked:o,disabled:s,onChange:function(){}})))),e.createElement("label",{className:f()({"screen-reader-only":c}),htmlFor:n},r))}}]),Switch}(m.a);_.propTypes={id:h.a.string,onClick:h.a.func,label:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,hideLabel:h.a.bool,instanceId:h.a.number.isRequired},_.defaultProps={checked:!1,disabled:!1,hideLabel:!0},t.a=Object(v.a)(_)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(0),r=a(3),o=a(41),s=a(80);t.a=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=Object(r.k)()[t].name,d=e.createElement(o.a
|
16 |
+
/* translators: %s: Module name */,{title:Object(i.sprintf)(Object(i.__)("%s activation","google-site-kit"),u)
|
17 |
+
/* translators: %s: Module name */,description:Object(i.sprintf)(Object(i.__)("%s module needs to be configured","google-site-kit"),u),ctaLabel:Object(i.__)("Complete activation","google-site-kit"),onClick:function(){n.location=Object(r.m)(t,!0)}});return Object(s.a)(d,a,c,l)}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(3),b=a(30),f=a(39),v=function(t){function AdSenseDashboardOutro(){return i()(this,AdSenseDashboardOutro),c()(this,u()(AdSenseDashboardOutro).apply(this,arguments))}return g()(AdSenseDashboardOutro,t),o()(AdSenseDashboardOutro,[{key:"render",value:function(){var t=Object(h.k)().adsense.accountURL;return e.createElement("section",{className:"googlesitekit-module-outro"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("div",{className:"googlesitekit-module-outro__logo"},e.createElement(b.a,{id:"adsense",height:"36",width:"42"}),e.createElement(b.a,{id:"plus",height:"13",width:"13"}),e.createElement(b.a,{id:"analytics",height:"36",width:"34"})),e.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-module-outro__title "},Object(p.__)("Connect Analytics with AdSense to create a powerful team that shows robust metrics for your site.","google-site-kit")),e.createElement("div",{className:"googlesitekit-module-outro__button"},e.createElement(f.a,{href:t,target:"_blank"},Object(p.__)("Connect Accounts","google-site-kit")))))))}}]),AdSenseDashboardOutro}(m.a);t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(11),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(12),v=a(0),y=a(3),_=a(55),k=a(23),O=a(14),E=a(36),S=a(47),j=a(119),D=a(19);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var C=function(t){function AnalyticsDashboardWidgetTopAcquisitionSources(){return s()(this,AnalyticsDashboardWidgetTopAcquisitionSources),d()(this,m()(AnalyticsDashboardWidgetTopAcquisitionSources).apply(this,arguments))}return h()(AnalyticsDashboardWidgetTopAcquisitionSources,t),l()(AnalyticsDashboardWidgetTopAcquisitionSources,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(_.a)(),n=[{title:Object(v.__)("Medium","google-site-kit"),tooltip:Object(v.__)("Medium refers to where your traffic originated from","google-site-kit")},{title:Object(v.__)("Users","google-site-kit"),tooltip:Object(v.__)("Number of users that originated from that traffic","google-site-kit")},{title:Object(v.__)("New Users","google-site-kit"),
|
18 |
+
/* translators: %s: date range */
|
19 |
+
tooltip:Object(v.sprintf)(Object(v.__)("Number of new users to visit your page over last %s","google-site-kit"),a)},{title:Object(v.__)("Sessions","google-site-kit"),
|
20 |
+
/* translators: %s: date range */
|
21 |
+
tooltip:Object(v.sprintf)(Object(v.__)("Number of sessions users had on your website over last %s","google-site-kit"),a)},{title:Object(v.__)("Percentage","google-site-kit"),tooltip:Object(v.__)("Percentage of sessions","google-site-kit")}],i=t[0].data.totals[0].values[0],r=Object(f.map)(t[0].data.rows,(function(t,a){var n=t.metrics[0].values[0]/i*100;return!(1>n)&&[t.dimensions[0],Object(y.r)(t.metrics[0].values[0]),Object(y.r)(t.metrics[0].values[1]),Object(y.r)(t.metrics[0].values[2]),e.createElement(b.b,{key:"minichart-analytics-top-as-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")," ",e.createElement(j.a,{percent:n.toFixed(1),index:a})))]})),o=Object(E.b)(r,n,{hideHeader:!1,chartsEnabled:!1});return e.createElement("div",{className:"googlesitekit-details-widget"},e.createElement(E.a,null,o))}}]),AnalyticsDashboardWidgetTopAcquisitionSources}(b.a);t.a=Object(k.a)(C,[{type:O.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},D.r,{url:n._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(y.o)("day"),context:["Single","Dashboard"]}],e.createElement(S.a,{rows:4,rowHeight:50}),{},D.h)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(65),h=a(173),b=function(t){function MiniChart(){return i()(this,MiniChart),c()(this,u()(MiniChart).apply(this,arguments))}return g()(MiniChart,t),o()(MiniChart,[{key:"render",value:function(){var t=this.props,a=t.index,n=t.percent,i={backgroundColor:"transparent",chartArea:{width:"100%",height:"100%"},enableInteractivity:!1,height:28,legend:{position:"none"},slices:{0:{color:h.a[a]},1:{color:"#e6e6e6"}},title:null,tooltip:{trigger:"none"},width:28},r=[["source","percent"],["",+n],["",100-n]];return e.createElement("div",{className:"googlesitekit-mini-chart"},e.createElement(p.a,{data:r,options:i,chartType:"pie",loadSmall:!0,loadCompressed:!0,loadHeight:24,loadText:!1,id:"minichart"+a}))}}]),MiniChart}(m.a);t.a=b}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return AdSenseLinkCTA}));a(1);var n=a(0),i=a(41);function AdSenseLinkCTA(){return e.createElement(i.a,{title:Object(n.__)("Link Analytics and AdSense","google-site-kit"),description:Object(n.__)("Get reports for your top earning pages by linking your Analytics and AdSense accounts.","google-site-kit"),ctaLink:"https://support.google.com/adsense/answer/6084409",ctaLabel:Object(n.__)("Learn more","google-site-kit")})}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(12),b=a(0),f=a(3),v=a(23),y=a(14),_=a(36),k=a(47),O=function(t){function SearchConsoleDashboardWidgetKeywordTable(){return r()(this,SearchConsoleDashboardWidgetKeywordTable),l()(this,d()(SearchConsoleDashboardWidgetKeywordTable).apply(this,arguments))}return m()(SearchConsoleDashboardWidgetKeywordTable,t),s()(SearchConsoleDashboardWidgetKeywordTable,[{key:"render",value:function(){var t=this.props.data,a=[{title:Object(b.__)("Keyword","google-site-kit"),tooltip:Object(b.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(b.__)("Clicks","google-site-kit"),tooltip:Object(b.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(b.__)("Impressions","google-site-kit"),tooltip:Object(b.__)("Counted each time your content appears in search results","google-site-kit")}],n=Object(f.k)()["search-console"].settings.propertyID,i=[],r=Object(h.map)(t,(function(e,t){var a=e.keys[0];return i[t]=Object(b.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%1$s&query=!%2$s&num_of_days=28",n,a),[a,Object(f.r)(e.clicks),Object(f.r)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(_.b)(r,a,o);return e.createElement(_.a,null,s)}}]),SearchConsoleDashboardWidgetKeywordTable}(p.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n._googlesitekitLegacyData.permaLink,dimensions:"query",limit:10},priority:1,maxAge:Object(f.o)("day"),context:["Single","Dashboard"]}],e.createElement(k.a,{padding:!0}),{createGrid:!0},(function(e){return!e.length}))}).call(this,a(10),a(16))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function DashboardSearchFunnelInner(){return i()(this,DashboardSearchFunnelInner),c()(this,u()(DashboardSearchFunnelInner).apply(this,arguments))}return g()(DashboardSearchFunnelInner,e),o()(DashboardSearchFunnelInner,[{key:"render",value:function(){return null}}]),DashboardSearchFunnelInner}(a(1).a);t.a=Object(m.a)("googlesitekit.DashboardSearchFunnel")(p)},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(93);function i(e){if(Object(n.b)(e))return e.match(/pub-\d+$/)[0]}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return h}));var n=a(4),i=a.n(n),r=a(11),o=a.n(r),s=a(58),c=a(37),l=a(125),u=a(126),d=a(127),g=a(46);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h=function(t){var a,n,r,o,l;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return a=e._googlesitekitLegacyData.admin,n=a.homeURL,r=a.ampMode,o={tagverify:1,timestamp:Date.now()},u.next=4,i.a.awrap(b(Object(c.a)(n,o),t));case 4:if((l=u.sent)||"secondary"!==r){u.next=9;break}return u.next=8,i.a.awrap(Object(s.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,i.a.awrap(b(Object(c.a)(e.link,p({},o,{amp:1})),t));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop()}}))})).pop()})));case 8:l=u.sent;case 9:return u.abrupt("return",Promise.resolve(l||null));case 10:case"end":return u.stop()}}))},b=function(e,t){var a;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return a=n.sent,n.abrupt("return",f(a,t)||null);case 7:return n.prev=7,n.t0=n.catch(0),n.abrupt("return",null);case 10:case"end":return n.stop()}}),null,null,[[0,7]])},f=function(e,t){var a=({adsense:u.a,analytics:d.a,tagmanager:g.d,setup:l.a}[t]||[]).find((function(t){return t.test(e)}));return!!a&&a.exec(e)[1]}}).call(this,a(16))},function(e,t,a){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},function(e,t,a){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},function(e,t,a){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(11),o=a.n(r),s=a(20),c=a.n(s),l=a(37),u=a(15),d=a.n(u),g=a(24);function m(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?m(a,!0).forEach((function(t){o()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):m(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h=d.a.createRegistrySelector,b={connectURL:void 0,user:void 0,verified:void 0},f={receiveConnectURL:function(e){return c()(e,"connectURL is required."),{payload:{connectURL:e},type:"RECEIVE_CONNECT_URL"}},receiveUserInfo:function(e){return c()(e,"userInfo is required."),{payload:{user:e},type:"RECEIVE_USER_INFO"}},receiveUserIsVerified:function(e){return c()(void 0!==e,"userIsVerified is required."),{payload:{verified:e},type:"RECEIVE_USER_IS_VERIFIED"}}},v={getConnectURL:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(a=t.sent,!(0,a.select)(g.b).getConnectURL()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.connectURL,t.next=12,f.receiveConnectURL(n);case 12:case"end":return t.stop()}}),t)})),getUser:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(a=t.sent,void 0===(0,a.select)(g.b).getUser()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.user,t.next=12,f.receiveUserInfo(n);case 12:case"end":return t.stop()}}),t)})),isVerified:i.a.mark((function t(){var a,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(a=t.sent,void 0===(0,a.select)(g.b).isVerified()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return n=e._googlesitekitUserData.verified,t.next=12,f.receiveUserIsVerified(n);case 12:case"end":return t.stop()}}),t)}))},y={getUser:function(e){return e.user},getConnectURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.additionalScopes,n=void 0===a?[]:a,i=t.redirectURL,r=void 0===i?void 0:i,o=e.connectURL,s={redirect:r};if(void 0!==o)return(null==n?void 0:n.length)?Object(l.a)(o,p({},s,{additional_scopes:n})):Object(l.a)(o,s)},getID:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.id:t}})),getName:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.name:t}})),getEmail:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.email:t}})),getPicture:h((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.picture:t}})),isVerified:function(e){return e.verified}};t.a={INITIAL_STATE:b,actions:f,controls:{},reducer:function(e,t){var a=t.type,n=t.payload;switch(a){case"RECEIVE_CONNECT_URL":return p({},e,{connectURL:n.connectURL});case"RECEIVE_USER_INFO":return p({},e,{user:n.user});case"RECEIVE_USER_IS_VERIFIED":return p({},e,{verified:n.verified});default:return p({},e)}},resolvers:v,selectors:y}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){a(1);var n=a(2),i=a.n(n),r=a(17),o=a.n(r);function ChangeArrow(t){var a=t.direction,n=t.invertColor;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(a),{"googlesitekit-change-arrow--inverted-color":n}),width:"9",height:"9",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:i.a.string,invertColor:i.a.bool},ChangeArrow.defaultProps={direction:"up",invertColor:!1},t.a=ChangeArrow}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);t.a=function Error(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},e.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(34);t.a=function DashboardPermissionAlert(){return e.createElement(i.a,{id:"permission error",title:Object(n.__)("Permissions issue accessing data","google-site-kit"),description:Object(n.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})}}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(30);t.a=function Logo(){return e.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},e.createElement(i.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),e.createElement(i.a,{id:"logo-sitekit",className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),e.createElement("span",{className:"screen-reader-text"},Object(n.__)("Site Kit by Google Logo","google-site-kit")))}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return Root}));a(1);var n=a(2),i=a.n(n),r=a(15),o=a.n(r),s=a(135),c=a(136),l=a(137),u=a(138);function Root(t){var a=t.children,n=t.registry,i=t.dataAPIContext,r=t.dataAPIModuleArgs;return e.createElement(o.a.RegistryProvider,{value:n},e.createElement(s.a,null,e.createElement(l.a,null,a,i&&e.createElement(u.a,{context:i,args:r})),e.createElement(c.a,null)))}Root.propTypes={children:i.a.node.isRequired,registry:i.a.object,dataAPIContext:i.a.string,dataAPIModuleArgs:i.a.object},Root.defaultProps={registry:o.a}}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(2),b=a.n(h),f=a(0),v=a(34),y=function(t){function ErrorHandler(e){var t;return r()(this,ErrorHandler),(t=l()(this,d()(ErrorHandler).call(this,e))).state={error:null,info:null},t}return m()(ErrorHandler,t),s()(ErrorHandler,[{key:"componentDidCatch",value:function(t,a){e.console.error("Caught an error:",t,a),this.setState({error:t,info:a})}},{key:"render",value:function(){var e=this.props.children,t=this.state,a=t.error,i=t.info;return a?n.createElement(v.a,{id:"googlesitekit-error",title:Object(f.__)("Site Kit encountered an error","google-site-kit"),description:n.createElement("code",null,a.message),isDismissable:!1,format:"small",type:"win-error"},n.createElement("pre",null,i.componentStack)):e}}]),ErrorHandler}(p.a);y.defaultProps={},y.propTypes={children:b.a.node.isRequired},t.a=y}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(1),s=a(0),c=a(15),l=a.n(c),u=a(90),d=a(97),g=a(102),m=a(86),p=l.a.useSelect,h=l.a.useDispatch,b=l.a.useRegistry;t.a=function PermissionsModal(){var t,a,i,c=b(),l=p((function(e){return e(u.a).getPermissionScopeError()})),f=p((function(t){var a;return t(u.a).getConnectURL({additionalScopes:null==l?void 0:null===(a=l.data)||void 0===a?void 0:a.scopes,redirectURL:e.location.href})})),v=h(u.a).clearPermissionScopeError,y=Object(o.l)((function(){v()}),[v]),_=Object(o.l)((function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.a.awrap(Object(m.c)(c));case 2:e.location.assign(f);case 3:case"end":return t.stop()}}))}),[c,f]);return Object(o.n)((function(){var e,t,a;r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.skipModal)||!(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(a=t.scopes)||void 0===a?void 0:a.length)){n.next=3;break}return n.next=3,r.a.awrap(_());case 3:case"end":return n.stop()}}))}),[_,l]),l?(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(a=t.scopes)||void 0===a?void 0:a.length)?(null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.skipModal)?null:n.createElement(g.a,null,n.createElement(d.a,{title:Object(s.__)("Additional Permissions Required","google-site-kit"),subtitle:l.message,confirmButton:Object(s.__)("Proceed","google-site-kit"),dialogActive:!0,handleConfirm:_,handleDialog:y})):(e.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",l),null):null}}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(4),i=a.n(n),r=a(38),o=a.n(r),s=a(1),c=a(15),l=a.n(c),u=a(86),d=l.a.useRegistry;t.a=function RestoreSnapshots(e){var t=e.children,a=d(),n=Object(s.s)(!1),r=o()(n,2),c=r[0],l=r[1];return Object(s.n)((function(){c||i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(u.b)(a));case 2:l(!0);case 3:case"end":return e.stop()}}))}),[a,c]),c?t:null}},function(e,t,a){"use strict";a.d(t,"a",(function(){return CollectModuleData}));var n=a(1),i=a(13);a(14);function CollectModuleData(e){var t=e.context,a=e.args;return Object(n.n)((function(){Object(i.d)("googlesitekit.moduleLoaded",t,a)}),[t,a]),null}},,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(18),h=a.n(p),b=a(9),f=a.n(b),v=a(1),y=a(2),_=a.n(y),k=a(17),O=a.n(k),E=a(0),S=a(13),j=a(3),D=a(30),w=a(39),C=a(25),A=a(14),N=a(32),x=function(t){function OptimizeSetup(e){var t;s()(this,OptimizeSetup),t=d()(this,m()(OptimizeSetup).call(this,e));var a=Object(j.k)(),n=a.optimize.settings,i=n.optimizeID,r=n.ampExperimentJSON,o=(a.analytics||{}).settings,c=a.tagmanager||{},l=c.active,u=c.settings,g=!!o&&o.useSnippet,p=!(!l||!u)&&u.useSnippet;return t.state={optimizeID:i||"",analyticsUseSnippet:g,gtmUseSnippet:p,errorCode:!1,errorMsg:"",ampExperimentJSON:r||"",ampExperimentJSONValidated:!0,OptimizeIDValidated:!0},t.handleOptimizeIDEntry=t.handleOptimizeIDEntry.bind(h()(t)),t.handleSubmit=t.handleSubmit.bind(h()(t)),t.renderInstructionInfo=t.renderInstructionInfo.bind(h()(t)),t.handleAMPOptimizeEntry=t.handleAMPOptimizeEntry.bind(h()(t)),t}return f()(OptimizeSetup,t),l()(OptimizeSetup,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,Object(S.b)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed",(function(t,a){return"optimize"!==a.replace("-module","")?t:e.props.isEditing?e.handleSubmit():void 0})),this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(S.g)("googlekit.SettingsConfirmed","googlekit.OptimizeSettingsConfirmed")}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){Object(j.x)("optimize",{optimizeID:"optimizeID",ampExperimentJSON:"ampExperimentJSON"},this.state)}}},{key:"handleSubmit",value:function(){var e,t,a,n,i,o,s=this;return r.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=this.state,t=e.optimizeID,a=e.ampExperimentJSON,n=e.OptimizeIDValidated,i=this.props.finishSetup,n&&0!==t.length){c.next=4;break}return c.abrupt("return",!1);case 4:return o={optimizeID:t,ampExperimentJSON:a},c.next=7,r.a.awrap(A.c.set(A.b,"optimize","settings",o).then((function(){i&&i(),Object(j.k)().optimize.settings.optimizeID=t,s._isMounted&&s.setState({isSaving:!1})})).catch((function(e){s._isMounted&&s.setState({errorCode:!0,errorMsg:e.errorMsg})})));case 7:return c.abrupt("return",c.sent);case 8:case"end":return c.stop()}}),null,this)}},{key:"handleOptimizeIDEntry",value:function(e){var t=Object(j.A)(e.target.value);this._isMounted&&this.setState({optimizeID:e.target.value,OptimizeIDValidated:t})}},{key:"handleAMPOptimizeEntry",value:function(e){var t=Object(j.z)(e.target.value);this._isMounted&&this.setState({ampExperimentJSON:e.target.value,ampExperimentJSONValidated:t})}},{key:"renderInfo",value:function(){var t=this.state.optimizeID;return e.createElement(v.b,null,t?e.createElement("div",null,Object(E.__)("Your Optimize Container ID","google-site-kit"),": ",e.createElement("strong",null,t)):e.createElement("div",null,Object(E.__)('Optimize Container ID missing, press "edit" to add',"google-site-kit"),"."))}},{key:"renderInstructionInfo",value:function(){var t=this.state,a=t.analyticsUseSnippet,n=t.gtmUseSnippet,i=t.optimizeID;return!a&&n?e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("You are using auto insert snippet with Tag Manager","google-site-kit")),e.createElement("p",null,e.createElement("a",{href:"https://support.google.com/optimize/answer/6314801"},Object(E.__)("Click here","google-site-kit"))," ",Object(E.__)("for how to implement Optimize tag through your Tag Manager","google-site-kit"))):a?null:e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("You disabled analytics auto insert snippet. If You are using Google Analytics code snippet, add the code below:","google-site-kit")),e.createElement("pre",null,'ga("require", "',i||"GTM-XXXXXXX",'");'),e.createElement("p",null,e.createElement("a",{href:"https://support.google.com/optimize/answer/6262084"},Object(E.__)("Click here","google-site-kit"))," ",Object(E.__)("for how to implement Optimize tag in Google Analytics Code Snippet","google-site-kit")))}},{key:"renderAMPSnippet",value:function(){var t=this.state,a=t.analyticsUseSnippet,i=t.ampExperimentJSON,r=t.ampExperimentJSONValidated,o=n._googlesitekitLegacyData.admin.ampEnabled;return a&&o?e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("Please input your AMP experiment settings in JSON format below.","google-site-kit")," ",e.createElement(C.a,{href:"https://developers.google.com/optimize/devguides/amp-experiments",external:!0,inherit:!0},Object(E.__)("Learn More.","google-site-kit"))),e.createElement(N.k,{className:O()("mdc-text-field",{"mdc-text-field--error":!r}),name:"amp-experiment",onChange:this.handleAMPOptimizeEntry,textarea:!0},e.createElement(N.b,{inputType:"textarea",value:null===i?"":i})),!r&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error: AMP experiment settings are not in a valid JSON format.","google-site-kit"))):null}},{key:"renderForm",value:function(){var t=this.state,a=t.optimizeID,n=t.errorCode,i=t.errorMsg,r=t.OptimizeIDValidated;return e.createElement(v.b,null,e.createElement("p",null,Object(E.__)("Please copy and paste your Optimize ID to complete your setup.","google-site-kit")," ",e.createElement(C.a,{href:"https://support.google.com/optimize/answer/6211921",external:!0,inherit:!0},Object(E.__)("You can locate this here.","google-site-kit"))),n&&0<i.length&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error:","google-site-kit")," ",i),e.createElement("div",{className:"googlesitekit-setup-module__inputs"},e.createElement(N.k,{className:O()("mdc-text-field",{"mdc-text-field--error":n||!r}),label:Object(E.__)("Optimize Container ID","google-site-kit"),name:"optimizeID",onChange:this.handleOptimizeIDEntry,helperText:e.createElement(N.a,null,Object(E.__)("Format: GTM-XXXXXXX or OPT-XXXXXXX","google-site-kit")),outlined:!0,required:!0},e.createElement(N.b,{value:a}))),!r&&e.createElement("p",{className:"googlesitekit-error-text"},Object(E.__)("Error: Not a valid Optimize ID.","google-site-kit")),this.renderAMPSnippet(),this.renderInstructionInfo())}},{key:"render",value:function(){var t=this.props,a=t.onSettingsPage,n=t.isEditing;return e.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--optimize"},!a&&e.createElement(v.b,null,e.createElement("div",{className:"googlesitekit-setup-module__logo"},e.createElement(D.a,{id:"optimize",width:"33",height:"33"})),e.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(E._x)("Optimize","Service name","google-site-kit"))),n&&this.renderForm(),!n&&this.renderInfo(),!a&&e.createElement("div",{className:"googlesitekit-setup-module__action"},e.createElement(w.a,{onClick:this.handleSubmit},Object(E.__)("Configure Optimize","google-site-kit"))))}}]),OptimizeSetup}(v.a);x.propTypes={onSettingsPage:_.a.bool,finishSetup:_.a.func,isEditing:_.a.bool},x.defaultProps={onSettingsPage:!0,isEditing:!1},t.a=x}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e,n){var i=a(11),r=a.n(i),o=a(4),s=a.n(o),c=a(5),l=a.n(c),u=a(6),d=a.n(u),g=a(7),m=a.n(g),p=a(8),h=a.n(p),b=a(18),f=a.n(b),v=a(9),y=a.n(v),_=a(1),k=a(2),O=a.n(k),E=a(12),S=a(17),j=a.n(S),D=a(0),w=a(13),C=a(30),A=a(124),N=a(3),x=a(46),P=a(32),T=a(39),L=a(95),I=a(25),R=a(115),M=a(14),W=a(44),U="web",q="amp",H=function(t){function TagmanagerSetup(t){var a;l()(this,TagmanagerSetup),a=m()(this,h()(TagmanagerSetup).call(this,t));var n=e._googlesitekitLegacyData.admin,i=n.ampEnabled,r=n.ampMode,o=Object(N.k)().tagmanager.settings,s="primary"===r?q:[U,q];return a.state={ampEnabled:i,isLoading:!0,isSecondaryAMP:"secondary"===r,accounts:[],containers:[],containersAMP:[],errorCode:!1,errorMsg:"",existingContainer:"",selectedAccount:o.accountID,selectedContainer:o.containerID,selectedContainerAMP:o.ampContainerID,containersLoading:!1,usageContext:i?s:U,hasExistingTag:!1,useSnippet:o.useSnippet},a.handleSubmit=a.handleSubmit.bind(f()(a)),a.renderAccountDropdownForm=a.renderAccountDropdownForm.bind(f()(a)),a.handleAccountChange=a.handleAccountChange.bind(f()(a)),a.refetchAccount=a.refetchAccount.bind(f()(a)),a}return y()(TagmanagerSetup,t),d()(TagmanagerSetup,[{key:"setState",value:function(){this._isMounted&&_.a.prototype.setState.apply(this,arguments)}},{key:"componentDidMount",value:function(){var e,t,a,n=this;return s.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e=this.props,t=e.isOpen,a=e.onSettingsPage,this._isMounted=!0,!a||t){i.next=4;break}return i.abrupt("return");case 4:return i.next=6,s.a.awrap(this.loadAccountsContainers());case 6:Object(w.b)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed",(function(e,t){return"tagmanager"!==t.replace("-module","")?e:n.props.isEditing?n.handleSubmit():void 0})),this.toggleConfirmChangesButton();case 8:case"end":return i.stop()}}),null,this)}},{key:"componentDidUpdate",value:function(){this.toggleConfirmChangesButton()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,Object(w.g)("googlekit.SettingsConfirmed","googlekit.TagmanagerSettingsConfirmed")}},{key:"toggleConfirmChangesButton",value:function(){if(this.props.isEditing){var e={selectedContainer:"containerID",selectedContainerAMP:"ampContainerID",selectedAccount:"accountID",useSnippet:"useSnippet"};this.canSaveSettings()||(e={}),Object(N.x)("tagmanager",e,this.state)}}},{key:"loadAccountsContainers",value:function(){var e,t,a,n,i,r;return s.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,s.a.awrap(Object(A.a)("tagmanager"));case 2:if(!(e=o.sent)){o.next=20;break}return o.prev=4,o.next=7,s.a.awrap(M.c.get(M.b,"tagmanager","tag-permission",{tag:e}));case 7:t=o.sent,a=t.account,n=t.container,i=Object(x.a)([n]).byContext(U),r=Object(x.a)([n]).byContext(q),this.setState({isLoading:!1,existingContainer:e,selectedAccount:a.accountId,selectedContainer:Object(E.get)(i,[0,"publicId"]),selectedContainerAMP:Object(E.get)(r,[0,"publicId"]),accounts:[a],hasExistingTag:!0}),o.next=18;break;case 15:o.prev=15,o.t0=o.catch(4),this.setState({isLoading:!1,errorCode:o.t0.code,errorMsg:o.t0.message,errorReason:!(!o.t0.data||!o.t0.data.reason)&&o.t0.data.reason,existingContainer:e,hasExistingTag:!!e});case 18:o.next=22;break;case 20:return o.next=22,s.a.awrap(this.requestTagManagerAccountsContainers());case 22:case"end":return o.stop()}}),null,this,[[4,15]])}},{key:"requestTagManagerAccounts",value:function(){var e,t;return s.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e=this.state.selectedAccount,a.next=4,s.a.awrap(M.c.get(M.b,"tagmanager","accounts"));case 4:t=a.sent,this.validateAccounts(t,e),this.setState({isLoading:!1,accounts:t}),a.next=12;break;case 9:a.prev=9,a.t0=a.catch(0),this.setState({isLoading:!1,errorCode:a.t0.code,errorMsg:a.t0.message});case 12:case"end":return a.stop()}}),null,this,[[0,9]])}},{key:"requestTagManagerAccountsContainers",value:function(){var e,t,a,n,i,r,o,c,l,u,d,g,m;return s.a.async((function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,e=this.state,t=e.selectedAccount,a=e.usageContext,n=this.state,i=n.selectedContainer,r=n.selectedContainerAMP,o={accountID:t,usageContext:a},p.next=6,s.a.awrap(M.c.get(M.b,"tagmanager","accounts-containers",o));case 6:c=p.sent,l=c.accounts,u=c.containers,this.validateAccounts(l,t),d=u.map((function(e){return e.publicId})),Object(x.c)(i)&&!d.includes(i)&&(i=""),Object(x.c)(r)&&!d.includes(r)&&(r=""),g=Object(x.a)(u).byContext(U),m=Object(x.a)(u).byContext(q),this.setState({isLoading:!1,accounts:l,containers:g,containersAMP:m,selectedAccount:t||Object(E.get)(u,[0,"accountId"]),selectedContainer:i||Object(E.get)(g,[0,"publicId"]),selectedContainerAMP:r||Object(E.get)(m,[0,"publicId"]),errorCode:!1,errorMsg:""}),p.next=21;break;case 18:p.prev=18,p.t0=p.catch(0),this.setState({isLoading:!1,errorCode:p.t0.code,errorMsg:p.t0.message});case 21:case"end":return p.stop()}}),null,this,[[0,18]])}},{key:"validateAccounts",value:function(e,t){if(!t&&0===e.length)throw{code:"accountEmpty",message:Object(D.__)("We didn’t find an associated Google Tag Manager account, would you like to set it up now? If you’ve just set up an account please re-fetch your account to sync it with Site Kit.","google-site-kit")};if(Object(x.b)(t)&&!e.find((function(e){return e.accountId===t})))throw{code:"insufficientPermissions",message:Object(D.__)("You currently don’t have access to this Google Tag Manager account. You can either request access from your team, or remove this Google Tag Manager snippet and connect to a different account.","google-site-kit")}}},{key:"requestTagManagerContainers",value:function(e){var t,a;return s.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return this.setState({containersLoading:!0}),n.prev=1,t={accountID:e,usageContext:this.state.usageContext},n.next=5,s.a.awrap(M.c.get(M.b,"tagmanager","containers",t));case 5:a=n.sent,this.setState({containersLoading:!1,containers:Object(x.a)(a).byContext(U),containersAMP:Object(x.a)(a).byContext(q),errorCode:!1}),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(1),this.setState({containersLoading:!1,errorCode:n.t0.code,errorMsg:n.t0.message});case 12:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"handleSubmit",value:function(){var e,t,a,n,i,r,o,c,l,u;return s.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:return e=this.state,t=e.hasExistingTag,a=e.selectedAccount,n=e.selectedContainer,i=e.selectedContainerAMP,r=e.usageContext,o=e.useSnippet,c=this.props.finishSetup,d.prev=2,l={accountID:a,containerID:n,ampContainerID:i,usageContext:r,useSnippet:!t&&o},d.next=6,s.a.awrap(M.c.set(M.b,"tagmanager","settings",l));case 6:u=d.sent,c&&c(),Object(N.k)().tagmanager.settings=u,this.setState({isSaving:!1}),d.next=16;break;case 12:throw d.prev=12,d.t0=d.catch(2),this.setState({isLoading:!1,isSaving:!1,errorCode:d.t0.code,errorMsg:d.t0.message}),d.t0;case 16:case"end":return d.stop()}}),null,this,[[2,12]])}},{key:"handleAccountChange",value:function(e,t){var a=this.state.selectedAccount,n=t.dataset.value;n!==a&&(this.setState({selectedAccount:n,selectedContainer:"",selectedContainerAMP:""}),Object(x.b)(n)&&this.requestTagManagerContainers(n))}},{key:"refetchAccount",value:function(e){e.preventDefault(),this.setState({isLoading:!0,errorCode:!1,errorMsg:"",selectedAccount:"",selectedContainer:"",selectedContainerAMP:""},this.requestTagManagerAccounts)}},{key:"renderSettingsInfo",value:function(){var e=Object(N.k)().tagmanager.settings,t=this.state,a=t.ampEnabled,i=t.isSecondaryAMP,r=t.hasExistingTag,o=t.isLoading,s=e.accountID,c=e.useSnippet;return o?n.createElement(W.a,null):n.createElement(_.b,null,n.createElement("div",{className:"googlesitekit-settings-module__meta-items"},n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-type"},Object(D.__)("Account","google-site-kit")),n.createElement("p",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(L.a,{value:s}))),(!a||i)&&n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-type"},i&&Object(D.__)("Web Container ID","google-site-kit"),!a&&Object(D.__)("Container ID","google-site-kit")),n.createElement("p",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(L.a,{value:e.containerID}))),a&&n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-type"},i&&Object(D.__)("AMP Container ID","google-site-kit"),!i&&Object(D.__)("Container ID","google-site-kit")),n.createElement("p",{className:"googlesitekit-settings-module__meta-item-data"},n.createElement(L.a,{value:e.ampContainerID})))),n.createElement("div",{className:"googlesitekit-settings-module__meta-items"},n.createElement("div",{className:"googlesitekit-settings-module__meta-item"},n.createElement("h5",{className:"googlesitekit-settings-module__meta-item-type"},Object(D.__)("Tag Manager Code Snippet","google-site-kit")),n.createElement("p",{className:"googlesitekit-settings-module__meta-item-data"},c&&Object(D.__)("Snippet is inserted","google-site-kit"),!c&&Object(D.__)("Snippet is not inserted","google-site-kit")),r&&n.createElement("p",null,Object(D.__)("Placing two tags at the same time is not recommended.","google-site-kit")))))}},{key:"renderAccountDropdownForm",value:function(){var e=this,t=this.state,a=t.ampEnabled,i=t.accounts,r=t.selectedAccount,o=t.containers,s=t.containersAMP,c=t.existingContainer,l=t.hasExistingTag,u=t.isLoading,d=t.isSecondaryAMP,g=t.errorCode,m=t.useSnippet,p=this.props.onSettingsPage;if(u)return n.createElement(W.a,null);if("tag_manager_existing_tag_permission"===g)return null;if("accountEmpty"===g)return this.renderCreateAccount();if("account_create"===r)return n.createElement(_.b,null,n.createElement("p",null,Object(D.__)("To create a new account, click the button below which will open the Google Tag Manager account creation screen in a new window.","google-site-kit")),n.createElement("p",null,Object(D.__)("Once completed, click the link below to re-fetch your accounts to continue.","google-site-kit")),this.renderCreateAccount());var h=!a||d,b=a;return n.createElement(_.b,null,l&&n.createElement("p",null,Object(D.sprintf)(// translators: %s: the existing container ID.
|
22 |
+
Object(D.__)("An existing tag was found on your site (%s). If you later decide to replace this tag, Site Kit can place the new tag for you. Make sure you remove the old tag first.","google-site-kit"),c)),!l&&!d&&n.createElement("p",null,Object(D.__)("Please select your Tag Manager account and container below, the snippet will be inserted automatically on your site.","google-site-kit")),!l&&d&&n.createElement("p",null,Object(D.__)("Looks like your site is using paired AMP. Please select your Tag Manager account and relevant containers below, the snippets will be inserted automatically on your site.","google-site-kit")),n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(P.j,{className:"googlesitekit-tagmanager__select-account",enhanced:!0,name:"accounts",label:Object(D.__)("Account","google-site-kit"),value:r,disabled:l,onEnhancedChange:this.handleAccountChange,outlined:!0},[].concat(i).concat(l?[]:{name:Object(D.__)("Set up a new account","google-site-kit"),accountId:"account_create"}).map((function(e){return n.createElement(P.i,{key:e.accountId,value:e.accountId},e.name)}))),h&&this.renderContainerSelect({selectedStateKey:"selectedContainer",containers:o,label:b?Object(D.__)("Web Container","google-site-kit"):null,type:U}),b&&this.renderContainerSelect({selectedStateKey:"selectedContainerAMP",containers:s,label:h?Object(D.__)("AMP Container","google-site-kit"):null,type:q})),p&&n.createElement(_.b,null,l&&n.createElement("p",null,Object(D.__)("Placing two tags at the same time is not recommended.","google-site-kit")),n.createElement(R.a,{id:"tagmanagerUseSnippet",onClick:function(){return e.setState({useSnippet:!m})},name:"useSnippet",checked:m,label:Object(D.__)("Let Site Kit place code on your site","google-site-kit"),hideLabel:!1}),n.createElement("p",null,m?Object(D.__)("Site Kit will add the code automatically","google-site-kit"):Object(D.__)("Site Kit will not add the code to your site","google-site-kit"))),!p&&n.createElement("div",{className:"googlesitekit-setup-module__action"},n.createElement(T.a,{onClick:this.handleSubmit,disabled:!this.canSaveSettings()},Object(D.__)("Confirm & Continue","google-site-kit"))))}},{key:"renderContainerSelect",value:function(e){var t=this,a=e.label,i=e.selectedStateKey,o=e.containers,s=e.type,c=this.state,l=c.containersLoading,u=c.selectedAccount,d=c.hasExistingTag,g=!!o.length;return l?n.createElement(W.a,{small:!0}):n.createElement(P.j,{className:"\n\t\t\t\t\tgooglesitekit-tagmanager__select-container\n\t\t\t\t\tgooglesitekit-tagmanager__select-container--".concat(s,"\n\t\t\t\t"),label:a||Object(D.__)("Container","google-site-kit"),value:g?this.state[i]:"container_create",onEnhancedChange:function(e,a){return t.setState(r()({},i,a.dataset.value))},disabled:d||!Object(x.b)(u),enhanced:!0,outlined:!0},[].concat(o).concat(d?[]:{name:Object(D.__)("Set up a new container","google-site-kit"),publicId:"container_create"}).map((function(e,t){var a=e.name,i=e.publicId;return n.createElement(P.i,{key:t,value:i},a)})))}},{key:"canSaveSettings",value:function(){var e=this.state,t=e.ampEnabled,a=e.isSecondaryAMP,n=e.errorCode,i=e.isLoading,r=e.selectedAccount,o=e.selectedContainer,s=e.selectedContainerAMP;return!(i||"tag_manager_existing_tag_permission"===n||!Object(x.b)(r))&&(!!(t&&!a||Object(x.c)(o)||"container_create"===o)&&!(t&&!Object(x.c)(s)&&"container_create"!==s))}},{key:"renderCreateAccount",value:function(){return n.createElement("div",{className:"googlesitekit-setup-module__action"},n.createElement(T.a,{onClick:TagmanagerSetup.createNewAccount},Object(D.__)("Create an account","google-site-kit")),n.createElement("div",{className:"googlesitekit-setup-module__sub-action"},n.createElement(I.a,{onClick:this.refetchAccount},Object(D.__)("Re-fetch My Account","google-site-kit"))))}},{key:"renderErrorOrNotice",value:function(){var e=this.state,t=e.errorCode,a=e.errorMsg,i=this.props.onSettingsPage;if(0===a.length)return null;var r=!i||"insufficientPermissions"!==t;return n.createElement("div",{className:j()({"googlesitekit-error-text":r})},n.createElement("p",null,r?Object(D.sprintf)(
|
23 |
+
/* translators: %s: Error message */
|
24 |
+
Object(D.__)("Error: %s","google-site-kit"),a):a))}},{key:"render",value:function(){var e=this.props,t=e.onSettingsPage,a=e.isEditing;return n.createElement("div",{className:"googlesitekit-setup-module googlesitekit-setup-module--tag-manager"},!t&&n.createElement(_.b,null,n.createElement("div",{className:"googlesitekit-setup-module__logo"},n.createElement(C.a,{id:"tagmanager",width:"33",height:"33"})),n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(D._x)("Tag Manager","Service name","google-site-kit"))),this.renderErrorOrNotice(),a&&this.renderAccountDropdownForm(),!a&&this.renderSettingsInfo())}}],[{key:"createNewAccount",value:function(t){t.preventDefault(),e.open("https://tagmanager.google.com/#/admin/accounts/create","_blank")}}]),TagmanagerSetup}(_.a);H.propTypes={onSettingsPage:O.a.bool,finishSetup:O.a.func,isEditing:O.a.bool},H.defaultProps={onSettingsPage:!0,isEditing:!1},t.a=H}).call(this,a(16),a(10))},,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(18),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(0),f=a(13),v=a(32),y=function(t){function DateRangeSelector(e){var t;return i()(this,DateRangeSelector),(t=c()(this,u()(DateRangeSelector).call(this,e))).dateRangeHook="googlesitekit.dateRange",t.dateRangeHandlerHook="googlesitekit.dateRageHandler",t.dateRangeHookAddedHook="googlesitekit.dateRageHookAddedHandler",t.state={context:"Dashboard",dateValue:Object(f.c)(t.dateRangeHook,"last-28-days")},Object(f.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector",(function(e){t.setState({context:e}),Object(f.f)("googlesitekit.moduleLoaded","googlesitekit.collectModuleListingDataForDateRangeSelector")})),t.handleSelection=t.handleSelection.bind(g()(t)),t}return p()(DateRangeSelector,t),o()(DateRangeSelector,[{key:"componentDidMount",value:function(){var e=this;Object(f.a)("hookAdded",this.dateRangeHookAddedHook,(function(t){e.dateRangeHook===t&&e.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){Object(f.f)("hookAdded",this.dateRangeHookAddedHook)}},{key:"handleSelection",value:function(e,t){var a=this.state.context,n=t.getAttribute("data-value");return Object(f.g)(this.dateRangeHook,this.dateRangeHandlerHook),Object(f.b)(this.dateRangeHook,this.dateRangeHandlerHook,(function(){return n})),Object(f.d)("googlesitekit.moduleDataReset"),Object(f.d)("googlesitekit.moduleLoaded",a),this.setState({dateValue:Object(f.c)(this.dateRangeHook,"last-28-days")}),!1}},{key:"render",value:function(){var t=this.state.dateValue,a={
|
25 |
+
/* translators: %s: Number of days to request data. */
|
26 |
+
"last-7-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",7,"google-site-kit"),7),
|
27 |
+
/* translators: %s: Number of days to request data. */
|
28 |
+
"last-14-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",14,"google-site-kit"),14),
|
29 |
+
/* translators: %s: Number of days to request data. */
|
30 |
+
"last-28-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",28,"google-site-kit"),28),
|
31 |
+
/* translators: %s: Number of days to request data. */
|
32 |
+
"last-90-days":Object(b.sprintf)(Object(b._n)("Last %s day","Last %s days",90,"google-site-kit"),90)};return e.createElement(v.j,{enhanced:!0,className:"mdc-select--minimal",name:"time_period",label:"",onEnhancedChange:this.handleSelection,value:t},Object.keys(a).map((function(t){return e.createElement(v.i,{key:t,value:t},a[t])})))}}]),DateRangeSelector}(h.a);t.a=y}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(17),f=a.n(b),v=a(25),y=function(t){function LayoutHeader(){return i()(this,LayoutHeader),c()(this,u()(LayoutHeader).apply(this,arguments))}return g()(LayoutHeader,t),o()(LayoutHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.ctaLabel,i=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":i,"mdc-layout-grid__cell--span-12-desktop":!i,"mdc-layout-grid__cell--span-8-tablet":!i})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},a)),i&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(v.a,{href:i,external:!0,inherit:!0},n)))))}}]),LayoutHeader}(m.a);y.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},y.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(77),f=function(t){function LayoutFooter(){return i()(this,LayoutFooter),c()(this,u()(LayoutFooter).apply(this,arguments))}return g()(LayoutFooter,t),o()(LayoutFooter,[{key:"render",value:function(){var t=this.props,a=t.ctaLabel,n=t.ctaLink,i=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&a&&e.createElement(b.a,{className:"googlesitekit-data-block__source",name:a,href:n,external:!0}),i))))}}]),LayoutFooter}(m.a);f.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=f}).call(this,a(10))},,,,,,,,,,,function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(18),h=a.n(p),b=a(9),f=a.n(b),v=a(1),y=a(0),_=a(3),k=a(97),O=a(39),E=a(159),S=a(102),j=function(t){function UserMenu(e){var t;return s()(this,UserMenu),(t=d()(this,m()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(v.h)(),t.menuRef=Object(v.h)(),t}return f()(UserMenu,t),l()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,a){var n=e._googlesitekitLegacyData.admin.proxyPermissionsURL;if("keydown"===a.type&&(13===a.keyCode||32===a.keyCode)||"click"===a.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(_.d)(),document.location=Object(_.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e._googlesitekitLegacyData.admin,a=t.userData,i=a.email,r=void 0===i?"":i,o=a.picture,s=void 0===o?"":o,c=t.proxyPermissionsURL,l=this.state,u=l.dialogActive,d=l.menuOpen;return n.createElement(v.b,null,n.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},n.createElement(O.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:s?n.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},n.createElement("img",{className:"mdc-button__icon--image",src:s,alt:Object(y.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},r),n.createElement(E.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(y.__)("Disconnect","google-site-kit")].concat(c?[Object(y.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),n.createElement(S.a,null,n.createElement(k.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Disconnect","google-site-kit"),subtitle:Object(y.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(y.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(v.a);t.a=j}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(32),f=function(t){function Menu(e){var t;return i()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(m.h)(),t}return g()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new b.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,a=t.menuOpen,n=t.menuItems,i=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!a,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(t,a){return e.createElement("li",{key:a,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,a),onKeyDown:i.bind(null,a)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(m.a);f.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=f}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function ErrorNotification(){return i()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return g()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(a(1).a);t.a=Object(m.a)("googlesitekit.ErrorNotification")(p)},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(18),p=a.n(m),h=a(9),b=a.n(h),f=a(1),v=a(17),y=a.n(v),_=a(75),k=a(0),O=a(162),E=a(164),S=a(98),j=a(165),D=a(63),w=a(64),C=a(44),A=a(117),N=a(53),x=a(85),P=a(3),T=a(82),L=a(83),I=a(78),R=a(26),M=Object(_.a)("googlesitekit.AdSenseDashboardZeroData")((function(){return null})),W=function(t){function AdSenseDashboardWidget(e){var t;return o()(this,AdSenseDashboardWidget),(t=u()(this,g()(AdSenseDashboardWidget).call(this,e))).state={receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0,zeroData:!1},t.handleDataError=t.handleDataError.bind(p()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(p()(t)),t.handleZeroData=t.handleZeroData.bind(p()(t)),t}return b()(AdSenseDashboardWidget,t),c()(AdSenseDashboardWidget,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(N.a)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleZeroData",value:function(){this.setState({zeroData:!0,loading:!1})}},{key:"render",value:function(){var t=this,a=Object(P.k)(),n=this.state,i=n.receivingData,r=n.error,o=n.loading,s=n.isAdSenseConnected,c=n.zeroData,l=a.adsense.homepage,u=o||!i||c?"googlesitekit-nodata":"";return e.createElement(f.b,null,e.createElement(L.a,null),e.createElement("div",{className:u},e.createElement(S.a,{module:"adsense"})),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--adsense"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},!r&&a.adsense.setupComplete?e.createElement(I.a,{title:Object(k._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"connected",statusText:Object(k.__)("AdSense is connected","google-site-kit")}):e.createElement(I.a,{title:Object(k._x)("AdSense","Service name","google-site-kit"),icon:!0,iconWidth:"30",iconHeight:"26",iconID:"adsense",status:"not-connected",statusText:Object(k.__)("AdSense is not connected","google-site-kit")}),o&&e.createElement(C.a,null)),c&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(R.a,{fill:!0},e.createElement(M,null))),!i&&(r?Object(w.a)(Object(k._x)("AdSense","Service name","google-site-kit"),r,!0,!0,!0):Object(D.a)(Object(k._x)("AdSense","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",u)},e.createElement(x.a,{slug:"adsense",context:"module-dashboard"}),e.createElement(R.a,{header:!0,title:Object(k.__)("Estimated earnings","google-site-kit"),headerCtaLabel:Object(k.__)("Advanced Settings","google-site-kit"),headerCtaLink:l},e.createElement(O.a,{handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",u)},e.createElement(R.a,{header:!0,title:Object(k.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(k.__)("Advanced Settings","google-site-kit"),headerCtaLink:l},e.createElement(E.a,{handleDataError:function(e){e||t.handleZeroData()}}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",u)},e.createElement(j.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(T.a,null))))),!s&&e.createElement(A.a,null))}}]),AdSenseDashboardWidget}(f.a);t.a=W}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(3),b=a(31),f=a(28),v=a(23),y=a(14),_=a(53),k=function(t){function AdSenseEstimateEarningsWidget(e){var t;return i()(this,AdSenseEstimateEarningsWidget),(t=c()(this,u()(AdSenseEstimateEarningsWidget).call(this,e))).state={refetch:!1,today:!1,yesterday:!1,sevenDays:!1,month:!1,twentyEightDays:!1,sameDayLastWeek:!1,prev7Days:!1,monthLastYear:!1,prev28Days:!1,error:!1,message:""},t}return g()(AdSenseEstimateEarningsWidget,t),o()(AdSenseEstimateEarningsWidget,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var e=this.state,t=e.today,a=e.yesterday,n=e.sevenDays,i=e.month,r=e.twentyEightDays,o=e.sameDayLastWeek,s=e.prev7Days,c=e.monthLastYear,l=e.prev28Days;if(!(t&&a&&n&&i&&r&&o&&s&&c&&l))return null;var u=t.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),d=!!u&&u.currency,g=t.totals?[{className:"googlesitekit-data-block--today",title:Object(p.__)("Today so far","google-site-kit"),datapoint:Object(h.t)(t.totals[0],d)},{className:"googlesitekit-data-block--yesterday",title:Object(p.__)("Yesterday","google-site-kit"),datapoint:Object(h.t)(a.totals[0],d),change:o.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--7days",title:Object(p.__)("Last 7 days","google-site-kit"),datapoint:Object(h.t)(n.totals[0],d),change:s.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--month",title:Object(p.__)("This month","google-site-kit"),datapoint:Object(h.t)(i.totals[0],d),change:c.totals[0],changeDataUnit:"%"},{className:"googlesitekit-data-block--28days",title:Object(p.__)("Last 28 days","google-site-kit"),datapoint:Object(h.t)(r.totals[0],d),change:l.totals[0],changeDataUnit:"%"}]:[];return AdSenseEstimateEarningsWidget.renderLayout(g)}}],[{key:"renderLayout",value:function(t){return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},t.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(b.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))}))))}},{key:"renderPreviews",value:function(){for(var t=[],a=0;5>a;a++)t.push(e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(f.a,{width:"100%",height:"104px"})));return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},t))}}]),AdSenseEstimateEarningsWidget}(m.a);t.a=Object(v.a)(k,[{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"yesterday"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.yesterday)return{yesterday:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"same-day-last-week"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sameDayLastWeek)return{sameDayLastWeek:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-7-days"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.sevenDays)return{sevenDays:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-7-days"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev7Days)return{prev7Days:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.month)return{month:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month-last-year"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.monthLastYear)return{monthLastYear:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:y.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],k.renderPreviews(),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(0),b=a(34),f=function(t){function InvalidCredentialsWarning(){return r()(this,InvalidCredentialsWarning),l()(this,d()(InvalidCredentialsWarning).apply(this,arguments))}return m()(InvalidCredentialsWarning,t),s()(InvalidCredentialsWarning,[{key:"render",value:function(){return e.createElement(b.a,{id:"notification-id",title:Object(h.__)("Security Token Error","google-site-kit"),description:Object(h.__)("We’re unable to retrieve your data because your security token is expired or revoked. Please ","google-site-kit"),learnMoreURL:n._googlesitekitLegacyData.admin.connectURL,learnMoreLabel:Object(h.__)("reauthenticate your account","google-site-kit"),format:"small",type:"win-error"})}}]),InvalidCredentialsWarning}(p.a);t.a=f}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(12),b=a(3),f=a(14),v=a(31),y=a(28),_=a(53),k=a(23),O=function(t){function AdSensePerformanceWidget(e){var t;return i()(this,AdSensePerformanceWidget),(t=c()(this,u()(AdSensePerformanceWidget).call(this,e))).state={twentyEightDays:!1,prev28Days:!1},t}return g()(AdSensePerformanceWidget,t),o()(AdSensePerformanceWidget,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.twentyEightDays,n=t.prev28Days,i=a.totals?[{className:"googlesitekit-data-block--page-rpm",title:Object(p.__)("Page RPM","google-site-kit"),datapoint:Object(b.t)(a.totals[1]),change:Object(h.isUndefined)(n.totals)?0:n.totals[1],changeDataUnit:"%"},{className:"googlesitekit-data-block--impression",title:Object(p.__)("Impressions","google-site-kit"),datapoint:Object(b.t)(a.totals[2]),change:Object(h.isUndefined)(n.totals)?0:n.totals[2],changeDataUnit:"%"}]:[];return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},i.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-top mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement(v.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))}))))}}]),AdSensePerformanceWidget}(m.a);t.a=Object(k.a)(O,[{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"last-28-days"},priority:1,maxAge:Object(b.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.twentyEightDays)return{twentyEightDays:a}}},{type:f.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"prev-28-days"},priority:1,maxAge:Object(b.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.prev28Days)return{prev28Days:a}}}],e.createElement(y.a,{width:"100%",height:"250px"}),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function DashboardAdSenseTopPages(){return i()(this,DashboardAdSenseTopPages),c()(this,u()(DashboardAdSenseTopPages).apply(this,arguments))}return g()(DashboardAdSenseTopPages,e),o()(DashboardAdSenseTopPages,[{key:"render",value:function(){return null}}]),DashboardAdSenseTopPages}(a(1).a);t.a=Object(m.a)("googlesitekit.AnalyticsAdSenseTopPagesTable")(p)},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(52),b=a(167),f=a(168),v=a(85),y=function(t){function DashboardEarnings(){return i()(this,DashboardEarnings),c()(this,u()(DashboardEarnings).apply(this,arguments))}return g()(DashboardEarnings,t),o()(DashboardEarnings,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(h.a,{title:Object(p.__)("Earnings","google-site-kit"),description:Object(p.__)("How much you’re earning from your content through AdSense.","google-site-kit")}),e.createElement(v.a,{slug:"adsense",context:"module-sitekit-dashboard"})),e.createElement(f.a,null),e.createElement(b.a,null))}}]),DashboardEarnings}(m.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function DashboardAdSenseTopEarningPagesSmall(){return i()(this,DashboardAdSenseTopEarningPagesSmall),c()(this,u()(DashboardAdSenseTopEarningPagesSmall).apply(this,arguments))}return g()(DashboardAdSenseTopEarningPagesSmall,e),o()(DashboardAdSenseTopEarningPagesSmall,[{key:"render",value:function(){return null}}]),DashboardAdSenseTopEarningPagesSmall}(a(1).a);t.a=Object(m.a)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall")(p)},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(53),b=a(26),f=a(23),v=a(14),y=a(28),_=a(3),k=a(31),O=a(61),E=function(t){function AdSenseDashboardMainSummary(e){var t;return i()(this,AdSenseDashboardMainSummary),(t=c()(this,u()(AdSenseDashboardMainSummary).call(this,e))).state={today:!1,period:!1,daily:!1},t}return g()(AdSenseDashboardMainSummary,t),o()(AdSenseDashboardMainSummary,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.today,n=t.period,i=t.daily;if(!(a&&n&&i&&n.totals))return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement(y.a,{width:"100%",height:"276px",padding:!0})));var r=Object(h.f)(i.rows),o=Object(_.n)("googlesitekit-module-adsense",{}),s=n.headers.find((function(e){return null!==e.currency&&0<e.currency.length})),c=!!s&&s.currency;return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-rpm",title:Object(p.__)("RPM","google-site-kit"),datapoint:Object(_.t)(n.totals[1],c),source:{name:Object(p._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:i&&e.createElement(O.a,{data:Object(_.g)(r.dataMap,2),change:1,loadSmall:!1}),context:"compact"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-earnings",title:Object(p.__)("Total Earnings","google-site-kit"),datapoint:Object(_.t)(n.totals[0],c),source:{name:Object(p._x)("AdSense","Service name","google-site-kit"),link:o},change:a.totals[0],changeDataUnit:"$",sparkline:i&&e.createElement(O.a,{data:Object(_.g)(r.dataMap,1),change:1,loadSmall:!1}),context:"compact"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,{className:"overview-adsense-impressions",title:Object(p.__)("Ad Impressions","google-site-kit"),datapoint:Object(_.t)(n.totals[2]),source:{name:Object(p._x)("AdSense","Service name","google-site-kit"),link:o},sparkline:i&&e.createElement(O.a,{data:Object(_.g)(r.dataMap,3),change:1,loadSmall:!1}),context:"compact"})))))))}}]),AdSenseDashboardMainSummary}(m.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"today"},priority:1,maxAge:Object(_.o)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.today)return{today:a}}},{type:v.b,identifier:"adsense",datapoint:"earnings",data:{},priority:1,maxAge:Object(_.o)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.period)return{period:a}}},{type:v.b,identifier:"adsense",datapoint:"earnings",data:{dateRange:"this-month",dimensions:["DATE"]},priority:1,maxAge:Object(_.o)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.daily)return{daily:a}}}],e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(b.a,{className:"googlesitekit-dashboard-adsense-stats",fill:!0},e.createElement(y.a,{width:"100%",height:"276px",padding:!0}))),{inGrid:!0,createGrid:!0},h.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(4),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(18),p=a.n(m),h=a(9),b=a.n(h),f=a(1),v=a(17),y=a.n(v),_=a(0),k=a(83),O=a(170),E=a(171),S=a(172),j=a(118),D=a(26),w=a(78),C=a(99),A=a(98),N=a(44),x=a(63),P=a(64),T=a(117),L=a(53),I=a(55),R=a(82),M=function(t){function AnalyticsDashboardWidget(e){var t;return o()(this,AnalyticsDashboardWidget),(t=u()(this,g()(AnalyticsDashboardWidget).call(this,e))).state={selectedStats:[0],receivingData:!0,error:!1,loading:!0,isAdSenseConnected:!0},t.handleStatSelection=t.handleStatSelection.bind(p()(t)),t.buildSeries=t.buildSeries.bind(p()(t)),t.handleDataError=t.handleDataError.bind(p()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(p()(t)),t}return b()(AnalyticsDashboardWidget,t),c()(AnalyticsDashboardWidget,[{key:"componentDidMount",value:function(){this.isAdSenseConnected()}},{key:"isAdSenseConnected",value:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(L.a)());case 2:e.sent?this.setState({isAdSenseConnected:!0}):this.setState({isAdSenseConnected:!1});case 4:case"end":return e.stop()}}),null,this)}},{key:"handleStatSelection",value:function(e){this.setState({selectedStats:[e]})}},{key:"handleDataError",value:function(e){this.setState({receivingData:!1,loading:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return{0:{color:t[e],targetAxisIndex:0},1:{color:t[e],targetAxisIndex:0,lineDashStyle:[3,3],lineWidth:1}}}},{key:"render",value:function(){var t=this.state,a=t.selectedStats,n=t.error,i=t.receivingData,r=t.loading,o=t.isAdSenseConnected,s=this.buildSeries(),c=!r&&i?"":"googlesitekit-nodata",l=Object(I.a)();return e.createElement(f.b,null,e.createElement(k.a,null),e.createElement(A.a,{module:"analytics"}),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--analytics"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(w.a,{title:Object(_._x)("Analytics","Service name","google-site-kit"),icon:!0,iconWidth:"24",iconHeight:"26",iconID:"analytics",status:"connected",statusText:Object(_.__)("Analytics is connected","google-site-kit")}),r&&e.createElement(N.a,null)),!i&&(n?Object(P.a)(Object(_._x)("Analytics","Service name","google-site-kit"),n,!0,!0,!0):Object(x.a)(Object(_._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0
|
33 |
+
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Audience overview for the last %s","google-site-kit"),l),headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),headerCtaLink:"http://analytics.google.com"},e.createElement(S.a,{selectedStats:a,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),e.createElement(O.a,{selectedStats:a,series:s,vAxes:null,dateRangeSlug:Object(I.b)()}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0,footer:!0
|
34 |
+
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Top content over the last %s","google-site-kit"),l),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement(E.a,null))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0,footer:!0
|
35 |
+
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Top acquisition sources over the last %s","google-site-kit"),l),headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(_.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(_._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(C.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(j.a,null)))))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(R.a,null))))),!r&&!o&&e.createElement(T.a,null))}}]),AnalyticsDashboardWidget}(f.a);t.a=M}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(18),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(0),v=a(3),y=a(65),_=a(23),k=a(14),O=a(19),E=a(28),S=function(t){function AnalyticsDashboardWidgetSiteStats(e){var t;return r()(this,AnalyticsDashboardWidgetSiteStats),(t=l()(this,d()(AnalyticsDashboardWidgetSiteStats).call(this,e))).setOptions=t.setOptions.bind(m()(t)),t}return h()(AnalyticsDashboardWidgetSiteStats,t),s()(AnalyticsDashboardWidgetSiteStats,[{key:"setOptions",value:function(){var t=this.props,a=t.series,n=t.vAxes,i={chart:{title:""===e._googlesitekitLegacyData.pageTitle?"":Object(f.__)("Users Traffic Summary","google-site-kit")},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return i.series=a,i.vAxes=n,i}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats,i=e.dateRangeSlug;if(!t||!t.length)return null;var r=i?i.match(/\d+/).map(Number)[0]:28,o=Object(O.c)(t,a,r);if(!o)return null;var s=this.setOptions();return n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement(y.a,{selectedStats:a,data:o,options:s}))))}}]),AnalyticsDashboardWidgetSiteStats}(b.a);t.a=Object(_.a)(S,[{type:k.b,identifier:"analytics",datapoint:"report",data:O.q,priority:1,maxAge:Object(v.o)("day"),context:"Single"}],n.createElement(E.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(38),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(17),f=a.n(b),v=a(12),y=a(2),_=a.n(y),k=a(0),O=a(3),E=a(23),S=a(14),j=a(36),D=a(47),w=a(19),C=function(t){function AnalyticsDashboardWidgetTopPagesTable(){return o()(this,AnalyticsDashboardWidgetTopPagesTable),u()(this,g()(AnalyticsDashboardWidgetTopPagesTable).apply(this,arguments))}return p()(AnalyticsDashboardWidgetTopPagesTable,t),c()(AnalyticsDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.colspan;if(!a||!a.length)return null;var r=[{title:Object(k.__)("Title","google-site-kit"),tooltip:Object(k.__)("Page Title","google-site-kit"),primary:!0},{title:Object(k.__)("Pageviews","google-site-kit"),tooltip:Object(k.__)("Pageviews","google-site-kit")},{title:Object(k.__)("Unique Pageviews","google-site-kit"),tooltip:Object(k.__)("Unique Pageviews","google-site-kit")},{title:Object(k.__)("Bounce Rate","google-site-kit"),tooltip:Object(k.__)("Bounce Rate","google-site-kit")}],o=[],s=Object(v.map)(a[0].data.rows,(function(t,a){var n=Number(t.metrics[0].values[2]),r=i()(t.dimensions,2),s=r[0],c=r[1];return o[a]=AnalyticsDashboardWidgetTopPagesTable.addDeepLink(c),[s,Object(O.r)(t.metrics[0].values[0]),Object(O.r)(t.metrics[0].values[1]),e.createElement(h.b,{key:"minichart-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(n.toFixed(2),"%")))]})),c={hideHeader:!1,chartsEnabled:!1,links:o,hideColumns:{mobile:[2,3]}},l=Object(j.b)(s,r,c);return e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-".concat(n))},e.createElement(j.a,null,l))}}],[{key:"addDeepLink",value:function(e){var t=Object(O.k)().analytics.settings,a=t.accountID,n=t.internalWebPropertyID,i=t.profileID;return a?"https://analytics.google.com/analytics/web/#/report/content-drilldown/a".concat(a,"w").concat(n,"p").concat(i,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:").concat(encodeURIComponent(e.replace(/\//g,"~2F"))):"https://analytics.google.com/analytics/web/"}}]),AnalyticsDashboardWidgetTopPagesTable}(h.a);C.propTypes={data:_.a.array,colspan:_.a.number},C.defaultProps={data:null,colspan:12},t.a=Object(E.a)(C,[{type:S.b,identifier:"analytics",datapoint:"report",data:Object(w.g)(),priority:1,maxAge:Object(O.o)("day"),context:["Single","Dashboard"]}],e.createElement(D.a,{padding:!0}),{createGrid:!0})}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(12),f=a(0),v=a(3),y=a(31),_=a(23),k=a(14),O=a(19),E=a(28),S=function(t){function AnalyticsDashboardWidgetOverview(e){var t;return i()(this,AnalyticsDashboardWidgetOverview),(t=c()(this,u()(AnalyticsDashboardWidgetOverview).call(this,e))).state={report:!1,directTotalUsers:!1},t}return g()(AnalyticsDashboardWidgetOverview,t),o()(AnalyticsDashboardWidgetOverview,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props.requestDataToState;this.setState(e)}},{key:"render",value:function(){var t=this.props,a=t.selectedStats,n=t.handleStatSelection,i=this.state,r=i.report,o=i.directTotalUsers;if(!r||!r.length||!o)return null;var s=Object(O.b)(r);if(!s)return null;var c=s.totalSessions,l=s.averageBounceRate,u=s.averageSessionDuration,d=s.totalUsersChange,g=s.totalSessionsChange,m=s.averageBounceRateChange,p=s.averageSessionDurationChange,h=[{className:"googlesitekit-data-block--users googlesitekit-data-block--button-1",title:Object(f.__)("Users","google-site-kit"),datapoint:Object(v.t)(o),change:d,changeDataUnit:"%",context:"button",selected:a.includes(0),handleStatSelection:n},{className:"googlesitekit-data-block--sessions googlesitekit-data-block--button-2",title:Object(f.__)("Sessions","google-site-kit"),datapoint:Object(v.t)(c),change:g,changeDataUnit:"%",context:"button",selected:a.includes(1),handleStatSelection:n},{className:"googlesitekit-data-block--bounce googlesitekit-data-block--button-3",title:Object(f.__)("Bounce Rate","google-site-kit"),datapoint:Number(l).toFixed(2),change:m,changeDataUnit:"%",context:"button",selected:a.includes(2),handleStatSelection:n,datapointUnit:"%",invertChangeColor:!0},{className:"googlesitekit-data-block--duration googlesitekit-data-block--button-4",title:Object(f.__)("Session Duration","google-site-kit"),datapoint:Object(v.s)(u),change:p,changeDataUnit:"%",context:"button",selected:a.includes(3),handleStatSelection:n}];return e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},h.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection,datapointUnit:t.datapointUnit,invertChangeColor:t.invertChangeColor}))}))))}}]),AnalyticsDashboardWidgetOverview}(m.a);S.propTypes={handleDataError:h.a.func.isRequired},t.a=Object(_.a)(S,[{type:k.b,identifier:"analytics",datapoint:"report",data:O.o,priority:1,maxAge:Object(v.o)("day"),context:["Single","Dashboard"],toState:function(e,t){var a=t.data;if(!e.report)return{report:a}}},{type:k.b,identifier:"analytics",datapoint:"report",data:O.s,priority:1,maxAge:Object(v.o)("day"),context:["Single"],toState:function(e,t){var a=t.data;if(!e.directTotalUsers)return{directTotalUsers:Object(b.get)(a,"[0].data.totals[0].values[0]")}}}],e.createElement(E.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},O.h,O.f)}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=["#178EC5","#54B23B","#EB5729","#ECED33","#34CBE3","#82E88E"]},function(e,t,a){"use strict";(function(e,n){var i=a(33),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(175),v=a(89),y=a(3),_=function(t){function AnalyticsAdminbarWidget(){return s()(this,AnalyticsAdminbarWidget),d()(this,m()(AnalyticsAdminbarWidget).apply(this,arguments))}return h()(AnalyticsAdminbarWidget,t),l()(AnalyticsAdminbarWidget,[{key:"render",value:function(){return"undefined"!==r()(e._googlesitekitLegacyData.permaLink)&&""===e._googlesitekitLegacyData.permaLink?null:Object(y.k)().analytics.active?n.createElement(f.a,null):n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(v.a,null)))}}]),AnalyticsAdminbarWidget}(b.a);t.a=_}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(11),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(0),v=a(3),y=a(31),_=a(23),k=a(14),O=a(19),E=a(28);function S(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var j=function(t){function AnalyticsAdminbarWidgetOverview(){return s()(this,AnalyticsAdminbarWidgetOverview),d()(this,m()(AnalyticsAdminbarWidgetOverview).apply(this,arguments))}return h()(AnalyticsAdminbarWidgetOverview,t),l()(AnalyticsAdminbarWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||t.error||!t.length)return null;var a=Object(O.b)(t);if(!a)return null;var n=a.totalUsers,i=a.totalSessions,r=a.totalUsersChange,o=a.totalSessionsChange;return e.createElement(b.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{className:"overview-total-users",title:Object(f.__)("Total Users","google-site-kit"),datapoint:Object(v.t)(n),change:r,changeDataUnit:"%"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(y.a,{className:"overview-total-sessions",title:Object(f.__)("Total Sessions","google-site-kit"),datapoint:Object(v.t)(i),change:o,changeDataUnit:"%"})))}}]),AnalyticsAdminbarWidgetOverview}(b.a);t.a=Object(_.a)(j,[{type:k.b,identifier:"analytics",datapoint:"report",data:function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?S(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):S(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({},O.o,{url:n._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(v.o)("day"),context:"Adminbar"}],e.createElement(b.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(E.a,{width:"auto",height:"59px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(E.a,{width:"auto",height:"59px"}))),{inGrid:!0},O.h,O.f)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(18),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(17),f=a.n(b),v=a(0),y=a(26),_=a(52),k=a(63),O=a(64),E=a(116),S=a(99),j=a(177),D=a(3),w=function(t){function AnalyticsAllTraffic(e){var t;return i()(this,AnalyticsAllTraffic),(t=c()(this,u()(AnalyticsAllTraffic).call(this,e))).state={receivingData:!0,error:!1},t.handleDataError=t.handleDataError.bind(g()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(g()(t)),t}return p()(AnalyticsAllTraffic,t),o()(AnalyticsAllTraffic,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0})}},{key:"getErrorDataComponent",value:function(){var e=Object(D.k)().analytics,t=e.active,a=e.setupComplete,n=this.state,i=n.error,r=n.receivingData;return t&&!a?Object(E.a)("analytics",!0,!0,!0):r?null:i?Object(O.a)(Object(v._x)("Analytics","Service name","google-site-kit"),i,!0,!0,!0):Object(k.a)(Object(v._x)("Analytics","Service name","google-site-kit"),!0,!0,!0)}},{key:"render",value:function(){var t=this.state,a=t.error,n=t.receivingData,i=a||!n?"googlesitekit-nodata":"";return e.createElement(h.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(_.a,{description:Object(v.__)("How people found your site.","google-site-kit"),title:Object(v.__)("All Traffic","google-site-kit")})),this.getErrorDataComponent(),e.createElement("div",{className:f()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",i)},e.createElement(y.a,{className:"googlesitekit-dashboard-all-traffic"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(S.a,{source:!0,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(j.a,null)))))))}}]),AnalyticsAllTraffic}(h.a);t.a=w}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(12),h=a(0),b=a(3),f=a(23),v=a(14),y=a(36),_=a(119),k=a(47),O=a(19),E=function(t){function AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources(){return i()(this,AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources),c()(this,u()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources).apply(this,arguments))}return g()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources,t),o()(AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Source","google-site-kit"),primary:!0},{title:Object(h.__)("Percent","google-site-kit")}],n=t[0].data.totals[0].values[0],i=Object(p.map)(t[0].data.rows,(function(t,a){var i=t.metrics[0].values[0]/n*100;return!(1>i)&&[t.dimensions[0],e.createElement(m.b,{key:"minichart-"+a},e.createElement("div",{className:"googlesitekit-table__body-item-chart-wrap"},"".concat(i.toFixed(2),"%")," ",e.createElement(_.a,{percent:i.toFixed(1),index:a})))]})),r=Object(y.b)(i,a,{hideHeader:!0,chartsEnabled:!0});return e.createElement("div",{className:"googlesitekit-alltraffic-widget"},e.createElement(y.a,null,r))}}]),AnalyticsAllTrafficDashboardWidgetTopAcquisitionSources}(m.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"analytics",datapoint:"report",data:O.r,priority:1,maxAge:Object(b.o)("day"),context:"Dashboard"}],e.createElement(k.a,{rows:3,rowHeight:50}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(11),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(12),v=a(0),y=a(3),_=a(19),k=a(31),O=a(23),E=a(14),S=a(61),j=a(41),D=a(28);function w(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function C(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?w(a,!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):w(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var A=function(t){function AnalyticsDashboardWidgetTopLevel(e){var t;return s()(this,AnalyticsDashboardWidgetTopLevel),(t=d()(this,m()(AnalyticsDashboardWidgetTopLevel).call(this,e))).state={accounts:!1,goals:!1,directTotalUsers:!1},t}return h()(AnalyticsDashboardWidgetTopLevel,t),l()(AnalyticsDashboardWidgetTopLevel,[{key:"componentDidUpdate",value:function(){this.processCallbackData()}},{key:"componentDidMount",value:function(){this.processCallbackData()}},{key:"processCallbackData",value:function(){var e=this.props,t=e.data,a=e.requestDataToState;t&&!t.error&&"function"==typeof a&&this.setState(a)}},{key:"render",value:function(){var t=this.state,a=t.overview,i=t.extractedAnalytics,r=t.goals,o=t.directTotalUsers,s=e._googlesitekitLegacyData.permaLink,c=Object(y.n)("googlesitekit-module-analytics",{}),l="",u="",d="",g="",m="";return a&&(l=a.totalUsersChange,u=a.goalCompletions,d=a.goalCompletionsChange,g=a.averageBounceRate,m=a.averageBounceRateChange),n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(k.a,{className:"overview-total-users",title:Object(v.__)("Unique Visitors from Search","google-site-kit"),datapoint:Object(y.t)(o),change:l,changeDataUnit:"%",source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.g)(i,1),change:l})})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},s&&n.createElement(k.a,{className:"overview-bounce-rate",title:Object(v.__)("Bounce Rate","google-site-kit"),datapoint:Number(g).toFixed(2),datapointUnit:Object(v.__)("%","google-site-kit"),change:m,changeDataUnit:"%",invertChangeColor:!0,source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.g)(i,2),change:m})}),!s&&r&&Object(f.isEmpty)(r.items)&&n.createElement(j.a,{title:Object(v.__)("Use goals to measure success.","google-site-kit"),description:Object(v.__)("Goals measure how well your site or app fulfills your target objectives.","google-site-kit"),ctaLink:"https://support.google.com/analytics/answer/1032415?hl=en#create_or_edit_goals",ctaLabel:Object(v.__)("Create a new goal","google-site-kit")}),!s&&r&&!Object(f.isEmpty)(r.items)&&n.createElement(k.a,{className:"overview-goals-completed",title:Object(v.__)("Goals Completed","google-site-kit"),datapoint:Object(y.t)(u),change:d,changeDataUnit:"%",source:{name:Object(v._x)("Analytics","Service name","google-site-kit"),link:c},sparkline:i&&n.createElement(S.a,{data:Object(y.g)(i,3),change:d})}),!s&&!r&&n.createElement(D.a,{width:"100%",height:"202px"})))}}]),AnalyticsDashboardWidgetTopLevel}(b.a);t.a=Object(O.a)(A,[{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.o,{url:e._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(y.o)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.overview)return{overview:Object(_.b)(a)}}},{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.s,{url:e._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(y.o)("day"),context:["Dashboard"],toState:function(e,t){var a=t.data;if(!e.directTotalUsers)return{directTotalUsers:Object(f.get)(a,"[0].data.totals[0].values[0]")}}},{type:E.b,identifier:"analytics",datapoint:"report",data:C({},_.q,{url:e._googlesitekitLegacyData.permaLink}),priority:1,maxAge:Object(y.o)("day"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.extractedAnalytics)return{extractedAnalytics:Object(_.d)(a)}}},{type:E.b,identifier:"analytics",datapoint:"goals",data:{url:e._googlesitekitLegacyData.permaLink},priority:1,maxAge:Object(y.o)("hour"),context:"Dashboard",toState:function(e,t){var a=t.data;if(!e.goals)return{goals:a}}}],n.createElement(b.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(D.a,{width:"100%",height:"202px"})),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement(D.a,{width:"100%",height:"202px"}))),{inGrid:!0},(function(e,t){return"report"===t&&Object(_.h)(e)}),_.f)}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(3),b=a(180),f=a(31),v=a(41),y=a(23),_=a(14),k=a(19),O=function(t){function WPAnalyticsDashboardWidgetOverview(){return i()(this,WPAnalyticsDashboardWidgetOverview),c()(this,u()(WPAnalyticsDashboardWidgetOverview).apply(this,arguments))}return g()(WPAnalyticsDashboardWidgetOverview,t),o()(WPAnalyticsDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(k.b)(t);if(!a)return null;var n=a.totalUsers,i=a.averageSessionDuration,r=a.totalUsersChange,o=a.averageSessionDurationChange;return e.createElement(m.b,null,t.length?e.createElement(m.b,null,e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-users",title:Object(p.__)("Total Unique Visitors","google-site-kit"),datapoint:Object(h.t)(n),change:r,changeDataUnit:"%"}),e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-average-session-duration",title:Object(p.__)("Avg. Time on Page","google-site-kit"),datapoint:Object(h.s)(i),change:o,changeDataUnit:"%"})):e.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},e.createElement(v.a,{title:Object(p.__)("Analytics Gathering Data","google-site-kit"),description:Object(p.__)("Analytics data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),WPAnalyticsDashboardWidgetOverview}(m.a);t.a=Object(y.a)(O,[{type:_.b,identifier:"analytics",datapoint:"report",data:k.o,priority:1,maxAge:Object(h.o)("day"),context:["WPDashboard"]}],e.createElement(b.a,{width:"23%",height:"94px",count:2}),{},k.h,k.f)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(2),h=a.n(p),b=a(28),f=function(t){function PreviewBlocks(){return i()(this,PreviewBlocks),c()(this,u()(PreviewBlocks).apply(this,arguments))}return g()(PreviewBlocks,t),o()(PreviewBlocks,[{key:"render",value:function(){for(var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.count,o=[],s=0;s++<r;)o.push(e.createElement(b.a,{width:a,height:n,shape:i,key:s}));return o}}]),PreviewBlocks}(m.a);f.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,count:h.a.number},f.defaultProps={width:"100px",height:"100px",shape:"square",count:1},t.a=f}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(52),b=a(26),f=a(118),v=a(99),y=function(t){function AnalyticsDashboardDetailsWidgetTopAcquisitionSources(){return i()(this,AnalyticsDashboardDetailsWidgetTopAcquisitionSources),c()(this,u()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources).apply(this,arguments))}return g()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources,t),o()(AnalyticsDashboardDetailsWidgetTopAcquisitionSources,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(h.a,{title:Object(p.__)("All Traffic","google-site-kit"),description:Object(p.__)("How people found your page.","google-site-kit")})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{className:"googlesitekit-analytics-acquisition-sources",footer:!0,headerCtaLink:"https://analytics.google.com",headerCtaLabel:Object(p.__)("See full stats in Analytics","google-site-kit"),footerCtaLabel:Object(p._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"https://analytics.google.com"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(v.a,null)),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement(f.a,null)))))))}}]),AnalyticsDashboardDetailsWidgetTopAcquisitionSources}(m.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(38),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(12),f=a(0),v=a(3),y=a(23),_=a(14),k=a(36),O=a(47),E=a(19),S=function(t){function WPAnalyticsDashboardWidgetTopPagesTable(){return o()(this,WPAnalyticsDashboardWidgetTopPagesTable),u()(this,g()(WPAnalyticsDashboardWidgetTopPagesTable).apply(this,arguments))}return p()(WPAnalyticsDashboardWidgetTopPagesTable,t),c()(WPAnalyticsDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props.data;if(Object(E.h)(t))return null;var a=[],n=Object(b.map)(t[0].data.rows,(function(e,t){var n=i()(e.dimensions,2),r=n[0],o=n[1];return a[t]=o.startsWith("/")?o:"/"+o,[r,Object(v.r)(e.metrics[0].values[0])]})),r=[{title:Object(f.__)("Title","google-site-kit"),tooltip:Object(f.__)("Page Title","google-site-kit"),primary:!0},{title:Object(f.__)("Pageviews","google-site-kit"),tooltip:Object(f.__)("Pageviews","google-site-kit")}],o={chartsEnabled:!0,links:a,cap:5,showURLs:!0},s=Object(k.b)(n,r,o);return e.createElement("div",{className:"googlesitekit-search-console-widget"},e.createElement("h2",{className:"googlesitekit-search-console-widget__title"},Object(f.__)("Top content over the last 28 days","google-site-kit")),e.createElement(k.a,null,s))}}]),WPAnalyticsDashboardWidgetTopPagesTable}(h.a);t.a=Object(y.a)(S,[{type:_.b,identifier:"analytics",datapoint:"report",data:Object(E.g)(),priority:1,maxAge:Object(v.o)("day"),context:"WPDashboard"}],e.createElement(O.a,{rows:6}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(12),h=a(0),b=a(3),f=a(23),v=a(14),y=a(36),_=a(26),k=a(47),O=a(80),E=a(120),S=a(19),j=function(t){function AnalyticsAdSenseDashboardWidgetTopPagesTable(){return i()(this,AnalyticsAdSenseDashboardWidgetTopPagesTable),c()(this,u()(AnalyticsAdSenseDashboardWidgetTopPagesTable).apply(this,arguments))}return g()(AnalyticsAdSenseDashboardWidgetTopPagesTable,t),o()(AnalyticsAdSenseDashboardWidgetTopPagesTable,[{key:"render",value:function(){var t=this.props.data;if(Object(S.h)(t))return null;var a=[{title:Object(h.__)("Page Title","google-site-kit"),tooltip:Object(h.__)("Page Title","google-site-kit"),primary:!0},{title:Object(h.__)("Earnings","google-site-kit"),tooltip:Object(h.__)("Earnings","google-site-kit")},{title:Object(h.__)("Page RPM","google-site-kit"),tooltip:Object(h.__)("Page RPM","google-site-kit")},{title:Object(h.__)("Impressions","google-site-kit"),tooltip:Object(h.__)("Impressions","google-site-kit")}],n=Object(p.map)(t[0].data.rows,(function(e){return[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2),Number(e.metrics[0].values[1]).toFixed(2),Object(b.r)(e.metrics[0].values[2])]})),i=Object(b.k)().analytics.settings,r=i.accountID,o=i.internalWebPropertyID,s=i.profileID,c="https://analytics.google.com/analytics/web/?pli=1#/report/content-pages/a".concat(r,"w").concat(o,"p").concat(s,"/explorer-table.plotKeys=%5B%5D&_r.drilldown=analytics.pagePath:~2F"),l={hideHeader:!1,chartsEnabled:!1,links:Object(p.map)(t[0].data.rows,(function(e){var t=e.dimensions[1].replace(/\//g,"~2F");return c+t}))},u=Object(y.b)(n,a,l);return AnalyticsAdSenseDashboardWidgetTopPagesTable.renderLayout(e.createElement(y.a,null,u))}}],[{key:"renderLayout",value:function(t){var a=Object(b.k)().adsense.accountURL;return e.createElement(_.a,{header:!0,title:Object(h.__)("Performance over previous 28 days","google-site-kit"),headerCtaLabel:Object(h.__)("Advanced Settings","google-site-kit"),headerCtaLink:a},t)}}]),AnalyticsAdSenseDashboardWidgetTopPagesTable}(m.a);t.a=Object(f.a)(j,[{type:v.b,identifier:"analytics",datapoint:"report",data:S.a,priority:1,maxAge:Object(b.o)("day"),context:"Single"}],j.renderLayout(e.createElement(k.a,{padding:!0})),{createGrid:!0},(function(){return!1}),(function(t){return t.code&&t.message&&t.data&&t.data.status?"badRequest"===t.data.reason?j.renderLayout(Object(O.a)(e.createElement(E.a,null),!1,!1,!0)):t.message:!!t.error&&(400===t.error.code&&"INVALID_ARGUMENT"===t.error.status&&Object(b.k)().analytics.active?null:t.error.message?t.error.message:t.error.errors&&t.error.errors[0]&&t.error.errors[0].message?t.error.errors[0].message:Object(h.__)("Unidentified error","google-site-kit"))}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(38),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(9),p=a.n(m),h=a(1),b=a(12),f=a(0),v=a(3),y=a(19),_=a(23),k=a(14),O=a(36),E=a(47),S=a(26),j=function(t){function AnalyticsDashboardWidgetPopularPagesTable(){return o()(this,AnalyticsDashboardWidgetPopularPagesTable),u()(this,g()(AnalyticsDashboardWidgetPopularPagesTable).apply(this,arguments))}return p()(AnalyticsDashboardWidgetPopularPagesTable,t),c()(AnalyticsDashboardWidgetPopularPagesTable,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(f.__)("Most popular content","google-site-kit"),primary:!0},{title:Object(f.__)("Views","google-site-kit")}],n=[],r=Object(b.map)(t[0].data.rows,(function(e,t){var a=i()(e.dimensions,2),r=a[0],o=a[1];return n[t]=o.startsWith("/")?o:"/"+o,[r,Object(v.r)(e.metrics[0].values[0])]})),o={hideHeader:!1,chartsEnabled:!1,links:n,showURLs:!0},s=Object(O.b)(r,a,o);return AnalyticsDashboardWidgetPopularPagesTable.renderLayout(e.createElement(O.a,null,s))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(S.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(f._x)("Analytics","Service name","google-site-kit"),footerCtaLink:Object(v.k)().analytics.homepage,fill:!0},t))}}]),AnalyticsDashboardWidgetPopularPagesTable}(h.a);t.a=Object(_.a)(j,[{type:k.b,identifier:"analytics",datapoint:"report",data:Object(y.g)(),priority:1,maxAge:Object(v.o)("day"),context:["Single","Dashboard"]}],j.renderLayout(e.createElement(E.a,{padding:!0})),{inGrid:!0,createGrid:!0},y.h)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(12),h=a(0),b=a(3),f=a(23),v=a(14),y=a(36),_=a(47),k=a(26),O=a(120),E=a(19),S=function(t){function AdSenseDashboardWidgetTopPagesTableSmall(){return i()(this,AdSenseDashboardWidgetTopPagesTableSmall),c()(this,u()(AdSenseDashboardWidgetTopPagesTableSmall).apply(this,arguments))}return g()(AdSenseDashboardWidgetTopPagesTableSmall,t),o()(AdSenseDashboardWidgetTopPagesTableSmall,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Top Earning Pages","google-site-kit"),tooltip:Object(h.__)("Top Earning Pages","google-site-kit"),primary:!0},{title:Object(h.__)("Revenue","google-site-kit"),tooltip:Object(h.__)("Revenue","google-site-kit")}],n=[],i=Object(p.map)(t[0].data.rows,(function(e,t){return n[t]=e.dimensions[1],[e.dimensions[0],Number(e.metrics[0].values[0]).toFixed(2)]})),r={hideHeader:!1,chartsEnabled:!1,cap:5,links:n},o=Object(y.b)(i,a,r);return AdSenseDashboardWidgetTopPagesTableSmall.renderLayout(e.createElement(y.a,null,o))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-top-earnings-pages",footer:!0,footerCtaLabel:Object(h._x)("Analytics","Service name","google-site-kit"),footerCtaLink:"http://analytics.google.com",fill:!0},t))}}]),AdSenseDashboardWidgetTopPagesTableSmall}(m.a);t.a=Object(f.a)(S,[{type:v.b,identifier:"analytics",datapoint:"report",data:E.a,priority:1,maxAge:Object(b.o)("day"),context:"Dashboard"}],S.renderLayout(e.createElement(_.a,{rows:5,padding:!0})),{inGrid:!0,createGrid:!0},E.h,(function(t){if(t.code&&t.message&&t.data&&t.data.status)return"badRequest"===t.data.reason?e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-top-earnings-pages",fill:!0},e.createElement(O.a,null))):t.message;if(t&&t.errors){var a=Object.values(t.errors);if(a[0]&&a[0][0])return a[0][0]}return!1}))}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=(a(1),a(0)),s=a(3),c=a(41),l=a(14),u=a(84);t.a=function PageSpeedInsightsCTA(){var t=Object(s.k)()["pagespeed-insights"],a=t.active,i=t.setupComplete;if(!e._googlesitekitLegacyData.permissions.canManageOptions&&!i)return null;return n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(c.a,{title:!i&&a?Object(o.__)("Complete PageSpeed Insights activation.","google-site-kit"):Object(o.__)("Activate PageSpeed Insights.","google-site-kit"),description:Object(o.__)("Google PageSpeed Insights gives you metrics about performance, accessibility, SEO and PWA.","google-site-kit"),ctaLink:"#",ctaLabel:!i&&a?Object(o.__)("Complete activation","google-site-kit"):Object(o.__)("Activate PageSpeed Insights","google-site-kit"),onClick:function(){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(Object(s.b)(l.c,"pagespeed-insights",!0));case 3:e.location=Object(s.m)("pagespeed-insights"),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),Object(s.v)(u.a,{id:"pagespeed-insights-setup-error",title:Object(o.__)("Internal Server Error","google-site-kit"),description:t.t0.message,format:"small",type:"win-error"});case 9:case"end":return t.stop()}}),null,null,[[0,6]])}}))}}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(11),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),m=a(18),p=a.n(m),h=a(9),b=a.n(h),f=a(1),v=a(17),y=a.n(v),_=a(0),k=a(83),O=a(188),E=a(121),S=a(189),j=a(78),D=a(26),w=a(98),C=a(44),A=a(63),N=a(64),x=a(55),P=a(82),T=a(3);function L(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}var I=function(t){function GoogleSitekitSearchConsoleDashboardWidget(e){var t;return o()(this,GoogleSitekitSearchConsoleDashboardWidget),(t=u()(this,g()(GoogleSitekitSearchConsoleDashboardWidget).call(this,e))).state={selectedStats:[0,1],receivingData:!0,error:!1,loading:!0},t.handleStatSelection=t.handleStatSelection.bind(p()(t)),t.buildSeries=t.buildSeries.bind(p()(t)),t.buildVAxes=t.buildVAxes.bind(p()(t)),t.handleDataError=t.handleDataError.bind(p()(t)),t.handleDataSuccess=t.handleDataSuccess.bind(p()(t)),t}return b()(GoogleSitekitSearchConsoleDashboardWidget,t),c()(GoogleSitekitSearchConsoleDashboardWidget,[{key:"handleDataError",value:function(e){this.setState({receivingData:!1,error:e,loading:!1})}},{key:"handleDataSuccess",value:function(){this.setState({receivingData:!0,loading:!1})}},{key:"handleStatSelection",value:function(e){var t=this.state.selectedStats,a=t.slice();t.includes(e)?a=t.filter((function(t){return e!==t})):a.push(e),0!==a.length&&this.setState({selectedStats:a})}},{key:"buildSeries",value:function(){var e=this.state.selectedStats,t={0:"#4285f4",1:"#27bcd4",2:"#1b9688",3:"#673ab7"};return e.map((function(e,a){return{color:t[e],targetAxisIndex:a}}))}},{key:"buildVAxes",value:function(){var e=this.state.selectedStats,t={0:Object(_.__)("Clicks","google-site-kit"),1:Object(_.__)("Impressions","google-site-kit"),2:Object(_.__)("Average CTR","google-site-kit"),3:Object(_.__)("Average Position","google-site-kit")};return e.map((function(e){var a={};return 3===e&&(a.direction=-1),function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?L(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):L(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({title:t[e]},a)}))}},{key:"render",value:function(){var t=this.state,a=t.selectedStats,n=t.receivingData,i=t.error,r=t.loading,o=this.buildSeries(),s=this.buildVAxes(),c=!r&&n?"":"googlesitekit-nodata",l=Object(x.a)(),u=Object(_.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(T.k)()["search-console"].settings.propertyID);return e.createElement(f.b,null,e.createElement(k.a,null),e.createElement(w.a,{module:"search-console"}),e.createElement("div",{className:"googlesitekit-module-page googlesitekit-module-page--search-console"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(j.a,{title:Object(_._x)("Search Console","Service name","google-site-kit"),icon:!0,iconWidth:"23",iconHeight:"21",iconID:"search-console",status:"connected",statusText:Object(_.__)("Search Console is connected","google-site-kit")}),r&&e.createElement(C.a,null)),!n&&(i?Object(N.a)(Object(_._x)("Search Console","Service name","google-site-kit"),i,!0,!0,!0):Object(A.a)(Object(_._x)("Search Console","Service name","google-site-kit"),!0,!0,!0)),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a,{header:!0
|
36 |
+
/* translators: %s: date range */,title:Object(_.sprintf)(Object(_.__)("Overview for the last %s","google-site-kit"),l),headerCtaLabel:Object(_.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:u},e.createElement(S.a,{selectedStats:a,handleStatSelection:this.handleStatSelection,handleDataError:this.handleDataError,handleDataSuccess:this.handleDataSuccess}),e.createElement(O.a,{selectedStats:a,series:o,vAxes:s}))),e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",c)},e.createElement(D.a
|
37 |
+
/* translators: %s: date range */,{title:Object(_.sprintf)(Object(_.__)("Top search queries over the last %s","google-site-kit"),l),header:!0,footer:!0,headerCtaLabel:Object(_.__)("See full stats in Search Console","google-site-kit"),headerCtaLink:u,footerCtaLabel:Object(_._x)("Search Console","Service name","google-site-kit"),footerCtaLink:u},e.createElement(E.a,null))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--align-right "},e.createElement(P.a,null))))))}}]),GoogleSitekitSearchConsoleDashboardWidget}(f.a);t.a=I}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(18),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(0),v=a(3),y=a(23),_=a(14),k=a(65),O=a(28),E=a(48),S=function(t){function SearchConsoleDashboardWidgetSiteStats(e){var t;return r()(this,SearchConsoleDashboardWidgetSiteStats),(t=l()(this,d()(SearchConsoleDashboardWidgetSiteStats).call(this,e))).setOptions=t.setOptions.bind(m()(t)),t}return h()(SearchConsoleDashboardWidgetSiteStats,t),s()(SearchConsoleDashboardWidgetSiteStats,[{key:"setOptions",value:function(){var t=this.props,a=t.selectedStats,n=t.series,i=t.vAxes,r=e._googlesitekitLegacyData.pageTitle,o=Object(f.__)("Search Traffic Summary","google-site-kit");r&&r.length&&(
|
38 |
+
/* translators: %s: page title */
|
39 |
+
o=Object(f.sprintf)(Object(f.__)("Search Traffic Summary for %s","google-site-kit"),Object(v.f)(r)));var s={chart:{title:o},curveType:"line",height:270,width:"100%",chartArea:{height:"80%",width:"87%"},legend:{position:"top",textStyle:{color:"#616161",fontSize:12}},hAxis:{format:"M/d/yy",gridlines:{color:"#fff"},textStyle:{color:"#616161",fontSize:12}},vAxis:{gridlines:{color:"#eee"},minorGridlines:{color:"#eee"},textStyle:{color:"#616161",fontSize:12},titleTextStyle:{color:"#616161",fontSize:12,italic:!1}}};return s.series=n,s.vAxes=i,3<=a.length&&(s.vAxis.textPosition="none",s.vAxis.gridlines.color="#fff",s.vAxis.minorGridlines.color="#fff",s.chartArea.width="98%"),s}},{key:"render",value:function(){var e=this.props,t=e.data,a=e.selectedStats;if(!t||!t.length)return null;var i=this.setOptions(),r=Object(E.a)(t);return n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement(k.a,{selectedStats:a,data:r.dataMap,options:i,singleStat:!1}))))}}]),SearchConsoleDashboardWidgetSiteStats}(b.a);t.a=Object(y.a)(S,[{type:_.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(v.o)("day"),context:"Single"}],n.createElement(O.a,{width:"100%",height:"270px",padding:!0}),{createGrid:!0})}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(3),b=a(31),f=a(23),v=a(14),y=a(28),_=a(48),k=a(2),O=a.n(k),E=function(t){function SearchConsoleDashboardWidgetOverview(){return i()(this,SearchConsoleDashboardWidgetOverview),c()(this,u()(SearchConsoleDashboardWidgetOverview).apply(this,arguments))}return g()(SearchConsoleDashboardWidgetOverview,t),o()(SearchConsoleDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props,a=t.data,n=t.selectedStats,i=t.handleStatSelection;if(!a||!a.length)return null;var r=Object(_.a)(a),o=r.totalClicks,s=r.totalImpressions,c=r.averageCTR,l=r.averagePosition,u=r.totalClicksChange,d=r.totalImpressionsChange,g=r.averageCTRChange,h=r.averagePositionChange,f=[{className:"googlesitekit-data-block--clicks googlesitekit-data-block--button-1",title:Object(p.__)("Total Clicks","google-site-kit"),datapoint:o,change:u,changeDataUnit:"%",context:"button",selected:n.includes(0),handleStatSelection:i},{className:"googlesitekit-data-block--impressions googlesitekit-data-block--button-2",title:Object(p.__)("Total Impressions","google-site-kit"),datapoint:s,change:d,changeDataUnit:"%",context:"button",selected:n.includes(1),handleStatSelection:i},{className:"googlesitekit-data-block--ctr googlesitekit-data-block--button-3",title:Object(p.__)("Average CTR","google-site-kit"),datapoint:c+"%",change:g,changeDataUnit:"%",context:"button",selected:n.includes(2),handleStatSelection:i},{className:"googlesitekit-data-block--position googlesitekit-data-block--button-4",title:Object(p.__)("Average Position","google-site-kit"),datapoint:l,change:h,changeDataUnit:"%",context:"button",selected:n.includes(3),handleStatSelection:i}];return e.createElement(m.b,null,e.createElement("section",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner",role:"toolbar","aria-label":"Line Chart Options"},f.map((function(t,a){return e.createElement("div",{key:a,className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{stat:a,className:t.className,title:t.title,datapoint:t.datapoint,change:t.change,changeDataUnit:t.changeDataUnit,context:t.context,selected:t.selected,handleStatSelection:t.handleStatSelection}))})))))}}]),SearchConsoleDashboardWidgetOverview}(m.a);E.propTypes={handleDataError:O.a.func.isRequired},t.a=Object(f.a)(E,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(h.o)("day"),context:["Single","Dashboard"]}],e.createElement(y.a,{width:"100%",height:"190px",padding:!0}),{createGrid:!0},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(33),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(9),h=a.n(p),b=a(1),f=a(191),v=function(t){function GoogleSitekitSearchConsoleAdminbarWidget(){return s()(this,GoogleSitekitSearchConsoleAdminbarWidget),d()(this,m()(GoogleSitekitSearchConsoleAdminbarWidget).apply(this,arguments))}return h()(GoogleSitekitSearchConsoleAdminbarWidget,t),l()(GoogleSitekitSearchConsoleAdminbarWidget,[{key:"render",value:function(){return"undefined"!==r()(e._googlesitekitLegacyData.permaLink)&&""===e._googlesitekitLegacyData.permaLink?null:n.createElement(f.a,null)}}]),GoogleSitekitSearchConsoleAdminbarWidget}(b.a);t.a=v}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(0),b=a(3),f=a(31),v=a(23),y=a(14),_=a(48),k=a(28),O=function(t){function SearchConsoleAdminbarWidgetOverview(){return r()(this,SearchConsoleAdminbarWidgetOverview),l()(this,d()(SearchConsoleAdminbarWidgetOverview).apply(this,arguments))}return m()(SearchConsoleAdminbarWidgetOverview,t),s()(SearchConsoleAdminbarWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||t.error)return null;var a=Object(_.a)(t),n=a.totalClicks,i=a.totalImpressions,r=a.totalClicksChange,o=a.totalImpressionsChange;return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(f.a,{className:"overview-total-impressions",title:Object(h.__)("Total Impressions","google-site-kit"),datapoint:i,change:o,changeDataUnit:"%"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(f.a,{className:"overview-total-clicks",title:Object(h.__)("Total Clicks","google-site-kit"),datapoint:n,change:r,changeDataUnit:"%"})))}}]),SearchConsoleAdminbarWidgetOverview}(p.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n._googlesitekitLegacyData.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(b.o)("day"),context:"Adminbar"}],e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"auto",height:"59px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"auto",height:"59px"}))),{inGrid:!0},_.b)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(193),h=function(t){function WPSearchConsoleDashboardWidget(){return i()(this,WPSearchConsoleDashboardWidget),c()(this,u()(WPSearchConsoleDashboardWidget).apply(this,arguments))}return g()(WPSearchConsoleDashboardWidget,t),o()(WPSearchConsoleDashboardWidget,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement(p.a,null))}}]),WPSearchConsoleDashboardWidget}(m.a);t.a=h}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(3),b=a(28),f=a(31),v=a(23),y=a(14),_=a(48),k=a(41),O=function(t){function WPSearchConsoleDashboardWidgetOverview(){return i()(this,WPSearchConsoleDashboardWidgetOverview),c()(this,u()(WPSearchConsoleDashboardWidgetOverview).apply(this,arguments))}return g()(WPSearchConsoleDashboardWidgetOverview,t),o()(WPSearchConsoleDashboardWidgetOverview,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=Object(_.a)(t),n=a.totalClicks,i=a.totalImpressions,r=a.totalClicksChange,o=a.totalImpressionsChange;return e.createElement(m.b,null,t.length?e.createElement(m.b,null,e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-impressions",title:Object(p.__)("Total Impressions","google-site-kit"),datapoint:i,change:o,changeDataUnit:"%"}),e.createElement(f.a,{className:"googlesitekit-wp-dashboard-stats__data-table overview-total-clicks",title:Object(p.__)("Total Clicks","google-site-kit"),datapoint:n,change:r,changeDataUnit:"%"})):e.createElement("div",{className:"googlesitekit-wp-dashboard-stats__cta"},e.createElement(k.a,{title:Object(p.__)("Search Console Data Empty","google-site-kit"),description:Object(p.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""})))}}]),WPSearchConsoleDashboardWidgetOverview}(m.a);t.a=Object(v.a)(O,[{type:y.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(h.o)("day"),context:["WPDashboard"]}],e.createElement(b.a,{width:"23%",height:"94px",count:2}),{},_.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(17),b=a.n(h),f=a(0),v=a(3),y=a(26),_=a(52),k=a(89),O=a(122),E=function(t){function DashboardSearchFunnel(){return r()(this,DashboardSearchFunnel),l()(this,d()(DashboardSearchFunnel).apply(this,arguments))}return m()(DashboardSearchFunnel,t),s()(DashboardSearchFunnel,[{key:"render",value:function(){var t=Object(v.k)(),a=e._googlesitekitLegacyData.permissions.canManageOptions,i=t.analytics.active||a?12:6;return n.createElement(p.b,null,n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(_.a,{title:Object(f.__)("Search Funnel","google-site-kit"),description:Object(f.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit")})),n.createElement("div",{className:b()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-".concat(i))},n.createElement(y.a,{className:"googlesitekit-analytics-search-funnel"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement(O.a,null),!t.analytics.active&&n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(k.a,null)))))))}}]),DashboardSearchFunnel}(p.a);t.a=E}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,n){var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(9),m=a.n(g),p=a(1),h=a(0),b=a(31),f=a(23),v=a(14),y=a(48),_=a(61),k=a(28),O=a(3),E=a(41),S=function(t){function SearchConsoleDashboardWidgetTopLevel(){return r()(this,SearchConsoleDashboardWidgetTopLevel),l()(this,d()(SearchConsoleDashboardWidgetTopLevel).apply(this,arguments))}return m()(SearchConsoleDashboardWidgetTopLevel,t),s()(SearchConsoleDashboardWidgetTopLevel,[{key:"render",value:function(){var t=this.props.data,a=t.error;if(a)return Object(O.y)("plugin_setup","search_console_error",a.message),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(E.a,{title:Object(h.__)("Something went wrong","google-site-kit"),description:a.message,error:!0}));if(!t)return null;if(!t.length)return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(E.a,{title:Object(h.__)("Search Console Data Empty","google-site-kit"),description:Object(h.__)("Search Console data is not yet available, please check back later.","google-site-kit"),ctaLink:"",ctaLabel:""}));var n=Object(O.n)("googlesitekit-module-search-console",{}),i=Object(y.a)(t),r=i.totalClicks,o=i.totalImpressions,s=i.totalClicksChange,c=i.totalImpressionsChange,l=i.dataMap;return e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{className:"overview-total-impressions",title:Object(h.__)("Impressions","google-site-kit"),datapoint:o,change:c,changeDataUnit:"%",source:{name:Object(h._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:e.createElement(_.a,{data:Object(O.g)(l,2),change:c})})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(b.a,{className:"overview-total-clicks",title:Object(h.__)("Clicks","google-site-kit"),datapoint:r,change:s,changeDataUnit:"%",source:{name:Object(h._x)("Search Console","Service name","google-site-kit"),link:n},sparkline:e.createElement(_.a,{data:Object(O.g)(l,1),change:s})})))}}]),SearchConsoleDashboardWidgetTopLevel}(p.a);t.a=Object(f.a)(S,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{url:n._googlesitekitLegacyData.permaLink,dimensions:"date",compareDateRanges:!0},priority:1,maxAge:Object(O.o)("day"),context:["Single","Dashboard"]}],e.createElement(p.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"100%",height:"202px"})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-bottom mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-3-desktop "},e.createElement(k.a,{width:"100%",height:"202px"}))),{inGrid:!0},y.b)}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(26),b=a(122),f=a(3),v=a(89),y=a(52),_=function(t){function DashboardDetailsSearchFunnel(){return i()(this,DashboardDetailsSearchFunnel),c()(this,u()(DashboardDetailsSearchFunnel).apply(this,arguments))}return g()(DashboardDetailsSearchFunnel,t),o()(DashboardDetailsSearchFunnel,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(y.a,{description:Object(p.__)("How your site appeared in Search results and how many visitors you got from Search.","google-site-kit"),title:Object(p.__)("Search Funnel","google-site-kit")})),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},e.createElement(h.a,{className:"googlesitekit-analytics-search-funnel"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement(b.a,null),!Object(f.k)().analytics.active&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(v.a,null)))))))}}]),DashboardDetailsSearchFunnel}(m.a);t.a=_}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(121),b=a(52),f=a(26),v=a(3),y=function(t){function DashboardDetailsWidgetKeywordsTable(){return i()(this,DashboardDetailsWidgetKeywordsTable),c()(this,u()(DashboardDetailsWidgetKeywordsTable).apply(this,arguments))}return g()(DashboardDetailsWidgetKeywordsTable,t),o()(DashboardDetailsWidgetKeywordsTable,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{title:Object(p.__)("Top Queries","google-site-kit"),description:Object(p.__)("What people searched for to find your page.","google-site-kit")})),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(f.a,{footer:!0,footerCtaLabel:Object(p._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(p.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(v.k)()["search-console"].settings.propertyID)},e.createElement(h.a,null))))}}]),DashboardDetailsWidgetKeywordsTable}(m.a);t.a=y}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(12),h=a(0),b=a(3),f=a(23),v=a(14),y=a(36),_=a(47),k=a(26),O=a(48),E=function(t){function DashboardWidgetPopularKeywordsTable(){return i()(this,DashboardWidgetPopularKeywordsTable),c()(this,u()(DashboardWidgetPopularKeywordsTable).apply(this,arguments))}return g()(DashboardWidgetPopularKeywordsTable,t),o()(DashboardWidgetPopularKeywordsTable,[{key:"render",value:function(){var t=this.props.data;if(!t||!t.length)return null;var a=[{title:Object(h.__)("Top search queries for your site","google-site-kit"),tooltip:Object(h.__)("Most searched for keywords related to your content","google-site-kit"),primary:!0},{title:Object(h.__)("Clicks","google-site-kit"),tooltip:Object(h.__)("Number of times users clicked on your content in search results","google-site-kit")},{title:Object(h.__)("Impressions","google-site-kit"),tooltip:Object(h.__)("Counted each time your content appears in search results","google-site-kit")}],n=Object(b.k)()["search-console"].settings.propertyID,i=[],r=Object(p.map)(t,(function(e,t){var a=e.keys[0];return i[t]=Object(h.sprintf)("https://search.google.com/search-console/performance/search-analytics?resource_id=%1$s&query=!%2$s&num_of_days=28",n,a),[a,Object(b.r)(e.clicks),Object(b.r)(e.impressions)]})),o={hideHeader:!1,chartsEnabled:!1,links:i},s=Object(y.b)(r,a,o);return DashboardWidgetPopularKeywordsTable.renderLayout(e.createElement(y.a,null,s))}}],[{key:"renderLayout",value:function(t){return e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-tablet "},e.createElement(k.a,{className:"googlesitekit-popular-content",footer:!0,footerCtaLabel:Object(h._x)("Search Console","Service name","google-site-kit"),footerCtaLink:Object(h.sprintf)("https://search.google.com/search-console?resource_id=%s",Object(b.k)()["search-console"].settings.propertyID),fill:!0},t))}}]),DashboardWidgetPopularKeywordsTable}(m.a);t.a=Object(f.a)(E,[{type:v.b,identifier:"search-console",datapoint:"searchanalytics",data:{dimensions:"query",limit:10},priority:1,maxAge:Object(b.o)("day"),context:["Dashboard"]}],E.renderLayout(e.createElement(_.a,{padding:!0})),{inGrid:!0,createGrid:!0},O.b)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(0),h=a(200),b=a(52),f=function(t){function DashboardPopularity(){return i()(this,DashboardPopularity),c()(this,u()(DashboardPopularity).apply(this,arguments))}return g()(DashboardPopularity,t),o()(DashboardPopularity,[{key:"render",value:function(){return e.createElement(m.b,null,e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(b.a,{title:Object(p.__)("Popularity","google-site-kit"),description:Object(p.__)("Your most popular pages and how people found them from Search.","google-site-kit")})),e.createElement(h.a,null))}}]),DashboardPopularity}(m.a);t.a=f}).call(this,a(10))},function(e,t,a){"use strict";var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(75),p=function(e){function DashboardPopularityInner(){return i()(this,DashboardPopularityInner),c()(this,u()(DashboardPopularityInner).apply(this,arguments))}return g()(DashboardPopularityInner,e),o()(DashboardPopularityInner,[{key:"render",value:function(){return null}}]),DashboardPopularityInner}(a(1).a);t.a=Object(m.a)("googlesitekit.DashboardPopularity")(p)},function(e,t,a){"use strict";(function(e,n){var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(18),h=a.n(p),b=a(9),f=a.n(b),v=a(1),y=a(12),_=a(208),k=a.n(_),O=a(0),E=a(3),S=a(14),j=a(39),D=a(26),w=function(t){function PostSearcher(e){var t;return s()(this,PostSearcher),(t=d()(this,m()(PostSearcher).call(this,e))).noResultsMessage=Object(O.__)("No results found","google-site-kit"),t.state={isSearching:!1,results:[],error:!1,message:"",canSubmit:!1,match:{}},t.postSearch=t.postSearch.bind(h()(t)),t.onClick=t.onClick.bind(h()(t)),t.onConfirm=t.onConfirm.bind(h()(t)),t}return f()(PostSearcher,t),l()(PostSearcher,[{key:"postSearch",value:function(e,t){var a;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t([Object(O.__)("Loading…","google-site-kit")]),n.prev=1,n.next=4,r.a.awrap(S.c.get(S.a,"search","post-search",{query:encodeURIComponent(e)}));case 4:0<(a=n.sent).length?t(Object(y.map)(a,(function(e){return e.post_title}))):t([this.noResultsMessage]),this.setState({isSearching:!0,results:a,error:!1,message:""}),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(1),t([this.noResultsMessage]),this.setState({isSearching:!1,error:n.t0.code,message:n.t0.message});case 13:case"end":return n.stop()}}),null,this,[[1,9]])}},{key:"getURLPathname",value:function(e){try{var t=new URL(e);return Object(y.trim)(t.pathname,"/")}catch(e){return!1}}},{key:"onConfirm",value:function(e){var t=this.state.results;if(Array.isArray(t)&&e!==this.noResultsMessage){var a=t.find((function(t){return t.post_title===e}));e&&a&&this.setState({selection:e,canSubmit:!0,match:a})}else this.setState({canSubmit:!1})}},{key:"onClick",value:function(){var t=this.state,a=t.selection,n=t.match;n&&n.ID&&e.location.assign(Object(E.n)("googlesitekit-dashboard",{id:n.ID,permaLink:n.permalink,pageTitle:a}))}},{key:"render",value:function(){var e=Object(E.k)(),t=e.analytics&&e.analytics.active?"mdc-layout-grid__cell mdc-layout-grid__cell--span-12":"mdc-layout-grid__cell mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop";return n.createElement("div",{className:t},n.createElement(D.a,{title:Object(O.__)("Search for individual page or post information","google-site-kit"),header:!0},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n.createElement("div",{className:"googlesitekit-post-searcher"},n.createElement("label",{className:"googlesitekit-post-searcher__label",htmlFor:"autocomplete"},Object(O.__)("Title or URL","google-site-kit")),n.createElement(k.a,{id:"autocomplete",source:Object(y.debounce)(this.postSearch,200),minLength:2,onConfirm:this.onConfirm,showNoOptionsFound:!1}),n.createElement("div",{className:"googlesitekit-post-searcher__button-wrapper"},n.createElement(j.a,{onClick:this.onClick,className:"googlesitekit-post-searcher__button",disabled:!this.state.canSubmit},Object(O.__)("View Data","google-site-kit")))))))))}}]),PostSearcher}(v.a);t.a=w}).call(this,a(16),a(10))},,,,,,,,,,,,function(e,t,a){"use strict";(function(e,t){a(1);var n=a(21),i=a(3),r=a(161),o=a(166),s=a(13),c="adsense";Object(s.b)("googlesitekit.SetupModuleShowLink","googlesitekit.adsenseSetupModuleShowLink",(function(t,a){return!("adsense"===a&&!e._googlesitekitLegacyData.canAdsRun)&&t}));var l=Object(i.k)();if(l.adsense.active){var u=Object(n.a)(t.createElement(r.a,null)),d=Object(n.a)(t.createElement(o.a,null));if(l[c].setupComplete)Object(s.b)("googlesitekit.ModuleApp-".concat(c),"googlesitekit.ModuleApp",u),Object(s.b)("googlesitekit.DashboardModule","googlesitekit.DashboardEarningModule",d,50);else{var g=e._googlesitekitLegacyData.admin,m=g.reAuth,p=g.currentScreen,h=p?p.id:null;m||"site-kit_page_googlesitekit-module-adsense"!==h||(e.location=Object(i.n)("googlesitekit-module-".concat(c),{reAuth:!0,slug:c})),Object(s.b)("googlesitekit.Connected-".concat(c),"googlesitekit.AdSenseModuleConnected",(function(e){var t=l[c].settings;return!(e||void 0===t||"graylisted"!==t.accountStatus&&"pending"!==t.accountStatus)||e}))}Object(s.b)("googlesitekit.ModulesNotificationsRequest","googlesitekit.adsenseNotifications",(function(e){return e.push({identifier:"adsense"}),e}))}}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e,t){a(1);var n=a(13),i=a(3),r=a(21),o=a(169),s=a(174),c=a(176),l=a(178),u=a(179),d=a(181),g=a(182),m=a(183),p=a(184),h=a(185),b="analytics",f=Object(r.a)(e.createElement(s.a,null));Object(n.b)("googlesitekit.AdminbarModules","googlesitekit.Analytics",f,11);var v=Object(i.k)();if(!v[b].setupComplete){var y=t._googlesitekitLegacyData.admin,_=y.reAuth,k=y.currentScreen,O=k?k.id:null;_||"site-kit_page_googlesitekit-module-analytics"!==O||(t.location=Object(i.n)("googlesitekit-module-".concat(b),{reAuth:!0,slug:b}))}if(v.analytics.active){var E=Object(r.a)(e.createElement(o.a,null)),S=Object(r.a)(e.createElement(c.a,null)),j=Object(r.a)(e.createElement(u.a,null)),D=Object(r.a)(e.createElement(g.a,null)),w=Object(r.a)(e.createElement(l.a,null)),C=Object(r.a)(e.createElement(d.a,null)),A=Object(r.a)(e.createElement(m.a,null)),N=Object(r.a)(e.createElement(p.a,null)),x=Object(r.a)(e.createElement(h.a,null));Object(n.b)("googlesitekit.DashboardModule","googlesitekit.Analytics",S,9),Object(n.b)("googlesitekit.DashboardSearchFunnel","googlesitekit.Analytics",w,11),Object(n.b)("googlesitekit.DashboardPopularity","googlesitekit.Analytics",N,20),Object(n.b)("googlesitekit.AnalyticsAdSenseTopPagesTableSmall","googlesitekit.Analytics",x,20),Object(n.b)("googlesitekit.DashboardDetailsModule","googlesitekit.Analytics",C,20),Object(n.b)("googlesitekit.WPDashboardHeader","googlesitekit.Analytics",j),Object(n.b)("googlesitekit.WPDashboardModule","googlesitekit.Analytics",D),v[b].setupComplete&&Object(n.b)("googlesitekit.ModuleApp-"+b,"googlesitekit.Analytics",E),Object(n.b)("googlesitekit.AnalyticsAdSenseTopPagesTable","googlesitekit.Analytics",A,11),Object(n.b)("googlesitekit.showDateRangeSelector-".concat(b),"googlesitekit.analyticsShowDateRangeSelector",(function(){return!0}))}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){a(1);var t=a(13),n=a(21),i=a(186),r=a(3),o=Object(r.k)()["pagespeed-insights"],s=o.active,c=o.setupComplete;s&&c||Object(t.b)("googlesitekit.DashboardModule","googlesitekit.PageSpeedInsights",Object(n.a)(e.createElement(i.a,null)),45)}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var t=a(13),n=a(21),i=a(201),r=a(187),o=a(190),s=a(192),c=a(194),l=a(195),u=a(197),d=a(198),g=a(196),m=a(199),p="search-console",h=Object(n.a)(e.createElement(r.a,null)),b=Object(n.a)(e.createElement(o.a,null)),f=Object(n.a)(e.createElement(s.a,null)),v=Object(n.a)(e.createElement(c.a,null)),y=Object(n.a)(e.createElement(l.a,null)),_=Object(n.a)(e.createElement(g.a,null)),k=Object(n.a)(e.createElement(u.a,null)),O=Object(n.a)(e.createElement(d.a,null)),E=Object(n.a)(e.createElement(m.a,null)),S=Object(n.a)(e.createElement(i.a,null));Object(t.b)("googlesitekit.DashboardModule","googlesitekit.SearchConsole",v,11),Object(t.b)("googlesitekit.DashboardModule","googlesitekit.DashboardPopularityModule",E,40),Object(t.b)("googlesitekit.DashboardSearchFunnel","googlesitekit.SearchConsoleSearchFunnel",y),Object(t.b)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",_),Object(t.b)("googlesitekit.DashboardDetailsModule","googlesitekit.SearchConsole",k,40),Object(t.b)("googlesitekit.DashboardPopularity","googlesitekit.SearchConsoleDashboardPopularity",O),Object(t.b)("googlesitekit.DashboardPopularity","googlesitekit.DashboardPPostSearcherModule",S,30),Object(t.b)("googlesitekit.WPDashboardHeader","googlesitekit.SearchConsole",f,11),Object(t.b)("googlesitekit.ModuleApp-"+p,"googlesitekit.ModuleApp",h),Object(t.b)("googlesitekit.showDateRangeSelector-".concat(p),"googlesitekit.searchConsoleShowDateRangeSelector",(function(){return!0})),Object(t.b)("googlesitekit.AdminbarModules","googlesitekit.SearchConsole",b)}).call(this,a(10))},,,,function(e,t,a){"use strict";a(213),a(214);var n=a(13),i=a(0),r=a(140),o=a(3),s="optimize";Object(o.k)().optimize.active&&(Object(n.b)("googlesitekit.ModuleSettingsDetails-".concat(s),"googlesitekit.OptimizeModuleSettingsDetails",Object(o.h)(r.a,{onSettingsPage:!0})),Object(n.b)("googlesitekit.ModuleSetup-".concat(s),"googlesitekit.OptimizeModuleSetupWizard",Object(o.h)(r.a,{onSettingsPage:!1})),Object(n.b)("googlesitekit.SetupWinNotification-".concat(s),"googlesitekit.OptimizeSetupWinNotification",(function(e){return e.description=Object(i.__)("To set up experiments and see the results, go to ","google-site-kit"),e.learnMore.label="Optimize",e.learnMore.url="https://optimize.withgoogle.com/",e})));a(215),a(216);var c=a(141);Object(o.k)().tagmanager.active&&(Object(n.b)("googlesitekit.ModuleSettingsDetails-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSettingsDetails",Object(o.h)(c.a,{onSettingsPage:!0})),Object(n.b)("googlesitekit.ModuleSetup-".concat("tagmanager"),"googlesitekit.TagmanagerModuleSetupWizard",Object(o.h)(c.a,{onSettingsPage:!1})))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t),function(e,n){a.d(t,"GoogleSitekitAdminbar",(function(){return S})),a.d(t,"init",(function(){return j}));var i=a(4),r=a.n(i),o=a(5),s=a.n(o),c=a(6),l=a.n(c),u=a(7),d=a.n(u),g=a(8),m=a.n(g),p=a(18),h=a.n(p),b=a(9),f=a.n(b),v=a(1),y=(a(220),a(0)),_=a(3),k=a(25),O=a(625),E=a(134),S=function(t){function GoogleSitekitAdminbar(e){var t;return s()(this,GoogleSitekitAdminbar),(t=d()(this,m()(GoogleSitekitAdminbar).call(this,e))).handleMoreDetailsLink=t.handleMoreDetailsLink.bind(h()(t)),t}return f()(GoogleSitekitAdminbar,t),l()(GoogleSitekitAdminbar,[{key:"handleMoreDetailsLink",value:function(){var t,a,n,i,o,s;return r.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return t=e._googlesitekitLegacyData,a=t.permaLink,n=t.postID,i=t.postType,o=t.pageTitle,s=Object(_.n)("googlesitekit-dashboard",{permaLink:a,id:n,postType:i,pageTitle:o}),c.next=4,r.a.awrap(Object(_.y)("admin_bar","post_details_click"));case 4:document.location=s;case 5:case"end":return c.stop()}}))}},{key:"render",value:function(){var t=e._googlesitekitLegacyData,a=t.pageTitle,i=t.permaLink;return n.createElement(v.b,null,n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-3 mdc-layout-grid__cell--align-middle "},n.createElement("div",{className:"googlesitekit-adminbar__subtitle"},Object(y.__)("Stats for","google-site-kit")),n.createElement("div",{className:"googlesitekit-adminbar__title"},a?Object(_.f)(a):i)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--align-middle "},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement(O.a,null))),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle "},n.createElement(k.a,{className:"googlesitekit-adminbar__link",href:"#",onClick:this.handleMoreDetailsLink},Object(y.__)("More details","google-site-kit"))))),n.createElement(k.a,{className:"googlesitekit-adminbar__link googlesitekit-adminbar__link--mobile",href:"#",onClick:this.handleMoreDetailsLink},Object(y.__)("More details","google-site-kit")))}}]),GoogleSitekitAdminbar}(v.a);function j(){var e=document.getElementById("js-googlesitekit-adminbar-modules");e&&(Object(_.p)(),Object(v.k)(n.createElement(E.a,{dataAPIContext:"Adminbar"},n.createElement(S,null)),e))}}.call(this,a(16),a(10))},,,,,,,,,,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),m=a(1),p=a(75),h=function(t){function AdminbarModules(){return i()(this,AdminbarModules),c()(this,u()(AdminbarModules).apply(this,arguments))}return g()(AdminbarModules,t),o()(AdminbarModules,[{key:"render",value:function(){return e.createElement(m.b,null)}}]),AdminbarModules}(m.a);t.a=Object(p.a)("googlesitekit.AdminbarModules")(h)}).call(this,a(10))}]]);
|
dist/assets/js/chunk-googlesitekit-setup-wizard-1e21b4ac2926615f8918.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[2],{146:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(17),_=i.n(f),k=i(25),y=function(t){function LayoutHeader(){return a()(this,LayoutHeader),c()(this,u()(LayoutHeader).apply(this,arguments))}return p()(LayoutHeader,t),s()(LayoutHeader,[{key:"render",value:function(){var t=this.props,i=t.title,n=t.ctaLabel,a=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},i&&e.createElement("div",{className:_()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":a,"mdc-layout-grid__cell--span-12-desktop":!a,"mdc-layout-grid__cell--span-8-tablet":!a})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},i)),a&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(k.a,{href:a,external:!0,inherit:!0},n)))))}}]),LayoutHeader}(g.a);y.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},y.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=y}).call(this,i(10))},147:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(77),_=function(t){function LayoutFooter(){return a()(this,LayoutFooter),c()(this,u()(LayoutFooter).apply(this,arguments))}return p()(LayoutFooter,t),s()(LayoutFooter,[{key:"render",value:function(){var t=this.props,i=t.ctaLabel,n=t.ctaLink,a=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&i&&e.createElement(f.a,{className:"googlesitekit-data-block__source",name:i,href:n,external:!0}),a))))}}]),LayoutFooter}(g.a);_.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=_}).call(this,i(10))},158:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),y=i(0),v=i(3),b=i(97),S=i(39),E=i(159),C=i(102),N=function(t){function UserMenu(e){var t;return o()(this,UserMenu),(t=d()(this,g()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(k.h)(),t.menuRef=Object(k.h)(),t}return _()(UserMenu,t),l()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,i){var n=e._googlesitekitLegacyData.admin.proxyPermissionsURL;if("keydown"===i.type&&(13===i.keyCode||32===i.keyCode)||"click"===i.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(v.d)(),document.location=Object(v.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e._googlesitekitLegacyData.admin,i=t.userData,a=i.email,r=void 0===a?"":a,s=i.picture,o=void 0===s?"":s,c=t.proxyPermissionsURL,l=this.state,u=l.dialogActive,d=l.menuOpen;return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},n.createElement(S.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?n.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},n.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(y.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},r),n.createElement(E.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(y.__)("Disconnect","google-site-kit")].concat(c?[Object(y.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),n.createElement(C.a,null,n.createElement(b.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Disconnect","google-site-kit"),subtitle:Object(y.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(y.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(k.a);t.a=N}).call(this,i(16),i(10))},159:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(32),_=function(t){function Menu(e){var t;return a()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(g.h)(),t}return p()(Menu,t),s()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new f.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,i=t.menuOpen,n=t.menuItems,a=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!i,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(t,i){return e.createElement("li",{key:i,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,i),onKeyDown:a.bind(null,i)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(g.a);_.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=_}).call(this,i(10))},160:function(e,t,i){"use strict";var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(75),m=function(e){function ErrorNotification(){return a()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return p()(ErrorNotification,e),s()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(i(1).a);t.a=Object(g.a)("googlesitekit.ErrorNotification")(m)},252:function(e,t,i){"use strict";(function(e){var n=i(4),a=i.n(n),r=i(11),s=i.n(r),o=i(5),c=i.n(o),l=i(6),u=i.n(l),d=i(7),p=i.n(d),g=i(8),m=i.n(g),h=i(18),f=i.n(h),_=i(9),k=i.n(_),y=i(1),v=i(2),b=i.n(v),S=i(17),E=i.n(S),C=i(58),N=i(0),w=i(3),L=i(253),O=i(50),R=function(t){function OptIn(e){var t;return c()(this,OptIn),(t=p()(this,m()(OptIn).call(this,e))).state={optIn:Object(O.a)(),error:!1},t.handleOptIn=t.handleOptIn.bind(f()(t)),t}return k()(OptIn,t),u()(OptIn,[{key:"handleOptIn",value:function(e){var t,i;return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=!!e.target.checked,i=Object(w.j)("googlesitekit_tracking_optin"),Object(O.b)(t),!t){n.next=6;break}return n.next=6,a.a.awrap(Object(O.c)("tracking_plugin",this.props.optinAction));case 6:return n.prev=6,n.next=9,a.a.awrap(Object(C.default)({path:"/wp/v2/users/me",method:"POST",data:{meta:s()({},i,t)}}));case 9:this.setState({optIn:t,error:!1}),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(6),this.setState({optIn:!t,error:{errorCode:n.t0.code,errorMsg:n.t0.message}});case 15:case"end":return n.stop()}}),null,this,[[6,12]])}},{key:"render",value:function(){var t=this.state,i=t.optIn,n=t.error,a=this.props,r=a.id,s=a.name,o=a.className,c=Object(N.sprintf)(
|
2 |
+
/* translators: %s: privacy policy URL */
|
3 |
+
Object(N.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:E()("googlesitekit-opt-in",o)},e.createElement(L.a,{id:r,name:s,value:"1",checked:i,onChange:this.handleOptIn},e.createElement("span",{dangerouslySetInnerHTML:Object(w.u)(c,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})})),n&&e.createElement("div",{className:"googlesitekit-error-text"},n.errorMsg))}}]),OptIn}(y.a);R.propTypes={id:b.a.string,name:b.a.string,className:b.a.string,optinAction:b.a.string},R.defaultProps={id:"googlesitekit-opt-in",name:"optIn"},t.a=R}).call(this,i(10))},253:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(17),_=i.n(f),k=i(32),y=function(t){function Checkbox(e){var t;return a()(this,Checkbox),(t=c()(this,u()(Checkbox).call(this,e))).formFieldRef=Object(g.h)(),t.checkboxRef=Object(g.h)(),t}return p()(Checkbox,t),s()(Checkbox,[{key:"componentDidMount",value:function(){new k.e(this.formFieldRef.current).input=new k.c(this.checkboxRef.current)}},{key:"render",value:function(){var t=this.props,i=t.onChange,n=t.id,a=t.name,r=t.value,s=t.checked,o=t.disabled,c=t.children;return e.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},e.createElement("div",{className:_()("mdc-checkbox",{"mdc-checkbox--disabled":o}),ref:this.checkboxRef},e.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:n,name:a,value:r,checked:s,disabled:o,onChange:i}),e.createElement("div",{className:"mdc-checkbox__background"},e.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},e.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),e.createElement("div",{className:"mdc-checkbox__mixedmark"}))),e.createElement("label",{htmlFor:n},c))}}]),Checkbox}(g.a);y.propTypes={onChange:h.a.func.isRequired,id:h.a.string.isRequired,name:h.a.string.isRequired,value:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,children:h.a.node.isRequired},y.defaultProps={checked:!1,disabled:!1},t.a=y}).call(this,i(10))},26:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(17),_=i.n(f),k=i(146),y=i(147),v=function(t){function Layout(){return a()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return p()(Layout,t),s()(Layout,[{key:"render",value:function(){var t=this.props,i=t.header,n=t.footer,a=t.children,r=t.title,s=t.headerCtaLabel,o=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,p=t.fill,g=t.relative;return e.createElement("div",{className:_()("googlesitekit-layout",d,{"googlesitekit-layout--fill":p,"googlesitekit-layout--relative":g})},i&&e.createElement(k.a,{title:r,ctaLabel:s,ctaLink:o}),a,n&&e.createElement(y.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(g.a);v.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},v.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=v}).call(this,i(10))},614:function(e,t,i){"use strict";i.r(t),function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),y=i(12),v=i(0),b=i(83),S=i(39),E=i(26),C=i(14),N=i(3),w=i(617),L=i(624),O=function(t){function Setup(t){var i;o()(this,Setup),i=d()(this,g()(Setup).call(this,t));var n=e._googlesitekitLegacyData.admin.connectURL,a=e._googlesitekitLegacyData.setup,r=a.isAuthenticated,s=a.hasSearchConsoleProperty,c=a.isSiteKitConnected,l=a.isVerified,u=a.needReauthenticate,p=e._googlesitekitLegacyData.permissions.canSetup;return i.state={canSetup:p,isAuthenticated:r,isVerified:l,needReauthenticate:u,hasSearchConsoleProperty:s,hasSearchConsolePropertyFromTheStart:s,connectURL:n,errorMsg:"",isSiteKitConnected:c,completeSetup:!1},i.siteConnectedSetup=i.siteConnectedSetup.bind(h()(i)),i.siteVerificationSetup=i.siteVerificationSetup.bind(h()(i)),i.searchConsoleSetup=i.searchConsoleSetup.bind(h()(i)),i.resetAndRestart=i.resetAndRestart.bind(h()(i)),i.completeSetup=i.completeSetup.bind(h()(i)),i.setErrorMessage=i.setErrorMessage.bind(h()(i)),i}return _()(Setup,t),l()(Setup,[{key:"resetAndRestart",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(C.c.set(C.a,"site","reset"));case 2:Object(N.d)(),this.setState({isSiteKitConnected:!1,isAuthenticated:!1,isVerified:!1,hasSearchConsoleProperty:!1,completeSetup:!1,errorMsg:""});case 4:case"end":return e.stop()}}),null,this)}},{key:"completeSetup",value:function(){this.setState({completeSetup:!0})}},{key:"siteConnectedSetup",value:function(e){this.setState({isSiteKitConnected:e})}},{key:"siteVerificationSetup",value:function(e){this.setState({isVerified:e})}},{key:"searchConsoleSetup",value:function(e){this.setState({hasSearchConsoleProperty:e})}},{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,i=e.isAuthenticated,n=e.isVerified,a=e.hasSearchConsoleProperty,r=e.completeSetup;return t&&i&&n&&a&&r}},{key:"setErrorMessage",value:function(e){this.setState({errorMsg:e})}},{key:"getApplicableSteps",value:function(){var e,t=w.a,i=Object.keys(t);for(e=0;e<i.length;e++)t[i[e]].isApplicable(this.state)||delete t[i[e]];return t}},{key:"currentStep",value:function(e){var t,i=Object.keys(e);for(t=0;t<i.length-1;t++)if(!e[i[t]].isCompleted(this.state))return i[t];return i[t]}},{key:"stepStatus",value:function(e,t){return e[t].isCompleted(this.state)?"completed":t===this.currentStep(e)?"inprogress":""}},{key:"render",value:function(){var t=this,i=this.state,a=i.canSetup,s=i.isAuthenticated,o=i.isVerified,c=i.needReauthenticate,l=i.hasSearchConsoleProperty,u=i.connectURL,d=i.isSiteKitConnected;if(this.isSetupFinished()){var p=Object(N.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(y.delay)((function(){e.location.replace(p)}),500,"later")}var g=this.getApplicableSteps(),m=this.currentStep(g),h=g[m].Component,f=n.createElement(h,{siteConnectedSetup:this.siteConnectedSetup,connectURL:u,siteVerificationSetup:this.siteVerificationSetup,searchConsoleSetup:this.searchConsoleSetup,completeSetup:this.completeSetup,isSiteKitConnected:d,isAuthenticated:s,isVerified:o,needReauthenticate:c,hasSearchConsoleProperty:l,setErrorMessage:this.setErrorMessage,resetAndRestart:g.clientCredentials?this.resetAndRestart:void 0}),_=a,C=!_&&!s;return n.createElement(k.b,null,n.createElement(b.a,null),n.createElement("div",{className:"googlesitekit-wizard"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(E.a,null,n.createElement("section",{className:"googlesitekit-wizard-progress"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},_&&n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement("div",{className:"googlesitekit-wizard-progress__steps"},Object.keys(g).map((function(e,i){return n.createElement(L.a,{key:g[e].title,currentStep:m===e,title:g[e].title,step:i+1,status:t.stepStatus(g,e),warning:g[e].warning,error:g[e].error,stepKey:e})})))))),C&&n.createElement("div",{className:"googlesitekit-setup__footer"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement("h1",{className:"googlesitekit-setup__title"},Object(v.__)("Authenticate Site Kit","google-site-kit")),n.createElement("p",{className:"googlesitekit-setup__description"},Object(v.__)("Please sign into your Google account to begin.","google-site-kit")),n.createElement(S.a,{href:"#",onClick:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(Object(N.y)("plugin_setup","signin_with_google"));case 2:document.location=u;case 3:case"end":return e.stop()}}))}},Object(v.__)("Sign in with Google","google-site-kit"))))))),_&&f))))))}}]),Setup}(k.a);t.default=O}.call(this,i(16),i(10))},617:function(e,t,i){"use strict";var n=i(0),a=i(618),r=i(619),s=i(621),o=i(623),c={authentication:{title:Object(n.__)("Authenticate","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&!e.needReauthenticate},Component:a.a},verification:{title:Object(n.__)("Verify URL","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified},Component:r.a},seachConsoleProperty:{title:Object(n.__)("Connect Search Console","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:s.a},completeSetup:{title:Object(n.__)("Finish","google-site-kit"),required:!1,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:o.a}};t.a=c},618:function(e,t,i){"use strict";(function(e){var n=i(4),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(9),m=i.n(g),h=i(1),f=i(2),_=i.n(f),k=i(0),y=i(3),v=i(39),b=i(25),S=i(252),E=i(82),C=function(t){function WizardStepAuthentication(){return s()(this,WizardStepAuthentication),u()(this,p()(WizardStepAuthentication).apply(this,arguments))}return m()(WizardStepAuthentication,t),c()(WizardStepAuthentication,[{key:"render",value:function(){var t=this.props,i=t.connectURL,n=t.needReauthenticate,r=t.resetAndRestart;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--two"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(k.__)("Authenticate with Google","google-site-kit")),e.createElement("p",null,Object(k.__)("Please sign into your Google account to begin.","google-site-kit")),n&&e.createElement("p",{className:"googlesitekit-error-text"},Object(k.__)("You did not grant access to one or more of the requested scopes. Please grant all scopes that you are prompted for.","google-site-kit")),e.createElement("p",null,e.createElement(v.a,{onClick:function(){return a.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.awrap(Object(y.y)("plugin_setup","signin_with_google"));case 2:document.location=i;case 3:case"end":return e.stop()}}))}},Object(k.__)("Sign in with Google","google-site-kit")),r&&e.createElement(b.a,{className:"googlesitekit-wizard-step__back",onClick:r},Object(k.__)("Back","google-site-kit"))),e.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},e.createElement(S.a,{optinAction:"analytics_optin_setup_fallback"}),e.createElement(E.a,null))))))}}]),WizardStepAuthentication}(h.a);C.propTypes={connectURL:_.a.string.isRequired,resetAndRestart:_.a.func},t.a=C}).call(this,i(10))},619:function(e,t,i){"use strict";(function(e){var n=i(87),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(9),m=i.n(g),h=i(1),f=i(2),_=i.n(f),k=i(620),y=function(t){function WizardStepVerification(){return s()(this,WizardStepVerification),u()(this,p()(WizardStepVerification).apply(this,arguments))}return m()(WizardStepVerification,t),c()(WizardStepVerification,[{key:"render",value:function(){var t=!this.props.isVerified;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--three"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,a()({shouldSetup:t},this.props))))))}}]),WizardStepVerification}(h.a);y.propTypes={siteVerificationSetup:_.a.func.isRequired},t.a=y}).call(this,i(10))},620:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),y=i(2),v=i.n(y),b=i(0),S=i(3),E=i(32),C=i(14),N=i(39),w=i(44),L=i(82),O=function(t){function SiteVerification(e){var t;o()(this,SiteVerification);var i=(t=d()(this,g()(SiteVerification).call(this,e))).props,n=i.isAuthenticated,a=i.shouldSetup;return t.state={loading:n&&a,loadingMsg:Object(b.__)("Getting your verified sites…","google-site-kit"),siteURL:" ",selectedURL:"",errorCode:!1,errorMsg:""},t.onProceed=t.onProceed.bind(h()(t)),t}return _()(SiteVerification,t),l()(SiteVerification,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup;t&&i&&this.requestSitePropertyList()}},{key:"requestSitePropertyList",value:function(){var t,i,n,a,s,o=this,c=this.props.setErrorMessage;r.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,r.a.awrap(C.c.get(C.b,"site-verification","verification"));case 3:if(t=l.sent,i=t.verified,n=t.identifier,!i){l.next=17;break}return l.next=9,r.a.awrap(Object(S.y)("verification_setup","verification_check_true"));case 9:return l.next=11,r.a.awrap(o.insertSiteVerification(n));case 11:if(!0!==l.sent.verified){l.next=15;break}return o.props.siteVerificationSetup(!0),l.abrupt("return",!0);case 15:l.next=19;break;case 17:return l.next=19,r.a.awrap(Object(S.y)("verification_setup","verification_check_false"));case 19:o.setState({loading:!1,siteURL:n}),l.next=28;break;case 22:l.prev=22,l.t0=l.catch(0),a=l.t0.message,Object(S.z)(l.t0.message)&&(s=JSON.parse(l.t0.message),a=s.error.message||l.t0.message),c(a),o.setState({loading:!1,errorCode:l.t0.code,errorMsg:a,siteURL:e._googlesitekitLegacyData.admin.siteURL});case 28:case"end":return l.stop()}}),null,null,[[0,22]])}},{key:"insertSiteVerification",value:function(e){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.a.awrap(C.c.set(C.b,"site-verification","verification",{siteURL:e}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},{key:"onProceed",value:function(){var t,i,n,a;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t=this.props.setErrorMessage,i=this.state.siteURL?this.state.siteURL:e._googlesitekitLegacyData.admin.siteURL,t(""),this.setState({loading:!0,loadingMsg:Object(b.__)("Verifying…","google-site-kit"),errorCode:!1,errorMsg:""}),s.prev=4,s.next=7,r.a.awrap(this.insertSiteVerification(i));case 7:!0===s.sent.verified&&(Object(S.y)("verification_setup","verification_insert_tag"),this.props.siteVerificationSetup(!0)),s.next=17;break;case 11:s.prev=11,s.t0=s.catch(4),n=s.t0.message,Object(S.z)(s.t0.message)&&(a=JSON.parse(s.t0.message),n=a.error.message||s.t0.message),t(n),this.setState({loading:!1,errorCode:s.t0.code,errorMsg:n});case 17:case"end":return s.stop()}}),null,this,[[4,11]])}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,i=e.loadingMsg,a=e.siteURL,r=n.createElement(k.b,null,i&&n.createElement("p",null,i),n.createElement(w.a,null));return t?r:n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-wizard-step__inputs"},n.createElement(E.k,{label:Object(b.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},n.createElement(E.b,{value:a}))),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(N.a,{onClick:this.onProceed},Object(b.__)("Continue","google-site-kit")),n.createElement(L.a,null)))}},{key:"render",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup,a=this.state.errorMsg;return i?n.createElement(k.b,null,n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(b.__)("Verify URL","google-site-kit")),n.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(b.__)("We will need to verify your URL for Site Kit.","google-site-kit")),a&&0<a.length&&n.createElement("p",{className:"googlesitekit-error-text"},a),t&&this.renderForm()):SiteVerification.renderSetupDone()}}],[{key:"renderSetupDone",value:function(){return n.createElement(k.b,null,n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(b.__)("Verify URL","google-site-kit")),n.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(b.__)("Congratulations, your site has been verified!","google-site-kit")))}}]),SiteVerification}(k.a);O.propTypes={isAuthenticated:v.a.bool.isRequired,shouldSetup:v.a.bool.isRequired,siteVerificationSetup:v.a.func.isRequired,completeSetup:v.a.func,setErrorMessage:v.a.func.isRequired},t.a=O}).call(this,i(16),i(10))},621:function(e,t,i){"use strict";(function(e){var n=i(87),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(9),m=i.n(g),h=i(1),f=i(2),_=i.n(f),k=i(622),y=function(t){function WizardStepSearchConsoleProperty(){return s()(this,WizardStepSearchConsoleProperty),u()(this,p()(WizardStepSearchConsoleProperty).apply(this,arguments))}return m()(WizardStepSearchConsoleProperty,t),c()(WizardStepSearchConsoleProperty,[{key:"render",value:function(){var t=this.props,i=t.isVerified,n=t.hasSearchConsoleProperty,r=i&&!n;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--four"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},r?e.createElement(k.a,a()({shouldSetup:r},this.props)):k.a.connected()))))}}]),WizardStepSearchConsoleProperty}(h.a);y.propTypes={searchConsoleSetup:_.a.func.isRequired},t.a=y}).call(this,i(10))},622:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),y=i(2),v=i.n(y),b=i(0),S=i(3),E=i(14),C=i(44),N=i(82),w=i(32),L=i(39),O=function(t){function SearchConsole(t){var i;o()(this,SearchConsole),i=d()(this,g()(SearchConsole).call(this,t));var n=e._googlesitekitLegacyData.admin.siteURL;return i.state={loading:!0,sites:!1,selectedURL:n,siteURL:n,connected:!1,errorCode:!1,errorMsg:""},i.handleURLSelect=i.handleURLSelect.bind(h()(i)),i.insertPropertyToSearchConsole=i.insertPropertyToSearchConsole.bind(h()(i)),i.submitPropertyEventHandler=i.submitPropertyEventHandler.bind(h()(i)),i}return _()(SearchConsole,t),l()(SearchConsole,[{key:"componentDidMount",value:function(){var e,t,i;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=this.props,t=e.isAuthenticated,i=e.shouldSetup,t&&i){n.next=3;break}return n.abrupt("return");case 3:this.requestSearchConsoleSiteList();case 4:case"end":return n.stop()}}),null,this)}},{key:"requestSearchConsoleSiteList",value:function(){var e,t=this,i=this.props.setErrorMessage;r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,r.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 3:if(1!==(e=n.sent).length){n.next=9;break}return n.next=7,r.a.awrap(t.insertPropertyToSearchConsole(e[0].siteURL));case 7:return t.props.searchConsoleSetup(e[0].siteURL),n.abrupt("return");case 9:if(e.length){n.next=11;break}throw{code:"no_property_matched",message:Object(b.__)("Your site has not been added to Search Console yet. Would you like to add it now?","google-site-kit")};case 11:throw i(""),t.setState({loading:!1,selectedURL:e[0].siteURL,sites:e}),{code:"multiple_properties_matched",message:Object(b.sprintf)(
|
4 |
+
/* translators: %d: the number of matching properties */
|
5 |
+
Object(b.__)("We found %d existing accounts. Please choose which one to use below.","google-site-kit"),e.length)};case 16:n.prev=16,n.t0=n.catch(0),i(n.t0.message),t.setState({loading:!1,errorCode:n.t0.code,errorMsg:n.t0.message});case 20:case"end":return n.stop()}}),null,null,[[0,16]])}},{key:"insertPropertyToSearchConsole",value:function(e){var t,i=arguments;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t=i.length>1&&void 0!==i[1]&&i[1],n.next=3,r.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:e}));case 3:if(!t){n.next=6;break}return n.next=6,r.a.awrap(Object(S.y)("search_console_setup","add_new_sc_property"));case 6:this.setState({loading:!1,connected:!0});case 7:case"end":return n.stop()}}),null,this)}},{key:"submitPropertyEventHandler",value:function(){var e=this,t=this.state,i=t.selectedURL,n=t.errorCode,a=this.props.setErrorMessage;r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(e.insertPropertyToSearchConsole(i,"no_property_matched"===n));case 3:a(""),e.props.searchConsoleSetup(i),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),a(t.t0.message[0].message),e.setState({loading:!1,errorCode:t.t0.code,errorMsg:t.t0.message[0].message});case 11:case"end":return t.stop()}}),null,null,[[0,7]])}},{key:"handleURLSelect",value:function(e,t){this.setState({selectedURL:t.getAttribute("data-value")})}},{key:"matchedForm",value:function(){var e=this.state,t=e.sites,i=e.selectedURL;if(!t)return null;var a=t.map((function(e){var t=e.siteURL;return t.startsWith("sc-domain:")&&(
|
6 |
+
/* translators: %s: Search Console property domain name */
|
7 |
+
t=Object(b.sprintf)(Object(b.__)("%s (domain property)","google-site-kit"),t.replace(/^sc-domain:/,""))),{label:t,value:e.siteURL}}));return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(w.j,{enhanced:!0,name:"siteProperty",label:Object(b.__)("Choose URL","google-site-kit"),outlined:!0,onEnhancedChange:this.handleURLSelect,options:a,value:i})),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(L.a,{onClick:this.submitPropertyEventHandler},Object(b.__)("Continue","google-site-kit")),n.createElement(N.a,null)))}},{key:"noSiteForm",value:function(){var e=this.state.siteURL;return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(w.k,{label:Object(b.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},n.createElement(w.b,{value:e}))),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(L.a,{onClick:this.submitPropertyEventHandler},Object(b.__)("Continue","google-site-kit")),n.createElement(N.a,null)))}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,i=e.sites;return t?n.createElement(k.b,null,n.createElement("p",null,Object(b.__)("We’re locating your Search Console account.","google-site-kit")),n.createElement(C.a,null)):0===i.length?this.noSiteForm():this.matchedForm()}},{key:"render",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup,a=this.state,r=a.errorMsg,s=a.connected;return!i||s?SearchConsole.connected():n.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(b._x)("Search Console","Service name","google-site-kit")),r&&0<r.length&&n.createElement("p",{className:"googlesitekit-error-text"},r),t&&i&&this.renderForm())}}],[{key:"connected",value:function(){return n.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(b._x)("Search Console","Service name","google-site-kit")),n.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(b.__)("Your Search Console is set up with Site Kit.","google-site-kit")))}}]),SearchConsole}(k.a);O.propTypes={isAuthenticated:v.a.bool.isRequired,shouldSetup:v.a.bool.isRequired,searchConsoleSetup:v.a.func.isRequired,setErrorMessage:v.a.func.isRequired},t.a=O}).call(this,i(16),i(10))},623:function(e,t,i){"use strict";(function(e,n){var a=i(5),r=i.n(a),s=i(6),o=i.n(s),c=i(7),l=i.n(c),u=i(8),d=i.n(u),p=i(9),g=i.n(p),m=i(1),h=i(2),f=i.n(h),_=i(0),k=i(3),y=i(39),v=function(t){function WizardStepCompleteSetup(t){var i;return r()(this,WizardStepCompleteSetup),i=l()(this,d()(WizardStepCompleteSetup).call(this,t)),e._googlesitekitLegacyData.setup.hasSearchConsoleProperty?Object(k.y)("plugin_setup","user_verified"):Object(k.y)("plugin_setup","site_verified"),i}return g()(WizardStepCompleteSetup,t),o()(WizardStepCompleteSetup,[{key:"render",value:function(){return n.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--five"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-9-desktop "},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(_.__)("Congratulations!","google-site-kit")),n.createElement("p",null,Object(_.__)("You successfully completed the Site Kit setup and connected Search Console. Check the dashboard for more services to connect.","google-site-kit")),n.createElement("div",{className:"googlesitekit-wizard-step__action"},n.createElement(y.a,{id:"wizard-step-five-proceed",onClick:this.props.completeSetup},Object(_.__)("Go to Dashboard","google-site-kit")))),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement("div",{className:"googlesitekit-rocket"},n.createElement("img",{className:"googlesitekit-rocket__body",alt:"",src:e._googlesitekitLegacyData.admin.assetsRoot+"images/rocket-body.png"}),n.createElement("img",{className:"googlesitekit-rocket__clouds",alt:"",src:e._googlesitekitLegacyData.admin.assetsRoot+"images/rocket-clouds.png"}),n.createElement("img",{className:"googlesitekit-rocket__dust",alt:"",src:e._googlesitekitLegacyData.admin.assetsRoot+"images/rocket-dust.png"}))))))}}]),WizardStepCompleteSetup}(m.a);v.propTypes={completeSetup:f.a.func.isRequired},t.a=v}).call(this,i(16),i(10))},624:function(e,t,i){"use strict";var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(10),_=i.n(f),k=i(17),y=i.n(k),v=i(30),b=function(e){function WizardProgressStep(){return a()(this,WizardProgressStep),c()(this,u()(WizardProgressStep).apply(this,arguments))}return p()(WizardProgressStep,e),s()(WizardProgressStep,[{key:"render",value:function(){var e=this.props,t=e.currentStep,i=e.step,n=e.title,a=e.status,r=e.warning,s=e.error,o=e.stepKey,c=a;r?c="warning":s&&(c="error");var l=!1;switch(c){case"warning":case"error":l=_.a.createElement(v.a,{id:"exclamation",height:"12",width:"2"});break;case"completed":l=_.a.createElement(v.a,{id:"check",height:"12",width:"16"})}return _.a.createElement("div",{className:y()("googlesitekit-wizard-progress-step","googlesitekit-wizard-progress-step--".concat(i),"googlesitekit-wizard-progress-step--".concat(o),{"googlesitekit-wizard-progress-step--current":t})},_.a.createElement("div",{className:"googlesitekit-wizard-progress-step__number-wrapper"},_.a.createElement("div",{className:y()("googlesitekit-wizard-progress-step__number","googlesitekit-wizard-progress-step__number--".concat(c))},_.a.createElement("span",{className:y()("googlesitekit-wizard-progress-step__number-text","googlesitekit-wizard-progress-step__number-text--".concat(c))},i),l&&_.a.createElement("span",{className:y()("googlesitekit-wizard-progress-step__number-icon","googlesitekit-wizard-progress-step__number-icon--".concat(c))},l))),_.a.createElement("p",{className:"googlesitekit-wizard-progress-step__text"},n))}}]),WizardProgressStep}(g.a);b.propTypes={currentStep:h.a.bool.isRequired,step:h.a.number.isRequired,title:h.a.string,status:h.a.string,warning:h.a.bool,error:h.a.bool},b.defaultProps={title:"",status:"",warning:!1,error:!1,removeFirstStep:!1},t.a=b},82:function(e,t,i){"use strict";(function(e){i(1);var n=i(0),a=i(25);t.a=function HelpLink(){var t=Object(n.__)("Need help?","google-site-kit");return e.createElement(a.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,i(10))},83:function(e,t,i){"use strict";(function(e,n){var a=i(5),r=i.n(a),s=i(6),o=i.n(s),c=i(7),l=i.n(c),u=i(8),d=i.n(u),p=i(9),g=i.n(p),m=i(1),h=i(133),f=i(158),_=i(160),k=function(t){function Header(){return r()(this,Header),l()(this,d()(Header).apply(this,arguments))}return g()(Header,t),o()(Header,[{key:"render",value:function(){var t=e._googlesitekitLegacyData.setup.isAuthenticated;return n.createElement(m.b,null,n.createElement("header",{className:"googlesitekit-header"},n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(h.a,null)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&n.createElement(f.a,null))))),n.createElement(_.a,null))}}]),Header}(m.a);t.a=k}).call(this,i(16),i(10))}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wizard-202a8f53c46e62aeded3.js
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{151:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),v=i(0),y=i(3),b=i(92),S=i(36),E=i(152),C=i(96),N=function(t){function UserMenu(e){var t;return o()(this,UserMenu),(t=d()(this,g()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(k.h)(),t.menuRef=Object(k.h)(),t}return _()(UserMenu,t),l()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,i){var n=e.googlesitekit.admin.proxyPermissionsURL;if("keydown"===i.type&&(13===i.keyCode||32===i.keyCode)||"click"===i.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(n);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(y.d)(),document.location=Object(y.m)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e.googlesitekit.admin,i=t.userData,a=i.email,r=void 0===a?"":a,s=i.picture,o=void 0===s?"":s,c=t.proxyPermissionsURL,l=this.state,u=l.dialogActive,d=l.menuOpen;return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},n.createElement(S.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:o?n.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},n.createElement("img",{className:"mdc-button__icon--image",src:o,alt:Object(v.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},r),n.createElement(E.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(v.__)("Disconnect","google-site-kit")].concat(c?[Object(v.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),n.createElement(C.a,null,n.createElement(b.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(v.__)("Disconnect","google-site-kit"),subtitle:Object(v.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(v.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(k.a);t.a=N}).call(this,i(16),i(10))},152:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(32),_=function(t){function Menu(e){var t;return a()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(g.h)(),t}return p()(Menu,t),s()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new f.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,i=t.menuOpen,n=t.menuItems,a=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!i,"aria-orientation":"vertical",tabIndex:"-1"},n.map((function(t,i){return e.createElement("li",{key:i,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,i),onKeyDown:a.bind(null,i)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(g.a);_.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=_}).call(this,i(10))},153:function(e,t,i){"use strict";var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(65),m=function(e){function ErrorNotification(){return a()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return p()(ErrorNotification,e),s()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(i(1).a);t.a=Object(g.a)("googlesitekit.ErrorNotification")(m)},154:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(15),_=i.n(f),k=i(26),v=function(t){function LayoutHeader(){return a()(this,LayoutHeader),c()(this,u()(LayoutHeader).apply(this,arguments))}return p()(LayoutHeader,t),s()(LayoutHeader,[{key:"render",value:function(){var t=this.props,i=t.title,n=t.ctaLabel,a=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},i&&e.createElement("div",{className:_()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":a,"mdc-layout-grid__cell--span-12-desktop":!a,"mdc-layout-grid__cell--span-8-tablet":!a})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},i)),a&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(k.a,{href:a,external:!0,inherit:!0},n)))))}}]),LayoutHeader}(g.a);v.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},v.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=v}).call(this,i(10))},155:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(59),_=function(t){function LayoutFooter(){return a()(this,LayoutFooter),c()(this,u()(LayoutFooter).apply(this,arguments))}return p()(LayoutFooter,t),s()(LayoutFooter,[{key:"render",value:function(){var t=this.props,i=t.ctaLabel,n=t.ctaLink,a=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},n&&i&&e.createElement(f.a,{className:"googlesitekit-data-block__source",name:i,href:n,external:!0}),a))))}}]),LayoutFooter}(g.a);_.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=_}).call(this,i(10))},24:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(15),_=i.n(f),k=i(154),v=i(155),y=function(t){function Layout(){return a()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return p()(Layout,t),s()(Layout,[{key:"render",value:function(){var t=this.props,i=t.header,n=t.footer,a=t.children,r=t.title,s=t.headerCtaLabel,o=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,p=t.fill,g=t.relative;return e.createElement("div",{className:_()("googlesitekit-layout",d,{"googlesitekit-layout--fill":p,"googlesitekit-layout--relative":g})},i&&e.createElement(k.a,{title:r,ctaLabel:s,ctaLink:o}),a,n&&e.createElement(v.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(g.a);y.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},y.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=y}).call(this,i(10))},242:function(e,t,i){"use strict";(function(e){var n=i(14),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(18),m=i.n(g),h=i(9),f=i.n(h),_=i(1),k=i(2),v=i.n(k),y=i(15),b=i.n(y),S=i(54),E=i(0),C=i(3),N=i(243),w=i(50),L=function(t){function OptIn(e){var t;return s()(this,OptIn),(t=u()(this,p()(OptIn).call(this,e))).state={optIn:Object(w.a)(),error:!1},t.handleOptIn=t.handleOptIn.bind(m()(t)),t}return f()(OptIn,t),c()(OptIn,[{key:"handleOptIn",value:function(e){var t=this,i=!!e.target.checked,n=Object(C.i)("googlesitekit_tracking_optin");Object(w.b)(i),i&&Object(w.c)("tracking_plugin",this.props.optinAction),Object(S.default)({path:"/wp/v2/users/me",method:"POST",data:{meta:a()({},n,i)}}).then((function(){t.setState({optIn:i,error:!1})})).catch((function(e){t.setState({optIn:!i,error:{errorCode:e.code,errorMsg:e.message}})}))}},{key:"render",value:function(){var t=this.state,i=t.optIn,n=t.error,a=this.props,r=a.id,s=a.name,o=a.className,c=Object(E.sprintf)(
|
2 |
-
/* translators: %s: privacy policy URL */
|
3 |
-
Object(E.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:b()("googlesitekit-opt-in",o)},e.createElement(N.a,{id:r,name:s,value:"1",checked:i,onChange:this.handleOptIn},e.createElement("span",{dangerouslySetInnerHTML:Object(C.t)(c,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})})),n&&e.createElement("div",{className:"googlesitekit-error-text"},n.errorMsg))}}]),OptIn}(_.a);L.propTypes={id:v.a.string,name:v.a.string,className:v.a.string,optinAction:v.a.string},L.defaultProps={id:"googlesitekit-opt-in",name:"optIn"},t.a=L}).call(this,i(10))},243:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(15),_=i.n(f),k=i(32),v=function(t){function Checkbox(e){var t;return a()(this,Checkbox),(t=c()(this,u()(Checkbox).call(this,e))).formFieldRef=Object(g.h)(),t.checkboxRef=Object(g.h)(),t}return p()(Checkbox,t),s()(Checkbox,[{key:"componentDidMount",value:function(){new k.e(this.formFieldRef.current).input=new k.c(this.checkboxRef.current)}},{key:"render",value:function(){var t=this.props,i=t.onChange,n=t.id,a=t.name,r=t.value,s=t.checked,o=t.disabled,c=t.children;return e.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},e.createElement("div",{className:_()("mdc-checkbox",{"mdc-checkbox--disabled":o}),ref:this.checkboxRef},e.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:n,name:a,value:r,checked:s,disabled:o,onChange:i}),e.createElement("div",{className:"mdc-checkbox__background"},e.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},e.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),e.createElement("div",{className:"mdc-checkbox__mixedmark"}))),e.createElement("label",{htmlFor:n},c))}}]),Checkbox}(g.a);v.propTypes={onChange:h.a.func.isRequired,id:h.a.string.isRequired,name:h.a.string.isRequired,value:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,children:h.a.node.isRequired},v.defaultProps={checked:!1,disabled:!1},t.a=v}).call(this,i(10))},552:function(e,t,i){"use strict";i.r(t),function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),v=i(11),y=i(0),b=i(76),S=i(36),E=i(24),C=i(13),N=i(3),w=i(555),L=i(562),O=function(t){function Setup(t){var i;o()(this,Setup),i=d()(this,g()(Setup).call(this,t));var n=e.googlesitekit.admin.connectURL,a=e.googlesitekit.setup,r=a.isAuthenticated,s=a.hasSearchConsoleProperty,c=a.isSiteKitConnected,l=a.isVerified,u=a.needReauthenticate,p=e.googlesitekit.permissions.canSetup;return i.state={canSetup:p,isAuthenticated:r,isVerified:l,needReauthenticate:u,hasSearchConsoleProperty:s,hasSearchConsolePropertyFromTheStart:s,connectURL:n,errorMsg:"",isSiteKitConnected:c,completeSetup:!1},i.siteConnectedSetup=i.siteConnectedSetup.bind(h()(i)),i.siteVerificationSetup=i.siteVerificationSetup.bind(h()(i)),i.searchConsoleSetup=i.searchConsoleSetup.bind(h()(i)),i.resetAndRestart=i.resetAndRestart.bind(h()(i)),i.completeSetup=i.completeSetup.bind(h()(i)),i.setErrorMessage=i.setErrorMessage.bind(h()(i)),i}return _()(Setup,t),l()(Setup,[{key:"resetAndRestart",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(C.c.set(C.a,"site","reset"));case 2:Object(N.d)(),this.setState({isSiteKitConnected:!1,isAuthenticated:!1,isVerified:!1,hasSearchConsoleProperty:!1,completeSetup:!1,errorMsg:""});case 4:case"end":return e.stop()}}),null,this)}},{key:"completeSetup",value:function(){this.setState({completeSetup:!0})}},{key:"siteConnectedSetup",value:function(e){this.setState({isSiteKitConnected:e})}},{key:"siteVerificationSetup",value:function(e){this.setState({isVerified:e})}},{key:"searchConsoleSetup",value:function(e){this.setState({hasSearchConsoleProperty:e})}},{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,i=e.isAuthenticated,n=e.isVerified,a=e.hasSearchConsoleProperty,r=e.completeSetup;return t&&i&&n&&a&&r}},{key:"setErrorMessage",value:function(e){this.setState({errorMsg:e})}},{key:"getApplicableSteps",value:function(){var e,t=w.a,i=Object.keys(t);for(e=0;e<i.length;e++)t[i[e]].isApplicable(this.state)||delete t[i[e]];return t}},{key:"currentStep",value:function(e){var t,i=Object.keys(e);for(t=0;t<i.length-1;t++)if(!e[i[t]].isCompleted(this.state))return i[t];return i[t]}},{key:"stepStatus",value:function(e,t){return e[t].isCompleted(this.state)?"completed":t===this.currentStep(e)?"inprogress":""}},{key:"render",value:function(){var t=this,i=this.state,a=i.canSetup,r=i.isAuthenticated,s=i.isVerified,o=i.needReauthenticate,c=i.hasSearchConsoleProperty,l=i.connectURL,u=i.isSiteKitConnected;if(this.isSetupFinished()){var d=Object(N.m)("googlesitekit-dashboard",{notification:"authentication_success"});Object(v.delay)((function(){e.location.replace(d)}),500,"later")}var p=this.getApplicableSteps(),g=this.currentStep(p),m=p[g].Component,h=n.createElement(m,{siteConnectedSetup:this.siteConnectedSetup,connectURL:l,siteVerificationSetup:this.siteVerificationSetup,searchConsoleSetup:this.searchConsoleSetup,completeSetup:this.completeSetup,isSiteKitConnected:u,isAuthenticated:r,isVerified:s,needReauthenticate:o,hasSearchConsoleProperty:c,setErrorMessage:this.setErrorMessage,resetAndRestart:p.clientCredentials?this.resetAndRestart:void 0}),f=a,_=!f&&!r;return n.createElement(k.b,null,n.createElement(b.a,null),n.createElement("div",{className:"googlesitekit-wizard"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement(E.a,null,n.createElement("section",{className:"googlesitekit-wizard-progress"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},f&&n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement("div",{className:"googlesitekit-wizard-progress__steps"},Object.keys(p).map((function(e,i){return n.createElement(L.a,{key:p[e].title,currentStep:g===e,title:p[e].title,step:i+1,status:t.stepStatus(p,e),warning:p[e].warning,error:p[e].error,stepKey:e})})))))),_&&n.createElement("div",{className:"googlesitekit-setup__footer"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},n.createElement("h1",{className:"googlesitekit-setup__title"},Object(y.__)("Authenticate Site Kit","google-site-kit")),n.createElement("p",{className:"googlesitekit-setup__description"},Object(y.__)("Please sign into your Google account to begin.","google-site-kit")),n.createElement(S.a,{href:"#",onClick:function(){Object(N.x)("plugin_setup","signin_with_google"),document.location=l}},Object(y.__)("Sign in with Google","google-site-kit"))))))),f&&h))))))}}]),Setup}(k.a);t.default=O}.call(this,i(16),i(10))},555:function(e,t,i){"use strict";var n=i(0),a=i(556),r=i(557),s=i(559),o=i(561),c={authentication:{title:Object(n.__)("Authenticate","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&!e.needReauthenticate},Component:a.a},verification:{title:Object(n.__)("Verify URL","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified},Component:r.a},seachConsoleProperty:{title:Object(n.__)("Connect Search Console","google-site-kit"),required:!0,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:s.a},completeSetup:{title:Object(n.__)("Finish","google-site-kit"),required:!1,isApplicable:function(){return!0},isCompleted:function(e){return e.isSiteKitConnected&&e.isAuthenticated&&e.isVerified&&e.hasSearchConsoleProperty},Component:o.a}};t.a=c},556:function(e,t,i){"use strict";(function(e){var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(0),_=i(3),k=i(36),v=i(26),y=i(242),b=i(75),S=function(t){function WizardStepAuthentication(){return a()(this,WizardStepAuthentication),c()(this,u()(WizardStepAuthentication).apply(this,arguments))}return p()(WizardStepAuthentication,t),s()(WizardStepAuthentication,[{key:"render",value:function(){var t=this.props,i=t.connectURL,n=t.needReauthenticate,a=t.resetAndRestart;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--two"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(f.__)("Authenticate with Google","google-site-kit")),e.createElement("p",null,Object(f.__)("Please sign into your Google account to begin.","google-site-kit")),n&&e.createElement("p",{className:"googlesitekit-error-text"},Object(f.__)("You did not grant access to one or more of the requested scopes. Please grant all scopes that you are prompted for.","google-site-kit")),e.createElement("p",null,e.createElement(k.a,{onClick:function(){Object(_.x)("plugin_setup","signin_with_google"),document.location=i}},Object(f.__)("Sign in with Google","google-site-kit")),a&&e.createElement(v.a,{className:"googlesitekit-wizard-step__back",onClick:a},Object(f.__)("Back","google-site-kit"))),e.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},e.createElement(y.a,{optinAction:"analytics_optin_setup_fallback"}),e.createElement(b.a,null))))))}}]),WizardStepAuthentication}(g.a);S.propTypes={connectURL:h.a.string.isRequired,resetAndRestart:h.a.func},t.a=S}).call(this,i(10))},557:function(e,t,i){"use strict";(function(e){var n=i(95),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(9),m=i.n(g),h=i(1),f=i(2),_=i.n(f),k=i(558),v=function(t){function WizardStepVerification(){return s()(this,WizardStepVerification),u()(this,p()(WizardStepVerification).apply(this,arguments))}return m()(WizardStepVerification,t),c()(WizardStepVerification,[{key:"render",value:function(){var t=!this.props.isVerified;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--three"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(k.a,a()({shouldSetup:t},this.props))))))}}]),WizardStepVerification}(h.a);v.propTypes={siteVerificationSetup:_.a.func.isRequired},t.a=v}).call(this,i(10))},558:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),v=i(2),y=i.n(v),b=i(0),S=i(3),E=i(32),C=i(13),N=i(36),w=i(41),L=i(75),O=function(t){function SiteVerification(e){var t;o()(this,SiteVerification);var i=(t=d()(this,g()(SiteVerification).call(this,e))).props,n=i.isAuthenticated,a=i.shouldSetup;return t.state={loading:n&&a,loadingMsg:Object(b.__)("Getting your verified sites…","google-site-kit"),siteURL:" ",selectedURL:"",errorCode:!1,errorMsg:""},t.onProceed=t.onProceed.bind(h()(t)),t}return _()(SiteVerification,t),l()(SiteVerification,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup;t&&i&&this.requestSitePropertyList()}},{key:"requestSitePropertyList",value:function(){var t,i,n,a,s,o=this,c=this.props.setErrorMessage;r.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:return l.prev=0,l.next=3,r.a.awrap(C.c.get(C.b,"site-verification","verification"));case 3:if(t=l.sent,i=t.verified,n=t.identifier,!i){l.next=16;break}return Object(S.x)("verification_setup","verification_check_true"),l.next=10,r.a.awrap(o.insertSiteVerification(n));case 10:if(!0!==l.sent.verified){l.next=14;break}return o.props.siteVerificationSetup(!0),l.abrupt("return",!0);case 14:l.next=17;break;case 16:Object(S.x)("verification_setup","verification_check_false");case 17:o.setState({loading:!1,siteURL:n}),l.next=26;break;case 20:l.prev=20,l.t0=l.catch(0),a=l.t0.message,Object(S.y)(l.t0.message)&&(s=JSON.parse(l.t0.message),a=s.error.message||l.t0.message),c(a),o.setState({loading:!1,errorCode:l.t0.code,errorMsg:a,siteURL:e.googlesitekit.admin.siteURL});case 26:case"end":return l.stop()}}),null,null,[[0,20]])}},{key:"insertSiteVerification",value:function(e){return r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.a.awrap(C.c.set(C.b,"site-verification","verification",{siteURL:e}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},{key:"onProceed",value:function(){var t,i,n,a;return r.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t=this.props.setErrorMessage,i=this.state.siteURL?this.state.siteURL:e.googlesitekit.admin.siteURL,t(""),this.setState({loading:!0,loadingMsg:Object(b.__)("Verifying…","google-site-kit"),errorCode:!1,errorMsg:""}),s.prev=4,s.next=7,r.a.awrap(this.insertSiteVerification(i));case 7:!0===s.sent.verified&&(Object(S.x)("verification_setup","verification_insert_tag"),this.props.siteVerificationSetup(!0)),s.next=17;break;case 11:s.prev=11,s.t0=s.catch(4),n=s.t0.message,Object(S.y)(s.t0.message)&&(a=JSON.parse(s.t0.message),n=a.error.message||s.t0.message),t(n),this.setState({loading:!1,errorCode:s.t0.code,errorMsg:n});case 17:case"end":return s.stop()}}),null,this,[[4,11]])}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,i=e.loadingMsg,a=e.siteURL,r=n.createElement(k.b,null,i&&n.createElement("p",null,i),n.createElement(w.a,null));return t?r:n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-wizard-step__inputs"},n.createElement(E.k,{label:Object(b.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},n.createElement(E.b,{value:a}))),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(N.a,{onClick:this.onProceed},Object(b.__)("Continue","google-site-kit")),n.createElement(L.a,null)))}},{key:"render",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup,a=this.state.errorMsg;return i?n.createElement(k.b,null,n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(b.__)("Verify URL","google-site-kit")),n.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(b.__)("We will need to verify your URL for Site Kit.","google-site-kit")),a&&0<a.length&&n.createElement("p",{className:"googlesitekit-error-text"},a),t&&this.renderForm()):SiteVerification.renderSetupDone()}}],[{key:"renderSetupDone",value:function(){return n.createElement(k.b,null,n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(b.__)("Verify URL","google-site-kit")),n.createElement("p",{className:"googlesitekit-wizard-step__text"},Object(b.__)("Congratulations, your site has been verified!","google-site-kit")))}}]),SiteVerification}(k.a);O.propTypes={isAuthenticated:y.a.bool.isRequired,shouldSetup:y.a.bool.isRequired,siteVerificationSetup:y.a.func.isRequired,completeSetup:y.a.func,setErrorMessage:y.a.func.isRequired},t.a=O}).call(this,i(16),i(10))},559:function(e,t,i){"use strict";(function(e){var n=i(95),a=i.n(n),r=i(5),s=i.n(r),o=i(6),c=i.n(o),l=i(7),u=i.n(l),d=i(8),p=i.n(d),g=i(9),m=i.n(g),h=i(1),f=i(2),_=i.n(f),k=i(560),v=function(t){function WizardStepSearchConsoleProperty(){return s()(this,WizardStepSearchConsoleProperty),u()(this,p()(WizardStepSearchConsoleProperty).apply(this,arguments))}return m()(WizardStepSearchConsoleProperty,t),c()(WizardStepSearchConsoleProperty,[{key:"render",value:function(){var t=this.props,i=t.isVerified,n=t.hasSearchConsoleProperty,r=i&&!n;return e.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--four"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},r?e.createElement(k.a,a()({shouldSetup:r},this.props)):k.a.connected()))))}}]),WizardStepSearchConsoleProperty}(h.a);v.propTypes={searchConsoleSetup:_.a.func.isRequired},t.a=v}).call(this,i(10))},560:function(e,t,i){"use strict";(function(e,n){var a=i(4),r=i.n(a),s=i(5),o=i.n(s),c=i(6),l=i.n(c),u=i(7),d=i.n(u),p=i(8),g=i.n(p),m=i(18),h=i.n(m),f=i(9),_=i.n(f),k=i(1),v=i(2),y=i.n(v),b=i(0),S=i(3),E=i(13),C=i(41),N=i(75),w=i(32),L=i(36),O=function(t){function SearchConsole(t){var i;o()(this,SearchConsole),i=d()(this,g()(SearchConsole).call(this,t));var n=e.googlesitekit.admin.siteURL;return i.state={loading:!0,sites:!1,selectedURL:n,siteURL:n,connected:!1,errorCode:!1,errorMsg:""},i.handleURLSelect=i.handleURLSelect.bind(h()(i)),i.insertPropertyToSearchConsole=i.insertPropertyToSearchConsole.bind(h()(i)),i.submitPropertyEventHandler=i.submitPropertyEventHandler.bind(h()(i)),i}return _()(SearchConsole,t),l()(SearchConsole,[{key:"componentDidMount",value:function(){var e,t,i;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=this.props,t=e.isAuthenticated,i=e.shouldSetup,t&&i){n.next=3;break}return n.abrupt("return");case 3:this.requestSearchConsoleSiteList();case 4:case"end":return n.stop()}}),null,this)}},{key:"requestSearchConsoleSiteList",value:function(){var e,t=this,i=this.props.setErrorMessage;r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,r.a.awrap(E.c.get(E.b,"search-console","matched-sites"));case 3:if(1!==(e=n.sent).length){n.next=9;break}return n.next=7,r.a.awrap(t.insertPropertyToSearchConsole(e[0].siteURL));case 7:return t.props.searchConsoleSetup(e[0].siteURL),n.abrupt("return");case 9:if(e.length){n.next=11;break}throw{code:"no_property_matched",message:Object(b.__)("Your site has not been added to Search Console yet. Would you like to add it now?","google-site-kit")};case 11:throw i(""),t.setState({loading:!1,selectedURL:e[0].siteURL,sites:e}),{code:"multiple_properties_matched",message:Object(b.sprintf)(
|
4 |
-
/* translators: %d: the number of matching properties */
|
5 |
-
Object(b.__)("We found %d existing accounts. Please choose which one to use below.","google-site-kit"),e.length)};case 16:n.prev=16,n.t0=n.catch(0),i(n.t0.message),t.setState({loading:!1,errorCode:n.t0.code,errorMsg:n.t0.message});case 20:case"end":return n.stop()}}),null,null,[[0,16]])}},{key:"insertPropertyToSearchConsole",value:function(e){var t,i=arguments;return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t=i.length>1&&void 0!==i[1]&&i[1],n.next=3,r.a.awrap(E.c.set(E.b,"search-console","site",{siteURL:e}));case 3:t&&Object(S.x)("search_console_setup","add_new_sc_property"),this.setState({loading:!1,connected:!0});case 5:case"end":return n.stop()}}),null,this)}},{key:"submitPropertyEventHandler",value:function(){var e=this,t=this.state,i=t.selectedURL,n=t.errorCode,a=this.props.setErrorMessage;r.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.a.awrap(e.insertPropertyToSearchConsole(i,"no_property_matched"===n));case 3:a(""),e.props.searchConsoleSetup(i),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),a(t.t0.message[0].message),e.setState({loading:!1,errorCode:t.t0.code,errorMsg:t.t0.message[0].message});case 11:case"end":return t.stop()}}),null,null,[[0,7]])}},{key:"handleURLSelect",value:function(e,t){this.setState({selectedURL:t.getAttribute("data-value")})}},{key:"matchedForm",value:function(){var e=this.state,t=e.sites,i=e.selectedURL;if(!t)return null;var a=t.map((function(e){var t=e.siteURL;return t.startsWith("sc-domain:")&&(
|
6 |
-
/* translators: %s: Search Console property domain name */
|
7 |
-
t=Object(b.sprintf)(Object(b.__)("%s (domain property)","google-site-kit"),t.replace(/^sc-domain:/,""))),{label:t,value:e.siteURL}}));return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(w.j,{enhanced:!0,name:"siteProperty",label:Object(b.__)("Choose URL","google-site-kit"),outlined:!0,onEnhancedChange:this.handleURLSelect,options:a,value:i})),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(L.a,{onClick:this.submitPropertyEventHandler},Object(b.__)("Continue","google-site-kit")),n.createElement(N.a,null)))}},{key:"noSiteForm",value:function(){var e=this.state.siteURL;return n.createElement(k.b,null,n.createElement("div",{className:"googlesitekit-setup-module__inputs"},n.createElement(w.k,{label:Object(b.__)("Website Address","google-site-kit"),name:"siteProperty",floatingLabelClassName:"mdc-floating-label--float-above",outlined:!0,disabled:!0},n.createElement(w.b,{value:e}))),n.createElement("div",{className:"googlesitekit-wizard-step__action googlesitekit-wizard-step__action--justify"},n.createElement(L.a,{onClick:this.submitPropertyEventHandler},Object(b.__)("Continue","google-site-kit")),n.createElement(N.a,null)))}},{key:"renderForm",value:function(){var e=this.state,t=e.loading,i=e.sites;return t?n.createElement(k.b,null,n.createElement("p",null,Object(b.__)("We’re locating your Search Console account.","google-site-kit")),n.createElement(C.a,null)):0===i.length?this.noSiteForm():this.matchedForm()}},{key:"render",value:function(){var e=this.props,t=e.isAuthenticated,i=e.shouldSetup,a=this.state,r=a.errorMsg,s=a.connected;return!i||s?SearchConsole.connected():n.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(b._x)("Search Console","Service name","google-site-kit")),r&&0<r.length&&n.createElement("p",{className:"googlesitekit-error-text"},r),t&&i&&this.renderForm())}}],[{key:"connected",value:function(){return n.createElement("section",{className:"googlesitekit-setup-module googlesitekit-setup-module--search-console"},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-setup-module__title "},Object(b._x)("Search Console","Service name","google-site-kit")),n.createElement("p",{className:"googlesitekit-setup-module__text--no-margin"},Object(b.__)("Your Search Console is set up with Site Kit.","google-site-kit")))}}]),SearchConsole}(k.a);O.propTypes={isAuthenticated:y.a.bool.isRequired,shouldSetup:y.a.bool.isRequired,searchConsoleSetup:y.a.func.isRequired,setErrorMessage:y.a.func.isRequired},t.a=O}).call(this,i(16),i(10))},561:function(e,t,i){"use strict";(function(e,n){var a=i(5),r=i.n(a),s=i(6),o=i.n(s),c=i(7),l=i.n(c),u=i(8),d=i.n(u),p=i(9),g=i.n(p),m=i(1),h=i(2),f=i.n(h),_=i(0),k=i(3),v=i(36),y=function(t){function WizardStepCompleteSetup(t){var i;return r()(this,WizardStepCompleteSetup),i=l()(this,d()(WizardStepCompleteSetup).call(this,t)),e.googlesitekit.setup.hasSearchConsoleProperty?Object(k.x)("plugin_setup","user_verified"):Object(k.x)("plugin_setup","site_verified"),i}return g()(WizardStepCompleteSetup,t),o()(WizardStepCompleteSetup,[{key:"render",value:function(){return n.createElement("section",{className:"googlesitekit-wizard-step googlesitekit-wizard-step--five"},n.createElement("div",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-9-desktop "},n.createElement("h2",{className:" googlesitekit-heading-3 googlesitekit-wizard-step__title "},Object(_.__)("Congratulations!","google-site-kit")),n.createElement("p",null,Object(_.__)("You successfully completed the Site Kit setup and connected Search Console. Check the dashboard for more services to connect.","google-site-kit")),n.createElement("div",{className:"googlesitekit-wizard-step__action"},n.createElement(v.a,{id:"wizard-step-five-proceed",onClick:this.props.completeSetup},Object(_.__)("Go to Dashboard","google-site-kit")))),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--span-3-tablet mdc-layout-grid__cell--span-3-desktop "},n.createElement("div",{className:"googlesitekit-rocket"},n.createElement("img",{className:"googlesitekit-rocket__body",alt:"",src:e.googlesitekit.admin.assetsRoot+"images/rocket-body.png"}),n.createElement("img",{className:"googlesitekit-rocket__clouds",alt:"",src:e.googlesitekit.admin.assetsRoot+"images/rocket-clouds.png"}),n.createElement("img",{className:"googlesitekit-rocket__dust",alt:"",src:e.googlesitekit.admin.assetsRoot+"images/rocket-dust.png"}))))))}}]),WizardStepCompleteSetup}(m.a);y.propTypes={completeSetup:f.a.func.isRequired},t.a=y}).call(this,i(16),i(10))},562:function(e,t,i){"use strict";var n=i(5),a=i.n(n),r=i(6),s=i.n(r),o=i(7),c=i.n(o),l=i(8),u=i.n(l),d=i(9),p=i.n(d),g=i(1),m=i(2),h=i.n(m),f=i(10),_=i.n(f),k=i(15),v=i.n(k),y=i(31),b=function(e){function WizardProgressStep(){return a()(this,WizardProgressStep),c()(this,u()(WizardProgressStep).apply(this,arguments))}return p()(WizardProgressStep,e),s()(WizardProgressStep,[{key:"render",value:function(){var e=this.props,t=e.currentStep,i=e.step,n=e.title,a=e.status,r=e.warning,s=e.error,o=e.stepKey,c=a;r?c="warning":s&&(c="error");var l=!1;switch(c){case"warning":case"error":l=_.a.createElement(y.a,{id:"exclamation",height:"12",width:"2"});break;case"completed":l=_.a.createElement(y.a,{id:"check",height:"12",width:"16"})}return _.a.createElement("div",{className:v()("googlesitekit-wizard-progress-step","googlesitekit-wizard-progress-step--".concat(i),"googlesitekit-wizard-progress-step--".concat(o),{"googlesitekit-wizard-progress-step--current":t})},_.a.createElement("div",{className:"googlesitekit-wizard-progress-step__number-wrapper"},_.a.createElement("div",{className:v()("googlesitekit-wizard-progress-step__number","googlesitekit-wizard-progress-step__number--".concat(c))},_.a.createElement("span",{className:v()("googlesitekit-wizard-progress-step__number-text","googlesitekit-wizard-progress-step__number-text--".concat(c))},i),l&&_.a.createElement("span",{className:v()("googlesitekit-wizard-progress-step__number-icon","googlesitekit-wizard-progress-step__number-icon--".concat(c))},l))),_.a.createElement("p",{className:"googlesitekit-wizard-progress-step__text"},n))}}]),WizardProgressStep}(g.a);b.propTypes={currentStep:h.a.bool.isRequired,step:h.a.number.isRequired,title:h.a.string,status:h.a.string,warning:h.a.bool,error:h.a.bool},b.defaultProps={title:"",status:"",warning:!1,error:!1,removeFirstStep:!1},t.a=b},75:function(e,t,i){"use strict";(function(e){i(1);var n=i(0),a=i(26);t.a=function HelpLink(){var t=Object(n.__)("Need help?","google-site-kit");return e.createElement(a.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,i(10))},76:function(e,t,i){"use strict";(function(e,n){var a=i(5),r=i.n(a),s=i(6),o=i.n(s),c=i(7),l=i.n(c),u=i(8),d=i.n(u),p=i(9),g=i.n(p),m=i(1),h=i(128),f=i(151),_=i(153),k=function(t){function Header(){return r()(this,Header),l()(this,d()(Header).apply(this,arguments))}return g()(Header,t),o()(Header,[{key:"render",value:function(){var t=e.googlesitekit.setup.isAuthenticated;return n.createElement(m.b,null,n.createElement("header",{className:"googlesitekit-header"},n.createElement("section",{className:"mdc-layout-grid"},n.createElement("div",{className:"mdc-layout-grid__inner"},n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},n.createElement(h.a,null)),n.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&n.createElement(f.a,null))))),n.createElement(_.a,null))}}]),Header}(m.a);t.a=k}).call(this,i(16),i(10))}}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/assets/js/chunk-googlesitekit-setup-wizard-proxy-29b0da81d821910655c6.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{122:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var a=n(4),i=n.n(a),r=n(14),o=n.n(r),s=n(54),l=n(39),c=n(123),u=n(124),d=n(125),p=n(45);function g(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(t){var n,a,r,o,c;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e.googlesitekit.admin,a=n.homeURL,r=n.ampMode,o={tagverify:1,timestamp:Date.now()},u.next=4,i.a.awrap(f(Object(l.a)(a,o),t));case 4:if((c=u.sent)||"secondary"!==r){u.next=9;break}return u.next=8,i.a.awrap(Object(s.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.a.awrap(f(Object(l.a)(e.link,m({},o,{amp:1})),t));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:c=u.sent;case 9:return u.abrupt("return",Promise.resolve(c||null));case 10:case"end":return u.stop()}}))},f=function(e,t){var n;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,i.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=a.sent,a.abrupt("return",v(n,t)||null);case 7:return a.prev=7,a.t0=a.catch(0),a.abrupt("return",null);case 10:case"end":return a.stop()}}),null,null,[[0,7]])},v=function(e,t){var n=({adsense:u.a,analytics:d.a,tagmanager:p.d,setup:c.a}[t]||[]).find((function(t){return t.test(e)}));return!!n&&n.exec(e)[1]}}).call(this,n(16))},123:function(e,t,n){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},124:function(e,t,n){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},125:function(e,t,n){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},151:function(e,t,n){"use strict";(function(e,a){var i=n(4),r=n.n(i),o=n(5),s=n.n(o),l=n(6),c=n.n(l),u=n(7),d=n.n(u),p=n(8),g=n.n(p),m=n(18),h=n.n(m),f=n(9),v=n.n(f),y=n(1),k=n(0),b=n(3),_=n(92),E=n(36),O=n(152),w=n(96),C=function(t){function UserMenu(e){var t;return s()(this,UserMenu),(t=d()(this,g()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(y.h)(),t.menuRef=Object(y.h)(),t}return v()(UserMenu,t),c()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,n){var a=e.googlesitekit.admin.proxyPermissionsURL;if("keydown"===n.type&&(13===n.keyCode||32===n.keyCode)||"click"===n.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(a);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(b.d)(),document.location=Object(b.m)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e.googlesitekit.admin,n=t.userData,i=n.email,r=void 0===i?"":i,o=n.picture,s=void 0===o?"":o,l=t.proxyPermissionsURL,c=this.state,u=c.dialogActive,d=c.menuOpen;return a.createElement(y.b,null,a.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},a.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:s?a.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},a.createElement("img",{className:"mdc-button__icon--image",src:s,alt:Object(k.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},r),a.createElement(O.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(k.__)("Disconnect","google-site-kit")].concat(l?[Object(k.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),a.createElement(w.a,null,a.createElement(_.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(k.__)("Disconnect","google-site-kit"),subtitle:Object(k.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(k.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(y.a);t.a=C}).call(this,n(16),n(10))},152:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(1),m=n(2),h=n.n(m),f=n(32),v=function(t){function Menu(e){var t;return i()(this,Menu),(t=l()(this,u()(Menu).call(this,e))).menuRef=Object(g.h)(),t}return p()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new f.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,n=t.menuOpen,a=t.menuItems,i=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!n,"aria-orientation":"vertical",tabIndex:"-1"},a.map((function(t,n){return e.createElement("li",{key:n,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,n),onKeyDown:i.bind(null,n)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(g.a);v.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=v}).call(this,n(10))},153:function(e,t,n){"use strict";var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(65),m=function(e){function ErrorNotification(){return i()(this,ErrorNotification),l()(this,u()(ErrorNotification).apply(this,arguments))}return p()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(n(1).a);t.a=Object(g.a)("googlesitekit.ErrorNotification")(m)},154:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(1),m=n(2),h=n.n(m),f=n(15),v=n.n(f),y=n(26),k=function(t){function LayoutHeader(){return i()(this,LayoutHeader),l()(this,u()(LayoutHeader).apply(this,arguments))}return p()(LayoutHeader,t),o()(LayoutHeader,[{key:"render",value:function(){var t=this.props,n=t.title,a=t.ctaLabel,i=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},n&&e.createElement("div",{className:v()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":i,"mdc-layout-grid__cell--span-12-desktop":!i,"mdc-layout-grid__cell--span-8-tablet":!i})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},n)),i&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(y.a,{href:i,external:!0,inherit:!0},a)))))}}]),LayoutHeader}(g.a);k.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},k.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=k}).call(this,n(10))},155:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(1),m=n(2),h=n.n(m),f=n(59),v=function(t){function LayoutFooter(){return i()(this,LayoutFooter),l()(this,u()(LayoutFooter).apply(this,arguments))}return p()(LayoutFooter,t),o()(LayoutFooter,[{key:"render",value:function(){var t=this.props,n=t.ctaLabel,a=t.ctaLink,i=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},a&&n&&e.createElement(f.a,{className:"googlesitekit-data-block__source",name:n,href:a,external:!0}),i))))}}]),LayoutFooter}(g.a);v.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=v}).call(this,n(10))},24:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(1),m=n(2),h=n.n(m),f=n(15),v=n.n(f),y=n(154),k=n(155),b=function(t){function Layout(){return i()(this,Layout),l()(this,u()(Layout).apply(this,arguments))}return p()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,n=t.header,a=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,l=t.footerCtaLabel,c=t.footerCtaLink,u=t.footerContent,d=t.className,p=t.fill,g=t.relative;return e.createElement("div",{className:v()("googlesitekit-layout",d,{"googlesitekit-layout--fill":p,"googlesitekit-layout--relative":g})},n&&e.createElement(y.a,{title:r,ctaLabel:o,ctaLink:s}),i,a&&e.createElement(k.a,{ctaLabel:l,ctaLink:c,footerContent:u}))}}]),Layout}(g.a);b.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},b.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=b}).call(this,n(10))},242:function(e,t,n){"use strict";(function(e){var a=n(14),i=n.n(a),r=n(5),o=n.n(r),s=n(6),l=n.n(s),c=n(7),u=n.n(c),d=n(8),p=n.n(d),g=n(18),m=n.n(g),h=n(9),f=n.n(h),v=n(1),y=n(2),k=n.n(y),b=n(15),_=n.n(b),E=n(54),O=n(0),w=n(3),C=n(243),x=n(50),L=function(t){function OptIn(e){var t;return o()(this,OptIn),(t=u()(this,p()(OptIn).call(this,e))).state={optIn:Object(x.a)(),error:!1},t.handleOptIn=t.handleOptIn.bind(m()(t)),t}return f()(OptIn,t),l()(OptIn,[{key:"handleOptIn",value:function(e){var t=this,n=!!e.target.checked,a=Object(w.i)("googlesitekit_tracking_optin");Object(x.b)(n),n&&Object(x.c)("tracking_plugin",this.props.optinAction),Object(E.default)({path:"/wp/v2/users/me",method:"POST",data:{meta:i()({},a,n)}}).then((function(){t.setState({optIn:n,error:!1})})).catch((function(e){t.setState({optIn:!n,error:{errorCode:e.code,errorMsg:e.message}})}))}},{key:"render",value:function(){var t=this.state,n=t.optIn,a=t.error,i=this.props,r=i.id,o=i.name,s=i.className,l=Object(O.sprintf)(
|
2 |
-
/* translators: %s: privacy policy URL */
|
3 |
-
Object(O.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:_()("googlesitekit-opt-in",s)},e.createElement(C.a,{id:r,name:o,value:"1",checked:n,onChange:this.handleOptIn},e.createElement("span",{dangerouslySetInnerHTML:Object(w.t)(l,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})})),a&&e.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),OptIn}(v.a);L.propTypes={id:k.a.string,name:k.a.string,className:k.a.string,optinAction:k.a.string},L.defaultProps={id:"googlesitekit-opt-in",name:"optIn"},t.a=L}).call(this,n(10))},243:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),l=n.n(s),c=n(8),u=n.n(c),d=n(9),p=n.n(d),g=n(1),m=n(2),h=n.n(m),f=n(15),v=n.n(f),y=n(32),k=function(t){function Checkbox(e){var t;return i()(this,Checkbox),(t=l()(this,u()(Checkbox).call(this,e))).formFieldRef=Object(g.h)(),t.checkboxRef=Object(g.h)(),t}return p()(Checkbox,t),o()(Checkbox,[{key:"componentDidMount",value:function(){new y.e(this.formFieldRef.current).input=new y.c(this.checkboxRef.current)}},{key:"render",value:function(){var t=this.props,n=t.onChange,a=t.id,i=t.name,r=t.value,o=t.checked,s=t.disabled,l=t.children;return e.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},e.createElement("div",{className:v()("mdc-checkbox",{"mdc-checkbox--disabled":s}),ref:this.checkboxRef},e.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:i,value:r,checked:o,disabled:s,onChange:n}),e.createElement("div",{className:"mdc-checkbox__background"},e.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},e.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),e.createElement("div",{className:"mdc-checkbox__mixedmark"}))),e.createElement("label",{htmlFor:a},l))}}]),Checkbox}(g.a);k.propTypes={onChange:h.a.func.isRequired,id:h.a.string.isRequired,name:h.a.string.isRequired,value:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,children:h.a.node.isRequired},k.defaultProps={checked:!1,disabled:!1},t.a=k}).call(this,n(10))},310:function(e,t,n){"use strict";(function(e,a){n.d(t,"a",(function(){return j}));var i=n(51),r=n.n(i),o=n(5),s=n.n(o),l=n(6),c=n.n(l),u=n(7),d=n.n(u),p=n(8),g=n.n(p),m=n(9),h=n.n(m),f=n(4),v=n.n(f),y=n(1),k=n(0),b=n(2),_=n.n(b),E=n(103),O=n(41),w=n(122),C=n(13),x=n(26),L=[function(){var t;return v.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.location.hostname,!["localhost","127.0.0.1"].includes(t)&&!t.match(/\.(example|invalid|localhost|test)$/)){n.next=3;break}throw"invalid_hostname";case 3:case"end":return n.stop()}}))},function(){var e,t,n;return v.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,v.a.awrap(C.c.set(C.a,"site","setup-tag"));case 2:return e=a.sent,t=e.token,a.next=6,v.a.awrap(Object(w.a)("setup").catch((function(){throw"tag_fetch_failed"})));case 6:if(n=a.sent,t===n){a.next=9;break}throw"setup_token_mismatch";case 9:case"end":return a.stop()}}))}],j=function(t){function CompatibilityChecks(t){var n;s()(this,CompatibilityChecks);var a=e.googlesitekit.setup.isSiteKitConnected;return(n=d()(this,g()(CompatibilityChecks).call(this,t))).state={complete:a,error:null,developerPlugin:{}},n}return h()(CompatibilityChecks,t),c()(CompatibilityChecks,[{key:"componentDidMount",value:function(){var e,t,n,a;return v.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(!this.state.complete){i.next=2;break}return i.abrupt("return");case 2:i.prev=2,e=0,t=L;case 4:if(!(e<t.length)){i.next=11;break}return n=t[e],i.next=8,v.a.awrap(n());case 8:e++,i.next=4;break;case 11:i.next=19;break;case 13:return i.prev=13,i.t0=i.catch(2),i.next=17,v.a.awrap(C.c.get(C.a,"site","developer-plugin"));case 17:a=i.sent,this.setState({error:i.t0,developerPlugin:a});case 19:this.setState({complete:!0});case 20:case"end":return i.stop()}}),null,this,[[2,13]])}},{key:"helperCTA",value:function(){var e=this.state.developerPlugin,t=e.installed,n=e.active,a=e.installURL,i=e.activateURL,r=e.configureURL;return!t&&a?{labelHTML:Object(k.__)('Install<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:a,external:!1}:t&&!n&&i?{labelHTML:Object(k.__)('Activate<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:i,external:!1}:t&&n&&r?{labelHTML:Object(k.__)('Configure<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:r,external:!1}:{labelHTML:Object(k.__)('Learn how<span class="screen-reader-text"> to install and use the helper plugin</span>',"google-site-kit"),href:"https://sitekit.withgoogle.com/documentation/using-site-kit-on-a-staging-environment/",external:!0}}},{key:"renderError",value:function(e){var t=this.state.developerPlugin.installed,n=this.helperCTA(),i=n.labelHTML,r=n.href,o=n.external;switch(e){case"invalid_hostname":case"tag_fetch_failed":return a.createElement(y.b,null,!t&&Object(k.__)("Looks like this may be a staging environment. If so, you’ll need to install a helper plugin and verify your production site in Search Console.","google-site-kit"),t&&Object(k.__)("Looks like this may be a staging environment and you already have the helper plugin. Before you can use Site Kit, please make sure you’ve provided the necessary credentials in the Authentication section and verified your production site in Search Console.","google-site-kit")," ",a.createElement(x.a,{href:r,dangerouslySetInnerHTML:{__html:i},external:o,inherit:!0}));case"setup_token_mismatch":return Object(k.__)("Looks like you may be using a caching plugin which could interfere with setup. Please deactivate any caching plugins before setting up Site Kit. You may reactivate them once setup has been completed.","google-site-kit")}}},{key:"render",value:function(){var e,t,n=this.state,i=n.complete,o=n.error,s=this.props,l=s.children,c=r()(s,["children"]);return o&&(e=a.createElement(y.b,null,a.createElement("div",{className:"googlesitekit-setup-compat mdc-layout-grid mdc-layout-grid--align-left"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement(E.a,null),a.createElement("div",{className:"googlesitekit-heading-4 mdc-layout-grid__cell--span-11"},Object(k.__)("Your site may not be ready for Site Kit","google-site-kit"))),a.createElement("p",null,this.renderError(o))))),i||(t=a.createElement("div",{style:{alignSelf:"center",marginLeft:"1rem"}},a.createElement("small",null,Object(k.__)("Checking Compatibility…","google-site-kit")),a.createElement(O.a,{small:!0,compress:!0}))),l({restProps:c,complete:i,error:o,inProgressFeedback:t,CTAFeedback:e})}}]),CompatibilityChecks}(y.a);j.propTypes={children:_.a.func.isRequired}}).call(this,n(16),n(10))},311:function(e,t,n){"use strict";(function(e,a){n.d(t,"a",(function(){return x}));var i=n(4),r=n.n(i),o=n(5),s=n.n(o),l=n(6),c=n.n(l),u=n(7),d=n.n(u),p=n(8),g=n.n(p),m=n(18),h=n.n(m),f=n(9),v=n.n(f),y=n(1),k=n(0),b=n(39),_=n(3),E=n(13),O=n(92),w=n(26),C=n(96),x=function(t){function ResetButton(t){var n;s()(this,ResetButton),n=d()(this,g()(ResetButton).call(this,t));var a=e._googlesitekitBaseData.splashURL;return n.state={dialogActive:!1,postResetURL:Object(b.a)(a,{notification:"reset_success"})},n.handleDialog=n.handleDialog.bind(h()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(h()(n)),n.handleCloseModal=n.handleCloseModal.bind(h()(n)),n}return v()(ResetButton,t),c()(ResetButton,[{key:"componentDidMount",value:function(){e.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(E.c.set(E.a,"site","reset"));case 2:Object(_.d)(),this.handleDialog(),document.location=this.state.postResetURL;case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,n=this.state.dialogActive;return a.createElement(y.b,null,a.createElement(w.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(k.__)("Reset Site Kit","google-site-kit")),a.createElement(C.a,null,a.createElement(O.a,{dialogActive:n,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(k.__)("Reset Site Kit","google-site-kit"),subtitle:Object(k.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(k.__)("Reset","google-site-kit"),provides:[],danger:!0})))}}]),ResetButton}(y.a)}).call(this,n(16),n(10))},391:function(e,t,n){(function(e,n){!function(a){var i=t&&!t.nodeType&&t,r=e&&!e.nodeType&&e,o="object"==typeof n&&n;o.global!==o&&o.window!==o&&o.self!==o||(a=o);var s,l,c=2147483647,u=36,d=1,p=26,g=38,m=700,h=72,f=128,v="-",y=/^xn--/,k=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=u-d,O=Math.floor,w=String.fromCharCode;function C(e){throw new RangeError(_[e])}function x(e,t){for(var n=e.length,a=[];n--;)a[n]=t(e[n]);return a}function L(e,t){var n=e.split("@"),a="";return n.length>1&&(a=n[0]+"@",e=n[1]),a+x((e=e.replace(b,".")).split("."),t).join(".")}function j(e){for(var t,n,a=[],i=0,r=e.length;i<r;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r?56320==(64512&(n=e.charCodeAt(i++)))?a.push(((1023&t)<<10)+(1023&n)+65536):(a.push(t),i--):a.push(t);return a}function S(e){return x(e,(function(e){var t="";return e>65535&&(t+=w((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=w(e)})).join("")}function N(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function M(e,t,n){var a=0;for(e=n?O(e/m):e>>1,e+=O(e/t);e>E*p>>1;a+=u)e=O(e/E);return O(a+(E+1)*e/(e+g))}function R(e){var t,n,a,i,r,o,s,l,g,m,y,k=[],b=e.length,_=0,E=f,w=h;for((n=e.lastIndexOf(v))<0&&(n=0),a=0;a<n;++a)e.charCodeAt(a)>=128&&C("not-basic"),k.push(e.charCodeAt(a));for(i=n>0?n+1:0;i<b;){for(r=_,o=1,s=u;i>=b&&C("invalid-input"),((l=(y=e.charCodeAt(i++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:u)>=u||l>O((c-_)/o))&&C("overflow"),_+=l*o,!(l<(g=s<=w?d:s>=w+p?p:s-w));s+=u)o>O(c/(m=u-g))&&C("overflow"),o*=m;w=M(_-r,t=k.length+1,0==r),O(_/t)>c-E&&C("overflow"),E+=O(_/t),_%=t,k.splice(_++,0,E)}return S(k)}function A(e){var t,n,a,i,r,o,s,l,g,m,y,k,b,_,E,x=[];for(k=(e=j(e)).length,t=f,n=0,r=h,o=0;o<k;++o)(y=e[o])<128&&x.push(w(y));for(a=i=x.length,i&&x.push(v);a<k;){for(s=c,o=0;o<k;++o)(y=e[o])>=t&&y<s&&(s=y);for(s-t>O((c-n)/(b=a+1))&&C("overflow"),n+=(s-t)*b,t=s,o=0;o<k;++o)if((y=e[o])<t&&++n>c&&C("overflow"),y==t){for(l=n,g=u;!(l<(m=g<=r?d:g>=r+p?p:g-r));g+=u)E=l-m,_=u-m,x.push(w(N(m+E%_,0))),l=O(E/_);x.push(w(N(l,0))),r=M(n,b,a==i),n=0,++a}++n,++t}return x.join("")}if(s={version:"1.4.1",ucs2:{decode:j,encode:S},decode:R,encode:A,toASCII:function(e){return L(e,(function(e){return k.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return L(e,(function(e){return y.test(e)?R(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(i&&r)if(e.exports==i)r.exports=s;else for(l in s)s.hasOwnProperty(l)&&(i[l]=s[l]);else a.punycode=s}(this)}).call(this,n(258)(e),n(16))},45:function(e,t,n){"use strict";function a(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function r(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},551:function(e,t,n){"use strict";n.r(t),function(e,a){var i=n(5),r=n.n(i),o=n(6),s=n.n(o),l=n(7),c=n.n(l),u=n(8),d=n.n(u),p=n(9),g=n.n(p),m=n(1),h=n(391),f=n.n(h),v=n(11),y=n(0),k=n(259),b=n(3),_=n(76),E=n(36),O=n(311),w=n(24),C=n(34),x=n(242),L=n(310),j=function(t){function SetupUsingProxy(t){var n;r()(this,SetupUsingProxy),n=c()(this,d()(SetupUsingProxy).call(this,t));var a=e.googlesitekit.admin,i=a.proxySetupURL,o=a.siteURL,s=e.googlesitekit.setup,l=s.isSiteKitConnected,u=s.isResettable,p=s.errorMessage,g=e.googlesitekit.permissions.canSetup;return n.state={canSetup:g,errorMessage:p,isSiteKitConnected:l,isResettable:u,completeSetup:!1,proxySetupURL:i,resetSuccess:"reset_success"===Object(k.a)(location.href,"notification"),context:Object(k.a)(location.href,"googlesitekit_context"),siteHostname:f.a.toUnicode(new URL(o).hostname)},n}return g()(SetupUsingProxy,t),s()(SetupUsingProxy,[{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,n=e.completeSetup;return t&&n}},{key:"render",value:function(){if(this.isSetupFinished()){var t=Object(b.m)("googlesitekit-dashboard",{notification:"authentication_success"});Object(v.delay)((function(){e.location.replace(t)}),500,"later")}var n,i,r,o=this.state,s=o.context,l=o.errorMessage,c=o.isResettable,u=o.proxySetupURL,d=o.resetSuccess,p=o.siteHostname,g=c;return"revoked"===s?(n=Object(y.sprintf)(
|
4 |
-
/* translators: %s is the site's hostname. (e.g. example.com) */
|
5 |
-
Object(y.__)("You revoked access to Site Kit for %s","google-site-kit"),p),i=Object(y.__)('Site Kit will no longer have access to your account. If you’d like to reconnect Site Kit, click "Start Setup" below to generate new credentials.',"google-site-kit"),r=Object(y.__)("Sign in with Google","google-site-kit")):g?(n=Object(y.__)("Sign in with Google to configure Site Kit","google-site-kit"),i=Object(y.__)("To use Site Kit, sign in with your Google account. The Site Kit service will guide you through 3 simple steps to complete the connection and configure the plugin.","google-site-kit"),r=Object(y.__)("Sign in with Google","google-site-kit")):(n=Object(y.__)("Sign in with Google to set up Site Kit","google-site-kit"),i=Object(y.__)("The Site Kit service will guide you through 3 simple setup steps.","google-site-kit"),r=Object(y.__)("Start setup","google-site-kit")),a.createElement(m.b,null,a.createElement(_.a,null),l&&a.createElement(C.a,{id:"setup_error",type:"win-error",title:Object(y.__)("Oops! There was a problem during set up. Please try again.","google-site-kit"),description:l,isDismissable:!1}),d&&a.createElement(C.a,{id:"reset_success",title:Object(y.__)("Site Kit by Google was successfully reset.","google-site-kit"),isDismissable:!1}),a.createElement("div",{className:"googlesitekit-wizard"},a.createElement("div",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},a.createElement(w.a,null,a.createElement("section",{className:"googlesitekit-wizard-progress"},a.createElement("div",{className:"googlesitekit-setup__footer"},a.createElement("div",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},a.createElement("h1",{className:"googlesitekit-setup__title"},n),a.createElement("p",{className:"googlesitekit-setup__description"},i),a.createElement(L.a,null,(function(e){var t=e.complete,n=e.inProgressFeedback,i=e.CTAFeedback;return a.createElement(m.b,null,i,a.createElement(x.a,{optinAction:"analytics_optin_setup_fallback"}),a.createElement("div",{className:"googlesitekit-start-setup-wrap"},a.createElement(E.a,{className:"googlesitekit-start-setup",href:u,onClick:function(){Object(b.x)("plugin_setup","proxy_start_setup_landing_page")},disabled:!t},r),n,c&&a.createElement(O.a,null)))})))))))))))))}}]),SetupUsingProxy}(m.a);t.default=j}.call(this,n(16),n(10))},76:function(e,t,n){"use strict";(function(e,a){var i=n(5),r=n.n(i),o=n(6),s=n.n(o),l=n(7),c=n.n(l),u=n(8),d=n.n(u),p=n(9),g=n.n(p),m=n(1),h=n(128),f=n(151),v=n(153),y=function(t){function Header(){return r()(this,Header),c()(this,d()(Header).apply(this,arguments))}return g()(Header,t),s()(Header,[{key:"render",value:function(){var t=e.googlesitekit.setup.isAuthenticated;return a.createElement(m.b,null,a.createElement("header",{className:"googlesitekit-header"},a.createElement("section",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},a.createElement(h.a,null)),a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&a.createElement(f.a,null))))),a.createElement(v.a,null))}}]),Header}(m.a);t.a=y}).call(this,n(16),n(10))}}]);
|
|
|
|
|
|
|
|
|
|
dist/assets/js/chunk-googlesitekit-setup-wizard-proxy-d428c7c56939886fd958.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[3],{124:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var a=n(4),i=n.n(a),r=n(11),o=n.n(r),s=n(58),c=n(37),l=n(125),u=n(126),d=n(127),g=n(46);function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(t){var n,a,r,o,l;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e._googlesitekitLegacyData.admin,a=n.homeURL,r=n.ampMode,o={tagverify:1,timestamp:Date.now()},u.next=4,i.a.awrap(f(Object(c.a)(a,o),t));case 4:if((l=u.sent)||"secondary"!==r){u.next=9;break}return u.next=8,i.a.awrap(Object(s.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.a.awrap(f(Object(c.a)(e.link,m({},o,{amp:1})),t));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:l=u.sent;case 9:return u.abrupt("return",Promise.resolve(l||null));case 10:case"end":return u.stop()}}))},f=function(e,t){var n;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,i.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=a.sent,a.abrupt("return",y(n,t)||null);case 7:return a.prev=7,a.t0=a.catch(0),a.abrupt("return",null);case 10:case"end":return a.stop()}}),null,null,[[0,7]])},y=function(e,t){var n=({adsense:u.a,analytics:d.a,tagmanager:g.d,setup:l.a}[t]||[]).find((function(t){return t.test(e)}));return!!n&&n.exec(e)[1]}}).call(this,n(16))},125:function(e,t,n){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},126:function(e,t,n){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},127:function(e,t,n){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},146:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(1),m=n(2),h=n.n(m),f=n(17),y=n.n(f),v=n(25),k=function(t){function LayoutHeader(){return i()(this,LayoutHeader),c()(this,u()(LayoutHeader).apply(this,arguments))}return g()(LayoutHeader,t),o()(LayoutHeader,[{key:"render",value:function(){var t=this.props,n=t.title,a=t.ctaLabel,i=t.ctaLink;return e.createElement("header",{className:"googlesitekit-layout__header"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},n&&e.createElement("div",{className:y()("mdc-layout-grid__cell","mdc-layout-grid__cell--align-middle","mdc-layout-grid__cell--span-4-phone",{"mdc-layout-grid__cell--span-6-desktop":i,"mdc-layout-grid__cell--span-12-desktop":!i,"mdc-layout-grid__cell--span-8-tablet":!i})},e.createElement("h3",{className:"googlesitekit-subheading-1 googlesitekit-layout__header-title"},n)),i&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--span-4-phone mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-tablet "},e.createElement(v.a,{href:i,external:!0,inherit:!0},a)))))}}]),LayoutHeader}(p.a);k.propTypes={title:h.a.string,ctaLabel:h.a.string,ctaLink:h.a.string},k.defaultProps={title:"",ctaLabel:"",ctaLink:""},t.a=k}).call(this,n(10))},147:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(1),m=n(2),h=n.n(m),f=n(77),y=function(t){function LayoutFooter(){return i()(this,LayoutFooter),c()(this,u()(LayoutFooter).apply(this,arguments))}return g()(LayoutFooter,t),o()(LayoutFooter,[{key:"render",value:function(){var t=this.props,n=t.ctaLabel,a=t.ctaLink,i=t.footerContent;return e.createElement("footer",{className:"googlesitekit-layout__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-12"},a&&n&&e.createElement(f.a,{className:"googlesitekit-data-block__source",name:n,href:a,external:!0}),i))))}}]),LayoutFooter}(p.a);y.propTypes={ctaLabel:h.a.string,ctaLink:h.a.string},t.a=y}).call(this,n(10))},158:function(e,t,n){"use strict";(function(e,a){var i=n(4),r=n.n(i),o=n(5),s=n.n(o),c=n(6),l=n.n(c),u=n(7),d=n.n(u),g=n(8),p=n.n(g),m=n(18),h=n.n(m),f=n(9),y=n.n(f),v=n(1),k=n(0),_=n(3),b=n(97),E=n(39),w=n(159),O=n(102),C=function(t){function UserMenu(e){var t;return s()(this,UserMenu),(t=d()(this,p()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(v.h)(),t.menuRef=Object(v.h)(),t}return y()(UserMenu,t),l()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,n){var a=e._googlesitekitLegacyData.admin.proxyPermissionsURL;if("keydown"===n.type&&(13===n.keyCode||32===n.keyCode)||"click"===n.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(a);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(_.d)(),document.location=Object(_.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e._googlesitekitLegacyData.admin,n=t.userData,i=n.email,r=void 0===i?"":i,o=n.picture,s=void 0===o?"":o,c=t.proxyPermissionsURL,l=this.state,u=l.dialogActive,d=l.menuOpen;return a.createElement(v.b,null,a.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},a.createElement(E.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:s?a.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},a.createElement("img",{className:"mdc-button__icon--image",src:s,alt:Object(k.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},r),a.createElement(w.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(k.__)("Disconnect","google-site-kit")].concat(c?[Object(k.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),a.createElement(O.a,null,a.createElement(b.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(k.__)("Disconnect","google-site-kit"),subtitle:Object(k.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(k.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(v.a);t.a=C}).call(this,n(16),n(10))},159:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(1),m=n(2),h=n.n(m),f=n(32),y=function(t){function Menu(e){var t;return i()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(p.h)(),t}return g()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new f.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,n=t.menuOpen,a=t.menuItems,i=t.onSelected,r=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:r,className:"mdc-list",role:"menu","aria-hidden":!n,"aria-orientation":"vertical",tabIndex:"-1"},a.map((function(t,n){return e.createElement("li",{key:n,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,n),onKeyDown:i.bind(null,n)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(p.a);y.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=y}).call(this,n(10))},160:function(e,t,n){"use strict";var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(75),m=function(e){function ErrorNotification(){return i()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return g()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(n(1).a);t.a=Object(p.a)("googlesitekit.ErrorNotification")(m)},252:function(e,t,n){"use strict";(function(e){var a=n(4),i=n.n(a),r=n(11),o=n.n(r),s=n(5),c=n.n(s),l=n(6),u=n.n(l),d=n(7),g=n.n(d),p=n(8),m=n.n(p),h=n(18),f=n.n(h),y=n(9),v=n.n(y),k=n(1),_=n(2),b=n.n(_),E=n(17),w=n.n(E),O=n(58),C=n(0),x=n(3),L=n(253),j=n(50),S=function(t){function OptIn(e){var t;return c()(this,OptIn),(t=g()(this,m()(OptIn).call(this,e))).state={optIn:Object(j.a)(),error:!1},t.handleOptIn=t.handleOptIn.bind(f()(t)),t}return v()(OptIn,t),u()(OptIn,[{key:"handleOptIn",value:function(e){var t,n;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(t=!!e.target.checked,n=Object(x.j)("googlesitekit_tracking_optin"),Object(j.b)(t),!t){a.next=6;break}return a.next=6,i.a.awrap(Object(j.c)("tracking_plugin",this.props.optinAction));case 6:return a.prev=6,a.next=9,i.a.awrap(Object(O.default)({path:"/wp/v2/users/me",method:"POST",data:{meta:o()({},n,t)}}));case 9:this.setState({optIn:t,error:!1}),a.next=15;break;case 12:a.prev=12,a.t0=a.catch(6),this.setState({optIn:!t,error:{errorCode:a.t0.code,errorMsg:a.t0.message}});case 15:case"end":return a.stop()}}),null,this,[[6,12]])}},{key:"render",value:function(){var t=this.state,n=t.optIn,a=t.error,i=this.props,r=i.id,o=i.name,s=i.className,c=Object(C.sprintf)(
|
2 |
+
/* translators: %s: privacy policy URL */
|
3 |
+
Object(C.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:w()("googlesitekit-opt-in",s)},e.createElement(L.a,{id:r,name:o,value:"1",checked:n,onChange:this.handleOptIn},e.createElement("span",{dangerouslySetInnerHTML:Object(x.u)(c,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})})),a&&e.createElement("div",{className:"googlesitekit-error-text"},a.errorMsg))}}]),OptIn}(k.a);S.propTypes={id:b.a.string,name:b.a.string,className:b.a.string,optinAction:b.a.string},S.defaultProps={id:"googlesitekit-opt-in",name:"optIn"},t.a=S}).call(this,n(10))},253:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(1),m=n(2),h=n.n(m),f=n(17),y=n.n(f),v=n(32),k=function(t){function Checkbox(e){var t;return i()(this,Checkbox),(t=c()(this,u()(Checkbox).call(this,e))).formFieldRef=Object(p.h)(),t.checkboxRef=Object(p.h)(),t}return g()(Checkbox,t),o()(Checkbox,[{key:"componentDidMount",value:function(){new v.e(this.formFieldRef.current).input=new v.c(this.checkboxRef.current)}},{key:"render",value:function(){var t=this.props,n=t.onChange,a=t.id,i=t.name,r=t.value,o=t.checked,s=t.disabled,c=t.children;return e.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},e.createElement("div",{className:y()("mdc-checkbox",{"mdc-checkbox--disabled":s}),ref:this.checkboxRef},e.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:a,name:i,value:r,checked:o,disabled:s,onChange:n}),e.createElement("div",{className:"mdc-checkbox__background"},e.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},e.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),e.createElement("div",{className:"mdc-checkbox__mixedmark"}))),e.createElement("label",{htmlFor:a},c))}}]),Checkbox}(p.a);k.propTypes={onChange:h.a.func.isRequired,id:h.a.string.isRequired,name:h.a.string.isRequired,value:h.a.string.isRequired,checked:h.a.bool,disabled:h.a.bool,children:h.a.node.isRequired},k.defaultProps={checked:!1,disabled:!1},t.a=k}).call(this,n(10))},26:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),r=n(6),o=n.n(r),s=n(7),c=n.n(s),l=n(8),u=n.n(l),d=n(9),g=n.n(d),p=n(1),m=n(2),h=n.n(m),f=n(17),y=n.n(f),v=n(146),k=n(147),_=function(t){function Layout(){return i()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return g()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,n=t.header,a=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,g=t.fill,p=t.relative;return e.createElement("div",{className:y()("googlesitekit-layout",d,{"googlesitekit-layout--fill":g,"googlesitekit-layout--relative":p})},n&&e.createElement(v.a,{title:r,ctaLabel:o,ctaLink:s}),i,a&&e.createElement(k.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(p.a);_.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},_.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=_}).call(this,n(10))},333:function(e,t,n){"use strict";(function(e,a){n.d(t,"a",(function(){return j}));var i=n(49),r=n.n(i),o=n(5),s=n.n(o),c=n(6),l=n.n(c),u=n(7),d=n.n(u),g=n(8),p=n.n(g),m=n(9),h=n.n(m),f=n(4),y=n.n(f),v=n(1),k=n(0),_=n(2),b=n.n(_),E=n(114),w=n(44),O=n(124),C=n(14),x=n(25),L=[function(){var t;return y.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.location.hostname,!["localhost","127.0.0.1"].includes(t)&&!t.match(/\.(example|invalid|localhost|test)$/)){n.next=3;break}throw"invalid_hostname";case 3:case"end":return n.stop()}}))},function(){var e,t,n;return y.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,y.a.awrap(C.c.set(C.a,"site","setup-tag"));case 2:return e=a.sent,t=e.token,a.next=6,y.a.awrap(Object(O.a)("setup").catch((function(){throw"tag_fetch_failed"})));case 6:if(n=a.sent,t===n){a.next=9;break}throw"setup_token_mismatch";case 9:case"end":return a.stop()}}))}],j=function(t){function CompatibilityChecks(t){var n;s()(this,CompatibilityChecks);var a=e._googlesitekitLegacyData.setup.isSiteKitConnected;return(n=d()(this,p()(CompatibilityChecks).call(this,t))).state={complete:a,error:null,developerPlugin:{}},n}return h()(CompatibilityChecks,t),l()(CompatibilityChecks,[{key:"componentDidMount",value:function(){var e,t,n,a;return y.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(!this.state.complete){i.next=2;break}return i.abrupt("return");case 2:i.prev=2,e=0,t=L;case 4:if(!(e<t.length)){i.next=11;break}return n=t[e],i.next=8,y.a.awrap(n());case 8:e++,i.next=4;break;case 11:i.next=19;break;case 13:return i.prev=13,i.t0=i.catch(2),i.next=17,y.a.awrap(C.c.get(C.a,"site","developer-plugin"));case 17:a=i.sent,this.setState({error:i.t0,developerPlugin:a});case 19:this.setState({complete:!0});case 20:case"end":return i.stop()}}),null,this,[[2,13]])}},{key:"helperCTA",value:function(){var e=this.state.developerPlugin,t=e.installed,n=e.active,a=e.installURL,i=e.activateURL,r=e.configureURL;return!t&&a?{labelHTML:Object(k.__)('Install<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:a,external:!1}:t&&!n&&i?{labelHTML:Object(k.__)('Activate<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:i,external:!1}:t&&n&&r?{labelHTML:Object(k.__)('Configure<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:r,external:!1}:{labelHTML:Object(k.__)('Learn how<span class="screen-reader-text"> to install and use the helper plugin</span>',"google-site-kit"),href:"https://sitekit.withgoogle.com/documentation/using-site-kit-on-a-staging-environment/",external:!0}}},{key:"renderError",value:function(e){var t=this.state.developerPlugin.installed,n=this.helperCTA(),i=n.labelHTML,r=n.href,o=n.external;switch(e){case"invalid_hostname":case"tag_fetch_failed":return a.createElement(v.b,null,!t&&Object(k.__)("Looks like this may be a staging environment. If so, you’ll need to install a helper plugin and verify your production site in Search Console.","google-site-kit"),t&&Object(k.__)("Looks like this may be a staging environment and you already have the helper plugin. Before you can use Site Kit, please make sure you’ve provided the necessary credentials in the Authentication section and verified your production site in Search Console.","google-site-kit")," ",a.createElement(x.a,{href:r,dangerouslySetInnerHTML:{__html:i},external:o,inherit:!0}));case"setup_token_mismatch":return Object(k.__)("Looks like you may be using a caching plugin which could interfere with setup. Please deactivate any caching plugins before setting up Site Kit. You may reactivate them once setup has been completed.","google-site-kit")}}},{key:"render",value:function(){var e,t,n=this.state,i=n.complete,o=n.error,s=this.props,c=s.children,l=r()(s,["children"]);return o&&(e=a.createElement(v.b,null,a.createElement("div",{className:"googlesitekit-setup-compat mdc-layout-grid mdc-layout-grid--align-left"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement(E.a,null),a.createElement("div",{className:"googlesitekit-heading-4 mdc-layout-grid__cell--span-11"},Object(k.__)("Your site may not be ready for Site Kit","google-site-kit"))),a.createElement("p",null,this.renderError(o))))),i||(t=a.createElement("div",{style:{alignSelf:"center",marginLeft:"1rem"}},a.createElement("small",null,Object(k.__)("Checking Compatibility…","google-site-kit")),a.createElement(w.a,{small:!0,compress:!0}))),c({restProps:l,complete:i,error:o,inProgressFeedback:t,CTAFeedback:e})}}]),CompatibilityChecks}(v.a);j.propTypes={children:b.a.func.isRequired}}).call(this,n(16),n(10))},334:function(e,t,n){"use strict";(function(e,a){n.d(t,"a",(function(){return x}));var i=n(4),r=n.n(i),o=n(5),s=n.n(o),c=n(6),l=n.n(c),u=n(7),d=n.n(u),g=n(8),p=n.n(g),m=n(18),h=n.n(m),f=n(9),y=n.n(f),v=n(1),k=n(0),_=n(37),b=n(3),E=n(14),w=n(97),O=n(25),C=n(102),x=function(t){function ResetButton(t){var n;s()(this,ResetButton),n=d()(this,p()(ResetButton).call(this,t));var a=e._googlesitekitBaseData.splashURL;return n.state={dialogActive:!1,postResetURL:Object(_.a)(a,{notification:"reset_success"})},n.handleDialog=n.handleDialog.bind(h()(n)),n.handleUnlinkConfirm=n.handleUnlinkConfirm.bind(h()(n)),n.handleCloseModal=n.handleCloseModal.bind(h()(n)),n}return y()(ResetButton,t),l()(ResetButton,[{key:"componentDidMount",value:function(){e.addEventListener("keyup",this.handleCloseModal,!1)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("keyup",this.handleCloseModal)}},{key:"handleUnlinkConfirm",value:function(){return r.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.a.awrap(E.c.set(E.a,"site","reset"));case 2:Object(b.d)(),this.handleDialog(),document.location=this.state.postResetURL;case 5:case"end":return e.stop()}}),null,this)}},{key:"handleCloseModal",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1})}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive}}))}},{key:"render",value:function(){var e=this,t=this.props.children,n=this.state.dialogActive;return a.createElement(v.b,null,a.createElement(O.a,{className:"googlesitekit-reset-button",onClick:function(){return e.setState({dialogActive:!0})},inherit:!0},t||Object(k.__)("Reset Site Kit","google-site-kit")),a.createElement(C.a,null,a.createElement(w.a,{dialogActive:n,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(k.__)("Reset Site Kit","google-site-kit"),subtitle:Object(k.__)("Resetting this site will remove access to all services. After disconnecting, you will need to re-authorize your access to restore service.","google-site-kit"),confirmButton:Object(k.__)("Reset","google-site-kit"),provides:[],danger:!0})))}}]),ResetButton}(v.a)}).call(this,n(16),n(10))},423:function(e,t,n){(function(e,n){!function(a){var i=t&&!t.nodeType&&t,r=e&&!e.nodeType&&e,o="object"==typeof n&&n;o.global!==o&&o.window!==o&&o.self!==o||(a=o);var s,c,l=2147483647,u=36,d=1,g=26,p=38,m=700,h=72,f=128,y="-",v=/^xn--/,k=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=u-d,w=Math.floor,O=String.fromCharCode;function C(e){throw new RangeError(b[e])}function x(e,t){for(var n=e.length,a=[];n--;)a[n]=t(e[n]);return a}function L(e,t){var n=e.split("@"),a="";return n.length>1&&(a=n[0]+"@",e=n[1]),a+x((e=e.replace(_,".")).split("."),t).join(".")}function j(e){for(var t,n,a=[],i=0,r=e.length;i<r;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r?56320==(64512&(n=e.charCodeAt(i++)))?a.push(((1023&t)<<10)+(1023&n)+65536):(a.push(t),i--):a.push(t);return a}function S(e){return x(e,(function(e){var t="";return e>65535&&(t+=O((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=O(e)})).join("")}function N(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function M(e,t,n){var a=0;for(e=n?w(e/m):e>>1,e+=w(e/t);e>E*g>>1;a+=u)e=w(e/E);return w(a+(E+1)*e/(e+p))}function R(e){var t,n,a,i,r,o,s,c,p,m,v,k=[],_=e.length,b=0,E=f,O=h;for((n=e.lastIndexOf(y))<0&&(n=0),a=0;a<n;++a)e.charCodeAt(a)>=128&&C("not-basic"),k.push(e.charCodeAt(a));for(i=n>0?n+1:0;i<_;){for(r=b,o=1,s=u;i>=_&&C("invalid-input"),((c=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||c>w((l-b)/o))&&C("overflow"),b+=c*o,!(c<(p=s<=O?d:s>=O+g?g:s-O));s+=u)o>w(l/(m=u-p))&&C("overflow"),o*=m;O=M(b-r,t=k.length+1,0==r),w(b/t)>l-E&&C("overflow"),E+=w(b/t),b%=t,k.splice(b++,0,E)}return S(k)}function A(e){var t,n,a,i,r,o,s,c,p,m,v,k,_,b,E,x=[];for(k=(e=j(e)).length,t=f,n=0,r=h,o=0;o<k;++o)(v=e[o])<128&&x.push(O(v));for(a=i=x.length,i&&x.push(y);a<k;){for(s=l,o=0;o<k;++o)(v=e[o])>=t&&v<s&&(s=v);for(s-t>w((l-n)/(_=a+1))&&C("overflow"),n+=(s-t)*_,t=s,o=0;o<k;++o)if((v=e[o])<t&&++n>l&&C("overflow"),v==t){for(c=n,p=u;!(c<(m=p<=r?d:p>=r+g?g:p-r));p+=u)E=c-m,b=u-m,x.push(O(N(m+E%b,0))),c=w(E/b);x.push(O(N(c,0))),r=M(n,_,a==i),n=0,++a}++n,++t}return x.join("")}if(s={version:"1.4.1",ucs2:{decode:j,encode:S},decode:R,encode:A,toASCII:function(e){return L(e,(function(e){return k.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return L(e,(function(e){return v.test(e)?R(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(i&&r)if(e.exports==i)r.exports=s;else for(c in s)s.hasOwnProperty(c)&&(i[c]=s[c]);else a.punycode=s}(this)}).call(this,n(240)(e),n(16))},46:function(e,t,n){"use strict";function a(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function r(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},613:function(e,t,n){"use strict";n.r(t),function(e,a){var i=n(4),r=n.n(i),o=n(5),s=n.n(o),c=n(6),l=n.n(c),u=n(7),d=n.n(u),g=n(8),p=n.n(g),m=n(9),h=n.n(m),f=n(1),y=n(423),v=n.n(y),k=n(12),_=n(0),b=n(266),E=n(3),w=n(83),O=n(39),C=n(334),x=n(26),L=n(34),j=n(252),S=n(333),N=function(t){function SetupUsingProxy(t){var n;s()(this,SetupUsingProxy),n=d()(this,p()(SetupUsingProxy).call(this,t));var a=e._googlesitekitLegacyData.admin,i=a.proxySetupURL,r=a.siteURL,o=e._googlesitekitLegacyData.setup,c=o.isSiteKitConnected,l=o.isResettable,u=o.errorMessage,g=e._googlesitekitLegacyData.permissions.canSetup;return n.state={canSetup:g,errorMessage:u,isSiteKitConnected:c,isResettable:l,completeSetup:!1,proxySetupURL:i,resetSuccess:"reset_success"===Object(b.a)(location.href,"notification"),context:Object(b.a)(location.href,"googlesitekit_context"),siteHostname:v.a.toUnicode(new URL(r).hostname)},n}return h()(SetupUsingProxy,t),l()(SetupUsingProxy,[{key:"isSetupFinished",value:function(){var e=this.state,t=e.isSiteKitConnected,n=e.completeSetup;return t&&n}},{key:"render",value:function(){if(this.isSetupFinished()){var t=Object(E.n)("googlesitekit-dashboard",{notification:"authentication_success"});Object(k.delay)((function(){e.location.replace(t)}),500,"later")}var n,i,o,s=this.state,c=s.context,l=s.errorMessage,u=s.isResettable,d=s.proxySetupURL,g=s.resetSuccess,p=s.siteHostname,m=u;"revoked"===c?(n=Object(_.sprintf)(
|
4 |
+
/* translators: %s is the site's hostname. (e.g. example.com) */
|
5 |
+
Object(_.__)("You revoked access to Site Kit for %s","google-site-kit"),p),i=Object(_.__)('Site Kit will no longer have access to your account. If you’d like to reconnect Site Kit, click "Start Setup" below to generate new credentials.',"google-site-kit"),o=Object(_.__)("Sign in with Google","google-site-kit")):m?(n=Object(_.__)("Sign in with Google to configure Site Kit","google-site-kit"),i=Object(_.__)("To use Site Kit, sign in with your Google account. The Site Kit service will guide you through 3 simple steps to complete the connection and configure the plugin.","google-site-kit"),o=Object(_.__)("Sign in with Google","google-site-kit")):(n=Object(_.__)("Sign in with Google to set up Site Kit","google-site-kit"),i=Object(_.__)("The Site Kit service will guide you through 3 simple setup steps.","google-site-kit"),o=Object(_.__)("Start setup","google-site-kit"));var h=function(t){return r.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t.preventDefault(),n.next=3,r.a.awrap(Object(E.y)("plugin_setup","proxy_start_setup_landing_page"));case 3:e.location.assign(d);case 4:case"end":return n.stop()}}))};return a.createElement(f.b,null,a.createElement(w.a,null),l&&a.createElement(L.a,{id:"setup_error",type:"win-error",title:Object(_.__)("Oops! There was a problem during set up. Please try again.","google-site-kit"),description:l,isDismissable:!1}),g&&a.createElement(L.a,{id:"reset_success",title:Object(_.__)("Site Kit by Google was successfully reset.","google-site-kit"),isDismissable:!1}),a.createElement("div",{className:"googlesitekit-wizard"},a.createElement("div",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},a.createElement(x.a,null,a.createElement("section",{className:"googlesitekit-wizard-progress"},a.createElement("div",{className:"googlesitekit-setup__footer"},a.createElement("div",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},a.createElement("h1",{className:"googlesitekit-setup__title"},n),a.createElement("p",{className:"googlesitekit-setup__description"},i),a.createElement(S.a,null,(function(e){var t=e.complete,n=e.inProgressFeedback,i=e.CTAFeedback;return a.createElement(f.b,null,i,a.createElement(j.a,{optinAction:"analytics_optin_setup_fallback"}),a.createElement("div",{className:"googlesitekit-start-setup-wrap"},a.createElement(O.a,{className:"googlesitekit-start-setup",href:d,onClick:h,disabled:!t},o),n,u&&a.createElement(C.a,null)))})))))))))))))}}]),SetupUsingProxy}(f.a);t.default=N}.call(this,n(16),n(10))},83:function(e,t,n){"use strict";(function(e,a){var i=n(5),r=n.n(i),o=n(6),s=n.n(o),c=n(7),l=n.n(c),u=n(8),d=n.n(u),g=n(9),p=n.n(g),m=n(1),h=n(133),f=n(158),y=n(160),v=function(t){function Header(){return r()(this,Header),l()(this,d()(Header).apply(this,arguments))}return p()(Header,t),s()(Header,[{key:"render",value:function(){var t=e._googlesitekitLegacyData.setup.isAuthenticated;return a.createElement(m.b,null,a.createElement("header",{className:"googlesitekit-header"},a.createElement("section",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},a.createElement(h.a,null)),a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&a.createElement(f.a,null))))),a.createElement(y.a,null))}}]),Header}(m.a);t.a=v}).call(this,n(16),n(10))}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wrapper-7305879f043f669e374f.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[4],{158:function(e,t,n){"use strict";(function(e,a){var i=n(4),l=n.n(i),o=n(5),r=n.n(o),c=n(6),s=n.n(c),u=n(7),d=n.n(u),m=n(8),p=n.n(m),g=n(18),h=n.n(g),_=n(9),f=n.n(_),v=n(1),y=n(0),k=n(3),E=n(97),b=n(39),M=n(159),N=n(102),C=function(t){function UserMenu(e){var t;return r()(this,UserMenu),(t=d()(this,p()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(v.h)(),t.menuRef=Object(v.h)(),t}return f()(UserMenu,t),s()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,n){var a=e._googlesitekitLegacyData.admin.proxyPermissionsURL;if("keydown"===n.type&&(13===n.keyCode||32===n.keyCode)||"click"===n.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(a);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return l.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(k.d)(),document.location=Object(k.n)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e._googlesitekitLegacyData.admin,n=t.userData,i=n.email,l=void 0===i?"":i,o=n.picture,r=void 0===o?"":o,c=t.proxyPermissionsURL,s=this.state,u=s.dialogActive,d=s.menuOpen;return a.createElement(v.b,null,a.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},a.createElement(b.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:r?a.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},a.createElement("img",{className:"mdc-button__icon--image",src:r,alt:Object(y.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},l),a.createElement(M.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(y.__)("Disconnect","google-site-kit")].concat(c?[Object(y.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),a.createElement(N.a,null,a.createElement(E.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(y.__)("Disconnect","google-site-kit"),subtitle:Object(y.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(y.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(v.a);t.a=C}).call(this,n(16),n(10))},159:function(e,t,n){"use strict";(function(e){var a=n(5),i=n.n(a),l=n(6),o=n.n(l),r=n(7),c=n.n(r),s=n(8),u=n.n(s),d=n(9),m=n.n(d),p=n(1),g=n(2),h=n.n(g),_=n(32),f=function(t){function Menu(e){var t;return i()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(p.h)(),t}return m()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new _.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,n=t.menuOpen,a=t.menuItems,i=t.onSelected,l=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:l,className:"mdc-list",role:"menu","aria-hidden":!n,"aria-orientation":"vertical",tabIndex:"-1"},a.map((function(t,n){return e.createElement("li",{key:n,className:"mdc-list-item",role:"menuitem",onClick:i.bind(null,n),onKeyDown:i.bind(null,n)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(p.a);f.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=f}).call(this,n(10))},160:function(e,t,n){"use strict";var a=n(5),i=n.n(a),l=n(6),o=n.n(l),r=n(7),c=n.n(r),s=n(8),u=n.n(s),d=n(9),m=n.n(d),p=n(75),g=function(e){function ErrorNotification(){return i()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return m()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(n(1).a);t.a=Object(p.a)("googlesitekit.ErrorNotification")(g)},269:function(e,t,n){"use strict";n.r(t),function(e,a){var i=n(5),l=n.n(i),o=n(6),r=n.n(o),c=n(7),s=n.n(c),u=n(8),d=n.n(u),m=n(9),p=n.n(m),g=n(1),h=n(12),_=n(75),f=n(0),v=n(83),y=n(25),k=n(82),E=n(3),b=function(t){function BaseComponent(){return l()(this,BaseComponent),s()(this,d()(BaseComponent).apply(this,arguments))}return p()(BaseComponent,t),r()(BaseComponent,[{key:"render",value:function(){var t=this.props.children;return e.createElement(g.b,null,t)}}]),BaseComponent}(g.a),M=function(t){function SetupWrapper(e){var t;l()(this,SetupWrapper),t=s()(this,d()(SetupWrapper).call(this,e));var n=a._googlesitekitLegacyData.setup.moduleToSetup;return t.state={currentModule:n},t}return p()(SetupWrapper,t),r()(SetupWrapper,[{key:"render",value:function(){var t=this.state.currentModule,n=SetupWrapper.loadSetupModule(t),a=Object(E.n)("googlesitekit-settings",{});return e.createElement(g.b,null,e.createElement(v.a,null),e.createElement("div",{className:"googlesitekit-setup"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("section",{className:"googlesitekit-setup__wrapper"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("p",{className:" googlesitekit-setup__intro-title googlesitekit-overline "},Object(f.__)("Connect Service","google-site-kit")),n))),e.createElement("div",{className:"googlesitekit-setup__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(y.a,{id:"setup-".concat(t,"-cancel"),href:a},Object(f.__)("Cancel","google-site-kit"))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right "},e.createElement(k.a,null)))))))))))}}],[{key:"loadSetupModule",value:function(t){var n=Object(_.a)("googlesitekit.ModuleSetup-".concat(t))(b);return e.createElement(n,{finishSetup:SetupWrapper.finishSetup,onSettingsPage:!1,isEditing:!0})}},{key:"finishSetup",value:function(){var e={notification:"authentication_success"};a._googlesitekitLegacyData.setup&&a._googlesitekitLegacyData.setup.moduleToSetup&&(e.slug=a._googlesitekitLegacyData.setup.moduleToSetup);var t=Object(E.n)("googlesitekit-dashboard",e);Object(h.delay)((function(){a.location.replace(t)}),500,"later")}}]),SetupWrapper}(g.a);t.default=M}.call(this,n(10),n(16))},82:function(e,t,n){"use strict";(function(e){n(1);var a=n(0),i=n(25);t.a=function HelpLink(){var t=Object(a.__)("Need help?","google-site-kit");return e.createElement(i.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,n(10))},83:function(e,t,n){"use strict";(function(e,a){var i=n(5),l=n.n(i),o=n(6),r=n.n(o),c=n(7),s=n.n(c),u=n(8),d=n.n(u),m=n(9),p=n.n(m),g=n(1),h=n(133),_=n(158),f=n(160),v=function(t){function Header(){return l()(this,Header),s()(this,d()(Header).apply(this,arguments))}return p()(Header,t),r()(Header,[{key:"render",value:function(){var t=e._googlesitekitLegacyData.setup.isAuthenticated;return a.createElement(g.b,null,a.createElement("header",{className:"googlesitekit-header"},a.createElement("section",{className:"mdc-layout-grid"},a.createElement("div",{className:"mdc-layout-grid__inner"},a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},a.createElement(h.a,null)),a.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&a.createElement(_.a,null))))),a.createElement(f.a,null))}}]),Header}(g.a);t.a=v}).call(this,n(16),n(10))}}]);
|
dist/assets/js/chunk-googlesitekit-setup-wrapper-e13346873edace467a15.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{151:function(e,t,n){"use strict";(function(e,i){var a=n(4),l=n.n(a),o=n(5),r=n.n(o),c=n(6),s=n.n(c),u=n(7),d=n.n(u),m=n(8),p=n.n(m),g=n(18),h=n.n(g),_=n(9),f=n.n(_),v=n(1),k=n(0),y=n(3),E=n(92),b=n(36),M=n(152),N=n(96),C=function(t){function UserMenu(e){var t;return r()(this,UserMenu),(t=d()(this,p()(UserMenu).call(this,e))).state={dialogActive:!1,menuOpen:!1},t.handleMenu=t.handleMenu.bind(h()(t)),t.handleMenuClose=t.handleMenuClose.bind(h()(t)),t.handleMenuItemSelect=t.handleMenuItemSelect.bind(h()(t)),t.handleDialog=t.handleDialog.bind(h()(t)),t.handleDialogClose=t.handleDialogClose.bind(h()(t)),t.handleUnlinkConfirm=t.handleUnlinkConfirm.bind(h()(t)),t.menuButtonRef=Object(v.h)(),t.menuRef=Object(v.h)(),t}return f()(UserMenu,t),s()(UserMenu,[{key:"componentDidMount",value:function(){e.addEventListener("mouseup",this.handleMenuClose),e.addEventListener("keyup",this.handleMenuClose),e.addEventListener("keyup",this.handleDialogClose)}},{key:"componentWillUnmount",value:function(){e.removeEventListener("mouseup",this.handleMenuClose),e.removeEventListener("keyup",this.handleMenuClose),e.removeEventListener("keyup",this.handleDialogClose)}},{key:"handleMenu",value:function(){var e=this.state.menuOpen;this.setState({menuOpen:!e})}},{key:"handleMenuClose",value:function(e){("keyup"!==e.type||27!==e.keyCode)&&"mouseup"!==e.type||this.menuButtonRef.current.buttonRef.current.contains(e.target)||this.menuRef.current.menuRef.current.contains(e.target)||this.setState({menuOpen:!1})}},{key:"handleMenuItemSelect",value:function(t,n){var i=e.googlesitekit.admin.proxyPermissionsURL;if("keydown"===n.type&&(13===n.keyCode||32===n.keyCode)||"click"===n.type)switch(t){case 0:this.handleDialog();break;case 1:e.location.assign(i);break;default:this.handleMenu()}}},{key:"handleDialog",value:function(){this.setState((function(e){return{dialogActive:!e.dialogActive,menuOpen:!1}}))}},{key:"handleDialogClose",value:function(e){27===e.keyCode&&this.setState({dialogActive:!1,menuOpen:!1})}},{key:"handleUnlinkConfirm",value:function(){return l.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({dialogActive:!1}),Object(y.d)(),document.location=Object(y.m)("googlesitekit-splash",{googlesitekit_context:"revoked"});case 3:case"end":return e.stop()}}),null,this)}},{key:"render",value:function(){var t=e.googlesitekit.admin,n=t.userData,a=n.email,l=void 0===a?"":a,o=n.picture,r=void 0===o?"":o,c=t.proxyPermissionsURL,s=this.state,u=s.dialogActive,d=s.menuOpen;return i.createElement(v.b,null,i.createElement("div",{className:"googlesitekit-dropdown-menu mdc-menu-surface--anchor"},i.createElement(b.a,{ref:this.menuButtonRef,className:"googlesitekit-header__dropdown mdc-button--dropdown",text:!0,onClick:this.handleMenu,icon:r?i.createElement("i",{className:"mdc-button__icon","aria-hidden":"true"},i.createElement("img",{className:"mdc-button__icon--image",src:r,alt:Object(k.__)("User Avatar","google-site-kit")})):void 0,ariaHaspopup:"menu",ariaExpanded:d,ariaControls:"user-menu"},l),i.createElement(M.a,{ref:this.menuRef,menuOpen:d,menuItems:[Object(k.__)("Disconnect","google-site-kit")].concat(c?[Object(k.__)("Manage sites…","google-site-kit")]:[]),onSelected:this.handleMenuItemSelect,id:"user-menu"})),i.createElement(N.a,null,i.createElement(E.a,{dialogActive:u,handleConfirm:this.handleUnlinkConfirm,handleDialog:this.handleDialog,title:Object(k.__)("Disconnect","google-site-kit"),subtitle:Object(k.__)("Disconnecting Site Kit by Google will remove your access to all services. After disconnecting, you will need to re-authorize to restore service.","google-site-kit"),confirmButton:Object(k.__)("Disconnect","google-site-kit"),provides:[],danger:!0})))}}]),UserMenu}(v.a);t.a=C}).call(this,n(16),n(10))},152:function(e,t,n){"use strict";(function(e){var i=n(5),a=n.n(i),l=n(6),o=n.n(l),r=n(7),c=n.n(r),s=n(8),u=n.n(s),d=n(9),m=n.n(d),p=n(1),g=n(2),h=n.n(g),_=n(32),f=function(t){function Menu(e){var t;return a()(this,Menu),(t=c()(this,u()(Menu).call(this,e))).menuRef=Object(p.h)(),t}return m()(Menu,t),o()(Menu,[{key:"componentDidMount",value:function(){var e=this.props.menuOpen;this.menu=new _.f(this.menuRef.current),this.menu.open=e,this.menu.setDefaultFocusState(1)}},{key:"componentDidUpdate",value:function(e){var t=this.props.menuOpen;t!==e.menuOpen&&(this.menu.open=t)}},{key:"render",value:function(){var t=this.props,n=t.menuOpen,i=t.menuItems,a=t.onSelected,l=t.id;return e.createElement("div",{className:"mdc-menu mdc-menu-surface",ref:this.menuRef},e.createElement("ul",{id:l,className:"mdc-list",role:"menu","aria-hidden":!n,"aria-orientation":"vertical",tabIndex:"-1"},i.map((function(t,n){return e.createElement("li",{key:n,className:"mdc-list-item",role:"menuitem",onClick:a.bind(null,n),onKeyDown:a.bind(null,n)},e.createElement("span",{className:"mdc-list-item__text"},t))}))))}}]),Menu}(p.a);f.propTypes={menuOpen:h.a.bool.isRequired,menuItems:h.a.array.isRequired,id:h.a.string.isRequired},t.a=f}).call(this,n(10))},153:function(e,t,n){"use strict";var i=n(5),a=n.n(i),l=n(6),o=n.n(l),r=n(7),c=n.n(r),s=n(8),u=n.n(s),d=n(9),m=n.n(d),p=n(65),g=function(e){function ErrorNotification(){return a()(this,ErrorNotification),c()(this,u()(ErrorNotification).apply(this,arguments))}return m()(ErrorNotification,e),o()(ErrorNotification,[{key:"render",value:function(){return null}}]),ErrorNotification}(n(1).a);t.a=Object(p.a)("googlesitekit.ErrorNotification")(g)},261:function(e,t,n){"use strict";n.r(t),function(e,i){var a=n(5),l=n.n(a),o=n(6),r=n.n(o),c=n(7),s=n.n(c),u=n(8),d=n.n(u),m=n(9),p=n.n(m),g=n(1),h=n(11),_=n(65),f=n(0),v=n(76),k=n(26),y=n(75),E=n(3),b=function(t){function BaseComponent(){return l()(this,BaseComponent),s()(this,d()(BaseComponent).apply(this,arguments))}return p()(BaseComponent,t),r()(BaseComponent,[{key:"render",value:function(){var t=this.props.children;return e.createElement(g.b,null,t)}}]),BaseComponent}(g.a),M=function(t){function SetupWrapper(e){var t;l()(this,SetupWrapper),t=s()(this,d()(SetupWrapper).call(this,e));var n=i.googlesitekit.setup.moduleToSetup;return t.state={currentModule:n},t}return p()(SetupWrapper,t),r()(SetupWrapper,[{key:"render",value:function(){var t=this.state.currentModule,n=SetupWrapper.loadSetupModule(t),i=Object(E.m)("googlesitekit-settings",{});return e.createElement(g.b,null,e.createElement(v.a,null),e.createElement("div",{className:"googlesitekit-setup"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("section",{className:"googlesitekit-setup__wrapper"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement("p",{className:" googlesitekit-setup__intro-title googlesitekit-overline "},Object(f.__)("Connect Service","google-site-kit")),n))),e.createElement("div",{className:"googlesitekit-setup__footer"},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},e.createElement(k.a,{id:"setup-".concat(t,"-cancel"),href:i},Object(f.__)("Cancel","google-site-kit"))),e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-2-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop mdc-layout-grid__cell--align-right "},e.createElement(y.a,null)))))))))))}}],[{key:"loadSetupModule",value:function(t){var n=Object(_.a)("googlesitekit.ModuleSetup-".concat(t))(b);return e.createElement(n,{finishSetup:SetupWrapper.finishSetup,onSettingsPage:!1,isEditing:!0})}},{key:"finishSetup",value:function(){var e={notification:"authentication_success"};i.googlesitekit.setup&&i.googlesitekit.setup.moduleToSetup&&(e.slug=i.googlesitekit.setup.moduleToSetup);var t=Object(E.m)("googlesitekit-dashboard",e);Object(h.delay)((function(){i.location.replace(t)}),500,"later")}}]),SetupWrapper}(g.a);t.default=M}.call(this,n(10),n(16))},75:function(e,t,n){"use strict";(function(e){n(1);var i=n(0),a=n(26);t.a=function HelpLink(){var t=Object(i.__)("Need help?","google-site-kit");return e.createElement(a.a,{className:"googlesitekit-help-link",href:"https://sitekit.withgoogle.com/documentation/",external:!0},t)}}).call(this,n(10))},76:function(e,t,n){"use strict";(function(e,i){var a=n(5),l=n.n(a),o=n(6),r=n.n(o),c=n(7),s=n.n(c),u=n(8),d=n.n(u),m=n(9),p=n.n(m),g=n(1),h=n(128),_=n(151),f=n(153),v=function(t){function Header(){return l()(this,Header),s()(this,d()(Header).apply(this,arguments))}return p()(Header,t),r()(Header,[{key:"render",value:function(){var t=e.googlesitekit.setup.isAuthenticated;return i.createElement(g.b,null,i.createElement("header",{className:"googlesitekit-header"},i.createElement("section",{className:"mdc-layout-grid"},i.createElement("div",{className:"mdc-layout-grid__inner"},i.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--span-3-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},i.createElement(h.a,null)),i.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--align-middle mdc-layout-grid__cell--align-right-phone mdc-layout-grid__cell--span-1-phone mdc-layout-grid__cell--span-4-tablet mdc-layout-grid__cell--span-6-desktop "},t&&i.createElement(_.a,null))))),i.createElement(f.a,null))}}]),Header}(g.a);t.a=v}).call(this,n(16),n(10))}}]);
|
|
dist/assets/js/googlesitekit-activation.js
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
!function(e){function t(t){for(var r,o,c=t[0],s=t[1],u=t[2],d=0,g=[];d<c.length;d++)o=c[d],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&g.push(i[o][0]),i[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);g.length;)g.shift()();return a.push.apply(a,u||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,o=1;o<n.length;o++){var c=n[o];0!==i[c]&&(r=!1)}r&&(a.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},i={6:0},a=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var o=window.webpackJsonp=window.webpackJsonp||[],c=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var l=c;a.push([533,0]),n()}({1:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return k})),n.d(t,"k",(function(){return E})),n.d(t,"c",(function(){return N})),n.d(t,"l",(function(){return x})),n.d(t,"m",(function(){return T})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return P})),n.d(t,"p",(function(){return R})),n.d(t,"q",(function(){return L})),n.d(t,"r",(function(){return M})),n.d(t,"s",(function(){return U}));var r=n(110);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._element||r,a=i.__experimentalCreateInterpolateElement,o=i.Children,c=i.cloneElement,s=i.Component,l=i.concatChildren,u=i.createContext,d=i.createElement,g=i.createPortal,f=i.createRef,p=i.findDOMNode,m=i.forwardRef,h=i.Fragment,b=i.isEmptyElement,v=i.isValidElement,k=i.lazy,_=i.memo,y=i.Platform,O=i.RawHTML,E=i.render,w=i.renderToString,j=i.StrictMode,N=i.Suspense,S=i.switchChildrenNodeName,C=i.unmountComponentAtNode,x=i.useCallback,T=i.useContext,D=i.useDebugValue,A=i.useEffect,I=i.useImperativeHandle,P=i.useLayoutEffect,R=i.useMemo,L=i.useReducer,M=i.useRef,U=i.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:a,Children:o,cloneElement:c,Component:s,concatChildren:l,createContext:u,createElement:d,createPortal:g,createRef:f,findDOMNode:p,forwardRef:m,Fragment:h,isEmptyElement:b,isValidElement:v,lazy:k,memo:_,Platform:y,RawHTML:O,render:E,renderToString:w,StrictMode:j,Suspense:N,switchChildrenNodeName:S,unmountComponentAtNode:C,useCallback:x,useContext:T,useDebugValue:D,useEffect:A,useImperativeHandle:I,useLayoutEffect:P,useMemo:R,useReducer:L,useRef:M,useState:U})}).call(this,n(16))},101:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f}));var r=n(14),i=n.n(r),a=n(4),o=n.n(a),c=n(21),s=n.n(c),l=n(42),u=n.n(l);function d(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=a.client,l=void 0===c||c,d=a.server,f=void 0===d||d,p=a.storeName,m=void 0===p?void 0:p;s()(t,"type is required."),s()(n,"identifier is required."),s()(r,"datapoint is required.");var h=m||"".concat(t,"/").concat(n),b={serverNotifications:f?void 0:{},clientNotifications:l?void 0:{},isFetchingNotifications:!1},v={addNotification:function(e){return s()(e,"notification is required."),{payload:{notification:e},type:"ADD_NOTIFICATION"}},removeNotification:function(e){return s()(e,"id is required."),{payload:{id:e},type:"REMOVE_NOTIFICATION"}},fetchNotifications:o.a.mark((function e(){var t,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_NOTIFICATIONS"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_NOTIFICATIONS"};case 5:return t=e.sent,e.next=8,v.receiveNotifications(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_NOTIFICATIONS"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),n=e.t0,e.next=17,{payload:{error:n},type:"CATCH_FETCH_NOTIFICATIONS"};case 17:return e.abrupt("return",{response:t,error:n});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveNotifications:function(e){return s()(e,"notifications is required."),{payload:{notifications:e},type:"RECEIVE_NOTIFICATIONS"}}},k=i()({},"FETCH_NOTIFICATIONS",(function(){return u.a.get(t,n,r)})),_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,n=arguments.length>1?arguments[1]:void 0,r=n.type,a=n.payload;switch(r){case"ADD_NOTIFICATION":var o=a.notification;return g({},t,{clientNotifications:g({},t.clientNotifications||{},i()({},o.id,o))});case"REMOVE_NOTIFICATION":var c=a.id;if(void 0===t.clientNotifications||void 0===t.clientNotifications[c])return void 0!==t.serverNotifications&&void 0!==t.serverNotifications[c]&&e.console.warn('Cannot remove server-side notification with ID "'.concat(c,'"; this may be changed in a future release.')),g({},t);var s=g({},t.clientNotifications);return delete s[c],g({},t,{clientNotifications:s});case"START_FETCH_NOTIFICATIONS":return g({},t,{isFetchingNotifications:!0});case"RECEIVE_NOTIFICATIONS":var l=a.notifications;return g({},t,{isFetchingNotifications:!1,serverNotifications:l.reduce((function(e,t){return g({},e,i()({},t.id,t))}),{})});case"FINISH_FETCH_NOTIFICATIONS":return g({},t,{isFetchingNotifications:!1});case"CATCH_FETCH_NOTIFICATIONS":return g({},t,{error:a.error,isFetchingNotifications:!1});default:return g({},t)}},y={getNotifications:o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.fetchNotifications();case 2:case"end":return e.stop()}}),e)}))};f||delete y.getNotifications;var O={getNotifications:function(e){var t=e.serverNotifications,n=e.clientNotifications;return void 0===t&&void 0===n?t:Object.values(g({},t||{},{},n||{}))}};return{STORE_NAME:h,INITIAL_STATE:b,actions:v,controls:k,reducer:_,resolvers:y,selectors:O}}}).call(this,n(16))},102:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g}));var r=n(4),i=n.n(r),a=n(13);function o(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(a.c.get(a.a,"site","notifications",{},!1));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}))}var c=n(50),s="accepted",l="dismissed";function u(e,t){return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return a.c.invalidateCacheGroup(a.a,"site","notifications"),Object(c.c)("site_notifications",t,e),n.next=4,i.a.awrap(a.c.set(a.a,"site","mark-notification",{notificationID:e,notificationState:t}));case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}))}function d(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(u(e,s));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}function g(e){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(u(e,l));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},103:function(e,t,n){"use strict";(function(e){n(1);t.a=function Warning(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))}}).call(this,n(10))},107:function(e,t,n){"use strict";(function(e){n(1);var r=n(2),i=n.n(r),a=n(15),o=n.n(a);function ChangeArrow(t){var n=t.direction,r=t.invertColor;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(n),{"googlesitekit-change-arrow--inverted-color":r}),width:"9",height:"9",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:i.a.string,invertColor:i.a.bool},ChangeArrow.defaultProps={direction:"up",invertColor:!1},t.a=ChangeArrow}).call(this,n(10))},108:function(e,t,n){"use strict";(function(e){n(1);t.a=function Error(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},e.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}}).call(this,n(10))},109:function(e,t,n){"use strict";(function(e){n(1);var r=n(0),i=n(34);t.a=function DashboardPermissionAlert(){return e.createElement(i.a,{id:"permission error",title:Object(r.__)("Permissions issue accessing data","google-site-kit"),description:Object(r.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})}}).call(this,n(10))},12:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||r,a=i.addAction,o=i.addFilter,c=i.removeAction,s=i.removeFilter,l=i.hasAction,u=i.hasFilter,d=i.removeAllActions,g=i.removeAllFilters,f=i.doAction,p=i.applyFilters,m=i.currentAction,h=i.currentFilter,b=i.doingAction,v=i.doingFilter,k=i.didAction,_=i.didFilter,y=i.actions,O=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:a,addFilter:o,removeAction:c,removeFilter:s,hasAction:l,hasFilter:u,removeAllActions:d,removeAllFilters:g,doAction:f,applyFilters:p,currentAction:m,currentFilter:h,doingAction:b,doingFilter:v,didAction:k,didFilter:_,actions:y,filters:O})}).call(this,n(16))},122:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m}));var r=n(4),i=n.n(r),a=n(14),o=n.n(a),c=n(54),s=n(39),l=n(123),u=n(124),d=n(125),g=n(45);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(t){var n,r,a,o,l;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e.googlesitekit.admin,r=n.homeURL,a=n.ampMode,o={tagverify:1,timestamp:Date.now()},u.next=4,i.a.awrap(h(Object(s.a)(r,o),t));case 4:if((l=u.sent)||"secondary"!==a){u.next=9;break}return u.next=8,i.a.awrap(Object(c.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.a.awrap(h(Object(s.a)(e.link,p({},o,{amp:1})),t));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:l=u.sent;case 9:return u.abrupt("return",Promise.resolve(l||null));case 10:case"end":return u.stop()}}))},h=function(e,t){var n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,i.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=r.sent,r.abrupt("return",b(n,t)||null);case 7:return r.prev=7,r.t0=r.catch(0),r.abrupt("return",null);case 10:case"end":return r.stop()}}),null,null,[[0,7]])},b=function(e,t){var n=({adsense:u.a,analytics:d.a,tagmanager:g.d,setup:l.a}[t]||[]).find((function(t){return t.test(e)}));return!!n&&n.exec(e)[1]}}).call(this,n(16))},123:function(e,t,n){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},124:function(e,t,n){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},125:function(e,t,n){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},126:function(e,t,n){"use strict";(function(e){var r=n(4),i=n.n(r),a=n(14),o=n.n(a),c=n(21),s=n.n(c),l=n(39),u=n(17),d=n.n(u),g=n(25);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=d.a.createRegistrySelector,h={connectURL:void 0,user:void 0,verified:void 0},b={receiveConnectURL:function(e){return s()(e,"connectURL is required."),{payload:{connectURL:e},type:"RECEIVE_CONNECT_URL"}},receiveUserInfo:function(e){return s()(e,"userInfo is required."),{payload:{user:e},type:"RECEIVE_USER_INFO"}},receiveUserIsVerified:function(e){return s()(void 0!==e,"userIsVerified is required."),{payload:{verified:e},type:"RECEIVE_USER_IS_VERIFIED"}}},v={getConnectURL:i.a.mark((function t(){var n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,!(0,n.select)(g.b).getConnectURL()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.connectURL,t.next=12,b.receiveConnectURL(r);case 12:case"end":return t.stop()}}),t)})),getUser:i.a.mark((function t(){var n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,void 0===(0,n.select)(g.b).getUser()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.user,t.next=12,b.receiveUserInfo(r);case 12:case"end":return t.stop()}}),t)})),isVerified:i.a.mark((function t(){var n,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,void 0===(0,n.select)(g.b).isVerified()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.verified,t.next=12,b.receiveUserIsVerified(r);case 12:case"end":return t.stop()}}),t)}))},k={getUser:function(e){return e.user},getConnectURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.additionalScopes,r=void 0===n?[]:n,i=t.redirectURL,a=void 0===i?void 0:i,o=e.connectURL,c={redirect:a};if(void 0!==o)return(null==r?void 0:r.length)?Object(l.a)(o,p({},c,{additional_scopes:r})):Object(l.a)(o,c)},getID:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.id:t}})),getName:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.name:t}})),getEmail:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.email:t}})),getPicture:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.picture:t}})),isVerified:function(e){return e.verified}};t.a={INITIAL_STATE:h,actions:b,controls:{},reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"RECEIVE_CONNECT_URL":return p({},e,{connectURL:r.connectURL});case"RECEIVE_USER_INFO":return p({},e,{user:r.user});case"RECEIVE_USER_IS_VERIFIED":return p({},e,{verified:r.verified});default:return p({},e)}},resolvers:v,selectors:k}}).call(this,n(16))},128:function(e,t,n){"use strict";(function(e){n(1);var r=n(0),i=n(31);t.a=function Logo(){return e.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},e.createElement(i.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),e.createElement(i.a,{id:"logo-sitekit",className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),e.createElement("span",{className:"screen-reader-text"},Object(r.__)("Site Kit by Google Logo","google-site-kit")))}}).call(this,n(10))},129:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Root}));n(1);var r=n(2),i=n.n(r),a=n(17),o=n.n(a),c=n(130),s=n(131),l=n(132),u=n(133);function Root(t){var n=t.children,r=t.registry,i=t.dataAPIContext,a=t.dataAPIModuleArgs;return e.createElement(o.a.RegistryProvider,{value:r},e.createElement(c.a,null,e.createElement(l.a,null,n,i&&e.createElement(u.a,{context:i,args:a})),e.createElement(s.a,null)))}Root.propTypes={children:i.a.node.isRequired,registry:i.a.object,dataAPIContext:i.a.string,dataAPIModuleArgs:i.a.object},Root.defaultProps={registry:o.a}}).call(this,n(10))},13:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return k}));var r=n(14),i=n.n(r),a=n(11),o=n(54),c=n(39),s=n(12),l=n(44),u=n(52),d=n(20),g=n(56),f=n(84),p=n(109),m=n(28);function h(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v="core",k="modules",_=function(e,t){var n=b({data:{}},e);return n.data=b({dateRange:t},n.data),n},y={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(n,r){try{var i=[],o=Object(u.b)();Object(a.each)(e,(function(e){var n=_(e,o);n.key=Object(m.c)(n.type,n.identifier,n.datapoint,n.data);var r=Object(m.b)(n.key,n.maxAge);void 0!==r&&(i[n.key]=r,t.resolve(n,r))})),n(i)}catch(e){r()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],i=25,l=Object(u.b)();Object(a.each)(e,(function(e){var n=_(e,l);n.key=Object(m.c)(n.type,n.identifier,n.datapoint,n.data);var a=Object(m.b)(n.key,n.maxAge);void 0!==a?(setTimeout((function(){t.resolve(n,a)}),i),i+=25):r.push(n)})),r=Object(a.sortBy)(r,"priority");var d=[],f=[],p={},h=!!r.find((function(e){return e.priority<10}));Object(a.each)(r,(function(e,t){!n&&10<=e.priority&&h?f.push(e):p[e.key]?p[e.key].push(t):(p[e.key]=[t],d.push(e))}));var b=10,v=d.slice(0,b),k=d.slice(b);if(k=k.concat(f),0!==v.length||0!==k.length){0<k.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(k,!0)}),50):this.maxRequests=10;var y=null!==Object(g.c)("datacache");return Object(o.default)({path:Object(c.a)("/google-site-kit/v1/data/",{datacache:y||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(a.each)(e,(function(e,n){p[n]?(t.handleWPError(e),Object(a.each)(p[n],(function(n){var i=r[n];Object(m.e)(i.key,e),t.resolve(i,e)})),0===k.length&&Object(s.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+n)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(s.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],n=Object(a.intersection)(t,Object.keys(e));if(Object(a.isEqual)(t,n)){console.warn("WP Error in data response",e);var r=e.data;if(r&&r.reason){var i=0;["authError","insufficientPermissions"].includes(r.reason)&&(Object(s.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(d.b)(f.a),1),i++),"forbidden"===r.reason&&(Object(s.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(d.b)(p.a),1),i++),i&&Object(s.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(s.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+i}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:function(t,n,r){var i=Object(m.c)(t,n,r);Object(m.d)(),Object.keys(e.googlesitekit.admin.datacache).forEach((function(t){0!==t.indexOf(i+"::")&&t!==i||delete e.googlesitekit.admin.datacache[t]})),Object.keys(Object(l.a)()).forEach((function(e){0!==e.indexOf("googlesitekit_".concat(i,"::"))&&e!=="googlesitekit_".concat(i)||Object(l.a)().removeItem(e)}))},collectModuleData:function(e,t){var n=Object(s.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=Object(m.c)(e,t,n,i);if(!a){var l=Object(m.b)(s,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(c.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),i)}).then((function(e){return a||Object(m.e)(s,e),Promise.resolve(e)})).catch((function(e){return r.handleWPError(e),Promise.reject(e)}))},set:function(e,t,n,r){var i={};return i.data=r,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:i,method:"POST"}).then((function(r){return y.invalidateCacheGroup(e,t,n),new Promise((function(e){e(r)}))}))},setModuleActive:function(e,t){return this.set(v,"modules","activation",{slug:e,active:t})}};Object(s.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(s.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",y.collectModuleData.bind(y)),t.c=y}).call(this,n(16))},130:function(e,t,n){"use strict";(function(e,r){var i=n(5),a=n.n(i),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(2),h=n.n(m),b=n(0),v=n(34),k=function(t){function ErrorHandler(e){var t;return a()(this,ErrorHandler),(t=l()(this,d()(ErrorHandler).call(this,e))).state={error:null,info:null},t}return f()(ErrorHandler,t),c()(ErrorHandler,[{key:"componentDidCatch",value:function(t,n){e.console.error("Caught an error:",t,n),this.setState({error:t,info:n})}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.error,i=t.info;return n?r.createElement(v.a,{id:"googlesitekit-error",title:Object(b.__)("Site Kit encountered an error","google-site-kit"),description:r.createElement("code",null,n.message),isDismissable:!1,format:"small",type:"win-error"},r.createElement("pre",null,i.componentStack)):e}}]),ErrorHandler}(p.a);k.defaultProps={},k.propTypes={children:h.a.node.isRequired},t.a=k}).call(this,n(16),n(10))},131:function(e,t,n){"use strict";(function(e,r){var i=n(4),a=n.n(i),o=n(1),c=n(0),s=n(17),l=n.n(s),u=n(87),d=n(92),g=n(96),f=n(79),p=l.a.useSelect,m=l.a.useDispatch,h=l.a.useRegistry;t.a=function PermissionsModal(){var t,n,i,s=h(),l=p((function(e){return e(u.a).getPermissionScopeError()})),b=p((function(t){var n;return t(u.a).getConnectURL({additionalScopes:null==l?void 0:null===(n=l.data)||void 0===n?void 0:n.scopes,redirectURL:e.location.href})})),v=m(u.a).clearPermissionScopeError,k=Object(o.l)((function(){v()}),[v]),_=Object(o.l)((function(){return a.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.awrap(Object(f.c)(s));case 2:e.location.assign(b);case 3:case"end":return t.stop()}}))}),[s,b]);return Object(o.n)((function(){var e,t,n;a.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.skipModal)||!(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.scopes)||void 0===n?void 0:n.length)){r.next=3;break}return r.next=3,a.a.awrap(_());case 3:case"end":return r.stop()}}))}),[_,l]),l?(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.scopes)||void 0===n?void 0:n.length)?(null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.skipModal)?null:r.createElement(g.a,null,r.createElement(d.a,{title:Object(c.__)("Additional Permissions Required","google-site-kit"),subtitle:l.message,confirmButton:Object(c.__)("Proceed","google-site-kit"),dialogActive:!0,handleConfirm:_,handleDialog:k})):(e.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",l),null):null}}).call(this,n(16),n(10))},132:function(e,t,n){"use strict";var r=n(4),i=n.n(r),a=n(37),o=n.n(a),c=n(1),s=n(17),l=n.n(s),u=n(79),d=l.a.useRegistry;t.a=function RestoreSnapshots(e){var t=e.children,n=d(),r=Object(c.s)(!1),a=o()(r,2),s=a[0],l=a[1];return Object(c.n)((function(){s||i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(u.b)(n));case 2:l(!0);case 3:case"end":return e.stop()}}))}),[n,s]),s?t:null}},133:function(e,t,n){"use strict";n.d(t,"a",(function(){return CollectModuleData}));var r=n(1),i=n(12);n(13);function CollectModuleData(e){var t=e.context,n=e.args;return Object(r.n)((function(){Object(i.d)("googlesitekit.moduleLoaded",t,n)}),[t,n]),null}},143:function(e,t,n){"use strict";(function(e){var r=n(4),i=n.n(r),a=n(5),o=n.n(a),c=n(6),s=n.n(c),l=n(7),u=n.n(l),d=n(8),g=n.n(d),f=n(9),p=n.n(f),m=n(1),h=n(0),b=n(102),v=n(34),k=function(t){function DashboardCoreSiteAlerts(e){var t;return o()(this,DashboardCoreSiteAlerts),(t=u()(this,g()(DashboardCoreSiteAlerts).call(this,e))).state={notifications:!1},t}return p()(DashboardCoreSiteAlerts,t),s()(DashboardCoreSiteAlerts,[{key:"componentDidMount",value:function(){var e;return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.a.awrap(Object(b.c)());case 3:e=t.sent,this.setState({notifications:e}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.warn("Error caught while fetching notifications",t.t0);case 10:case"end":return t.stop()}}),null,this,[[0,7]])}},{key:"render",value:function(){var t=this.state.notifications;return Array.isArray(t)?t.map((function(t){return e.createElement(v.a,{key:t.id,id:t.id,title:t.title||"",description:t.content||"",learnMoreURL:t.learnMoreURL||"",learnMoreLabel:t.learnMoreLabel||"",ctaLink:t.ctaURL||"",ctaLabel:t.ctaLabel||"",ctaTarget:t.ctaTarget||"",dismiss:t.dismissLabel||Object(h.__)("OK, Got it!","google-site-kit"),isDismissable:t.dismissible,onCTAClick:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(b.a)(t.id));case 2:case"end":return e.stop()}}))},onDismiss:function(){return i.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.awrap(Object(b.b)(t.id));case 2:case"end":return e.stop()}}))}})})):null}}]),DashboardCoreSiteAlerts}(m.a);t.a=k}).call(this,n(10))},144:function(e,t,n){"use strict";(function(e,r){var i=n(5),a=n.n(i),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(0),h=n(12),b=n(3),v=n(34),k=n(145),_=function(t){function DashboardSetupAlerts(){return a()(this,DashboardSetupAlerts),l()(this,d()(DashboardSetupAlerts).apply(this,arguments))}return f()(DashboardSetupAlerts,t),c()(DashboardSetupAlerts,[{key:"render",value:function(){var t=Object(b.k)("notification");if(!t||""===t)return null;var n={id:"connected-successfully",setupTitle:Object(m.__)("Site Kit","google-site-kit"),description:Object(m.__)("Now you’ll be able to see how your site is doing in search. To get even more detailed stats, activate more modules. Here are our recommendations for what to include in your Site Kit:","google-site-kit"),learnMore:{label:"",url:"",description:""}},i=e.googlesitekit.permissions.canManageOptions;switch(t){case"authentication_success":if(!i)return null;var a=Object(b.j)(),o=Object(b.k)("slug");return o&&a[o]&&!a[o].active?null:(o&&a[o]&&(n.id="".concat(n.id,"-").concat(o),n.setupTitle=a[o].name,n.description=Object(m.__)("Here are some other services you can connect to see even more stats:","google-site-kit"),n=Object(h.c)(" global.googlesitekit.SetupWinNotification-".concat(o),n)),r.createElement(p.b,null,r.createElement(v.a,{id:n.id
|
2 |
-
/* translators: %s: the name of a module that setup was completed for */,title:Object(m.sprintf)(Object(m.__)("Congrats on completing the setup for %s!","google-site-kit"),n.setupTitle),description:n.description,handleDismiss:function(){},winImage:e.
|
3 |
/* translators: %s: parent module name */
|
4 |
-
Object(O.sprintf)(Object(O.__)("Enable %s to start setup","google-site-kit"),
|
5 |
/* translators: %d: the number of notifications */
|
6 |
-
Object(v._n)("%d notification","%d notifications",this.state.count,"google-site-kit"),this.state.count),n=e.createElement("span",{className:b()("googlesitekit-notifications-counter","update-plugins","count-".concat(this.state.count))},e.createElement("span",{className:"plugin-count","aria-hidden":"true"},this.state.count),e.createElement("span",{className:"screen-reader-text"},t));return Object(m.g)(n,document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"))}}]),NotificationCounter}(m.a);t.a=
|
7 |
/* translators: %s: privacy policy URL */
|
8 |
-
Object(E.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:
|
9 |
-
Object(
|
10 |
-
Object(
|
11 |
-
Object(g.__)("%sK","google-site-kit"),N(w(e),e%10==0?{}:n)):e.toString()},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?S():n,i=c()(t,["locale"]);return new Intl.NumberFormat(r,i).format(e)},S=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(u.get)(t,["googlesitekit","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language},C=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},x=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},T=function(e,t){var n=1e3*C("day"),r=e.getTime(),i=t.getTime();return Math.round(Math.abs(r-i)/n)},D=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},A=function(e,t){return Object(u.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},I=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.googlesitekit,n=t.modules;return n?Object.keys(n).reduce((function(e,t){return"object"!==l()(n[t])?e:void 0===n[t].slug||void 0===n[t].name||n[t].slug!==t?e:E({},e,a()({},t,n[t]))}),{}):{}},P=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.googlesitekit,i=r.admin,a=i.connectURL,o=i.adminRoot,c=r.setup.needReauthenticate,s=I(r)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},u=Object(f.a)(o,E({page:t&&n&&s?s:"googlesitekit-dashboard",slug:t,reAuth:n},l));if(!c)return u;var d=encodeURIComponent(Object(p.a)(u));return u=o+"?"+d,Object(f.a)(a,{redirect:u,status:n})},R=function(t,n){var r=e.googlesitekit.admin.adminRoot;return t||(t="googlesitekit-dashboard"),n=E({page:t},n),Object(f.a)(r,n)},L=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},M=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},U=function(e,t,n){return e.setModuleActive(t,n).then((function(e){var n=I();return n[t]&&(n[t].active=e.active),Object(h.c)("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},F=function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.googlesitekit,o=I(a)[t],c=o.settings,s=o.setupComplete,l=i||document.getElementById("confirm-changes-".concat(t));if(s&&l){var d=!!Object.keys(n).find((function(e){var t=n[e];return!Object(u.isEqual)(r[e],c[t])}));return i||(l.disabled=!d),d}},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(d.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(b.b)(e,t),1)},q=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(u.unescape)(t)};function B(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e.googlesitekit){var c=r.createElement(m.a,{id:t,width:i,height:a,className:o});return n?c=r.createElement(m.a,{id:"".concat(t,"-disabled"),width:i,height:a,className:o}):"pagespeed-insights"===t&&(c=r.createElement("img",{src:e.googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:o})),c}}function G(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,r=n.blogPrefix;return n.isNetworkMode?t:r+t}}).call(this,n(16),n(10))},30:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(18),g=n.n(d),f=n(9),p=n.n(f),m=n(1),h=n(2),b=n.n(h),v=n(15),k=n.n(v),_=n(107),y=n(63),O=n(59),E=function(t){function DataBlock(e){var t;return i()(this,DataBlock),(t=s()(this,u()(DataBlock).call(this,e))).handleClick=t.handleClick.bind(g()(t)),t.handleKeyPress=t.handleKeyPress.bind(g()(t)),t}return p()(DataBlock,t),o()(DataBlock,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,n=t.stat,r=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||r(n)}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.title,i=t.datapoint,a=t.datapointUnit,o=t.change,c=t.changeDataUnit,s=t.context,l=t.period,u=t.selected,d=t.handleStatSelection,g=t.source,f=t.sparkline,p=t.invertChangeColor,h="button"===s?"button":"",b=f;return b&&p&&(b=Object(m.d)(f,{invertChangeColor:p})),e.createElement("div",{className:k()("googlesitekit-data-block",n,"googlesitekit-data-block--".concat(s),{"googlesitekit-data-block--selected":u}),tabIndex:"button"===s?"0":"-1",role:d&&h,onClick:d&&this.handleClick,onKeyPress:d&&this.handleKeyPress,"aria-label":d&&r,"aria-pressed":d&&u},e.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},r),e.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(i).concat(a))),b&&e.createElement("div",{className:"googlesitekit-data-block__sparkline"},b),e.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},e.createElement("div",{className:"googlesitekit-data-block__change"},""===o&&e.createElement(m.b,null," "),o&&e.createElement(m.b,null,e.createElement("span",{className:"googlesitekit-data-block__arrow"},e.createElement(_.a,{direction:0<parseFloat(o)?"up":"down",invertColor:p})),e.createElement("span",{className:"googlesitekit-data-block__value"},"".concat(Object(y.b)(Math.abs(o))).concat(c," ").concat(l)))),g&&e.createElement(O.a,{className:"googlesitekit-data-block__source",name:g.name,href:g.link})))}}]),DataBlock}(m.a);E.propTypes={stat:b.a.number,onClick:b.a.func,className:b.a.string,title:b.a.string,datapoint:b.a.oneOfType([b.a.string,b.a.number]),datapointUnit:b.a.string,change:b.a.oneOfType([b.a.string,b.a.number]),changeDataUnit:b.a.string,context:b.a.string,period:b.a.string,selected:b.a.bool,handleStatSelection:b.a.func,invertChangeColor:b.a.bool},E.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,invertChangeColor:!1},t.a=E}).call(this,n(10))},31:function(e,t,n){"use strict";(function(e,r){n(1);var i=n(2),a=n.n(i),o=n(15),c=n.n(o),s=function SvgIcon(t){var n=t.id,i=t.className,a=t.height,o=t.width,s="".concat(e.googlesitekit.admin.assetsRoot,"svg/svg.svg");return r.createElement("svg",{className:c()("svg",i),height:a,width:o},r.createElement("use",{xlinkHref:"".concat(s,"#").concat(n)}))};s.propTypes={id:a.a.string.isRequired,className:a.a.string,height:a.a.string,width:a.a.string},s.defaultProps={className:"",height:20,width:20},t.a=s}).call(this,n(16),n(10))},310:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return C}));var i=n(51),a=n.n(i),o=n(5),c=n.n(o),s=n(6),l=n.n(s),u=n(7),d=n.n(u),g=n(8),f=n.n(g),p=n(9),m=n.n(p),h=n(4),b=n.n(h),v=n(1),k=n(0),_=n(2),y=n.n(_),O=n(103),E=n(41),w=n(122),j=n(13),N=n(26),S=[function(){var t;return b.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.location.hostname,!["localhost","127.0.0.1"].includes(t)&&!t.match(/\.(example|invalid|localhost|test)$/)){n.next=3;break}throw"invalid_hostname";case 3:case"end":return n.stop()}}))},function(){var e,t,n;return b.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b.a.awrap(j.c.set(j.a,"site","setup-tag"));case 2:return e=r.sent,t=e.token,r.next=6,b.a.awrap(Object(w.a)("setup").catch((function(){throw"tag_fetch_failed"})));case 6:if(n=r.sent,t===n){r.next=9;break}throw"setup_token_mismatch";case 9:case"end":return r.stop()}}))}],C=function(t){function CompatibilityChecks(t){var n;c()(this,CompatibilityChecks);var r=e.googlesitekit.setup.isSiteKitConnected;return(n=d()(this,f()(CompatibilityChecks).call(this,t))).state={complete:r,error:null,developerPlugin:{}},n}return m()(CompatibilityChecks,t),l()(CompatibilityChecks,[{key:"componentDidMount",value:function(){var e,t,n,r;return b.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(!this.state.complete){i.next=2;break}return i.abrupt("return");case 2:i.prev=2,e=0,t=S;case 4:if(!(e<t.length)){i.next=11;break}return n=t[e],i.next=8,b.a.awrap(n());case 8:e++,i.next=4;break;case 11:i.next=19;break;case 13:return i.prev=13,i.t0=i.catch(2),i.next=17,b.a.awrap(j.c.get(j.a,"site","developer-plugin"));case 17:r=i.sent,this.setState({error:i.t0,developerPlugin:r});case 19:this.setState({complete:!0});case 20:case"end":return i.stop()}}),null,this,[[2,13]])}},{key:"helperCTA",value:function(){var e=this.state.developerPlugin,t=e.installed,n=e.active,r=e.installURL,i=e.activateURL,a=e.configureURL;return!t&&r?{labelHTML:Object(k.__)('Install<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:r,external:!1}:t&&!n&&i?{labelHTML:Object(k.__)('Activate<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:i,external:!1}:t&&n&&a?{labelHTML:Object(k.__)('Configure<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:a,external:!1}:{labelHTML:Object(k.__)('Learn how<span class="screen-reader-text"> to install and use the helper plugin</span>',"google-site-kit"),href:"https://sitekit.withgoogle.com/documentation/using-site-kit-on-a-staging-environment/",external:!0}}},{key:"renderError",value:function(e){var t=this.state.developerPlugin.installed,n=this.helperCTA(),i=n.labelHTML,a=n.href,o=n.external;switch(e){case"invalid_hostname":case"tag_fetch_failed":return r.createElement(v.b,null,!t&&Object(k.__)("Looks like this may be a staging environment. If so, you’ll need to install a helper plugin and verify your production site in Search Console.","google-site-kit"),t&&Object(k.__)("Looks like this may be a staging environment and you already have the helper plugin. Before you can use Site Kit, please make sure you’ve provided the necessary credentials in the Authentication section and verified your production site in Search Console.","google-site-kit")," ",r.createElement(N.a,{href:a,dangerouslySetInnerHTML:{__html:i},external:o,inherit:!0}));case"setup_token_mismatch":return Object(k.__)("Looks like you may be using a caching plugin which could interfere with setup. Please deactivate any caching plugins before setting up Site Kit. You may reactivate them once setup has been completed.","google-site-kit")}}},{key:"render",value:function(){var e,t,n=this.state,i=n.complete,o=n.error,c=this.props,s=c.children,l=a()(c,["children"]);return o&&(e=r.createElement(v.b,null,r.createElement("div",{className:"googlesitekit-setup-compat mdc-layout-grid mdc-layout-grid--align-left"},r.createElement("div",{className:"mdc-layout-grid__inner"},r.createElement(O.a,null),r.createElement("div",{className:"googlesitekit-heading-4 mdc-layout-grid__cell--span-11"},Object(k.__)("Your site may not be ready for Site Kit","google-site-kit"))),r.createElement("p",null,this.renderError(o))))),i||(t=r.createElement("div",{style:{alignSelf:"center",marginLeft:"1rem"}},r.createElement("small",null,Object(k.__)("Checking Compatibility…","google-site-kit")),r.createElement(E.a,{small:!0,compress:!0}))),s({restProps:l,complete:i,error:o,inProgressFeedback:t,CTAFeedback:e})}}]),CompatibilityChecks}(v.a);C.propTypes={children:y.a.func.isRequired}}).call(this,n(16),n(10))},32:function(e,t,n){"use strict";var r=n(85),i=n.n(r);n.d(t,"k",(function(){return i.a})),n.d(t,"a",(function(){return r.HelperText})),n.d(t,"b",(function(){return r.Input}));var a=n(142);n.d(t,"g",(function(){return a.a}));var o=n(219);n.d(t,"e",(function(){return o.a}));var c=n(105),s=n.n(c);n.d(t,"j",(function(){return s.a})),n.d(t,"i",(function(){return c.Option}));var l=n(218);n.d(t,"h",(function(){return l.a}));var u=n(215);n.d(t,"d",(function(){return u.a}));var d=n(216);n.d(t,"c",(function(){return d.a}));var g=n(214);n.d(t,"f",(function(){return g.a}))},34:function(e,t,n){"use strict";(function(e){var r=n(14),i=n.n(r),a=n(4),o=n.n(a),c=n(5),s=n.n(c),l=n(6),u=n.n(l),d=n(7),g=n.n(d),f=n(8),p=n.n(f),m=n(18),h=n.n(m),b=n(9),v=n.n(b),k=n(1),_=n(2),y=n.n(_),O=n(15),E=n.n(O),w=n(11),j=n(31),N=n(58),S=n(28),C=n(30),x=n(36),T=n(103),D=n(108),A=n(26),I=function(t){function Notification(e){var t;return s()(this,Notification),(t=g()(this,p()(Notification).call(this,e))).state={isClosed:!1},t.cardRef=Object(k.h)(),t.handleDismiss=t.handleDismiss.bind(h()(t)),t.handleCTAClick=t.handleCTAClick.bind(h()(t)),0<t.props.dismissExpires&&t.expireDismiss(),t.props.showOnce&&Object(S.e)("notification::displayed::".concat(t.props.id),new Date),t}return v()(Notification,t),u()(Notification,[{key:"handleDismiss",value:function(e){var t;return o.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.persist(),e.preventDefault(),!(t=this.props.onDismiss)){n.next=6;break}return n.next=6,o.a.awrap(t(e));case 6:this.dismiss();case 7:case"end":return n.stop()}}),null,this)}},{key:"dismiss",value:function(){var e=this,t=this.cardRef.current;this.setState({isClosed:!0}),setTimeout((function(){Object(S.e)("notification::dismissed::".concat(e.props.id),new Date),t.style.display="none";var n=new Event("notificationDismissed");document.dispatchEvent(n)}),350)}},{key:"handleCTAClick",value:function(e){var t,n,r;return o.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.persist(),t=this.props,n=t.isDismissable,!(r=t.onCTAClick)){i.next=5;break}return i.next=5,o.a.awrap(r(e));case 5:n&&this.dismiss();case 6:case"end":return i.stop()}}),null,this)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,r=Object(S.b)("notification::dismissed::".concat(t));if(r){var i=new Date(r);i.setSeconds(i.getSeconds()+parseInt(n,10)),i<new Date&&Object(S.a)("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var t,n=this.state.isClosed,r=this.props,a=r.children,o=r.id,c=r.title,s=r.description,l=r.blockData,u=r.winImage,d=r.smallImage,g=r.format,f=r.learnMoreURL,p=r.learnMoreDescription,m=r.learnMoreLabel,h=r.ctaLink,b=r.ctaLabel,v=r.ctaTarget,_=r.type,y=r.dismiss,O=r.isDismissable,I=r.logo,P=r.module,R=r.moduleName,L=r.pageIndex;if(Object(S.b)("notification::dismissed::".concat(o)))return null;var M,U=n?"is-closed":"is-open",F="large"===g&&"win-stats-increase"===_,H="mdc-layout-grid__cell--span-12";"large"===g?(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",F&&(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===g&&(H="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),M="win-warning"===_?e.createElement(T.a,null):"win-error"===_?e.createElement(D.a,null):"";var q=e.createElement(k.b,null,l&&e.createElement("div",{className:"mdc-layout-grid__inner"},Object(w.map)(l,(function(t,n){return e.createElement("div",{key:n,className:E()("mdc-layout-grid__cell",{"mdc-layout-grid__cell--span-5-desktop":F,"mdc-layout-grid__cell--span-4-desktop":!F})},e.createElement("div",{className:"googlesitekit-publisher-win__stats"},e.createElement(C.a,t)))})))),B=e.createElement(k.b,null,c&&e.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},c),s&&e.createElement("div",{className:"googlesitekit-publisher-win__desc"},e.createElement("p",null,Object(k.i)(s)?s:e.createElement("span",{dangerouslySetInnerHTML:Object(N.a)(s,{ALLOWED_TAGS:["strong","em","br","a"],ALLOWED_ATTR:["href"]})}),m&&e.createElement(k.b,null," ",e.createElement(A.a,{href:f,external:!0,inherit:!0},m),p),L&&e.createElement("span",{className:"googlesitekit-publisher-win__detect"},L))),a),G=P?e.createElement(j.a,{id:P,height:"19",width:"19"}):e.createElement(j.a,{id:"logo-g",height:"34",width:"32"});return e.createElement("section",{ref:this.cardRef,className:E()("googlesitekit-publisher-win",(t={},i()(t,"googlesitekit-publisher-win--".concat(g),g),i()(t,"googlesitekit-publisher-win--".concat(_),_),i()(t,"googlesitekit-publisher-win--".concat(U),U),t))},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},I&&e.createElement("div",{className:E()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",{"mdc-layout-grid__cell--order-2-phone":F,"mdc-layout-grid__cell--order-1-tablet":F})},e.createElement("div",{className:"googlesitekit-publisher-win__logo"},G),R&&e.createElement("div",{className:"googlesitekit-publisher-win__module-name"},R)),d&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:d})),e.createElement("div",{className:E()("mdc-layout-grid__cell",H)},F?e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},B),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},q)):e.createElement(k.b,null,B,q),h&&e.createElement(x.a,{href:h,target:v,onClick:this.handleCTAClick},b),O&&y&&e.createElement(A.a,{onClick:this.handleDismiss},y)),u&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement("div",{className:"googlesitekit-publisher-win__image-large"},e.createElement("img",{alt:"",src:u}))),("win-error"===_||"win-warning"===_)&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("div",{className:"googlesitekit-publisher-win__icons"},M)))))}}]),Notification}(k.a);I.propTypes={id:y.a.string.isRequired,title:y.a.string.isRequired,description:y.a.node,learnMoreURL:y.a.string,learnMoreDescription:y.a.string,learnMoreLabel:y.a.string,blockData:y.a.array,winImage:y.a.string,smallImage:y.a.string,format:y.a.string,ctaLink:y.a.string,ctaLabel:y.a.string,type:y.a.string,dismiss:y.a.string,isDismissable:y.a.bool,logo:y.a.bool,module:y.a.string,moduleName:y.a.string,pageIndex:y.a.string,dismissExpires:y.a.number,showOnce:y.a.bool,onCTAClick:y.a.func,onDismiss:y.a.func},I.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1},t.a=I}).call(this,n(10))},36:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(15),b=n.n(h),v=n(32),k=function(t){function Button(e){var t;return i()(this,Button),(t=s()(this,u()(Button).call(this,e))).buttonRef=Object(f.h)(),t}return g()(Button,t),o()(Button,[{key:"componentDidMount",value:function(){new v.g(this.buttonRef.current)}},{key:"render",value:function(){var t=this.props,n=t.onClick,r=t.children,i=t.href,a=t.text,o=t.className,c=t.danger,s=t.disabled,l=t.target,u=t.id,d=t.icon,g=t.trailingIcon,f=t.ariaHaspopup,p=t.ariaExpanded,m=t.ariaControls,h=i&&!s?"a":"button";return e.createElement(h,{className:b()("mdc-button",o,{"mdc-button--raised":!a,"mdc-button--danger":c}),onClick:n,href:s?void 0:i,ref:this.buttonRef,disabled:!!s,target:l||"_self",id:u,"aria-haspopup":f,"aria-expanded":p,"aria-controls":m},d&&d,e.createElement("span",{className:"mdc-button__label"},r),g&&g)}}]),Button}(f.a);k.propTypes={onClick:m.a.func,children:m.a.string.isRequired,href:m.a.string,text:m.a.bool,className:m.a.string,danger:m.a.bool,disabled:m.a.bool,icon:m.a.element,trailingIcon:m.a.element,ariaHaspopup:m.a.string,ariaExpanded:m.a.bool,ariaControls:m.a.string},k.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=k}).call(this,n(10))},360:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return k}));var i=n(5),a=n.n(i),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(0),h=n(3),b=n(361),v=n(231),k=function(t){function ActivationApp(){return a()(this,ActivationApp),l()(this,d()(ActivationApp).apply(this,arguments))}return f()(ActivationApp,t),c()(ActivationApp,[{key:"render",value:function(){var t=e._googlesitekitBaseData,n=t.proxySetupURL,i=t.splashURL,a=e.googlesitekit.permissions.canViewDashboard,o=e.googlesitekit.dashboardPermalink,c=n||i,s=Object(m.__)("Start setup","google-site-kit");return a&&(c=o,s=Object(m.__)("Go to Dashboard","google-site-kit")),r.createElement(p.b,null,r.createElement(v.a,null),r.createElement(b.a,{buttonURL:c,buttonLabel:s,onButtonClick:function(){Object(h.x)("plugin_setup",n?"proxy_start_setup_banner":"goto_sitekit")}}))}}]),ActivationApp}(p.a)}).call(this,n(16),n(10))},361:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ActivationMain}));var r=n(1),i=n(0),a=n(2),o=n.n(a),c=n(36),s=n(128),l=n(242),u=n(310);function ActivationMain(t){var n=t.buttonURL,a=t.onButtonClick,o=t.buttonLabel;return e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(s.a,null),e.createElement("h3",{className:"googlesitekit-heading-3 googlesitekit-activation__title"},Object(i.__)("Congratulations, the Site Kit plugin is now activated.","google-site-kit")),e.createElement(u.a,null,(function(t){var i=t.complete,s=t.inProgressFeedback,u=t.CTAFeedback;return e.createElement(r.b,null,u,e.createElement(l.a,{optinAction:"analytics_optin_setup_banner"}),e.createElement("div",{className:"googlesitekit-start-setup-wrap"},e.createElement(c.a,{id:"start-setup-link",className:"googlesitekit-start-setup",href:n,onClick:a,disabled:!i},o),s))})))))}ActivationMain.propTypes={buttonURL:o.a.string.isRequired,onButtonClick:o.a.func,buttonLabel:o.a.string.isRequired}}).call(this,n(10))},38:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r="_googlesitekitDataLayer",i="data-googlesitekit-gtag"},41:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(15),b=n.n(h),v=function(t){function ProgressBar(){return i()(this,ProgressBar),s()(this,u()(ProgressBar).apply(this,arguments))}return g()(ProgressBar,t),o()(ProgressBar,[{key:"render",value:function(){var t=this.props,n=t.className,r=t.small,i=t.compress,a=t.height,o=a?Math.round(a/2):null;return e.createElement("div",{role:"progressbar",style:{marginTop:o,marginBottom:o},className:b()("mdc-linear-progress","mdc-linear-progress--indeterminate",n,{"mdc-linear-progress--small":r,"mdc-linear-progress--compress":i})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),ProgressBar}(f.a);v.propTypes={className:m.a.string,small:m.a.bool,compress:m.a.bool},v.defaultProps={className:"",small:!1,compress:!1},t.a=v}).call(this,n(10))},42:function(e,t){e.exports=googlesitekit.api},44:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r,i=n(5),a=n.n(i),o=n(6),c=n.n(o),s=function(t){var n=e[t];if(!n)return!1;try{var r="__storage_test__";return n.setItem(r,r),n.removeItem(r),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==n.length}},l=function(){function NullStorage(){a()(this,NullStorage)}return c()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),u=function(){return r||(r=s("sessionStorage")?e.sessionStorage:s("localStorage")?e.localStorage:new l),r}}).call(this,n(16))},45:function(e,t,n){"use strict";function r(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function a(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},50:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return u}));var r=n(81),i=e._googlesitekitBaseData||{},a={isFirstAdmin:i.isFirstAdmin,trackingEnabled:i.trackingEnabled,trackingID:i.trackingID,referenceSiteURL:i.referenceSiteURL,userIDHash:i.userIDHash},o=Object(r.a)(a),c=o.enableTracking,s=o.disableTracking,l=o.isTrackingEnabled,u=o.trackEvent;function d(e){e?c():s()}d(l())}).call(this,n(16))},52:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var r=n(12),i=n(0);function a(){var e=Object(r.c)("googlesitekit.dateRange","last-28-days").match(/last-(\d+)-days/);if(e&&e[1])return Object(i.sprintf)(
|
12 |
-
/* translators: %s: Number of days matched. */
|
13 |
-
Object(i._n)("%s day","%s days",parseInt(e[1],10),"google-site-kit"),e[1]);throw new Error("Unrecognized date range slug used in `googlesitekit.dateRange`.")}function o(){return Object(r.c)("googlesitekit.dateRange","last-28-days")}},533:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1),r=n(201),i=n(3),a=(n(205),n(360)),o=n(129);Object(r.a)((function(){var n=document.getElementById("js-googlesitekit-activation");n&&(Object(i.o)(),Object(i.x)("plugin_setup","plugin_activated"),Object(t.k)(e.createElement(o.a,{dataAPIContext:"Activation"},e.createElement(a.a,null)),n),n.classList.remove("googlesitekit-activation--loading"))}))}.call(this,n(10))},54:function(e,t,n){"use strict";(function(e){var r=n(27),i=n.n(r),a=e._googlesitekitAPIFetchData||{},o=a.nonce,c=a.nonceEndpoint,s=a.preloadedData,l=a.rootURL;i.a.nonceEndpoint=c,i.a.nonceMiddleware=i.a.createNonceMiddleware(o),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(l),i.a.preloadingMiddleware=i.a.createPreloadingMiddleware(s),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),t.default=i.a}).call(this,n(16))},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(38);function i(e){return function(){e[r.a]=e[r.a]||[],e[r.a].push(arguments)}}},56:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(37),i=n.n(r),a=n(0),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(r&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var s=document.createElement("span");return s.setAttribute("class","screen-reader-text"),s.textContent=Object(a.sprintf)(
|
14 |
/* translators: %d is the number of notifications */
|
15 |
-
Object(a._n)("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(c),o.appendChild(s),t&&null===r&&t.appendChild(o),n&&null===i&&n.appendChild(o),o},c=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},s=function(e){for(var t=location.search.substr(1).split("&"),n={},r=0;r<t.length;r++)n[t[r].split("=")[0]]=decodeURIComponent(t[r].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):s(e);var r={},a=!0,o=!1,c=void 0;try{for(var l,u=n.searchParams.entries()[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var d=i()(l.value,2),g=d[0],f=d[1];r[g]=f}}catch(e){o=!0,c=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw c}}return r}}).call(this,n(16))},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(90),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:r.a.sanitize(e,t)}}},59:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(15),b=n.n(h),v=n(0),k=n(26),_=function(t){function SourceLink(){return i()(this,SourceLink),s()(this,u()(SourceLink).apply(this,arguments))}return g()(SourceLink,t),o()(SourceLink,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.href,i=t.className,a=t.external;return e.createElement("div",{className:b()("googlesitekit-source-link",i)},[Object(v.__)("Source:","google-site-kit")," ",e.createElement(k.a,{key:"link",href:r,external:a,inherit:!0},n)])}}]),SourceLink}(f.a);_.propTypes={name:m.a.string,href:m.a.string,className:m.a.string,external:m.a.bool},_.defaultProps={name:"",href:"",className:"",external:!1},t.a=_}).call(this,n(10))},62:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(35),i=n.n(r),a=n(120),o=n.n(a),c=function(e){return o()(JSON.stringify(function e(t){var n={};Object.keys(t).sort().forEach((function(r){var a=t[r];a&&"object"===i()(a)&&!Array.isArray(a)&&(a=e(a)),n[r]=a}));return n}(e)))}},63:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(51),i=n.n(r),a=n(11),o=n(0);function c(){Object(o.setLocaleData)(e.googlesitekit.locale,"google-site-kit")}var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?l():n,a=i()(t,["locale"]);return new Intl.NumberFormat(r,a).format(e)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(a.get)(t,["googlesitekit","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,n(16))},64:function(e,t,n){"use strict";(function(e){n.d(t,"g",(function(){return g})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return k})),n.d(t,"a",(function(){return _}));var r=n(4),i=n.n(r),a=n(12),o=n(11),c=n(3),s=n(147),l=n(13),u=n(28),d=Object(a.c)("googlesitekit.winCallbacks",{}),g=function(){return Object(a.c)("googlesitekit.WinsNotificationsRequest",[])},f=function(){return Object(a.c)("googlesitekit.ModulesNotificationsRequest",[])};function p(){var t,n,r,o;return i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if((t=e.googlesitekit.setup).isSiteKitConnected&&(t.isAuthenticated||t.isVerified)){c.next=3;break}return c.abrupt("return",0);case 3:return n=0,c.next=6,i.a.awrap(b());case 6:return(r=c.sent)&&r.total&&(n+=r.total),c.next=10,i.a.awrap(v());case 10:return(o=c.sent)&&o.total&&(n+=o.total),n=Object(a.c)("googlesitekit.TotalNotifications",n),n=Math.max(0,Math.abs(n)),e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),c.abrupt("return",n);case 16:case"end":return c.stop()}}))}var m=function(e){return e?e.length?e.filter((function(e){return!Object(u.b)("notification::dismissed::".concat(e.id))})):e:[]},h=function(e){var t=function(e){return Object.keys(e).slice(0,1).map((function(t){return e[t]}))};if(1>=Object.keys(e).length)return e;var n=Object.values(e).filter((function(e){var t=Object(u.b)("notification::displayed::".concat(e[0].id));if(t){var n=new Date(t),r=new Date,i=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()));if(n.setHours(0,0,0),i.setHours(0,0,0),n.getTime()===i.getTime())return!0;7<=Object(c.h)(n,i)&&Object(u.a)("notification::displayed::".concat(e[0].id))}return null===t})),r=null,i=[];return 0<Object.keys(n).length?(r=t(n),i[Object.keys(n)[0]]=r):(r=t(e),i[Object.keys(e)[0]]=r)};function b(){var e,t,n,r;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return e={},t=0,a.next=4,i.a.awrap(f());case 4:return n=a.sent,r=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,r;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return n=e.identifier,a.t0=m,a.next=4,i.a.awrap(l.c.get(l.b,n,"notifications",{},!1));case 4:a.t1=a.sent,r=(0,a.t0)(a.t1),t({identifier:n,notifications:r});case 7:case"end":return a.stop()}}))})),r.push(t);case 2:case"end":return n.stop()}}))})),a.next=9,i.a.awrap(Promise.all(r).then((function(n){n.forEach((function(n){n.notifications.length&&(t+=n.notifications.length,e[n.identifier]=n.notifications)}))})));case 9:return a.abrupt("return",{results:e,total:t});case 10:case"end":return a.stop()}}))}function v(){var e,t,n,r,a;return i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return e={},t=0,c.next=4,i.a.awrap(g());case 4:return n=c.sent,c.next=7,i.a.awrap(new s.a(n).get());case 7:return r=c.sent,a=[],n.map((function(e){var t;return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,a,c,s,l;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:n=e.identifier,a=e.callback||Object(o.camelCase)(n),c=null,s=[],e.withData?(l=r[n]||null,c=d[a](l,n)):c=d[a](n),s=m(s=c?[c]:[]),t({identifier:n,notifications:s});case 8:case"end":return i.stop()}}))})),a.push(t);case 2:case"end":return n.stop()}}))})),c.next=12,i.a.awrap(Promise.all(a).then((function(t){t.forEach((function(t){t.notifications.length&&(e[t.identifier]=t.notifications)}))})));case 12:return e=h(e),t=e.length||Object.keys(e).length||0,c.abrupt("return",{results:e,total:t});case 15:case"end":return c.stop()}}))}var k=function(t){var n=Math.abs(t.count)+1;return e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),{count:n}},_=function(t){var n=Math.max(0,Math.abs(t.count)-1);return e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),{count:n}}}).call(this,n(16))},67:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return f}));var r,i=n(4),a=n.n(i),o=(n(73),["localStorage","sessionStorage"]),c=[].concat(o),s=function(t){var n,r;return a.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=e[t]){i.next=3;break}return i.abrupt("return",!1);case 3:return i.prev=3,r="__storage_test__",n.setItem(r,r),n.removeItem(r),i.abrupt("return",!0);case 10:return i.prev=10,i.t0=i.catch(3),i.abrupt("return",i.t0 instanceof DOMException&&(22===i.t0.code||1014===i.t0.code||"QuotaExceededError"===i.t0.name||"NS_ERROR_DOM_QUOTA_REACHED"===i.t0.name)&&0!==n.length);case 13:case"end":return i.stop()}}),null,null,[[3,10]])},l=function(){var t,n,i,o,l,u;return a.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(!(e.googlesitekit&&e.googlesitekit.admin&&e.googlesitekit.admin.nojscache)){d.next=2;break}return d.abrupt("return",null);case 2:if(void 0!==r){d.next=34;break}t=!0,n=!1,i=void 0,d.prev=6,o=c[Symbol.iterator]();case 8:if(t=(l=o.next()).done){d.next=19;break}if(u=l.value,!r){d.next=12;break}return d.abrupt("continue",16);case 12:return d.next=14,a.a.awrap(s(u));case 14:if(!d.sent){d.next=16;break}r=e[u];case 16:t=!0,d.next=8;break;case 19:d.next=25;break;case 21:d.prev=21,d.t0=d.catch(6),n=!0,i=d.t0;case 25:d.prev=25,d.prev=26,t||null==o.return||o.return();case 28:if(d.prev=28,!n){d.next=31;break}throw i;case 31:return d.finish(28);case 32:return d.finish(25);case 33:void 0===r&&(r=null);case 34:return d.abrupt("return",r);case 35:case"end":return d.stop()}}),null,null,[[6,21,25,33],[26,,28,32]])},u=function(e){var t,n,r,i,o=arguments;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:null,c.next=3,a.a.awrap(l());case 3:if(!(n=c.sent)){c.next=10;break}if(!(r=n.getItem("".concat("googlesitekit_").concat(e)))){c.next=10;break}if(!(i=JSON.parse(r)).timestamp||!(null===t||Math.round(Date.now()/1e3)-i.timestamp<t)){c.next=10;break}return c.abrupt("return",{cacheHit:!0,value:i.value});case 10:return c.abrupt("return",{cacheHit:!1,value:void 0});case 11:case"end":return c.stop()}}))},d=function(t,n){var r,i,o=arguments;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:void 0,c.next=3,a.a.awrap(l());case 3:if(!(i=c.sent)){c.next=14;break}return c.prev=5,i.setItem("".concat("googlesitekit_").concat(t),JSON.stringify({timestamp:r||Math.round(Date.now()/1e3),value:n})),c.abrupt("return",!0);case 10:return c.prev=10,c.t0=c.catch(5),e.console.warn("Encountered an unexpected storage error:",c.t0),c.abrupt("return",!1);case 14:return c.abrupt("return",!1);case 15:case"end":return c.stop()}}),null,null,[[5,10]])},g=function(t){var n;return a.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,a.a.awrap(l());case 2:if(!(n=r.sent)){r.next=13;break}return r.prev=4,n.removeItem("".concat("googlesitekit_").concat(t)),r.abrupt("return",!0);case 9:return r.prev=9,r.t0=r.catch(4),e.console.warn("Encountered an unexpected storage error:",r.t0),r.abrupt("return",!1);case 13:return r.abrupt("return",!1);case 14:case"end":return r.stop()}}),null,null,[[4,9]])},f=function(){var t,n,r,i;return a.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,a.a.awrap(l());case 2:if(!(t=o.sent)){o.next=14;break}for(o.prev=4,n=[],r=0;r<t.length;r++)0===(i=t.key(r)).indexOf("googlesitekit_")&&n.push(i.substring("googlesitekit_".length));return o.abrupt("return",n);case 10:return o.prev=10,o.t0=o.catch(4),e.console.warn("Encountered an unexpected storage error:",o.t0),o.abrupt("return",[]);case 14:return o.abrupt("return",[]);case 15:case"end":return o.stop()}}),null,null,[[4,10]])}}).call(this,n(16))},77:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(34),m=function(t){function GenericError(){return i()(this,GenericError),s()(this,u()(GenericError).apply(this,arguments))}return g()(GenericError,t),o()(GenericError,[{key:"render",value:function(){return e.createElement(p.a,this.props)}}]),GenericError}(f.a);t.a=m}).call(this,n(10))},78:function(e,t,n){"use strict";var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(65),p=function(e){function ModuleSettingsWarning(){return i()(this,ModuleSettingsWarning),s()(this,u()(ModuleSettingsWarning).apply(this,arguments))}return g()(ModuleSettingsWarning,e),o()(ModuleSettingsWarning,[{key:"render",value:function(){return null}}]),ModuleSettingsWarning}(n(1).a);t.a=Object(f.a)("googlesitekit.ModuleSettingsWarning")(p)},79:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return k})),n.d(t,"b",(function(){return _}));var r=n(51),i=n.n(r),a=n(14),o=n.n(a),c=n(4),s=n.n(c),l=n(21),u=n.n(l),d=n(17),g=n.n(d),f=n(67);function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=g.a.createRegistryControl,b=function(e){var t;u()(e,"storeName is required to create a snapshot store.");var n={},r={deleteSnapshot:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})),restoreSnapshot:s.a.mark((function e(){var t,n,r,i,a,o,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},n=t.clearAfterRestore,r=void 0===n||n,e.next=3,{payload:{},type:"RESTORE_SNAPSHOT"};case 3:if(i=e.sent,a=i.cacheHit,o=i.value,!a){e.next=12;break}return e.next=9,{payload:{snapshot:o},type:"SET_STATE_FROM_SNAPSHOT"};case 9:if(!r){e.next=12;break}return e.next=12,{payload:{},type:"DELETE_SNAPSHOT"};case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)})),createSnapshot:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"CREATE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))},a=(t={},o()(t,"DELETE_SNAPSHOT",(function(){return Object(f.a)("datastore::cache::".concat(e))})),o()(t,"CREATE_SNAPSHOT",h((function(t){return function(){return Object(f.d)("datastore::cache::".concat(e),t.stores[e].store.getState())}}))),o()(t,"RESTORE_SNAPSHOT",(function(){return Object(f.b)("datastore::cache::".concat(e),3600)})),t);return{INITIAL_STATE:n,actions:r,controls:a,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0,r=t.type,a=t.payload;switch(r){case"SET_STATE_FROM_SNAPSHOT":var o=a.snapshot,c=(o.error,i()(o,["error"]));return m({},c);default:return m({},e)}}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Object.values(e.stores).filter((function(e){return Object.keys(e.getActions()).includes("restoreSnapshot")}))},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().createSnapshot()})))},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().restoreSnapshot()})))}},81:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(14),i=n.n(r),a=n(82),o=n(83);function c(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var s={isFirstAdmin:!1,trackingEnabled:!1,trackingID:"",referenceSiteURL:"",userIDHash:""};function l(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s,{},t);return r.referenceSiteURL&&(r.referenceSiteURL=r.referenceSiteURL.toString().replace(/\/+$/,"")),{enableTracking:Object(a.a)(r,n),disableTracking:function(){r.trackingEnabled=!1},isTrackingEnabled:function(){return!!r.trackingEnabled},trackEvent:Object(o.a)(r,n)}}}).call(this,n(16))},82:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(55),i=n(38);function a(t,n){var a=Object(r.a)(n);return function(){t.trackingEnabled=!0;var n=e.document;if(!n.querySelector("script[".concat(i.b,"]"))){var r=n.createElement("script");r.setAttribute(i.b,""),r.async=!0,r.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(i.a),n.head.appendChild(r),a("js",new Date),a("config",t.trackingID)}}}}).call(this,n(16))},83:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(55);function i(e,t){var n=Object(r.a)(t);return function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.isFirstAdmin,c=e.referenceSiteURL,s=e.trackingEnabled,l=e.trackingID,u=e.userIDHash;s&&n("event",r,{send_to:l,event_category:t,event_label:i,event_value:a,dimension1:c,dimension2:o?"true":"false",dimension3:u})}}},84:function(e,t,n){"use strict";(function(e,r){var i=n(37),a=n.n(i),o=(n(1),n(141)),c=n.n(o),s=n(0),l=n(17),u=n.n(l),d=n(34),g=n(3),f=n(25),p=u.a.useSelect,m={siteverification:"site-verification",webmasters:"search-console"};t.a=function DashboardAuthAlert(){var t,n,i,o,l,u=p((function(e){return e(f.b).getUnsatisfiedScopes()})),h=p((function(t){return t(f.b).getConnectURL({redirectURL:e.location.href})}));if(void 0===u||void 0===h)return null;switch(u.some((function(e){return!e.match(/^https:\/\/www.googleapis.com\/auth\//)}))?t="generic":(i=u,o=Object(g.j)(),t=(n=i.map((function(e){return e.match(/^https:\/\/www.googleapis.com\/auth\/([a-z]+)/)})).map((function(e){var t=a()(e,2)[1];return m[t]||t})).map((function(e){var t;return(null===(t=o[e])||void 0===t?void 0:t.name)||!1}))).some((function(e){return!1===e}))?"generic":1<(n=c()(n)).length?"multiple":"single"),t){case"multiple":
|
|
|
|
|
16 |
/* translators: used between list items, there is a space after the comma. */
|
17 |
var b=Object(s.__)(", ","google-site-kit");l=Object(s.sprintf)(
|
18 |
/* translators: %s: List of product names */
|
19 |
Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for: %s – make sure to approve all permissions at the authentication stage.","google-site-kit"),n.join(b));break;case"single":l=Object(s.sprintf)(
|
20 |
/* translators: %1$s: Product name */
|
21 |
-
Object(s.__)("Site Kit can’t access the relevant data from %1$s because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for %1$s – make sure to approve all permissions at the authentication stage.","google-site-kit"),n[0]);break;case"generic":l=Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup – make sure to approve all permissions at the authentication stage.","google-site-kit")}return r.createElement(d.a,{id:"authentication error",title:Object(s.__)("Site Kit can’t access necessary data","google-site-kit"),description:l,format:"small",type:"win-error",isDismissable:!1,ctaLink:h,ctaLabel:Object(s.__)("Redo setup","google-site-kit")})}}).call(this,n(16),n(10))},87:function(e,t,n){"use strict";n.d(t,"a",(function(){return f.b}));var r=n(17),i=n.n(r),a=n(14),o=n.n(a),c=n(4),s=n.n(c),l=n(21),u=n.n(l),d=n(42),g=n.n(d),f=n(25);function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=i.a.createRegistrySelector,b={authentication:void 0,isFetchingAuthentication:!1},v={fetchAuthentication:s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_AUTHENTICATION"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_AUTHENTICATION"};case 5:return t=e.sent,e.next=8,v.receiveAuthentication(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_AUTHENTICATION"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),n=e.t0,e.next=17,{payload:{error:n},type:"CATCH_FETCH_AUTHENTICATION"};case 17:return e.abrupt("return",{response:t,error:n});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveAuthentication:function(e){return u()(e,"authentication is required."),{payload:{authentication:e},type:"RECEIVE_AUTHENTICATION"}}},k=o()({},"FETCH_AUTHENTICATION",(function(){return g.a.get("core","user","authentication",void 0,{useCache:!1})})),_={getAuthentication:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.a.commonActions.getRegistry();case 2:if(t=e.sent,(0,t.select)(f.b).getAuthentication()){e.next=7;break}return e.next=7,v.fetchAuthentication();case 7:case"end":return e.stop()}}),e)}))},y={getAuthentication:function(e){return e.authentication},isAuthenticated:h((function(e){return function(){return(e(f.b).getAuthentication()||{}).authenticated}})),getGrantedScopes:h((function(e){return function(){return(e(f.b).getAuthentication()||{}).grantedScopes}})),getRequiredScopes:h((function(e){return function(){return(e(f.b).getAuthentication()||{}).requiredScopes}})),getUnsatisfiedScopes:h((function(e){return function(){return(e(f.b).getAuthentication()||{}).unsatisfiedScopes}}))},O={INITIAL_STATE:b,actions:v,controls:k,reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"START_FETCH_AUTHENTICATION":return m({},e,{isFetchingAuthentication:!0});case"RECEIVE_AUTHENTICATION":return m({},e,{authentication:r.authentication});case"FINISH_FETCH_AUTHENTICATION":return m({},e,{isFetchingAuthentication:!1});case"CATCH_FETCH_AUTHENTICATION":return m({},e,{error:r.error,isFetchingAuthentication:!1});default:return m({},e)}},resolvers:_,selectors:y};function E(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j={isFetchingDisconnect:!1,disconnected:void 0},N={disconnect:s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"START_FETCH_DISCONNECT"};case 2:return e.prev=2,e.next=5,{payload:{},type:"FETCH_DISCONNECT"};case 5:return t=e.sent,e.next=8,N.receiveDisconnected(t);case 8:return e.next=10,{payload:{},type:"FINISH_FETCH_DISCONNECT"};case 10:e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(2),n=e.t0,e.next=17,{payload:{error:n},type:"CATCH_FETCH_DISCONNECT"};case 17:return e.abrupt("return",{response:t,error:n});case 18:case"end":return e.stop()}}),e,null,[[2,12]])})),receiveDisconnected:function(e){return u()(void 0!==e,"disconnect is required."),{payload:{disconnected:e},type:"RECEIVE_DISCONNECT"}}},S=o()({},"FETCH_DISCONNECT",(function(){return g.a.set("core","user","disconnect")})),C={INITIAL_STATE:j,actions:N,controls:S,reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"START_FETCH_DISCONNECT":return w({},e,{isFetchingDisconnect:!0});case"RECEIVE_DISCONNECT":return w({},e,{disconnected:r.disconnected});case"FINISH_FETCH_DISCONNECT":return w({},e,{isFetchingDisconnect:!1});case"CATCH_FETCH_DISCONNECT":return w({},e,{error:r.error,isFetchingDisconnect:!1});default:return w({},e)}},resolvers:{},selectors:{isDoingDisconnect:function(e){return e.isFetchingDisconnect}}};function x(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var T={INITIAL_STATE:{error:void 0},actions:{},controls:{},reducer:function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)},resolvers:{},selectors:{getError:function(e){return e.error}}},D=n(101),A=Object(D.a)("core","user","notifications",{server:!1});function I(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R={INITIAL_STATE:{permissionError:null},actions:{clearPermissionScopeError:function(){return{payload:{},type:"CLEAR_PERMISSION_SCOPE_ERROR"}},setPermissionScopeError:function(e){return u()(e,"permissionError is required."),{payload:{permissionError:e},type:"SET_PERMISSION_SCOPE_ERROR"}}},controls:{},reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"CLEAR_PERMISSION_SCOPE_ERROR":return P({},e,{permissionError:null});case"SET_PERMISSION_SCOPE_ERROR":return P({},e,{permissionError:r.permissionError});default:return P({},e)}},resolvers:{},selectors:{getPermissionScopeError:function(e){return e.permissionError}}},L=n(126),M=i.a.combineStores(i.a.commonStore,O,C,T,A,R,L.a);M.INITIAL_STATE,M.actions,M.controls,M.reducer,M.resolvers,M.selectors;i.a.registerStore(f.b,M)},90:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(119),i=n.n(r)()(e)}).call(this,n(16))},92:function(e,t,n){"use strict";(function(e){var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(200),b=n.n(h),v=n(15),k=n.n(v),_=n(138),y=n(0),O=n(36),E=n(26),w=n(32),j=function(t){function Dialog(){var e;return i()(this,Dialog),(e=s()(this,u()(Dialog).call(this))).state={attributes:[Object(y.__)("Audience overview","google-site-kit"),Object(y.__)("Top pages","google-site-kit"),Object(y.__)("Top acquisition sources","google-site-kit"),Object(y.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(f.h)(),e}return g()(Dialog,t),o()(Dialog,[{key:"componentDidMount",value:function(){new w.d(this.dialogRef.current)}},{key:"render",value:function(){var t=this.props,n=t.dialogActive,r=t.handleDialog,i=t.title,a=t.provides,o=t.handleConfirm,c=t.subtitle,s=t.confirmButton,l=t.dependentModules,u=t.instanceId,d=t.danger,g="googlesitekit-dialog-label-".concat(u),f="googlesitekit-dialog-description-".concat(u),p=!(!a||!a.length);return e.createElement("div",{ref:this.dialogRef,className:k()("mdc-dialog",{"mdc-dialog--open":n}),role:"alertdialog","aria-modal":"true","aria-labelledby":i?g:void 0,"aria-describedby":p?f:void 0,"aria-hidden":n?"false":"true",tabIndex:"-1"},e.createElement("div",{className:"mdc-dialog__scrim"}," "),e.createElement(b.a,{active:n},e.createElement("div",null,e.createElement("div",{className:"mdc-dialog__container"},e.createElement("div",{className:"mdc-dialog__surface"},i&&e.createElement("h2",{id:g,className:"mdc-dialog__title"},i),c&&e.createElement("p",{className:"mdc-dialog__lead"},c),p&&e.createElement("section",{id:f,className:"mdc-dialog__content"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},a.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),l&&e.createElement("p",{className:"mdc-dialog__dependecies"},e.createElement("strong",null,Object(y.__)("Note: ","google-site-kit")),l),e.createElement("footer",{className:"mdc-dialog__actions"},e.createElement(O.a,{onClick:o,danger:d},s||Object(y.__)("Disconnect","google-site-kit")),e.createElement(E.a,{className:"mdc-dialog__cancel-button",onClick:function(){return r()},inherit:!0},Object(y.__)("Cancel","google-site-kit"))))))))}}]),Dialog}(f.a);j.propTypes={dialogActive:m.a.bool,handleDialog:m.a.func,handleConfirm:m.a.func.isRequired,title:m.a.string,description:m.a.string,confirmButton:m.a.string,danger:m.a.bool},j.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null,danger:!1},t.a=Object(_.a)(j)}).call(this,n(10))},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(5),i=n.n(r),a=n(6),o=n.n(a),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=function(e){function Modal(e){var t;return i()(this,Modal),(t=s()(this,u()(Modal).call(this,e))).el=document.createElement("div"),t.root=document.querySelector(".googlesitekit-plugin")||document.body,t}return g()(Modal,e),o()(Modal,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(f.g)(this.props.children,this.el)}}]),Modal}(f.a)},97:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(4),i=n.n(r),a=n(14),o=n.n(a),c=n(13);function s(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var t,n,r,a,o,s;return i.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,i.a.awrap(c.c.get(c.a,"user","authentication",{timestamp:Date.now()}));case 3:t=u.sent,n=t.authenticated,r=t.requiredScopes,a=t.grantedScopes,o=t.unsatisfiedScopes,s=void 0===o?[]:o,e.googlesitekit.setup=l({},e.googlesitekit.setup||{},{isAuthenticated:n,requiredScopes:r,grantedScopes:a,unsatisfiedScopes:s,needReauthenticate:0<s.length}),u.next=14;break;case 12:u.prev=12,u.t0=u.catch(0);case 14:case"end":return u.stop()}}),null,null,[[0,12]])}}).call(this,n(16))}});
|
1 |
+
!function(e){function t(t){for(var r,o,c=t[0],s=t[1],u=t[2],d=0,g=[];d<c.length;d++)o=c[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&g.push(a[o][0]),a[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);g.length;)g.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,o=1;o<n.length;o++){var c=n[o];0!==a[c]&&(r=!1)}r&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},a={5:0},i=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var o=window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[],c=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var l=c;i.push([597,0]),n()}({1:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return k})),n.d(t,"k",(function(){return w})),n.d(t,"c",(function(){return D})),n.d(t,"l",(function(){return N})),n.d(t,"m",(function(){return C})),n.d(t,"n",(function(){return L})),n.d(t,"o",(function(){return R})),n.d(t,"p",(function(){return I})),n.d(t,"q",(function(){return T})),n.d(t,"r",(function(){return M})),n.d(t,"s",(function(){return U}));var r=n(104);void 0===e.googlesitekit&&(e.googlesitekit={});var a=e.googlesitekit._element||r,i=a.__experimentalCreateInterpolateElement,o=a.Children,c=a.cloneElement,s=a.Component,l=a.concatChildren,u=a.createContext,d=a.createElement,g=a.createPortal,f=a.createRef,p=a.findDOMNode,m=a.forwardRef,h=a.Fragment,b=a.isEmptyElement,v=a.isValidElement,k=a.lazy,y=a.memo,_=a.Platform,O=a.RawHTML,w=a.render,j=a.renderToString,E=a.StrictMode,D=a.Suspense,S=a.switchChildrenNodeName,x=a.unmountComponentAtNode,N=a.useCallback,C=a.useContext,P=a.useDebugValue,L=a.useEffect,A=a.useImperativeHandle,R=a.useLayoutEffect,I=a.useMemo,T=a.useReducer,M=a.useRef,U=a.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:i,Children:o,cloneElement:c,Component:s,concatChildren:l,createContext:u,createElement:d,createPortal:g,createRef:f,findDOMNode:p,forwardRef:m,Fragment:h,isEmptyElement:b,isValidElement:v,lazy:k,memo:y,Platform:_,RawHTML:O,render:w,renderToString:j,StrictMode:E,Suspense:D,switchChildrenNodeName:S,unmountComponentAtNode:x,useCallback:N,useContext:C,useDebugValue:P,useEffect:L,useImperativeHandle:A,useLayoutEffect:R,useMemo:I,useReducer:T,useRef:M,useState:U})}).call(this,n(16))},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=function(e){function Modal(e){var t;return a()(this,Modal),(t=s()(this,u()(Modal).call(this,e))).el=document.createElement("div"),t.root=document.querySelector(".googlesitekit-plugin")||document.body,t}return g()(Modal,e),o()(Modal,[{key:"componentDidMount",value:function(){this.root.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.root.removeChild(this.el)}},{key:"render",value:function(){return Object(f.g)(this.props.children,this.el)}}]),Modal}(f.a)},103:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(14);function s(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var t,n,r,i,o,s;return a.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,a.a.awrap(c.c.get(c.a,"user","authentication",{timestamp:Date.now()}));case 3:t=u.sent,n=t.authenticated,r=t.requiredScopes,i=t.grantedScopes,o=t.unsatisfiedScopes,s=void 0===o?[]:o,e._googlesitekitLegacyData.setup=l({},e._googlesitekitLegacyData.setup||{},{isAuthenticated:n,requiredScopes:r,grantedScopes:i,unsatisfiedScopes:s,needReauthenticate:0<s.length}),u.next=14;break;case 12:u.prev=12,u.t0=u.catch(0);case 14:case"end":return u.stop()}}),null,null,[[0,12]])}}).call(this,n(16))},106:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(40),a=n(29),i=function(t,n,i){var o=Object(a.c)(t,n,i);Object(a.d)(),Object.keys(e._googlesitekitLegacyData.admin.datacache).forEach((function(t){0!==t.indexOf(o+"::")&&t!==o||delete e._googlesitekitLegacyData.admin.datacache[t]})),Object.keys(Object(r.a)()).forEach((function(e){0!==e.indexOf("googlesitekit_".concat(o,"::"))&&e!=="googlesitekit_".concat(o)||Object(r.a)().removeItem(e)}))}}).call(this,n(16))},110:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h}));var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(20),s=n.n(c),l=n(42),u=n.n(l),d=n(15),g=n.n(d),f=n(43);function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=i.client,l=void 0===c||c,d=i.server,p=void 0===d||d,h=i.storeName,b=void 0===h?void 0:h;s()(t,"type is required."),s()(n,"identifier is required."),s()(r,"datapoint is required.");var v=b||"".concat(t,"/").concat(n),k={serverNotifications:p?void 0:{},clientNotifications:l?void 0:{}},y=Object(f.a)({baseName:"getNotifications",controlCallback:function(){return u.a.get(t,n,r)},reducerCallback:function(e,t){return m({},e,{serverNotifications:t.reduce((function(e,t){return m({},e,o()({},t.id,t))}),{})})}}),_={addNotification:function(e){return s()(e,"notification is required."),{payload:{notification:e},type:"ADD_NOTIFICATION"}},removeNotification:function(e){return s()(e,"id is required."),{payload:{id:e},type:"REMOVE_NOTIFICATION"}}},O={},w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,n=arguments.length>1?arguments[1]:void 0,r=n.type,a=n.payload;switch(r){case"ADD_NOTIFICATION":var i=a.notification;return m({},t,{clientNotifications:m({},t.clientNotifications||{},o()({},i.id,i))});case"REMOVE_NOTIFICATION":var c=a.id;if(void 0===t.clientNotifications||void 0===t.clientNotifications[c])return void 0!==t.serverNotifications&&void 0!==t.serverNotifications[c]&&e.console.warn('Cannot remove server-side notification with ID "'.concat(c,'"; this may be changed in a future release.')),m({},t);var s=m({},t.clientNotifications);return delete s[c],m({},t,{clientNotifications:s});default:return m({},t)}},j={getNotifications:a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.actions.fetchGetNotifications();case 2:case"end":return e.stop()}}),e)}))};p||delete j.getNotifications;var E={getNotifications:function(e){var t=e.serverNotifications,n=e.clientNotifications;return void 0===t&&void 0===n?t:Object.values(m({},t||{},{},n||{}))}},D=g.a.combineStores(y,{INITIAL_STATE:k,actions:_,controls:O,reducer:w,resolvers:j,selectors:E});return m({},D,{STORE_NAME:v})}}).call(this,n(16))},111:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g}));var r=n(4),a=n.n(r),i=n(14);function o(){return a.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.awrap(i.c.get(i.a,"site","notifications",{},!1));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}))}var c=n(50),s="accepted",l="dismissed";function u(e,t){return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return i.c.invalidateCacheGroup(i.a,"site","notifications"),n.next=3,a.a.awrap(Object(c.c)("site_notifications",t,e));case 3:return n.next=5,a.a.awrap(i.c.set(i.a,"site","mark-notification",{notificationID:e,notificationState:t}));case 5:return n.abrupt("return",n.sent);case 6:case"end":return n.stop()}}))}function d(e){return a.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.awrap(u(e,s));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}function g(e){return a.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.awrap(u(e,l));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}))}},114:function(e,t,n){"use strict";(function(e){n(1);t.a=function Warning(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#F9BB2D",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"warning-title warning-desc"},e.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),e.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))}}).call(this,n(10))},124:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m}));var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(58),s=n(37),l=n(125),u=n(126),d=n(127),g=n(46);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(t){var n,r,i,o,l;return a.a.async((function(u){for(;;)switch(u.prev=u.next){case 0:return n=e._googlesitekitLegacyData.admin,r=n.homeURL,i=n.ampMode,o={tagverify:1,timestamp:Date.now()},u.next=4,a.a.awrap(h(Object(s.a)(r,o),t));case 4:if((l=u.sent)||"secondary"!==i){u.next=9;break}return u.next=8,a.a.awrap(Object(c.default)({path:"/wp/v2/posts?per_page=1"}).then((function(e){return e.slice(0,1).map((function(e){return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,a.a.awrap(h(Object(s.a)(e.link,p({},o,{amp:1})),t));case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}))})).pop()})));case 8:l=u.sent;case 9:return u.abrupt("return",Promise.resolve(l||null));case 10:case"end":return u.stop()}}))},h=function(e,t){var n;return a.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,a.a.awrap(fetch(e,{credentials:"omit"}).then((function(e){return e.text()})));case 3:return n=r.sent,r.abrupt("return",b(n,t)||null);case 7:return r.prev=7,r.t0=r.catch(0),r.abrupt("return",null);case 10:case"end":return r.stop()}}),null,null,[[0,7]])},b=function(e,t){var n=({adsense:u.a,analytics:d.a,tagmanager:g.d,setup:l.a}[t]||[]).find((function(t){return t.test(e)}));return!!n&&n.exec(e)[1]}}).call(this,n(16))},125:function(e,t,n){"use strict";t.a=[/<meta name="googlesitekit-setup" content="([a-z0-9-]+)"/]},126:function(e,t,n){"use strict";t.a=[/google_ad_client: ?["|'](.*?)["|']/,/<(?:script|amp-auto-ads) [^>]*data-ad-client="([^"]+)"/]},127:function(e,t,n){"use strict";t.a=[/<script [^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtag\/js\?id=(UA-.*?)['|"][^>]*><\/script>/,/<script[^>]*>[^<]+google-analytics\.com\/analytics\.js[^<]+(UA-\d+-\d+)/,/__gaTracker\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/ga\( ?['|"]create['|"], ?['|"](UA-.*?)['|"], ?['|"]auto['|"] ?\)/,/_gaq.push\( ?\[ ?['|"]_setAccount['|"], ?['|"](UA-.*?)['|"] ?] ?\)/,/<amp-analytics [^>]*type="gtag"[^>]*>[^<]*<script type="application\/json">[^<]*"gtag_id":\s*"(UA-[^"]+)"/,/<amp-analytics [^>]*type="googleanalytics"[^>]*>[^<]*<script type="application\/json">[^<]*"account":\s*"(UA-[^"]+)"/]},128:function(e,t,n){"use strict";(function(e){var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(20),s=n.n(c),l=n(37),u=n(15),d=n.n(u),g=n(24);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=d.a.createRegistrySelector,h={connectURL:void 0,user:void 0,verified:void 0},b={receiveConnectURL:function(e){return s()(e,"connectURL is required."),{payload:{connectURL:e},type:"RECEIVE_CONNECT_URL"}},receiveUserInfo:function(e){return s()(e,"userInfo is required."),{payload:{user:e},type:"RECEIVE_USER_INFO"}},receiveUserIsVerified:function(e){return s()(void 0!==e,"userIsVerified is required."),{payload:{verified:e},type:"RECEIVE_USER_IS_VERIFIED"}}},v={getConnectURL:a.a.mark((function t(){var n,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,!(0,n.select)(g.b).getConnectURL()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.connectURL,t.next=12,b.receiveConnectURL(r);case 12:case"end":return t.stop()}}),t)})),getUser:a.a.mark((function t(){var n,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,void 0===(0,n.select)(g.b).getUser()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.user,t.next=12,b.receiveUserInfo(r);case 12:case"end":return t.stop()}}),t)})),isVerified:a.a.mark((function t(){var n,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.a.commonActions.getRegistry();case 2:if(n=t.sent,void 0===(0,n.select)(g.b).isVerified()){t.next=6;break}return t.abrupt("return");case 6:if(e._googlesitekitUserData){t.next=9;break}return e.console.error("Could not load core/user info."),t.abrupt("return");case 9:return r=e._googlesitekitUserData.verified,t.next=12,b.receiveUserIsVerified(r);case 12:case"end":return t.stop()}}),t)}))},k={getUser:function(e){return e.user},getConnectURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.additionalScopes,r=void 0===n?[]:n,a=t.redirectURL,i=void 0===a?void 0:a,o=e.connectURL,c={redirect:i};if(void 0!==o)return(null==r?void 0:r.length)?Object(l.a)(o,p({},c,{additional_scopes:r})):Object(l.a)(o,c)},getID:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.id:t}})),getName:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.name:t}})),getEmail:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.email:t}})),getPicture:m((function(e){return function(){var t=e(g.b).getUser();return void 0!==t?t.picture:t}})),isVerified:function(e){return e.verified}};t.a={INITIAL_STATE:h,actions:b,controls:{},reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"RECEIVE_CONNECT_URL":return p({},e,{connectURL:r.connectURL});case"RECEIVE_USER_INFO":return p({},e,{user:r.user});case"RECEIVE_USER_IS_VERIFIED":return p({},e,{verified:r.verified});default:return p({},e)}},resolvers:v,selectors:k}}).call(this,n(16))},129:function(e,t,n){"use strict";(function(e){n(1);var r=n(2),a=n.n(r),i=n(17),o=n.n(i);function ChangeArrow(t){var n=t.direction,r=t.invertColor;return e.createElement("svg",{className:o()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(n),{"googlesitekit-change-arrow--inverted-color":r}),width:"9",height:"9",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:a.a.string,invertColor:a.a.bool},ChangeArrow.defaultProps={direction:"up",invertColor:!1},t.a=ChangeArrow}).call(this,n(10))},13:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(100);void 0===e.googlesitekit&&(e.googlesitekit={});var a=e.googlesitekit._hooks||r,i=a.addAction,o=a.addFilter,c=a.removeAction,s=a.removeFilter,l=a.hasAction,u=a.hasFilter,d=a.removeAllActions,g=a.removeAllFilters,f=a.doAction,p=a.applyFilters,m=a.currentAction,h=a.currentFilter,b=a.doingAction,v=a.doingFilter,k=a.didAction,y=a.didFilter,_=a.actions,O=a.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:i,addFilter:o,removeAction:c,removeFilter:s,hasAction:l,hasFilter:u,removeAllActions:d,removeAllFilters:g,doAction:f,applyFilters:p,currentAction:m,currentFilter:h,doingAction:b,doingFilter:v,didAction:k,didFilter:y,actions:_,filters:O})}).call(this,n(16))},130:function(e,t,n){"use strict";(function(e){n(1);t.a=function Error(){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#EA4336",width:"34",height:"34",viewBox:"0 0 24 24","aria-labelledby":"error-title error-desc"},e.createElement("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3zM12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"}))}}).call(this,n(10))},131:function(e,t,n){"use strict";(function(e){n(1);var r=n(0),a=n(34);t.a=function DashboardPermissionAlert(){return e.createElement(a.a,{id:"permission error",title:Object(r.__)("Permissions issue accessing data","google-site-kit"),description:Object(r.__)("This account does not have access to the requested data.","google-site-kit"),handleDismiss:function(){},format:"small",type:"win-error",isDismissable:!0})}}).call(this,n(10))},133:function(e,t,n){"use strict";(function(e){n(1);var r=n(0),a=n(30);t.a=function Logo(){return e.createElement("div",{className:"googlesitekit-logo","aria-hidden":"true"},e.createElement(a.a,{id:"logo-g",className:"googlesitekit-logo__logo-g",height:"34",width:"32"}),e.createElement(a.a,{id:"logo-sitekit",className:"googlesitekit-logo__logo-sitekit",height:"26",width:"99"}),e.createElement("span",{className:"screen-reader-text"},Object(r.__)("Site Kit by Google Logo","google-site-kit")))}}).call(this,n(10))},134:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Root}));n(1);var r=n(2),a=n.n(r),i=n(15),o=n.n(i),c=n(135),s=n(136),l=n(137),u=n(138);function Root(t){var n=t.children,r=t.registry,a=t.dataAPIContext,i=t.dataAPIModuleArgs;return e.createElement(o.a.RegistryProvider,{value:r},e.createElement(c.a,null,e.createElement(l.a,null,n,a&&e.createElement(u.a,{context:a,args:i})),e.createElement(s.a,null)))}Root.propTypes={children:a.a.node.isRequired,registry:a.a.object,dataAPIContext:a.a.string,dataAPIModuleArgs:a.a.object},Root.defaultProps={registry:o.a}}).call(this,n(10))},135:function(e,t,n){"use strict";(function(e,r){var a=n(5),i=n.n(a),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(2),h=n.n(m),b=n(0),v=n(34),k=function(t){function ErrorHandler(e){var t;return i()(this,ErrorHandler),(t=l()(this,d()(ErrorHandler).call(this,e))).state={error:null,info:null},t}return f()(ErrorHandler,t),c()(ErrorHandler,[{key:"componentDidCatch",value:function(t,n){e.console.error("Caught an error:",t,n),this.setState({error:t,info:n})}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.error,a=t.info;return n?r.createElement(v.a,{id:"googlesitekit-error",title:Object(b.__)("Site Kit encountered an error","google-site-kit"),description:r.createElement("code",null,n.message),isDismissable:!1,format:"small",type:"win-error"},r.createElement("pre",null,a.componentStack)):e}}]),ErrorHandler}(p.a);k.defaultProps={},k.propTypes={children:h.a.node.isRequired},t.a=k}).call(this,n(16),n(10))},136:function(e,t,n){"use strict";(function(e,r){var a=n(4),i=n.n(a),o=n(1),c=n(0),s=n(15),l=n.n(s),u=n(90),d=n(97),g=n(102),f=n(86),p=l.a.useSelect,m=l.a.useDispatch,h=l.a.useRegistry;t.a=function PermissionsModal(){var t,n,a,s=h(),l=p((function(e){return e(u.a).getPermissionScopeError()})),b=p((function(t){var n;return t(u.a).getConnectURL({additionalScopes:null==l?void 0:null===(n=l.data)||void 0===n?void 0:n.scopes,redirectURL:e.location.href})})),v=m(u.a).clearPermissionScopeError,k=Object(o.l)((function(){v()}),[v]),y=Object(o.l)((function(){return i.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.awrap(Object(f.c)(s));case 2:e.location.assign(b);case 3:case"end":return t.stop()}}))}),[s,b]);return Object(o.n)((function(){var e,t,n;i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.skipModal)||!(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.scopes)||void 0===n?void 0:n.length)){r.next=3;break}return r.next=3,i.a.awrap(y());case 3:case"end":return r.stop()}}))}),[y,l]),l?(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.scopes)||void 0===n?void 0:n.length)?(null==l?void 0:null===(a=l.data)||void 0===a?void 0:a.skipModal)?null:r.createElement(g.a,null,r.createElement(d.a,{title:Object(c.__)("Additional Permissions Required","google-site-kit"),subtitle:l.message,confirmButton:Object(c.__)("Proceed","google-site-kit"),dialogActive:!0,handleConfirm:y,handleDialog:k})):(e.console.warn("permissionsError lacks scopes array to use for redirect, so not showing the PermissionsModal. permissionsError was:",l),null):null}}).call(this,n(16),n(10))},137:function(e,t,n){"use strict";var r=n(4),a=n.n(r),i=n(38),o=n.n(i),c=n(1),s=n(15),l=n.n(s),u=n(86),d=l.a.useRegistry;t.a=function RestoreSnapshots(e){var t=e.children,n=d(),r=Object(c.s)(!1),i=o()(r,2),s=i[0],l=i[1];return Object(c.n)((function(){s||a.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.awrap(Object(u.b)(n));case 2:l(!0);case 3:case"end":return e.stop()}}))}),[n,s]),s?t:null}},138:function(e,t,n){"use strict";n.d(t,"a",(function(){return CollectModuleData}));var r=n(1),a=n(13);n(14);function CollectModuleData(e){var t=e.context,n=e.args;return Object(r.n)((function(){Object(a.d)("googlesitekit.moduleLoaded",t,n)}),[t,n]),null}},14:function(e,t,n){"use strict";var r=n(11),a=n.n(r),i=n(12),o=n(58),c=n(37),s=n(13),l=n(55),u=n(21),d=n(54),g=n(94),f=n(131),p=n(29),m=n(71);n.d(t,"a",(function(){return m.a})),n.d(t,"b",(function(){return m.b}));var h=n(106);function b(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(e,t){var n=v({data:{}},e);return n.data=v({dateRange:t},n.data),n},y={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(n,r){try{var a=[],o=Object(l.b)();Object(i.each)(e,(function(e){var n=k(e,o);n.key=Object(p.c)(n.type,n.identifier,n.datapoint,n.data);var r=Object(p.b)(n.key,n.maxAge);void 0!==r&&(a[n.key]=r,t.resolve(n,r))})),n(a)}catch(e){r()}}))},combinedGet:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[],a=25,u=Object(l.b)();Object(i.each)(e,(function(e){var n=k(e,u);n.key=Object(p.c)(n.type,n.identifier,n.datapoint,n.data);var i=Object(p.b)(n.key,n.maxAge);void 0!==i?(setTimeout((function(){t.resolve(n,i)}),a),a+=25):r.push(n)})),r=Object(i.sortBy)(r,"priority");var g=[],f=[],m={},h=!!r.find((function(e){return e.priority<10}));Object(i.each)(r,(function(e,t){!n&&10<=e.priority&&h?f.push(e):m[e.key]?m[e.key].push(t):(m[e.key]=[t],g.push(e))}));var b=10,v=g.slice(0,b),y=g.slice(b);if(y=y.concat(f),0!==v.length||0!==y.length){0<y.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(y,!0)}),50):this.maxRequests=10;var _=null!==Object(d.c)("datacache");return Object(o.default)({path:Object(c.a)("/google-site-kit/v1/data/",{datacache:_||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(i.each)(e,(function(e,n){m[n]?(t.handleWPError(e),Object(i.each)(m[n],(function(n){var a=r[n];Object(p.e)(a.key,e),t.resolve(a,e)})),0===y.length&&Object(s.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+n)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(s.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],n=Object(i.intersection)(t,Object.keys(e));if(Object(i.isEqual)(t,n)){console.warn("WP Error in data response",e);var r=e.data;if(r&&r.reason){var a=0;["authError","insufficientPermissions"].includes(r.reason)&&(Object(s.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(g.a),1),a++),"forbidden"===r.reason&&(Object(s.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(f.a),1),a++),a&&Object(s.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(s.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+a}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:h.a,collectModuleData:function(e,t){var n=Object(s.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==n.length&&this.combinedGet(n)},get:function(e,t,n){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=Object(p.c)(e,t,n,a);if(!i){var l=Object(p.b)(s,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(c.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),a)}).then((function(e){return i||Object(p.e)(s,e),Promise.resolve(e)})).catch((function(e){return r.handleWPError(e),Promise.reject(e)}))},set:function(e,t,n,r){var a={};return a.data=r,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(n),data:a,method:"POST"}).then((function(r){return y.invalidateCacheGroup(e,t,n),new Promise((function(e){e(r)}))}))},setModuleActive:function(e,t){return this.set(m.a,"modules","activation",{slug:e,active:t})}};Object(s.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(s.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",y.collectModuleData.bind(y)),t.c=y},148:function(e,t,n){"use strict";(function(e){var r=n(4),a=n.n(r),i=n(5),o=n.n(i),c=n(6),s=n.n(c),l=n(7),u=n.n(l),d=n(8),g=n.n(d),f=n(9),p=n.n(f),m=n(1),h=n(0),b=n(111),v=n(34),k=function(t){function DashboardCoreSiteAlerts(e){var t;return o()(this,DashboardCoreSiteAlerts),(t=u()(this,g()(DashboardCoreSiteAlerts).call(this,e))).state={notifications:!1},t}return p()(DashboardCoreSiteAlerts,t),s()(DashboardCoreSiteAlerts,[{key:"componentDidMount",value:function(){var e;return a.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.a.awrap(Object(b.c)());case 3:e=t.sent,this.setState({notifications:e}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.warn("Error caught while fetching notifications",t.t0);case 10:case"end":return t.stop()}}),null,this,[[0,7]])}},{key:"render",value:function(){var t=this.state.notifications;return Array.isArray(t)?t.map((function(t){return e.createElement(v.a,{key:t.id,id:t.id,title:t.title||"",description:t.content||"",learnMoreURL:t.learnMoreURL||"",learnMoreLabel:t.learnMoreLabel||"",ctaLink:t.ctaURL||"",ctaLabel:t.ctaLabel||"",ctaTarget:t.ctaTarget||"",dismiss:t.dismissLabel||Object(h.__)("OK, Got it!","google-site-kit"),isDismissable:t.dismissible,onCTAClick:function(){return a.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.awrap(Object(b.a)(t.id));case 2:case"end":return e.stop()}}))},onDismiss:function(){return a.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.awrap(Object(b.b)(t.id));case 2:case"end":return e.stop()}}))}})})):null}}]),DashboardCoreSiteAlerts}(m.a);t.a=k}).call(this,n(10))},149:function(e,t,n){"use strict";(function(e,r){var a=n(5),i=n.n(a),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(0),h=n(13),b=n(3),v=n(34),k=n(150),y=function(t){function DashboardSetupAlerts(){return i()(this,DashboardSetupAlerts),l()(this,d()(DashboardSetupAlerts).apply(this,arguments))}return f()(DashboardSetupAlerts,t),c()(DashboardSetupAlerts,[{key:"render",value:function(){var t=Object(b.l)("notification");if(!t||""===t)return null;var n={id:"connected-successfully",setupTitle:Object(m.__)("Site Kit","google-site-kit"),description:Object(m.__)("Now you’ll be able to see how your site is doing in search. To get even more detailed stats, activate more modules. Here are our recommendations for what to include in your Site Kit:","google-site-kit"),learnMore:{label:"",url:"",description:""}},a=e._googlesitekitLegacyData.permissions.canManageOptions;switch(t){case"authentication_success":if(!a)return null;var i=Object(b.k)(),o=Object(b.l)("slug");return o&&i[o]&&!i[o].active?null:(o&&i[o]&&(n.id="".concat(n.id,"-").concat(o),n.setupTitle=i[o].name,n.description=Object(m.__)("Here are some other services you can connect to see even more stats:","google-site-kit"),n=Object(h.c)("googlesitekit.SetupWinNotification-".concat(o),n)),r.createElement(p.b,null,r.createElement(v.a,{id:n.id
|
2 |
+
/* translators: %s: the name of a module that setup was completed for */,title:Object(m.sprintf)(Object(m.__)("Congrats on completing the setup for %s!","google-site-kit"),n.setupTitle),description:n.description,handleDismiss:function(){},winImage:e._googlesitekitLegacyData.admin.assetsRoot+"images/rocket.png",dismiss:Object(m.__)("OK, Got it!","google-site-kit"),format:"large",type:"win-success",learnMoreLabel:n.learnMore.label,learnMoreDescription:n.learnMore.description,learnMoreURL:n.learnMore.url,anchorLink:"pagespeed-insights"===o?"#googlesitekit-pagespeed-header":"",anchorLinkLabel:"pagespeed-insights"===o?Object(m.__)("Jump to the bottom of the dashboard to see how fast your home page is.","google-site-kit"):""},r.createElement(k.a,null))));case"authentication_failure":return r.createElement(p.b,null,r.createElement(v.a,{id:"connection error",title:Object(m.__)("There was a problem connecting to Google!","google-site-kit"),description:"",handleDismiss:function(){},format:"small",type:"win-error"}))}}}]),DashboardSetupAlerts}(p.a);t.a=y}).call(this,n(16),n(10))},15:function(e,t){e.exports=googlesitekit.data},150:function(e,t,n){"use strict";(function(e,r){var a=n(4),i=n.n(a),o=n(5),c=n.n(o),s=n(6),l=n.n(s),u=n(7),d=n.n(u),g=n(8),f=n.n(g),p=n(18),m=n.n(p),h=n(9),b=n.n(h),v=n(1),k=n(12),y=n(17),_=n.n(y),O=n(0),w=n(3),j=n(103),E=n(25),D=n(14),S=n(84),x=n(85),N=function(t){function ModulesList(e){var t;return c()(this,ModulesList),(t=d()(this,f()(ModulesList).call(this,e))).setupModuleClick=t.setupModuleClick.bind(m()(t)),t}return b()(ModulesList,t),l()(ModulesList,[{key:"setupModuleClick",value:function(t){return i.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,this.setState({isSaving:!0}),n.next=4,i.a.awrap(Object(w.b)(D.c,t,!0));case 4:return n.next=6,i.a.awrap(Object(j.a)());case 6:e.location=Object(w.m)(t,!0),n.next=13;break;case 9:n.prev=9,n.t0=n.catch(0),Object(w.v)(S.a,{id:"setup-module-error",title:Object(O.__)("Internal Server Error","google-site-kit"),description:n.t0.message,format:"small",type:"win-error"}),this.setState({isSaving:!1});case 13:case"end":return n.stop()}}),null,this,[[0,9]])}},{key:"render",value:function(){var e=this,t=Object(w.k)(),n=Object.values(t).filter((function(e){return!e.internal})),a=n.filter((function(e){return e.active&&e.setupComplete})).reduce((function(e,t){return e[t.slug]=t.name,e}),{}),i=n.filter((function(e){return 0===e.required.length})).sort((function(e,t){return e.sort-t.sort}));return r.createElement("div",{className:"googlesitekit-modules-list"},Object(k.map)(i,(function(t){var n=!1,i="",o=t.slug,c=t.name,s=t.setupComplete,l=t.required;return 0<l.length&&l.forEach((function(e){a[e]&&(n=!0,i=a[e])})),r.createElement("div",{key:o,className:_()("googlesitekit-modules-list__module","googlesitekit-modules-list__module--".concat(o),{"googlesitekit-modules-list__module--disabled":n})},r.createElement("div",{className:"googlesitekit-settings-connect-module__wrapper"},r.createElement("div",{className:"googlesitekit-settings-connect-module__logo"},Object(w.q)(o,n)),r.createElement("h3",{className:"googlesitekit-settings-connect-module__title"},c)),r.createElement(x.a,{slug:o,context:"modules-list"}),s&&r.createElement("span",{className:"googlesitekit-settings-module__status"},r.createElement("span",{className:"googlesitekit-settings-module__status-icon googlesitekit-settings-module__status-icon--connected"},r.createElement("span",{className:"screen-reader-text"},Object(O.__)("Connected","google-site-kit"))),Object(O.__)("Connected","google-site-kit")),!s&&!n&&r.createElement(E.a,{arrow:!0,small:!0,inherit:!0,onClick:function(){e.setupModuleClick(o)}}," ",Object(O.__)("Connect Service","google-site-kit")),!s&&n&&r.createElement(E.a,{disabled:!0,small:!0,inherit:!0},
|
3 |
/* translators: %s: parent module name */
|
4 |
+
Object(O.sprintf)(Object(O.__)("Enable %s to start setup","google-site-kit"),i)))})))}}]),ModulesList}(v.a);t.a=N}).call(this,n(16),n(10))},151:function(e,t,n){"use strict";(function(e,r){var a=n(5),i=n.n(a),o=n(6),c=n.n(o),s=n(7),l=n.n(s),u=n(8),d=n.n(u),g=n(9),f=n.n(g),p=n(1),m=n(12),h=n(0),b=n(3),v=n(34),k=n(67),y=function(t){function DashboardModulesAlerts(e){var t;return i()(this,DashboardModulesAlerts),(t=l()(this,d()(DashboardModulesAlerts).call(this,e))).state={data:!1},t}return f()(DashboardModulesAlerts,t),c()(DashboardModulesAlerts,[{key:"componentDidMount",value:function(){var e=this,t=Object(k.f)();t&&Object(k.b)(t).then((function(t){e.setState({data:t.results})}))}},{key:"render",value:function(){var t=this.state.data;if(0===Object.keys(t).length)return null;var n=Object(b.k)(),a=[];return Object.keys(t).forEach((function(i){Object(m.each)(t[i],(function(t){a.push(e.createElement(v.a,{key:t.id,id:t.id,title:t.title||"",description:t.description||"",blockData:t.blockData||[],winImage:t.winImage?"".concat(r._googlesitekitLegacyData.admin.assetsRoot,"images/").concat(t.winImage):"",format:t.format||"small",learnMoreURL:t.learnMoreURL||"",learnMoreDescription:t.learnMoreDescription||"",learnMoreLabel:t.learnMoreLabel||"",ctaLink:t.ctaURL||"",ctaLabel:t.ctaLabel||"",ctaTarget:t.ctaTarget||"",type:t.severity||"",dismiss:t.dismiss||Object(h.__)("OK, Got it!","google-site-kit"),isDismissable:t.isDismissable||!0,logo:t.logo||!0,module:i,moduleName:n[i].name,pageIndex:t.pageIndex||"",dismissExpires:t.dismissExpires||0,showOnce:t.showOnce||!1}))}))})),e.createElement(p.b,null,a)}}]),DashboardModulesAlerts}(p.a);t.a=y}).call(this,n(10),n(16))},152:function(e,t,n){"use strict";var r=n(4),a=n.n(r),i=n(5),o=n.n(i),c=n(6),s=n.n(c),l=n(12),u=n(14),d=function(){function WinsWithData(e){o()(this,WinsWithData),this.wins=e,this.response=[]}return s()(WinsWithData,[{key:"get",value:function(){var e,t=this;return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return e=Object(l.filter)(this.wins.map((function(e){return!!e.withData&&(e.withData.callback=function(n){t.response[e.identifier]=n},e.withData)}))),n.next=3,a.a.awrap(u.c.combinedGetFromCache(e));case 3:return n.abrupt("return",this.response);case 4:case"end":return n.stop()}}),null,this)}}]),WinsWithData}();t.a=d},153:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(12),m=n(0),h=n(13),b=n(34),v=n(67),k=function(t){function DashboardWinsAlerts(e){var t;return a()(this,DashboardWinsAlerts),(t=s()(this,u()(DashboardWinsAlerts).call(this,e))).state={data:!1},t}return g()(DashboardWinsAlerts,t),o()(DashboardWinsAlerts,[{key:"componentDidMount",value:function(){var e=this;Object(h.a)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(h.f)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications");var t=Object(v.g)();t&&Object(v.d)(t).then((function(t){e.setState({data:t.results})}))}))}},{key:"render",value:function(){var t=this.state.data;if(0===Object.keys(t).length)return null;var n=[];return Object.keys(t).forEach((function(r){Object(p.each)(t[r],(function(t){n.push(e.createElement(b.a,{key:t.id,id:t.id,title:t.title||"",description:t.description||"",blockData:t.blockData||[],winImage:t.winImage||"",format:t.format||"small",learnMoreURL:t.learnMoreURL||"",learnMoreDescription:t.learnMoreDescription||"",learnMoreLabel:t.learnMoreLabel||"",ctaLink:t.ctaLink||"",ctaLabel:t.ctaLabel||"",type:t.severity||"",dismiss:t.dismiss||Object(m.__)("OK, Got it!","google-site-kit"),isDismissable:t.isDismissable||!0,logo:t.logo||!1,pageIndex:t.pageIndex||"",dismissExpires:t.dismissExpires||0,showOnce:t.showOnce||!1}))}))})),e.createElement(f.b,null,n)}}]),DashboardWinsAlerts}(f.a);t.a=k}).call(this,n(10))},207:function(e,t,n){"use strict";(function(e,t){n(1);var r=n(13),a=n(21),i=n(3),o=n(148),c=n(149),s=n(151),l=n(153),u=n(94),d=e._googlesitekitLegacyData.setup,g=Object(i.l)("notification"),f=Object(a.a)(t.createElement(o.a,null)),p=Object(a.a)(t.createElement(c.a,null)),m=Object(a.a)(t.createElement(s.a,null)),h=Object(a.a)(t.createElement(l.a,null)),b=Object(a.a)(t.createElement(u.a,null));Object(r.b)("googlesitekit.DashboardNotifications","googlesitekit.SetupNotification",f,10),d.needReauthenticate&&Object(r.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",b,1),"authentication_success"===g||"authentication_failure"===g?Object(r.b)("googlesitekit.DashboardNotifications","googlesitekit.SetupNotification",p,1):d.isAuthenticated&&d.isVerified&&(Object(r.b)("googlesitekit.DashboardNotifications","googlesitekit.ModulesNotification",m,1),Object(r.b)("googlesitekit.DashboardNotifications","googlesitekit.WinsNotification",h,1))}).call(this,n(16),n(10))},21:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var r=n(87),a=n.n(r),i=n(1),o=function(e){return function(t){return function FilteredComponent(n){return Object(i.f)(i.b,{},"",Object(i.f)(t,n),e)}}},c=function(t,n){return function(r){return function InnerComponent(i){return e.createElement(t,a()({},i,n,{OriginalComponent:r}))}}}}).call(this,n(10))},234:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(18),g=n.n(d),f=n(9),p=n.n(f),m=n(1),h=n(17),b=n.n(h),v=n(0),k=n(13),y=n(67),_=function(t){function NotificationCounter(e){var t;return a()(this,NotificationCounter),(t=s()(this,u()(NotificationCounter).call(this,e))).state={count:0},t.handleIncrement=t.handleIncrement.bind(g()(t)),t.handleDecrement=t.handleDecrement.bind(g()(t)),t}return p()(NotificationCounter,t),o()(NotificationCounter,[{key:"componentDidMount",value:function(){var e=this;Object(k.a)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications",(function(){Object(k.f)("googlesitekit.dataLoaded","googlesitekit.dataLoadedGetNotifications"),Object(y.c)().then((function(t){e.setState({count:t})}))})),document.addEventListener("notificationDismissed",this.handleDecrement,!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("notificationDismissed",this.handleDecrement)}},{key:"handleIncrement",value:function(){this.setState(y.e)}},{key:"handleDecrement",value:function(){this.setState(y.a)}},{key:"render",value:function(){var t=Object(v.sprintf)(
|
5 |
/* translators: %d: the number of notifications */
|
6 |
+
Object(v._n)("%d notification","%d notifications",this.state.count,"google-site-kit"),this.state.count),n=e.createElement("span",{className:b()("googlesitekit-notifications-counter","update-plugins","count-".concat(this.state.count))},e.createElement("span",{className:"plugin-count","aria-hidden":"true"},this.state.count),e.createElement("span",{className:"screen-reader-text"},t));return Object(m.g)(n,document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"))}}]),NotificationCounter}(m.a);t.a=_}).call(this,n(10))},24:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r="core/user",a="missing_required_scopes"},25:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(17),b=n.n(h),v=function(t){function Link(){return a()(this,Link),s()(this,u()(Link).apply(this,arguments))}return g()(Link,t),o()(Link,[{key:"render",value:function(){var t=this.props,n=t.dangerouslySetInnerHTML,r=t.onClick,a=t.href,i=t.children,o=t.className,c=t.arrow,s=t.external,l=t.inverse,u=t.back,d=t.small,g=t.inherit,f=t.caps,p=t.danger,m=t.disabled,h=t.id,v=a&&!m,k=v?"a":"button";return e.createElement(k,{className:b()("googlesitekit-cta-link",o,{"googlesitekit-cta-link--arrow":c,"googlesitekit-cta-link--external":s,"googlesitekit-cta-link--inverse":l,"googlesitekit-cta-link--back":u,"googlesitekit-cta-link--small":d,"googlesitekit-cta-link--inherit":g,"googlesitekit-cta-link--caps":f,"googlesitekit-cta-link--danger":p,"googlesitekit-cta-link--disabled":m}),onClick:r,id:h,href:v?a:void 0,target:v&&s?"_blank":void 0,rel:s?"noopener noreferrer":void 0,disabled:m,dangerouslySetInnerHTML:n},i)}}]),Link}(f.a);v.propTypes={dangerouslySetInnerHTML:m.a.shape({__html:m.a.string}),onClick:m.a.func,href:m.a.string,children:m.a.oneOfType([m.a.string.isRequired,m.a.array.isRequired]),className:m.a.string,arrow:m.a.bool,external:m.a.bool,inverse:m.a.bool,back:m.a.bool,small:m.a.bool,inherit:m.a.bool,caps:m.a.bool,danger:m.a.bool,disabled:m.a.bool},v.defaultProps={dangerouslySetInnerHTML:void 0,onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=v}).call(this,n(10))},252:function(e,t,n){"use strict";(function(e){var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(5),s=n.n(c),l=n(6),u=n.n(l),d=n(7),g=n.n(d),f=n(8),p=n.n(f),m=n(18),h=n.n(m),b=n(9),v=n.n(b),k=n(1),y=n(2),_=n.n(y),O=n(17),w=n.n(O),j=n(58),E=n(0),D=n(3),S=n(253),x=n(50),N=function(t){function OptIn(e){var t;return s()(this,OptIn),(t=g()(this,p()(OptIn).call(this,e))).state={optIn:Object(x.a)(),error:!1},t.handleOptIn=t.handleOptIn.bind(h()(t)),t}return v()(OptIn,t),u()(OptIn,[{key:"handleOptIn",value:function(e){var t,n;return a.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=!!e.target.checked,n=Object(D.j)("googlesitekit_tracking_optin"),Object(x.b)(t),!t){r.next=6;break}return r.next=6,a.a.awrap(Object(x.c)("tracking_plugin",this.props.optinAction));case 6:return r.prev=6,r.next=9,a.a.awrap(Object(j.default)({path:"/wp/v2/users/me",method:"POST",data:{meta:o()({},n,t)}}));case 9:this.setState({optIn:t,error:!1}),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(6),this.setState({optIn:!t,error:{errorCode:r.t0.code,errorMsg:r.t0.message}});case 15:case"end":return r.stop()}}),null,this,[[6,12]])}},{key:"render",value:function(){var t=this.state,n=t.optIn,r=t.error,a=this.props,i=a.id,o=a.name,c=a.className,s=Object(E.sprintf)(
|
7 |
/* translators: %s: privacy policy URL */
|
8 |
+
Object(E.__)('Help us improve the Site Kit plugin by allowing tracking of anonymous usage stats. All data are treated in accordance with <a href="%s" target="_blank" rel="noopener noreferrer">Google Privacy Policy</a>',"google-site-kit"),"https://policies.google.com/privacy");return e.createElement("div",{className:w()("googlesitekit-opt-in",c)},e.createElement(S.a,{id:i,name:o,value:"1",checked:n,onChange:this.handleOptIn},e.createElement("span",{dangerouslySetInnerHTML:Object(D.u)(s,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target","rel"]})})),r&&e.createElement("div",{className:"googlesitekit-error-text"},r.errorMsg))}}]),OptIn}(k.a);N.propTypes={id:_.a.string,name:_.a.string,className:_.a.string,optinAction:_.a.string},N.defaultProps={id:"googlesitekit-opt-in",name:"optIn"},t.a=N}).call(this,n(10))},253:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(17),b=n.n(h),v=n(32),k=function(t){function Checkbox(e){var t;return a()(this,Checkbox),(t=s()(this,u()(Checkbox).call(this,e))).formFieldRef=Object(f.h)(),t.checkboxRef=Object(f.h)(),t}return g()(Checkbox,t),o()(Checkbox,[{key:"componentDidMount",value:function(){new v.e(this.formFieldRef.current).input=new v.c(this.checkboxRef.current)}},{key:"render",value:function(){var t=this.props,n=t.onChange,r=t.id,a=t.name,i=t.value,o=t.checked,c=t.disabled,s=t.children;return e.createElement("div",{className:"mdc-form-field",ref:this.formFieldRef},e.createElement("div",{className:b()("mdc-checkbox",{"mdc-checkbox--disabled":c}),ref:this.checkboxRef},e.createElement("input",{className:"mdc-checkbox__native-control",type:"checkbox",id:r,name:a,value:i,checked:o,disabled:c,onChange:n}),e.createElement("div",{className:"mdc-checkbox__background"},e.createElement("svg",{className:"mdc-checkbox__checkmark",viewBox:"0 0 24 24"},e.createElement("path",{className:"mdc-checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),e.createElement("div",{className:"mdc-checkbox__mixedmark"}))),e.createElement("label",{htmlFor:r},s))}}]),Checkbox}(f.a);k.propTypes={onChange:m.a.func.isRequired,id:m.a.string.isRequired,name:m.a.string.isRequired,value:m.a.string.isRequired,checked:m.a.bool,disabled:m.a.bool,children:m.a.node.isRequired},k.defaultProps={checked:!1,disabled:!1},t.a=k}).call(this,n(10))},29:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return g}));var r=n(33),a=n.n(r),i=n(12),o=n(40),c=n(56),s=function(){e._googlesitekitLegacyData.admin=e._googlesitekitLegacyData.admin||{},"string"==typeof e._googlesitekitLegacyData.admin.datacache&&(e._googlesitekitLegacyData.admin.datacache=JSON.parse(e._googlesitekitLegacyData.admin.datacache)),"object"!==a()(e._googlesitekitLegacyData.admin.datacache)&&(e._googlesitekitLegacyData.admin.datacache={})},l=function(t,n){if(void 0!==n&&(!n||"object"!==a()(n)||!n.error&&!n.errors)){s(),e._googlesitekitLegacyData.admin.datacache[t]=Object(i.cloneDeep)(n);var r={value:n,date:Date.now()/1e3};Object(o.a)().setItem("googlesitekit_"+t,JSON.stringify(r))}},u=function(t,n){if(!e._googlesitekitLegacyData.admin.nojscache){if(s(),void 0!==e._googlesitekitLegacyData.admin.datacache[t])return e._googlesitekitLegacyData.admin.datacache[t];var r=JSON.parse(Object(o.a)().getItem("googlesitekit_"+t));return r&&"object"===a()(r)&&r.date&&(!n||Date.now()/1e3-r.date<n)?(e._googlesitekitLegacyData.admin.datacache[t]=Object(i.cloneDeep)(r.value),Object(i.cloneDeep)(e._googlesitekitLegacyData.admin.datacache[t])):void 0}},d=function(t){s(),delete e._googlesitekitLegacyData.admin.datacache[t],Object(o.a)().removeItem("googlesitekit_"+t)},g=function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=[],o=[e,t,n],s=0,l=o;s<l.length;s++){var u=l[s];if(!u||!u.length)break;i.push(u)}return 3===i.length&&r&&"object"===a()(r)&&Object.keys(r).length&&i.push(Object(c.a)(r)),i.join("::")}}).call(this,n(16))},3:function(e,t,n){"use strict";(function(e,r){n.d(t,"t",(function(){return S})),n.d(t,"r",(function(){return x})),n.d(t,"o",(function(){return C})),n.d(t,"s",(function(){return P})),n.d(t,"i",(function(){return L})),n.d(t,"c",(function(){return A})),n.d(t,"g",(function(){return R})),n.d(t,"k",(function(){return I})),n.d(t,"m",(function(){return T})),n.d(t,"n",(function(){return M})),n.d(t,"z",(function(){return U})),n.d(t,"A",(function(){return q})),n.d(t,"b",(function(){return F})),n.d(t,"x",(function(){return H})),n.d(t,"v",(function(){return B})),n.d(t,"f",(function(){return G})),n.d(t,"q",(function(){return W})),n.d(t,"j",(function(){return K}));var a=n(4),i=n.n(a),o=n(11),c=n.n(o),s=n(49),l=n.n(s),u=n(33),d=n.n(u),g=(n(1),n(12)),f=n(13),p=n(0),m=n(37),h=n(154),b=n(30);n.d(t,"a",(function(){return b.a}));var v=n(50);n.d(t,"y",(function(){return v.c}));var k=n(21),y=n(57);n.d(t,"u",(function(){return y.a}));var _=n(56);n.d(t,"w",(function(){return _.a}));var O=n(54);n.d(t,"d",(function(){return O.b})),n.d(t,"l",(function(){return O.c}));n(40);var w=n(60);function j(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"p",(function(){return w.a})),n.d(t,"e",(function(){return k.a})),n.d(t,"h",(function(){return k.b}));var D=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(g.isFinite)(e)?e:Number(e),Object(g.isFinite)(e)||(console.warn("Invalid number",e,d()(e)),e=0),t)return x(e,{style:"currency",currency:t});var n={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
|
9 |
+
Object(p.__)("%sM","google-site-kit"),x(D(e),e%10==0?{}:n)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
10 |
+
Object(p.__)("%sK","google-site-kit"),x(D(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
11 |
+
Object(p.__)("%sK","google-site-kit"),x(D(e),e%10==0?{}:n)):e.toString()},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?N():n,a=l()(t,["locale"]);return new Intl.NumberFormat(r,a).format(e)},N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(g.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language},C=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},P=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},L=function(e,t){var n=1e3*C("day"),r=e.getTime(),a=t.getTime();return Math.round(Math.abs(r-a)/n)},A=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},R=function(e,t){return Object(g.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},I=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e._googlesitekitLegacyData,n=t.modules;return n?Object.keys(n).reduce((function(e,t){return"object"!==d()(n[t])?e:void 0===n[t].slug||void 0===n[t].name||n[t].slug!==t?e:E({},e,c()({},t,n[t]))}),{}):{}},T=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e._googlesitekitLegacyData,a=r.admin,i=a.connectURL,o=a.adminRoot,c=r.setup.needReauthenticate,s=I(r)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},u=Object(m.a)(o,E({page:t&&n&&s?s:"googlesitekit-dashboard",slug:t,reAuth:n},l));if(!c)return u;var d=encodeURIComponent(Object(h.a)(u));return u=o+"?"+d,Object(m.a)(i,{redirect:u,status:n})},M=function(t,n){var r=e._googlesitekitLegacyData.admin.adminRoot;return t||(t="googlesitekit-dashboard"),n=E({page:t},n),Object(m.a)(r,n)},U=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},q=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},F=function(e,t,n){var r,a,o,c,s=arguments;return i.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:return r=s.length>3&&void 0!==s[3]?s[3]:v.c,a=s.length>4&&void 0!==s[4]?s[4]:I,l.next=4,i.a.awrap(e.setModuleActive(t,n));case 4:return o=l.sent,(c=a())[t]&&(c[t].active=n),l.next=9,i.a.awrap(r("".concat(t,"_setup"),n?"module_activate":"module_deactivate",t));case 9:return l.abrupt("return",o);case 10:case"end":return l.stop()}}))},H=function(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e._googlesitekitLegacyData,o=I(i)[t],c=o.settings,s=o.setupComplete,l=a||document.getElementById("confirm-changes-".concat(t));if(s&&l){var u=!!Object.keys(n).find((function(e){var t=n[e];return!Object(g.isEqual)(r[e],c[t])}));return a||(l.disabled=!u),u}},B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(f.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(k.b)(e,t),1)},G=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(g.unescape)(t)};function W(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e._googlesitekitLegacyData){var c=r.createElement(b.a,{id:t,width:a,height:i,className:o});return n?c=r.createElement(b.a,{id:"".concat(t,"-disabled"),width:a,height:i,className:o}):"pagespeed-insights"===t&&(c=r.createElement("img",{src:e._googlesitekitLegacyData.admin.assetsRoot+"images/icon-pagespeed.png",width:a,alt:"",className:o})),c}}function K(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,r=n.blogPrefix;return n.isNetworkMode?t:r+t}}).call(this,n(16),n(10))},30:function(e,t,n){"use strict";(function(e,r){n(1);var a=n(2),i=n.n(a),o=n(17),c=n.n(o),s=function SvgIcon(t){var n=t.id,a=t.className,i=t.height,o=t.width,s="".concat(e._googlesitekitLegacyData.admin.assetsRoot,"svg/svg.svg");return r.createElement("svg",{className:c()("svg",a),height:i,width:o},r.createElement("use",{xlinkHref:"".concat(s,"#").concat(n)}))};s.propTypes={id:i.a.string.isRequired,className:i.a.string,height:i.a.string,width:i.a.string},s.defaultProps={className:"",height:20,width:20},t.a=s}).call(this,n(16),n(10))},31:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(18),g=n.n(d),f=n(9),p=n.n(f),m=n(1),h=n(2),b=n.n(h),v=n(17),k=n.n(v),y=n(129),_=n(60),O=n(77),w=function(t){function DataBlock(e){var t;return a()(this,DataBlock),(t=s()(this,u()(DataBlock).call(this,e))).handleClick=t.handleClick.bind(g()(t)),t.handleKeyPress=t.handleKeyPress.bind(g()(t)),t}return p()(DataBlock,t),o()(DataBlock,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,n=t.stat,r=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||r(n)}},{key:"render",value:function(){var t=this.props,n=t.className,r=t.title,a=t.datapoint,i=t.datapointUnit,o=t.change,c=t.changeDataUnit,s=t.context,l=t.period,u=t.selected,d=t.handleStatSelection,g=t.source,f=t.sparkline,p=t.invertChangeColor,h="button"===s?"button":"",b=f;return b&&p&&(b=Object(m.d)(f,{invertChangeColor:p})),e.createElement("div",{className:k()("googlesitekit-data-block",n,"googlesitekit-data-block--".concat(s),{"googlesitekit-data-block--selected":u}),tabIndex:"button"===s?"0":"-1",role:d&&h,onClick:d&&this.handleClick,onKeyPress:d&&this.handleKeyPress,"aria-label":d&&r,"aria-pressed":d&&u},e.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},r),e.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(a).concat(i))),b&&e.createElement("div",{className:"googlesitekit-data-block__sparkline"},b),e.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},e.createElement("div",{className:"googlesitekit-data-block__change"},""===o&&e.createElement(m.b,null," "),o&&e.createElement(m.b,null,e.createElement("span",{className:"googlesitekit-data-block__arrow"},e.createElement(y.a,{direction:0<parseFloat(o)?"up":"down",invertColor:p})),e.createElement("span",{className:"googlesitekit-data-block__value"},"".concat(Object(_.b)(Math.abs(o))).concat(c," ").concat(l)))),g&&e.createElement(O.a,{className:"googlesitekit-data-block__source",name:g.name,href:g.link})))}}]),DataBlock}(m.a);w.propTypes={stat:b.a.number,onClick:b.a.func,className:b.a.string,title:b.a.string,datapoint:b.a.oneOfType([b.a.string,b.a.number]),datapointUnit:b.a.string,change:b.a.oneOfType([b.a.string,b.a.number]),changeDataUnit:b.a.string,context:b.a.string,period:b.a.string,selected:b.a.bool,handleStatSelection:b.a.func,invertChangeColor:b.a.bool},w.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,invertChangeColor:!1},t.a=w}).call(this,n(10))},32:function(e,t,n){"use strict";var r=n(88),a=n.n(r);n.d(t,"k",(function(){return a.a})),n.d(t,"a",(function(){return r.HelperText})),n.d(t,"b",(function(){return r.Input}));var i=n(145);n.d(t,"g",(function(){return i.a}));var o=n(221);n.d(t,"e",(function(){return o.a}));var c=n(112),s=n.n(c);n.d(t,"j",(function(){return s.a})),n.d(t,"i",(function(){return c.Option}));var l=n(222);n.d(t,"h",(function(){return l.a}));var u=n(218);n.d(t,"d",(function(){return u.a}));var d=n(219);n.d(t,"c",(function(){return d.a}));var g=n(217);n.d(t,"f",(function(){return g.a}))},333:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return x}));var a=n(49),i=n.n(a),o=n(5),c=n.n(o),s=n(6),l=n.n(s),u=n(7),d=n.n(u),g=n(8),f=n.n(g),p=n(9),m=n.n(p),h=n(4),b=n.n(h),v=n(1),k=n(0),y=n(2),_=n.n(y),O=n(114),w=n(44),j=n(124),E=n(14),D=n(25),S=[function(){var t;return b.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(t=e.location.hostname,!["localhost","127.0.0.1"].includes(t)&&!t.match(/\.(example|invalid|localhost|test)$/)){n.next=3;break}throw"invalid_hostname";case 3:case"end":return n.stop()}}))},function(){var e,t,n;return b.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,b.a.awrap(E.c.set(E.a,"site","setup-tag"));case 2:return e=r.sent,t=e.token,r.next=6,b.a.awrap(Object(j.a)("setup").catch((function(){throw"tag_fetch_failed"})));case 6:if(n=r.sent,t===n){r.next=9;break}throw"setup_token_mismatch";case 9:case"end":return r.stop()}}))}],x=function(t){function CompatibilityChecks(t){var n;c()(this,CompatibilityChecks);var r=e._googlesitekitLegacyData.setup.isSiteKitConnected;return(n=d()(this,f()(CompatibilityChecks).call(this,t))).state={complete:r,error:null,developerPlugin:{}},n}return m()(CompatibilityChecks,t),l()(CompatibilityChecks,[{key:"componentDidMount",value:function(){var e,t,n,r;return b.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(!this.state.complete){a.next=2;break}return a.abrupt("return");case 2:a.prev=2,e=0,t=S;case 4:if(!(e<t.length)){a.next=11;break}return n=t[e],a.next=8,b.a.awrap(n());case 8:e++,a.next=4;break;case 11:a.next=19;break;case 13:return a.prev=13,a.t0=a.catch(2),a.next=17,b.a.awrap(E.c.get(E.a,"site","developer-plugin"));case 17:r=a.sent,this.setState({error:a.t0,developerPlugin:r});case 19:this.setState({complete:!0});case 20:case"end":return a.stop()}}),null,this,[[2,13]])}},{key:"helperCTA",value:function(){var e=this.state.developerPlugin,t=e.installed,n=e.active,r=e.installURL,a=e.activateURL,i=e.configureURL;return!t&&r?{labelHTML:Object(k.__)('Install<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:r,external:!1}:t&&!n&&a?{labelHTML:Object(k.__)('Activate<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:a,external:!1}:t&&n&&i?{labelHTML:Object(k.__)('Configure<span class="screen-reader-text"> the helper plugin</span>',"google-site-kit"),href:i,external:!1}:{labelHTML:Object(k.__)('Learn how<span class="screen-reader-text"> to install and use the helper plugin</span>',"google-site-kit"),href:"https://sitekit.withgoogle.com/documentation/using-site-kit-on-a-staging-environment/",external:!0}}},{key:"renderError",value:function(e){var t=this.state.developerPlugin.installed,n=this.helperCTA(),a=n.labelHTML,i=n.href,o=n.external;switch(e){case"invalid_hostname":case"tag_fetch_failed":return r.createElement(v.b,null,!t&&Object(k.__)("Looks like this may be a staging environment. If so, you’ll need to install a helper plugin and verify your production site in Search Console.","google-site-kit"),t&&Object(k.__)("Looks like this may be a staging environment and you already have the helper plugin. Before you can use Site Kit, please make sure you’ve provided the necessary credentials in the Authentication section and verified your production site in Search Console.","google-site-kit")," ",r.createElement(D.a,{href:i,dangerouslySetInnerHTML:{__html:a},external:o,inherit:!0}));case"setup_token_mismatch":return Object(k.__)("Looks like you may be using a caching plugin which could interfere with setup. Please deactivate any caching plugins before setting up Site Kit. You may reactivate them once setup has been completed.","google-site-kit")}}},{key:"render",value:function(){var e,t,n=this.state,a=n.complete,o=n.error,c=this.props,s=c.children,l=i()(c,["children"]);return o&&(e=r.createElement(v.b,null,r.createElement("div",{className:"googlesitekit-setup-compat mdc-layout-grid mdc-layout-grid--align-left"},r.createElement("div",{className:"mdc-layout-grid__inner"},r.createElement(O.a,null),r.createElement("div",{className:"googlesitekit-heading-4 mdc-layout-grid__cell--span-11"},Object(k.__)("Your site may not be ready for Site Kit","google-site-kit"))),r.createElement("p",null,this.renderError(o))))),a||(t=r.createElement("div",{style:{alignSelf:"center",marginLeft:"1rem"}},r.createElement("small",null,Object(k.__)("Checking Compatibility…","google-site-kit")),r.createElement(w.a,{small:!0,compress:!0}))),s({restProps:l,complete:a,error:o,inProgressFeedback:t,CTAFeedback:e})}}]),CompatibilityChecks}(v.a);x.propTypes={children:_.a.func.isRequired}}).call(this,n(16),n(10))},34:function(e,t,n){"use strict";(function(e){var r=n(11),a=n.n(r),i=n(4),o=n.n(i),c=n(5),s=n.n(c),l=n(6),u=n.n(l),d=n(7),g=n.n(d),f=n(8),p=n.n(f),m=n(18),h=n.n(m),b=n(9),v=n.n(b),k=n(1),y=n(2),_=n.n(y),O=n(17),w=n.n(O),j=n(12),E=n(30),D=n(57),S=n(29),x=n(31),N=n(39),C=n(114),P=n(130),L=n(25),A=function(t){function Notification(e){var t;return s()(this,Notification),(t=g()(this,p()(Notification).call(this,e))).state={isClosed:!1},t.cardRef=Object(k.h)(),t.handleDismiss=t.handleDismiss.bind(h()(t)),t.handleCTAClick=t.handleCTAClick.bind(h()(t)),0<t.props.dismissExpires&&t.expireDismiss(),t.props.showOnce&&Object(S.e)("notification::displayed::".concat(t.props.id),new Date),t}return v()(Notification,t),u()(Notification,[{key:"handleDismiss",value:function(e){var t;return o.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.persist(),e.preventDefault(),!(t=this.props.onDismiss)){n.next=6;break}return n.next=6,o.a.awrap(t(e));case 6:this.dismiss();case 7:case"end":return n.stop()}}),null,this)}},{key:"dismiss",value:function(){var e=this,t=this.cardRef.current;this.setState({isClosed:!0}),setTimeout((function(){Object(S.e)("notification::dismissed::".concat(e.props.id),new Date),t.style.display="none";var n=new Event("notificationDismissed");document.dispatchEvent(n)}),350)}},{key:"handleCTAClick",value:function(e){var t,n,r;return o.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.persist(),t=this.props,n=t.isDismissable,!(r=t.onCTAClick)){a.next=5;break}return a.next=5,o.a.awrap(r(e));case 5:n&&this.dismiss();case 6:case"end":return a.stop()}}),null,this)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,n=e.dismissExpires,r=Object(S.b)("notification::dismissed::".concat(t));if(r){var a=new Date(r);a.setSeconds(a.getSeconds()+parseInt(n,10)),a<new Date&&Object(S.a)("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var t,n=this.state.isClosed,r=this.props,i=r.children,o=r.id,c=r.title,s=r.description,l=r.blockData,u=r.winImage,d=r.smallImage,g=r.format,f=r.learnMoreURL,p=r.learnMoreDescription,m=r.learnMoreLabel,h=r.ctaLink,b=r.ctaLabel,v=r.ctaTarget,y=r.type,_=r.dismiss,O=r.isDismissable,A=r.logo,R=r.module,I=r.moduleName,T=r.pageIndex,M=r.anchorLink,U=r.anchorLinkLabel;if(Object(S.b)("notification::dismissed::".concat(o)))return null;var q,F=n?"is-closed":"is-open",H="large"===g&&"win-stats-increase"===y,B="mdc-layout-grid__cell--span-12";"large"===g?(B="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",H&&(B="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===g&&(B="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),q="win-warning"===y?e.createElement(C.a,null):"win-error"===y?e.createElement(P.a,null):"";var G=e.createElement(k.b,null,l&&e.createElement("div",{className:"mdc-layout-grid__inner"},Object(j.map)(l,(function(t,n){return e.createElement("div",{key:n,className:w()("mdc-layout-grid__cell",{"mdc-layout-grid__cell--span-5-desktop":H,"mdc-layout-grid__cell--span-4-desktop":!H})},e.createElement("div",{className:"googlesitekit-publisher-win__stats"},e.createElement(x.a,t)))})))),W=e.createElement(k.b,null,c&&e.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},c),M&&U&&e.createElement("p",{className:"googlesitekit-publisher-win__link"},e.createElement(L.a,{href:M},U)),s&&e.createElement("div",{className:"googlesitekit-publisher-win__desc"},e.createElement("p",null,Object(k.i)(s)?s:e.createElement("span",{dangerouslySetInnerHTML:Object(D.a)(s,{ALLOWED_TAGS:["strong","em","br","a"],ALLOWED_ATTR:["href"]})}),m&&e.createElement(k.b,null," ",e.createElement(L.a,{href:f,external:!0,inherit:!0},m),p),T&&e.createElement("span",{className:"googlesitekit-publisher-win__detect"},T))),i),K=R?e.createElement(E.a,{id:R,height:"19",width:"19"}):e.createElement(E.a,{id:"logo-g",height:"34",width:"32"});return e.createElement("section",{ref:this.cardRef,className:w()("googlesitekit-publisher-win",(t={},a()(t,"googlesitekit-publisher-win--".concat(g),g),a()(t,"googlesitekit-publisher-win--".concat(y),y),a()(t,"googlesitekit-publisher-win--".concat(F),F),t))},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},A&&e.createElement("div",{className:w()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",{"mdc-layout-grid__cell--order-2-phone":H,"mdc-layout-grid__cell--order-1-tablet":H})},e.createElement("div",{className:"googlesitekit-publisher-win__logo"},K),I&&e.createElement("div",{className:"googlesitekit-publisher-win__module-name"},I)),d&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:d})),e.createElement("div",{className:w()("mdc-layout-grid__cell",B)},H?e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},W),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},G)):e.createElement(k.b,null,W,G),h&&e.createElement(N.a,{href:h,target:v,onClick:this.handleCTAClick},b),O&&_&&e.createElement(L.a,{onClick:this.handleDismiss},_)),u&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement("div",{className:"googlesitekit-publisher-win__image-large"},e.createElement("img",{alt:"",src:u}))),("win-error"===y||"win-warning"===y)&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("div",{className:"googlesitekit-publisher-win__icons"},q)))))}}]),Notification}(k.a);A.propTypes={id:_.a.string.isRequired,title:_.a.string.isRequired,description:_.a.node,learnMoreURL:_.a.string,learnMoreDescription:_.a.string,learnMoreLabel:_.a.string,blockData:_.a.array,winImage:_.a.string,smallImage:_.a.string,format:_.a.string,ctaLink:_.a.string,ctaLabel:_.a.string,type:_.a.string,dismiss:_.a.string,isDismissable:_.a.bool,logo:_.a.bool,module:_.a.string,moduleName:_.a.string,pageIndex:_.a.string,dismissExpires:_.a.number,showOnce:_.a.bool,onCTAClick:_.a.func,onDismiss:_.a.func,anchorLink:_.a.string,anchorLinkLabel:_.a.string},A.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1},t.a=A}).call(this,n(10))},35:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r="_googlesitekitDataLayer",a="data-googlesitekit-gtag"},39:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(17),b=n.n(h),v=n(32),k=function(t){function Button(e){var t;return a()(this,Button),(t=s()(this,u()(Button).call(this,e))).buttonRef=Object(f.h)(),t}return g()(Button,t),o()(Button,[{key:"componentDidMount",value:function(){new v.g(this.buttonRef.current)}},{key:"render",value:function(){var t=this.props,n=t.onClick,r=t.children,a=t.href,i=t.text,o=t.className,c=t.danger,s=t.disabled,l=t.target,u=t.id,d=t.icon,g=t.trailingIcon,f=t.ariaHaspopup,p=t.ariaExpanded,m=t.ariaControls,h=a&&!s?"a":"button";return e.createElement(h,{className:b()("mdc-button",o,{"mdc-button--raised":!i,"mdc-button--danger":c}),onClick:n,href:s?void 0:a,ref:this.buttonRef,disabled:!!s,target:l||"_self",id:u,"aria-haspopup":f,"aria-expanded":p,"aria-controls":m},d&&d,e.createElement("span",{className:"mdc-button__label"},r),g&&g)}}]),Button}(f.a);k.propTypes={onClick:m.a.func,children:m.a.string.isRequired,href:m.a.string,text:m.a.bool,className:m.a.string,danger:m.a.bool,disabled:m.a.bool,icon:m.a.element,trailingIcon:m.a.element,ariaHaspopup:m.a.string,ariaExpanded:m.a.bool,ariaControls:m.a.string},k.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=k}).call(this,n(10))},393:function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return ActivationApp}));var a=n(4),i=n.n(a),o=n(1),c=n(0),s=n(3),l=n(394),u=n(234);function ActivationApp(){var t=e._googlesitekitBaseData,n=t.proxySetupURL,a=t.splashURL,d=e._googlesitekitLegacyData.permissions.canViewDashboard,g=e._googlesitekitLegacyData.dashboardPermalink,f=n||a,p=Object(c.__)("Start setup","google-site-kit");d&&(f=g,p=Object(c.__)("Go to Dashboard","google-site-kit"));var m=Object(o.l)((function(t){return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t.preventDefault(),r.next=3,i.a.awrap(Object(s.y)("plugin_setup",n?"proxy_start_setup_banner":"goto_sitekit"));case 3:e.location.assign(f);case 4:case"end":return r.stop()}}))}));return r.createElement(o.b,null,r.createElement(u.a,null),r.createElement(l.a,{buttonURL:f,buttonLabel:p,onButtonClick:m}))}}).call(this,n(16),n(10))},394:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ActivationMain}));var r=n(1),a=n(0),i=n(2),o=n.n(i),c=n(39),s=n(133),l=n(252),u=n(333);function ActivationMain(t){var n=t.buttonURL,i=t.onButtonClick,o=t.buttonLabel;return e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12 "},e.createElement(s.a,null),e.createElement("h3",{className:"googlesitekit-heading-3 googlesitekit-activation__title"},Object(a.__)("Congratulations, the Site Kit plugin is now activated.","google-site-kit")),e.createElement(u.a,null,(function(t){var a=t.complete,s=t.inProgressFeedback,u=t.CTAFeedback;return e.createElement(r.b,null,u,e.createElement(l.a,{optinAction:"analytics_optin_setup_banner"}),e.createElement("div",{className:"googlesitekit-start-setup-wrap"},e.createElement(c.a,{id:"start-setup-link",className:"googlesitekit-start-setup",href:n,onClick:i,disabled:!a},o),s))})))))}ActivationMain.propTypes={buttonURL:o.a.string.isRequired,onButtonClick:o.a.func,buttonLabel:o.a.string.isRequired}}).call(this,n(10))},40:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r,a=n(5),i=n.n(a),o=n(6),c=n.n(o),s=function(t){var n=e[t];if(!n)return!1;try{var r="__storage_test__";return n.setItem(r,r),n.removeItem(r),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==n.length}},l=function(){function NullStorage(){i()(this,NullStorage)}return c()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),u=function(){return r||(r=s("sessionStorage")?e.sessionStorage:s("localStorage")?e.localStorage:new l),r}}).call(this,n(16))},42:function(e,t){e.exports=googlesitekit.api},43:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return b}));var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(20),s=n.n(c),l=n(101),u=n.n(l),d=n(66),g=n(3);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(e){return p({},e)},h=function(){return{}},b=function(t){var n,r,i=t.baseName,c=t.controlCallback,l=t.reducerCallback,f=void 0===l?m:l,b=t.argsToParams,v=void 0===b?h:b;s()(i,"baseName is required."),s()("function"==typeof c,"controlCallback is required and must be a function."),s()("function"==typeof f,"reducerCallback must be a function."),s()("function"==typeof v,"argsToParams must be a function.");try{v(),r=!1}catch(e){r=!0}var k=Object(d.b)(i),y=Object(d.a)(i),_="FETCH_".concat(y),O="START_".concat(_),w="FINISH_".concat(_),j="CATCH_".concat(_),E="RECEIVE_".concat(y),D="fetch".concat(k),S="receive".concat(k),x="isFetching".concat(k),N=o()({},x,{}),C=(n={},o()(n,D,a.a.mark((function t(){var n,r,i,o=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,i=v.apply(void 0,o),t.next=9;break;case 4:return t.prev=4,t.t0=t.catch(0),e.console.error(t.t0.message),r=t.t0,t.abrupt("return",{response:n,error:r});case 9:return t.next=11,{payload:{params:i},type:O};case 11:return t.prev=11,t.next=14,{payload:{params:i},type:_};case 14:return n=t.sent,t.next=17,C[S](n,i);case 17:return t.next=19,{payload:{params:i},type:w};case 19:t.next=26;break;case 21:return t.prev=21,t.t1=t.catch(11),r=t.t1,t.next=26,{payload:{error:r,params:i},type:j};case 26:return t.abrupt("return",{response:n,error:r});case 27:case"end":return t.stop()}}),t,null,[[0,4],[11,21]])}))),o()(n,S,(function(e,t){return s()(void 0!==e,"response is required."),r?s()(u()(t),"params is required."):t={},{payload:{response:e,params:t},type:E}})),n),P=o()({},_,(function(e){var t=e.payload;return c(t.params)})),L=o()({},x,(function(e){if(void 0===e[x])return!1;var t;try{for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];t=v.apply(void 0,r)}catch(e){return!1}return!!e[x][Object(g.w)(t)]}));return{INITIAL_STATE:N,actions:C,controls:P,reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case O:var a=r.params;return p({},e,o()({},x,p({},e[x],o()({},Object(g.w)(a),!0))));case E:var i=r.response,c=r.params;return f(e,i,c);case w:var s=r.params;return p({},e,o()({},x,p({},e[x],o()({},Object(g.w)(s),!1))));case j:var l=r.error,u=r.params;return p({},e,o()({error:l},x,p({},e[x],o()({},Object(g.w)(u),!1))));default:return p({},e)}},resolvers:{},selectors:L}}}).call(this,n(16))},44:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(17),b=n.n(h),v=function(t){function ProgressBar(){return a()(this,ProgressBar),s()(this,u()(ProgressBar).apply(this,arguments))}return g()(ProgressBar,t),o()(ProgressBar,[{key:"render",value:function(){var t=this.props,n=t.className,r=t.small,a=t.compress,i=t.height,o=i?Math.round(i/2):null;return e.createElement("div",{role:"progressbar",style:{marginTop:o,marginBottom:o},className:b()("mdc-linear-progress","mdc-linear-progress--indeterminate",n,{"mdc-linear-progress--small":r,"mdc-linear-progress--compress":a})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),ProgressBar}(f.a);v.propTypes={className:m.a.string,small:m.a.bool,compress:m.a.bool},v.defaultProps={className:"",small:!1,compress:!1},t.a=v}).call(this,n(10))},46:function(e,t,n){"use strict";function r(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function a(e){return(parseInt(e)||0)>0}function i(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},50:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return g}));var r=n(72),a=e._googlesitekitBaseData||{},i=a.isFirstAdmin,o=a.trackingAllowed,c={isFirstAdmin:i,trackingEnabled:a.trackingEnabled,trackingID:a.trackingID,referenceSiteURL:a.referenceSiteURL,userIDHash:a.userIDHash},s=Object(r.a)(c),l=s.enableTracking,u=s.disableTracking,d=s.isTrackingEnabled,g=s.trackEvent;function f(e){e?l():u()}!0===o&&f(d())}).call(this,n(16))},51:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(35);function a(e){return function(){e[r.a]=e[r.a]||[],e[r.a].push(arguments)}}},54:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(38),a=n.n(r),i=n(0),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),a=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(r&&a)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var s=document.createElement("span");return s.setAttribute("class","screen-reader-text"),s.textContent=Object(i.sprintf)(
|
|
|
|
|
12 |
/* translators: %d is the number of notifications */
|
13 |
+
Object(i._n)("%d notification","%d notifications",e,"google-site-kit"),e),o.appendChild(c),o.appendChild(s),t&&null===r&&t.appendChild(o),n&&null===a&&n.appendChild(o),o},c=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},s=function(e){for(var t=location.search.substr(1).split("&"),n={},r=0;r<t.length;r++)n[t[r].split("=")[0]]=decodeURIComponent(t[r].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):s(e);var r={},i=!0,o=!1,c=void 0;try{for(var l,u=n.searchParams.entries()[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var d=a()(l.value,2),g=d[0],f=d[1];r[g]=f}}catch(e){o=!0,c=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw c}}return r}}).call(this,n(16))},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(13),a=n(0);function i(){var e=Object(r.c)("googlesitekit.dateRange","last-28-days").match(/last-(\d+)-days/);if(e&&e[1])return Object(a.sprintf)(
|
14 |
+
/* translators: %s: Number of days matched. */
|
15 |
+
Object(a._n)("%s day","%s days",parseInt(e[1],10),"google-site-kit"),e[1]);throw new Error("Unrecognized date range slug used in `googlesitekit.dateRange`.")}function o(){return Object(r.c)("googlesitekit.dateRange","last-28-days")}},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),a=n.n(r),i=n(105),o=n.n(i),c=function(e){return o()(JSON.stringify(function e(t){var n={};Object.keys(t).sort().forEach((function(r){var i=t[r];i&&"object"===a()(i)&&!Array.isArray(i)&&(i=e(i)),n[r]=i}));return n}(e)))}},57:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:r.a.sanitize(e,t)}}},58:function(e,t,n){"use strict";(function(e){var r=n(27),a=n.n(r),i=e._googlesitekitAPIFetchData||{},o=i.nonce,c=i.nonceEndpoint,s=i.preloadedData,l=i.rootURL;a.a.nonceEndpoint=c,a.a.nonceMiddleware=a.a.createNonceMiddleware(o),a.a.rootURLMiddleware=a.a.createRootURLMiddleware(l),a.a.preloadingMiddleware=a.a.createPreloadingMiddleware(s),a.a.use(a.a.nonceMiddleware),a.a.use(a.a.mediaUploadMiddleware),a.a.use(a.a.rootURLMiddleware),a.a.use(a.a.preloadingMiddleware),t.default=a.a}).call(this,n(16))},597:function(e,t,n){"use strict";n.r(t),function(e){var t=n(1),r=n(204),a=n(3),i=(n(207),n(393)),o=n(134);Object(r.a)((function(){var n=document.getElementById("js-googlesitekit-activation");n&&(Object(a.p)(),Object(a.y)("plugin_setup","plugin_activated"),Object(t.k)(e.createElement(o.a,{dataAPIContext:"Activation"},e.createElement(i.a,null)),n),n.classList.remove("googlesitekit-activation--loading"))}))}.call(this,n(10))},60:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s}));var r=n(49),a=n.n(r),i=n(12),o=n(0);function c(){Object(o.setLocaleData)(e._googlesitekitLegacyData.locale,"google-site-kit")}var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?l():n,i=a()(t,["locale"]);return new Intl.NumberFormat(r,i).format(e)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(i.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,n(16))},66:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},a=function(e){return e.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()}},67:function(e,t,n){"use strict";(function(e){n.d(t,"g",(function(){return g})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return k})),n.d(t,"a",(function(){return y}));var r=n(4),a=n.n(r),i=n(13),o=n(12),c=n(3),s=n(152),l=n(14),u=n(29),d=Object(i.c)("googlesitekit.winCallbacks",{}),g=function(){return Object(i.c)("googlesitekit.WinsNotificationsRequest",[])},f=function(){return Object(i.c)("googlesitekit.ModulesNotificationsRequest",[])};function p(){var t,n,r,o;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if((t=e._googlesitekitLegacyData.setup).isSiteKitConnected&&(t.isAuthenticated||t.isVerified)){c.next=3;break}return c.abrupt("return",0);case 3:return n=0,c.next=6,a.a.awrap(b());case 6:return(r=c.sent)&&r.total&&(n+=r.total),c.next=10,a.a.awrap(v());case 10:return(o=c.sent)&&o.total&&(n+=o.total),n=Object(i.c)("googlesitekit.TotalNotifications",n),n=Math.max(0,Math.abs(n)),e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),c.abrupt("return",n);case 16:case"end":return c.stop()}}))}var m=function(e){return e?e.length?e.filter((function(e){return!Object(u.b)("notification::dismissed::".concat(e.id))})):e:[]},h=function(e){var t=function(e){return Object.keys(e).slice(0,1).map((function(t){return e[t]}))};if(1>=Object.keys(e).length)return e;var n=Object.values(e).filter((function(e){var t=Object(u.b)("notification::displayed::".concat(e[0].id));if(t){var n=new Date(t),r=new Date,a=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()));if(n.setHours(0,0,0),a.setHours(0,0,0),n.getTime()===a.getTime())return!0;7<=Object(c.i)(n,a)&&Object(u.a)("notification::displayed::".concat(e[0].id))}return null===t})),r=null,a=[];return 0<Object.keys(n).length?(r=t(n),a[Object.keys(n)[0]]=r):(r=t(e),a[Object.keys(e)[0]]=r)};function b(){var e,t,n,r;return a.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return e={},t=0,i.next=4,a.a.awrap(f());case 4:return n=i.sent,r=[],n.map((function(e){var t;return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,r;return a.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return n=e.identifier,i.t0=m,i.next=4,a.a.awrap(l.c.get(l.b,n,"notifications",{},!1));case 4:i.t1=i.sent,r=(0,i.t0)(i.t1),t({identifier:n,notifications:r});case 7:case"end":return i.stop()}}))})),r.push(t);case 2:case"end":return n.stop()}}))})),i.next=9,a.a.awrap(Promise.all(r).then((function(n){n.forEach((function(n){n.notifications.length&&(t+=n.notifications.length,e[n.identifier]=n.notifications)}))})));case 9:return i.abrupt("return",{results:e,total:t});case 10:case"end":return i.stop()}}))}function v(){var e,t,n,r,i;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return e={},t=0,c.next=4,a.a.awrap(g());case 4:return n=c.sent,c.next=7,a.a.awrap(new s.a(n).get());case 7:return r=c.sent,i=[],n.map((function(e){var t;return a.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:t=new Promise((function(t){var n,i,c,s,l;return a.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:n=e.identifier,i=e.callback||Object(o.camelCase)(n),c=null,s=[],e.withData?(l=r[n]||null,c=d[i](l,n)):c=d[i](n),s=m(s=c?[c]:[]),t({identifier:n,notifications:s});case 8:case"end":return a.stop()}}))})),i.push(t);case 2:case"end":return n.stop()}}))})),c.next=12,a.a.awrap(Promise.all(i).then((function(t){t.forEach((function(t){t.notifications.length&&(e[t.identifier]=t.notifications)}))})));case 12:return e=h(e),t=e.length||Object.keys(e).length||0,c.abrupt("return",{results:e,total:t});case 15:case"end":return c.stop()}}))}var k=function(t){var n=Math.abs(t.count)+1;return e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),{count:n}},y=function(t){var n=Math.max(0,Math.abs(t.count)-1);return e.localStorage&&e.localStorage.setItem("googlesitekit::total-notifications",n),{count:n}}}).call(this,n(16))},68:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return f}));var r,a=n(4),i=n.n(a),o=(n(81),["localStorage","sessionStorage"]),c=[].concat(o),s=function(t){var n,r;return i.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(n=e[t]){a.next=3;break}return a.abrupt("return",!1);case 3:return a.prev=3,r="__storage_test__",n.setItem(r,r),n.removeItem(r),a.abrupt("return",!0);case 10:return a.prev=10,a.t0=a.catch(3),a.abrupt("return",a.t0 instanceof DOMException&&(22===a.t0.code||1014===a.t0.code||"QuotaExceededError"===a.t0.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.t0.name)&&0!==n.length);case 13:case"end":return a.stop()}}),null,null,[[3,10]])},l=function(){var t,n,a,o,l,u;return i.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(!(e._googlesitekitLegacyData&&e._googlesitekitLegacyData.admin&&e._googlesitekitLegacyData.admin.nojscache)){d.next=2;break}return d.abrupt("return",null);case 2:if(void 0!==r){d.next=34;break}t=!0,n=!1,a=void 0,d.prev=6,o=c[Symbol.iterator]();case 8:if(t=(l=o.next()).done){d.next=19;break}if(u=l.value,!r){d.next=12;break}return d.abrupt("continue",16);case 12:return d.next=14,i.a.awrap(s(u));case 14:if(!d.sent){d.next=16;break}r=e[u];case 16:t=!0,d.next=8;break;case 19:d.next=25;break;case 21:d.prev=21,d.t0=d.catch(6),n=!0,a=d.t0;case 25:d.prev=25,d.prev=26,t||null==o.return||o.return();case 28:if(d.prev=28,!n){d.next=31;break}throw a;case 31:return d.finish(28);case 32:return d.finish(25);case 33:void 0===r&&(r=null);case 34:return d.abrupt("return",r);case 35:case"end":return d.stop()}}),null,null,[[6,21,25,33],[26,,28,32]])},u=function(e){var t,n,r,a,o=arguments;return i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:null,c.next=3,i.a.awrap(l());case 3:if(!(n=c.sent)){c.next=10;break}if(!(r=n.getItem("".concat("googlesitekit_").concat(e)))){c.next=10;break}if(!(a=JSON.parse(r)).timestamp||!(null===t||Math.round(Date.now()/1e3)-a.timestamp<t)){c.next=10;break}return c.abrupt("return",{cacheHit:!0,value:a.value});case 10:return c.abrupt("return",{cacheHit:!1,value:void 0});case 11:case"end":return c.stop()}}))},d=function(t,n){var r,a,o=arguments;return i.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:void 0,c.next=3,i.a.awrap(l());case 3:if(!(a=c.sent)){c.next=14;break}return c.prev=5,a.setItem("".concat("googlesitekit_").concat(t),JSON.stringify({timestamp:r||Math.round(Date.now()/1e3),value:n})),c.abrupt("return",!0);case 10:return c.prev=10,c.t0=c.catch(5),e.console.warn("Encountered an unexpected storage error:",c.t0),c.abrupt("return",!1);case 14:return c.abrupt("return",!1);case 15:case"end":return c.stop()}}),null,null,[[5,10]])},g=function(t){var n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.a.awrap(l());case 2:if(!(n=r.sent)){r.next=13;break}return r.prev=4,n.removeItem("".concat("googlesitekit_").concat(t)),r.abrupt("return",!0);case 9:return r.prev=9,r.t0=r.catch(4),e.console.warn("Encountered an unexpected storage error:",r.t0),r.abrupt("return",!1);case 13:return r.abrupt("return",!1);case 14:case"end":return r.stop()}}),null,null,[[4,9]])},f=function(){var t,n,r,a;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,i.a.awrap(l());case 2:if(!(t=o.sent)){o.next=14;break}for(o.prev=4,n=[],r=0;r<t.length;r++)0===(a=t.key(r)).indexOf("googlesitekit_")&&n.push(a.substring("googlesitekit_".length));return o.abrupt("return",n);case 10:return o.prev=10,o.t0=o.catch(4),e.console.warn("Encountered an unexpected storage error:",o.t0),o.abrupt("return",[]);case 14:return o.abrupt("return",[]);case 15:case"end":return o.stop()}}),null,null,[[4,10]])}}).call(this,n(16))},71:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r="core",a="modules"},72:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(11),a=n.n(r),i=n(73),o=n(74);function c(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var s={isFirstAdmin:!1,trackingEnabled:!1,trackingID:"",referenceSiteURL:"",userIDHash:""};function l(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s,{},t);return r.referenceSiteURL&&(r.referenceSiteURL=r.referenceSiteURL.toString().replace(/\/+$/,"")),{enableTracking:Object(i.a)(r,n),disableTracking:function(){r.trackingEnabled=!1},isTrackingEnabled:function(){return!!r.trackingEnabled},trackEvent:Object(o.a)(r,n)}}}).call(this,n(16))},73:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(51),a=n(35);function i(t,n){var i=Object(r.a)(n);return function(){t.trackingEnabled=!0;var n=e.document;if(!n.querySelector("script[".concat(a.b,"]"))){var r=n.createElement("script");r.setAttribute(a.b,""),r.async=!0,r.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(a.a),n.head.appendChild(r),i("js",new Date),i("config",t.trackingID)}}}}).call(this,n(16))},74:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u}));var r=n(4),a=n.n(r),i=n(11),o=n.n(i),c=n(51);function s(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(t,n){var r=Object(c.a)(n);return function(n,i){var o,c,s,u,d,g,f,p,m=arguments;return a.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(o=m.length>2&&void 0!==m[2]?m[2]:"",c=m.length>3&&void 0!==m[3]?m[3]:"",s=t.isFirstAdmin,u=t.referenceSiteURL,d=t.trackingEnabled,g=t.trackingID,f=t.userIDHash,d){a.next=5;break}return a.abrupt("return");case 5:return p={send_to:g,event_category:n,event_label:o,event_value:c,dimension1:u,dimension2:s?"true":"false",dimension3:f},a.abrupt("return",new Promise((function(t){var a=setTimeout((function(){e.console.warn('Tracking event "'.concat(i,'" (category "').concat(n,'") took too long to fire.')),t()}),1e3);r("event",i,l({},p,{event_callback:function(){clearTimeout(a),t()}}))})));case 7:case"end":return a.stop()}}))}}}).call(this,n(16))},77:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(17),b=n.n(h),v=n(0),k=n(25),y=function(t){function SourceLink(){return a()(this,SourceLink),s()(this,u()(SourceLink).apply(this,arguments))}return g()(SourceLink,t),o()(SourceLink,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.href,a=t.className,i=t.external;return e.createElement("div",{className:b()("googlesitekit-source-link",a)},[Object(v.__)("Source:","google-site-kit")," ",e.createElement(k.a,{key:"link",href:r,external:i,inherit:!0},n)])}}]),SourceLink}(f.a);y.propTypes={name:m.a.string,href:m.a.string,className:m.a.string,external:m.a.bool},y.defaultProps={name:"",href:"",className:"",external:!1},t.a=y}).call(this,n(10))},79:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(109),a=n.n(r)()(e)}).call(this,n(16))},84:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(34),m=function(t){function GenericError(){return a()(this,GenericError),s()(this,u()(GenericError).apply(this,arguments))}return g()(GenericError,t),o()(GenericError,[{key:"render",value:function(){return e.createElement(p.a,this.props)}}]),GenericError}(f.a);t.a=m}).call(this,n(10))},85:function(e,t,n){"use strict";var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(75),p=function(e){function ModuleSettingsWarning(){return a()(this,ModuleSettingsWarning),s()(this,u()(ModuleSettingsWarning).apply(this,arguments))}return g()(ModuleSettingsWarning,e),o()(ModuleSettingsWarning,[{key:"render",value:function(){return null}}]),ModuleSettingsWarning}(n(1).a);t.a=Object(f.a)("googlesitekit.ModuleSettingsWarning")(p)},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return k})),n.d(t,"b",(function(){return y}));var r=n(49),a=n.n(r),i=n(11),o=n.n(i),c=n(4),s=n.n(c),l=n(20),u=n.n(l),d=n(15),g=n.n(d),f=n(68);function p(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=g.a.createRegistryControl,b=function(e){var t;u()(e,"storeName is required to create a snapshot store.");var n={},r={deleteSnapshot:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})),restoreSnapshot:s.a.mark((function e(){var t,n,r,a,i,o,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:{},n=t.clearAfterRestore,r=void 0===n||n,e.next=3,{payload:{},type:"RESTORE_SNAPSHOT"};case 3:if(a=e.sent,i=a.cacheHit,o=a.value,!i){e.next=12;break}return e.next=9,{payload:{snapshot:o},type:"SET_STATE_FROM_SNAPSHOT"};case 9:if(!r){e.next=12;break}return e.next=12,{payload:{},type:"DELETE_SNAPSHOT"};case 12:return e.abrupt("return",i);case 13:case"end":return e.stop()}}),e)})),createSnapshot:s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{payload:{},type:"CREATE_SNAPSHOT"};case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)}))},i=(t={},o()(t,"DELETE_SNAPSHOT",(function(){return Object(f.a)("datastore::cache::".concat(e))})),o()(t,"CREATE_SNAPSHOT",h((function(t){return function(){return Object(f.d)("datastore::cache::".concat(e),t.stores[e].store.getState())}}))),o()(t,"RESTORE_SNAPSHOT",(function(){return Object(f.b)("datastore::cache::".concat(e),3600)})),t);return{INITIAL_STATE:n,actions:r,controls:i,reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0,r=t.type,i=t.payload;switch(r){case"SET_STATE_FROM_SNAPSHOT":var o=i.snapshot,c=(o.error,a()(o,["error"]));return m({},c);default:return m({},e)}}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Object.values(e.stores).filter((function(e){return Object.keys(e.getActions()).includes("restoreSnapshot")}))},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().createSnapshot()})))},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.a;return Promise.all(v(e).map((function(e){return e.getActions().restoreSnapshot()})))}},90:function(e,t,n){"use strict";n.d(t,"a",(function(){return d.b}));var r=n(15),a=n.n(r),i=n(4),o=n.n(i),c=n(11),s=n.n(c),l=n(42),u=n.n(l),d=n(24),g=n(43);function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var p=a.a.createRegistrySelector,m=Object(g.a)({baseName:"getAuthentication",controlCallback:function(){return u.a.get("core","user","authentication",void 0,{useCache:!1})},reducerCallback:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{authentication:t})}}),h={authentication:void 0},b={getAuthentication:o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.a.commonActions.getRegistry();case 2:if(t=e.sent,(0,t.select)(d.b).getAuthentication()){e.next=7;break}return e.next=7,m.actions.fetchGetAuthentication();case 7:case"end":return e.stop()}}),e)}))},v={getAuthentication:function(e){return e.authentication},isAuthenticated:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).authenticated}})),getGrantedScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).grantedScopes}})),getRequiredScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).requiredScopes}})),getUnsatisfiedScopes:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).unsatisfiedScopes}})),needsReauthentication:p((function(e){return function(){return(e(d.b).getAuthentication()||{}).needsReauthentication}}))},k=a.a.combineStores(m,{INITIAL_STATE:h,resolvers:b,selectors:v}),y=(k.INITIAL_STATE,k.actions,k.controls,k.reducer,k.resolvers,k.selectors,k);function _(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var O=a.a.createRegistrySelector,w=Object(g.a)({baseName:"disconnect",controlCallback:function(){return u.a.set("core","user","disconnect")},reducerCallback:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{disconnected:t})}}),j={disconnected:void 0},E={disconnect:o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.actions.fetchDisconnect();case 2:case"end":return e.stop()}}),e)}))},D={isDoingDisconnect:O((function(e){return function(){return e(d.b).isFetchingDisconnect()}}))},S=a.a.combineStores(w,{INITIAL_STATE:j,actions:E,selectors:D}),x=(S.INITIAL_STATE,S.actions,S.controls,S.reducer,S.resolvers,S.selectors,S);function N(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var C={INITIAL_STATE:{error:void 0},actions:{},controls:{},reducer:function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)},resolvers:{},selectors:{getError:function(e){return e.error}}},P=n(110),L=Object(P.a)("core","user","notifications",{server:!1}),A=n(20),R=n.n(A);function I(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(n,!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M={INITIAL_STATE:{permissionError:null},actions:{clearPermissionScopeError:function(){return{payload:{},type:"CLEAR_PERMISSION_SCOPE_ERROR"}},setPermissionScopeError:function(e){return R()(e,"permissionError is required."),{payload:{permissionError:e},type:"SET_PERMISSION_SCOPE_ERROR"}}},controls:{},reducer:function(e,t){var n=t.type,r=t.payload;switch(n){case"CLEAR_PERMISSION_SCOPE_ERROR":return T({},e,{permissionError:null});case"SET_PERMISSION_SCOPE_ERROR":return T({},e,{permissionError:r.permissionError});default:return T({},e)}},resolvers:{},selectors:{getPermissionScopeError:function(e){return e.permissionError}}},U=n(128),q=a.a.combineStores(a.a.commonStore,y,x,C,L,M,U.a);q.INITIAL_STATE,q.actions,q.controls,q.reducer,q.resolvers,q.selectors;a.a.registerStore(d.b,q)},94:function(e,t,n){"use strict";(function(e,r){var a=n(38),i=n.n(a),o=(n(1),n(156)),c=n.n(o),s=n(0),l=n(15),u=n.n(l),d=n(34),g=n(3),f=n(24),p=u.a.useSelect,m={siteverification:"site-verification",webmasters:"search-console"};t.a=function DashboardAuthAlert(){var t,n,a,o,l,u=p((function(e){return e(f.b).getUnsatisfiedScopes()})),h=p((function(t){return t(f.b).getConnectURL({redirectURL:e.location.href})}));if(void 0===u||void 0===h)return null;switch(u.some((function(e){return!e.match(/^https:\/\/www.googleapis.com\/auth\//)}))?t="generic":(a=u,o=Object(g.k)(),t=(n=a.map((function(e){return e.match(/^https:\/\/www.googleapis.com\/auth\/([a-z]+)/)})).map((function(e){var t=i()(e,2)[1];return m[t]||t})).map((function(e){var t;return(null===(t=o[e])||void 0===t?void 0:t.name)||!1}))).some((function(e){return!1===e}))?"generic":1<(n=c()(n)).length?"multiple":"single"),t){case"multiple":
|
16 |
/* translators: used between list items, there is a space after the comma. */
|
17 |
var b=Object(s.__)(", ","google-site-kit");l=Object(s.sprintf)(
|
18 |
/* translators: %s: List of product names */
|
19 |
Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for: %s – make sure to approve all permissions at the authentication stage.","google-site-kit"),n.join(b));break;case"single":l=Object(s.sprintf)(
|
20 |
/* translators: %1$s: Product name */
|
21 |
+
Object(s.__)("Site Kit can’t access the relevant data from %1$s because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup for %1$s – make sure to approve all permissions at the authentication stage.","google-site-kit"),n[0]);break;case"generic":l=Object(s.__)("Site Kit can’t access all relevant data because you haven’t granted all permissions requested during setup. To use Site Kit, you’ll need to redo the setup – make sure to approve all permissions at the authentication stage.","google-site-kit")}return r.createElement(d.a,{id:"authentication error",title:Object(s.__)("Site Kit can’t access necessary data","google-site-kit"),description:l,format:"small",type:"win-error",isDismissable:!1,ctaLink:h,ctaLabel:Object(s.__)("Redo setup","google-site-kit")})}}).call(this,n(16),n(10))},97:function(e,t,n){"use strict";(function(e){var r=n(5),a=n.n(r),i=n(6),o=n.n(i),c=n(7),s=n.n(c),l=n(8),u=n.n(l),d=n(9),g=n.n(d),f=n(1),p=n(2),m=n.n(p),h=n(203),b=n.n(h),v=n(17),k=n.n(v),y=n(142),_=n(0),O=n(39),w=n(25),j=n(32),E=function(t){function Dialog(){var e;return a()(this,Dialog),(e=s()(this,u()(Dialog).call(this))).state={attributes:[Object(_.__)("Audience overview","google-site-kit"),Object(_.__)("Top pages","google-site-kit"),Object(_.__)("Top acquisition sources","google-site-kit"),Object(_.__)("AdSense & Analytics metrics for top pages","google-site-kit")]},e.dialogRef=Object(f.h)(),e}return g()(Dialog,t),o()(Dialog,[{key:"componentDidMount",value:function(){new j.d(this.dialogRef.current)}},{key:"render",value:function(){var t=this.props,n=t.dialogActive,r=t.handleDialog,a=t.title,i=t.provides,o=t.handleConfirm,c=t.subtitle,s=t.confirmButton,l=t.dependentModules,u=t.instanceId,d=t.danger,g="googlesitekit-dialog-label-".concat(u),f="googlesitekit-dialog-description-".concat(u),p=!(!i||!i.length);return e.createElement("div",{ref:this.dialogRef,className:k()("mdc-dialog",{"mdc-dialog--open":n}),role:"alertdialog","aria-modal":"true","aria-labelledby":a?g:void 0,"aria-describedby":p?f:void 0,"aria-hidden":n?"false":"true",tabIndex:"-1"},e.createElement("div",{className:"mdc-dialog__scrim"}," "),e.createElement(b.a,{active:n},e.createElement("div",null,e.createElement("div",{className:"mdc-dialog__container"},e.createElement("div",{className:"mdc-dialog__surface"},a&&e.createElement("h2",{id:g,className:"mdc-dialog__title"},a),c&&e.createElement("p",{className:"mdc-dialog__lead"},c),p&&e.createElement("section",{id:f,className:"mdc-dialog__content"},e.createElement("ul",{className:"mdc-list mdc-list--underlined mdc-list--non-interactive"},i.map((function(t){return e.createElement("li",{className:"mdc-list-item",key:t},e.createElement("span",{className:"mdc-list-item__text"},t))})))),l&&e.createElement("p",{className:"mdc-dialog__dependecies"},e.createElement("strong",null,Object(_.__)("Note: ","google-site-kit")),l),e.createElement("footer",{className:"mdc-dialog__actions"},e.createElement(O.a,{onClick:o,danger:d},s||Object(_.__)("Disconnect","google-site-kit")),e.createElement(w.a,{className:"mdc-dialog__cancel-button",onClick:function(){return r()},inherit:!0},Object(_.__)("Cancel","google-site-kit"))))))))}}]),Dialog}(f.a);E.propTypes={dialogActive:m.a.bool,handleDialog:m.a.func,handleConfirm:m.a.func.isRequired,title:m.a.string,description:m.a.string,confirmButton:m.a.string,danger:m.a.bool},E.defaultProps={dialogActive:!1,handleDialog:null,title:null,description:null,confirmButton:null,danger:!1},t.a=Object(y.a)(E)}).call(this,n(10))}});
|
dist/assets/js/googlesitekit-admin.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
!function(e){function t(t){for(var n,
|
2 |
/* translators: %d is the number of notifications */
|
3 |
-
Object(
|
1 |
+
!function(e){function t(t){for(var n,a,u=t[0],c=t[1],_=t[2],s=0,p=[];s<u.length;s++)a=u[s],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(t);p.length;)p.shift()();return i.push.apply(i,_||[]),r()}function r(){for(var e,t=0;t<i.length;t++){for(var r=i[t],n=!0,a=1;a<r.length;a++){var u=r[a];0!==o[u]&&(n=!1)}n&&(i.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},o={6:0},i=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var a=window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var c=0;c<a.length;c++)t(a[c]);var l=u;i.push([604,0]),r()}({54:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return l}));var n=r(38),o=r.n(n),i=r(0),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,r=null,n=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),o=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(n&&o)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),r=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===r)return!1;var a=document.createElement("span");a.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var u=document.createElement("span");u.setAttribute("class","plugin-count"),u.setAttribute("aria-hidden","true"),u.textContent=e;var c=document.createElement("span");return c.setAttribute("class","screen-reader-text"),c.textContent=Object(i.sprintf)(
|
2 |
/* translators: %d is the number of notifications */
|
3 |
+
Object(i._n)("%d notification","%d notifications",e,"google-site-kit"),e),a.appendChild(u),a.appendChild(c),t&&null===n&&t.appendChild(a),r&&null===o&&r.appendChild(a),a},u=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},c=function(e){for(var t=location.search.substr(1).split("&"),r={},n=0;n<t.length;n++)r[t[n].split("=")[0]]=decodeURIComponent(t[n].split("=")[1]);return e?r.hasOwnProperty(e)?decodeURIComponent(r[e].replace(/\+/g," ")):"":r},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(t.href);if(e)return r.searchParams&&r.searchParams.get?r.searchParams.get(e):c(e);var n={},i=!0,a=!1,u=void 0;try{for(var l,_=r.searchParams.entries()[Symbol.iterator]();!(i=(l=_.next()).done);i=!0){var s=o()(l.value,2),p=s[0],d=s[1];n[p]=d}}catch(e){a=!0,u=e}finally{try{i||null==_.return||_.return()}finally{if(a)throw u}}return n}}).call(this,r(16))},604:function(e,t,r){"use strict";r.r(t),function(e){var t=r(54);if("toplevel_page_googlesitekit-dashboard"!==e.pagenow&&"site-kit_page_googlesitekit-splash"!==e.pagenow&&"admin_page_googlesitekit-splash"!==e.pagenow&&e.localStorage){var n=e.localStorage.getItem("googlesitekit::total-notifications")||0;Object(t.a)(n)}var o=document.querySelector("#wp-admin-bar-logout a");o||(o=document.querySelector(".sidebar__me-signout button")),o&&o.addEventListener("click",(function(){Object(t.b)()}))}.call(this,r(16))}});
|
dist/assets/js/googlesitekit-adminbar-loader.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],l=t[2],d=0,f=[];d<c.length;d++)a=c[d],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&f.push(i[a][0]),i[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(t);f.length;)f.shift()();return o.push.apply(o,l||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==i[c]&&(n=!1)}n&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},i={
|
2 |
/* translators: %d is the number of notifications */
|
3 |
-
Object(o._n)("%d notification","%d notifications",e,"google-site-kit"),e),a.appendChild(c),a.appendChild(u),t&&null===n&&t.appendChild(a),r&&null===i&&r.appendChild(a),a},c=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},u=function(e){for(var t=location.search.substr(1).split("&"),r={},n=0;n<t.length;n++)r[t[n].split("=")[0]]=decodeURIComponent(t[n].split("=")[1]);return e?r.hasOwnProperty(e)?decodeURIComponent(r[e].replace(/\+/g," ")):"":r},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(t.href);if(e)return r.searchParams&&r.searchParams.get?r.searchParams.get(e):u(e);var n={},o=!0,a=!1,c=void 0;try{for(var s,l=r.searchParams.entries()[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var d=i()(s.value,2),f=d[0],
|
1 |
+
!function(e){function t(t){for(var n,a,c=t[0],u=t[1],l=t[2],d=0,f=[];d<c.length;d++)a=c[d],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&f.push(i[a][0]),i[a]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(t);f.length;)f.shift()();return o.push.apply(o,l||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==i[c]&&(n=!1)}n&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=r[0]))}return e}var n={},i={7:0},o=[];function __webpack_require__(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.e=function(e){var t=[],r=i[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=i[e]=[t,n]}));t.push(r[2]=n);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,__webpack_require__.nc&&a.setAttribute("nonce",__webpack_require__.nc),a.src=function(e){return __webpack_require__.p+""+({1:"chunk-googlesitekit-adminbar",27:"vendors~chunk-googlesitekit-adminbar"}[e]||e)+"-"+{1:"ea54613856d9a3d69f8a",27:"941278ac0d5aba294d7f"}[e]+".js"}(e);var c=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(u);var r=i[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",c.name="ChunkLoadError",c.type=n,c.request=o,r[1](c)}i[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__.oe=function(e){throw console.error(e),e};var a=window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var s=c;o.push([603,0]),r()}({15:function(e,t){e.exports=googlesitekit.data},35:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));var n="_googlesitekitDataLayer",i="data-googlesitekit-gtag"},42:function(e,t){e.exports=googlesitekit.api},50:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return f}));var n=r(72),i=e._googlesitekitBaseData||{},o=i.isFirstAdmin,a=i.trackingAllowed,c={isFirstAdmin:o,trackingEnabled:i.trackingEnabled,trackingID:i.trackingID,referenceSiteURL:i.referenceSiteURL,userIDHash:i.userIDHash},u=Object(n.a)(c),s=u.enableTracking,l=u.disableTracking,d=u.isTrackingEnabled,f=u.trackEvent;function p(e){e?s():l()}!0===a&&p(d())}).call(this,r(16))},51:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(35);function i(e){return function(){e[n.a]=e[n.a]||[],e[n.a].push(arguments)}}},54:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s}));var n=r(38),i=r.n(n),o=r(0),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,r=null,n=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(n&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),r=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===r)return!1;var a=document.createElement("span");a.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var u=document.createElement("span");return u.setAttribute("class","screen-reader-text"),u.textContent=Object(o.sprintf)(
|
2 |
/* translators: %d is the number of notifications */
|
3 |
+
Object(o._n)("%d notification","%d notifications",e,"google-site-kit"),e),a.appendChild(c),a.appendChild(u),t&&null===n&&t.appendChild(a),r&&null===i&&r.appendChild(a),a},c=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},u=function(e){for(var t=location.search.substr(1).split("&"),r={},n=0;n<t.length;n++)r[t[n].split("=")[0]]=decodeURIComponent(t[n].split("=")[1]);return e?r.hasOwnProperty(e)?decodeURIComponent(r[e].replace(/\+/g," ")):"":r},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(t.href);if(e)return r.searchParams&&r.searchParams.get?r.searchParams.get(e):u(e);var n={},o=!0,a=!1,c=void 0;try{for(var s,l=r.searchParams.entries()[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var d=i()(s.value,2),f=d[0],p=d[1];n[f]=p}}catch(e){a=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw c}}return n}}).call(this,r(16))},603:function(e,t,r){"use strict";r.r(t),function(e){var t=r(54),n=r(50);e.googlesitekitAdminbar&&e.googlesitekitAdminbar.publicPath&&(r.p=e.googlesitekitAdminbar.publicPath);var i=!1;function o(){Promise.all([r.e(27),r.e(1)]).then(r.bind(null,615)).then((function(e){return e})).catch((function(){return new Error("Site Kit: An error occurred while loading the Adminbar component files.")})).then((function(e){try{e.init()}catch(e){console.error("Site Kit: An error occurred while loading the Adminbar components."),document.getElementById("js-googlesitekit-adminbar").classList.add("googlesitekit-adminbar--has-error")}document.getElementById("js-googlesitekit-adminbar").classList.remove("googlesitekit-adminbar--loading")}))}e.addEventListener("load",(function(){var r=document.getElementById("wp-admin-bar-google-site-kit");if(r&&e.localStorage){var a=e.localStorage.getItem("googlesitekit::total-notifications")||0;Object(t.a)(a);var c=function(){i||(Object(n.c)("admin_bar","page_stats_view"),o(),i=!0)};"true"===Object(t.c)("googlesitekit_adminbar_open")?(c(),r.classList.add("hover")):r.addEventListener("mouseenter",c,!1)}}))}.call(this,r(16))},72:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return s}));var n=r(11),i=r.n(n),o=r(73),a=r(74);function c(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r}var u={isFirstAdmin:!1,trackingEnabled:!1,trackingID:"",referenceSiteURL:"",userIDHash:""};function s(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(r,!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},u,{},t);return n.referenceSiteURL&&(n.referenceSiteURL=n.referenceSiteURL.toString().replace(/\/+$/,"")),{enableTracking:Object(o.a)(n,r),disableTracking:function(){n.trackingEnabled=!1},isTrackingEnabled:function(){return!!n.trackingEnabled},trackEvent:Object(a.a)(n,r)}}}).call(this,r(16))},73:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return o}));var n=r(51),i=r(35);function o(t,r){var o=Object(n.a)(r);return function(){t.trackingEnabled=!0;var r=e.document;if(!r.querySelector("script[".concat(i.b,"]"))){var n=r.createElement("script");n.setAttribute(i.b,""),n.async=!0,n.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(i.a),r.head.appendChild(n),o("js",new Date),o("config",t.trackingID)}}}}).call(this,r(16))},74:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return l}));var n=r(4),i=r.n(n),o=r(11),a=r.n(o),c=r(51);function u(e,t){var r=Object.keys(e);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e)),t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(r,!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(t,r){var n=Object(c.a)(r);return function(r,o){var a,c,u,l,d,f,p,g,_=arguments;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=_.length>2&&void 0!==_[2]?_[2]:"",c=_.length>3&&void 0!==_[3]?_[3]:"",u=t.isFirstAdmin,l=t.referenceSiteURL,d=t.trackingEnabled,f=t.trackingID,p=t.userIDHash,d){i.next=5;break}return i.abrupt("return");case 5:return g={send_to:f,event_category:r,event_label:a,event_value:c,dimension1:l,dimension2:u?"true":"false",dimension3:p},i.abrupt("return",new Promise((function(t){var i=setTimeout((function(){e.console.warn('Tracking event "'.concat(o,'" (category "').concat(r,'") took too long to fire.')),t()}),1e3);n("event",o,s({},g,{event_callback:function(){clearTimeout(i),t()}}))})));case 7:case"end":return i.stop()}}))}}}).call(this,r(16))}});
|
dist/assets/js/googlesitekit-api.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
!function(e){function t(t){for(var r,a,c=t[0],u=t[1],l=t[2],d=0,f=[];d<c.length;d++)a=c[d],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&f.push(i[a][0]),i[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,a=1;a<n.length;a++){var c=n[a];0!==i[c]&&(r=!1)}r&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},i={9:0},o=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var s=c;o.push([509,0]),n()}({1:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return g})),n.d(t,"b",(function(){return h})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return O})),n.d(t,"c",(function(){return E})),n.d(t,"l",(function(){return A})),n.d(t,"m",(function(){return C})),n.d(t,"n",(function(){return D})),n.d(t,"o",(function(){return I})),n.d(t,"p",(function(){return N})),n.d(t,"q",(function(){return q})),n.d(t,"r",(function(){return F})),n.d(t,"s",(function(){return T}));var r=n(110);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._element||r,o=i.__experimentalCreateInterpolateElement,a=i.Children,c=i.cloneElement,u=i.Component,s=i.concatChildren,l=i.createContext,d=i.createElement,f=i.createPortal,g=i.createRef,p=i.findDOMNode,v=i.forwardRef,h=i.Fragment,b=i.isEmptyElement,m=i.isValidElement,_=i.lazy,k=i.memo,w=i.Platform,y=i.RawHTML,O=i.render,j=i.renderToString,x=i.StrictMode,E=i.Suspense,S=i.switchChildrenNodeName,P=i.unmountComponentAtNode,A=i.useCallback,C=i.useContext,R=i.useDebugValue,D=i.useEffect,M=i.useImperativeHandle,I=i.useLayoutEffect,N=i.useMemo,q=i.useReducer,F=i.useRef,T=i.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:o,Children:a,cloneElement:c,Component:u,concatChildren:s,createContext:l,createElement:d,createPortal:f,createRef:g,findDOMNode:p,forwardRef:v,Fragment:h,isEmptyElement:b,isValidElement:m,lazy:_,memo:k,Platform:w,RawHTML:y,render:O,renderToString:j,StrictMode:x,Suspense:E,switchChildrenNodeName:S,unmountComponentAtNode:P,useCallback:A,useContext:C,useDebugValue:R,useEffect:D,useImperativeHandle:M,useLayoutEffect:I,useMemo:N,useReducer:q,useRef:F,useState:T})}).call(this,n(16))},12:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return p}));var r=n(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||r,o=i.addAction,a=i.addFilter,c=i.removeAction,u=i.removeFilter,s=i.hasAction,l=i.hasFilter,d=i.removeAllActions,f=i.removeAllFilters,g=i.doAction,p=i.applyFilters,v=i.currentAction,h=i.currentFilter,b=i.doingAction,m=i.doingFilter,_=i.didAction,k=i.didFilter,w=i.actions,y=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:o,addFilter:a,removeAction:c,removeFilter:u,hasAction:s,hasFilter:l,removeAllActions:d,removeAllFilters:f,doAction:g,applyFilters:p,currentAction:v,currentFilter:h,doingAction:b,doingFilter:m,didAction:_,didFilter:k,actions:w,filters:y})}).call(this,n(16))},20:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var r=n(95),i=n.n(r),o=n(1),a=function(e){return function(t){return function FilteredComponent(n){return Object(o.f)(o.b,{},"",Object(o.f)(t,n),e)}}},c=function(t,n){return function(r){return function InnerComponent(o){return e.createElement(t,i()({},o,n,{OriginalComponent:r}))}}}}).call(this,n(10))},25:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r="core/user",i="missing_required_scopes"},288:function(e,t,n){"use strict";(function(e){var r=n(4),i=n.n(r),o=n(21),a=n.n(o),c=n(54),u=n(39),s=n(67),l=n(3),d=n(25),f=!0,g=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[e,t,n].filter((function(e){return!!e&&e.length}));return 3===i.length&&r&&r.constructor===Object&&Object.keys(r).length&&i.push(Object(l.v)(r)),i.join("::")},p=function(t,n,r){var o,l,f,p,h,b,m,_,k,w,y,O,j,x,E,S,P,A,C=arguments;return i.a.async((function(R){for(;;)switch(R.prev=R.next){case 0:if(o=C.length>3&&void 0!==C[3]?C[3]:{},l=o.bodyParams,f=o.cacheTTL,p=void 0===f?3600:f,h=o.method,b=void 0===h?"GET":h,m=o.queryParams,_=o.useCache,k=void 0===_?void 0:_,a()(t,"`type` argument for requests is required."),a()(n,"`identifier` argument for requests is required."),a()(r,"`datapoint` argument for requests is required."),w="GET"===b&&(void 0!==k?k:v()),y=g(t,n,r,m),!w){R.next=14;break}return R.next=9,i.a.awrap(Object(s.b)(y,p));case 9:if(O=R.sent,j=O.cacheHit,x=O.value,!j){R.next=14;break}return R.abrupt("return",x);case 14:return R.prev=14,R.next=17,i.a.awrap(Object(c.default)({data:l,method:b,path:Object(u.a)("/google-site-kit/v1/".concat(t,"/").concat(n,"/data/").concat(r),m)}));case 17:if(E=R.sent,!w){R.next=21;break}return R.next=21,i.a.awrap(Object(s.d)(y,E));case 21:return R.abrupt("return",E);case 24:throw R.prev=24,R.t0=R.catch(14),R.t0.code===d.a&&(null===(S=e.googlesitekit)||void 0===S?void 0:null===(P=S.data)||void 0===P?void 0:null===(A=P.dispatch)||void 0===A?void 0:A.call(P,d.b))&&e.googlesitekit.data.dispatch(d.b).setPermissionScopeError(R.t0),e.console.error("Google Site Kit API Error",R.t0),R.t0;case 29:case"end":return R.stop()}}),null,null,[[14,24]])},v=function(){return f},h=function(e,t,n){var r;return i.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return r=g(e,t,n),o.next=3,i.a.awrap(Object(s.c)());case 3:o.sent.forEach((function(e){0===e.indexOf(r)&&Object(s.a)(e)}));case 5:case"end":return o.stop()}}))},b={invalidateCache:h,get:function(e,t,n,r){var o,a,c,u,s,l=arguments;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return o=l.length>4&&void 0!==l[4]?l[4]:{},a=o.cacheTTL,c=void 0===a?3600:a,u=o.useCache,s=void 0===u?void 0:u,i.abrupt("return",p(e,t,n,{cacheTTL:c,queryParams:r,useCache:s}));case 2:case"end":return i.stop()}}))},set:function(e,t,n,r){var o,a,c,u,s,l,d=arguments;return i.a.async((function(f){for(;;)switch(f.prev=f.next){case 0:return o=d.length>4&&void 0!==d[4]?d[4]:{},a=o.method,c=void 0===a?"POST":a,u=o.queryParams,s=void 0===u?{}:u,f.next=3,i.a.awrap(p(e,t,n,{bodyParams:{data:r},method:c,queryParams:s,useCache:!1}));case 3:return l=f.sent,f.next=6,i.a.awrap(h(e,t,n));case 6:return f.abrupt("return",l);case 7:case"end":return f.stop()}}))},setUsingCache:function(e){return f=!!e},usingCache:v};t.a=b}).call(this,n(16))},3:function(e,t,n){"use strict";(function(e,r){n.d(t,"s",(function(){return x})),n.d(t,"q",(function(){return E})),n.d(t,"n",(function(){return P})),n.d(t,"r",(function(){return A})),n.d(t,"h",(function(){return C})),n.d(t,"c",(function(){return R})),n.d(t,"f",(function(){return D})),n.d(t,"j",(function(){return M})),n.d(t,"l",(function(){return I})),n.d(t,"m",(function(){return N})),n.d(t,"y",(function(){return q})),n.d(t,"z",(function(){return F})),n.d(t,"b",(function(){return T})),n.d(t,"w",(function(){return L})),n.d(t,"u",(function(){return U})),n.d(t,"e",(function(){return H})),n.d(t,"p",(function(){return J})),n.d(t,"i",(function(){return z}));var i=n(14),o=n.n(i),a=n(51),c=n.n(a),u=n(35),s=n.n(u),l=(n(1),n(11)),d=n(12),f=n(0),g=n(39),p=n(202),v=n(31);n.d(t,"a",(function(){return v.a}));var h=n(50);n.d(t,"x",(function(){return h.c}));var b=n(20),m=n(58);n.d(t,"t",(function(){return m.a}));var _=n(62);n.d(t,"v",(function(){return _.a}));var k=n(56);n.d(t,"d",(function(){return k.b})),n.d(t,"k",(function(){return k.c}));n(44);var w=n(63);function y(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"o",(function(){return w.a})),n.d(t,"g",(function(){return b.b}));var j=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(l.isFinite)(e)?e:Number(e),Object(l.isFinite)(e)||(console.warn("Invalid number",e,s()(e)),e=0),t)return E(e,{style:"currency",currency:t});var n={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(f.sprintf)(// translators: %s: an abbreviated number in millions.
|
2 |
-
Object(
|
3 |
-
Object(
|
4 |
-
Object(f.__)("%sK","google-site-kit"),E(j(e),e%10==0?{}:n)):e.toString()},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?S():n,i=c()(t,["locale"]);return new Intl.NumberFormat(r,i).format(e)},S=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(l.get)(t,["googlesitekit","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language},P=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},A=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},C=function(e,t){var n=1e3*P("day"),r=e.getTime(),i=t.getTime();return Math.round(Math.abs(r-i)/n)},R=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},D=function(e,t){return Object(l.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.googlesitekit,n=t.modules;return n?Object.keys(n).reduce((function(e,t){return"object"!==s()(n[t])?e:void 0===n[t].slug||void 0===n[t].name||n[t].slug!==t?e:O({},e,o()({},t,n[t]))}),{}):{}},I=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.googlesitekit,i=r.admin,o=i.connectURL,a=i.adminRoot,c=r.setup.needReauthenticate,u=M(r)[t].screenID,s="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},l=Object(g.a)(a,O({page:t&&n&&u?u:"googlesitekit-dashboard",slug:t,reAuth:n},s));if(!c)return l;var d=encodeURIComponent(Object(p.a)(l));return l=a+"?"+d,Object(g.a)(o,{redirect:l,status:n})},N=function(t,n){var r=e.googlesitekit.admin.adminRoot;return t||(t="googlesitekit-dashboard"),n=O({page:t},n),Object(g.a)(r,n)},q=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},F=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},T=function(e,t,n){return e.setModuleActive(t,n).then((function(e){var n=M();return n[t]&&(n[t].active=e.active),Object(h.c)("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},L=function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.googlesitekit,a=M(o)[t],c=a.settings,u=a.setupComplete,s=i||document.getElementById("confirm-changes-".concat(t));if(u&&s){var d=!!Object.keys(n).find((function(e){var t=n[e];return!Object(l.isEqual)(r[e],c[t])}));return i||(s.disabled=!d),d}},U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(d.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(b.b)(e,t),1)},H=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(l.unescape)(t)};function J(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e.googlesitekit){var c=r.createElement(v.a,{id:t,width:i,height:o,className:a});return n?c=r.createElement(v.a,{id:"".concat(t,"-disabled"),width:i,height:o,className:a}):"pagespeed-insights"===t&&(c=r.createElement("img",{src:e.googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:a})),c}}function z(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,r=n.blogPrefix;return n.isNetworkMode?t:r+t}}).call(this,n(16),n(10))},31:function(e,t,n){"use strict";(function(e,r){n(1);var i=n(2),o=n.n(i),a=n(15),c=n.n(a),u=function SvgIcon(t){var n=t.id,i=t.className,o=t.height,a=t.width,u="".concat(e.googlesitekit.admin.assetsRoot,"svg/svg.svg");return r.createElement("svg",{className:c()("svg",i),height:o,width:a},r.createElement("use",{xlinkHref:"".concat(u,"#").concat(n)}))};u.propTypes={id:o.a.string.isRequired,className:o.a.string,height:o.a.string,width:o.a.string},u.defaultProps={className:"",height:20,width:20},t.a=u}).call(this,n(16),n(10))},38:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r="_googlesitekitDataLayer",i="data-googlesitekit-gtag"},44:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r,i=n(5),o=n.n(i),a=n(6),c=n.n(a),u=function(t){var n=e[t];if(!n)return!1;try{var r="__storage_test__";return n.setItem(r,r),n.removeItem(r),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==n.length}},s=function(){function NullStorage(){o()(this,NullStorage)}return c()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),l=function(){return r||(r=u("sessionStorage")?e.sessionStorage:u("localStorage")?e.localStorage:new s),r}}).call(this,n(16))},50:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return l}));var r=n(81),i=e._googlesitekitBaseData||{},o={isFirstAdmin:i.isFirstAdmin,trackingEnabled:i.trackingEnabled,trackingID:i.trackingID,referenceSiteURL:i.referenceSiteURL,userIDHash:i.userIDHash},a=Object(r.a)(o),c=a.enableTracking,u=a.disableTracking,s=a.isTrackingEnabled,l=a.trackEvent;function d(e){e?c():u()}d(s())}).call(this,n(16))},509:function(e,t,n){"use strict";n.r(t),function(e){var r=n(288);void 0===e.googlesitekit&&(e.googlesitekit={}),void 0===e.googlesitekit.api&&(e.googlesitekit.api=r.a),t.default=r.a}.call(this,n(16))},54:function(e,t,n){"use strict";(function(e){var r=n(27),i=n.n(r),o=e._googlesitekitAPIFetchData||{},a=o.nonce,c=o.nonceEndpoint,u=o.preloadedData,s=o.rootURL;i.a.nonceEndpoint=c,i.a.nonceMiddleware=i.a.createNonceMiddleware(a),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(s),i.a.preloadingMiddleware=i.a.createPreloadingMiddleware(u),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),t.default=i.a}).call(this,n(16))},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(38);function i(e){return function(){e[r.a]=e[r.a]||[],e[r.a].push(arguments)}}},56:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s}));var r=n(37),i=n.n(r),o=n(0),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(r&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var a=document.createElement("span");a.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var u=document.createElement("span");return u.setAttribute("class","screen-reader-text"),u.textContent=Object(o.sprintf)(
|
5 |
/* translators: %d is the number of notifications */
|
6 |
-
Object(o._n)("%d notification","%d notifications",e,"google-site-kit"),e),
|
1 |
+
!function(e){function t(t){for(var r,i,c=t[0],u=t[1],l=t[2],d=0,f=[];d<c.length;d++)i=c[d],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&f.push(a[i][0]),a[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,i=1;i<n.length;i++){var c=n[i];0!==a[c]&&(r=!1)}r&&(o.splice(t--,1),e=__webpack_require__(__webpack_require__.s=n[0]))}return e}var r={},a={8:0},o=[];function __webpack_require__(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(n,r,function(t){return e[t]}.bind(null,r));return n},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var i=window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var s=c;o.push([529,0]),n()}({1:function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return g})),n.d(t,"b",(function(){return b})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return O})),n.d(t,"c",(function(){return E})),n.d(t,"l",(function(){return P})),n.d(t,"m",(function(){return A})),n.d(t,"n",(function(){return R})),n.d(t,"o",(function(){return I})),n.d(t,"p",(function(){return N})),n.d(t,"q",(function(){return q})),n.d(t,"r",(function(){return L})),n.d(t,"s",(function(){return F}));var r=n(104);void 0===e.googlesitekit&&(e.googlesitekit={});var a=e.googlesitekit._element||r,o=a.__experimentalCreateInterpolateElement,i=a.Children,c=a.cloneElement,u=a.Component,s=a.concatChildren,l=a.createContext,d=a.createElement,f=a.createPortal,g=a.createRef,p=a.findDOMNode,v=a.forwardRef,b=a.Fragment,h=a.isEmptyElement,m=a.isValidElement,_=a.lazy,k=a.memo,y=a.Platform,w=a.RawHTML,O=a.render,j=a.renderToString,x=a.StrictMode,E=a.Suspense,S=a.switchChildrenNodeName,D=a.unmountComponentAtNode,P=a.useCallback,A=a.useContext,C=a.useDebugValue,R=a.useEffect,M=a.useImperativeHandle,I=a.useLayoutEffect,N=a.useMemo,q=a.useReducer,L=a.useRef,F=a.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:o,Children:i,cloneElement:c,Component:u,concatChildren:s,createContext:l,createElement:d,createPortal:f,createRef:g,findDOMNode:p,forwardRef:v,Fragment:b,isEmptyElement:h,isValidElement:m,lazy:_,memo:k,Platform:y,RawHTML:w,render:O,renderToString:j,StrictMode:x,Suspense:E,switchChildrenNodeName:S,unmountComponentAtNode:D,useCallback:P,useContext:A,useDebugValue:C,useEffect:R,useImperativeHandle:M,useLayoutEffect:I,useMemo:N,useReducer:q,useRef:L,useState:F})}).call(this,n(16))},13:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return g})),n.d(t,"c",(function(){return p}));var r=n(100);void 0===e.googlesitekit&&(e.googlesitekit={});var a=e.googlesitekit._hooks||r,o=a.addAction,i=a.addFilter,c=a.removeAction,u=a.removeFilter,s=a.hasAction,l=a.hasFilter,d=a.removeAllActions,f=a.removeAllFilters,g=a.doAction,p=a.applyFilters,v=a.currentAction,b=a.currentFilter,h=a.doingAction,m=a.doingFilter,_=a.didAction,k=a.didFilter,y=a.actions,w=a.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:o,addFilter:i,removeAction:c,removeFilter:u,hasAction:s,hasFilter:l,removeAllActions:d,removeAllFilters:f,doAction:g,applyFilters:p,currentAction:v,currentFilter:b,doingAction:h,doingFilter:m,didAction:_,didFilter:k,actions:y,filters:w})}).call(this,n(16))},21:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(87),a=n.n(r),o=n(1),i=function(e){return function(t){return function FilteredComponent(n){return Object(o.f)(o.b,{},"",Object(o.f)(t,n),e)}}},c=function(t,n){return function(r){return function InnerComponent(o){return e.createElement(t,a()({},o,n,{OriginalComponent:r}))}}}}).call(this,n(10))},24:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r="core/user",a="missing_required_scopes"},3:function(e,t,n){"use strict";(function(e,r){n.d(t,"t",(function(){return S})),n.d(t,"r",(function(){return D})),n.d(t,"o",(function(){return A})),n.d(t,"s",(function(){return C})),n.d(t,"i",(function(){return R})),n.d(t,"c",(function(){return M})),n.d(t,"g",(function(){return I})),n.d(t,"k",(function(){return N})),n.d(t,"m",(function(){return q})),n.d(t,"n",(function(){return L})),n.d(t,"z",(function(){return F})),n.d(t,"A",(function(){return T})),n.d(t,"b",(function(){return U})),n.d(t,"x",(function(){return H})),n.d(t,"v",(function(){return J})),n.d(t,"f",(function(){return z})),n.d(t,"q",(function(){return G})),n.d(t,"j",(function(){return Q}));var a=n(4),o=n.n(a),i=n(11),c=n.n(i),u=n(49),s=n.n(u),l=n(33),d=n.n(l),f=(n(1),n(12)),g=n(13),p=n(0),v=n(37),b=n(154),h=n(30);n.d(t,"a",(function(){return h.a}));var m=n(50);n.d(t,"y",(function(){return m.c}));var _=n(21),k=n(57);n.d(t,"u",(function(){return k.a}));var y=n(56);n.d(t,"w",(function(){return y.a}));var w=n(54);n.d(t,"d",(function(){return w.b})),n.d(t,"l",(function(){return w.c}));n(40);var O=n(60);function j(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"p",(function(){return O.a})),n.d(t,"e",(function(){return _.a})),n.d(t,"h",(function(){return _.b}));var E=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(f.isFinite)(e)?e:Number(e),Object(f.isFinite)(e)||(console.warn("Invalid number",e,d()(e)),e=0),t)return D(e,{style:"currency",currency:t});var n={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
|
2 |
+
Object(p.__)("%sM","google-site-kit"),D(E(e),e%10==0?{}:n)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
3 |
+
Object(p.__)("%sK","google-site-kit"),D(E(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
|
4 |
+
Object(p.__)("%sK","google-site-kit"),D(E(e),e%10==0?{}:n)):e.toString()},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?P():n,a=s()(t,["locale"]);return new Intl.NumberFormat(r,a).format(e)},P=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(f.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language},A=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},C=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},R=function(e,t){var n=1e3*A("day"),r=e.getTime(),a=t.getTime();return Math.round(Math.abs(r-a)/n)},M=function(e,t){if("0"===e||0===e||isNaN(e))return"";var n=((t-e)/e*100).toFixed(1);return isNaN(n)||"Infinity"===n?"":n},I=function(e,t){return Object(f.map)(e,(function(e,n){return[e[0],e[t]||(0===n?"":0)]}))},N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e._googlesitekitLegacyData,n=t.modules;return n?Object.keys(n).reduce((function(e,t){return"object"!==d()(n[t])?e:void 0===n[t].slug||void 0===n[t].name||n[t].slug!==t?e:x({},e,c()({},t,n[t]))}),{}):{}},q=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e._googlesitekitLegacyData,a=r.admin,o=a.connectURL,i=a.adminRoot,c=r.setup.needReauthenticate,u=N(r)[t].screenID,s="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},l=Object(v.a)(i,x({page:t&&n&&u?u:"googlesitekit-dashboard",slug:t,reAuth:n},s));if(!c)return l;var d=encodeURIComponent(Object(b.a)(l));return l=i+"?"+d,Object(v.a)(o,{redirect:l,status:n})},L=function(t,n){var r=e._googlesitekitLegacyData.admin.adminRoot;return t||(t="googlesitekit-dashboard"),n=x({page:t},n),Object(v.a)(r,n)},F=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},T=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},U=function(e,t,n){var r,a,i,c,u=arguments;return o.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:return r=u.length>3&&void 0!==u[3]?u[3]:m.c,a=u.length>4&&void 0!==u[4]?u[4]:N,s.next=4,o.a.awrap(e.setModuleActive(t,n));case 4:return i=s.sent,(c=a())[t]&&(c[t].active=n),s.next=9,o.a.awrap(r("".concat(t,"_setup"),n?"module_activate":"module_deactivate",t));case 9:return s.abrupt("return",i);case 10:case"end":return s.stop()}}))},H=function(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e._googlesitekitLegacyData,i=N(o)[t],c=i.settings,u=i.setupComplete,s=a||document.getElementById("confirm-changes-".concat(t));if(u&&s){var l=!!Object.keys(n).find((function(e){var t=n[e];return!Object(f.isEqual)(r[e],c[t])}));return a||(s.disabled=!l),l}},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(g.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(_.b)(e,t),1)},z=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(f.unescape)(t)};function G(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e._googlesitekitLegacyData){var c=r.createElement(h.a,{id:t,width:a,height:o,className:i});return n?c=r.createElement(h.a,{id:"".concat(t,"-disabled"),width:a,height:o,className:i}):"pagespeed-insights"===t&&(c=r.createElement("img",{src:e._googlesitekitLegacyData.admin.assetsRoot+"images/icon-pagespeed.png",width:a,alt:"",className:i})),c}}function Q(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,r=n.blogPrefix;return n.isNetworkMode?t:r+t}}).call(this,n(16),n(10))},30:function(e,t,n){"use strict";(function(e,r){n(1);var a=n(2),o=n.n(a),i=n(17),c=n.n(i),u=function SvgIcon(t){var n=t.id,a=t.className,o=t.height,i=t.width,u="".concat(e._googlesitekitLegacyData.admin.assetsRoot,"svg/svg.svg");return r.createElement("svg",{className:c()("svg",a),height:o,width:i},r.createElement("use",{xlinkHref:"".concat(u,"#").concat(n)}))};u.propTypes={id:o.a.string.isRequired,className:o.a.string,height:o.a.string,width:o.a.string},u.defaultProps={className:"",height:20,width:20},t.a=u}).call(this,n(16),n(10))},301:function(e,t,n){"use strict";(function(e){var r=n(4),a=n.n(r),o=n(20),i=n.n(o),c=n(58),u=n(37),s=n(68),l=n(3),d=n(24),f=!0,g=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=[e,t,n].filter((function(e){return!!e&&e.length}));return 3===a.length&&r&&r.constructor===Object&&Object.keys(r).length&&a.push(Object(l.w)(r)),a.join("::")},p=function(t,n,r){var o,l,f,p,b,h,m,_,k,y,w,O,j,x,E,S,D,P,A=arguments;return a.a.async((function(C){for(;;)switch(C.prev=C.next){case 0:if(o=A.length>3&&void 0!==A[3]?A[3]:{},l=o.bodyParams,f=o.cacheTTL,p=void 0===f?3600:f,b=o.method,h=void 0===b?"GET":b,m=o.queryParams,_=o.useCache,k=void 0===_?void 0:_,i()(t,"`type` argument for requests is required."),i()(n,"`identifier` argument for requests is required."),i()(r,"`datapoint` argument for requests is required."),y="GET"===h&&(void 0!==k?k:v()),w=g(t,n,r,m),!y){C.next=14;break}return C.next=9,a.a.awrap(Object(s.b)(w,p));case 9:if(O=C.sent,j=O.cacheHit,x=O.value,!j){C.next=14;break}return C.abrupt("return",x);case 14:return C.prev=14,C.next=17,a.a.awrap(Object(c.default)({data:l,method:h,path:Object(u.a)("/google-site-kit/v1/".concat(t,"/").concat(n,"/data/").concat(r),m)}));case 17:if(E=C.sent,!y){C.next=21;break}return C.next=21,a.a.awrap(Object(s.d)(w,E));case 21:return C.abrupt("return",E);case 24:throw C.prev=24,C.t0=C.catch(14),C.t0.code===d.a&&(null===(S=e.googlesitekit)||void 0===S?void 0:null===(D=S.data)||void 0===D?void 0:null===(P=D.dispatch)||void 0===P?void 0:P.call(D,d.b))&&e.googlesitekit.data.dispatch(d.b).setPermissionScopeError(C.t0),e.console.error("Google Site Kit API Error",C.t0),C.t0;case 29:case"end":return C.stop()}}),null,null,[[14,24]])},v=function(){return f},b=function(e,t,n){var r;return a.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return r=g(e,t,n),o.next=3,a.a.awrap(Object(s.c)());case 3:o.sent.forEach((function(e){0===e.indexOf(r)&&Object(s.a)(e)}));case 5:case"end":return o.stop()}}))},h={invalidateCache:b,get:function(e,t,n,r){var o,i,c,u,s,l=arguments;return a.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o=l.length>4&&void 0!==l[4]?l[4]:{},i=o.cacheTTL,c=void 0===i?3600:i,u=o.useCache,s=void 0===u?void 0:u,a.abrupt("return",p(e,t,n,{cacheTTL:c,queryParams:r,useCache:s}));case 2:case"end":return a.stop()}}))},set:function(e,t,n,r){var o,i,c,u,s,l,d=arguments;return a.a.async((function(f){for(;;)switch(f.prev=f.next){case 0:return o=d.length>4&&void 0!==d[4]?d[4]:{},i=o.method,c=void 0===i?"POST":i,u=o.queryParams,s=void 0===u?{}:u,f.next=3,a.a.awrap(p(e,t,n,{bodyParams:{data:r},method:c,queryParams:s,useCache:!1}));case 3:return l=f.sent,f.next=6,a.a.awrap(b(e,t,n));case 6:return f.abrupt("return",l);case 7:case"end":return f.stop()}}))},setUsingCache:function(e){return f=!!e},usingCache:v};t.a=h}).call(this,n(16))},35:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r="_googlesitekitDataLayer",a="data-googlesitekit-gtag"},40:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r,a=n(5),o=n.n(a),i=n(6),c=n.n(i),u=function(t){var n=e[t];if(!n)return!1;try{var r="__storage_test__";return n.setItem(r,r),n.removeItem(r),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==n.length}},s=function(){function NullStorage(){o()(this,NullStorage)}return c()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),l=function(){return r||(r=u("sessionStorage")?e.sessionStorage:u("localStorage")?e.localStorage:new s),r}}).call(this,n(16))},50:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return f}));var r=n(72),a=e._googlesitekitBaseData||{},o=a.isFirstAdmin,i=a.trackingAllowed,c={isFirstAdmin:o,trackingEnabled:a.trackingEnabled,trackingID:a.trackingID,referenceSiteURL:a.referenceSiteURL,userIDHash:a.userIDHash},u=Object(r.a)(c),s=u.enableTracking,l=u.disableTracking,d=u.isTrackingEnabled,f=u.trackEvent;function g(e){e?s():l()}!0===i&&g(d())}).call(this,n(16))},51:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(35);function a(e){return function(){e[r.a]=e[r.a]||[],e[r.a].push(arguments)}}},529:function(e,t,n){"use strict";n.r(t),function(e){var r=n(301);void 0===e.googlesitekit&&(e.googlesitekit={}),void 0===e.googlesitekit.api&&(e.googlesitekit.api=r.a),t.default=r.a}.call(this,n(16))},54:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s}));var r=n(38),a=n.n(r),o=n(0),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,n=null,r=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),a=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(r&&a)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),n=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===n)return!1;var i=document.createElement("span");i.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var c=document.createElement("span");c.setAttribute("class","plugin-count"),c.setAttribute("aria-hidden","true"),c.textContent=e;var u=document.createElement("span");return u.setAttribute("class","screen-reader-text"),u.textContent=Object(o.sprintf)(
|
5 |
/* translators: %d is the number of notifications */
|
6 |
+
Object(o._n)("%d notification","%d notifications",e,"google-site-kit"),e),i.appendChild(c),i.appendChild(u),t&&null===r&&t.appendChild(i),n&&null===a&&n.appendChild(i),i},c=function(){e.localStorage&&e.localStorage.clear(),e.sessionStorage&&e.sessionStorage.clear()},u=function(e){for(var t=location.search.substr(1).split("&"),n={},r=0;r<t.length;r++)n[t[r].split("=")[0]]=decodeURIComponent(t[r].split("=")[1]);return e?n.hasOwnProperty(e)?decodeURIComponent(n[e].replace(/\+/g," ")):"":n},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,n=new URL(t.href);if(e)return n.searchParams&&n.searchParams.get?n.searchParams.get(e):u(e);var r={},o=!0,i=!1,c=void 0;try{for(var s,l=n.searchParams.entries()[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var d=a()(s.value,2),f=d[0],g=d[1];r[f]=g}}catch(e){i=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(i)throw c}}return r}}).call(this,n(16))},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(33),a=n.n(r),o=n(105),i=n.n(o),c=function(e){return i()(JSON.stringify(function e(t){var n={};Object.keys(t).sort().forEach((function(r){var o=t[r];o&&"object"===a()(o)&&!Array.isArray(o)&&(o=e(o)),n[r]=o}));return n}(e)))}},57:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(79),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:r.a.sanitize(e,t)}}},58:function(e,t,n){"use strict";(function(e){var r=n(27),a=n.n(r),o=e._googlesitekitAPIFetchData||{},i=o.nonce,c=o.nonceEndpoint,u=o.preloadedData,s=o.rootURL;a.a.nonceEndpoint=c,a.a.nonceMiddleware=a.a.createNonceMiddleware(i),a.a.rootURLMiddleware=a.a.createRootURLMiddleware(s),a.a.preloadingMiddleware=a.a.createPreloadingMiddleware(u),a.a.use(a.a.nonceMiddleware),a.a.use(a.a.mediaUploadMiddleware),a.a.use(a.a.rootURLMiddleware),a.a.use(a.a.preloadingMiddleware),t.default=a.a}).call(this,n(16))},60:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(49),a=n.n(r),o=n(12),i=n(0);function c(){Object(i.setLocaleData)(e._googlesitekitLegacyData.locale,"google-site-kit")}var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.locale,r=void 0===n?s():n,o=a()(t,["locale"]);return new Intl.NumberFormat(r,o).format(e)},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,n=Object(o.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(n){var r=n.match(/^(\w{2})?(_)?(\w{2})/);if(r&&r[0])return r[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,n(16))},68:function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return g}));var r,a=n(4),o=n.n(a),i=(n(81),["localStorage","sessionStorage"]),c=[].concat(i),u=function(t){var n,r;return o.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(n=e[t]){a.next=3;break}return a.abrupt("return",!1);case 3:return a.prev=3,r="__storage_test__",n.setItem(r,r),n.removeItem(r),a.abrupt("return",!0);case 10:return a.prev=10,a.t0=a.catch(3),a.abrupt("return",a.t0 instanceof DOMException&&(22===a.t0.code||1014===a.t0.code||"QuotaExceededError"===a.t0.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.t0.name)&&0!==n.length);case 13:case"end":return a.stop()}}),null,null,[[3,10]])},s=function(){var t,n,a,i,s,l;return o.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(!(e._googlesitekitLegacyData&&e._googlesitekitLegacyData.admin&&e._googlesitekitLegacyData.admin.nojscache)){d.next=2;break}return d.abrupt("return",null);case 2:if(void 0!==r){d.next=34;break}t=!0,n=!1,a=void 0,d.prev=6,i=c[Symbol.iterator]();case 8:if(t=(s=i.next()).done){d.next=19;break}if(l=s.value,!r){d.next=12;break}return d.abrupt("continue",16);case 12:return d.next=14,o.a.awrap(u(l));case 14:if(!d.sent){d.next=16;break}r=e[l];case 16:t=!0,d.next=8;break;case 19:d.next=25;break;case 21:d.prev=21,d.t0=d.catch(6),n=!0,a=d.t0;case 25:d.prev=25,d.prev=26,t||null==i.return||i.return();case 28:if(d.prev=28,!n){d.next=31;break}throw a;case 31:return d.finish(28);case 32:return d.finish(25);case 33:void 0===r&&(r=null);case 34:return d.abrupt("return",r);case 35:case"end":return d.stop()}}),null,null,[[6,21,25,33],[26,,28,32]])},l=function(e){var t,n,r,a,i=arguments;return o.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:null,c.next=3,o.a.awrap(s());case 3:if(!(n=c.sent)){c.next=10;break}if(!(r=n.getItem("".concat("googlesitekit_").concat(e)))){c.next=10;break}if(!(a=JSON.parse(r)).timestamp||!(null===t||Math.round(Date.now()/1e3)-a.timestamp<t)){c.next=10;break}return c.abrupt("return",{cacheHit:!0,value:a.value});case 10:return c.abrupt("return",{cacheHit:!1,value:void 0});case 11:case"end":return c.stop()}}))},d=function(t,n){var r,a,i=arguments;return o.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:void 0,c.next=3,o.a.awrap(s());case 3:if(!(a=c.sent)){c.next=14;break}return c.prev=5,a.setItem("".concat("googlesitekit_").concat(t),JSON.stringify({timestamp:r||Math.round(Date.now()/1e3),value:n})),c.abrupt("return",!0);case 10:return c.prev=10,c.t0=c.catch(5),e.console.warn("Encountered an unexpected storage error:",c.t0),c.abrupt("return",!1);case 14:return c.abrupt("return",!1);case 15:case"end":return c.stop()}}),null,null,[[5,10]])},f=function(t){var n;return o.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o.a.awrap(s());case 2:if(!(n=r.sent)){r.next=13;break}return r.prev=4,n.removeItem("".concat("googlesitekit_").concat(t)),r.abrupt("return",!0);case 9:return r.prev=9,r.t0=r.catch(4),e.console.warn("Encountered an unexpected storage error:",r.t0),r.abrupt("return",!1);case 13:return r.abrupt("return",!1);case 14:case"end":return r.stop()}}),null,null,[[4,9]])},g=function(){var t,n,r,a;return o.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,o.a.awrap(s());case 2:if(!(t=i.sent)){i.next=14;break}for(i.prev=4,n=[],r=0;r<t.length;r++)0===(a=t.key(r)).indexOf("googlesitekit_")&&n.push(a.substring("googlesitekit_".length));return i.abrupt("return",n);case 10:return i.prev=10,i.t0=i.catch(4),e.console.warn("Encountered an unexpected storage error:",i.t0),i.abrupt("return",[]);case 14:return i.abrupt("return",[]);case 15:case"end":return i.stop()}}),null,null,[[4,10]])}}).call(this,n(16))},72:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(11),a=n.n(r),o=n(73),i=n(74);function c(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}var u={isFirstAdmin:!1,trackingEnabled:!1,trackingID:"",referenceSiteURL:"",userIDHash:""};function s(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u,{},t);return r.referenceSiteURL&&(r.referenceSiteURL=r.referenceSiteURL.toString().replace(/\/+$/,"")),{enableTracking:Object(o.a)(r,n),disableTracking:function(){r.trackingEnabled=!1},isTrackingEnabled:function(){return!!r.trackingEnabled},trackEvent:Object(i.a)(r,n)}}}).call(this,n(16))},73:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(51),a=n(35);function o(t,n){var o=Object(r.a)(n);return function(){t.trackingEnabled=!0;var n=e.document;if(!n.querySelector("script[".concat(a.b,"]"))){var r=n.createElement("script");r.setAttribute(a.b,""),r.async=!0,r.src="https://www.googletagmanager.com/gtag/js?id=".concat(t.trackingID,"&l=").concat(a.a),n.head.appendChild(r),o("js",new Date),o("config",t.trackingID)}}}}).call(this,n(16))},74:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(4),a=n.n(r),o=n(11),i=n.n(o),c=n(51);function u(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(t,n){var r=Object(c.a)(n);return function(n,o){var i,c,u,l,d,f,g,p,v=arguments;return a.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(i=v.length>2&&void 0!==v[2]?v[2]:"",c=v.length>3&&void 0!==v[3]?v[3]:"",u=t.isFirstAdmin,l=t.referenceSiteURL,d=t.trackingEnabled,f=t.trackingID,g=t.userIDHash,d){a.next=5;break}return a.abrupt("return");case 5:return p={send_to:f,event_category:n,event_label:i,event_value:c,dimension1:l,dimension2:u?"true":"false",dimension3:g},a.abrupt("return",new Promise((function(t){var a=setTimeout((function(){e.console.warn('Tracking event "'.concat(o,'" (category "').concat(n,'") took too long to fire.')),t()}),1e3);r("event",o,s({},p,{event_callback:function(){clearTimeout(a),t()}}))})));case 7:case"end":return a.stop()}}))}}}).call(this,n(16))},79:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(109),a=n.n(r)()(e)}).call(this,n(16))}});
|
dist/assets/js/googlesitekit-dashboard-details.js
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
!function(e){function t(t){for(var n,o,s=t[0],c=t[1],u=t[2],d=0,g=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&g.push(i[o][0]),i[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(t);g.length;)g.shift()();return r.push.apply(r,u||[]),a()}function a(){for(var e,t=0;t<r.length;t++){for(var a=r[t],n=!0,o=1;o<a.length;o++){var s=a[o];0!==i[s]&&(n=!1)}n&&(r.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var n={},i={
|
2 |
-
Object(
|
3 |
-
Object(
|
4 |
-
Object(g.__)("%sK","google-site-kit"),D(S(e),e%10==0?{}:a)):e.toString()},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?w():a,i=s()(t,["locale"]);return new Intl.NumberFormat(n,i).format(e)},w=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(u.get)(t,["googlesitekit","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language},C=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},A=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},N=function(e,t){var a=1e3*C("day"),n=e.getTime(),i=t.getTime();return Math.round(Math.abs(n-i)/a)},x=function(e,t){if("0"===e||0===e||isNaN(e))return"";var a=((t-e)/e*100).toFixed(1);return isNaN(a)||"Infinity"===a?"":a},T=function(e,t){return Object(u.map)(e,(function(e,a){return[e[0],e[t]||(0===a?"":0)]}))},P=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.googlesitekit,a=t.modules;return a?Object.keys(a).reduce((function(e,t){return"object"!==l()(a[t])?e:void 0===a[t].slug||void 0===a[t].name||a[t].slug!==t?e:E({},e,r()({},t,a[t]))}),{}):{}},I=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.googlesitekit,i=n.admin,r=i.connectURL,o=i.adminRoot,s=n.setup.needReauthenticate,c=P(n)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},u=Object(p.a)(o,E({page:t&&a&&c?c:"googlesitekit-dashboard",slug:t,reAuth:a},l));if(!s)return u;var d=encodeURIComponent(Object(m.a)(u));return u=o+"?"+d,Object(p.a)(r,{redirect:u,status:a})},L=function(t,a){var n=e.googlesitekit.admin.adminRoot;return t||(t="googlesitekit-dashboard"),a=E({page:t},a),Object(p.a)(n,a)},M=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},R=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},W=function(e,t,a){return e.setModuleActive(t,a).then((function(e){var a=P();return a[t]&&(a[t].active=e.active),Object(b.c)("".concat(t,"_setup"),e.active?"module_activate":"module_deactivate",t),new Promise((function(t){t(e)}))}))},U=function(t,a,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.googlesitekit,o=P(r)[t],s=o.settings,c=o.setupComplete,l=i||document.getElementById("confirm-changes-".concat(t));if(c&&l){var d=!!Object.keys(a).find((function(e){var t=a[e];return!Object(u.isEqual)(n[e],s[t])}));return i||(l.disabled=!d),d}},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(d.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(f.b)(e,t),1)},F=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(u.unescape)(t)};function q(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e.googlesitekit){var s=n.createElement(h.a,{id:t,width:i,height:r,className:o});return a?s=n.createElement(h.a,{id:"".concat(t,"-disabled"),width:i,height:r,className:o}):"pagespeed-insights"===t&&(s=n.createElement("img",{src:e.googlesitekit.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:o})),s}}function G(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,n=a.blogPrefix;return a.isNetworkMode?t:n+t}}).call(this,a(16),a(10))},,,,,,,,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return p})),a.d(t,"c",(function(){return m}));var n=a(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||n,r=i.addAction,o=i.addFilter,s=i.removeAction,c=i.removeFilter,l=i.hasAction,u=i.hasFilter,d=i.removeAllActions,g=i.removeAllFilters,p=i.doAction,m=i.applyFilters,h=i.currentAction,b=i.currentFilter,f=i.doingAction,v=i.doingFilter,_=i.didAction,y=i.didFilter,k=i.actions,O=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:r,addFilter:o,removeAction:s,removeFilter:c,hasAction:l,hasFilter:u,removeAllActions:d,removeAllFilters:g,doAction:p,applyFilters:m,currentAction:h,currentFilter:b,doingAction:f,doingFilter:v,didAction:_,didFilter:y,actions:k,filters:O})}).call(this,a(16))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return v})),a.d(t,"b",(function(){return _}));var n=a(14),i=a.n(n),r=a(11),o=a(54),s=a(39),c=a(12),l=a(44),u=a(52),d=a(20),g=a(56),p=a(84),m=a(109),h=a(28);function b(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function f(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="core",_="modules",y=function(e,t){var a=f({data:{}},e);return a.data=f({dateRange:t},a.data),a},k={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(a,n){try{var i=[],o=Object(u.b)();Object(r.each)(e,(function(e){var a=y(e,o);a.key=Object(h.c)(a.type,a.identifier,a.datapoint,a.data);var n=Object(h.b)(a.key,a.maxAge);void 0!==n&&(i[a.key]=n,t.resolve(a,n))})),a(i)}catch(e){n()}}))},combinedGet:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],i=25,l=Object(u.b)();Object(r.each)(e,(function(e){var a=y(e,l);a.key=Object(h.c)(a.type,a.identifier,a.datapoint,a.data);var r=Object(h.b)(a.key,a.maxAge);void 0!==r?(setTimeout((function(){t.resolve(a,r)}),i),i+=25):n.push(a)})),n=Object(r.sortBy)(n,"priority");var d=[],p=[],m={},b=!!n.find((function(e){return e.priority<10}));Object(r.each)(n,(function(e,t){!a&&10<=e.priority&&b?p.push(e):m[e.key]?m[e.key].push(t):(m[e.key]=[t],d.push(e))}));var f=10,v=d.slice(0,f),_=d.slice(f);if(_=_.concat(p),0!==v.length||0!==_.length){0<_.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(_,!0)}),50):this.maxRequests=10;var k=null!==Object(g.c)("datacache");return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/data/",{datacache:k||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(r.each)(e,(function(e,a){m[a]?(t.handleWPError(e),Object(r.each)(m[a],(function(a){var i=n[a];Object(h.e)(i.key,e),t.resolve(i,e)})),0===_.length&&Object(c.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+a)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(c.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],a=Object(r.intersection)(t,Object.keys(e));if(Object(r.isEqual)(t,a)){console.warn("WP Error in data response",e);var n=e.data;if(n&&n.reason){var i=0;["authError","insufficientPermissions"].includes(n.reason)&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(d.b)(p.a),1),i++),"forbidden"===n.reason&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(d.b)(m.a),1),i++),i&&Object(c.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(c.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+i}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:function(t,a,n){var i=Object(h.c)(t,a,n);Object(h.d)(),Object.keys(e.googlesitekit.admin.datacache).forEach((function(t){0!==t.indexOf(i+"::")&&t!==i||delete e.googlesitekit.admin.datacache[t]})),Object.keys(Object(l.a)()).forEach((function(e){0!==e.indexOf("googlesitekit_".concat(i,"::"))&&e!=="googlesitekit_".concat(i)||Object(l.a)().removeItem(e)}))},collectModuleData:function(e,t){var a=Object(c.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==a.length&&this.combinedGet(a)},get:function(e,t,a){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=Object(h.c)(e,t,a,i);if(!r){var l=Object(h.b)(c,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),i)}).then((function(e){return r||Object(h.e)(c,e),Promise.resolve(e)})).catch((function(e){return n.handleWPError(e),Promise.reject(e)}))},set:function(e,t,a,n){var i={};return i.data=n,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),data:i,method:"POST"}).then((function(n){return k.invalidateCacheGroup(e,t,a),new Promise((function(e){e(n)}))}))},setModuleActive:function(e,t){return this.set(v,"modules","activation",{slug:e,active:t})}};Object(c.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(c.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",k.collectModuleData.bind(k)),t.c=k}).call(this,a(16))},,,,function(e,t){e.exports=googlesitekit.data},,function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"p",(function(){return h})),a.d(t,"i",(function(){return u})),a.d(t,"j",(function(){return d})),a.d(t,"m",(function(){return g})),a.d(t,"n",(function(){return p})),a.d(t,"l",(function(){return m})),a.d(t,"k",(function(){return u})),a.d(t,"e",(function(){return b})),a.d(t,"c",(function(){return v})),a.d(t,"d",(function(){return _})),a.d(t,"f",(function(){return y})),a.d(t,"h",(function(){return k})),a.d(t,"a",(function(){return O})),a.d(t,"q",(function(){return E})),a.d(t,"o",(function(){return S})),a.d(t,"s",(function(){return j})),a.d(t,"r",(function(){return D})),a.d(t,"g",(function(){return w}));var n=a(11),i=a(0),r=a(3),o=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,a=t[0].values,n=t[1].values,i=a[0],o=a[1],s=a[2],c=a[3],l=a[4],u=a[5];return{totalUsers:i,totalSessions:o,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(r.c)(n[0],a[0]),totalSessionsChange:Object(r.c)(n[1],a[1]),averageBounceRateChange:Object(r.c)(n[2],a[2]),averageSessionDurationChange:Object(r.c)(n[3],a[3]),goalCompletions:l,goalCompletionsChange:Object(r.c)(n[4],a[4]),totalPageViews:u,totalPageViewsChange:Object(r.c)(n[5],a[5])}},s=a(37),c=a.n(s),l=a(23),u=function(e){return(parseInt(e,10)||0)>0};function d(e){return e===l.a||u(e)}function g(e){return"string"==typeof e&&e.match(/^UA-\d+-\d+$/)}function p(e){return e===l.f||g(e)}function m(e){return e===l.e||u(e)}function h(e){if(!g(e))return!1;var t=e.match(/^UA-(\d+)-(\d+)/),a=c()(t,3);return{accountID:a[1],propertyID:e,number:a[2]}}var b=function(e){if(!e||!e.length)return null;var t=e[0].data,a=t.rows,i=t.totals[0].values[0],r=[["Source","Percent"]];return Object(n.each)(a,(function(e){var t=e.metrics[0].values[0]/i;if(1>100*t)return!1;var a=e.dimensions[0].replace(/\(none\)/gi,"direct");r.push([a,t])})),r};function f(e,t){var a=[];return Object(n.each)(e,(function(e){if(e.metrics){var n=e.metrics[0].values,i=e.dimensions[0],r=i.slice(0,4)+"-"+i.slice(4,6)+"-"+i.slice(6,8),o=new Date(r);a.push([o,n[t]])}})),a}var v=function(e,t,a){if(!e||!e.length)return null;var r=e[0].data.rows;if(!r)return!1;var o=r.length;if(2*a>o){for(var s=new Date,c=0;a>c;c++){var l=(s.getMonth()+1).toString(),u=s.getDate().toString(),d=s.getFullYear().toString()+(2>l.length?"0":"")+l+(2>u.length?"0":"")+u;if(c>o){var g={dimensions:[d],metrics:[{values:[0,0,0,0,0]}]};r.unshift(g)}s.setDate(s.getDate()-1)}r.push([0,0])}var p=[Object(i.__)("Users","google-site-kit"),Object(i.__)("Sessions","google-site-kit"),Object(i.__)("Bounce Rate","google-site-kit"),Object(i.__)("Session Duration","google-site-kit")],m=[[{type:"date",label:Object(i.__)("Day","google-site-kit")},{type:"number",label:p[t]},{type:"number",label:Object(i.__)("Previous month","google-site-kit")}]],h=r.slice(r.length-a,r.length),b=r.slice(0,r.length-a),v=f(h,t),_=f(b,t);return Object(n.each)(v,(function(e,t){e[0]&&e[1]&&_[t]&&m.push([e[0],e[1],_[t][1]])})),m},_=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,a=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(n.each)(t,(function(e){var t=e.metrics[0].values,n=e.dimensions[0],i=n.slice(0,4)+"-"+n.slice(4,6)+"-"+n.slice(6,8),r=new Date(i);a.push([r,t[0],t[1],t[4]])})),a},y=function(e){return!(!e.error||!e.error.status)&&function(e,t){var a="";switch(e){case"INVALID_ARGUMENT":a=Object(i.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":a=Object(i.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":a=Object(i.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":a=Object(i.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":a=Object(i.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":a=Object(i.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":a=Object(i.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:a=t}return a}(e.error.status,e.error.message)},k=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,a=!0;return Object(n.each)(t,(function(e){0!==parseInt(e)&&(a=!1)})),a}return!1},O={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},E={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},S={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},j={metrics:[{expression:"ga:users",alias:"Total Users"}]},D={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},w=function(){return{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}],orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(95),i=a.n(n),r=a(1),o=function(e){return function(t){return function FilteredComponent(a){return Object(r.f)(r.b,{},"",Object(r.f)(t,a),e)}}},s=function(t,a){return function(n){return function InnerComponent(r){return e.createElement(t,i()({},r,a,{OriginalComponent:n}))}}}}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(95),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),p=a(9),m=a.n(p),h=a(1),b=a(11),f=a(12),v=a(0),_=a(3),y=a(60),k=a(49),O=a(112);t.a=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!!(e.code&&e.message&&e.data&&e.data.status)&&e.message};return function(d){function NewComponent(e){var t;o()(this,NewComponent),(t=u()(this,g()(NewComponent).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(f.a)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){t.setState({data:!1})}));var n=function(e,a){var n=t.props,i=n.handleDataError,r=n.handleDataSuccess,o=a.datapoint,c=a.identifier,u=a.toState,d=l(e);d?(t.setState({error:d,module:c}),i&&i(d)):s(e,o,a)?(i&&i(d),t.setState({zeroData:!0})):r&&r(),t.setState({requestDataToState:u,data:e,datapoint:o,module:c})};return Object(b.each)(a,(function(e){Array.isArray(e.context)?Object(b.each)(e.context,(function(t){Object(f.b)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(f.b)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),t}return m()(NewComponent,d),c()(NewComponent,[{key:"render",value:function(){var a=this.state,o=a.data,s=a.datapoint,c=a.module,l=a.zeroData,u=a.error,d=a.requestDataToState;if(!o)return n;var g=Object(_.j)(),p=c?g[c].name:Object(v.__)("Site Kit","google-site-kit");return c&&g[c].active&&!g[c].setupComplete?Object(O.a)(c,r.inGrid,r.fullWidth,r.createGrid):u?"string"!=typeof u?u:Object(k.a)(p,u,r.inGrid,r.fullWidth,r.createGrid):l?Object(y.a)(p,r.inGrid,r.fullWidth,r.createGrid):e.createElement(t,i()({data:o,datapoint:s,requestDataToState:d},this.props))}}]),NewComponent}(h.a)}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"f",(function(){return r})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return c})),a.d(t,"g",(function(){return l})),a.d(t,"b",(function(){return u}));var n="modules/analytics",i="account_create",r="property_create",o="profile_create",s="analyticsAccountCreate",c="analyticsSetup",l="https://www.googleapis.com/auth/analytics.provision",u="https://www.googleapis.com/auth/analytics.edit"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(154),_=a(155),y=function(t){function Layout(){return i()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return g()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,a=t.header,n=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,g=t.fill,p=t.relative;return e.createElement("div",{className:f()("googlesitekit-layout",d,{"googlesitekit-layout--fill":g,"googlesitekit-layout--relative":p})},a&&e.createElement(v.a,{title:r,ctaLabel:o,ctaLink:s}),i,n&&e.createElement(_.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(p.a);y.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},y.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=y}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return i}));var n="core/user",i="missing_required_scopes"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function Link(){return i()(this,Link),c()(this,u()(Link).apply(this,arguments))}return g()(Link,t),o()(Link,[{key:"render",value:function(){var t=this.props,a=t.dangerouslySetInnerHTML,n=t.onClick,i=t.href,r=t.children,o=t.className,s=t.arrow,c=t.external,l=t.inverse,u=t.back,d=t.small,g=t.inherit,p=t.caps,m=t.danger,h=t.disabled,b=t.id,v=i&&!h,_=v?"a":"button";return e.createElement(_,{className:f()("googlesitekit-cta-link",o,{"googlesitekit-cta-link--arrow":s,"googlesitekit-cta-link--external":c,"googlesitekit-cta-link--inverse":l,"googlesitekit-cta-link--back":u,"googlesitekit-cta-link--small":d,"googlesitekit-cta-link--inherit":g,"googlesitekit-cta-link--caps":p,"googlesitekit-cta-link--danger":m,"googlesitekit-cta-link--disabled":h}),onClick:n,id:b,href:v?i:void 0,target:v&&c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,disabled:h,dangerouslySetInnerHTML:a},r)}}]),Link}(p.a);v.propTypes={dangerouslySetInnerHTML:h.a.shape({__html:h.a.string}),onClick:h.a.func,href:h.a.string,children:h.a.oneOfType([h.a.string.isRequired,h.a.array.isRequired]),className:h.a.string,arrow:h.a.bool,external:h.a.bool,inverse:h.a.bool,back:h.a.bool,small:h.a.bool,inherit:h.a.bool,caps:h.a.bool,danger:h.a.bool,disabled:h.a.bool},v.defaultProps={dangerouslySetInnerHTML:void 0,onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=v}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return g}));var n=a(35),i=a.n(n),r=a(11),o=a(44),s=a(62),c=function(){e.googlesitekit.admin=e.googlesitekit.admin||{},"string"==typeof e.googlesitekit.admin.datacache&&(e.googlesitekit.admin.datacache=JSON.parse(e.googlesitekit.admin.datacache)),"object"!==i()(e.googlesitekit.admin.datacache)&&(e.googlesitekit.admin.datacache={})},l=function(t,a){if(void 0!==a&&(!a||"object"!==i()(a)||!a.error&&!a.errors)){c(),e.googlesitekit.admin.datacache[t]=Object(r.cloneDeep)(a);var n={value:a,date:Date.now()/1e3};Object(o.a)().setItem("googlesitekit_"+t,JSON.stringify(n))}},u=function(t,a){if(!e.googlesitekit.admin.nojscache){if(c(),void 0!==e.googlesitekit.admin.datacache[t])return e.googlesitekit.admin.datacache[t];var n=JSON.parse(Object(o.a)().getItem("googlesitekit_"+t));return n&&"object"===i()(n)&&n.date&&(!a||Date.now()/1e3-n.date<a)?(e.googlesitekit.admin.datacache[t]=Object(r.cloneDeep)(n.value),Object(r.cloneDeep)(e.googlesitekit.admin.datacache[t])):void 0}},d=function(t){c(),delete e.googlesitekit.admin.datacache[t],Object(o.a)().removeItem("googlesitekit_"+t)},g=function(e,t,a){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=[],o=[e,t,a],c=0,l=o;c<l.length;c++){var u=l[c];if(!u||!u.length)break;r.push(u)}return 3===r.length&&n&&"object"===i()(n)&&Object.keys(n).length&&r.push(Object(s.a)(n)),r.join("::")}}).call(this,a(16))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function PreviewBlock(){return i()(this,PreviewBlock),c()(this,u()(PreviewBlock).apply(this,arguments))}return g()(PreviewBlock,t),o()(PreviewBlock,[{key:"render",value:function(){var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.padding;return e.createElement("div",{className:f()("googlesitekit-preview-block",{"googlesitekit-preview-block--padding":r}),style:{width:a,height:n}},e.createElement("div",{className:f()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===i})}))}}]),PreviewBlock}(p.a);v.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},v.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(18),g=a.n(d),p=a(9),m=a.n(p),h=a(1),b=a(2),f=a.n(b),v=a(15),_=a.n(v),y=a(107),k=a(63),O=a(59),E=function(t){function DataBlock(e){var t;return i()(this,DataBlock),(t=c()(this,u()(DataBlock).call(this,e))).handleClick=t.handleClick.bind(g()(t)),t.handleKeyPress=t.handleKeyPress.bind(g()(t)),t}return m()(DataBlock,t),o()(DataBlock,[{key:"handleClick",value:function(){var e=this.props,t=e.stat;(0,e.handleStatSelection)(t)}},{key:"handleKeyPress",value:function(e){e.preventDefault();var t=this.props,a=t.stat,n=t.handleStatSelection;"Enter"!==e.key&&" "!==e.key||n(a)}},{key:"render",value:function(){var t=this.props,a=t.className,n=t.title,i=t.datapoint,r=t.datapointUnit,o=t.change,s=t.changeDataUnit,c=t.context,l=t.period,u=t.selected,d=t.handleStatSelection,g=t.source,p=t.sparkline,m=t.invertChangeColor,b="button"===c?"button":"",f=p;return f&&m&&(f=Object(h.d)(p,{invertChangeColor:m})),e.createElement("div",{className:_()("googlesitekit-data-block",a,"googlesitekit-data-block--".concat(c),{"googlesitekit-data-block--selected":u}),tabIndex:"button"===c?"0":"-1",role:d&&b,onClick:d&&this.handleClick,onKeyPress:d&&this.handleKeyPress,"aria-label":d&&n,"aria-pressed":d&&u},e.createElement("div",{className:"googlesitekit-data-block__title-datapoint-wrapper"},e.createElement("h3",{className:" googlesitekit-subheading-1 googlesitekit-data-block__title "},n),e.createElement("div",{className:"googlesitekit-data-block__datapoint"},"".concat(i).concat(r))),f&&e.createElement("div",{className:"googlesitekit-data-block__sparkline"},f),e.createElement("div",{className:"googlesitekit-data-block__change-source-wrapper"},e.createElement("div",{className:"googlesitekit-data-block__change"},""===o&&e.createElement(h.b,null," "),o&&e.createElement(h.b,null,e.createElement("span",{className:"googlesitekit-data-block__arrow"},e.createElement(y.a,{direction:0<parseFloat(o)?"up":"down",invertColor:m})),e.createElement("span",{className:"googlesitekit-data-block__value"},"".concat(Object(k.b)(Math.abs(o))).concat(s," ").concat(l)))),g&&e.createElement(O.a,{className:"googlesitekit-data-block__source",name:g.name,href:g.link})))}}]),DataBlock}(h.a);E.propTypes={stat:f.a.number,onClick:f.a.func,className:f.a.string,title:f.a.string,datapoint:f.a.oneOfType([f.a.string,f.a.number]),datapointUnit:f.a.string,change:f.a.oneOfType([f.a.string,f.a.number]),changeDataUnit:f.a.string,context:f.a.string,period:f.a.string,selected:f.a.bool,handleStatSelection:f.a.func,invertChangeColor:f.a.bool},E.defaultProps={stat:null,onClick:null,className:"",title:"",datapoint:null,datapointUnit:"",change:null,changeDataUnit:"",context:"default",period:"",selected:!1,handleStatSelection:null,invertChangeColor:!1},t.a=E}).call(this,a(10))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(2),r=a.n(i),o=a(15),s=a.n(o),c=function SvgIcon(t){var a=t.id,i=t.className,r=t.height,o=t.width,c="".concat(e.googlesitekit.admin.assetsRoot,"svg/svg.svg");return n.createElement("svg",{className:s()("svg",i),height:r,width:o},n.createElement("use",{xlinkHref:"".concat(c,"#").concat(a)}))};c.propTypes={id:r.a.string.isRequired,className:r.a.string,height:r.a.string,width:r.a.string},c.defaultProps={className:"",height:20,width:20},t.a=c}).call(this,a(16),a(10))},function(e,t,a){"use strict";var n=a(85),i=a.n(n);a.d(t,"k",(function(){return i.a})),a.d(t,"a",(function(){return n.HelperText})),a.d(t,"b",(function(){return n.Input}));var r=a(142);a.d(t,"g",(function(){return r.a}));var o=a(219);a.d(t,"e",(function(){return o.a}));var s=a(105),c=a.n(s);a.d(t,"j",(function(){return c.a})),a.d(t,"i",(function(){return s.Option}));var l=a(218);a.d(t,"h",(function(){return l.a}));var u=a(215);a.d(t,"d",(function(){return u.a}));var d=a(216);a.d(t,"c",(function(){return d.a}));var g=a(214);a.d(t,"f",(function(){return g.a}))},function(e,t,a){"use strict";(function(e,n){a.d(t,"b",(function(){return S})),a.d(t,"a",(function(){return j}));var i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=a(7),l=a.n(c),u=a(8),d=a.n(u),g=a(18),p=a.n(g),m=a(9),h=a.n(m),b=a(1),f=a(2),v=a.n(f),_=a(15),y=a.n(_),k=a(11),O=a(59),E=a(26),S=function(t,a,n){var i=[],r=n.links,o=n.source,s=n.showURLs;n.cap&&(t=t.slice(0,n.cap)),Object(k.each)(t,(function(t,a){var n=[],o=r&&r[a];Object(k.each)(t,(function(a,i){"string"==typeof a&&(a=a.replace(/\(none\)/gi,"direct")),n.push(e.createElement("td",{key:"cell-"+i,className:"googlesitekit-table__body-item"},t[0]===a&&o?e.createElement("div",{className:"googlesitekit-table__body-item-content"},e.createElement(E.a,{className:"googlesitekit-table__body-item-link",href:o,external:!0,inherit:!0},a),s&&e.createElement(E.a,{className:"googlesitekit-table__body-item-url",href:o,inherit:!0,external:!0},o)):e.createElement("div",{className:"googlesitekit-table__body-item-content"},a)))})),i.push(e.createElement("tr",{key:"tr-"+a,className:"googlesitekit-table__body-row"},n))}));var c=t&&t[0]&&t[0].length?t[0].length:1;return e.createElement("div",{className:y()("googlesitekit-table",{"googlesitekit-table--with-list":!n||!n.disableListMode})},e.createElement("table",{className:y()("googlesitekit-table__wrapper","googlesitekit-table__wrapper--".concat(c,"-col"))},e.createElement("thead",{className:"googlesitekit-table__head"},e.createElement("tr",{key:"gksc_data_row_header-wrap",style:n&&n.hideHeader?{display:"none"}:{},className:"googlesitekit-table__head-row"},a.map((function(t,a){return e.createElement("th",{key:"gksc_data_row_header-".concat(a),className:y()("googlesitekit-table__head-item",{"googlesitekit-table__head-item--primary":t.primary}),"data-tooltip":t.tooltip},t.title)})))),e.createElement("tbody",{className:"googlesitekit-table__body"},i)),o&&e.createElement(O.a,{className:"googlesitekit-table__source",name:o.name,href:o.link}))},j=function(t){function TableOverflowContainer(){var e;return r()(this,TableOverflowContainer),(e=l()(this,d()(TableOverflowContainer).call(this))).state={isScrolling:!1},e.scrollRef=Object(b.h)(),e.updateFadeOnScroll=e.updateFadeOnScroll.bind(p()(e)),e}return h()(TableOverflowContainer,t),s()(TableOverflowContainer,[{key:"componentDidMount",value:function(){var e=this;e.updateFadeOnScroll(),this.resize=Object(k.debounce)((function(){e.updateFadeOnScroll()}),100),n.addEventListener("resize",this.resize)}},{key:"componentWillUnmount",value:function(){n.removeEventListener("resize",this.resize)}},{key:"updateFadeOnScroll",value:function(){var e=this.scrollRef.current,t=e.scrollLeft,a=e.scrollWidth-e.offsetWidth,n=t<a-16&&0<a-16;this.setState({isScrolling:n})}},{key:"render",value:function(){var t=this.props.children,a=this.state.isScrolling;return e.createElement("div",{onScroll:Object(k.debounce)(this.updateFadeOnScroll,100),className:y()("googlesitekit-table-overflow",{"googlesitekit-table-overflow--gradient":a})},e.createElement("div",{ref:this.scrollRef,className:"googlesitekit-table-overflow__container"},t))}}]),TableOverflowContainer}(b.a);j.propTypes={children:v.a.element}}).call(this,a(10),a(16))},function(e,t,a){"use strict";(function(e){var n=a(14),i=a.n(n),r=a(4),o=a.n(r),s=a(5),c=a.n(s),l=a(6),u=a.n(l),d=a(7),g=a.n(d),p=a(8),m=a.n(p),h=a(18),b=a.n(h),f=a(9),v=a.n(f),_=a(1),y=a(2),k=a.n(y),O=a(15),E=a.n(O),S=a(11),j=a(31),D=a(58),w=a(28),C=a(30),A=a(36),N=a(103),x=a(108),T=a(26),P=function(t){function Notification(e){var t;return c()(this,Notification),(t=g()(this,m()(Notification).call(this,e))).state={isClosed:!1},t.cardRef=Object(_.h)(),t.handleDismiss=t.handleDismiss.bind(b()(t)),t.handleCTAClick=t.handleCTAClick.bind(b()(t)),0<t.props.dismissExpires&&t.expireDismiss(),t.props.showOnce&&Object(w.e)("notification::displayed::".concat(t.props.id),new Date),t}return v()(Notification,t),u()(Notification,[{key:"handleDismiss",value:function(e){var t;return o.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.persist(),e.preventDefault(),!(t=this.props.onDismiss)){a.next=6;break}return a.next=6,o.a.awrap(t(e));case 6:this.dismiss();case 7:case"end":return a.stop()}}),null,this)}},{key:"dismiss",value:function(){var e=this,t=this.cardRef.current;this.setState({isClosed:!0}),setTimeout((function(){Object(w.e)("notification::dismissed::".concat(e.props.id),new Date),t.style.display="none";var a=new Event("notificationDismissed");document.dispatchEvent(a)}),350)}},{key:"handleCTAClick",value:function(e){var t,a,n;return o.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.persist(),t=this.props,a=t.isDismissable,!(n=t.onCTAClick)){i.next=5;break}return i.next=5,o.a.awrap(n(e));case 5:a&&this.dismiss();case 6:case"end":return i.stop()}}),null,this)}},{key:"expireDismiss",value:function(){var e=this.props,t=e.id,a=e.dismissExpires,n=Object(w.b)("notification::dismissed::".concat(t));if(n){var i=new Date(n);i.setSeconds(i.getSeconds()+parseInt(a,10)),i<new Date&&Object(w.a)("notification::dismissed::".concat(t))}}},{key:"render",value:function(){var t,a=this.state.isClosed,n=this.props,r=n.children,o=n.id,s=n.title,c=n.description,l=n.blockData,u=n.winImage,d=n.smallImage,g=n.format,p=n.learnMoreURL,m=n.learnMoreDescription,h=n.learnMoreLabel,b=n.ctaLink,f=n.ctaLabel,v=n.ctaTarget,y=n.type,k=n.dismiss,O=n.isDismissable,P=n.logo,I=n.module,L=n.moduleName,M=n.pageIndex;if(Object(w.b)("notification::dismissed::".concat(o)))return null;var R,W=a?"is-closed":"is-open",U="large"===g&&"win-stats-increase"===y,H="mdc-layout-grid__cell--span-12";"large"===g?(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-6-tablet mdc-layout-grid__cell--span-8-desktop ",U&&(H="mdc-layout-grid__cell--order-2-phone mdc-layout-grid__cell--order-1-tablet mdc-layout-grid__cell--span-5-tablet mdc-layout-grid__cell--span-8-desktop ")):"small"===g&&(H="mdc-layout-grid__cell--span-11-desktop mdc-layout-grid__cell--span-7-tablet mdc-layout-grid__cell--span-3-phone"),R="win-warning"===y?e.createElement(N.a,null):"win-error"===y?e.createElement(x.a,null):"";var F=e.createElement(_.b,null,l&&e.createElement("div",{className:"mdc-layout-grid__inner"},Object(S.map)(l,(function(t,a){return e.createElement("div",{key:a,className:E()("mdc-layout-grid__cell",{"mdc-layout-grid__cell--span-5-desktop":U,"mdc-layout-grid__cell--span-4-desktop":!U})},e.createElement("div",{className:"googlesitekit-publisher-win__stats"},e.createElement(C.a,t)))})))),q=e.createElement(_.b,null,s&&e.createElement("h3",{className:"googlesitekit-heading-2 googlesitekit-publisher-win__title"},s),c&&e.createElement("div",{className:"googlesitekit-publisher-win__desc"},e.createElement("p",null,Object(_.i)(c)?c:e.createElement("span",{dangerouslySetInnerHTML:Object(D.a)(c,{ALLOWED_TAGS:["strong","em","br","a"],ALLOWED_ATTR:["href"]})}),h&&e.createElement(_.b,null," ",e.createElement(T.a,{href:p,external:!0,inherit:!0},h),m),M&&e.createElement("span",{className:"googlesitekit-publisher-win__detect"},M))),r),G=I?e.createElement(j.a,{id:I,height:"19",width:"19"}):e.createElement(j.a,{id:"logo-g",height:"34",width:"32"});return e.createElement("section",{ref:this.cardRef,className:E()("googlesitekit-publisher-win",(t={},i()(t,"googlesitekit-publisher-win--".concat(g),g),i()(t,"googlesitekit-publisher-win--".concat(y),y),i()(t,"googlesitekit-publisher-win--".concat(W),W),t))},e.createElement("div",{className:"mdc-layout-grid"},e.createElement("div",{className:"mdc-layout-grid__inner"},P&&e.createElement("div",{className:E()("mdc-layout-grid__cell","mdc-layout-grid__cell--span-12",{"mdc-layout-grid__cell--order-2-phone":U,"mdc-layout-grid__cell--order-1-tablet":U})},e.createElement("div",{className:"googlesitekit-publisher-win__logo"},G),L&&e.createElement("div",{className:"googlesitekit-publisher-win__module-name"},L)),d&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("img",{className:"googlesitekit-publisher-win__small-image",alt:"",src:d})),e.createElement("div",{className:E()("mdc-layout-grid__cell",H)},U?e.createElement("div",{className:"mdc-layout-grid__inner"},e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-5-desktop mdc-layout-grid__cell--span-8-tablet"},q),e.createElement("div",{className:"mdc-layout-grid__cell mdc-layout-grid__cell--span-7-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--align-bottom"},F)):e.createElement(_.b,null,q,F),b&&e.createElement(A.a,{href:b,target:v,onClick:this.handleCTAClick},f),O&&k&&e.createElement(T.a,{onClick:this.handleDismiss},k)),u&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--order-1-phone mdc-layout-grid__cell--order-2-tablet mdc-layout-grid__cell--span-2-tablet mdc-layout-grid__cell--span-4-desktop "},e.createElement("div",{className:"googlesitekit-publisher-win__image-large"},e.createElement("img",{alt:"",src:u}))),("win-error"===y||"win-warning"===y)&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-1 "},e.createElement("div",{className:"googlesitekit-publisher-win__icons"},R)))))}}]),Notification}(_.a);P.propTypes={id:k.a.string.isRequired,title:k.a.string.isRequired,description:k.a.node,learnMoreURL:k.a.string,learnMoreDescription:k.a.string,learnMoreLabel:k.a.string,blockData:k.a.array,winImage:k.a.string,smallImage:k.a.string,format:k.a.string,ctaLink:k.a.string,ctaLabel:k.a.string,type:k.a.string,dismiss:k.a.string,isDismissable:k.a.bool,logo:k.a.bool,module:k.a.string,moduleName:k.a.string,pageIndex:k.a.string,dismissExpires:k.a.number,showOnce:k.a.bool,onCTAClick:k.a.func,onDismiss:k.a.func},P.defaultProps={isDismissable:!0,dismissExpires:0,showOnce:!1},t.a=P}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(32),_=function(t){function Button(e){var t;return i()(this,Button),(t=c()(this,u()(Button).call(this,e))).buttonRef=Object(p.h)(),t}return g()(Button,t),o()(Button,[{key:"componentDidMount",value:function(){new v.g(this.buttonRef.current)}},{key:"render",value:function(){var t=this.props,a=t.onClick,n=t.children,i=t.href,r=t.text,o=t.className,s=t.danger,c=t.disabled,l=t.target,u=t.id,d=t.icon,g=t.trailingIcon,p=t.ariaHaspopup,m=t.ariaExpanded,h=t.ariaControls,b=i&&!c?"a":"button";return e.createElement(b,{className:f()("mdc-button",o,{"mdc-button--raised":!r,"mdc-button--danger":s}),onClick:a,href:c?void 0:i,ref:this.buttonRef,disabled:!!c,target:l||"_self",id:u,"aria-haspopup":p,"aria-expanded":m,"aria-controls":h},d&&d,e.createElement("span",{className:"mdc-button__label"},n),g&&g)}}]),Button}(p.a);_.propTypes={onClick:h.a.func,children:h.a.string.isRequired,href:h.a.string,text:h.a.bool,className:h.a.string,danger:h.a.bool,disabled:h.a.bool,icon:h.a.element,trailingIcon:h.a.element,ariaHaspopup:h.a.string,ariaExpanded:h.a.bool,ariaControls:h.a.string},_.defaultProps={onClick:null,href:null,text:!1,className:"",danger:!1,disabled:!1,icon:null,trailingIcon:null,ariaHaspopup:"",ariaExpanded:!1,ariaControls:""},t.a=_}).call(this,a(10))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}));var n="_googlesitekitDataLayer",i="data-googlesitekit-gtag"},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(26),_=function(t){function CTA(){return i()(this,CTA),c()(this,u()(CTA).apply(this,arguments))}return g()(CTA,t),o()(CTA,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description,i=t.ctaLink,r=t.ctaLabel,o=t.error,s=t.onClick;return e.createElement("div",{className:f()("googlesitekit-cta",{"googlesitekit-cta--error":o})},a&&e.createElement("h3",{className:"googlesitekit-cta__title"},a),n&&e.createElement("p",{className:"googlesitekit-cta__description"},n),r&&e.createElement(v.a,{href:i,onClick:s,inverse:!o,caps:!0,arrow:!0},r))}}]),CTA}(p.a);_.propTypes={title:h.a.string.isRequired,description:h.a.string,ctaLink:h.a.string,ctaLabel:h.a.string,error:h.a.bool,onClick:h.a.func},_.defaultProps={title:"",description:"",ctaLink:"",ctaLabel:"",error:!1,onClick:function(){}},t.a=_}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=function(t){function ProgressBar(){return i()(this,ProgressBar),c()(this,u()(ProgressBar).apply(this,arguments))}return g()(ProgressBar,t),o()(ProgressBar,[{key:"render",value:function(){var t=this.props,a=t.className,n=t.small,i=t.compress,r=t.height,o=r?Math.round(r/2):null;return e.createElement("div",{role:"progressbar",style:{marginTop:o,marginBottom:o},className:f()("mdc-linear-progress","mdc-linear-progress--indeterminate",a,{"mdc-linear-progress--small":n,"mdc-linear-progress--compress":i})},e.createElement("div",{className:"mdc-linear-progress__buffering-dots"}),e.createElement("div",{className:"mdc-linear-progress__buffer"}),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})),e.createElement("div",{className:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},e.createElement("span",{className:"mdc-linear-progress__bar-inner"})))}}]),ProgressBar}(p.a);v.propTypes={className:h.a.string,small:h.a.bool,compress:h.a.bool},v.defaultProps={className:"",small:!1,compress:!1},t.a=v}).call(this,a(10))},function(e,t){e.exports=googlesitekit.api},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return u}));var n,i=a(5),r=a.n(i),o=a(6),s=a.n(o),c=function(t){var a=e[t];if(!a)return!1;try{var n="__storage_test__";return a.setItem(n,n),a.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==a.length}},l=function(){function NullStorage(){r()(this,NullStorage)}return s()(NullStorage,[{key:"key",value:function(){return null}},{key:"getItem",value:function(){return null}},{key:"setItem",value:function(){}},{key:"removeItem",value:function(){}},{key:"clear",value:function(){}},{key:"length",get:function(){return 0}}]),NullStorage}(),u=function(){return n||(n=c("sessionStorage")?e.sessionStorage:c("localStorage")?e.localStorage:new l),n}}).call(this,a(16))},function(e,t,a){"use strict";function n(e){return{byContext:function(t){return e.filter((function(e){return e.usageContext.includes(t)}))}}}function i(e){return(parseInt(e)||0)>0}function r(e){return!!e&&e.toString().match(/^GTM-[A-Z0-9]+$/)}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return o}));var o=[/<script[^>]*>[^>]+?www.googletagmanager.com\/gtm[^>]+?['|"](GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/gtm\.js\?id=(GTM-[0-9A-Z]+)['|"]/,/<script[^>]*src=['|"]https:\/\/www.googletagmanager.com\/ns.html\?id=(GTM-[0-9A-Z]+)['|"]/,/<amp-analytics [^>]*config=['|"]https:\/\/www.googletagmanager.com\/amp.json\?id=(GTM-[0-9A-Z]+)['|"]/]},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(15),f=a.n(b),v=a(29),_=function(t){function PreviewTable(){return i()(this,PreviewTable),c()(this,u()(PreviewTable).apply(this,arguments))}return g()(PreviewTable,t),o()(PreviewTable,[{key:"render",value:function(){for(var t=this.props,a=t.rows,n=t.rowHeight,i=t.padding,r=[],o=0;a>o;o++)r.push(e.createElement("div",{className:"googlesitekit-preview-table__row",key:"table-row-"+o},e.createElement(v.a,{width:"100%",height:n+"px"})));return e.createElement("div",{className:f()("googlesitekit-preview-table",{"googlesitekit-preview-table--padding":i})},r)}}]),PreviewTable}(p.a);_.propTypes={rows:h.a.number,rowHeight:h.a.number,padding:h.a.bool},_.defaultProps={rows:11,rowHeight:35,padding:!1},t.a=_}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(11),i=a(3);function r(e){var t=[[{type:"string",label:"Day"},{type:"number",label:"Clicks"},{type:"number",label:"Impressions"},{type:"number",label:"CTR"},{type:"number",label:"Position"}]],a=0,r=0,o=0,s=0,c=e.length;Object(n.each)(e,(function(e){var n=new Date(e.keys[0]);t.push([n.getMonth()+1+"/"+n.getUTCDate(),e.clicks,e.impressions,e.ctr,e.position]),a+=e.clicks,r+=e.impressions,o+=e.ctr,s+=e.position}));var l=a,u=r;a=Object(i.s)(a),r=Object(i.s)(r);var d=(o/c*100).toFixed(1),g=o/c,p=(s/c).toFixed(1);return{dataMap:t,totalClicks:a,totalClicksRaw:l,totalImpressions:r,totalImpressionsRaw:u,averageCTR:d,averageCTRRaw:g,averagePosition:p}}var o=function(e){var t=Math.floor(e.length/2),a=r(e.slice(t)),n=r(e.slice(0,t));return{dataMap:a.dataMap,totalClicks:a.totalClicks,totalImpressions:a.totalImpressions,averageCTR:a.averageCTR,averagePosition:a.averagePosition,totalClicksChange:Object(i.c)(n.totalClicksRaw,a.totalClicksRaw),totalImpressionsChange:Object(i.c)(n.totalImpressionsRaw,a.totalImpressionsRaw),averageCTRChange:Object(i.c)(n.averageCTRRaw,a.averageCTRRaw),averagePositionChange:Object(i.c)(n.averagePosition,a.averagePosition)}},s=function(e){if(!e.length)return!0;var t=o(e),a=t.totalClicks,n=t.totalImpressions,i=t.averageCTR,r=t.averagePosition;return 0===parseInt(a)&&0===parseInt(n)&&0===parseInt(i)&&0===parseInt(r)}},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=function(t){function DashboardModuleHeader(){return i()(this,DashboardModuleHeader),c()(this,u()(DashboardModuleHeader).apply(this,arguments))}return g()(DashboardModuleHeader,t),o()(DashboardModuleHeader,[{key:"render",value:function(){var t=this.props,a=t.title,n=t.description;return e.createElement("header",{className:"googlesitekit-dashboard-module-header"},e.createElement("div",{className:"mdc-layout-grid__inner"},a&&e.createElement("div",{className:" mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone "},e.createElement("h3",{className:" googlesitekit-heading-3 googlesitekit-dashboard-module-header__title "},a),n&&e.createElement("p",{className:"googlesitekit-dashboard-module-header__description"},n))))}}]),DashboardModuleHeader}(p.a);b.propTypes={title:h.a.string,description:h.a.string},b.defaultProps={title:"",description:""},t.a=b}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a(1);var n=a(0),i=a(3),r=a(40),o=a(74),s=a(158);t.a=function(t,a){var c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]&&arguments[4],d=e.createElement(r.a
|
5 |
-
/* translators: %s: module name */,{title:Object(n.sprintf)(Object(n.__)("Data error in %s","google-site-kit"),t),description:a,error:!0});return"Invalid Credentials"===a&&Object(i.u)(s.a),Object(o.a)(d,c,l,u)}}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return d})),a.d(t,"c",(function(){return u}));var n=a(81),i=e._googlesitekitBaseData||{},r={isFirstAdmin:i.isFirstAdmin,trackingEnabled:i.trackingEnabled,trackingID:i.trackingID,referenceSiteURL:i.referenceSiteURL,userIDHash:i.userIDHash},o=Object(n.a)(r),s=o.enableTracking,c=o.disableTracking,l=o.isTrackingEnabled,u=o.trackEvent;function d(e){e?s():c()}d(l())}).call(this,a(16))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o}));var n=a(12),i=a(0);function r(){var e=Object(n.c)("googlesitekit.dateRange","last-28-days").match(/last-(\d+)-days/);if(e&&e[1])return Object(i.sprintf)(
|
6 |
-
/* translators: %s: Number of days matched. */
|
7 |
-
Object(i._n)("%s day","%s days",parseInt(e[1],10),"google-site-kit"),e[1]);throw new Error("Unrecognized date range slug used in `googlesitekit.dateRange`.")}function o(){return Object(n.c)("googlesitekit.dateRange","last-28-days")}},function(e,t,a){"use strict";a.d(t,"f",(function(){return d})),a.d(t,"a",(function(){return g})),a.d(t,"b",(function(){return p}));var n=a(4),i=a.n(n),r=a(11),o=a(3),s=a(19),c=a(13),l=a(121);a.d(t,"e",(function(){return l.a}));a(71);var u=a(89);a.d(t,"c",(function(){return u.a})),a.d(t,"d",(function(){return u.b}));a(100);function d(e){var t=[[{type:"date",label:"Day"},{type:"number",label:"RPM"},{type:"number",label:"Earnings"},{type:"number",label:"Impressions"}]];return Object(r.each)(e,(function(e){var a=new Date(e[0]);t.push([a,e[2],e[1],e[3]])})),{dataMap:t}}var g=function(){var e,t,a,n;return i.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=Object(o.j)(),t=e.adsense.active,a=e.analytics.active,n=!0,!t||!a){r.next=7;break}return r.next=7,i.a.awrap(c.c.get(c.b,"analytics","report",s.a).then((function(e){e&&(n=!0)})).catch((function(e){400===e.code&&"INVALID_ARGUMENT"===e.message&&(n=!1)})));case 7:return r.abrupt("return",new Promise((function(e){e(n)})));case 8:case"end":return r.stop()}}))},p=function(e,t,a){if(!a.data||!a.data.dateRange||"last-28-days"!==a.data.dateRange)return!1;var n=[];return e.totals&&(n=e.totals),0===(n=n.filter((function(e){return 0<e}))).length}},function(e,t,a){"use strict";(function(e){var n=a(27),i=a.n(n),r=e._googlesitekitAPIFetchData||{},o=r.nonce,s=r.nonceEndpoint,c=r.preloadedData,l=r.rootURL;i.a.nonceEndpoint=s,i.a.nonceMiddleware=i.a.createNonceMiddleware(o),i.a.rootURLMiddleware=i.a.createRootURLMiddleware(l),i.a.preloadingMiddleware=i.a.createPreloadingMiddleware(c),i.a.use(i.a.nonceMiddleware),i.a.use(i.a.mediaUploadMiddleware),i.a.use(i.a.rootURLMiddleware),i.a.use(i.a.preloadingMiddleware),t.default=i.a}).call(this,a(16))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(38);function i(e){return function(){e[n.a]=e[n.a]||[],e[n.a].push(arguments)}}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return l}));var n=a(37),i=a.n(n),r=a(0),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=null,a=null,n=document.querySelector("#toplevel_page_googlesitekit-dashboard .googlesitekit-notifications-counter"),i=document.querySelector("#wp-admin-bar-google-site-kit .googlesitekit-notifications-counter");if(n&&i)return!1;if(t=document.querySelector("#toplevel_page_googlesitekit-dashboard .wp-menu-name"),a=document.querySelector("#wp-admin-bar-google-site-kit .ab-item"),null===t&&null===a)return!1;var o=document.createElement("span");o.setAttribute("class","googlesitekit-notifications-counter update-plugins count-".concat(e));var s=document.createElement("span");s.setAttribute("class","plugin-count"),s.setAttribute("aria-hidden","true"),s.textContent=e;var c=document.createElement("span");return c.setAttribute("class","screen-reader-text"),c.textContent=Object(r.sprintf)(
|
1 |
+
!function(e){function t(t){for(var n,o,s=t[0],c=t[1],u=t[2],d=0,g=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&g.push(i[o][0]),i[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(t);g.length;)g.shift()();return r.push.apply(r,u||[]),a()}function a(){for(var e,t=0;t<r.length;t++){for(var a=r[t],n=!0,o=1;o<a.length;o++){var s=a[o];0!==i[s]&&(n=!1)}n&&(r.splice(t--,1),e=__webpack_require__(__webpack_require__.s=a[0]))}return e}var n={},i={10:0},r=[];function __webpack_require__(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,__webpack_require__),a.l=!0,a.exports}__webpack_require__.m=e,__webpack_require__.c=n,__webpack_require__.d=function(e,t,a){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(__webpack_require__.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(a,n,function(t){return e[t]}.bind(null,n));return a},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="";var o=window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var l=s;r.push([600,0]),a()}([,function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return s})),a.d(t,"a",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"f",(function(){return d})),a.d(t,"g",(function(){return g})),a.d(t,"h",(function(){return p})),a.d(t,"b",(function(){return b})),a.d(t,"i",(function(){return v})),a.d(t,"j",(function(){return y})),a.d(t,"k",(function(){return E})),a.d(t,"c",(function(){return D})),a.d(t,"l",(function(){return A})),a.d(t,"m",(function(){return N})),a.d(t,"n",(function(){return P})),a.d(t,"o",(function(){return L})),a.d(t,"p",(function(){return M})),a.d(t,"q",(function(){return I})),a.d(t,"r",(function(){return R})),a.d(t,"s",(function(){return W}));var n=a(104);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._element||n,r=i.__experimentalCreateInterpolateElement,o=i.Children,s=i.cloneElement,c=i.Component,l=i.concatChildren,u=i.createContext,d=i.createElement,g=i.createPortal,p=i.createRef,m=i.findDOMNode,h=i.forwardRef,b=i.Fragment,f=i.isEmptyElement,v=i.isValidElement,y=i.lazy,_=i.memo,k=i.Platform,O=i.RawHTML,E=i.render,j=i.renderToString,S=i.StrictMode,D=i.Suspense,w=i.switchChildrenNodeName,C=i.unmountComponentAtNode,A=i.useCallback,N=i.useContext,x=i.useDebugValue,P=i.useEffect,T=i.useImperativeHandle,L=i.useLayoutEffect,M=i.useMemo,I=i.useReducer,R=i.useRef,W=i.useState;void 0===e.googlesitekit._element&&(e.googlesitekit._element={__experimentalCreateInterpolateElement:r,Children:o,cloneElement:s,Component:c,concatChildren:l,createContext:u,createElement:d,createPortal:g,createRef:p,findDOMNode:m,forwardRef:h,Fragment:b,isEmptyElement:f,isValidElement:v,lazy:y,memo:_,Platform:k,RawHTML:O,render:E,renderToString:j,StrictMode:S,Suspense:D,switchChildrenNodeName:w,unmountComponentAtNode:C,useCallback:A,useContext:N,useDebugValue:x,useEffect:P,useImperativeHandle:T,useLayoutEffect:L,useMemo:M,useReducer:I,useRef:R,useState:W})}).call(this,a(16))},,function(e,t,a){"use strict";(function(e,n){a.d(t,"t",(function(){return w})),a.d(t,"r",(function(){return C})),a.d(t,"o",(function(){return N})),a.d(t,"s",(function(){return x})),a.d(t,"i",(function(){return P})),a.d(t,"c",(function(){return T})),a.d(t,"g",(function(){return L})),a.d(t,"k",(function(){return M})),a.d(t,"m",(function(){return I})),a.d(t,"n",(function(){return R})),a.d(t,"z",(function(){return W})),a.d(t,"A",(function(){return U})),a.d(t,"b",(function(){return q})),a.d(t,"x",(function(){return H})),a.d(t,"v",(function(){return F})),a.d(t,"f",(function(){return z})),a.d(t,"q",(function(){return G})),a.d(t,"j",(function(){return B}));var i=a(4),r=a.n(i),o=a(11),s=a.n(o),c=a(49),l=a.n(c),u=a(33),d=a.n(u),g=(a(1),a(12)),p=a(13),m=a(0),h=a(37),b=a(154),f=a(30);a.d(t,"a",(function(){return f.a}));var v=a(50);a.d(t,"y",(function(){return v.c}));var y=a(21),_=a(57);a.d(t,"u",(function(){return _.a}));var k=a(56);a.d(t,"w",(function(){return k.a}));var O=a(54);a.d(t,"d",(function(){return O.b})),a.d(t,"l",(function(){return O.c}));a(40);var E=a(60);function j(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function S(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(a,!0).forEach((function(t){s()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}a.d(t,"p",(function(){return E.a})),a.d(t,"e",(function(){return y.a})),a.d(t,"h",(function(){return y.b}));var D=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Object(g.isFinite)(e)?e:Number(e),Object(g.isFinite)(e)||(console.warn("Invalid number",e,d()(e)),e=0),t)return C(e,{style:"currency",currency:t});var a={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in millions.
|
2 |
+
Object(m.__)("%sM","google-site-kit"),C(D(e),e%10==0?{}:a)):1e4<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in thousands.
|
3 |
+
Object(m.__)("%sK","google-site-kit"),C(D(e))):1e3<=e?Object(m.sprintf)(// translators: %s: an abbreviated number in thousands.
|
4 |
+
Object(m.__)("%sK","google-site-kit"),C(D(e),e%10==0?{}:a)):e.toString()},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.locale,n=void 0===a?A():a,i=l()(t,["locale"]);return new Intl.NumberFormat(n,i).format(e)},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,a=Object(g.get)(t,["_googlesitekitLegacyData","locale","","lang"]);if(a){var n=a.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language},N=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}},x=function(e){if(e=parseInt(e,10),isNaN(e)||0===e)return"0.0s";var t={};return t.hours=Math.floor(e/60/60),t.minutes=Math.floor(e/60%60),t.seconds=Math.floor(e%60),((t.hours?t.hours+"h ":"")+(t.minutes?t.minutes+"m ":"")+(t.seconds?t.seconds+"s ":"")).trim()},P=function(e,t){var a=1e3*N("day"),n=e.getTime(),i=t.getTime();return Math.round(Math.abs(n-i)/a)},T=function(e,t){if("0"===e||0===e||isNaN(e))return"";var a=((t-e)/e*100).toFixed(1);return isNaN(a)||"Infinity"===a?"":a},L=function(e,t){return Object(g.map)(e,(function(e,a){return[e[0],e[t]||(0===a?"":0)]}))},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e._googlesitekitLegacyData,a=t.modules;return a?Object.keys(a).reduce((function(e,t){return"object"!==d()(a[t])?e:void 0===a[t].slug||void 0===a[t].name||a[t].slug!==t?e:S({},e,s()({},t,a[t]))}),{}):{}},I=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e._googlesitekitLegacyData,i=n.admin,r=i.connectURL,o=i.adminRoot,s=n.setup.needReauthenticate,c=M(n)[t].screenID,l="pagespeed-insights"===t?{notification:"authentication_success",reAuth:void 0}:{},u=Object(h.a)(o,S({page:t&&a&&c?c:"googlesitekit-dashboard",slug:t,reAuth:a},l));if(!s)return u;var d=encodeURIComponent(Object(b.a)(u));return u=o+"?"+d,Object(h.a)(r,{redirect:u,status:a})},R=function(t,a){var n=e._googlesitekitLegacyData.admin.adminRoot;return t||(t="googlesitekit-dashboard"),a=S({page:t},a),Object(h.a)(n,a)},W=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},U=function(e){return e.match(/^(GTM|OPT)-[a-zA-Z\d]{7}$/)},q=function(e,t,a){var n,i,o,s,c=arguments;return r.a.async((function(l){for(;;)switch(l.prev=l.next){case 0:return n=c.length>3&&void 0!==c[3]?c[3]:v.c,i=c.length>4&&void 0!==c[4]?c[4]:M,l.next=4,r.a.awrap(e.setModuleActive(t,a));case 4:return o=l.sent,(s=i())[t]&&(s[t].active=a),l.next=9,r.a.awrap(n("".concat(t,"_setup"),a?"module_activate":"module_deactivate",t));case 9:return l.abrupt("return",o);case 10:case"end":return l.stop()}}))},H=function(t,a,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e._googlesitekitLegacyData,o=M(r)[t],s=o.settings,c=o.setupComplete,l=i||document.getElementById("confirm-changes-".concat(t));if(c&&l){var u=!!Object.keys(a).find((function(e){var t=a[e];return!Object(g.isEqual)(n[e],s[t])}));return i||(l.disabled=!u),u}},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(p.b)("googlesitekit.ErrorNotification","googlesitekit.ErrorNotification",Object(y.b)(e,t),1)},z=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(g.unescape)(t)};function G(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"33",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"33",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";if(e._googlesitekitLegacyData){var s=n.createElement(f.a,{id:t,width:i,height:r,className:o});return a?s=n.createElement(f.a,{id:"".concat(t,"-disabled"),width:i,height:r,className:o}):"pagespeed-insights"===t&&(s=n.createElement("img",{src:e._googlesitekitLegacyData.admin.assetsRoot+"images/icon-pagespeed.png",width:i,alt:"",className:o})),s}}function B(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e._googlesitekitBaseData,n=a.blogPrefix;return a.isNetworkMode?t:n+t}}).call(this,a(16),a(10))},,,,,,,,,,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return p})),a.d(t,"c",(function(){return m}));var n=a(100);void 0===e.googlesitekit&&(e.googlesitekit={});var i=e.googlesitekit._hooks||n,r=i.addAction,o=i.addFilter,s=i.removeAction,c=i.removeFilter,l=i.hasAction,u=i.hasFilter,d=i.removeAllActions,g=i.removeAllFilters,p=i.doAction,m=i.applyFilters,h=i.currentAction,b=i.currentFilter,f=i.doingAction,v=i.doingFilter,y=i.didAction,_=i.didFilter,k=i.actions,O=i.filters;void 0===e.googlesitekit._hooks&&(e.googlesitekit._hooks={addAction:r,addFilter:o,removeAction:s,removeFilter:c,hasAction:l,hasFilter:u,removeAllActions:d,removeAllFilters:g,doAction:p,applyFilters:m,currentAction:h,currentFilter:b,doingAction:f,doingFilter:v,didAction:y,didFilter:_,actions:k,filters:O})}).call(this,a(16))},function(e,t,a){"use strict";var n=a(11),i=a.n(n),r=a(12),o=a(58),s=a(37),c=a(13),l=a(55),u=a(21),d=a(54),g=a(94),p=a(131),m=a(29),h=a(71);a.d(t,"a",(function(){return h.a})),a.d(t,"b",(function(){return h.b}));var b=a(106);function f(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&a.push.apply(a,Object.getOwnPropertySymbols(e)),t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a}function v(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?f(a,!0).forEach((function(t){i()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):f(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var y=function(e,t){var a=v({data:{}},e);return a.data=v({dateRange:t},a.data),a},_={maxRequests:10,combinedGetFromCache:function(e){var t=this;return new Promise((function(a,n){try{var i=[],o=Object(l.b)();Object(r.each)(e,(function(e){var a=y(e,o);a.key=Object(m.c)(a.type,a.identifier,a.datapoint,a.data);var n=Object(m.b)(a.key,a.maxAge);void 0!==n&&(i[a.key]=n,t.resolve(a,n))})),a(i)}catch(e){n()}}))},combinedGet:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],i=25,u=Object(l.b)();Object(r.each)(e,(function(e){var a=y(e,u);a.key=Object(m.c)(a.type,a.identifier,a.datapoint,a.data);var r=Object(m.b)(a.key,a.maxAge);void 0!==r?(setTimeout((function(){t.resolve(a,r)}),i),i+=25):n.push(a)})),n=Object(r.sortBy)(n,"priority");var g=[],p=[],h={},b=!!n.find((function(e){return e.priority<10}));Object(r.each)(n,(function(e,t){!a&&10<=e.priority&&b?p.push(e):h[e.key]?h[e.key].push(t):(h[e.key]=[t],g.push(e))}));var f=10,v=g.slice(0,f),_=g.slice(f);if(_=_.concat(p),0!==v.length||0!==_.length){0<_.length&&0<this.maxRequests--?setTimeout((function(){t.combinedGet(_,!0)}),50):this.maxRequests=10;var k=null!==Object(d.c)("datacache");return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/data/",{datacache:k||void 0}),data:{request:v},method:"POST"}).then((function(e){Object(r.each)(e,(function(e,a){h[a]?(t.handleWPError(e),Object(r.each)(h[a],(function(a){var i=n[a];Object(m.e)(i.key,e),t.resolve(i,e)})),0===_.length&&Object(c.d)("googlesitekit.dataLoaded","api")):console.error("data_error","unknown response key "+a)}))})).catch((function(e){console.warn("Error caught during combinedGet",e)}))}Object(c.d)("googlesitekit.dataLoaded","cache")},handleWPError:function(e){var t=["code","data","message"],a=Object(r.intersection)(t,Object.keys(e));if(Object(r.isEqual)(t,a)){console.warn("WP Error in data response",e);var n=e.data;if(n&&n.reason){var i=0;["authError","insufficientPermissions"].includes(n.reason)&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(g.a),1),i++),"forbidden"===n.reason&&(Object(c.b)("googlesitekit.ErrorNotification","googlesitekit.AuthNotification",Object(u.b)(p.a),1),i++),i&&Object(c.b)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease",(function(e){return Object(c.g)("googlesitekit.TotalNotifications","googlesitekit.AuthCountIncrease"),e+i}))}}},resolve:function(e,t){e&&"function"==typeof e.callback&&e.callback(t,e.datapoint)},invalidateCacheGroup:b.a,collectModuleData:function(e,t){var a=Object(c.c)("googlesitekit.module"+e+"DataRequest",[],t);0!==a.length&&this.combinedGet(a)},get:function(e,t,a){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=Object(m.c)(e,t,a,i);if(!r){var l=Object(m.b)(c,3600);if(void 0!==l)return new Promise((function(e){e(l)}))}return Object(o.default)({path:Object(s.a)("/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),i)}).then((function(e){return r||Object(m.e)(c,e),Promise.resolve(e)})).catch((function(e){return n.handleWPError(e),Promise.reject(e)}))},set:function(e,t,a,n){var i={};return i.data=n,Object(o.default)({path:"/google-site-kit/v1/".concat(e,"/").concat(t,"/data/").concat(a),data:i,method:"POST"}).then((function(n){return _.invalidateCacheGroup(e,t,a),new Promise((function(e){e(n)}))}))},setModuleActive:function(e,t){return this.set(h.a,"modules","activation",{slug:e,active:t})}};Object(c.e)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData")||Object(c.a)("googlesitekit.moduleLoaded","googlesitekit.collectModuleData",_.collectModuleData.bind(_)),t.c=_},function(e,t){e.exports=googlesitekit.data},,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"p",(function(){return b})),a.d(t,"i",(function(){return d})),a.d(t,"j",(function(){return g})),a.d(t,"m",(function(){return p})),a.d(t,"n",(function(){return m})),a.d(t,"l",(function(){return h})),a.d(t,"k",(function(){return d})),a.d(t,"e",(function(){return f})),a.d(t,"c",(function(){return y})),a.d(t,"d",(function(){return _})),a.d(t,"f",(function(){return k})),a.d(t,"h",(function(){return O})),a.d(t,"a",(function(){return E})),a.d(t,"q",(function(){return j})),a.d(t,"o",(function(){return S})),a.d(t,"s",(function(){return D})),a.d(t,"r",(function(){return w})),a.d(t,"g",(function(){return C}));var n=a(12),i=a(0),r=a(3),o=function(e){if(!e||!e.length)return!1;var t=e[0].data.totals,a=t[0].values,n=t[1].values,i=a[0],o=a[1],s=a[2],c=a[3],l=a[4],u=a[5];return{totalUsers:i,totalSessions:o,averageBounceRate:s,averageSessionDuration:c,totalUsersChange:Object(r.c)(n[0],a[0]),totalSessionsChange:Object(r.c)(n[1],a[1]),averageBounceRateChange:Object(r.c)(n[2],a[2]),averageSessionDurationChange:Object(r.c)(n[3],a[3]),goalCompletions:l,goalCompletionsChange:Object(r.c)(n[4],a[4]),totalPageViews:u,totalPageViewsChange:Object(r.c)(n[5],a[5])}},s=function(e){if("string"==typeof e&&e.match(/[0-9]{8}/)){var t=e.slice(0,4),a=Number(e.slice(4,6))-1,n=e.slice(6,8);return new Date(t,a.toString(),n)}return!1},c=a(38),l=a.n(c),u=a(22),d=function(e){return(parseInt(e,10)||0)>0};function g(e){return e===u.a||d(e)}function p(e){return"string"==typeof e&&e.match(/^UA-\d+-\d+$/)}function m(e){return e===u.f||p(e)}function h(e){return e===u.e||d(e)}function b(e){if(!p(e))return!1;var t=e.match(/^UA-(\d+)-(\d+)/),a=l()(t,3);return{accountID:a[1],propertyID:e,number:a[2]}}var f=function(e){if(!e||!e.length)return null;var t=e[0].data,a=t.rows,i=t.totals[0].values[0],r=[["Source","Percent"]];return Object(n.each)(a,(function(e){var t=e.metrics[0].values[0]/i;if(1>100*t)return!1;var a=e.dimensions[0].replace(/\(none\)/gi,"direct");r.push([a,t])})),r};function v(e,t){var a=[];return Object(n.each)(e,(function(e){if(e.metrics){var n=e.metrics[0].values,i=e.dimensions[0],r=s(i);a.push([r,n[t]])}})),a}var y=function(e,t,a){if(!e||!e.length)return null;var r=e[0].data.rows;if(!r)return!1;var o=r.length;if(2*a>o){for(var s=new Date,c=0;a>c;c++){var l=(s.getMonth()+1).toString(),u=s.getDate().toString(),d=s.getFullYear().toString()+(2>l.length?"0":"")+l+(2>u.length?"0":"")+u;if(c>o){var g={dimensions:[d],metrics:[{values:[0,0,0,0,0]}]};r.unshift(g)}s.setDate(s.getDate()-1)}r.push([0,0])}var p=[Object(i.__)("Users","google-site-kit"),Object(i.__)("Sessions","google-site-kit"),Object(i.__)("Bounce Rate","google-site-kit"),Object(i.__)("Session Duration","google-site-kit")],m=[[{type:"date",label:Object(i.__)("Day","google-site-kit")},{type:"number",label:p[t]},{type:"number",label:Object(i.__)("Previous period","google-site-kit")}]],h=r.slice(r.length-a,r.length),b=r.slice(0,r.length-a),f=v(h,t),y=v(b,t);return Object(n.each)(f,(function(e,t){e[0]&&e[1]&&y[t]&&m.push([e[0],e[1],y[t][1]])})),m},_=function(e){if(!e||!e.length)return null;var t=e[0].data.rows,a=[[{type:"date",label:"Day"},{type:"number",label:"Users"},{type:"number",label:"Sessions"},{type:"number",label:"Goals Completed"}]];return Object(n.each)(t,(function(e){var t=e.metrics[0].values,n=e.dimensions[0],i=s(n);a.push([i,t[0],t[1],t[4]])})),a},k=function(e){return!(!e.error||!e.error.status)&&function(e,t){var a="";switch(e){case"INVALID_ARGUMENT":a=Object(i.__)("Analytics module needs to be configured.","google-site-kit");break;case"UNAUTHENTICATED":a=Object(i.__)("You need to be authenticated to get this data.","google-site-kit");break;case"PERMISSION_DENIED":a=Object(i.__)("Your account does not have sufficient permission to access this data, please consult to your web administrator.","google-site-kit");break;case"RESOURCE_EXHAUSTED":a=Object(i.__)("Your account exceeded the maximum quota. Please try again later.","google-site-kit");break;case"INTERNAL":a=Object(i.__)("Unexpected internal server error occurred.","google-site-kit");break;case"BACKEND_ERROR":a=Object(i.__)("Analytics server returned unknown error. Please try again later.","google-site-kit");break;case"UNAVAILABLE":a=Object(i.__)("The service was unable to process the request. Please try again later.","google-site-kit");break;default:a=t}return a}(e.error.status,e.error.message)},O=function(e){if(!e||!e.length)return!0;if(e&&e[0]&&e[0].data&&e[0].data.totals&&e[0].data.totals[0]){var t=e[0].data.totals[0].values,a=!0;return Object(n.each)(t,(function(e){0!==parseInt(e)&&(a=!1)})),a}return!1},E={dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:adsenseRevenue",alias:"Earnings"},{expression:"ga:adsenseECPM",alias:"Page RPM"},{expression:"ga:adsensePageImpressions",alias:"Impressions"}],orderby:[{fieldName:"ga:adsenseRevenue",sortOrder:"DESCENDING"}],limit:10},j={compareDateRanges:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"}],limit:180},S={multiDateRange:1,dimensions:"ga:date",metrics:[{expression:"ga:users",alias:"Users"},{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:bounceRate",alias:"Bounce Rate"},{expression:"ga:avgSessionDuration",alias:"Average Session Duration"},{expression:"ga:goalCompletionsAll",alias:"Goal Completions"},{expression:"ga:pageviews",alias:"Pageviews"}],limit:10},D={metrics:[{expression:"ga:users",alias:"Total Users"}]},w={dimensions:"ga:medium",metrics:[{expression:"ga:sessions",alias:"Sessions"},{expression:"ga:users",alias:"Users"},{expression:"ga:newUsers",alias:"New Users"}],orderby:[{fieldName:"ga:sessions",sortOrder:"DESCENDING"}],limit:10},C=function(){return{dimensions:["ga:pageTitle","ga:pagePath"].join(","),metrics:[{expression:"ga:pageviews",alias:"Pageviews"},{expression:"ga:uniquePageviews",alias:"Unique Pageviews"},{expression:"ga:bounceRate",alias:"Bounce rate"}],orderby:[{fieldName:"ga:pageviews",sortOrder:"DESCENDING"}],limit:10}}},,function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(87),i=a.n(n),r=a(1),o=function(e){return function(t){return function FilteredComponent(a){return Object(r.f)(r.b,{},"",Object(r.f)(t,a),e)}}},s=function(t,a){return function(n){return function InnerComponent(r){return e.createElement(t,i()({},r,a,{OriginalComponent:n}))}}}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"f",(function(){return r})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return c})),a.d(t,"g",(function(){return l})),a.d(t,"b",(function(){return u}));var n="modules/analytics",i="account_create",r="property_create",o="profile_create",s="analyticsAccountCreate",c="analyticsSetup",l="https://www.googleapis.com/auth/analytics.provision",u="https://www.googleapis.com/auth/analytics.edit"},function(e,t,a){"use strict";(function(e){var n=a(87),i=a.n(n),r=a(5),o=a.n(r),s=a(6),c=a.n(s),l=a(7),u=a.n(l),d=a(8),g=a.n(d),p=a(9),m=a.n(p),h=a(1),b=a(12),f=a(13),v=a(0),y=a(3),_=a(63),k=a(64),O=a(116);t.a=function(t,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{inGrid:!1,fullWidth:!1,createGrid:!1},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1},l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(e){if(e&&e.error)return e.error.message?e.error.message:e.error.errors&&e.error.errors[0]&&e.error.errors[0].message?e.error.errors[0].message:Object(v.__)("Unidentified error","google-site-kit");if(e&&e.errors&&e.errors[0]&&e.errors[0].message)return e.errors[0].message;if(e&&e.error_data){var t=Object.values(e.error_data);if(t[0]&&"RateLimitExceeded"===t[0].reason)return Object(v.__)("Too many requests have been sent within a given time span. Please reload this page again in a few seconds","google-site-kit")}if(e&&e.errors){var a=Object.values(e.errors);if(a[0]&&a[0][0])return a[0][0]}return!!(e.code&&e.message&&e.data&&e.data.status)&&e.message};return function(d){function NewComponent(e){var t;o()(this,NewComponent),(t=u()(this,g()(NewComponent).call(this,e))).state={data:!1,zeroData:!1,error:!1},Object(f.a)("googlesitekit.moduleDataReset","googlesitekit.moduleDataResetHandler",(function(){t.setState({data:!1})}));var n=function(e,a){var n=t.props,i=n.handleDataError,r=n.handleDataSuccess,o=a.datapoint,c=a.identifier,u=a.toState,d=l(e);d?(t.setState({error:d,module:c}),i&&i(d)):s(e,o,a)?(i&&i(d),t.setState({zeroData:!0})):r&&r(),t.setState({requestDataToState:u,data:e,datapoint:o,module:c})};return Object(b.each)(a,(function(e){Array.isArray(e.context)?Object(b.each)(e.context,(function(t){Object(f.b)("googlesitekit.module".concat(t,"DataRequest"),"googlesitekit.data".concat(t),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})):Object(f.b)("googlesitekit.module".concat(e.context,"DataRequest"),"googlesitekit.data".concat(e.context),(function(t){return e.callback=function(t){n(t,e)},t.push(e),t}))})),t}return m()(NewComponent,d),c()(NewComponent,[{key:"render",value:function(){var a=this.state,o=a.data,s=a.datapoint,c=a.module,l=a.zeroData,u=a.error,d=a.requestDataToState;if(!o)return n;var g=Object(y.k)(),p=c?g[c].name:Object(v.__)("Site Kit","google-site-kit");return c&&g[c].active&&!g[c].setupComplete?Object(O.a)(c,r.inGrid,r.fullWidth,r.createGrid):u?"string"!=typeof u?u:Object(k.a)(p,u,r.inGrid,r.fullWidth,r.createGrid):l?Object(_.a)(p,r.inGrid,r.fullWidth,r.createGrid):e.createElement(t,i()({data:o,datapoint:s,requestDataToState:d},this.props))}}]),NewComponent}(h.a)}}).call(this,a(10))},function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return i}));var n="core/user",i="missing_required_scopes"},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(17),f=a.n(b),v=function(t){function Link(){return i()(this,Link),c()(this,u()(Link).apply(this,arguments))}return g()(Link,t),o()(Link,[{key:"render",value:function(){var t=this.props,a=t.dangerouslySetInnerHTML,n=t.onClick,i=t.href,r=t.children,o=t.className,s=t.arrow,c=t.external,l=t.inverse,u=t.back,d=t.small,g=t.inherit,p=t.caps,m=t.danger,h=t.disabled,b=t.id,v=i&&!h,y=v?"a":"button";return e.createElement(y,{className:f()("googlesitekit-cta-link",o,{"googlesitekit-cta-link--arrow":s,"googlesitekit-cta-link--external":c,"googlesitekit-cta-link--inverse":l,"googlesitekit-cta-link--back":u,"googlesitekit-cta-link--small":d,"googlesitekit-cta-link--inherit":g,"googlesitekit-cta-link--caps":p,"googlesitekit-cta-link--danger":m,"googlesitekit-cta-link--disabled":h}),onClick:n,id:b,href:v?i:void 0,target:v&&c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,disabled:h,dangerouslySetInnerHTML:a},r)}}]),Link}(p.a);v.propTypes={dangerouslySetInnerHTML:h.a.shape({__html:h.a.string}),onClick:h.a.func,href:h.a.string,children:h.a.oneOfType([h.a.string.isRequired,h.a.array.isRequired]),className:h.a.string,arrow:h.a.bool,external:h.a.bool,inverse:h.a.bool,back:h.a.bool,small:h.a.bool,inherit:h.a.bool,caps:h.a.bool,danger:h.a.bool,disabled:h.a.bool},v.defaultProps={dangerouslySetInnerHTML:void 0,onClick:null,href:"",className:"",arrow:!1,external:!1,inverse:!1,back:!1,small:!1,inherit:!1,caps:!1,danger:!1,disabled:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(17),f=a.n(b),v=a(146),y=a(147),_=function(t){function Layout(){return i()(this,Layout),c()(this,u()(Layout).apply(this,arguments))}return g()(Layout,t),o()(Layout,[{key:"render",value:function(){var t=this.props,a=t.header,n=t.footer,i=t.children,r=t.title,o=t.headerCtaLabel,s=t.headerCtaLink,c=t.footerCtaLabel,l=t.footerCtaLink,u=t.footerContent,d=t.className,g=t.fill,p=t.relative;return e.createElement("div",{className:f()("googlesitekit-layout",d,{"googlesitekit-layout--fill":g,"googlesitekit-layout--relative":p})},a&&e.createElement(v.a,{title:r,ctaLabel:o,ctaLink:s}),i,n&&e.createElement(y.a,{ctaLabel:c,ctaLink:l,footerContent:u}))}}]),Layout}(p.a);_.propTypes={header:h.a.bool,footer:h.a.bool,children:h.a.node.isRequired,title:h.a.string,headerCtaLabel:h.a.string,headerCtaLink:h.a.string,footerCtaLabel:h.a.string,footerCtaLink:h.a.string,footerContent:h.a.node,className:h.a.string,fill:h.a.bool,relative:h.a.bool},_.defaultProps={header:!1,footer:!1,title:"",headerCtaLabel:"",headerCtaLink:"",footerCtaLabel:"",footerCtaLink:"",footerContent:null,className:"",fill:!1,relative:!1},t.a=_}).call(this,a(10))},,function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(9),g=a.n(d),p=a(1),m=a(2),h=a.n(m),b=a(17),f=a.n(b),v=function(t){function PreviewBlock(){return i()(this,PreviewBlock),c()(this,u()(PreviewBlock).apply(this,arguments))}return g()(PreviewBlock,t),o()(PreviewBlock,[{key:"render",value:function(){var t=this.props,a=t.width,n=t.height,i=t.shape,r=t.padding;return e.createElement("div",{className:f()("googlesitekit-preview-block",{"googlesitekit-preview-block--padding":r}),style:{width:a,height:n}},e.createElement("div",{className:f()("googlesitekit-preview-block__wrapper",{"googlesitekit-preview-block__wrapper--circle":"circular"===i})}))}}]),PreviewBlock}(p.a);v.propTypes={width:h.a.string,height:h.a.string,shape:h.a.string,padding:h.a.bool},v.defaultProps={width:"100px",height:"100px",shape:"square",padding:!1},t.a=v}).call(this,a(10))},function(e,t,a){"use strict";(function(e){a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return l})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return g}));var n=a(33),i=a.n(n),r=a(12),o=a(40),s=a(56),c=function(){e._googlesitekitLegacyData.admin=e._googlesitekitLegacyData.admin||{},"string"==typeof e._googlesitekitLegacyData.admin.datacache&&(e._googlesitekitLegacyData.admin.datacache=JSON.parse(e._googlesitekitLegacyData.admin.datacache)),"object"!==i()(e._googlesitekitLegacyData.admin.datacache)&&(e._googlesitekitLegacyData.admin.datacache={})},l=function(t,a){if(void 0!==a&&(!a||"object"!==i()(a)||!a.error&&!a.errors)){c(),e._googlesitekitLegacyData.admin.datacache[t]=Object(r.cloneDeep)(a);var n={value:a,date:Date.now()/1e3};Object(o.a)().setItem("googlesitekit_"+t,JSON.stringify(n))}},u=function(t,a){if(!e._googlesitekitLegacyData.admin.nojscache){if(c(),void 0!==e._googlesitekitLegacyData.admin.datacache[t])return e._googlesitekitLegacyData.admin.datacache[t];var n=JSON.parse(Object(o.a)().getItem("googlesitekit_"+t));return n&&"object"===i()(n)&&n.date&&(!a||Date.now()/1e3-n.date<a)?(e._googlesitekitLegacyData.admin.datacache[t]=Object(r.cloneDeep)(n.value),Object(r.cloneDeep)(e._googlesitekitLegacyData.admin.datacache[t])):void 0}},d=function(t){c(),delete e._googlesitekitLegacyData.admin.datacache[t],Object(o.a)().removeItem("googlesitekit_"+t)},g=function(e,t,a){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=[],o=[e,t,a],c=0,l=o;c<l.length;c++){var u=l[c];if(!u||!u.length)break;r.push(u)}return 3===r.length&&n&&"object"===i()(n)&&Object.keys(n).length&&r.push(Object(s.a)(n)),r.join("::")}}).call(this,a(16))},function(e,t,a){"use strict";(function(e,n){a(1);var i=a(2),r=a.n(i),o=a(17),s=a.n(o),c=function SvgIcon(t){var a=t.id,i=t.className,r=t.height,o=t.width,c="".concat(e._googlesitekitLegacyData.admin.assetsRoot,"svg/svg.svg");return n.createElement("svg",{className:s()("svg",i),height:r,width:o},n.createElement("use",{xlinkHref:"".concat(c,"#").concat(a)}))};c.propTypes={id:r.a.string.isRequired,className:r.a.string,height:r.a.string,width:r.a.string},c.defaultProps={className:"",height:20,width:20},t.a=c}).call(this,a(16),a(10))},function(e,t,a){"use strict";(function(e){var n=a(5),i=a.n(n),r=a(6),o=a.n(r),s=a(7),c=a.n(s),l=a(8),u=a.n(l),d=a(18),g=a.n(d),p=a(9),m=a.n(p),h=a(1),b=a(2),f=a.n(b),v=a(17),y=a.n(v),_=a(129),k=a(60),O=a(77),E=function(t){
|
|
|
|
|
|