whoami7 - Manager
:
/
home
/
rattkxnv
/
usaattorneyblog.com
/
wp-content
/
plugins
/
wordpress-seo
/
js
/
dist
/
Upload File:
files >> /home/rattkxnv/usaattorneyblog.com/wp-content/plugins/wordpress-seo/js/dist/term-edit.js
(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DISMISS_ALERT:()=>k,SNIPPET_EDITOR_FIND_CUSTOM_FIELDS:()=>x,wistiaEmbedPermission:()=>R});const s=window.wp.domReady;var i=e.n(s);const n=window.jQuery;var o=e.n(n);const a=window.lodash,r=window.wp.i18n;const c=window.wp.data,d=window.yoast.externals.redux,l=window.yoast.reduxJsToolkit,p=window.wp.url,u="linkParams",h=(0,l.createSlice)({name:u,initialState:{},reducers:{setLinkParams:(e,{payload:t})=>t}}),g=(h.getInitialState,{selectLinkParam:(e,t,s={})=>(0,a.get)(e,`${u}.${t}`,s),selectLinkParams:e=>(0,a.get)(e,u,{})});g.selectLink=(0,l.createSelector)([g.selectLinkParams,(e,t)=>t,(e,t,s={})=>s],((e,t,s)=>(0,p.addQueryArgs)(t,{...e,...s}))),h.actions,h.reducer;const w=(0,l.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:n})=>({payload:{id:e||(0,l.nanoid)(),variant:t,size:s,title:i||"",description:n}})},removeNotification:(e,{payload:t})=>(0,a.omit)(e,t)}}),f=(w.getInitialState,w.actions,w.reducer,"pluginUrl"),y=(0,l.createSlice)({name:f,initialState:"",reducers:{setPluginUrl:(e,{payload:t})=>t}}),m=(y.getInitialState,{selectPluginUrl:e=>(0,a.get)(e,f,"")});m.selectImageLink=(0,l.createSelector)([m.selectPluginUrl,(e,t,s="images")=>s,(e,t)=>t],((e,t,s)=>[(0,a.trimEnd)(e,"/"),(0,a.trim)(t,"/"),(0,a.trimStart)(s,"/")].join("/"))),y.actions,y.reducer;const _=window.wp.apiFetch;var b=e.n(_);const v="wistiaEmbedPermission",S=(0,l.createSlice)({name:v,initialState:{value:!1,status:"idle",error:{}},reducers:{setWistiaEmbedPermissionValue:(e,{payload:t})=>{e.value=Boolean(t)}},extraReducers:e=>{e.addCase(`${v}/request`,(e=>{e.status="loading"})),e.addCase(`${v}/success`,((e,{payload:t})=>{e.status="success",e.value=Boolean(t&&t.value)})),e.addCase(`${v}/error`,((e,{payload:t})=>{e.status="error",e.value=Boolean(t&&t.value),e.error={code:(0,a.get)(t,"error.code",500),message:(0,a.get)(t,"error.message","Unknown")}}))}}),E=(S.getInitialState,S.actions,{[v]:async({payload:e})=>b()({path:"/yoast/v1/wistia_embed_permission",method:"POST",data:{value:Boolean(e)}})});function k({alertKey:e}){return new Promise((t=>wpseoApi.post("alerts/dismiss",{key:e},(()=>t()))))}function x({query:e,postId:t}){return new Promise((s=>{wpseoApi.get("meta/search",{query:e,post_id:t},(e=>{s(e.meta)}))}))}S.reducer;const R=E[v];const O=window.yoast.analysis,T=window.wp.isShallowEqual,P="yoastmark";function C(e,t){return e._properties.position.startOffset>t.length||e._properties.position.endOffset>t.length}function A(e,t,s){const i=e.dom;let n=e.getContent();if(n=O.markers.removeMarks(n),(0,a.isEmpty)(s))return void e.setContent(n);n=s[0].hasPosition()?function(e,t){if(!t)return"";for(let s=(e=(0,a.orderBy)(e,(e=>e._properties.position.startOffset),["asc"])).length-1;s>=0;s--){const i=e[s];C(i,t)||(t=i.applyWithPosition(t))}return t}(s,n):function(e,t,s,i){const{fieldsToMark:n,selectedHTML:o}=O.languageProcessing.getFieldsToMark(s,i);return(0,a.forEach)(s,(function(t){"acf_content"!==e.id&&(t._properties.marked=O.languageProcessing.normalizeHTML(t._properties.marked),t._properties.original=O.languageProcessing.normalizeHTML(t._properties.original)),n.length>0?o.forEach((e=>{const s=t.applyWithReplace(e);i=i.replace(e,s)})):i=t.applyWithReplace(i)})),i}(e,0,s,n),e.setContent(n),function(e){let t=e.getContent();t=t.replace(new RegExp("<yoastmark.+?>","g"),"").replace(new RegExp("</yoastmark>","g"),""),e.setContent(t)}(e);const o=i.select(P);(0,a.forEach)(o,(function(e){e.setAttribute("data-mce-bogus","1")}))}function M(e){return window.test=e,A.bind(null,e)}const D="et_pb_main_editor_wrap",I=class{static isActive(){return!!document.getElementById(D)}static isTinyMCEHidden(){const e=document.getElementById(D);return!!e&&e.classList.contains("et_pb_hidden")}listen(e){this.classicEditorContainer=document.getElementById(D),this.classicEditorContainer&&new MutationObserver((t=>{(0,a.forEach)(t,(t=>{"attributes"===t.type&&"class"===t.attributeName&&(t.target.classList.contains("et_pb_hidden")?e.classicEditorHidden():e.classicEditorShown())}))})).observe(this.classicEditorContainer,{attributes:!0})}},F=class{static isActive(){return!!window.VCV_I18N}},U={classicEditorHidden:a.noop,classicEditorShown:a.noop,pageBuilderLoaded:a.noop},B=class{constructor(){this.determineActivePageBuilders()}determineActivePageBuilders(){I.isActive()&&(this.diviActive=!0),F.isActive()&&(this.vcActive=!0)}isPageBuilderActive(){return this.diviActive||this.vcActive}listen(e){this.callbacks=(0,a.defaults)(e,U),this.diviActive&&(new I).listen(e)}isClassicEditorHidden(){return!(!this.diviActive||!I.isTinyMCEHidden())}};let Y;const j="content",L="description";function K(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()}function N(e,t,s){"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",(function(i){const n=i.editor;n.id===e&&(0,a.forEach)(t,(function(e){n.on(e,s)}))}))}function q(){(0,a.isUndefined)(Y)||Y.dispatch(d.actions.setMarkerStatus("disabled"))}function V(){(0,a.isUndefined)(Y)||Y.dispatch(d.actions.setMarkerStatus("enabled"))}class Q{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,a.isString)(e)?(0,a.isUndefined)(t)||(0,a.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,a.isString)(e)?(0,a.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,a.isString)(e)?(0,a.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,a.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,a.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,a.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 n={callable:t,origin:s,priority:(0,a.isNumber)(i)?i:10};return(0,a.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(n),!0}_registerAssessment(e,t,s,i){return(0,a.isString)(t)?(0,a.isObject)(s)?(0,a.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,a.isArray)(i)||i.length<1||(i=this._stripIllegalModifications(i),i.sort(((e,t)=>e.priority-t.priority)),(0,a.forEach)(i,(function(i){const n=i.callable(t,s);typeof n==typeof t?t=n: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,a.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,a.reduce)(this.plugins,(function(e,t){return e&&"ready"===t.status}),!0)}_pollTimeExceeded(){(0,a.forEach)(this.plugins,(function(e,t){(0,a.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,a.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,a.isUndefined)(this.plugins[e])}}function z(e,t,s){e("morphology",new O.Paper("",{keyword:s})).then((e=>{const s=e.result.keyphraseForms;t.dispatch(d.actions.updateWordsToHighlight((0,a.uniq)((0,a.flatten)(s))))})).catch((()=>{t.dispatch(d.actions.updateWordsToHighlight([]))}))}const W=window.wp.api;function H(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}var $={source:"wpseoScriptData.analysis.plugins.replaceVars",scope:[],aliases:[]},J=function(e,t,s){this.placeholder=e,this.replacement=t,this.options=(0,a.defaults)(s,$)};J.prototype.getPlaceholder=function(e){return(e=e||!1)&&this.hasAlias()?this.placeholder+"|"+this.getAliases().join("|"):this.placeholder},J.prototype.setSource=function(e){this.options.source=e},J.prototype.hasScope=function(){return!(0,a.isEmpty)(this.options.scope)},J.prototype.addScope=function(e){this.hasScope()||(this.options.scope=[]),this.options.scope.push(e)},J.prototype.inScope=function(e){return!this.hasScope()||(0,a.indexOf)(this.options.scope,e)>-1},J.prototype.hasAlias=function(){return!(0,a.isEmpty)(this.options.aliases)},J.prototype.addAlias=function(e){this.hasAlias()||(this.options.aliases=[]),this.options.aliases.push(e)},J.prototype.getAliases=function(){return this.options.aliases};const G=J,{removeReplacementVariable:X,updateReplacementVariable:Z,refreshSnippetEditor:ee}=d.actions;var te=["content","title","snippet_title","snippet_meta","primary_category","data_page_title","data_meta_desc","excerpt"],se={},ie={},ne=function(e,t){this._app=e,this._app.registerPlugin("replaceVariablePlugin",{status:"ready"}),this._store=t,this.replaceVariables=this.replaceVariables.bind(this),this.registerReplacements(),this.registerModifications(),this.registerEvents(),this.subscribeToGutenberg()};ne.prototype.registerReplacements=function(){this.addReplacement(new G("%%author_first_name%%","author_first_name")),this.addReplacement(new G("%%author_last_name%%","author_last_name")),this.addReplacement(new G("%%category%%","category")),this.addReplacement(new G("%%category_title%%","category_title")),this.addReplacement(new G("%%currentdate%%","currentdate")),this.addReplacement(new G("%%currentday%%","currentday")),this.addReplacement(new G("%%currentmonth%%","currentmonth")),this.addReplacement(new G("%%currenttime%%","currenttime")),this.addReplacement(new G("%%currentyear%%","currentyear")),this.addReplacement(new G("%%date%%","date")),this.addReplacement(new G("%%id%%","id")),this.addReplacement(new G("%%page%%","page")),this.addReplacement(new G("%%permalink%%","permalink")),this.addReplacement(new G("%%post_content%%","post_content")),this.addReplacement(new G("%%post_month%%","post_month")),this.addReplacement(new G("%%post_year%%","post_year")),this.addReplacement(new G("%%searchphrase%%","searchphrase")),this.addReplacement(new G("%%sitedesc%%","sitedesc")),this.addReplacement(new G("%%sitename%%","sitename")),this.addReplacement(new G("%%userid%%","userid")),this.addReplacement(new G("%%focuskw%%","keyword",{source:"app",aliases:["%%keyword%%"]})),this.addReplacement(new G("%%term_description%%","text",{source:"app",scope:["term","category","tag"],aliases:["%%tag_description%%","%%category_description%%"]})),this.addReplacement(new G("%%term_title%%","term_title",{scope:["term"]})),this.addReplacement(new G("%%term_hierarchy%%","term_hierarchy",{scope:["term"]})),this.addReplacement(new G("%%title%%","title",{source:"app",scope:["post","term","page"]})),this.addReplacement(new G("%%parent_title%%","title",{source:"app",scope:["page","category"]})),this.addReplacement(new G("%%excerpt%%","excerpt",{source:"app",scope:["post"],aliases:["%%excerpt_only%%"]})),this.addReplacement(new G("%%primary_category%%","primaryCategory",{source:"app",scope:["post"]})),this.addReplacement(new G("%%sep%%(\\s*%%sep%%)*","sep"))},ne.prototype.registerEvents=function(){const e=wpseoScriptData.analysis.plugins.replaceVars.scope;"post"===e&&jQuery(".categorydiv").each(this.bindTaxonomyEvents.bind(this)),"post"!==e&&"page"!==e||jQuery("#postcustomstuff > #list-table").each(this.bindFieldEvents.bind(this))},ne.prototype.subscribeToGutenberg=function(){if(!H())return;const e={0:""};let t=null;const s=wp.data;s.subscribe((()=>{const i=s.select("core/editor").getEditedPostAttribute("parent");if(void 0!==i&&t!==i)return t=i,i<1?(this._currentParentPageTitle="",void this.declareReloaded()):(0,a.isUndefined)(e[i])?void W.loadPromise.done((()=>{new W.models.Page({id:i}).fetch().then((t=>{this._currentParentPageTitle=t.title.rendered,e[i]=this._currentParentPageTitle,this.declareReloaded()})).fail((()=>{this._currentParentPageTitle="",this.declareReloaded()}))})):(this._currentParentPageTitle=e[i],void this.declareReloaded())}))},ne.prototype.addReplacement=function(e){se[e.placeholder]=e},ne.prototype.removeReplacement=function(e){delete se[e.getPlaceholder()]},ne.prototype.registerModifications=function(){var e=this.replaceVariables.bind(this);(0,a.forEach)(te,function(t){this._app.registerModification(t,e,"replaceVariablePlugin",10)}.bind(this))},ne.prototype.replaceVariables=function(e){return(0,a.isUndefined)(e)||(e=this.parentReplace(e),e=this.replaceCustomTaxonomy(e),e=this.replaceByStore(e),e=this.replacePlaceholders(e)),e},ne.prototype.replaceByStore=function(e){const t=this._store.getState().snippetEditor.replacementVariables;return(0,a.forEach)(t,(t=>{""!==t.value&&(e=e.replace("%%"+t.name+"%%",t.value))})),e},ne.prototype.getReplacementSource=function(e){return"app"===e.source?this._app.rawData:"direct"===e.source?"direct":wpseoScriptData.analysis.plugins.replaceVars.replace_vars},ne.prototype.getReplacement=function(e){var t=this.getReplacementSource(e.options);return!1===e.inScope(wpseoScriptData.analysis.plugins.replaceVars.scope)?"":"direct"===t?e.replacement:t[e.replacement]||""},ne.prototype.replacePlaceholders=function(e){return(0,a.forEach)(se,function(t){e=e.replace(new RegExp(t.getPlaceholder(!0),"g"),this.getReplacement(t))}.bind(this)),e},ne.prototype.declareReloaded=function(){this._app.pluginReloaded("replaceVariablePlugin"),this._store.dispatch(ee())},ne.prototype.getCategoryName=function(e){var t=e.parent("label").clone();return t.children().remove(),t.text().trim()},ne.prototype.parseTaxonomies=function(e,t){(0,a.isUndefined)(ie[t])&&(ie[t]={});const s=[];(0,a.forEach)(e,function(e){const i=(e=jQuery(e)).val(),n=this.getCategoryName(e),o=e.prop("checked");ie[t][i]={label:n,checked:o},o&&-1===s.indexOf(n)&&s.push(n)}.bind(this)),"category"!==t&&(t="ct_"+t),this._store.dispatch(Z(t,s.join(", ")))},ne.prototype.getAvailableTaxonomies=function(e){var t=jQuery(e).find("input[type=checkbox]"),s=jQuery(e).attr("id").replace("taxonomy-","");t.length>0&&this.parseTaxonomies(t,s),this.declareReloaded()},ne.prototype.bindTaxonomyEvents=function(e,t){(t=jQuery(t)).on("wpListAddEnd",".categorychecklist",this.getAvailableTaxonomies.bind(this,t)),t.on("change","input[type=checkbox]",this.getAvailableTaxonomies.bind(this,t)),this.getAvailableTaxonomies(t)},ne.prototype.replaceCustomTaxonomy=function(e){return(0,a.forEach)(ie,function(t,s){var i="%%ct_"+s+"%%";"category"===s&&(i="%%"+s+"%%"),e=e.replace(i,this.getTaxonomyReplaceVar(s))}.bind(this)),e},ne.prototype.getTaxonomyReplaceVar=function(e){var t=[],s=ie[e];return!0===(0,a.isUndefined)(s)?"":((0,a.forEach)(s,(function(e){!1!==e.checked&&t.push(e.label)})),jQuery.uniqueSort(t).join(", "))},ne.prototype.parseFields=function(e){jQuery(e).each(function(e,t){var s=jQuery("#"+t.id+"-key").val(),i=jQuery("#"+t.id+"-value").val();const n="cf_"+this.sanitizeCustomFieldNames(s),o=s+" (custom field)";this._store.dispatch(Z(n,i,o)),this.addReplacement(new G(`%%${n}%%`,i,{source:"direct"}))}.bind(this))},ne.prototype.removeFields=function(e){jQuery(e).each(function(e,t){var s=jQuery("#"+t.id+"-key").val();this.removeReplacement("%%cf_"+this.sanitizeCustomFieldNames(s)+"%%")}.bind(this))},ne.prototype.sanitizeCustomFieldNames=function(e){return e.replace(/\s/g,"_")},ne.prototype.getAvailableFields=function(e){this.removeCustomFields();var t=jQuery(e).find("#the-list > tr:visible[id]");t.length>0&&this.parseFields(t),this.declareReloaded()},ne.prototype.bindFieldEvents=function(e,t){var s=(t=jQuery(t)).find("#the-list");s.on("wpListDelEnd.wpseoCustomFields",this.getAvailableFields.bind(this,t)),s.on("wpListAddEnd.wpseoCustomFields",this.getAvailableFields.bind(this,t)),s.on("input.wpseoCustomFields",".textarea",this.getAvailableFields.bind(this,t)),s.on("click.wpseoCustomFields",".button + .updatemeta",this.getAvailableFields.bind(this,t)),this.getAvailableFields(t)},ne.prototype.removeCustomFields=function(){var e=(0,a.filter)(se,(function(e,t){return t.indexOf("%%cf_")>-1}));(0,a.forEach)(e,function(e){this._store.dispatch(X((0,a.trim)(e.placeholder,"%%"))),this.removeReplacement(e)}.bind(this))},ne.prototype.parentReplace=function(e){const t=jQuery("#parent_id, #parent").eq(0);return this.hasParentTitle(t)&&(e=e.replace(/%%parent_title%%/,this.getParentTitleReplacement(t))),H()&&!(0,a.isUndefined)(this._currentParentPageTitle)&&(e=e.replace(/%%parent_title%%/,this._currentParentPageTitle)),e},ne.prototype.hasParentTitle=function(e){return!(0,a.isUndefined)(e)&&!(0,a.isUndefined)(e.prop("options"))},ne.prototype.getParentTitleReplacement=function(e){var t=e.find("option:selected").text();return t===wpseoScriptData.analysis.plugins.replaceVars.no_parent_text?"":t},ne.ReplaceVar=G;const oe=ne,ae=window.wp.hooks,re="[^<>&/\\[\\]\0- =]+?",ce=new RegExp("\\["+re+"( [^\\]]+?)?\\]","g"),de=new RegExp("\\[/"+re+"\\]","g");class le{constructor({registerPlugin:e,registerModification:t,pluginReady:s,pluginReloaded:i},n){this._registerModification=t,this._pluginReady=s,this._pluginReloaded=i,e("YoastShortcodePlugin",{status:"loading"}),this.bindElementEvents();const o="("+n.join("|")+")";this.shortcodesRegex=new RegExp(o,"g"),this.closingTagRegex=new RegExp("\\[\\/"+o+"\\]","g"),this.nonCaptureRegex=new RegExp("\\["+o+"[^\\]]*?\\]","g"),this.parsedShortcodes=[],this.loadShortcodes(this.declareReady.bind(this))}declareReady(){this._pluginReady("YoastShortcodePlugin"),this.registerModifications()}declareReloaded(){this._pluginReloaded("YoastShortcodePlugin")}registerModifications(){this._registerModification("content",this.replaceShortcodes.bind(this),"YoastShortcodePlugin")}removeUnknownShortCodes(e){return(e=e.replace(ce,"")).replace(de,"")}replaceShortcodes(e){return"string"==typeof e&&this.parsedShortcodes.forEach((({shortcode:t,output:s})=>{e=e.replace(t,s)})),e=this.removeUnknownShortCodes(e)}loadShortcodes(e){const t=this.getUnparsedShortcodes(this.getShortcodes(this.getContentTinyMCE()));if(!(t.length>0))return e();this.parseShortcodes(t,e)}bindElementEvents(){const e=document.querySelector(".wp-editor-area"),t=(0,a.debounce)(this.loadShortcodes.bind(this,this.declareReloaded.bind(this)),500);e&&(e.addEventListener("keyup",t),e.addEventListener("change",t)),"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",(function(e){e.editor.on("change",t),e.editor.on("keyup",t)}))}getContentTinyMCE(){let e=document.querySelector(".wp-editor-area")?document.querySelector(".wp-editor-area").value:"";return"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.editors&&0!==tinyMCE.editors.length&&(e=tinyMCE.get("content")?tinyMCE.get("content").getContent():""),e}getUnparsedShortcodes(e){return"object"!=typeof e?(console.error("Failed to get unparsed shortcodes. Expected parameter to be an array, instead received "+typeof e),!1):e.filter((e=>this.isUnparsedShortcode(e)))}isUnparsedShortcode(e){return!this.parsedShortcodes.some((({shortcode:t})=>t===e))}getShortcodes(e){if("string"!=typeof e)return console.error("Failed to get shortcodes. Expected parameter to be a string, instead received"+typeof e),!1;const t=this.matchCapturingShortcodes(e);t.forEach((t=>{e=e.replace(t,"")}));const s=this.matchNonCapturingShortcodes(e);return t.concat(s)}matchCapturingShortcodes(e){const t=(e.match(this.closingTagRegex)||[]).join(" ").match(this.shortcodesRegex)||[];return(0,a.flatten)(t.map((t=>{const s="\\["+t+"[^\\]]*?\\].*?\\[\\/"+t+"\\]";return e.match(new RegExp(s,"g"))||[]})))}matchNonCapturingShortcodes(e){return e.match(this.nonCaptureRegex)||[]}parseShortcodes(e,t){return"function"!=typeof t?(console.error("Failed to parse shortcodes. Expected parameter to be a function, instead received "+typeof t),!1):"object"==typeof e&&e.length>0?void jQuery.post(ajaxurl,{action:"wpseo_filter_shortcodes",_wpnonce:wpseoScriptData.analysis.plugins.shortcodes.wpseo_filter_shortcodes_nonce,data:e},function(e){this.saveParsedShortcodes(e,t)}.bind(this)):t()}saveParsedShortcodes(e,t){const s=JSON.parse(e);this.parsedShortcodes.push(...s),t()}}const pe=le,{updateShortcodesForParsing:ue}=d.actions;function he(e){var t=jQuery(".yst-traffic-light"),s=t.closest(".wpseo-meta-section-link"),i=jQuery("#wpseo-traffic-light-desc"),n=e.className||"na";t.attr("class","yst-traffic-light "+n),s.attr("aria-describedby","wpseo-traffic-light-desc"),i.length>0?i.text(e.screenReaderText):s.closest("li").append("<span id='wpseo-traffic-light-desc' class='screen-reader-text'>"+e.screenReaderText+"</span>")}function ge(e){jQuery("#wp-admin-bar-wpseo-menu .wpseo-score-icon").attr("title",e.screenReaderText).attr("class","wpseo-score-icon "+e.className).find(".wpseo-score-text").text(e.screenReaderText)}function we(){return(0,a.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}function fe(){const e=we();return(0,a.get)(e,"contentLocale","en_US")}function ye(){const e=we();return(0,a.get)(e,"translations",{domain:"wordpress-seo",locale_data:{"wordpress-seo":{"":{}}}})}function me(){const e=we();return 1===(0,a.get)(e,"contentAnalysisActive",0)}function _e(){const e=we();return 1===(0,a.get)(e,"keywordAnalysisActive",0)}function be(){const e=we();return 1===(0,a.get)(e,"inclusiveLanguageAnalysisActive",0)}const ve=window.yoast.featureFlag;function Se(){}let Ee=!1;function ke(e){return e.sort(((e,t)=>e._identifier.localeCompare(t._identifier)))}function xe(e,t,s,i,n){if(!Ee)return;const o=O.Paper.parse(t());e.analyze(o).then((a=>{const{result:{seo:r,readability:c,inclusiveLanguage:l}}=a;if(r){const e=r[""];e.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),e.results=ke(e.results),i.dispatch(d.actions.setSeoResultsForKeyword(o.getKeyword(),e.results)),i.dispatch(d.actions.setOverallSeoScore(e.score,o.getKeyword())),i.dispatch(d.actions.refreshSnippetEditor()),n.saveScores(e.score,o.getKeyword())}c&&(c.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),c.results=ke(c.results),i.dispatch(d.actions.setReadabilityResults(c.results)),i.dispatch(d.actions.setOverallReadabilityScore(c.score)),i.dispatch(d.actions.refreshSnippetEditor()),n.saveContentScore(c.score)),l&&(l.results.forEach((e=>{e.getMarker=()=>()=>s(o,e.marks)})),l.results=ke(l.results),i.dispatch(d.actions.setInclusiveLanguageResults(l.results)),i.dispatch(d.actions.setOverallInclusiveLanguageScore(l.score)),i.dispatch(d.actions.refreshSnippetEditor()),n.saveInclusiveLanguageScore(l.score)),(0,ae.doAction)("yoast.analysis.refresh",a,{paper:o,worker:e,collectData:t,applyMarks:s,store:i,dataCollector:n})})).catch(Se)}const Re="yoast-measurement-element";function Oe(e){let t=document.getElementById(Re);return t||(t=function(){const e=document.createElement("div");return e.id=Re,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}function Te(e){return(0,a.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,r.__)("Feedback","wordpress-seo"),screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""};case"bad":return{className:"bad",screenReaderText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,r.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,r.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(O.interpreters.scoreToRating(e))}const Pe=jQuery;var Ce=function(e){"object"==typeof CKEDITOR&&console.warn("YoastSEO currently doesn't support ckEditor. The content analysis currently only works with the HTML editor or TinyMCE."),this._store=e.store};Ce.prototype.getData=function(){const e={title:this.getTitle(),keyword:_e()?this.getKeyword():"",text:this.getText(),meta:this.getMeta(),url:this.getUrl(),permalink:this.getPermalink(),snippetCite:this.getSnippetCite(),snippetTitle:this.getSnippetTitle(),snippetMeta:this.getSnippetMeta(),name:this.getName(),baseUrl:this.getBaseUrl(),pageTitle:this.getPageTitle(),titleWidth:Oe(this.getTitle())},t=this._store.getState();return{...e,metaTitle:(0,a.get)(t,["analysisData","snippet","title"],this.getSnippetTitle()),url:(0,a.get)(t,["snippetEditor","data","slug"],this.getUrl()),meta:(0,a.get)(t,["analysisData","snippet","description"],this.getSnippetMeta())}},Ce.prototype.getTitle=function(){return document.getElementById("hidden_wpseo_title").value},Ce.prototype.getKeyword=function(){var e,t;return""===(t=(e=document.getElementById("hidden_wpseo_focuskw")).value)&&(t=document.getElementById("name").value,e.placeholder=t),t},Ce.prototype.getText=function(){return function(e){let t="";var s;return t=!1===K(e)||0==(s=e,null!==document.getElementById(s+"_ifr"))?function(e){return document.getElementById(e)&&document.getElementById(e).value||""}(e):tinyMCE.get(e).getContent(),t}(L)},Ce.prototype.getMeta=function(){var e="",t=document.getElementById("hidden_wpseo_desc");return null!==t&&(e=t.value),e},Ce.prototype.getUrl=function(){return document.getElementById("slug").value},Ce.prototype.getPermalink=function(){var e=this.getUrl();return this.getBaseUrl()+e+"/"},Ce.prototype.getSnippetCite=function(){return this.getUrl()},Ce.prototype.getSnippetTitle=function(){return document.getElementById("hidden_wpseo_title").value},Ce.prototype.getSnippetMeta=function(){var e="",t=document.getElementById("hidden_wpseo_desc");return null!==t&&(e=t.value),e},Ce.prototype.getName=function(){return document.getElementById("name").value},Ce.prototype.getBaseUrl=function(){return wpseoScriptData.metabox.base_url},Ce.prototype.getPageTitle=function(){return document.getElementById("hidden_wpseo_title").value},Ce.prototype.setDataFromSnippet=function(e,t){switch(t){case"snippet_meta":document.getElementById("hidden_wpseo_desc").value=e;break;case"snippet_cite":document.getElementById("slug").value=e;break;case"snippet_title":document.getElementById("hidden_wpseo_title").value=e}},Ce.prototype.saveSnippetData=function(e){this.setDataFromSnippet(e.title,"snippet_title"),this.setDataFromSnippet(e.urlPath,"snippet_cite"),this.setDataFromSnippet(e.metaDesc,"snippet_meta")},Ce.prototype.bindElementEvents=function(e){this.inputElementEventBinder(e)},Ce.prototype.inputElementEventBinder=function(e){for(var t=["name",L,"slug","wpseo_focuskw"],s=0;s<t.length;s++)null!==document.getElementById(t[s])&&document.getElementById(t[s]).addEventListener("input",e);!function(e,t){N(t,["input","change","cut","paste"],e),N(t,["hide"],q);const s=["show"];(new B).isPageBuilderActive()||s.push("init"),N(t,s,V),N("content",["focus"],(function(e){const t=e.target;(function(e){return-1!==e.getContent({format:"raw"}).indexOf("<"+P)})(t)&&(function(e){M(e)(null,[])}(t),YoastSEO.app.disableMarkers()),(0,a.isUndefined)(Y)||Y.dispatch(d.actions.setMarkerPauseStatus(!0))})),N("content",["blur"],(function(){(0,a.isUndefined)(Y)||Y.dispatch(d.actions.setMarkerPauseStatus(!1))}))}(e,L)},Ce.prototype.saveScores=function(e){var t=Te(e);document.getElementById("hidden_wpseo_linkdex").value=e,jQuery(window).trigger("YoastSEO:numericScore",e),he(t),ge(t)},Ce.prototype.saveContentScore=function(e){var t=Te(e);_e()||(he(t),ge(t)),Pe("#hidden_wpseo_content_score").val(e)},Ce.prototype.saveInclusiveLanguageScore=function(e){const t=Te(e);_e()||me()||(he(t),ge(t)),Pe("#hidden_wpseo_inclusive_language_score").val(e)};const Ae=Ce;class Me{constructor(){this._callbacks=[],this.register=this.register.bind(this)}register(e){(0,a.isFunction)(e)&&this._callbacks.push(e)}getData(){let e={};return this._callbacks.forEach((t=>{e=(0,a.merge)(e,t())})),e}}window.wp.annotations;const De=function(e){return(0,a.uniq)((0,a.flatten)(e.map((e=>{if(!(0,a.isUndefined)(e.getFieldsToMark()))return e.getFieldsToMark()}))))},Ie=window.wp.richText,Fe=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:Ue}=O.helpers.htmlEntities,Be=e=>{let t=0;return(0,a.forEachRight)(e,(e=>{const[s]=e;let i=s.length;/^<\/?br/.test(s)&&(i-=1),t+=i})),t},Ye="<yoastmark class='yoast-text-mark'>",je="</yoastmark>",Le='<yoastmark class="yoast-text-mark">';function Ke(e,t,s,i,n){const o=i.clientId,r=(0,Ie.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,a.flatMap)(n,(s=>{let n;return n=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,i,n){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),o=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,o,s);t=e.blockStartOffset,o=e.blockEndOffset}if(i.slice(t,o)===n.slice(t,o))return[{startOffset:t,endOffset:o}];const r=((e,t,s)=>{const i=s.slice(0,e),n=s.slice(0,t),o=((e,t,s,i)=>{const n=[...e.matchAll(Fe)];s-=Be(n);const o=[...t.matchAll(Fe)];return{blockStartOffset:s,blockEndOffset:i-=Be(o)}})(i,n,e,t),r=((e,t,s,i)=>{let n=[...e.matchAll(Ue)];return(0,a.forEachRight)(n,(e=>{const[,t]=e;s-=t.length})),n=[...t.matchAll(Ue)],(0,a.forEachRight)(n,(e=>{const[,t]=e;i-=t.length})),{blockStartOffset:s,blockEndOffset:i}})(i,n,e=o.blockStartOffset,t=o.blockEndOffset);return{blockStartOffset:e=r.blockStartOffset,blockEndOffset:t=r.blockEndOffset}})(t,o,i);return[{startOffset:r.blockStartOffset,endOffset:r.blockEndOffset}]}return[]}(s,o,i.name,e,r):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),i=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),n=function(e,t,s=!0){const i=[];if(0===e.length)return i;let n,o=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(n=e.indexOf(t,o))>-1;)i.push(n),o=n+t.length;return i}(e,s);if(0===n.length)return[];const o=function(e){let t=e.indexOf(Ye);const s=t>=0;s||(t=e.indexOf(Le));let i=null;const n=[];for(;t>=0;){if(i=(e=s?e.replace(Ye,""):e.replace(Le,"")).indexOf(je),i<t)return[];e=e.replace(je,""),n.push({startOffset:t,endOffset:i}),t=s?e.indexOf(Ye):e.indexOf(Le),i=null}return n}(i),a=[];return o.forEach((e=>{n.forEach((i=>{const n=i+e.startOffset;let o=i+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(o=i+s.length),a.push({startOffset:n,endOffset:o})}))})),a}(r,s),n?n.map((e=>({...e,block:o,richTextIdentifier:t}))):[]}))}const Ne=e=>e[0].toUpperCase()+e.slice(1),qe=(e,t,s,i,n)=>(e=e.map((e=>{const o=`${e.id}-${n[0]}`,a=`${e.id}-${n[1]}`,r=Ne(n[0]),c=Ne(n[1]),d=e[`json${r}`],l=e[`json${c}`],{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=Ke(d,o,s,i,p),g=Ke(l,a,s,i,u);return h.concat(g)})),(0,a.flattenDeep)(e)),Ve="yoast";let Qe=[];const ze={"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 We(){const e=Qe.shift();e&&((0,c.dispatch)("core/annotations").__experimentalAddAnnotation(e),He())}function He(){(0,a.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(We,{timeout:1e3}):setTimeout(We,150)}const $e=(e,t)=>{return(0,a.flatMap)((s=e.name,ze.hasOwnProperty(s)?ze[s]:[]),(s=>"yoast/faq-block"===e.name?((e,t,s)=>{const i=t.attributes[e.key];return 0===i.length?[]:qe(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 n=[];return"steps"===e.key&&n.push(qe(i,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter((e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e)),n.push(Ke(i,"description",e,t,s))),(0,a.flattenDeep)(n)})(s,e,t):function(e,t,s){const i=e.key,n=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:s.toString()})(t,i);return Ke(n,i,e,t,s)}(s,e,t)));var s};function Je(e,t){return(0,a.flatMap)(e,(e=>{const s=function(e){return e.innerBlocks.length>0}(e)?Je(e.innerBlocks,t):[];return $e(e,t).concat(s)}))}function Ge(e){Qe=[],(0,c.dispatch)("core/annotations").__experimentalRemoveAnnotationsBySource(Ve);const t=De(e);if(0===e.length)return;let s=(0,c.select)("core/block-editor").getBlocks();var i;t.length>0&&(s=s.filter((e=>t.some((t=>"core/"+t===e.name))))),i=Je(s,e),Qe=i.map((e=>({blockClientId:e.block,source:Ve,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}}))),He()}function Xe(e,t){let s;K(j)&&((0,a.isUndefined)(s)&&(s=M(tinyMCE.get(j))),s(e,t)),(0,c.select)("core/block-editor")&&(0,a.isFunction)((0,c.select)("core/block-editor").getBlocks)&&(0,c.select)("core/annotations")&&(0,a.isFunction)((0,c.dispatch)("core/annotations").__experimentalAddAnnotation)&&(function(e,t){tinyMCE.editors.map((e=>M(e))).forEach((s=>s(e,t)))}(e,t),Ge(t)),(0,ae.doAction)("yoast.analysis.applyMarks",t)}var Ze=jQuery;function et(e,t,s,i,n){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=Ze("#post_ID, [name=tag_ID]").val(),this._taxonomy=Ze("[name=taxonomy]").val()||"",this._nonce=n,this._ajaxAction=e,this._refreshAnalysis=s,this._initialized=!1}et.prototype.init=function(){const{worker:e}=window.YoastSEO.analysis;this.requestKeywordUsage=(0,a.debounce)(this.requestKeywordUsage.bind(this),500),e.loadScript(this._scriptUrl).then((()=>{e.sendMessage("initialize",this._options,"used-keywords-assessment")})).then((()=>{this._initialized=!0,(0,a.isEqual)(this._options.usedKeywords,this._keywordUsage)?this._refreshAnalysis():e.sendMessage("updateKeywordUsage",this._keywordUsage,"used-keywords-assessment").then((()=>this._refreshAnalysis()))})).catch((e=>console.error(e)))},et.prototype.setKeyword=function(e){(0,a.has)(this._keywordUsage,e)||this.requestKeywordUsage(e)},et.prototype.requestKeywordUsage=function(e){Ze.post(ajaxurl,{action:this._ajaxAction,post_id:this._postID,keyword:e,taxonomy:this._taxonomy,nonce:this._nonce},this.updateKeywordUsage.bind(this,e),"json")},et.prototype.updateKeywordUsage=function(e,t){const{worker:s}=window.YoastSEO.analysis,i=t.keyword_usage,n=t.post_types;i&&(0,a.isArray)(i)&&(this._keywordUsage[e]=i,this._usedKeywordsPostTypes[e]=n,this._initialized&&s.sendMessage("updateKeywordUsage",{usedKeywords:this._keywordUsage,usedKeywordsPostTypes:this._usedKeywordsPostTypes},"used-keywords-assessment").then((()=>this._refreshAnalysis())))};const{refreshSnippetEditor:tt,updateData:st,setFocusKeyword:it,setCornerstoneContent:nt,setMarkerStatus:ot,setReadabilityResults:at,setSeoResultsForKeyword:rt}=d.actions;function ct(e,t,s){var i,n;const o=new Me;function r(){const e={slug:n.val()};window.YoastSEO.store.dispatch(st(e))}function d(e){(0,a.isUndefined)(e.seoAssessorPresenter)||(e.seoAssessorPresenter.render=function(){}),(0,a.isUndefined)(e.contentAssessorPresenter)||(e.contentAssessorPresenter.render=function(){},e.contentAssessorPresenter.renderIndividualRatings=function(){})}let l;function p(e,t){const s=l||"";l=e.getState().analysisData.snippet,!(0,T.isShallowEqualObjects)(s,l)&&t()}!function(){var l,u,h,g,w,f,y,m,_,b;g=jQuery(".term-description-wrap").find("td"),w=jQuery(".term-description-wrap").find("label"),f=g.find("textarea").val(),y=document.getElementById("wp-description-wrap"),m=g.find("p"),g.html(""),g.append(y).append(m),document.getElementById("description").value=f,w.replaceWith(w.html()),u=new Ae({store:t}),l={elementTarget:[L,"yoast_wpseo_focuskw","yoast_wpseo_metadesc","excerpt","editable-post-name","editable-post-name-full"],targets:(_={},_e()&&(_.output="does-not-really-exist-but-it-needs-something"),me()&&(_.contentOutput="also-does-not-really-exist-but-it-needs-something"),_),callbacks:{getData:u.getData.bind(u)},locale:wpseoScriptData.metabox.contentLocale,contentAnalysisActive:me(),keywordAnalysisActive:_e(),hasSnippetPreview:!1,debouncedRefresh:!1,researcher:new window.yoast.Researcher.default},_e()&&(t.dispatch(it(u.getKeyword())),l.callbacks.saveScores=u.saveScores.bind(u),l.callbacks.updatedKeywordsResults=function(e){const s=t.getState().focusKeyword;t.dispatch(rt(s,e)),t.dispatch(tt())}),me()&&(t.dispatch(ot("hidden")),l.callbacks.saveContentScore=u.saveContentScore.bind(u),l.callbacks.updatedContentResults=function(e){t.dispatch(at(e)),t.dispatch(tt())}),h=ye(),(0,a.isUndefined)(h)||(0,a.isUndefined)(h.domain)||(l.translations=h),i=new O.App(l),window.YoastSEO=window.YoastSEO||{},window.YoastSEO.app=i,window.YoastSEO.store=t,window.YoastSEO.analysis={},window.YoastSEO.analysis.worker=function(){const e=(0,a.get)(window,["wpseoScriptData","analysis","worker","url"],"analysis-worker.js"),t=(0,O.createWorker)(e),s=(0,a.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 n=t.innerHTML.slice(214),o=n.indexOf(","),a=n.slice(0,o-1);try{const e=JSON.parse(n.slice(o+1,-4));i.push([a,e])}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 O.AnalysisWorkerWrapper(t)}(),window.YoastSEO.analysis.collectData=()=>function(e,t,s,i,n){const o=(0,a.cloneDeep)(t.getState());(0,a.merge)(o,s.getData());const r=e.getData();let c=null;n&&(c=n.getBlocks()||[],c=c.filter((e=>e.isValid)));const d={text:r.content,textTitle:r.title,keyword:o.focusKeyword,synonyms:o.synonyms,description:o.analysisData.snippet.description||o.snippetEditor.data.description,title:o.analysisData.snippet.title||o.snippetEditor.data.title,slug:o.snippetEditor.data.slug,permalink:o.settings.snippetEditor.baseUrl+o.snippetEditor.data.slug,wpBlocks:c,date:o.settings.snippetEditor.date};i.loaded&&(d.title=i._applyModifications("data_page_title",d.title),d.title=i._applyModifications("title",d.title),d.description=i._applyModifications("data_meta_desc",d.description),d.text=i._applyModifications("content",d.text),d.wpBlocks=i._applyModifications("wpBlocks",d.wpBlocks));const l=o.analysisData.snippet.filteredSEOTitle;return d.titleWidth=Oe(l||o.snippetEditor.data.title),d.locale=fe(),d.writingDirection=function(){let e="LTR";return we().isRtl&&(e="RTL"),e}(),d.shortcodes=window.wpseoScriptData.analysis.plugins.shortcodes?window.wpseoScriptData.analysis.plugins.shortcodes.wpseo_shortcode_tags:[],O.Paper.parse((0,ae.applyFilters)("yoast.analysis.data",d))}(s,window.YoastSEO.store,o,window.YoastSEO.app.pluggable),window.YoastSEO.analysis.applyMarks=(e,t)=>function(){const e=(0,c.select)("yoast-seo/editor").isMarkingAvailable(),t=(0,c.select)("yoast-seo/editor").getMarkerPauseStatus();return!e||t?a.noop:Xe}()(e,t),window.YoastSEO.app.refresh=(0,a.debounce)((()=>xe(window.YoastSEO.analysis.worker,window.YoastSEO.analysis.collectData,window.YoastSEO.analysis.applyMarks,window.YoastSEO.store,u)),500),window.YoastSEO.app.registerCustomDataCallback=o.register,window.YoastSEO.app.pluggable=new Q(window.YoastSEO.app.refresh),window.YoastSEO.app.registerPlugin=window.YoastSEO.app.pluggable._registerPlugin,window.YoastSEO.app.pluginReady=window.YoastSEO.app.pluggable._ready,window.YoastSEO.app.pluginReloaded=window.YoastSEO.app.pluggable._reloaded,window.YoastSEO.app.registerModification=window.YoastSEO.app.pluggable._registerModification,window.YoastSEO.app.registerAssessment=(e,t,s)=>{if(!(0,a.isUndefined)(i.seoAssessor))return window.YoastSEO.app.pluggable._registerAssessment(i.defaultSeoAssessor,e,t,s)&&window.YoastSEO.app.pluggable._registerAssessment(i.cornerStoneSeoAssessor,e,t,s)},window.YoastSEO.app.changeAssessorOptions=function(e){window.YoastSEO.analysis.worker.initialize(e).catch(Se),window.YoastSEO.app.refresh()},function(e,t,s){const i=we();if(!i.previouslyUsedKeywordActive)return;const n=new et("get_term_keyword_usage",i,e,(0,a.get)(window,["wpseoScriptData","analysis","worker","keywords_assessment_url"],"used-keywords-assessment.js"),(0,a.get)(window,["wpseoScriptData","usedKeywordsNonce"],""));n.init();let o={};s.subscribe((()=>{const e=s.getState()||{};e.focusKeyword!==o.focusKeyword&&(o=e,n.setKeyword(e.focusKeyword))}))}(i.refresh,0,t),t.subscribe(p.bind(null,t,i.refresh)),_e()&&(i.seoAssessor=new O.TaxonomyAssessor(i.config.researcher),i.seoAssessorPresenter.assessor=i.seoAssessor),window.YoastSEO.wp={},window.YoastSEO.wp.replaceVarsPlugin=new oe(i,t),function(e,t){let s=[];s=(0,ae.applyFilters)("yoast.analysis.shortcodes",s);const i=wpseoScriptData.analysis.plugins.shortcodes.wpseo_shortcode_tags;s=s.filter((e=>i.includes(e))),s.length>0&&(t.dispatch(ue(s)),window.YoastSEO.wp.shortcodePlugin=new le({registerPlugin:e.registerPlugin,registerModification:e.registerModification,pluginReady:e.pluginReady,pluginReloaded:e.pluginReloaded},s))}(i,t),window.YoastSEO.analyzerArgs=l,(n=e("#slug")).on("change",r),u.bindElementEvents((0,a.debounce)((()=>xe(window.YoastSEO.analysis.worker,window.YoastSEO.analysis.collectData,window.YoastSEO.analysis.applyMarks,window.YoastSEO.store,u)),500)),_e()&&(he(b=Te(e("#hidden_wpseo_linkdex").val())),ge(b)),me()&&function(){var t=Te(e("#hidden_wpseo_content_score").val());he(t),ge(t)}(),be()&&function(){const t=Te(e("#hidden_wpseo_inclusive_language_score").val());he(t),ge(t)}(),window.YoastSEO.analysis.worker.initialize(function(e={}){let t={locale:fe(),contentAnalysisActive:me(),keywordAnalysisActive:_e(),inclusiveLanguageAnalysisActive:be(),defaultQueryParams:(0,a.get)(window,["wpseoAdminL10n","default_query_params"],{}),logLevel:(0,a.get)(window,["wpseoScriptData","analysis","worker","log_level"],"ERROR"),enabledFeatures:(0,ve.enabledFeatures)()};t=(0,a.merge)(t,e);const s=ye();return(0,a.isUndefined)(s)||(0,a.isUndefined)(s.domain)||(t.translations=s),t}({useTaxonomy:!0})).then((()=>{jQuery(window).trigger("YoastSEO:ready")})).catch(Se),d(i);const v=i.initAssessorPresenters.bind(i);i.initAssessorPresenters=function(){v(),d(i)};let S={title:(E=u).getSnippetTitle(),slug:E.getSnippetCite(),description:E.getSnippetMeta()};var E;!function(e){const s=document.getElementById("hidden_wpseo_is_cornerstone");let i="1"===s.value;t.dispatch(nt(i)),e.changeAssessorOptions({useCornerstone:i}),t.subscribe((()=>{const n=t.getState();n.isCornerstone!==i&&(i=n.isCornerstone,s.value=i?"1":"0",e.changeAssessorOptions({useCornerstone:i}))}))}(i);const k=function(e){const t={};if((0,a.isUndefined)(e))return t;t.title=e.title_template;const s=e.metadesc_template;return(0,a.isEmpty)(s)||(t.description=s),t}(wpseoScriptData.metabox);S=function(e,t){const s={...e};return(0,a.forEach)(t,((t,i)=>{(0,a.has)(e,i)&&""===e[i]&&(s[i]=t)})),s}(S,k),t.dispatch(st(S));let x=t.getState().focusKeyword;z(window.YoastSEO.analysis.worker.runResearch,window.YoastSEO.store,x);const R=(0,a.debounce)((()=>{i.refresh()}),50);t.subscribe((()=>{const e=t.getState().focusKeyword;x!==e&&(x=e,z(window.YoastSEO.analysis.worker.runResearch,window.YoastSEO.store,x),document.getElementById("hidden_wpseo_focuskw").value=x,R());const s=function(e){const t=e.getState().snippetEditor.data;return{title:t.title,slug:t.slug,description:t.description}}(t),i=function(e,t){const s={...e};return(0,a.forEach)(t,((t,i)=>{(0,a.has)(e,i)&&e[i].trim()===t&&(s[i]="")})),s}(s,k);S.title!==s.title&&u.setDataFromSnippet(i.title,"snippet_title"),S.slug!==s.slug&&u.setDataFromSnippet(i.slug,"snippet_cite"),S.description!==s.description&&u.setDataFromSnippet(i.description,"snippet_meta"),S.title=s.title,S.slug=s.slug,S.description=s.description})),Ee=!0,window.YoastSEO.app.refresh()}()}window.yoastHideMarkers=!0,window.YoastReplaceVarPlugin=oe,window.YoastShortcodePlugin=pe;let dt=null;const lt=()=>{if(null===dt){const e=(0,c.dispatch)("yoast-seo/editor").runAnalysis;dt=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new Q(e)}return dt},pt=(e,t,s)=>lt().loaded?lt()._applyModifications(e,t,s):t;function ut(){const{getAnalysisData:e,getEditorDataTitle:t}=(0,c.select)("yoast-seo/editor");let s=e();s={...s,textTitle:t()};const i=function(e){return e.title=pt("data_page_title",e.title),e.title=pt("title",e.title),e.description=pt("data_meta_desc",e.description),e.text=pt("content",e.text),e}(s);return(0,ae.applyFilters)("yoast.analysis.data",i)}(0,a.debounce)((async function(e,t){const{text:s,...i}=t,n=new O.Paper(s,i);try{const t=await e.analyze(n),{seo:s,readability:i,inclusiveLanguage:o}=t.result;if(s){const e=s[""];e.results.forEach((e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(n,e.marks)})),e.results=ke(e.results),(0,c.dispatch)("yoast-seo/editor").setSeoResultsForKeyword(n.getKeyword(),e.results),(0,c.dispatch)("yoast-seo/editor").setOverallSeoScore(e.score,n.getKeyword())}i&&(i.results.forEach((e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(n,e.marks)})),i.results=ke(i.results),(0,c.dispatch)("yoast-seo/editor").setReadabilityResults(i.results),(0,c.dispatch)("yoast-seo/editor").setOverallReadabilityScore(i.score)),o&&(o.results.forEach((e=>{e.getMarker=()=>()=>window.YoastSEO.analysis.applyMarks(n,e.marks)})),o.results=ke(o.results),(0,c.dispatch)("yoast-seo/editor").setInclusiveLanguageResults(o.results),(0,c.dispatch)("yoast-seo/editor").setOverallInclusiveLanguageScore(o.score)),(0,ae.doAction)("yoast.analysis.run",t,{paper:n})}catch(e){}}),500);const ht=()=>{const{getContentLocale:e}=(0,c.select)("yoast-seo/editor"),t=((...e)=>()=>e.map((e=>e())))(e,ut),s=(()=>{const{setEstimatedReadingTime:e,setFleschReadingEase:t,setTextLength:s}=(0,c.dispatch)("yoast-seo/editor"),i=(0,a.get)(window,"YoastSEO.analysis.worker.runResearch",a.noop);return()=>{const n=O.Paper.parse(ut());i("readingTime",n).then((t=>e(t.result))),i("getFleschReadingScore",n).then((e=>{e.result&&t(e.result)})),i("wordCountInText",n).then((e=>s(e.result)))}})();return setTimeout(s,1500),((e,t)=>{let s=e();return()=>{const i=e();(0,a.isEqual)(i,s)||(s=i,t((0,a.clone)(i)))}})(t,s)};i()((()=>{window.wpseoTermScraperL10n=window.wpseoScriptData.metabox,function(e){function t(){e("#copy-home-meta-description").on("click",(function(){e("#open_graph_frontpage_desc").val(e("#meta_description").val())}))}function s(){var t=e("#wpseo-conf");if(t.length){var s=t.attr("action").split("#")[0];t.attr("action",s+window.location.hash)}}function i(){var t=window.location.hash.replace("#top#","");-1!==t.search("#top")&&(t=window.location.hash.replace("#top%23","")),""!==t&&"#"!==t.charAt(0)||(t=e(".wpseotab").attr("id")),e("#"+t).addClass("active"),e("#"+t+"-tab").addClass("nav-tab-active").trigger("click")}function n(t){const s=e("#noindex-author-noposts-wpseo-container");t?s.show():s.hide()}e.fn._wpseoIsInViewport=function(){const t=e(this).offset().top,s=t+e(this).outerHeight(),i=e(window).scrollTop(),n=i+e(window).height();return t>i&&s<n},e(window).on("hashchange",(function(){i(),s()})),window.setWPOption=function(t,s,i,n){e.post(ajaxurl,{action:"wpseo_set_option",option:t,newval:s,_wpnonce:n},(function(t){t&&e("#"+i).hide()}))},window.wpseoCopyHomeMeta=t,window.wpseoSetTabHash=s,e(document).ready((function(){s(),"function"==typeof window.wpseoRedirectOldFeaturesTabToNewSettings&&window.wpseoRedirectOldFeaturesTabToNewSettings(),e("#disable-author input[type='radio']").on("change",(function(){e(this).is(":checked")&&e("#author-archives-titles-metas-content").toggle("off"===e(this).val())})).trigger("change");const o=e("#noindex-author-wpseo-off"),c=e("#noindex-author-wpseo-on");o.is(":checked")||n(!1),c.on("change",(()=>{e(this).is(":checked")||n(!1)})),o.on("change",(()=>{e(this).is(":checked")||n(!0)})),e("#disable-date input[type='radio']").on("change",(function(){e(this).is(":checked")&&e("#date-archives-titles-metas-content").toggle("off"===e(this).val())})).trigger("change"),e("#disable-attachment input[type='radio']").on("change",(function(){e(this).is(":checked")&&e("#media_settings").toggle("off"===e(this).val())})).trigger("change"),e("#disable-post_format").on("change",(function(){e("#post_format-titles-metas").toggle(e(this).is(":not(:checked)"))})).trigger("change"),e("#zapier_integration_active input[type='radio']").on("change",(function(){e(this).is(":checked")&&e("#zapier-connection").toggle("on"===e(this).val())})).trigger("change"),e("#wpseo-tabs").find("a").on("click",(function(t){var s,i,n,o=!0;if(s=e(this),i=!!e("#first-time-configuration-tab").filter(".nav-tab-active").length,n=!!s.filter("#first-time-configuration-tab").length,i&&!n&&window.isStepBeingEdited&&(o=confirm((0,r.__)("There are unsaved changes in one or more steps. Leaving means that those changes may not be saved. Are you sure you want to leave?","wordpress-seo"))),o){window.isStepBeingEdited=!1,e("#wpseo-tabs").find("a").removeClass("nav-tab-active"),e(".wpseotab").removeClass("active");var a=e(this).attr("id").replace("-tab",""),c=e("#"+a);c.addClass("active"),e(this).addClass("nav-tab-active"),c.hasClass("nosave")?e("#wpseo-submit-container").hide():e("#wpseo-submit-container").show(),e(window).trigger("yoast-seo-tab-change"),"first-time-configuration"===a?(e(".notice-yoast").slideUp(),e(".yoast_premium_upsell").slideUp(),e("#sidebar-container").hide()):(e(".notice-yoast").slideDown(),e(".yoast_premium_upsell").slideDown(),e("#sidebar-container").show())}else t.preventDefault(),e("#first-time-configuration-tab").trigger("focus")})),e("#yoast-first-time-configuration-notice a").on("click",(function(){e("#first-time-configuration-tab").click()})),e("#company_or_person").on("change",(function(){var t=e(this).val();"company"===t?(e("#knowledge-graph-company").show(),e("#knowledge-graph-person").hide()):"person"===t?(e("#knowledge-graph-company").hide(),e("#knowledge-graph-person").show()):(e("#knowledge-graph-company").hide(),e("#knowledge-graph-person").hide())})).trigger("change"),e(".switch-yoast-seo input").on("keydown",(function(e){"keydown"===e.type&&13===e.which&&e.preventDefault()})),e("body").on("click","button.toggleable-container-trigger",(t=>{const s=e(t.currentTarget),i=s.parent().siblings(".toggleable-container");i.toggleClass("toggleable-container-hidden"),s.attr("aria-expanded",!i.hasClass("toggleable-container-hidden")).find("span").toggleClass("dashicons-arrow-up-alt2 dashicons-arrow-down-alt2")}));const d=e("#opengraph"),l=e("#wpseo-opengraph-settings");d.length&&l.length&&(l.toggle(d[0].checked),d.on("change",(e=>{l.toggle(e.target.checked)}))),t(),i(),function(){if(!e("#enable_xml_sitemap input[type=radio]").length)return;const t=e("#yoast-seo-sitemaps-disabled-warning");e("#enable_xml_sitemap input[type=radio]").on("change",(function(){"off"===this.value?t.show():t.hide()}))}(),function(){const t=e("#wpseo-submit-container-float"),s=e("#wpseo-submit-container-fixed");if(!t.length||!s.length)return;function i(){t._wpseoIsInViewport()?s.hide():s.show()}e(window).on("resize scroll",(0,a.debounce)(i,100)),e(window).on("yoast-seo-tab-change",i);const n=e(".wpseo-message");n.length&&window.setTimeout((()=>{n.fadeOut()}),5e3),i()}(),"undefined"!=typeof ClipboardJS&&new ClipboardJS("#copy-zapier-api-key").on("success",(function(t){t.clearSelection(),e(t.trigger).trigger("focus")}))}))}(o()),function(e){function t(e){e&&(e.focus(),e.click())}function s(){if(e(".wpseo-meta-section").length>0){const t=e(".wpseo-meta-section-link");e(".wpseo-metabox-menu li").filter((function(){return"#wpseo-meta-section-content"===e(this).find(".wpseo-meta-section-link").attr("href")})).addClass("active").find("[role='tab']").addClass("yoast-active-tab"),e("#wpseo-meta-section-content, .wpseo-meta-section-react").addClass("active"),t.on("click",(function(s){var i=e(this).attr("id"),n=e(this).attr("href"),o=e(n);s.preventDefault(),e(".wpseo-metabox-menu li").removeClass("active").find("[role='tab']").removeClass("yoast-active-tab"),e(".wpseo-meta-section").removeClass("active"),e(".wpseo-meta-section-react.active").removeClass("active"),"#wpseo-meta-section-content"===n&&e(".wpseo-meta-section-react").addClass("active"),o.addClass("active"),e(this).parent("li").addClass("active").find("[role='tab']").addClass("yoast-active-tab");const a=function(e,t={}){return new CustomEvent("YoastSEO:metaTabChange",{detail:t})}(0,{metaTabId:i});window.dispatchEvent(a),this&&(t.attr({"aria-selected":"false",tabIndex:"-1"}),this.removeAttribute("tabindex"),this.setAttribute("aria-selected","true"))}))}}window.wpseoInitTabs=s,window.wpseo_init_tabs=s,e(".wpseo-meta-section").each((function(t,s){e(s).find(".wpseotab:first").addClass("active")})),window.wpseo_init_tabs(),function(){const s=e(".yoast-aria-tabs"),i=s.find("[role='tab']"),n=s.attr("aria-orientation")||"horizontal";i.attr({"aria-selected":!1,tabIndex:"-1"}),i.filter(".yoast-active-tab").removeAttr("tabindex").attr("aria-selected","true"),i.on("keydown",(function(s){-1!==[32,35,36,37,38,39,40].indexOf(s.which)&&("horizontal"===n&&-1!==[38,40].indexOf(s.which)||"vertical"===n&&-1!==[37,39].indexOf(s.which)||function(s,i){const n=s.which,o=i.index(e(s.target));switch(n){case 32:s.preventDefault(),t(i[o]);break;case 35:s.preventDefault(),t(i[i.length-1]);break;case 36:s.preventDefault(),t(i[0]);break;case 37:case 38:s.preventDefault(),t(i[o-1<0?i.length-1:o-1]);break;case 39:case 40:s.preventDefault(),t(i[o+1===i.length?0:o+1])}}(s,i))}))}()}(o());const e=function(){const e=(0,c.registerStore)("yoast-seo/editor",{reducer:(0,c.combineReducers)(d.reducers),selectors:d.selectors,actions:(0,a.pickBy)(d.actions,(e=>"function"==typeof e)),controls:t});return(e=>{e.dispatch(d.actions.setSettings({socialPreviews:{sitewideImage:window.wpseoScriptData.metabox.sitewide_social_image,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}})),e.dispatch(d.actions.setSEMrushChangeCountry(window.wpseoScriptData.metabox.countryCode)),e.dispatch(d.actions.setSEMrushLoginStatus(window.wpseoScriptData.metabox.SEMrushLoginStatus)),e.dispatch(d.actions.setWincherLoginStatus(window.wpseoScriptData.metabox.wincherLoginStatus,!1)),e.dispatch(d.actions.setWincherWebsiteId(window.wpseoScriptData.metabox.wincherWebsiteId)),e.dispatch(d.actions.setWincherAutomaticKeyphaseTracking(window.wpseoScriptData.metabox.wincherAutoAddKeyphrases)),e.dispatch(d.actions.setDismissedAlerts((0,a.get)(window,"wpseoScriptData.dismissedAlerts",{}))),e.dispatch(d.actions.setCurrentPromotions((0,a.get)(window,"wpseoScriptData.currentPromotions",[]))),e.dispatch(d.actions.setIsPremium(Boolean((0,a.get)(window,"wpseoScriptData.metabox.isPremium",!1)))),e.dispatch(d.actions.setPostId(Number((0,a.get)(window,"wpseoScriptData.postId",null)))),e.dispatch(d.actions.setLinkParams((0,a.get)(window,"wpseoScriptData.linkParams",{}))),e.dispatch(d.actions.setPluginUrl((0,a.get)(window,"wpseoScriptData.pluginUrl",""))),e.dispatch(d.actions.setWistiaEmbedPermissionValue("1"===(0,a.get)(window,"wpseoScriptData.wistiaEmbedPermission",!1)))})(e),e}();window.yoast.initEditorIntegration(e);const s=new window.yoast.EditorData(a.noop,e,L);s.initialize(window.wpseoScriptData.analysis.plugins.replaceVars.replace_vars),ct(o(),e,s),function(e){e(document).ready((function(e){void 0!==wp.media&&e(".wpseo_image_upload_button").each((function(t,s){const i=function(t){let s=(t=e(t)).data("target");return s&&""!==s||(s=e(t).attr("id").replace(/_button$/,"")),s}(s),n=e(s).data("target-id"),o=e("#"+i),a=e("#"+n);var r=wp.media.frames.file_frame=wp.media({title:wpseoScriptData.media.choose_image,button:{text:wpseoScriptData.media.choose_image},multiple:!1,library:{type:"image"}});r.on("select",(function(){var e=r.state().get("selection").first().toJSON();o.val(e.url),a.val(e.id)}));const c=e(s);c.click((function(e){e.preventDefault(),r.open()})),c.siblings(".wpseo_image_remove_button").on("click",(e=>{e.preventDefault(),o.val(""),a.val("")}))}))}))}(o()),(()=>{if((0,c.select)("yoast-seo/editor").getPreference("isInsightsEnabled",!1))(0,c.dispatch)("yoast-seo/editor").loadEstimatedReadingTime(),(0,c.subscribe)((0,a.debounce)(ht(),1500,{maxWait:3e3}))})()}))})();
Copyright ©2021 || Defacer Indonesia