diff --git a/.wordpress-org/screenshot-4.png b/.wordpress-org/screenshot-4.png index af45edb1e..97718104b 100644 Binary files a/.wordpress-org/screenshot-4.png and b/.wordpress-org/screenshot-4.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f87fb01..985b02447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.16.1](https://github.com/Parsely/wp-parsely/compare/3.16.0...3.16.1) - 2024-07-18 + +### Fixed + +- PCH Performance Stats: Remove UTM parameters from the 'View in Parse.ly' button ([#2655](https://github.com/Parsely/wp-parsely/pull/2655)) +- PCH Smart Linking: Show error when API returns empty list of Smart Link suggestions ([#2654](https://github.com/Parsely/wp-parsely/pull/2654)) +- PCH Smart Linking: Fix CSS leaking from the Block Preview ([#2652](https://github.com/Parsely/wp-parsely/pull/2652)) +- PCH Smart Linking: Use the post title as the Smart Link title. ([#2650](https://github.com/Parsely/wp-parsely/pull/2650)) +- Permissions: Fix PHP Warning when the user role is invalid ([#2649](https://github.com/Parsely/wp-parsely/pull/2649)) + ## [3.16.0](https://github.com/Parsely/wp-parsely/compare/3.15.0...3.16.0) - 2024-07-08 ### Added diff --git a/README.md b/README.md index 217ddfa77..c19758742 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Parse.ly -Stable tag: 3.16.0 +Stable tag: 3.16.1 Requires at least: 5.2 Tested up to: 6.5 Requires PHP: 7.2 diff --git a/build/content-helper/editor-sidebar-rtl.css b/build/content-helper/editor-sidebar-rtl.css index ef62ab3dd..0f01fed89 100644 --- a/build/content-helper/editor-sidebar-rtl.css +++ b/build/content-helper/editor-sidebar-rtl.css @@ -1,4 +1,4 @@ -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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;font-size:1.125rem;height:100%;justify-content:center;right: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;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline: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 .components-panel__icon{height:1.5rem;margin:0 0 0 var(--grid-unit-15);order:-1;width:1.5rem}.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) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 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) 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);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,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:right}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-left:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-right:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-right:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-right:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-left:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-right:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor.editor-styles-wrapper{font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black);mix-blend-mode:multiply;text-decoration-line:underline} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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;font-size:1.125rem;height:100%;justify-content:center;right: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;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline: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 .components-panel__icon{height:1.5rem;margin:0 0 0 var(--grid-unit-15);order:-1;width:1.5rem}.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) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 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) 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);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,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:right}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-left:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-right:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-right:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-right:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-left:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-right:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor .editor-styles-wrapper{background:var(--Gutenberg-White,#fff);font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black)!important;mix-blend-mode:multiply;text-decoration-line:underline} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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 .content-helper-error-message{margin:0!important}.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);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);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)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-5);justify-content:center;min-width:100px;padding:var(--grid-unit-20) var(--grid-unit-10)}.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);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);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)}.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:0 var(--radius) var(--radius) 0}.wp-parsely-content-helper .wp-parsely-performance-panel div.multi-percentage-bar .bar-fill:last-child{border-radius:var(--radius) 0 0 var(--radius)}.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)}.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{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1 0 0;font-feature-settings:"ss06" on;font-size:var(--font-size--small);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);font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;text-align:left}.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);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);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1;font-feature-settings:"ss06" on;font-size:var(--font-size--small);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);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);flex-shrink:0;font-size:var(--font-size--small);font-style:normal;font-weight:590;line-height:1rem;min-width:3.125rem;text-align:left} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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) 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);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .components-base-control__field{margin-bottom:0}.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);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)}.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);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20);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);padding:.375rem 0 var(--grid-unit-20) 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);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);display:flex;flex-wrap:wrap;padding:0 var(--grid-unit-10)}.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)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child,.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)}.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)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{align-items:center;display:flex;margin-right:auto;fill:#008a20}.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"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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);padding:.375rem 0 var(--grid-unit-20) 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)}.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)}.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) var(--grid-unit-15)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-dropdown-label{align-self:stretch;color:var(--sidebar-black);font-size:var(--font-size--smaller);font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.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)}.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);justify-content:center;line-height:1.25rem;padding:var(--grid-unit-15) var(--grid-unit-15) 0 var(--grid-unit-15)}.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;height:2.5rem;padding:0 var(--grid-unit-10)}.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)}.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)}.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);margin-bottom:var(--grid-unit-20);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);justify-content:center;right:0;position:absolute;left: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}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-content-helper-error.components-notice{margin-bottom:var(--grid-unit-10)}.wp-parsely-popover .components-popover__content{width:15.5rem}.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);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);justify-content:flex-end;margin-top:1.5rem} diff --git a/build/content-helper/editor-sidebar.asset.php b/build/content-helper/editor-sidebar.asset.php index 0f2c9aef6..b3eaddd98 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-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => '629f8616ef4e8194995e'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'b8c0240b984732a6e310'); diff --git a/build/content-helper/editor-sidebar.css b/build/content-helper/editor-sidebar.css index 880912f2a..13e98b986 100644 --- a/build/content-helper/editor-sidebar.css +++ b/build/content-helper/editor-sidebar.css @@ -1,4 +1,4 @@ -#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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;font-size:1.125rem;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;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline: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 .components-panel__icon{height:1.5rem;margin:0 var(--grid-unit-15) 0 0;order:-1;width:1.5rem}.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) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 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) 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);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,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:left}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-right:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-left:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-left:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-left:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-right:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-left:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor.editor-styles-wrapper{font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black);mix-blend-mode:multiply;text-decoration-line:underline} +#wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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;font-size:1.125rem;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;gap:var(--grid-unit-10);justify-content:center;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--grid-unit-10)}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel{font-size:1.125rem;padding:0;pointer-events:all;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.wp-parsely-block-overlay .wp-parsely-block-overlay-cancel:focus{box-shadow:none;outline: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 .components-panel__icon{height:1.5rem;margin:0 var(--grid-unit-15) 0 0;order:-1;width:1.5rem}.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) 0}.wp-parsely-smart-linking .parsely-panel-settings{width:100%}.wp-parsely-smart-linking .parsely-panel-settings-body{display:flex;flex-direction:column;gap:.625rem;padding:.375rem 0 var(--grid-unit-20) 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) 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);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,color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-block-select .components-toggle-group-control button:not([data-active-item]){transition:color .2s .1s}.wp-parsely-smart-linking .parsely-panel-settings-body .smart-linking-settings{align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20)}.wp-parsely-smart-linking .smart-linking-generate,.wp-parsely-smart-linking .smart-linking-manage{align-self:stretch;display:flex;flex-direction:column;padding:.375rem 0 var(--grid-unit-20) 0}.wp-parsely-smart-linking .smart-linking-generate button,.wp-parsely-smart-linking .smart-linking-manage button{align-items:center;align-self:stretch;display:flex;justify-content:center;width:100%}.wp-parsely-smart-linking .wp-parsely-smart-linking-suggested-links{margin:0}.wp-parsely-smart-linking .wp-parsely-smart-linking-hint{margin-top:calc(var(--grid-unit-10)*-1)}.wp-parsely-smart-linking-review-modal{align-items:flex-start;display:flex;flex-direction:column;width:47.875rem}.wp-parsely-smart-linking-review-modal .smart-linking-modal-body{align-self:stretch;display:flex;flex-direction:row;gap:var(--grid-unit-30)}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details{height:auto;margin-bottom:var(--grid-unit-20);text-align:left}.wp-parsely-smart-linking-review-modal .wp-parsely-link-suggestion-link-details .components-menu-item__item{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .linking-post-details{align-items:center;display:flex;justify-content:space-between;width:100%}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image{margin-right:.625rem;max-width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-image .icon-container{align-items:center;display:flex;height:3.125rem;justify-content:center;width:3.125rem}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-title a{text-decoration:none}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info{display:flex;flex-direction:column;flex-grow:1}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-info .linking-post-meta{color:var(--Gutenberg-Gray-700,#757575);font-size:.9em}.wp-parsely-smart-linking-review-modal .linking-post-details .linking-post-type{color:var(--Gutenberg-Gray-700,#757575);margin-left:.625rem;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:var(--grid-unit-20);min-width:13.75rem;padding:.1875rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs{margin-bottom:var(--grid-unit-20)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs button{align-items:center;display:flex;flex:1 0 0;flex-direction:column;height:var(--grid-unit-40)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item{color:var(--sidebar-black);font-size:.6875rem;font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tabs-item:focus-visible:before{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .smart-linking-review-sidebar-tabs .components-tab-panel__tab-content{max-height:23.125rem;overflow-y:auto}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip{align-items:center;display:flex;font-size:var(--font-size--small);margin-bottom:.3125rem;margin-top:-.5625rem;padding:.3125rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-tip .review-sidebar-tip svg{flex-shrink:0;height:1.5rem;margin-left:auto;width:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header{align-items:center;align-self:stretch;color:var(--sidebar-black);display:flex;font-size:.6875rem;font-style:normal;font-weight:600;gap:.375rem;line-height:var(--grid-unit-20);margin-bottom:var(--grid-unit-15);text-transform:uppercase}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .review-sidebar-header>span{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button{align-items:center;display:flex;justify-content:space-between;width:13.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button:focus{box-shadow:none;outline:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-label{align-items:center;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));display:flex;padding-left:var(--grid-unit-10);white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button.is-selected .smart-linking-menu-label{color:#fff}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .components-menu-item__item{padding-right:0;width:100%}.wp-parsely-smart-linking-review-modal .smart-linking-review-sidebar .components-button.components-menu-item__button .smart-linking-menu-item{display:inline;flex-grow:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion{align-items:flex-start;align-self:stretch;display:flex;flex:1;flex-direction:column;gap:1rem;max-width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs{font-size:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-separator{margin:0 var(--grid-unit-5)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-parent-block{color:var(--Gutenberg-Gray-700,#757575)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block{color:var(--sidebar-black)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestions-breadcrumbs .breadcrumbs-current-block .breadcrumbs-current-block-name{margin-left:var(--grid-unit-10)}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-suggestion-post-title{font-size:var(--font-size--large);font-weight:500;line-height:1.5rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .components-divider{border-color:#ccc;height:1px;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots{color:#ccc;font-size:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-top{margin-bottom:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .three-dots.is-bottom{margin-top:.75rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls{align-items:center;align-self:stretch;display:flex;flex-shrink:0;justify-content:space-between;margin:0 var(--grid-unit-20);-webkit-user-select:none;-moz-user-select:none;user-select:none;width:28.25rem}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .reviews-controls-middle{align-items:center;display:flex;flex:1 0 0;gap:var(--grid-unit-20);justify-content:center}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-next,.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-previous{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.wp-parsely-smart-linking-review-modal .smart-linking-review-suggestion .review-controls .wp-parsely-review-suggestion-reject{background:var(--Gutenberg-White,#fff);border-radius:2px;box-shadow:inset 0 0 0 1px var(--Gutenberg-Alert-Red,#cc1818);color:var(--Gutenberg-Alert-Red,#cc1818)}.wp-parsely-smart-linking-close-dialog{align-items:flex-start;display:flex;flex-direction:column;width:24rem}.wp-parsely-smart-linking-close-dialog .smart-linking-close-dialog-actions{align-items:center;align-self:stretch;display:flex;gap:var(--grid-unit-15);justify-content:flex-end;padding-top:var(--grid-unit-30)}.wp-parsely-preview-editor .editor-styles-wrapper{background:var(--Gutenberg-White,#fff);font-size:var(--font-size--medium);padding-bottom:0}.wp-parsely-preview-editor p[role=document]{margin:0}.wp-parsely-preview-editor .smart-linking-highlight{background:hsla(var(--parsely-green-components),.5);border-radius:2px;color:var(--sidebar-black)!important;mix-blend-mode:multiply;text-decoration-line:underline} #wp-parsely-dashboard-widget,.components-button[aria-controls="wp-parsely-block-editor-sidebar:wp-parsely-content-helper"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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 .content-helper-error-message{margin:0!important}.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);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);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)}.wp-parsely-content-helper .wp-parsely-performance-panel .performance-data-points .data-point{align-items:center;background:var(--sidebar-white);border-radius:.25rem;display:flex;flex:1 0 0;flex-direction:column;gap:var(--grid-unit-5);justify-content:center;min-width:100px;padding:var(--grid-unit-20) var(--grid-unit-10)}.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);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);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)}.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)}.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{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1 0 0;font-feature-settings:"ss06" on;font-size:var(--font-size--small);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);font-size:var(--font-size--small);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);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);justify-content:space-between}.wp-parsely-content-helper .wp-parsely-performance-panel .referrers-list .referrers-row .referrers-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:var(--sidebar-black);flex:1;font-feature-settings:"ss06" on;font-size:var(--font-size--small);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);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);flex-shrink:0;font-size:var(--font-size--small);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"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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) 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);width:100%}.wp-parsely-related-posts .related-posts-body .related-posts-filter-settings .components-base-control__field{margin-bottom:0}.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);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)}.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);font-size:.75rem;font-style:normal;font-weight:700;line-height:var(--grid-unit-20);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);padding:.375rem 0 var(--grid-unit-20) 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);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);display:flex;flex-wrap:wrap;padding:0 var(--grid-unit-10)}.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)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info>div:first-child,.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)}.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)}.wp-parsely-related-posts .related-posts-body .related-posts-list .related-post-single .related-post-actions .related-post-info .related-post-linked{align-items:center;display:flex;margin-left:auto;fill:#008a20}.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"],.editor-post-excerpt,.settings_page_parsely,.wp-parsely-block-overlay,.wp-parsely-content-helper,.wp-parsely-excerpt-generator,.wp-parsely-panel,.wp-parsely-popover,.wp-parsely-preview-editor,.wp-parsely-smart-linking-close-dialog,.wp-parsely-smart-linking-review-modal,.wp-parsely-suggested-title-modal{--base-font:"source-sans-pro",arial,sans-serif;--numeric-font:"ff-din-round-web",sans-serif;--parsely-green-components:107,42%,46%;--parsely-green:hsl(var(--parsely-green-components));--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;--grid-unit-25:1.25rem;--grid-unit-30:1.5rem;--grid-unit-40:2rem;--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);padding:.375rem 0 var(--grid-unit-20) 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)}.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)}.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) var(--grid-unit-15)}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-dropdown-label{align-self:stretch;color:var(--sidebar-black);font-size:var(--font-size--smaller);font-style:normal;font-weight:600;line-height:var(--grid-unit-20);text-transform:uppercase}.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)}.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);justify-content:center;line-height:1.25rem;padding:var(--grid-unit-15) var(--grid-unit-15) 0 var(--grid-unit-15)}.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;height:2.5rem;padding:0 var(--grid-unit-10)}.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)}.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)}.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);margin-bottom:var(--grid-unit-20);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);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}.wp-parsely-content-helper .wp-parsely-title-suggestions-wrapper .wp-parsely-content-helper-error.components-notice{margin-bottom:var(--grid-unit-10)}.wp-parsely-popover .components-popover__content{width:15.5rem}.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);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);justify-content:flex-end;margin-top:1.5rem} diff --git a/build/content-helper/editor-sidebar.js b/build/content-helper/editor-sidebar.js index e0cd1a51c..ba7ebb91e 100644 --- a/build/content-helper/editor-sidebar.js +++ b/build/content-helper/editor-sidebar.js @@ -1,7 +1,7 @@ -!function(){"use strict";var e={20:function(e,t,n){var r=n(609),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},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)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.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({},{_:function(){return Kn}});var e,t,r,i=n(848),s=window.wp.components,a=window.wp.data,o=window.wp.domReady,l=n.n(o),c=window.wp.editPost,u=window.wp.element,p=window.wp.i18n,d=window.wp.primitives,f=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})}),h=window.wp.plugins,v=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,s=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=1e4&&(clearInterval(s),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}(),g=(v.trackEvent,function(){return(0,i.jsx)(s.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,i.jsx)(s.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"})})}),y=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,i.jsxs)(s.SVG,{className:a,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)(s.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,i.jsx)(s.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,i.jsx)(s.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,i.jsx)(s.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"})]})},m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;nhere.',"wp-parsely"):s.code===M.ParselySuggestionsApiOpenAiError||s.code===M.ParselySuggestionsApiOpenAiUnavailable?s.message=(0,p.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):s.code===M.HttpRequestFailed&&s.message.includes("cURL error 28")?s.message=(0,p.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):s.code===M.ParselySuggestionsApiSchemaError?s.message=(0,p.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):s.code===M.ParselySuggestionsApiNoData?s.message=(0,p.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):s.code===M.ParselySuggestionsApiOpenAiSchema?s.message=(0,p.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):s.code===M.ParselySuggestionsApiAuthUnavailable&&(s.message=(0,p.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),s}return W(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[M.PluginCredentialsNotSetMessageDetected,M.PluginSettingsSiteIdNotSet,M.PluginSettingsApiSecretNotSet].includes(this.code)?F(e):(this.code===M.FetchError&&(this.hint=this.Hint((0,p.__)("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!==M.ParselyApiForbidden&&this.code!==M.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,p.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===M.HttpRequestFailed&&(this.hint=this.Hint((0,p.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,i.jsx)(D,{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,p.__)("Hint:","wp-parsely")," ").concat(e,"

")},t.prototype.createErrorSnackbar=function(){//.test(this.message)||(0,a.dispatch)("core/notices").createNotice("error",this.message,{type:"snackbar"})},t}(Error),K=function(e){var t=e.isDetectingEnabled,n=e.onLinkChange,r=e.onLinkRemove,i=e.onLinkAdd,s=e.debounceValue,o=void 0===s?500:s,l=(0,a.useSelect)((function(e){return{blocks:(0,e("core/block-editor").getBlocks)()}}),[]).blocks,c=(0,u.useRef)(l),p=(0,u.useRef)(t);return(0,u.useEffect)((function(){var e=(0,O.debounce)((function(){for(var t=[],s=0;s0)return r(e.innerBlocks,t[s].innerBlocks);if(JSON.stringify(e)!==JSON.stringify(t[s])){var a=t[s],o=i.parseFromString(e.attributes.content||"","text/html"),l=i.parseFromString((null==a?void 0:a.attributes.content)||"","text/html"),c=Array.from(o.querySelectorAll("a[data-smartlink]")),u=Array.from(l.querySelectorAll("a[data-smartlink]")),p=c.filter((function(e){return!u.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),d=u.filter((function(e){return!c.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),f=c.filter((function(e){var t=u.find((function(t){return t.dataset.smartlink===e.dataset.smartlink}));return t&&t.outerHTML!==e.outerHTML}));(p.length>0||d.length>0||f.length>0)&&n.push({block:e,prevBlock:a,addedLinks:p,removedLinks:d,changedLinks:f})}}}))};return r(e,t),n}(l,c.current);a.length>0&&(a.forEach((function(e){e.changedLinks.length>0&&n&&n(e),e.addedLinks.length>0&&i&&i(e),e.removedLinks.length>0&&r&&r(e)})),c.current=l)}),o);return e(t),function(){e.cancel()}}),[l,o,t,i,n,r]),null},Y=function(e){var t=e.value,n=e.onChange,r=e.max,a=e.min,o=e.suffix,l=e.size,c=e.label,u=e.initialPosition,p=e.disabled,d=e.className;return(0,i.jsxs)("div",{className:"parsely-inputrange-control ".concat(d||""),children:[(0,i.jsx)(s.__experimentalHeading,{className:"parsely-inputrange-control__label",level:3,children:c}),(0,i.jsxs)("div",{className:"parsely-inputrange-control__controls",children:[(0,i.jsx)(s.__experimentalNumberControl,{disabled:p,value:t,suffix:(0,i.jsx)(s.__experimentalInputControlSuffixWrapper,{children:o}),size:null!=l?l:"__unstable-large",min:a,max:r,onChange:function(e){var t=parseInt(e,10);isNaN(t)||n(t)}}),(0,i.jsx)(s.RangeControl,{disabled:p,value:t,showTooltip:!1,initialPosition:u,onChange:function(e){n(e)},withInputField:!1,min:a,max:r})]})]})},J=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))},Q=function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&y((0,H.parse)(n))}),[o]),(0,i.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{left:l,right:c,up:l,down:c}}),(0,i.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=o.post_data)||void 0===t?void 0:t.title}),(0,i.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=o.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,i.jsx)(Re,{topOrBottom:"top"}),(0,i.jsx)(Oe,{block:g[0],link:o,useOriginalBlock:!0}),!(null===(r=o.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,i.jsx)(Re,{topOrBottom:"bottom"})]}),(0,i.jsx)(s.__experimentalDivider,{}),(0,i.jsx)(Ie,{link:o}),(0,i.jsxs)("div",{className:"review-controls",children:[(0,i.jsx)(s.Tooltip,{shortcut:"←",text:(0,p.__)("Previous","wp-parsely"),children:(0,i.jsx)(s.Button,{disabled:!d,className:"wp-parsely-review-suggestion-previous",onClick:l,icon:Ee,children:(0,p.__)("Previous","wp-parsely")})}),(0,i.jsx)("div",{className:"reviews-controls-middle",children:(0,i.jsx)(s.Button,{target:"_blank",href:(null===(a=o.post_data)||void 0===a?void 0:a.edit_link)+"&smart-link="+o.uid,variant:"secondary",onClick:function(){v.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:o.uid})},children:(0,p.__)("Open in the Editor","wp-parsely")})}),(0,i.jsx)(s.Tooltip,{shortcut:"→",text:(0,p.__)("Next","wp-parsely"),children:(0,i.jsxs)(s.Button,{disabled:!f,onClick:c,className:"wp-parsely-review-suggestion-next",children:[(0,p.__)("Next","wp-parsely"),(0,i.jsx)(z,{icon:Ne})]})})]})]})},Me=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,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",className:a,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)(s.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,i.jsx)(s.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,i.jsx)(s.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},De=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,d]);var h=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},g=(0,i.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,p.__)("NEW","wp-parsely"),(0,i.jsx)(Me,{})]}),y=[];n&&n.length>0&&y.push({name:"outbound",title:(0,p.__)("Outbound","wp-parsely")}),r&&r.length>0&&y.push({name:"inbound",title:(0,p.__)("Inbound","wp-parsely")});var m="outbound";return y=y.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,p.__)("Outbound Smart Links","wp-parsely"),m="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,p.__)("Inbound Smart Links","wp-parsely"),m="inbound"),e})),(0,i.jsxs)("div",{className:"smart-linking-review-sidebar",ref:o,children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{tab:function(){return h()},"shift+tab":function(){return h()}}}),(0,i.jsx)(s.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:m,tabs:y,onSelect:function(e){var t,i;"outbound"===e&&n&&n.length>0&&a(n[0]),"inbound"===e&&r&&r.length>0&&a(r[0]),v.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(i=null==n?void 0:n.length)&&void 0!==i?i:0})},children:function(e){return(0,i.jsxs)(i.Fragment,{children:["outbound"===e.name&&(0,i.jsx)(i.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,i.jsxs)(s.MenuItem,{ref:function(e){l.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return a(e)},children:[(0,i.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&g]},e.uid)})):(0,i.jsxs)(i.Fragment,{children:[" ",(0,p.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"review-sidebar-tip",children:(0,p.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var o;return(0,i.jsx)(s.MenuItem,{ref:function(e){l.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return a(e)},children:(0,i.jsx)("span",{className:"smart-linking-menu-item",children:null===(o=e.post_data)||void 0===o?void 0:o.title})},e.uid)})):(0,i.jsxs)(i.Fragment,{children:[" ",(0,p.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Ve=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),Ge=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),He=function(e){var t,n,r,s,o=null===(t=e.link.match)||void 0===t?void 0:t.blockId,l=(0,a.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return o?{block:n(o),parents:r(o).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[o]),c=l.block,u=l.parents;return c?(0,i.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[u.map((function(e,t){var n;return(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,H.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,i.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,i.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,i.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,H.getBlockType)(c.name))||void 0===n?void 0:n.title}),(null===(s=null===(r=c.attributes)||void 0===r?void 0:r.metadata)||void 0===s?void 0:s.name)&&(0,i.jsx)("span",{className:"breadcrumbs-current-block-name",children:c.attributes.metadata.name})]})]}):(0,i.jsx)(i.Fragment,{})},ze=function(e){var t,n=e.link,r=(0,u.useState)(n.href),o=r[0],l=r[1],c=(0,u.useState)(null===(t=n.destination)||void 0===t?void 0:t.post_type),d=c[0],f=c[1],h=(0,u.useRef)(null),v=(0,a.useDispatch)(ge).updateSmartLink;return(0,u.useEffect)((function(){n.destination?f(n.destination.post_type):(f((0,p.__)("External","wp-parsely")),Pe.getInstance().getPostTypeByURL(n.href).then((function(e){e&&f(e.post_type),n.destination=e,v(n)})))}),[n,v]),(0,u.useEffect)((function(){var e=function(){if(h.current){var e=h.current.offsetWidth,t=Math.floor(e/8);l(function(e,t){var n=e.replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"");if(!t||n.length<=t)return n;var r=n.split("/")[0],i=n.substring(r.length);t-=r.length;var s=Math.floor((t-3)/2),a=i.substring(0,s),o=i.substring(i.length-s);return"".concat(r).concat(a,"...").concat(o)}(n.href,t))}};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),(0,i.jsx)(s.MenuItem,{ref:h,info:o,iconPosition:"left",icon:Le,shortcut:d,className:"block-editor-link-control__search-item wp-parsely-link-suggestion-link-details",children:n.title})},Ue=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,o=e.onAccept,l=e.onReject,c=e.onRemove,u=e.onSelectInEditor,d=e.hasPrevious,f=e.hasNext;if(t&&void 0!==t.post_data)return(0,i.jsx)(Be,{link:t,onNext:n,onPrevious:r,onAccept:o,onReject:l,onRemove:c,onSelectInEditor:u,hasPrevious:d,hasNext:f});if(!(null==t?void 0:t.match))return(0,i.jsx)(i.Fragment,{children:(0,p.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var h=t.match.blockId,v=(0,a.select)("core/block-editor").getBlock(h),g=t.applied;return v?(0,i.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&o()},r:function(){t&&(t.applied?c():l())}}}),(0,i.jsx)(He,{link:t}),(0,i.jsx)("div",{className:"review-suggestion-preview",children:(0,i.jsx)(Oe,{block:v,link:t})}),(0,i.jsx)(s.__experimentalDivider,{}),(0,i.jsx)(ze,{link:t}),(0,i.jsxs)("div",{className:"review-controls",children:[(0,i.jsx)(s.Tooltip,{shortcut:"←",text:(0,p.__)("Previous","wp-parsely"),children:(0,i.jsx)(s.Button,{disabled:!d,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:Ee,children:(0,p.__)("Previous","wp-parsely")})}),(0,i.jsxs)("div",{className:"reviews-controls-middle",children:[!g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Tooltip,{shortcut:"R",text:(0,p.__)("Reject","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-reject",icon:Ve,onClick:l,variant:"secondary",children:(0,p.__)("Reject","wp-parsely")})}),(0,i.jsx)(s.Tooltip,{shortcut:"A",text:(0,p.__)("Accept","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-accept",icon:Ge,onClick:o,variant:"secondary",children:(0,p.__)("Accept","wp-parsely")})})]}),g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Tooltip,{shortcut:"R",text:(0,p.__)("Remove","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-reject",icon:Ve,onClick:c,variant:"secondary",children:(0,p.__)("Remove","wp-parsely")})}),(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-accept",onClick:u,variant:"secondary",children:(0,p.__)("Select in Editor","wp-parsely")})]})]}),(0,i.jsx)(s.Tooltip,{shortcut:"→",text:(0,p.__)("Next","wp-parsely"),children:(0,i.jsxs)(s.Button,{disabled:!f,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,p.__)("Next","wp-parsely"),(0,i.jsx)(z,{icon:Ne})]})})]})]}):(0,i.jsx)(i.Fragment,{children:(0,p.__)("No block is selected.","wp-parsely")})},qe=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))},Ze=function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(o=a[0],(l=o.parentNode)&&(c=document.createTextNode(null!==(u=o.textContent)&&void 0!==u?u:""),l.replaceChild(c,o),q.updateBlockAttributes(n,{content:s.innerHTML}))),[4,E(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},C=(0,u.useCallback)((function(){h(!1),x().filter((function(e){return!e.applied})).length>0?c(!0):(Z.unlockPostAutosaving("smart-linking-review-modal"),t())}),[x,t]),A=function(e){c(!1),e?(h(!1),T().then((function(){C()}))):h(!0)},O=function(){if(ee(S)){var e=w.indexOf(S);if(!w[t=e+1])return;P(w[t])}else{var t;if(e=m.indexOf(S),!m[t=e+1])return;P(m[t])}},R=function(){if(ee(S)){var e=w.indexOf(S);if(!w[t=e-1])return;P(w[t])}else{var t;if(e=m.indexOf(S),!m[t=e-1])return;P(m[t])}};return(0,u.useEffect)((function(){f?Z.lockPostAutosaving("smart-linking-review-modal"):f&&0===y.length&&C()}),[f,t,y,C]),(0,u.useEffect)((function(){h(n)}),[n]),(0,i.jsxs)(i.Fragment,{children:[f&&(0,i.jsx)(s.Modal,{title:(0,p.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:C,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,i.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,i.jsx)(Fe,{outboundLinks:m,inboundLinks:w,activeLink:S,setSelectedLink:P}),S&&(ee(S)?(0,i.jsx)(Be,{link:S,onNext:O,onPrevious:R,hasNext:w.indexOf(S)0}):(0,i.jsx)(Ue,{link:S,hasNext:_().indexOf(S)<_().length-1,hasPrevious:_().indexOf(S)>0,onNext:O,onPrevious:R,onAccept:function(){return qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return S.match?(r(S),[4,(i=S.match.blockId,s=S,qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=s.href,e.title=s.title,e.setAttribute("data-smartlink",s.uid),(t=(0,a.select)("core/block-editor").getBlock(i))?(ne(t,s,e),s.applied=!0,[4,L(s)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),v.trackEvent("smart_linking_link_accepted",{link:S.href,title:S.title,text:S.text,uid:S.uid}),0===b().length?(C(),[2]):(e=m.indexOf(S),m[t=e+1]?P(m[t]):P(m[0]),[2])}var i,s}))}))},onReject:function(){return qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return e=m.indexOf(S),m[t=e+1]?P(m[t]):m[0]?P(m[0]):C(),[4,E(S.uid)];case 1:return n.sent(),v.trackEvent("smart_linking_link_rejected",{link:S.href,title:S.title,text:S.text,uid:S.uid}),[2]}}))}))},onRemove:function(){return qe(void 0,void 0,void 0,(function(){var e,t,n,r;return Ze(this,(function(i){switch(i.label){case 0:return S.match?(e=(0,a.select)("core/block-editor").getBlock(S.match.blockId))?(t=_(),n=t.indexOf(S),r=n-1,[4,N(e,S)]):[3,2]:[2];case 1:if(i.sent(),v.trackEvent("smart_linking_link_removed",{link:S.href,title:S.title,text:S.text,uid:S.uid}),0===(t=_()).length&&w.length>0)return P(w[0]),[2];if(0===t.length&&0===w.length)return C(),[2];if(t[r])return P(t[r]),[2];P(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(S.match){var e=(0,a.select)("core/block-editor").getBlock(S.match.blockId);if(e){q.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&de(t,S.uid),v.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:S.uid}),C()}}}}))]})}),l&&(0,i.jsxs)(s.Modal,{title:(0,p.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return A(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,p.__)("Are you sure you want to close? All un-accepted smart links will not be added.","wp-parsely"),(0,i.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,i.jsx)(s.Button,{variant:"secondary",onClick:function(){return A(!1)},children:(0,p.__)("Go Back","wp-parsely")}),(0,i.jsx)(s.Button,{variant:"primary",onClick:function(){return A(!0)},children:(0,p.__)("Close","wp-parsely")})]})]})]})})),$e=function(){return $e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&S("success",/* translators: %d: number of smart links applied */ /* translators: %d: number of smart links applied */ +!function(){"use strict";var e={20:function(e,t,n){var r=n(609),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},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)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:s,_owner:o.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.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({},{_:function(){return Kn}});var e,t,r,i=n(848),s=window.wp.components,a=window.wp.data,o=window.wp.domReady,l=n.n(o),c=window.wp.editPost,u=window.wp.element,p=window.wp.i18n,d=window.wp.primitives,f=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})}),h=window.wp.plugins,v=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,s=function(t,n){var r;return void 0===n&&(n={}),function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=1e4&&(clearInterval(s),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}(),g=(v.trackEvent,function(){return(0,i.jsx)(s.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,i.jsx)(s.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"})})}),y=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,i.jsxs)(s.SVG,{className:a,height:n,viewBox:"0 0 60 65",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)(s.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,i.jsx)(s.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,i.jsx)(s.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,i.jsx)(s.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"})]})},m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;nhere.',"wp-parsely"):s.code===M.ParselySuggestionsApiOpenAiError||s.code===M.ParselySuggestionsApiOpenAiUnavailable?s.message=(0,p.__)("The Parse.ly API returned an internal server error. Please retry with a different input, or try again later.","wp-parsely"):s.code===M.HttpRequestFailed&&s.message.includes("cURL error 28")?s.message=(0,p.__)("The Parse.ly API did not respond in a timely manner. Please try again later.","wp-parsely"):s.code===M.ParselySuggestionsApiSchemaError?s.message=(0,p.__)("The Parse.ly API returned a validation error. Please try again with different parameters.","wp-parsely"):s.code===M.ParselySuggestionsApiNoData?s.message=(0,p.__)("The Parse.ly API couldn't find any relevant data to fulfill the request. Please retry with a different input.","wp-parsely"):s.code===M.ParselySuggestionsApiOpenAiSchema?s.message=(0,p.__)("The Parse.ly API returned an incorrect response. Please try again later.","wp-parsely"):s.code===M.ParselySuggestionsApiAuthUnavailable&&(s.message=(0,p.__)("The Parse.ly API is currently unavailable. Please try again later.","wp-parsely")),s}return W(t,e),t.prototype.Message=function(e){return void 0===e&&(e=null),[M.PluginCredentialsNotSetMessageDetected,M.PluginSettingsSiteIdNotSet,M.PluginSettingsApiSecretNotSet].includes(this.code)?F(e):(this.code===M.FetchError&&(this.hint=this.Hint((0,p.__)("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!==M.ParselyApiForbidden&&this.code!==M.ParselySuggestionsApiNoAuthentication||(this.hint=this.Hint((0,p.__)("Please ensure that the Site ID and API Secret given in the plugin's settings are correct.","wp-parsely"))),this.code===M.HttpRequestFailed&&(this.hint=this.Hint((0,p.__)("The Parse.ly API cannot be reached. Please verify that you are online.","wp-parsely"))),(0,i.jsx)(D,{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,p.__)("Hint:","wp-parsely")," ").concat(e,"

")},t.prototype.createErrorSnackbar=function(){//.test(this.message)||(0,a.dispatch)("core/notices").createNotice("error",this.message,{type:"snackbar"})},t}(Error),K=function(e){var t=e.isDetectingEnabled,n=e.onLinkChange,r=e.onLinkRemove,i=e.onLinkAdd,s=e.debounceValue,o=void 0===s?500:s,l=(0,a.useSelect)((function(e){return{blocks:(0,e("core/block-editor").getBlocks)()}}),[]).blocks,c=(0,u.useRef)(l),p=(0,u.useRef)(t);return(0,u.useEffect)((function(){var e=(0,O.debounce)((function(){for(var t=[],s=0;s0)return r(e.innerBlocks,t[s].innerBlocks);if(JSON.stringify(e)!==JSON.stringify(t[s])){var a=t[s],o=i.parseFromString(e.attributes.content||"","text/html"),l=i.parseFromString((null==a?void 0:a.attributes.content)||"","text/html"),c=Array.from(o.querySelectorAll("a[data-smartlink]")),u=Array.from(l.querySelectorAll("a[data-smartlink]")),p=c.filter((function(e){return!u.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),d=u.filter((function(e){return!c.some((function(t){return t.dataset.smartlink===e.dataset.smartlink}))})),f=c.filter((function(e){var t=u.find((function(t){return t.dataset.smartlink===e.dataset.smartlink}));return t&&t.outerHTML!==e.outerHTML}));(p.length>0||d.length>0||f.length>0)&&n.push({block:e,prevBlock:a,addedLinks:p,removedLinks:d,changedLinks:f})}}}))};return r(e,t),n}(l,c.current);a.length>0&&(a.forEach((function(e){e.changedLinks.length>0&&n&&n(e),e.addedLinks.length>0&&i&&i(e),e.removedLinks.length>0&&r&&r(e)})),c.current=l)}),o);return e(t),function(){e.cancel()}}),[l,o,t,i,n,r]),null},Y=function(e){var t=e.value,n=e.onChange,r=e.max,a=e.min,o=e.suffix,l=e.size,c=e.label,u=e.initialPosition,p=e.disabled,d=e.className;return(0,i.jsxs)("div",{className:"parsely-inputrange-control ".concat(d||""),children:[(0,i.jsx)(s.__experimentalHeading,{className:"parsely-inputrange-control__label",level:3,children:c}),(0,i.jsxs)("div",{className:"parsely-inputrange-control__controls",children:[(0,i.jsx)(s.__experimentalNumberControl,{disabled:p,value:t,suffix:(0,i.jsx)(s.__experimentalInputControlSuffixWrapper,{children:o}),size:null!=l?l:"__unstable-large",min:a,max:r,onChange:function(e){var t=parseInt(e,10);isNaN(t)||n(t)}}),(0,i.jsx)(s.RangeControl,{disabled:p,value:t,showTooltip:!1,initialPosition:u,onChange:function(e){n(e)},withInputField:!1,min:a,max:r})]})]})},J=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))},Q=function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]

","\n\x3c!-- /wp:paragraph --\x3e");t&&y((0,H.parse)(n))}),[o]),(0,i.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{left:l,right:c,up:l,down:c}}),(0,i.jsx)("div",{className:"review-suggestion-post-title",children:null===(t=o.post_data)||void 0===t?void 0:t.title}),(0,i.jsxs)("div",{className:"review-suggestion-preview",children:[!(null===(n=o.post_data)||void 0===n?void 0:n.is_first_paragraph)&&(0,i.jsx)(Re,{topOrBottom:"top"}),(0,i.jsx)(Oe,{block:g[0],link:o,useOriginalBlock:!0}),!(null===(r=o.post_data)||void 0===r?void 0:r.is_last_paragraph)&&(0,i.jsx)(Re,{topOrBottom:"bottom"})]}),(0,i.jsx)(s.__experimentalDivider,{}),(0,i.jsx)(Ie,{link:o}),(0,i.jsxs)("div",{className:"review-controls",children:[(0,i.jsx)(s.Tooltip,{shortcut:"←",text:(0,p.__)("Previous","wp-parsely"),children:(0,i.jsx)(s.Button,{disabled:!d,className:"wp-parsely-review-suggestion-previous",onClick:l,icon:Ee,children:(0,p.__)("Previous","wp-parsely")})}),(0,i.jsx)("div",{className:"reviews-controls-middle",children:(0,i.jsx)(s.Button,{target:"_blank",href:(null===(a=o.post_data)||void 0===a?void 0:a.edit_link)+"&smart-link="+o.uid,variant:"secondary",onClick:function(){v.trackEvent("smart_linking_open_in_editor_pressed",{type:"inbound",uid:o.uid})},children:(0,p.__)("Open in the Editor","wp-parsely")})}),(0,i.jsx)(s.Tooltip,{shortcut:"→",text:(0,p.__)("Next","wp-parsely"),children:(0,i.jsxs)(s.Button,{disabled:!f,onClick:c,className:"wp-parsely-review-suggestion-next",children:[(0,p.__)("Next","wp-parsely"),(0,i.jsx)(z,{icon:Ne})]})})]})]})},Me=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,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",className:a,width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)(s.Path,{d:"M8.18983 5.90381L8.83642 7.54325L10.4758 8.18983L8.83642 8.8364L8.18983 10.4759L7.54324 8.8364L5.90381 8.18983L7.54324 7.54325L8.18983 5.90381Z"}),(0,i.jsx)(s.Path,{d:"M15.048 5.90381L15.9101 8.08972L18.0961 8.95186L15.9101 9.81397L15.048 11.9999L14.1859 9.81397L12 8.95186L14.1859 8.08972L15.048 5.90381Z"}),(0,i.jsx)(s.Path,{d:"M11.238 10.4761L12.3157 13.2085L15.048 14.2861L12.3157 15.3638L11.238 18.0962L10.1603 15.3638L7.42798 14.2861L10.1603 13.2085L11.238 10.4761Z"})]})},De=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;ii.bottom)&&(n.scrollTop=r.offsetTop-n.offsetTop)}}}}),[t,d]);var h=function(){var e=document.querySelector(".smart-linking-review-sidebar-tabs [data-active-item]"),t=null==e?void 0:e.nextElementSibling;t||(t=document.querySelector('.smart-linking-review-sidebar-tabs [role="tab"]')),t&&t.click()},g=(0,i.jsxs)("span",{className:"smart-linking-menu-label",children:[(0,p.__)("NEW","wp-parsely"),(0,i.jsx)(Me,{})]}),y=[];n&&n.length>0&&y.push({name:"outbound",title:(0,p.__)("Outbound","wp-parsely")}),r&&r.length>0&&y.push({name:"inbound",title:(0,p.__)("Inbound","wp-parsely")});var m="outbound";return y=y.filter((function(e){return"outbound"===e.name&&r&&0===r.length&&(e.title=(0,p.__)("Outbound Smart Links","wp-parsely"),m="outbound"),"inbound"===e.name&&n&&0===n.length&&(e.title=(0,p.__)("Inbound Smart Links","wp-parsely"),m="inbound"),e})),(0,i.jsxs)("div",{className:"smart-linking-review-sidebar",ref:o,children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{tab:function(){return h()},"shift+tab":function(){return h()}}}),(0,i.jsx)(s.TabPanel,{className:"smart-linking-review-sidebar-tabs",initialTabName:m,tabs:y,onSelect:function(e){var t,i;"outbound"===e&&n&&n.length>0&&a(n[0]),"inbound"===e&&r&&r.length>0&&a(r[0]),v.trackEvent("smart_linking_modal_tab_selected",{tab:e,total_inbound:null!==(t=null==r?void 0:r.length)&&void 0!==t?t:0,total_outbound:null!==(i=null==n?void 0:n.length)&&void 0!==i?i:0})},children:function(e){return(0,i.jsxs)(i.Fragment,{children:["outbound"===e.name&&(0,i.jsx)(i.Fragment,{children:n&&0!==n.length?n.map((function(e,n){return(0,i.jsxs)(s.MenuItem,{ref:function(e){l.current[n]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return a(e)},children:[(0,i.jsx)("span",{className:"smart-linking-menu-item",children:e.text}),!e.applied&&g]},e.uid)})):(0,i.jsxs)(i.Fragment,{children:[" ",(0,p.__)("No outbound links found.","wp-parsely")]})}),"inbound"===e.name&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"review-sidebar-tip",children:(0,p.__)("This section shows external posts that link back to the current post.","wp-parsely")}),r&&0!==r.length?r.map((function(e,r){var o;return(0,i.jsx)(s.MenuItem,{ref:function(e){l.current[(n?n.length:0)+r]=e},className:(null==t?void 0:t.uid)===e.uid?"is-selected":"",role:"menuitemradio",isSelected:(null==t?void 0:t.uid)===e.uid,onClick:function(){return a(e)},children:(0,i.jsx)("span",{className:"smart-linking-menu-item",children:null===(o=e.post_data)||void 0===o?void 0:o.title})},e.uid)})):(0,i.jsxs)(i.Fragment,{children:[" ",(0,p.__)("No inbound links found.","wp-parsely")]})]})]})}})]})},Ve=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),Ge=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),He=function(e){var t,n,r,s,o=null===(t=e.link.match)||void 0===t?void 0:t.blockId,l=(0,a.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlock,r=t.getBlockParents;return o?{block:n(o),parents:r(o).map((function(e){return n(e)})).filter((function(e){return void 0!==e}))}:{block:void 0,parents:[]}}),[o]),c=l.block,u=l.parents;return c?(0,i.jsxs)("div",{className:"review-suggestions-breadcrumbs",children:[u.map((function(e,t){var n;return(0,i.jsxs)("span",{children:[(0,i.jsx)("span",{className:"breadcrumbs-parent-block",children:null===(n=(0,H.getBlockType)(e.name))||void 0===n?void 0:n.title}),(0,i.jsx)("span",{className:"breadcrumbs-parent-separator",children:" / "})]},t)})),(0,i.jsxs)("span",{className:"breadcrumbs-current-block",children:[(0,i.jsx)("span",{className:"breadcrumbs-current-block-type",children:null===(n=(0,H.getBlockType)(c.name))||void 0===n?void 0:n.title}),(null===(s=null===(r=c.attributes)||void 0===r?void 0:r.metadata)||void 0===s?void 0:s.name)&&(0,i.jsx)("span",{className:"breadcrumbs-current-block-name",children:c.attributes.metadata.name})]})]}):(0,i.jsx)(i.Fragment,{})},ze=function(e){var t,n=e.link,r=(0,u.useState)(n.href),o=r[0],l=r[1],c=(0,u.useState)(null===(t=n.destination)||void 0===t?void 0:t.post_type),d=c[0],f=c[1],h=(0,u.useRef)(null),v=(0,a.useDispatch)(ge).updateSmartLink;return(0,u.useEffect)((function(){n.destination?f(n.destination.post_type):(f((0,p.__)("External","wp-parsely")),Pe.getInstance().getPostTypeByURL(n.href).then((function(e){e&&f(e.post_type),n.destination=e,v(n)})))}),[n,v]),(0,u.useEffect)((function(){var e=function(){if(h.current){var e=h.current.offsetWidth,t=Math.floor(e/8);l(function(e,t){var n=e.replace(/(^\w+:|^)\/\//,"").replace(/^www\./,"");if(!t||n.length<=t)return n;var r=n.split("/")[0],i=n.substring(r.length);t-=r.length;var s=Math.floor((t-3)/2),a=i.substring(0,s),o=i.substring(i.length-s);return"".concat(r).concat(a,"...").concat(o)}(n.href,t))}};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n]),(0,i.jsx)(s.MenuItem,{ref:h,info:o,iconPosition:"left",icon:Le,shortcut:d,className:"block-editor-link-control__search-item wp-parsely-link-suggestion-link-details",children:n.title})},Ue=function(e){var t=e.link,n=e.onNext,r=e.onPrevious,o=e.onAccept,l=e.onReject,c=e.onRemove,u=e.onSelectInEditor,d=e.hasPrevious,f=e.hasNext;if(t&&void 0!==t.post_data)return(0,i.jsx)(Be,{link:t,onNext:n,onPrevious:r,onAccept:o,onReject:l,onRemove:c,onSelectInEditor:u,hasPrevious:d,hasNext:f});if(!(null==t?void 0:t.match))return(0,i.jsx)(i.Fragment,{children:(0,p.__)("This Smart Link does not have any matches in the current content.","wp-parsely")});var h=t.match.blockId,v=(0,a.select)("core/block-editor").getBlock(h),g=t.applied;return v?(0,i.jsxs)("div",{className:"smart-linking-review-suggestion",children:[(0,i.jsx)(s.KeyboardShortcuts,{shortcuts:{left:r,right:n,up:r,down:n,a:function(){t&&!t.applied&&o()},r:function(){t&&(t.applied?c():l())}}}),(0,i.jsx)(He,{link:t}),(0,i.jsx)("div",{className:"review-suggestion-preview",children:(0,i.jsx)(Oe,{block:v,link:t})}),(0,i.jsx)(s.__experimentalDivider,{}),(0,i.jsx)(ze,{link:t}),(0,i.jsxs)("div",{className:"review-controls",children:[(0,i.jsx)(s.Tooltip,{shortcut:"←",text:(0,p.__)("Previous","wp-parsely"),children:(0,i.jsx)(s.Button,{disabled:!d,className:"wp-parsely-review-suggestion-previous",onClick:r,icon:Ee,children:(0,p.__)("Previous","wp-parsely")})}),(0,i.jsxs)("div",{className:"reviews-controls-middle",children:[!g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Tooltip,{shortcut:"R",text:(0,p.__)("Reject","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-reject",icon:Ve,onClick:l,variant:"secondary",children:(0,p.__)("Reject","wp-parsely")})}),(0,i.jsx)(s.Tooltip,{shortcut:"A",text:(0,p.__)("Accept","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-accept",icon:Ge,onClick:o,variant:"secondary",children:(0,p.__)("Accept","wp-parsely")})})]}),g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Tooltip,{shortcut:"R",text:(0,p.__)("Remove","wp-parsely"),children:(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-reject",icon:Ve,onClick:c,variant:"secondary",children:(0,p.__)("Remove","wp-parsely")})}),(0,i.jsx)(s.Button,{className:"wp-parsely-review-suggestion-accept",onClick:u,variant:"secondary",children:(0,p.__)("Select in Editor","wp-parsely")})]})]}),(0,i.jsx)(s.Tooltip,{shortcut:"→",text:(0,p.__)("Next","wp-parsely"),children:(0,i.jsxs)(s.Button,{disabled:!f,onClick:n,className:"wp-parsely-review-suggestion-next",children:[(0,p.__)("Next","wp-parsely"),(0,i.jsx)(z,{icon:Ne})]})})]})]}):(0,i.jsx)(i.Fragment,{children:(0,p.__)("No block is selected.","wp-parsely")})},qe=function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))},Ze=function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(o=a[0],(l=o.parentNode)&&(c=document.createTextNode(null!==(u=o.textContent)&&void 0!==u?u:""),l.replaceChild(c,o),q.updateBlockAttributes(n,{content:s.innerHTML}))),[4,E(t.uid)]):[2]):[2];case 1:return p.sent(),[2]}}))}))},C=(0,u.useCallback)((function(){h(!1),x().filter((function(e){return!e.applied})).length>0?c(!0):(Z.unlockPostAutosaving("smart-linking-review-modal"),t())}),[x,t]),A=function(e){c(!1),e?(h(!1),T().then((function(){C()}))):h(!0)},O=function(){if(ee(S)){var e=w.indexOf(S);if(!w[t=e+1])return;P(w[t])}else{var t;if(e=m.indexOf(S),!m[t=e+1])return;P(m[t])}},R=function(){if(ee(S)){var e=w.indexOf(S);if(!w[t=e-1])return;P(w[t])}else{var t;if(e=m.indexOf(S),!m[t=e-1])return;P(m[t])}};return(0,u.useEffect)((function(){f?Z.lockPostAutosaving("smart-linking-review-modal"):f&&0===y.length&&C()}),[f,t,y,C]),(0,u.useEffect)((function(){h(n)}),[n]),(0,i.jsxs)(i.Fragment,{children:[f&&(0,i.jsx)(s.Modal,{title:(0,p.__)("Review Smart Links","wp-parsely"),className:"wp-parsely-smart-linking-review-modal",onRequestClose:C,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,children:(0,i.jsxs)("div",{className:"smart-linking-modal-body",children:[(0,i.jsx)(Fe,{outboundLinks:m,inboundLinks:w,activeLink:S,setSelectedLink:P}),S&&(ee(S)?(0,i.jsx)(Be,{link:S,onNext:O,onPrevious:R,hasNext:w.indexOf(S)0}):(0,i.jsx)(Ue,{link:S,hasNext:_().indexOf(S)<_().length-1,hasPrevious:_().indexOf(S)>0,onNext:O,onPrevious:R,onAccept:function(){return qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return S.match?(r(S),[4,(i=S.match.blockId,s=S,qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return(e=document.createElement("a")).href=s.href,e.title=s.title,e.setAttribute("data-smartlink",s.uid),(t=(0,a.select)("core/block-editor").getBlock(i))?(ne(t,s,e),s.applied=!0,[4,L(s)]):[2];case 1:return n.sent(),[2]}}))})))]):[2];case 1:return n.sent(),v.trackEvent("smart_linking_link_accepted",{link:S.href,title:S.title,text:S.text,uid:S.uid}),0===b().length?(C(),[2]):(e=m.indexOf(S),m[t=e+1]?P(m[t]):P(m[0]),[2])}var i,s}))}))},onReject:function(){return qe(void 0,void 0,void 0,(function(){var e,t;return Ze(this,(function(n){switch(n.label){case 0:return e=m.indexOf(S),m[t=e+1]?P(m[t]):m[0]?P(m[0]):C(),[4,E(S.uid)];case 1:return n.sent(),v.trackEvent("smart_linking_link_rejected",{link:S.href,title:S.title,text:S.text,uid:S.uid}),[2]}}))}))},onRemove:function(){return qe(void 0,void 0,void 0,(function(){var e,t,n,r;return Ze(this,(function(i){switch(i.label){case 0:return S.match?(e=(0,a.select)("core/block-editor").getBlock(S.match.blockId))?(t=_(),n=t.indexOf(S),r=n-1,[4,N(e,S)]):[3,2]:[2];case 1:if(i.sent(),v.trackEvent("smart_linking_link_removed",{link:S.href,title:S.title,text:S.text,uid:S.uid}),0===(t=_()).length&&w.length>0)return P(w[0]),[2];if(0===t.length&&0===w.length)return C(),[2];if(t[r])return P(t[r]),[2];P(t[0]),i.label=2;case 2:return[2]}}))}))},onSelectInEditor:function(){if(S.match){var e=(0,a.select)("core/block-editor").getBlock(S.match.blockId);if(e){q.selectBlock(e.clientId);var t=document.querySelector('[data-block="'.concat(e.clientId,'"]'));t&&de(t,S.uid),v.trackEvent("smart_linking_select_in_editor_pressed",{type:"outbound",uid:S.uid}),C()}}}}))]})}),l&&(0,i.jsxs)(s.Modal,{title:(0,p.__)("Review Smart Links","wp-parsely"),onRequestClose:function(){return A(!1)},className:"wp-parsely-smart-linking-close-dialog",children:[(0,p.__)("Are you sure you want to close? All un-accepted smart links will not be added.","wp-parsely"),(0,i.jsxs)("div",{className:"smart-linking-close-dialog-actions",children:[(0,i.jsx)(s.Button,{variant:"secondary",onClick:function(){return A(!1)},children:(0,p.__)("Go Back","wp-parsely")}),(0,i.jsx)(s.Button,{variant:"primary",onClick:function(){return A(!0)},children:(0,p.__)("Close","wp-parsely")})]})]})]})})),$e=function(){return $e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&S("success",/* translators: %d: number of smart links applied */ /* translators: %d: number of smart links applied */ (0,p.sprintf)((0,p.__)("%s smart links successfully applied.","wp-parsely"),w),{type:"snackbar"}):b(0)}),[x]),(0,u.useEffect)((function(){if(!(Object.keys(B).length>0)){var e={maxLinksPerPost:d.SmartLinking.MaxLinks};pe(e)}}),[pe,d]);var ke=(0,a.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlock,i=t.getBlock,s=t.getBlocks,a=e("core/editor"),o=a.getEditedPostContent,l=a.getCurrentPostAttribute;return{allBlocks:s(),selectedBlock:n?i(n):r(),postContent:o(),postPermalink:l("link")}}),[n]),Se=ke.allBlocks,Le=ke.selectedBlock,Ee=ke.postContent,Ne=ke.postPermalink,Ce=function(e){return Ke(void 0,void 0,void 0,(function(){var t,n,r,i,s;return Ye(this,(function(a){switch(a.label){case 0:t=[],a.label=1;case 1:return a.trys.push([1,4,,9]),[4,de((n=N||!Le)?ue.All:ue.Selected)];case 2:return a.sent(),o=Ne.replace(/^https?:\/\//i,""),r=["http://"+o,"https://"+o],i=function(e){return e.map((function(e){return e.href}))}(G),r.push.apply(r,i),[4,Pe.getInstance().generateSmartLinks(Le&&!n?(0,H.getBlockContent)(Le):Ee,I,r)];case 3:return t=a.sent(),[3,9];case 4:if((s=a.sent()).code&&s.code===M.ParselyAborted)throw s.numRetries=3-e,s;return e>0&&s.retryFetch?(console.error(s),[4,he(!0)]):[3,8];case 5:return a.sent(),[4,ve()];case 6:return a.sent(),[4,Ce(e-1)];case 7:return[2,a.sent()];case 8:throw s;case 9:return[2,t]}var o}))}))},Ae=function(){for(var e=[],t=0;t[type="button"]').forEach((function(e){e.setAttribute("disabled","disabled")}))},Ie=function(){document.querySelectorAll('.edit-post-header__settings>[type="button"]').forEach((function(e){e.removeAttribute("disabled")})),Z.unlockPostSaving("wp-parsely-block-overlay")};return(0,i.jsxs)("div",{className:"wp-parsely-smart-linking",children:[(0,i.jsx)(K,{isDetectingEnabled:!E,onLinkRemove:function(e){!function(e){J(this,void 0,void 0,(function(){var t,n,r;return Q(this,(function(i){switch(i.label){case 0:return[4,le((0,H.getBlockContent)(e),e.clientId)];case 1:return t=i.sent(),n=t.missingSmartLinks,r=t.didAnyFixes,n.forEach((function(e){(0,a.dispatch)(ge).removeSmartLink(e.uid)})),[2,r]}}))}))}(e.block)}}),(0,i.jsxs)(s.PanelRow,{className:t,children:[(0,i.jsxs)("div",{className:"smart-linking-text",children:[(0,p.__)("Automatically insert links to your most relevant, top performing content.","wp-parsely"),(0,i.jsxs)(s.Button,{href:"https://docs.parse.ly/plugin-content-helper/#h-smart-linking-beta",target:"_blank",variant:"link",children:[(0,p.__)("Learn more about Parse.ly AI","wp-parsely"),(0,i.jsx)(z,{icon:U,size:18,className:"parsely-external-link-icon"})]})]}),A&&(0,i.jsx)(s.Notice,{status:"info",onRemove:function(){return te(null)},className:"wp-parsely-content-helper-error",children:A.Message()}),x&&w>0&&(0,i.jsx)(s.Notice,{status:"success",onRemove:function(){return k(!1)},className:"wp-parsely-smart-linking-suggested-links",children:(0,p.sprintf)(/* translators: 1 - number of smart links generated */ /* translators: 1 - number of smart links generated */ -(0,p.__)("Successfully added %s smart links.","wp-parsely"),w>0?w:R.length)}),(0,i.jsx)(me,{disabled:L,selectedBlock:null==Le?void 0:Le.clientId,onSettingChange:function(e,t){var n;y({SmartLinking:$e($e({},d.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&fe(t)}}),(0,i.jsx)("div",{className:"smart-linking-generate",children:(0,i.jsx)(s.Button,{onClick:function(){return Ke(void 0,void 0,void 0,(function(){var e,t,n,r,i,s,a,l,c;return Ye(this,(function(u){switch(u.label){case 0:return[4,ee(!0)];case 1:return u.sent(),[4,be()];case 2:return u.sent(),[4,te(null)];case 3:return u.sent(),k(!1),v.trackEvent("smart_linking_generate_pressed",{is_full_content:N,selected_block:null!==(a=null==Le?void 0:Le.name)&&void 0!==a?a:"none",context:o}),e=Se.some((function(e){return"core/freeform"===e.name})),"core/freeform"===(null==Le?void 0:Le.name)&&!N||e&&N?(S("error",(0,p.__)("Smart Linking is not supported for the Freeform block.","wp-parsely"),{type:"snackbar"}),ee(!1),[2]):[4,Ae(N?"all":null==Le?void 0:Le.clientId)];case 4:u.sent(),t=setTimeout((function(){var e;ee(!1),v.trackEvent("smart_linking_generate_timeout",{is_full_content:N,selected_block:null!==(e=null==Le?void 0:Le.name)&&void 0!==e?e:"none",context:o}),Oe(N?"all":null==Le?void 0:Le.clientId)}),18e4),n=D,u.label=5;case 5:return u.trys.push([5,8,10,15]),[4,Ce(3)];case 6:return r=u.sent(),[4,(d=r,Ke(void 0,void 0,void 0,(function(){var e;return Ye(this,(function(t){switch(t.label){case 0:return d=d.filter((function(e){return!G.some((function(t){return t.uid===e.uid&&t.applied}))})),e=Ne.replace(/^https?:\/\//,"").replace(/\/+$/,""),d=(d=d.filter((function(t){return!t.href.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!G.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),d=(d=se(N?Se:[Le],d,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!G.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,s=i+r.text.length;return t>=i&&n<=s}))})),[4,ne(d)];case 1:return t.sent(),[2]}}))})))];case 7:return u.sent(),_e(!0),[3,15];case 8:return i=u.sent(),s=new $(null!==(l=i.message)&&void 0!==l?l:"An unknown error has occurred.",null!==(c=i.code)&&void 0!==c?c:M.UnknownError),i.code&&i.code===M.ParselyAborted&&(s.message=(0,p.sprintf)(/* translators: %d: number of retry attempts, %s: attempt plural */ /* translators: %d: number of retry attempts, %s: attempt plural */ -(0,p.__)("The Smart Linking process was cancelled after %1$d %2$s.","wp-parsely"),i.numRetries,(0,p._n)("attempt","attempts",i.numRetries,"wp-parsely"))),console.error(i),[4,te(s)];case 9:return u.sent(),s.createErrorSnackbar(),[3,15];case 10:return[4,ee(!1)];case 11:return u.sent(),[4,de(n)];case 12:return u.sent(),[4,he(!1)];case 13:return u.sent(),[4,Oe(N?"all":null==Le?void 0:Le.clientId)];case 14:return u.sent(),clearTimeout(t),[7];case 15:return[2]}var d}))}))},variant:"primary",isBusy:L,disabled:L,children:F?(0,p.sprintf)(/* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ /* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ +(0,p.__)("Successfully added %s smart links.","wp-parsely"),w>0?w:R.length)}),(0,i.jsx)(me,{disabled:L,selectedBlock:null==Le?void 0:Le.clientId,onSettingChange:function(e,t){var n;y({SmartLinking:$e($e({},d.SmartLinking),(n={},n[e]=t,n))}),"MaxLinks"===e&&fe(t)}}),(0,i.jsx)("div",{className:"smart-linking-generate",children:(0,i.jsx)(s.Button,{onClick:function(){return Ke(void 0,void 0,void 0,(function(){var e,t,n,r,i,s,a,l,c;return Ye(this,(function(u){switch(u.label){case 0:return[4,ee(!0)];case 1:return u.sent(),[4,be()];case 2:return u.sent(),[4,te(null)];case 3:return u.sent(),k(!1),v.trackEvent("smart_linking_generate_pressed",{is_full_content:N,selected_block:null!==(a=null==Le?void 0:Le.name)&&void 0!==a?a:"none",context:o}),e=Se.some((function(e){return"core/freeform"===e.name})),"core/freeform"===(null==Le?void 0:Le.name)&&!N||e&&N?(S("error",(0,p.__)("Smart Linking is not supported for the Freeform block.","wp-parsely"),{type:"snackbar"}),ee(!1),[2]):[4,Ae(N?"all":null==Le?void 0:Le.clientId)];case 4:u.sent(),t=setTimeout((function(){var e;ee(!1),v.trackEvent("smart_linking_generate_timeout",{is_full_content:N,selected_block:null!==(e=null==Le?void 0:Le.name)&&void 0!==e?e:"none",context:o}),Oe(N?"all":null==Le?void 0:Le.clientId)}),18e4),n=D,u.label=5;case 5:return u.trys.push([5,11,13,18]),[4,Ce(3)];case 6:return r=u.sent(),[4,(d=r,Ke(void 0,void 0,void 0,(function(){var e;return Ye(this,(function(t){switch(t.label){case 0:return d=d.filter((function(e){return!G.some((function(t){return t.uid===e.uid&&t.applied}))})),e=Ne.replace(/^https?:\/\//,"").replace(/\/+$/,""),d=(d=d.filter((function(t){return!t.href.includes(e)||(console.warn("PCH Smart Linking: Skipping self-reference link: ".concat(t.href)),!1)}))).filter((function(e){return!G.some((function(t){return t.href===e.href?(console.warn("PCH Smart Linking: Skipping duplicate link: ".concat(e.href)),!0):t.text===e.text&&t.offset!==e.offset&&(console.warn("PCH Smart Linking: Skipping duplicate link text: ".concat(e.text)),!0)}))})),d=(d=se(N?Se:[Le],d,{}).filter((function(e){return e.match}))).filter((function(e){if(!e.match)return!1;var t=e.match.blockLinkPosition,n=t+e.text.length;return!G.some((function(r){if(!r.match)return!1;if(e.match.blockId!==r.match.blockId)return!1;var i=r.match.blockLinkPosition,s=i+r.text.length;return t>=i&&n<=s}))})),[4,ne(d)];case 1:return t.sent(),[2]}}))})))];case 7:return u.sent(),0!==G.length?[3,9]:(s=new $((0,p.__)("No smart links were generated.","wp-parsely"),M.ParselyApiReturnedNoData,""),[4,te(s)]);case 8:return u.sent(),s.createErrorSnackbar(),[3,10];case 9:_e(!0),u.label=10;case 10:return[3,18];case 11:return i=u.sent(),s=new $(null!==(l=i.message)&&void 0!==l?l:"An unknown error has occurred.",null!==(c=i.code)&&void 0!==c?c:M.UnknownError),i.code&&i.code===M.ParselyAborted&&(s.message=(0,p.sprintf)(/* translators: %d: number of retry attempts, %s: attempt plural */ /* translators: %d: number of retry attempts, %s: attempt plural */ +(0,p.__)("The Smart Linking process was cancelled after %1$d %2$s.","wp-parsely"),i.numRetries,(0,p._n)("attempt","attempts",i.numRetries,"wp-parsely"))),console.error(i),[4,te(s)];case 12:return u.sent(),s.createErrorSnackbar(),[3,18];case 13:return[4,ee(!1)];case 14:return u.sent(),[4,de(n)];case 15:return u.sent(),[4,he(!1)];case 16:return u.sent(),[4,Oe(N?"all":null==Le?void 0:Le.clientId)];case 17:return u.sent(),clearTimeout(t),[7];case 18:return[2]}var d}))}))},variant:"primary",isBusy:L,disabled:L,children:F?(0,p.sprintf)(/* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ /* translators: %1$d: number of retry attempts, %2$d: maximum number of retries */ (0,p.__)("Retrying… Attempt %1$d of %2$d","wp-parsely"),V,3):L?(0,p.__)("Generating Smart Links…","wp-parsely"):(0,p.__)("Add Smart Links","wp-parsely")})}),(W.length>0||q.length>0)&&(0,i.jsx)("div",{className:"smart-linking-manage",children:(0,i.jsx)(s.Button,{onClick:function(){return Ke(void 0,void 0,void 0,(function(){var e,t;return Ye(this,(function(n){switch(n.label){case 0:return[4,ce()];case 1:return e=n.sent(),t=ae(),[4,ne(t)];case 2:return n.sent(),_e(!0),v.trackEvent("smart_linking_review_pressed",{num_smart_links:G.length,has_fixed_links:e,context:o}),[2]}}))}))},variant:"secondary",disabled:L,children:(0,p.__)("Review Smart Links","wp-parsely")})})]}),E&&(0,i.jsx)(We,{isOpen:E,onAppliedLink:function(){b((function(e){return e+1}))},onClose:function(){k(!0),_e(!1)}})]})},Xe=function(){return Xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&(t(),e())}))}))]}))},new((n=void 0)||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}().then((function(){var t=document.querySelector(".wp-block-post-content");de(t,e)}))})))},ut=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M7 11.5h10V13H7z"})}),pt=(0,i.jsx)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(d.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),dt=function(e){var t=e.title,n=e.icon,r=e.subtitle,a=e.level,o=void 0===a?2:a,l=e.children,c=e.controls,u=e.onClick,d=e.isOpen,f=e.isLoading,h=e.dropdownChildren;return(0,i.jsxs)("div",{className:"performance-stat-panel",children:[(0,i.jsxs)(s.__experimentalHStack,{className:"panel-header level-"+o,children:[(0,i.jsx)(s.__experimentalHeading,{level:o,children:t}),r&&!d&&(0,i.jsx)("span",{className:"panel-subtitle",children:r}),c&&!h&&(0,i.jsx)(s.DropdownMenu,{icon:n,label:(0,p.__)("Settings","wp-parsely"),className:"panel-settings-button",controls:c}),h&&(0,i.jsx)(s.DropdownMenu,{icon:n,label:(0,p.__)("Settings","wp-parsely"),className:"panel-settings-button",children:h}),n&&!h&&!c&&(0,i.jsx)(s.Button,{icon:n,className:"panel-settings-button",isPressed:d,onClick:u})]}),(0,i.jsx)("div",{className:"panel-body",children:f?(0,i.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,i.jsx)(s.Spinner,{})}):l})]})};function ft(e,t,n){void 0===t&&(t=1),void 0===n&&(n="");var r=parseInt(e.replace(/\D/g,""),10);if(r<1e3)return e;r<1e4&&(t=1);var i=r,s=r.toString(),a="",o=0;return Object.entries({1e3:"k","1,000,000":"M","1,000,000,000":"B","1,000,000,000,000":"T","1,000,000,000,000,000":"Q"}).forEach((function(e){var n=e[0],l=e[1],c=parseInt(n.replace(/\D/g,""),10);if(r>=c){var u=t;(i=r/c)%1>1/o&&(u=i>10?1:2),u=parseFloat(i.toFixed(2))===parseFloat(i.toFixed(0))?0:u,s=i.toFixed(u),a=l}o=c})),s+n+a}var ht=function(e){var n=e.data,r=e.isLoading,a=(0,u.useState)(t.Views),o=a[0],l=a[1],c=(0,u.useState)(!1),d=c[0],f=c[1];r||delete n.referrers.types.totals;var h=function(e){switch(e){case"social":return(0,p.__)("Social","wp-parsely");case"search":return(0,p.__)("Search","wp-parsely");case"other":return(0,p.__)("Other","wp-parsely");case"internal":return(0,p.__)("Internal","wp-parsely");case"direct":return(0,p.__)("Direct","wp-parsely")}return e},v=(0,p.sprintf)((0,p.__)("By %s","wp-parsely"),N(o)); /* translators: %s: metric description */return(0,i.jsxs)(dt,{title:(0,p.__)("Categories","wp-parsely"),level:3,subtitle:v,isOpen:d,onClick:function(){return f(!d)},children:[d&&(0,i.jsx)("div",{className:"panel-settings",children:(0,i.jsx)(s.SelectControl,{value:o,prefix:(0,p.__)("By: ","wp-parsely"),onChange:function(e){L(e,t)&&l(e)},children:Object.values(t).map((function(e){return(0,i.jsxs)("option",{value:e,disabled:"avg_engaged"===e,children:[N(e),"avg_engaged"===e&&(0,p.__)(" (coming soon)","wp-parsely")]},e)}))})}),r?(0,i.jsx)("div",{className:"parsely-spinner-wrapper","data-testid":"parsely-spinner-wrapper",children:(0,i.jsx)(s.Spinner,{})}):(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"multi-percentage-bar",children:Object.entries(n.referrers.types).map((function(e){var t=e[0],n=e[1],r=(0,p.sprintf)(/* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ /* translators: 1: Referrer type, 2: Percentage value, %%: Escaped percent sign */ (0,p.__)("%1$s: %2$s%%","wp-parsely"),h(t),n.viewsPercentage);return(0,i.jsx)(s.Tooltip diff --git a/package-lock.json b/package-lock.json index 3a2dd612f..30eca6099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wp-parsely", - "version": "3.16.0", + "version": "3.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wp-parsely", - "version": "3.16.0", + "version": "3.16.1", "license": "GPL-2.0-or-later", "dependencies": { "@types/js-cookie": "^3.0.6", diff --git a/package.json b/package.json index 8bc8f304c..ae328b699 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wp-parsely", - "version": "3.16.0", + "version": "3.16.1", "private": true, "description": "The Parse.ly plugin facilitates real-time and historical analytics to your content through a platform designed and built for digital publishing.", "author": "parsely, hbbtstar, jblz, mikeyarce, GaryJ, parsely_mike, acicovic, mehmoodak, vaurdan", diff --git a/src/Models/class-smart-link.php b/src/Models/class-smart-link.php index 12c736844..009998a63 100644 --- a/src/Models/class-smart-link.php +++ b/src/Models/class-smart-link.php @@ -128,7 +128,14 @@ public function __construct( int $post_id = 0 ) { $this->set_href( $href ); - $this->title = $title; + + // Set the title to be the destination post title if the destination post ID is set. + if ( 0 !== $this->destination_post_id ) { + $this->title = get_the_title( $this->destination_post_id ); + } else { + $this->title = $title; + } + $this->text = $text; $this->offset = $offset; $this->source_post_id = $post_id; diff --git a/src/class-dashboard-link.php b/src/class-dashboard-link.php index 6b9572f8d..2f693157b 100644 --- a/src/class-dashboard-link.php +++ b/src/class-dashboard-link.php @@ -25,6 +25,7 @@ class Dashboard_Link { * * @since 2.6.0 * @since 3.1.0 Moved to class-dashboard-link.php. Added source parameter. + * @since 3.16.1 Made the $campaign and $source parameters optional. * * @param WP_Post $post Which post object or ID to check. * @param string $site_id Site ID or empty string. @@ -32,7 +33,7 @@ class Dashboard_Link { * @param string $source Source name for the `utm_source` URL parameter. * @return string */ - public static function generate_url( WP_Post $post, string $site_id, string $campaign, string $source ): string { + public static function generate_url( WP_Post $post, string $site_id, string $campaign = '', string $source = '' ): string { /** * Internal variable. * @@ -50,6 +51,18 @@ public static function generate_url( WP_Post $post, string $site_id, string $cam 'utm_medium' => 'wp-parsely', ); + if ( '' === $campaign ) { + unset( $query_args['utm_campaign'] ); + } + + if ( '' === $source ) { + unset( $query_args['utm_source'] ); + } + + if ( ! isset( $query_args['utm_campaign'] ) && ! isset( $query_args['utm_source'] ) ) { + unset( $query_args['utm_medium'] ); + } + return add_query_arg( $query_args, Parsely::get_dash_url( $site_id ) ); } diff --git a/src/class-permissions.php b/src/class-permissions.php index 82480ea95..623dcfbff 100644 --- a/src/class-permissions.php +++ b/src/class-permissions.php @@ -80,30 +80,34 @@ public static function current_user_can_use_pch_feature( return false; } - // Current user's role is not yet set. $current_user = wp_get_current_user(); - if ( 0 === count( $current_user->roles ) ) { + $user_roles = $current_user->roles; + + // Current user's role is not yet set. + if ( 0 === count( $user_roles ) ) { return false; } - // Check that the user's role has the capability to edit posts. - $current_user_role = $current_user->roles[0]; - $valid_roles = array_keys( self::get_user_roles_with_edit_posts_cap() ); - if ( ! in_array( $current_user_role, $valid_roles, true ) ) { + // Get the roles with the capability to edit posts. + $valid_roles = array_keys( self::get_user_roles_with_edit_posts_cap() ); + + // Check that at least one of the user's roles has the capability to edit posts. + if ( 0 === count( array_intersect( $user_roles, $valid_roles ) ) ) { return false; } - // Check that the user's role has access to the specific feature/post. + // Check that at least one of the user's roles has access to the specific feature/post. $allowed_roles = $feature_options['allowed_user_roles']; - if ( in_array( $current_user_role, $allowed_roles, true ) ) { - if ( (int) $post_id > 0 ) { - return current_user_can( 'edit_post', $post_id ); - } + if ( 0 === count( array_intersect( $user_roles, $allowed_roles ) ) ) { + return false; + } - return true; + // Check if the user can edit the post. + if ( (int) $post_id > 0 ) { + return current_user_can( 'edit_post', $post_id ); } - return false; + return true; } /** diff --git a/src/content-helper/editor-sidebar/class-editor-sidebar.php b/src/content-helper/editor-sidebar/class-editor-sidebar.php index e597f9104..0d13a5413 100644 --- a/src/content-helper/editor-sidebar/class-editor-sidebar.php +++ b/src/content-helper/editor-sidebar/class-editor-sidebar.php @@ -95,11 +95,13 @@ public static function get_style_id(): string { * Returns the Parse.ly post dashboard URL for the current post. * * @since 3.14.0 + * @since 3.16.1 Added the $show_utm_params parameter. * * @param int|null|WP_Post $post_id The post ID or post object. Default is the current post. + * @param bool $add_utm_params Whether to add UTM parameters in the URL. * @return string|null The Parse.ly post dashboard URL, or false if the post ID is invalid. */ - private function get_parsely_post_url( $post_id = null ): ?string { + private function get_parsely_post_url( $post_id = null, bool $add_utm_params = true ): ?string { // Get permalink for the post. $post_id = $post_id ?? get_the_ID(); if ( false === $post_id ) { @@ -117,6 +119,10 @@ private function get_parsely_post_url( $post_id = null ): ?string { return null; } + if ( ! $add_utm_params ) { + return Dashboard_Link::generate_url( $post, $this->parsely->get_site_id() ); + } + return Dashboard_Link::generate_url( $post, $this->parsely->get_site_id(), 'wp-page-single', 'editor-sidebar' ); } @@ -159,8 +165,8 @@ public function run(): void { $this->inject_inline_scripts( Editor_Sidebar_Settings_Endpoint::get_route() ); - // Inject inline variables for the editor sidebar. - $parsely_post_url = $this->get_parsely_post_url(); + // Inject inline variables for the editor sidebar, without UTM parameters. + $parsely_post_url = $this->get_parsely_post_url( null, false ); if ( null !== $parsely_post_url ) { wp_add_inline_script( static::get_script_id(), diff --git a/src/content-helper/editor-sidebar/smart-linking/component.tsx b/src/content-helper/editor-sidebar/smart-linking/component.tsx index 9f09f7af6..49a4d1f95 100644 --- a/src/content-helper/editor-sidebar/smart-linking/component.tsx +++ b/src/content-helper/editor-sidebar/smart-linking/component.tsx @@ -482,7 +482,17 @@ export const SmartLinkingPanel = ( { try { const generatedLinks = await generateSmartLinksWithRetry( MAX_NUMBER_OF_RETRIES ); await processSmartLinks( generatedLinks ); - setIsReviewModalOpen( true ); + if ( smartLinks.length === 0 ) { + const contentHelperError = new ContentHelperError( + __( 'No smart links were generated.', 'wp-parsely' ), + ContentHelperErrorCode.ParselyApiReturnedNoData, + '' + ); + await setError( contentHelperError ); + contentHelperError.createErrorSnackbar(); + } else { + setIsReviewModalOpen( true ); + } } catch ( e: any ) { // eslint-disable-line @typescript-eslint/no-explicit-any const contentHelperError = new ContentHelperError( e.message ?? 'An unknown error has occurred.', diff --git a/src/content-helper/editor-sidebar/smart-linking/review-modal/component-block-preview.tsx b/src/content-helper/editor-sidebar/smart-linking/review-modal/component-block-preview.tsx index 4779093eb..78d9e739f 100644 --- a/src/content-helper/editor-sidebar/smart-linking/review-modal/component-block-preview.tsx +++ b/src/content-helper/editor-sidebar/smart-linking/review-modal/component-block-preview.tsx @@ -6,7 +6,7 @@ import { BlockEditorProvider, BlockList } from '@wordpress/block-editor'; import { BlockInstance, cloneBlock, getBlockContent } from '@wordpress/blocks'; import { Disabled } from '@wordpress/components'; import { select } from '@wordpress/data'; -import { useCallback, useEffect, useMemo } from '@wordpress/element'; +import { useCallback, useEffect, useMemo, useState } from '@wordpress/element'; /** * Internal dependencies @@ -14,17 +14,25 @@ import { useCallback, useEffect, useMemo } from '@wordpress/element'; import { SmartLink } from '../provider'; import { applyNodeToBlock } from '../utils'; +/** + * The style object, a derivative from Gutenberg's `Style` type. + * + * @since 3.16.1 + */ +type Style = { + css?: string, + assets?: string, + __unstableType?: string, +}; + /** * The props for the Styles component. * * @since 3.16.0 + * @since 3.16.1 Extracted the styles prop to a new `Style` type. */ type StylesProps = { - styles: { - css?: string, - assets?: string, - __unstableType?: string, - }[], + styles: Style[], }; /** @@ -37,20 +45,85 @@ type StylesProps = { * @param {StylesProps} props The component props. */ const Styles = ( { styles }: StylesProps ): React.JSX.Element => { - // Get only the theme and user styles. - const filteredStyles = styles - .filter( ( style ) => { - return ( - style.__unstableType === 'theme' || - style.__unstableType === 'user' - ) && style.css; + /** + * Prefixes the selectors in the CSS with the given prefix. + * + * It also replaces the `body` selector with the prefix itself. + * + * @since 3.16.1 + * + * @param {string} css The CSS to prefix. + * @param {string} prefix The prefix to use. + */ + const prefixSelectors = ( css: string, prefix: string ): string => { + // Split the CSS into individual rules. + const cssRules = css.split( '}' ); + + const prefixedRules = cssRules.map( ( rule ) => { + // If the rule is empty, skip it. + if ( ! rule.trim() ) { + return ''; + } + + // eslint-disable-next-line @wordpress/no-unused-vars-before-return + const [ selectors, properties ] = rule.split( '{' ); + + // If there are no properties, return the rule as is. + if ( ! properties ) { + return rule; + } + + // Add the prefix to each selector. + const prefixedSelectors = selectors + .split( ',' ) + .map( ( selector ) => { + const trimmedSelector = selector.trim(); + if ( ! trimmedSelector ) { + return ''; + } + // Replace the `body` selector with the prefix. + if ( trimmedSelector === 'body' ) { + return prefix; + } + return `${ prefix } ${ trimmedSelector }`; + } ).join( ', ' ); + + return `${ prefixedSelectors } {${ properties }}`; } ); - // Returns the styles, but replaces the body selector with the block editor selector. + return prefixedRules.join( ' ' ); + }; + + const [ processedStyles, setProcessedStyles ] = useState( [] ); + + /** + * Processes the styles to prefix all the Editor styles selectors with the Preview Editor wrapper class. + * + * @since 3.16.1 + */ + useEffect( () => { + const processStyles = () => { + const filteredStyles = styles.filter( ( style ) => { + return ( + ( style.__unstableType === 'theme' || style.__unstableType === 'user' ) && style.css + ); + } ); + + const processed = filteredStyles.map( ( style ) => { + const prefixedCss = prefixSelectors( style.css ?? '', '.wp-parsely-preview-editor' ); + return { ...style, css: prefixedCss }; + } ); + + setProcessedStyles( processed ); + }; + + processStyles(); + }, [ styles ] ); + return ( <> - { filteredStyles.map( ( style, index ) => ( - + { processedStyles.map( ( style, index ) => ( + ) ) } ); @@ -185,19 +258,21 @@ export const BlockPreview = ( { block, link, useOriginalBlock }: BlockPreviewPro const settings = select( 'core/block-editor' ).getSettings(); return ( - - - - - - +
+ + + + + + +
); }; diff --git a/src/content-helper/editor-sidebar/smart-linking/smart-linking.scss b/src/content-helper/editor-sidebar/smart-linking/smart-linking.scss index dc55d7c41..94fe35d64 100644 --- a/src/content-helper/editor-sidebar/smart-linking/smart-linking.scss +++ b/src/content-helper/editor-sidebar/smart-linking/smart-linking.scss @@ -489,9 +489,10 @@ .wp-parsely-preview-editor { - &.editor-styles-wrapper { + .editor-styles-wrapper { padding-bottom: 0; font-size: var(--font-size--medium); + background: var(--Gutenberg-White, #fff); } p[role="document"] { @@ -503,6 +504,6 @@ background: hsla(var(--parsely-green-components), 0.5); mix-blend-mode: multiply; text-decoration-line: underline; - color: var(--sidebar-black); + color: var(--sidebar-black) !important; } } diff --git a/tests/e2e/specs/content-helper/top-bar-icon.spec.ts b/tests/e2e/specs/content-helper/top-bar-icon.spec.ts index 1e62a1c81..62c975c8c 100644 --- a/tests/e2e/specs/content-helper/top-bar-icon.spec.ts +++ b/tests/e2e/specs/content-helper/top-bar-icon.spec.ts @@ -1,10 +1,7 @@ /** * WordPress dependencies */ -import { - createNewPost, - toggleMoreMenu, -} from '@wordpress/e2e-test-utils'; +import { createNewPost } from '@wordpress/e2e-test-utils'; /** * Internal dependencies @@ -14,6 +11,7 @@ import { VALID_SITE_ID, setSidebarPanelExpanded, setSiteKeys, + toggleMoreMenu, } from '../../utils'; // Selectors. @@ -84,7 +82,7 @@ describe( 'PCH Editor Sidebar top bar icon in the WordPress Post Editor', () => } // Ensure that the menu opens without crashing the Post Editor. - await toggleMoreMenu(); + await toggleMoreMenu( 'open' ); await page.waitForSelector( 'div.components-dropdown-menu__menu', { visible: true } ); const text = await page.$eval( 'div.components-dropdown-menu__menu', ( element: Element ) => element.textContent ); expect( await text ).toMatch( 'Parse.ly' ); diff --git a/tests/e2e/utils.ts b/tests/e2e/utils.ts index 702a8e23b..067a53eaf 100644 --- a/tests/e2e/utils.ts +++ b/tests/e2e/utils.ts @@ -4,10 +4,11 @@ import { createNewPost, ensureSidebarOpened, + findSidebarPanelToggleButtonWithTitle, visitAdminPage, } from '@wordpress/e2e-test-utils'; -export const PLUGIN_VERSION = '3.16.0'; +export const PLUGIN_VERSION = '3.16.1'; export const VALID_SITE_ID = 'demoaccount.parsely.com'; export const INVALID_SITE_ID = 'invalid.parsely.com'; export const VALID_API_SECRET = 'valid_api_secret'; @@ -242,23 +243,40 @@ export const setSidebarPanelExpanded = async ( }; /** - * Overrides the findSidebarPanelToggleButtonWithTitle() function of the - * wordpress/e2e-test-utils package, as we started having issues with it and - * some tests were failing. + * Toggles the More Menu. * - * @since 3.15.0 + * This function overrides the toggleMoreMenu() function of the + * wordpress/e2e-test-utils package, as the original function contains erroneous + * selectors * - * @param {string} title The title of the element to find. - * @param {string} containerClass The class of one of the element's containers. + * @since 3.16.1 * - * @return {Promise} The found element. + * @param {'open' | 'close' | undefined} waitFor Whether it should wait for the menu to open or close. + * If `undefined`, it won't wait for anything. */ -const findSidebarPanelToggleButtonWithTitle = async ( - title: string, containerClass: string = 'edit-post-sidebar' -) => { - const [ button ] = await page.$x( - `//div[contains(@class,"${ containerClass }")]//button[@class="components-button components-panel__body-toggle"][contains(text(),"${ title }")]` - ); +export async function toggleMoreMenu( + waitFor: 'open' | 'close' | undefined = undefined +): Promise { + const menuSelector = 'button[aria-haspopup="true"][aria-label="Options"]'; + const menuToggle = await page.waitForSelector( menuSelector ); + const isOpen = await menuToggle.evaluate( ( el ) => el.getAttribute( 'aria-expanded' ) ); + + // If opening and it's already open then exit early. + if ( isOpen === 'true' && waitFor === 'open' ) { + return; + } + + // If closing and it's already closed then exit early. + if ( isOpen === 'false' && waitFor === 'close' ) { + return; + } + await page.click( menuSelector ); + if ( waitFor ) { + const opts = waitFor === 'close' ? { + hidden: true, + } : {}; + const menuContentSelector = 'div.components-dropdown-menu__menu[role="menu"][aria-label="Options"]'; + await page.waitForSelector( menuContentSelector, opts ); + } +} - return button; -}; diff --git a/wp-parsely.php b/wp-parsely.php index e2fd4962c..aec1a9977 100644 --- a/wp-parsely.php +++ b/wp-parsely.php @@ -11,7 +11,7 @@ * Plugin Name: Parse.ly * Plugin URI: https://docs.parse.ly/wordpress * Description: This plugin makes it a snap to add Parse.ly tracking code and metadata to your WordPress blog. - * Version: 3.16.0 + * Version: 3.16.1 * Author: Parse.ly * Author URI: https://www.parse.ly * Text Domain: wp-parsely @@ -70,7 +70,7 @@ return; } -const PARSELY_VERSION = '3.16.0'; +const PARSELY_VERSION = '3.16.1'; const PARSELY_FILE = __FILE__; require_once __DIR__ . '/src/Models/class-base-model.php';