From 7049649aacdd2d98745af971143776de752255d5 Mon Sep 17 00:00:00 2001 From: Henrique Mouta Date: Mon, 11 Mar 2024 11:37:25 +0000 Subject: [PATCH] Use suffix/prefix wrapper components and CSS clean-up --- build/content-helper/editor-sidebar.asset.php | 2 +- build/content-helper/editor-sidebar.css | 6 ++--- build/content-helper/editor-sidebar.js | 16 ++++++------- .../components/input-range/component.tsx | 6 ++++- .../common/components/input-range/style.scss | 13 ----------- .../performance-details/component.tsx | 15 ++++++++++-- .../performance-details.scss | 23 ------------------- .../related-posts/component.tsx | 15 +++++++++--- .../related-posts/related-posts.scss | 23 ------------------- 9 files changed, 42 insertions(+), 77 deletions(-) diff --git a/build/content-helper/editor-sidebar.asset.php b/build/content-helper/editor-sidebar.asset.php index 216c6dc13..1760c5a68 100644 --- a/build/content-helper/editor-sidebar.asset.php +++ b/build/content-helper/editor-sidebar.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '1013e223b437772e186b'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'a727f0bb3d0187a297dd'); diff --git a/build/content-helper/editor-sidebar.css b/build/content-helper/editor-sidebar.css index 402bb5788..61ff14f47 100644 --- a/build/content-helper/editor-sidebar.css +++ b/build/content-helper/editor-sidebar.css @@ -1,6 +1,6 @@ -.wp-parsely-beta-badge{align-self:end;background-color:var(--parsely-green);border-radius:.34em;box-shadow:0 .0625rem .1875rem rgba(0,0,0,.2);color:#fff;display:inline-block;font-size:.75rem;font-weight:700;margin:.125em .125em .125em auto;opacity:.8;padding:.15em .65em;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;user-select:none}.parsely-tone-selector-dropdown{align-items:center;align-self:stretch;background:var(--Gutenberg-White,#fff);border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;gap:var(--grid-unit-05,.25rem);height:2.25rem;overflow-wrap:break-word;width:100%;word-break:break-word}.parsely-tone-selector-dropdown button{height:2.0625rem}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle.has-icon svg:first-child{display:none}.parsely-tone-selector-dropdown.is-disabled{opacity:.5;pointer-events:none}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle{display:flex;gap:.625rem;width:100%}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle svg:first-of-type path{transform:scale(1.4);transform-origin:center}.parsely-tone-selector-dropdown .parsely-tone-selector-label{flex-grow:2;padding:0 var(--grid-unit-10,.5rem);text-align:left}.parsely-tone-selector-dropdown .parsely-tone-selector-label:first-letter{text-transform:uppercase}.parsely-persona-selector-custom{width:100%}.parsely-persona-selector-custom .components-base-control__field input{display:flex;height:2.5rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem)}.parsely-persona-selector-custom .components-base-control__field input,.parsely-persona-selector-dropdown{align-items:center;align-self:stretch;border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;gap:var(--grid-unit-05,.25rem)}.parsely-persona-selector-dropdown{background:var(--Gutenberg-White,#fff);height:2.25rem;overflow-wrap:break-word;width:100%;word-break:break-word}.parsely-persona-selector-dropdown .components-dropdown-menu__toggle.has-icon svg:first-child{display:none}.parsely-persona-selector-dropdown button{height:2.0625rem}.parsely-persona-selector-dropdown.is-disabled{opacity:.5;pointer-events:none}.parsely-persona-selector-dropdown .components-dropdown-menu__toggle{display:flex;gap:.625rem;width:100%}.parsely-persona-selector-dropdown .parsely-persona-selector-label{flex-grow:2;padding:0 var(--grid-unit-10,.5rem);text-align:left}.parsely-persona-selector-dropdown .parsely-persona-selector-label:first-letter{text-transform:uppercase}.parsely-tone-selector-custom{width:100%}.parsely-tone-selector-custom .components-base-control__field input{align-items:center;align-self:stretch;border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;display:flex;gap:var(--grid-unit-05,.25rem);height:2.5rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem)}#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.parsely-inputrange-control{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10,.5rem)}.parsely-inputrange-control .parsely-inputrange-control__label{margin:0}.parsely-inputrange-control .parsely-inputrange-control__controls{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-20,1rem);height:2.5rem}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control{align-items:center;align-self:stretch;display:flex;flex:1 0 0;gap:var(--grid-unit-05,.25rem)}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]::-webkit-inner-spin-button,.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]{-moz-appearance:textfield}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-base-control__field{flex-grow:1}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-base-control__field .components-flex{height:2.5rem}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-base-control__field input[type=number]{padding-left:1rem}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-input-control__suffix{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));padding-right:.625rem}.parsely-inputrange-control .parsely-inputrange-control__controls .components-range-control{flex:1 0 0;height:36px}.parsely-inputrange-control .parsely-inputrange-control__controls .components-range-control .components-range-control__root{height:2.5rem}.parsely-panel-settings{width:100%}.parsely-panel-settings .parsely-panel-settings-header{display:flex;margin:.625rem 0;width:100%}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label{flex-grow:2;margin:0 0 0 .3125rem;text-align:left}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label .components-base-control__field{align-items:center;display:flex;justify-content:space-between}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label .components-base-control__field .components-base-control__label{margin-bottom:0}.parsely-panel-settings .parsely-panel-settings-body{align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-content-helper-error{align-self:flex-start;margin:0}.wp-parsely-content-helper-error p{margin:0}.wp-parsely-content-helper-error .content-helper-error-message{margin:0!important}.wp-parsely-collapsible-panel{align-items:flex-start;align-self:stretch;border-bottom:none;border-radius:2px;border-top:none;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);margin:0;padding:0}.wp-parsely-collapsible-panel .components-panel__body-title{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10,.5rem)}.wp-parsely-collapsible-panel .components-panel__body-title .components-panel__icon,.wp-parsely-collapsible-panel .components-panel__body-title svg{margin-left:0;margin-right:var(--grid-unit-10,.5rem);order:-1}.wp-parsely-collapsible-panel .components-panel__body-title:hover{background-color:transparent}.wp-parsely-collapsible-panel.is-opened{padding:0}.wp-parsely-collapsible-panel.is-opened>div:first-of-type{margin-top:calc(var(--grid-unit-20, 1rem)*-1)}.wp-parsely-collapsible-panel.is-opened .components-panel__body-title{margin:-.75rem -1rem 0;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem) var(--grid-unit-20,1rem) var(--grid-unit-20,1rem);padding-bottom:0}.wp-parsely-collapsible-panel .components-panel__body-toggle.components-button{color:var(--Gutenberg-Gray-900,#1e1e1e);font-size:.6875rem;font-style:normal;font-weight:600;line-height:1rem;padding:var(--grid-unit-20,1rem) 0;text-transform:uppercase}.wp-parsely-collapsible-panel .components-panel__body-toggle.components-button .components-panel__arrow{right:0} +.wp-parsely-beta-badge{align-self:end;background-color:var(--parsely-green);border-radius:.34em;box-shadow:0 .0625rem .1875rem rgba(0,0,0,.2);color:#fff;display:inline-block;font-size:.75rem;font-weight:700;margin:.125em .125em .125em auto;opacity:.8;padding:.15em .65em;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;user-select:none}.parsely-tone-selector-dropdown{align-items:center;align-self:stretch;background:var(--Gutenberg-White,#fff);border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;gap:var(--grid-unit-05,.25rem);height:2.25rem;overflow-wrap:break-word;width:100%;word-break:break-word}.parsely-tone-selector-dropdown button{height:2.0625rem}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle.has-icon svg:first-child{display:none}.parsely-tone-selector-dropdown.is-disabled{opacity:.5;pointer-events:none}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle{display:flex;gap:.625rem;width:100%}.parsely-tone-selector-dropdown .components-dropdown-menu__toggle svg:first-of-type path{transform:scale(1.4);transform-origin:center}.parsely-tone-selector-dropdown .parsely-tone-selector-label{flex-grow:2;padding:0 var(--grid-unit-10,.5rem);text-align:left}.parsely-tone-selector-dropdown .parsely-tone-selector-label:first-letter{text-transform:uppercase}.parsely-persona-selector-custom{width:100%}.parsely-persona-selector-custom .components-base-control__field input{display:flex;height:2.5rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem)}.parsely-persona-selector-custom .components-base-control__field input,.parsely-persona-selector-dropdown{align-items:center;align-self:stretch;border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;gap:var(--grid-unit-05,.25rem)}.parsely-persona-selector-dropdown{background:var(--Gutenberg-White,#fff);height:2.25rem;overflow-wrap:break-word;width:100%;word-break:break-word}.parsely-persona-selector-dropdown .components-dropdown-menu__toggle.has-icon svg:first-child{display:none}.parsely-persona-selector-dropdown button{height:2.0625rem}.parsely-persona-selector-dropdown.is-disabled{opacity:.5;pointer-events:none}.parsely-persona-selector-dropdown .components-dropdown-menu__toggle{display:flex;gap:.625rem;width:100%}.parsely-persona-selector-dropdown .parsely-persona-selector-label{flex-grow:2;padding:0 var(--grid-unit-10,.5rem);text-align:left}.parsely-persona-selector-dropdown .parsely-persona-selector-label:first-letter{text-transform:uppercase}.parsely-tone-selector-custom{width:100%}.parsely-tone-selector-custom .components-base-control__field input{align-items:center;align-self:stretch;border:1px solid var(--Gutenberg-Gray-600,#949494);border-radius:2px;display:flex;gap:var(--grid-unit-05,.25rem);height:2.5rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem)}#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.parsely-inputrange-control{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10,.5rem)}.parsely-inputrange-control .parsely-inputrange-control__label{margin:0}.parsely-inputrange-control .parsely-inputrange-control__controls{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-20,1rem);height:2.5rem}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control{display:flex;flex:1 0 0}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]::-webkit-inner-spin-button,.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control input[type=number]{-moz-appearance:textfield}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-base-control__field{flex-grow:1}.parsely-inputrange-control .parsely-inputrange-control__controls .components-input-control .components-input-control__suffix{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.parsely-inputrange-control .parsely-inputrange-control__controls .components-range-control{flex:1 0 0;height:36px}.parsely-inputrange-control .parsely-inputrange-control__controls .components-range-control .components-range-control__root{height:2.5rem}.parsely-panel-settings{width:100%}.parsely-panel-settings .parsely-panel-settings-header{display:flex;margin:.625rem 0;width:100%}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label{flex-grow:2;margin:0 0 0 .3125rem;text-align:left}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label .components-base-control__field{align-items:center;display:flex;justify-content:space-between}.parsely-panel-settings .parsely-panel-settings-header .parsely-panel-settings-header-label .components-base-control__field .components-base-control__label{margin-bottom:0}.parsely-panel-settings .parsely-panel-settings-body{align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-content-helper-error{align-self:flex-start;margin:0}.wp-parsely-content-helper-error p{margin:0}.wp-parsely-content-helper-error .content-helper-error-message{margin:0!important}.wp-parsely-collapsible-panel{align-items:flex-start;align-self:stretch;border-bottom:none;border-radius:2px;border-top:none;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);margin:0;padding:0}.wp-parsely-collapsible-panel .components-panel__body-title{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10,.5rem)}.wp-parsely-collapsible-panel .components-panel__body-title .components-panel__icon,.wp-parsely-collapsible-panel .components-panel__body-title svg{margin-left:0;margin-right:var(--grid-unit-10,.5rem);order:-1}.wp-parsely-collapsible-panel .components-panel__body-title:hover{background-color:transparent}.wp-parsely-collapsible-panel.is-opened{padding:0}.wp-parsely-collapsible-panel.is-opened>div:first-of-type{margin-top:calc(var(--grid-unit-20, 1rem)*-1)}.wp-parsely-collapsible-panel.is-opened .components-panel__body-title{margin:-.75rem -1rem 0;padding:var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem) var(--grid-unit-20,1rem) var(--grid-unit-20,1rem);padding-bottom:0}.wp-parsely-collapsible-panel .components-panel__body-toggle.components-button{color:var(--Gutenberg-Gray-900,#1e1e1e);font-size:.6875rem;font-style:normal;font-weight:600;line-height:1rem;padding:var(--grid-unit-20,1rem) 0;text-transform:uppercase}.wp-parsely-collapsible-panel .components-panel__body-toggle.components-button .components-panel__arrow{right:0} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-block-overlay{align-items:center;background-color:hsla(0,0%,100%,.85);box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.wp-parsely-block-overlay .wp-parsely-block-overlay-label{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-block-overlay svg{height:1.5625rem;width:1.5625rem}.wp-parsely-block-overlay.full-content-overlay{font-size:1.25rem;z-index:999}.wp-parsely-block-overlay.full-content-overlay span{margin-top:.9375rem}.wp-parsely-block-overlay.full-content-overlay svg{height:3.125rem;width:3.125rem}.wp-parsely-panel .wp-parsely-icon{margin-right:.3125rem;order:-1}.wp-parsely-smart-linking .components-panel__row{flex-direction:column;margin-bottom:0}.wp-parsely-smart-linking .components-base-control,.wp-parsely-smart-linking .components-base-control .components-panel__row,.wp-parsely-smart-linking .components-base-control:last-child{margin-bottom:0}.wp-parsely-smart-linking .smart-linking-text{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select{align-self:stretch;display:flex;flex-direction:column;gap:1.5rem;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control{height:40px;overflow:hidden}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black,#1e1e1e);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem)}.wp-parsely-smart-linking .smart-linking-generate{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-smart-linking .smart-linking-generate button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint,.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0} -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-content-helper .wp-parsely-performance-panel{border-top:1px solid #ddd;margin-top:-1px;padding:16px}.wp-parsely-content-helper .wp-parsely-performance-panel .components-button.wp-parsely-view-post{align-items:center;display:flex;justify-content:center;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-body{width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.5rem;padding:.375rem 0 1rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header{align-items:center;display:flex;gap:.375rem;height:1rem;margin-bottom:0;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2{margin-bottom:.9375rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2 h2{margin-bottom:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-3 h3{font-size:var(--font-size--smaller,.6875rem);font-style:normal;font-weight:600;line-height:1rem;margin-bottom:0;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-subtitle{align-items:center;align-self:stretch;color:var(--Gutenberg-Gray-700,#757575);display:flex;flex:1 0 0;font-size:var(--font-size--smaller,.6875rem);font-style:normal;font-weight:600;gap:.375rem;height:1rem;line-height:1rem;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-settings .components-select-control{align-items:flex-start;align-self:stretch;display:flex;gap:1rem}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-settings .components-input-control__prefix{margin-left:.5rem}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-settings .components-input-control{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-05,4px);height:2.25rem;padding:var(--grid-unit-15,12px) var(--grid-unit-10,8px) var(--grid-unit-15,12px) var(--grid-unit-20,16px)}.wp-parsely-content-helper .wp-parsely-performance-panel .components-heading{display:block;font-weight:500;line-height:normal;margin:0}.wp-parsely-content-helper .wp-parsely-performance-panel .components-dropdown-menu{line-height:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points{align-content:flex-start;align-items:flex-start;align-self:stretch;display:flex;flex-wrap:wrap;gap:1rem var(--grid-unit-20,1rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white,#f0f0f0);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-05,.25rem);justify-content:center;min-width:100px;padding:var(--grid-unit-20,1rem) var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point svg{align-items:flex-start;border-radius:.125rem;display:flex}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-title{align-self:stretch;color:var(--sidebar-black,#1e1e1e);font-size:.75rem;font-style:normal;font-weight:400;line-height:1rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value{align-self:stretch;color:var(--sidebar-black,#1e1e1e);font-size:1.25rem;font-style:normal;font-weight:590;line-height:1.75rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value.is-small{font-size:var(--font-size--medium,.875rem)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar{align-items:flex-start;align-self:stretch;display:flex;height:1rem;margin:1rem 0;position:relative}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill{--radius:2px;align-self:stretch;position:relative;transition:filter .1s ease,transform .1s ease}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:hover{filter:opacity(1)!important;transform:scaleX(1) scaleY(1)!important}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:first-child{border-radius:var(--radius) 0 0 var(--radius)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:last-child{border-radius:0 var(--radius) var(--radius) 0}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar:hover .bar-fill{filter:opacity(.5);transform:scaleX(1) scaleY(.7)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label{align-items:center;align-self:stretch;display:flex;gap:.5rem;justify-content:center}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color{align-items:center;border-radius:.09375rem;display:flex;flex-direction:column;gap:.625rem;height:.625rem;justify-content:center;width:.1875rem}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-text{-webkit-box-orient:vertical;-webkit-line-clamp:1;font-feature-settings:"ss06" on;color:var(--sidebar-black,#1e1e1e);display:-webkit-box;flex:1 0 0;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-value{color:var(--sidebar-black,#1e1e1e);font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:590;line-height:1rem;text-align:right}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);margin:1rem 0}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10,.5rem);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{-webkit-box-orient:vertical;-webkit-line-clamp:1;font-feature-settings:"ss06" on;color:var(--sidebar-black,#1e1e1e);display:-webkit-box;flex:1;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar{display:flex;flex:1;flex-direction:column;gap:.625rem;justify-content:center;max-width:6.25rem}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar{--radius:1.5px;background:var(--gray-400,#d7dbdf);border-radius:var(--radius);display:flex;height:.1875rem;margin:0;overflow:hidden}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar:after{background:var(--blueberry,#3858e9);border-radius:var(--radius);content:"";height:100%;width:var(--bar-fill)}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-value{color:var(--sidebar-black,#1e1e1e);flex-shrink:0;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:590;line-height:1rem;min-width:3.125rem;text-align:right} -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-related-posts{align-items:flex-start;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-description{font-size:.8125rem;font-style:normal;font-weight:400;gap:.625rem;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body,.wp-parsely-related-posts .related-posts-description{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-related-posts .related-posts-body{gap:1rem}.wp-parsely-related-posts .related-posts-body>div{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings{align-self:stretch;display:flex;flex-direction:column;gap:1rem;width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-select-control{align-items:flex-start;align-self:stretch;display:flex;gap:1rem;height:2.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-select-control .components-input-control__container{padding:.1875rem}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-input-control__prefix{margin-left:.5rem}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-input-control{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-5,.25rem);height:2.25rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-10,.5rem) var(--grid-unit-15,.75rem) var(--grid-unit-20,1rem)}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings{display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control{height:2.5rem;overflow:hidden}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black,#1e1e1e);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex{height:2.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex input{margin:0 var(--grid-unit-15,.75rem)}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-descr{font-size:.8125rem;font-style:normal;font-weight:400;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-empty,.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-loading-message{color:var(--gray-900,#1e1e1e);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20,1rem);overflow:hidden;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single{align-items:flex-start;align-self:stretch;border:1px solid var(--Gutenberg-Gray-400,#ccc);border-radius:2px;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-title{align-items:center;align-self:stretch;display:flex;flex-direction:column;font-size:.875rem;font-style:normal;font-weight:600;gap:.5rem;justify-content:center;line-height:1.25rem;overflow:hidden;padding:var(--grid-unit-20,1rem);text-decoration-line:underline;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions{align-items:center;align-self:stretch;border-top:1px solid var(--gray-400,#ccc);display:flex;flex-wrap:wrap;gap:var(--grid-unit-20,1rem);padding:0 var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info{align-items:center;display:flex;flex-grow:1;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child{display:flex;flex:1;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:last-child{display:flex;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric{align-items:center;display:flex}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric .parsely-post-metric-data{align-items:center;display:flex;gap:var(--grid-unit-5,.25rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{fill:#008a20;align-items:center;display:flex;margin-left:auto}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon path{fill:#1e1e1e}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon:hover path{fill:#0073aa} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-content-helper .wp-parsely-performance-panel{border-top:1px solid #ddd;margin-top:-1px;padding:16px}.wp-parsely-content-helper .wp-parsely-performance-panel .components-button.wp-parsely-view-post{align-items:center;display:flex;justify-content:center;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .panel-body{width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.5rem;padding:.375rem 0 1rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header{align-items:center;display:flex;gap:.375rem;height:1rem;margin-bottom:0;width:100%}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2{margin-bottom:.9375rem}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-2 h2{margin-bottom:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-header.level-3 h3{font-size:var(--font-size--smaller,.6875rem);font-style:normal;font-weight:600;line-height:1rem;margin-bottom:0;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-stat-panel .panel-subtitle{align-items:center;align-self:stretch;color:var(--Gutenberg-Gray-700,#757575);display:flex;flex:1 0 0;font-size:var(--font-size--smaller,.6875rem);font-style:normal;font-weight:600;gap:.375rem;height:1rem;line-height:1rem;text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-performance-panel .components-heading{display:block;font-weight:500;line-height:normal;margin:0}.wp-parsely-content-helper .wp-parsely-performance-panel .components-dropdown-menu{line-height:0}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points{align-content:flex-start;align-items:flex-start;align-self:stretch;display:flex;flex-wrap:wrap;gap:1rem var(--grid-unit-20,1rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white,#f0f0f0);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-05,.25rem);justify-content:center;min-width:100px;padding:var(--grid-unit-20,1rem) var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point svg{align-items:flex-start;border-radius:.125rem;display:flex}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-title{align-self:stretch;color:var(--sidebar-black,#1e1e1e);font-size:.75rem;font-style:normal;font-weight:400;line-height:1rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value{align-self:stretch;color:var(--sidebar-black,#1e1e1e);font-size:1.25rem;font-style:normal;font-weight:590;line-height:1.75rem;text-align:center}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point .data-point-value.is-small{font-size:var(--font-size--medium,.875rem)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar{align-items:flex-start;align-self:stretch;display:flex;height:1rem;margin:1rem 0;position:relative}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill{--radius:2px;align-self:stretch;position:relative;transition:filter .1s ease,transform .1s ease}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:hover{filter:opacity(1)!important;transform:scaleX(1) scaleY(1)!important}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:first-child{border-radius:var(--radius) 0 0 var(--radius)}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:last-child{border-radius:0 var(--radius) var(--radius) 0}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar:hover .bar-fill{filter:opacity(.5);transform:scaleX(1) scaleY(.7)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem)}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label{align-items:center;align-self:stretch;display:flex;gap:.5rem;justify-content:center}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color{align-items:center;border-radius:.09375rem;display:flex;flex-direction:column;gap:.625rem;height:.625rem;justify-content:center;width:.1875rem}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.direct{background-color:hsl(var(--ref-direct))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.internal{background-color:hsl(var(--ref-internal))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.search{background-color:hsl(var(--ref-search))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.social{background-color:hsl(var(--ref-social))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-color.other{background-color:hsl(var(--ref-other))}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-text{-webkit-box-orient:vertical;-webkit-line-clamp:1;font-feature-settings:"ss06" on;color:var(--sidebar-black,#1e1e1e);display:-webkit-box;flex:1 0 0;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .percentage-bar-labels .single-label .label-value{color:var(--sidebar-black,#1e1e1e);font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:590;line-height:1rem;text-align:right}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);margin:1rem 0}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-10,.5rem);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{-webkit-box-orient:vertical;-webkit-line-clamp:1;font-feature-settings:"ss06" on;color:var(--sidebar-black,#1e1e1e);display:-webkit-box;flex:1;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:400;line-height:1rem;overflow:hidden;text-overflow:ellipsis}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar{display:flex;flex:1;flex-direction:column;gap:.625rem;justify-content:center;max-width:6.25rem}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar{--radius:1.5px;background:var(--gray-400,#d7dbdf);border-radius:var(--radius);display:flex;height:.1875rem;margin:0;overflow:hidden}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-bar .percentage-bar:after{background:var(--blueberry,#3858e9);border-radius:var(--radius);content:"";height:100%;width:var(--bar-fill)}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-value{color:var(--sidebar-black,#1e1e1e);flex-shrink:0;font-size:var(--font-size--small,.75rem);font-style:normal;font-weight:590;line-height:1rem;min-width:3.125rem;text-align:right} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-related-posts{align-items:flex-start;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-description{font-size:.8125rem;font-style:normal;font-weight:400;gap:.625rem;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body,.wp-parsely-related-posts .related-posts-description{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-related-posts .related-posts-body{gap:1rem}.wp-parsely-related-posts .related-posts-body>div{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings{align-self:stretch;display:flex;flex-direction:column;gap:1rem;width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-settings .components-base-control__field{margin-bottom:0}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings{display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control{height:2.5rem;overflow:hidden}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button{background:transparent;outline:2px solid transparent;outline-offset:-3px}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-types .components-toggle-group-control button[data-active-item]{background:var(--sidebar-black,#1e1e1e);border-radius:3px;box-shadow:0 -3px 0 0 #fff,0 3px 0 0 #fff;transition:background 0s .5s,border-radius 0s .5s,box-shadow 0s .5s}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values{width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex{height:2.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .related-posts-filter-values .components-combobox-control__suggestions-container .components-flex input{margin:0 var(--grid-unit-15,.75rem)}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-descr{font-size:.8125rem;font-style:normal;font-weight:400;line-height:1.25rem}.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-empty,.wp-parsely-related-posts .related-posts-body .related-posts-wrapper .related-posts-loading-message{color:var(--gray-900,#1e1e1e);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20,1rem);overflow:hidden;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single{align-items:flex-start;align-self:stretch;border:1px solid var(--Gutenberg-Gray-400,#ccc);border-radius:2px;display:flex;flex-direction:column}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-title{align-items:center;align-self:stretch;display:flex;flex-direction:column;font-size:.875rem;font-style:normal;font-weight:600;gap:.5rem;justify-content:center;line-height:1.25rem;overflow:hidden;padding:var(--grid-unit-20,1rem);text-decoration-line:underline;text-overflow:ellipsis}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions{align-items:center;align-self:stretch;border-top:1px solid var(--gray-400,#ccc);display:flex;flex-wrap:wrap;gap:var(--grid-unit-20,1rem);padding:0 var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info{align-items:center;display:flex;flex-grow:1;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child{display:flex;flex:1;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:last-child{display:flex;gap:var(--grid-unit-10,.5rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric{align-items:center;display:flex}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-metric .parsely-post-metric-data{align-items:center;display:flex;gap:var(--grid-unit-5,.25rem)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{fill:#008a20;align-items:center;display:flex;margin-left:auto}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon path{fill:#1e1e1e}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .wp-parsely-icon:hover path{fill:#0073aa} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper{display:flex;flex-direction:column}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-settings{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-settings>div{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-header{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:.625rem;padding-bottom:var(--grid-unit-20,1rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-header .parsely-write-titles-text strong{text-transform:lowercase}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-generate{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding-top:.375rem}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-generate .components-button{align-items:center;align-self:stretch;border-radius:2px;display:flex;height:2.5rem;justify-content:center;padding:var(--grid-unit-10,.5rem) var(--grid-unit-15,.75rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-dropdown-label{align-self:stretch;color:var(--sidebar-black,#1e1e1e);font-size:var(--font-size-smaller,.6875rem);font-style:normal;font-weight:600;line-height:var(--grid-unit-20,1rem);text-transform:uppercase}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-popover button.components-button.components-menu-item__button.is-selected,.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-popover button.components-button.components-menu-item__button.is-selected:focus{box-shadow:0 0 0 2px var(--parsely-green);outline:3px solid transparent}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .parsely-write-titles-accepted-title-container .parsely-write-titles-accepted-title{font-size:1rem;font-weight:600;line-height:1.25rem;margin:0 0 .9375rem;text-align:center}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .parsely-write-titles-accepted-title-container .parsely-write-titles-accepted-title-actions{display:flex;gap:.625rem;justify-content:center;margin:.625rem 0}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion{align-items:flex-start;align-self:stretch;border:1px solid var(--Gutenberg-Gray-400,#ccc);border-radius:2px;display:flex;flex-direction:column;gap:var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion.pinned-title{background:var(--Gutenberg-Gray-100,#f0f0f0)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title{align-items:center;align-self:stretch;color:#1e1e1e;display:flex;flex-direction:column;font-size:.75rem;font-style:normal;font-weight:600;gap:var(--grid-unit-10,.5rem);justify-content:center;line-height:1.25rem;padding:var(--grid-unit-15,.75rem) var(--grid-unit-15,.75rem) 0 var(--grid-unit-15,.75rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title .suggested-title-original{align-self:flex-start;margin:0}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title-actions{align-items:center;align-self:stretch;border-top:1px solid var(--Gutenberg-Gray-400,#ccc);display:flex;flex-wrap:wrap;gap:var(--grid-unit-20,1rem);height:2.5rem;padding:0 var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title-actions .suggested-title-actions-container{align-items:center;display:flex;flex-grow:1;gap:var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title-actions .suggested-title-actions-container .suggested-title-actions-left,.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-title-suggestion .suggested-title-actions .suggested-title-actions-container .suggested-title-actions-right{display:flex;gap:var(--grid-unit-10,.5rem)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-container{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20,1rem);margin-bottom:var(--grid-unit-20,1rem);position:relative}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-container .wp-parsely-loading-overlay{align-items:center;background-color:hsla(0,0%,100%,.9);bottom:0;display:flex;flex-direction:column;gap:var(--grid-unit-10,.5rem);justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .title-suggestions-container .wp-parsely-loading-overlay .components-spinner{transform:scale(1.125)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-pinned-suggestions{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20,1rem) 0}.wp-parsely-suggested-title-modal{align-items:flex-start;display:flex;flex-direction:column;width:20rem}.wp-parsely-suggested-title-modal h2{color:var(--sidebar-black,#1e1e1e);font-size:1rem;font-style:normal;font-weight:600;line-height:1.5rem}.wp-parsely-suggested-title-modal .suggested-title-modal-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15,.75rem);justify-content:flex-end;margin-top:1.5rem} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.settings_page_parsely,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green:#59a744;--parsely-green-10:#c7ecb1;--parsely-green-65:#2a691b;--gray-200:#f7f8f9;--gray-300:#edeeef;--gray-400:#d7dbdf;--gray-500:#959da5;--gray-600:#586069;--gray-700:#444d56;--gray-900:#24292e;--blue-500:#44a8e5;--blue-550:#2596db;--green-500:#7bc01b;--green-900:#3d6307;--ref-direct:205,13%,52%;--ref-internal:161,91%,41%;--ref-social:210,72%,41%;--ref-search:42,100%,50%;--ref-other:3,76%,58%;--base-text:var(--gray-900);--base-text-2:var(--gray-600);--base-3:var(--gray-400);--border:var(--gray-400);--data:var(--green-500);--control:var(--blue-500);--grid-unit-5:0.25rem;--grid-unit-10:0.5rem;--grid-unit-15:0.75rem;--grid-unit-20:1rem;--font-size--smaller:0.688rem;--font-size--small:0.75rem;--font-size--medium:0.875rem;--font-size--large:1rem;--font-size--extra-large:1.2rem;--black:#000;--sidebar-black:#1e1e1e;--sidebar-white:#f0f0f0}.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"]:focus,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"]:hover{background-color:#fff}.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"].is-pressed,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"].is-pressed:hover{background-color:var(--parsely-green-65)}.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"].is-pressed .wp-parsely-sidebar-icon path,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"].is-pressed:hover .wp-parsely-sidebar-icon path{fill:var(--parsely-green-10)}.wp-parsely-content-helper .wp-parsely-sidebar-header{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:1.5rem}.wp-parsely-content-helper .wp-parsely-sidebar-header .components-button{align-items:center;display:flex;justify-content:center;width:100%}.wp-parsely-content-helper .wp-parsely-sidebar-main-panel .wp-parsely-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:3rem}.wp-parsely-content-helper .wp-parsely-sidebar-main-panel .wp-parsely-sidebar-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:after{background:var(--gray-400);height:calc(var(--wp-admin-border-width-focus)*1);outline:2px solid transparent;outline-offset:-1px}.wp-parsely-content-helper .wp-parsely-sidebar-main-panel .wp-parsely-sidebar-tabs .components-tab-panel__tabs .components-tab-panel__tabs-item.is-active:after{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-content-helper .parsely-spinner-wrapper{display:flex;justify-content:center;margin:2.5rem 0}.wp-parsely-content-helper .parsely-spinner-wrapper svg{height:22px;width:22px}.wp-parsely-content-helper .content-helper-error-message,.wp-parsely-content-helper .wp-parsely-content-helper-error .content-helper-error-message{margin-top:.9375rem!important}.wp-parsely-content-helper p.content-helper-error-message-hint{color:var(--gray-700)} diff --git a/build/content-helper/editor-sidebar.js b/build/content-helper/editor-sidebar.js index 1dff62b64..f8da8834b 100644 --- a/build/content-helper/editor-sidebar.js +++ b/build/content-helper/editor-sidebar.js @@ -1,14 +1,14 @@ -!function(){"use strict";var e={251:function(e,t,n){var r=n(196),s=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!o.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},893:function(e,t,n){e.exports=n(251)},196:function(e){e.exports=window.React}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){n.d({},{W:function(){return Qt}});var e,t,r,s=n(893),i=window.wp.components,a=window.wp.data,l=window.wp.editPost,o=window.wp.element,c=window.wp.i18n,u=n(196),p=window.wp.primitives,d=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})),f=window.wp.plugins,g=function(){function e(){this._tkq=[],this.isLoaded=!1,this.isEnabled=!1,"undefined"!=typeof wpParselyTracksTelemetry&&(this.isEnabled=!0,this.loadTrackingLibrary())}return e.getInstance=function(){return window.wpParselyTelemetryInstance||Object.defineProperty(window,"wpParselyTelemetryInstance",{value:new e,writable:!1,configurable:!1,enumerable:!1}),window.wpParselyTelemetryInstance},e.prototype.loadTrackingLibrary=function(){var e=this,t=document.createElement("script");t.async=!0,t.src="//stats.wp.com/w.js",t.onload=function(){e.isLoaded=!0,e._tkq=window._tkq||[]},document.head.appendChild(t)},e.trackEvent=function(t){return n=this,r=arguments,i=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,s,i,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(o){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(s=2&l[0]?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[2&l[0],s.value]),l[0]){case 0:case 1:s=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((s=(s=a.trys).length>0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]=1e4&&(clearInterval(i),n("Telemetry library not loaded"))}),100);else n("Telemetry not enabled")}))},e.prototype.trackEvent=function(t,n){var r;this.isLoaded?(0!==t.indexOf(e.TRACKS_PREFIX)&&(t=e.TRACKS_PREFIX+t),this.isEventNameValid(t)?(n=this.prepareProperties(n),null===(r=this._tkq)||void 0===r||r.push(["recordEvent",t,n])):console.error("Error tracking event: Invalid event name")):console.error("Error tracking event: Telemetry not loaded")},e.prototype.isTelemetryEnabled=function(){return this.isEnabled},e.prototype.isProprietyValid=function(t){return e.PROPERTY_REGEX.test(t)},e.prototype.isEventNameValid=function(t){return e.EVENT_NAME_REGEX.test(t)},e.prototype.prepareProperties=function(e){return(e=this.sanitizeProperties(e)).parsely_version=wpParselyTracksTelemetry.version,wpParselyTracksTelemetry.user&&(e._ut=wpParselyTracksTelemetry.user.type,e._ui=wpParselyTracksTelemetry.user.id),wpParselyTracksTelemetry.vipgo_env&&(e.vipgo_env=wpParselyTracksTelemetry.vipgo_env),this.sanitizeProperties(e)},e.prototype.sanitizeProperties=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){t.isProprietyValid(r)&&(n[r]=e[r])})),n},e.TRACKS_PREFIX="wpparsely_",e.EVENT_NAME_REGEX=/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/,e.PROPERTY_REGEX=/^[a-z_][a-z0-9_]*$/,e}(),h=(g.trackEvent,function(){return(0,s.jsx)(i.SVG,{"aria-hidden":"true",version:"1.1",viewBox:"0 0 15 15",width:"15",height:"15",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(i.Path,{d:"M0 14.0025V11.0025L7.5 3.5025L10.5 6.5025L3 14.0025H0ZM12 5.0025L13.56 3.4425C14.15 2.8525 14.15 1.9025 13.56 1.3225L12.68 0.4425C12.09 -0.1475 11.14 -0.1475 10.56 0.4425L9 2.0025L12 5.0025Z"})})}),v=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,a=void 0===r?"wp-parsely-icon":r;return(0,s.jsxs)(i.SVG,{className:a,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M23.72,51.53c0-.18,0-.34-.06-.52a13.11,13.11,0,0,0-2.1-5.53A14.74,14.74,0,0,0,19.12,43c-.27-.21-.5-.11-.51.22l-.24,3.42c0,.33-.38.35-.49,0l-1.5-4.8a1.4,1.4,0,0,0-.77-.78,23.91,23.91,0,0,0-3.1-.84c-1.38-.24-3.39-.39-3.39-.39-.34,0-.45.21-.25.49l2.06,3.76c.2.27,0,.54-.29.33l-4.51-3.6a3.68,3.68,0,0,0-2.86-.48c-1,.16-2.44.46-2.44.46a.68.68,0,0,0-.39.25.73.73,0,0,0-.14.45S.41,43,.54,44a3.63,3.63,0,0,0,1.25,2.62L6.48,50c.28.2.09.49-.23.37l-4.18-.94c-.32-.12-.5,0-.4.37,0,0,.69,1.89,1.31,3.16a24,24,0,0,0,1.66,2.74,1.34,1.34,0,0,0,1,.52l5,.13c.33,0,.41.38.1.48L7.51,58c-.31.1-.34.35-.07.55a14.29,14.29,0,0,0,3.05,1.66,13.09,13.09,0,0,0,5.9.5,25.13,25.13,0,0,0,4.34-1,9.55,9.55,0,0,1-.08-1.2,9.32,9.32,0,0,1,3.07-6.91"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M59.7,41.53a.73.73,0,0,0-.14-.45.68.68,0,0,0-.39-.25s-1.43-.3-2.44-.46a3.64,3.64,0,0,0-2.86.48l-4.51,3.6c-.26.21-.49-.06-.29-.33l2.06-3.76c.2-.28.09-.49-.25-.49,0,0-2,.15-3.39.39a23.91,23.91,0,0,0-3.1.84,1.4,1.4,0,0,0-.77.78l-1.5,4.8c-.11.32-.48.3-.49,0l-.24-3.42c0-.33-.24-.43-.51-.22a14.74,14.74,0,0,0-2.44,2.47A13.11,13.11,0,0,0,36.34,51c0,.18,0,.34-.06.52a9.26,9.26,0,0,1,3,8.1,24.1,24.1,0,0,0,4.34,1,13.09,13.09,0,0,0,5.9-.5,14.29,14.29,0,0,0,3.05-1.66c.27-.2.24-.45-.07-.55l-3.22-1.17c-.31-.1-.23-.47.1-.48l5-.13a1.38,1.38,0,0,0,1-.52A24.6,24.6,0,0,0,57,52.92c.61-1.27,1.31-3.16,1.31-3.16.1-.33-.08-.49-.4-.37l-4.18.94c-.32.12-.51-.17-.23-.37l4.69-3.34A3.63,3.63,0,0,0,59.46,44c.13-1,.24-2.47.24-2.47"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M46.5,25.61c0-.53-.35-.72-.8-.43l-4.86,2.66c-.45.28-.56-.27-.23-.69l4.66-6.23a2,2,0,0,0,.28-1.68,36.51,36.51,0,0,0-2.19-4.89,34,34,0,0,0-2.81-3.94c-.33-.41-.74-.35-.91.16l-2.28,5.68c-.16.5-.6.48-.59-.05l.28-8.93a2.54,2.54,0,0,0-.66-1.64S35,4.27,33.88,3.27,30.78.69,30.78.69a1.29,1.29,0,0,0-1.54,0s-1.88,1.49-3.12,2.59-2.48,2.35-2.48,2.35A2.5,2.5,0,0,0,23,7.27l.27,8.93c0,.53-.41.55-.58.05l-2.29-5.69c-.17-.5-.57-.56-.91-.14a35.77,35.77,0,0,0-3,4.2,35.55,35.55,0,0,0-2,4.62,2,2,0,0,0,.27,1.67l4.67,6.24c.33.42.23,1-.22.69l-4.87-2.66c-.45-.29-.82-.1-.82.43a18.6,18.6,0,0,0,.83,5.07,20.16,20.16,0,0,0,5.37,7.77c3.19,3,5.93,7.8,7.45,11.08A9.6,9.6,0,0,1,30,49.09a9.31,9.31,0,0,1,2.86.45c1.52-3.28,4.26-8.11,7.44-11.09a20.46,20.46,0,0,0,5.09-7,19,19,0,0,0,1.11-5.82"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M36.12,58.44A6.12,6.12,0,1,1,30,52.32a6.11,6.11,0,0,1,6.12,6.12"})]})},y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;nhere.',"wp-parsely"):i.code===Z.ParselyInternalServerError?i.message=(0,c.__)("The Parse.ly API returned an internal server error. Please try again later.","wp-parsely"):i.code===Z.HttpRequestFailed&&i.message.includes("cURL error 28")?i.message=(0,c.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):i.code===Z.ParselySchemaValidationFailed?i.message=(0,c.__)("The Parse.ly API returned a validation error. Please try again later.","wp-parsely"):i.code===Z.ParselyUpstreamMalformedResponse&&i.message.includes("Insufficient Storage")?i.message=(0,c.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):i.code===Z.ParselyUpstreamMalformedResponse?i.message=(0,c.__)("The Parse.ly API returned a malformed response. Please try again later.","wp-parsely"):i.code===Z.ParselyUpstreamNotAvailable&&(i.message=(0,c.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),i}return K(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[Z.PluginCredentialsNotSetMessageDetected,Z.PluginSettingsSiteIdNotSet,Z.PluginSettingsApiSecretNotSet].includes(this.code)?I(e):(this.code===Z.FetchError&&(this.hint=this.Hint((0,c.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code===Z.ParselyApiForbidden&&(this.hint=this.Hint((0,c.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===Z.HttpRequestFailed&&(this.hint=this.Hint((0,c.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,s.jsx)(R,{className:null==e?void 0:e.className,testId:"error",children:"

".concat(this.message,"

").concat(this.hint?this.hint:"")}))},t.prototype.Hint=function(e){return'

'.concat((0,c.__)("Hint:","wp-parsely")," ").concat(e,"

")},t}(Error),Q=function(){function e(){}return e.generateSmartLinks=function(e){return t=this,n=arguments,s=function(e,t,n){var r,s,i;return void 0===t&&(t=ce),void 0===n&&(n=oe),function(e,t){var n,r,s,i,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(o){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(s=2&l[0]?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[2&l[0],s.value]),l[0]){case 0:case 1:s=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((s=(s=a.trys).length>0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0)){var e={maxLinksPerPost:p.SmartLinkingMaxLinks,maxLinkWords:p.SmartLinkingMaxLinkWords};R(e)}}),[R,p]);var I=(0,a.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,s=t.getBlock,i=e("core/editor").getEditedPostContent;return{selectedBlock:n?s(n):r(),postContent:i()}}),[n]),B=I.selectedBlock,M=I.postContent;(0,o.useEffect)((function(){v(null)}),[B]);var F=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},z=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),(0,a.dispatch)("core/editor").unlockPostSaving("wp-parsely-block-overlay")};return(0,s.jsx)("div",{className:"wp-parsely-smart-linking",children:(0,s.jsxs)(i.PanelRow,{className:t,children:[(0,s.jsxs)("div",{className:"smart-linking-text",children:[(0,c.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,s.jsxs)(i.Button,{href:"https://docs.parse.ly/plugin-content-helper/#h-smart-linking-beta",target:"_blank",variant:"link",children:[(0,c.__)("Learn more about Parse.ly AI","wp-parsely"),(0,s.jsx)(V,{icon:D,size:18,className:"parsely-external-link-icon"})]})]}),x&&(0,s.jsx)(i.Notice,{status:"info",isDismissible:!1,className:"wp-parsely-content-helper-error",children:x.message}),null!==S&&(0,s.jsx)(i.Notice,{status:"success",isDismissible:!1,className:"wp-parsely-smart-linking-suggested-links",children:/* translators: 1 - number of smart links generated */ -(0,c.sprintf)((0,c.__)("Successfully added %s smart links.","wp-parsely"),S.length)}),(0,s.jsx)($,{disabled:w,selectedBlock:null==B?void 0:B.clientId,onSettingChange:function(e,t){var n,r;d(((n={})[e]=t,n)),R(((r={})[e]=t,r))}}),(0,s.jsxs)("div",{className:"smart-linking-generate",children:[(0,s.jsx)(i.Button,{onClick:function(){return ee(void 0,void 0,void 0,(function(){var e,t,n,r,s;return te(this,(function(i){switch(i.label){case 0:return[4,L(!0)];case 1:return i.sent(),[4,N(null)];case 2:return i.sent(),[4,C(null)];case 3:return i.sent(),g.trackEvent("smart_linking_generate_pressed",{is_full_content:_,selected_block:null!==(s=null==B?void 0:B.name)&&void 0!==s?s:"none",context:l}),[4,F(_?"all":null==B?void 0:B.clientId)];case 4:i.sent(),e=setTimeout((function(){var e;L(!1),g.trackEvent("smart_linking_generate_timeout",{is_full_content:_,selected_block:null!==(e=null==B?void 0:B.name)&&void 0!==e?e:"none",context:l}),G(_?"all":null==B?void 0:B.clientId)}),6e4),i.label=5;case 5:return i.trys.push([5,11,12,15]),t=_||!B,n=[],!(null==B?void 0:B.originalContent)||t?[3,7]:[4,Q.generateSmartLinks(null==B?void 0:B.originalContent,k,P)];case 6:return n=i.sent(),[3,9];case 7:return[4,Q.generateSmartLinks(M,k,P)];case 8:n=i.sent(),i.label=9;case 9:return[4,N(n)];case 10:return i.sent(),function(e){var t;g.trackEvent("smart_linking_applied",{is_full_content:_,selected_block:null!==(t=null==B?void 0:B.name)&&void 0!==t?t:"none",links_count:e.length,context:l});for(var n="",r=n=B&&!_?B.attributes.content:M,s=0,i=e;s(null==d?void 0:d.length)&&o.offset++;var f='').concat(o.text,"");r=X(r,new RegExp("(".concat(o.text,"|]*>").concat(o.text,")")),f,o.offset)}}B&&!_?(0,a.dispatch)("core/block-editor").updateBlockAttributes(B.clientId,{content:r}):(0,a.dispatch)("core/editor").editPost({content:r}),y("success",/* translators: 1 - number of smart links generated */ -(0,c.sprintf)((0,c.__)("%s links applied.","wp-parsely"),e.length),{type:"snackbar",isDismissible:!0})}(n),[3,15];case 11:return r=i.sent(),C(r),y("error",(0,c.__)("There was a problem applying smart links.","wp-parsely"),{type:"snackbar",isDismissible:!0}),[3,15];case 12:return[4,L(!1)];case 13:return i.sent(),[4,G(_?"all":null==B?void 0:B.clientId)];case 14:return i.sent(),clearTimeout(e),[7];case 15:return[2]}}))}))},variant:"primary",isBusy:w,disabled:w,children:w?(0,c.__)("Adding Smart Links…","wp-parsely"):(0,c.__)("Add Smart Links","wp-parsely")}),h&&(0,s.jsxs)(i.Notice,{status:"warning",isDismissible:!0,onRemove:function(){return v(null)},className:"wp-parsely-smart-linking-hint",children:[(0,s.jsx)("strong",{children:(0,c.__)("Hint:","wp-parsely")})," ",h]})]})]})})},se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=c){var u=t;(s=r/c)%1>1/l&&(u=s>10?1:2),u=parseFloat(s.toFixed(2))===parseFloat(s.toFixed(0))?0:u,i=s.toFixed(u),a=o}l=c})),i+n+a}var me=function(e){var n=e.data,r=e.isLoading,a=(0,o.useState)(t.Views),l=a[0],u=a[1],p=(0,o.useState)(!1),d=p[0],f=p[1];r||delete n.referrers.types.totals;var g=function(e){switch(e){case"social":return(0,c.__)("Social","wp-parsely");case"search":return(0,c.__)("Search","wp-parsely");case"other":return(0,c.__)("Other","wp-parsely");case"internal":return(0,c.__)("Internal","wp-parsely");case"direct":return(0,c.__)("Direct","wp-parsely")}return e},h=(0,c.sprintf)((0,c.__)("By %s","wp-parsely"),L(l)); -/* translators: %s: metric description */return(0,s.jsxs)(ve,{title:(0,c.__)("Categories","wp-parsely"),level:3,subtitle:h,isOpen:d,onClick:function(){return f(!d)},children:[d&&(0,s.jsx)("div",{className:"panel-settings",children:(0,s.jsx)(i.SelectControl,{value:l,prefix:(0,c.__)("By: ","wp-parsely"),onChange:function(e){T(e,t)&&u(e)},children:Object.values(t).map((function(e){return(0,s.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[L(e),"avg_engaged"===e&&(0,c.__)(" (coming soon)","wp-parsely")]},e)}))})}),r?(0,s.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,s.jsx)(i.Spinner,{})}):(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(n.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,c.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ +!function(){"use strict";var e={251:function(e,t,n){var r=n(196),s=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!o.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:i,_owner:l.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},893:function(e,t,n){e.exports=n(251)},196:function(e){e.exports=window.React}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){n.d({},{W:function(){return Qt}});var e,t,r,s=n(893),i=window.wp.components,a=window.wp.data,l=window.wp.editPost,o=window.wp.element,c=window.wp.i18n,u=n(196),p=window.wp.primitives,d=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})),f=window.wp.plugins,g=function(){function e(){this._tkq=[],this.isLoaded=!1,this.isEnabled=!1,"undefined"!=typeof wpParselyTracksTelemetry&&(this.isEnabled=!0,this.loadTrackingLibrary())}return e.getInstance=function(){return window.wpParselyTelemetryInstance||Object.defineProperty(window,"wpParselyTelemetryInstance",{value:new e,writable:!1,configurable:!1,enumerable:!1}),window.wpParselyTelemetryInstance},e.prototype.loadTrackingLibrary=function(){var e=this,t=document.createElement("script");t.async=!0,t.src="//stats.wp.com/w.js",t.onload=function(){e.isLoaded=!0,e._tkq=window._tkq||[]},document.head.appendChild(t)},e.trackEvent=function(t){return n=this,r=arguments,i=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,s,i,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(o){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(s=2&l[0]?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[2&l[0],s.value]),l[0]){case 0:case 1:s=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((s=(s=a.trys).length>0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]=1e4&&(clearInterval(i),n("Telemetry library not loaded"))}),100);else n("Telemetry not enabled")}))},e.prototype.trackEvent=function(t,n){var r;this.isLoaded?(0!==t.indexOf(e.TRACKS_PREFIX)&&(t=e.TRACKS_PREFIX+t),this.isEventNameValid(t)?(n=this.prepareProperties(n),null===(r=this._tkq)||void 0===r||r.push(["recordEvent",t,n])):console.error("Error tracking event: Invalid event name")):console.error("Error tracking event: Telemetry not loaded")},e.prototype.isTelemetryEnabled=function(){return this.isEnabled},e.prototype.isProprietyValid=function(t){return e.PROPERTY_REGEX.test(t)},e.prototype.isEventNameValid=function(t){return e.EVENT_NAME_REGEX.test(t)},e.prototype.prepareProperties=function(e){return(e=this.sanitizeProperties(e)).parsely_version=wpParselyTracksTelemetry.version,wpParselyTracksTelemetry.user&&(e._ut=wpParselyTracksTelemetry.user.type,e._ui=wpParselyTracksTelemetry.user.id),wpParselyTracksTelemetry.vipgo_env&&(e.vipgo_env=wpParselyTracksTelemetry.vipgo_env),this.sanitizeProperties(e)},e.prototype.sanitizeProperties=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){t.isProprietyValid(r)&&(n[r]=e[r])})),n},e.TRACKS_PREFIX="wpparsely_",e.EVENT_NAME_REGEX=/^(([a-z0-9]+)_){2}([a-z0-9_]+)$/,e.PROPERTY_REGEX=/^[a-z_][a-z0-9_]*$/,e}(),h=(g.trackEvent,function(){return(0,s.jsx)(i.SVG,{"aria-hidden":"true",version:"1.1",viewBox:"0 0 15 15",width:"15",height:"15",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(i.Path,{d:"M0 14.0025V11.0025L7.5 3.5025L10.5 6.5025L3 14.0025H0ZM12 5.0025L13.56 3.4425C14.15 2.8525 14.15 1.9025 13.56 1.3225L12.68 0.4425C12.09 -0.1475 11.14 -0.1475 10.56 0.4425L9 2.0025L12 5.0025Z"})})}),v=function(e){var t=e.size,n=void 0===t?24:t,r=e.className,a=void 0===r?"wp-parsely-icon":r;return(0,s.jsxs)(i.SVG,{className:a,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M23.72,51.53c0-.18,0-.34-.06-.52a13.11,13.11,0,0,0-2.1-5.53A14.74,14.74,0,0,0,19.12,43c-.27-.21-.5-.11-.51.22l-.24,3.42c0,.33-.38.35-.49,0l-1.5-4.8a1.4,1.4,0,0,0-.77-.78,23.91,23.91,0,0,0-3.1-.84c-1.38-.24-3.39-.39-3.39-.39-.34,0-.45.21-.25.49l2.06,3.76c.2.27,0,.54-.29.33l-4.51-3.6a3.68,3.68,0,0,0-2.86-.48c-1,.16-2.44.46-2.44.46a.68.68,0,0,0-.39.25.73.73,0,0,0-.14.45S.41,43,.54,44a3.63,3.63,0,0,0,1.25,2.62L6.48,50c.28.2.09.49-.23.37l-4.18-.94c-.32-.12-.5,0-.4.37,0,0,.69,1.89,1.31,3.16a24,24,0,0,0,1.66,2.74,1.34,1.34,0,0,0,1,.52l5,.13c.33,0,.41.38.1.48L7.51,58c-.31.1-.34.35-.07.55a14.29,14.29,0,0,0,3.05,1.66,13.09,13.09,0,0,0,5.9.5,25.13,25.13,0,0,0,4.34-1,9.55,9.55,0,0,1-.08-1.2,9.32,9.32,0,0,1,3.07-6.91"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M59.7,41.53a.73.73,0,0,0-.14-.45.68.68,0,0,0-.39-.25s-1.43-.3-2.44-.46a3.64,3.64,0,0,0-2.86.48l-4.51,3.6c-.26.21-.49-.06-.29-.33l2.06-3.76c.2-.28.09-.49-.25-.49,0,0-2,.15-3.39.39a23.91,23.91,0,0,0-3.1.84,1.4,1.4,0,0,0-.77.78l-1.5,4.8c-.11.32-.48.3-.49,0l-.24-3.42c0-.33-.24-.43-.51-.22a14.74,14.74,0,0,0-2.44,2.47A13.11,13.11,0,0,0,36.34,51c0,.18,0,.34-.06.52a9.26,9.26,0,0,1,3,8.1,24.1,24.1,0,0,0,4.34,1,13.09,13.09,0,0,0,5.9-.5,14.29,14.29,0,0,0,3.05-1.66c.27-.2.24-.45-.07-.55l-3.22-1.17c-.31-.1-.23-.47.1-.48l5-.13a1.38,1.38,0,0,0,1-.52A24.6,24.6,0,0,0,57,52.92c.61-1.27,1.31-3.16,1.31-3.16.1-.33-.08-.49-.4-.37l-4.18.94c-.32.12-.51-.17-.23-.37l4.69-3.34A3.63,3.63,0,0,0,59.46,44c.13-1,.24-2.47.24-2.47"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M46.5,25.61c0-.53-.35-.72-.8-.43l-4.86,2.66c-.45.28-.56-.27-.23-.69l4.66-6.23a2,2,0,0,0,.28-1.68,36.51,36.51,0,0,0-2.19-4.89,34,34,0,0,0-2.81-3.94c-.33-.41-.74-.35-.91.16l-2.28,5.68c-.16.5-.6.48-.59-.05l.28-8.93a2.54,2.54,0,0,0-.66-1.64S35,4.27,33.88,3.27,30.78.69,30.78.69a1.29,1.29,0,0,0-1.54,0s-1.88,1.49-3.12,2.59-2.48,2.35-2.48,2.35A2.5,2.5,0,0,0,23,7.27l.27,8.93c0,.53-.41.55-.58.05l-2.29-5.69c-.17-.5-.57-.56-.91-.14a35.77,35.77,0,0,0-3,4.2,35.55,35.55,0,0,0-2,4.62,2,2,0,0,0,.27,1.67l4.67,6.24c.33.42.23,1-.22.69l-4.87-2.66c-.45-.29-.82-.1-.82.43a18.6,18.6,0,0,0,.83,5.07,20.16,20.16,0,0,0,5.37,7.77c3.19,3,5.93,7.8,7.45,11.08A9.6,9.6,0,0,1,30,49.09a9.31,9.31,0,0,1,2.86.45c1.52-3.28,4.26-8.11,7.44-11.09a20.46,20.46,0,0,0,5.09-7,19,19,0,0,0,1.11-5.82"}),(0,s.jsx)(i.Path,{fill:"#5ba745",d:"M36.12,58.44A6.12,6.12,0,1,1,30,52.32a6.11,6.11,0,0,1,6.12,6.12"})]})},y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;nhere.',"wp-parsely"):i.code===Z.ParselyInternalServerError?i.message=(0,c.__)("The Parse.ly API returned an internal server error. Please try again later.","wp-parsely"):i.code===Z.HttpRequestFailed&&i.message.includes("cURL error 28")?i.message=(0,c.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):i.code===Z.ParselySchemaValidationFailed?i.message=(0,c.__)("The Parse.ly API returned a validation error. Please try again later.","wp-parsely"):i.code===Z.ParselyUpstreamMalformedResponse&&i.message.includes("Insufficient Storage")?i.message=(0,c.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):i.code===Z.ParselyUpstreamMalformedResponse?i.message=(0,c.__)("The Parse.ly API returned a malformed response. Please try again later.","wp-parsely"):i.code===Z.ParselyUpstreamNotAvailable&&(i.message=(0,c.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),i}return K(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[Z.PluginCredentialsNotSetMessageDetected,Z.PluginSettingsSiteIdNotSet,Z.PluginSettingsApiSecretNotSet].includes(this.code)?I(e):(this.code===Z.FetchError&&(this.hint=this.Hint((0,c.__)("This error can sometimes be caused by ad-blockers or browser tracking protections. Please add this site to any applicable allow lists and try again.","wp-parsely"))),this.code===Z.ParselyApiForbidden&&(this.hint=this.Hint((0,c.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===Z.HttpRequestFailed&&(this.hint=this.Hint((0,c.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,s.jsx)(R,{className:null==e?void 0:e.className,testId:"error",children:"

".concat(this.message,"

").concat(this.hint?this.hint:"")}))},t.prototype.Hint=function(e){return'

'.concat((0,c.__)("Hint:","wp-parsely")," ").concat(e,"

")},t}(Error),Q=function(){function e(){}return e.generateSmartLinks=function(e){return t=this,n=arguments,s=function(e,t,n){var r,s,i;return void 0===t&&(t=ce),void 0===n&&(n=oe),function(e,t){var n,r,s,i,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(o){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(s=2&l[0]?r.return:l[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,l[1])).done)return s;switch(r=0,s&&(l=[2&l[0],s.value]),l[0]){case 0:case 1:s=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!((s=(s=a.trys).length>0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0)){var e={maxLinksPerPost:p.SmartLinkingMaxLinks,maxLinkWords:p.SmartLinkingMaxLinkWords};R(e)}}),[R,p]);var I=(0,a.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,s=t.getBlock,i=e("core/editor").getEditedPostContent;return{selectedBlock:n?s(n):r(),postContent:i()}}),[n]),B=I.selectedBlock,M=I.postContent;(0,o.useEffect)((function(){v(null)}),[B]);var F=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},z=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),(0,a.dispatch)("core/editor").unlockPostSaving("wp-parsely-block-overlay")};return(0,s.jsx)("div",{className:"wp-parsely-smart-linking",children:(0,s.jsxs)(i.PanelRow,{className:t,children:[(0,s.jsxs)("div",{className:"smart-linking-text",children:[(0,c.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,s.jsxs)(i.Button,{href:"https://docs.parse.ly/plugin-content-helper/#h-smart-linking-beta",target:"_blank",variant:"link",children:[(0,c.__)("Learn more about Parse.ly AI","wp-parsely"),(0,s.jsx)(V,{icon:D,size:18,className:"parsely-external-link-icon"})]})]}),x&&(0,s.jsx)(i.Notice,{status:"info",isDismissible:!1,className:"wp-parsely-content-helper-error",children:x.message}),null!==S&&(0,s.jsx)(i.Notice,{status:"success",isDismissible:!1,className:"wp-parsely-smart-linking-suggested-links",children:/* translators: 1 - number of smart links generated */ +(0,c.sprintf)((0,c.__)("Successfully added %s smart links.","wp-parsely"),S.length)}),(0,s.jsx)($,{disabled:w,selectedBlock:null==B?void 0:B.clientId,onSettingChange:function(e,t){var n,r;d(((n={})[e]=t,n)),R(((r={})[e]=t,r))}}),(0,s.jsxs)("div",{className:"smart-linking-generate",children:[(0,s.jsx)(i.Button,{onClick:function(){return ee(void 0,void 0,void 0,(function(){var e,t,n,r,s;return te(this,(function(i){switch(i.label){case 0:return[4,C(!0)];case 1:return i.sent(),[4,N(null)];case 2:return i.sent(),[4,L(null)];case 3:return i.sent(),g.trackEvent("smart_linking_generate_pressed",{is_full_content:_,selected_block:null!==(s=null==B?void 0:B.name)&&void 0!==s?s:"none",context:l}),[4,F(_?"all":null==B?void 0:B.clientId)];case 4:i.sent(),e=setTimeout((function(){var e;C(!1),g.trackEvent("smart_linking_generate_timeout",{is_full_content:_,selected_block:null!==(e=null==B?void 0:B.name)&&void 0!==e?e:"none",context:l}),G(_?"all":null==B?void 0:B.clientId)}),6e4),i.label=5;case 5:return i.trys.push([5,11,12,15]),t=_||!B,n=[],!(null==B?void 0:B.originalContent)||t?[3,7]:[4,Q.generateSmartLinks(null==B?void 0:B.originalContent,k,P)];case 6:return n=i.sent(),[3,9];case 7:return[4,Q.generateSmartLinks(M,k,P)];case 8:n=i.sent(),i.label=9;case 9:return[4,N(n)];case 10:return i.sent(),function(e){var t;g.trackEvent("smart_linking_applied",{is_full_content:_,selected_block:null!==(t=null==B?void 0:B.name)&&void 0!==t?t:"none",links_count:e.length,context:l});for(var n="",r=n=B&&!_?B.attributes.content:M,s=0,i=e;s(null==d?void 0:d.length)&&o.offset++;var f='').concat(o.text,"");r=X(r,new RegExp("(".concat(o.text,"|]*>").concat(o.text,")")),f,o.offset)}}B&&!_?(0,a.dispatch)("core/block-editor").updateBlockAttributes(B.clientId,{content:r}):(0,a.dispatch)("core/editor").editPost({content:r}),y("success",/* translators: 1 - number of smart links generated */ +(0,c.sprintf)((0,c.__)("%s links applied.","wp-parsely"),e.length),{type:"snackbar",isDismissible:!0})}(n),[3,15];case 11:return r=i.sent(),L(r),y("error",(0,c.__)("There was a problem applying smart links.","wp-parsely"),{type:"snackbar",isDismissible:!0}),[3,15];case 12:return[4,C(!1)];case 13:return i.sent(),[4,G(_?"all":null==B?void 0:B.clientId)];case 14:return i.sent(),clearTimeout(e),[7];case 15:return[2]}}))}))},variant:"primary",isBusy:w,disabled:w,children:w?(0,c.__)("Adding Smart Links…","wp-parsely"):(0,c.__)("Add Smart Links","wp-parsely")}),h&&(0,s.jsxs)(i.Notice,{status:"warning",isDismissible:!0,onRemove:function(){return v(null)},className:"wp-parsely-smart-linking-hint",children:[(0,s.jsx)("strong",{children:(0,c.__)("Hint:","wp-parsely")})," ",h]})]})]})})},se=function(){return se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=c){var u=t;(s=r/c)%1>1/l&&(u=s>10?1:2),u=parseFloat(s.toFixed(2))===parseFloat(s.toFixed(0))?0:u,i=s.toFixed(u),a=o}l=c})),i+n+a}var me=function(e){var n=e.data,r=e.isLoading,a=(0,o.useState)(t.Views),l=a[0],u=a[1],p=(0,o.useState)(!1),d=p[0],f=p[1];r||delete n.referrers.types.totals;var g=function(e){switch(e){case"social":return(0,c.__)("Social","wp-parsely");case"search":return(0,c.__)("Search","wp-parsely");case"other":return(0,c.__)("Other","wp-parsely");case"internal":return(0,c.__)("Internal","wp-parsely");case"direct":return(0,c.__)("Direct","wp-parsely")}return e},h=(0,c.sprintf)((0,c.__)("By %s","wp-parsely"),C(l)); +/* translators: %s: metric description */return(0,s.jsxs)(ve,{title:(0,c.__)("Categories","wp-parsely"),level:3,subtitle:h,isOpen:d,onClick:function(){return f(!d)},children:[d&&(0,s.jsx)("div",{className:"panel-settings",children:(0,s.jsx)(i.SelectControl,{value:l,prefix:(0,c.__)("By: ","wp-parsely"),onChange:function(e){T(e,t)&&u(e)},children:Object.values(t).map((function(e){return(0,s.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[C(e),"avg_engaged"===e&&(0,c.__)(" (coming soon)","wp-parsely")]},e)}))})}),r?(0,s.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,s.jsx)(i.Spinner,{})}):(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(n.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,c.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ (0,c.__)("%1$s: %2$s%%","wp-parsely"),g(t),n.viewsPercentage);return(0,s.jsx)(i.Tooltip /* translators: %s: percentage value */,{ /* translators: %s: percentage value */ -text:"".concat(g(t)," - ").concat((0,c.sprintf)((0,c.__)("%s%%","wp-parsely"),n.viewsPercentage)),delay:150,children:(0,s.jsx)("div",{"aria-label":r,className:"bar-fill "+t,style:{width:n.viewsPercentage+"%"}})},t)}))}),(0,s.jsx)("div",{className:"percentage-bar-labels",children:Object.entries(n.referrers.types).map((function(e){var t=e[0],n=e[1];return(0,s.jsxs)("div",{className:"single-label "+t,children:[(0,s.jsx)("div",{className:"label-color "+t}),(0,s.jsx)("div",{className:"label-text",children:g(t)}),(0,s.jsx)("div",{className:"label-value",children:ye(n.views)})]},t)}))})]})]})},we=(0,u.createElement)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(p.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})),_e=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})),be=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})),xe=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Se=function(){return Se=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]1?[2,Promise.reject(new Y((0,c.sprintf)(/* translators: URL of the published post */ -(0,c.__)("Multiple results were returned for the post %s by the Parse.ly API.","wp-parsely"),t),Z.ParselyApiReturnedTooManyResults))]:[2,n.data[0]]}}))}))},e.prototype.fetchReferrerDataFromWpEndpoint=function(e,t,n){return Re(this,void 0,void 0,(function(){var r,s;return Ie(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,x()({path:(0,q.addQueryArgs)("/wp-parsely/v1/referrers/post/detail",Ae(Ae({},Oe(e)),{itm_source:this.itmSource,total_views:n,url:t}))})];case 1:return r=i.sent(),[3,3];case 2:return s=i.sent(),[2,Promise.reject(new Y(s.message,s.code))];case 3:return(null==r?void 0:r.error)?[2,Promise.reject(new Y(r.error.message,Z.ParselyApiResponseContainsError))]:[2,r.data]}}))}))},e}(),Me=function(){return Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&e.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return n.sent(),[4,t(r-1)];case 2:return n.sent(),[3,4];case 3:d(e),l(!1),n.label=4;case 4:return[2]}}))}))})),[2]}))}))};return l(!0),t(1),function(){d(void 0)}}),[n]),(0,s.jsxs)("div",{className:"wp-parsely-performance-panel",children:[(0,s.jsx)(ve,{title:(0,c.__)("Performance Stats","wp-parsely"),icon:he,dropdownChildren:function(e){var t=e.onClose;return(0,s.jsx)(ze,{onClose:t})},children:(0,s.jsx)("div",{className:"panel-settings",children:(0,s.jsx)(i.SelectControl,{value:m.PerformanceStatsSettings.Period,prefix:(0,c.__)("Period: ","wp-parsely"),onChange:function(t){T(t,e)&&(w({PerformanceStatsSettings:Me(Me({},m.PerformanceStatsSettings),{Period:t})}),g.trackEvent("editor_sidebar_performance_period_changed",{period:t}))},children:Object.values(e).map((function(e){return(0,s.jsx)("option",{value:e,children:E(e)},e)}))})})}),p?p.Message():(0,s.jsxs)(s.Fragment,{children:[He(m,"overview")&&(0,s.jsx)(Ce,{data:h,isLoading:a}),He(m,"categories")&&(0,s.jsx)(me,{data:h,isLoading:a}),He(m,"referrers")&&(0,s.jsx)(Ne,{data:h,isLoading:a})]}),window.wpParselyPostUrl&&(0,s.jsx)(i.Button,{className:"wp-parsely-view-post",variant:"primary",onClick:function(){g.trackEvent("editor_sidebar_view_post_pressed")},href:window.wpParselyPostUrl,rel:"noopener",target:"_blank",children:(0,c.__)("View this in Parse.ly","wp-parsely")})]})},We=function(e){var t=e.period;return(0,s.jsx)(i.Panel,{children:(0,s.jsx)(M,{children:(0,s.jsx)(Ue,{period:t})})})},Ze=window.wp.coreData,$e=window.wp.editor,qe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s=1&&(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Tag,label:(0,c.__)("Tag","wp-parsely")}),a.categories.length>=1&&(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Section,label:(0,c.__)("Section","wp-parsely")}),(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Author,label:(0,c.__)("Author","wp-parsely")})]})})},Ye=function(e){var t=e.filter,n=e.postData,a=qe(e,["filter","postData"]);return(0,s.jsx)("div",{className:"related-posts-filter-values",children:(0,s.jsx)(i.ComboboxControl,{allowReset:!0,onChange:function(e){return a.onFilterValueChange(e)},options:r.Tag===t.type?n.tags.map((function(e){return{value:e,label:e}})):r.Section===t.type?n.categories.map((function(e){return{value:e,label:e}})):r.Author===t.type?n.authors.map((function(e){return{value:e,label:e}})):[],value:t.value})})},Qe=function(e){var t=e.filter,n=e.postData,i=e.label,a=qe(e,["filter","postData","label"]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ke,{filter:t,label:i,onFilterTypeChange:a.onFilterTypeChange,postData:n}),(r.Tag===t.type&&n.tags.length>1||r.Section===t.type&&n.categories.length>1||r.Author===t.type&&n.authors.length>1)&&(0,s.jsx)(Ye,{filter:t,onFilterValueChange:a.onFilterValueChange,postData:n})]})},Xe=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),Je=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"}));function et(e){var t=e.metric,n=e.post,r=e.avgEngagedIcon,i=e.viewsIcon;return"views"===t?(0,s.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("Number of Views","wp-parsely")}),i,ye(n.views.toString())]}):"avg_engaged"===t?(0,s.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("Average Time","wp-parsely")}),r,n.avgEngaged]}):(0,s.jsx)("span",{className:"parsely-post-metric-data",children:"-"})}var tt,nt=function(){return(0,s.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1",height:"40",viewBox:"0 0 1 40",fill:"none",children:(0,s.jsx)(i.Rect,{width:"1",height:"40",fill:"#cccccc"})})},rt=function(e){var t=e.metric,n=e.post,r=e.postContent,l=(0,a.useDispatch)("core/notices").createNotice,o=!1;return r&&(o=r.includes(n.rawUrl)),(0,s.jsxs)("div",{className:"related-post-single","data-testid":"related-post-single",children:[(0,s.jsx)("div",{className:"related-post-title",children:(0,s.jsxs)("a",{href:n.url,target:"_blank",rel:"noreferrer",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("View on website (opens new tab)","wp-parsely")}),n.title]})}),(0,s.jsx)("div",{className:"related-post-actions",children:(0,s.jsxs)("div",{className:"related-post-info",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"related-post-metric",children:(0,s.jsx)(et,{metric:t,post:n,viewsIcon:(0,s.jsx)(V,{icon:we}),avgEngagedIcon:(0,s.jsx)(i.Dashicon,{icon:"clock",size:24})})}),o&&(0,s.jsx)("div",{className:"related-post-linked",children:(0,s.jsx)(i.Tooltip,{text:(0,c.__)("This post is linked in the content","wp-parsely"),children:(0,s.jsx)(V,{icon:Xe,size:24})})})]}),(0,s.jsx)(nt,{}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Button,{icon:Je,iconSize:24,onClick:function(){navigator.clipboard.writeText(n.rawUrl).then((function(){l("success",(0,c.__)("URL copied to clipboard","wp-parsely"),{type:"snackbar",isDismissible:!0})}))},label:(0,c.__)("Copy URL to clipboard","wp-parsely")}),(0,s.jsx)(i.Button,{icon:(0,s.jsx)(v,{}),iconSize:18,href:n.dashUrl,target:"_blank",label:(0,c.__)("View in Parse.ly","wp-parsely")})]})]})})]})},st=function(){return st=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&e.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return n.sent(),[4,t(r-1)];case 2:return n.sent(),[3,4];case 3:d(e),l(!1),n.label=4;case 4:return[2]}}))}))})),[2]}))}))};return l(!0),t(1),function(){d(void 0)}}),[n]),(0,s.jsxs)("div",{className:"wp-parsely-performance-panel",children:[(0,s.jsx)(ve,{title:(0,c.__)("Performance Stats","wp-parsely"),icon:he,dropdownChildren:function(e){var t=e.onClose;return(0,s.jsx)(ze,{onClose:t})},children:(0,s.jsx)("div",{className:"panel-settings",children:(0,s.jsx)(i.SelectControl,{size:"__unstable-large",value:m.PerformanceStatsSettings.Period,prefix:(0,s.jsx)(i.__experimentalInputControlPrefixWrapper,{children:(0,c.__)("Period: ","wp-parsely")}),onChange:function(t){T(t,e)&&(w({PerformanceStatsSettings:Me(Me({},m.PerformanceStatsSettings),{Period:t})}),g.trackEvent("editor_sidebar_performance_period_changed",{period:t}))},children:Object.values(e).map((function(e){return(0,s.jsx)("option",{value:e,children:E(e)},e)}))})})}),p?p.Message():(0,s.jsxs)(s.Fragment,{children:[He(m,"overview")&&(0,s.jsx)(Le,{data:h,isLoading:a}),He(m,"categories")&&(0,s.jsx)(me,{data:h,isLoading:a}),He(m,"referrers")&&(0,s.jsx)(Ne,{data:h,isLoading:a})]}),window.wpParselyPostUrl&&(0,s.jsx)(i.Button,{className:"wp-parsely-view-post",variant:"primary",onClick:function(){g.trackEvent("editor_sidebar_view_post_pressed")},href:window.wpParselyPostUrl,rel:"noopener",target:"_blank",children:(0,c.__)("View this in Parse.ly","wp-parsely")})]})},We=function(e){var t=e.period;return(0,s.jsx)(i.Panel,{children:(0,s.jsx)(M,{children:(0,s.jsx)(Ue,{period:t})})})},Ze=window.wp.coreData,$e=window.wp.editor,qe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s=1&&(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Tag,label:(0,c.__)("Tag","wp-parsely")}),a.categories.length>=1&&(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Section,label:(0,c.__)("Section","wp-parsely")}),(0,s.jsx)(i.__experimentalToggleGroupControlOption,{value:r.Author,label:(0,c.__)("Author","wp-parsely")})]})})},Ye=function(e){var t=e.filter,n=e.postData,a=qe(e,["filter","postData"]);return(0,s.jsx)("div",{className:"related-posts-filter-values",children:(0,s.jsx)(i.ComboboxControl,{allowReset:!0,onChange:function(e){return a.onFilterValueChange(e)},options:r.Tag===t.type?n.tags.map((function(e){return{value:e,label:e}})):r.Section===t.type?n.categories.map((function(e){return{value:e,label:e}})):r.Author===t.type?n.authors.map((function(e){return{value:e,label:e}})):[],value:t.value})})},Qe=function(e){var t=e.filter,n=e.postData,i=e.label,a=qe(e,["filter","postData","label"]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ke,{filter:t,label:i,onFilterTypeChange:a.onFilterTypeChange,postData:n}),(r.Tag===t.type&&n.tags.length>1||r.Section===t.type&&n.categories.length>1||r.Author===t.type&&n.authors.length>1)&&(0,s.jsx)(Ye,{filter:t,onFilterValueChange:a.onFilterValueChange,postData:n})]})},Xe=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),Je=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"}));function et(e){var t=e.metric,n=e.post,r=e.avgEngagedIcon,i=e.viewsIcon;return"views"===t?(0,s.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("Number of Views","wp-parsely")}),i,ye(n.views.toString())]}):"avg_engaged"===t?(0,s.jsxs)("span",{className:"parsely-post-metric-data",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("Average Time","wp-parsely")}),r,n.avgEngaged]}):(0,s.jsx)("span",{className:"parsely-post-metric-data",children:"-"})}var tt,nt=function(){return(0,s.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1",height:"40",viewBox:"0 0 1 40",fill:"none",children:(0,s.jsx)(i.Rect,{width:"1",height:"40",fill:"#cccccc"})})},rt=function(e){var t=e.metric,n=e.post,r=e.postContent,l=(0,a.useDispatch)("core/notices").createNotice,o=!1;return r&&(o=r.includes(n.rawUrl)),(0,s.jsxs)("div",{className:"related-post-single","data-testid":"related-post-single",children:[(0,s.jsx)("div",{className:"related-post-title",children:(0,s.jsxs)("a",{href:n.url,target:"_blank",rel:"noreferrer",children:[(0,s.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("View on website (opens new tab)","wp-parsely")}),n.title]})}),(0,s.jsx)("div",{className:"related-post-actions",children:(0,s.jsxs)("div",{className:"related-post-info",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"related-post-metric",children:(0,s.jsx)(et,{metric:t,post:n,viewsIcon:(0,s.jsx)(V,{icon:we}),avgEngagedIcon:(0,s.jsx)(i.Dashicon,{icon:"clock",size:24})})}),o&&(0,s.jsx)("div",{className:"related-post-linked",children:(0,s.jsx)(i.Tooltip,{text:(0,c.__)("This post is linked in the content","wp-parsely"),children:(0,s.jsx)(V,{icon:Xe,size:24})})})]}),(0,s.jsx)(nt,{}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Button,{icon:Je,iconSize:24,onClick:function(){navigator.clipboard.writeText(n.rawUrl).then((function(){l("success",(0,c.__)("URL copied to clipboard","wp-parsely"),{type:"snackbar",isDismissible:!0})}))},label:(0,c.__)("Copy URL to clipboard","wp-parsely")}),(0,s.jsx)(i.Button,{icon:(0,s.jsx)(v,{}),iconSize:18,href:n.dashUrl,target:"_blank",label:(0,c.__)("View in Parse.ly","wp-parsely")})]})]})})]})},st=function(){return st=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&t.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return r.sent(),[4,n(e-1)];case 2:return r.sent(),[3,4];case 3:S(!1),C(t),r.label=4;case 4:return[2]}}))}))})),[2]}))}))},s=r.Tag===D.type,i=r.Section===D.type,a=r.Unavailable===D.type,l=0===h.tags.length,o=0===h.categories.length,c=s&&!h.tags.includes(D.value),u=i&&!h.categories.includes(D.value);return S(!0),a||s&&l||i&&o?Object.values(h).every((function(e){return 0===e.length}))||F((e="",t=r.Unavailable,h.tags.length>=1?(t=r.Tag,e=h.tags[0]):h.categories.length>=1?(t=r.Section,e=h.categories[0]):(t=r.Author,e=h.authors[0]),{type:t,value:e})):c?F({type:r.Tag,value:h.tags[0]}):u?F({type:r.Section,value:h.categories[0]}):n(1),function(){S(!1),M([]),R(""),C(void 0)}}),[p,d,D,h]),(0,s.jsxs)("div",{className:"wp-parsely-related-posts",children:[(0,s.jsx)("div",{className:"related-posts-description",children:(0,c.__)("Find top-performing related posts based on a key metric.","wp-parsely")}),(0,s.jsxs)("div",{className:"related-posts-body",children:[(0,s.jsxs)("div",{className:"related-posts-settings",children:[(0,s.jsx)(i.SelectControl,{onChange:function(e){var n;T(n=e,t)&&(u({RelatedPostsMetric:n}),g.trackEvent("related_posts_metric_changed",{metric:n}))},prefix:(0,c.__)("Metric: ","wp-parsely"),value:d,children:Object.values(t).map((function(e){return(0,s.jsx)("option",{value:e,children:L(e)},e)}))}),(0,s.jsx)(i.SelectControl,{value:p,prefix:(0,c.__)("Period: ","wp-parsely"),onChange:function(t){return function(t){T(t,e)&&(u({RelatedPostsPeriod:t}),g.trackEvent("related_posts_period_changed",{period:t}))}(t)},children:Object.values(e).map((function(e){return(0,s.jsx)("option",{value:e,children:E(e)},e)}))})]}),(0,s.jsx)("div",{className:"related-posts-filter-settings",children:(0,s.jsx)(Qe,{label:(0,c.__)("Filter by","wp-parsely"),filter:D,onFilterTypeChange:function(e){if(T(e,r)){var t="",n=e;r.Tag===n&&(t=h.tags[0]),r.Section===n&&(t=h.categories[0]),r.Author===n&&(t=h.authors[0]),""!==t&&(W(n,t),F({type:n,value:t}),g.trackEvent("related_posts_filter_type_changed",{filter_type:n}))}},onFilterValueChange:function(e){"string"==typeof e&&(W(D.type,e),F(ot(ot({},D),{value:e})))},postData:h})}),(0,s.jsxs)("div",{className:"related-posts-wrapper",children:[(0,s.jsx)("div",{children:(0,s.jsx)("p",{className:"related-posts-descr","data-testid":"parsely-related-posts-descr",children:r.Tag===D.type?(0,c.sprintf)(/* translators: 1: tag name, 2: period */ +message:(0,c.sprintf)((0,c.__)('by author "%1$s"',"wp-parsely"),n.value)};throw new Y((0,c.__)("No valid filter type has been specified.","wp-parsely"),Z.CannotFormulateApiQuery)},e}(),ot=function(){return ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&t.retryFetch?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,3];case 1:return r.sent(),[4,n(e-1)];case 2:return r.sent(),[3,4];case 3:S(!1),L(t),r.label=4;case 4:return[2]}}))}))})),[2]}))}))},s=r.Tag===D.type,i=r.Section===D.type,a=r.Unavailable===D.type,l=0===h.tags.length,o=0===h.categories.length,c=s&&!h.tags.includes(D.value),u=i&&!h.categories.includes(D.value);return S(!0),a||s&&l||i&&o?Object.values(h).every((function(e){return 0===e.length}))||F((e="",t=r.Unavailable,h.tags.length>=1?(t=r.Tag,e=h.tags[0]):h.categories.length>=1?(t=r.Section,e=h.categories[0]):(t=r.Author,e=h.authors[0]),{type:t,value:e})):c?F({type:r.Tag,value:h.tags[0]}):u?F({type:r.Section,value:h.categories[0]}):n(1),function(){S(!1),M([]),R(""),L(void 0)}}),[p,d,D,h]),(0,s.jsxs)("div",{className:"wp-parsely-related-posts",children:[(0,s.jsx)("div",{className:"related-posts-description",children:(0,c.__)("Find top-performing related posts based on a key metric.","wp-parsely")}),(0,s.jsxs)("div",{className:"related-posts-body",children:[(0,s.jsxs)("div",{className:"related-posts-settings",children:[(0,s.jsx)(i.SelectControl,{size:"__unstable-large",onChange:function(e){var n;T(n=e,t)&&(u({RelatedPostsMetric:n}),g.trackEvent("related_posts_metric_changed",{metric:n}))},prefix:(0,s.jsx)(i.__experimentalInputControlPrefixWrapper,{children:(0,c.__)("Metric: ","wp-parsely")}),value:d,children:Object.values(t).map((function(e){return(0,s.jsx)("option",{value:e,children:C(e)},e)}))}),(0,s.jsx)(i.SelectControl,{size:"__unstable-large",value:p,prefix:(0,s.jsxs)(i.__experimentalInputControlPrefixWrapper,{children:[(0,c.__)("Period: ","wp-parsely")," "]}),onChange:function(t){return function(t){T(t,e)&&(u({RelatedPostsPeriod:t}),g.trackEvent("related_posts_period_changed",{period:t}))}(t)},children:Object.values(e).map((function(e){return(0,s.jsx)("option",{value:e,children:E(e)},e)}))})]}),(0,s.jsx)("div",{className:"related-posts-filter-settings",children:(0,s.jsx)(Qe,{label:(0,c.__)("Filter by","wp-parsely"),filter:D,onFilterTypeChange:function(e){if(T(e,r)){var t="",n=e;r.Tag===n&&(t=h.tags[0]),r.Section===n&&(t=h.categories[0]),r.Author===n&&(t=h.authors[0]),""!==t&&(W(n,t),F({type:n,value:t}),g.trackEvent("related_posts_filter_type_changed",{filter_type:n}))}},onFilterValueChange:function(e){"string"==typeof e&&(W(D.type,e),F(ot(ot({},D),{value:e})))},postData:h})}),(0,s.jsxs)("div",{className:"related-posts-wrapper",children:[(0,s.jsx)("div",{children:(0,s.jsx)("p",{className:"related-posts-descr","data-testid":"parsely-related-posts-descr",children:r.Tag===D.type?(0,c.sprintf)(/* translators: 1: tag name, 2: period */ (0,c.__)("Top related posts with the “%1$s” tag in the %2$s.","wp-parsely"),D.value,E(p,!0)):r.Section===D.type?(0,c.sprintf)(/* translators: 1: section name, 2: period */ (0,c.__)("Top related posts in the “%1$s” section in the %2$s.","wp-parsely"),D.value,E(p,!0)):r.Author===D.type?(0,c.sprintf)(/* translators: 1: author name, 2: period */ -(0,c.__)("Top related posts by %1$s in the %2$s.","wp-parsely"),D.value,E(p,!0)):null!=A?A:""})}),k&&k.Message(),x&&(0,s.jsx)("div",{className:"related-posts-loading-message","data-testid":"parsely-related-posts-loading-message",children:(0,c.__)("Loading…","wp-parsely")}),!x&&!k&&0===B.length&&(0,s.jsx)("div",{className:"related-posts-empty",children:(0,c.__)("No related posts found.","wp-parsely")}),!x&&B.length>0&&(0,s.jsx)("div",{className:"related-posts-list",children:B.map((function(e){return(0,s.jsx)(rt,{metric:d,post:e,postContent:H},e.id)}))})]})]})]})},dt=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),ft=function(){return(0,s.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,s.jsx)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5034 7.91642L9 12.0104L4.49662 7.91642L5.25337 7.08398L8.99999 10.49L12.7466 7.08398L13.5034 7.91642Z",fill:"#1E1E1E"})})},gt={journalist:{label:(0,c.__)("Journalist","wp-parsely")},editorialWriter:{label:(0,c.__)("Editorial Writer","wp-parsely")},investigativeReporter:{label:(0,c.__)("Investigative Reporter","wp-parsely")},techAnalyst:{label:(0,c.__)("Tech Analyst","wp-parsely")},businessAnalyst:{label:(0,c.__)("Business Analyst","wp-parsely")},culturalCommentator:{label:(0,c.__)("Cultural Commentator","wp-parsely")},scienceCorrespondent:{label:(0,c.__)("Science Correspondent","wp-parsely")},politicalAnalyst:{label:(0,c.__)("Political Analyst","wp-parsely")},healthWellnessAdvocate:{label:(0,c.__)("Health and Wellness Advocate","wp-parsely")},environmentalJournalist:{label:(0,c.__)("Environmental Journalist","wp-parsely")},custom:{label:(0,c.__)("Custom Persona","wp-parsely"),icon:dt}},ht=Object.keys(gt),vt=function(e){return"custom"===e||""===e?gt.custom.label:yt(e)?e:gt[e].label},yt=function(e){return!ht.includes(e)||"custom"===e},mt=function(e){var t=e.value,n=e.onChange,r=(0,o.useState)(""),a=r[0],l=r[1],u=(0,N.useDebounce)(n,500);return(0,s.jsx)("div",{className:"parsely-persona-selector-custom",children:(0,s.jsx)(i.TextControl,{value:a||t,placeholder:(0,c.__)("Enter a custom persona…","wp-parsely"),onChange:function(e){if(""===e)return n(""),void l("");e.length>32&&(e=e.slice(0,32)),u(e),l(e)}})})},wt=function(e){var t=e.persona,n=e.value,r=void 0===n?(0,c.__)("Select a persona…","wp-parsely"):n,a=e.label,l=void 0===a?(0,c.__)("Persona","wp-parsely"):a,o=e.onChange,u=e.onDropdownChange,p=e.disabled,d=void 0!==p&&p,f=e.allowCustom,g=void 0!==f&&f;return(0,s.jsxs)(i.Disabled,{isDisabled:d,children:[l&&(0,s.jsx)("div",{className:"wp-parsely-dropdown-label",children:l}),(0,s.jsx)(i.DropdownMenu,{label:(0,c.__)("Persona","wp-parsely"),className:"parsely-persona-selector-dropdown"+(d?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"parsely-persona-selector-label",children:yt(t)?gt.custom.label:r}),(0,s.jsx)(ft,{})]})},children:function(e){var n=e.onClose;return(0,s.jsx)(i.MenuGroup,{label:(0,c.__)("Persona","wp-parsely"),children:(0,s.jsx)(s.Fragment,{children:ht.map((function(e){if(!g&&"custom"===e)return null;var r=gt[e],a=e===t||yt(t)&&"custom"===e;return(0,s.jsxs)(i.MenuItem,{isSelected:a,className:a?"is-selected":"",role:"menuitemradio",onClick:function(){null==u||u(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-persona-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,s.jsx)(V,{icon:r.icon}),r.label]},e)}))})})}}),g&&yt(t)&&(0,s.jsx)(mt,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},_t={neutral:{label:(0,c.__)("Neutral","wp-parsely")},formal:{label:(0,c.__)("Formal","wp-parsely")},humorous:{label:(0,c.__)("Humorous","wp-parsely")},confident:{label:(0,c.__)("Confident","wp-parsely")},provocative:{label:(0,c.__)("Provocative","wp-parsely")},serious:{label:(0,c.__)("Serious","wp-parsely")},inspirational:{label:(0,c.__)("Inspirational","wp-parsely")},skeptical:{label:(0,c.__)("Skeptical","wp-parsely")},conversational:{label:(0,c.__)("Conversational","wp-parsely")},analytical:{label:(0,c.__)("Analytical","wp-parsely")},custom:{label:(0,c.__)("Custom Tone","wp-parsely"),icon:dt}},bt=Object.keys(_t),xt=function(e){return"custom"===e||""===e?_t.custom.label:St(e)?e:_t[e].label},St=function(e){return!bt.includes(e)||"custom"===e},Pt=function(e){var t=e.value,n=e.onChange,r=(0,o.useState)(""),a=r[0],l=r[1],u=(0,N.useDebounce)(n,500);return(0,s.jsx)("div",{className:"parsely-tone-selector-custom",children:(0,s.jsx)(i.TextControl,{value:a||t,placeholder:(0,c.__)("Enter a custom tone","wp-parsely"),onChange:function(e){if(""===e)return n(""),void l("");e.length>32&&(e=e.slice(0,32)),u(e),l(e)}})})},jt=function(e){var t=e.tone,n=e.value,r=void 0===n?(0,c.__)("Select a tone","wp-parsely"):n,a=e.label,l=void 0===a?(0,c.__)("Tone","wp-parsely"):a,o=e.onChange,u=e.onDropdownChange,p=e.disabled,d=void 0!==p&&p,f=e.allowCustom,g=void 0!==f&&f;return(0,s.jsxs)(i.Disabled,{isDisabled:d,children:[(0,s.jsx)("div",{className:"wp-parsely-dropdown-label",children:l}),(0,s.jsx)(i.DropdownMenu,{label:(0,c.__)("Tone","wp-parsely"),className:"parsely-tone-selector-dropdown"+(d?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"parsely-tone-selector-label",children:St(t)?_t.custom.label:r}),(0,s.jsx)(ft,{})]})},children:function(e){var n=e.onClose;return(0,s.jsx)(i.MenuGroup,{label:(0,c.__)("Select a tone","wp-parsely"),children:(0,s.jsx)(s.Fragment,{children:bt.map((function(e){if(!g&&"custom"===e)return null;var r=_t[e],a=e===t||St(t)&&"custom"===e;return(0,s.jsxs)(i.MenuItem,{isSelected:a,className:a?"is-selected":"",role:"menuitemradio",onClick:function(){null==u||u(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-tone-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,s.jsx)(V,{icon:r.icon}),r.label]},e)}))})})}}),g&&St(t)&&(0,s.jsx)(Pt,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},kt=(0,u.createElement)(p.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(p.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})),Tt=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})),Et=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),Lt=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})),Ct=function(){return Ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0?(0,s.jsx)("span",{className:"parsely-write-titles-text",children:(0,o.createInterpolateElement)( +(0,c.__)("Top related posts by %1$s in the %2$s.","wp-parsely"),D.value,E(p,!0)):null!=A?A:""})}),k&&k.Message(),x&&(0,s.jsx)("div",{className:"related-posts-loading-message","data-testid":"parsely-related-posts-loading-message",children:(0,c.__)("Loading…","wp-parsely")}),!x&&!k&&0===B.length&&(0,s.jsx)("div",{className:"related-posts-empty",children:(0,c.__)("No related posts found.","wp-parsely")}),!x&&B.length>0&&(0,s.jsx)("div",{className:"related-posts-list",children:B.map((function(e){return(0,s.jsx)(rt,{metric:d,post:e,postContent:H},e.id)}))})]})]})]})},dt=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),ft=function(){return(0,s.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,s.jsx)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5034 7.91642L9 12.0104L4.49662 7.91642L5.25337 7.08398L8.99999 10.49L12.7466 7.08398L13.5034 7.91642Z",fill:"#1E1E1E"})})},gt={journalist:{label:(0,c.__)("Journalist","wp-parsely")},editorialWriter:{label:(0,c.__)("Editorial Writer","wp-parsely")},investigativeReporter:{label:(0,c.__)("Investigative Reporter","wp-parsely")},techAnalyst:{label:(0,c.__)("Tech Analyst","wp-parsely")},businessAnalyst:{label:(0,c.__)("Business Analyst","wp-parsely")},culturalCommentator:{label:(0,c.__)("Cultural Commentator","wp-parsely")},scienceCorrespondent:{label:(0,c.__)("Science Correspondent","wp-parsely")},politicalAnalyst:{label:(0,c.__)("Political Analyst","wp-parsely")},healthWellnessAdvocate:{label:(0,c.__)("Health and Wellness Advocate","wp-parsely")},environmentalJournalist:{label:(0,c.__)("Environmental Journalist","wp-parsely")},custom:{label:(0,c.__)("Custom Persona","wp-parsely"),icon:dt}},ht=Object.keys(gt),vt=function(e){return"custom"===e||""===e?gt.custom.label:yt(e)?e:gt[e].label},yt=function(e){return!ht.includes(e)||"custom"===e},mt=function(e){var t=e.value,n=e.onChange,r=(0,o.useState)(""),a=r[0],l=r[1],u=(0,N.useDebounce)(n,500);return(0,s.jsx)("div",{className:"parsely-persona-selector-custom",children:(0,s.jsx)(i.TextControl,{value:a||t,placeholder:(0,c.__)("Enter a custom persona…","wp-parsely"),onChange:function(e){if(""===e)return n(""),void l("");e.length>32&&(e=e.slice(0,32)),u(e),l(e)}})})},wt=function(e){var t=e.persona,n=e.value,r=void 0===n?(0,c.__)("Select a persona…","wp-parsely"):n,a=e.label,l=void 0===a?(0,c.__)("Persona","wp-parsely"):a,o=e.onChange,u=e.onDropdownChange,p=e.disabled,d=void 0!==p&&p,f=e.allowCustom,g=void 0!==f&&f;return(0,s.jsxs)(i.Disabled,{isDisabled:d,children:[l&&(0,s.jsx)("div",{className:"wp-parsely-dropdown-label",children:l}),(0,s.jsx)(i.DropdownMenu,{label:(0,c.__)("Persona","wp-parsely"),className:"parsely-persona-selector-dropdown"+(d?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"parsely-persona-selector-label",children:yt(t)?gt.custom.label:r}),(0,s.jsx)(ft,{})]})},children:function(e){var n=e.onClose;return(0,s.jsx)(i.MenuGroup,{label:(0,c.__)("Persona","wp-parsely"),children:(0,s.jsx)(s.Fragment,{children:ht.map((function(e){if(!g&&"custom"===e)return null;var r=gt[e],a=e===t||yt(t)&&"custom"===e;return(0,s.jsxs)(i.MenuItem,{isSelected:a,className:a?"is-selected":"",role:"menuitemradio",onClick:function(){null==u||u(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-persona-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,s.jsx)(V,{icon:r.icon}),r.label]},e)}))})})}}),g&&yt(t)&&(0,s.jsx)(mt,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},_t={neutral:{label:(0,c.__)("Neutral","wp-parsely")},formal:{label:(0,c.__)("Formal","wp-parsely")},humorous:{label:(0,c.__)("Humorous","wp-parsely")},confident:{label:(0,c.__)("Confident","wp-parsely")},provocative:{label:(0,c.__)("Provocative","wp-parsely")},serious:{label:(0,c.__)("Serious","wp-parsely")},inspirational:{label:(0,c.__)("Inspirational","wp-parsely")},skeptical:{label:(0,c.__)("Skeptical","wp-parsely")},conversational:{label:(0,c.__)("Conversational","wp-parsely")},analytical:{label:(0,c.__)("Analytical","wp-parsely")},custom:{label:(0,c.__)("Custom Tone","wp-parsely"),icon:dt}},bt=Object.keys(_t),xt=function(e){return"custom"===e||""===e?_t.custom.label:St(e)?e:_t[e].label},St=function(e){return!bt.includes(e)||"custom"===e},Pt=function(e){var t=e.value,n=e.onChange,r=(0,o.useState)(""),a=r[0],l=r[1],u=(0,N.useDebounce)(n,500);return(0,s.jsx)("div",{className:"parsely-tone-selector-custom",children:(0,s.jsx)(i.TextControl,{value:a||t,placeholder:(0,c.__)("Enter a custom tone","wp-parsely"),onChange:function(e){if(""===e)return n(""),void l("");e.length>32&&(e=e.slice(0,32)),u(e),l(e)}})})},jt=function(e){var t=e.tone,n=e.value,r=void 0===n?(0,c.__)("Select a tone","wp-parsely"):n,a=e.label,l=void 0===a?(0,c.__)("Tone","wp-parsely"):a,o=e.onChange,u=e.onDropdownChange,p=e.disabled,d=void 0!==p&&p,f=e.allowCustom,g=void 0!==f&&f;return(0,s.jsxs)(i.Disabled,{isDisabled:d,children:[(0,s.jsx)("div",{className:"wp-parsely-dropdown-label",children:l}),(0,s.jsx)(i.DropdownMenu,{label:(0,c.__)("Tone","wp-parsely"),className:"parsely-tone-selector-dropdown"+(d?" is-disabled":""),popoverProps:{className:"wp-parsely-popover"},toggleProps:{children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"parsely-tone-selector-label",children:St(t)?_t.custom.label:r}),(0,s.jsx)(ft,{})]})},children:function(e){var n=e.onClose;return(0,s.jsx)(i.MenuGroup,{label:(0,c.__)("Select a tone","wp-parsely"),children:(0,s.jsx)(s.Fragment,{children:bt.map((function(e){if(!g&&"custom"===e)return null;var r=_t[e],a=e===t||St(t)&&"custom"===e;return(0,s.jsxs)(i.MenuItem,{isSelected:a,className:a?"is-selected":"",role:"menuitemradio",onClick:function(){null==u||u(e),o(e),n(),"custom"===e&&setTimeout((function(){var e=document.querySelector(".parsely-tone-selector-custom input");e&&e.focus()}),0)},children:[r.icon&&(0,s.jsx)(V,{icon:r.icon}),r.label]},e)}))})})}}),g&&St(t)&&(0,s.jsx)(Pt,{onChange:function(e){o(""!==e?e:"custom")},value:"custom"===t?"":t})]})},kt=(0,u.createElement)(p.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,u.createElement)(p.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})),Tt=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})),Et=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})),Ct=(0,u.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,u.createElement)(p.Path,{d:"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z"})),Lt=function(){return Lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0&&s[s.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!s||l[1]>s[0]&&l[1]0?(0,s.jsx)("span",{className:"parsely-write-titles-text",children:(0,o.createInterpolateElement)( // translators: %1$s is the tone, %2$s is the persona. (0,c.__)("We've generated a few titles based on the content of your post, written as a .","wp-parsely"),{tone:(0,s.jsx)("strong",{children:xt(d)}),persona:(0,s.jsx)("strong",{children:vt(v)})})}):(0,c.__)("Use Parse.ly AI to generate a title for your post.","wp-parsely"),(0,s.jsxs)(i.Button,{href:"https://docs.parse.ly/plugin-content-helper/#h-title-suggestions-beta",target:"_blank",variant:"link",children:[(0,c.__)("Learn more about Parse.ly AI","wp-parsely"),(0,s.jsx)(V,{icon:D,size:18,className:"parsely-external-link-icon"})]})]}),l&&(0,s.jsx)(i.Notice,{status:"info",isDismissible:!1,className:"wp-parsely-content-helper-error",children:l.message}),void 0!==P&&(0,s.jsx)(Vt,{title:P,type:tt.PostTitle,isOriginal:!0}),00&&(0,s.jsx)(Dt,{pinnedTitles:b,isOpen:!0}),_.length>0&&(0,s.jsx)(Ht,{suggestions:_,isOpen:!0,isLoading:w})]}),(0,s.jsx)(Ft,{isLoading:w,onPersonaChange:function(e){O("Persona",e),y(e)},onSettingChange:O,onToneChange:function(e){O("Tone",e),f(e)},persona:t.TitleSuggestionsSettings.Persona,tone:t.TitleSuggestionsSettings.Tone}),(0,s.jsx)("div",{className:"title-suggestions-generate",children:(0,s.jsxs)(i.Button,{variant:"primary",isBusy:w,disabled:w||"custom"===d||"custom"===v,onClick:function(){return Wt(void 0,void 0,void 0,(function(){return Zt(this,(function(e){switch(e.label){case 0:return u(void 0),!1!==w?[3,2]:(g.trackEvent("title_suggestions_generate_pressed",{request_more:_.length>0,total_titles:_.length,total_pinned:_.filter((function(e){return e.isPinned})).length,tone:d,persona:v}),[4,(t=tt.PostTitle,n=A,r=d,s=v,Wt(void 0,void 0,void 0,(function(){var e,i,a;return Zt(this,(function(l){switch(l.label){case 0:return[4,E(!0)];case 1:l.sent(),e=new zt,l.label=2;case 2:return l.trys.push([2,5,,6]),[4,e.generateTitles(n,3,r,s)];case 3:return i=l.sent(),[4,T(t,i)];case 4:return l.sent(),[3,6];case 5:return a=l.sent(),u(a),T(t,[]),[3,6];case 6:return[4,E(!1)];case 7:return l.sent(),[2]}}))})))]);case 1:e.sent(),e.label=2;case 2:return[2]}var t,n,r,s}))}))},children:[w&&(0,c.__)("Generating Titles…","wp-parsely"),!w&&x.length>0&&(0,c.__)("Generate More","wp-parsely"),!w&&0===x.length&&(0,c.__)("Generate Titles","wp-parsely")]})})]})})},qt=function(){return qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{ suffix } } + size={ size ?? '__unstable-large' } min={ min } max={ max } onChange={ ( newValue ) => { diff --git a/src/content-helper/common/components/input-range/style.scss b/src/content-helper/common/components/input-range/style.scss index 786465342..7dd7a760a 100644 --- a/src/content-helper/common/components/input-range/style.scss +++ b/src/content-helper/common/components/input-range/style.scss @@ -21,11 +21,7 @@ .components-input-control { display: flex; - align-items: center; - gap: var(--grid-unit-05, to_rem(4px)); flex: 1 0 0; - align-self: stretch; - /* For Chrome, Safari, Edge */ input[type="number"]::-webkit-inner-spin-button, @@ -41,18 +37,9 @@ .components-base-control__field { flex-grow: 1; - - .components-flex { - height: to_rem(40px); - } - - input[type="number"] { - padding-left: to_rem(16px); - } } .components-input-control__suffix { - padding-right: to_rem(10px); color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)); } } diff --git a/src/content-helper/editor-sidebar/performance-details/component.tsx b/src/content-helper/editor-sidebar/performance-details/component.tsx index 91a1154ff..f8c78b604 100644 --- a/src/content-helper/editor-sidebar/performance-details/component.tsx +++ b/src/content-helper/editor-sidebar/performance-details/component.tsx @@ -1,7 +1,13 @@ /** * WordPress dependencies */ -import { Button, MenuGroup, MenuItem, SelectControl } from '@wordpress/components'; +import { + __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper, + Button, + MenuGroup, + MenuItem, + SelectControl, +} from '@wordpress/components'; import { useEffect, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { @@ -241,8 +247,13 @@ export const PerformanceStats = ( >
+ { __( 'Period: ', 'wp-parsely' ) } + + } onChange={ ( selection ) => { if ( isInEnum( selection, Period ) ) { setSettings( { diff --git a/src/content-helper/editor-sidebar/performance-details/performance-details.scss b/src/content-helper/editor-sidebar/performance-details/performance-details.scss index a604323a0..e657cca8b 100644 --- a/src/content-helper/editor-sidebar/performance-details/performance-details.scss +++ b/src/content-helper/editor-sidebar/performance-details/performance-details.scss @@ -76,29 +76,6 @@ } } - .panel-settings { - - .components-select-control { - display: flex; - align-items: flex-start; - gap: to_rem(16px); - align-self: stretch; - } - - .components-input-control__prefix { - margin-left: to_rem(8px); - } - - .components-input-control { - display: flex; - height: to_rem(36px); - padding: var(--grid-unit-15, 12px) var(--grid-unit-10, 8px) var(--grid-unit-15, 12px) var(--grid-unit-20, 16px); - align-items: center; - gap: var(--grid-unit-05, 4px); - align-self: stretch; - } - } - .components-heading { margin: 0; font-weight: 500; diff --git a/src/content-helper/editor-sidebar/related-posts/component.tsx b/src/content-helper/editor-sidebar/related-posts/component.tsx index a29780365..125394e1c 100644 --- a/src/content-helper/editor-sidebar/related-posts/component.tsx +++ b/src/content-helper/editor-sidebar/related-posts/component.tsx @@ -1,7 +1,10 @@ /** * WordPress dependencies */ -import { SelectControl } from '@wordpress/components'; +import { + __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper, + SelectControl, +} from '@wordpress/components'; import { useDebounce } from '@wordpress/compose'; // eslint-disable-next-line import/named import { store as coreStore, Taxonomy, User } from '@wordpress/core-data'; @@ -340,8 +343,11 @@ export const RelatedPostsPanel = (): JSX.Element => {
onMetricChange( value ) } - prefix={ __( 'Metric: ', 'wp-parsely' ) } + prefix={ + { __( 'Metric: ', 'wp-parsely' ) } + } value={ metric } > { Object.values( Metric ).map( ( value ) => ( @@ -351,8 +357,11 @@ export const RelatedPostsPanel = (): JSX.Element => { ) ) } { __( 'Period: ', 'wp-parsely' ) } + } onChange={ ( selection ) => onPeriodChange( selection ) } > { Object.values( Period ).map( ( value ) => ( diff --git a/src/content-helper/editor-sidebar/related-posts/related-posts.scss b/src/content-helper/editor-sidebar/related-posts/related-posts.scss index 0c28a316a..f39d74e98 100644 --- a/src/content-helper/editor-sidebar/related-posts/related-posts.scss +++ b/src/content-helper/editor-sidebar/related-posts/related-posts.scss @@ -44,30 +44,7 @@ margin-bottom: 0; } - .components-select-control { - display: flex; - align-items: flex-start; - gap: to_rem(16px); - align-self: stretch; - height: to_rem(36px); - - .components-input-control__container { - padding: to_rem(3px); - } - } - .components-input-control__prefix { - margin-left: to_rem(8px); - } - - .components-input-control { - display: flex; - height: to_rem(36px); - padding: var(--grid-unit-15, to_rem(12px)) var(--grid-unit-10, to_rem(8px)) var(--grid-unit-15, to_rem(12px)) var(--grid-unit-20, to_rem(16px)); - align-items: center; - gap: var(--grid-unit-5, to_rem(4px)); - align-self: stretch; - } } .related-posts-filter-settings {