at path:
ROOT
/
wp-content
/
plugins
/
wordpress-seo
/
js
/
dist
/
elementor.js
run:
R
W
Run
externals
DIR
2026-04-15 05:43:04
R
W
Run
languages
DIR
2026-04-15 05:43:04
R
W
Run
academy.js
16.88 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
addon-installation.js
4.06 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
admin-global.js
6.07 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
admin-modules.js
29.13 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
ai-consent.js
19.62 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
ai-generator.js
101.4 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
analysis-worker.js
617 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
api-client.js
579 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
block-editor.js
199.04 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
bulk-editor.js
2.49 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
classic-editor.js
140.52 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
crawl-settings.js
571 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
dashboard-widget.js
1.99 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
dynamic-blocks.js
1.01 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
edit-page.js
545 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
editor-modules.js
124.93 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
elementor.js
210.95 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-components.js
146.57 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-contexts.js
823 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
externals-redux.js
56.13 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
faq-block.js
52.4 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
filter-explanation.js
200 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
frontend-inspector-resources.js
3.79 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
general-page.js
324.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
help-scout-beacon.js
4.83 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
how-to-block.js
62.82 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
import.js
5.76 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
indexation.js
7.05 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
installation-success.js
6.43 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
integrations-page.js
160.73 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
introductions.js
35.33 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
network-admin.js
2.25 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
new-settings.js
498.92 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
plans.js
40.6 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
post-edit.js
101.59 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
quick-edit-handler.js
949 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
redirect-old-features-tab.js
237 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
redirects.js
71.96 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
reindex-links.js
2.71 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
settings.js
17.82 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
support.js
35.36 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
term-edit.js
58.97 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
used-keywords-assessment.js
782 By
2026-04-15 05:43:04
R
W
Run
Delete
Rename
wincher-dashboard-widget.js
20.18 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
workouts.js
38.21 KB
2026-04-15 05:43:04
R
W
Run
Delete
Rename
error_log
up
📄
elementor.js
Save
(()=>{var e={2485(e,t){var s;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var r=typeof s;if("string"===r||"number"===r)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===r){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)i.call(s,a)&&s[a]&&e.push(a)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()}},t={};function s(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.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 i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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})},(()=>{"use strict";var e={};s.r(e),s.d(e,{DISMISS_ALERT:()=>tl,NEW_REQUEST:()=>il,SNIPPET_EDITOR_FIND_CUSTOM_FIELDS:()=>sl,wistiaEmbedPermission:()=>ol});var t={};s.r(t),s.d(t,{loadSnippetEditorData:()=>cl,updateData:()=>ll});var i={};s.r(i),s.d(i,{getSnippetEditorData:()=>fl,getSnippetEditorSlug:()=>wl});var o={};s.r(o),s.d(o,{getAnalysisData:()=>Tl});var r={};s.r(r),s.d(r,{getWincherPermalink:()=>ac});var n={};s.r(n),s.d(n,{authorFirstName:()=>lc,authorLastName:()=>cc,category:()=>hc,categoryTitle:()=>gc,currentDate:()=>dc,currentDay:()=>pc,currentMonth:()=>uc,currentYear:()=>mc,date:()=>yc,excerpt:()=>wc,focusKeyphrase:()=>fc,id:()=>bc,modified:()=>xc,name:()=>_c,page:()=>vc,pageNumber:()=>kc,pageTotal:()=>Sc,permalink:()=>Rc,postContent:()=>Tc,postDay:()=>Ec,postMonth:()=>jc,postTypeNamePlural:()=>Ic,postTypeNameSingular:()=>Lc,postYear:()=>Cc,primaryCategory:()=>Ac,searchPhrase:()=>Pc,separator:()=>Dc,siteDescription:()=>Fc,siteName:()=>Mc,tag:()=>Oc,term404:()=>qc,termDescription:()=>Nc,termHierarchy:()=>Uc,termTitle:()=>Wc,title:()=>$c,userDescription:()=>Bc});const a=window.wp.data,l=window.wp.hooks,c=window.lodash,d=window.yoast.analysis;function p(){}const u=window.yoast.externals.redux;function h(e){return e.sort((e,t)=>e._identifier.localeCompare(t._identifier))}function g(){return(0,c.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}function m(){const e=g();return(0,c.get)(e,"contentLocale","en_US")}function y(){const e=g();return!0===(0,c.get)(e,"contentAnalysisActive",!1)}function w(){const e=g();return!0===(0,c.get)(e,"keywordAnalysisActive",!1)}function f(){const e=g();return!0===(0,c.get)(e,"inclusiveLanguageAnalysisActive",!1)}const b=window.yoast.featureFlag;class x{constructor(e){this.refresh=e,this.loaded=!1,this.preloadThreshold=3e3,this.plugins={},this.modifications={},this._registerPlugin=this._registerPlugin.bind(this),this._ready=this._ready.bind(this),this._reloaded=this._reloaded.bind(this),this._registerModification=this._registerModification.bind(this),this._registerAssessment=this._registerAssessment.bind(this),this._applyModifications=this._applyModifications.bind(this),setTimeout(this._pollLoadingPlugins.bind(this),1500)}_registerPlugin(e,t){return(0,c.isString)(e)?(0,c.isUndefined)(t)||(0,c.isObject)(t)?!1===this._validateUniqueness(e)?(console.error("Failed to register plugin. Plugin with name "+e+" already exists"),!1):(this.plugins[e]=t,!0):(console.error("Failed to register plugin "+e+". Expected parameters `options` to be a object."),!1):(console.error("Failed to register plugin. Expected parameter `pluginName` to be a string."),!1)}_ready(e){return(0,c.isString)(e)?(0,c.isUndefined)(this.plugins[e])?(console.error("Failed to modify status for plugin "+e+". The plugin was not properly registered."),!1):(this.plugins[e].status="ready",!0):(console.error("Failed to modify status for plugin "+e+". Expected parameter `pluginName` to be a string."),!1)}_reloaded(e){return(0,c.isString)(e)?(0,c.isUndefined)(this.plugins[e])?(console.error("Failed to reload Content Analysis for plugin "+e+". The plugin was not properly registered."),!1):(this.refresh(),!0):(console.error("Failed to reload Content Analysis for "+e+". Expected parameter `pluginName` to be a string."),!1)}_registerModification(e,t,s,i){if(!(0,c.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,c.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,c.isString)(s))return console.error("Failed to register modification for plugin "+s+". Expected parameter `pluginName` to be a string."),!1;if(!1===this._validateOrigin(s))return console.error("Failed to register modification for plugin "+s+". The integration has not finished loading yet."),!1;const o={callable:t,origin:s,priority:(0,c.isNumber)(i)?i:10};return(0,c.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(o),!0}_registerAssessment(e,t,s,i){return(0,c.isString)(t)?(0,c.isObject)(s)?(0,c.isString)(i)?(t=i+"-"+t,e.addAssessment(t,s),!0):(console.error("Failed to register assessment for plugin "+i+". Expected parameter `pluginName` to be a string."),!1):(console.error("Failed to register assessment for plugin "+i+". Expected parameter `assessment` to be a function."),!1):(console.error("Failed to register test for plugin "+i+". Expected parameter `name` to be a string."),!1)}_applyModifications(e,t,s){let i=this.modifications[e];return!(0,c.isArray)(i)||i.length<1||(i=this._stripIllegalModifications(i),i.sort((e,t)=>e.priority-t.priority),(0,c.forEach)(i,function(i){const o=i.callable(t,s);typeof o==typeof t?t=o:console.error("Modification with name "+e+" performed by plugin with name "+i.origin+" was ignored because the data that was returned by it was of a different type than the data we had passed it.")})),t}_pollLoadingPlugins(e){e=(0,c.isUndefined)(e)?0:e,!0===this._allReady()?(this.loaded=!0,this.refresh()):e>=this.preloadThreshold?(this._pollTimeExceeded(),this.loaded=!0,this.refresh()):(e+=50,setTimeout(this._pollLoadingPlugins.bind(this,e),50))}_allReady(){return(0,c.reduce)(this.plugins,function(e,t){return e&&"ready"===t.status},!0)}_pollTimeExceeded(){(0,c.forEach)(this.plugins,function(e,t){(0,c.isUndefined)(e.options)||"ready"===e.options.status||(console.error("Error: Plugin "+t+". did not finish loading in time."),delete this.plugins[t])})}_stripIllegalModifications(e){return(0,c.forEach)(e,(t,s)=>{!1===this._validateOrigin(t.origin)&&delete e[s]}),e}_validateOrigin(e){return"ready"===this.plugins[e].status}_validateUniqueness(e){return(0,c.isUndefined)(this.plugins[e])}}let _=null;const v=()=>{if(null===_){const e=(0,a.dispatch)("yoast-seo/editor").runAnalysis;_=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new x(e)}return _},k=e=>v()._ready(e),S=e=>v()._reloaded(e),R=(e,t,s,i)=>v()._registerModification(e,t,s,i),T=(e,t)=>v()._registerPlugin(e,t),E=(e,t,s)=>v().loaded?v()._applyModifications(e,t,s):t;function j(e,t){return e._properties.position.startOffset>t.length||e._properties.position.endOffset>t.length}function C(e,t,s){const i=e.dom;let o=e.getContent();if(o=d.markers.removeMarks(o),(0,c.isEmpty)(s))return void e.setContent(o);o=s[0].hasPosition()?function(e,t){if(!t)return"";for(let s=(e=(0,c.orderBy)(e,e=>e._properties.position.startOffset,["asc"])).length-1;s>=0;s--){const i=e[s];j(i,t)||(t=i.applyWithPosition(t))}return t}(s,o):function(e,t,s,i){const{fieldsToMark:o,selectedHTML:r}=d.languageProcessing.getFieldsToMark(s,i);return(0,c.forEach)(s,function(t){"acf_content"!==e.id&&(t._properties.marked=d.languageProcessing.normalizeHTML(t._properties.marked),t._properties.original=d.languageProcessing.normalizeHTML(t._properties.original)),o.length>0?r.forEach(e=>{const s=t.applyWithReplace(e);i=i.replace(e,s)}):i=t.applyWithReplace(i)}),i}(e,0,s,o),e.setContent(o),function(e){let t=e.getContent();t=t.replace(new RegExp("<yoastmark.+?>","g"),"").replace(new RegExp("</yoastmark>","g"),""),e.setContent(t)}(e);const r=i.select("yoastmark");(0,c.forEach)(r,function(e){e.setAttribute("data-mce-bogus","1")})}function I(e){return window.test=e,C.bind(null,e)}c.noop,c.noop,c.noop;const L="content";function A(e){if("undefined"==typeof tinyMCE||void 0===tinyMCE.editors||0===tinyMCE.editors.length)return!1;const t=tinyMCE.get(e);return null!==t&&!t.isHidden()}window.wp.annotations;const P=window.wp.richText,D=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:F}=d.helpers.htmlEntities,M=e=>{let t=0;return(0,c.forEachRight)(e,e=>{const[s]=e;let i=s.length;/^<\/?br/.test(s)&&(i-=1),t+=i}),t},O="<yoastmark class='yoast-text-mark'>",q="</yoastmark>",N='<yoastmark class="yoast-text-mark">';function U(e,t,s,i,o){const r=i.clientId,n=(0,P.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,c.flatMap)(o,s=>{let o;return o=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,i,o){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),r=e.getBlockPositionEnd();if(e.isMarkForFirstBlockSection()){const e=((e,t,s)=>{const i="yoast/faq-block"===s?'<strong class="schema-faq-question">':'<strong class="schema-how-to-step-name">';return{blockStartOffset:e-=i.length,blockEndOffset:t-=i.length}})(t,r,s);t=e.blockStartOffset,r=e.blockEndOffset}if(i.slice(t,r)===o.slice(t,r))return[{startOffset:t,endOffset:r}];const n=((e,t,s)=>{const i=s.slice(0,e),o=s.slice(0,t),r=((e,t,s,i)=>{const o=[...e.matchAll(D)];s-=M(o);const r=[...t.matchAll(D)];return{blockStartOffset:s,blockEndOffset:i-=M(r)}})(i,o,e,t),n=((e,t,s,i)=>{let o=[...e.matchAll(F)];return(0,c.forEachRight)(o,e=>{const[,t]=e;s-=t.length}),o=[...t.matchAll(F)],(0,c.forEachRight)(o,e=>{const[,t]=e;i-=t.length}),{blockStartOffset:s,blockEndOffset:i}})(i,o,e=r.blockStartOffset,t=r.blockEndOffset);return{blockStartOffset:e=n.blockStartOffset,blockEndOffset:t=n.blockEndOffset}})(t,r,i);return[{startOffset:n.blockStartOffset,endOffset:n.blockEndOffset}]}return[]}(s,r,i.name,e,n):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),i=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),o=function(e,t,s=!0){const i=[];if(0===e.length)return i;let o,r=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(o=e.indexOf(t,r))>-1;)i.push(o),r=o+t.length;return i}(e,s);if(0===o.length)return[];const r=function(e){let t=e.indexOf(O);const s=t>=0;s||(t=e.indexOf(N));let i=null;const o=[];for(;t>=0;){if(i=(e=s?e.replace(O,""):e.replace(N,"")).indexOf(q),i<t)return[];e=e.replace(q,""),o.push({startOffset:t,endOffset:i}),t=s?e.indexOf(O):e.indexOf(N),i=null}return o}(i),n=[];return r.forEach(e=>{o.forEach(i=>{const o=i+e.startOffset;let r=i+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(r=i+s.length),n.push({startOffset:o,endOffset:r})})}),n}(n,s),o?o.map(e=>({...e,block:r,richTextIdentifier:t})):[]})}const W=e=>e[0].toUpperCase()+e.slice(1),$=(e,t,s,i,o)=>(e=e.map(e=>{const r=`${e.id}-${o[0]}`,n=`${e.id}-${o[1]}`,a=W(o[0]),l=W(o[1]),c=e[`json${a}`],d=e[`json${l}`],{marksForFirstSection:p,marksForSecondSection:u}=((e,t)=>({marksForFirstSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&e.isMarkForFirstBlockSection():e),marksForSecondSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&!e.isMarkForFirstBlockSection():e)}))(t,e),h=U(c,r,s,i,p),g=U(d,n,s,i,u);return h.concat(g)}),(0,c.flattenDeep)(e)),B="yoast";let K=[];const H={"core/paragraph":[{key:"content"}],"core/list":[{key:"values",multilineTag:"li",multilineWrapperTag:["ul","ol"]}],"core/list-item":[{key:"content"}],"core/heading":[{key:"content"}],"core/audio":[{key:"caption"}],"core/embed":[{key:"caption"}],"core/gallery":[{key:"caption"}],"core/image":[{key:"caption"}],"core/table":[{key:"caption"}],"core/video":[{key:"caption"}],"yoast/faq-block":[{key:"questions"}],"yoast/how-to-block":[{key:"steps"},{key:"jsonDescription"}]};function V(){const e=K.shift();e&&((0,a.dispatch)("core/annotations").__experimentalAddAnnotation(e),Y())}function Y(){(0,c.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(V,{timeout:1e3}):setTimeout(V,150)}function z(e,t){return(0,c.flatMap)(e,e=>{const s=function(e){return e.innerBlocks.length>0}(e)?z(e.innerBlocks,t):[];return((e,t)=>{return(0,c.flatMap)((s=e.name,H.hasOwnProperty(s)?H[s]:[]),s=>"yoast/faq-block"===e.name?((e,t,s)=>{const i=t.attributes[e.key];return 0===i.length?[]:$(i,s,e,t,["question","answer"])})(s,e,t):"yoast/how-to-block"===e.name?((e,t,s)=>{const i=t.attributes[e.key];if(i&&0===i.length)return[];const o=[];return"steps"===e.key&&o.push($(i,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e),o.push(U(i,"description",e,t,s))),(0,c.flattenDeep)(o)})(s,e,t):function(e,t,s){const i=e.key,o=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:(s||"").toString()})(t,i);return U(o,i,e,t,s)}(s,e,t));var s})(e,t).concat(s)})}function G(e){K=[],(0,a.dispatch)("core/annotations").__experimentalRemoveAnnotationsBySource(B);const t=function(e){return(0,c.uniq)((0,c.flatten)(e.map(e=>{if(!(0,c.isUndefined)(e.getFieldsToMark()))return e.getFieldsToMark()})))}(e);if(0===e.length)return;const s=(0,a.select)("core/block-editor"),i="template-locked"===(0,a.select)("core/editor").getRenderingMode(),o=s.getBlocksByName("core/post-content");let r=i&&null!=o&&o.length?s.getBlocks(o[0]):s.getBlocks();var n;t.length>0&&(r=r.filter(e=>t.some(t=>"core/"+t===e.name))),n=z(r,e),K=n.map(e=>({blockClientId:e.block,source:B,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}})),Y()}function Z(e,t){let s;A(L)&&((0,c.isUndefined)(s)&&(s=I(tinyMCE.get(L))),s(e,t)),(0,a.select)("core/editor")&&(0,a.select)("core/block-editor")&&(0,c.isFunction)((0,a.select)("core/block-editor").getBlocks)&&(0,a.select)("core/annotations")&&(0,c.isFunction)((0,a.dispatch)("core/annotations").__experimentalAddAnnotation)&&(function(e,t){tinyMCE.editors.map(e=>I(e)).forEach(s=>s(e,t))}(e,t),G(t)),(0,l.doAction)("yoast.analysis.applyMarks",t)}function Q(){const e=(0,a.select)("yoast-seo/editor").isMarkingAvailable(),t=(0,a.select)("yoast-seo/editor").getMarkerPauseStatus();return!e||t?c.noop:Z}const X=(0,c.debounce)(async function(e,t){const{text:s,...i}=t,o=new d.Paper(s,i);try{const t=await e.analyze(o),{seo:s,readability:i,inclusiveLanguage:r}=t.result;if(s){const e=s[""];e.results.forEach(e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(o,e.marks)}),e.results=h(e.results),(0,a.dispatch)("yoast-seo/editor").setSeoResultsForKeyword(o.getKeyword(),e.results),(0,a.dispatch)("yoast-seo/editor").setOverallSeoScore(e.score,o.getKeyword())}i&&(i.results.forEach(e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(o,e.marks)}),i.results=h(i.results),(0,a.dispatch)("yoast-seo/editor").setReadabilityResults(i.results),(0,a.dispatch)("yoast-seo/editor").setOverallReadabilityScore(i.score)),r&&(r.results.forEach(e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(o,e.marks)}),r.results=h(r.results),(0,a.dispatch)("yoast-seo/editor").setInclusiveLanguageResults(r.results),(0,a.dispatch)("yoast-seo/editor").setOverallInclusiveLanguageScore(r.score)),(0,l.doAction)("yoast.analysis.run",t,{paper:o})}catch(e){}},500);function J(){const{getAnalysisData:e,getEditorDataTitle:t,getIsFrontPage:s}=(0,a.select)("yoast-seo/editor");let i=e();i={...i,textTitle:t(),isFrontPage:s()};const o=function(e){return e.title=E("data_page_title",e.title),e.title=E("title",e.title),e.description=E("data_meta_desc",e.description),e.text=E("content",e.text),e}(i);return(0,l.applyFilters)("yoast.analysis.data",o)}const ee=()=>{const{getContentLocale:e}=(0,a.select)("yoast-seo/editor"),t=((...e)=>()=>e.map(e=>e()))(e,J),s=(()=>{const{setEstimatedReadingTime:e,setFleschReadingEase:t,setTextLength:s}=(0,a.dispatch)("yoast-seo/editor"),i=(0,c.get)(window,"YoastSEO.analysis.worker.runResearch",c.noop);return()=>{const o=d.Paper.parse(J());i("readingTime",o).then(t=>e(t.result)),i("getFleschReadingScore",o).then(e=>{e.result&&t(e.result)}),i("wordCountInText",o).then(e=>s(e.result))}})();return setTimeout(s,1500),((e,t)=>{let s=e();return()=>{const i=e();(0,c.isEqual)(i,s)||(s=i,t((0,c.clone)(i)))}})(t,s)},te=window.wp.components,se=window.wp.element,ie=window.yoast.externals.contexts,oe=window.yoast.propTypes;var re=s.n(oe);const ne=window.yoast.styledComponents;var ae=s.n(ne);const le=window.ReactJSXRuntime,ce=({theme:e,location:t,children:s})=>(0,le.jsx)(ie.LocationProvider,{value:t,children:(0,le.jsx)(ne.ThemeProvider,{theme:e,children:s})});ce.propTypes={theme:re().object.isRequired,location:re().oneOf(["sidebar","metabox","modal"]).isRequired,children:re().node.isRequired};const de=ce,pe=[];let ue=null;class he extends se.Component{constructor(e){super(e),this.state={registeredComponents:[...pe]}}registerComponent(e,t){this.setState(s=>({...s,registeredComponents:[...s.registeredComponents,{key:e,Component:t}]}))}render(){return this.state.registeredComponents.map(({Component:e,key:t})=>(0,le.jsx)(e,{},t))}}function ge(e,t){null===ue||null===ue.current?pe.push({key:e,Component:t}):ue.current.registerComponent(e,t)}const me=()=>!0;class ye extends $e.modules.hookUI.Base{constructor(e,t,s,i=me){super(),this.command=e,this.id=t,this.callback=s,this.conditions=i}getCommand(){return this.command}getId(){return this.id}getConditions(...e){return this.conditions(...e)}apply(...e){return this.callback(...e)}}class we extends $e.modules.hookData.Base{constructor(e,t,s,i=me){super(),this.command=e,this.id=t,this.callback=s,this.conditions=i.bind(this)}getCommand(){return this.command}getId(){return this.id}getConditions(...e){return this.conditions(...e)}apply(...e){return this.callback(...e)}}function fe(e,t,s,i=me){return $e.hooks.registerUIAfter(new ye(e,t,s,i))}function be(e,t,s,i=me){return $e.hooks.registerUIBefore(new ye(e,t,s,i))}function xe(e,t,s,i=me){return $e.hooks.registerDataAfter(new we(e,t,s,i))}const _e=e=>{return parseInt(null===(t=document.getElementById("post_ID"))||void 0===t?void 0:t.value,10)===e;var t},ve=()=>{var e;return _e(null===(e=elementor.documents.getCurrent())||void 0===e?void 0:e.id)},ke=["yoast_wpseo_linkdex","yoast_wpseo_content_score","yoast_wpseo_inclusive_language_score","yoast_wpseo_words_for_linking","yoast_wpseo_estimated-reading-time-minutes"],Se=["yoast_wpseo_focuskeywords","hidden_wpseo_focuskeywords"],Re=window.wp.i18n,Te=e=>{let t="";e&&(t=(0,Re.sprintf)(/* translators: %1$s translates to the Post Label in singular form */ /* translators: %1$s translates to the Post Label in singular form */ (0,Re.__)("Unfortunately we cannot save changes to your SEO settings while you are working on a draft of an already-published %1$s. If you want to save your SEO changes, make sure to click 'Update', or wait to make your SEO changes until you are ready to update the %1$s.","wordpress-seo"),wpseoAdminL10n.postTypeNameSingular.toLowerCase())),"draft"===elementor.settings.page.model.get("post_status")&&(t=""),(0,a.select)("yoast-seo/editor").getWarningMessage()!==t&&(0,a.dispatch)("yoast-seo/editor").setWarningMessage(t)},Ee=(e,t,s)=>null===t?null:(0,se.createPortal)(e,t,s),je=({id:e,children:t})=>{const s=(0,se.useRef)(document.getElementById(e)),[i,o]=(0,se.useState)(()=>Ee(t,s.current,e)),r=(0,se.useCallback)(()=>{const i=document.getElementById(e);i!==s.current&&(s.current=i,o(Ee(t,i,e)))},[e,t]);return((e,t,s={childList:!0,subtree:!0})=>{(0,se.useEffect)(()=>{const i=new MutationObserver(t);return i.observe(e,s),()=>i.disconnect()},[e,t])})(document.body,r),i},Ce=window.yoast.uiLibrary,Ie=window.React;var Le=s.n(Ie);Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});const Ae=(e,t)=>{try{return(0,se.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}};re().string.isRequired;const Pe=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))}),De=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))});re().string.isRequired,re().string.isRequired,re().shape({src:re().string.isRequired,width:re().string,height:re().string}).isRequired,re().shape({value:re().bool.isRequired,status:re().string.isRequired,set:re().func.isRequired}).isRequired,re().string,re().string,re().string;const Fe=({handleRefreshClick:e,supportLink:t})=>(0,le.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,le.jsx)(Ce.Button,{onClick:e,children:(0,Re.__)("Refresh this page","wordpress-seo")}),(0,le.jsx)(Ce.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,Re.__)("Contact support","wordpress-seo")})]});Fe.propTypes={handleRefreshClick:re().func.isRequired,supportLink:re().string.isRequired};const Me=({handleRefreshClick:e,supportLink:t})=>(0,le.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,le.jsx)(Ce.Button,{className:"yst-order-last",onClick:e,children:(0,Re.__)("Refresh this page","wordpress-seo")}),(0,le.jsx)(Ce.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,Re.__)("Contact support","wordpress-seo")})]});Me.propTypes={handleRefreshClick:re().func.isRequired,supportLink:re().string.isRequired};const Oe=({error:e,children:t=null})=>(0,le.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,le.jsx)(Ce.Title,{children:(0,Re.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,le.jsx)("p",{children:(0,Re.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,le.jsx)(Ce.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,Re.__)("Undefined error message.","wordpress-seo")}),(0,le.jsx)("p",{children:(0,Re.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")}),t]});Oe.propTypes={error:re().object.isRequired,children:re().node},Oe.VerticalButtons=Me,Oe.HorizontalButtons=Fe;re().string,re().node.isRequired,re().node.isRequired,re().node,re().oneOf(Object.keys({lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}));const qe=window.ReactDOM;var Ne,Ue,We;(Ue=Ne||(Ne={})).Pop="POP",Ue.Push="PUSH",Ue.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(We||(We={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const Be=["post","put","patch","delete"],Ke=(new Set(Be),["get",...Be]);new Set(Ke),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),Ie.Component,Ie.startTransition,new Promise(()=>{}),Ie.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var He,Ve,Ye,ze;new Map,Ie.startTransition,qe.flushSync,Ie.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(ze=He||(He={})).UseScrollRestoration="useScrollRestoration",ze.UseSubmit="useSubmit",ze.UseSubmitFetcher="useSubmitFetcher",ze.UseFetcher="useFetcher",ze.useViewTransitionState="useViewTransitionState",(Ye=Ve||(Ve={})).UseFetcher="useFetcher",Ye.UseFetchers="useFetchers",Ye.UseScrollRestoration="useScrollRestoration",re().string.isRequired,re().string;re().string.isRequired,re().node;const Ge=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))});(0,Re.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,Re.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,Re.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,Re.__)("Optimize pages for multiple keywords with guidance","wordpress-seo"),(0,Re.__)("Add product details to help your listings stand out","wordpress-seo"),(0,Re.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,Re.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,Re.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo"),(0,Re.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,Re.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,Re.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,Re.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,Re.__)("Internal links and redirect management, easy","wordpress-seo"),(0,Re.__)("Access to friendly help when you need it, day or night","wordpress-seo");var Ze=s(2485),Qe=s.n(Ze);var Xe;function Je(){return Je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},Je.apply(null,arguments)}re().string.isRequired,re().object.isRequired,re().func.isRequired,Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))});const et=e=>Ie.createElement("svg",Je({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),Xe||(Xe=Ie.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74Z"})));re().string.isRequired,re().object,re().func.isRequired,re().bool.isRequired,re().string.isRequired,re().object.isRequired,re().string.isRequired,re().func.isRequired,re().bool.isRequired,Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}),re().bool.isRequired,re().func,re().func,re().string.isRequired,re().string.isRequired,re().string.isRequired,re().string.isRequired;window.yoast.reactHelmet;const tt="idle",st="loading";re().string.isRequired,re().shape({src:re().string.isRequired,width:re().string,height:re().string}).isRequired,re().shape({value:re().bool.isRequired,status:re().string.isRequired,set:re().func.isRequired}).isRequired,re().bool,Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}),re().bool.isRequired,re().func.isRequired,re().func,re().string,re().func.isRequired,re().string.isRequired,re().string.isRequired,re().string.isRequired,re().string.isRequired;const it=({error:e})=>{const t=(0,se.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/elementor-error-support"),[]),i=(0,a.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,le.jsx)(Ce.Root,{context:{isRtl:i},children:(0,le.jsx)(Oe,{error:e,children:(0,le.jsx)(Oe.VerticalButtons,{supportLink:s,handleRefreshClick:t})})})};function ot(){return(0,le.jsx)(Ce.ErrorBoundary,{FallbackComponent:it,children:(0,le.jsx)(te.Slot,{name:"YoastElementor",children:e=>{return void 0===(t=e).length?t:(0,c.flatten)(t).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority);var t}})})}it.propTypes={error:re().object.isRequired};const rt=window.wp.compose,nt=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))}),at=window.wp.url,lt=({className:e="",...t})=>(0,le.jsx)("span",{className:Qe()("yst-grow yst-overflow-hidden yst-overflow-ellipsis yst-whitespace-nowrap yst-font-wp","yst-text-[#555] yst-text-base yst-leading-[normal] yst-subpixel-antialiased yst-text-start",e),...t});lt.displayName="MetaboxButton.Text",lt.propTypes={className:re().string};const ct=({className:e="",...t})=>(0,le.jsx)("button",{type:"button",className:Qe()("yst-flex yst-items-center yst-w-full yst-pt-4 yst-pb-4 yst-pe-4 yst-ps-6 yst-space-x-2 rtl:yst-space-x-reverse","yst-border-t yst-border-t-[rgb(0,0,0,0.2)] yst-rounded-none yst-transition-all hover:yst-bg-[#f0f0f0]","focus:yst-outline focus:yst-outline-[1px] focus:yst-outline-[color:#0066cd] focus:-yst-outline-offset-1 focus:yst-shadow-[0_0_3px_rgba(8,74,103,0.8)]",e),...t});ct.propTypes={className:re().string},ct.Text=lt;const dt=window.yoast.componentsNew,pt=({onClick:e,title:t,id:s="",subTitle:i="",suffixIcon:o=null,SuffixHeroIcon:r=null,prefixIcon:n=null,children:a=null})=>(0,le.jsx)("div",{className:"yoast components-panel__body",children:(0,le.jsx)("h2",{className:"components-panel__body-title",children:(0,le.jsxs)("button",{id:s,onClick:e,className:"components-button components-panel__body-toggle",type:"button",children:[n&&(0,le.jsx)("span",{className:"yoast-icon-span",style:{fill:`${n&&n.color||""}`},children:(0,le.jsx)(dt.SvgIcon,{size:n.size,icon:n.icon})}),(0,le.jsxs)("span",{className:"yoast-title-container",children:[(0,le.jsx)("div",{className:"yoast-title",children:t}),(0,le.jsx)("div",{className:"yoast-subtitle",children:i})]}),a,o&&(0,le.jsx)(dt.SvgIcon,{size:o.size,icon:o.icon}),r]})})}),ut=pt;var ht,gt;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},mt.apply(null,arguments)}pt.propTypes={onClick:re().func.isRequired,title:re().string.isRequired,id:re().string,subTitle:re().string,suffixIcon:re().object,SuffixHeroIcon:re().element,prefixIcon:re().object,children:re().node};const yt=e=>Ie.createElement("svg",mt({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),ht||(ht=Ie.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),gt||(gt=Ie.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"}))),wt=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))}),ft=({isOpen:e,onClose:t,id:s,upsellLink:i,title:o="",description:r="",benefits:n=[],note:l="",ctbId:c="",modalTitle:d})=>{const{isBlackFriday:p,isWooCommerceActive:u,isProductEntity:h,isWooSEOActive:g}=(0,a.useSelect)(e=>{const t=e("yoast-seo/editor");return{isProductEntity:t.getIsProductEntity(),isWooCommerceActive:t.getIsWooCommerceActive(),isBlackFriday:t.isPromotionActive("black-friday-promotion"),isWooSEOActive:t.getIsWooSeoActive()}},[]),m=(0,se.useMemo)(()=>u&&h,[u,h]),y=(0,se.useRef)(null);return(0,le.jsx)(Ce.Modal,{isOpen:e,onClose:t,id:s,initialFocus:y,children:(0,le.jsx)(Ce.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,le.jsxs)(Ce.Modal.Container,{children:[(0,le.jsxs)(Ce.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-3 yst-items-center",children:[m?(0,le.jsx)(wt,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,le.jsx)(yt,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,le.jsx)(Ce.Modal.Title,{as:"h3",className:Qe()(m?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:d}),(0,le.jsx)(Ce.Modal.CloseButton,{className:"yst-top-2",onClick:t,screenReaderText:(0,Re.__)("Close modal","wordpress-seo")})]}),(0,le.jsxs)(Ce.Modal.Container.Content,{className:"yst-p-0",children:[p&&(0,le.jsx)("div",{className:"yst-flex yst-font-semibold yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6",children:(0,le.jsx)("div",{className:"yst-mx-auto",children:(0,Re.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,le.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,le.jsx)(Ce.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-medium yst-text-slate-800",children:o}),(0,le.jsx)("p",{className:"yst-mb-2",children:r}),Array.isArray(n)&&n.length>0&&(0,le.jsx)("ul",{className:"yst-my-2",children:n.map((e,t)=>(0,le.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,le.jsx)(Ge,{className:"yst-mr-1 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),(0,le.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${s}-upsell-benefit-${t}`))}),"function"==typeof n&&n(),(0,le.jsxs)("div",{className:"yst-text-center",children:[(0,le.jsxs)(Ce.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5 yst-w-full",href:i,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":c,ref:y,children:[(0,le.jsx)(Pe,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,Re.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ (0,Re.__)("Explore %s","wordpress-seo"),m&&!g?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,le.jsx)("span",{className:"yst-sr-only",children:(0,Re.__)("Opens in a new tab","wordpress-seo")})]}),(0,le.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:l})]})]})]})]})})})},bt=()=>{const[e,,,t,s]=(0,Ce.useToggleState)(!1),{locationContext:i}=(0,ie.useRootContext)(),o=(0,Ce.useSvgAria)(),r=i.includes("sidebar"),n=i.includes("metabox"),a=r?"sidebar":"metabox",l=wpseoAdminL10n[r?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(ft,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${a}`,upsellLink:(0,at.addQueryArgs)(l,{context:i}),modalTitle:(0,Re.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,Re.__)("Connect related content without the guesswork","wordpress-seo"),description:Ae((0,Re.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */ (0,Re.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles. %sScans your content to:","wordpress-seo"),"<br />"),{br:(0,le.jsx)("br",{})}),benefits:[(0,Re.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,Re.__)("Build relevant internal links faster","wordpress-seo"),(0,Re.__)("Strengthen your site’s structure","wordpress-seo"),(0,Re.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,Re.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),r&&(0,le.jsx)(ut,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,Re.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsx)(Ce.Badge,{size:"small",variant:"upsell",children:(0,le.jsx)(nt,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...o})})})}),n&&(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsxs)(ct,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,le.jsx)(ct.Text,{children:(0,Re.__)("Internal linking suggestions","wordpress-seo")}),(0,le.jsxs)(Ce.Badge,{size:"small",variant:"upsell",children:[(0,le.jsx)(nt,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...o}),(0,le.jsx)("span",{children:"Premium"})]})]})})]})},xt=window.yoast.externals.components;function _t(){return(0,rt.createHigherOrderComponent)(function(e){return(0,rt.pure)(function(t){const s=(0,se.useContext)(ie.LocationContext);return(0,se.createElement)(e,{...t,location:s})})},"withLocation")}const vt=(0,rt.compose)([(0,a.withSelect)(e=>{const{isCornerstoneContent:t}=e("yoast-seo/editor");return{isCornerstone:t(),learnMoreUrl:wpseoAdminL10n["shortlinks.cornerstone_content_info"]}}),(0,a.withDispatch)(e=>{const{toggleCornerstoneContent:t}=e("yoast-seo/editor");return{onChange:t}}),_t()])(xt.CollapsibleCornerstone),kt=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}),St=({store:e="yoast-seo/editor",location:t="sidebar"})=>{const s="black-friday-promotion",i=(0,a.useSelect)(t=>t(e).getIsPremium(),[e]),o=(0,a.useSelect)(t=>t(e).selectLinkParams(),[e]),r=(0,a.useSelect)(t=>t(e).isPromotionActive(s),[e]),n=(0,a.useSelect)(t=>t(e).getIsWooCommerceActive(),[e]),l=(0,a.useSelect)(t=>t(e).isAlertDismissed(s),[e]),c=(0,a.useSelect)(t=>t(e).getIsElementorEditor(),[e]),d=(0,se.useCallback)(()=>{(0,a.dispatch)(e).dismissAlert(s)},[e,s]),p=(0,at.addQueryArgs)("https://yoa.st/black-friday-sale",o),u=(0,Ce.useSvgAria)();return i||!r||l?null:(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsxs)("div",{className:Qe()("sidebar"!==t||c?"yst-mx-4":"yst-mx-0","yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-mt-6 yst-relative yst-shadow-sm",n?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,le.jsxs)(Ce.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,Re.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,le.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:d,children:[(0,le.jsx)(kt,{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,le.jsx)("div",{className:"yst-sr-only",children:(0,Re.__)("Dismiss","wordpress-seo")})]}),(0,le.jsxs)("div",{className:Qe()("sidebar"===t?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,le.jsxs)("div",{className:n?"yst-text-woo-light":"yst-text-primary-500",children:[(0,le.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,Re.__)("30% OFF","wordpress-seo")}),(0,le.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:n?(0,le.jsxs)(le.Fragment,{children:["Yoast WooCommerce SEO ",(0,le.jsx)(wt,{className:"yst-w-4 yst-scale-x-[-1]",...u})]}):(0,le.jsxs)(le.Fragment,{children:[" Yoast SEO Premium ",(0,le.jsx)(et,{className:"yst-w-4",...u})]})})]}),(0,le.jsx)("div",{className:"yst-flex yst-items-end",children:(0,le.jsxs)(Ce.Button,{as:"a",className:Qe()("sidebar"===t?"yst-w-full":"yst-w-[140px]","yst-flex yst-gap-1 yst-w-[140px] yst-h-7 yst-mt-4"),variant:"upsell",href:p,target:"_blank",rel:"noreferrer",children:[(0,Re.__)("Buy now!","wordpress-seo"),(0,le.jsx)(De,{className:"yst-w-4 rtl:yst-rotate-180",...u})]})})]})]})})};St.propTypes={store:re().string,location:re().oneOf(["sidebar","metabox"])};const Rt=window.yoast.helpers,Tt=(0,rt.compose)([(0,a.withSelect)((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}}),(0,a.withDispatch)((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}})]),Et=({children:e,id:t,hasIcon:s=!0,title:i,image:o=null,isAlertDismissed:r,onDismissed:n})=>r?null:(0,le.jsxs)("div",{id:t,className:"notice-yoast yoast is-dismissible yoast-webinar-dashboard yoast-general-page-notices",children:[(0,le.jsxs)("div",{className:"notice-yoast__container",children:[(0,le.jsxs)("div",{children:[(0,le.jsxs)("div",{className:"notice-yoast__header",children:[s&&(0,le.jsx)("span",{className:"yoast-icon"}),(0,le.jsx)("h2",{className:"notice-yoast__header-heading yoast-notice-migrated-header",children:i})]}),(0,le.jsx)("div",{className:"notice-yoast-content",children:(0,le.jsx)("p",{children:e})})]}),o&&(0,le.jsx)(o,{height:"60"})]}),(0,le.jsx)("button",{type:"button",className:"notice-dismiss",onClick:n,children:(0,le.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,Re.__)("Dismiss this notice.","wordpress-seo")})})]});Et.propTypes={children:re().node.isRequired,id:re().string.isRequired,hasIcon:re().bool,title:re().any.isRequired,image:re().elementType,isAlertDismissed:re().bool.isRequired,onDismissed:re().func.isRequired};const jt=Tt(Et),Ct="trustpilot-review-notification",It="yoast-seo/editor";const Lt=()=>{const e=(0,a.useSelect)(e=>e(It).getIsPremium(),[]),t=(0,a.useSelect)(e=>e(It).isAlertDismissed(Ct),[]),{overallScore:s}=(0,a.useSelect)(e=>e(It).getResultsForFocusKeyword(),[]),{dismissAlert:i}=(0,a.useDispatch)(It),o=(0,se.useCallback)(()=>i(Ct),[i]),[r,n]=(0,se.useState)(!1);return(0,se.useEffect)(()=>{var e,t;"good"===(null===(t=s,(0,c.isNil)(t)||(t/=10),e=function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,Re.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,Re.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,Re.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,Re.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,Re.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,Re.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,Re.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,Re.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,Re.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,Re.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,Re.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,Re.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(d.interpreters.scoreToRating(t)))||void 0===e?void 0:e.className)&&n(!0)},[s]),{shouldShow:!e&&!t&&r,dismiss:o}},At=(0,Rt.makeOutboundLink)(),Pt=()=>{const{shouldShow:e,dismiss:t}=Lt(),{locationContext:s}=(0,ie.useRootContext)(),i=(0,a.useSelect)(e=>e(It).selectLink("https://yoa.st/trustpilot-review",{context:s}),[s]);return(0,le.jsxs)(Et,{alertKey:Ct,store:It,id:Ct,title:(0,Re.__)("Show Yoast SEO some love!","wordpress-seo"),hasIcon:!1,isAlertDismissed:!e,onDismissed:t,children:[(0,Re.__)("Happy with the plugin?","wordpress-seo")," ",(0,le.jsx)(At,{href:i,rel:"noopener noreferrer",children:(0,Re.__)("Leave a quick review","wordpress-seo")}),"."]})};var Dt,Ft,Mt,Ot,qt,Nt,Ut,Wt,$t,Bt,Kt,Ht,Vt,Yt,zt,Gt,Zt,Qt,Xt,Jt,es,ts,ss,is,os,rs,ns,as,ls,cs,ds,ps,us,hs,gs,ms,ys,ws,fs,bs,xs,_s,vs,ks,Ss,Rs,Ts;function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},Es.apply(null,arguments)}const js=e=>Ie.createElement("svg",Es({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 448 360"},e),Dt||(Dt=Ie.createElement("circle",{cx:226,cy:211,r:149,fill:"#f0ecf0"})),Ft||(Ft=Ie.createElement("path",{fill:"#fbd2a6",d:"M173.53 189.38s-35.47-5.3-41.78-11c-9.39-24.93-29.61-48-35.47-66.21-.71-2.24 3.72-11.39 3.53-15.41s-5.34-11.64-5.23-14-.09-15.27-.09-15.27l-4.75-.72s-5.13 6.07-3.56 9.87c-1.73-4.19 4.3 7.93.5 9.35 0 0-6-5.94-11.76-8.27s-19.57-3.65-19.57-3.65L43.19 73l-4.42.6L31 69.7l-2.85 5.12 7.53 5.29L40.86 92l17.19 10.2 10.2 10.56 9.86 3.56s26.49 79.67 45 92c17 11.33 37.23 15.92 37.23 15.92z"})),Mt||(Mt=Ie.createElement("path",{fill:"#a4286a",d:"M270.52 345.13c2.76-14.59 15.94-35.73 30.24-54.58 16.22-21.39 14-79.66-33.19-91.46-17.3-4.32-52.25-1-59.85-3.41C186.54 189 170 187 168 190.17c-5 10.51-7.73 27.81-5.51 36.26 1.18 4.73 3.54 5.91 20.49 13.4-5.12 15-16.35 26.3-22.86 37s7.88 27.2 7.1 33.51c-.48 3.8-4.26 21.13-7.18 34.25a149.47 149.47 0 0 0 110.3 8.66 25.66 25.66 0 0 1 .18-8.12z"})),Ot||(Ot=Ie.createElement("path",{fill:"#9a5815",d:"M206.76 66.43c-5 14.4-1.42 25.67-3.93 40.74-10 60.34-24.08 43.92-31.44 93.6 7.24-14.19 14.32-15.82 20.63-23.11-.83 3.09-10.25 13.75-8.05 34.81 9.85-8.51 6.35-8.75 11.86-8.54.36 3.25 3.53 3.22-3.59 10.53 2.52.69 17.42-14.32 20.16-12.66s0 5.72-6 7.76c2.15 2.2 30.47-3.87 43.81-14.71 4.93-4 10-13.16 13.38-18.2 7.17-10.62 12.38-24.77 17.71-36.6 8.94-19.87 15.09-39.34 16.11-61.31.53-10.44-3.41-18.44-4.41-28.86-2.57-27.8-67.63-37.26-86.24 16.55z"})),qt||(qt=Ie.createElement("path",{fill:"#efb17c",d:"M277.74 179.06c.62-.79 1.24-1.59 1.84-2.39-.85 2.59-1.52 3.73-1.84 2.39z"})),Nt||(Nt=Ie.createElement("path",{fill:"#fbd2a6",d:"M216.1 206.72c3.69-5.42 8.28-3.35 15.57-8.28 3.76-3.06 1.57-9.46 1.77-11.82 18.25 4.56 37.38-1.18 49.07-16 .62 5.16-2.77 22.27-.2 27 4.73 8.67 13.4 18.92 13.4 18.92-35.47-2.76-63.45 39-89.86 44.54 5.52-28.74-2.36-35.84 10.25-54.36z"})),Ut||(Ut=Ie.createElement("path",{fill:"#f6b488",d:"m235.21 167.9 53.21-25.23s-3.65 24-6.5 32.72c-64.05 62.66-46.47-7.33-46.71-7.49z"})),Wt||(Wt=Ie.createElement("path",{fill:"#fbd2a6",d:"M226.86 50.64C215 59.31 206.37 93.21 204 95.57c-19.46 19.47-3.59 41.39-3.94 51.24-.2 5.52-4.14 25.42 5.72 29.36 22.22 8.89 60-3.48 67.19-12.61 13.28-16.75 40.89-94.78 17.74-108.19-7.92-4.58-42.78-20.18-63.85-4.73z"})),$t||($t=Ie.createElement("path",{fill:"#e5766c",d:"M243.69 143.66c-10.7-6.16-8.56-6.73-19.76-12.71-3.86-2.07-3.94.64-6.32 0-2.91-.79-1.39-2.74-5.37-3.48-6.52-1.21-3.67 3.63-3.15 6 1.32 6.15-8.17 17.3 3.26 21.42 12.65 4.55 21.38-9.41 31.34-11.23z"})),Bt||(Bt=Ie.createElement("path",{fill:"#fff",d:"M240.68 143.9c-11.49-5.53-11.65-8.17-24.64-11.69-8.6-2.32-5.53 1-5.69 4.42-.2 4.16-1.26 9.87 4.9 12.66 9 4.09 18.16-6.02 25.43-5.39zm.7-40.9c-.16 1.26-.06 4.9 5.46 8.25 11.43-4.73 16.36-2.56 17-3.33 1.48-1.76-2-8.87-7.88-9.85-5.58-.94-14.14 1.24-14.58 4.93z"})),Kt||(Kt=Ie.createElement("path",{fill:"#000001",d:"M263.53 108.19c-4.32-4.33-6.85-6.24-12.26-8.21-2.77-1-6.18.18-8.65 1.67a3.65 3.65 0 0 0-1.24 1.23h-.12a3.73 3.73 0 0 1 1-1.52 12.53 12.53 0 0 1 11.93-3c4.73 1 9.43 4.63 9.42 9.82z"})),Ht||(Ht=Ie.createElement("circle",{cx:254.13,cy:104.05,r:4.19,fill:"#000001"})),Vt||(Vt=Ie.createElement("path",{fill:"#fff",d:"M225.26 99.22c-.29 1-6.6 3.45-10.92 1.48-1.15-3.24-5-6.43-5.25-6.71-.5-2.86 5.55-8 10.06-6.3a10.21 10.21 0 0 1 6.11 11.53z"})),Yt||(Yt=Ie.createElement("path",{fill:"#000001",d:"M209.29 94.21c-.19-2.34 1.84-4.1 3.65-5.2 7-3.87 13.18 3 12.43 10h-.12c-.14-4-2.38-8.44-6.47-9.11a3.19 3.19 0 0 0-2.42.31c-1.37.85-2.38 2-3.89 2.56-1 .45-1.92.42-3 1.4h-.22z"})),zt||(zt=Ie.createElement("circle",{cx:219.55,cy:95.28,r:4,fill:"#000001"})),Gt||(Gt=Ie.createElement("path",{fill:"#efb17c",d:"M218.66 120.27a27.32 27.32 0 0 0 4.54 3.45c-2.29-.72-4.28-.69-6.32-2.27-2.53-2-3.39-5.16-.73-7.72 10.24-9.82 12.56-13.82 14.77-24.42-1 12.37-6 17.77-10.63 23.18-2.53 2.97-4.68 5.06-1.63 7.78z"})),Zt||(Zt=Ie.createElement("path",{fill:"#a57c52",d:"M231.22 69.91c-.67-3.41-8.78-2.83-11.06-1.93-3.48 1.39-6.08 5.22-7.13 8.53 2.9-4.3 6.74-8.12 12.46-6 1.16.42 3.18 2.35 4.48 1.85s1.03-2.2 1.25-2.45zm32.16 8.56c-2.75-1.66-12.24-5.08-12.18.82 2.56.24 5-.19 7.64.95 11.22 4.76 12.77 17.61 12.85 17.86.2-.53.1 1.26.23.7-.02.2.95-12.12-8.54-20.33z"})),Qt||(Qt=Ie.createElement("path",{fill:"#fbd2a6",d:"M53.43 250.73c6.29 0-.6-.17 7.34 0 1.89.05-2.38-.7 0-.69 4.54-4.2 12.48-.74 20.6-2.45 4.55.35 3.93 1.35 5.59 4.19 4.89 8.38 4.78 14.21 14 19.56 16.42 8.38 66 12.92 88.49 18.86 5.52.83 42.64-20.15 61-23.75 6.51 10.74 11.46 28.68 8.39 34.93-6.54 13.3-57.07 25.4-75.91 25.15C156.47 326.18 94 294 92.2 293c-.94-.57.7-.7-7.68 0s-10.15.72-17.47-1.4c-3-.87-4.61-1.33-6.33-3.54-2 .22-3.39.2-4.78-1-3.15-2.74-4.84-6.61-2.73-10.06h-.12c-3.35-2.48-6.54-7.69-3.08-11.72 1-1.18 6.06-1.94 7.77-2.28-1.58-.29-6.37.19-7.49-.72-3.06-2.5-4.96-11.55 3.14-11.55z"})),Xt||(Xt=Ie.createElement("path",{fill:"#a4286a",d:"M303.22 237.52c-9.87-11.88-41.59 8.19-47.8 12.34s-14.89 17.95-14.89 17.95c6 9.43 8.36 31 5.65 46.34l30.51-3s18-15.62 22.59-28.7 6.3-42.54 6.3-42.54"})),Jt||(Jt=Ie.createElement("path",{fill:"#cb9833",d:"M278.63 31.67c-6.08 0-22.91 4.07-22.93 12.91 0 11 47.9 38.38 16.14 85.85 10.21-.79 10.79-8.12 14.92-14.93-3.66 77-49.38 93.58-40.51 142.25 7.68-25.81 20.3-11.62 38.13-33.84 3.45 4.88 9 18.28-9.46 33.78 50-31.26 57.31-56.6 51.92-95C319.93 113.53 348.7 42 278.63 31.67z"})),es||(es=Ie.createElement("path",{fill:"#fbd2a6",d:"M283.64 126.83c-2.42 9.67-8 15.76-1.48 16.46A21.26 21.26 0 0 0 302 132.6c5.17-8.52 3.93-16.44-2.46-18s-13.48 2.56-15.9 12.23z"})),ts||(ts=Ie.createElement("path",{fill:"#efb17c",d:"M38 73.45c1.92 2 4.25 9.21 6.32 10.91 2.25 1.85 5.71 2.12 8.1 4.45 3.66-2 6-8.72 10-9.31-2.59 1.31-4.42 3.5-6.93 4.88-1.42.8-3 1.31-4.38 2.25-2.16-1.46-4.27-1.77-6.26-3.38-2.52-2.02-5.31-8-6.85-9.8z"})),ss||(ss=Ie.createElement("path",{fill:"#efb17c",d:"M39 74.4c4.83 1.1 12.52 6.44 15.89 10-3.22-1.34-14.73-6.15-15.89-10zm.62-1.5c6.71-.79 18 1.54 23.29 5.9-3.85-.2-5.42-1.48-9-2.94-4.08-1.69-8.83-2.03-14.29-2.96zm46.43 14.58c-3.72-1.32-10.52-1.13-13.22 3.52 2-1.16 1.84-2.11 4.18-1.72-3.81-4.15 8.16-.74 11.6-.24m-2.78 13.15c.56-3.29-8-7.81-10.58-9.17-6.25-3.29-12.16 1.36-19.33-4.53 5.94 6.1 14.23 2.5 19.55 5.76 3.06 1.88 8.65 6.09 9.35 9.38-.23-.4 1.29-1.44 1.01-1.44z"})),is||(is=Ie.createElement("circle",{cx:38.13,cy:30.03,r:3.14,fill:"#b89ac8"})),os||(os=Ie.createElement("circle",{cx:60.26,cy:39.96,r:3.14,fill:"#e31e0c"})),rs||(rs=Ie.createElement("circle",{cx:50.29,cy:25.63,r:3.14,fill:"#3baa45"})),ns||(ns=Ie.createElement("circle",{cx:22.19,cy:19.21,r:3.14,fill:"#2ca9e1"})),as||(as=Ie.createElement("circle",{cx:22.19,cy:30.03,r:3.14,fill:"#e31e0c"})),ls||(ls=Ie.createElement("circle",{cx:26.86,cy:8.28,r:3.14,fill:"#3baa45"})),cs||(cs=Ie.createElement("circle",{cx:49.32,cy:39.99,r:3.14,fill:"#e31e0c"})),ds||(ds=Ie.createElement("circle",{cx:63.86,cy:59.52,r:3.14,fill:"#f8ad39"})),ps||(ps=Ie.createElement("circle",{cx:50.88,cy:50.72,r:3.14,fill:"#3baa45"})),us||(us=Ie.createElement("circle",{cx:63.47,cy:76.17,r:3.14,fill:"#e31e0c"})),hs||(hs=Ie.createElement("circle",{cx:38.34,cy:14.83,r:3.14,fill:"#2ca9e1"})),gs||(gs=Ie.createElement("circle",{cx:44.44,cy:5.92,r:3.14,fill:"#f8ad39"})),ms||(ms=Ie.createElement("circle",{cx:57.42,cy:10.24,r:3.14,fill:"#e31e0c"})),ys||(ys=Ie.createElement("circle",{cx:66.81,cy:12.4,r:3.14,fill:"#2ca9e1"})),ws||(ws=Ie.createElement("circle",{cx:77.95,cy:5.14,r:3.14,fill:"#b89ac8"})),fs||(fs=Ie.createElement("circle",{cx:77.95,cy:30.34,r:3.14,fill:"#e31e0c"})),bs||(bs=Ie.createElement("circle",{cx:80.97,cy:16.55,r:3.14,fill:"#f8ad39"})),xs||(xs=Ie.createElement("circle",{cx:62.96,cy:27.27,r:3.14,fill:"#3baa45"})),_s||(_s=Ie.createElement("circle",{cx:75.36,cy:48.67,r:3.14,fill:"#2ca9e1"})),vs||(vs=Ie.createElement("circle",{cx:76.11,cy:65.31,r:3.14,fill:"#3baa45"})),ks||(ks=Ie.createElement("path",{fill:"#71b026",d:"M78.58 178.43C54.36 167.26 32 198.93 5 198.93c19.56 20.49 63.53 1.52 69 15.5 1.48-14.01 4.11-30.9 4.58-36z"})),Ss||(Ss=Ie.createElement("path",{fill:"#074a67",d:"M67.75 251.08c0-4.65 10.13-72.65 10.13-72.65h2.8l-9.09 72.3z"})),Rs||(Rs=Ie.createElement("ellipse",{cx:255.38,cy:103.18,fill:"#fff",rx:1.84,ry:1.77})),Ts||(Ts=Ie.createElement("ellipse",{cx:221.24,cy:94.75,fill:"#fff",rx:1.84,ry:1.77}))),Cs=({store:e="yoast-seo/editor",image:t=js,url:s,...i})=>(0,a.useSelect)(t=>t(e).getIsPremium())?null:(0,le.jsxs)(jt,{alertKey:"webinar-promo-notification",store:e,id:"webinar-promo-notification",title:(0,Re.__)("Ready to boost your online visibility?","wordpress-seo"),image:t,url:s,...i,children:[Ae((0,Re.sprintf)(/* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */ /* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */ (0,Re.__)("Access our %1$s%2$s%3$s webinars and podcasts to get started with %4$s and build the foundational skills and confidence needed for sustainable success.","wordpress-seo"),"<strong>","FREE","</strong>","Yoast SEO"),{strong:(0,le.jsx)("strong",{})})," ",(0,le.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",children:(0,Re.__)("Sign up today!","wordpress-seo")})]});Cs.propTypes={store:re().string,image:re().elementType,url:re().string.isRequired};const Is=Cs,Ls=(e="yoast-seo/editor")=>{const t=(0,a.select)(e).isPromotionActive("black-friday-promotion"),s=(0,a.select)(e).isAlertDismissed("black-friday-promotion");return!t||s},As=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))}),Ps=(e=null)=>(0,Ie.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]),Ds=({title:e="Yoast SEO",className:t="yoast yoast-gutenberg-modal",showYoastIcon:s=!0,children:i=null,additionalClassName:o="",...r})=>{const n=s?(0,le.jsx)("span",{className:"yoast-icon"}):null;return(0,le.jsx)(te.Modal,{title:e,className:`${t} ${o}`,icon:n,...r,children:i})};Ds.propTypes={title:re().string,className:re().string,showYoastIcon:re().bool,children:re().oneOfType([re().node,re().arrayOf(re().node)]),additionalClassName:re().string};const Fs=Ds,Ms=({id:e,postTypeName:t,children:s,title:i,isOpen:o,open:r,close:n,shouldCloseOnClickOutside:a=!0,showChangesWarning:l=!0,SuffixHeroIcon:c=null})=>(0,le.jsxs)(se.Fragment,{children:[o&&(0,le.jsx)(ie.LocationProvider,{value:"modal",children:(0,le.jsxs)(Fs,{title:i,onRequestClose:n,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:a,children:[(0,le.jsx)("div",{className:"yoast-content-container",children:(0,le.jsx)("div",{className:"yoast-modal-content",children:s})}),(0,le.jsxs)("div",{className:"yoast-notice-container",children:[(0,le.jsx)("hr",{}),(0,le.jsxs)("div",{className:"yoast-button-container",children:[l&&(0,le.jsx)("p",{children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */ (0,Re.sprintf)((0,Re.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),t)}),(0,le.jsx)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:n,children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */ (0,Re.sprintf)((0,Re.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,le.jsx)(ut,{id:e+"-open-button",title:i,SuffixHeroIcon:c,suffixIcon:c?null:{size:"20px",icon:"pencil-square"},onClick:r})]});Ms.propTypes={id:re().string.isRequired,postTypeName:re().string.isRequired,children:re().oneOfType([re().node,re().arrayOf(re().node)]).isRequired,title:re().string.isRequired,isOpen:re().bool.isRequired,open:re().func.isRequired,close:re().func.isRequired,shouldCloseOnClickOutside:re().bool,showChangesWarning:re().bool,SuffixHeroIcon:re().element};const Os=Ms,qs=(0,rt.compose)([(0,a.withSelect)((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:i}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:i(t.id)}}),(0,a.withDispatch)((e,t)=>{const{openEditorModal:s,closeEditorModal:i}=e("yoast-seo/editor");return{open:()=>s(t.id),close:i}})])(Os),Ns=()=>{const e=(0,a.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),t=(0,se.useMemo)(()=>(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,le.jsx)(dt.InsightsCard,{amount:e,unit:(0,Re._n)("minute","minutes",e,"wordpress-seo"),title:(0,Re.__)("Reading time","wordpress-seo"),linkTo:t /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about reading time","wordpress-seo")})},Us=(0,Rt.makeOutboundLink)();function Ws(e,t){return-1===e?(0,Re.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,Re.sprintf)( /* Translators: %1$s expands to the numeric Flesch reading ease score, %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */ /* Translators: %1$s expands to the numeric Flesch reading ease score, %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */ (0,Re.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case d.DIFFICULTY.NO_DATA:return(0,Re.__)("no data","wordpress-seo");case d.DIFFICULTY.VERY_EASY:return(0,Re.__)("very easy","wordpress-seo");case d.DIFFICULTY.EASY:return(0,Re.__)("easy","wordpress-seo");case d.DIFFICULTY.FAIRLY_EASY:return(0,Re.__)("fairly easy","wordpress-seo");case d.DIFFICULTY.OKAY:return(0,Re.__)("okay","wordpress-seo");case d.DIFFICULTY.FAIRLY_DIFFICULT:return(0,Re.__)("fairly difficult","wordpress-seo");case d.DIFFICULTY.DIFFICULT:return(0,Re.__)("difficult","wordpress-seo");case d.DIFFICULTY.VERY_DIFFICULT:return(0,Re.__)("very difficult","wordpress-seo")}}(t))}const $s=()=>{let e=(0,a.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const t=(0,se.useMemo)(()=>(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[e]),i=(0,se.useMemo)(()=>{const t=(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const i=function(e){switch(e){case d.DIFFICULTY.FAIRLY_DIFFICULT:case d.DIFFICULTY.DIFFICULT:case d.DIFFICULTY.VERY_DIFFICULT:return(0,Re.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case d.DIFFICULTY.NO_DATA:return(0,Re.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,Re.__)("Good job!","wordpress-seo")}}(t);return(0,le.jsxs)("span",{children:[Ws(e,t)," ",t>=d.DIFFICULTY.FAIRLY_DIFFICULT?(0,le.jsx)(Us,{href:s,children:i+"."}):i]})}(e,s,t)},[e,s]);return-1===e&&(e="?"),(0,le.jsx)(dt.InsightsCard,{amount:e,unit:(0,Re.__)("out of 100","wordpress-seo"),title:(0,Re.__)("Flesch reading ease","wordpress-seo"),linkTo:t /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about Flesch reading ease","wordpress-seo"),description:i})},Bs=({data:e=[],itemScreenReaderText:t="",className:s="",...i})=>{const o=(0,se.useMemo)(()=>{var t,s;return null!==(t=null===(s=(0,c.maxBy)(e,"number"))||void 0===s?void 0:s.number)&&void 0!==t?t:0},[e]);return(0,le.jsx)("ul",{className:Qe()("yoast-data-model",s),...i,children:e.map(({name:e,number:s})=>(0,le.jsxs)("li",{style:{"--yoast-width":s/o*100+"%"},children:[e,(0,le.jsx)("span",{children:s}),t&&(0,le.jsx)("span",{className:"screen-reader-text",children:(0,Re.sprintf)(t,s)})]},`${e}_dataItem`))})};Bs.propTypes={data:re().arrayOf(re().shape({name:re().string.isRequired,number:re().number.isRequired})),itemScreenReaderText:re().string,className:re().string};const Ks=Bs,Hs=(0,Rt.makeOutboundLink)(),Vs=({location:e})=>{const t=(0,a.useSelect)(e=>{var t,s;return null===(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getPreference("isProminentWordsAvailable",!1))||void 0===t||t},[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1),[]),i=(0,se.useMemo)(()=>(0,c.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-prominent_words`,""),[e]),o=(0,se.useMemo)(()=>{const e=(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return Ae((0,Re.sprintf)( // translators: %1$s and %2$s are replaced by opening and closing <a> tags. // translators: %1$s and %2$s are replaced by opening and closing <a> tags. (0,Re.__)("Read our %1$sultimate guide to keyword research%2$s to learn more about keyword research and keyword strategy.","wordpress-seo"),"<a>","</a>"),{a:(0,le.jsx)(Hs,{href:e})})},[]),r=(0,se.useMemo)(()=>Ae((0,Re.sprintf)( // translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. // translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. (0,Re.__)("With %1$s%3$s%2$s, this section will show you which words occur most often in your text. By checking these prominent words against your intended keyword(s), you'll know how to edit your text to be more focused.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,le.jsx)("b",{})}),[]),n=(0,a.useSelect)(e=>{var t,s;return null!==(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getProminentWords())&&void 0!==t?t:[]},[]),l=(0,se.useMemo)(()=>{const e=(0,Re.sprintf)( // translators: %1$s expands to Yoast SEO Premium. // translators: %1$s expands to Yoast SEO Premium. (0,Re.__)("Get %s to enjoy the benefits of prominent words","wordpress-seo"),"Yoast SEO Premium").split(/\s+/);return e.map((t,s)=>({name:t,number:e.length-s}))},[]),d=(0,se.useMemo)(()=>s?l:n.map(({word:e,occurrence:t})=>({name:e,number:t})),[n,l]);if(!t)return null;const{locationContext:p}=(0,ie.useRootContext)();return(0,le.jsxs)("div",{className:"yoast-prominent-words",children:[(0,le.jsx)("div",{className:"yoast-field-group__title",children:(0,le.jsx)("b",{children:(0,Re.__)("Prominent words","wordpress-seo")})}),!s&&(0,le.jsx)("p",{children:0===d.length?(0,Re.__)("Once you add a bit more copy, we'll give you a list of words that occur the most in the content. These give an indication of what your content focuses on.","wordpress-seo"):(0,Re.__)("The following words occur the most in the content. These give an indication of what your content focuses on. If the words differ a lot from your topic, you might want to rewrite your content accordingly.","wordpress-seo")}),s&&(0,le.jsx)("p",{children:r}),s&&(0,le.jsxs)(Hs,{href:(0,at.addQueryArgs)(i,{context:p}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,Re.sprintf)( // translators: %s expands to `Premium` (part of add-on name). // translators: %s expands to `Premium` (part of add-on name). (0,Re.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,le.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,le.jsx)("p",{children:o}),(0,le.jsx)(Ks,{data:d,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */ (0,Re.__)("%d occurrences","wordpress-seo"),"aria-label":(0,Re.__)("Prominent words","wordpress-seo"),className:s?"yoast-data-model--upsell":null})]})};Vs.propTypes={location:re().string.isRequired};const Ys=Vs,zs=(0,Rt.makeOutboundLink)(),Gs=({location:e})=>{const t=(0,se.useMemo)(()=>(0,c.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-text_formality`,""),[e]),s=(0,se.useMemo)(()=>Ae((0,Re.sprintf)( // Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. // Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`. (0,Re.__)("%1$s%3$s%2$s will help you assess the formality level of your text.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,le.jsx)("b",{})}),[]);return(0,le.jsx)(se.Fragment,{children:(0,le.jsxs)("div",{children:[(0,le.jsx)("p",{children:s}),(0,le.jsxs)(zs,{href:t,className:"yoast-button yoast-button-upsell",children:[(0,Re.sprintf)( // Translators: %s expands to `Premium` (part of add-on name). // Translators: %s expands to `Premium` (part of add-on name). (0,Re.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,le.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};Gs.propTypes={location:re().string.isRequired};const Zs=Gs,Qs=({location:e,name:t})=>{const s=(0,a.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),i=g().isPremium,o=i?(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),r=(0,Re.__)("Read more about text formality.","wordpress-seo");return s?(0,le.jsxs)("div",{className:"yoast-text-formality",children:[(0,le.jsxs)("div",{className:"yoast-field-group__title",children:[(0,le.jsx)("b",{children:(0,Re.__)("Text formality","wordpress-seo")}),(0,le.jsx)(dt.HelpIcon,{linkTo:o,linkText:r})]}),i?(0,le.jsx)(te.Slot,{name:t}):(0,le.jsx)(Zs,{location:e})]}):null};Qs.propTypes={location:re().string.isRequired,name:re().string.isRequired};const Xs=Qs,Js=()=>{const e=(0,a.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),t=(0,se.useMemo)(()=>(0,c.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let s=(0,Re._n)("word","words",e.count,"wordpress-seo"),i=(0,Re.__)("Word count","wordpress-seo"),o=(0,Re.__)("Learn more about word count","wordpress-seo");return"character"===e.unit&&(s=(0,Re._n)("character","characters",e.count,"wordpress-seo"),i=(0,Re.__)("Character count","wordpress-seo"), /* translators: Hidden accessibility text. */ o=(0,Re.__)("Learn more about character count","wordpress-seo")),(0,le.jsx)(dt.InsightsCard,{amount:e.count,unit:s,title:i,linkTo:t,linkText:o})},ei=ae()(As)` width: 18px; height: 18px; margin: 3px; `,ti=({location:e="sidebar"})=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]),i=Ps();return(0,le.jsx)(qs,{title:(0,Re.__)("Insights","wordpress-seo"),id:`yoast-insights-modal-${e}`,shouldCloseOnClickOutside:!t,showChangesWarning:!1,SuffixHeroIcon:(0,le.jsx)(ei,{className:"yst-text-slate-500",...i}),children:(0,le.jsxs)("div",{className:"yoast-insights yoast-modal-content--columns",children:[(0,le.jsx)(Ys,{location:e}),(0,le.jsxs)("div",{children:[s&&(0,le.jsx)("div",{className:"yoast-insights-row",children:(0,le.jsx)($s,{})}),(0,le.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,le.jsx)(Ns,{}),(0,le.jsx)(Js,{})]}),(0,b.isFeatureEnabled)("TEXT_FORMALITY")&&(0,le.jsx)(Xs,{location:e,name:"YoastTextFormalityMetabox"})]})]})})};ti.propTypes={location:re().string};const si=ti;function ii(e){return 0===e.message.length?null:(0,le.jsx)(dt.Alert,{type:e.type,children:e.message})}ii.propTypes={message:re().oneOfType([re().array,re().string]).isRequired,type:re().string.isRequired};const oi=(0,a.withSelect)(e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t(),type:"info"}})(ii),ri=({children:e})=>(0,le.jsx)("div",{children:e});ri.propTypes={renderPriority:re().number.isRequired,children:re().node.isRequired};const ni=ri,ai=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}),li=window.yoast.searchMetadataPreviews,ci=ae()(dt.StyledSection)` &${dt.StyledSectionBase} { padding: 0; & ${dt.StyledHeading} { ${(0,Rt.getDirectionalStyle)("padding-left","padding-right")}: 20px; margin-left: ${(0,Rt.getDirectionalStyle)("0","20px")}; } } `,di=({children:e=null,title:t="",icon:s="",hasPaperStyle:i=!0,shoppingData:o=null})=>(0,le.jsx)(ci,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:i,shoppingData:o,children:e});di.propTypes={children:re().element,title:re().string,icon:re().string,hasPaperStyle:re().bool,shoppingData:re().object};const pi=di,ui=window.wp.sanitize,{stripHTMLTags:hi}=Rt.strings;function gi(e,t=156){return(e=(e=(0,ui.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const mi=(0,c.memoize)((e,t)=>0===e?c.noop:(0,c.debounce)(s=>t(s,e),500)),yi=({link:e,text:t})=>(0,le.jsxs)(Ce.Root,{children:[(0,le.jsx)("p",{children:t}),(0,le.jsxs)(Ce.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,le.jsx)(Pe,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,Re.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,Re.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});yi.propTypes={link:re().string.isRequired,text:re().string.isRequired};const wi=yi,fi=function(e,t){let s=0;return t.shortenedBaseUrl&&"string"==typeof t.shortenedBaseUrl&&(s=t.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[s]&&(e.url=e.url.slice(0,s)+e.url.slice(s+1)),function(e){const t=(0,c.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,c.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,c.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],c.identity);return{url:e.url,title:hi(t(e.title)),description:hi(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?hi(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:hi(s("data_page_title",e.title)),description:hi(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?hi(s("data_page_title",e.filteredSEOTitle)):""}}(e)},bi=(0,rt.compose)([(0,a.withSelect)(function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:i,getRecommendedReplaceVars:o,getReplaceVars:r,getShoppingData:n,getSiteIconUrlFromSettings:a,getSnippetEditorData:l,getSnippetEditorMode:c,getSnippetEditorPreviewImageUrl:d,getSnippetEditorWordsToHighlight:p,isCornerstoneContent:u,getIsTerm:h,getContentLocale:g,getSiteName:m}=e("yoast-seo/editor"),y=r();return y.forEach(e=>{""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(e.value="%%"+e.name+"%%")}),{baseUrl:t(),data:l(),date:s(),faviconSrc:a(),keyword:i(),mobileImageSrc:d(),mode:c(),recommendedReplacementVariables:o(),replacementVariables:y,shoppingData:n(),wordsToHighlight:p(),isCornerstone:u(),isTaxonomy:h(),locale:g(),siteName:m()}}),(0,a.withDispatch)(function(e,t,{select:s}){const{updateData:i,switchMode:o,updateAnalysisData:r,findCustomFields:n}=e("yoast-seo/editor"),a=e("core/editor"),l=s("yoast-seo/editor").getPostId();return{onChange:(e,t)=>{switch(e){case"mode":o(t);break;case"slug":i({slug:t}),a&&a.editPost({slug:t});break;default:i({[e]:t})}},onChangeAnalysisData:r,onReplacementVariableSearchChange:mi(l,n)}})])(e=>{const t=(0,a.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox"),[]),s=(0,a.useSelect)(e=>e("yoast-seo/editor").getIsWooSeoUpsell(),[]),i=(0,Re.__)("Want an enhanced Google preview of how your WooCommerce products look in the search results?","wordpress-seo");return(0,le.jsx)(ie.LocationConsumer,{children:o=>(0,le.jsx)(pi,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,le.jsxs)(le.Fragment,{children:[s&&(0,le.jsx)(wi,{link:t,text:i}),(0,le.jsx)(li.SnippetEditor,{...e,descriptionPlaceholder:(0,Re.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:fi,showCloseButton:!1,idSuffix:o})]})})})}),{stripHTMLTags:xi}=Rt.strings,_i=(e,t)=>{const s=(0,a.select)("yoast-seo/editor").getSnippetEditorTemplates();""===e.title&&(e.title=s.title),""===e.description&&(e.description=s.description);let i=0;return t.shortenedBaseUrl&&"string"==typeof t.shortenedBaseUrl&&(i=t.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[i]&&(e.url=e.url.slice(0,i)+e.url.slice(i+1)),{url:e.url,title:xi(E("data_page_title",e.title)),description:xi(E("data_meta_desc",e.description)),filteredSEOTitle:xi(E("data_page_title",e.filteredSEOTitle))}},vi=({isLoading:e,onLoad:t,location:s,...i})=>((0,se.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,le.jsx)(pi,{icon:"eye",hasPaperStyle:i.hasPaperStyle,children:(0,le.jsx)(li.SnippetEditor,{...i,descriptionPlaceholder:(0,Re.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:_i,showCloseButton:!1,idSuffix:s})}));vi.propTypes={isLoading:re().bool.isRequired,onLoad:re().func.isRequired,hasPaperStyle:re().bool.isRequired,location:re().string.isRequired};const ki=(0,rt.compose)([(0,a.withSelect)(e=>{const{getBaseUrlFromSettings:t,getDateFromSettings:s,getEditorDataImageUrl:i,getFocusKeyphrase:o,getRecommendedReplaceVars:r,getSiteIconUrlFromSettings:n,getSnippetEditorData:a,getSnippetEditorIsLoading:l,getSnippetEditorMode:c,getSnippetEditorWordsToHighlight:d,isCornerstoneContent:p,getContentLocale:u,getSiteName:h,getReplaceVars:g}=e("yoast-seo/editor");return{baseUrl:t(),data:a(),date:s(),faviconSrc:n(),isLoading:l(),keyword:o(),mobileImageSrc:i(),mode:c(),recommendedReplacementVariables:r(),replacementVariables:g(),wordsToHighlight:d(),isCornerstone:p(),locale:u(),siteName:h()}}),(0,a.withDispatch)(e=>{const{updateData:t,switchMode:s,updateAnalysisData:i,loadSnippetEditorData:o}=e("yoast-seo/editor");return{onChange:(e,i)=>{switch(e){case"mode":s(i);break;case"slug":t({slug:i});break;default:t({[e]:i})}},onChangeAnalysisData:i,onLoad:o}}),_t()])(vi),Si=ae()(ai)` width: 18px; height: 18px; margin: 3px; `,Ri=()=>{const e=Ps(),t=(0,a.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]);return(0,le.jsxs)(qs,{title:(0,Re.__)("Search appearance","wordpress-seo"),id:"yoast-search-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,le.jsx)(Si,{className:"yst-text-slate-500",...e}),children:[!0===t&&(0,le.jsx)(ki,{showCloseButton:!1,hasPaperStyle:!1}),!1===t&&(0,le.jsx)(bi,{showCloseButton:!1,hasPaperStyle:!1})]})},Ti=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{d:"M15 8a3 3 0 10-2.977-2.63l-4.94 2.47a3 3 0 100 4.319l4.94 2.47a3 3 0 10.895-1.789l-4.94-2.47a3.027 3.027 0 000-.74l4.94-2.47C13.456 7.68 14.19 8 15 8z"}))}),Ei=ae().p` color: #606770; flex-shrink: 0; font-size: 12px; line-height: 16px; overflow: hidden; padding: 0; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; margin: 0; position: ${e=>"landscape"===e.mode?"relative":"static"}; `,ji=e=>{const{siteUrl:t}=e;return(0,le.jsxs)(Ie.Fragment,{children:[(0,le.jsx)("span",{className:"screen-reader-text",children:t}),(0,le.jsx)(Ei,{"aria-hidden":"true",children:(0,le.jsx)("span",{children:t})})]})};ji.propTypes={siteUrl:re().string.isRequired};const Ci=ji,Ii=window.yoast.socialMetadataForms,Li=window.yoast.styleGuide,Ai=ae().img` && { max-width: ${e=>e.width}px; height: ${e=>e.height}px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: none; } `,Pi=ae().img` && { height: 100%; position: absolute; width: 100%; object-fit: cover; } `,Di=ae().div` padding-bottom: ${e=>e.aspectRatio}%; `,Fi=({imageProps:e,width:t,height:s,imageMode:i="landscape"})=>"landscape"===i?(0,le.jsx)(Di,{aspectRatio:e.aspectRatio,children:(0,le.jsx)(Pi,{src:e.src,alt:e.alt})}):(0,le.jsx)(Ai,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});function Mi(e,t,s){return"landscape"===s?{widthRatio:t.width/e.landscapeWidth,heightRatio:t.height/e.landscapeHeight}:"portrait"===s?{widthRatio:t.width/e.portraitWidth,heightRatio:t.height/e.portraitHeight}:{widthRatio:t.width/e.squareWidth,heightRatio:t.height/e.squareHeight}}function Oi(e,t){return t.widthRatio<=t.heightRatio?{width:Math.round(e.width/t.widthRatio),height:Math.round(e.height/t.widthRatio)}:{width:Math.round(e.width/t.heightRatio),height:Math.round(e.height/t.heightRatio)}}async function qi(e,t,s=!1){const i=await function(e){return new Promise((t,s)=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height})},i.onerror=s,i.src=e})}(e);let o=s?"landscape":"square";"Facebook"===t&&(o=(0,Ii.determineFacebookImageMode)(i));const r=function(e){return"Twitter"===e?Ii.TWITTER_IMAGE_SIZES:Ii.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:Oi(t,Mi(e,t,s))}(r,i,o);return{mode:o,height:n.height,width:n.width}}async function Ni(e,t,s=!1){try{return{imageProperties:await qi(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}Fi.propTypes={imageProps:re().shape({src:re().string.isRequired,alt:re().string.isRequired,aspectRatio:re().number.isRequired}).isRequired,width:re().number.isRequired,height:re().number.isRequired,imageMode:re().string};const Ui=ae().div` position: relative; ${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`}; overflow: hidden; background-color: ${Li.colors.$color_white}; `,Wi=ae().div` box-sizing: border-box; max-width: ${Ii.FACEBOOK_IMAGE_SIZES.landscapeWidth}px; height: ${Ii.FACEBOOK_IMAGE_SIZES.landscapeHeight}px; background-color: ${Li.colors.$color_grey}; border-style: dashed; border-width: 1px; // We're not using standard colors to increase contrast for accessibility. color: #006DAC; // We're not using standard colors to increase contrast for accessibility. background-color: #f1f1f1; display: flex; justify-content: center; align-items: center; text-decoration: underline; font-size: 14px; cursor: pointer; `;class $i extends Ie.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await Ni(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:Ii.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:Ii.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:Ii.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:Ii.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:Ii.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:Ii.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,le.jsx)(Wi,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,Re.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,le.jsx)(Ui,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,le.jsx)(Fi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Ii.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}$i.propTypes={src:re().string,alt:re().string,onImageLoaded:re().func,onImageClick:re().func,onMouseEnter:re().func,onMouseLeave:re().func},$i.defaultProps={src:"",alt:"",onImageLoaded:c.noop,onImageClick:c.noop,onMouseEnter:c.noop,onMouseLeave:c.noop};const Bi=$i,Ki=ae().span` line-height: ${20}px; min-height : ${20}px; color: #1d2129; font-weight: 600; overflow: hidden; font-size: 16px; margin: 3px 0 0; letter-spacing: normal; white-space: normal; flex-shrink: 0; cursor: pointer; display: -webkit-box; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; `,Hi=ae().p` line-height: ${16}px; min-height : ${16}px; color: #606770; font-size: 14px; padding: 0; text-overflow: ellipsis; margin: 3px 0 0 0; display: -webkit-box; cursor: pointer; -webkit-line-clamp: ${e=>e.lineCount}; -webkit-box-orient: vertical; overflow: hidden; @media all and ( max-width: ${e=>e.maxWidth} ) { display: none; } `,Vi=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},Yi=ae().div` box-sizing: border-box; display: flex; flex-direction: ${e=>"landscape"===e.mode?"column":"row"}; background-color: #f2f3f5; max-width: 527px; `,zi=ae().div` box-sizing: border-box; background-color: #f2f3f5; margin: 0; padding: 10px 12px; position: relative; border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"}; border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""}; display: flex; flex-direction: column; flex-grow: 1; justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"}; font-size: 12px; overflow: hidden; `;class Gi extends Ie.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=Le().createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:t}=this.state,s="landscape"===e?2:5;s!==t&&this.setState({maxLineCount:s})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:t,imageMode:s}=this.state,i=this.getTitleLineCount();let o=t-i;"portrait"===s&&(o=5===i?0:4),o!==e&&this.setState({descriptionLineCount:o})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:e,maxLineCount:t,descriptionLineCount:s}=this.state;return(0,le.jsxs)(Yi,{id:"facebookPreview",mode:e,children:[(0,le.jsx)(Bi,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,le.jsxs)(zi,{mode:e,children:[(0,le.jsx)(Ci,{siteUrl:this.props.siteUrl,mode:e}),(0,le.jsx)(Ki,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,le.jsx)(Hi,{maxWidth:Vi(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}Gi.propTypes={siteUrl:re().string.isRequired,title:re().string.isRequired,description:re().string,imageUrl:re().string,imageFallbackUrl:re().string,alt:re().string,onSelect:re().func,onImageClick:re().func,onMouseHover:re().func},Gi.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const Zi=Gi,Qi=ae().div` text-transform: lowercase; color: rgb(83, 100, 113); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; fill: currentcolor; display: flex; flex-direction: row; align-items: flex-end; `,Xi=e=>(0,le.jsx)(Qi,{children:(0,le.jsx)("span",{children:e.siteUrl})});Xi.propTypes={siteUrl:re().string.isRequired};const Ji=Xi,eo=(e,t=!0)=>e?`\n\t\t\tmax-width: ${Ii.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${t?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${Ii.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,to=ae().div` position: relative; box-sizing: content-box; overflow: hidden; background-color: #e1e8ed; flex-shrink: 0; ${e=>eo(e.isLarge)} `,so=ae().div` display: flex; justify-content: center; align-items: center; box-sizing: border-box; max-width: 100%; margin: 0; padding: 1em; text-align: center; font-size: 1rem; ${e=>eo(e.isLarge,!1)} `,io=ae()(so)` ${e=>e.isLarge&&`height: ${Ii.TWITTER_IMAGE_SIZES.landscapeHeight}px;`} border-top-left-radius: 14px; ${e=>e.isLarge?"border-top-right-radius":"border-bottom-left-radius"}: 14px; border-style: dashed; border-width: 1px; // We're not using standard colors to increase contrast for accessibility. color: #006DAC; // We're not using standard colors to increase contrast for accessibility. background-color: #f1f1f1; text-decoration: underline; font-size: 14px; cursor: pointer; `;class oo extends Le().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await Ni(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,le.jsx)(io,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,Re.__)("Select image","wordpress-seo")}):(0,le.jsx)(to,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,le.jsx)(Fi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:Ii.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}oo.propTypes={isLarge:re().bool.isRequired,src:re().string,alt:re().string,onImageClick:re().func,onMouseEnter:re().func,onMouseLeave:re().func},oo.defaultProps={src:"",alt:"",onMouseEnter:c.noop,onImageClick:c.noop,onMouseLeave:c.noop};const ro=ae().div` display: flex; flex-direction: column; padding: 12px; justify-content: center; margin: 0; box-sizing: border-box; flex: auto; min-width: 0px; gap:2px; > * { line-height:20px; min-height:20px; font-size:15px; } `,no=e=>(0,le.jsx)(ro,{children:e.children});no.propTypes={children:re().array.isRequired};const ao=no,lo=ae().p` white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(15, 20, 25); cursor: pointer; `,co=ae().p` max-height: 55px; overflow: hidden; text-overflow: ellipsis; margin: 0; color: rgb(83, 100, 113); display: -webkit-box; cursor: pointer; -webkit-line-clamp: 2; -webkit-box-orient: vertical; @media all and ( max-width: ${Ii.TWITTER_IMAGE_SIZES.landscapeWidth}px ) { display: none; } `,po=ae().div` font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif; font-size: 15px; font-weight: 400; line-height: 20px; max-width: 507px; border: 1px solid #E1E8ED; box-sizing: border-box; border-radius: 14px; color: #292F33; background: #FFFFFF; text-overflow: ellipsis; display: flex; &:hover { background: #f5f8fa; border: 1px solid rgba(136,153,166,.5); } `,uo=ae()(po)` flex-direction: column; max-height: 370px; `,ho=ae()(po)` flex-direction: row; height: 125px; `;class go extends Ie.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:e,imageUrl:t,imageFallbackUrl:s,alt:i,title:o,description:r,siteUrl:n}=this.props,a=e?uo:ho;return(0,le.jsxs)(a,{id:"twitterPreview",children:[(0,le.jsx)(oo,{src:t||s,alt:i,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,le.jsxs)(ao,{children:[(0,le.jsx)(Ji,{siteUrl:n}),(0,le.jsx)(lo,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,le.jsx)(co,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:r})]})]})}}go.propTypes={siteUrl:re().string.isRequired,title:re().string.isRequired,description:re().string,isLarge:re().bool,imageUrl:re().string,imageFallbackUrl:re().string,alt:re().string,onSelect:re().func,onImageClick:re().func,onMouseHover:re().func},go.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const mo=go,yo=window.yoast.replacementVariableEditor;class wo extends Ie.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?Zi:mo,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:i,socialMediumName:o,imageWarnings:r,siteUrl:n,description:a,descriptionInputPlaceholder:l,descriptionPreviewFallback:c,imageUrl:d,imageFallbackUrl:p,alt:u,title:h,titleInputPlaceholder:g,titlePreviewFallback:m,replacementVariables:y,recommendedReplacementVariables:w,applyReplacementVariables:f,onReplacementVariableSearchChange:b,isPremium:x,isLarge:_,socialPreviewLabel:v,idSuffix:k,activeMetaTabId:S}=this.props,R=f({title:h||m,description:a||c});return(0,le.jsxs)(Le().Fragment,{children:[v&&(0,le.jsx)(dt.SimulatedLabel,{children:v}),(0,le.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:n,title:R.title,description:R.description,imageUrl:d,imageFallbackUrl:p,alt:u,isLarge:_,activeMetaTabId:S}),(0,le.jsx)(Ii.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:h,titleInputPlaceholder:g,onRemoveImageClick:i,imageSelected:!!d,imageUrl:d,imageFallbackUrl:p,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:r,replacementVariables:y,recommendedReplacementVariables:w,onReplacementVariableSearchChange:b,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:k})]})}}wo.propTypes={title:re().string.isRequired,onTitleChange:re().func.isRequired,description:re().string.isRequired,onDescriptionChange:re().func.isRequired,imageUrl:re().string.isRequired,imageFallbackUrl:re().string.isRequired,onSelectImageClick:re().func.isRequired,onRemoveImageClick:re().func.isRequired,socialMediumName:re().string.isRequired,alt:re().string,isPremium:re().bool,imageWarnings:re().array,isLarge:re().bool,siteUrl:re().string,descriptionInputPlaceholder:re().string,titleInputPlaceholder:re().string,descriptionPreviewFallback:re().string,titlePreviewFallback:re().string,replacementVariables:yo.replacementVariablesShape,recommendedReplacementVariables:yo.recommendedReplacementVariablesShape,applyReplacementVariables:re().func,onReplacementVariableSearchChange:re().func,socialPreviewLabel:re().string,idSuffix:re().string,activeMetaTabId:re().string},wo.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const fo={},bo=(e,t,{log:s=console.warn}={})=>{fo[e]||(fo[e]=!0,s(t))},xo=(e,t=c.noop)=>{const s={};for(const i in e)Object.hasOwn(e,i)&&Object.defineProperty(s,i,{set:s=>{e[i]=s,t("set",i,s)},get:()=>(t("get",i),e[i])});return s};xo({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},(e,t)=>bo(`@yoast/social-metadata-previews/TWITTER_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "TWITTER_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`)),xo({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},(e,t)=>bo(`@yoast/social-metadata-previews/FACEBOOK_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "FACEBOOK_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`));const _o=ae().div` max-width: calc(527px + 1.5rem); `,vo=e=>{const t="X"===e.socialMediumName?(0,Re.__)("X share preview","wordpress-seo"):(0,Re.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,Ce.useRootContext)();return(0,le.jsx)(Ce.Root,{children:(0,le.jsx)(_o,{children:(0,le.jsx)(Ce.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,at.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,Re.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */ (0,Re.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,le.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,le.jsx)(Ce.Label,{children:t}),(0,le.jsx)(Zi,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:c.noop,onImageClick:c.noop,onMouseHover:c.noop})]})})})})};vo.propTypes={socialMediumName:re().oneOf(["Social","Twitter","X"]).isRequired};const ko=vo;class So extends se.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},()=>this.setEditorFocus(e))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:i,socialMediumName:o,imageWarnings:r,description:n,descriptionInputPlaceholder:a,imageUrl:l,imageFallbackUrl:c,alt:d,title:p,titleInputPlaceholder:u,replacementVariables:h,recommendedReplacementVariables:g,onReplacementVariableSearchChange:m,isPremium:y,location:w}=this.props;return(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(ko,{socialMediumName:o}),(0,le.jsx)(Ii.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:p,titleInputPlaceholder:u,onRemoveImageClick:i,imageSelected:!!l,imageUrl:l,imageFallbackUrl:c,imageAltText:d,onTitleChange:t,onSelectImageClick:s,description:n,descriptionInputPlaceholder:a,imageWarnings:r,replacementVariables:h,recommendedReplacementVariables:g,onReplacementVariableSearchChange:m,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:y,setEditorRef:this.setEditorRef,idSuffix:w})]})}}So.propTypes={title:re().string.isRequired,onTitleChange:re().func.isRequired,description:re().string.isRequired,onDescriptionChange:re().func.isRequired,imageUrl:re().string.isRequired,imageFallbackUrl:re().string,onSelectImageClick:re().func.isRequired,onRemoveImageClick:re().func.isRequired,socialMediumName:re().string.isRequired,isPremium:re().bool,imageWarnings:re().array,descriptionInputPlaceholder:re().string,titleInputPlaceholder:re().string,replacementVariables:yo.replacementVariablesShape,recommendedReplacementVariables:yo.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:re().func,location:re().string,alt:re().string},So.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const Ro=So,To=(e,t,s)=>{const[i,o]=(0,se.useState)(!1),r=(0,Re.sprintf)( /* Translators: %1$s expands to the jpg format, %2$s expands to the png format, %3$s expands to the webp format, %4$s expands to the gif format. */ /* Translators: %1$s expands to the jpg format, %2$s expands to the png format, %3$s expands to the webp format, %4$s expands to the gif format. */ (0,Re.__)("No image was found that we can automatically set as your social image. Please use %1$s, %2$s, %3$s or %4$s formats to ensure it displays correctly on social media.","wordpress-seo"),"JPG","PNG","WEBP","GIF");return(0,se.useEffect)(()=>{o(""===t&&e.toLowerCase().endsWith(".avif"))},[e,t]),i?[r]:s},Eo=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:i="",imageUrl:o="",imageWarnings:r=[],...n})=>{const[a,l]=(0,se.useState)(""),c=To(i,o,r),d=(0,se.useCallback)(e=>{l(e.detail.metaTabId)},[l]);(0,se.useEffect)(()=>(setTimeout(t),window.addEventListener("YoastSEO:metaTabChange",d),()=>{window.removeEventListener("YoastSEO:metaTabChange",d)}),[]);const p={isPremium:e,onLoad:t,location:s,imageFallbackUrl:i,imageUrl:o,imageWarnings:c,activeMetaTabId:a,...n};return e?(0,le.jsx)(te.Slot,{name:`YoastFacebookPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:p}):(0,le.jsx)(Ro,{...p})};Eo.propTypes={isPremium:re().bool.isRequired,onLoad:re().func.isRequired,location:re().string.isRequired,imageFallbackUrl:re().string,imageUrl:re().string,imageWarnings:re().array};const jo=Eo;function Co(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const s=t.state().get("selection").first();var i;e({type:(i=s.attributes).subtype,width:i.width,height:i.height,url:i.url,id:i.id,sizes:i.sizes,alt:i.alt||i.title||i.name})}),t})(e).open()}const Io=()=>{Co(e=>(0,a.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,i=(0,Ii.determineFacebookImageMode)({width:t,height:s}),o=Ii.FACEBOOK_IMAGE_SIZES[i+"Width"],r=Ii.FACEBOOK_IMAGE_SIZES[i+"Height"],n=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=r);return{url:n?n.url:e.url,id:e.id,warnings:(0,Rt.validateFacebookImage)(e),alt:e.alt||""}})(e)))},Lo=(0,rt.compose)([(0,a.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:i,getSeoTitle:o,getFacebookImageUrl:r,getImageFallback:n,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:p,getSeoTitleTemplateNoFallback:u,getSocialTitleTemplate:h,getSeoDescriptionTemplate:m,getSocialDescriptionTemplate:y,getReplacedExcerpt:w,getFacebookAltText:f}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:n(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:y()||s()||m()||w()||"",title:i(),titlePreviewFallback:h()||o()||u()||p()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!g().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:f()}}),(0,a.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:i,setFacebookPreviewDescription:o,clearFacebookPreviewImage:r,loadFacebookPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Io,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:mi(l,a)}}),_t()])(jo),Ao=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:i="",imageUrl:o="",imageWarnings:r=[],...n})=>{const a=To(i,o,r);(0,se.useEffect)(()=>{setTimeout(t)},[]);const l={isPremium:e,onLoad:t,location:s,imageFallbackUrl:i,imageUrl:o,imageWarnings:a,...n};return e?(0,le.jsx)(te.Slot,{name:`YoastTwitterPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:l}):(0,le.jsx)(Ro,{...l})};Ao.propTypes={isPremium:re().bool.isRequired,onLoad:re().func.isRequired,location:re().string.isRequired,imageFallbackUrl:re().string,imageUrl:re().string,imageWarnings:re().array};const Po=Ao,Do=()=>{Co(e=>(0,a.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,c.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=Ii.TWITTER_IMAGE_SIZES[t+"Width"],i=Ii.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=i);return{url:o?o.url:e.url,id:e.id,warnings:(0,Rt.validateTwitterImage)(e),alt:e.alt||""}})(e)))},Fo=(0,rt.compose)([(0,a.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:i,getFacebookImageUrl:o,getFacebookTitle:r,getFacebookDescription:n,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:p,getRecommendedReplaceVars:u,getReplaceVars:h,getSiteUrl:m,getSeoTitleTemplate:y,getSeoTitleTemplateNoFallback:w,getSocialTitleTemplate:f,getSeoDescriptionTemplate:b,getSocialDescriptionTemplate:x,getReplacedExcerpt:_,getTwitterAltText:v}=e("yoast-seo/editor");return{imageUrl:i(),imageFallbackUrl:o()||p(),recommendedReplacementVariables:u(),replacementVariables:h(),description:t(),descriptionPreviewFallback:x()||n()||a()||b()||_()||"",title:s(),titlePreviewFallback:f()||r()||l()||w()||y()||"",imageWarnings:c(),siteUrl:m(),isPremium:!!g().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:v()}}),(0,a.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:i,setTwitterPreviewDescription:o,clearTwitterPreviewImage:r,loadTwitterPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Do,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:mi(l,a)}}),_t()])(Po),Mo=ae()(dt.Collapsible)` h2 > button { padding-left: 0; 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); } `,Oo=e=>(0,le.jsx)(Mo,{hasPadding:!1,hasSeparator:!0,...e}),qo=ae().legend` margin: 16px 0; padding: 0; color: ${Li.colors.$color_headings}; font-size: 12px; font-weight: 300; `,No=ae().legend` margin: 0 0 16px; padding: 0; color: ${Li.colors.$color_headings}; font-size: 12px; font-weight: 300; `,Uo=ae()(Ti)` width: 18px; height: 18px; margin: 3px; `,Wo=e=>{const{useOpenGraphData:t,useTwitterData:s}=e;if(!t&&!s)return;const i=Ps();return(0 /* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,le.jsxs)(qs,{title:(0,Re.__)("Social media appearance","wordpress-seo"),id:"yoast-social-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,le.jsx)(Uo,{className:"yst-text-slate-500",...i}),children:[t&&(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(No,{children:(0,Re.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,le.jsx)(Lo,{}),s&&(0,le.jsx)(qo,{children:(0,Re.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),t&&s&&(0,le.jsx)(Oo,{title:(0,Re.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,le.jsx)(Fo,{})}),!t&&s&&(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(No,{children:(0,Re.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,le.jsx)(Fo,{})]})]})};Wo.propTypes={useOpenGraphData:re().bool.isRequired,useTwitterData:re().bool.isRequired};const $o=Wo,Bo=({title:e,children:t,prefixIcon:s=null,subTitle:i="",hasBetaBadgeLabel:o=!1,hasNewBadgeLabel:r=!1,buttonId:n=null,renderNewBadgeLabel:a=()=>{},initialIsOpen:l=!1})=>{const[c,d]=(0,se.useState)(l),p=(0,se.useRef)(null);(0,se.useEffect)(()=>{l&&p.current&&p.current.focus()},[]);const u=(0,se.useCallback)(()=>{d(e=>!e)},[d]);return(0,le.jsxs)("div",{className:"yoast components-panel__body "+(c?"is-opened":""),children:[(0,le.jsx)("h2",{className:"components-panel__body-title",children:(0,le.jsxs)("button",{ref:p,onClick:u,className:"components-button components-panel__body-toggle",type:"button",id:n,children:[(0,le.jsx)("span",{className:"yoast-icon-span",style:{fill:`${s&&s.color||""}`},children:s&&(0,le.jsx)(dt.SvgIcon,{icon:s.icon,color:s.color,size:s.size})}),!r&&(0,le.jsxs)(le.Fragment,{children:[(0,le.jsxs)("span",{className:"yoast-title-container",children:[(0,le.jsx)("div",{className:"yoast-title",children:e}),i&&(0,le.jsx)("div",{className:"yoast-subtitle",children:i})]}),o&&(0,le.jsx)(dt.BetaBadge,{})]}),r&&(0,le.jsxs)("div",{className:"yst-flex-grow yst-flex yst-items-center yst-gap-2",children:[(0,le.jsxs)("span",{className:"yst-overflow-x-hidden yst-leading-normal",children:[(0,le.jsx)("div",{className:"yoast-title",children:e}),i&&(0,le.jsx)("div",{className:"yoast-subtitle",children:i})]}),a()]}),(0,le.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),c&&t]})},Ko=Bo;Bo.propTypes={title:re().string.isRequired,children:re().oneOfType([re().node,re().arrayOf(re().node)]).isRequired,prefixIcon:re().object,subTitle:re().string,hasBetaBadgeLabel:re().bool,hasNewBadgeLabel:re().bool,buttonId:re().string,renderNewBadgeLabel:re().func,initialIsOpen:re().bool};const Ho=(0,Rt.makeOutboundLink)(),Vo=ae().div` padding: 16px; `,Yo="yoast-seo/editor";function zo({location:e,show:t}){return t?(0,le.jsxs)(dt.Alert,{type:"info",children:[(0,Re.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */ (0,Re.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,le.jsx)(Ho,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,Re.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */ (0,Re.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}zo.propTypes={show:re().bool.isRequired,location:re().string.isRequired};const Go=(e,t,s)=>{const i=(0,a.useSelect)(e=>e(Yo).getIsProduct(),[]),o=(0,a.useSelect)(e=>e(Yo).getIsWooSeoActive(),[]),r=i&&o?{name:(0,Re.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===t);return[{name:(0,Re.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ /* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ (0,Re.__)("Default for %1$s (%2$s)","wordpress-seo"),s,r?r.name:""),value:""},...e]},Zo=(e,t)=>Ae((e=>(0,Re.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ /* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ (0,Re.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"<link>","</link>"))(e),{link:(0,le.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})}),Qo=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,le.jsx)(dt.FieldGroup,{label:e,linkTo:t /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});Qo.propTypes={helpTextTitle:re().string.isRequired,helpTextLink:re().string.isRequired,helpTextDescription:re().string.isRequired};const Xo=({schemaPageTypeChange:e=c.noop,schemaPageTypeSelected:t=null,pageTypeOptions:s,schemaArticleTypeChange:i=c.noop,schemaArticleTypeSelected:o=null,articleTypeOptions:r,showArticleTypeInput:n,additionalHelpTextLink:l,helpTextLink:d,helpTextTitle:p,helpTextDescription:u,postTypeName:h,displayFooter:g=!1,defaultPageType:m,defaultArticleType:y,location:w,isNewsEnabled:f=!1})=>{const b=Go(s,m,h),x=Go(r,y,h),_=(0,a.useSelect)(e=>e(Yo).selectLink("https://yoa.st/product-schema-metabox"),[]),v=(0,a.useSelect)(e=>e(Yo).getIsWooSeoUpsell(),[]),[k,S]=(0,se.useState)(o),R=(0,Re.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),T=(0,a.useSelect)(e=>e(Yo).getIsProduct(),[]),E=(0,a.useSelect)(e=>e(Yo).getIsWooSeoActive(),[]),j=(0,a.useSelect)(e=>e(Yo).selectAdminLink("?page=wpseo_page_settings"),[]),C=T&&E,I=(0,se.useCallback)((e,t)=>{S(t)},[]);return(0,se.useEffect)(()=>{I(null,o)},[o]),(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(Qo,{helpTextLink:d,helpTextTitle:p,helpTextDescription:u}),(0,le.jsx)(dt.FieldGroup,{label:(0,Re.__)("What type of page or content is this?","wordpress-seo"),linkTo:l /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about page or content types","wordpress-seo")}),v&&(0,le.jsx)(wi,{link:_,text:R}),(0,le.jsx)(dt.Select,{id:(0,Rt.join)(["yoast-schema-page-type",w]),options:b,label:(0,Re.__)("Page type","wordpress-seo"),onChange:e,selected:C?"ItemPage":t,disabled:C}),n&&(0,le.jsx)(dt.Select,{id:(0,Rt.join)(["yoast-schema-article-type",w]),options:x,label:(0,Re.__)("Article type","wordpress-seo"),onChange:i,selected:o,onOptionFocus:I}),(0,le.jsx)(zo,{location:w,show:!f&&(L=k,A=y,"NewsArticle"===L||""===L&&"NewsArticle"===A)}),g&&!C&&(0,le.jsx)("p",{children:Zo(h,j)}),C&&(0,le.jsx)("p",{children:(0,Re.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */ (0,Re.__)("You have %1$s activated on your site, automatically setting the Page type for your products to 'Item Page'. As a result, the Page type selection is disabled.","wordpress-seo"),"Yoast WooCommerce SEO")})]});var L,A},Jo=re().arrayOf(re().shape({name:re().string,value:re().string}));Xo.propTypes={schemaPageTypeChange:re().func,schemaPageTypeSelected:re().string,pageTypeOptions:Jo.isRequired,schemaArticleTypeChange:re().func,schemaArticleTypeSelected:re().string,articleTypeOptions:Jo.isRequired,showArticleTypeInput:re().bool.isRequired,additionalHelpTextLink:re().string.isRequired,helpTextLink:re().string.isRequired,helpTextTitle:re().string.isRequired,helpTextDescription:re().string.isRequired,postTypeName:re().string.isRequired,displayFooter:re().bool,defaultPageType:re().string.isRequired,defaultArticleType:re().string.isRequired,location:re().string.isRequired,isNewsEnabled:re().bool};const er=({isMetabox:e,showArticleTypeInput:t=!1,articleTypeLabel:s="",additionalHelpTextLink:i="",pageTypeLabel:o,helpTextLink:r,helpTextTitle:n,helpTextDescription:a,postTypeName:l,displayFooter:c=!1,loadSchemaArticleData:d,loadSchemaPageData:p,location:u,...h})=>{const g=(0,le.jsx)(Xo,{showArticleTypeInput:t,articleTypeLabel:s,additionalHelpTextLink:i,pageTypeLabel:o,helpTextLink:r,helpTextTitle:n,helpTextDescription:a,postTypeName:l,displayFooter:c,loadSchemaArticleData:d,loadSchemaPageData:p,location:u,...h});return e?(0,se.createPortal)((0,le.jsx)(Vo,{children:g}),document.getElementById("wpseo-meta-section-schema")):g};er.propTypes={isMetabox:re().bool.isRequired,showArticleTypeInput:re().bool,articleTypeLabel:re().string,additionalHelpTextLink:re().string,pageTypeLabel:re().string.isRequired,helpTextLink:re().string.isRequired,helpTextTitle:re().string.isRequired,helpTextDescription:re().string.isRequired,postTypeName:re().string.isRequired,displayFooter:re().bool,loadSchemaArticleData:re().func.isRequired,loadSchemaPageData:re().func.isRequired,location:re().string.isRequired};const tr=er;class sr{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return sr.articleTypeInput.getAttribute("data-default")}static get articleType(){return sr.articleTypeInput.value}static set articleType(e){sr.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return sr.pageTypeInput.getAttribute("data-default")}static get pageType(){return sr.pageTypeInput.value}static set pageType(e){sr.pageTypeInput.value=e}}const ir=e=>{const t=null!==sr.articleTypeInput;(0,se.useEffect)(()=>{e.loadSchemaPageData(),t&&e.loadSchemaArticleData()},[]);const{pageTypeOptions:s,articleTypeOptions:i}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,Re.__)("Article type","wordpress-seo"),pageTypeLabel:(0,Re.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,Re.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,Re.__)("This helps search engines understand your website and your content. You can change some of your settings for this page below.","wordpress-seo"),showArticleTypeInput:t,pageTypeOptions:s,articleTypeOptions:i},r={...e,...o,...(n=e.location,"metabox"===n?{helpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.page_type"],isMetabox:!0}:{helpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.page_type"],isMetabox:!1})};var n;return(0,le.jsx)(tr,{...r})};ir.propTypes={displayFooter:re().bool.isRequired,schemaPageTypeSelected:re().string.isRequired,schemaArticleTypeSelected:re().string.isRequired,defaultArticleType:re().string.isRequired,defaultPageType:re().string.isRequired,loadSchemaPageData:re().func.isRequired,loadSchemaArticleData:re().func.isRequired,schemaPageTypeChange:re().func.isRequired,schemaArticleTypeChange:re().func.isRequired,location:re().string.isRequired};const or=(0,rt.compose)([(0,a.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:i,getArticleType:o,getDefaultArticleType:r}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:n,isNewsEnabled:a}=t();return{displayFooter:n,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:r(),defaultPageType:i()}}),(0,a.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:i,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:i,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),_t()])(ir),rr=({noIndex:e,onNoIndexChange:t,editorContext:s,isPrivateBlog:i=!1})=>{const o=(e=>{const t=(0,Re.__)("No","wordpress-seo"),s=(0,Re.__)("Yes","wordpress-seo"),i=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,Re.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,Re.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,Re.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ (0,Re.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"default"},{name:s,value:"index"},{name:t,value:"noindex"}]})(s);return(0,le.jsx)(ie.LocationConsumer,{children:s=>(0,le.jsxs)(se.Fragment,{children:[i&&(0,le.jsx)(dt.Alert,{type:"warning",children:(0,Re.__)("Even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won't have an effect.","wordpress-seo")}),(0,le.jsx)(dt.Select,{label:(0,Re.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:t,id:(0,Rt.join)(["yoast-meta-robots-noindex",s]),options:o,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"] /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};rr.propTypes={noIndex:re().string.isRequired,onNoIndexChange:re().func.isRequired,editorContext:re().object.isRequired,isPrivateBlog:re().bool};const nr=({noFollow:e,onNoFollowChange:t})=>(0,le.jsx)(ie.LocationConsumer,{children:s=>{const i=(0,Rt.join)(["yoast-meta-robots-nofollow",s]);return(0,le.jsx)(dt.RadioButtonGroup,{id:i,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,Re.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:i,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"] /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});nr.propTypes={noFollow:re().string.isRequired,onNoFollowChange:re().func.isRequired};const ar=({advanced:e,onAdvancedChange:t})=>(0,le.jsx)(ie.LocationConsumer,{children:s=>{const i=(0,Rt.join)(["yoast-meta-robots-advanced",s]),o=`${i}-input`;return(0,le.jsx)(dt.MultiSelect,{label:(0,Re.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:i,inputId:o,options:[{name:(0,Re.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,Re.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,Re.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"] /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});ar.propTypes={advanced:re().array.isRequired,onAdvancedChange:re().func.isRequired};const lr=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,le.jsx)(ie.LocationConsumer,{children:s=>(0,le.jsx)(dt.TextInput,{label:(0,Re.__)("Breadcrumbs Title","wordpress-seo"),id:(0,Rt.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"] /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});lr.propTypes={breadcrumbsTitle:re().string.isRequired,onBreadcrumbsTitleChange:re().func.isRequired};const cr=({canonical:e,onCanonicalChange:t})=>(0,le.jsx)(ie.LocationConsumer,{children:s=>(0,le.jsx)(dt.TextInput,{label:(0,Re.__)("Canonical URL","wordpress-seo"),id:(0,Rt.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url" /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});cr.propTypes={canonical:re().string.isRequired,onCanonicalChange:re().func.isRequired};const dr=({noIndex:e,canonical:t,onNoIndexChange:s,onCanonicalChange:i,onLoad:o,isLoading:r,editorContext:n,isBreadcrumbsDisabled:a,advanced:l=[],onAdvancedChange:d=c.noop,noFollow:p="",onNoFollowChange:u=c.noop,breadcrumbsTitle:h="",onBreadcrumbsTitleChange:g=c.noop,isPrivateBlog:m=!1})=>{(0,se.useEffect)(()=>{setTimeout(()=>{r&&o()})});const y={noIndex:e,onNoIndexChange:s,editorContext:n,isPrivateBlog:m},w={noFollow:p,onNoFollowChange:u},f={advanced:l,onAdvancedChange:d},b={breadcrumbsTitle:h,onBreadcrumbsTitleChange:g},x={canonical:t,onCanonicalChange:i};return r?null:(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(rr,{...y}),n.isPost&&(0,le.jsx)(nr,{...w}),n.isPost&&(0,le.jsx)(ar,{...f}),!a&&(0,le.jsx)(lr,{...b}),(0,le.jsx)(cr,{...x})]})};dr.propTypes={noIndex:re().string.isRequired,canonical:re().string.isRequired,onNoIndexChange:re().func.isRequired,onCanonicalChange:re().func.isRequired,onLoad:re().func.isRequired,isLoading:re().bool.isRequired,editorContext:re().object.isRequired,isBreadcrumbsDisabled:re().bool.isRequired,isPrivateBlog:re().bool,advanced:re().array,onAdvancedChange:re().func,noFollow:re().string,onNoFollowChange:re().func,breadcrumbsTitle:re().string,onBreadcrumbsTitleChange:re().func};const pr=dr,ur=(0,rt.compose)([(0,a.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:i,getBreadcrumbsTitle:o,getCanonical:r,getIsLoading:n,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:i(),breadcrumbsTitle:o(),canonical:r(),isLoading:n(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,a.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:i,setBreadcrumbsTitle:o,setCanonical:r,loadAdvancedSettingsData:n}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:i,onBreadcrumbsTitleChange:o,onCanonicalChange:r,onLoad:n}})])(pr),hr=window.yoast.relatedKeyphraseSuggestions;function gr({requestLimitReached:e,isSuccess:t,response:s,requestHasData:i,relatedKeyphrases:o}){return e?"requestLimitReached":!t&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,c.isEmpty)(e)&&"error"in e}(s)?"requestFailed":i?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function mr({keyphrase:e="",relatedKeyphrases:t=[],renderAction:s=null,requestLimitReached:i=!1,countryCode:o,setCountry:r,newRequest:n,response:a={},isRtl:l=!1,userLocale:c="en_US",isPending:d=!1,isSuccess:p=!1,requestHasData:u=!0,isPremium:h=!1,semrushUpsellLink:g="",premiumUpsellLink:m=""}){var y,w;const[f,b]=(0,se.useState)(o),x=(0,se.useCallback)(async()=>{n(o,e),b(o)},[o,e,n]);return(0,le.jsxs)(Ce.Root,{context:{isRtl:l},children:[!i&&!h&&(0,le.jsx)(hr.PremiumUpsell,{url:m,className:"yst-mb-4"}),!i&&(0,le.jsx)(hr.CountrySelector,{countryCode:o,activeCountryCode:f,onChange:r,onClick:x,className:"yst-mb-4",userLocale:c.split("_")[0]}),!d&&(0,le.jsx)(hr.UserMessage,{variant:gr({requestLimitReached:i,isSuccess:p,response:a,requestHasData:u,relatedKeyphrases:t}),upsellLink:g}),(0,le.jsx)(hr.KeyphrasesTable,{relatedKeyphrases:t,columnNames:null==a||null===(y=a.results)||void 0===y?void 0:y.columnNames,data:null==a||null===(w=a.results)||void 0===w?void 0:w.rows,isPending:d,renderButton:s,className:"yst-mt-4"})]})}mr.propTypes={keyphrase:re().string,relatedKeyphrases:re().array,renderAction:re().func,requestLimitReached:re().bool,countryCode:re().string.isRequired,setCountry:re().func.isRequired,newRequest:re().func.isRequired,response:re().object,isRtl:re().bool,userLocale:re().string,isPending:re().bool,isSuccess:re().bool,requestHasData:re().bool,isPremium:re().bool,semrushUpsellLink:re().string,premiumUpsellLink:re().string};const yr=(0,rt.compose)([(0,a.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:i,getSEMrushRequestResponse:o,getSEMrushRequestIsSuccess:r,getSEMrushIsRequestPending:n,getSEMrushRequestHasData:a,getPreference:l,getIsPremium:c,selectLinkParams:d}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:i(),response:o(),isSuccess:r(),isPending:n(),requestHasData:a(),isRtl:l("isRtl",!1),userLocale:l("userLocale","en_US"),isPremium:c(),semrushUpsellLink:(0,at.addQueryArgs)("https://yoa.st/semrush-prices",d()),premiumUpsellLink:(0,at.addQueryArgs)("https://yoa.st/413",d())}}),(0,a.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(mr),wr=Ie.forwardRef(function(e,t){return Ie.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),Ie.createElement("path",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))}),fr=ae().div` min-width: 600px; @media screen and ( max-width: 680px ) { min-width: 0; width: 86vw; } `,br=(ae().div` @media screen and ( min-width: 600px ) { max-width: 420px; } `,ae()(dt.Icon)` float: ${(0,Rt.getDirectionalStyle)("right","left")}; margin: ${(0,Rt.getDirectionalStyle)("0 0 16px 16px","0 16px 16px 0")}; && { width: 150px; height: 150px; @media screen and ( max-width: 680px ) { width: 80px; height: 80px; } } `,window.moment);var xr=s.n(br);const _r=window.wp.apiFetch;var vr=s.n(_r);async function kr(e,t,s,i=200){try{const o=await e();return!!o&&(o.status===i?t(o):s(o))}catch(e){console.error(e.message)}}async function Sr(e){try{return await vr()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function Rr(e){return(0,c.isArray)(e)||(e=[e]),await Sr({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const Tr=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:i,isDataTableVisuallyHidden:o=!0})=>e.length!==i.length?(0,le.jsx)("p",{children:(0,Re.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,le.jsx)("div",{className:o?"screen-reader-text":null,children:(0,le.jsxs)("table",{children:[(0,le.jsx)("caption",{children:s}),(0,le.jsx)("thead",{children:(0,le.jsx)("tr",{children:i.map((e,t)=>(0,le.jsx)("th",{children:e},t))})}),(0,le.jsx)("tbody",{children:(0,le.jsx)("tr",{children:e.map((e,s)=>(0,le.jsx)("td",{children:t(e.y)},s))})})]})});Tr.propTypes={data:re().arrayOf(re().shape({x:re().number,y:re().number})).isRequired,mapChartDataToTableData:re().func,dataTableCaption:re().string.isRequired,dataTableHeaderLabels:re().array.isRequired,isDataTableVisuallyHidden:re().bool};const Er=Tr,jr=({data:e,width:t,height:s,fillColor:i=null,strokeColor:o="#000000",strokeWidth:r=1,className:n="",mapChartDataToTableData:a=null,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:d=!0})=>{const p=Math.max(1,Math.max(...e.map(e=>e.x))),u=Math.max(1,Math.max(...e.map(e=>e.y))),h=s-r,g=e.map(e=>`${e.x/p*t},${h-e.y/u*h+r}`).join(" "),m=`0,${h+r} `+g+` ${t},${h+r}`;return(0,le.jsxs)(se.Fragment,{children:[(0,le.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:n,role:"img","aria-hidden":"true",focusable:"false",children:[(0,le.jsx)("polygon",{fill:i,points:m}),(0,le.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:r,strokeLinejoin:"round",strokeLinecap:"round",points:g})]}),a&&(0,le.jsx)(Er,{data:e,mapChartDataToTableData:a,dataTableCaption:l,dataTableHeaderLabels:c,isDataTableVisuallyHidden:d})]})};jr.propTypes={data:re().arrayOf(re().shape({x:re().number,y:re().number})).isRequired,width:re().number.isRequired,height:re().number.isRequired,fillColor:re().string,strokeColor:re().string,strokeWidth:re().number,className:re().string,mapChartDataToTableData:re().func,dataTableCaption:re().string.isRequired,dataTableHeaderLabels:re().array.isRequired,isDataTableVisuallyHidden:re().bool};const Cr=jr,Ir=()=>(0,le.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,Re.__)("Tracking the ranking position…","wordpress-seo")," ",(0,le.jsx)(dt.SvgIcon,{icon:"loading-spinner"})]}),Lr=ae()(dt.SvgIcon)` margin-left: 2px; flex-shrink: 0; rotate: ${e=>e.isImproving?"-90deg":"90deg"}; `,Ar=ae().span` color: ${e=>e.isImproving?"#69AB56":"#DC3332"}; font-size: 13px; font-weight: 600; line-height: 20px; margin-right: 2px; margin-left: 12px; `,Pr=ae().td` padding-right: 0 !important; & > div { margin: 0px; } `,Dr=ae().td` padding-left: 2px !important; `,Fr=ae().td.attrs({className:"yoast-table--nopadding"})` & > div { justify-content: center; } `,Mr=ae().div` display: flex; align-items: center; & > a { box-sizing: border-box; } `,Or=ae().button` background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit; display: flex; align-items: center; `,qr=ae().tr` background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important; `;function Nr(e){return Math.round(100*e)}function Ur({chartData:e={}}){if((0,c.isEmpty)(e)||(0,c.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,Re.sprintf)((0,Re._n)("%d day","%d days",e,"wordpress-seo"),e))}(e),s=e.position.history.map((e,t)=>({x:t,y:31-e.value}));return(0,le.jsx)(Cr,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:Nr,dataTableCaption:(0,Re.__)("Keyphrase position in the last 90 days on a scale from 0 to 30.","wordpress-seo"),dataTableHeaderLabels:t})}function Wr({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:i}){return i?(0,le.jsx)(dt.SvgIcon,{icon:"loading-spinner"}):(0,le.jsx)(dt.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function $r(e){return!e||!e.position||e.position.value>30?"> 30":e.position.value}Ur.propTypes={chartData:re().object};const Br=({rowData:e={}})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,le.jsx)(Ur,{chartData:e});const s=e.position.change<0;return(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(Ur,{chartData:e}),(0,le.jsx)(Ar,{isImproving:s,children:Math.abs(e.position.change)}),(0,le.jsx)(Lr,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s})]})};function Kr({rowData:e,websiteId:t,keyphrase:s,onSelectKeyphrases:i}){const o=(0,se.useCallback)(()=>{i([s])},[i,s]),r=!(0,c.isEmpty)(e),n=e&&e.updated_at&&xr()(e.updated_at)>=xr()().subtract(7,"days"),a=e?`https://app.wincher.com/websites/${t}/keywords?serp=${e.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return r?n?(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)("td",{children:(0,le.jsxs)(Mr,{children:[$r(e),(0,le.jsx)(dt.ButtonStyledLink,{variant:"secondary",href:a,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,Re.__)("View","wordpress-seo")})]})}),(0,le.jsx)("td",{className:"yoast-table--nopadding",children:(0,le.jsx)(Or,{type:"button",onClick:o,children:(0,le.jsx)(Br,{rowData:e})})}),(0,le.jsx)("td",{children:(l=e.updated_at,xr()(l).fromNow())})]}):(0,le.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,le.jsx)(Ir,{})}):(0,le.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,le.jsx)("i",{children:(0,Re.__)("Activate tracking to show the ranking position","wordpress-seo")})});var l}function Hr({keyphrase:e,rowData:t={},onTrackKeyphrase:s=c.noop,onUntrackKeyphrase:i=c.noop,isFocusKeyphrase:o=!1,isDisabled:r=!1,isLoading:n=!1,websiteId:a="",isSelected:l,onSelectKeyphrases:d}){var p;const u=!(0,c.isEmpty)(t),h=!(0,c.isEmpty)(null==t||null===(p=t.position)||void 0===p?void 0:p.history),g=(0,se.useCallback)(()=>{r||(u?i(e,t.id):s(e))},[e,s,i,u,t,r]),m=(0,se.useCallback)(()=>{d(t=>l?t.filter(t=>t!==e):t.concat(e))},[d,l,e]);return(0,le.jsxs)(qr,{isEnabled:u,children:[(0,le.jsx)(Pr,{children:h&&(0,le.jsx)(dt.Checkbox,{id:"select-"+e,onChange:m,checked:l,label:""})}),(0,le.jsxs)(Dr,{children:[e,o&&(0,le.jsx)("span",{children:"*"})]}),Kr({rowData:t,websiteId:a,keyphrase:e,onSelectKeyphrases:d}),(0,le.jsx)(Fr,{children:Wr({keyphrase:e,isEnabled:u,toggleAction:g,isLoading:n})})]})}Br.propTypes={rowData:re().object},Hr.propTypes={rowData:re().object,keyphrase:re().string.isRequired,onTrackKeyphrase:re().func,onUntrackKeyphrase:re().func,isFocusKeyphrase:re().bool,isDisabled:re().bool,isLoading:re().bool,websiteId:re().string,isSelected:re().bool.isRequired,onSelectKeyphrases:re().func.isRequired};const Vr=(0,Rt.makeOutboundLink)(),Yr=ae().span` display: block; font-style: italic; @media (min-width: 782px) { display: inline; position: absolute; ${(0,Rt.getDirectionalStyle)("right","left")}: 8px; } `,zr=ae().div` width: 100%; overflow-y: auto; `,Gr=ae().th` pointer-events: ${e=>e.isDisabled?"none":"initial"}; padding-right: 0 !important; & > div { margin: 0px; } `,Zr=ae().th` padding-left: 2px !important; `,Qr=e=>{const t=(0,se.useRef)();return(0,se.useEffect)(()=>{t.current=e}),t.current},Xr=(0,c.debounce)(async function(e=null,t=null,s=null,i){return await Sr({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:i})},500,{leading:!0}),Jr=({addTrackedKeyphrase:e,isLoggedIn:t=!1,isNewlyAuthenticated:s=!1,keyphrases:i=[],newRequest:o,removeTrackedKeyphrase:r,setRequestFailed:n,setKeyphraseLimitReached:a,setRequestSucceeded:l,setTrackedKeyphrases:d,setHasTrackedAll:p,trackAll:u=!1,trackedKeyphrases:h=null,websiteId:g="",permalink:m,focusKeyphrase:y="",startAt:w=null,selectedKeyphrases:f,onSelectKeyphrases:b})=>{const x=(0,se.useRef)(),_=(0,se.useRef)(),v=(0,se.useRef)(!1),[k,S]=(0,se.useState)([]),R=(0,se.useCallback)(e=>{const t=e.toLowerCase();return h&&!(0,c.isEmpty)(h)&&h.hasOwnProperty(t)?h[t]:null},[h]),T=(0,se.useMemo)(()=>async()=>{await kr(()=>(_.current&&_.current.abort(),_.current="undefined"==typeof AbortController?null:new AbortController,Xr(i,w,m,_.current.signal)),e=>{l(e),d(e.results)},e=>{n(e)})},[l,n,d,i,m,w]),E=(0,se.useCallback)(async t=>{const s=(Array.isArray(t)?t:[t]).map(e=>e.toLowerCase());S(e=>[...e,...s]),await kr(()=>Rr(s),t=>{l(t),e(t.results),T()},e=>{400===e.status&&e.limit&&a(e.limit),n(e)},201),S(e=>(0,c.without)(e,...s))},[l,n,a,e,T]),j=(0,se.useCallback)(async(e,t)=>{e=e.toLowerCase(),S(t=>[...t,e]),await kr(()=>async function(e){return await Sr({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t),t=>{l(t),r(e)},e=>{n(e)}),S(t=>(0,c.without)(t,e))},[l,r,n]),C=(0,se.useCallback)(async e=>{o(),await E(e)},[o,E]),I=Qr(m),L=Qr(i),A=Qr(w),P=m&&w;(0,se.useEffect)(()=>{t&&P&&(m!==I||(0,c.difference)(i,L).length||w!==A)&&T()},[t,m,I,i,L,T,P,w,A]),(0,se.useEffect)(()=>{if(t&&u&&null!==h){const e=i.filter(e=>!R(e));e.length&&E(e),p()}},[t,u,h,E,p,R,i]),(0,se.useEffect)(()=>{s&&!v.current&&(T(),v.current=!0)},[s,T]),(0,se.useEffect)(()=>{if(t&&!(0,c.isEmpty)(h))return(0,c.filter)(h,e=>(0,c.isEmpty)(e.updated_at)).length>0&&(x.current=setInterval(()=>{T()},1e4)),()=>{clearInterval(x.current)}},[t,h,T]);const D=t&&null===h,F=(0,se.useMemo)(()=>(0,c.isEmpty)(h)?[]:Object.values(h).filter(e=>{var t;return!(0,c.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[h]),M=(0,se.useMemo)(()=>f.length>0&&F.length>0&&F.every(e=>f.includes(e)),[f,F]),O=(0,se.useCallback)(()=>{b(M?[]:F)},[b,M,F]),q=(0,se.useMemo)(()=>(0,c.orderBy)(i,[e=>Object.values(h||{}).map(e=>e.keyword).includes(e)],["desc"]),[i,h]);return i&&!(0,c.isEmpty)(i)&&(0,le.jsxs)(se.Fragment,{children:[(0,le.jsx)(zr,{children:(0,le.jsxs)("table",{className:"yoast yoast-table",children:[(0,le.jsx)("thead",{children:(0,le.jsxs)("tr",{children:[(0,le.jsx)(Gr,{isDisabled:0===F.length,children:(0,le.jsx)(dt.Checkbox,{id:"select-all",onChange:O,checked:M,label:""})}),(0,le.jsx)(Zr,{scope:"col",abbr:(0,Re.__)("Keyphrase","wordpress-seo"),children:(0,Re.__)("Keyphrase","wordpress-seo")}),(0,le.jsx)("th",{scope:"col",abbr:(0,Re.__)("Position","wordpress-seo"),children:(0,Re.__)("Position","wordpress-seo")}),(0,le.jsx)("th",{scope:"col",abbr:(0,Re.__)("Position over time","wordpress-seo"),children:(0,Re.__)("Position over time","wordpress-seo")}),(0,le.jsx)("th",{scope:"col",abbr:(0,Re.__)("Last updated","wordpress-seo"),children:(0,Re.__)("Last updated","wordpress-seo")}),(0,le.jsx)("th",{scope:"col",abbr:(0,Re.__)("Tracking","wordpress-seo"),children:(0,Re.__)("Tracking","wordpress-seo")})]})}),(0,le.jsx)("tbody",{children:q.map((e,s)=>(0,le.jsx)(Hr,{keyphrase:e,onTrackKeyphrase:C,onUntrackKeyphrase:j,rowData:R(e),isFocusKeyphrase:e===y.trim().toLowerCase(),websiteId:g,isDisabled:!t,isLoading:D||k.indexOf(e.toLowerCase())>=0,isSelected:f.includes(e),onSelectKeyphrases:b},`trackable-keyphrase-${s}`))})]})}),(0,le.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,le.jsx)(Vr,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,Re.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */ (0,Re.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,le.jsx)(Yr,{children:(0,Re.__)("* focus keyphrase","wordpress-seo")})]})]})};Jr.propTypes={addTrackedKeyphrase:re().func.isRequired,isLoggedIn:re().bool,isNewlyAuthenticated:re().bool,keyphrases:re().array,newRequest:re().func.isRequired,removeTrackedKeyphrase:re().func.isRequired,setRequestFailed:re().func.isRequired,setKeyphraseLimitReached:re().func.isRequired,setRequestSucceeded:re().func.isRequired,setTrackedKeyphrases:re().func.isRequired,setHasTrackedAll:re().func.isRequired,trackAll:re().bool,trackedKeyphrases:re().object,websiteId:re().string,permalink:re().string.isRequired,focusKeyphrase:re().string,startAt:re().string,selectedKeyphrases:re().arrayOf(re().string).isRequired,onSelectKeyphrases:re().func.isRequired};const en=Jr,tn=(0,rt.compose)([(0,a.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:i,getWincherPermalink:o,getFocusKeyphrase:r,isWincherNewlyAuthenticated:n,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:r(),keyphrases:s(),isLoggedIn:i(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:n(),permalink:o()}}),(0,a.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:r,setWincherTrackingForKeyphrase:n,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{n(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{r(e)},setHasTrackedAll:()=>{a(!1)}}})])(en);class sn{constructor(e,t={},s={}){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:""},s),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:s}=this.options,i=["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,s,i.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:i}=e;i===this.origin&&this.popup===s&&(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()}}const on=()=>(0,le.jsx)(dt.Alert,{type:"info",children:(0,Re.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,Re.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")}),rn=()=>(0,le.jsx)(dt.Alert,{type:"success",children:(0,Re.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,Re.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),nn=()=>(0,le.jsx)(dt.Alert,{type:"info",children:(0,Re.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */ (0,Re.__)("%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")}),an=(0,Rt.makeOutboundLink)(),ln=(0,Rt.makeOutboundLink)(),cn=()=>{const e=(0,Re.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ /* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ (0,Re.__)("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(0,le.jsx)("p",{children:Ae(e,{wincherLink:(0,le.jsx)(an,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,le.jsx)(ln,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,Re.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})})})},dn=(0,Rt.makeOutboundLink)(),pn=({limit:e=10})=>{const t=(0,Re.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ /* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ (0,Re.__)("You've reached the maximum amount of %1$d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %2$s.","wordpress-seo"),e,"<UpdateWincherPlanLink/>");return(0,le.jsx)(dt.Alert,{type:"error",children:Ae(t,{UpdateWincherPlanLink:(0,le.jsx)(dn,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,Re.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */ (0,Re.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})})})};pn.propTypes={limit:re().number};const un=pn,hn=()=>(0,le.jsx)(dt.Alert,{type:"error",children:(0,Re.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),gn=()=>(0,le.jsx)(dt.Alert,{type:"error",children:(0,Re.__)("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")}),mn=({onReconnect:e,className:t=""})=>{const s=(0,Re.sprintf)(/* translators: %s expands to a link to open the Wincher login popup. */ /* translators: %s expands to a link to open the Wincher login popup. */ (0,Re.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"<reconnectToWincher/>","Wincher");return(0,le.jsx)(dt.Alert,{type:"error",className:t,children:Ae(s,{reconnectToWincher:(0,le.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e()},children:(0,Re.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */ (0,Re.__)("reconnect to %s","wordpress-seo"),"Wincher")})})})};mn.propTypes={onReconnect:re().func.isRequired,className:re().string};const yn=mn,wn=()=>(0,le.jsx)(dt.Alert,{type:"error",children:(0,Re.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),fn=ae().p` color: ${Li.colors.$color_pink_dark}; font-size: 14px; font-weight: 700; margin: 13px 0 10px; `,bn=ae()(dt.SvgIcon)` margin-right: 5px; vertical-align: middle; `,xn=ae().button` position: absolute; top: 9px; right: 9px; border: none; background: none; cursor: pointer; `,vn=ae().p` font-size: 13px; font-weight: 500; margin: 10px 0 13px; `,kn=ae().div` position: relative; background: ${e=>e.isTitleShortened?"#f5f7f7":"transparent"}; border: 1px solid #c7c7c7; border-left: 4px solid${Li.colors.$color_pink_dark}; padding: 0 16px; margin-bottom: 1.5em; `,Sn=({limit:e,usage:t,isTitleShortened:s=!1,isFreeAccount:i=!1})=>{const o=(0,Re.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,Re.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),r=(0,Re.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,Re.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),n=i?o:r,a=(0,Re.sprintf)( /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ /* Translators: %1$s expands to the number of used keywords. * %2$s expands to the account keywords limit. */ (0,Re.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),l=s?a:n;return(0,le.jsxs)(fn,{children:[s&&(0,le.jsx)(bn,{icon:"exclamation-triangle",color:Li.colors.$color_pink_dark,size:"14px"}),l]})};Sn.propTypes={limit:re().number.isRequired,usage:re().number.isRequired,isTitleShortened:re().bool,isFreeAccount:re().bool};const Rn=(0,Rt.makeOutboundLink)(),Tn=({discount:e,months:t})=>{const s=(0,le.jsx)(Rn,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(0,Re.sprintf)(/* Translators: %s : Expands to "Wincher". */ /* Translators: %s : Expands to "Wincher". */ (0,Re.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher")});if(!e||!t)return(0,le.jsx)(vn,{children:s});const i=100*e,o=(0,Re.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. */ /* 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. */ (0,Re.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",i+"%",t);return(0,le.jsx)(vn,{children:Ae(o,{wincherAccountUpgradeLink:s})})};Tn.propTypes={discount:re().number,months:re().number};const En=({onClose:e=null,isTitleShortened:t=!1,trackingInfo:s=null})=>{const i=(()=>{const[e,t]=(0,se.useState)(null);return(0,se.useEffect)(()=>{e||async function(){return await Sr({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then(e=>t(e))},[e]),e})();if(null===s)return null;const{limit:o,usage:r}=s;if(!(o&&r/o>=.8))return null;const n=Boolean(null==i?void 0:i.discount);return(0,le.jsxs)(kn,{isTitleShortened:t,children:[e&&(0,le.jsx)(xn,{type:"button","aria-label":(0,Re.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,le.jsx)(dt.SvgIcon,{icon:"times-circle",color:Li.colors.$color_pink_dark,size:"14px"})}),(0,le.jsx)(Sn,{...s,isTitleShortened:t,isFreeAccount:n}),(0,le.jsx)(Tn,{discount:null==i?void 0:i.discount,months:null==i?void 0:i.months})]})};En.propTypes={onClose:re().func,isTitleShortened:re().bool,trackingInfo:re().object};const jn=En,Cn=window.yoast["chart.js"],In="label";function Ln(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function An(e,t){e.labels=t}function Pn(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:In;const i=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!i.includes(o)?(i.push(o),Object.assign(o,t),o):{...t}})}function Dn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:In;const s={labels:[],datasets:[]};return An(s,e.labels),Pn(s,e.datasets,t),s}function Fn(e,t){const{height:s=150,width:i=300,redraw:o=!1,datasetIdKey:r,type:n,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:p,...u}=e,h=(0,Ie.useRef)(null),g=(0,Ie.useRef)(),m=()=>{h.current&&(g.current=new Cn.Chart(h.current,{type:n,data:Dn(a,r),options:l&&{...l},plugins:c}),Ln(t,g.current))},y=()=>{Ln(t,null),g.current&&(g.current.destroy(),g.current=null)};return(0,Ie.useEffect)(()=>{!o&&g.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(g.current,l)},[o,l]),(0,Ie.useEffect)(()=>{!o&&g.current&&An(g.current.config.data,a.labels)},[o,a.labels]),(0,Ie.useEffect)(()=>{!o&&g.current&&a.datasets&&Pn(g.current.config.data,a.datasets,r)},[o,a.datasets]),(0,Ie.useEffect)(()=>{g.current&&(o?(y(),setTimeout(m)):g.current.update(p))},[o,l,a.labels,a.datasets,p]),(0,Ie.useEffect)(()=>{g.current&&(y(),setTimeout(m))},[n]),(0,Ie.useEffect)(()=>(m(),()=>y()),[]),Ie.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:i},u),d)}const Mn=(0,Ie.forwardRef)(Fn);function On(e,t){return Cn.Chart.register(t),(0,Ie.forwardRef)((t,s)=>Ie.createElement(Mn,Object.assign({},t,{ref:s,type:e})))}const qn=On("line",Cn.LineController),Nn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Cn._adapters._date.override("function"==typeof xr()?{_id:"moment",formats:function(){return Nn},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=xr()(e,t):e instanceof xr()||(e=xr()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return xr()(e).format(t)},add:function(e,t,s){return xr()(e).add(t,s).valueOf()},diff:function(e,t,s){return xr()(e).diff(xr()(t),s)},startOf:function(e,t,s){return e=xr()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return xr()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const Un=["top","right","bottom","left"];function Wn(e,t,s){const i={};s=s?"-"+s:"";for(let o=0;o<4;o++){const r=Un[o];i[r]=parseFloat(e[t+"-"+r+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),Cn.Chart.register(Cn.CategoryScale,Cn.LineController,Cn.LineElement,Cn.PointElement,Cn.LinearScale,Cn.TimeScale,Cn.Legend,Cn.Tooltip);const $n=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function Bn({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const i=(0,se.useMemo)(()=>Object.fromEntries([...s].sort().map((e,t)=>[e,$n[t%$n.length]])),[s]),o=e.map(e=>{const t=i[e.label];return{...e,data:e.data.map(({datetime:e,value:t})=>({x:e,y:t})),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}}).filter(e=>!1!==e.selected);return(0,le.jsx)(qn,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:c.noop},tooltip:{enabled:!0,callbacks:{title:e=>xr()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:31}}}})}Cn.Interaction.modes.xPoint=(e,t,s,i)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),r="border-box"===o.boxSizing,n=Wn(o,"padding"),a=Wn(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:o,offsetY:r}=i;let n,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,r,e.target))n=o,a=r;else{const e=t.getBoundingClientRect();n=i.clientX-e.left,a=i.clientY-e.top,l=!0}return{x:n,y:a,box:l}}(e,s),p=n.left+(d&&a.left),u=n.top+(d&&a.top);var h;let{width:g,height:m}=t;return r&&(g-=n.width+a.width,m-=n.height+a.height),{x:Math.round((l-p)/g*s.width/i),y:Math.round((c-u)/m*s.height/i)}}(t,e);let r=[];if(Cn.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,i)&&r.push({element:e,datasetIndex:t,index:s})}),0===r.length)return r;const n=r.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return r=r.filter(e=>e.element.x===n),r.some(e=>Math.abs(e.element.y-o.y)<10)?r:[]},Bn.propTypes={datasets:re().arrayOf(re().shape({label:re().string.isRequired,data:re().arrayOf(re().shape({datetime:re().string.isRequired,value:re().number.isRequired})).isRequired,selected:re().bool})).isRequired,isChartShown:re().bool.isRequired,keyphrases:re().array.isRequired};const Kn=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,le.jsx)(yn,{onReconnect:t}):(0,le.jsx)(wn,{});Kn.propTypes={response:re().object.isRequired,onLogin:re().func.isRequired};const Hn=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:i,keyphraseLimitReached:o,limit:r})=>o?(0,le.jsx)(un,{limit:r}):(0,c.isEmpty)(t)||e?s?(0,le.jsx)(nn,{}):null:(0,le.jsx)(Kn,{response:t,onLogin:i});Hn.propTypes={isSuccess:re().bool.isRequired,allKeyphrasesMissRanking:re().bool.isRequired,response:re().object,onLogin:re().func.isRequired,keyphraseLimitReached:re().bool.isRequired,limit:re().number.isRequired};let Vn=null;const Yn=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r})=>{if(Vn&&!Vn.isClosed())return void Vn.focus();const{url:n}=await async function(){return await Sr({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();Vn=new sn(n,{success:{type:"wincher:oauth:success",callback:n=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)=>{await kr(()=>async function(e){const{code:t,websiteId:s}=e;return await Sr({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(n),async a=>{e(!0,!0,n.websiteId.toString()),t(a);const l=(Array.isArray(i)?i:[i]).map(e=>e.toLowerCase());await kr(()=>Rr(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&r(e.limit),s(e)},201);const c=Vn.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),Vn.createPopup()},zn=e=>e.isLoggedIn?null:(0,le.jsx)("p",{children:(0,le.jsx)(dt.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,Re.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */ (0,Re.__)("Connect with %s","wordpress-seo"),"Wincher")})});zn.propTypes={isLoggedIn:re().bool.isRequired,onLogin:re().func.isRequired};const Gn=ae().div` p { margin: 1em 0; } `,Zn=ae().div` ${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"}; `,Qn=ae().div` font-weight: var(--yoast-font-weight-bold); color: var(--yoast-color-label); font-size: var(--yoast-font-size-default); `,Xn=ae().div.attrs({className:"yoast-field-group"})` display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; `,Jn=ae().div` margin: 8px 0; `,ea=xr().utc().startOf("day"),ta=[{name:(0,Re.__)("Last day","wordpress-seo"),value:xr()(ea).subtract(1,"days").format(),defaultIndex:1},{name:(0,Re.__)("Last week","wordpress-seo"),value:xr()(ea).subtract(1,"week").format(),defaultIndex:2},{name:(0,Re.__)("Last month","wordpress-seo"),value:xr()(ea).subtract(1,"month").format(),defaultIndex:3},{name:(0,Re.__)("Last year","wordpress-seo"),value:xr()(ea).subtract(1,"year").format(),defaultIndex:0}],sa=({onSelect:e,selected:t=null,options:s,isLoggedIn:i})=>i?s.length<1?null:(0,le.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==t?void 0:t.value)||s[0].value,onChange:e,children:s.map(e=>(0,le.jsx)("option",{value:e.value,children:e.name},e.name))}):null;sa.propTypes={onSelect:re().func.isRequired,selected:re().object,options:re().array.isRequired,isLoggedIn:re().bool.isRequired};const ia=({trackedKeyphrases:e=null,isLoggedIn:t,keyphrases:s,shouldTrackAll:i,permalink:o,historyDaysLimit:r=0})=>{if(!o&&t)return(0,le.jsx)(gn,{});if(0===s.length)return(0,le.jsx)(hn,{});const n=xr()(ea).subtract(r,"days"),a=ta.filter(e=>xr()(e.value).isSameOrAfter(n)),l=(0,c.orderBy)(a,e=>e.defaultIndex,"desc")[0],[d,p]=(0,se.useState)(l),[u,h]=(0,se.useState)([]),g=u.length>0,m=(0,rt.usePrevious)(e);(0,se.useEffect)(()=>{if(!(0,c.isEmpty)(e)&&(0,c.difference)(Object.keys(e),Object.keys(m||[])).length){const t=Object.values(e).map(e=>e.keyword);h(t)}},[e,m]),(0,se.useEffect)(()=>{p(l)},[null==l?void 0:l.name]);const y=(0,se.useCallback)(e=>{const t=ta.find(t=>t.value===e.target.value);t&&p(t)},[p]),w=(0,se.useMemo)(()=>(0,c.isEmpty)(u)||(0,c.isEmpty)(e)?[]:Object.values(e).filter(e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)}).map(e=>{var t;return{label:e.keyword,data:e.position.history,selected:u.includes(e.keyword)&&!(0,c.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[u,e]);return(0,le.jsxs)(Zn,{isDisabled:!t,children:[(0,le.jsx)("p",{children:(0,Re.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),t&&i&&(0,le.jsx)(on,{}),(0,le.jsx)(Xn,{children:(0,le.jsx)(sa,{selected:d,onSelect:y,options:a,isLoggedIn:t})}),(0,le.jsx)(Jn,{children:(0,le.jsx)(Bn,{isChartShown:g,datasets:w,keyphrases:s})}),(0,le.jsx)(tn,{startAt:null==d?void 0:d.value,selectedKeyphrases:u,onSelectKeyphrases:h,trackedKeyphrases:e})]})};function oa({trackedKeyphrases:e=null,addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:i=!1,keyphrases:o=[],response:r={},shouldTrackAll:n=!1,permalink:a="",allKeyphrasesMissRanking:l,isSuccess:c,keyphraseLimitReached:d,limit:p,setRequestSucceeded:u,setRequestFailed:h,setKeyphraseLimitReached:g,onAuthentication:m}){const y=(0,se.useCallback)(()=>{Yn({onAuthentication:m,setRequestSucceeded:u,setRequestFailed:h,keyphrases:o,addTrackedKeyphrase:t,setKeyphraseLimitReached:g})},[Yn,m,u,h,o,t,g]),w=(e=>{const[t,s]=(0,se.useState)(null);return(0,se.useEffect)(()=>{e&&!t&&async function(){return await Sr({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then(e=>s(e))},[t]),t})(s);return(0,le.jsxs)(Gn,{children:[i&&(0,le.jsx)(rn,{}),s&&(0,le.jsx)(jn,{trackingInfo:w}),(0,le.jsxs)(Qn,{children:[(0,Re.__)("SEO performance","wordpress-seo"),(0,le.jsx)(dt.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"] /* translators: Hidden accessibility text. */,linkText:(0,Re.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,le.jsx)(cn,{}),(0,le.jsx)(zn,{isLoggedIn:s,onLogin:y}),(0,le.jsx)(Hn,{isSuccess:c,response:r,allKeyphrasesMissRanking:l,keyphraseLimitReached:d,limit:p,onLogin:y}),(0,le.jsx)(ia,{trackedKeyphrases:e,isLoggedIn:s,keyphrases:o,shouldTrackAll:n,permalink:a,historyDaysLimit:(null==w?void 0:w.historyDays)||31})]})}ia.propTypes={trackedKeyphrases:re().object,keyphrases:re().array.isRequired,isLoggedIn:re().bool.isRequired,shouldTrackAll:re().bool.isRequired,permalink:re().string.isRequired,historyDaysLimit:re().number},oa.propTypes={trackedKeyphrases:re().object,addTrackedKeyphrase:re().func.isRequired,isLoggedIn:re().bool,isNewlyAuthenticated:re().bool,keyphrases:re().array,response:re().object,shouldTrackAll:re().bool,permalink:re().string,allKeyphrasesMissRanking:re().bool.isRequired,isSuccess:re().bool.isRequired,keyphraseLimitReached:re().bool.isRequired,limit:re().number.isRequired,setRequestSucceeded:re().func.isRequired,setRequestFailed:re().func.isRequired,setKeyphraseLimitReached:re().func.isRequired,onAuthentication:re().func.isRequired};const ra=(0,rt.compose)([(0,a.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:i,getWincherLoginStatus:o,getWincherRequestIsSuccess:r,getWincherRequestResponse:n,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:p}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:r(),keyphraseLimitReached:s(),limit:i(),response:n(),shouldTrackAll:p(),permalink:d()}}),(0,a.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:r,setWincherLoginStatus:n}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{r(e)},onAuthentication:(e,s,i)=>{t(i),n(e,s)}}})])(oa),na=ae()(wr)` width: 18px; height: 18px; margin: 3px; `;function aa({keyphrases:e,onNoKeyphraseSet:t,onOpen:s,location:i}){if(!e.length){let e=document.querySelector("#focus-keyword-input-metabox");return e||(e=document.querySelector("#focus-keyword-input-sidebar")),e.focus(),void t()}s(i)}function la({location:e="",whichModalOpen:t="none",shouldCloseOnClickOutside:s=!0,keyphrases:i,onNoKeyphraseSet:o,onOpen:r,onClose:n}){const a=(0,se.useCallback)(()=>{aa({keyphrases:i,onNoKeyphraseSet:o,onOpen:r,location:e})},[aa,i,o,r,e]),l=(0,Re.__)("Track SEO performance","wordpress-seo"),c=Ps();return(0,le.jsxs)(se.Fragment,{children:[t===e&&(0,le.jsx)(Fs,{title:l,onRequestClose:n,icon:(0,le.jsx)(yt,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:s,children:(0,le.jsx)(fr,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,le.jsx)(ra,{})})}),"sidebar"===e&&(0,le.jsx)(ut,{id:`wincher-open-button-${e}`,title:l,SuffixHeroIcon:(0,le.jsx)(na,{className:"yst-text-slate-500",...c}),onClick:a}),"metabox"===e&&(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsxs)(ct,{id:`wincher-open-button-${e}`,onClick:a,children:[(0,le.jsx)(ct.Text,{children:l}),(0,le.jsx)(wr,{className:"yst-h-5 yst-w-5 yst-text-slate-500",...c})]})})]})}la.propTypes={location:re().string,whichModalOpen:re().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:re().bool,keyphrases:re().array.isRequired,onNoKeyphraseSet:re().func.isRequired,onOpen:re().func.isRequired,onClose:re().func.isRequired};const ca=(0,rt.compose)([(0,a.withSelect)(e=>{const{getWincherModalOpen:t,getWincherTrackableKeyphrases:s}=e("yoast-seo/editor");return{keyphrases:s(),whichModalOpen:t()}}),(0,a.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherDismissModal:s,setWincherNoKeyphrase:i}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{i()}}})])(la),da=({isOpen:e,closeModal:t,id:s,upsellLink:i})=>(0,le.jsx)(ft,{isOpen:e,onClose:t,id:s,upsellLink:i,title:(0,Re.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,Re.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,Re.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,Re.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),pa=()=>{const[e,,,t,s]=(0,Ce.useToggleState)(!1),i=(0,se.useContext)(ie.LocationContext),{locationContext:o}=(0,ie.useRootContext)(),r=(0,Ce.useSvgAria)(),n=wpseoAdminL10n["sidebar"===i.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(da,{isOpen:e,closeModal:s,upsellLink:(0,at.addQueryArgs)(n,{context:o}),id:`yoast-additional-keyphrases-modal-${i}`}),"sidebar"===i&&(0,le.jsx)(ut,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,Re.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:Li.colors.$color_grey_medium_dark},onClick:t,children:(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsx)(Ce.Badge,{size:"small",variant:"upsell",children:(0,le.jsx)(nt,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...r})})})}),"metabox"===i&&(0,le.jsx)("div",{className:"yst-root",children:(0,le.jsxs)(ct,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:t,children:[(0,le.jsx)(dt.SvgIcon,{icon:"plus",color:Li.colors.$color_grey_medium_dark}),(0,le.jsx)(ct.Text,{children:(0,Re.__)("Add related keyphrase","wordpress-seo")}),(0,le.jsxs)(Ce.Badge,{size:"small",variant:"upsell",children:[(0,le.jsx)(nt,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...r}),(0,le.jsx)("span",{children:"Premium"})]})]})})]})};function ua({isLoading:e,onLoad:t,settings:s}){const i=(({webinarIntroUrl:e})=>{const{shouldShow:t}=Lt(),s=(e=>{for(const t of e)if(null!=t&&t.getIsEligible())return t;return null})([{getIsEligible:()=>t,component:Pt},{getIsEligible:Ls,component:()=>(0,le.jsx)(Is,{hasIcon:!1,image:null,url:e})},{getIsEligible:()=>!0,component:()=>(0,le.jsx)(St,{})}]);return(null==s?void 0:s.component)||null})({webinarIntroUrl:(0,a.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/webinar-intro-elementor"),[])});return(0,se.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,le.jsx)(le.Fragment,{children:(0,le.jsxs)(te.Fill,{name:"YoastElementor",children:[(0,le.jsxs)(ni,{renderPriority:1,children:[(0,le.jsx)(oi,{}),i&&(0,le.jsx)("div",{className:"yst-inline-block yst-px-1.5",children:(0,le.jsx)(i,{})})]}),s.isKeywordAnalysisActive&&(0,le.jsxs)(ni,{renderPriority:8,children:[(0,le.jsx)(xt.KeywordInput,{isSEMrushIntegrationActive:s.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,le.jsx)(te.Fill,{name:"YoastRelatedKeyphrases",children:(0,le.jsx)(yr,{})})]}),s.isKeywordAnalysisActive&&(0,le.jsx)(ni,{renderPriority:10,children:(0,le.jsx)(se.Fragment,{children:(0,le.jsx)(xt.SeoAnalysis,{shouldUpsell:s.shouldUpsell,shouldUpsellHighlighting:s.shouldUpsell})})}),s.isContentAnalysisActive&&(0,le.jsx)(ni,{renderPriority:15,children:(0,le.jsx)(xt.ReadabilityAnalysis,{shouldUpsell:s.shouldUpsell,shouldUpsellHighlighting:s.shouldUpsell})}),s.isInclusiveLanguageAnalysisActive&&(0,le.jsx)(ni,{renderPriority:19,children:(0,le.jsx)(xt.InclusiveLanguageAnalysis,{shouldUpsellHighlighting:s.shouldUpsell})}),s.isKeywordAnalysisActive&&(0,le.jsx)(ni,{renderPriority:22,children:s.shouldUpsell&&(0,le.jsx)(pa,{})},"additional-keywords-upsell"),s.isKeywordAnalysisActive&&s.isWincherIntegrationActive&&(0,le.jsx)(ni,{renderPriority:23,children:(0,le.jsx)(ca,{location:"sidebar",shouldCloseOnClickOutside:!1})},"wincher-seo-performance"),s.shouldUpsell&&(0,le.jsx)(ni,{renderPriority:24,children:(0,le.jsx)(bt,{})},"internal-linking-suggestions-upsell"),(0,le.jsx)(ni,{renderPriority:25,children:(0,le.jsx)(Ri,{})}),(s.useOpenGraphData||s.useTwitterData)&&(0,le.jsx)(ni,{renderPriority:26,children:(0,le.jsx)($o,{useOpenGraphData:s.useOpenGraphData,useTwitterData:s.useTwitterData})},"social-appearance"),s.displaySchemaSettings&&(0,le.jsx)(ni,{renderPriority:28,children:(0,le.jsx)(Ko,{title:(0,Re.__)("Schema","wordpress-seo"),children:(0,le.jsx)(or,{})})}),s.displayAdvancedTab&&(0,le.jsx)(ni,{renderPriority:29,children:(0,le.jsx)(Ko,{title:(0,Re.__)("Advanced","wordpress-seo"),buttonId:"yoast-seo-elementor-advanced-button",children:(0,le.jsx)(ur,{location:"sidebar"})})}),s.isCornerstoneActive&&(0,le.jsx)(ni,{renderPriority:30,children:(0,le.jsx)(vt,{})}),s.isInsightsEnabled&&(0,le.jsx)(ni,{renderPriority:32,children:(0,le.jsx)(si,{location:"elementor"})})]})})}ua.propTypes={isLoading:re().bool.isRequired,onLoad:re().func.isRequired,settings:re().object.isRequired};const ha=(0,rt.compose)([(0,a.withSelect)(e=>{const{getPreferences:t,getSnippetEditorIsLoading:s}=e("yoast-seo/editor");return{settings:t(),isLoading:s()}}),(0,a.withDispatch)(e=>{const{loadSnippetEditorData:t}=e("yoast-seo/editor");return{onLoad:t}})])(ua),ga=window.jQuery;var ma=s.n(ga);const ya=window.Marionette,wa="#elementor-panel-elements-search-area",fa=s.n(ya)().ItemView.extend({template:!1,id:"yoast-elementor-react-panel",className:"yoast yoast-elementor-panel__fills",initialize(){ma()(wa).hide()},onShow(){va()},onDestroy(){ma()(wa).show()}}),ba="yoast-seo-tab",xa="panel/elements",_a="yoast-elementor-react-panel",va=()=>{let e=document.getElementById(_a);if(!e){const t=document.getElementById("elementor-panel-elements-navigation");if(!t)return;e=document.createElement("div"),e.id=_a,e.className="yoast yoast-elementor-panel__content",t.parentNode.insertBefore(e,t.nextSibling)}e.style.display="block";const t=document.getElementById("elementor-panel-elements-search-area");t&&(t.style.display="none")},ka=()=>{const e=window.$e.components.get(xa);e.hasTab(ba)||e.addTab(ba,{title:"Yoast SEO"})},Sa=e=>(e[ba]={region:e.global.region,view:fa,options:{}},e),Ra="yoast-elementor-react-tab",Ta="yoast-seo-tab",Ea="Yoast SEO",ja="panel/page-settings",Ca=()=>{const{settings:e}=elementor.documents.getCurrent().config;e.tabs[Ta]||(e.tabs=(0,c.reduce)(e.tabs,(e,t,s)=>(e[s]=t,"settings"===s&&(e[Ta]=Ea),e),{})),$e.components.get(ja).hasTab(Ta)||$e.components.get(ja).addTab(Ta,{title:Ea})};let Ia=!1,La=!1;const Aa=(0,c.debounce)(Te,500,{trailing:!0}),Pa=()=>{const e=document.getElementById("yoast-form");if(!e)return void console.error("Yoast form not found!");window.YoastSEO=window.YoastSEO||{},window.YoastSEO._registerReactComponent=ge,(()=>{const e=document.createElement("div");e.id="yoast-elementor-react-root",document.body.appendChild(e),function(e,t){const s=g();ue=(0,se.createRef)();const i={isRtl:s.isRtl};(0,se.createRoot)(document.getElementById(e)).render((0,le.jsx)(de,{theme:i,location:"sidebar",children:(0,le.jsx)(te.SlotFillProvider,{children:(0,le.jsxs)(se.Fragment,{children:[t,(0,le.jsx)(he,{ref:ue})]})})}))}(e.id,(0,le.jsxs)(ie.Root,{context:{locationContext:"elementor-sidebar"},children:[(0,le.jsxs)(je,{id:Ra,children:[(0,le.jsx)(ot,{}),(0,le.jsx)(ha,{})]}),(0,le.jsxs)(je,{id:_a,children:[(0,le.jsx)(ot,{}),(0,le.jsx)(ha,{})]})]}))})(),xe("editor/documents/load","yoast-seo/register-tab",Ca,({config:e})=>_e(e.id)),$e.routes.on("run:after",(e,t)=>{t===`${ja}/${Ta}`&&(()=>{if(document.getElementById(Ra))return;const e=document.getElementById("elementor-panel-page-settings-controls");if(!e)return;const t=e.querySelector(".elementor-control-yoast-seo-section");t&&(t.style.display="none");const s=document.createElement("div");s.id=Ra,s.className="yoast yoast-elementor-panel__fills",e.appendChild(s)})()}),Ca(),elementor.getPanelView().getPages("menu").view.addItem({name:"yoast",icon:"yoast yoast-element-menu-icon",title:Ea,type:"page",callback:()=>{try{$e.route(`${ja}/${Ta}`)}catch(e){$e.route(`${ja}/settings`),$e.route(`${ja}/${Ta}`)}}},"more"),((e,t=500)=>{const s=(0,c.debounce)(e,t,{trailing:!0});fe("document/elements/settings","yoast-seo/document/post-status",({settings:e})=>s(e.post_status),({container:e,settings:t})=>{var s;return!!_e((null==e||null===(s=e.document)||void 0===s?void 0:s.id)||elementor.documents.getCurrent().id)&&Boolean(null==t?void 0:t.post_status)})})(()=>Aa(Ia));const t=((e,t=500)=>{const s={},i=Array.from(e.querySelectorAll("input[name^='yoast']")),o=i.reduce((e,{name:t,value:s})=>(e[t]=s,e),{}),r={...o},n=new MutationObserver((0,c.debounce)(e=>{const t=[];e.forEach(e=>{"value"===e.attributeName&&e.target.name.startsWith("yoast")&&e.target.value!==o[e.target.name]&&(t.push({input:e.target,name:e.target.name,value:e.target.value,previousValue:o[e.target.name],snapshotValue:r[e.target.name]}),o[e.target.name]=e.target.value)}),t.length>0&&(0,c.forEach)(s,e=>e(t))},t));return{start:()=>n.observe(e,{attributes:!0,subtree:!0}),stop:()=>n.disconnect(),subscribe:e=>{const t=(0,c.uniqueId)("yoast-form-listener");return s[t]=e,()=>delete s[t]},takeSnapshot:()=>{i.forEach(({name:e,value:t})=>{r[e]=t})},restoreSnapshot:()=>{i.forEach(e=>{e.value=r[e.name],o[e.name]=r[e.name]})}}})(e);t.subscribe(e=>{e.some(e=>{return t=e.name,s=e.value,i=e.previousValue,!(ke.includes(t)||Se.includes(t)&&((e,t)=>{if(t===e)return!0;if(""===t||""===e)return!1;let s,i;try{s=JSON.parse(t),i=JSON.parse(e)}catch(e){return!0}return s.length===i.length&&s.every((e,t)=>e.keyword===i[t].keyword)})(i,s)||s===i);var t,s,i})&&(Ia=!0,Aa(Ia),$e.internal("document/save/set-is-modified",{status:!0}))}),t.start(),be("editor/documents/open","yoast-seo/document/open",()=>{YoastSEO.store._freeze(!1),t.start(),(0,l.doAction)("yoast.elementor.toggleFreeze",{isFreeze:!1,isDiscard:!1})},({id:e})=>_e(e)),fe("editor/documents/close","yoast-seo/document/close",(0,c.throttle)(({mode:e})=>{t.stop(),"discard"===e&&(YoastSEO.store._restoreSnapshot(),t.restoreSnapshot(),Ia=!1,Te(Ia));const s=()=>{YoastSEO.store._freeze(!0),(0,l.doAction)("yoast.elementor.toggleFreeze",{isFreeze:!0,isDiscard:"discard"===e}),(0,l.removeAction)("yoast.elementor.save.success","yoast/yoast-seo/finishClosingDocument"),(0,l.removeAction)("yoast.elementor.save.failure","yoast/yoast-seo/finishClosingDocument")};if(La)return(0,l.addAction)("yoast.elementor.save.success","yoast/yoast-seo/finishClosingDocument",s),void(0,l.addAction)("yoast.elementor.save.failure","yoast/yoast-seo/finishClosingDocument",s);s()},500,{leading:!0,trailing:!1}),({id:e})=>_e(e)),xe("document/save/save","yoast-seo/document/save",async({document:s})=>{if(La=!0,!_e(s.id))return;if(s.id!==elementor.config.document.revisions.current_id)return;Ia=!1;const{success:i,formData:o,data:r,xhr:n}=await(e=>new Promise(t=>{const s=jQuery(e).serializeArray().reduce((e,{name:t,value:s})=>(e[t]=s,e),{});jQuery.post(e.getAttribute("action"),s).done(({success:e,data:i},o,r)=>t({success:e,formData:s,data:i,xhr:r})).fail(e=>t({success:!1,formData:s,xhr:e}))}))(e);if(!i)return Ia=!0,La=!1,void(0,l.doAction)("yoast.elementor.save.failure");r.slug&&r.slug!==o.slug&&(0,a.dispatch)("yoast-seo/editor").updateData({slug:r.slug}),(0,a.dispatch)("yoast-seo/editor").setEditorDataSlug(r.slug),Te(Ia),(0,l.doAction)("yoast.elementor.save.success",n),YoastSEO.store._takeSnapshot(),t.takeSnapshot(),La=!1},({document:e})=>_e((null==e?void 0:e.id)||elementor.documents.getCurrent().id)),setTimeout(()=>{YoastSEO.store._takeSnapshot(),t.takeSnapshot()},2e3)},Da=window.yoast.reduxJsToolkit,Fa="adminUrl",Ma=(0,Da.createSlice)({name:Fa,initialState:"",reducers:{setAdminUrl:(e,{payload:t})=>t}}),Oa=(Ma.getInitialState,{selectAdminUrl:e=>(0,c.get)(e,Fa,"")});Oa.selectAdminLink=(0,Da.createSelector)([Oa.selectAdminUrl,(e,t)=>t],(e,t="")=>{try{return new URL(t,e).href}catch(t){return e}}),Ma.actions,Ma.reducer;const qa="hasConsent",Na=(0,Da.createSlice)({name:qa,initialState:{hasConsent:!1,endpoint:""},reducers:{giveAiGeneratorConsent:(e,{payload:t})=>{e.hasConsent=t},setAiGeneratorConsentEndpoint:(e,{payload:t})=>{e.endpoint=t}}}),Ua=(Na.getInitialState,Na.actions,Na.reducer,"linkParams"),Wa=(0,Da.createSlice)({name:Ua,initialState:{},reducers:{setLinkParams:(e,{payload:t})=>t}}),$a=(Wa.getInitialState,{selectLinkParam:(e,t,s={})=>(0,c.get)(e,`${Ua}.${t}`,s),selectLinkParams:e=>(0,c.get)(e,Ua,{})});$a.selectLink=(0,Da.createSelector)([$a.selectLinkParams,(e,t)=>t,(e,t,s={})=>s],(e,t,s)=>(0,at.addQueryArgs)(t,{...e,...s})),Wa.actions,Wa.reducer;const Ba=(0,Da.createSlice)({name:"notifications",initialState:{},reducers:{addNotification:{reducer:(e,{payload:t})=>{e[t.id]={id:t.id,variant:t.variant,size:t.size,title:t.title,description:t.description}},prepare:({id:e,variant:t="info",size:s="default",title:i,description:o})=>({payload:{id:e||(0,Da.nanoid)(),variant:t,size:s,title:i||"",description:o}})},removeNotification:(e,{payload:t})=>(0,c.omit)(e,t)}}),Ka=(Ba.getInitialState,Ba.actions,Ba.reducer,"pluginUrl"),Ha=(0,Da.createSlice)({name:Ka,initialState:"",reducers:{setPluginUrl:(e,{payload:t})=>t}}),Va=(Ha.getInitialState,{selectPluginUrl:e=>(0,c.get)(e,Ka,"")});Va.selectImageLink=(0,Da.createSelector)([Va.selectPluginUrl,(e,t,s="images")=>s,(e,t)=>t],(e,t,s)=>[(0,c.trimEnd)(e,"/"),(0,c.trim)(t,"/"),(0,c.trimStart)(s,"/")].join("/")),Ha.actions,Ha.reducer;const Ya="wistiaEmbedPermission",za=(0,Da.createSlice)({name:Ya,initialState:{value:!1,status:tt,error:{}},reducers:{setWistiaEmbedPermissionValue:(e,{payload:t})=>{e.value=Boolean(t)}},extraReducers:e=>{e.addCase(`${Ya}/request`,e=>{e.status=st}),e.addCase(`${Ya}/success`,(e,{payload:t})=>{e.status="success",e.value=Boolean(t&&t.value)}),e.addCase(`${Ya}/error`,(e,{payload:t})=>{e.status="error",e.value=Boolean(t&&t.value),e.error={code:(0,c.get)(t,"error.code",500),message:(0,c.get)(t,"error.message","Unknown")}})}}),Ga=(za.getInitialState,{selectWistiaEmbedPermission:e=>(0,c.get)(e,Ya,{value:!1,status:tt}),selectWistiaEmbedPermissionValue:e=>(0,c.get)(e,[Ya,"value"],!1),selectWistiaEmbedPermissionStatus:e=>(0,c.get)(e,[Ya,"status"],tt),selectWistiaEmbedPermissionError:e=>(0,c.get)(e,[Ya,"error"],{})}),Za=(za.actions,{[Ya]:async({payload:e})=>vr()({path:"/yoast/v1/wistia_embed_permission",method:"POST",data:{value:Boolean(e)}})});var Qa;za.reducer;const Xa="documentTitle",Ja=(0,Da.createSlice)({name:Xa,initialState:(0,c.defaultTo)(null===(Qa=document)||void 0===Qa?void 0:Qa.title,""),reducers:{setDocumentTitle:(e,{payload:t})=>t}}),el=(Ja.getInitialState,{selectDocumentTitle:e=>(0,c.get)(e,Xa,""),selectDocumentFullTitle:(e,{prefix:t=""}={})=>{const s=(0,c.get)(e,Xa,"");return s.startsWith(t)?s:`${t} ‹ ${s}`}});function tl({alertKey:e}){return new Promise(t=>wpseoApi.post("alerts/dismiss",{key:e},()=>t()))}function sl({query:e,postId:t}){return new Promise(s=>{wpseoApi.get("meta/search",{query:e,post_id:t},e=>{s(e.meta)})})}Ja.actions,Ja.reducer;const il=async({countryCode:e,keyphrase:t})=>(vr()({path:"yoast/v1/semrush/country_code",method:"POST",data:{country_code:e}}),vr()({path:(0,at.addQueryArgs)("/yoast/v1/semrush/related_keyphrases",{keyphrase:t,country_code:e})})),ol=Za[Ya];class rl{static get titleElement(){return document.getElementById(window.wpseoScriptData.isPost?"yoast_wpseo_title":"hidden_wpseo_title")}static get descriptionElement(){return document.getElementById(window.wpseoScriptData.isPost?"yoast_wpseo_metadesc":"hidden_wpseo_desc")}static get slugElement(){return document.getElementById("yoast_wpseo_slug")}static get title(){return rl.titleElement.value}static set title(e){rl.titleElement.value=e}static get description(){return rl.descriptionElement.value}static set description(e){rl.descriptionElement.value=e}static get slug(){return rl.slugElement.value}static set slug(e){rl.slugElement.value=e}}const{UPDATE_DATA:nl,LOAD_SNIPPET_EDITOR_DATA:al}=u.actions;function ll(e){if(e.hasOwnProperty("title")){let t=e.title;e.title===(0,c.get)(window,"wpseoScriptData.metabox.title_template","")&&(t=""),rl.title=t}if(e.hasOwnProperty("description")){let t=e.description;e.description===(0,c.get)(window,"wpseoScriptData.metabox.metadesc_template","")&&(t=""),rl.description=t}return e.hasOwnProperty("slug")&&(rl.slug=e.slug),{type:nl,data:e}}const cl=()=>{const e=(0,c.get)(window,"wpseoScriptData.metabox.title_template",""),t=(0,c.get)(window,"wpseoScriptData.metabox.metadesc_template","");return{type:al,data:{title:rl.title||e,description:rl.description||t,slug:rl.slug},templates:{title:e,description:t}}},dl="yoast-measurement-element";function pl(e){let t=document.getElementById(dl);return t||(t=function(){const e=document.createElement("div");return e.id=dl,e.style.position="absolute",e.style.left="-9999em",e.style.top=0,e.style.height=0,e.style.overflow="hidden",e.style.fontFamily="arial, sans-serif",e.style.fontSize="20px",e.style.fontWeight="400",document.body.appendChild(e),e}()),t.innerText=e,t.offsetWidth}const{getEditorDataSlug:ul,getEditorDataTitle:hl,getSnippetEditorDescription:gl,getSnippetEditorSlug:ml,getSnippetEditorTitle:yl}=u.selectors,wl=(0,Da.createSelector)([ul,ml,hl,()=>(0,c.get)(window,"elementor.documents.currentDocument.id",0)],(e,t,s,i)=>t||e||(0,at.cleanForSlug)(s)||String(i)),fl=(0,Da.createSelector)([yl,gl,wl],(e,t,s)=>({title:e,description:t,slug:s})),{getBaseUrlFromSettings:bl,getContentLocale:xl,getEditorDataContent:_l,getFocusKeyphrase:vl,getSnippetEditorDescriptionWithTemplate:kl,getSnippetEditorTitleWithTemplate:Sl,getDateFromSettings:Rl}=u.selectors,Tl=e=>{let t=Sl(e),s=kl(e),i=wl(e);const o=bl(e);return t=Rt.strings.stripHTMLTags(E("data_page_title",t)),s=Rt.strings.stripHTMLTags(E("data_meta_desc",s)),i=i.trim().replace(/\s+/g,"-"),{text:_l(e),title:t,keyword:vl(e),description:s,locale:xl(e),titleWidth:pl(t),slug:i,permalink:o+i,date:Rl(e)}};function El(e){return(0,c.get)(e,"editorContext.postType")}const jl=(0,Da.createSelector)([El],e=>"product"===e),Cl=(0,Da.createSelector)([El],e=>["product_cat","product_tag"].includes(e)),Il=(0,Da.createSelector)([jl,Cl],(e,t)=>e||t),Ll=e=>{let t=(0,c.get)(e,"editorData.excerpt","");if(""===t){const s="ja"===m()?80:156;t=gi((0,c.get)(e,"editorData.content",""),s)}return t},Al=e=>(0,c.get)(e,"analysisData.snippet.title",""),Pl=e=>(0,c.get)(e,"analysisData.snippet.description",""),Dl=()=>(0,c.get)(window,"wpseoScriptData.metabox.title_template",""),Fl=()=>(0,c.get)(window,"wpseoScriptData.metabox.title_template_no_fallback",""),Ml=()=>(0,c.get)(window,"wpseoScriptData.metabox.social_title_template",""),Ol=()=>(0,c.get)(window,"wpseoScriptData.metabox.metadesc_template",""),ql=()=>(0,c.get)(window,"wpseoScriptData.metabox.social_description_template",""),Nl=e=>{let t="";return(0,c.get)(e,"snippetEditor.replacementVariables",[]).forEach(e=>{"excerpt"===e.name&&(t=e.value)}),t},Ul=e=>(0,c.get)(e,"facebookEditor.title",""),Wl=e=>(0,c.get)(e,"facebookEditor.description",""),$l=(0,Da.createSelector)([Ml,Al,Fl,Dl],(...e)=>e.find(Boolean)||""),Bl=((0,Da.createSelector)([Ul,$l],(e,t)=>e||t),(0,Da.createSelector)([ql,Pl,Ol,Nl,Ll],(...e)=>{var t;return null!==(t=e.find(Boolean))&&void 0!==t?t:""})),Kl=((0,Da.createSelector)([Wl,Bl],(e,t)=>e||t),(e,t,s=null)=>(0,c.get)(e,`preferences.${t}`,s)),Hl=e=>Kl(e,"isWooCommerceActive",!1),Vl=e=>Kl(e,"isWooCommerceSeoActive",!1);(0,Da.createSelector)([Vl,Hl,Il],(e,t,s)=>!e&&t&&s),(0,Da.createSelector)([Vl,Hl,Cl],(e,t,s)=>!e&&t&&s),(0,Da.createSelector)([Il,Hl],(e,t)=>t&&e);const Yl=(0,Da.createSelector)([Ml,Ul,Al,Fl,Dl],(...e)=>e.find(Boolean)||""),zl=((0,Da.createSelector)([e=>(0,c.get)(e,"twitterEditor.title",""),Yl],(e,t)=>e||t),(0,Da.createSelector)([ql,Wl,Pl,Ol,Nl,Ll],(...e)=>{var t;return null!==(t=e.find(Boolean))&&void 0!==t?t:""}));(0,Da.createSelector)([e=>(0,c.get)(e,"twitterEditor.description",""),zl],(e,t)=>e||t);const{selectAdminUrl:Gl,selectAdminLink:Zl}=Oa,{selectLinkParams:Ql,selectLinkParam:Xl,selectLink:Jl}=$a,{selectDocumentFullTitle:ec}=el,{selectPluginUrl:tc,selectImageLink:sc}=Va,{selectWistiaEmbedPermission:ic,selectWistiaEmbedPermissionValue:oc,selectWistiaEmbedPermissionStatus:rc,selectWistiaEmbedPermissionError:nc}=Ga,ac=(0,Da.createSelector)([e=>(0,c.get)(e,"settings.snippetEditor.baseUrl",""),wl],(e,t)=>e+t),lc={name:"author_first_name",label:"Author first name",placeholder:"%%author_first_name%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.author_first_name","")},regexp:new RegExp("%%author_first_name%%","g")},cc={name:"author_last_name",label:"Author last name",placeholder:"%%author_last_name%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.author_last_name","")},regexp:new RegExp("%%author_last_name%%","g")},dc={name:"currentdate",label:"Current date",placeholder:"%%currentdate%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.currentdate","")},regexp:new RegExp("%%currentdate%%","g")},pc={name:"currentday",label:"Current day",placeholder:"%%currentday%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.currentday","")},regexp:new RegExp("%%currentday%%","g")},uc={name:"currentmonth",label:"Current month",placeholder:"%%currentmonth%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.currentmonth","")},regexp:new RegExp("%%currentmonth%%","g")},hc={name:"category",label:"Category",placeholder:"%%category%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.category","")},regexp:new RegExp("%%category%%","g")},gc={name:"category_title",label:"Category Title",placeholder:"%%category_title%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.category_title","")},regexp:new RegExp("%%category_title%%","g")},mc={name:"currentyear",label:"Current year",placeholder:"%%currentyear%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.currentyear","")},regexp:new RegExp("%%currentyear%%","g")},yc={name:"date",label:"Date",placeholder:"%%date%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.date","")},regexp:new RegExp("%%date%%","g")},wc={name:"excerpt",label:"Excerpt",placeholder:"%%excerpt%%",aliases:[{name:"excerpt_only",label:"Excerpt only",placeholder:"%%excerpt_only%%"}],getReplacement:function(){return(0,a.select)("yoast-seo/editor").getEditorDataExcerptWithFallback()},regexp:new RegExp("%%excerpt%%|%%excerpt_only%%","g")},fc={name:"focuskw",label:"Focus keyphrase",placeholder:"%%focuskw%%",aliases:[],getReplacement:function(){return(0,a.select)("yoast-seo/editor").getFocusKeyphrase()},regexp:new RegExp("%%focuskw%%|%%keyword%%","g")},bc={name:"id",label:"ID",placeholder:"%%id%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.id","")},regexp:new RegExp("%%id%%","g")},xc={name:"modified",label:"Modified",placeholder:"%%modified%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.modified","")},regexp:new RegExp("%%modified%%","g")},_c={name:"name",label:"Name",placeholder:"%%name%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.name","")},regexp:new RegExp("%%name%%","g")},vc={name:"page",label:"Page",placeholder:"%%page%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.page","")},regexp:new RegExp("%%page%%","g")},kc={name:"pagenumber",label:"Pagenumber",placeholder:"%%pagenumber%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.pagenumber","")},regexp:new RegExp("%%pagenumber%%","g")},Sc={name:"pagetotal",label:"Pagetotal",placeholder:"%%pagetotal%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.pagetotal","")},regexp:new RegExp("%%pagetotal%%","g")},Rc={name:"permalink",label:"Permalink",placeholder:"%%permalink%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.permalink","")},regexp:new RegExp("%%permalink%%","g")},Tc={name:"post_content",label:"Post Content",placeholder:"%%post_content%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.post_content","")},regexp:new RegExp("%%post_content%%","g")},Ec={name:"post_day",label:"Post Day",placeholder:"%%post_day%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.post_day","")},regexp:new RegExp("%%post_day%%","g")},jc={name:"post_month",label:"Post Month",placeholder:"%%post_month%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.post_month","")},regexp:new RegExp("%%post_month%%","g")},Cc={name:"post_year",label:"Post Year",placeholder:"%%post_year%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.post_year","")},regexp:new RegExp("%%post_year%%","g")},Ic={name:"pt_plural",label:"Post type (plural)",placeholder:"%%pt_plural%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.pt_plural","")},regexp:new RegExp("%%pt_plural%%","g")},Lc={name:"pt_single",label:"Post type (singular)",placeholder:"%%pt_single%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.pt_single","")},regexp:new RegExp("%%pt_single%%","g")},Ac={name:"primary_category",label:"Primary category",placeholder:"%%primary_category%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.primary_category","")},regexp:new RegExp("%%primary_category%%","g")},Pc={name:"searchphrase",label:"Search phrase",placeholder:"%%searchphrase%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.searchphrase","")},regexp:new RegExp("%%searchphrase%%","g")},Dc={name:"sep",label:"Separator",placeholder:"%%sep%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.sep","")},regexp:new RegExp("%%sep%%(\\s*%%sep%%)*","g")},Fc={name:"sitedesc",label:"Tagline",placeholder:"%%sitedesc%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.sitedesc","")},regexp:new RegExp("%%sitedesc%%","g")},Mc={name:"sitename",label:"Site title",placeholder:"%%sitename%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.sitename","")},regexp:new RegExp("%%sitename%%","g")},Oc={name:"tag",label:"Tag",placeholder:"%%tag%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.tag","")},regexp:new RegExp("%%tag%%","g")},qc={name:"term404",label:"Term404",placeholder:"%%term404%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.term404","")},regexp:new RegExp("%%term404%%","g")},Nc={name:"term_description",label:"Term description",placeholder:"%%term_description%%",aliases:[{name:"tag_description",label:"Tag description",placeholder:"%%tag_description%%"},{name:"category_description",label:"Category description",placeholder:"%%category_description%%"}],getReplacement:function(){return(0,c.get)(window,"YoastSEO.app.rawData.text","")},regexp:new RegExp("%%term_description%%|%%tag_description%%|%%category_description%%","g")},Uc={name:"term_hierarchy",label:"Term hierarchy",placeholder:"%%term_hierarchy%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.term_hierarchy","")},regexp:new RegExp("%%term_hierarchy%%","g")},Wc={name:"term_title",label:"Term title",placeholder:"%%term_title%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.term_title","")},regexp:new RegExp("%%term_title%%","g")},$c={name:"title",label:"Title",placeholder:"%%title%%",aliases:[],getReplacement:function(){return(0,a.select)("yoast-seo/editor").getEditorDataTitle()},regexp:new RegExp("%%title%%","g")},Bc={name:"user_description",label:"User description",placeholder:"%%user_description%%",aliases:[],getReplacement:function(){return(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.replace_vars.user_description","")},regexp:new RegExp("%%user_description%%","g")};var Kc={source:"wpseoScriptData.analysis.plugins.replaceVars",scope:[],aliases:[]},Hc=function(e,t,s){this.placeholder=e,this.replacement=t,this.options=(0,c.defaults)(s,Kc)};Hc.prototype.getPlaceholder=function(e){return(e=e||!1)&&this.hasAlias()?this.placeholder+"|"+this.getAliases().join("|"):this.placeholder},Hc.prototype.setSource=function(e){this.options.source=e},Hc.prototype.hasScope=function(){return!(0,c.isEmpty)(this.options.scope)},Hc.prototype.addScope=function(e){this.hasScope()||(this.options.scope=[]),this.options.scope.push(e)},Hc.prototype.inScope=function(e){return!this.hasScope()||(0,c.indexOf)(this.options.scope,e)>-1},Hc.prototype.hasAlias=function(){return!(0,c.isEmpty)(this.options.aliases)},Hc.prototype.addAlias=function(e){this.hasAlias()||(this.options.aliases=[]),this.options.aliases.push(e)},Hc.prototype.getAliases=function(){return this.options.aliases};const Vc=Hc,Yc="replaceVariablePlugin";let zc=null,Gc=null;const Zc=e=>{["content","title","snippet_title","snippet_meta","primary_category","data_page_title","data_meta_desc","excerpt"].forEach(t=>{R(t,e,Yc,10)})},Qc=(e="")=>{switch(""===e&&(e=(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.scope","")),e){case"post":case"page":return["authorFirstName","authorLastName","category","categoryTitle","currentDate","currentDay","currentMonth","currentYear","date","excerpt","id","focusKeyphrase","modified","name","page","primaryCategory","pageNumber","pageTotal","permalink","postContent","postDay","postMonth","postYear","postTypeNamePlural","postTypeNameSingular","searchPhrase","separator","siteDescription","siteName","tag","title","userDescription"]}return[]},Xc=e=>Zc(t=>t.replace(new RegExp(e.placeholder,"g"),e.replacement)),Jc=()=>{if(null===Gc){Gc=[];const e=(0,c.get)(window,"wpseoScriptData.analysis.plugins.replaceVars.hidden_replace_vars",[]);(null===zc&&(zc=Qc().map(e=>null==n?void 0:n[e]).filter(Boolean)),zc).forEach(t=>{const s=e.includes(t.name);Gc.push({name:t.name,label:t.label,value:t.placeholder,hidden:s}),t.aliases.forEach(e=>{Gc.push({name:e.name,label:e.label,value:e.placeholder,hidden:s})})})}return Gc};const ed={content:"",title:"",excerpt:"",slug:"",imageUrl:"",featuredImage:"",contentImage:"",excerptOnly:""};function td(e=elementor.documents.getCurrent()){var t,s;let i=null===(t=e.$element)||void 0===t?void 0:t.find(".elementor-widget-container");var o;return null!==(s=i)&&void 0!==s&&s.length||(i=null===(o=e.$element)||void 0===o?void 0:o.find(".elementor-widget").children().not(".elementor-background-overlay, .elementor-element-overlay, .ui-resizable-handle")),i}function sd(e,t=!1){let s=elementor.settings.page.model.get("post_excerpt");return t?s||"":(s||(s=gi(e,"ja"===m()?80:156)),s)}function id(){const e=elementor.documents.getCurrent();if(!ve())return;if(!["wp-post","wp-page"].includes(e.config.type))return;if((0,a.select)("yoast-seo/editor").getActiveMarker())return;const t=function(e){const t=function(e){var t;const s=[];return null===(t=td(e))||void 0===t||t.each((e,t)=>{const i=t.innerHTML.replace(/[\n\t]/g,"").trim();s.push(i)}),s.join("")}(e),s=(0,c.get)(elementor.settings.page.model.get("post_featured_image"),"url",""),i=function(e){const t=d.languageProcessing.imageInText(e);if(0===t.length)return"";const s=jQuery.parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}(t);return{content:t,title:elementor.settings.page.model.get("post_title"),excerpt:sd(t),excerptOnly:sd(t,!0),imageUrl:s||i,featuredImage:s,contentImage:i,status:elementor.settings.page.model.get("post_status")}}(e);t.content!==ed.content&&(ed.content=t.content,(0,a.dispatch)("yoast-seo/editor").setEditorDataContent(ed.content)),t.title!==ed.title&&(ed.title=t.title,(0,a.dispatch)("yoast-seo/editor").setEditorDataTitle(ed.title)),t.excerpt!==ed.excerpt&&(ed.excerpt=t.excerpt,ed.excerptOnly=t.excerptOnly,(0,a.dispatch)("yoast-seo/editor").setEditorDataExcerpt(ed.excerpt),(0,a.dispatch)("yoast-seo/editor").updateReplacementVariable("excerpt",ed.excerpt),(0,a.dispatch)("yoast-seo/editor").updateReplacementVariable("excerpt_only",ed.excerptOnly)),t.imageUrl!==ed.imageUrl&&(ed.imageUrl=t.imageUrl,(0,a.dispatch)("yoast-seo/editor").setEditorDataImageUrl(ed.imageUrl)),t.contentImage!==ed.contentImage&&(ed.contentImage=t.contentImage,(0,a.dispatch)("yoast-seo/editor").setContentImage(ed.contentImage)),t.featuredImage!==ed.featuredImage&&(ed.featuredImage=t.featuredImage,(0,a.dispatch)("yoast-seo/editor").updateData({snippetPreviewImageURL:ed.featuredImage}))}function od(){td().each((e,t)=>{-1!==t.innerHTML.indexOf("<yoastmark")&&(t.innerHTML=d.markers.removeMarks(t.innerHTML))}),(0,a.dispatch)("yoast-seo/editor").setActiveMarker(null),(0,a.dispatch)("yoast-seo/editor").setMarkerPauseStatus(!1),YoastSEO.analysis.applyMarks(new d.Paper("",{}),[])}const rd=(0,c.debounce)(id,500);function nd(e,t){const{updateWordsToHighlight:s}=(0,a.dispatch)("yoast-seo/editor");e("morphology",new d.Paper("",{keyword:t})).then(({result:{keyphraseForms:e}})=>{s((0,c.uniq)((0,c.flatten)(e)))}).catch(()=>{s([])})}const ad=(0,c.debounce)(nd,500);var ld=jQuery;function cd(e,t,s,i,o){this._scriptUrl=i,this._options={usedKeywords:t.keyword_usage,usedKeywordsPostTypes:t.keyword_usage_post_types,searchUrl:t.search_url,postUrl:t.post_edit_url},this._keywordUsage=t.keyword_usage,this._usedKeywordsPostTypes=t.keyword_usage_post_types,this._postID=ld("#post_ID, [name=tag_ID]").val(),this._taxonomy=ld("[name=taxonomy]").val()||"",this._nonce=o,this._ajaxAction=e,this._refreshAnalysis=s,this._initialized=!1}function dd(){window.YoastSEO=window.YoastSEO||{},window.YoastSEO.store=function(){const{snapshotReducer:s,takeSnapshot:n,restoreSnapshot:l}=(e=>{let t,s=!1,i=!1;return{snapshotReducer:(i=void 0,o)=>s?(s=!1,t):e(i,o),takeSnapshot:(e,s)=>{s({type:"CREATE_SNAPSHOT"}),t=(0,c.cloneDeep)(e()),i=!0},restoreSnapshot:e=>{i&&(s=!0,e({type:"RESTORE_SNAPSHOT"}))}}})((0,a.combineReducers)(u.reducers)),{freezeReducer:d,toggleFreeze:p}=(e=>{let t=!1,s=null;return{freezeReducer:(i=void 0,o)=>t?s:e(i,o),toggleFreeze:(e,i=!t)=>{s=i?(0,c.cloneDeep)(e()):null,t=Boolean(i)}}})(s),h=(0,a.registerStore)("yoast-seo/editor",{reducer:d,selectors:{...u.selectors,...o,...i,...r},actions:(0,c.pickBy)({...u.actions,...t},e=>"function"==typeof e),controls:e,initialState:{snippetEditor:{mode:"mobile",data:{title:"",description:"",slug:""},wordsToHighlight:[],replacementVariables:[{name:"date",label:(0,Re.__)("Date","wordpress-seo"),value:""},{name:"id",label:(0,Re.__)("ID","wordpress-seo"),value:""},{name:"page",label:(0,Re.__)("Page","wordpress-seo"),value:""},{name:"searchphrase",label:(0,Re.__)("Search phrase","wordpress-seo"),value:""},{name:"sitedesc",label:(0,Re.__)("Tagline","wordpress-seo"),value:""},{name:"sitename",label:(0,Re.__)("Site title","wordpress-seo"),value:""},{name:"category",label:(0,Re.__)("Category","wordpress-seo"),value:""},{name:"focuskw",label:(0,Re.__)("Focus keyphrase","wordpress-seo"),value:""},{name:"title",label:(0,Re.__)("Title","wordpress-seo"),value:""},{name:"parent_title",label:(0,Re.__)("Parent title","wordpress-seo"),value:""},{name:"excerpt",label:(0,Re.__)("Excerpt","wordpress-seo"),value:""},{name:"primary_category",label:(0,Re.__)("Primary category","wordpress-seo"),value:""},{name:"sep",label:(0,Re.__)("Separator","wordpress-seo"),value:""},{name:"excerpt_only",label:(0,Re.__)("Excerpt only","wordpress-seo"),value:""},{name:"category_description",label:(0,Re.__)("Category description","wordpress-seo"),value:""},{name:"tag_description",label:(0,Re.__)("Tag description","wordpress-seo"),value:""},{name:"term_description",label:(0,Re.__)("Term description","wordpress-seo"),value:""},{name:"currentyear",label:(0,Re.__)("Current year","wordpress-seo"),value:""}],uniqueRefreshValue:"",templates:{title:"",description:""},isLoading:!0,replacementVariables:Jc()}}});return(e=>{e.dispatch(u.actions.loadCornerstoneContent()),e.dispatch(u.actions.loadFocusKeyword()),e.dispatch(u.actions.setMarkerStatus(window.wpseoScriptData.metabox.elementorMarkerStatus)),e.dispatch(u.actions.setSettings({socialPreviews:{sitewideImage:window.wpseoScriptData.sitewideSocialImage,siteName:window.wpseoScriptData.metabox.site_name,contentImage:window.wpseoScriptData.metabox.first_content_image,twitterCardType:window.wpseoScriptData.metabox.twitterCardType},snippetEditor:{baseUrl:window.wpseoScriptData.metabox.base_url,date:window.wpseoScriptData.metabox.metaDescriptionDate,recommendedReplacementVariables:window.wpseoScriptData.analysis.plugins.replaceVars.recommended_replace_vars,siteIconUrl:window.wpseoScriptData.metabox.siteIconUrl}}));const{facebook:t,twitter:s}=window.wpseoScriptData.metabox.showSocial;t&&e.dispatch(u.actions.loadFacebookPreviewData()),s&&e.dispatch(u.actions.loadTwitterPreviewData()),e.dispatch(u.actions.setSEMrushChangeCountry(window.wpseoScriptData.metabox.countryCode)),e.dispatch(u.actions.setSEMrushLoginStatus(window.wpseoScriptData.metabox.SEMrushLoginStatus)),e.dispatch(u.actions.setWincherLoginStatus(window.wpseoScriptData.metabox.wincherLoginStatus,!1)),e.dispatch(u.actions.setWincherWebsiteId(window.wpseoScriptData.metabox.wincherWebsiteId)),e.dispatch(u.actions.setWincherAutomaticKeyphaseTracking(window.wpseoScriptData.metabox.wincherAutoAddKeyphrases)),e.dispatch(u.actions.setDismissedAlerts((0,c.get)(window,"wpseoScriptData.dismissedAlerts",{}))),e.dispatch(u.actions.setCurrentPromotions((0,c.get)(window,"wpseoScriptData.currentPromotions",{}))),e.dispatch(u.actions.setIsPremium(Boolean((0,c.get)(window,"wpseoScriptData.metabox.isPremium",!1)))),e.dispatch(u.actions.setAdminUrl((0,c.get)(window,"wpseoScriptData.adminUrl",""))),e.dispatch(u.actions.setLinkParams((0,c.get)(window,"wpseoScriptData.linkParams",{}))),e.dispatch(u.actions.setPluginUrl((0,c.get)(window,"wpseoScriptData.pluginUrl",""))),e.dispatch(u.actions.setWistiaEmbedPermissionValue("1"===(0,c.get)(window,"wpseoScriptData.wistiaEmbedPermission",!1)));const i=document.getElementById("yoast_wpseo_slug");i&&e.dispatch(u.actions.setEditorDataSlug(i.value))})(h),h._freeze=p.bind(null,h.getState),h._takeSnapshot=n.bind(null,h.getState,h.dispatch),h._restoreSnapshot=l.bind(null,h.dispatch),h}(),function(){be("panel/editor/open","yoast-seo/marks/reset-on-edit",(0,c.debounce)(od,500),ve),be("document/save/save","yoast-seo/marks/reset-on-save",od,({document:e})=>_e((null==e?void 0:e.id)||elementor.documents.getCurrent().id));const e=(e=>{const t=new MutationObserver(e);return(e=document)=>(t.observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),()=>t.disconnect())})(rd);let t=c.noop;fe("editor/documents/close","yoast-seo/content-scraper/stop",()=>{t(),t=c.noop,rd.cancel()},({id:e})=>_e(e)),fe("editor/documents/attach-preview","yoast-seo/content-scraper/start",()=>{t=e()},ve),fe("document/save/set-is-modified","yoast-seo/content-scraper/on-modified",rd,({document:e})=>_e((null==e?void 0:e.id)||elementor.documents.getCurrent().id)),id()}(),window.YoastSEO.pluginReady=k,window.YoastSEO.pluginReloaded=S,window.YoastSEO.registerModification=R,window.YoastSEO.registerPlugin=T,window.YoastSEO.applyModifications=E,window.YoastSEO.analysis=window.YoastSEO.analysis||{},window.YoastSEO.analysis.run=(0,a.dispatch)("yoast-seo/editor").runAnalysis,window.YoastSEO.analysis.worker=function(){const{getAnalysisTimestamp:e,isCornerstoneContent:t}=(0,a.select)("yoast-seo/editor"),s=function(){const e=(0,c.get)(window,["wpseoScriptData","analysis","worker","url"],"analysis-worker.js"),t=(0,d.createWorker)(e),s=(0,c.get)(window,["wpseoScriptData","analysis","worker","dependencies"],[]),i=[];for(const e in s){if(!Object.prototype.hasOwnProperty.call(s,e))continue;const t=window.document.getElementById(`${e}-js-translations`);if(!t)continue;const o=t.innerHTML.slice(214),r=o.indexOf(","),n=o.slice(0,r-1);try{const e=/}}\s*\);/.exec(o).index+2,t=JSON.parse(o.slice(r+1,e));i.push([n,t])}catch(t){console.warn(`Failed to parse translation data for ${e} to send to the Yoast SEO worker`);continue}}return t.postMessage({dependencies:s,translations:i}),new d.AnalysisWorkerWrapper(t)}();s.initialize(function(e={}){const t={locale:m(),contentAnalysisActive:y(),keywordAnalysisActive:w(),inclusiveLanguageAnalysisActive:f(),defaultQueryParams:(0,c.get)(window,["wpseoAdminL10n","default_query_params"],{}),logLevel:(0,c.get)(window,["wpseoScriptData","analysis","worker","log_level"],"ERROR"),enabledFeatures:(0,b.enabledFeatures)()};return(0,c.merge)(t,e)}({useCornerstone:t(),marker:Q()})).catch(p),window.YoastSEO.analysis.applyMarks=(e,t)=>Q()(e,t);let i=J(),o=t(),r=e();return(0,a.subscribe)(()=>{const n=t(),a=J(),l=e();if(n!==o)return o=n,i=a,void s.initialize({useCornerstone:n}).then(()=>X(s,a)).catch(p);l===r&&!1!==(0,c.isEqual)(a,i)||(i=a,r=l,X(s,a))}),s}(),window.YoastSEO.analysis.collectData=J,T(Yc,{status:"ready"}),Qc().forEach(e=>{const t=null==n?void 0:n[e];if(t){const e=(({getReplacement:e,regexp:t})=>s=>s.replace(t,e()))(t);Zc(e)}}),window.YoastSEO.wp=window.YoastSEO.wp||{},window.YoastSEO.wp.replaceVarsPlugin={addReplacement:Xc,ReplaceVar:Vc},function(){const e=g(),t=(0,c.get)(window,["wpseoScriptData","analysis","worker","keywords_assessment_url"],"used-keywords-assessment.js"),s=(0,c.get)(window,["wpseoScriptData","usedKeywordsNonce"],""),i=new cd("get_focus_keyword_usage_and_post_types",e,(0,a.dispatch)("yoast-seo/editor").runAnalysis,t,s);i.init();let o="";(0,a.subscribe)(()=>{const e=(0,a.select)("yoast-seo/editor").getFocusKeyphrase();e!==o&&(o=e,i.setKeyword(e))})}(),(()=>{if((0,a.select)("yoast-seo/editor").getPreference("isInsightsEnabled",!1))(0,a.dispatch)("yoast-seo/editor").loadEstimatedReadingTime(),(0,a.subscribe)((0,c.debounce)(ee(),1500,{maxWait:3e3}))})(),function(e){const{getFocusKeyphrase:t}=(0,a.select)("yoast-seo/editor");let s=t();nd(e,s),(0,a.subscribe)(()=>{const i=t();s!==i&&(s=i,ad(e,i))})}(window.YoastSEO.analysis.worker.runResearch),"1"===window.wpseoScriptData.isAlwaysIntroductionV2||window.elementorFrontend.config.experimentalFeatures.editor_v2?function(){var e,t,s,i;const o="yoast-introduction-editor-v2";if(null!==(e=window.elementor)&&void 0!==e&&null!==(t=e.config)&&void 0!==t&&null!==(s=t.user)&&void 0!==s&&null!==(i=s.introduction)&&void 0!==i&&i[o])return;const r=new window.elementorModules.editor.utils.Introduction({introductionKey:o,dialogType:"buttons",dialogOptions:{id:o,className:"elementor-right-click-introduction yoast-elementor-introduction",headerMessage:(0,Re.__)("Yoast SEO for Elementor","wordpress-seo"),message:(0,Re.__)("Get started with Yoast SEO's content analysis for Elementor!","wordpress-seo"),position:{my:"center top",at:"center bottom+12",autoRefresh:!0,using(e,t){const s=t.target.left-t.element.left+t.target.width/2-8;this.style.setProperty("--yoast-elementor-introduction-arrow",s+"px");const i=t.target.element.closest("#elementor-panel-inner header"),o=i?i.offsetHeight:0;o&&o>e.top-12?this.style.top=o+20+"px":this.style.top=e.top+"px",this.style.left=e.left+"px"}},hide:{onOutsideClick:!1}},onDialogInitCallback(e){window.$e.routes.on("run:after",(t,s)=>{r.introductionViewed||"panel/elements/yoast-seo-tab"!==s&&s.startsWith("panel/elements")||(e.hide(),r.setViewed())}),window.elementor.channels.dataEditMode.on("switch",t=>{"preview"!==t||r.introductionViewed||(e.hide(),r.setViewed())}),e.addButton({name:"ok",text:(0,Re.__)("Got it","wordpress-seo"),classes:"elementor-button elementor-button-success",callback:()=>{e.hide(),r.setViewed()}})}});setTimeout(function e(){if(r.introductionViewed)return;const t=document.querySelector("button[data-tab='yoast-seo-tab']");t?(r.getDialog().setSettings("position",{...r.getDialog().getSettings("position"),of:t}),r.show(t)):setTimeout(e,100)},100)}():function(){if(!0===window.elementor.config.user.introduction["yoast-introduction"])return;const e=new window.elementorModules.editor.utils.Introduction({introductionKey:"yoast-introduction",dialogOptions:{id:"yoast-introduction",className:"elementor-right-click-introduction yoast-elementor-introduction",headerMessage:(0,Re.__)("New: Yoast SEO for Elementor","wordpress-seo"),message:(0,Re.__)("Get started with Yoast SEO's content analysis for Elementor!","wordpress-seo"),position:{my:"left top",at:"right top",autoRefresh:!0},hide:{onOutsideClick:!1}},onDialogInitCallback:t=>{window.$e.routes.on("run:after",function(e,s){"panel/menu"===s&&t.getElements("ok").trigger("click")}),t.addButton({name:"ok",text:(0,Re.__)("Got it","wordpress-seo"),callback:()=>e.setViewed()}),t.getElements("ok").addClass("elementor-button elementor-button-success")}});setTimeout(function t(){try{e.show(window.elementor.getPanelView().header.currentView.ui.menuButton[0])}catch(e){setTimeout(t,100)}},100)}(),Pa(),xe("editor/documents/load","yoast-seo/add-elements-tab",ka,({config:e})=>_e(e.id)),window.elementor.hooks.addFilter("panel/elements/regionViews",Sa),window.$e&&window.$e.routes&&window.$e.routes.on("run:after",(e,t)=>{t===`${xa}/${ba}`&&va()}),ka(),(0,l.doAction)("yoast.elementor.loaded")}cd.prototype.init=function(){const{worker:e}=window.YoastSEO.analysis;this.requestKeywordUsage=(0,c.debounce)(this.requestKeywordUsage.bind(this),500),e.loadScript(this._scriptUrl).then(()=>{e.sendMessage("initialize",this._options,"used-keywords-assessment")}).then(()=>{this._initialized=!0,(0,c.isEqual)(this._options.usedKeywords,this._keywordUsage)?this._refreshAnalysis():e.sendMessage("updateKeywordUsage",this._keywordUsage,"used-keywords-assessment").then(()=>this._refreshAnalysis())}).catch(e=>console.error(e))},cd.prototype.setKeyword=function(e){(0,c.has)(this._keywordUsage,e)||this.requestKeywordUsage(e)},cd.prototype.requestKeywordUsage=function(e){ld.post(ajaxurl,{action:this._ajaxAction,post_id:this._postID,keyword:e,taxonomy:this._taxonomy,nonce:this._nonce},this.updateKeywordUsage.bind(this,e),"json")},cd.prototype.updateKeywordUsage=function(e,t){const{worker:s}=window.YoastSEO.analysis,i=t.keyword_usage,o=t.post_types;i&&(0,c.isArray)(i)&&(this._keywordUsage[e]=i,this._usedKeywordsPostTypes[e]=o,this._initialized&&s.sendMessage("updateKeywordUsage",{usedKeywords:this._keywordUsage,usedKeywordsPostTypes:this._usedKeywordsPostTypes},"used-keywords-assessment").then(()=>this._refreshAnalysis()))},jQuery(window).on("elementor:init",()=>{window.elementor.on("panel:init",()=>{setTimeout(dd)})})})()})();