(()=>{var e={4184:(e,s)=>{var t;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],s=0;s<arguments.length;s++){var t=arguments[s];if(t){var i=typeof t;if("string"===i||"number"===i)e.push(t);else if(Array.isArray(t)){if(t.length){var n=o.apply(null,t);n&&e.push(n)}}else if("object"===i){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){e.push(t.toString());continue}for(var a in t)r.call(t,a)&&t[a]&&e.push(a)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(t=function(){return o}.apply(s,[]))||(e.exports=t)}()}},s={};function t(r){var o=s[r];if(void 0!==o)return o.exports;var i=s[r]={exports:{}};return e[r](i,i.exports,t),i.exports}t.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},t.d=(e,s)=>{for(var r in s)t.o(s,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:s[r]})},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{"use strict";const e=window.wp.i18n,s=window.wp.components,r=window.yoast.componentsNew,o=window.yoast.helpers,i=window.yoast.propTypes;var n=t.n(i);const a=window.wp.element,l=window.yoast.styledComponents;var c=t.n(l);const d=window.ReactJSXRuntime,p=c().div`
	display: flex;
	margin-top: 8px;
`;class u extends a.Component{render(){return(0,d.jsx)(p,{children:(0,d.jsx)(r.Toggle,{id:this.props.id,labelText:(0,e.__)("Mark as cornerstone content","wordpress-seo"),isEnabled:this.props.isEnabled,onSetToggleState:this.props.onToggle,onToggleDisabled:this.props.onToggleDisabled})})}}u.propTypes={id:n().string,isEnabled:n().bool,onToggle:n().func,onToggleDisabled:n().func},u.defaultProps={id:"cornerstone-toggle",isEnabled:!0,onToggle:()=>{},onToggleDisabled:()=>{}};const h=u,m=c()(r.Collapsible)`
	h2 > button {
		padding-left: 24px;
		padding-top: 16px;

		&:hover {
			background-color: #f0f0f0;
		}
	}

	div[class^="collapsible_content"] {
		padding: 24px 0;
		margin: 0 24px;
		border-top: 1px solid rgba(0,0,0,0.2);
	}

`,g=e=>(0,d.jsx)(m,{hasPadding:!0,hasSeparator:!0,...e}),y=e=>{const[s,t]=(0,a.useState)(!1),{prefixIcon:o}=e;return(0,d.jsxs)("div",{className:"yoast components-panel__body "+(s?"is-opened":""),children:[(0,d.jsx)("h2",{className:"components-panel__body-title",children:(0,d.jsxs)("button",{onClick:function(){t(!s)},className:"components-button components-panel__body-toggle",type:"button",id:e.buttonId,children:[(0,d.jsx)("span",{className:"yoast-icon-span",style:{fill:`${o&&o.color||""}`},children:o&&(0,d.jsx)(r.SvgIcon,{icon:o.icon,color:o.color,size:o.size})}),(0,d.jsxs)("span",{className:"yoast-title-container",children:[(0,d.jsx)("div",{className:"yoast-title",children:e.title}),(0,d.jsx)("div",{className:"yoast-subtitle",children:e.subTitle})]}),e.hasBetaBadgeLabel&&(0,d.jsx)(r.BetaBadge,{}),(0,d.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),s&&e.children]})},x=y;y.propTypes={title:n().string.isRequired,children:n().oneOfType([n().node,n().arrayOf(n().node)]).isRequired,prefixIcon:n().object,subTitle:n().string,hasBetaBadgeLabel:n().bool,buttonId:n().string},y.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const w=(0,o.makeOutboundLink)();function f({isCornerstone:t,onChange:i,learnMoreUrl:n,location:a}){const l="metabox"===a?g:x;return(0,d.jsxs)(l,{id:(0,o.join)(["yoast-cornerstone-collapsible",a]),title:(0,e.__)("Cornerstone content","wordpress-seo"),children:[(0,d.jsxs)(r.HelpText,{children:[(0,e.__)("Cornerstone content should be the most important and extensive articles on your site.","wordpress-seo")+" ",(0,d.jsx)(w,{href:n,children:(0,e.__)("Learn more about Cornerstone Content.","wordpress-seo")})]}),(0,d.jsx)(h,{id:(0,o.join)(["yoast-cornerstone",a]),isEnabled:t,onToggle:i}),(0,d.jsx)(s.Slot,{name:"YoastAfterCornerstoneToggle"})]})}f.propTypes={isCornerstone:n().bool,onChange:n().func,learnMoreUrl:n().string.isRequired,location:n().string},f.defaultProps={isCornerstone:!0,onChange:()=>{},location:""};const b=window.wp.compose,v=window.wp.data,k=window.yoast.externals.contexts,_=window.wp.url,j=window.wp.apiFetch;var S=t.n(j);const C=window.yoast.relatedKeyphraseSuggestions;class E extends a.Component{constructor(e){super(e),this.onModalOpen=this.onModalOpen.bind(this),this.onLinkClick=this.onLinkClick.bind(this),this.listenToMessages=this.listenToMessages.bind(this)}onModalOpen(){const{keyphrase:e,onOpenWithNoKeyphrase:s,onOpen:t,location:r,newRequest:o,countryCode:i}=this.props;e.trim()?(t(r),o(i,e)):s()}onLinkClick(e){if(e.preventDefault(),!this.props.keyphrase.trim())return void this.props.onOpenWithNoKeyphrase();const s=e.target.href,t=["top="+(window.top.outerHeight/2+window.top.screenY-285),"left="+(window.top.outerWidth/2+window.top.screenX-170),"width=340","height=570","resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(s,"SEMrush_login",t.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.listenToMessages,!1)}async listenToMessages(e){const{data:s,source:t,origin:r}=e;"https://oauth.semrush.com"===r&&this.popup===t&&("semrush:oauth:success"===s.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),await this.performAuthenticationRequest(s)),"semrush:oauth:denied"===s.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),this.props.onAuthentication(!1)))}async performAuthenticationRequest(e){try{const s=new URL(e.url).searchParams.get("code"),t=await S()({path:"yoast/v1/semrush/authenticate",method:"POST",data:{code:s}});200===t.status?(this.props.onAuthentication(!0),this.onModalOpen(),this.popup.close()):console.error(t.error)}catch(e){console.error(e.message)}}render(){const{keyphrase:t,location:o,whichModalOpen:i,isLoggedIn:n,onClose:l,countryCode:c,learnMoreLink:p}=this.props,u=new URL("https://www.semrush.com/analytics/keywordoverview/");return u.searchParams.append("q",t),u.searchParams.append("db",c),(0,d.jsxs)(a.Fragment,{children:[n&&(0,d.jsx)("div",{className:"yoast",children:(0,d.jsx)(r.NewButton,{variant:"secondary",id:`yoast-get-related-keyphrases-${o}`,onClick:this.onModalOpen,children:(0,e.__)("Get related keyphrases","wordpress-seo")})}),(0,d.jsx)(C.Modal,{isOpen:Boolean(t)&&i===o,onClose:l,insightsLink:u.toString(),learnMoreLink:p,children:(0,d.jsx)(s.Slot,{name:"YoastRelatedKeyphrases"})}),!n&&(0,d.jsx)("div",{className:"yoast",children:(0,d.jsxs)(r.ButtonStyledLink,{variant:"secondary",id:`yoast-get-related-keyphrases-${o}`,href:"https://oauth.semrush.com/oauth2/authorize?ref=1513012826&client_id=yoast&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Fyoast%2Fsuccess&response_type=code&scope=user.id",onClick:this.onLinkClick,children:[(0,e.__)("Get related keyphrases","wordpress-seo"),(0,d.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,e.__)("(Opens in a new browser tab)","wordpress-seo")})]})})]})}}E.propTypes={keyphrase:n().string,location:n().string,whichModalOpen:n().oneOf(["none","metabox","sidebar"]),isLoggedIn:n().bool,onOpen:n().func.isRequired,onOpenWithNoKeyphrase:n().func.isRequired,onClose:n().func.isRequired,onAuthentication:n().func.isRequired,countryCode:n().string,learnMoreLink:n().string,newRequest:n().func.isRequired},E.defaultProps={keyphrase:"",location:"",whichModalOpen:"none",isLoggedIn:!1,countryCode:"en_US",learnMoreLink:""};const R=E,L=(0,b.compose)([(0,v.withSelect)((e=>{const{getSEMrushModalOpen:s,getSEMrushLoginStatus:t,getSEMrushSelectedCountry:r,getPreference:o,selectLinkParams:i,getFocusKeyphrase:n}=e("yoast-seo/editor");return{whichModalOpen:s(),isLoggedIn:t(),countryCode:r(),isRtl:o("isRtl",!1),learnMoreLink:(0,_.addQueryArgs)("https://yoa.st/3-v",i()),keyphrase:n()}})),(0,v.withDispatch)((e=>{const{setSEMrushNoKeyphraseMessage:s,setSEMrushOpenModal:t,setSEMrushDismissModal:r,setSEMrushLoginStatus:o,setSEMrushNewRequest:i}=e("yoast-seo/editor");return{onOpenWithNoKeyphrase:()=>{s()},onOpen:e=>{t(e)},onClose:()=>{r()},onAuthentication:e=>{o(e)},newRequest:(e,s)=>{i(e,s)}}}))])(R),M=window.yoast.styleGuide,N=(0,o.makeOutboundLink)(c().a`
	display: inline-block;
	position: relative;
	outline: none;
	text-decoration: none;
	border-radius: 100%;
	width: 24px;
	height: 24px;
	margin: -4px 0;
	vertical-align: middle;

	color: ${M.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${M.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${M.colors.$color_help_text};	
	}

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`),I=window.lodash,T=M.colors.$color_bad,P=M.colors.$palette_error_background,A=M.colors.$color_grey_text_light,O=M.colors.$palette_error_text,F=c().div`
	display: flex;
	flex-direction: column;
`,$=c().label`
	font-size: var(--yoast-font-size-default);
	font-weight: var(--yoast-font-weight-bold);
	${(0,o.getDirectionalStyle)("margin-right: 4px","margin-left: 4px")};
`,B=c().span`
	margin-bottom: 0.5em;
`,q=c()(r.InputField)`
	flex: 1 !important;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0; // Reset margins inherited from WordPress.

	// Hide native X in Edge and IE11.
	&::-ms-clear {
		display: none;
	}

	&.has-error {
		border-color: ${T} !important;
		background-color: ${P} !important;

		&:focus {
			box-shadow: 0 0 2px ${T} !important;
		}
	}
`,U=c().ul`
	color: ${O};
	list-style-type: disc;
	list-style-position: outside;
	margin: 0;
	margin-left: 1.2em;
`,W=c().li`
	color: ${O};
	margin: 0 0 0.5em 0;
`,H=(0,r.addFocusStyle)(c().button`
		border: 1px solid transparent;
		box-shadow: none;
		background: none;
		flex: 0 0 32px;
		height: 32px;
		max-width: 32px;
		padding: 0;
		cursor: pointer;
	`);H.propTypes={type:n().string,focusColor:n().string,focusBackgroundColor:n().string,focusBorderColor:n().string},H.defaultProps={type:"button",focusColor:M.colors.$color_button_text_hover,focusBackgroundColor:"transparent",focusBorderColor:M.colors.$color_blue};const D=c()(r.SvgIcon)`
	margin-top: 4px;
`,z=c().div`
	display: flex;
	flex-direction: row;
	align-items: center;

	&.has-remove-keyword-button {
		${q} {
			${(0,o.getDirectionalStyle)("padding-right: 40px","padding-left: 40px")};
		}

		${H} {
			${(0,o.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class K extends a.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){this.props.onChange(e.target.value)}renderLabel(){const{id:e,label:s,helpLink:t}=this.props;return(0,d.jsxs)(B,{children:[(0,d.jsx)($,{htmlFor:e,children:s}),t]})}renderErrorMessages(){const e=[...this.props.errorMessages];return!(0,I.isEmpty)(e)&&(0,d.jsx)(U,{children:e.map(((e,s)=>(0,d.jsx)(W,{children:(0,d.jsx)("span",{role:"alert",children:e})},s)))})}render(){const{id:e,showLabel:s,keyword:t,onRemoveKeyword:r,onBlurKeyword:o,onFocusKeyword:i,hasError:n}=this.props,a=!s,l=r!==I.noop;return(0,d.jsxs)(F,{children:[s&&this.renderLabel(),n&&this.renderErrorMessages(),(0,d.jsxs)(z,{className:l?"has-remove-keyword-button":null,children:[(0,d.jsx)(q,{"aria-label":a?this.props.label:null,type:"text",id:e,className:n?"has-error":null,onChange:this.handleChange,onFocus:i,onBlur:o,value:t,autoComplete:"off"}),l&&(0,d.jsx)(H,{onClick:r,focusBoxShadowColor:"#084A67",children:(0,d.jsx)(D,{size:"18px",icon:"times-circle",color:A})})]})]})}}K.propTypes={id:n().string.isRequired,showLabel:n().bool,keyword:n().string,onChange:n().func.isRequired,onRemoveKeyword:n().func,onBlurKeyword:n().func,onFocusKeyword:n().func,label:n().string.isRequired,helpLink:n().node,hasError:n().bool,errorMessages:n().arrayOf(n().string)},K.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:I.noop,onBlurKeyword:I.noop,onFocusKeyword:I.noop,helpLink:null,hasError:!1,errorMessages:[]};const G=K,Y=c().div`
	padding: 16px;
	/* Necessary to compensate negative top margin of the collapsible after the keyword input. */
	border-bottom: 1px solid transparent;
`;class V extends a.Component{constructor(e){super(e),this.validate=this.validate.bind(this)}static renderHelpLink(){return(0,d.jsx)(N,{href:wpseoAdminL10n["shortlinks.focus_keyword_info"],className:"dashicons",children:(0,d.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,e.__)("Help on choosing the perfect focus keyphrase","wordpress-seo")})})}validate(){const s=[...this.props.errors];return 0===this.props.keyword.trim().length&&this.props.displayNoKeyphraseMessage&&s.push((0,e.__)("Please enter a focus keyphrase first to get related keyphrases","wordpress-seo")),0===this.props.keyword.trim().length&&this.props.displayNoKeyphrasForTrackingMessage&&s.push((0,e.__)("Please enter a focus keyphrase first to track keyphrase performance","wordpress-seo")),this.props.keyword.includes(",")&&s.push((0,e.__)("Are you trying to use multiple keyphrases? You should add them separately below.","wordpress-seo")),this.props.keyword.length>191&&s.push((0,e.__)("Your keyphrase is too long. It can be a maximum of 191 characters.","wordpress-seo")),s}render(){const t=this.validate();return(0,d.jsx)(k.LocationConsumer,{children:r=>(0,d.jsxs)("div",{style:"sidebar"===r?{borderBottom:"1px solid #f0f0f0"}:{},children:[(0,d.jsxs)(Y,{location:r,children:[(0,d.jsx)(G,{id:`focus-keyword-input-${r}`,onChange:this.props.onFocusKeywordChange,keyword:this.props.keyword,label:(0,e.__)("Focus keyphrase","wordpress-seo"),helpLink:V.renderHelpLink(),onBlurKeyword:this.props.onBlurKeyword,onFocusKeyword:this.props.onFocusKeyword,hasError:t.length>0,errorMessages:t}),this.props.isSEMrushIntegrationActive&&(0,d.jsx)(L,{location:r,keyphrase:this.props.keyword})]}),(0,d.jsx)(s.Slot,{name:`YoastAfterKeywordInput${r.charAt(0).toUpperCase()+r.slice(1)}`})]})})}}V.propTypes={keyword:n().string,onFocusKeywordChange:n().func.isRequired,onFocusKeyword:n().func.isRequired,onBlurKeyword:n().func.isRequired,isSEMrushIntegrationActive:n().bool,displayNoKeyphraseMessage:n().bool,displayNoKeyphrasForTrackingMessage:n().bool,errors:n().arrayOf(n().string)},V.defaultProps={keyword:"",isSEMrushIntegrationActive:!1,displayNoKeyphraseMessage:!1,displayNoKeyphrasForTrackingMessage:!1,errors:[]};const Z=(0,b.compose)([(0,v.withSelect)((e=>{const{getFocusKeyphrase:s,getSEMrushNoKeyphraseMessage:t,hasWincherNoKeyphrase:r,getFocusKeyphraseErrors:o}=e("yoast-seo/editor");return{keyword:s(),displayNoKeyphraseMessage:t(),displayNoKeyphrasForTrackingMessage:r(),errors:o()}})),(0,v.withDispatch)((e=>{const{setFocusKeyword:s,setMarkerPauseStatus:t}=e("yoast-seo/editor");return{onFocusKeywordChange:s,onFocusKeyword:()=>t(!0),onBlurKeyword:()=>t(!1)}}))])(V);function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function J(e,s,t){return(s=function(e){var s=function(e,s){if("object"!=Q(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(s)?s:s+""}(s))in e?Object.defineProperty(e,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[s]=t,e}const X=window.yoast.analysis;function ee(e,s=""){const t=e.getIdentifier(),r={score:e.score,rating:X.interpreters.scoreToRating(e.score),hasMarks:e.hasMarks(),marker:e.getMarker(),id:t,text:e.text,markerId:s.length>0?`${s}:${t}`:t,hasBetaBadge:e.hasBetaBadge(),hasJumps:e.hasJumps(),hasAIFixes:e.hasAIFixes(),editFieldName:e.editFieldName};return"ok"===r.rating&&(r.rating="OK"),r}function se(e,s){switch(e.rating){case"error":s.errorsResults.push(e);break;case"feedback":s.considerationsResults.push(e);break;case"bad":s.problemsResults.push(e);break;case"OK":s.improvementsResults.push(e);break;case"good":s.goodResults.push(e)}return s}function te(e){switch(e){case"loading":return{icon:"loading-spinner",color:M.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:M.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:M.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:M.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:M.colors.$color_ok};default:return{icon:"seo-score-bad",color:M.colors.$color_red}}}function re(e,s=""){let t={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return t;for(let r=0;r<e.length;r++){const o=e[r];o.text&&(t=se(ee(o,s),t))}return t}function oe({target:e,children:s}){let t=e;return"string"==typeof e&&(t=document.getElementById(e)),t?(0,a.createPortal)(s,t):null}oe.propTypes={target:n().oneOfType([n().string,n().object]).isRequired,children:n().node.isRequired};const ie=({target:e,scoreIndicator:s})=>(0,d.jsx)(oe,{target:e,children:(0,d.jsx)(r.SvgIcon,{...te(s)})});ie.propTypes={target:n().string.isRequired,scoreIndicator:n().string.isRequired};const ne=ie,ae=window.yoast.analysisReport,le=window.yoast.uiLibrary,ce=window.React;var de=t.n(ce);const pe=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))})),ue=window.wp.hooks,he=(e,s)=>{try{return(0,a.createInterpolateElement)(e,s)}catch(s){return console.error("Error in translation for:",e,s),e}};var me,ge;function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ye.apply(this,arguments)}const xe=e=>ce.createElement("svg",ye({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),me||(me=ce.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),ge||(ge=ce.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"}))),we=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))})),fe=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))})),be=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))}));var ve=t(4184),ke=t.n(ve);const _e="yoast-seo/editor",je=({isOpen:s,onClose:t,id:r,upsellLink:o,title:i="",description:n="",benefits:a=[],note:l="",ctbId:c="",modalTitle:p})=>{const u=(0,v.select)(_e).isPromotionActive("black-friday-promotion"),h=(0,v.select)(_e).getIsWooCommerceActive();return(0,d.jsx)(le.Modal,{isOpen:s,onClose:t,id:r,children:(0,d.jsx)(le.Modal.Panel,{className:"yst-max-w-[26.25rem] yst-p-0",hasCloseButton:!1,children:(0,d.jsxs)(le.Modal.Container,{children:[(0,d.jsxs)(le.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-4 yst-items-center",children:[h?(0,d.jsx)(be,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,d.jsx)(xe,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,d.jsx)(le.Modal.Title,{as:"h3",className:ke()(h?"yst-text-woo-light":"yst-text-primary-500","yst-text-xl"),children:p}),(0,d.jsx)(le.Modal.CloseButton,{className:"yst-top-2",onClick:t,screenReaderText:(0,e.__)("Close modal","wordpress-seo")})]}),(0,d.jsxs)(le.Modal.Container.Content,{className:"yst-p-0",children:[u&&(0,d.jsx)("div",{className:"yst-flex yst-font-semibold yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6",children:(0,d.jsx)("div",{className:"yst-mx-auto",children:(0,e.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,d.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,d.jsx)(le.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-normal",children:i}),(0,d.jsx)("p",{className:"yst-mb-2",children:n}),a.length>0&&(0,d.jsx)("ul",{className:"yst-my-2",children:a.map(((e,s)=>(0,d.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,d.jsx)(we,{className:"yst-w-5 yst-h-5 yst--ms-1 yst-shrink-0 yst-inline yst-text-green-600"}),(0,d.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${r}-upsell-benefit-${s}`)))}),(0,d.jsxs)("div",{className:"yst-text-center",children:[(0,d.jsxs)(le.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5",href:o,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":c,children:[(0,d.jsx)(fe,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,e.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
(0,e.__)("Explore %s","wordpress-seo"),h?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,d.jsx)("span",{className:"yst-sr-only",children:(0,e.__)("Opens in a new tab","wordpress-seo")})]}),(0,d.jsx)("div",{children:l})]})]})]})]})})})},Se=({isOpen:s,closeModal:t,id:r,upsellLink:o})=>{const{locationContext:i}=(0,k.useRootContext)(),n=(0,_.addQueryArgs)(wpseoAdminL10n[o],{context:i}),a=[he((0,e.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,e.__)("%1$sKeyphrase distribution:%2$s See if your keywords are spread evenly so search engines understand your topic","wordpress-seo"),"<span>","</span>"),{span:(0,d.jsx)("span",{className:"yst-font-semibold"})}),he((0,e.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,e.__)("%1$sTitle check:%2$s Instantly spot missing titles and fix them for better click-through rates","wordpress-seo"),"<span>","</span>"),{span:(0,d.jsx)("span",{className:"yst-font-semibold"})}),he((0,e.sprintf)(/* translators: %1$s and %2$s are opening and closing span tags. */
(0,e.__)("%1$sSynonyms:%2$s Include synonyms of your keyphrase for a more natural flow and smarter suggestions","wordpress-seo"),"<span>","</span>"),{span:(0,d.jsx)("span",{className:"yst-font-semibold"})})];return(0,d.jsx)(je,{isOpen:s,onClose:t,id:r,title:(0,e.__)("Get deeper keyphrase insights and stronger headlines","wordpress-seo"),upsellLink:n,benefits:a,note:(0,e.__)("Upgrade to optimize with precision","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",modalTitle:(0,e.sprintf)(/* translators: %1$s is for Premium SEO analysis. */
(0,e.__)("Unlock %1$s","wordpress-seo"),"Premium SEO analysis")})};Se.propTypes={isOpen:n().bool.isRequired,closeModal:n().func.isRequired,id:n().string.isRequired,upsellLink:n().string.isRequired};class Ce extends a.Component{constructor(e){super(e);const s=this.props.results;this.state={mappedResults:{}},null!==s&&(this.state={mappedResults:re(s,this.props.keywordKey)}),this.handleMarkButtonClick=this.handleMarkButtonClick.bind(this),this.handleEditButtonClick=this.handleEditButtonClick.bind(this),this.handleResultsChange=this.handleResultsChange.bind(this),this.renderHighlightingUpsell=this.renderHighlightingUpsell.bind(this),this.createMarkButton=this.createMarkButton.bind(this)}componentDidUpdate(e){null!==this.props.results&&this.props.results!==e.results&&this.setState({mappedResults:re(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:e,id:s,className:t,status:o,onClick:i,isPressed:n}){return(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)(r.IconButtonToggle,{marksButtonStatus:o,className:t,onClick:i,id:s,icon:"eye",pressed:n,ariaLabel:e}),this.props.shouldUpsellHighlighting&&(0,d.jsx)("div",{className:"yst-root",children:(0,d.jsx)(le.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--end-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell",children:(0,d.jsx)(pe,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",role:"img","aria-hidden":!0,focusable:!1})})})]})}deactivateMarker(){this.props.setActiveMarker(null),this.props.setMarkerPauseStatus(!1),this.removeMarkers()}activateMarker(e,s){this.props.setActiveMarker(e),s()}handleMarkButtonClick(e,s){const t=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;this.props.activeAIFixesButton&&this.props.setActiveAIFixesButton(null),t===this.props.activeMarker?this.deactivateMarker():this.activateMarker(t,s)}handleResultsChange(e,s,t){const r=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;r===this.props.activeMarker&&(t?(0,I.isUndefined)(s)||this.activateMarker(r,s):this.deactivateMarker())}focusOnKeyphraseField(e){const s=this.props.keywordKey,t=""===s?"focus-keyword-input-"+e:"yoast-keyword-input-"+s+"-"+e,r=document.getElementById(t);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}focusOnGooglePreviewField(e,s){let t;t="metaDescriptionKeyword"===e||"metaDescriptionLength"===e?"description":"titleWidth"===e||"keyphraseInSEOTitle"===e?"title":"slug";const r=document.getElementById("yoast-google-preview-"+t+"-"+s);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}handleEditButtonClick(e){const s=this.props.location;"functionWordsInKeyphrase"!==e&&"keyphraseLength"!==e?(["metaDescriptionKeyword","metaDescriptionLength","titleWidth","keyphraseInSEOTitle","slugKeyword"].includes(e)&&this.handleGooglePreviewFocus(s,e),(0,ue.doAction)("yoast.focus.input",e)):this.focusOnKeyphraseField(s)}handleGooglePreviewFocus(e,s){if("sidebar"===e)document.getElementById("yoast-search-appearance-modal-open-button").click(),setTimeout((()=>this.focusOnGooglePreviewField(s,"modal")),500);else{const t=document.getElementById("yoast-snippet-editor-metabox");t&&"false"===t.getAttribute("aria-expanded")?(t.click(),setTimeout((()=>this.focusOnGooglePreviewField(s,e)),100)):this.focusOnGooglePreviewField(s,e)}}removeMarkers(){window.YoastSEO.analysis.applyMarks(new X.Paper("",{}),[])}renderHighlightingUpsell(s,t){const r=(0,e.__)("Highlight areas of improvement in your text, no more searching for a needle in a haystack, straight to optimizing! Now also in Elementor!","wordpress-seo");return(0,d.jsx)(Se,{isOpen:s,closeModal:t,id:"yoast-premium-seo-analysis-highlighting-modal",upsellLink:this.props.highlightingUpsellLink,description:r})}render(){const{mappedResults:s}=this.state,{errorsResults:t,improvementsResults:r,goodResults:o,considerationsResults:i,problemsResults:n}=s,{upsellResults:l,resultCategoryLabels:c}=this.props,p={errors:(0,e.__)("Errors","wordpress-seo"),problems:(0,e.__)("Problems","wordpress-seo"),improvements:(0,e.__)("Improvements","wordpress-seo"),considerations:(0,e.__)("Considerations","wordpress-seo"),goodResults:(0,e.__)("Good results","wordpress-seo")},u=Object.assign(p,c);let h=this.props.marksButtonStatus;return"enabled"===h&&this.props.shortcodesForParsing.length>0&&(h="disabled"),(0,d.jsx)(a.Fragment,{children:(0,d.jsx)(ae.ContentAnalysis,{errorsResults:t,problemsResults:n,upsellResults:l,improvementsResults:r,considerationsResults:i,goodResults:o,activeMarker:this.props.activeMarker,onMarkButtonClick:this.handleMarkButtonClick,onEditButtonClick:this.handleEditButtonClick,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,marksButtonStatus:h,headingLevel:3,keywordKey:this.props.keywordKey,isPremium:this.props.isPremium,resultCategoryLabels:u,onResultChange:this.handleResultsChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.props.renderAIOptimizeButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton})})}}Ce.propTypes={results:n().array,upsellResults:n().array,marksButtonClassName:n().string,editButtonClassName:n().string,marksButtonStatus:n().oneOf(["enabled","disabled","hidden"]),setActiveMarker:n().func.isRequired,setMarkerPauseStatus:n().func.isRequired,setActiveAIFixesButton:n().func.isRequired,activeMarker:n().string,activeAIFixesButton:n().string,keywordKey:n().string,location:n().string,isPremium:n().bool,resultCategoryLabels:n().shape({errors:n().string,problems:n().string,improvements:n().string,considerations:n().string,goodResults:n().string}),shortcodesForParsing:n().array,shouldUpsellHighlighting:n().bool,highlightingUpsellLink:n().string,renderAIOptimizeButton:n().func},Ce.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIOptimizeButton:()=>{}};const Ee=Ce,Re=(0,b.compose)([(0,v.withSelect)((e=>{const{getActiveMarker:s,getIsPremium:t,getShortcodesForParsing:r,getActiveAIFixesButton:o}=e("yoast-seo/editor");return{activeMarker:s(),isPremium:t(),shortcodesForParsing:r(),activeAIFixesButton:o()}})),(0,v.withDispatch)((e=>{const{setActiveMarker:s,setMarkerPauseStatus:t,setActiveAIFixesButton:r}=e("yoast-seo/editor");return{setActiveMarker:s,setMarkerPauseStatus:t,setActiveAIFixesButton:r}}))])(Ee);function Le(s){return(0,I.isNil)(s)||(s/=10),function(s){switch(s){case"feedback":return{className:"na",screenReaderText:(0,e.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,e.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,e.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,e.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,e.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,e.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,e.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,e.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,e.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,e.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,e.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,e.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(X.interpreters.scoreToRating(s))}function Me({target:e,children:s}){return(0,d.jsx)(oe,{target:e,children:s})}function Ne(){return(0,I.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}Me.propTypes={target:n().string.isRequired,children:n().node.isRequired};const Ie="yoast-seo/ai-generator",Te="yoast-seo/editor",Pe="google",Ae="social",Oe="twitter",Fe="title",$e="description",Be="post",qe="term",Ue={post:"title",term:"term_title"},We=(0,I.mapValues)(Ue,(e=>`%%${e}%%`)),He={mobile:"mobile",desktop:"desktop"},De={idle:"idle",loading:"loading",success:"success",error:"error"},ze="success",Ke="error",Ge="abort";window.wp.sanitize;const{stripHTMLTags:Ye}=o.strings;let Ve,Ze=!1;const Qe=["_formal","_informal","_ao90"],Je=e=>{for(const s of Qe)if(e.endsWith(s))return e.slice(0,-s.length);return e},Xe="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。｡！‼？⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽｛｝｜～｟｠｢｣､［］･￥＄％＠＆＇（）＊／：；＜＞＼\\<>";Xe.split(""),new RegExp("^["+Xe+"]+"),new RegExp("["+Xe+"]+$");new RegExp("["+Xe+"#$%&*+/=@^`{|}~ -¿–-⁊ -⁯₠-⃀]","g");const es=e=>{const s={...e};return""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(s.value="%%"+e.name+"%%"),s.badge=`<badge>${e.label}</badge>`,s},ss=()=>{const e=(0,v.useSelect)((e=>e(Te).getReplaceVars()),[]),s=(0,a.useMemo)((()=>e.map(es)),[e]);return(0,a.useCallback)(((e,{key:t="value",overrides:r={},applyPluggable:o=!0,editType:i=Fe,contentType:n=Be}={})=>{for(const o of s)e=e.replace(new RegExp("%%"+(0,I.escapeRegExp)(o.name)+"%%","g"),(0,I.get)(r,o.name,o[t]));return n===qe&&(e=e.replace(" Archives","")),o?((e,s=Fe)=>{const t=function(e){const s=(0,I.get)(window,["YoastSEO","app","pluggable"],!1);if(!s||!(0,I.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const s=(0,I.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],I.identity);return{url:e.url,title:Ye(s(e.title)),description:Ye(s(e.description)),filteredSEOTitle:e.filteredSEOTitle?Ye(s(e.filteredSEOTitle)):""}}(e);const t=s._applyModifications.bind(s);return{url:e.url,title:Ye(t("data_page_title",e.title)),description:Ye(t("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?Ye(t("data_page_title",e.filteredSEOTitle)):""}}({title:"",description:"",[s]:X.languageProcessing.stripSpaces(e)});return(0,I.get)(t,s,e)})(e,i):e}),[s])},ts={editType:Fe,previewType:Pe,postType:"post",contentType:Be},rs=(0,a.createContext)(ts),os=(rs.Provider,()=>(0,a.useContext)(rs)),is=()=>(0,a.useContext)(k.LocationContext),ns=e=>{const s=(0,a.useRef)(null);return(0,a.useCallback)((t=>{(0,I.attempt)((()=>s.current&&s.current.disconnect())),null!==t&&(s.current=new ResizeObserver((s=>{(0,I.forEach)(s,(s=>e(s)))})),s.current.observe(t))}),[e])},as=(ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))})),window.yoast.aiFrontend,"error"),ls="loading",cs="showPlay",ds="askPermission",ps="isPlaying",us=window.yoast.reduxJsToolkit,hs="usageCount",ms="fetchUsageCount",gs=`${ms}/success`,ys={errorCode:null,errorIdentifier:null,errorMessage:null},xs=(0,us.createSlice)({name:hs,initialState:{status:"idle",count:0,limit:10,endpoint:"yoast/v1/ai_generator/get_usage",error:ys},reducers:{addUsageCount:(e,{payload:s=1})=>{e.count+=s},setUsageCount:(e,{payload:s})=>{e.count=s},setUsageCountEndpoint:(e,{payload:s})=>{e.endpoint=s},setUsageCountLimit:(e,{payload:s})=>{e.limit=s}},extraReducers:e=>{e.addCase(`${ms}/request`,(e=>{e.status=ls,e.error=ys})),e.addCase(gs,((e,{payload:s})=>{e.status="success",e.count=s.count,e.limit=s.limit,e.error=ys})),e.addCase(`${ms}/${as}`,((e,{payload:s})=>{e.status="error",e.error={errorCode:502,...s}}))}}),ws=(xs.getInitialState,{selectUsageCountStatus:e=>(0,I.get)(e,[hs,"status"],xs.getInitialState()),selectUsageCount:e=>(0,I.get)(e,[hs,"count"],xs.getInitialState().count),selectUsageCountLimit:e=>(0,I.get)(e,[hs,"limit"],xs.getInitialState().limit),selectUsageCountEndpoint:e=>(0,I.get)(e,[hs,"endpoint"],xs.getInitialState().endpoint),selectUsageCountError:e=>(0,I.get)(e,[hs,"error"],xs.getInitialState().error)});ws.selectUsageCountRemaining=(0,us.createSelector)([ws.selectUsageCount,ws.selectUsageCountLimit],((e,s)=>Math.max(s-e,0))),ws.isUsageCountLimitReached=(0,us.createSelector)([ws.selectUsageCount,ws.selectUsageCountLimit,ws.selectUsageCountError],((e,s,t)=>429===t.errorCode||e>=s)),xs.actions,xs.reducer;n().string.isRequired;const fs=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),bs=({learnMoreLink:s,thumbnail:t,wistiaEmbedPermission:r,upsellLink:o,upsellLabel:i,newToText:n,ctbId:a})=>{const{onClose:l,initialFocus:c}=(0,le.useModalContext)(),p={a:(0,d.jsx)(Fs,{href:s,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,d.jsx)(fs,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,d.jsx)("br",{})};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:[(0,d.jsxs)("div",{className:"yst-relative yst-w-full",children:[(0,d.jsx)(yt,{videoId:"vun9z1dpfh",thumbnail:t,wistiaEmbedPermission:r}),(0,d.jsx)(le.Badge,{className:"yst-absolute yst-end-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"},children:(0,e.__)("Beta","wordpress-seo")})]}),(0,d.jsx)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center",children:(0,d.jsxs)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center",children:[(0,d.jsx)("span",{className:"yst-logo-icon"}),n]})})]}),(0,d.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,d.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,d.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,e.sprintf)(/* translators: %s: Expands to "Yoast AI" */
(0,e.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")}),(0,d.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:he((0,e.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */
(0,e.__)("Make content editing a breeze! Optimize your SEO content with quick, actionable suggestions at the click of a button.%1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),p)})]}),(0,d.jsx)("div",{className:"yst-w-full yst-flex yst-mt-6",children:(0,d.jsxs)(le.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:o,target:"_blank",ref:c,"data-action":"load-nfd-ctb","data-ctb-id":a,children:[(0,d.jsx)(fe,{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),i,(0,d.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,e.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,d.jsx)(le.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:l,children:(0,e.__)("Close","wordpress-seo")})]})]})};bs.propTypes={learnMoreLink:n().string.isRequired,upsellLink:n().string.isRequired,thumbnail:n().shape({src:n().string.isRequired,width:n().string,height:n().string}).isRequired,wistiaEmbedPermission:n().shape({value:n().bool.isRequired,status:n().string.isRequired,set:n().func.isRequired}).isRequired,upsellLabel:n().string,newToText:n().string,ctbId:n().string},bs.defaultProps={upsellLabel:(0,e.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,e.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"};const vs=({handleRefreshClick:s,supportLink:t})=>(0,d.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,d.jsx)(le.Button,{onClick:s,children:(0,e.__)("Refresh this page","wordpress-seo")}),(0,d.jsx)(le.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,e.__)("Contact support","wordpress-seo")})]});vs.propTypes={handleRefreshClick:n().func.isRequired,supportLink:n().string.isRequired};const ks=({handleRefreshClick:s,supportLink:t})=>(0,d.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,d.jsx)(le.Button,{className:"yst-order-last",onClick:s,children:(0,e.__)("Refresh this page","wordpress-seo")}),(0,d.jsx)(le.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,e.__)("Contact support","wordpress-seo")})]});ks.propTypes={handleRefreshClick:n().func.isRequired,supportLink:n().string.isRequired};const _s=({error:s,children:t})=>(0,d.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,d.jsx)(le.Title,{children:(0,e.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,d.jsx)("p",{children:(0,e.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,d.jsx)(le.Alert,{variant:"error",children:(null==s?void 0:s.message)||(0,e.__)("Undefined error message.","wordpress-seo")}),(0,d.jsx)("p",{children:(0,e.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")}),t]});_s.propTypes={error:n().object.isRequired,children:n().node},_s.VerticalButtons=ks,_s.HorizontalButtons=vs;var js;function Ss(){return Ss=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ss.apply(this,arguments)}n().string,n().node.isRequired,n().node.isRequired,n().node,n().oneOf(Object.keys({lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}));const Cs=e=>ce.createElement("svg",Ss({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},e),js||(js=ce.createElement("path",{fill:"#fff",d:"M500 0C223.9 0 0 223.9 0 500s223.9 500 500 500 500-223.9 500-500S776.1 0 500 0Zm87.2 412.4c0-21.9 4.3-40.2 13.1-54.4s24-27.1 45.9-38.2l10.1-4.9c17.8-9 22.4-16.7 22.4-26 0-11.1-9.5-19.1-25-19.1-18.3 0-32.2 9.5-41.8 28.9l-24.7-24.8c5.4-11.6 14.1-20.9 25.8-28.1a70.8 70.8 0 0 1 38.9-11.1c17.8 0 33.3 4.6 45.9 14.2s19.4 22.7 19.4 39.4c0 26.6-15 42.9-43.1 57.3l-15.7 8c-16.8 8.5-25.1 16-27.4 29.4h85.4v35.4H587.2Zm-82.1 373.3c-157.8 0-285.7-127.9-285.7-285.7s127.9-285.7 285.7-285.7a286.4 286.4 0 0 1 55.9 5.5l-55.9 116.9c-90 0-163.3 73.3-163.3 163.3s73.3 163.3 163.3 163.3a162.8 162.8 0 0 0 106.4-39.6l61.8 107.2a283.9 283.9 0 0 1-168.2 54.8ZM705 704.1l-70.7-122.5H492.9l70.7-122.4H705l70.7 122.4Z"}))),Es=window.ReactDOM;var Rs,Ls,Ms;(Ls=Rs||(Rs={})).Pop="POP",Ls.Push="PUSH",Ls.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Ms||(Ms={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const Ns=["post","put","patch","delete"],Is=(new Set(Ns),["get",...Ns]);new Set(Is),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),ce.Component,ce.startTransition,new Promise((()=>{})),ce.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var Ts,Ps,As,Os;new Map,ce.startTransition,Es.flushSync,ce.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(Os=Ts||(Ts={})).UseScrollRestoration="useScrollRestoration",Os.UseSubmit="useSubmit",Os.UseSubmitFetcher="useSubmitFetcher",Os.UseFetcher="useFetcher",Os.useViewTransitionState="useViewTransitionState",(As=Ps||(Ps={})).UseFetcher="useFetcher",As.UseFetchers="useFetchers",As.UseScrollRestoration="useScrollRestoration",n().string.isRequired,n().string;const Fs=({href:s,children:t,...r})=>(0,d.jsxs)(le.Link,{target:"_blank",rel:"noopener noreferrer",...r,href:s,children:[t,(0,d.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,e.__)("(Opens in a new browser tab)","wordpress-seo")})]});Fs.propTypes={href:n().string.isRequired,children:n().node},Fs.defaultProps={children:null};const $s=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))})),Bs=[(0,e.__)("AI tools included","wordpress-seo"),(0,e.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */
(0,e.__)("%1$s access","wordpress-seo"),"Yoast SEO academy"),(0,e.__)("24/7 support","wordpress-seo")],qs=[(0,e.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,e.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,e.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,e.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,e.__)("Internal links and redirect management, easy","wordpress-seo"),(0,e.__)("Access to friendly help when you need it, day or night","wordpress-seo")],Us=(e=!1)=>e?Bs:qs,Ws=(s=!1)=>{if(s)return Bs;const t=[...qs];return t[1]=(0,e.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t};var Hs,Ds,zs;function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ks.apply(this,arguments)}const Gs=e=>ce.createElement("svg",Ks({xmlns:"http://www.w3.org/2000/svg",id:"star-rating-half_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),Hs||(Hs=ce.createElement("defs",null,ce.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),Ds||(Ds=ce.createElement("path",{d:"M250 392.04 98.15 471.87l29-169.09L4.3 183.03l169.77-24.67L250 4.52l75.93 153.84 169.77 24.67-122.85 119.75 29 169.09L250 392.04z",className:"star-rating-half_svg__cls-1"})),zs||(zs=ce.createElement("path",{d:"m250 9.04 73.67 149.27.93 1.88 2.08.3 164.72 23.94-119.19 116.19-1.51 1.47.36 2.07 28.14 164.06-147.34-77.46-1.86-1-1.86 1-147.34 77.46 28.14-164.06.36-2.07-1.51-1.47L8.6 184.43l164.72-23.9 2.08-.3.93-1.88L250 9.04m0-9-77.25 156.49L0 181.64l125 121.89-29.51 172L250 394.3l154.51 81.23-29.51-172 125-121.89-172.75-25.11L250 0Z",className:"star-rating-half_svg__cls-1"})),ce.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ys.apply(this,arguments)}const Vs=e=>ce.createElement("svg",Ys({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},e),ce.createElement("path",{d:"m250 0 77.25 156.53L500 181.64 375 303.48l29.51 172.05L250 394.3 95.49 475.53 125 303.48 0 181.64l172.75-25.11L250 0z",style:{fill:"#fbbf24"}}));var Zs,Qs,Js;function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Xs.apply(this,arguments)}const et=e=>ce.createElement("svg",Xs({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),Zs||(Zs=ce.createElement("g",{clipPath:"url(#yoast-premium-logo-new_svg__a)"},ce.createElement("path",{fill:"url(#yoast-premium-logo-new_svg__b)",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),ce.createElement("path",{fill:"#6C2548",d:"m56.016.125-36.06 63.75H64v-53.76c0-4.88-3.414-8.96-7.984-9.987",opacity:.35}),ce.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),ce.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ce.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ce.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),ce.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),ce.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),ce.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),ce.createElement("path",{fill:"#CD82AB",d:"M57.402 58.086H43.888v1.197h13.514v-1.197ZM53.75 53.366l-3.103-5.76v.004l-.004-.004-3.104 5.76-4.777-3.42 1.126 7.702h13.514l1.126-7.702-4.777 3.42Z"}))),Qs||(Qs=ce.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),Js||(Js=ce.createElement("defs",null,ce.createElement("linearGradient",{id:"yoast-premium-logo-new_svg__b",x1:-2.912,x2:68.509,y1:25.843,y2:38.438,gradientUnits:"userSpaceOnUse"},ce.createElement("stop",{stopColor:"#5D237A"}),ce.createElement("stop",{offset:.08,stopColor:"#702175"}),ce.createElement("stop",{offset:.22,stopColor:"#872070"}),ce.createElement("stop",{offset:.36,stopColor:"#981E6C"}),ce.createElement("stop",{offset:.51,stopColor:"#A21E69"}),ce.createElement("stop",{offset:.7,stopColor:"#A61E69"})),ce.createElement("clipPath",{id:"yoast-premium-logo-new_svg__a"},ce.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"})))));var st,tt,rt;function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ot.apply(this,arguments)}const it=e=>ce.createElement("svg",ot({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},e),st||(st=ce.createElement("g",{clipPath:"url(#woo-seo-logo-new_svg__a)"},ce.createElement("path",{fill:"#0E1E65",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),ce.createElement("path",{fill:"#0075B3",d:"M56.016.253 19.956 64H64V10.24c0-4.88-3.414-8.96-7.984-9.987Z"}),ce.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),ce.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ce.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),ce.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),ce.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),ce.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),ce.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),ce.createElement("path",{fill:"#A1CCE3",d:"M58.102 46.806a1.26 1.26 0 0 0-1.219.938l-.157.582a40.97 40.97 0 0 0-10.857 1.261c-.013 0-.023.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.86c.083.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.011h10.592a.507.507 0 0 0 .506-.505c0-1.149-.775-2.15-1.888-2.442L57.862 48a.25.25 0 0 1 .243-.186h.932a.507.507 0 0 0 0-1.01h-.931l-.004.002ZM57.018 59.92a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),tt||(tt=ce.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),rt||(rt=ce.createElement("defs",null,ce.createElement("clipPath",{id:"woo-seo-logo-new_svg__a"},ce.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"}))))),nt=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))})),at=({link:s,linkProps:t,isPromotionActive:r,isWooCommerceActive:o})=>{const i=o?Ws:Us,n=(0,a.useMemo)((()=>o?(0,e.__)("SEO that scales with your product catalog.","wordpress-seo"):(0,e.__)("Now with Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")),[o]);let l=(0,e.__)("Buy now","wordpress-seo");const c=he(o?(0,e.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,e.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast WooCommerce SEO"):(0,e.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,e.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,d.jsx)("span",{className:"yst-whitespace-nowrap"})}),p=r("black-friday-promotion");return p&&(l=(0,e.__)("Buy now for 30% off","wordpress-seo")),(0,d.jsxs)("div",{className:ke()("yst-p-6 yst-rounded-lg yst-text-white  yst-shadow",o?"yst-bg-woo-dark":"yst-bg-primary-500"),children:[(0,d.jsx)("figure",{className:"yst-logo-square yst-w-16 yst-h-16 yst-mx-auto yst-overflow-hidden yst-relative yst-z-10 yst-mt-[-2.6rem]",children:o?(0,d.jsx)(it,{}):(0,d.jsx)(et,{})}),p&&(0,d.jsx)("div",{className:"sidebar__sale_banner_container",children:(0,d.jsx)("div",{className:"sidebar__sale_banner",children:(0,d.jsx)("span",{className:"banner_text",children:(0,e.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})})}),(0,d.jsx)(le.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white",children:c}),(0,d.jsx)("p",{className:"yst-mt-2 yst-font-medium",children:n}),(0,d.jsx)("ul",{className:"yst-ps-[1em] yst-list-outside yst-text-white yst-mt-2",children:i(!0).map(((e,s)=>(0,d.jsxs)("li",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,d.jsx)(nt,{className:"yst-w-4 yst-h-4 yst-text-green-400"}),(0,d.jsx)("span",{children:e})]},`upsell-benefit-${s}`)))}),(0,d.jsxs)(le.Button,{as:"a",variant:"upsell",href:s,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...t,children:[(0,d.jsx)("span",{children:l}),(0,d.jsx)($s,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]}),(0,d.jsx)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-italic yst-mt-2",children:(0,e.__)("30-day money back guarantee","wordpress-seo")}),(0,d.jsx)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,d.jsx)("a",{className:"yst-block yst-mt-4 yst-no-underline",href:"https://www.g2.com/products/yoast-yoast/reviews",target:"_blank",rel:"noopener noreferrer",children:(0,d.jsxs)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center",children:[(0,d.jsx)(Cs,{className:"yst-w-5 yst-h-5"}),(0,d.jsxs)("span",{className:"yst-flex yst-gap-1",children:[(0,d.jsx)(Vs,{className:"yst-w-5 yst-h-5"}),(0,d.jsx)(Vs,{className:"yst-w-5 yst-h-5"}),(0,d.jsx)(Vs,{className:"yst-w-5 yst-h-5"}),(0,d.jsx)(Vs,{className:"yst-w-5 yst-h-5"}),(0,d.jsx)(Gs,{className:"yst-w-5 yst-h-5"})]}),(0,d.jsx)("span",{className:"yst-text-sm yst-font-semibold yst-text-white",children:"4.6 / 5"})]})})]})};var lt;function ct(){return ct=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ct.apply(this,arguments)}at.propTypes={link:n().string.isRequired,linkProps:n().object,isPromotionActive:n().func},at.defaultProps={linkProps:{},isPromotionActive:I.noop};const dt=e=>ce.createElement("svg",ct({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),lt||(lt=ce.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74Z"})));var pt;function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ut.apply(this,arguments)}const ht=e=>ce.createElement("svg",ut({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),pt||(pt=ce.createElement("path",{fill:"#0075B3",d:"M12.613.445a1.26 1.26 0 0 0-1.22.937l-.156.583A40.97 40.97 0 0 0 .379 3.225c-.013 0-.022.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.861c.084.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.01h10.592a.507.507 0 0 0 .506-.505c0-1.149-.774-2.15-1.888-2.441l1.722-6.452a.25.25 0 0 1 .243-.185h.931a.507.507 0 0 0 0-1.011h-.931l-.003.003Zm-1.085 13.114a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),mt=({premiumLink:s,premiumUpsellConfig:t,isPromotionActive:r,isWooCommerceActive:o})=>{const i=r("black-friday-promotion"),n=o?Ws:Us;let a=o?(0,e.sprintf)(/* translators: %s expands to "Yoast WooCommerce SEO" */
(0,e.__)("Explore %s now!","wordpress-seo"),"Yoast WooCommerce SEO"):(0,e.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,e.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium");return i&&(a=(0,e.__)("Get 30% off now!","wordpress-seo")),(0,d.jsxs)(le.Paper,{as:"div",className:"xl:yst-max-w-3xl",children:[i&&(0,d.jsxs)("div",{className:"yst-rounded-t-lg yst-h-9 yst-flex yst-justify-between yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-medium",children:[(0,d.jsx)("div",{children:(0,e.__)("30% OFF","wordpress-seo")}),(0,d.jsx)("div",{children:(0,e.__)("BLACK FRIDAY","wordpress-seo")})]}),(0,d.jsxs)("div",{className:"yst-p-6 yst-flex yst-flex-col",children:[(0,d.jsx)("div",{className:"yst-flex yst-items-center",children:o?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(le.Title,{as:"h2",size:"4",className:"yst-text-xl "+(o?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,e.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,e.__)("Upgrade to %s","wordpress-seo"),"Yoast WooCommerce SEO")}),(0,d.jsx)(ht,{className:"yst-ml-2 yst-w-4 yst-h-3"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(le.Title,{as:"h2",size:"4",className:"yst-text-xl "+(o?"yst-text-woo-light":"yst-text-primary-500 "),children:(0,e.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,e.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")}),(0,d.jsx)(dt,{className:"yst-ml-2 yst-w-4 yst-h-3"})]})}),(0,d.jsx)("span",{className:"yst-font-medium yst-text-slate-500 yst-text-xs yst-leading-5 yst-uppercase yst-mt-2",children:(0,e.__)("Now includes Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")}),(0,d.jsx)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-none yst-list-outside yst-text-slate-600 yst-mt-6",children:n().map(((e,s)=>(0,d.jsxs)("li",{children:[(0,d.jsx)("span",{className:"yst-mx-2",children:"•"}),e]},`upsell-benefit-${s}`)))}),(0,d.jsxs)(le.Button,{as:"a",variant:"upsell",size:"extra-large",href:s,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...t,children:[a,(0,d.jsx)($s,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})]})]})]})};mt.propTypes={premiumLink:n().string.isRequired,premiumUpsellConfig:n().object,isPromotionActive:n().func,isWooCommerceActive:n().bool.isRequired},mt.defaultProps={premiumUpsellConfig:{},isPromotionActive:I.noop},n().string.isRequired,n().object.isRequired,n().string.isRequired,n().func.isRequired,n().bool.isRequired,ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))})),n().bool.isRequired,n().func,n().func,n().string.isRequired,n().string.isRequired,n().string.isRequired,n().string.isRequired;const gt=window.yoast.reactHelmet,yt=({videoId:s,thumbnail:t,wistiaEmbedPermission:r})=>{const[o,i]=(0,a.useState)(r.value?ps:cs),n=(0,a.useCallback)((()=>i(ps)),[i]),l=(0,a.useCallback)((()=>{r.value?n():i(ds)}),[r.value,n,i]),c=(0,a.useCallback)((()=>i(cs)),[i]),p=(0,a.useCallback)((()=>{r.set(!0),n()}),[r.set,n]);return(0,d.jsxs)(d.Fragment,{children:[r.value&&(0,d.jsx)(gt.Helmet,{children:(0,d.jsx)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})}),(0,d.jsxs)("div",{className:"yst-relative yst-w-full yst-h-0 yst-pt-[56.25%] yst-overflow-hidden yst-rounded-md yst-drop-shadow-md yst-bg-white",children:[o===cs&&(0,d.jsx)("button",{type:"button",className:"yst-absolute yst-inset-0 yst-button yst-p-0 yst-border-none yst-bg-white yst-transition-opacity yst-duration-1000 yst-opacity-100",onClick:l,children:(0,d.jsx)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...t})}),o===ds&&(0,d.jsxs)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white",children:[(0,d.jsxs)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center",children:[r.status===ls&&(0,d.jsx)(le.Spinner,{}),r.status!==ls&&(0,e.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,e.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")]}),(0,d.jsxs)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4",children:[(0,d.jsx)(le.Button,{type:"button",variant:"secondary",onClick:c,disabled:r.status===ls,children:(0,e.__)("Deny","wordpress-seo")}),(0,d.jsx)(le.Button,{type:"button",variant:"primary",onClick:p,disabled:r.status===ls,children:(0,e.__)("Allow","wordpress-seo")})]})]}),r.value&&o===ps&&(0,d.jsxs)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0",children:[null===s&&(0,d.jsx)(le.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==s&&(0,d.jsx)("div",{className:`wistia_embed wistia_async_${s} videoFoam=true`})]})]})]})};yt.propTypes={videoId:n().string.isRequired,thumbnail:n().shape({src:n().string.isRequired,width:n().string,height:n().string}).isRequired,wistiaEmbedPermission:n().shape({value:n().bool.isRequired,status:n().string.isRequired,set:n().func.isRequired}).isRequired},ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),n().bool.isRequired,n().func.isRequired,n().func,n().string;const xt=({onGiveConsent:s,learnMoreLink:t,privacyPolicyLink:r,termsOfServiceLink:o,imageLink:i})=>{const{onClose:n,initialFocus:l}=(0,le.useModalContext)(),[c,p]=(0,le.useToggleState)(!1),u=(0,a.useMemo)((()=>({src:i,width:"432",height:"244"})),[i]),h=he((0,e.sprintf)(/* translators: %1$s and %2$s are a set of anchor tags and %3$s and %4$s are a set of anchor tags. */
(0,e.__)("I approve the %1$sTerms of Service%2$s & %3$sPrivacy Policy%4$s of the Yoast AI service. This includes consenting to the collection and use of data to improve user experience.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,d.jsx)(Fs,{href:o}),a2:(0,d.jsx)(Fs,{href:r})}),[m,g]=(0,le.useToggleState)(!1),y=(0,a.useCallback)((async()=>{g(),await s(),g()}),[s]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,d.jsx)("div",{className:"yst-relative yst-w-full",children:(0,d.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...u})})}),(0,d.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,d.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,d.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,e.sprintf)(/* translators: %s expands to Yoast AI. */
(0,e.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")}),(0,d.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:he((0,e.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */
(0,e.__)("Enable AI-powered SEO! Use all Yoast AI features to boost your efficiency. Just give us the green light. %1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),{a:(0,d.jsx)(Fs,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,d.jsx)(fs,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,d.jsx)("br",{})})})]}),(0,d.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,d.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,d.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,d.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:c,value:c?"true":"false",onChange:p,className:"yst-checkbox__input",ref:l}),(0,d.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:h})]}),(0,d.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,d.jsxs)(le.Button,{as:"button",className:"yst-grow",size:"large",disabled:!c,onClick:y,children:[m&&(0,d.jsx)(le.Spinner,{className:"yst-me-2"}),(0,e.__)("Grant consent","wordpress-seo")]})}),(0,d.jsx)(le.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:n,children:(0,e.__)("Close","wordpress-seo")})]})]})};xt.propTypes={onGiveConsent:n().func.isRequired,learnMoreLink:n().string.isRequired,privacyPolicyLink:n().string.isRequired,termsOfServiceLink:n().string.isRequired,imageLink:n().string.isRequired};const wt=()=>{const s=(0,v.useSelect)((e=>e(Te).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Something went wrong","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,e.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,d.jsx)(Fs,{variant:"error",href:s}),a2:(0,d.jsx)(Fs,{variant:"error",href:t})})})]})},ft=()=>{const s=(0,v.useSelect)((e=>e(Te).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Not enough content","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,e.__)("Please add more content to ensure a valuable AI suggestion. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,d.jsx)(Fs,{variant:"error",href:s}),a2:(0,d.jsx)(Fs,{variant:"error",href:t})})})]})},bt=()=>{const s=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_settings#/site-features#card-wpseo-keyword_analysis_active")),[]),t=(0,a.useCallback)((()=>{window.location.reload()}),[]),{onClose:r}=(0,le.useModalContext)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("SEO analysis required","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(
/**
         * translators:
         * %1$s expands to Yoast SEO.
         * %2$s and %3$s expand to an opening and closing anchor tag, respectively, that links to the settings page.
         * %4$s expands to Yoast AI.
         */
(0,e.__)("%4$s requires the SEO analysis to be enabled. To enable it, please navigate to %2$sSite features%3$s in %1$s, turn on the SEO analysis, and click 'Save changes'. If it's disabled in your WordPress user profile, access your profile and enable it there. Please contact your administrator if you don't have access to these settings.","wordpress-seo"),"Yoast SEO","<a>","</a>","Yoast AI"),{a:(0,d.jsx)(Fs,{variant:"error",href:s})})})]}),(0,d.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,d.jsx)(le.Button,{variant:"secondary",onClick:r,children:(0,e.__)("Close","wordpress-seo")}),(0,d.jsx)(le.Button,{className:"yst-revoke-button",variant:"primary",onClick:t,children:(0,e.__)("Refresh page","wordpress-seo")})]})]})},vt=()=>{const s=(0,v.useSelect)((e=>e(Te).selectLink("https://yoa.st/ai-generator-rate-limit-help")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("You've reached the Yoast AI rate limit","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,e.__)("You might have reached your Yoast AI rate limit for a specific time frame or your sparks limit for this month. If you have reached your rate limit, please reduce the frequency of your requests to continue using Yoast AI features. Our %1$shelp article%2$s provides guidance on effectively planning and pacing your requests for an optimized workflow.","wordpress-seo"),"<a>","</a>"),{a:(0,d.jsx)(Fs,{variant:"error",href:s})})})]})},kt=({invalidSubscriptions:s=[]})=>{const{newYoastWooLink:t,activateYoastWooLink:r,newPremiumLink:o,activatePremiumLink:i}=(0,v.useSelect)((e=>{const s=e(Te);return{newYoastWooLink:s.selectLink("https://yoa.st/ai-generator-new-yoast-woocommerce"),activateYoastWooLink:s.selectLink("https://yoa.st/ai-generator-activate-yoast-woocommerce"),newPremiumLink:s.selectLink("https://yoa.st/ai-generator-new-premium"),activatePremiumLink:s.selectLink("https://yoa.st/ai-generator-activate-premium")}}),[]),{onClose:n}=(0,le.useModalContext)(),l=(0,a.useCallback)((async()=>{try{await S()({path:"yoast/v1/ai_generator/bust_subscription_cache",method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()}),[]);let c,p,u;return s.includes("Yoast WooCommerce SEO")?(c="Yoast WooCommerce SEO",p=r,u=t):s.includes("Yoast SEO Premium")&&(c="Yoast SEO Premium",p=i,u=o),(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Subscription required","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(
/**
         * translators:
         * %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO.
         * %2$s expands to MyYoast.
         * %3$s and %4$s expand to an opening and closing anchor tag, respectively, to activate your subscription.
         * %5$s and %6$s expand to an opening and closing anchor tag, respectively, to get a new subscription.
         **/
(0,e.__)("To access this feature, you need an active %1$s subscription. Please %3$sactivate your subscription in %2$s%4$s or %5$sget a new %1$s subscription%6$s. Afterward, refresh this page. It may take up to 30 seconds for the feature to function correctly.","wordpress-seo"),c,"MyYoast","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,d.jsx)(Fs,{variant:"error",href:p}),New:(0,d.jsx)(Fs,{variant:"error",href:u})})})]}),(0,d.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,d.jsx)(le.Button,{variant:"secondary",onClick:n,children:(0,e.__)("Close","wordpress-seo")}),(0,d.jsx)(le.Button,{variant:"primary",onClick:l,children:(0,e.__)("Refresh page","wordpress-seo")})]})]})};kt.propTypes={invalidSubscriptions:n().arrayOf(n().string)};const _t=()=>{const s=(0,v.useSelect)((e=>e(Te).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Connection timeout","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,e.__)("It seems that a connection timeout has occurred. Please check your internet connection and try again later. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,d.jsx)(Fs,{variant:"error",href:s}),a2:(0,d.jsx)(Fs,{variant:"error",href:t})})})]})},jt=()=>{const s=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Usage policy violation","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
       * %5$s expands to OpenAI.
       */
(0,e.__)("Due to %5$s's strict ethical guidelines and %1$susage policies%2$s, we cannot generate suggestions for the content on this page. If you intend to use AI, kindly avoid the use of explicit, violent, copyrighted, or sexually explicit content. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>","OpenAI"),{a1:(0,d.jsx)(Fs,{variant:"error",href:"https://openai.com/policies/usage-policies"}),a2:(0,d.jsx)(Fs,{variant:"error",href:s})})})]})},St=({errorMessage:s=""})=>{const t=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Something went wrong","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:(0,e.sprintf)(/* translators: %s is the error response of the request. */
(0,e.__)("The request came back with the following error: '%s'.","wordpress-seo"),s)}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,e.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,d.jsx)(Fs,{variant:"error",href:t})})})]})};St.propTypes={errorMessage:n().string};const Ct=()=>{const s=(0,v.useSelect)((e=>e(Te).selectAdminLink("plugins.php")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Something went wrong","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. %2$s expands to an opening link tag. %3$s expands to a closing link tag. */
(0,e.__)("The version of %1$s is outdated. Please upgrade %1$s %2$shere%3$s!","wordpress-seo"),"Yoast SEO Premium","<a>","</a>"),{a:(0,d.jsx)(Fs,{variant:"error",href:s})})})]})},Et=()=>{const s=(0,v.useSelect)((e=>e(Te).selectLink("https://yoa.st/ai-common-errors")),[]),t=(0,v.useSelect)((e=>e(Te).selectAdminLink("?page=wpseo_page_support")),[]);return(0,d.jsxs)(le.Alert,{variant:"error",children:[(0,d.jsx)("span",{className:"yst-block yst-font-medium",children:(0,e.__)("Yoast AI cannot reach your site","wordpress-seo")}),(0,d.jsx)("p",{className:"yst-mt-2",children:he((0,e.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,e.__)("To use this feature, your site must be publicly accessible. This applies to both test sites and instances where your REST API is password-protected. Please ensure your site is accessible to the public and try again. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,d.jsx)(Fs,{variant:"error",href:s}),a2:(0,d.jsx)(Fs,{variant:"error",href:t})})})]})},Rt=({errorCode:e,errorIdentifier:s="",errorMessage:t=""})=>{switch(e){case 400:switch(s){case"SITE_UNREACHABLE":return(0,d.jsx)(Et,{});case"WP_HTTP_REQUEST_ERROR":return(0,d.jsx)(St,{errorMessage:t});default:return(0,d.jsx)(wt,{})}case 429:return(0,d.jsx)(vt,{});default:return(0,d.jsx)(wt,{})}};Rt.propTypes={errorCode:n().number.isRequired,errorIdentifier:n().string,errorMessage:n().string};const Lt=({currentSubscriptions:e,isSeoAnalysisActive:s=!0})=>{const{isPremium:t,usageCountStatus:r,usageCountError:o,isWooProductEntity:i,isWooSeoActive:n}=(0,v.useSelect)((e=>{const s=e(Te);return{isPremium:s.getIsPremium(),usageCountStatus:e(Ie).selectUsageCountStatus(),usageCountError:e(Ie).selectUsageCountError(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive()}}),[]),l=(0,a.useMemo)((()=>!e.wooCommerceSubscription&&i),[e.wooCommerceSubscription]),c=(0,a.useMemo)((()=>{const s=[];return!t&&!i||e.premiumSubscription||s.push("Yoast SEO Premium"),l&&n&&s.push("Yoast WooCommerce SEO"),s}),[t,e.premiumSubscription,l,n,i]);return c.length>0?(0,d.jsx)(kt,{invalidSubscriptions:c}):s?r===De.error?(0,d.jsx)(Rt,{...o}):void 0:(0,d.jsx)(bt,{})};Lt.propTypes={currentSubscriptions:n().object.isRequired,isSeoAnalysisActive:n().bool};const Mt=({onStartGenerating:e})=>{const{termsOfServiceLink:s,privacyPolicyLink:t,learnMoreLink:r,imageLink:o,consentEndpoint:i}=(0,v.useSelect)((e=>({termsOfServiceLink:e(Te).selectLink("https://yoa.st/ai-generator-terms-of-service"),privacyPolicyLink:e(Te).selectLink("https://yoa.st/ai-generator-privacy-policy"),learnMoreLink:e(Te).selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:e(Te).selectImageLink("ai-consent.png"),consentEndpoint:e(Ie).selectAiGeneratorConsentEndpoint()})),[]),{storeAiGeneratorConsent:n}=(0,v.useDispatch)(Ie),l=(0,a.useCallback)((async()=>{await n(!0,i),e()}),[n,e,i]);return(0,d.jsx)(xt,{termsOfServiceLink:s,privacyPolicyLink:t,learnMoreLink:r,imageLink:o,onGiveConsent:l})};Mt.propTypes={onStartGenerating:n().func.isRequired};const Nt=ce.forwardRef((function(e,s){return ce.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))})),It=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,Tt=({total:s,current:t,onNavigate:r,disabled:o=!1,...i})=>(0,d.jsxs)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start",children:[(0,d.jsx)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1",children:(0,e.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")}),s>1&&(0,d.jsx)(le.Pagination,{className:"yst-shrink-0",current:t,total:s,onNavigate:r,disabled:o,variant:"text"
/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,e.__)("Previous","wordpress-seo")
/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,e.__)("Next","wordpress-seo"),...i})]}),Pt=({height:s})=>{const[t,r]=(0,a.useState)(""),{onClose:o}=(0,le.useModalContext)(),{editType:i,previewType:n,contentType:l}=os(),c=(()=>{const{editType:s,previewType:t}=os();let r="SEO";switch(t){case Ae:r="social";break;case Oe:r="X"}switch(s){case Fe:return(0,e.sprintf)(/* translators: %s is the type of title. */
(0,e.__)("Generated %s titles","wordpress-seo"),r);case $e:return t===Pe&&(r="meta"),(0,e.sprintf)(/* translators: %s is the type of description. */
(0,e.__)("Generated %s descriptions","wordpress-seo"),r)}})(),p=(()=>{const{editType:s,previewType:t}=os();let r="SEO";switch(t){case Ae:r="social";break;case Oe:r="X"}switch(s){case Fe:return(0,e.sprintf)(/* translators: %s is the type of title. */
(0,e.__)("Apply %s title","wordpress-seo"),r);case $e:return t===Pe&&(r="meta"),(0,e.sprintf)(/* translators: %s is the type of description. */
(0,e.__)("Apply %s description","wordpress-seo"),r)}})(),u=is(),{suggestions:h,fetchSuggestions:m,setSelectedSuggestion:g}=oo(),y=eo(),{addAppliedSuggestion:x,addUsageCount:w}=(0,v.useDispatch)(Ie),{isUsageCountLimitReached:f,isWooProductEntity:b,hasValidPremiumSubscription:k,hasValidWooSubscription:_}=(0,v.useSelect)((e=>{const s=e(Ie),t=e(Te);return{isUsageCountLimitReached:s.isUsageCountLimitReached(),isPremium:t.getIsPremium(),isWooProductEntity:t.getIsWooProductEntity(),isWooSeoActive:t.getIsWooSeoActive(),hasValidPremiumSubscription:s.selectPremiumSubscription(),hasValidWooSubscription:s.selectWooCommerceSubscription()}}),[]),j=(0,a.useMemo)((()=>h.status===De.loading||!(_||!f||!b)||!(k||!f)),[k,f,h.status,b,_]),S=(0,le.usePrevious)(s),C=h.status===De.success?s:S,E=`calc(${0===C?"50%":C/2+"px"} - 40vh)`,[R,L]=(0,a.useState)(!1),M=(0,a.useCallback)((e=>{L(e.target.offsetHeight!==e.target.scrollHeight)}),[L]),N=ns(M),T=no(),P=(()=>{const e=(()=>{const{previewType:e}=os();return(0,a.useMemo)((()=>{switch(e){case Pe:return()=>(0,v.select)(Te).getSnippetEditorData().description;case Ae:return(0,v.select)(Te).getFacebookDescriptionOrFallback;case Oe:return(0,v.select)(Te).getTwitterDescriptionOrFallback;default:return(0,I.constant)("")}}),[e])})();return(0,a.useMemo)(e,[e])})(),A=ss(),O=(0,a.useMemo)((()=>i===Fe?{[Ue[l]]:h.selected}:{}),[i,l,h.selected]),F=(0,a.useMemo)((()=>A(T,{overrides:O,contentType:l})),[A,T,i,l,h.selected]),$=(0,a.useMemo)((()=>A(T,{overrides:{...O,sep:"",sitename:""},contentType:l})),[A,T,i,l,h.selected]),B=(0,a.useMemo)((()=>i===$e?h.selected:A(P,{editType:$e})),[A,P,i,h.selected]),q=(0,a.useCallback)((e=>A(T,{overrides:{[Ue[l]]:e},key:"badge",applyPluggable:!1,contentType:l})),[A,T,l]),{currentPage:U,setCurrentPage:W,isOnLastPage:H,totalPages:D,getItemsOnCurrentPage:z}=(({totalItems:e=0,perPage:s=5})=>{const[t,r]=(0,a.useState)(1),o=(0,a.useMemo)((()=>Math.ceil(e/s)),[e,s]),i=(0,a.useMemo)((()=>t*s),[t,s]),n=(0,a.useMemo)((()=>i-s),[i,s]),l=(0,a.useMemo)((()=>1===t),[t]),c=(0,a.useMemo)((()=>t===o),[t,o]),d=(0,a.useCallback)((()=>{t>1&&r(t-1)}),[t,r]),p=(0,a.useCallback)((()=>{t<o&&r(t+1)}),[t,r,o]),u=(0,a.useCallback)((e=>(0,I.slice)(e,n,i)),[n,i]);return{currentPage:t,setCurrentPage:r,totalPages:o,isOnFirstPage:l,isOnLastPage:c,previousPage:d,nextPage:p,firstOnPage:n,lastOnPage:i,getItemsOnCurrentPage:u}})({totalItems:h.status===De.loading||h.status===De.error?h.entities.length+5:h.entities.length,perPage:5}),K=(0,a.useMemo)((()=>(0,I.map)(z(h.entities),(e=>{let s=e;return i===Fe&&(s=q(e),s=s.replace(It,((e,s,t,r,o,i,{start:n,wrap:a,end:l})=>{const c=a.trim();return 0===c.length?`${n}${a}${l}`:`${n}<span>${c}</span>${l}`})),s=he(s,{badge:(0,d.jsx)(le.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain",children:" "}),span:(0,d.jsx)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:e,label:s}}))),[h.entities,z,i,q]),G=(0,a.useMemo)((()=>h.status!==De.error||h.status===De.error&&!H),[h.status,H]),Y=(0,a.useMemo)((()=>h.status===De.loading&&H),[h.status,H]),V=(0,a.useMemo)((()=>h.status===De.error&&H),[h.status,H]),Z=(0,a.useCallback)((()=>{j||(W(h.status===De.error?D:D+1),m().then((e=>{e===ze&&w()})))}),[m,h.status,D,W,g,f]),Q=(0,a.useCallback)((()=>r("")),[r]),J=so(),X=(0,a.useCallback)((()=>{const e=i===Fe?T.replace(new RegExp(We[l]+"( Archives)?"),h.selected):h.selected;J(e),x({editType:i,previewType:n,suggestion:h.selected}),o()}),[J,i,n,h.selected,T,o,x]);return((e,s=[])=>{const t=(0,a.useRef)(!1);(0,a.useEffect)((()=>{t.current||(t.current=!0,e().finally((()=>{t.current=!1})))}),[e,s])})((()=>""===t?m().then((e=>{r(e),e===ze&&w()})):Promise.resolve()),[t,w,m]),t===Ke||h.status===De.error&&402===h.error.code?(0,d.jsx)("div",{className:"yst-flex yst-flex-col yst-space-y-6 yst-mt-6",children:(0,d.jsx)($r,{errorCode:h.error.code,errorIdentifier:h.error.errorIdentifier,invalidSubscriptions:h.error.missingLicenses,showActions:!0,onRetry:Q,errorMessage:h.error.message})}):(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(le.Modal.Container.Content,{ref:N,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2",children:[(0,d.jsx)(y,{title:F,description:B,status:h.status,titleForLength:$,showPreviewSkeleton:""===t,showLengthProgress:!Y}),G&&(Y?(0,d.jsx)(Hr,{idSuffix:u,suggestionClassNames:i===Fe?[["yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-8/12"]]:void 0}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"yst-flex yst-space-y-4",children:[(0,d.jsx)(le.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto",children:c}),(0,d.jsxs)(le.Button,{variant:"secondary",size:"small",onClick:h.status===De.loading?I.noop:Z,isLoading:h.status===De.loading,disabled:j,children:[h.status!==De.loading&&(0,d.jsx)(Nt,{className:"yst--ms-1 yst-me-2 yst-h-4 yst-w-4 yst-text-gray-400"}),(0,e.__)("Generate 5 more","wordpress-seo")]})]}),(0,d.jsx)(Ur,{idSuffix:u,suggestions:K,selected:h.selected,onChange:g}),(0,d.jsx)(Tt,{current:U,total:D,onNavigate:W,disabled:h.status===De.loading||V})]})),h.status===De.error&&H&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"yst-mt-8"}),(0,d.jsx)($r,{errorCode:h.error.code,errorIdentifier:h.error.errorIdentifier,invalidSubscriptions:h.error.missingLicenses,errorMessage:h.error.message}),(0,d.jsx)(Tt,{current:U,total:D,onNavigate:W,disabled:h.status===De.loading})]})]}),(0,d.jsxs)(le.Modal.Container.Footer,{children:[R&&(0,d.jsx)("div",{className:"yst-absolute yst-inset-x-0 yst--mt-10 yst-me-[calc(2.5rem-1px)] yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-slate-50"}),(0,d.jsx)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,d.jsxs)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse",children:[(0,d.jsx)("div",{className:"yst-hidden sm:yst-inline",children:(0,d.jsx)(le.Button,{variant:"secondary",onClick:o,children:(0,e.__)("Close","wordpress-seo")})}),(0,d.jsx)("div",{className:"yst-block sm:yst-inline",children:(0,d.jsxs)(le.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:X,disabled:""===h.selected||h.status===De.loading||V,children:[(0,d.jsx)(we,{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),p]})}),(0,d.jsx)("div",{className:"yst-mt-3 sm:yst-hidden",children:(0,d.jsx)(le.Button,{variant:"secondary",onClick:o,className:"yst-w-full sm:yst-w-auto",children:(0,e.__)("Close","wordpress-seo")})})]})]}),(0,d.jsxs)(le.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{marginTop:E},position:"bottom-left",children:[h.status!==De.loading&&(0,d.jsx)(Xr,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(h.status===De.success||h.status===De.loading)&&(0,d.jsx)(zr,{})]})]})};Pt.propTypes={height:n().number.isRequired};n().func.isRequired;const At=({title:s,description:t,status:r,titleForLength:o,showPreviewSkeleton:i,showLengthProgress:n})=>{const l=(0,v.useSelect)((e=>e(Te).getSnippetEditorMode()),[]),[c,p]=(0,a.useState)(l),{editType:u}=os(),h=is(),m=io({editType:u,title:o,description:t});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"yst-mb-2 lg:yst-flex",children:[(0,d.jsx)(le.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,e.__)("Google preview","wordpress-seo")}),(0,d.jsx)(Ut,{mode:c,idSuffix:h,onChange:p,disabled:r===De.loading})]}),i?(0,d.jsx)(Bt,{}):(0,d.jsx)($t,{mode:c,title:s,description:t}),(0,d.jsxs)("div",{className:"yst-pt-4",children:[(0,d.jsx)(le.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:u===Fe?(0,e.__)("SEO title width","wordpress-seo"):(0,e.__)("Meta description length","wordpress-seo")}),(0,d.jsx)(qt,{className:"yst-mt-2",progress:n?m.actual:0,min:0,max:m.max,score:m.score})]})]})};At.propTypes={title:n().string.isRequired,description:n().string.isRequired,status:n().oneOf(Object.keys(De)).isRequired,titleForLength:n().string.isRequired,showPreviewSkeleton:n().bool.isRequired,showLengthProgress:n().bool.isRequired};const Ot=window.yoast.searchMetadataPreviews,Ft=/mobi/i,$t=({mode:e,title:s,description:t})=>{var r,o;const i=(0,v.useSelect)((e=>e(Te).getBaseUrlFromSettings()),[]),n=(0,v.useSelect)((e=>e(Te).getSnippetEditorData().slug||""),[]),l=(0,v.useSelect)((e=>e(Te).getDateFromSettings()),[]),c=(0,v.useSelect)((e=>e(Te).getFocusKeyphrase()),[]),p=(0,v.useSelect)((e=>e(Te).getSnippetEditorPreviewImageUrl()),[]),u=(0,v.useSelect)((e=>e(Te).getSiteIconUrlFromSettings()),[]),h=(0,v.useSelect)((e=>e(Te).getShoppingData()),[]),m=(0,v.useSelect)((e=>e(Te).getSnippetEditorWordsToHighlight()),[]),g=(0,v.useSelect)((e=>e(Te).getSiteName()),[]),y=(0,v.useSelect)((e=>e(Te).getContentLocale()),[]),x=(0,a.useMemo)((()=>i+n),[i,n]),w=(0,a.useMemo)((()=>{var e,s;return Ft.test(null===(e=window)||void 0===e||null===(s=e.navigator)||void 0===s?void 0:s.userAgent)}),[null===(r=window)||void 0===r||null===(o=r.navigator)||void 0===o?void 0:o.userAgent]);return(0,d.jsx)("div",{className:`yst-bg-slate-200 yst--mx-6 ${e}${w?" yst-user-agent__mobile":""}`,children:(0,d.jsx)(Ot.SnippetPreview,{title:s,description:t,mode:e,url:x,keyword:c,date:l,faviconSrc:u,mobileImageSrc:p,wordsToHighlight:m,siteName:g,locale:y,shoppingData:h,onMouseUp:I.noop})})};$t.propTypes={mode:n().oneOf(Object.keys(He)).isRequired,title:n().string.isRequired,description:n().string.isRequired};const Bt=()=>(0,d.jsxs)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto",children:[(0,d.jsxs)("div",{className:"yst-flex yst-gap-x-3",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,d.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"})]})]}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})]}),qt=({className:e="",progress:s,max:t,score:r})=>{const o=(0,a.useMemo)((()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(r)),[r]);return(0,d.jsx)(le.ProgressBar,{className:ke()("yst-length-progress-bar",o,e),progress:s,min:0,max:t})};qt.propTypes={className:n().string,progress:n().number.isRequired,max:n().number.isRequired,score:n().number.isRequired};const Ut=({idSuffix:s,mode:t,onChange:r,disabled:o})=>{const i=(0,a.useCallback)((({target:e})=>e.checked&&r(e.value)),[r]);return(0,d.jsxs)(le.RadioGroup,{id:`yst-ai-mode__${s}`,className:"yst-ai-mode yst-pt-2 lg:yst-pt-0",disabled:o,children:[(0,d.jsx)(le.RadioGroup.Radio,{id:`yst-ai-mode__mobile__${s}`,name:`yst-ai-mode__${s}`,label:(0,e.__)("Mobile result","wordpress-seo"),value:He.mobile,checked:t===He.mobile,onChange:i,disabled:o}),(0,d.jsx)(le.RadioGroup.Radio,{id:`yst-ai-mode__desktop__${s}`,name:`yst-ai-mode__${s}`,label:(0,e.__)("Desktop result","wordpress-seo"),value:He.desktop,checked:t===He.desktop,onChange:i,disabled:o})]})};Ut.propTypes={idSuffix:n().string.isRequired,mode:n().oneOf(Object.keys(He)).isRequired,onChange:n().func.isRequired,disabled:n().bool.isRequired};const Wt=({title:s,description:t,showPreviewSkeleton:r})=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,d.jsx)(le.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,e.__)("Social preview","wordpress-seo")})}),r?(0,d.jsx)(Or,{}):(0,d.jsx)(Ar,{title:s,description:t})]});Wt.propTypes={title:n().string.isRequired,description:n().string.isRequired,showPreviewSkeleton:n().bool.isRequired};const Ht=c().p`
	color: #606770;
	flex-shrink: 0;
	font-size: 12px;
	line-height: 16px;
	overflow: hidden;
	padding: 0;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	margin: 0;
	position: ${e=>"landscape"===e.mode?"relative":"static"};
`,Dt=e=>{const{siteUrl:s}=e;return(0,d.jsxs)(ce.Fragment,{children:[(0,d.jsx)("span",{className:"screen-reader-text",children:s}),(0,d.jsx)(Ht,{"aria-hidden":"true",children:(0,d.jsx)("span",{children:s})})]})};Dt.propTypes={siteUrl:n().string.isRequired};const zt=Dt,Kt=window.yoast.socialMetadataForms,Gt=c().img`
	&& {
		max-width: ${e=>e.width}px;
		height: ${e=>e.height}px;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		max-width: none;
	}
`,Yt=c().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,Vt=c().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,Zt=({imageProps:e,width:s,height:t,imageMode:r="landscape"})=>"landscape"===r?(0,d.jsx)(Vt,{aspectRatio:e.aspectRatio,children:(0,d.jsx)(Yt,{src:e.src,alt:e.alt})}):(0,d.jsx)(Gt,{src:e.src,alt:e.alt,width:s,height:t,imageProperties:e});function Qt(e,s,t){return"landscape"===t?{widthRatio:s.width/e.landscapeWidth,heightRatio:s.height/e.landscapeHeight}:"portrait"===t?{widthRatio:s.width/e.portraitWidth,heightRatio:s.height/e.portraitHeight}:{widthRatio:s.width/e.squareWidth,heightRatio:s.height/e.squareHeight}}function Jt(e,s){return s.widthRatio<=s.heightRatio?{width:Math.round(e.width/s.widthRatio),height:Math.round(e.height/s.widthRatio)}:{width:Math.round(e.width/s.heightRatio),height:Math.round(e.height/s.heightRatio)}}async function Xt(e,s,t=!1){const r=await function(e){return new Promise(((s,t)=>{const r=new Image;r.onload=()=>{s({width:r.width,height:r.height})},r.onerror=t,r.src=e}))}(e);let o=t?"landscape":"square";"Facebook"===s&&(o=(0,Kt.determineFacebookImageMode)(r));const i=function(e){return"Twitter"===e?Kt.TWITTER_IMAGE_SIZES:Kt.FACEBOOK_IMAGE_SIZES}(s),n=function(e,s,t){return"square"===t&&s.width===s.height?{width:e.squareWidth,height:e.squareHeight}:Jt(s,Qt(e,s,t))}(i,r,o);return{mode:o,height:n.height,width:n.width}}async function er(e,s,t=!1){try{return{imageProperties:await Xt(e,s,t),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}Zt.propTypes={imageProps:n().shape({src:n().string.isRequired,alt:n().string.isRequired,aspectRatio:n().number.isRequired}).isRequired,width:n().number.isRequired,height:n().number.isRequired,imageMode:n().string};const sr=c().div`
	position: relative;
	${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`};
	overflow: hidden;
	background-color: ${M.colors.$color_white};
`,tr=c().div`
	box-sizing: border-box;
	max-width: ${Kt.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${Kt.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${M.colors.$color_grey};
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	display: flex;
	justify-content: center;
	align-items: center;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class rr extends ce.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await er(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:Kt.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:Kt.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:Kt.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:Kt.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:Kt.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:Kt.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:s,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,d.jsx)(tr,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,e.__)("Select image","wordpress-seo")});const r=this.retrieveContainerDimensions(s.mode);return(0,d.jsx)(sr,{mode:s.mode,dimensions:r,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,d.jsx)(Zt,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Kt.FACEBOOK_IMAGE_SIZES.aspectRatio},width:s.width,height:s.height,imageMode:s.mode})})}}rr.propTypes={src:n().string,alt:n().string,onImageLoaded:n().func,onImageClick:n().func,onMouseEnter:n().func,onMouseLeave:n().func},rr.defaultProps={src:"",alt:"",onImageLoaded:I.noop,onImageClick:I.noop,onMouseEnter:I.noop,onMouseLeave:I.noop};const or=rr,ir=c().span`
	line-height: ${20}px;
	min-height : ${20}px;
	color: #1d2129;
	font-weight: 600;
	overflow: hidden;
	font-size: 16px;
	margin: 3px 0 0;
	letter-spacing: normal;
	white-space: normal;
	flex-shrink: 0;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;
`,nr=c().p`
	line-height: ${16}px;
	min-height : ${16}px;
	color: #606770;
	font-size: 14px;
	padding: 0;
	text-overflow: ellipsis;
	margin: 3px 0 0 0;
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;

	@media all and ( max-width: ${e=>e.maxWidth} ) {
		display: none;
	}
`,ar=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},lr=c().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,cr=c().div`
	box-sizing: border-box;
	background-color: #f2f3f5;
	margin: 0;
	padding: 10px 12px;
	position: relative;
	border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""};
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"};
	font-size: 12px;
	overflow: hidden;
`;class dr extends ce.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=de().createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:s}=this.state,t="landscape"===e?2:5;t!==s&&this.setState({maxLineCount:t})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:s,imageMode:t}=this.state,r=this.getTitleLineCount();let o=s-r;"portrait"===t&&(o=5===r?0:4),o!==e&&this.setState({descriptionLineCount:o})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:s,descriptionLineCount:t}=this.state;return(0,d.jsxs)(lr,{id:"facebookPreview",mode:e,children:[(0,d.jsx)(or,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,d.jsxs)(cr,{mode:e,children:[(0,d.jsx)(zt,{siteUrl:this.props.siteUrl,mode:e}),(0,d.jsx)(ir,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:s,children:this.props.title}),t>0&&(0,d.jsx)(nr,{maxWidth:ar(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:t,children:this.props.description})]})]})}}dr.propTypes={siteUrl:n().string.isRequired,title:n().string.isRequired,description:n().string,imageUrl:n().string,imageFallbackUrl:n().string,alt:n().string,onSelect:n().func,onImageClick:n().func,onMouseHover:n().func},dr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const pr=dr,ur=c().div`
	text-transform: lowercase;
	color: rgb(83, 100, 113);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	fill: currentcolor;
	display: flex;
	flex-direction: row;
	align-items: flex-end;
`,hr=e=>(0,d.jsx)(ur,{children:(0,d.jsx)("span",{children:e.siteUrl})});hr.propTypes={siteUrl:n().string.isRequired};const mr=hr,gr=(e,s=!0)=>e?`\n\t\t\tmax-width: ${Kt.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${s?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${Kt.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${s?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,yr=c().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>gr(e.isLarge)}
`,xr=c().div`
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0;
	padding: 1em;
	text-align: center;
	font-size: 1rem;
	${e=>gr(e.isLarge,!1)}
`,wr=c()(xr)`
	${e=>e.isLarge&&`height: ${Kt.TWITTER_IMAGE_SIZES.landscapeHeight}px;`}
	border-top-left-radius: 14px;
	${e=>e.isLarge?"border-top-right-radius":"border-bottom-left-radius"}: 14px;
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class fr extends de().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await er(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:s,imageProperties:t}=this.state;return"loading"===s||""===this.props.src||"errored"===s?(0,d.jsx)(wr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,e.__)("Select image","wordpress-seo")}):(0,d.jsx)(yr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,d.jsx)(Zt,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Kt.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}fr.propTypes={isLarge:n().bool.isRequired,src:n().string,alt:n().string,onImageClick:n().func,onMouseEnter:n().func,onMouseLeave:n().func},fr.defaultProps={src:"",alt:"",onMouseEnter:I.noop,onImageClick:I.noop,onMouseLeave:I.noop};const br=c().div`
	display: flex;
	flex-direction: column;
	padding: 12px;
	justify-content: center;
	margin: 0;
	box-sizing: border-box;
	flex: auto;
	min-width: 0px;
	gap:2px;
	> * {
		line-height:20px;
		min-height:20px;
		font-size:15px;
    }
