154 lines
81 KiB
JavaScript
154 lines
81 KiB
JavaScript
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)a.d(n,s,function(t){return e[t]}.bind(null,s));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=294)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.yoast.propTypes},function(e,t){e.exports=window.React},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.data},,,function(e,t){e.exports=window.yoast.componentsNew},function(e,t){e.exports=window.yoast.helpers},,function(e,t){e.exports=window.yoast.styledComponents},function(e,t){function a(){return e.exports=a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,a.apply(this,arguments)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t){e.exports=window.yoast.analysis},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.yoast.externals.redux},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4);function s(){return Object(n.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.yoast.styleGuide},function(e,t){e.exports=window.wp.compose},,function(e,t){e.exports=window.yoast.externals.contexts},,,function(e,t){e.exports=window.wp.apiFetch},,function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return r}));var n=a(0);function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Object(n.createInterpolateElement)(e,{a:Object(n.createElement)("a",{id:a,href:t,target:"_blank",rel:"noopener noreferrer"})})}},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="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},s=i(a(3)),r=i(a(127)),o=i(a(130));function i(e){return e&&e.__esModule?e:{default:e}}var c=void 0;t.default=function(e){var t=e.mixedString,a=e.components,i=e.throwErrors;if(c=t,!a)return t;if("object"!==(void 0===a?"undefined":n(a))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var l=(0,o.default)(t);try{return function e(t,a){var o,i,l,u,d,p,m,h,b=[],f={};for(p=0;p<t.length;p++)if("string"!==(d=t[p]).type){if(!a.hasOwnProperty(d.value)||void 0===a[d.value])throw new Error("Invalid interpolation, missing component node: `"+d.value+"`");if("object"!==n(a[d.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+d.value+"`","\n> "+c);if("componentClose"===d.type)throw new Error("Missing opening component token: `"+d.value+"`");if("componentOpen"===d.type){o=a[d.value],l=p;break}b.push(a[d.value])}else b.push(d.value);return o&&(u=function(e,t){var a,n,s=t[e],r=0;for(n=e+1;n<t.length;n++)if((a=t[n]).value===s.value){if("componentOpen"===a.type){r++;continue}if("componentClose"===a.type){if(0===r)return n;r--}}throw new Error("Missing closing component token `"+s.value+"`")}(l,t),m=e(t.slice(l+1,u),a),i=s.default.cloneElement(o,{},m),b.push(i),u<t.length-1&&(h=e(t.slice(u+1),a),b=b.concat(h))),1===b.length?b[0]:(b.forEach((function(e,t){e&&(f["interpolation-child-"+t]=e)})),(0,r.default)(f))}(l,a)}catch(e){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));var n=a(25),s=a.n(n);async function r(e,t,a){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:200;try{const s=await e();return!!s&&(s.status===n?t(s):a(s))}catch(e){console.error(e.message)}}async function o(e){try{return await s()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}},,,function(e,t,a){"use strict";var n=a(0),s=a(2),r=a.n(s);const o=e=>{let{children:t}=e;return Object(n.createElement)("div",null,t)};o.propTypes={renderPriority:r.a.number.isRequired,children:r.a.node.isRequired},t.a=o},,function(e,t,a){"use strict";a.d(t,"c",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"e",(function(){return i})),a.d(t,"a",(function(){return c})),a.d(t,"d",(function(){return l})),a.d(t,"f",(function(){return u})),a.d(t,"g",(function(){return d}));var n=a(4),s=a(29);async function r(){return await Object(s.a)({path:"yoast/v1/wincher/authorization-url",method:"GET"})}async function o(){return await Object(s.a)({path:"yoast/v1/wincher/account/limit",method:"GET"})}async function i(){return await Object(s.a)({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}async function c(e){const{code:t,websiteId:a}=e;return await Object(s.a)({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:a}})}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2?arguments[2]:void 0;return await Object(s.a)({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:t},signal:a})}async function u(e){return Object(n.isArray)(e)||(e=[e]),await Object(s.a)({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}async function d(e){return await Object(s.a)({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}},,,,function(e,t){e.exports=window.wp.hooks},,function(e,t,a){"use strict";a.d(t,"b",(function(){return l}));var n=a(12),s=a.n(n),r=a(0),o=a(2),i=a.n(o),c=a(18);const l="yoast yoast-gutenberg-modal",u=e=>{const{title:t,className:a,showYoastIcon:n,additionalClassName:o,...i}=e,l=n?Object(r.createElement)("span",{className:"yoast-icon"}):null;return Object(r.createElement)(c.Modal,s()({title:t,className:`${a} ${o}`,icon:l},i),e.children)};u.propTypes={title:i.a.string,className:i.a.string,showYoastIcon:i.a.bool,children:i.a.oneOfType([i.a.node,i.a.arrayOf(i.a.node)]),additionalClassName:i.a.string},u.defaultProps={title:"Yoast SEO",className:l,showYoastIcon:!0,children:null,additionalClassName:""},t.a=u},,function(e,t){e.exports=window.yoast.socialMetadataForms},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(1),s=a(14),r=a(4);function o(e){return Object(r.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:Object(n.__)("Feedback","wordpress-seo"),screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""};case"bad":return{className:"bad",screenReaderText:Object(n.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:Object(n.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:Object(n.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:Object(n.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:Object(n.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:Object(n.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:Object(n.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:Object(n.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:Object(n.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(s.interpreters.scoreToRating(e))}},,,function(e,t,a){"use strict";a.d(t,"g",(function(){return s})),a.d(t,"h",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"i",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"f",(function(){return u})),a.d(t,"e",(function(){return d})),a.d(t,"j",(function(){return p})),a.d(t,"d",(function(){return m})),a.d(t,"o",(function(){return h})),a.d(t,"p",(function(){return b})),a.d(t,"k",(function(){return f})),a.d(t,"q",(function(){return g})),a.d(t,"r",(function(){return y})),a.d(t,"n",(function(){return O})),a.d(t,"m",(function(){return j})),a.d(t,"l",(function(){return w}));var n=a(9);const s="SNIPPET_EDITOR_SWITCH_MODE",r="SNIPPET_EDITOR_UPDATE_DATA",o="SNIPPET_EDITOR_FIND_CUSTOM_FIELDS",i="SNIPPET_EDITOR_CUSTOM_FIELD_RESULTS",c="SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",l="SNIPPET_EDITOR_HIDE_REPLACEMENT_VARIABLES",u="SNIPPET_EDITOR_REMOVE_REPLACEMENT_VARIABLE",d="SNIPPET_EDITOR_REFRESH",p="SNIPPET_EDITOR_UPDATE_WORDS_TO_HIGHLIGHT",m="LOAD_SNIPPET_EDITOR_DATA";function h(e){return{type:s,mode:e}}function b(e){return{type:r,data:e}}function*f(e,t){const a=yield{type:o,query:e,postId:t};return{type:i,results:a}}function g(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r="string"==typeof t?Object(n.decodeHTML)(t):t;return{type:c,name:e,value:r,label:a,hidden:s}}function y(e){return{type:p,wordsToHighlight:e}}function O(e){return{type:u,name:e}}function j(){return{type:d,time:(new Date).getMilliseconds()}}function w(e){return{type:l,data:e}}},,function(e,t,a){"use strict";var n=a(12),s=a.n(n),r=a(0),o=a(8),i=a(11);const c=a.n(i)()(o.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);
|
||
}
|
||
|
||
`;t.a=e=>Object(r.createElement)(c,s()({hasPadding:!0,hasSeparator:!0},e))},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"d",(function(){return u}));var n=a(4),s=a(9),r=a(42);const o=e=>({type:e.subtype,width:e.width,height:e.height,url:e.url,id:e.id,sizes:e.sizes,alt:e.alt||e.title||e.name});function i(e){return new Promise((t,a)=>{window.wp.media.attachment||a(),window.wp.media.attachment(e).fetch().then(e=>{t(o(e))}).catch(()=>a())})}function c(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const a=t.state().get("selection").first();e(o(a.attributes))}),t})(e).open()}const l=e=>{const{width:t,height:a}=e,n=Object(r.determineFacebookImageMode)({width:t,height:a}),o=r.FACEBOOK_IMAGE_SIZES[n+"Width"],i=r.FACEBOOK_IMAGE_SIZES[n+"Height"],c=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=i);return{url:c?c.url:e.url,id:e.id,warnings:Object(s.validateFacebookImage)(e),alt:e.alt||""}},u=e=>{const t="summary"!==Object(n.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",a=r.TWITTER_IMAGE_SIZES[t+"Width"],o=r.TWITTER_IMAGE_SIZES[t+"Height"],i=Object.values(e.sizes).find(e=>e.width>=a&&e.height>=o);return{url:i?i.url:e.url,id:e.id,warnings:Object(s.validateTwitterImage)(e),alt:e.alt||""}}},,,,,function(e,t,a){"use strict";function n(){}a.d(t,"a",(function(){return n}))},,,function(e,t,a){"use strict";a.r(t),a.d(t,"getIconForScore",(function(){return i})),a.d(t,"default",(function(){return c}));var n=a(19),s=a(14);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const a=e.getIdentifier(),n={score:e.score,rating:s.interpreters.scoreToRating(e.score),hasMarks:e.hasMarks(),marker:e.getMarker(),id:a,text:e.text,markerId:t.length>0?`${t}:${a}`:a,hasBetaBadge:e.hasBetaBadge(),hasJumps:e.hasJumps(),editFieldName:e.editFieldName};return"ok"===n.rating&&(n.rating="OK"),n}function o(e,t){switch(e.rating){case"error":t.errorsResults.push(e);break;case"feedback":t.considerationsResults.push(e);break;case"bad":t.problemsResults.push(e);break;case"OK":t.improvementsResults.push(e);break;case"good":t.goodResults.push(e)}return t}function i(e){switch(e){case"loading":return{icon:"loading-spinner",color:n.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:n.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:n.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:n.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:n.colors.$color_ok};default:return{icon:"seo-score-bad",color:n.colors.$color_red}}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return a;for(let n=0;n<e.length;n++){const s=e[n];s.text&&(a=o(r(s,t),a))}return a}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4),s=a(17);function r(){const e=Object(s.a)();return Object(n.get)(e,"contentLocale","en_US")}},function(e,t,a){"use strict";var n=a(0),s=a(8),r=a(2),o=a.n(r);const i=e=>{const[t,a]=Object(n.useState)(!1),{prefixIcon:r}=e;return Object(n.createElement)("div",{className:"yoast components-panel__body "+(t?"is-opened":"")},Object(n.createElement)("h2",{className:"components-panel__body-title"},Object(n.createElement)("button",{onClick:function(){a(!t)},className:"components-button components-panel__body-toggle"},Object(n.createElement)("span",{className:"yoast-icon-span",style:{fill:""+(r&&r.color||"")}},r&&Object(n.createElement)(s.SvgIcon,{icon:r.icon,color:r.color,size:r.size})),Object(n.createElement)("span",{className:"yoast-title-container"},Object(n.createElement)("div",{className:"yoast-title"},e.title),Object(n.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.hasBetaBadgeLabel&&Object(n.createElement)(s.BetaBadge,null),Object(n.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),t&&e.children)};t.a=i,i.propTypes={title:o.a.string.isRequired,children:o.a.oneOfType([o.a.node,o.a.arrayOf(o.a.node)]).isRequired,prefixIcon:o.a.object,subTitle:o.a.string,hasBetaBadgeLabel:o.a.bool},i.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1}},function(e,t,a){"use strict";var n=a(19),s=a(9),r=a(11),o=a.n(r);const i=Object(s.makeOutboundLink)(o.a.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: ${n.colors.$color_help_text};
|
||
|
||
&:hover,
|
||
&:focus {
|
||
color: ${n.colors.$color_snippet_focus};
|
||
}
|
||
|
||
// Overwrite the default blue active color for links.
|
||
&:active {
|
||
color: ${n.colors.$color_help_text};
|
||
}
|
||
|
||
&::before {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
padding: 2px;
|
||
content: "\f223";
|
||
}
|
||
`);t.a=i},,function(e,t,a){"use strict";a.r(t),a.d(t,"sortResultsByIdentifier",(function(){return c})),a.d(t,"default",(function(){return l})),a.d(t,"initializationDone",(function(){return u}));var n=a(38),s=a(16),r=a(14),o=a(58);let i=!1;function c(e){return e.sort((e,t)=>e._identifier.localeCompare(t._identifier))}function l(e,t,a,l,u){if(!i)return;const d=r.Paper.parse(t());e.analyze(d).then(r=>{const{result:{seo:o,readability:i,inclusiveLanguage:p}}=r;if(o){const e=o[""];e.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),e.results=c(e.results),l.dispatch(s.actions.setSeoResultsForKeyword(d.getKeyword(),e.results)),l.dispatch(s.actions.setOverallSeoScore(e.score,d.getKeyword())),l.dispatch(s.actions.refreshSnippetEditor()),u.saveScores(e.score,d.getKeyword())}i&&(i.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),i.results=c(i.results),l.dispatch(s.actions.setReadabilityResults(i.results)),l.dispatch(s.actions.setOverallReadabilityScore(i.score)),l.dispatch(s.actions.refreshSnippetEditor()),u.saveContentScore(i.score)),p&&(p.results.forEach(e=>{e.getMarker=()=>()=>a(d,e.marks)}),p.results=c(p.results),l.dispatch(s.actions.setInclusiveLanguageResults(p.results)),l.dispatch(s.actions.setOverallInclusiveLanguageScore(p.score)),l.dispatch(s.actions.refreshSnippetEditor()),u.saveInclusiveLanguageScore(p.score)),Object(n.doAction)("yoast.analysis.refresh",r,{paper:d,worker:e,collectData:t,applyMarks:a,store:l,dataCollector:u})}).catch(o.a)}function u(){i=!0}},,,function(e,t,a){"use strict";a.r(t),a.d(t,"nonReplaceVars",(function(){return l})),a.d(t,"fillReplacementVariables",(function(){return u})),a.d(t,"handlePrefixes",(function(){return d})),a.d(t,"createLabelFromName",(function(){return p})),a.d(t,"pushNewReplaceVar",(function(){return m})),a.d(t,"replaceSpaces",(function(){return h})),a.d(t,"prepareCustomFieldForDispatch",(function(){return b})),a.d(t,"prepareCustomTaxonomyForDispatch",(function(){return f})),a.d(t,"mapCustomTaxonomies",(function(){return g})),a.d(t,"mapCustomFields",(function(){return y})),a.d(t,"excerptFromContent",(function(){return O})),a.d(t,"applyReplaceUsingPlugin",(function(){return j}));var n=a(4),s=a(133),r=a(47),o=a(27),i=a(9);const{stripHTMLTags:c}=i.strings,l=["slug","content","contentImage","snippetPreviewImageURL"];function u(e,t){Object(n.forEach)(e,(e,a)=>{l.includes(a)||t.dispatch(Object(r.q)(a,e))})}function d(e){if(!["ct_","cf_","pt_"].includes(e.substr(0,3)))return e.replace(/_/g," ");const t=e.slice(0,3);switch(-1!==(e=e.slice(3)).indexOf("desc_")&&(e=e.slice(5)+" description"),t){case"ct_":e+=" (custom taxonomy)";break;case"cf_":e+=" (custom field)";break;case"pt_":e="Post type ("+(e=e.replace("single","singular"))+")"}return e}function p(e){return e=d(e),Object(o.b)(e)}function m(e,t){return e.push({name:t.name,label:t.label||p(t.name),value:t.value}),e}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.replace(/\s/g,t)}function b(e){return{name:"cf_"+h(e),label:Object(o.b)(e+" (custom field)")}}function f(e){const t=h(e);return{name:"ct_"+t,label:Object(o.b)(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:Object(o.b)(e+" description (custom taxonomy)")}}function g(e,t){return e.custom_taxonomies?(Object(n.forEach)(e.custom_taxonomies,(e,a)=>{const{name:n,label:s,descriptionName:o,descriptionLabel:i}=f(a);t.dispatch(Object(r.q)(n,e.name,s)),t.dispatch(Object(r.q)(o,e.description,i))}),Object(n.omit)({...e},"custom_taxonomies")):e}function y(e,t){return e.custom_fields?(Object(n.forEach)(e.custom_fields,(e,a)=>{const{name:n,label:s}=b(a);t.dispatch(Object(r.q)(n,e,s))}),Object(n.omit)({...e},"custom_fields")):e}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:156;return(e=(e=Object(s.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const j=function(e){const t=Object(n.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!Object(n.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=Object(n.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],n.identity);return{url:e.url,title:c(t(e.title)),description:c(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?c(t(e.filteredSEOTitle)):""}}(e);const a=t._applyModifications.bind(t);return{url:e.url,title:c(a("data_page_title",e.title)),description:c(a("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?c(a("data_page_title",e.filteredSEOTitle)):""}}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),s=a(2),r=a.n(s);function o(e){let{target:t,children:a}=e,s=t;return"string"==typeof t&&(s=document.getElementById(t)),s?Object(n.createPortal)(a,s):null}o.propTypes={target:r.a.oneOfType([r.a.string,r.a.object]).isRequired,children:r.a.node.isRequired}},function(e,t,a){"use strict";var n=a(0);let s,r,o,i;const c=/<(\/)?(\w+)\s*(\/)?>/g;function l(e,t,a,n,s){return{element:e,tokenStart:t,tokenLength:a,prevOffset:n,leadingTextStart:s,children:[]}}function u(){const e=s.length-r;0!==e&&o.push(s.substr(r,e))}function d(e){const{element:t,tokenStart:a,tokenLength:r,prevOffset:o,children:c}=e,l=i[i.length-1],u=s.substr(l.prevOffset,a-l.prevOffset);u&&l.children.push(u),l.children.push(Object(n.cloneElement)(t,null,...c)),l.prevOffset=o||a+r}function p(e){const t=function(){const e=c.exec(s);if(null===e)return["no-more-tokens"];const t=e.index,[a,n,r,o]=e,i=a.length;return o?["self-closed",r,t,i]:n?["closer",r,t,i]:["opener",r,t,i]}(),[a,p,m,h]=t,b=i.length,f=m>r?r:null;if(!e[p])return u(),!1;switch(a){case"no-more-tokens":if(0!==b){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(s.substr(e,t))}return u(),!1;case"self-closed":return 0===b?(null!==f&&o.push(s.substr(f,m-f)),o.push(e[p]),r=m+h,!0):(d(l(e[p],m,h)),r=m+h,!0);case"opener":return i.push(l(e[p],m,h,m+h,f)),r=m+h,!0;case"closer":if(1===b)return function(e){const{element:t,leadingTextStart:a,prevOffset:r,tokenStart:c,children:l}=i.pop(),u=e?s.substr(r,e-r):s.substr(r);u&&l.push(u),null!==a&&o.push(s.substr(a,c-a)),o.push(Object(n.cloneElement)(t,null,...l))}(m),r=m+h,!0;const t=i.pop(),a=s.substr(t.prevOffset,m-t.prevOffset);t.children.push(a),t.prevOffset=m+h;const c=l(t.element,t.tokenStart,t.tokenLength,m+h);return c.children=t.children,d(c),r=m+h,!0;default:return u(),!1}}t.a=(e,t)=>{if(s=e,r=0,o=[],i=[],c.lastIndex=0,!(e=>{const t="object"==typeof e,a=t&&Object.values(e);return t&&a.length&&a.every(e=>Object(n.isValidElement)(e))})(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(p(t));return Object(n.createElement)(n.Fragment,null,...o)}},,function(e,t,a){"use strict";var n=a(0),s=a(2),r=a.n(s),o=a(11),i=a(22);const c=e=>{let{theme:t,location:a,children:s}=e;return Object(n.createElement)(i.LocationProvider,{value:a},Object(n.createElement)(o.ThemeProvider,{theme:t},s))};c.propTypes={theme:r.a.object.isRequired,location:r.a.oneOf(["sidebar","metabox","modal"]).isRequired,children:r.a.element.isRequired},t.a=c},function(e,t,a){"use strict";var n=a(0),s=a(8),r=a(2),o=a.n(r);const i=e=>Object(n.createElement)("div",{className:"yoast components-panel__body"},Object(n.createElement)("h2",{className:"components-panel__body-title"},Object(n.createElement)("button",{id:e.id,onClick:e.onClick,className:"components-button components-panel__body-toggle"},e.prefixIcon&&Object(n.createElement)("span",{className:"yoast-icon-span",style:{fill:""+(e.prefixIcon&&e.prefixIcon.color||"")}},Object(n.createElement)(s.SvgIcon,{size:e.prefixIcon.size,icon:e.prefixIcon.icon})),Object(n.createElement)("span",{className:"yoast-title-container"},Object(n.createElement)("div",{className:"yoast-title"},e.title),Object(n.createElement)("div",{className:"yoast-subtitle"},e.subTitle)),e.children,e.suffixIcon&&Object(n.createElement)(s.SvgIcon,{size:e.suffixIcon.size,icon:e.suffixIcon.icon}))));t.a=i,i.propTypes={onClick:o.a.func.isRequired,title:o.a.string.isRequired,id:o.a.string,subTitle:o.a.string,suffixIcon:o.a.object,prefixIcon:o.a.object,children:o.a.node},i.defaultProps={id:"",suffixIcon:null,prefixIcon:null,subTitle:"",children:null}},function(e,t,a){"use strict";var n=a(0),s=a(2),r=a.n(s),o=a(1);const i=e=>{let{data:t,mapChartDataToTableData:a,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:i}=e;return t.length!==r.length?Object(n.createElement)("p",null,Object(o.__)("The number of headers and header labels don't match.","wordpress-seo")):Object(n.createElement)("div",{className:i?"screen-reader-text":null},Object(n.createElement)("table",null,Object(n.createElement)("caption",null,s),Object(n.createElement)("thead",null,Object(n.createElement)("tr",null,r.map((e,t)=>Object(n.createElement)("th",{key:t},e)))),Object(n.createElement)("tbody",null,Object(n.createElement)("tr",null,t.map((e,t)=>Object(n.createElement)("td",{key:t},a(e.y)))))))};i.propTypes={data:r.a.arrayOf(r.a.shape({x:r.a.number,y:r.a.number})).isRequired,mapChartDataToTableData:r.a.func,dataTableCaption:r.a.string.isRequired,dataTableHeaderLabels:r.a.array.isRequired,isDataTableVisuallyHidden:r.a.bool},i.defaultProps={mapChartDataToTableData:null,isDataTableVisuallyHidden:!0};var c=i;const l=e=>{let{data:t,width:a,height:s,fillColor:r,strokeColor:o,strokeWidth:i,className:l,mapChartDataToTableData:u,dataTableCaption:d,dataTableHeaderLabels:p,isDataTableVisuallyHidden:m}=e;const h=Math.max(1,Math.max(...t.map(e=>e.x))),b=Math.max(1,Math.max(...t.map(e=>e.y))),f=s-i,g=t.map(e=>`${e.x/h*a},${f-e.y/b*f+i}`).join(" "),y=`0,${f+i} `+g+` ${a},${f+i}`;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("svg",{width:a,height:s,viewBox:`0 0 ${a} ${s}`,className:l,role:"img","aria-hidden":"true",focusable:"false"},Object(n.createElement)("polygon",{fill:r,points:y}),Object(n.createElement)("polyline",{fill:"none",stroke:o,strokeWidth:i,strokeLinejoin:"round",strokeLinecap:"round",points:g})),u&&Object(n.createElement)(c,{data:t,mapChartDataToTableData:u,dataTableCaption:d,dataTableHeaderLabels:p,isDataTableVisuallyHidden:m}))};l.propTypes={data:r.a.arrayOf(r.a.shape({x:r.a.number,y:r.a.number})).isRequired,width:r.a.number.isRequired,height:r.a.number.isRequired,fillColor:r.a.string,strokeColor:r.a.string,strokeWidth:r.a.number,className:r.a.string,mapChartDataToTableData:r.a.func,dataTableCaption:r.a.string.isRequired,dataTableHeaderLabels:r.a.array.isRequired,isDataTableVisuallyHidden:r.a.bool},l.defaultProps={fillColor:null,strokeColor:"#000000",strokeWidth:1,className:"",mapChartDataToTableData:null,isDataTableVisuallyHidden:!0},t.a=l},,,,function(e,t,a){"use strict";var n=a(20),s=a(5),r=a(99);t.a=Object(n.compose)([Object(s.withSelect)((e,t)=>{const{getPostOrPageString:a,getIsModalOpen:n}=e("yoast-seo/editor");return{postTypeName:a(),isOpen:n(t.id)}}),Object(s.withDispatch)((e,t)=>{const{openEditorModal:a,closeEditorModal:n}=e("yoast-seo/editor");return{open:()=>a(t.id),close:n}})])(r.a)},function(e,t,a){"use strict";function n(e){jQuery("#wp-admin-bar-wpseo-menu .wpseo-score-icon").attr("title",e.screenReaderText).attr("class","wpseo-score-icon "+e.className).find(".wpseo-score-text").text(e.screenReaderText)}a.d(t,"a",(function(){return n}))},,function(e,t){e.exports=window.moment},,,,function(e,t,a){"use strict";function n(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e){var t=jQuery(".yst-traffic-light"),a=t.closest(".wpseo-meta-section-link"),n=jQuery("#wpseo-traffic-light-desc"),s=e.className||"na";t.attr("class","yst-traffic-light "+s),a.attr("aria-describedby","wpseo-traffic-light-desc"),n.length>0?n.text(e.screenReaderText):a.closest("li").append("<span id='wpseo-traffic-light-desc' class='screen-reader-text'>"+e.screenReaderText+"</span>")}a.d(t,"a",(function(){return n}))},,function(e,t,a){"use strict";function n(e){return function(){return e}}var s=function(){};s.thatReturns=n,s.thatReturnsFalse=n(!1),s.thatReturnsTrue=n(!0),s.thatReturnsNull=n(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(e){return e},e.exports=s},function(e,t,a){"use strict";a.r(t),a.d(t,"refreshDelay",(function(){return n}));const n=500},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return d}));var n=a(0),s=a(1),r=a(40),o=a(2),i=a.n(o),c=a(4),l=a(78),u=a(22);const d=e=>{let t=!0;if("blur"===e.type){const{relatedTarget:a}=e;if(a){const e=["media-modal","wp-core-ui"];t=Object(c.intersection)(e,Array.from(a.classList)).length!==e.length}}return t},p=e=>{let{id:t,postTypeName:a,children:o,title:i,isOpen:c,close:p,open:m,shouldCloseOnClickOutside:h,showChangesWarning:b}=e;const f=Object(n.useCallback)(e=>{d(e)&&p()},[p]);return Object(n.createElement)(n.Fragment,null,c&&Object(n.createElement)(u.LocationProvider,{value:"modal"},Object(n.createElement)(r.a,{title:i,onRequestClose:f,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:h},Object(n.createElement)("div",{className:"yoast-content-container"},Object(n.createElement)("div",{className:"yoast-modal-content"},o)),Object(n.createElement)("div",{className:"yoast-notice-container"},Object(n.createElement)("hr",null),Object(n.createElement)("div",{className:"yoast-button-container"},b&&Object(n.createElement)("p",null,
|
||
/* Translators: %s translates to the Post Label in singular form */
|
||
Object(s.sprintf)(Object(s.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),a)),Object(n.createElement)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:f},
|
||
/* Translators: %s translates to the Post Label in singular form */
|
||
Object(s.sprintf)(Object(s.__)("Return to your %s","wordpress-seo"),a)))))),Object(n.createElement)(l.a,{id:t+"-open-button",title:i,suffixIcon:{size:"20px",icon:"pencil-square"},onClick:m}))};p.propTypes={id:i.a.string.isRequired,postTypeName:i.a.string.isRequired,children:i.a.oneOfType([i.a.node,i.a.arrayOf(i.a.node)]).isRequired,title:i.a.string.isRequired,isOpen:i.a.bool.isRequired,open:i.a.func.isRequired,close:i.a.func.isRequired,shouldCloseOnClickOutside:i.a.bool,showChangesWarning:i.a.bool},p.defaultProps={shouldCloseOnClickOutside:!0,showChangesWarning:!0},t.a=p},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return f})),a.d(t,"c",(function(){return g})),a.d(t,"b",(function(){return y}));var n=a(0),s=a(2),r=a.n(s),o=a(1),i=a(4),c=a(86),l=a.n(c),u=a(8),d=a(9),p=a(79),m=()=>Object(n.createElement)("p",{className:"yoast-wincher-seo-performance-modal__loading-message"},Object(o.__)("Tracking the ranking position...","wordpress-seo")," ",Object(n.createElement)(u.SvgIcon,{icon:"loading-spinner"}));const h=Object(d.makeOutboundLink)();function b(e){return Math.round(100*e)}function f(e){let{chartData:t}=e;if(Object(i.isEmpty)(t)||Object(i.isEmpty)(t.position))return"?";const a=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>Object(o.sprintf)(Object(o._n)("%d day","%d days",e,"wordpress-seo"),e))}(t),s=t.position.history.map((e,t)=>({x:t,y:101-e.value}));return Object(n.createElement)(p.a,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",className:"yoast-related-keyphrases-modal__chart",mapChartDataToTableData:b,dataTableCaption:Object(o.__)("Keyphrase position in the last 90 days on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:a})}function g(e){return!e||!e.position||e.position.value>100?"> 100":e.position.value}function y(e){const{keyphrase:t,rowData:a,onTrackKeyphrase:s,onUntrackKeyphrase:r,isFocusKeyphrase:c,isDisabled:d,isLoading:p}=e,b=!Object(i.isEmpty)(a),y=Object(n.useCallback)(()=>{d||(b?r(t,a.id):s(t))},[t,s,r,b,a,d]);return Object(n.createElement)("tr",null,Object(n.createElement)("td",{className:"yoast-table--nopadding"},function(e){let{keyphrase:t,isEnabled:a,toggleAction:s,isLoading:r}=e;return r?Object(n.createElement)(u.SvgIcon,{icon:"loading-spinner"}):Object(n.createElement)(u.Toggle,{id:"toggle-keyphrase-tracking-"+t,className:"wincher-toggle",isEnabled:a,onSetToggleState:s,showToggleStateLabel:!1})}({keyphrase:t,isEnabled:b,toggleAction:y,isLoading:p})),Object(n.createElement)("td",null,t,c&&Object(n.createElement)("span",null,"*")),function(e){const{rowData:t,websiteId:a}=e,s=!Object(i.isEmpty)(t),r=t&&t.updated_at&&l()(t.updated_at)>=l()().subtract(7,"days"),c=t?Object(o.sprintf)("https://app.wincher.com/websites/%s/keywords?serp=%s&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast",a,t.id):null;return s?r?Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",null,g(t)),Object(n.createElement)("td",{className:"yoast-table--nopadding"},Object(n.createElement)(f,{chartData:t})),Object(n.createElement)("td",{className:"yoast-table--nobreak"},Object(n.createElement)(h,{href:c},Object(o.__)("View","wordpress-seo")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",{className:"yoast-table--nopadding",colSpan:"3"},Object(n.createElement)(m,null))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)("td",null,"?"),Object(n.createElement)("td",{className:"yoast-table--nopadding"},"?"),Object(n.createElement)("td",{className:"yoast-table--nobreak"}))}(e))}f.propTypes={chartData:r.a.object},f.defaultProps={chartData:{}},y.propTypes={rowData:r.a.object,keyphrase:r.a.string.isRequired,onTrackKeyphrase:r.a.func,onUntrackKeyphrase:r.a.func,isFocusKeyphrase:r.a.bool,isDisabled:r.a.bool,isLoading:r.a.bool,websiteId:r.a.string},y.defaultProps={rowData:{},onTrackKeyphrase:()=>{},onUntrackKeyphrase:()=>{},isFocusKeyphrase:!1,isDisabled:!1,isLoading:!1,websiteId:""}},,,function(e,t,a){"use strict";a.r(t),a.d(t,"updateScore",(function(){return o})),a.d(t,"createScoresInPublishBox",(function(){return i})),a.d(t,"scrollToCollapsible",(function(){return c})),a.d(t,"initialize",(function(){return l}));var n=a(4),s=jQuery;function r(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return null!==a?Object(n.get)(a,t,""):Object(n.get)(wpseoScriptData,`metabox.publish_box.labels.${e}.${t}`,"")}function o(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var n=s("#"+e+"-score"),o="image yoast-logo svg "+t;n.children(".image").attr("class",o);var i=r(e,t,a);n.children(".score-text").html(i)}function i(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=s("<div />",{class:"misc-pub-section yoast yoast-seo-score "+e+"-score",id:e+"-score"}),o=s("<span />",{class:"score-text",html:r(e,t,a)}),i=s("<span>").attr("class","image yoast-logo svg na");n.append(i).append(o),s("#yoast-seo-publishbox-section").append(n)}function c(e){const t=s("#wpadminbar"),a=s(e);if(!t||!a)return;const n="fixed"===t.css("position")?t.height():0;s([document.documentElement,document.body]).animate({scrollTop:a.offset().top-n},1e3),a.trigger("focus"),0===a.parent().siblings().length&&a.trigger("click")}function l(){wpseoScriptData.metabox.keywordAnalysisActive&&i("keyword","na"),wpseoScriptData.metabox.contentAnalysisActive&&i("content","na"),wpseoScriptData.metabox.inclusiveLanguageAnalysisActive&&i("inclusive-language","na"),s("#content-score").on("click","[href='#yoast-readability-analysis-collapsible-metabox']",(function(e){e.preventDefault(),document.querySelector("#wpseo-meta-tab-readability").click(),c("#wpseo-meta-section-readability")})),s("#keyword-score").on("click","[href='#yoast-seo-analysis-collapsible-metabox']",(function(e){e.preventDefault(),document.querySelector("#wpseo-meta-tab-content").click(),c("#yoast-seo-analysis-collapsible-metabox")})),s("#inclusive-language-score").on("click","[href='#yoast-inclusive-language-analysis-collapsible-metabox']",(function(e){e.preventDefault(),document.querySelector("#wpseo-meta-tab-inclusive-language").click(),c("#wpseo-meta-section-inclusive-language")}))}},,,function(e,t,a){"use strict";var n=a(12),s=a.n(n),r=a(0),o=a(11),i=a.n(o),c=a(28),l=a.n(c),u=a(2),d=a.n(u),p=a(1),m=a(8),h=a(19),b=a(9),f=a(34);const g=i.a.p`
|
||
color: ${h.colors.$color_pink_dark};
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
margin: 13px 0 10px;
|
||
`,y=i()(m.SvgIcon)`
|
||
margin-right: 5px;
|
||
vertical-align: middle;
|
||
`,O=i.a.button`
|
||
position: absolute;
|
||
top: 9px;
|
||
right: 9px;
|
||
border: none;
|
||
background: none;
|
||
cursor: pointer;
|
||
`,j=i.a.p`
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
margin: 10px 0 13px;
|
||
`,w=i.a.div`
|
||
position: relative;
|
||
background: ${e=>e.isTitleShortened?"#F5F7F7":"transparent"};
|
||
border: 1px solid #C7C7C7;
|
||
border-left: 4px solid${h.colors.$color_pink_dark};
|
||
padding: 0 16px;
|
||
margin-bottom: 1.5em;
|
||
`,v=e=>{let{limit:t,usage:a,isTitleShortened:n,isFreeAccount:s}=e;const o=Object(p.sprintf)(
|
||
/* Translators: %1$s expands to the number of used keywords.
|
||
* %2$s expands to the account keywords limit.
|
||
*/
|
||
Object(p.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),a,t),i=Object(p.sprintf)(
|
||
/* Translators: %1$s expands to the number of used keywords.
|
||
* %2$s expands to the account keywords limit.
|
||
*/
|
||
Object(p.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),a,t),c=s?o:i,l=Object(p.sprintf)(
|
||
/* Translators: %1$s expands to the number of used keywords.
|
||
* %2$s expands to the account keywords limit.
|
||
*/
|
||
Object(p.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),a,t),u=n?l:c;return Object(r.createElement)(g,null,n&&Object(r.createElement)(y,{icon:"exclamation-triangle",color:h.colors.$color_pink_dark,size:"14px"}),u)};v.propTypes={limit:d.a.number.isRequired,usage:d.a.number.isRequired,isTitleShortened:d.a.bool,isFreeAccount:d.a.bool};const k=Object(b.makeOutboundLink)(),E=e=>{let{discount:t,months:a}=e;const n=Object(r.createElement)(k,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600}},Object(p.sprintf)(
|
||
/* Translators: %s : Expands to "Wincher". */
|
||
Object(p.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher"));if(!t||!a)return Object(r.createElement)(j,null,n);const s=100*t,o=Object(p.sprintf)(
|
||
/* Translators: %1$s expands to upgrade account link.
|
||
* %2$s expands to the upgrade discount value.
|
||
* %3$s expands to the upgrade discount duration e.g. 2 months.
|
||
*/
|
||
Object(p.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"{{wincherAccountUpgradeLink/}}",s+"%",a);return Object(r.createElement)(j,null,l()({mixedString:o,components:{wincherAccountUpgradeLink:n}}))};E.propTypes={discount:d.a.number,months:d.a.number};const R=e=>{let{onClose:t,isTitleShortened:a}=e;const n=(()=>{const[e,t]=Object(r.useState)(null);return Object(r.useEffect)(()=>{e||Object(f.b)().then(e=>t(e))},[e]),e})(),o=(()=>{const[e,t]=Object(r.useState)(null);return Object(r.useEffect)(()=>{e||Object(f.e)().then(e=>t(e))},[e]),e})();if(null===n)return null;const{limit:i,usage:c}=n;if(!(i&&c/i>=.8))return null;const l=Boolean(null==o?void 0:o.discount);return Object(r.createElement)(w,{isTitleShortened:a},t&&Object(r.createElement)(O,{"aria-label":Object(p.__)("Close the upgrade callout","wordpress-seo"),onClick:t},Object(r.createElement)(m.SvgIcon,{icon:"times-circle",color:h.colors.$color_pink_dark,size:"14px"})),Object(r.createElement)(v,s()({},n,{isTitleShortened:a,isFreeAccount:l})),Object(r.createElement)(E,{discount:null==o?void 0:o.discount,months:null==o?void 0:o.months}))};R.propTypes={onClose:d.a.func,isTitleShortened:d.a.bool},t.a=R},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},a),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:a}=this.options,n=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,a,n.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:a,origin:n}=e;n===this.origin&&this.popup===a&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}},function(e,t,a){"use strict";var n=a(0),s=a(2),r=a.n(s),o=a(1),i=a(28),c=a.n(i),l=a(8);const u=e=>{const t=Object(o.sprintf)(
|
||
/* translators: %s expands to a link to open the Wincher login popup. */
|
||
Object(o.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"{{reconnectToWincher/}}","Wincher");return Object(n.createElement)(l.Alert,{type:"error",className:e.className},c()({mixedString:t,components:{reconnectToWincher:Object(n.createElement)("a",{href:"#",onClick:t=>{t.preventDefault(),e.onReconnect()}},Object(o.sprintf)(
|
||
/* translators: %s : Expands to "Wincher". */
|
||
Object(o.__)("reconnect to %s","wordpress-seo"),"Wincher"))}}))};u.propTypes={onReconnect:r.a.func.isRequired,className:r.a.string},u.defaultProps={className:""},t.a=u},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4);const s=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return()=>t.map(e=>e())};t.b=(e,t)=>{let a=e();return()=>{const s=e();Object(n.isEqual)(s,a)||(a=s,t(Object(n.clone)(s)))}}},,function(e,t,a){"use strict";var n=a(0),s=a(1),r=a(28),o=a.n(r),i=a(9);const c=Object(i.makeOutboundLink)(),l=Object(i.makeOutboundLink)();t.a=()=>{const e=Object(s.sprintf)(Object(s.__)(
|
||
/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
|
||
"With %1$s you can track the ranking position of your page in the search results based on your keyphrase(s). %2$s","wordpress-seo"),"{{wincherLink/}}","{{wincherReadMoreLink/}}");return Object(n.createElement)("p",null,o()({mixedString:e,components:{wincherLink:Object(n.createElement)(c,{href:wpseoAdminGlobalL10n["links.wincher.website"]},"Wincher"),wincherReadMoreLink:Object(n.createElement)(l,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"]},Object(s.__)("Read more about keyphrase tracking with Wincher","wordpress-seo"))}}))}},function(e,t,a){"use strict";var n=a(5),s=a(20),r=a(12),o=a.n(r),i=a(0),c=a(1),l=a(2),u=a.n(l),d=a(4),p=a(11),m=a.n(p),h=a(8),b=a(9),f=a(28),g=a.n(f);const y=Object(b.makeOutboundLink)(),O=e=>{const t=Object(c.sprintf)(
|
||
/* translators: %d expands to the amount of allowed keyphrases on a free account, %s expands to a link to Wincher plans. */
|
||
Object(c.__)("You've reached the maximum amount of %d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %s.","wordpress-seo"),e.limit,"{{updateWincherPlanLink/}}");return Object(i.createElement)(h.Alert,{type:"error"},g()({mixedString:t,components:{updateWincherPlanLink:Object(i.createElement)(y,{href:wpseoAdminGlobalL10n["links.wincher.pricing"]},Object(c.sprintf)(
|
||
/* translators: %s : Expands to "Wincher". */
|
||
Object(c.__)("upgrade your %s plan","wordpress-seo"),"Wincher"))}}))};O.propTypes={limit:u.a.number},O.defaultProps={limit:10};var j=O,w=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")),v=a(108),k=()=>Object(i.createElement)(h.Alert,{type:"success"},Object(c.sprintf)(
|
||
/* translators: %s: Expands to "Wincher". */
|
||
Object(c.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")),E=()=>Object(i.createElement)(h.Alert,{type:"info"},Object(c.sprintf)(
|
||
/* translators: %s: Expands to "Wincher". */
|
||
Object(c.__)("%s is currently tracking the ranking position(s) of your page. This may take a few minutes. Please wait or check back later.","wordpress-seo"),"Wincher")),R=a(102),_=a(34),T=a(29);const S=Object(b.makeOutboundLink)(),I=m.a.span`
|
||
display: block;
|
||
font-style: italic;
|
||
|
||
@media (min-width: 782px) {
|
||
display: inline;
|
||
position: absolute;
|
||
${Object(b.getDirectionalStyle)("right","left")}: 8px;
|
||
}
|
||
`,C=m.a.th`
|
||
min-width: 60px;
|
||
`,x=m.a.div`
|
||
width: 100%;
|
||
overflow-y: auto;
|
||
`,L=e=>{const t=Object(i.useRef)();return Object(i.useEffect)(()=>{t.current=e}),t.current},A=Object(d.debounce)(_.d,500,{leading:!0}),P=e=>{const{addTrackedKeyphrase:t,isLoggedIn:a,keyphrases:n,permalink:s,removeTrackedKeyphrase:r,setKeyphraseLimitReached:o,setRequestFailed:l,setRequestSucceeded:u,setTrackedKeyphrases:p,setHasTrackedAll:m,trackAll:h,trackedKeyphrases:b,isNewlyAuthenticated:f,websiteId:g,focusKeyphrase:y,newRequest:O}=e,j=Object(i.useRef)(),w=Object(i.useRef)(),v=Object(i.useRef)(!1),[k,E]=Object(i.useState)([]),P=Object(i.useCallback)(e=>{const t=e.toLowerCase();return b&&!Object(d.isEmpty)(b)&&b.hasOwnProperty(t)?b[t]:null},[b]),q=Object(i.useMemo)(()=>async()=>{await Object(T.b)(()=>(w.current&&w.current.abort(),w.current="undefined"==typeof AbortController?null:new AbortController,A(n,s,w.current.signal)),e=>{u(e),p(e.results)},e=>{l(e)})},[u,l,p,n,s]),N=Object(i.useCallback)(async e=>{const a=(Array.isArray(e)?e:[e]).map(e=>e.toLowerCase());E(e=>[...e,...a]),await Object(T.b)(()=>Object(_.f)(a),e=>{u(e),t(e.results),q()},e=>{400===e.status&&e.limit&&o(e.limit),l(e)},201),E(e=>Object(d.without)(e,...a))},[u,l,o,t,q]),D=Object(i.useCallback)(async(e,t)=>{e=e.toLowerCase(),E(t=>[...t,e]),await Object(T.b)(()=>Object(_.g)(t),t=>{u(t),r(e)},e=>{l(e)}),E(t=>Object(d.without)(t,e))},[u,r,l]),M=Object(i.useCallback)(async e=>{O(),await N(e)},[O,N]),K=L(s),F=L(n);Object(i.useEffect)(()=>{a&&s&&(s!==K||Object(d.difference)(n,F).length)&&q()},[a,s,K,n,F,q]),Object(i.useEffect)(()=>{if(a&&h&&null!==b){const e=n.filter(e=>!P(e));e.length&&N(e),m()}},[a,h,b,N,m,P,n]),Object(i.useEffect)(()=>{f&&!v.current&&(q(),v.current=!0)},[f,q]),Object(i.useEffect)(()=>{if(a&&!Object(d.isEmpty)(b))return Object(d.filter)(b,e=>Object(d.isEmpty)(e.updated_at)).length>0&&(j.current=setInterval(()=>{q()},1e4)),()=>{clearInterval(j.current)}},[a,b,q]);const B=a&&null===b;return n&&!Object(d.isEmpty)(n)&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(x,null,Object(i.createElement)("table",{className:"yoast yoast-table"},Object(i.createElement)("thead",null,Object(i.createElement)("tr",null,Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Tracking","wordpress-seo")},Object(c.__)("Tracking","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Keyphrase","wordpress-seo")},Object(c.__)("Keyphrase","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Position","wordpress-seo")},Object(c.__)("Position","wordpress-seo")),Object(i.createElement)("th",{scope:"col",abbr:Object(c.__)("Position over time","wordpress-seo")},Object(c.__)("Position over time","wordpress-seo")),Object(i.createElement)(C,{className:"yoast-table--nobreak"}))),Object(i.createElement)("tbody",null,n.map((e,t)=>Object(i.createElement)(R.b,{key:"trackable-keyphrase-"+t,keyphrase:e,onTrackKeyphrase:M,onUntrackKeyphrase:D,rowData:P(e),isFocusKeyphrase:e===y.trim().toLowerCase(),websiteId:g,isDisabled:!a,isLoading:B||k.indexOf(e.toLowerCase())>=0}))))),Object(i.createElement)("p",{style:{marginBottom:0,position:"relative"}},Object(i.createElement)(S,{href:wpseoAdminGlobalL10n["links.wincher.login"]},Object(c.sprintf)(
|
||
/* translators: %s expands to Wincher */
|
||
Object(c.__)("Get more insights over at %s","wordpress-seo"),"Wincher")),Object(i.createElement)(I,null,Object(c.__)("* focus keyphrase","wordpress-seo"))))};P.propTypes={addTrackedKeyphrase:u.a.func.isRequired,isLoggedIn:u.a.bool,isNewlyAuthenticated:u.a.bool,keyphrases:u.a.array,newRequest:u.a.func.isRequired,removeTrackedKeyphrase:u.a.func.isRequired,setRequestFailed:u.a.func.isRequired,setKeyphraseLimitReached:u.a.func.isRequired,setRequestSucceeded:u.a.func.isRequired,setTrackedKeyphrases:u.a.func.isRequired,setHasTrackedAll:u.a.func.isRequired,trackAll:u.a.bool,trackedKeyphrases:u.a.object,websiteId:u.a.string,permalink:u.a.string.isRequired,focusKeyphrase:u.a.string},P.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],trackAll:!1,trackedKeyphrases:null,websiteId:"",focusKeyphrase:""};var q=P,N=Object(s.compose)([Object(n.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackedKeyphrases:a,getWincherTrackableKeyphrases:n,getWincherLoginStatus:s,getWincherPermalink:r,getFocusKeyphrase:o,isWincherNewlyAuthenticated:i,shouldWincherTrackAll:c}=e("yoast-seo/editor");return{focusKeyphrase:o(),keyphrases:n(),trackedKeyphrases:a(),isLoggedIn:s(),trackAll:c(),websiteId:t(),isNewlyAuthenticated:i(),permalink:r()}}),Object(n.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:a,setWincherRequestFailed:n,setWincherSetKeyphraseLimitReached:s,setWincherTrackedKeyphrases:r,setWincherTrackingForKeyphrase:o,setWincherTrackAllKeyphrases:i,unsetWincherTrackingForKeyphrase:c}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{a(e)},setRequestFailed:e=>{n(e)},setKeyphraseLimitReached:e=>{s(e)},addTrackedKeyphrase:e=>{o(e)},removeTrackedKeyphrase:e=>{c(e)},setTrackedKeyphrases:e=>{r(e)},setHasTrackedAll:()=>{i(!1)}}})])(q),D=a(116),M=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")),K=()=>Object(i.createElement)(h.Alert,{type:"info"},Object(c.sprintf)(
|
||
/* translators: %s: Expands to "Wincher". */
|
||
Object(c.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")),F=a(109),B=a(110),W=()=>Object(i.createElement)(h.Alert,{type:"error"},Object(c.__)("Before you can track your SEO performance make sure to set either the post’s title and save it as a draft or manually set the post’s slug.","wordpress-seo"));const H=e=>{let{response:t,onLogin:a}=e;return[401,403,404].includes(t.status)?Object(i.createElement)(B.a,{onReconnect:a}):Object(i.createElement)(w,null)};H.propTypes={response:u.a.object.isRequired,onLogin:u.a.func.isRequired};const $=e=>{let{isSuccess:t,response:a,allKeyphrasesMissRanking:n,onLogin:s,keyphraseLimitReached:r,limit:o}=e;return r?Object(i.createElement)(j,{limit:o}):Object(d.isEmpty)(a)||t?n?Object(i.createElement)(E,null):null:Object(i.createElement)(H,{response:a,onLogin:s})};$.propTypes={isSuccess:u.a.bool.isRequired,allKeyphrasesMissRanking:u.a.bool.isRequired,response:u.a.object,onLogin:u.a.func.isRequired,keyphraseLimitReached:u.a.bool.isRequired,limit:u.a.number.isRequired},$.defaultProps={response:{}};let z=null;const G=async e=>{if(z&&!z.isClosed())return void z.focus();const{url:t}=await Object(_.c)();z=new F.a(t,{success:{type:"wincher:oauth:success",callback:t=>(async(e,t)=>{const{onAuthentication:a,setRequestSucceeded:n,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:i}=e;await Object(T.b)(()=>Object(_.a)(t),async e=>{a(!0,!0,t.websiteId.toString()),n(e);const c=(Array.isArray(r)?r:[r]).map(e=>e.toLowerCase());await Object(T.b)(()=>Object(_.f)(c),e=>{n(e),o(e.results)},e=>{400===e.status&&e.limit&&i(e.limit),s(e)},201);const l=z.getPopup();l&&l.close()},async e=>s(e))})(e,t)},error:{type:"wincher:oauth:error",callback:()=>e.onAuthentication(!1,!1)}},{title:"Wincher_login",width:500,height:700}),z.createPopup()},V=e=>e.isLoggedIn?null:Object(i.createElement)("p",null,Object(i.createElement)(h.NewButton,{onClick:e.onLogin,variant:"primary"},Object(c.sprintf)(
|
||
/* translators: %s expands to Wincher */
|
||
Object(c.__)("Connect with %s","wordpress-seo"),"Wincher")));V.propTypes={isLoggedIn:u.a.bool.isRequired,onLogin:u.a.func.isRequired};const U=m.a.div`
|
||
p {
|
||
margin: 1em 0;
|
||
}
|
||
`,Y=m.a.div`
|
||
${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
|
||
`,Z=m.a.div`
|
||
font-weight: var(--yoast-font-weight-bold);
|
||
color: var(--yoast-color-label);
|
||
font-size: var(--yoast-font-size-default);
|
||
`,J=e=>{const{isLoggedIn:t,keyphrases:a,shouldTrackAll:n,permalink:s}=e;return!s&&t?Object(i.createElement)(W,null):0===a.length?Object(i.createElement)(M,null):Object(i.createElement)(Y,{isDisabled:!t},Object(i.createElement)("p",null,Object(c.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")),t&&n&&Object(i.createElement)(K,null),Object(i.createElement)(N,null))};function Q(e){const{isNewlyAuthenticated:t,isLoggedIn:a}=e,n=Object(i.useCallback)(()=>{G(e)},[G,e]);return Object(i.createElement)(U,null,t&&Object(i.createElement)(k,null),a&&Object(i.createElement)(v.a,null),Object(i.createElement)(Z,null,Object(c.__)("SEO performance","wordpress-seo"),Object(i.createElement)(h.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"],linkText:Object(c.__)("Learn more about the SEO performance feature.","wordpress-seo")})),Object(i.createElement)(D.a,null),Object(i.createElement)(V,{isLoggedIn:a,onLogin:n}),Object(i.createElement)($,o()({},e,{onLogin:n})),Object(i.createElement)(J,e))}J.propTypes={keyphrases:u.a.array.isRequired,isLoggedIn:u.a.bool.isRequired,shouldTrackAll:u.a.bool.isRequired,permalink:u.a.string.isRequired},Q.propTypes={addTrackedKeyphrase:u.a.func.isRequired,isLoggedIn:u.a.bool,isNewlyAuthenticated:u.a.bool,keyphrases:u.a.array,response:u.a.object,shouldTrackAll:u.a.bool,permalink:u.a.string},Q.defaultProps={isLoggedIn:!1,isNewlyAuthenticated:!1,keyphrases:[],response:{},shouldTrackAll:!1,permalink:""},t.a=Object(s.compose)([Object(n.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:a,getWincherLimit:n,getWincherLoginStatus:s,getWincherRequestIsSuccess:r,getWincherRequestResponse:o,getWincherTrackableKeyphrases:i,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:l,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:i(),allKeyphrasesMissRanking:c(),isLoggedIn:s(),isNewlyAuthenticated:t(),isSuccess:r(),keyphraseLimitReached:a(),limit:n(),response:o(),shouldTrackAll:u(),permalink:l()}}),Object(n.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:a,setWincherRequestFailed:n,setWincherTrackingForKeyphrase:s,setWincherSetKeyphraseLimitReached:r,setWincherLoginStatus:o}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{a(e)},setRequestFailed:e=>{n(e)},addTrackedKeyphrase:e=>{s(e)},setKeyphraseLimitReached:e=>{r(e)},onAuthentication:(e,a,n)=>{t(n),o(e,a)}}})])(Q)},,,,,,,,,,function(e,t,a){"use strict";var n=a(3),s="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,r=a(93),o=a(128),i=a(129),c="function"==typeof Symbol&&Symbol.iterator;function l(e,t){return e&&"object"==typeof e&&null!=e.key?(a=e.key,n={"=":"=0",":":"=2"},"$"+(""+a).replace(/[=:]/g,(function(e){return n[e]}))):t.toString(36);var a,n}var u=/\/+/g;function d(e){return(""+e).replace(u,"$&/")}var p,m,h=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)};function f(e,t,a,n){this.result=e,this.keyPrefix=t,this.func=a,this.context=n,this.count=0}function g(e,t,a){var s,o,i=e.result,c=e.keyPrefix,l=e.func,u=e.context,p=l.call(u,t,e.count++);Array.isArray(p)?y(p,i,a,r.thatReturnsArgument):null!=p&&(n.isValidElement(p)&&(s=p,o=c+(!p.key||t&&t.key===p.key?"":d(p.key)+"/")+a,p=n.cloneElement(s,{key:o},void 0!==s.props?s.props.children:void 0)),i.push(p))}function y(e,t,a,n,r){var i="";null!=a&&(i=d(a)+"/");var u=f.getPooled(t,i,n,r);!function(e,t,a){null==e||function e(t,a,n,r){var i,u=typeof t;if("undefined"!==u&&"boolean"!==u||(t=null),null===t||"string"===u||"number"===u||"object"===u&&t.$$typeof===s)return n(r,t,""===a?"."+l(t,0):a),1;var d=0,p=""===a?".":a+":";if(Array.isArray(t))for(var m=0;m<t.length;m++)d+=e(i=t[m],p+l(i,m),n,r);else{var h=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(h)for(var b,f=h.call(t),g=0;!(b=f.next()).done;)d+=e(i=b.value,p+l(i,g++),n,r);else if("object"===u){var y=""+t;o(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(t).join(", ")+"}":y,"")}}return d}(e,"",t,a)}(e,g,u),f.release(u)}f.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},p=function(e,t,a,n){if(this.instancePool.length){var s=this.instancePool.pop();return this.call(s,e,t,a,n),s}return new this(e,t,a,n)},(m=f).instancePool=[],m.getPooled=p||h,m.poolSize||(m.poolSize=10),m.release=function(e){o(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(n.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;o(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var a in e)y(e[a],t,a,r.thatReturnsArgument);return t}},function(e,t,a){"use strict";e.exports=function(e,t,a,n,s,r,o,i){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[a,n,s,r,o,i],u=0;(c=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}},function(e,t,a){"use strict";var n=a(93);e.exports=n},function(e,t,a){"use strict";function n(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(n)}},,,function(e,t){e.exports=window.wp.sanitize},,function(e,t,a){"use strict";var n=a(20),s=a(5);const r=Object(n.compose)([Object(s.withSelect)((e,t)=>{const{isAlertDismissed:a}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:a(t.alertKey)}}),Object(s.withDispatch)((e,t)=>{const{dismissAlert:a}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>a(t.alertKey)}})]);t.a=r},function(e,t,a){"use strict";var n=a(5),s=a(20),r=a(0),o=a(1),i=a(2),c=a.n(i),l=a(4),u=a(8),d=()=>Object(r.createElement)("p",{className:"yoast-related-keyphrases-modal__loading-message"},Object(o.sprintf)(
|
||
/* translators: %1$s expands to "Yoast SEO", %2$s expands to "Semrush". */
|
||
Object(o.__)("Please wait while %1$s connects to %2$s to get related keyphrases...","wordpress-seo"),"Yoast SEO","Semrush")," ",Object(r.createElement)(u.SvgIcon,{icon:"loading-spinner"})),p=a(9);const m=Object(p.makeOutboundLink)();var h=()=>Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(o.sprintf)(
|
||
/* translators: %s : Expands to "Semrush". */
|
||
Object(o.__)("You've reached your request limit for today. Check back tomorrow or upgrade your plan over at %s.","wordpress-seo"),"Semrush")),Object(r.createElement)(m,{href:window.wpseoAdminL10n["shortlinks.semrush.prices"],className:"yoast-button-upsell"},Object(o.sprintf)(
|
||
/* translators: %s : Expands to "Semrush". */
|
||
Object(o.__)("Upgrade your %s plan","wordpress-seo"),"Semrush"),Object(r.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"}))),b=a(25),f=a.n(b),g=a(15);const y="yoast-semrush-country-selector",O=[{value:"us",name:"United States - US"},{value:"uk",name:"United Kingdom - UK"},{value:"ca",name:"Canada - CA"},{value:"ru",name:"Russia - RU"},{value:"de",name:"Germany - DE"},{value:"fr",name:"France - FR"},{value:"es",name:"Spain - ES"},{value:"it",name:"Italy - IT"},{value:"br",name:"Brazil - BR"},{value:"au",name:"Australia - AU"},{value:"ar",name:"Argentina - AR"},{value:"be",name:"Belgium - BE"},{value:"ch",name:"Switzerland - CH"},{value:"dk",name:"Denmark - DK"},{value:"fi",name:"Finland - FI"},{value:"hk",name:"Hong Kong - HK"},{value:"ie",name:"Ireland - IE"},{value:"il",name:"Israel - IL"},{value:"mx",name:"Mexico - MX"},{value:"nl",name:"Netherlands - NL"},{value:"no",name:"Norway - NO"},{value:"pl",name:"Poland - PL"},{value:"se",name:"Sweden - SE"},{value:"sg",name:"Singapore - SG"},{value:"tr",name:"Turkey - TR"},{value:"jp",name:"Japan - JP"},{value:"in",name:"India - IN"},{value:"hu",name:"Hungary - HU"},{value:"af",name:"Afghanistan - AF"},{value:"al",name:"Albania - AL"},{value:"dz",name:"Algeria - DZ"},{value:"ao",name:"Angola - AO"},{value:"am",name:"Armenia - AM"},{value:"at",name:"Austria - AT"},{value:"az",name:"Azerbaijan - AZ"},{value:"bh",name:"Bahrain - BH"},{value:"bd",name:"Bangladesh - BD"},{value:"by",name:"Belarus - BY"},{value:"bz",name:"Belize - BZ"},{value:"bo",name:"Bolivia - BO"},{value:"ba",name:"Bosnia and Herzegovina - BA"},{value:"bw",name:"Botswana - BW"},{value:"bn",name:"Brunei - BN"},{value:"bg",name:"Bulgaria - BG"},{value:"cv",name:"Cabo Verde - CV"},{value:"kh",name:"Cambodia - KH"},{value:"cm",name:"Cameroon - CM"},{value:"cl",name:"Chile - CL"},{value:"co",name:"Colombia - CO"},{value:"cr",name:"Costa Rica - CR"},{value:"hr",name:"Croatia - HR"},{value:"cy",name:"Cyprus - CY"},{value:"cz",name:"Czech Republic - CZ"},{value:"cd",name:"Congo - CD"},{value:"do",name:"Dominican Republic - DO"},{value:"ec",name:"Ecuador - EC"},{value:"eg",name:"Egypt - EG"},{value:"sv",name:"El Salvador - SV"},{value:"ee",name:"Estonia - EE"},{value:"et",name:"Ethiopia - ET"},{value:"ge",name:"Georgia - GE"},{value:"gh",name:"Ghana - GH"},{value:"gr",name:"Greece - GR"},{value:"gt",name:"Guatemala - GT"},{value:"gy",name:"Guyana - GY"},{value:"ht",name:"Haiti - HT"},{value:"hn",name:"Honduras - HN"},{value:"is",name:"Iceland - IS"},{value:"id",name:"Indonesia - ID"},{value:"jm",name:"Jamaica - JM"},{value:"jo",name:"Jordan - JO"},{value:"kz",name:"Kazakhstan - KZ"},{value:"kw",name:"Kuwait - KW"},{value:"lv",name:"Latvia - LV"},{value:"lb",name:"Lebanon - LB"},{value:"lt",name:"Lithuania - LT"},{value:"lu",name:"Luxembourg - LU"},{value:"mg",name:"Madagascar - MG"},{value:"my",name:"Malaysia - MY"},{value:"mt",name:"Malta - MT"},{value:"mu",name:"Mauritius - MU"},{value:"md",name:"Moldova - MD"},{value:"mn",name:"Mongolia - MN"},{value:"me",name:"Montenegro - ME"},{value:"ma",name:"Morocco - MA"},{value:"mz",name:"Mozambique - MZ"},{value:"na",name:"Namibia - NA"},{value:"np",name:"Nepal - NP"},{value:"nz",name:"New Zealand - NZ"},{value:"ni",name:"Nicaragua - NI"},{value:"ng",name:"Nigeria - NG"},{value:"om",name:"Oman - OM"},{value:"py",name:"Paraguay - PY"},{value:"pe",name:"Peru - PE"},{value:"ph",name:"Philippines - PH"},{value:"pt",name:"Portugal - PT"},{value:"ro",name:"Romania - RO"},{value:"sa",name:"Saudi Arabia - SA"},{value:"sn",name:"Senegal - SN"},{value:"rs",name:"Serbia - RS"},{value:"sk",name:"Slovakia - SK"},{value:"si",name:"Slovenia - SI"},{value:"za",name:"South Africa - ZA"},{value:"kr",name:"South Korea - KR"},{value:"lk",name:"Sri Lanka - LK"},{value:"th",name:"Thailand - TH"},{value:"bs",name:"Bahamas - BS"},{value:"tt",name:"Trinidad and Tobago - TT"},{value:"tn",name:"Tunisia - TN"},{value:"ua",name:"Ukraine - UA"},{value:"ae",name:"United Arab Emirates - AE"},{value:"uy",name:"Uruguay - UY"},{value:"ve",name:"Venezuela - VE"},{value:"vn",name:"Vietnam - VN"},{value:"zm",name:"Zambia - ZM"},{value:"zw",name:"Zimbabwe - ZW"},{value:"ly",name:"Libya - LY"}];class j extends r.Component{constructor(e){super(e),this.relatedKeyphrasesRequest=this.relatedKeyphrasesRequest.bind(this),this.onChangeHandler=this.onChangeHandler.bind(this)}componentDidMount(){this.props.response&&this.props.keyphrase===this.props.lastRequestKeyphrase||this.relatedKeyphrasesRequest()}storeCountryCode(e){f()({path:"yoast/v1/semrush/country_code",method:"POST",data:{country_code:e}})}async relatedKeyphrasesRequest(){const{keyphrase:e,countryCode:t,newRequest:a}=this.props;a(t,e),this.storeCountryCode(t);const n=await this.doRequest(e,t);200!==n.status?this.handleFailedResponse(n):this.handleSuccessResponse(n)}handleSuccessResponse(e){const{setNoResultsFound:t,setRequestSucceeded:a}=this.props;0!==e.results.rows.length?a(e):t()}handleFailedResponse(e){const{setRequestLimitReached:t,setRequestFailed:a}=this.props;"error"in e&&(e.error.includes("TOTAL LIMIT EXCEEDED")?t():a(e))}async doRequest(e,t){return await f()({path:Object(g.addQueryArgs)("/yoast/v1/semrush/related_keyphrases",{keyphrase:e,country_code:t})})}onChangeHandler(e){this.props.setCountry(e)}render(){return Object(r.createElement)("div",{id:y},Object(r.createElement)(u.SingleSelect,{id:y+"-select",label:Object(o.__)("Show results for:","wordpress-seo"),name:"semrush-country-code",options:O,selected:this.props.countryCode,onChange:this.onChangeHandler,wrapperClassName:"yoast-field-group yoast-field-group--inline"}),Object(r.createElement)(u.NewButton,{id:y+"-button",variant:"secondary",onClick:this.relatedKeyphrasesRequest},Object(o.__)("Select country","wordpress-seo")))}}j.propTypes={keyphrase:c.a.string,countryCode:c.a.string,response:c.a.object,lastRequestKeyphrase:c.a.string,setCountry:c.a.func.isRequired,newRequest:c.a.func.isRequired,setNoResultsFound:c.a.func.isRequired,setRequestSucceeded:c.a.func.isRequired,setRequestLimitReached:c.a.func.isRequired,setRequestFailed:c.a.func.isRequired},j.defaultProps={keyphrase:"",countryCode:"us",response:{},lastRequestKeyphrase:""};var w=j,v=a(79),k=a(67);const E=Object(p.makeOutboundLink)();class R extends r.Component{constructor(e){super(e),this.transformTrendDataToChartPoints=this.transformTrendDataToChartPoints.bind(this),this.getAreaChartDataTableHeaderLabels=this.getAreaChartDataTableHeaderLabels.bind(this),this.mapAreaChartDataToTableData=this.mapAreaChartDataToTableData.bind(this)}transformTrendDataToChartPoints(e){return e.split(",").map((e,t)=>({x:t,y:parseFloat(e)}))}getAreaChartDataTableHeaderLabels(){return[Object(o.__)("Twelve months ago","wordpress-seo"),Object(o.__)("Eleven months ago","wordpress-seo"),Object(o.__)("Ten months ago","wordpress-seo"),Object(o.__)("Nine months ago","wordpress-seo"),Object(o.__)("Eight months ago","wordpress-seo"),Object(o.__)("Seven months ago","wordpress-seo"),Object(o.__)("Six months ago","wordpress-seo"),Object(o.__)("Five months ago","wordpress-seo"),Object(o.__)("Four months ago","wordpress-seo"),Object(o.__)("Three months ago","wordpress-seo"),Object(o.__)("Two months ago","wordpress-seo"),Object(o.__)("Last month","wordpress-seo")]}mapAreaChartDataToTableData(e){return Math.round(100*e)}render(){const{keyphrase:e,relatedKeyphrases:t,countryCode:a,data:n,renderAction:s}=this.props,i="https://www.semrush.com/analytics/keywordoverview/?q="+encodeURIComponent(e)+"&db="+encodeURIComponent(a);return n&&!Object(l.isEmpty)(n.results)&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("table",{className:"yoast yoast-table"},Object(r.createElement)("thead",null,Object(r.createElement)("tr",null,Object(r.createElement)("th",{scope:"col",className:"yoast-table--primary"},Object(o.__)("Related keyphrase","wordpress-seo")),Object(r.createElement)("th",{scope:"col",abbr:Object(o.__)("Volume","wordpress-seo")},Object(o.__)("Volume","wordpress-seo"),Object(r.createElement)(k.a,{href:window.wpseoAdminL10n["shortlinks.semrush.volume_help"],className:"dashicons"},Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Learn more about the related keyphrases volume","wordpress-seo")))),Object(r.createElement)("th",{scope:"col",abbr:Object(o.__)("Trend","wordpress-seo")},Object(o.__)("Trend","wordpress-seo"),Object(r.createElement)(k.a,{href:window.wpseoAdminL10n["shortlinks.semrush.trend_help"],className:"dashicons"},Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Learn more about the related keyphrases trend","wordpress-seo")))),s&&Object(r.createElement)("td",{className:"yoast-table--nobreak"}))),Object(r.createElement)("tbody",null,n.results.rows.map((e,a)=>{const n=e[0],i=this.transformTrendDataToChartPoints(e[2]),c=this.getAreaChartDataTableHeaderLabels();return Object(r.createElement)("tr",{key:a},Object(r.createElement)("td",null,n),Object(r.createElement)("td",null,e[1]),Object(r.createElement)("td",{className:"yoast-table--nopadding"},Object(r.createElement)(v.a,{width:66,height:24,data:i,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",className:"yoast-related-keyphrases-modal__chart",mapChartDataToTableData:this.mapAreaChartDataToTableData,dataTableCaption:Object(o.__)("Keyphrase volume in the last 12 months on a scale from 0 to 100.","wordpress-seo"),dataTableHeaderLabels:c})),s&&Object(r.createElement)("td",{className:"yoast-table--nobreak"},s(n,t)))}))),Object(r.createElement)("p",{style:{marginBottom:0}},Object(r.createElement)(E,{href:i},Object(o.sprintf)(
|
||
/* translators: %s expands to Semrush */
|
||
Object(o.__)("Get more insights at %s","wordpress-seo"),"Semrush"))))}}R.propTypes={data:c.a.object,keyphrase:c.a.string,relatedKeyphrases:c.a.array,countryCode:c.a.string,renderAction:c.a.func},R.defaultProps={data:{},keyphrase:"",relatedKeyphrases:[],countryCode:"us",renderAction:null};var _=R;const T=Object(p.makeOutboundLink)();var S=()=>Object(r.createElement)(u.Alert,{type:"info"},Object(o.sprintf)(
|
||
/* translators: %s: Expands to "Yoast SEO". */
|
||
Object(o.__)("Would you like to be able to add these related keyphrases to the %s analysis so you can optimize your content even further?","wordpress-seo"),"Yoast SEO")+" ",Object(r.createElement)(T,{href:window.wpseoAdminL10n["shortlinks.semrush.premium_landing_page"]},Object(o.sprintf)(
|
||
/* translators: %s: Expands to "Yoast SEO Premium". */
|
||
Object(o.__)("Check out %s!","wordpress-seo"),"Yoast SEO Premium"))),I=()=>Object(r.createElement)(u.Alert,{type:"error"},Object(o.__)("We've encountered a problem trying to get related keyphrases. Please try again later.","wordpress-seo")),C=()=>Object(r.createElement)(u.Alert,{type:"warning"},Object(o.sprintf)(
|
||
/* translators: %s: Expands to "Yoast SEO". */
|
||
Object(o.__)("You've reached the maximum amount of 4 related keyphrases. You can change or remove related keyphrases in the %s metabox or sidebar.","wordpress-seo"),"Yoast SEO")),x=a(17);function L(e){const{response:t,lastRequestKeyphrase:a,keyphrase:n,newRequest:s,setCountry:i,renderAction:c,countryCode:u,requestLimitReached:p,setRequestFailed:m,setNoResultsFound:b,relatedKeyphrases:f,setRequestSucceeded:g,setRequestLimitReached:y}=e,O=Object(x.a)().isPremium;return Object(r.createElement)(r.Fragment,null,!p&&Object(r.createElement)(r.Fragment,null,!O&&Object(r.createElement)(S,null),O&&function(e){return e&&e.length>=4}(f)&&Object(r.createElement)(C,null),Object(r.createElement)(w,{countryCode:u,setCountry:i,newRequest:s,keyphrase:n,setRequestFailed:m,setNoResultsFound:b,setRequestSucceeded:g,setRequestLimitReached:y,response:t,lastRequestKeyphrase:a})),function(e){const{isPending:t,requestLimitReached:a,isSuccess:n,response:s,requestHasData:i}=e;return t?Object(r.createElement)(d,null):a?Object(r.createElement)(h,null):!n&&function(e){return!Object(l.isEmpty)(e)&&"error"in e}(s)?Object(r.createElement)(I,null):i?void 0:Object(r.createElement)("p",null,Object(o.__)("Sorry, there's no data available for that keyphrase/country combination.","wordpress-seo"))}(e),Object(r.createElement)(_,{keyphrase:n,relatedKeyphrases:f,countryCode:u,renderAction:c,data:t}))}L.propTypes={keyphrase:c.a.string,relatedKeyphrases:c.a.array,renderAction:c.a.func,requestLimitReached:c.a.bool,countryCode:c.a.string.isRequired,setCountry:c.a.func.isRequired,newRequest:c.a.func.isRequired,setRequestSucceeded:c.a.func.isRequired,setRequestLimitReached:c.a.func.isRequired,setRequestFailed:c.a.func.isRequired,setNoResultsFound:c.a.func.isRequired,response:c.a.object,lastRequestKeyphrase:c.a.string},L.defaultProps={keyphrase:"",relatedKeyphrases:[],renderAction:null,requestLimitReached:!1,response:{},lastRequestKeyphrase:""},t.a=Object(s.compose)([Object(n.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:a,getSEMrushRequestLimitReached:n,getSEMrushRequestResponse:s,getSEMrushRequestIsSuccess:r,getSEMrushIsRequestPending:o,getSEMrushRequestHasData:i,getSEMrushRequestKeyphrase:c}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:a(),requestLimitReached:n(),response:s(),isSuccess:r(),isPending:o(),requestHasData:i(),lastRequestKeyphrase:c()}}),Object(n.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:a,setSEMrushRequestSucceeded:n,setSEMrushRequestFailed:s,setSEMrushSetRequestLimitReached:r,setSEMrushNoResultsFound:o}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{a(e,t)},setRequestSucceeded:e=>{n(e)},setRequestFailed:e=>{s(e)},setRequestLimitReached:()=>{r()},setNoResultsFound:()=>{o()}}})])(L)},,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";var n=a(0),s=a(8),r=a(2),o=a.n(r),i=a(61),c=a(74);const l=e=>{let{target:t,scoreIndicator:a}=e;return Object(n.createElement)(c.a,{target:t},Object(n.createElement)(s.SvgIcon,Object(i.getIconForScore)(a)))};l.propTypes={target:o.a.string.isRequired,scoreIndicator:o.a.string.isRequired},t.a=l},,,function(e,t,a){"use strict";var n=a(5),s=a(20),r=a(0),o=a(1),i=a(38),c=a(2),l=a.n(c),u=a(164),d=a(4),p=a(14),m=a(61);class h extends r.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:Object(m.default)(t,this.props.keywordKey)}),this.handleMarkButtonClick=this.handleMarkButtonClick.bind(this),this.handleEditButtonClick=this.handleEditButtonClick.bind(this),this.handleResultsChange=this.handleResultsChange.bind(this)}componentDidUpdate(e){null!==this.props.results&&this.props.results!==e.results&&this.setState({mappedResults:Object(m.default)(this.props.results,this.props.keywordKey)})}deactivateMarker(){this.props.setActiveMarker(null),this.props.setMarkerPauseStatus(!1),this.removeMarkers()}activateMarker(e,t){this.props.setActiveMarker(e),t()}handleMarkButtonClick(e,t){const a=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;a===this.props.activeMarker?this.deactivateMarker():this.activateMarker(a,t)}handleResultsChange(e,t,a){const n=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;n===this.props.activeMarker&&(a?Object(d.isUndefined)(t)||this.activateMarker(n,t):this.deactivateMarker())}focusOnKeyphraseField(e){const t=this.props.keywordKey,a=""===t?"focus-keyword-input-"+e:"yoast-keyword-input-"+t+"-"+e,n=document.getElementById(a);n.focus(),n.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}focusOnGooglePreviewField(e,t){let a;a="metaDescriptionKeyword"===e||"metaDescriptionLength"===e?"description":"titleWidth"===e||"keyphraseInSEOTitle"===e?"title":"slug";const n=document.getElementById("yoast-google-preview-"+a+"-"+t);n.focus(),n.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}handleEditButtonClick(e){const t=this.props.location;"functionWordsInKeyphrase"!==e&&"keyphraseLength"!==e?(["metaDescriptionKeyword","metaDescriptionLength","titleWidth","keyphraseInSEOTitle","slugKeyword"].includes(e)&&this.handleGooglePreviewFocus(t,e),Object(i.doAction)("yoast.focus.input",e)):this.focusOnKeyphraseField(t)}handleGooglePreviewFocus(e,t){if("sidebar"===e)document.getElementById("yoast-google-preview-modal-open-button").click(),setTimeout(()=>this.focusOnGooglePreviewField(t,"modal"),500);else{const a=document.getElementById("yoast-snippet-editor-metabox");a&&"false"===a.getAttribute("aria-expanded")?(a.click(),setTimeout(()=>this.focusOnGooglePreviewField(t,e),100)):this.focusOnGooglePreviewField(t,e)}}removeMarkers(){window.YoastSEO.analysis.applyMarks(new p.Paper("",{}),[])}render(){const{mappedResults:e}=this.state,{errorsResults:t,improvementsResults:a,goodResults:n,considerationsResults:s,problemsResults:i}=e,{upsellResults:c,resultCategoryLabels:l}=this.props,d={errors:Object(o.__)("Errors","wordpress-seo"),problems:Object(o.__)("Problems","wordpress-seo"),improvements:Object(o.__)("Improvements","wordpress-seo"),considerations:Object(o.__)("Considerations","wordpress-seo"),goodResults:Object(o.__)("Good results","wordpress-seo")},p=Object.assign(d,l);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.ContentAnalysis,{errorsResults:t,problemsResults:i,upsellResults:c,improvementsResults:a,considerationsResults:s,goodResults:n,activeMarker:this.props.activeMarker,onMarkButtonClick:this.handleMarkButtonClick,onEditButtonClick:this.handleEditButtonClick,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,marksButtonStatus:this.props.marksButtonStatus,headingLevel:3,keywordKey:this.props.keywordKey,isPremium:this.props.isPremium,resultCategoryLabels:p,onResultChange:this.handleResultsChange}))}}h.propTypes={results:l.a.array,upsellResults:l.a.array,marksButtonClassName:l.a.string,editButtonClassName:l.a.string,marksButtonStatus:l.a.string,setActiveMarker:l.a.func.isRequired,setMarkerPauseStatus:l.a.func.isRequired,activeMarker:l.a.string,keywordKey:l.a.string,location:l.a.string,isPremium:l.a.bool,resultCategoryLabels:l.a.shape({errors:l.a.string,problems:l.a.string,improvements:l.a.string,considerations:l.a.string,goodResults:l.a.string})},h.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{}};var b=h;t.a=Object(s.compose)([Object(n.withSelect)(e=>{const{getActiveMarker:t,getIsPremium:a}=e("yoast-seo/editor");return{activeMarker:t(),isPremium:a()}}),Object(n.withDispatch)(e=>{const{setActiveMarker:t,setMarkerPauseStatus:a}=e("yoast-seo/editor");return{setActiveMarker:t,setMarkerPauseStatus:a}})])(b)},,,,,,,function(e,t){e.exports=window.yoast.analysisReport},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4),s=a(17);function r(){const e=Object(s.a)();return 1===Object(n.get)(e,"zapierConnectedStatus",0)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4),s=a(17);function r(){const e=Object(s.a)();return 1===Object(n.get)(e,"zapierIntegrationActive",0)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t);var n={};a.r(n),a.d(n,"doAjaxRequest",(function(){return K}));var s={};a.r(s),a.d(s,"setTextdomainL10n",(function(){return $}));var r=a(22),o=a(94),i=a(65),c=a(44),l=a(17),u=a(204),d=a(205),p=a(69),m=a(61),h=a(67),b=a(0),f=a(2),g=a.n(f),y=a(49),O=a(40),j=a(12),w=a.n(j),v=a(8),k=a(9),E=a(53);const R=e=>{let{hiddenField:t,hiddenFieldImageId:a,hiddenFieldFallbackImageId:n,hasImageValidation:s,...r}=e;const[o,i]=Object(b.useState)(null!==document.getElementById(n)),c=Object(b.useMemo)(()=>document.getElementById(t)),l=Object(b.useMemo)(()=>document.getElementById(a));let u=null;u=n&&document.getElementById(n)?Object(b.useMemo)(()=>document.getElementById(n)):l;const[d,p]=Object(b.useState)({url:c?c.value:"",id:u?parseInt(u.value,10):"",alt:""}),[m,h]=Object(b.useState)([]),f=Object(b.useCallback)(e=>{c&&(c.value=e.url),u&&(u.value=e.id)}),g=Object(b.useCallback)(()=>Object(E.b)(e=>{u=l,p(e),f(e),s&&h(Object(k.validateFacebookImage)(e)),i(!1)}),[s,f]),y=Object(b.useCallback)(()=>{u=l;const e={url:"",id:"",alt:""};p(e),f(e),h([]),i(!0)},[f]);return Object(b.useEffect)(()=>{d.id&&!d.alt&&Object(E.a)(d.id).then(e=>p(e))},[d]),Object(b.createElement)(v.ImageSelect,w()({},r,{usingFallback:o,imageUrl:d.url,imageId:d.id,imageAltText:d.alt,onClick:g,onRemoveImageClick:y,warnings:m}))};R.propTypes={hiddenField:g.a.string.isRequired,hiddenFieldImageId:g.a.string,hiddenFieldFallbackImageId:g.a.string,hasImageValidation:g.a.bool},R.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",hasImageValidation:!1};var _=R,T=a(74);function S(e){let{target:t,label:a,hasPreview:n,hiddenField:s,hiddenFieldImageId:r,hiddenFieldFallbackImageId:o,selectImageButtonId:i,replaceImageButtonId:c,removeImageButtonId:l,hasNewBadge:u,isDisabled:d,hasPremiumBadge:p,hasImageValidation:m}=e;return Object(b.createElement)(T.a,{target:t},Object(b.createElement)(_,{label:a,hasPreview:n,hiddenField:s,hiddenFieldImageId:r,hiddenFieldFallbackImageId:o,selectImageButtonId:i,replaceImageButtonId:c,removeImageButtonId:l,hasNewBadge:u,isDisabled:d,hasPremiumBadge:p,hasImageValidation:m}))}S.propTypes={target:g.a.string.isRequired,label:g.a.string.isRequired,hasPreview:g.a.bool.isRequired,hiddenField:g.a.string.isRequired,hiddenFieldImageId:g.a.string,hiddenFieldFallbackImageId:g.a.string,selectImageButtonId:g.a.string,replaceImageButtonId:g.a.string,removeImageButtonId:g.a.string,hasNewBadge:g.a.bool,isDisabled:g.a.bool,hasPremiumBadge:g.a.bool,hasImageValidation:g.a.bool},S.defaultProps={hiddenFieldImageId:"",hiddenFieldFallbackImageId:"",selectImageButtonId:"",replaceImageButtonId:"",removeImageButtonId:"",hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,hasImageValidation:!1};var I=a(154),C=a(66),x=a(32),L=a(77),A=a(83),P=a(135),q=Object(P.a)(v.Alert),N=a(157),D=a(136),M=a(117);function K(e,t,a,n){return new Promise((s,r)=>{jQuery.ajax({type:e,url:t,beforeSend:a?e=>{e.setRequestHeader("X-WP-Nonce",a)}:null,data:n,dataType:"json",success:s,error:r})})}var F=a(114),B=a(75),W=a(1),H=a(4);function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wpseoYoastJSL10n";const a=Object(H.get)(window,[t,e,"locale_data",e],!1);"yoast-components"===e&&(e="wordpress-seo"),!1===a?Object(W.setLocaleData)({"":{}},e):Object(W.setLocaleData)(a,e)}var z=a(90),G=a(72),V=a(84),U=a(105),Y=a(91);window.yoast=window.yoast||{},window.yoast.editorModules={analysis:{getL10nObject:l.a,getContentLocale:i.a,getIndicatorForScore:c.a,isZapierConnected:u.a,isZapierIntegrationActive:d.a,constants:o,refreshAnalysis:p},components:{HelpLink:h.a,TopLevelProviders:L.a,higherorder:{withYoastSidebarPriority:e=>{const t=t=>{const{renderPriority:a,...n}=t;return Object(b.createElement)(e,n)};return t.propTypes={renderPriority:g.a.number},t}},contentAnalysis:{mapResults:m},contexts:{location:{LocationContext:r.LocationContext,LocationProvider:r.LocationProvider,LocationConsumer:r.LocationConsumer}},SidebarItem:x.a,SidebarCollapsible:C.a,MetaboxCollapsible:y.a,Modal:O.a,portals:{Portal:T.a,ImageSelectPortal:S,ScoreIconPortal:I.a}},containers:{EditorModal:A.a,PersistentDismissableAlert:q,Results:N.a,SEMrushRelatedKeyphrases:D.a,WincherSEOPerformance:M.a},helpers:{ajaxHelper:n,createInterpolateElement:B.a,createWatcher:F.b,isBlockEditor:z.a,i18n:s,replacementVariableHelpers:G,publishBox:{updateScore:U.updateScore,createScoresInPublishBox:U.createScoresInPublishBox,scrollToCollapsible:U.scrollToCollapsible},updateAdminBar:V.a,updateTrafficLight:Y.a}}}]); |