import{s as Ue}from"./js/client.e62d6c37.js";import"./js/_commonjsHelpers.f84db168.js";var T={},Ge={get exports(){return T},set exports(e){T=e}},A={};/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var re=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;function Je(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Ke(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(l){return t[l]});if(o.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(l){a[l]=l}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Qe=Ke()?Object.assign:function(e,t){for(var r,o=Je(e),a,l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var i in r)qe.call(r,i)&&(o[i]=r[i]);if(re){a=re(r);for(var s=0;s<a.length;s++)Ye.call(r,a[s])&&(o[a[s]]=r[a[s]])}}return o},J={},Xe={get exports(){return J},set exports(e){J=e}},u={};/** @license React v17.0.2
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var X=Qe,E=60103,fe=60106;u.Fragment=60107;u.StrictMode=60108;u.Profiler=60114;var we=60109,me=60110,ye=60112;u.Suspense=60113;var pe=60115,ge=60116;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;E=b("react.element"),fe=b("react.portal"),u.Fragment=b("react.fragment"),u.StrictMode=b("react.strict_mode"),u.Profiler=b("react.profiler"),we=b("react.provider"),me=b("react.context"),ye=b("react.forward_ref"),u.Suspense=b("react.suspense"),pe=b("react.memo"),ge=b("react.lazy")}var oe=typeof Symbol=="function"&&Symbol.iterator;function en(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ve={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},be={};function R(e,t,r){this.props=e,this.context=t,this.refs=be,this.updater=r||ve}R.prototype.isReactComponent={};R.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(L(85));this.updater.enqueueSetState(this,e,t,"setState")};R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ce(){}Ce.prototype=R.prototype;function ee(e,t,r){this.props=e,this.context=t,this.refs=be,this.updater=r||ve}var ne=ee.prototype=new Ce;ne.constructor=ee;X(ne,R.prototype);ne.isPureReactComponent=!0;var ae={current:null},_e=Object.prototype.hasOwnProperty,ze={key:!0,ref:!0,__self:!0,__source:!0};function Se(e,t,r){var o,a={},l=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(l=""+t.key),t)_e.call(t,o)&&!ze.hasOwnProperty(o)&&(a[o]=t[o]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var c=Array(s),w=0;w<s;w++)c[w]=arguments[w+2];a.children=c}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)a[o]===void 0&&(a[o]=s[o]);return{$$typeof:E,type:e,key:l,ref:i,props:a,_owner:ae.current}}function nn(e,t){return{$$typeof:E,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function an(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var le=/\/+/g;function Z(e,t){return typeof e=="object"&&e!==null&&e.key!=null?an(""+e.key):t.toString(36)}function V(e,t,r,o,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(l){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case E:case fe:i=!0}}if(i)return i=e,a=a(i),e=o===""?"."+Z(i,0):o,Array.isArray(a)?(r="",e!=null&&(r=e.replace(le,"$&/")+"/"),V(a,t,r,"",function(w){return w})):a!=null&&(te(a)&&(a=nn(a,r+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(le,"$&/")+"/")+e)),t.push(a)),1;if(i=0,o=o===""?".":o+":",Array.isArray(e))for(var s=0;s<e.length;s++){l=e[s];var c=o+Z(l,s);i+=V(l,t,r,c,a)}else if(c=en(e),typeof c=="function")for(e=c.call(e),s=0;!(l=e.next()).done;)l=l.value,c=o+Z(l,s++),i+=V(l,t,r,c,a);else if(l==="object")throw t=""+e,Error(L(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return i}function B(e,t,r){if(e==null)return e;var o=[],a=0;return V(e,o,"","",function(l){return t.call(r,l,a++)}),o}function tn(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(r){e._status===0&&(r=r.default,e._status=1,e._result=r)},function(r){e._status===0&&(e._status=2,e._result=r)})}if(e._status===1)return e._result;throw e._result}var ke={current:null};function z(){var e=ke.current;if(e===null)throw Error(L(321));return e}var rn={ReactCurrentDispatcher:ke,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:ae,IsSomeRendererActing:{current:!1},assign:X};u.Children={map:B,forEach:function(e,t,r){B(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return B(e,function(){t++}),t},toArray:function(e){return B(e,function(t){return t})||[]},only:function(e){if(!te(e))throw Error(L(143));return e}};u.Component=R;u.PureComponent=ee;u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rn;u.cloneElement=function(e,t,r){if(e==null)throw Error(L(267,e));var o=X({},e.props),a=e.key,l=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,i=ae.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)_e.call(t,c)&&!ze.hasOwnProperty(c)&&(o[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){s=Array(c);for(var w=0;w<c;w++)s[w]=arguments[w+2];o.children=s}return{$$typeof:E,type:e.type,key:a,ref:l,props:o,_owner:i}};u.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:me,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:we,_context:e},e.Consumer=e};u.createElement=Se;u.createFactory=function(e){var t=Se.bind(null,e);return t.type=e,t};u.createRef=function(){return{current:null}};u.forwardRef=function(e){return{$$typeof:ye,render:e}};u.isValidElement=te;u.lazy=function(e){return{$$typeof:ge,_payload:{_status:-1,_result:e},_init:tn}};u.memo=function(e,t){return{$$typeof:pe,type:e,compare:t===void 0?null:t}};u.useCallback=function(e,t){return z().useCallback(e,t)};u.useContext=function(e,t){return z().useContext(e,t)};u.useDebugValue=function(){};u.useEffect=function(e,t){return z().useEffect(e,t)};u.useImperativeHandle=function(e,t,r){return z().useImperativeHandle(e,t,r)};u.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)};u.useMemo=function(e,t){return z().useMemo(e,t)};u.useReducer=function(e,t,r){return z().useReducer(e,t,r)};u.useRef=function(e){return z().useRef(e)};u.useState=function(e){return z().useState(e)};u.version="17.0.2";(function(e){e.exports=u})(Xe);/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var on=J,Pe=60103;A.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;Pe=se("react.element"),A.Fragment=se("react.fragment")}var ln=on.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sn=Object.prototype.hasOwnProperty,cn={key:!0,ref:!0,__self:!0,__source:!0};function Ne(e,t,r){var o,a={},l=null,i=null;r!==void 0&&(l=""+r),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)sn.call(t,o)&&!cn.hasOwnProperty(o)&&(a[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)a[o]===void 0&&(a[o]=t[o]);return{$$typeof:Pe,type:e,key:l,ref:i,props:a,_owner:ln.current}}A.jsx=Ne;A.jsxs=Ne;(function(e){e.exports=A})(Ge);const K=T.Fragment,n=T.jsx,d=T.jsxs,g={};g.headline=d("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.817 2H22v.038l-6.183 4.226V2.001zm-7.62 9.473V2H2.016v4.683-.267l6.126 5.094.057-.038zm-6.182 5.061l6.183 4.213v1.252H2.015v-5.465zm13.802-.857L22 11.559v10.437h-6.183v-6.32z",fill:"#F18200"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.198 11.435l-.057.039L2.016 6.38v.265-4.644h6.182v9.434zm0 9.226L2.015 16.45v5.55h6.183v-1.337zm7.62-5.07L22 11.474v10.522h-6.183v-6.405zM22 2.001l-6.183 4.226V2H22z",fill:"#F18200"}),n("path",{d:"M8.141 13.537L22 4.064v5.432l-13.8 9.19L2 14.46l.016-6.018 6.125 5.094z",fill:"#F18200"})]});g.headlineBlack=n("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{d:"M13.5 2V12H14.5C14.6458 12 14.7604 12.0521 14.8438 12.1562C14.9479 12.2396 15 12.3542 15 12.5V13.5C15 13.6458 14.9479 13.7604 14.8438 13.8438C14.7604 13.9479 14.6458 14 14.5 14H9.5C9.35417 14 9.22917 13.9479 9.125 13.8438C9.04167 13.7604 9 13.6458 9 13.5V12.5C9 12.3542 9.04167 12.2396 9.125 12.1562C9.22917 12.0521 9.35417 12 9.5 12H10.5V8H4.5V12H5.5C5.64583 12 5.76042 12.0521 5.84375 12.1562C5.94792 12.2396 6 12.3542 6 12.5V13.5C6 13.6458 5.94792 13.7604 5.84375 13.8438C5.76042 13.9479 5.64583 14 5.5 14H0.5C0.354167 14 0.229167 13.9479 0.125 13.8438C0.0416667 13.7604 0 13.6458 0 13.5V12.5C0 12.3542 0.0416667 12.2396 0.125 12.1562C0.229167 12.0521 0.354167 12 0.5 12H1.5V2H0.5C0.354167 2 0.229167 1.95833 0.125 1.875C0.0416667 1.77083 0 1.64583 0 1.5V0.5C0 0.354167 0.0416667 0.239583 0.125 0.15625C0.229167 0.0520833 0.354167 0 0.5 0H5.5C5.64583 0 5.76042 0.0520833 5.84375 0.15625C5.94792 0.239583 6 0.354167 6 0.5V1.5C6 1.64583 5.94792 1.77083 5.84375 1.875C5.76042 1.95833 5.64583 2 5.5 2H4.5V6H10.5V2H9.5C9.35417 2 9.22917 1.95833 9.125 1.875C9.04167 1.77083 9 1.64583 9 1.5V0.5C9 0.354167 9.04167 0.239583 9.125 0.15625C9.22917 0.0520833 9.35417 0 9.5 0H14.5C14.6458 0 14.7604 0.0520833 14.8438 0.15625C14.9479 0.239583 15 0.354167 15 0.5V1.5C15 1.64583 14.9479 1.77083 14.8438 1.875C14.7604 1.95833 14.6458 2 14.5 2H13.5Z",fill:"#000"})});g.warning=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM11 5.00002H9V11H11V5.00002ZM11 13H9V15H11V13ZM2.00002 10C2.00002 14.42 5.58002 18 10 18C14.42 18 18 14.42 18 10C18 5.58002 14.42 2.00002 10 2.00002C5.58002 2.00002 2.00002 5.58002 2.00002 10Z",fill:"#005AE0"})});g.smile=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM6.5 6C5.67157 6 5 6.67157 5 7.5C5 8.32843 5.67157 9 6.5 9C7.32843 9 8 8.32843 8 7.5C8 6.67157 7.32843 6 6.5 6ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM6.55 12C7.25 13.19 8.52 14 10 14C11.48 14 12.75 13.19 13.45 12H15.12C14.32 14.05 12.33 15.5 10 15.5C7.67 15.5 5.68 14.05 4.88 12H6.55ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#00AA63"})});g.neutral=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM5 7.5C5 6.67157 5.67157 6 6.5 6C7.32843 6 8 6.67157 8 7.5C8 8.32843 7.32843 9 6.5 9C5.67157 9 5 8.32843 5 7.5ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM7 13.5V12H13V13.5H7ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#005AE0"})});g.negative=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99 0C4.47 0 0 4.48 0 10C0 15.52 4.47 20 9.99 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 9.99 0ZM6.5 6C5.67157 6 5 6.67157 5 7.5C5 8.32843 5.67157 9 6.5 9C7.32843 9 8 8.32843 8 7.5C8 6.67157 7.32843 6 6.5 6ZM13.5 6C12.6716 6 12 6.67157 12 7.5C12 8.32843 12.6716 9 13.5 9C14.3284 9 15 8.32843 15 7.5C15 6.67157 14.3284 6 13.5 6ZM4.88 15.5C5.68 13.45 7.67 12 10 12C12.33 12 14.32 13.45 15.12 15.5H13.45C12.75 14.31 11.48 13.5 10 13.5C8.52 13.5 7.24 14.31 6.55 15.5H4.88ZM2 10C2 14.42 5.58 18 10 18C14.42 18 18 14.42 18 10C18 5.58 14.42 2 10 2C5.58 2 2 5.58 2 10Z",fill:"#DF2A4A"})});g.check=n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18ZM8 12.17L14.59 5.58L16 7L8 15L4 11L5.41 9.59L8 12.17Z",fill:"#00AA63"})});const $e=e=>Ue.agent().set("X-WP-Nonce",e).use(t=>{t.on("response",r=>{(r.status===401||r.status===403)&&console.error(r)})}),dn=e=>e.replace(/^\//,""),xe=e=>e.replace(/\/$/,""),U=e=>xe(e)+"/",He=e=>(e=window.aioseo.data.hasUrlTrailingSlash?U(e):xe(e),U(window.aioseo.urls.restUrl)+U("aioseo/v1")+dn(e));var Q={},un={get exports(){return Q},set exports(e){Q=e}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o=[],a=0;a<arguments.length;a++){var l=arguments[a];if(l){var i=typeof l;if(i==="string"||i==="number")o.push(l);else if(Array.isArray(l)){if(l.length){var s=r.apply(null,l);s&&o.push(s)}}else if(i==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){o.push(l.toString());continue}for(var c in l)t.call(l,c)&&l[c]&&o.push(c)}}}return o.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(un);const p=Q,{Fragment:hn}=window.wp.element,Oe=e=>{const t=e.barScore,r=e.color;return n(hn,{children:n("div",{className:"aioseo-donut-container",style:{flexDirection:"column"},children:d("svg",{className:"aioseo-donut-score-svg",viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg",children:[n("circle",{className:"aioseo-seo-headline-analyzer-score__background",stroke:"#e8e8eb",strokeWidth:"2",fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"}),n("circle",{className:"aioseo-seo-headline-analyzer-score__circle",stroke:r,strokeWidth:"2",strokeDasharray:`${t}, 100`,strokeLinecap:"round",fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"})]})})})},{__:I,sprintf:W}=window.wp.i18n,fn=W(I("Headlines that are lists and how-to get more engagement on average than other types of headlines. %1$s%2$sLearn More%3$s →","all-in-one-seo-pack"),"<br /><br />",'<a href="https://optinmonster.com/why-these-21-headlines-went-viral-and-how-you-can-copy-their-success/" target="_blank" className="aioseo-headline-analyzer-link"><span>',"</span></a>"),De=W(I("A very good score is between %1$d and %2$d.","all-in-one-seo-pack"),70,90),Ee=W(I("For best results, you should strive for %1$d and above.","all-in-one-seo-pack"),70),wn=W(I("This headline analyzer is part of AIOSEO to help you increase your traffic. %1$sAnalyze your site further here%2$s →%3$s","all-in-one-seo-pack"),W('<a href="%1$s" className="aioseo-headline-analyzer-link" target="_blank"><span>',window.aioseo.urls.aio.seoAnalysis),"</span>","</a>"),{__:O}=window.wp.i18n,{Fragment:mn}=window.wp.element,{PanelBody:yn,PanelRow:pn}=window.wp.components,D="all-in-one-seo-pack",gn=e=>{const t=e.analyzer.currentHeadlineData.sentence,r=O("Score",D),o=e.analyzer.currentHeadlineData.score,a=40>o?"red":70>=o?"orange":"green",l=a==="red"?"#df2a4a":a==="orange"?"#F2994A":"#00aa63";let i;switch(!0){case 25>o:i=n("span",{children:O("Not Looking Great",D)});break;case 50>o:i=n("span",{children:O("Could Be Better",D)});break;case 60>o:i=n("span",{children:O("Getting There",D)});break;case 75>o:i=n("span",{children:O("Looks Good! 👍👍",D)});break;case 75<o:i=n("span",{children:O("Super! 🔥🔥🔥",D)});break;default:i=!1}return n(mn,{children:n(yn,{className:"aioseo-headline-analyzer-panel-score",title:r,children:n(pn,{children:d("div",{className:"aioseo-headline-analyzer-current-score-tab aioseo-headline-analyzer-panel-first-block",children:[d("h4",{className:"aioseo-headline-analyzer-current-title",children:["“",t,"”"]}),d("div",{className:"aioseo-headline-analyzer-pie-chart-container",children:[d("div",{className:p("aioseo-headline-analyzer-current-score",a),children:[o,n("span",{className:"aioseo-headline-analyzer-total-out-of-score",children:"/ 100"})]}),i&&n("div",{className:p("aioseo-headline-analyzer-score-status",a),children:i}),n(Oe,{barScore:o,color:l})]}),d("p",{children:[De," ",Ee]})]})})})})},{__:G}=window.wp.i18n,{Fragment:vn}=window.wp.element,{PanelBody:bn,PanelRow:Cn,TextControl:_n,Button:zn}=window.wp.components,q="all-in-one-seo-pack",Sn=e=>{const t=G("Try New Headline",q),r=G("Enter a different headline than your post title to see how it compares.",q),o=G("Analyze Headline",q),a=typeof e.analyzer.newHeadline<"u"?e.analyzer.newHeadline:"",l=typeof e.analyzer.previousHeadlinesData<"u"?e.analyzer.previousHeadlinesData:[],i=!a,s=c=>{const w=c.trim();w&&$e(window.aioseo.nonce).post(He("analyze_headline")).send({headline:w,shouldStoreHeadline:!1}).then(f=>{const h=JSON.parse(f.body[Object.keys(f.body)[0]]);e.setAnalyzer({newHeadlineData:h,headlineData:h,previousHeadlinesData:[e.analyzer.headlineData,...l],isNewData:!0})}).catch(f=>{e.setAnalyzer({isNewData:!1}),console.log(f)})};return n(vn,{children:n(bn,{title:t,className:p("aioseo-headline-analyzer-panel-tab-new-score-form"),children:n(Cn,{children:n("div",{className:"aioseo-headline-analyzer-new-tab",children:n("div",{className:"aioseo-headline-analyzer-new-score-form-block",children:d("form",{onSubmit:c=>{c.preventDefault(),s(a)},children:[n(_n,{label:r,value:a,onChange:c=>{c!==" "&&e.setAnalyzer({newHeadline:c})},className:"aioseo-headline-analyzer-input-field"}),n(zn,{className:p("aioseo-headline-analyzer-button"),onClick:()=>{s(a)},disabled:i,children:o})]})})})})})})},{__:N}=window.wp.i18n,{Fragment:kn}=window.wp.element,{PanelBody:Pn,PanelRow:Nn}=window.wp.components,$="all-in-one-seo-pack",$n=e=>{const t=e.analyzer.currentHeadlineData.sentence,r=N("New Score",$),o=N("Current Score",$),a=typeof e.analyzer.newHeadlineData<"u"?e.analyzer.newHeadlineData.sentence:"",l=typeof e.analyzer.newHeadlineData<"u"?e.analyzer.newHeadlineData.score:"",i=typeof e.analyzer.currentHeadlineData.score<"u"?e.analyzer.currentHeadlineData.score:"",s=40>l?"red":60>=l?"orange":"green",c=s==="red"?"#df2a4a":s==="orange"?"#F2994A":"#00aa63",w=40>i?"red-bg":60>=i?"orange-bg":"green-bg",f=Math.abs(l-i);let h;switch(!0){case 25>l:h=n("span",{children:N("Not Looking Great",$)});break;case 50>l:h=n("span",{children:N("Could Be Better",$)});break;case 60>l:h=n("span",{children:N("Getting There",$)});break;case 75>l:h=n("span",{children:N("Looks Good! 👍👍",$)});break;case 75<l:h=n("span",{children:N("Super! 🔥🔥🔥",$)});break;default:h=!1}return n(kn,{children:n(Pn,{title:r,className:"aioseo-headline-analyzer-panel-tab-new-score",children:n(Nn,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:d("div",{className:"aioseo-headline-analyzer-new-score-panel",children:[d("p",{children:[De," ",Ee]}),d("h4",{children:["“",a,"”"]}),d("div",{className:"aioseo-headline-analyzer-pie-chart-container",children:[n("span",{className:p("aioseo-headline-analyzer-new-score",s),children:l}),n(Oe,{barScore:l,color:c}),d("span",{className:p("aioseo-headline-analyzer-score-difference",s),children:[l>i?"+ ":l===i?"":"- ",f]}),h&&n("div",{className:p("aioseo-headline-analyzer-score-status",s),children:h})]}),d("div",{className:"current-score",children:[n("span",{className:p("aioseo-headline-analyzer-score",w),children:i}),d("div",{className:"aioseo-headline-analyzer-current-score-content",children:[n("h5",{children:o}),n("p",{children:t})]})]})]})})})})})},{__:ie}=window.wp.i18n,{Fragment:xn,useState:Hn,useEffect:On}=window.wp.element,Dn=e=>{const t=ie("Current Score","all-in-one-seo-pack"),r=ie("Try New Headline","all-in-one-seo-pack"),[o,a]=Hn("current-score"),l=()=>a("current-score"),i=()=>a("new-headline"),s=typeof e.analyzer.isNewData<"u"?e.analyzer.isNewData:!1;return On(()=>{e.setAnalyzer({activeTab:o})},[o]),d(xn,{children:[d("div",{className:"aioseo-inline-buttons",children:[n("button",{onClick:l,className:p("aioseo-switcher-button",{active:o==="current-score"}),children:t}),n("button",{onClick:i,className:p("aioseo-switcher-button",{active:o==="new-headline"}),children:r})]}),o==="new-headline"?n(K,{children:n(Sn,{analyzer:e.analyzer,setAnalyzer:e.setAnalyzer})}):n(gn,{analyzer:e.analyzer}),s?n($n,{analyzer:e.analyzer}):""]})},{__:En}=window.wp.i18n,{Fragment:Rn}=window.wp.element,{PanelBody:Tn,PanelRow:Wn}=window.wp.components,An=e=>{const t=En("Previous Scores","all-in-one-seo-pack"),r=e.analyzer.previousHeadlinesData!=="undefined"?e.analyzer.previousHeadlinesData:[],o=document.querySelector(".edit-post-sidebar"),l=(e.analyzer.activeTab!=="undefined"?e.analyzer.activeTab:"current-score")==="current-score"?390:300,i=s=>{e.setAnalyzer({newHeadlineData:r[s],headlineData:r[s],newHeadline:r[s].sentence,isNewData:!0}),o&&(o.scrollTop=l)};return n(Rn,{children:n(Tn,{title:t,className:"aioseo-headline-analyzer-panel-previous-scores",children:n(Wn,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:n("ul",{className:"aioseo-headline-analyzer-previous-scores",children:r.map((s,c)=>{if(10>c&&(typeof s.sentence<"u"||typeof s.score<"u")){const w=40>s.score?"red-bg":60>=s.score?"orange-bg":"green-bg";return d("li",{onClick:()=>i(c),children:[n("span",{className:p("aioseo-headline-analyzer-score",w),children:s.score}),n("span",{className:"aioseo-headline-analyzer-score-text",children:s.sentence})]},c)}return null})})})})})})},{__:Ln}=window.wp.i18n,j=e=>{const t=Ln("Goal: ","all-in-one-seo-pack"),r={width:e.value+"%"};return d("div",{className:"aioseo-headline-analyzer-words-block",children:[n("h5",{children:e.title}),d("div",{className:"aioseo-headline-analyzer-words-block-data",children:[d("span",{className:p("aioseo-headline-analyzer-words-block-percentage",e.classOnScore),children:[e.value,"%"]}),d("span",{className:p("aioseo-headline-analyzer-words-block-percentage-right-column",e.classOnScore),children:[d("span",{className:"aioseo-headline-analyzer-words-block-goal",children:[t," ",e.goalValue]}),d("span",{className:"aioseo-headline-analyzer-words-block-progressbar",children:[n("span",{className:"aioseo-headline-analyzer-progressbar-bg"}),n("span",{className:p("aioseo-headline-analyzer-progressbar-part",e.classOnScoreBg),style:r})]})]})]}),n("ul",{className:"aioseo-headline-analyzer-words-tag-list",children:0<e.words.length?e.words.map((o,a)=>n("li",{children:o},a)):""}),n("p",{className:"aioseo-headline-analyzer-words-guideline",children:e.guideLine})]})},{__:m}=window.wp.i18n,{Fragment:Bn}=window.wp.element,{PanelBody:jn,PanelRow:Mn}=window.wp.components,y="all-in-one-seo-pack",Fn=e=>{const t=m("Word Balance",y),r=m("Compare the percentages of your results to the goal for each category and adjust as necessary.",y),o=e.data.score,a=40>e.data.score?"red":60>=e.data.score?"orange":"green",l=e.data.result.commonWordsPercentage===0?"red":.2>e.data.result.commonWordsPercentage?"orange":"green",i=e.data.result.commonWordsPercentage===0?"red-bg":.2>e.data.result.commonWordsPercentage?"orange-bg":"green-bg",s=.2>e.data.result.commonWordsPercentage?m("Your headline would be more likely to get clicks if it had more common words.",y):m("Headlines with 20-30% common words are more likely to get clicks.",y),c=e.data.result.uncommonWordsPercentage===0?"red":.1>e.data.result.uncommonWordsPercentage?"orange":"green",w=e.data.result.uncommonWordsPercentage===0?"red-bg":.1>e.data.result.uncommonWordsPercentage?"orange-bg":"green-bg",f=.1>e.data.result.uncommonWordsPercentage?m("Your headline would be more likely to get clicks if it had more uncommon words.",y):m("Headlines with uncommon words are more likely to get clicks.",y),h=e.data.result.emotionalWordsPercentage===0?"red":.1>e.data.result.emotionalWordsPercentage?"orange":"green",v=e.data.result.emotionalWordsPercentage===0?"red-bg":.1>e.data.result.emotionalWordsPercentage?"orange-bg":"green-bg",Re=m("Emotionally triggered headlines are likely to drive more clicks.",y),Te=e.data.result.powerWords.length===0?"orange":"green",We=e.data.result.powerWords.length===0?"orange":"green-bg",Ae=m("Headlines with power words are more likely to get clicks.",y),Le=m("Common Words",y),Be=m("20-30%",y),je=m("Uncommon Words",y),Me=m("10-20%",y),Fe=m("Emotional Words",y),Ve=m("10-15%",y),Ie=m("Power Words",y),Ze=m("At least one",y);let P;switch(!0){case 25>o:P=n("span",{children:m("Not Looking Great",y)});break;case 50>o:P=n("span",{children:m("Could Be Better",y)});break;case 60>o:P=n("span",{children:m("Getting There",y)});break;case 75>o:P=n("span",{children:m("Looks Good! 👍👍",y)});break;case 75<o:P=n("span",{children:m("Super! 🔥🔥🔥",y)});break;default:P=!1}return n(Bn,{children:n(jn,{title:t,className:p("aioseo-headline-analyzer-panel-word-balance","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:d(Mn,{children:[d("div",{className:"aioseo-headline-analyzer-words-block",children:[n("h4",{children:P}),n("p",{children:r})]}),n(j,{title:Le,value:Math.round(e.data.result.commonWordsPercentage*100),goalValue:Be,words:e.data.result.commonWords,guideLine:s,classOnScore:l,classOnScoreBg:i}),n(j,{title:je,value:Math.round(e.data.result.uncommonWordsPercentage*100),goalValue:Me,words:e.data.result.uncommonWords,guideLine:f,classOnScore:c,classOnScoreBg:w}),n(j,{title:Fe,value:Math.round(e.data.result.emotionalWordsPercentage*100),goalValue:Ve,words:e.data.result.emotionWords,guideLine:Re,classOnScore:h,classOnScoreBg:v}),n(j,{title:Ie,value:Math.round(e.data.result.powerWordsPercentage*100),goalValue:Ze,words:e.data.result.powerWords,guideLine:Ae,classOnScore:Te,classOnScoreBg:We})]})})})},{__:C}=window.wp.i18n,{Fragment:Vn}=window.wp.element,{PanelBody:In,PanelRow:Zn}=window.wp.components,_="all-in-one-seo-pack",Un=e=>{const t=C("Your headline has a neutral sentiment.",_),r=C("Headlines that are strongly positive or negative tend to get more engagement than neutral ones.",_),o=C("Your headline has a positive sentiment.",_),a=C("Positive headlines tend to get better engagement than neutral or negative ones.",_),l=C("Your headline has a negative sentiment.",_),i=C("Negative headlines are attention-grabbing and tend to perform better than neutral ones.",_),s=C("Sentiment",_),c=e.data.result.sentiment==="neu"?C("Neutral",_):e.data.result.sentiment==="pos"?C("Positive",_):C("Negative",_),w=e.data.result.sentiment==="neu"?g.neutral:e.data.result.sentiment==="pos"?g.smile:g.negative,f=e.data.result.sentiment==="neu"?"orange":e.data.result.sentiment==="pos"?"green":"red";return n(Vn,{children:n(In,{title:s,className:p("aioseo-headline-analyzer-panel-sentiment","aioseo-headline-analyzer-panel-has-icon",f),icon:w,children:n(Zn,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[n("h4",{children:c}),e.data.result.sentiment==="neu"?d("p",{children:[n("strong",{children:t}),n("br",{}),r]}):"",e.data.result.sentiment==="pos"?d("p",{children:[n("strong",{children:o}),n("br",{}),a]}):"",e.data.result.sentiment==="neg"?d("p",{children:[n("strong",{children:l}),n("br",{})," ",i]}):""]})})})})},{__:Gn}=window.wp.i18n,{Fragment:qn}=window.wp.element,{PanelBody:Yn,PanelRow:Jn}=window.wp.components,Kn=e=>{const t=e.data.result.headlineTypes.join(", "),r=Gn("Headline Type","all-in-one-seo-pack");return n(qn,{children:n(Yn,{title:d("span",{className:"aioseo-headline-analyzer-panel-types-title",children:[r,n("span",{children:t})]}),className:"aioseo-headline-analyzer-panel-types",children:n(Jn,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[n("h4",{children:t}),n("p",{dangerouslySetInnerHTML:{__html:fn}})]})})})})},{__:x}=window.wp.i18n,{Fragment:Qn}=window.wp.element,{PanelBody:Xn,PanelRow:ea}=window.wp.components,H="all-in-one-seo-pack",na=e=>{const t=x("Character Count",H),r=e.data.result.length,o=r.toString();let a="",l="",i="",s="";if(o.length===1&&(s=`<span class="character-zero">0</span><span class="character-zero">0</span><span>${r}</span>`),o.length===2){s='<span class="character-zero">0</span>';for(const c of o)s+=`<span>${c}</span>`}if(r.toString().length===3)for(const c of o)s+=`<span>${c}</span>`;return 19>=r?a="red":20<=r&&34>=r?a="orange":35<=r&&66>=r?a="green":67<=r&&79>=r?a="orange":80<=r&&(a="red"),34>=r?(l=x("Too Short 🙃",H),i=x("You have space to add more keywords and power words to boost your rankings and click-through rate.",H)):35<=r&&66>=r?(l=x("Good 🙂",H),i=x("Headlines that are about 55 characters long will display fully in search results and tend to get more clicks.",H)):67<=r&&(l=x("Too Long 😑",H),i=x("At this length, it will get cut off in search results. Try reducing it to about 55 characters.",H)),n(Qn,{children:n(Xn,{title:t,className:p("aioseo-headline-analyzer-panel-character-count","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:n(ea,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[d("div",{className:"aioseo-headline-analyzer-character-count-container",children:[n("span",{className:"aioseo-headline-analyzer-status-on-character-length",children:l}),n("span",{className:p("aioseo-headline-analyzer-character-length",a),dangerouslySetInnerHTML:{__html:s}})]}),n("p",{children:i})]})})})})},{__:S}=window.wp.i18n,{Fragment:aa}=window.wp.element,{PanelBody:ta,PanelRow:ra}=window.wp.components,k="all-in-one-seo-pack",oa=e=>{const t=S("Word Count",k),r=e.data.result.wordCount,o=r.toString();let a="",l="",i="",s="";if(o.length===1&&(s=`<span class="character-zero">0</span><span class="character-zero">0</span><span>${r}</span>`),o.length===2){s='<span class="character-zero">0</span>';for(const c of o)s+=`<span>${c}</span>`}if(o.length===3)for(const c of o)s+=`<span>${c}</span>`;return 4>=r?(a="red",l=S("Not Enough Words 🙃",k),i=S("Your headline doesn’t use enough words. You have more space to add keywords and power words to improve your SEO and get more engagement.",k)):5<=r&&9>=r?(a="green",l=S("Good 🙂",k),i=S("Your headline has the right amount of words. Headlines are more likely to be clicked on in search results if they have about 6 words.",k)):10<=r&&11>=r?(a="orange",l=S("Reduce Word Count 🙂",k)):(a="red",l=S("Too Many Words 😑",k),i=S("Your headline has too many words. Long headlines will get cut off in search results and won’t get as many clicks.",k)),n(aa,{children:n(ta,{title:t,className:p("aioseo-headline-analyzer-panel-word-count","aioseo-headline-analyzer-panel-has-icon",a),icon:a==="green"?g.check:g.warning,children:n(ra,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[d("div",{className:"aioseo-headline-analyzer-word-counter",children:[n("span",{className:"aioseo-headline-analyzer-status-on-word-length",children:l}),n("span",{className:p("aioseo-headline-analyzer-word-length",a),dangerouslySetInnerHTML:{__html:s}})]}),n("p",{children:i})]})})})})},{__:M}=window.wp.i18n,{Fragment:la}=window.wp.element,{PanelBody:sa,PanelRow:ia}=window.wp.components,F="all-in-one-seo-pack",ca=e=>{const t=M("Beginning & Ending Words",F),r=e.data.result.originalExplodedHeadline,o=M("Most readers only look at the first and last 3 words of a headline before deciding whether to click.",F);let a="",l="";return 6<=r.length?(a=r.slice(0,3).join(" "),l=r.slice(-3).join(" ")):3<r.length&&5>=r.length?(a=r.slice(0,3).join(" "),l=r.slice(3).join(" ")):a=r.slice(0,3).join(" "),n(la,{children:n(sa,{title:t,className:"aioseo-headline-analyzer-panel-beginning-ending-words",children:n(ia,{children:d("div",{className:"aioseo-headline-analyzer-panel-first-block",children:[a?d(K,{children:[n("ul",{className:"aioseo-headline-analyzer-word-begining-title",children:n("li",{children:M("Beginning Words",F)})}),n("div",{className:"aioseo-headline-analyzer-words beginning",children:n("span",{children:a})})]}):"",l?d(K,{children:[n("ul",{className:"aioseo-headline-analyzer-word-ending-title",children:n("li",{children:M("Ending Words",F)})}),n("div",{className:"aioseo-headline-analyzer-words ending",children:n("span",{children:l})})]}):"",n("p",{className:"aioseo-headline-analyzer-words-guideline",children:o})]})})})})},{__:ce}=window.wp.i18n,{Fragment:da}=window.wp.element,{PanelBody:ua,PanelRow:ha}=window.wp.components,{select:fa}=window.wp.data,wa=e=>{const t=ce("Search Preview","all-in-one-seo-pack"),r=ce("Here is how your headline will look like in Google search results page.","all-in-one-seo-pack"),o=fa("core/editor").getPermalink();return n(da,{children:n(ua,{title:t,className:"aioseo-headline-analyzer-panel-search-preview",children:n(ha,{children:n("div",{className:"aioseo-headline-analyzer-panel-first-block",children:d("div",{className:"aioseo-headline-analyzer-search-prevew-wrap",children:[n("p",{className:"aioseo-headline-analyzer-post-url",children:n("a",{...{href:o},target:"_blank",children:o})}),n("h4",{children:e.data.sentence}),n("p",{children:r})]})})})})})};const{__:de}=window.wp.i18n,{Fragment:ma,useState:ya,useEffect:pa}=window.wp.element,{registerPlugin:ga}=window.wp.plugins,{PluginSidebar:va,PluginSidebarMoreMenuItem:ba}=window.wp.editPost,{select:Y}=window.wp.data,ue="all-in-one-seo-pack";let he;const Ca=(e,t)=>((...r)=>{const o=()=>e(...r);clearTimeout(he),he=setTimeout(o,t)}).call(),_a=()=>{let e=Y("core/editor").getEditedPostAttribute("title");const t=()=>{if(!e){l({...a,...{dataExist:!1}});return}$e(window.aioseo.nonce).post(He("analyze_headline")).send({headline:e,shouldStoreHeadline:!1}).then(f=>{const h={dataExist:!1},v=JSON.parse(f.body[Object.keys(f.body)[0]]);v.analysed&&(h.currentHeadlineData=v,h.headlineData=v,h.dataExist=!0,typeof a.headlineData<"u"&&(h.previousHeadlinesData=[a.headlineData,...i])),l({...a,...h})}).catch(f=>{l({...a,...{dataExist:!1}}),console.log("Couldn't fetch score for headline:",f)})};pa(()=>t(),[]),window.wp.data.subscribe(()=>{e!==Y("core/editor").getEditedPostAttribute("title")&&(e=Y("core/editor").getEditedPostAttribute("title"),Ca(()=>t(),2e3))});const r=de("SEO Headline Analyzer",ue),o=de("Write your post title to see the analyzer data. This Headline Analyzer tool enables you to write irresistible SEO headlines that drive traffic, shares, and rank better in search results.",ue),[a,l]=ya({}),i=typeof a.previousHeadlinesData<"u"?a.previousHeadlinesData:[],s=document.querySelector(`.components-button[aria-label='${r}'] svg`);if(s){const f=document.createElement("span");if(a.dataExist&&typeof a.currentHeadlineData.score<"u"){const h=a.currentHeadlineData.score,v=40>h?"red":60>=h?"orange":"green";s.parentNode.setAttribute("aioseo-button-color",v),s.nextElementSibling?s.nextElementSibling.innerHTML=`${h}/100`:(f.innerHTML=`${h}/100`,s.parentNode.insertBefore(f,s.nextSibling))}else s.parentNode.setAttribute("aioseo-button-color","red"),s.nextElementSibling?s.nextElementSibling.innerHTML="00/100":(f.innerHTML="00/100",s.parentNode.insertBefore(f,s.nextSibling))}const c=document.querySelector(".aioseo-headline-analyzer-wrapper");if(c){const f=c.parentNode.querySelectorAll(".components-panel__header");f&&f.forEach(function(h){const v=h.querySelector(".interface-complementary-area__pin-unpin-item");v&&v!==null&&(v.style.display="none")})}const w=f=>{l({...a,...f})};return d(ma,{children:[n(ba,{target:"aioseo-headline-analyzer",children:r}),d(va,{name:"aioseo-headline-analyzer",title:r,className:"aioseo-headline-analyzer-wrapper",children:[typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Dn,{analyzer:a,setAnalyzer:w}):n("p",{className:"aioseo-headline-analyzer-empty-title-warning",children:o}),typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed&&0<i.length?n(An,{analyzer:a,setAnalyzer:w}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Fn,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Un,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(Kn,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(na,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(oa,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(ca,{data:a.headlineData}):"",typeof a.headlineData<"u"&&a.dataExist&&a.headlineData.analysed?n(wa,{data:a.headlineData}):"",n("div",{className:"aioseo-headline-analyzer-bottom-notice",children:n("p",{dangerouslySetInnerHTML:{__html:wn}})})]})]})};ga("aioseo-headline-analyzer",{icon:g.headline,render:_a});