`,vr=e=>(0,d.jsx)(br,{children:e.children});vr.propTypes={children:n().array.isRequired};const kr=vr,_r=c().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`,jr=c().p`
	max-height: 55px;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(83, 100, 113);
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;

	@media all and ( max-width: ${Kt.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`,Sr=c().div`
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	max-width: 507px;
	border: 1px solid #E1E8ED;
	box-sizing: border-box;
	border-radius: 14px;
	color: #292F33;
	background: #FFFFFF;
	text-overflow: ellipsis;
	display: flex;

	&:hover {
		background: #f5f8fa;
		border: 1px solid rgba(136,153,166,.5);
	}
`,Cr=c()(Sr)`
	flex-direction: column;
	max-height: 370px;
`,Er=c()(Sr)`
	flex-direction: row;
	height: 125px;
`;class Rr extends ce.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:e,imageUrl:s,imageFallbackUrl:t,alt:r,title:o,description:i,siteUrl:n}=this.props,a=e?Cr:Er;return(0,d.jsxs)(a,{id:"twitterPreview",children:[(0,d.jsx)(fr,{src:s||t,alt:r,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,d.jsxs)(kr,{children:[(0,d.jsx)(mr,{siteUrl:n}),(0,d.jsx)(_r,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,d.jsx)(jr,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:i})]})]})}}Rr.propTypes={siteUrl:n().string.isRequired,title:n().string.isRequired,description:n().string,isLarge:n().bool,imageUrl:n().string,imageFallbackUrl:n().string,alt:n().string,onSelect:n().func,onImageClick:n().func,onMouseHover:n().func},Rr.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const Lr=Rr,Mr=window.yoast.replacementVariableEditor;class Nr extends ce.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?pr:Lr,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},(()=>this.setEditorFocus(e)))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,s){switch(e){case"title":this.titleEditorRef=s;break;case"description":this.descriptionEditorRef=s}}render(){const{onDescriptionChange:e,onTitleChange:s,onSelectImageClick:t,onRemoveImageClick:o,socialMediumName:i,imageWarnings:n,siteUrl:a,description:l,descriptionInputPlaceholder:c,descriptionPreviewFallback:p,imageUrl:u,imageFallbackUrl:h,alt:m,title:g,titleInputPlaceholder:y,titlePreviewFallback:x,replacementVariables:w,recommendedReplacementVariables:f,applyReplacementVariables:b,onReplacementVariableSearchChange:v,isPremium:k,isLarge:_,socialPreviewLabel:j,idSuffix:S,activeMetaTabId:C}=this.props,E=b({title:g||x,description:l||p});return(0,d.jsxs)(de().Fragment,{children:[j&&(0,d.jsx)(r.SimulatedLabel,{children:j}),(0,d.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:t,siteUrl:a,title:E.title,description:E.description,imageUrl:u,imageFallbackUrl:h,alt:m,isLarge:_,activeMetaTabId:C}),(0,d.jsx)(Kt.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:i,title:g,titleInputPlaceholder:y,onRemoveImageClick:o,imageSelected:!!u,imageUrl:u,imageFallbackUrl:h,onTitleChange:s,onSelectImageClick:t,description:l,descriptionInputPlaceholder:c,imageWarnings:n,replacementVariables:w,recommendedReplacementVariables:f,onReplacementVariableSearchChange:v,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:k,setEditorRef:this.setEditorRef,idSuffix:S})]})}}Nr.propTypes={title:n().string.isRequired,onTitleChange:n().func.isRequired,description:n().string.isRequired,onDescriptionChange:n().func.isRequired,imageUrl:n().string.isRequired,imageFallbackUrl:n().string.isRequired,onSelectImageClick:n().func.isRequired,onRemoveImageClick:n().func.isRequired,socialMediumName:n().string.isRequired,alt:n().string,isPremium:n().bool,imageWarnings:n().array,isLarge:n().bool,siteUrl:n().string,descriptionInputPlaceholder:n().string,titleInputPlaceholder:n().string,descriptionPreviewFallback:n().string,titlePreviewFallback:n().string,replacementVariables:Mr.replacementVariablesShape,recommendedReplacementVariables:Mr.recommendedReplacementVariablesShape,applyReplacementVariables:n().func,onReplacementVariableSearchChange:n().func,socialPreviewLabel:n().string,idSuffix:n().string,activeMetaTabId:n().string},Nr.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const Ir={},Tr=(e,s,{log:t=console.warn}={})=>{Ir[e]||(Ir[e]=!0,t(s))},Pr=(e,s=I.noop)=>{const t={};for(const r in e)Object.hasOwn(e,r)&&Object.defineProperty(t,r,{set:t=>{e[r]=t,s("set",r,t)},get:()=>(s("get",r),e[r])});return t};Pr({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},((e,s)=>Tr(`@yoast/social-metadata-previews/TWITTER_IMAGE_SIZES/${e}/${s}`,`[@yoast/social-metadata-previews] "TWITTER_IMAGE_SIZES.${s}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`))),Pr({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},((e,s)=>Tr(`@yoast/social-metadata-previews/FACEBOOK_IMAGE_SIZES/${e}/${s}`,`[@yoast/social-metadata-previews] "FACEBOOK_IMAGE_SIZES.${s}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`)));const Ar=({title:e,description:s})=>{const t=(0,v.useSelect)((e=>e(Te).getSiteUrl()),[]),r=(0,v.useSelect)((e=>e(Te).getFacebookImageUrl()),[]),o=(0,v.useSelect)((e=>e(Te).getEditorDataImageFallback()),[]),i=(0,v.useSelect)((e=>e(Te).getFacebookAltText()),[]);return(0,d.jsx)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6 yst-mx-auto",children:(0,d.jsx)(pr,{title:e,description:s,siteUrl:t,imageUrl:r,imageFallbackUrl:o,alt:i,onSelect:I.noop,onImageClick:I.noop,onMouseHover:I.noop})})};Ar.propTypes={title:n().string.isRequired,description:n().string.isRequired};const Or=()=>(0,d.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,d.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),Fr=({children:s,onRetry:t})=>{const{onClose:r}=(0,le.useModalContext)();return(0,d.jsxs)(a.Fragment,{children:[s,(0,d.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,d.jsx)(le.Button,{variant:"secondary",onClick:r,children:(0,e.__)("Close","wordpress-seo")}),(0,d.jsx)(le.Button,{variant:"primary",onClick:t,children:(0,e.__)("Try again","wordpress-seo")})]})]})};Fr.propTypes={children:n().node.isRequired,onRetry:n().func.isRequired};const $r=({errorCode:e,errorIdentifier:s,invalidSubscriptions:t=[],showActions:r=!1,onRetry:o=I.noop,errorMessage:i=""})=>{switch(e){case 400:switch(s){case"AI_CONTENT_FILTER":return(0,d.jsx)(jt,{});case"NOT_ENOUGH_CONTENT":return(0,d.jsx)(ft,{});case"SITE_UNREACHABLE":return(0,d.jsx)(Et,{});case"WP_HTTP_REQUEST_ERROR":return r?(0,d.jsx)(Fr,{onRetry:o,children:(0,d.jsx)(St,{errorMessage:i})}):(0,d.jsx)(St,{errorMessage:i});default:return r?(0,d.jsx)(Fr,{onRetry:o,children:(0,d.jsx)(wt,{})}):(0,d.jsx)(wt,{})}case 402:return(0,d.jsx)(kt,{invalidSubscriptions:t});case 408:return r?(0,d.jsx)(Fr,{onRetry:o,children:(0,d.jsx)(_t,{})}):(0,d.jsx)(_t,{});case 429:return"USAGE_LIMIT_REACHED"===s?(0,d.jsx)(kt,{invalidSubscriptions:t}):(0,d.jsx)(vt,{});case 410:return(0,d.jsx)(Ct,{});default:return r?(0,d.jsx)(Fr,{onRetry:o,children:(0,d.jsx)(wt,{})}):(0,d.jsx)(wt,{})}};$r.propTypes={errorCode:n().number.isRequired,errorIdentifier:n().string.isRequired,invalidSubscriptions:n().array,showActions:n().bool,onRetry:n().func,errorMessage:n().string};const Br=n().shape({value:n().string.isRequired,label:n().node.isRequired}),qr=({id:e,name:s,suggestion:t,isChecked:r,onChange:o})=>{const i=(0,a.useCallback)((()=>o(t.value)),[t,o]);return(0,d.jsxs)("label",{htmlFor:e,className:ke()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",r&&"yst-z-10 yst-border-primary-500"),children:[(0,d.jsx)("input",{type:"radio",id:e,name:s,className:"yst-radio__input",value:t.value,checked:r,onChange:i}),(0,d.jsx)("div",{className:ke()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!r&&"yst-text-slate-600"),children:t.label})]})};qr.propTypes={id:n().string.isRequired,name:n().string.isRequired,suggestion:Br.isRequired,isChecked:n().bool.isRequired,onChange:n().func.isRequired};const Ur=({idSuffix:e,suggestions:s,selected:t,onChange:r})=>(0,d.jsx)("div",{children:(0,d.jsx)(le.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${e}`,children:s.map(((s,o)=>(0,d.jsx)(qr,{id:`yst-ai-suggestions-radio-${e}__${o}`,name:`ai-suggestion__${e}`,isChecked:s.value===t,onChange:r,suggestion:s},`yst-ai-suggestions-radio-${e}__${o}`)))})});Ur.propTypes={idSuffix:n().string.isRequired,suggestions:n().arrayOf(Br).isRequired,selected:n().string.isRequired,onChange:n().func.isRequired};const Wr=[["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-8/12"]],Hr=({suggestionClassNames:e=Wr})=>(0,d.jsx)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]",children:e.map(((e,s)=>(0,d.jsxs)("div",{className:"yst-flex yst-p-4 yst-gap-x-3 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",children:[(0,d.jsx)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,d.jsx)("div",{className:"yst-flex yst-flex-col yst-w-full",children:e.map(((e,t)=>(0,d.jsx)(le.SkeletonLoader,{className:e},`yst-ai-suggestion-radio-skeleton-${s}__${t}`)))})]},`yst-ai-suggestion-radio-skeleton__${s}`)))});Hr.propTypes={suggestionClassNames:n().arrayOf(n().arrayOf(n().string))};const Dr="ai_generator_tip_notification",zr=()=>{const s=(0,v.useSelect)((e=>e(Te).isAlertDismissed(Dr)),[]),t=(0,v.useSelect)((e=>e(Te).getEditorDataContent()),[]),r=(0,v.useSelect)((e=>e(Te).getIsWooProductEntity()),[]),[o,,,i]=(0,le.useToggleState)(!1),{editType:n,contentType:l}=os(),{dismissAlert:c}=(0,v.useDispatch)(Te),p=(0,a.useCallback)((()=>{c(Dr)}),[c]),u=(0,a.useMemo)((()=>n===$e?(0,e.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,e.__)("%1$sTip%2$s: Improve the accuracy of your generated AI titles by writing more content in your page.","wordpress-seo")
/* translators: %1$s and %2$s expand to opening and closing of a span in order to emphasise the word. */),[n]),h=(0,a.useMemo)((()=>((e,s)=>e||s===qe?150:300)(r,l)),[l,r]);return s||o||t.length>h?null:(0,d.jsxs)(le.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,e.__)("Dismiss","wordpress-seo"),children:[he((0,e.sprintf)(u,"<span>","</span>"),{span:(0,d.jsx)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,d.jsxs)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1",children:[(0,d.jsx)(le.Button,{type:"button",variant:"tertiary",onClick:p,children:(0,e.__)("Don’t show again","wordpress-seo")}),(0,d.jsx)(le.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:i,children:(0,e.__)("Dismiss","wordpress-seo")})]})]})},Kr=({title:s,description:t,showPreviewSkeleton:r})=>(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,d.jsx)(le.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,e.__)("X preview","wordpress-seo")})}),r?(0,d.jsx)(Yr,{}):(0,d.jsx)(Gr,{title:s,description:t})]});Kr.propTypes={title:n().string.isRequired,description:n().string.isRequired,showPreviewSkeleton:n().bool.isRequired};const Gr=({title:e,description:s})=>{const t=(0,v.useSelect)((e=>e(Te).getSiteUrl()),[]),r=(0,v.useSelect)((e=>e(Te).getTwitterImageUrl()),[]),o=(0,v.useSelect)((e=>e(Te).getFacebookImageUrl()),[]),i=(0,v.useSelect)((e=>e(Te).getEditorDataImageFallback()),[]),n=(0,v.useSelect)((e=>e(Te).getTwitterImageType()),[]),a=(0,v.useSelect)((e=>e(Te).getTwitterAltText()),[]);return(0,d.jsx)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6",children:(0,d.jsx)(Lr,{title:e,description:s,siteUrl:t,imageUrl:r,imageFallbackUrl:o||i,isLarge:"summary"!==n,alt:a,onSelect:I.noop,onImageClick:I.noop,onMouseHover:I.noop})})};Gr.propTypes={title:n().string.isRequired,description:n().string.isRequired};const Yr=()=>(0,d.jsxs)("div",{className:"yst-flex yst-flex-col yst-max-h-[370px] yst-w-[507px] yst-border yst-rounded-t-[14px] yst-overflow-hidden yst-mx-auto",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,d.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,d.jsx)(le.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),Vr="yst-mt-1 yst-mb-3",Zr="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",Qr=({onClose:s})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:Vr,children:(0,e.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")}),(0,d.jsx)("div",{className:Zr,children:(0,d.jsx)(le.Button,{type:"button",variant:"primary",size:"small",onClick:s,children:(0,e.__)("Got it!","wordpress-seo")})})]}),Jr=({onClose:s,upsellLink:t,isWooProductEntity:r=!1,ctbId:o="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const i=(0,le.useSvgAria)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:Vr,children:(0,e.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,e.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),r?"Yoast WooCommerce SEO":"Yoast SEO Premium")}),(0,d.jsxs)("div",{className:Zr,children:[(0,d.jsx)(le.Button,{type:"button",variant:"tertiary",size:"small",onClick:s,children:(0,e.__)("Close","wordpress-seo")}),(0,d.jsxs)(le.Button,{as:"a",size:"small",variant:"upsell",href:t,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":o,children:[(0,d.jsx)(fe,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...i}),(0,e.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,e.__)("Unlock with %1$s","wordpress-seo"),r?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,d.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */
(0,e.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]})},Xr=({className:s=""})=>{const{isUsageCountLimitReached:t,usageCount:r,usageCountLimit:o,premiumUpsellLink:i,wooUpsellLink:n,isWooProductEntity:l,hasValidPremiumSubscription:c,hasValidWooSubscription:p}=(0,v.useSelect)((e=>{const s=e(Ie),t=e(Te);return{isUsageCountLimitReached:s.isUsageCountLimitReached(),usageCount:s.selectUsageCount(),usageCountLimit:s.selectUsageCountLimit(),premiumUpsellLink:t.selectLink("https://yoa.st/ai-toast-out-of-free-sparks"),wooUpsellLink:t.selectLink("https://yoa.st/ai-toast-out-of-free-sparks-woo"),isWooProductEntity:t.getIsWooProductEntity(),hasValidPremiumSubscription:s.selectPremiumSubscription(),hasValidWooSubscription:s.selectWooCommerceSubscription()}}),[]),u=(0,a.useMemo)((()=>c&&!l||l&&p&&c),[c,l,p]),[h,,m,,g]=(0,le.useToggleState)(r===o);(0,a.useEffect)((()=>{m(u&&r===o||!u&&t)}),[r,o,u,t]);const y=(0,a.useMemo)((()=>l?n:i),[l,n,i]),x=(0,a.useMemo)((()=>l&&!p),[l,p]);return h&&(0,d.jsx)(le.Notifications.Notification,{id:"ai-sparks-limit",className:s,variant:"info",dismissScreenReaderLabel:(0,e.__)("Close","wordpress-seo"),title:u?(0,e.sprintf)(/* translators: %s is the number of the sparks. */
(0,e._n)("You've used %s spark this month.","You've used %s sparks this month.",o,"wordpress-seo"),o):(0,e.__)("You're out of free sparks!","wordpress-seo"),size:u?"default":"large",children:u?(0,d.jsx)(Qr,{onClose:g}):(0,d.jsx)(Jr,{onClose:g,upsellLink:y,isWooUpsell:x})})},eo=()=>{const{previewType:e}=os();switch(e){case Ae:return Wt;case Oe:return Kr;default:return At}},so=()=>{const{editType:e}=os();switch(e){case Fe:return(()=>{const{previewType:e}=os(),{updateData:s,setFacebookPreviewTitle:t,setTwitterPreviewTitle:r}=(0,v.useDispatch)(Te);return(0,a.useMemo)((()=>{switch(e){case Pe:return e=>s({title:e});case Ae:return t;case Oe:return r;default:return I.noop}}),[e,s,t,r])})();case $e:return(()=>{const{previewType:e}=os(),{updateData:s,setFacebookPreviewDescription:t,setTwitterPreviewDescription:r}=(0,v.useDispatch)(Te);return(0,a.useMemo)((()=>{switch(e){case Pe:return e=>s({description:e});case Ae:return t;case Oe:return r;default:return I.noop}}),[e,s,t,r])})();default:return I.noop}},to=(0,us.createSlice)({name:"suggestions",initialState:{status:De.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=De.loading},setSuccess:(e,{payload:s})=>{e.status=De.success,e.selected=s[0],e.entities.push(...s)},setError:(e,{payload:s})=>{e.status=De.error,e.error=s},setSelected:(e,{payload:s})=>{e.selected=s}}}),ro=e=>{switch(e){case Ae:return"Facebook";case Oe:return"Twitter";default:return"Google"}},oo=()=>{const[e,s]=(0,a.useReducer)(to.reducer,to.getInitialState()),{editType:t,previewType:r,postType:o,contentType:i}=os(),n=(0,v.useSelect)((e=>e(Ie).selectPromptContent()),[]),{contentLocale:l,focusKeyphrase:c,isWooCommerceActive:d,isGutenberg:p,isElementor:u}=(0,v.useSelect)((e=>({contentLocale:e(Te).getContentLocale(),focusKeyphrase:e(Te).getFocusKeyphrase(),isWooCommerceActive:e(Te).getIsWooCommerceActive(),isGutenberg:e(Te).getIsBlockEditor(),isElementor:e(Te).getIsElementorEditor()})),[]);let h,m=X.languageProcessing.helpers.processExactMatchRequest(c).keyphrase;m.length>191&&(m=m.slice(0,191)),h=u?"elementor":p?"gutenberg":"classic";const g=((e,s,t,r)=>{const o=e===$e?"meta-description":"seo-title";let i=((e,s)=>{if(e)switch(s){case"product":return"product-";case"product_cat":case"product_tag":return"product-taxonomy-"}return""})(s,t);return i&&s||r!==qe||(i="taxonomy-"),`${i}${o}`})(t,d,o,i);return{suggestions:e,fetchSuggestions:(0,a.useCallback)((async(e=!0)=>{s(to.actions.setLoading());const{status:t,payload:o}=await(async({endpoint:e,data:s})=>{let t;const r=1e3*(0,I.get)(window,"wpseoAiGenerator.requestTimeout",30);try{Ve&&Ve.abort(),Ve=new AbortController,Ze=!1,t=setTimeout((()=>{Ze=!0,Ve.abort()}),r);const o=await S()({path:e,method:"POST",data:s,parse:!1,signal:Ve.signal}),i=await o.json();return{status:ze,payload:i}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return Ze?{status:Ke,payload:{message:"timeout",code:408}}:{status:Ge};const{message:s,missingLicenses:t,errorIdentifier:r}=await(async e=>{try{const s=e.body.getReader(),{value:t}=await s.read(),r=new TextDecoder("utf-8").decode(t);return console.error(r),JSON.parse(r)}catch(e){return{message:"Unknown"}}})(e);return{status:Ke,payload:{message:s,code:e.status||500,missingLicenses:t,errorIdentifier:r}}}finally{clearTimeout(t)}})({endpoint:"yoast/v1/ai_generator/get_suggestions/",canAbort:e,data:{type:g,prompt_content:n,focus_keyphrase:m,platform:ro(r),language:Je(l).replace("_","-"),editor:h}});switch(t){case Ge:break;case Ke:s(to.actions.setError(o));break;case ze:s(to.actions.setSuccess(o))}return t}),[s]),setSelectedSuggestion:(0,a.useCallback)((e=>s(to.actions.setSelected(e))),[s])}},io=({editType:e,title:s,description:t})=>{const r=(0,v.useSelect)((e=>e(Te).getDateFromSettings()),[]),o=(0,v.useSelect)((e=>e(Te).getContentLocale()),[]),i=(0,v.useSelect)((e=>e(Te).isCornerstoneContent()),[]),n=(0,v.useSelect)((e=>e(Te).getIsTerm()),[]);return(0,a.useMemo)((()=>e===$e?(0,Ot.getDescriptionProgress)(t,r,i,n,o):(0,Ot.getTitleProgress)(s)),[e,s,t,r,i,n,o])},no=()=>{const{editType:e,previewType:s,contentType:t}=os(),r=(()=>{const{previewType:e}=os();return(0,a.useMemo)((()=>{switch(e){case Pe:return()=>(0,v.select)(Te).getSnippetEditorData().title;case Ae:return(0,v.select)(Te).getFacebookTitleOrFallback;case Oe:return(0,v.select)(Te).getTwitterTitleOrFallback;default:return(0,I.constant)("")}}),[e])})(),o=(0,v.useSelect)((t=>t(Ie).selectAppliedSuggestionFor({editType:e,previewType:s})),[e,s]);return(0,a.useMemo)((()=>{let s=r();return e===$e?s:(o&&(s=s.replace(o,We[t])),((e,s)=>e.includes(We[s])?e:We[s])(s,t))}),[e,r])},ao=s=>{const{isWooProductEntity:t,isProductPost:r,hasValidWooSubscription:o}=(0,v.useSelect)((e=>{const s=e(Te),t=e(Ie);return{isWooProductEntity:s.getIsWooProductEntity(),isProductPost:s.getIsProduct(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]);return(0,a.useMemo)((()=>{const i={upsellLink:s.premium,upsellLabel:(0,e.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,e.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",title:(0,e.__)("Use AI to generate your titles & descriptions!","wordpress-seo")};return t&&(r&&(i.title=(0,e.__)("Generate product titles & descriptions with AI!","wordpress-seo")),o||(i.newToText="Yoast WooCommerce SEO",i.upsellLabel=(0,e.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,e.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO"),i.upsellLink=s.woo,i.ctbId="5b32250e-e6f0-44ae-ad74-3cefc8e427f9")),i}),[t,r,s.premium,s.woo])},lo=()=>{const{premiumUpsellLink:e,wooUpsellLink:s,learnMoreLink:t,imageLink:r,wistiaEmbedPermissionValue:o,wistiaEmbedPermissionStatus:i}=(0,v.useSelect)((e=>{const s=e(Te);return{premiumUpsellLink:s.selectLink("https://yoa.st/ai-fix-assessments-upsell"),wooUpsellLink:s.selectLink("https://yoa.st/ai-fix-assessments-upsell-woo-seo"),learnMoreLink:s.selectLink("https://yoa.st/ai-fix-assessments-upsell-learn-more"),imageLink:s.selectImageLink("ai-fix-assessments-thumbnail.png"),wistiaEmbedPermissionValue:s.selectWistiaEmbedPermissionValue(),wistiaEmbedPermissionStatus:s.selectWistiaEmbedPermissionStatus()}}),[]),n=ao({premium:e,woo:s}),l=(0,a.useMemo)((()=>({src:r,width:"432",height:"244"})),[r]),{setWistiaEmbedPermission:c}=(0,v.useDispatch)(Te),p=(0,a.useMemo)((()=>({value:o,status:i,set:c})),[o,i,c]);return(0,d.jsx)(bs,{learnMoreLink:t,thumbnail:l,wistiaEmbedPermission:p,...n})},co=e=>{let s=[...e];return e.forEach((e=>{e.innerBlocks&&e.innerBlocks.length>0&&(s=[...s,...co(e.innerBlocks)])})),s};I.noop,I.noop,I.noop,window.yoast.externals.redux;const po=({id:s,isPremium:t=!1})=>{const o=s+"AIFixes",[i,,,n,l]=(0,le.useToggleState)(!1),{activeMarker:c,activeAIButtonId:p,editorType:u,isWooSeoUpsellPost:h}=(0,v.useSelect)((e=>({activeMarker:e("yoast-seo/editor").getActiveMarker(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton(),editorType:e("yoast-seo/editor").getEditorType(),isWooSeoUpsellPost:e("yoast-seo/editor").getIsWooSeoUpsell()})),[]),m=(()=>{const e=(0,v.useSelect)((e=>e("yoast-seo/editor").getEditorType()),[]);return"blockEditor"===e?(0,v.useSelect)((e=>e("core/edit-post").getEditorMode()),[]):"classicEditor"===e?function(){const e=document.getElementById("wp-content-wrap");return!!e&&e.classList.contains("html-active")}()?"text":"visual":""})(),g=!t||h,{setActiveAIFixesButton:y,setActiveMarker:x,setMarkerPauseStatus:w,setMarkerStatus:f}=(0,v.useDispatch)("yoast-seo/editor"),b=(0,a.useRef)(null),[k,_]=(0,a.useState)(""),j=(0,e.__)("Optimize with AI","wordpress-seo"),S=(0,e.__)("Please switch to the visual editor to optimize with AI.","wordpress-seo"),C=p===o,{isEnabled:E,ariaLabel:R}=(0,v.useSelect)((e=>{if(null!==p&&!C)return{isEnabled:!1,ariaLabel:null};const s=e("yoast-seo/editor").getDisabledAIFixesButtons();if(Object.keys(s).includes(o))return{isEnabled:!1,ariaLabel:s[o]};if("visual"!==m)return{isEnabled:!1,ariaLabel:S};if("blockEditor"===u){const s=co(e("core/block-editor").getBlocks()).every((s=>"visual"===e("core/block-editor").getBlockMode(s.clientId)));return{isEnabled:s,ariaLabel:s?j:S}}return{isEnabled:!0,ariaLabel:j}}),[C,p,m]),L=()=>{c&&(x(null),w(!1),window.YoastSEO.analysis.applyMarks(new X.Paper("",{}),[])),o===p?(y(null),f("enabled")):(y(o),f("disabled")),_("")},M=(0,a.useCallback)((()=>{g?n():((0,ue.doAction)("yoast.ai.fixAssessments",o),L())}),[L,n]),N=(0,a.useCallback)((()=>{R&&_("yoast-tooltip yoast-tooltip-multiline "+(E?"yoast-tooltip-w":"yoast-tooltip-nw"))}),[E,R]),I=(0,a.useCallback)((()=>{_("")}),[]);return(0,d.jsxs)(r.IconAIFixesButton,{onClick:M,ariaLabel:R,onPointerEnter:N,onPointerLeave:I,id:o,className:`ai-button ${k}`,pressed:C,disabled:!E,children:[g&&(0,d.jsx)(pe,{className:"yst-fixes-button__lock-icon yst-text-amber-900"}),(0,d.jsx)(r.SparklesIcon,{pressed:C}),i&&(0,d.jsx)(le.Modal,{className:"yst-introduction-modal",isOpen:i,onClose:l,initialFocus:b,children:(0,d.jsx)(le.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl yst-introduction-modal-panel",children:(0,d.jsx)(lo,{onClose:l,focusElementRef:b})})})]})};po.propTypes={id:n().string.isRequired,isPremium:n().bool};const uo=po,ho=(e,s,t)=>{const r=document.body.classList.contains("elementor-editor-active");return e&&!s&&!r&&!t},mo=c().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,go=c().div`
	padding: 16px;
`,yo=c()(N)`
	margin: -8px 0 -4px 4px;
`;class xo extends a.Component{constructor(...e){super(...e),J(this,"renderAIOptimizeButton",((e,s)=>{const{isElementor:t,isAiFeatureEnabled:r,isTerm:o}=this.props,i=Ne().isPremium;if(!i||r)return ho(e,t,o)&&(0,d.jsx)(uo,{id:s,isPremium:i})}))}renderResults(s){return(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(mo,{children:[(0,e.__)("Analysis results","wordpress-seo"),(0,d.jsx)(yo,{href:wpseoAdminL10n["shortlinks.readability_analysis_info"],className:"dashicons",children:(0,d.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,e.__)("Learn more about the readability analysis","wordpress-seo")})})]}),(0,d.jsx)(Re,{results:this.props.results,upsellResults:s,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_readability_analysis",shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.renderAIOptimizeButton})]})}getUpsellResults(s,t){let r=wpseoAdminL10n["shortlinks.upsell.metabox.word_complexity"];return"sidebar"===s&&(r=wpseoAdminL10n["shortlinks.upsell.sidebar.word_complexity"]),r=(0,_.addQueryArgs)(r,{context:t}),function(){const e=X.helpers.getLanguagesWithWordComplexity(),s=window.wpseoScriptData.metabox.contentLocale,t=X.languageProcessing.getLanguage(s);return e.includes(t)}()?[{score:0,rating:"upsell",hasMarks:!1,id:"wordComplexity",text:(0,e.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Word complexity', %2$s is a closing span tag.
       %3$s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,e.__)("%1$sWord complexity%2$s: Is your vocabulary suited for a larger audience? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${r}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"wordComplexity"}]:[]}render(){const s=Le(this.props.overallScore);return(0,I.isNil)(this.props.overallScore)&&(s.className="loading"),(0,d.jsx)(k.LocationConsumer,{children:t=>(0,d.jsx)(k.RootContext.Consumer,{children:({locationContext:r})=>{let o=[];return this.props.shouldUpsell&&(o=this.getUpsellResults(t,r)),"sidebar"===t?(0,d.jsx)(x,{title:(0,e.__)("Readability analysis","wordpress-seo"),titleScreenReaderText:s.screenReaderReadabilityText,prefixIcon:te(s.className),prefixIconCollapsed:te(s.className),id:`yoast-readability-analysis-collapsible-${t}`,children:this.renderResults(o)}):"metabox"===t?(0,d.jsx)(Me,{target:"wpseo-metabox-readability-root",children:(0,d.jsxs)(go,{children:[(0,d.jsx)(ne,{target:"wpseo-readability-score-icon",scoreIndicator:s.className}),this.renderResults(o)]})}):void 0}})})}}xo.propTypes={results:n().array.isRequired,marksButtonStatus:n().string.isRequired,overallScore:n().number,shouldUpsell:n().bool,shouldUpsellHighlighting:n().bool,isAiFeatureEnabled:n().bool,isElementor:n().bool,isTerm:n().bool},xo.defaultProps={overallScore:null,shouldUpsell:!1,shouldUpsellHighlighting:!1,isAiFeatureEnabled:!1,isElementor:!1,isTerm:!1};const wo=(0,v.withSelect)((e=>{const{getReadabilityResults:s,getMarkButtonStatus:t,getIsElementorEditor:r,getIsAiFeatureEnabled:o,getIsTerm:i}=e("yoast-seo/editor");return{...s(),marksButtonStatus:t(),isElementor:r(),isAiFeatureEnabled:o(),isTerm:i()}}))(xo),fo=c().p`
	color: ${M.colors.$color_upsell_text};
	margin: 0;
	padding-right: 8px;
`,bo=c().div`
	font-size: 1em;
	display: flex;
	flex-direction: ${e=>"horizontal"===e.alignment?"row":"column"};
	${(0,o.getDirectionalStyle)("border-left","border-right")}: 4px solid ${M.colors.$color_pink_dark};
	margin: 16px 0;
	padding: 0 0 0 8px;
	max-width: 600px;

	> ${fo} {
		margin-bottom: ${e=>"vertical"===e.alignment&&"16px"};
	}
`,vo=c()(r.SvgIcon)`
	margin: ${(0,o.getDirectionalStyle)("0 0 0 4px","0 4px 0 0")};
	transform: ${(0,o.getDirectionalStyle)("rotate(0deg)","rotate(180deg)")};
`,ko=(0,o.makeOutboundLink)(r.UpsellLinkButton),_o=s=>{const{alignment:t,url:r}=s;return(0,d.jsxs)(bo,{alignment:t,children:[(0,d.jsx)(fo,{children:(0,e.sprintf)(/* translators: %s expands to Yoast SEO Premium */
(0,e.__)("%s looks at more than just your main keyword. It analyzes different word forms, plurals, and past tenses. This helps your website perform even better in searches!","wordpress-seo"),"Yoast SEO Premium")}),(0,d.jsx)("div",{children:(0,d.jsxs)(ko,{href:r,className:"UpsellLinkButton","data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:[(0,e.sprintf)(/* translators: %s expands to Premium */
(0,e.__)("Go %s!","wordpress-seo"),"Premium"),(0,d.jsx)(vo,{icon:"arrow-right",size:"8px",color:M.colors.$color_black})]})})]})};_o.propTypes={alignment:n().oneOf(["horizontal","vertical"]),url:n().string.isRequired},_o.defaultProps={alignment:"vertical"};const jo=_o,So=({location:s})=>{const[t,,,r,o]=(0,le.useToggleState)(!1),i="sidebar"===s.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_synonyms_button":"shortlinks.upsell.metabox.focus_keyword_synonyms_button";return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",onClick:r,className:"button-link yst-block",id:`yoast-keyword-synonyms-button-${s}`,children:`+ ${(0,e.__)("Add synonyms","wordpress-seo")}`}),(0,d.jsx)(Se,{isOpen:t,closeModal:o,upsellLink:i,id:`yoast-synonyms-upsell-modal-${s}`})]})},Co=({isOpen:s,closeModal:t,id:r,upsellLink:o})=>(0,d.jsx)(je,{isOpen:s,onClose:t,id:r,upsellLink:o,title:(0,e.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,e.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,e.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,e.__)("Target multiple keyphrases","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Eo=({location:s,locationContext:t})=>{const[r,,,o,i]=(0,le.useToggleState)(!1),n="sidebar"===s.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_additional_button":"shortlinks.upsell.metabox.focus_keyword_additional_button",a=(0,_.addQueryArgs)(wpseoAdminL10n[n],{context:t});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{type:"button",onClick:o,className:"button-link yst-block",id:`yoast-keyword-related-keyphrase-button-${s}`,children:`+ ${(0,e.__)("Add related keyphrase","wordpress-seo")}`}),(0,d.jsx)(Co,{isOpen:r,closeModal:i,id:`yoast-related-keyphrase-upsell-modal-${s}`,upsellLink:a})]})};function Ro({location:e}){return(0,d.jsx)(s.Slot,{name:`yoast-synonyms-${e}`})}Ro.propTypes={location:n().string.isRequired};const Lo=c().span`
	font-size: 1em;
	font-weight: bold;
	margin: 1.5em 0 1em;
	display: block;
`;class Mo extends a.Component{constructor(...e){super(...e),J(this,"renderAIOptimizeButton",((e,s)=>{const{isElementor:t,isAiFeatureEnabled:r,isPremium:o,isTerm:i}=this.props;if(!o||r)return ho(e,t,i)&&(0,d.jsx)(uo,{id:s,isPremium:o})}))}renderWordFormsUpsell(e,s){let t="sidebar"===e?wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_sidebar"]:wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_metabox"];return t=(0,_.addQueryArgs)(t,{context:s}),(0,d.jsx)(jo,{url:t,alignment:"sidebar"===e?"vertical":"horizontal"})}renderTabIcon(e,s){return"metabox"!==e?null:(0,d.jsx)(ne,{target:"wpseo-seo-score-icon",scoreIndicator:s})}getUpsellResults(s,t){let r=wpseoAdminL10n["shortlinks.upsell.metabox.keyphrase_distribution"];return"sidebar"===s&&(r=wpseoAdminL10n["shortlinks.upsell.sidebar.keyphrase_distribution"]),r=(0,_.addQueryArgs)(r,{context:t}),[{score:0,rating:"upsell",hasMarks:!1,hasJumps:!1,id:"keyphraseDistribution",text:(0,e.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Keyphrase distribution', %2$s is a closing span tag.
     %3%s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,e.__)("%1$sKeyphrase distribution%2$s: Have you evenly distributed your focus keyphrase throughout the whole text? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${r}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"keyphraseDistribution"}]}render(){const s=Le(this.props.overallScore),{isPremium:t}=this.props;return"loading"!==s.className&&""===this.props.keyword&&(s.className="na",s.screenReaderReadabilityText=(0,e.__)("Enter a focus keyphrase to calculate the SEO score","wordpress-seo")),(0,d.jsx)(k.LocationConsumer,{children:r=>(0,d.jsx)(k.RootContext.Consumer,{children:({locationContext:o})=>{const i="metabox"===r?g:x;let n=[];return this.props.shouldUpsell&&(n=this.getUpsellResults(r,o)),(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(i,{title:t?(0,e.__)("Premium SEO analysis","wordpress-seo"):(0,e.__)("SEO analysis","wordpress-seo"),titleScreenReaderText:s.screenReaderReadabilityText,prefixIcon:te(s.className),prefixIconCollapsed:te(s.className),subTitle:this.props.keyword,id:`yoast-seo-analysis-collapsible-${r}`,children:[(0,d.jsx)(Ro,{location:r}),this.props.shouldUpsell&&(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)(So,{location:r}),(0,d.jsx)(Eo,{location:r,locationContext:o})]}),this.props.shouldUpsellWordFormRecognition&&this.renderWordFormsUpsell(r,o),(0,d.jsx)(Lo,{children:(0,e.__)("Analysis results","wordpress-seo")}),(0,d.jsx)(Re,{results:this.props.results,upsellResults:n,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",editButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,location:r,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_seo_analysis",renderAIOptimizeButton:this.renderAIOptimizeButton})]}),this.renderTabIcon(r,s.className)]})}})})}}Mo.propTypes={results:n().array,marksButtonStatus:n().string,keyword:n().string,shouldUpsell:n().bool,shouldUpsellWordFormRecognition:n().bool,overallScore:n().number,shouldUpsellHighlighting:n().bool,isElementor:n().bool,isAiFeatureEnabled:n().bool,isPremium:n().bool,isTerm:n().bool},Mo.defaultProps={results:[],marksButtonStatus:null,keyword:"",shouldUpsell:!1,shouldUpsellWordFormRecognition:!1,overallScore:null,shouldUpsellHighlighting:!1,isElementor:!1,isAiFeatureEnabled:!1,isPremium:!1,isTerm:!1};const No=(0,v.withSelect)(((e,s)=>{const{getFocusKeyphrase:t,getMarksButtonStatus:r,getResultsForKeyword:o,getIsElementorEditor:i,getIsPremium:n,getIsAiFeatureEnabled:a,getIsTerm:l}=e("yoast-seo/editor"),c=t();return{...o(c),marksButtonStatus:s.hideMarksButtons?"disabled":r(),keyword:c,isElementor:i(),isPremium:n(),isAiFeatureEnabled:a(),isTerm:l()}}))(Mo);function Io(){const e=Ne();return(0,I.get)(e,"multilingualPluginActive",!1)}const To=c().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,Po=c().div`
	padding: 16px;
`,Ao=c()(N)`
	margin: -8px 0 -4px 4px;
`,Oo=c().p`
	min-height: 24px;
	margin: 12px 0 0 0;
	padding: 0;
	display: flex;
	align-items: flex-start;
`,Fo=c()(r.SvgIcon)`
	margin: 3px 11px 0 0; // icon 13 + 11 right margin = 24 for the 8px grid.
`,$o=s=>{const t=wpseoAdminL10n["shortlinks.inclusive_language_analysis_info"];function o(){return(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(To,{children:[(0,e.__)("Analysis results","wordpress-seo"),(0,d.jsx)(Ao,{href:t,className:"dashicons",children:(0,d.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,e.__)("Learn more about the inclusive language analysis","wordpress-seo")})})]}),(0,d.jsx)(Re,{results:s.results,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:s.marksButtonStatus,resultCategoryLabels:{problems:(0,e.__)("Non-inclusive","wordpress-seo"),improvements:(0,e.__)("Potentially non-inclusive","wordpress-seo")},highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_inclusive_analysis",shouldUpsellHighlighting:s.shouldUpsellHighlighting})]})}const i=he((0,e.sprintf)(/* Translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag. */
(0,e.__)("%1$sInclusive language%2$s: We haven't detected any potentially non-inclusive phrases. Great work!","wordpress-seo"),"<a>","</a>"),{a:(0,d.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})});function n(){const s=(0,e.__)("We noticed that you are using a multilingual plugin. Please be aware that this analysis feedback is intended only for texts written in English.","wordpress-seo");return(0,d.jsx)(r.Alert,{type:"info",children:s})}function l(){return(0,d.jsxs)(a.Fragment,{children:[(0,d.jsxs)(To,{children:[(0,e.__)("Analysis results","wordpress-seo"),(0,d.jsx)(Ao,{href:t,className:"dashicons",children:(0,d.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */
(0,e.__)("Learn more about the inclusive language analysis","wordpress-seo")})})]}),(0,d.jsxs)(Oo,{children:[(0,d.jsx)(Fo,{icon:"circle",color:"#7ad03a",size:"13px"}),(0,d.jsx)("span",{children:i})]})]})}const c=Le(s.overallScore);return(0,I.isNil)(s.overallScore)&&(c.className="loading"),(0,d.jsx)(k.LocationConsumer,{children:t=>{return"sidebar"===t?(r=s.results,i=c,(0,d.jsxs)(x,{title:(0,e.__)("Inclusive language","wordpress-seo"),titleScreenReaderText:i.screenReaderInclusiveLanguageText,prefixIcon:te(i.className),prefixIconCollapsed:te(i.className),id:"yoast-inclusive-language-analysis-collapsible-sidebar",children:[Io()?n():null,r.length>=1?o():l()]})):"metabox"===t?function(e,s){return(0,d.jsx)(oe,{target:"wpseo-metabox-inclusive-language-root",children:(0,d.jsxs)(Po,{children:[(0,d.jsx)(ne,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:s.className}),Io()?n():null,e.length>=1?o():l()]})})}(s.results,c):void 0;var r,i}})};$o.propTypes={results:n().array,marksButtonStatus:n().oneOf(["enabled","disabled","hidden"]).isRequired,overallScore:n().number,shouldUpsellHighlighting:n().bool},$o.defaultProps={results:[],overallScore:null,shouldUpsellHighlighting:!1};const Bo=(0,v.withSelect)((e=>{const{getInclusiveLanguageResults:s,getMarkButtonStatus:t}=e("yoast-seo/editor");return{...s(),marksButtonStatus:t()}}))($o);window.yoast=window.yoast||{},window.yoast.externals=window.yoast.externals||{},window.yoast.externals.components={CollapsibleCornerstone:f,KeywordInput:Z,ReadabilityAnalysis:wo,SeoAnalysis:No,InclusiveLanguageAnalysis:Bo}})()})();