Edit file File name : wp-seo-premium-elementor-2280.min.js Content :(()=>{"use strict";var e={865:(e,t,s)=>{var r="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},o=a(s(609)),n=a(s(848)),i=a(s(812));function a(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function c(e,t){var s,i,a,d,u,p,m,y,g=[],h={};for(p=0;p<e.length;p++)if("string"!==(u=e[p]).type){if(!t.hasOwnProperty(u.value)||void 0===t[u.value])throw new Error("Invalid interpolation, missing component node: `"+u.value+"`");if("object"!==r(t[u.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+u.value+"`","\n> "+l);if("componentClose"===u.type)throw new Error("Missing opening component token: `"+u.value+"`");if("componentOpen"===u.type){s=t[u.value],a=p;break}g.push(t[u.value])}else g.push(u.value);return s&&(d=function(e,t){var s,r,o=t[e],n=0;for(r=e+1;r<t.length;r++)if((s=t[r]).value===o.value){if("componentOpen"===s.type){n++;continue}if("componentClose"===s.type){if(0===n)return r;n--}}throw new Error("Missing closing component token `"+o.value+"`")}(a,e),m=c(e.slice(a+1,d),t),i=o.default.cloneElement(s,{},m),g.push(i),d<e.length-1&&(y=c(e.slice(d+1),t),g=g.concat(y))),1===g.length?g[0]:(g.forEach((function(e,t){e&&(h["interpolation-child-"+t]=e)})),(0,n.default)(h))}t.A=function(e){var t=e.mixedString,s=e.components,o=e.throwErrors;if(l=t,!s)return t;if("object"!==(void 0===s?"undefined":r(s))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var n=(0,i.default)(t);try{return c(n,s)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},812:e=>{function t(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(t)}},848:(e,t,s)=>{var r=s(609),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,n=s(650),i=s(163),a=s(759),l=".",c=":",d="function"==typeof Symbol&&Symbol.iterator,u="@@iterator";function p(e,t){return e&&"object"==typeof e&&null!=e.key?(s=e.key,r={"=":"=0",":":"=2"},"$"+(""+s).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var s,r}function m(e,t,s,r){var n,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),null===e||"string"===a||"number"===a||"object"===a&&e.$$typeof===o)return s(r,e,""===t?l+p(e,0):t),1;var y=0,g=""===t?l:t+c;if(Array.isArray(e))for(var h=0;h<e.length;h++)y+=m(n=e[h],g+p(n,h),s,r);else{var w=function(e){var t=e&&(d&&e[d]||e[u]);if("function"==typeof t)return t}(e);if(w)for(var f,k=w.call(e),b=0;!(f=k.next()).done;)y+=m(n=f.value,g+p(n,b++),s,r);else if("object"===a){var E=""+e;i(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===E?"object with keys {"+Object.keys(e).join(", ")+"}":E,"")}}return y}var y=/\/+/g;function g(e){return(""+e).replace(y,"$&/")}var h,w,f=k,k=function(e){var t=this;if(t.instancePool.length){var s=t.instancePool.pop();return t.call(s,e),s}return new t(e)};function b(e,t,s,r){this.result=e,this.keyPrefix=t,this.func=s,this.context=r,this.count=0}function E(e,t,s){var o,i,a=e.result,l=e.keyPrefix,c=e.func,d=e.context,u=c.call(d,t,e.count++);Array.isArray(u)?v(u,a,s,n.thatReturnsArgument):null!=u&&(r.isValidElement(u)&&(o=u,i=l+(!u.key||t&&t.key===u.key?"":g(u.key)+"/")+s,u=r.cloneElement(o,{key:i},void 0!==o.props?o.props.children:void 0)),a.push(u))}function v(e,t,s,r,o){var n="";null!=s&&(n=g(s)+"/");var i=b.getPooled(t,n,r,o);!function(e,t,s){null==e||m(e,"",t,s)}(e,E,i),b.release(i)}b.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h=function(e,t,s,r){var o=this;if(o.instancePool.length){var n=o.instancePool.pop();return o.call(n,e,t,s,r),n}return new o(e,t,s,r)},(w=b).instancePool=[],w.getPooled=h||f,w.poolSize||(w.poolSize=10),w.release=function(e){var t=this;i(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return a(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return a(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;i(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var s in e)v(e[s],t,s,n.thatReturnsArgument);return t}},650:e=>{function t(e){return function(){return e}}var s=function(){};s.thatReturns=t,s.thatReturnsFalse=t(!1),s.thatReturnsTrue=t(!0),s.thatReturnsNull=t(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(e){return e},e.exports=s},163:e=>{e.exports=function(e,t,s,r,o,n,i,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[s,r,o,n,i,a],d=0;(l=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},759:(e,t,s)=>{var r=s(650);e.exports=r},609:e=>{e.exports=window.React}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={};s.r(e),s.d(e,{ADD_RELATED_KEYWORD:()=>K,CHANGE_RELATED_KEYWORD:()=>M,CLOSE_REDIRECT_NOTIFICATION:()=>ss,LOAD_LINK_SUGGESTIONS:()=>c,LOAD_MORPHOLOGY_DATA:()=>Jt,LOAD_MORPHOLOGY_DATA_ERROR:()=>Qt,REMOVE_RELATED_KEYWORD:()=>F,SET_LINK_SUGGESTIONS:()=>d,SET_LINK_SUGGESTIONS_ERROR:()=>u,SET_MESSAGE_DATA:()=>p,SET_PROMINENT_WORDS:()=>zt,SET_REDIRECT_NOTIFICATION:()=>ts,SET_RELATED_KEYWORDS:()=>D,SET_RELATED_KEYWORD_RESULTS:()=>I,SET_RELATED_KEYWORD_SYNONYMS:()=>N,SET_SYNONYMS:()=>ns,SET_TEXT_FORMALITY_LEVEL:()=>Gt,SET_WORDS_FOR_LINKING:()=>m,addRelatedKeyword:()=>U,changeRelatedKeyword:()=>C,closeRedirectNotification:()=>os,loadLinkSuggestions:()=>y,loadMorphologyData:()=>Zt,removeRelatedKeyword:()=>W,setLinkSuggestions:()=>g,setLinkSuggestionsError:()=>h,setLoadMorphologyDataError:()=>es,setMessageData:()=>w,setProminentWords:()=>Ht,setRedirectNotification:()=>rs,setRelatedKeywordResults:()=>Y,setRelatedKeywordSynonyms:()=>q,setRelatedKeywords:()=>j,setSynonyms:()=>is,setTextFormalityLevel:()=>Xt,setWordsForLinking:()=>f});var t={};s.r(t),s.d(t,{insights:()=>as,linkSuggestions:()=>cs,metaboxWarning:()=>us,preferences:()=>ps,redirectNotification:()=>ys,relatedKeywords:()=>ks,synonyms:()=>bs});var r={};s.r(r),s.d(r,{getFirstAvailableKey:()=>Us,getIsRedirectNotificationOpen:()=>Fs,getKeywordData:()=>Is,getKeywords:()=>Ns,getLinkSuggestions:()=>Rs,getLinkSuggestionsMessageData:()=>xs,getMetaboxWarning:()=>As,getMetaboxWarningIsLoading:()=>Os,getPreference:()=>Ks,getPreferences:()=>Ds,getProminentWords:()=>vs,getRedirectData:()=>Ms,getSynonyms:()=>Cs,getTextFormalityLevel:()=>Ss,getWordsForLinking:()=>Ts,linkSuggestionsAreLoading:()=>Ls,linkSuggestionsAreUnindexed:()=>Ps});const o=window.wp.data,n=window.wp.hooks,i=window.yoast.featureFlag,a=window.lodash;function l(){return window.wpseoPremiumMetaboxData.data.restApi.available&&window.wpseoPremiumMetaboxData.data.restApi.contentEndpointsAvailable&&"enabled"===window.wpseoPremiumMetaboxData.data.linkSuggestionsEnabled&&window.wpseoPremiumMetaboxData.data.linkSuggestionsAvailable}const c="LOAD_LINK_SUGGESTIONS",d="SET_LINK_SUGGESTIONS",u="SET_LINK_SUGGESTIONS_ERROR",p="SET_MESSAGE_DATA",m="SET_WORDS_FOR_LINKING";function y(){return{type:c}}function g(e,t){return{type:d,linkSuggestions:e,showUnindexedWarning:t}}function h(e){return{type:u,message:e}}function w(e){return{type:p,messageData:e}}function f(e){return{type:m,wordsForLinking:e}}function k(e){const t={};return e.forEach((function(e){t[e.getStem()]=e.getOccurrences()})),t}const b=class{constructor({dispatch:e,rootUrl:t,nonce:s,showUnindexedWarning:r,currentObjectId:o,currentObjectType:n,maxWordsToSave:i}){this.dispatch=e,this._rootUrl=t,this._nonce=s,this._showUnindexedWarning=r,this._currentObjectId=o,this._currentObjectType=n,this._maxWordsToSave=i,this.wordsForLinking=[],this.linkSuggestions=!1,this.linkSuggestionsRequest=!1,this.update=this.update.bind(this)}subscribe(){this.update(),jQuery(window).on("YoastSEO:numericScore",this.update)}unsubscribe(){jQuery(window).off("YoastSEO:numericScore",this.update)}update(){YoastSEO.analysis.worker.runResearch("getProminentWordsForInternalLinking").then((({result:e})=>this.setWordsForLinkingOnStore(e))).then((e=>this.retrieveLinkSuggestions(e))).then((e=>this.formatLinkSuggestions(e))).then((e=>this.setLinkingSuggestionsOnStore(e))),this.updateUsedLinks()}setWordsForLinkingOnStore(e){const t=e.prominentWords.slice(0,this._maxWordsToSave);return this.dispatchMessageData(e),this.dispatchWordsForLinking(t),t}dispatchMessageData(e){this.dispatch(w(e))}dispatchWordsForLinking(e){this.dispatch(f(e))}dispatchLinkSuggestions(e,t){this.dispatch(g(e,t))}formatLinkSuggestions(e){return this.linkSuggestions=e,e=this.markUsedLinks(e),this.constructor.mapSuggestionsForStore(e)}setLinkingSuggestionsOnStore(e){this.dispatchLinkSuggestions(e,this._showUnindexedWarning)}retrieveLinkSuggestions(e){return(0,a.isEqual)([],e)?Promise.resolve([]):this.linkSuggestions&&(0,a.isEqual)(e,this.wordsForLinking)?Promise.resolve(this.linkSuggestions):(this.linkSuggestionsRequest&&(0,a.isEqual)(e,this.wordsForLinking)||(this.wordsForLinking=e,this.linkSuggestionsRequest=new Promise(((t,s)=>{const r={prominent_words:k(e),object_id:this._currentObjectId,object_type:this._currentObjectType};jQuery.ajax({type:"GET",url:this._rootUrl+"yoast/v1/link_suggestions?"+jQuery.param(r),beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",this._nonce)},dataType:"json",success:e=>{t(e)},error:e=>{s(e)},complete:()=>{this.linkSuggestionsRequest=!1}})}))),this.linkSuggestionsRequest)}static mapSuggestionsForStore(e){return e.map((e=>({value:e.title,url:e.link,isActive:e.active,labels:e.labels})))}updateUsedLinks(){YoastSEO.analysis.worker.runResearch("getLinks").then((({result:e})=>{if(this.usedLinks=e,this.linkSuggestions&&this.linkSuggestions.length>0){const e=this.formatLinkSuggestions(this.linkSuggestions);this.setLinkingSuggestionsOnStore(e)}}))}markUsedLinks(e){const t=this.usedLinks||[];return e.forEach((e=>{e.active=t.includes(e.link)})),e}},E=l(),v=window.yoast.analysis;var S=s(609),_=s(865);const R=window.wp.i18n,L=window.yoast.helpers;function P(){window.location.reload()}class T{constructor({siteUrl:e,setError:t,language:s,pluginVersion:r="22.8"}){this._siteUrl=e,this._setError=t,this._requestUrl=function(e){const t={en:"v5",de:"v10",es:"v10",fr:"v11",it:"v10",nl:"v9",ru:"v10",id:"v9",pt:"v9",pl:"v9",ar:"v9",sv:"v1",he:"v1",hu:"v2",nb:"v1",tr:"v1",cs:"v1",sk:"v1",el:"v1",ja:"v1"};return!!Object.keys(t).includes(e)&&`https://my.yoast.com/api/downloads/file/morphology-${e}-${t[e]}`}(s),this._pluginVersion=r}injectMorphologyData(){this.retrieveData(this._requestUrl,this._siteUrl,this._pluginVersion).then((e=>{YoastSEO.analysis.worker.initialize({researchData:{morphology:e}}).then((()=>{(0,o.dispatch)("yoast-seo/editor").runAnalysis()}))})).catch((e=>{if(false){const e=(0,L.makeOutboundLink)(),t=(0 /* Translators: {{activateLink}}: Link start tag to a Yoast.com article, {{/activateLink}}: Link closing tag, {{reloadButton}}: Button start tag to reload the page, {{/reloadButton}} Button closing tag. */,_.A)({mixedString:(0,R.__)("An error occurred: the Premium SEO analysis isn't working as expected. Please {{activateLink}}activate your subscription in MyYoast{{/activateLink}} and then {{reloadButton}}reload this page{{/reloadButton}} to make it work properly.","wordpress-seo-premium"),components:{activateLink:(0,S.createElement)(e,{href:wpseoAdminL10n["shortlinks.activate_premium_info"]}),reloadButton:(0,S.createElement)("button",{type:"button",className:"button-link",onClick:P})}});this._setError(t)}}))}retrieveData(e,t,s){return new Promise(((r,o)=>{jQuery.ajax({type:"GET",url:e,data:{plugin_version:s,site:t},dataType:"json",success:e=>{r(e)},error:e=>{o(e)}})}))}}const x=window.yoast.editorModules.analysis.getContentLocale,O=e=>{(0,o.dispatch)("yoast-seo-premium/editor").setLoadMorphologyDataError(e)};function A(e){const t=e.getResponseHeader("x-yoast-redirect-created");if(t){const e=t.split(";").map((e=>e.split("=").map((e=>e.trim())))).reduce(((e,t)=>{const s=t[0],r=t[1]||!0;return e[s]=r,e}),{});(0,o.dispatch)("yoast-seo-premium/editor").setRedirectNotification(e)}}const K="ADD_RELATED_KEYWORD",D="SET_RELATED_KEYWORDS",M="CHANGE_RELATED_KEYWORD",F="REMOVE_RELATED_KEYWORD",I="SET_RELATED_KEYWORD_RESULTS",N="SET_RELATED_KEYWORD_SYNONYMS";function U(e){return{type:K,keyword:e}}function C(e,t){return{type:M,key:e,keyword:t}}function W(e){return{type:F,key:e}}function j(e){return{type:D,keywords:e}}function Y(e,t,s,r){return{type:I,key:e,keyword:t,results:s,score:r}}function q(e,t){return{type:N,key:e,synonyms:t}}const{refreshDelay:B}=window.yoast.editorModules.analysis.constants,{sortResultsByIdentifier:$}=window.yoast.editorModules.analysis.refreshAnalysis;class V{constructor(){this.analyze=(0,a.debounce)(this.analyze,B)}static getAnalysis(){return YoastSEO.analysis}static getRelevantData(e){const t={};return(0,a.forEach)(e.relatedKeywords.keywords,(({keyword:e,synonyms:s},r)=>{(0,a.isString)(s)||(s=""),t[r]={keyword:e,synonyms:s}})),t}static shouldAnalyze(e,t){return!(0,a.isEqual)(e,t)}analyze(e,t){const{worker:s,collectData:r,applyMarks:o}=V.getAnalysis();let n=r();n instanceof v.Paper==0&&(n=v.Paper.parse(n));const i=V.getRelevantData(e);s.analyzeRelatedKeywords(n,i).then((({result:{seo:e}})=>{e&&(0,a.forEach)(e,(({results:e,score:s},r)=>{""!==r&&void 0!==i[r]&&void 0!==i[r].keyword&&(e=$(e),(0,a.forEach)(e,(e=>{e.getMarker=()=>()=>o(n,e.marks)})),t(Y(r,i[r].keyword,e,s)))}))})).catch((e=>console.warn(e)))}}class z{static get relatedKeyphrasesElement(){return document.getElementById(window.wpseoScriptData.isPost?"yoast_wpseo_focuskeywords":"hidden_wpseo_focuskeywords")}static get synonymsElement(){return document.getElementById(window.wpseoScriptData.isPost?"yoast_wpseo_keywordsynonyms":"hidden_wpseo_keywordsynonyms")}static get relatedKeyphrases(){return z.relatedKeyphrasesElement.value}static set relatedKeyphrases(e){z.relatedKeyphrasesElement.value=e}static set synonyms(e){z.synonymsElement.value=e}static get synonyms(){return z.synonymsElement.value}}const G=function(e,t=[]){try{return JSON.parse(e)}catch(e){return t}};const H=window.wp.components,X=window.wp.element,J=window.yoast.styledComponents;var Q=s.n(J);const Z=Q().span` color: #a4286a; font-weight: 600; `,ee=()=>{const e=(0,o.useSelect)((e=>e("yoast-seo-premium/editor").getTextFormalityLevel()),[]),t=v.languageProcessing.sanitizeString((0,o.useSelect)((e=>e("yoast-seo/editor").getTextLength()),[]).text),s=(0,X.useMemo)((()=>(0,X.createInterpolateElement)((0,R.sprintf)( /* translators: %1$s expands to a starting `span` tag, %2$s expands to a closing `span` tag, %3$s expands to the formality level (either formal or informal). */ /* translators: %1$s expands to a starting `span` tag, %2$s expands to a closing `span` tag, %3$s expands to the formality level (either formal or informal). */ (0,R.__)("Overall, your text appears to be %1$s%3$s%2$s.","wordpress-seo-premium"),"<span>","</span>",e),{span:(0,S.createElement)(Z,null)})),[e]);return(0,S.createElement)("div",null,t.length<50&&(0,S.createElement)("div",null,(0,S.createElement)("p",null,(0,R.__)("Once you add a bit more copy, we'll be able to tell you the formality level of your text.","wordpress-seo-premium"))),t.length>=50&&(0,S.createElement)("div",null,(0,S.createElement)("p",null,s)))},te=window.wp.a11y,se=window.wp.url,re=window.yoast.propTypes;var oe=s.n(re);const ne=window.yoast.componentsNew,ie=window.yoast.styleGuide,ae=Q().div` display: flex; align-items: normal; min-height: 40px; margin: 10px 0 5px; `,le=(0,L.createSvgIconComponent)({copy:{viewbox:"0 0 448 512",path:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"},check:{viewbox:"0 0 512 512",path:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}),ce=Q().div` background-color: #e5e5e5; width: 100%; height: 1px; `,de=Q().button` box-sizing: border-box; flex: 0 0 30px; height: 30px; width: 30px; background-color: ${e=>e.iconBackground}; border-radius: 5px; cursor: pointer; outline: none; border: 1px solid ${e=>e.iconBorder}; margin-left: 3px; &:focus { box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); } `;de.props={iconBackground:oe().string,iconBorder:oe().string},de.defaultProps={iconBackground:ie.colors.$color_button,iconBorder:ie.colors.$color_button_border};const ue=Q().div` flex: auto; `,pe=(0,L.makeOutboundLink)(Q().a` text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; /* -webkit-box-orient: vertical; */ /* -moz-box-orient: vertical; */ max-height: 40px; margin-bottom: 4px; -webkit-box-orient: vertical; overflow: hidden; padding: 0 0 4px; `),me=Q().div` flex-wrap: wrap; display: flex; flex-direction: row; justify-content: unset; margin-top: 4px; `,ye=Q().span` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 3px 8px; font-size: 0.85em; background-color: #f3f4f5; border-radius: 2px; margin-bottom: 4px; margin-right: 4px; text-transform: lowercase; `,ge=({badges:e})=>(0,S.createElement)(me,null,e.map(((e,t)=>(0,S.createElement)(ye,{key:t},e))));ge.propTypes={badges:oe().array.isRequired};const he=({value:e,url:t,isActive:s,labels:r})=>{const o=(0,R.__)("Copy link","wordpress-seo-premium"),n=(0,R.sprintf)(/* translators: Hidden accessibility text; %s expands to the link value */ /* translators: Hidden accessibility text; %s expands to the link value */ (0,R.__)("Copy link to suggested article: %s","wordpress-seo-premium"),e),i=(0,X.useCallback)((e=>{e.nativeEvent.target.setAttribute("aria-label",n),e.nativeEvent.target.setAttribute("data-label",o)}),[n,o]);let a="copy",l=ie.colors.$color_black,c=ie.colors.$color_button,d="#979797";return s&&(a="check",l=ie.colors.$color_alert_success_text,c=ie.colors.$color_alert_success_background,d=ie.colors.$color_alert_success_background),(0,S.createElement)("div",null,(0,S.createElement)(ce,null),(0,S.createElement)(ae,{className:"yoast-link-suggestion__wrapper"},(0,S.createElement)(ue,{className:"yoast-link-suggestion__container"},(0,S.createElement)(pe,{href:t},e),(0,S.createElement)(ge,{badges:r})),(0,S.createElement)(de,{type:"button",className:"yoast-link-suggestion__copy yoast-tooltip yoast-tooltip-alt yoast-tooltip-s",onBlur:i,"data-clipboard-text":t,"aria-label":n,"data-label":o,iconBackground:c,iconBorder:d},(0,S.createElement)(le,{icon:a,color:l}),(0,S.createElement)(ne.ScreenReaderText,null,o))))};he.propTypes={value:oe().string.isRequired,url:oe().string.isRequired,isActive:oe().bool,labels:oe().array.isRequired},he.defaultProps={isActive:!1};const we=he,fe=Q().div` display: table-cell; `,ke=(0,R.__)("We could not find any relevant articles on your website that you could link to from your post.","wordpress-seo-premium"),be=(0,R.__)("To improve your site structure, consider linking to other relevant posts or pages on your website.","wordpress-seo-premium");let Ee;const ve=e=>{const t=(0,R.__)("Copied!","wordpress-seo-premium");e.trigger.focus(),e.trigger.setAttribute("aria-label",t),e.trigger.setAttribute("data-label",t),(0,te.speak)(t,"assertive")},Se=e=>{const t=(0,R.__)("Not supported!","wordpress-seo-premium");e.trigger.el.setAttribute("aria-label",t),e.trigger.setAttribute("data-label",t),(0,te.speak)(t,"assertive")},_e=({suggestions:e,maxSuggestions:t,customMessages:s,location:r})=>{const o=function(e){const t=(0,L.makeOutboundLink)(),s=(0,se.addQueryArgs)(wpseoAdminL10n["shortlinks.site_structure_metabox"],{context:e});return(0,_.A)({ // Translators: Text between {{a}} and {{/a}} will be a link to an article about site structure. mixedString:(0,R.__)("{{a}}Read our guide on internal linking for SEO{{/a}} to learn more.","wordpress-seo-premium"),components:{a:(0,S.createElement)(t,{href:s})}})}(r);if(0===e.length){let e=s.lengthMessage;return e=""===e?ke:e,(0,S.createElement)("div",null,(0,S.createElement)("p",null,e),(0,S.createElement)("p",null,s.metaMessage),(0,S.createElement)("p",null,o))}return e.length>t&&(e.length=t),(0,S.createElement)(fe,null,(0,S.createElement)("p",null,be," ",o),(0,S.createElement)("p",null,s.metaMessage),e.map(((e,t)=>(0,S.createElement)(we,{key:t,...e}))))};_e.propTypes={suggestions:oe().array.isRequired,maxSuggestions:oe().number,customMessages:oe().object,location:oe().string},_e.defaultProps={maxSuggestions:10,customMessages:{lengthMessage:"",metaMessage:""},location:""};const Re=()=>{window.open("admin.php?page=wpseo_tools&start-indexation=true","yoastSeoAnalyzeProminentWords")},Le=e=>{if((0,X.useEffect)((()=>(e.suggester.subscribe(),()=>{e.suggester.unsubscribe()})),[]),e.isLoading)return(0,S.createElement)("div",{className:"yoast-link-suggestions"},(0,S.createElement)("p",null,(0,R.__)("It takes a few seconds to show you a list of related content to which you could link. The suggestions will be shown here as soon as we have them.","wordpress-seo-premium")));Ee||(Ee=new ClipboardJS(".yoast-link-suggestion__copy"),Ee.on("success",ve),Ee.on("error",Se));let t=null;e.showUnindexedWarning&&(t=(()=>{ /* translators: 1: link to yoast.com post about internal linking suggestion. 2: is anchor closing. 3: button to the recalculation option. 4: closing button */ let e=(0,R.__)("We need to optimize your site’s SEO data so we can offer you the best %1$slinking suggestions%2$s.\n\n%3$sStart SEO Data optimization%4$s","wordpress-seo-premium");return e=e.replace("%1$s","{{a}}"),e=e.replace("%2$s","{{/a}}"),e=e.replace("%3$s","{{startAnalysis}}"),e=e.replace("%4$s","{{/startAnalysis}}"),e=e.replace("\n\n","{{br /}}{{br /}}"),e=(0,_.A)({mixedString:e,components:{a:(0,S.createElement)("a",{href:wpseoAdminL10n["shortlinks.notification_internal_link"],target:"_blank"}),startAnalysis:(0,S.createElement)("button",{type:"button",className:"button",onClick:Re}),br:(0,S.createElement)("br",null)}}),(0,S.createElement)("div",{className:"notice notice-warning notice-alt wpseo-notice-breakout-inside yoast-links-suggestions-notice"},(0,S.createElement)("p",null,e))})());const s=(e=>{let t="";e.hasWordsForLinking||(t=(0,R.__)("Once you add a bit more copy, we'll give you a list of related content here to which you could link in your post.","wordpress-seo-premium"));const s=((e,t,s)=>{switch(!0){case s&&!t&&""===e:return(0,R.__)("Add a title to your post for the best internal linking suggestions.","wordpress-seo-premium");case!s&&t&&""===e:return(0,R.__)("Add a metadescription to your post for the best internal linking suggestions.","wordpress-seo-premium");case!s&&!t&&""===e:return(0,R.__)("Add a title and a metadescription to your post for the best internal linking suggestions.","wordpress-seo-premium");case s&&!t&&""!==e:return(0,R.__)("Also, add a title to your post for the best internal linking suggestions.","wordpress-seo-premium");case!s&&t&&""!==e:return(0,R.__)("Also, add a metadescription to your post for the best internal linking suggestions.","wordpress-seo-premium");case!s&&!t&&""!==e:return(0,R.__)("Also, add a title and a metadescription to your post for the best internal linking suggestions.","wordpress-seo-premium")}})(t,e.hasTitle,e.hasMetaDescription);return{lengthMessage:t,metaMessage:s}})({...e.messageData,hasWordsForLinking:Array.isArray(e.wordsForLinking)&&e.wordsForLinking.length>0});return(0,S.createElement)("div",{className:"yoast-link-suggestions"},t,(0,S.createElement)(_e,{suggestions:e.suggestions,customMessages:s,location:e.location}))};Le.propTypes={suggester:oe().object,suggestions:oe().array.isRequired,wordsForLinking:oe().array,messageData:oe().object,isLoading:oe().bool.isRequired,showUnindexedWarning:oe().bool,location:oe().string},Le.defaultProps={suggester:null,showUnindexedWarning:!1,messageData:{hasMetaDescription:!1,hasTitle:!1},wordsForLinking:[],location:""};const Pe=Le,Te=(0,o.withSelect)((e=>{const{getLinkSuggestions:t,getWordsForLinking:s,getLinkSuggestionsMessageData:r,linkSuggestionsAreLoading:o,linkSuggestionsAreUnindexed:n}=e("yoast-seo-premium/editor");return{suggestions:t(),wordsForLinking:s(),messageData:r(),isLoading:o(),showUnindexedWarning:n()}}))(Pe),xe=window.wp.compose,Oe=e=>(0,S.createElement)(ne.NewButton,{variant:"secondary",small:!0,buttonRef:e.buttonRef,onClick:e.onAdd,disabled:e.disabled},(0,R.__)("Add as related keyphrase","wordpress-seo-premium"));Oe.propTypes={buttonRef:oe().object,onAdd:oe().func.isRequired,disabled:oe().bool},Oe.defaultProps={buttonRef:null,disabled:!1};const Ae=Oe,Ke=(0,X.forwardRef)(((e,t)=>(0,S.createElement)("button",{ref:t,className:"yoast-remove",onClick:e.onRemove},(0,R.__)("Remove","wordpress-seo-premium"))));class De extends X.Component{constructor(e){super(e),this.addButtonRef=(0,X.createRef)(),this.removeLinkRef=(0,X.createRef)(),this.addKeyphraseToList=this.addKeyphraseToList.bind(this),this.removeKeyphraseFromList=this.removeKeyphraseFromList.bind(this)}getAssociatedKeyphraseKey(e,t){const s=(0,a.find)(e,{keyword:t});return(0,a.isUndefined)(s)?"":s.key}keyphraseExists(e,t){return!(0,a.isUndefined)((0,a.find)(e,{keyword:t}))}relatedKeyphrasesLimitReached(){return this.props.relatedKeyphrases.length>=4}addKeyphraseToList(){""===this.getAssociatedKeyphraseKey(this.props.relatedKeyphrases,this.props.relatedKeyphrase)&&this.props.addKeyphrase(this.props.relatedKeyphrase)}removeKeyphraseFromList(){const e=this.getAssociatedKeyphraseKey(this.props.relatedKeyphrases,this.props.relatedKeyphrase);""!==e&&this.props.removeKeyphrase(e)}componentDidUpdate(e){const t=this.keyphraseExists(this.props.relatedKeyphrases,this.props.relatedKeyphrase),s=this.keyphraseExists(e.relatedKeyphrases,e.relatedKeyphrase);t&&!s&&this.removeLinkRef.current.focus(),!t&&s&&this.addButtonRef.current.focus()}render(){const e=this.props.relatedKeyphrase,t=this.props.relatedKeyphrases;return t&&this.keyphraseExists(t,e)?(0,S.createElement)(X.Fragment,null,(0,S.createElement)("span",{className:"yoast-modal__settings-saved"},(0,R.__)("Added!","wordpress-seo-premium")),(0,S.createElement)(Ke,{ref:this.removeLinkRef,onRemove:this.removeKeyphraseFromList})):(0,S.createElement)(Ae,{buttonRef:this.addButtonRef,disabled:this.relatedKeyphrasesLimitReached(),onAdd:this.addKeyphraseToList})}}De.propTypes={relatedKeyphrase:oe().string,relatedKeyphrases:oe().array,addKeyphrase:oe().func.isRequired,removeKeyphrase:oe().func.isRequired},De.defaultProps={relatedKeyphrase:"",relatedKeyphrases:[]};const Me=(0,o.withDispatch)((e=>{const{addRelatedKeyword:t,removeRelatedKeyword:s}=e("yoast-seo-premium/editor");return{addKeyphrase:t,removeKeyphrase:s}}))(De),Fe=window.yoast.editorModules.containers.SEMrushRelatedKeyphrases,Ie=(0,xe.compose)([(0,o.withSelect)((e=>({keyphrase:e("yoast-seo/editor").getFocusKeyphrase(),relatedKeyphrases:e("yoast-seo-premium/editor").getKeywords(),renderAction:(e,t)=>(0,S.createElement)(Me,{relatedKeyphrase:e,relatedKeyphrases:t})})))])(Fe);class Ne extends X.Component{render(){return this.props.isLoading||this.props.warning.length<1?null:(0,S.createElement)(ne.Warning,{message:[this.props.warning]})}}Ne.propTypes={warning:oe().array,isLoading:oe().bool},Ne.defaultProps={warning:[],isLoading:!1};const Ue=Ne,Ce=(0,o.withSelect)((e=>{const{getMetaboxWarningIsLoading:t,getMetaboxWarning:s}=e("yoast-seo-premium/editor");return{isLoading:t(),warning:s()}}))(Ue),We=(0,window.yoast.editorModules.components.higherorder.withYoastSidebarPriority)((({theme:e})=>(0,S.createElement)(J.ThemeProvider,{theme:e},(0,S.createElement)(Ce,null)))),je=window.yoast.editorModules.analysis.getIndicatorForScore,Ye=window.yoast.editorModules.components.HelpLink,{getIconForScore:qe}=window.yoast.editorModules.components.contentAnalysis.mapResults,Be=window.yoast.editorModules.containers.Results,{LocationConsumer:$e}=window.yoast.editorModules.components.contexts.location,Ve=window.yoast.editorModules.components.SidebarCollapsible,ze=window.yoast.editorModules.components.MetaboxCollapsible,Ge=window.yoast.editorModules.components.contentAnalysis.KeywordInput,He=Q().strong` font-size: 1em; font-weight: bold; margin-bottom: 0.5em; display: block; `;function Xe({keyword:e,onChange:t,analysis:s,score:r,isAddKeyword:o,synonyms:n,onChangeSynonyms:i,onFocusKeyword:a,onBlurKeyword:l,onFocusSynonym:c,onBlurSynonym:d,onRemoveKeyword:u,marksButtonStatus:p,keywordKey:m}){const y=je(r);let g=(0,R.__)("Related keyphrase","wordpress-seo-premium"),h=e,w=qe(y.className);o&&(g=(0,R.__)("Add related keyphrase","wordpress-seo-premium"),h="",w={icon:"plus",color:ie.colors.$color_grey_medium_dark}),""===e&&(y.className="na",y.screenReaderReadabilityText=(0,R.__)("Enter a related keyphrase to calculate the SEO score","wordpress-seo-premium"));const f=function(e){const t=[];return e&&e.includes(",")&&t.push((0,R.__)("Are you trying to use multiple related keyphrases? You should add them separately.","wordpress-seo-premium")),e&&e.length>191&&t.push((0,R.__)("Your keyphrase is too long. It can be a maximum of 191 characters.","wordpress-seo-premium")),t}(e),k=(0,S.createElement)(Ye,{href:wpseoAdminL10n["shortlinks.focus_keyword_info"],className:"dashicons"},(0,S.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,R.__)("Help on choosing the perfect keyphrase","wordpress-seo-premium"))),b=(0,S.createElement)(Ye,{href:wpseoAdminL10n["shortlinks.keyword_synonyms_info"],className:"dashicons"},(0,S.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,R.__)("Help on keyphrase synonyms","wordpress-seo-premium")));return(0,S.createElement)($e,null,(r=>{const y="metabox"===r?ze:Ve;return(0,S.createElement)(y,{title:g,subTitle:h,prefixIcon:w,prefixIconCollapsed:w,id:`yoast-additional-keyphrase-collapsible-${m}-${r}`},(0,S.createElement)(Ge,{id:o?`yoast-keyword-input-add-${r}`:`yoast-keyword-input-${m}-${r}`,keyword:e,onChange:t,onFocusKeyword:a,onRemoveKeyword:o?null:u,onBlurKeyword:l,label:(0,R.__)("Keyphrase","wordpress-seo-premium"),helpLink:k,hasError:f.length>0,errorMessages:f}),!o&&(0,S.createElement)(X.Fragment,null,(0,S.createElement)(ne.SynonymsInput,{id:`yoast-synonyms-input-${m}-${r}`,showLabel:!0,label:(0,R.__)("Synonyms","wordpress-seo-premium"),onChange:i,onBlur:d,onFocus:c,value:n,helpLink:b}),(0,S.createElement)(He,null,(0,R.__)("Analysis results","wordpress-seo-premium")),(0,S.createElement)(Be,{showLanguageNotice:!1,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",editButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:p,results:s,keywordKey:m,location:r})))}))}Xe.propTypes={keyword:oe().string.isRequired,onChange:oe().func.isRequired,synonyms:oe().string,onChangeSynonyms:oe().func,onRemoveKeyword:oe().func.isRequired,onFocusKeyword:oe().func.isRequired,onBlurKeyword:oe().func.isRequired,onBlurSynonym:oe().func.isRequired,onFocusSynonym:oe().func.isRequired,analysis:oe().array,isAddKeyword:oe().bool,score:oe().number,marksButtonStatus:oe().string,keywordKey:oe().string.isRequired},Xe.defaultProps={synonyms:"",onChangeSynonyms:a.noop,analysis:[],isAddKeyword:!1,score:0,marksButtonStatus:"enabled"};const Je=(0,xe.compose)([(0,o.withSelect)(((e,t)=>{const{keywordKey:s}=t,{getKeywordData:r}=e("yoast-seo-premium/editor");return{keyword:r(s).keyword,analysis:r(s).results,score:r(s).score,synonyms:r(s).synonyms}})),(0,o.withDispatch)(((e,t)=>{const{isAddKeyword:s,keywordKey:r}=t,{setMarkerPauseStatus:o}=e("yoast-seo/editor"),{addRelatedKeyword:n,changeRelatedKeyword:i,setRelatedKeywordSynonyms:a,removeRelatedKeyword:l}=e("yoast-seo-premium/editor");return{onChange(e){s?n(e):i(r,e)},onFocusKeyword(){o(!0)},onRemoveKeyword(){l(r)},onBlurKeyword(e){o(!1),""===e.target.value&&l(r)},onChangeSynonyms(e){const t=e.target.value;a(r,t)},onFocusSynonym(){o(!0)},onBlurSynonym(){o(!1)}}}))])(Xe);function Qe({relatedKeywords:e,firstAvailableKey:t,marksButtonStatus:s}){const r=e.length<4,o=[...e];return r&&o.push({key:t,isAddKeyword:!0}),(0,S.createElement)("div",null,o.map((e=>{const t=e.isAddKeyword||!1;return(0,S.createElement)(Je,{key:e.key,keywordKey:e.key,isAddKeyword:t,marksButtonStatus:s})})))}Qe.propTypes={relatedKeywords:oe().array.isRequired,firstAvailableKey:oe().string.isRequired,marksButtonStatus:oe().string},Qe.defaultProps={marksButtonStatus:"enabled"};const Ze=(0,xe.compose)([(0,o.withSelect)((e=>{const{getActiveMarker:t,getMarkButtonStatus:s}=e("yoast-seo/editor"),{getKeywords:r,getFirstAvailableKey:o}=e("yoast-seo-premium/editor");return{relatedKeywords:r(),firstAvailableKey:o(),activeMarker:t(),marksButtonStatus:s()}})),(0,o.withDispatch)((e=>{const{setActiveMarker:t}=e("yoast-seo/editor");return{setActiveMarker:t}}))])(Qe),et=window.yoast.editorModules.components.higherorder.withYoastSidebarPriority,tt=window.yoast.editorModules.components.TopLevelProviders,st=et((({store:e,theme:t,location:s})=>(0,S.createElement)(tt,{store:e,theme:t,location:s},(0,S.createElement)(Ze,null))));st.propTypes={store:oe().object.isRequired,theme:oe().object.isRequired,renderPriority:oe().number.isRequired};const rt=st,ot=window.wp.apiFetch;var nt=s.n(ot);const it=window.yoast.editorModules.components.Modal,at=(0,L.makeOutboundLink)(),lt=e=>{const{href:t,children:s}=e;return(0,S.createElement)(at,{href:t},s)};lt.propTypes={href:oe().string.isRequired,children:oe().string},lt.defaultProps={children:null};class ct extends X.Component{constructor(){super(),this.state={loading:!1},this.close=this.close.bind(this),this.undoRedirect=this.undoRedirect.bind(this)}render(){return this.props.redirectNotificationOpen?(0,S.createElement)(it,{title:(0,R.__)("Redirect created","wordpress-seo-premium"),onRequestClose:this.close},(0,S.createElement)("p",null,(0,R.sprintf)(/* translators: %s expands to Yoast SEO Premium */ /* translators: %s expands to Yoast SEO Premium */ (0,R.__)("%s just created a redirect from the old URL to the new URL.","wordpress-seo-premium"),"Yoast SEO Premium")),(0,S.createElement)("p",{className:"yoast-redirect-notification-modal-url"},(0,_.A)({mixedString:(0,R.sprintf)(/* translators: {{link}}%s{{/link}} expands to a URL surrounded by anchor tags */ /* translators: {{link}}%s{{/link}} expands to a URL surrounded by anchor tags */ (0,R.__)("Old URL: {{link}}%s{{/link}}","wordpress-seo-premium"),`${window.location.origin}/${this.props.redirectData.origin}`),components:{link:(0,S.createElement)(lt,{href:"/"+this.props.redirectData.origin})}})),(0,S.createElement)("p",{className:"yoast-redirect-notification-modal-url"},(0,_.A)({mixedString:(0,R.sprintf)(/* translators: {{link}}%s{{/link}} expands to a URL surrounded by anchor tags */ /* translators: {{link}}%s{{/link}} expands to a URL surrounded by anchor tags */ (0,R.__)("New URL: {{link}}%s{{/link}}","wordpress-seo-premium"),`${window.location.origin}/${this.props.redirectData.target}`),components:{link:(0,S.createElement)(lt,{href:"/"+this.props.redirectData.target})}})),(0,S.createElement)("div",{className:"yoast-redirect-notification-modal-buttons"},(0,S.createElement)(ne.NewButton,{variant:"primary",onClick:this.close,disabled:this.state.loading},(0,R.__)("OK","wordpress-seo-premium")),(0,S.createElement)(ne.NewButton,{onClick:this.undoRedirect,variant:"remove"},(0,R.__)("Undo","wordpress-seo-premium")))):null}undoRedirect(){const{objectId:e,objectType:t}=this.props.redirectData;this.setState({loading:!0},(()=>{(function(e,t){return nt()({method:"POST",url:wpApiSettings.root+"yoast/v1/redirects/undo-for-object",headers:{"X-WP-Nonce":wpApiSettings.nonce},data:{obj_id:e,obj_type:t}})})(e,t).then((()=>{this.close()}))}))}close(){this.props.closeRedirectNotification(),this.setState({loading:!1})}}ct.propTypes={redirectData:oe().object.isRequired,redirectNotificationOpen:oe().bool.isRequired,closeRedirectNotification:oe().func.isRequired};const dt=(0,xe.compose)([(0,o.withSelect)((e=>{const{getRedirectData:t,getIsRedirectNotificationOpen:s}=e("yoast-seo-premium/editor");return{redirectNotificationOpen:s(),redirectData:t()}})),(0,o.withDispatch)((e=>{const{closeRedirectNotification:t}=e("yoast-seo-premium/editor");return{closeRedirectNotification:t}}))])(ct),ut=(0,xe.compose)([(0,o.withSelect)((e=>{const{getSynonyms:t}=e("yoast-seo-premium/editor");return{value:t()}})),(0,o.withDispatch)((e=>{const{setMarkerPauseStatus:t}=e("yoast-seo/editor"),{setSynonyms:s}=e("yoast-seo-premium/editor");return{onChange(e){s(e.target.value)},onFocus(){t(!0)},onBlur(){t(!1)}}}))])(ne.SynonymsInput),pt=window.yoast.editorModules.components.HelpLink,mt=({theme:e})=>{const t=(0,S.createElement)(pt,{href:window.wpseoAdminL10n["shortlinks.keyword_synonyms_info"],className:"dashicons"},(0,S.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,R.__)("Help on keyphrase synonyms","wordpress-seo-premium")));return(0,S.createElement)(J.ThemeProvider,{theme:e},(0,S.createElement)(X.Fragment,null,(0,S.createElement)(H.Fill,{name:"yoast-synonyms-metabox"},(0,S.createElement)(ut,{id:"synonyms-input-metabox",label:(0,R.__)("Keyphrase synonyms","wordpress-seo-premium"),helpLink:t})),(0,S.createElement)(H.Fill,{name:"yoast-synonyms-sidebar"},(0,S.createElement)(ut,{id:"synonyms-input-sidebar",label:(0,R.__)("Keyphrase synonyms","wordpress-seo-premium"),helpLink:t}))))};mt.propTypes={theme:oe().object.isRequired};const yt=mt,gt=({link:e})=>(0,S.createElement)(H.Fill,{name:"YoastAfterCornerstoneToggle"},(0,S.createElement)("hr",{style:{borderTop:"0"}}),(0,S.createElement)("p",{style:{color:"#767676"}},(0,S.createElement)("em",null,(0,X.createInterpolateElement)((0,R.sprintf)( /* translators: %1$s and %2$s expand to an opening and closing anchor tag, respectively, that links to the cornerstone workout. */ /* translators: %1$s and %2$s expand to an opening and closing anchor tag, respectively, that links to the cornerstone workout. */ (0,R.__)("Improve rankings for all your cornerstones by using this %1$sstep-by-step workout!%2$s","wordpress-seo-premium"),"<a>","</a>"),{a:(0,S.createElement)("a",{href:e,target:"_blank"})}))));gt.propTypes={link:oe().string.isRequired};const ht=gt,wt=window.yoast.editorModules.analysis.getL10nObject,ft=window.yoast.editorModules.components.SidebarCollapsible,kt=window.yoast.editorModules.components.SidebarItem,bt=window.yoast.editorModules.components.TopLevelProviders,Et=l(),vt=window.yoast["social-metadata-previews"],St=e=>{const{applyReplaceUsingPlugin:t,recommendedReplacementVariables:s,replacementVariables:r,description:o,descriptionInputPlaceholder:n,title:i,titleInputPlaceholder:a,onSelectImageClick:l,onRemoveImageClick:c,onDescriptionChange:d,onTitleChange:u,imageWarnings:p,imageUrl:m,imageFallbackUrl:y,isPremium:g,siteUrl:h,descriptionPreviewFallback:w,titlePreviewFallback:f,location:k,alt:b}=e,E=(0,R.__)("Social share preview","wordpress-seo-premium");return(0,S.createElement)(vt.SocialPreviewEditor,{socialMediumName:"Social",isPremium:g,recommendedReplacementVariables:s,replacementVariables:r,description:o,descriptionInputPlaceholder:n,descriptionPreviewFallback:w,title:i,titleInputPlaceholder:a,titlePreviewFallback:f,onSelectImageClick:l,onRemoveImageClick:c,onDescriptionChange:d,onTitleChange:u,imageWarnings:p,imageUrl:m,imageFallbackUrl:y,siteUrl:h,applyReplacementVariables:t,socialPreviewLabel:E,idSuffix:k,alt:b})};St.propTypes={applyReplaceUsingPlugin:oe().func.isRequired,recommendedReplacementVariables:oe().array.isRequired,replacementVariables:oe().array.isRequired,description:oe().string,title:oe().string,onSelectImageClick:oe().func.isRequired,onRemoveImageClick:oe().func.isRequired,onDescriptionChange:oe().func.isRequired,onTitleChange:oe().func.isRequired,imageWarnings:oe().array,imageUrl:oe().string.isRequired,imageFallbackUrl:oe().string.isRequired,isPremium:oe().bool.isRequired,siteUrl:oe().string,descriptionInputPlaceholder:oe().string,titleInputPlaceholder:oe().string,descriptionPreviewFallback:oe().string,titlePreviewFallback:oe().string,location:oe().string,alt:oe().string},St.defaultProps={imageWarnings:[],title:null,titleInputPlaceholder:"",description:null,descriptionInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",siteUrl:"",location:"",alt:""};const _t=St,Rt=e=>{const{applyReplaceUsingPlugin:t,recommendedReplacementVariables:s,replacementVariables:r,description:o,descriptionInputPlaceholder:n,title:i,titleInputPlaceholder:a,onSelectImageClick:l,onRemoveImageClick:c,onDescriptionChange:d,onTitleChange:u,imageWarnings:p,imageUrl:m,imageFallbackUrl:y,isPremium:g,isLarge:h,siteUrl:w,descriptionPreviewFallback:f,titlePreviewFallback:k,location:b,alt:E}=e,v=(0,R.__)("X share preview","wordpress-seo-premium");return(0,S.createElement)(vt.SocialPreviewEditor,{initialIsOpen:!1,socialMediumName:"X",isPremium:g,recommendedReplacementVariables:s,replacementVariables:r,description:o,descriptionInputPlaceholder:n,descriptionPreviewFallback:f,title:i,titleInputPlaceholder:a,titlePreviewFallback:k,onSelectImageClick:l,onRemoveImageClick:c,onDescriptionChange:d,onTitleChange:u,imageWarnings:p,imageUrl:m,imageFallbackUrl:y,isLarge:h,siteUrl:w,applyReplacementVariables:t,socialPreviewLabel:v,idSuffix:b,alt:E})};Rt.propTypes={applyReplaceUsingPlugin:oe().func.isRequired,recommendedReplacementVariables:oe().array.isRequired,replacementVariables:oe().array.isRequired,description:oe().string,title:oe().string,onSelectImageClick:oe().func.isRequired,onRemoveImageClick:oe().func.isRequired,onDescriptionChange:oe().func.isRequired,onTitleChange:oe().func.isRequired,imageWarnings:oe().array,imageUrl:oe().string,imageFallbackUrl:oe().string,isPremium:oe().bool.isRequired,isLarge:oe().bool,siteUrl:oe().string,descriptionInputPlaceholder:oe().string,titleInputPlaceholder:oe().string,descriptionPreviewFallback:oe().string,titlePreviewFallback:oe().string,location:oe().string,alt:oe().string},Rt.defaultProps={imageWarnings:[],title:null,description:null,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",descriptionPreviewFallback:"",titleInputPlaceholder:"",titlePreviewFallback:"",imageUrl:"",imageFallbackUrl:"",location:"",alt:""};const Lt=Rt,{stripHTMLTags:Pt}=L.strings;function Tt(e){const t=window.YoastSEO.applyModifications;return{url:e.url,title:Pt(t("data_page_title",e.title)),description:Pt(t("data_meta_desc",e.description))}}function xt(){return(0,S.createElement)(X.Fragment,null,(0,S.createElement)(H.Fill,{name:"YoastFacebookPremiumModal"},(e=>(0,S.createElement)(_t,{applyReplaceUsingPlugin:Tt,...e}))),(0,S.createElement)(H.Fill,{name:"YoastTwitterPremiumModal"},(e=>(0,S.createElement)(Lt,{applyReplaceUsingPlugin:Tt,...e}))))}const Ot=()=>{if((()=>{const{getPreference:e}=(0,o.select)("yoast-seo/editor");return!!e&&e("isInsightsEnabled",!1)})()&&(0,o.select)("yoast-seo-premium/editor").getPreference("isProminentWordsAvailable",!1))return(0,o.subscribe)((0,a.debounce)((()=>{const{getEditorDataContent:e}=(0,o.select)("yoast-seo/editor"),t=(0,a.get)(window,"yoast.editorModules.helpers.createWatcher",a.noop),s=(()=>{const{setProminentWords:e,setTextFormalityLevel:t}=(0,o.dispatch)("yoast-seo-premium/editor"),s=(0,a.get)(window,"YoastSEO.analysis.worker.runResearch",a.noop),r=(0,a.get)(window,"YoastSEO.analysis.collectData",!1);return()=>{const o=r?v.Paper.parse(r()):null;s("getProminentWordsForInsights",o).then((({result:e})=>(0,a.reduce)(e,((e,t)=>[...e,{word:t.getWord(),occurrence:t.getOccurrences()}]),[]))).then((t=>e(t))),(0,i.isFeatureEnabled)("TEXT_FORMALITY")&&s("textFormality",o).then((e=>{e.result&&t(e.result)}))}})();return setTimeout(s,1500),t(e,s)})(),1500,{maxWait:3e3}))},At=window.yoast.reduxJsToolkit,Kt="adminUrl",Dt=(0,At.createSlice)({name:Kt,initialState:"",reducers:{setAdminUrl:(e,{payload:t})=>t}}),Mt=(Dt.getInitialState,{selectAdminUrl:e=>(0,a.get)(e,Kt,"")});Mt.selectAdminLink=(0,At.createSelector)([Mt.selectAdminUrl,(e,t)=>t],((e,t)=>{try{return new URL(t,e).href}catch(t){return e}})),Dt.actions,Dt.reducer;const Ft="hasConsent",It=(0,At.createSlice)({name:Ft,initialState:!1,reducers:{giveAiGeneratorConsent:(e,{payload:t})=>t}}),Nt=(It.getInitialState,It.actions,It.reducer,"pluginUrl"),Ut=(0,At.createSlice)({name:Nt,initialState:"",reducers:{setPluginUrl:(e,{payload:t})=>t}}),Ct=(Ut.getInitialState,{selectPluginUrl:e=>(0,a.get)(e,Nt,"")});Ct.selectImageLink=(0,At.createSelector)([Ct.selectPluginUrl,(e,t,s="assets/images")=>s,(e,t)=>t],((e,t,s)=>[(0,a.trimEnd)(e,"/"),(0,a.trim)(t,"/"),(0,a.trimStart)(s,"/")].join("/")));const Wt=Ut.actions,jt=Ut.reducer,Yt="linkParams",qt=(0,At.createSlice)({name:Yt,initialState:{},reducers:{setLinkParams:(e,{payload:t})=>t}}),Bt=(qt.getInitialState,{selectLinkParam:(e,t,s={})=>(0,a.get)(e,`${Yt}.${t}`,s),selectLinkParams:e=>(0,a.get)(e,Yt,{})});Bt.selectLink=(0,At.createSelector)([Bt.selectLinkParams,(e,t)=>t],((e,t)=>(0,se.addQueryArgs)(t,e))),qt.actions,qt.reducer;const $t="wistiaEmbedPermission",Vt=(0,At.createSlice)({name:$t,initialState:{value:!1,status:"idle",error:{}},reducers:{setWistiaEmbedPermissionValue:(e,{payload:t})=>{e.value=Boolean(t)}},extraReducers:e=>{e.addCase(`${$t}/request`,(e=>{e.status="loading"})),e.addCase(`${$t}/success`,((e,{payload:t})=>{e.status="success",e.value=Boolean(t&&t.value)})),e.addCase(`${$t}/error`,((e,{payload:t})=>{e.status="error",e.value=Boolean(t&&t.value),e.error={code:(0,a.get)(t,"error.code",500),message:(0,a.get)(t,"error.message","Unknown")}}))}}),zt=(Vt.getInitialState,Vt.actions,Vt.reducer,"SET_PROMINENT_WORDS"),Gt="SET_TEXT_FORMALITY_LEVEL",Ht=e=>({type:zt,payload:e}),Xt=e=>({type:Gt,payload:e}),Jt="LOAD_MORPHOLOGY_DATA",Qt="LOAD_MORPHOLOGY_DATA_ERROR";function Zt(){return{type:Jt}}function es(e){return{type:Qt,message:e}}const ts="SET_REDIRECT_NOTIFICATION",ss="CLOSE_REDIRECT_NOTIFICATION";function rs(e){return{type:ts,redirectData:e}}function os(){return{type:ss}}const ns="SET_SYNONYMS";function is(e){return{type:ns,synonyms:e}}const as=(0,o.combineReducers)({prominentWords:(e=[],{type:t,payload:s})=>t===zt?s:e,textFormalityLevel:(e=null,{type:t,payload:s})=>t===Gt?s:e}),ls={suggestions:[],messageData:{hasMetaDescription:!1,hasTitle:!1},wordsForLinking:null,isLoading:!0,showUnindexedWarning:!1},cs=function(e=ls,t){switch(t.type){case c:return Object.assign({},e,{isLoading:!0});case d:return Object.assign({},e,{suggestions:t.linkSuggestions||[],isLoading:!1,showUnindexedWarning:t.showUnindexedWarning});case p:return Object.assign({},e,{messageData:{hasMetaDescription:t.messageData.hasMetaDescription,hasTitle:t.messageData.hasTitle},wordsForLinking:t.messageData.prominentWords});case m:return Object.assign({},e,{wordsForLinking:t.wordsForLinking});default:return e}},ds={isLoading:!1,warning:[]},us=function(e=ds,t){switch(t.type){case Jt:return Object.assign({},e,{isLoading:!0});case Qt:return Object.assign({},e,{isLoading:!1,warning:t.message});default:return e}},ps=(e=(()=>({isProminentWordsAvailable:(0,a.get)(window,"wpseoPremiumMetaboxData.data.isProminentWordsAvailable",!1)}))())=>e,ms={isOpen:!1,redirectData:{}},ys=function(e=ms,t){switch(t.type){case ts:return{...e,redirectData:t.redirectData,isOpen:!0};case ss:return{...e,redirectData:{},isOpen:!1};default:return e}},gs={},hs=["a","b","c","d"];function ws(e=hs,t){let s;switch(t.type){case D:return s=hs.length-t.keywords.length,(0,a.takeRight)(e,s);case K:return(0,a.tail)(e);case F:return[t.key,...e]}return e}function fs(e=gs,t,s){switch(t.type){case D:return(0,a.fromPairs)(t.keywords.map(((e,t)=>{const s=hs[t];return[s,{...e,key:s}]})));case K:return{...e,[s]:{key:s,keyword:t.keyword}};case F:return(0,a.pickBy)(e,(e=>e.key!==t.key));case M:return{...e,[t.key]:{...e[t.key],keyword:t.keyword}};case I:return e[t.key]&&e[t.key].keyword===t.keyword?{...e,[t.key]:{...e[t.key],results:t.results,score:t.score}}:e;case N:return{...e,[t.key]:{...e[t.key],synonyms:t.synonyms}}}return e}function ks(e={},t){return{availableKeys:ws(e.availableKeys,t),keywords:fs(e.keywords,t,(0,a.head)(e.availableKeys))}}function bs(e="",t){return t.type===ns?t.synonyms:e}const Es=[],vs=e=>(0,a.get)(e,"insights.prominentWords",Es),Ss=e=>(0,a.get)(e,"insights.textFormalityLevel",null),_s=[];function Rs(e){return(0,a.get)(e,["linkSuggestions","suggestions"],_s)}function Ls(e){return(0,a.get)(e,["linkSuggestions","isLoading"],!0)}function Ps(e){return(0,a.get)(e,["linkSuggestions","showUnindexedWarning"],!1)}function Ts(e){return(0,a.get)(e,["linkSuggestions","wordsForLinking"],null)}function xs(e){return(0,a.get)(e,["linkSuggestions","messageData"],{hasMetaDescription:!1,hasTitle:!1})}function Os(e){return(0,a.get)(e,"metaboxWarning.isLoading",!0)}function As(e){return(0,a.get)(e,"metaboxWarning.warning","")}const Ks=(e,t,s=null)=>(0,a.get)(e,`preferences.${t}`,s),Ds=e=>e.preferences;function Ms(e){return(0,a.get)(e,"redirectNotification.redirectData",{})}function Fs(e){return(0,a.get)(e,"redirectNotification.isOpen",!1)}function Is(e,t){return(0,a.get)(e,["relatedKeywords","keywords",t],{keyword:"",analysis:[],score:0,synonyms:""})}function Ns(e){return Object.values((0,a.get)(e,["relatedKeywords","keywords"],{}))}function Us(e){return(0,a.head)((0,a.get)(e,["relatedKeywords","availableKeys"],[]))||""}function Cs(e){return(0,a.get)(e,["synonyms"],"")}class Ws{constructor(){this.previous={relatedKeywords:[]};const e=wpseoScriptData.isPost?"yoast_wpseo":"hidden_wpseo";this._relatedKeywordsField=document.getElementById(e+"_focuskeywords"),this._synonymsField=document.getElementById(e+"_keywordsynonyms"),this._wordsForLinking=document.getElementById(e+"_words_for_linking")}persist(e){this.persistRelatedKeywords(e),this.persistSynonyms(e),this.persistWordsForLinking(e),this.saveCurrentValues(e)}saveCurrentValues(e){this.previous.relatedKeywords=e.relatedKeywords.keywords,this.previous.synonyms=e.synonyms,this.previous.wordsForLinking=e.linkSuggestions.wordsForLinking}persistRelatedKeywords(e){this.previous.relatedKeywords!==e.relatedKeywords.keywords&&(this._relatedKeywordsField.value=JSON.stringify(Object.values(e.relatedKeywords.keywords).map((e=>({keyword:e.keyword,score:e.score})))))}persistSynonyms(e){if(this.previous.relatedKeywords===e.relatedKeywords.keywords&&this.previous.synonyms===e.synonyms)return;const t=e.synonyms;this._synonymsField.value=JSON.stringify([t,...Object.values(e.relatedKeywords.keywords).map((e=>e.synonyms||""))])}persistWordsForLinking(e){const t=e.linkSuggestions.wordsForLinking;if(null===t||t===this.previous.wordsForLinking)return;const s={};t.forEach((e=>{"object"==typeof e&&"function"==typeof e.getStem&&(s[e.getStem()]=e.getOccurrences())})),this._wordsForLinking.value=JSON.stringify(s)}}function js(){return window.elementor.documents.getCurrent().$element.find(".elementor-widget-container")}const Ys="yoastmark";function qs(e){js().each(((e,t)=>{-1!==t.innerHTML.indexOf("<"+Ys)&&(t.innerHTML=v.markers.removeMarks(t.innerHTML))})),0!==e.length&&(e.some((e=>e.hasPosition()))?function(e){const t=js();let s=0;t.each(((t,r)=>{let o=r.innerHTML.replace(/[\n\t]/g,"").trim();const n=s+o.length;e.filter((e=>e.getPositionStart()>=s&&e.getPositionEnd()<n)).sort(((e,t)=>t.getPositionStart()-e.getPositionStart())).forEach((e=>{const t=e.getPositionStart(),r=e.getPositionEnd();e.setPositionStart(t-s),e.setPositionEnd(r-s),o=e.applyWithPosition(o),e.setPositionStart(t),e.setPositionEnd(r)})),r.innerHTML=o,s=n}))}(e):function(e){const t=js();e.forEach((e=>{t.each(((t,s)=>{const r=s.innerHTML.replace(/[\n\t]/g,"").replace(/ /g," ").trim();e._properties.marked=v.languageProcessing.normalizeHTML(e._properties.marked),e._properties.original=v.languageProcessing.normalizeHTML(e._properties.original),r.includes(e.getOriginal())&&(s.innerHTML=e.applyWithReplace(r))}))}))}(e))}const{setTextdomainL10n:Bs}=window.yoast.editorModules.helpers.i18n;Bs("wordpress-seo-premium","wpseoPremiumJSL10n");const $s=function(){const s=(0,o.registerStore)("yoast-seo-premium/editor",{reducer:(0,o.combineReducers)({...t,[Nt]:jt}),actions:{...(0,a.pickBy)(e,a.isFunction),...Wt},selectors:{...r,...Ct}});s.dispatch(Wt.setPluginUrl((0,a.get)(window,"wpseoPremiumMetaboxData.data.pluginUrl","")));const l=function(e){if(!E)return null;const t=e.dispatch.bind(e);return t(y()),new b({dispatch:t,rootUrl:(0,a.get)(window,"wpseoPremiumMetaboxData.data.restApi.root",""),nonce:(0,a.get)(window,"wpseoPremiumMetaboxData.data.restApi.nonce",""),currentObjectId:(0,a.get)(window,"wpseoPremiumMetaboxData.data.currentObjectId",0),currentObjectType:(0,a.get)(window,"wpseoPremiumMetaboxData.data.currentObjectType","post"),showUnindexedWarning:(0,a.get)(window,"wpseoPremiumMetaboxData.data.linkSuggestionsUnindexed",!1),maxWordsToSave:(0,a.get)(window,"wpseoPremiumMetaboxData.data.perIndexableLimit",20)})}(s);!function(e){const{getFocusKeyphrase:t,getResultsForKeyword:s,getReadabilityResults:r,getIsKeywordAnalysisActive:n}=(0,o.select)("yoast-seo/editor");let i;n()&&(i=new V);let a=s(t()).overallScore,l=r().overallScore;(0,o.subscribe)((()=>{const o=s(t()).overallScore,n=r().overallScore;o===a&&n===l||(i&&i.analyze(e.getState(),e.dispatch),a=o,l=n)}))}(s),function(e){!function(){const{setRelatedKeywords:e,setSynonyms:t}=(0,o.dispatch)("yoast-seo-premium/editor"),s=G(z.relatedKeyphrases),r=G(z.synonyms),n=r.shift()||"";e(s.map(((e,t)=>{const s=r[t];return{keyword:e.keyword,score:e.score,synonyms:s}}))),t(n)}(),(0,n.addFilter)("yoast.analysis.data","yoast/yoast-seo-premium/addSynonyms",(t=>({...t,synonyms:e.getState().synonyms})));const t=new V,s=e.getState();let r=s.synonyms,i=V.getRelevantData(s);e.subscribe((()=>{const s=e.getState();r!==s.synonyms&&(r=s.synonyms,(0,o.dispatch)("yoast-seo/editor").runAnalysis());const n=V.getRelevantData(s);V.shouldAnalyze(n,i)&&(i=n,t.analyze(s,e.dispatch))}))}(s),(0,n.addAction)("yoast.elementor.save.success","yoast/yoast-seo-premium/redirectNotifications",A),function(e,t){const s=wt(),r=window.wpseoPremiumMetaboxData.data,n={isRtl:s.isRtl},a=(0,o.select)("yoast-seo/editor").getIsKeywordAnalysisActive();window.YoastSEO._registerReactComponent("yoast-seo-premium",(()=>(0,S.createElement)(X.Fragment,null,(0,S.createElement)(H.Fill,{name:"YoastElementor"},(0,S.createElement)(We,{key:"metabox-warning",renderPriority:1,store:e,theme:n}),a&&(0,S.createElement)(rt,{key:"related-keywords",renderPriority:22,store:e,theme:n,location:"sidebar"}),Et&&(0,S.createElement)(kt,{key:"link-suggestions",renderPriority:24},(0,S.createElement)(bt,{store:e,theme:n,location:"sidebar"},(0,S.createElement)(ft,{id:"yoast-linking-suggestions-collapsible-sidebar",title:(0,R.__)("Internal linking suggestions","wordpress-seo-premium")},(0,S.createElement)(Te,{suggester:t,location:"elementor-sidebar"}))))),(0,S.createElement)(yt,{store:e,theme:n}),(0,S.createElement)(H.Fill,{name:"YoastRelatedKeyphrases"},(0,S.createElement)(Ie,null)),(0,i.isFeatureEnabled)("TEXT_FORMALITY")&&(0,S.createElement)(H.Fill,{name:"YoastTextFormalitySidebar"},(0,S.createElement)(ee,null)),!!r.workoutsUrl&&(0,S.createElement)(ht,{link:r.workoutsUrl}),(0,S.createElement)(dt,null))))}(s,l),function(){const e=x().split("_")[0],t=(0,a.get)(window,"wpseoPremiumMetaboxData.data.licensedURL","");if(!v.helpers.getLanguagesWithWordFormSupport().includes(e))return;if(""===t)return;const s=new T({siteUrl:t,language:e,setError:O});(0,o.dispatch)("yoast-seo-premium/editor").loadMorphologyData(),s.injectMorphologyData()}(),window.YoastSEO._registerReactComponent("yoast-seo-premium-social-previews",xt),Ot();const c=new Ws;s.subscribe((()=>{c.persist(s.getState())}))},Vs=function(){var e,t;if((0,o.dispatch)("yoast-seo/editor"))try{(0,i.enableFeatures)(window.wpseoFeaturesL10n),$s(),e=window.wpseoPremiumJSL10n,window.YoastSEO.analysis.worker.initialize({translations:e}),(0,i.isFeatureEnabled)("TEXT_FORMALITY")&&(t=window.wpseoPremiumMetaboxData.data.textFormalityScriptUrl,"undefined"!=typeof YoastSEO&&void 0!==YoastSEO.analysis&&void 0!==YoastSEO.analysis.worker&&YoastSEO.analysis.worker.loadScript(t).then((0,o.dispatch)("yoast-seo/editor").runAnalysis)),function(e,t={}){if("undefined"==typeof YoastSEO||void 0===YoastSEO.analysis||void 0===YoastSEO.analysis.worker)return;const s=YoastSEO.analysis.worker;s.loadScript(e).then((()=>s.sendMessage("initialize",{options:t},"YoastSEOPremium")))}(window.wpseoPremiumMetaboxData.data.premiumAssessmentsScriptUrl,{isTitleAssessmentAvailable:!0,isTextAlignmentAssessmentAvailable:!1,language:(0,window.yoast.editorModules.analysis.getContentLocale)().split("_")[0]}),(0,n.addAction)("yoast.analysis.applyMarks","yoast/yoast-seo-premium/applyMarksElementor",qs)}catch(e){console.error(e)}else setTimeout(Vs,100)};(0,n.addAction)("yoast.elementor.loaded","yoast/yoast-seo-premium/initializeElementorIntegration",Vs)})()})(); Save