Version Description
[May 21, 2022] = * Fixed: Content AI was not detecting the images present in the content area * Fixed: Content AI was crashing the editor on some setups when the site was not connected to Rank Math account * Fixed: Some sites were showing PHP warning after the last update
Download this release
Release Info
Developer | rankmath |
Plugin | WordPress SEO Plugin – Rank Math |
Version | 1.0.89.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.89 to 1.0.89.1
- changelog.txt +3 -19
- includes/modules/content-ai/assets/js/content-ai.js +1 -1
- includes/modules/content-ai/assets/src/ContentAI.js +6 -5
- includes/modules/content-ai/assets/src/Recommendations.js +3 -3
- includes/opengraph/class-image.php +5 -2
- languages/rank-math.pot +10 -7
- rank-math.php +2 -2
- readme.txt +6 -1
- vendor/composer/installed.php +2 -2
changelog.txt
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
*
|
2 |
-
*
|
3 |
-
*
|
4 |
-
* Improved: Description for [Schema Type Titles & Meta option](https://rankmath.com/kb/titles-and-meta/#rich-snippet-type) to make it easy to understand
|
5 |
-
* Improved: Error messages on different pages to make it easy to understand
|
6 |
-
* Improved: The code that generates [Thumbnail overlay](https://rankmath.com/kb/meta-box-social-tab/#add-icon-overlay-to-thumbnails)
|
7 |
-
* Improved: Optimized and improved the overall code
|
8 |
-
* Removed: The `image:caption` & `image:title` properties from the sitemap as Google no longer uses them. You can read more about it [here](https://developers.google.com/search/blog/2022/05/spring-cleaning-sitemap-extensions)
|
9 |
-
* Fixed: [Google Search Console](https://rankmath.com/kb/general-settings/#search-console) data import was not working well with the domain property
|
10 |
-
* Fixed: [Content Analysis](https://rankmath.com/kb/score-100-in-tests/) was not working when a comma was used in the [Focus keyword](https://rankmath.com/kb/what-is-a-focus-keyword/)
|
11 |
-
* Fixed: Link Suggestion was not working well when the 'AMP for WP' plugin is active
|
12 |
-
* Fixed: WP Super Cache plugin's cache was completely getting cleared after updating the WooCommerce Product
|
13 |
-
* Fixed: PHP warning when invalid regex was used in the [404 Monitor Exclude Path](https://rankmath.com/kb/general-settings/#exclude-paths) setting
|
14 |
-
* Fixed: Content AI was not working well on the posts created using the 'Builder by SiteOrigin' plugin
|
15 |
-
* Fixed: Dashboard widget was showing without any content to the users who didn't have the required capability
|
16 |
-
* Fixed: Links pointing to the media files were also counted as internal links by the [Link Counter](https://rankmath.com/kb/link-counter/)
|
17 |
-
* Fixed: Missing tooltips in the Content Analysis tests
|
18 |
-
* Fixed: Improved the styling of the [Classic Editor Metabox](https://rankmath.com/kb/on-page-seo/#num-3-in-classic-editor) when it is moved to the editor's sidebar
|
19 |
-
* Fixed: [Remove Snippet Data](https://rankmath.com/kb/titles-and-meta/#product-categories-remove-snippet-data) option was not working on some setups
|
1 |
+
* Fixed: [Content AI](https://rankmath.com/kb/how-to-use-content-ai/#num-6-5-media-count) was not detecting the images present in the content area
|
2 |
+
* Fixed: Content AI was crashing the editor on some setups when the site was not connected to Rank Math account
|
3 |
+
* Fixed: Some sites were showing PHP warning after the last update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/modules/content-ai/assets/js/content-ai.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=lodash},function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.data},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var c=a.apply(null,r);c&&e.push(c)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=wp.compose},function(e,t){e.exports=jQuery},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=rankMathAnalyzer},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t){e.exports=wp.plugins},function(e,t){e.exports=wp.editPost},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=i(n(11)),o=i(n(16)),c=i(n(19));function i(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,c,i,u,m,p,f,h,d=[],b={};for(p=0;p<e.length;p++)if("string"!==(m=e[p]).type){if(!t.hasOwnProperty(m.value)||void 0===t[m.value])throw new Error("Invalid interpolation, missing component node: `"+m.value+"`");if("object"!==r(t[m.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+m.value+"`","\n> "+l);if("componentClose"===m.type)throw new Error("Missing opening component token: `"+m.value+"`");if("componentOpen"===m.type){n=t[m.value],i=p;break}d.push(t[m.value])}else d.push(m.value);return n&&(u=function(e,t){var n,r,a=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===a.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+a.value+"`")}(i,e),f=s(e.slice(i+1,u),t),c=a.default.cloneElement(n,{},f),d.push(c),u<e.length-1&&(h=s(e.slice(u+1),t),d=d.concat(h))),1===d.length?d[0]:(d.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,o.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,a=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,c.default)(t);try{return s(o,n)}catch(e){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},function(e,t,n){"use strict";var r=n(11),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(12),c=n(17),i=n(18),l="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var o,i=typeof e;if("undefined"!==i&&"boolean"!==i||(e=null),null===e||"string"===i||"number"===i||"object"===i&&e.$$typeof===a)return n(r,e,""===t?"."+s(e,0):t),1;var m=0,p=""===t?".":t+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)m+=u(o=e[f],p+s(o,f),n,r);else{var h=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var d,b=h.call(e),y=0;!(d=b.next()).done;)m+=u(o=d.value,p+s(o,y++),n,r)}else if("object"===i){0;var w=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(e).join(", ")+"}":w,"")}}return m}var m=/\/+/g;function p(e){return(""+e).replace(m,"$&/")}var f,h,d=b,b=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},y=function(e){var t=this;c(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)};function w(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function k(e,t,n){var a,c,i=e.result,l=e.keyPrefix,s=e.func,u=e.context,m=s.call(u,t,e.count++);Array.isArray(m)?v(m,i,n,o.thatReturnsArgument):null!=m&&(r.isValidElement(m)&&(a=m,c=l+(!m.key||t&&t.key===m.key?"":p(m.key)+"/")+n,m=r.cloneElement(a,{key:c},void 0!==a.props?a.props.children:void 0)),i.push(m))}function v(e,t,n,r,a){var o="";null!=n&&(o=p(n)+"/");var c=w.getPooled(t,o,r,a);!function(e,t,n){null==e||u(e,"",t,n)}(e,k,c),w.release(c)}w.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f=function(e,t,n,r){var a=this;if(a.instancePool.length){var o=a.instancePool.pop();return a.call(o,e,t,n,r),o}return new a(e,t,n,r)},(h=w).instancePool=[],h.getPooled=f||d,h.poolSize||(h.poolSize=10),h.release=y;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)v(e[n],t,n,o.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,c,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,a,o,c,i],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(12);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n.n(r),o=n(5),c=n.n(o),i=n(1),l=n(0),s=n(8),u=n(3),m=n(2),p=n(13),f=n(14),h=n(4),d=n(6),b=n(9),y=n.n(b);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var a=E(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(o,e);var t,n,r,a=_(o);function o(){var e;return k(this,o),(e=a.apply(this,arguments)).state={score:0},e.setState=e.setState.bind(j(e)),e}return t=o,(n=[{key:"render",value:function(){var e=this;return setTimeout((function(){e.setState({score:e.props.score})}),1e3),wp.element.createElement("div",{className:"rank-math-ca-score"},wp.element.createElement("div",{className:"score-text"},Object(l.__)("Score:","rank-math")," ",this.state.score,wp.element.createElement("span",null," / ",Object(l.__)("100","rank-math"))),wp.element.createElement("div",{className:"score-wrapper"},wp.element.createElement("span",{className:"score-dot",style:{left:(Object(i.inRange)(this.state.score,0,5)?5:this.state.score)+"%"}})))}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),C=Object(d.compose)(Object(h.withSelect)((function(e){var t=Object.values(e("rank-math").getContentAIScore());return{score:Object(i.round)(Object(i.sum)(t)/t.length)}})))(S),P=function(e){return 100<e?"bad-fk dark":80<e?"good-fk":50<e?"ok-fk":"bad-fk"};function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},T(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(o,e);var t,n,r,a=A(o);function o(){var e;return R(this,o),(e=a.apply(this,arguments)).state={activeTab:""},e.setState=e.setState.bind(D(e)),e}return t=o,n=[{key:"render",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-recommendations"},this.getRecommendations(this.props.recommendations))}},{key:"getRecommendations",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return Object(i.forEach)(e,(function(e,a){if("total"!==a){var o=Object(i.isUndefined)(e.total)?e:e.total,s=t.getPostStats(a),u=c()(a,{"has-children":!Object(i.isUndefined)(e.total),show:a===t.state.activeTab}),m=t.getScore(a,s,o,n),p=Object(i.ceil)(150*o/100);r.push(wp.element.createElement("div",{className:u+" "+P(m),onClick:function(){return t.setState({activeTab:t.state.activeTab!==a?a:""})},role:"presentation"},wp.element.createElement("h4",null,n?a:Object(i.startCase)(a)),n&&wp.element.createElement("span",null,s," / ",o),!n&&wp.element.createElement(React.Fragment,null,wp.element.createElement("strong",null,s),wp.element.createElement("span",{className:"desc"},Object(l.__)("Use","rank-math")," ",o," ",Object(l.__)("to","rank-math")," ",p)),Object(i.isObject)(e)&&t.getRecommendations(e,!0)))}})),n?wp.element.createElement("div",{className:"submenu"},r):r}},{key:"getPostStats",value:function(e){return Object(i.has)(this.props.postStats,e)?this.props.postStats[e]:0}},{key:"getScore",value:function(e,t,n,r){var a=t===n?100:t/n*100;if(0===n&&t<=2&&(a=100),r)return a>100&&a<=125?100:a;var o=a>80?100:t/n*80;return a>125&&"wordCount"!==e&&(o=0),this.props.updateAiScore(e,o),a>100&&"wordCount"===e||a>100&&a<=125?100:a}}],n&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),K=Object(d.compose)(Object(h.withSelect)((function(e,t){var n=1518,r=12,a=2,o=5,c=3,l=0,s=0,u=0,m=8,p=19;if(t.hasCredits){var f=t.researcher.getResearch("wordCount"),h=rankMathEditor.assessor.analyzer.defaultAnalyses.contentHasAssets;n=f(t.content),r=Object(i.isEmpty)(h)?0:h.getImages(t.researcher.paper,t.content),a=Object(i.isEmpty)(h)?0:h.getVideos(t.content),o=(t.content.match(/<h2\b[^>]*>(.*?)<\/h2>/g)||[]).length,c=(t.content.match(/<h3\b[^>]*>(.*?)<\/h3>/g)||[]).length,l=(t.content.match(/<h4\b[^>]*>(.*?)<\/h4>/g)||[]).length,s=(t.content.match(/<h5\b[^>]*>(.*?)<\/h5>/g)||[]).length,u=(t.content.match(/<h6\b[^>]*>(.*?)<\/h6>/g)||[]).length;var d=t.researcher.getResearch("getLinkStats")(t.content);m=d.internalTotal,p=d.externalTotal}return{postStats:{wordCount:n,images:r,videos:a,mediaCount:r+a,h2:o,h3:c,h4:l,h5:s,h6:u,headingCount:o+c+l+s+u,internal:m,external:p,linkCount:m+p}}})))(M);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}var q=["tabId","onClick","children","selected"];function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var a=H(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function J(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var G=function(e){var t=e.tabId,n=e.onClick,r=e.children,a=e.selected,o=J(e,q);return wp.element.createElement(u.Button,Q({role:"tab",tabIndex:a?null:-1,"aria-selected":a,id:t,onClick:n},o),r)},Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(o,e);var t,n,r,a=V(o);function o(){var e;W(this,o),(e=a.apply(this,arguments)).handleClick=function(t){var n=e.props.onSelect,r=void 0===n?i.noop:n;e.setState({selected:t}),r(t)},e.onNavigate=function(e,t){t.click()};var t=e.props,n=t.tabs,r=t.initialTabName;return e.state={selected:r||(n.length>0?n[0].name:null)},e}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,r=n.activeClass,a=void 0===r?"is-active":r,o=n.className,l=n.instanceId,s=n.orientation,m=void 0===s?"horizontal":s,p=n.tabs,f=Object(i.find)(p,{name:t}),h=l+"-"+f.name,d=p.slice(4);return wp.element.createElement("div",{className:o},wp.element.createElement(u.NavigableMenu,{role:"tablist",orientation:m,onNavigate:this.onNavigate,className:"components-tab-panel__tabs "+t},p.slice(0,4).map((function(n){return wp.element.createElement(G,{className:c()("components-tab-panel__tabs-item",n.className,U({},a,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(i.partial)(e.handleClick,n.name)},n.title)})),d.map((function(n){return wp.element.createElement(G,{className:c()("components-tab-panel__tabs-item",n.className,U({},a,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(i.partial)(e.handleClick,n.name)},n.title)}))),f&&wp.element.createElement("div",{"aria-labelledby":h,role:"tabpanel",id:h+"-view",className:"components-tab-panel__tab-content"},this.props.children(f)))}}])&&z(t.prototype,n),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),X=Object(d.withInstanceId)(Y),Z=n(10);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t){return re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},re(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ie(e);if(t){var a=ie(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return oe(this,n)}}function oe(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ce(e)}function ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&re(e,t)}(o,e);var t,n,r,a=ae(o);function o(){var e;return te(this,o),(e=a.apply(this,arguments)).state={type:"content",selected:""},e.setState=e.setState.bind(ce(e)),e.initializeClipboard(e.setState),e}return t=o,n=[{key:"initializeClipboard",value:function(e){"function"==typeof ClipboardJS&&this.props.hasCredits&&new ClipboardJS(".rank-math-tooltip strong",{text:function(e){return e.getAttribute("data-key")}}).on("success",(function(){setTimeout((function(){e({selected:""})}),3e3)}))}},{key:"render",value:function(){var e=this;return wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement(u.SelectControl,{label:Object(l.__)("Use Keyword in","rank-math"),value:this.state.type,options:[{value:"content",label:Object(l.__)("Content","rank-math")},{value:"heading",label:Object(l.__)("Headings","rank-math")},{value:"title",label:Object(l.__)("SEO Title","rank-math")},{value:"description",label:Object(l.__)("SEO Description","rank-math")}],onChange:function(t){e.setState({type:t})}}),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Keywords%20KB%20Icon&utm_campaign=WP#keywords",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Keywords.","rank-math")},"﹖"),wp.element.createElement(React.Fragment,null,wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Click on any keyword to copy it.","rank-math")),wp.element.createElement("br",null),Object(i.includes)(["title","description"],this.state.type)&&wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Please use only one or two keywords from here.","rank-math")),wp.element.createElement("ul",null,this.getKeywords())),this.getRelatedKeywords()))}},{key:"getRelatedKeywords",value:function(){var e=this;if("content"!==this.state.type||Object(i.isEmpty)(this.props.caData.data.related_keywords))return!1;var t=[];return Object(i.forEach)(this.props.caData.data.related_keywords,(function(n){t.push(wp.element.createElement("li",{className:"rank-math-tooltip show",onClick:function(){return e.setState({selected:n})},role:"presentation"},wp.element.createElement("strong",{"data-key":n},n),e.getTooltipContent({keyword:n},!0)))})),wp.element.createElement("div",{className:"rank-math-related-keywords"},wp.element.createElement("h3",null,Object(l.__)("Related Keywords","rank-math")),wp.element.createElement("ul",null,t))}},{key:"getKeywords",value:function(){var e=this;if(Object(i.isEmpty)(this.props.caData.data.keywords))return wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Keywords for this researched keyword.","rank-math"));var t=[];return this.contentAiScore={},Object(i.forEach)(this.props.caData.data.keywords,(function(n,r){Object(i.isEmpty)(n)||(e.contentAiScore[r]={},Object(i.forEach)(n,(function(n){var a=e.props.hasCredits?e.getCount(n.keyword,r):n.count,o=P(e.getScore(n.keyword,a,n.average,r)),i=c()("rank-math-tooltip",{show:e.state.type===r});t.push(wp.element.createElement("li",{className:i+" "+o,onClick:function(){return e.setState({selected:n.keyword})},role:"presentation"},wp.element.createElement("strong",{"data-key":n.keyword},n.keyword,wp.element.createElement("span",null,a," / ",n.average)),e.getTooltipContent(n)))})))})),this.updateContentAiScore(),t}},{key:"updateContentAiScore",value:function(){var e=0,t=0;Object(i.forEach)(this.contentAiScore,(function(n,r){var a=Object.values(n),o=Object(i.sum)(a);"title"!==r&&"description"!==r||100!==Object(i.max)(a)||(o=100*a.length),e+=o,t+=a.length})),e/=t,Object(i.isNaN)(e)||this.props.updateAiScore("keywords",e)}},{key:"getScore",value:function(e,t,n,r){var a=t/n*100;return this.contentAiScore[r][e]=a>100?0:a>80?100:a,a}},{key:"getTooltipContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.props.hasCredits)return this.state.selected===e.keyword?wp.element.createElement("span",{className:"rank-math-tooltip-data"},Object(l.__)("Copied","rank-math")):e.competition||e.cpc||e.search_volume?wp.element.createElement("span",{className:"rank-math-tooltip-data"},wp.element.createElement("span",null,Object(l.__)("Ad Competition:","rank-math")," ",Object(i.round)(100*e.competition)),wp.element.createElement("span",null,Object(l.__)("CPC:","rank-math")," $",Object(i.round)(e.cpc,2)),wp.element.createElement("span",null,Object(l.__)("Volume:","rank-math")," ",Object(i.round)(e.search_volume))):wp.element.createElement("span",{className:"rank-math-tooltip-data"},t?Object(l.__)("Click to copy keyword","rank-math"):Object(l.__)("No data available","rank-math"))}},{key:"getCount",value:function(e,t){var n=this.props.caData.content;if(e=Z.Helpers.removeDiacritics(e),"heading"===t){e=e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&");var r=new RegExp("<h[2-6][^>]*>.*?"+e+".*?</h[2-6]>","g"),a=n.match(r);return Object(i.isNull)(a)?0:a.length}return"title"===t&&(n=this.props.caData.title),"description"===t&&(n=this.props.caData.description),Z.Helpers.cleanTagsOnly(n).split(e).length-1}}],n&&ne(t.prototype,n),r&&ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),se=Object(d.compose)(Object(h.withDispatch)((function(e){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!0)}}})))(le),ue=function(){return!(Object(i.isNil)(window.wp)||Object(i.isNil)(wp.data)||Object(i.isNil)(wp.data.select("core/editor"))||!window.document.body.classList.contains("block-editor-page")||!Object(i.isFunction)(wp.data.select("core/editor").getEditedPostAttribute))};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},he(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=we(e);if(t){var a=we(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return be(this,n)}}function be(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ye(e)}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)}(o,e);var t,n,r,a=de(o);function o(){var e;return pe(this,o),(e=a.apply(this,arguments)).state={iconClass:"rm-icon-copy",selected:""},e.setState=e.setState.bind(ye(e)),e.initializeClipboard(e.setState),e}return t=o,(n=[{key:"initializeClipboard",value:function(e){var t=this;"function"==typeof ClipboardJS&&new ClipboardJS(".rank-math-copy-questions, .rank-math-questions-item h3",{text:function(e){if(!Object(i.isNull)(e.getAttribute("data-key")))return e.getAttribute("data-key");if(!ue())return document.getElementById("rank-math-ca-questions-data").innerHTML;var n=[];return Object(i.forEach)(t.props.caData.data.related_questions,(function(e){n.push({id:Object(i.uniqueId)("faq-question-"),title:e,content:"",visible:!0})})),"\x3c!-- wp:rank-math/faq-block "+JSON.stringify({questions:n})+' --\x3e<div class="wp-block-rank-math-faq-block"></div>\x3c!-- /wp:rank-math/faq-block --\x3e'}}).on("success",(function(){setTimeout((function(){e({iconClass:"rm-icon-copy"})}),3e3)}))}},{key:"render",value:function(){var e=this,t=[];return Object(i.isEmpty)(this.props.caData.data.related_questions)?wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Questions for this researched keyword.","rank-math")):(Object(i.forEach)(this.props.caData.data.related_questions,(function(n){t.push(wp.element.createElement("div",{className:"rank-math-questions-item"},wp.element.createElement("h3",{className:"rank-math-tooltip","data-key":n,onClick:function(){return e.setState({selected:n})},role:"presentation"},n,e.getTooltipContent(n))))})),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement("div",{className:"rank-math-section-heading"},wp.element.createElement("h2",null,Object(l.__)("Related Questions","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Questions%20KB%20Icon&utm_campaign=WP",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Questions.","rank-math")},"﹖")),wp.element.createElement(u.Button,{onClick:function(){e.setState({iconClass:"rm-icon-tick"})},className:"rank-math-copy-questions button-secondary rank-math-tooltip left"},wp.element.createElement("i",{className:"rm-icon "+this.state.iconClass}),wp.element.createElement("span",null,Object(l.__)("Copy this data as a FAQ Block.","rank-math")))),wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Click on any question to copy it.","rank-math")),wp.element.createElement("div",{id:"rank-math-ca-questions-data"},t))))}},{key:"getTooltipContent",value:function(e){return this.state.selected===e&&wp.element.createElement("span",{className:"rank-math-tooltip-data"},Object(l.__)("Copied","rank-math"))}}])&&fe(t.prototype,n),r&&fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),ve=ke,ge=function(e){var t=[];return Object(i.isEmpty)(e.caData.data.links)?wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Links for this researched keyword.","rank-math")):(Object(i.forEach)(e.caData.data.links,(function(e){return t.push(wp.element.createElement("li",null,wp.element.createElement("a",{href:e,rel:"noreferrer",target:"_blank"},e)))})),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement("div",{className:"rank-math-section-heading"},wp.element.createElement("h2",null,Object(l.__)("Related External Links","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Links%20KB%20Icon&utm_campaign=WP#links",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Links.","rank-math")},"﹖")),wp.element.createElement("p",null,Object(l.__)("Use some of these external links in the content area. It is recommended to add","rank-math")," ",wp.element.createElement("a",{href:"https://rankmath.com/kb/about-and-mentions-schema/",rel:"noreferrer",target:"_blank"},Object(l.__)("about or mention Schema.","rank-math")))),wp.element.createElement("ul",null,t))))},_e=function(e){"social"===e&&Object(h.dispatch)("rank-math").toggleSnippetEditor(!0)},Oe=function(e){return wp.element.createElement(X,{className:"rank-math-contentai-tabs",activeClass:"is-active",tabs:[{name:"keywords",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Keywords","rank-math"))),view:se,className:"rank-math-keywords-tab"},{name:"questions",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Questions","rank-math"))),view:ve,className:"rank-math-questions-tab"},{name:"links",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Links","rank-math"))),view:ge,className:"rank-math-recommended-links-tab"}],onSelect:_e,data:e},(function(t){return wp.element.createElement("div",{className:"rank-math-contentai-tab-content-"+t.name},Object(m.createElement)(t.view,e))}))},je=n(15),Ee=n.n(je),Se=function(e){var t=e.tags,n=e.components,r=e.children;return n=n||{},!1===Object(i.isUndefined)(t)&&(t=t.split(",")).forEach((function(e){var t=e;n[e]=wp.element.createElement(t,null)})),Ee()({mixedString:r,components:n})};function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Re(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ie(e);if(t){var a=Ie(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Te(this,n)}}function Te(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ae(e)}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(s,e);var t,n,r,o=xe(s);function s(){var e;return Pe(this,s),(e=o.apply(this,arguments)).state={keyword:e.props.keyword,showResearch:e.props.keyword!==rankMath.ca_keyword.keyword,country:e.props.country,credits:1,creditsValue:rankMath.ca_credits,loading:!1,loadingCredits:!1},e.setState=e.setState.bind(Ae(e)),e}return t=s,(n=[{key:"componentDidMount",value:function(){!this.state.creditsValue&&rankMath.isUserRegistered&&this.updateCredits()}},{key:"updateCredits",value:function(){var e=this;this.setState({loadingCredits:!0}),y()({method:"POST",path:"/rankmath/v1/ca/getCredits"}).catch((function(t){e.setState({loadingCredits:!1}),alert(t.message)})).then((function(t){e.setState({creditsValue:t}),e.setState({loadingCredits:!1})}))}},{key:"render",value:function(){var e=rankMath.isUserRegistered&&Object(i.isNumber)(this.state.credits),t=c()("rank-math-content-ai-data",{loading:this.state.loading,blurred:!e});return(!e&&Object(i.isEmpty)(this.props.data)||"show_dummy_data"===this.props.data)&&(this.props.data=this.getDummyData()),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{className:"rank-math-content-ai-wrapper",initialOpen:!0},wp.element.createElement(React.Fragment,null,this.getHeader(),!rankMath.isUserRegistered&&this.connectAccountNotice(),rankMath.isUserRegistered&&!e&&this.creditsNotice(e),e&&this.keywordField(),wp.element.createElement("div",{className:t},wp.element.createElement("span",{className:"loader-text"},wp.element.createElement("span",null,Object(l.__)("Fetching Search Results","rank-math")),wp.element.createElement("span",null,Object(l.__)("Analysing Your Competitors","rank-math")),wp.element.createElement("span",null,Object(l.__)("Crunching the Numbers","rank-math")),wp.element.createElement("span",null,Object(l.__)("Cooking a Personalized SEO Plan","rank-math")),wp.element.createElement("span",null,Object(l.__)("Final Touches to the SEO Recommendations","rank-math"))),Object(i.isString)(this.props.data)&&wp.element.createElement("h3",{className:"no-data"},this.props.data),!Object(i.isEmpty)(this.props.data)&&!Object(i.isString)(this.props.data)&&wp.element.createElement("div",null,wp.element.createElement("h3",{className:"rank-math-ca-section-title"},Object(l.__)("Content AI","rank-math"),wp.element.createElement("span",null,Object(l.__)("New!","rank-math")),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20KB%20Icon&utm_campaign=WP",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Content AI Knowledge Base.","rank-math")},"﹖")),wp.element.createElement(C,null),wp.element.createElement(K,{recommendations:this.props.data.recommendations,hasCredits:e,content:this.props.content,researcher:this.props.researcher,updateAiScore:this.props.updateAiScore,hasThumbnail:this.props.hasThumbnail}),wp.element.createElement(Oe,{caData:this.props,updateAiScore:this.props.updateAiScore,hasCredits:e}))))))}},{key:"getDummyData",value:function(){return{keywords:{content:{"rank math":{keyword:"rank math",average:17,count:12},"rank math vs yoast seo":{keyword:"rank math vs yoast seo",average:1,count:1},"what is rank math":{keyword:"what is rank math",average:1,count:1},"rank math schema":{keyword:"rank math schema",average:1,count:1},"rank math configuration":{keyword:"rank math configuration",average:1,count:1},"rank math pro version":{keyword:"rank math pro version",average:1,count:2},"rank math comparison":{keyword:"rank math comparison",average:1,count:1},"rank math for seo":{keyword:"rank math for seo",average:1,count:1},"seo by rank math":{keyword:"seo by rank math",average:1,count:0}}},related_keywords:["rank math plugin","rank math pricing","rank math vs yoast","rank math review","rank math premium","how to use rank math","rank math training","rank math woocommerce","wordpress seo plugin"],recommendations:{wordCount:1829,linkCount:{total:16},headingCount:{total:9},mediaCount:{total:18}}}}},{key:"getHeader",value:function(){var e=this;return wp.element.createElement("div",{className:"rank-math-ca-top-section"},wp.element.createElement(u.Button,{onClick:function(){return a()(".rank-math-general-tab").trigger("click")}},wp.element.createElement("i",{className:"dashicons dashicons-arrow-left-alt"}),Object(l.__)("Back","rank-math")),wp.element.createElement(u.SelectControl,{value:this.state.country,onChange:function(t){return e.setState({country:t,showResearch:!0})},options:rankMath.countries}))}},{key:"keywordField",value:function(){var e=this,t=c()("rank-math-tooltip update-credits",{loading:this.state.loadingCredits});return wp.element.createElement("div",{className:"rank-math-ca-keywords-wrapper"},wp.element.createElement("div",{className:"rank-math-ca-credits-wrapper"},wp.element.createElement(u.TextControl,{label:Object(l.__)("Focus Keyword","rank-math"),value:this.state.keyword,onChange:function(t){return e.setState({keyword:t,showResearch:!0})},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()},help:wp.element.createElement(React.Fragment,null,Object(l.__)("Upgrade to buy more credits from ","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Upgrade%20Text&utm_campaign=WP#pricing-tables",rel:"noreferrer",target:"_blank",title:Object(l.__)("Content AI Pricing.","rank-math")},Object(l.__)("here.","rank-math"))),placeholder:Object(l.__)("Suggested length 2-3 Words","rank-math")}),wp.element.createElement("div",{className:"help-text"},Object(l.__)("To learn how to use it","rank-math")," ",wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Content%20AI%20Sidebar%20KB%20Link&utm_campaign=WP",target:"_blank",rel:"noreferrer"},Object(l.__)("Click here","rank-math"))),!this.state.showResearch&&!this.state.loading&&!Object(i.isEmpty)(this.props.data)&&wp.element.createElement(u.Button,{className:"rank-math-ca-force-update rank-math-tooltip left",onClick:function(){return e.props.researchKeyword(e.state,e.setState,!0)}},wp.element.createElement("i",{className:"dashicons dashicons-image-rotate"}),wp.element.createElement("span",null,Object(l.__)("Refresh will use one new credit.","rank-math"))),wp.element.createElement("div",{className:"rank-math-ca-credits"},wp.element.createElement(u.Button,{className:t,onClick:function(){return e.updateCredits()}},wp.element.createElement("i",{className:"dashicons dashicons-image-rotate"}),wp.element.createElement("span",null,Object(l.__)("Click to refresh the available credits.","rank-math"))),wp.element.createElement("span",null,Object(l.__)("Credits","rank-math")),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Credits%20Tooltip%20Icon&utm_campaign=WP#credits-usage",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about credits.","rank-math")},"﹖"),wp.element.createElement("strong",null,this.state.creditsValue))),this.state.showResearch&&wp.element.createElement(u.Button,{className:"is-primary",onClick:function(){return e.props.researchKeyword(e.state,e.setState)},title:Object(l.__)("One credit will be used.","rank-math"),disabled:!this.state.keyword},Object(l.__)("Research","rank-math")))}},{key:"connectAccountNotice",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-warning"},wp.element.createElement("h3",null,Object(l.__)("Content AI","rank-math")),wp.element.createElement("p",null,Object(l.__)("Please connect your account to use this feature.","rank-math")),wp.element.createElement(u.Button,{href:rankMath.connectSiteUrl,className:"is-primary"},Object(l.__)("Connect Now","rank-math")))}},{key:"creditsNotice",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-warning"},wp.element.createElement("h3",null,Object(l.__)("Content AI","rank-math")),"site_limit_reached"===this.state.credits&&wp.element.createElement("p",null,wp.element.createElement(Se,{components:{link1:wp.element.createElement("a",{href:"https://rankmath.com/my-account/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP",target:"_blank",rel:"noopener noreferrer"}),link2:wp.element.createElement("a",{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP#pricing-tables",target:"_blank",rel:"noopener noreferrer"})}},Object(l.__)("All credits assigned to this site are used. Please add more credits from {{link1}}My Account{{/link1}} Page or {{link2}}upgrade your plan{{/link2}}.","rank-math"))),"account_limit_reached"===this.state.credits&&wp.element.createElement(React.Fragment,null,wp.element.createElement("p",null,Object(l.__)("You don't have any credits left.","rank-math")),wp.element.createElement(u.Button,{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP#pricing-tables",target:"_blank",rel:"noreferrer",className:"is-primary"},Object(l.__)("Get More Credits","rank-math"))))}}])&&Ne(t.prototype,n),r&&Ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(m.Component),Be=Object(d.compose)(Object(h.withSelect)((function(e){var t=rankMathEditor.assessor.analyzer.researcher,n=t.paper;return{data:e("rank-math").getKeywordsData(),keyword:Object(i.get)(rankMath.ca_keyword,"keyword",e("rank-math").getKeywords().split(",")[0]),country:Object(i.get)(rankMath.ca_keyword,"country",rankMath.contentAiCountry),researcher:t,content:Object(i.isUndefined)(n)?"":n.getTextLower(),title:Object(i.isUndefined)(n)?"":n.getTitle().toLowerCase(),description:Object(i.isUndefined)(n)?"":n.getDescription().toLowerCase(),hasThumbnail:Object(i.isUndefined)(n)?"":n.hasThumbnail(),score:e("rank-math").getContentAIScore()}})),Object(h.withDispatch)((function(e,t){return{researchKeyword:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.force_update=r,t.objectID=rankMath.objectID,t.objectType=rankMath.objectType,n({showResearch:!1,loading:!0}),y()({method:"POST",path:"/rankmath/v1/ca/researchKeyword",data:t}).catch((function(e){n({loading:!1,showResearch:!0}),alert(e.message)})).then((function(t){n({loading:!1}),e("rank-math").updateKeywordsData(t.data),Object(i.isNull)(t.credits)||Object(i.isUndefined)(t.credits)||n({credits:t.credits,creditsValue:Object(i.isNumber)(t.credits)?t.credits:0})}))},updateAiScore:function(n,r){var a=t.score;a[n]=Object(i.round)(r,2),e("rank-math").updateAIScore(a)}}})))(De),Me=function(){var e=c()("button-secondary rank-math-content-ai",{"is-new":!rankMath.ca_viewed});return wp.element.createElement(u.Button,{className:e,onClick:function(){return a()(".rank-math-content-ai-tab").trigger("click")}},wp.element.createElement("i",{className:"rm-icon rm-icon-target"}),Object(l.__)("Content AI","rank-math"))};Object(s.addFilter)("rankMath.analytics.contentAI","rank-math",(function(){return Me})),Object(s.addAction)("rank_math_loaded","rank-math",(function(){Object(s.addFilter)("rank_math_sidebar_tabs","rank-math",(function(e){return e.push({name:"contentAI",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-target"}),wp.element.createElement("span",null,Object(l.__)("Content AI","rank-math"))),view:Be,className:"rank-math-content-ai-tab hidden is-active"}),e}));var e=document.getElementById("cmb2-metabox-rank_math_metabox_content_ai");e&&setTimeout((function(){Object(m.render)(Object(m.createElement)(Be),e)}),1e3),"gutenberg"===rankMath.currentEditor&&Object(p.registerPlugin)("rank-math-content-ai-box",{render:function(){var e=Object(h.select)("rank-math").getContentAIScore();return!(!Object(i.isEmpty)(e)||!Object(i.isEmpty)(rankMath.ca_keyword))&&wp.element.createElement(f.PluginPrePublishPanel,{title:Object(l.__)("Content AI","rank-math"),icon:"rm-icon rm-icon-target",initialOpen:"true",className:"rank-math-content-ai-box"},wp.element.createElement("p",null,Object(l.__)("Improve your content with a personal Content AI.","rank-math")),wp.element.createElement(u.Button,{className:"button-primary",onClick:function(){a()(".editor-post-publish-panel__header-cancel-button button").trigger("click"),a()(".rank-math-toolbar-score").parent().hasClass("is-pressed")||a()(".rank-math-toolbar-score").trigger("click"),setTimeout((function(){a()(".rank-math-content-ai-tab").trigger("click")}),100)}},Object(l.__)("Improve Now","rank-math")))}}),"classic"!==rankMath.currentEditor&&a()(document).on("click",".rank-math-open-contentai",(function(e){return e.preventDefault(),a()(".rank-math-content-ai-tab").trigger("click"),!1}))}))}]);
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t){e.exports=wp.i18n},function(e,t){e.exports=lodash},function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.components},function(e,t){e.exports=wp.data},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var c=a.apply(null,r);c&&e.push(c)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=wp.compose},function(e,t){e.exports=jQuery},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=rankMathAnalyzer},function(e,t){e.exports=React},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t){e.exports=wp.plugins},function(e,t){e.exports=wp.editPost},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=i(n(11)),o=i(n(16)),c=i(n(19));function i(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,c,i,u,m,p,f,h,d=[],b={};for(p=0;p<e.length;p++)if("string"!==(m=e[p]).type){if(!t.hasOwnProperty(m.value)||void 0===t[m.value])throw new Error("Invalid interpolation, missing component node: `"+m.value+"`");if("object"!==r(t[m.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+m.value+"`","\n> "+l);if("componentClose"===m.type)throw new Error("Missing opening component token: `"+m.value+"`");if("componentOpen"===m.type){n=t[m.value],i=p;break}d.push(t[m.value])}else d.push(m.value);return n&&(u=function(e,t){var n,r,a=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===a.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+a.value+"`")}(i,e),f=s(e.slice(i+1,u),t),c=a.default.cloneElement(n,{},f),d.push(c),u<e.length-1&&(h=s(e.slice(u+1),t),d=d.concat(h))),1===d.length?d[0]:(d.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,o.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,a=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,c.default)(t);try{return s(o,n)}catch(e){if(a)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},function(e,t,n){"use strict";var r=n(11),a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=n(12),c=n(17),i=n(18),l="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var o,i=typeof e;if("undefined"!==i&&"boolean"!==i||(e=null),null===e||"string"===i||"number"===i||"object"===i&&e.$$typeof===a)return n(r,e,""===t?"."+s(e,0):t),1;var m=0,p=""===t?".":t+":";if(Array.isArray(e))for(var f=0;f<e.length;f++)m+=u(o=e[f],p+s(o,f),n,r);else{var h=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(h){0;for(var d,b=h.call(e),y=0;!(d=b.next()).done;)m+=u(o=d.value,p+s(o,y++),n,r)}else if("object"===i){0;var w=""+e;c(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(e).join(", ")+"}":w,"")}}return m}var m=/\/+/g;function p(e){return(""+e).replace(m,"$&/")}var f,h,d=b,b=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},y=function(e){var t=this;c(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)};function w(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function k(e,t,n){var a,c,i=e.result,l=e.keyPrefix,s=e.func,u=e.context,m=s.call(u,t,e.count++);Array.isArray(m)?v(m,i,n,o.thatReturnsArgument):null!=m&&(r.isValidElement(m)&&(a=m,c=l+(!m.key||t&&t.key===m.key?"":p(m.key)+"/")+n,m=r.cloneElement(a,{key:c},void 0!==a.props?a.props.children:void 0)),i.push(m))}function v(e,t,n,r,a){var o="";null!=n&&(o=p(n)+"/");var c=w.getPooled(t,o,r,a);!function(e,t,n){null==e||u(e,"",t,n)}(e,k,c),w.release(c)}w.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f=function(e,t,n,r){var a=this;if(a.instancePool.length){var o=a.instancePool.pop();return a.call(o,e,t,n,r),o}return new a(e,t,n,r)},(h=w).instancePool=[],h.getPooled=f||d,h.poolSize||(h.poolSize=10),h.release=y;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return i(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return i(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;c(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)v(e[n],t,n,o.thatReturnsArgument);return t}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,c,i){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,a,o,c,i],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";var r=n(12);e.exports=r},function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},function(e,t,n){"use strict";n.r(t);var r=n(7),a=n.n(r),o=n(5),c=n.n(o),i=n(1),l=n(0),s=n(8),u=n(3),m=n(2),p=n(13),f=n(14),h=n(4),d=n(6),b=n(9),y=n.n(b);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var a=E(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}function O(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(o,e);var t,n,r,a=_(o);function o(){var e;return k(this,o),(e=a.apply(this,arguments)).state={score:0},e.setState=e.setState.bind(j(e)),e}return t=o,(n=[{key:"render",value:function(){var e=this;return setTimeout((function(){e.setState({score:e.props.score})}),1e3),wp.element.createElement("div",{className:"rank-math-ca-score"},wp.element.createElement("div",{className:"score-text"},Object(l.__)("Score:","rank-math")," ",this.state.score,wp.element.createElement("span",null," / ",Object(l.__)("100","rank-math"))),wp.element.createElement("div",{className:"score-wrapper"},wp.element.createElement("span",{className:"score-dot",style:{left:(Object(i.inRange)(this.state.score,0,5)?5:this.state.score)+"%"}})))}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),C=Object(d.compose)(Object(h.withSelect)((function(e){var t=Object.values(e("rank-math").getContentAIScore());return{score:Object(i.round)(Object(i.sum)(t)/t.length)}})))(S),P=function(e){return 100<e?"bad-fk dark":80<e?"good-fk":50<e?"ok-fk":"bad-fk"};function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t){return T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},T(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return D(e)}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(o,e);var t,n,r,a=A(o);function o(){var e;return R(this,o),(e=a.apply(this,arguments)).state={activeTab:""},e.setState=e.setState.bind(D(e)),e}return t=o,n=[{key:"render",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-recommendations"},this.getRecommendations(this.props.recommendations))}},{key:"getRecommendations",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];return Object(i.forEach)(e,(function(e,a){if("total"!==a){var o=Object(i.isUndefined)(e.total)?e:e.total,s=t.getPostStats(a),u=c()(a,{"has-children":!Object(i.isUndefined)(e.total),show:a===t.state.activeTab}),m=t.getScore(a,s,o,n),p=Object(i.ceil)(150*o/100);r.push(wp.element.createElement("div",{className:u+" "+P(m),onClick:function(){return t.setState({activeTab:t.state.activeTab!==a?a:""})},role:"presentation"},wp.element.createElement("h4",null,n?a:Object(i.startCase)(a)),n&&wp.element.createElement("span",null,s," / ",o),!n&&wp.element.createElement(React.Fragment,null,wp.element.createElement("strong",null,s),wp.element.createElement("span",{className:"desc"},Object(l.__)("Use","rank-math")," ",o," ",Object(l.__)("to","rank-math")," ",p)),Object(i.isObject)(e)&&t.getRecommendations(e,!0)))}})),n?wp.element.createElement("div",{className:"submenu"},r):r}},{key:"getPostStats",value:function(e){return Object(i.has)(this.props.postStats,e)?this.props.postStats[e]:0}},{key:"getScore",value:function(e,t,n,r){var a=t===n?100:t/n*100;if(0===n&&t<=2&&(a=100),r)return a>100&&a<=125?100:a;var o=a>80?100:t/n*80;return a>125&&"wordCount"!==e&&(o=0),this.props.updateAiScore(e,o),a>100&&"wordCount"===e||a>100&&a<=125?100:a}}],n&&x(t.prototype,n),r&&x(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),K=Object(d.compose)(Object(h.withSelect)((function(e,t){var n=1518,r=12,a=2,o=5,c=3,l=0,s=0,u=0,m=8,p=19;if(t.hasCredits){var f=t.researcher.getResearch("wordCount"),h=rankMathEditor.assessor.analyzer.defaultAnalyses.contentHasAssets;n=f(t.content),r=Object(i.isUndefined)(h)?0:h.getImages(t.researcher.paper,t.content),a=Object(i.isUndefined)(h)?0:h.getVideos(t.content),o=(t.content.match(/<h2\b[^>]*>(.*?)<\/h2>/g)||[]).length,c=(t.content.match(/<h3\b[^>]*>(.*?)<\/h3>/g)||[]).length,l=(t.content.match(/<h4\b[^>]*>(.*?)<\/h4>/g)||[]).length,s=(t.content.match(/<h5\b[^>]*>(.*?)<\/h5>/g)||[]).length,u=(t.content.match(/<h6\b[^>]*>(.*?)<\/h6>/g)||[]).length;var d=t.researcher.getResearch("getLinkStats")(t.content);m=d.internalTotal,p=d.externalTotal}return{postStats:{wordCount:n,images:r,videos:a,mediaCount:r+a,h2:o,h3:c,h4:l,h5:s,h6:u,headingCount:o+c+l+s+u,internal:m,external:p,linkCount:m+p}}})))(M);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}var U=["tabId","onClick","children","selected"];function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=H(e);if(t){var a=H(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function Q(){return Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q.apply(this,arguments)}function J(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var G=function(e){var t=e.tabId,n=e.onClick,r=e.children,a=e.selected,o=J(e,U);return wp.element.createElement(u.Button,Q({role:"tab",tabIndex:a?null:-1,"aria-selected":a,id:t,onClick:n},o),r)},Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(o,e);var t,n,r,a=V(o);function o(){var e;W(this,o),(e=a.apply(this,arguments)).handleClick=function(t){var n=e.props.onSelect,r=void 0===n?i.noop:n;e.setState({selected:t}),r(t)},e.onNavigate=function(e,t){t.click()};var t=e.props,n=t.tabs,r=t.initialTabName;return e.state={selected:r||(n.length>0?n[0].name:null)},e}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,r=n.activeClass,a=void 0===r?"is-active":r,o=n.className,l=n.instanceId,s=n.orientation,m=void 0===s?"horizontal":s,p=n.tabs,f=Object(i.find)(p,{name:t}),h=l+"-"+f.name,d=p.slice(4);return wp.element.createElement("div",{className:o},wp.element.createElement(u.NavigableMenu,{role:"tablist",orientation:m,onNavigate:this.onNavigate,className:"components-tab-panel__tabs "+t},p.slice(0,4).map((function(n){return wp.element.createElement(G,{className:c()("components-tab-panel__tabs-item",n.className,q({},a,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(i.partial)(e.handleClick,n.name)},n.title)})),d.map((function(n){return wp.element.createElement(G,{className:c()("components-tab-panel__tabs-item",n.className,q({},a,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:Object(i.partial)(e.handleClick,n.name)},n.title)}))),f&&wp.element.createElement("div",{"aria-labelledby":h,role:"tabpanel",id:h+"-view",className:"components-tab-panel__tab-content"},this.props.children(f)))}}])&&z(t.prototype,n),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),X=Object(d.withInstanceId)(Y),Z=n(10);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t){return re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},re(e,t)}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ie(e);if(t){var a=ie(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return oe(this,n)}}function oe(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ce(e)}function ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&re(e,t)}(o,e);var t,n,r,a=ae(o);function o(){var e;return te(this,o),(e=a.apply(this,arguments)).state={type:"content",selected:""},e.setState=e.setState.bind(ce(e)),e.initializeClipboard(e.setState),e}return t=o,n=[{key:"initializeClipboard",value:function(e){"function"==typeof ClipboardJS&&this.props.hasCredits&&new ClipboardJS(".rank-math-tooltip strong",{text:function(e){return e.getAttribute("data-key")}}).on("success",(function(){setTimeout((function(){e({selected:""})}),3e3)}))}},{key:"render",value:function(){var e=this;return wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement(u.SelectControl,{label:Object(l.__)("Use Keyword in","rank-math"),value:this.state.type,options:[{value:"content",label:Object(l.__)("Content","rank-math")},{value:"heading",label:Object(l.__)("Headings","rank-math")},{value:"title",label:Object(l.__)("SEO Title","rank-math")},{value:"description",label:Object(l.__)("SEO Description","rank-math")}],onChange:function(t){e.setState({type:t})}}),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Keywords%20KB%20Icon&utm_campaign=WP#keywords",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Keywords.","rank-math")},"﹖"),wp.element.createElement(React.Fragment,null,wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Click on any keyword to copy it.","rank-math")),wp.element.createElement("br",null),Object(i.includes)(["title","description"],this.state.type)&&wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Please use only one or two keywords from here.","rank-math")),wp.element.createElement("ul",null,this.getKeywords())),this.getRelatedKeywords()))}},{key:"getRelatedKeywords",value:function(){var e=this;if("content"!==this.state.type||Object(i.isEmpty)(this.props.caData.data.related_keywords))return!1;var t=[];return Object(i.forEach)(this.props.caData.data.related_keywords,(function(n){t.push(wp.element.createElement("li",{className:"rank-math-tooltip show",onClick:function(){return e.setState({selected:n})},role:"presentation"},wp.element.createElement("strong",{"data-key":n},n),e.getTooltipContent({keyword:n},!0)))})),wp.element.createElement("div",{className:"rank-math-related-keywords"},wp.element.createElement("h3",null,Object(l.__)("Related Keywords","rank-math")),wp.element.createElement("ul",null,t))}},{key:"getKeywords",value:function(){var e=this;if(Object(i.isEmpty)(this.props.caData.data.keywords))return wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Keywords for this researched keyword.","rank-math"));var t=[];return this.contentAiScore={},Object(i.forEach)(this.props.caData.data.keywords,(function(n,r){Object(i.isEmpty)(n)||(e.contentAiScore[r]={},Object(i.forEach)(n,(function(n){var a=e.props.hasCredits?e.getCount(n.keyword,r):n.count,o=P(e.getScore(n.keyword,a,n.average,r)),i=c()("rank-math-tooltip",{show:e.state.type===r});t.push(wp.element.createElement("li",{className:i+" "+o,onClick:function(){return e.setState({selected:n.keyword})},role:"presentation"},wp.element.createElement("strong",{"data-key":n.keyword},n.keyword,wp.element.createElement("span",null,a," / ",n.average)),e.getTooltipContent(n)))})))})),this.updateContentAiScore(),t}},{key:"updateContentAiScore",value:function(){var e=0,t=0;Object(i.forEach)(this.contentAiScore,(function(n,r){var a=Object.values(n),o=Object(i.sum)(a);"title"!==r&&"description"!==r||100!==Object(i.max)(a)||(o=100*a.length),e+=o,t+=a.length})),e/=t,Object(i.isNaN)(e)||this.props.updateAiScore("keywords",e)}},{key:"getScore",value:function(e,t,n,r){var a=t/n*100;return this.contentAiScore[r][e]=a>100?0:a>80?100:a,a}},{key:"getTooltipContent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.props.hasCredits)return this.state.selected===e.keyword?wp.element.createElement("span",{className:"rank-math-tooltip-data"},Object(l.__)("Copied","rank-math")):e.competition||e.cpc||e.search_volume?wp.element.createElement("span",{className:"rank-math-tooltip-data"},wp.element.createElement("span",null,Object(l.__)("Ad Competition:","rank-math")," ",Object(i.round)(100*e.competition)),wp.element.createElement("span",null,Object(l.__)("CPC:","rank-math")," $",Object(i.round)(e.cpc,2)),wp.element.createElement("span",null,Object(l.__)("Volume:","rank-math")," ",Object(i.round)(e.search_volume))):wp.element.createElement("span",{className:"rank-math-tooltip-data"},t?Object(l.__)("Click to copy keyword","rank-math"):Object(l.__)("No data available","rank-math"))}},{key:"getCount",value:function(e,t){var n=this.props.caData.content;if(e=Z.Helpers.removeDiacritics(e),"heading"===t){e=e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&");var r=new RegExp("<h[2-6][^>]*>.*?"+e+".*?</h[2-6]>","g"),a=n.match(r);return Object(i.isNull)(a)?0:a.length}return"title"===t&&(n=this.props.caData.title),"description"===t&&(n=this.props.caData.description),Z.Helpers.cleanTagsOnly(n).split(e).length-1}}],n&&ne(t.prototype,n),r&&ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),se=Object(d.compose)(Object(h.withDispatch)((function(e){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!0)}}})))(le),ue=function(){return!(Object(i.isNil)(window.wp)||Object(i.isNil)(wp.data)||Object(i.isNil)(wp.data.select("core/editor"))||!window.document.body.classList.contains("block-editor-page")||!Object(i.isFunction)(wp.data.select("core/editor").getEditedPostAttribute))};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},he(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=we(e);if(t){var a=we(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return be(this,n)}}function be(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ye(e)}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)}(o,e);var t,n,r,a=de(o);function o(){var e;return pe(this,o),(e=a.apply(this,arguments)).state={iconClass:"rm-icon-copy",selected:""},e.setState=e.setState.bind(ye(e)),e.initializeClipboard(e.setState),e}return t=o,(n=[{key:"initializeClipboard",value:function(e){var t=this;"function"==typeof ClipboardJS&&new ClipboardJS(".rank-math-copy-questions, .rank-math-questions-item h3",{text:function(e){if(!Object(i.isNull)(e.getAttribute("data-key")))return e.getAttribute("data-key");if(!ue())return document.getElementById("rank-math-ca-questions-data").innerHTML;var n=[];return Object(i.forEach)(t.props.caData.data.related_questions,(function(e){n.push({id:Object(i.uniqueId)("faq-question-"),title:e,content:"",visible:!0})})),"\x3c!-- wp:rank-math/faq-block "+JSON.stringify({questions:n})+' --\x3e<div class="wp-block-rank-math-faq-block"></div>\x3c!-- /wp:rank-math/faq-block --\x3e'}}).on("success",(function(){setTimeout((function(){e({iconClass:"rm-icon-copy"})}),3e3)}))}},{key:"render",value:function(){var e=this,t=[];return Object(i.isEmpty)(this.props.caData.data.related_questions)?wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Questions for this researched keyword.","rank-math")):(Object(i.forEach)(this.props.caData.data.related_questions,(function(n){t.push(wp.element.createElement("div",{className:"rank-math-questions-item"},wp.element.createElement("h3",{className:"rank-math-tooltip","data-key":n,onClick:function(){return e.setState({selected:n})},role:"presentation"},n,e.getTooltipContent(n))))})),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement("div",{className:"rank-math-section-heading"},wp.element.createElement("h2",null,Object(l.__)("Related Questions","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Questions%20KB%20Icon&utm_campaign=WP",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Questions.","rank-math")},"﹖")),wp.element.createElement(u.Button,{onClick:function(){e.setState({iconClass:"rm-icon-tick"})},className:"rank-math-copy-questions button-secondary rank-math-tooltip left"},wp.element.createElement("i",{className:"rm-icon "+this.state.iconClass}),wp.element.createElement("span",null,Object(l.__)("Copy this data as a FAQ Block.","rank-math")))),wp.element.createElement("span",{className:"components-form-token-field__help"},Object(l.__)("Click on any question to copy it.","rank-math")),wp.element.createElement("div",{id:"rank-math-ca-questions-data"},t))))}},{key:"getTooltipContent",value:function(e){return this.state.selected===e&&wp.element.createElement("span",{className:"rank-math-tooltip-data"},Object(l.__)("Copied","rank-math"))}}])&&fe(t.prototype,n),r&&fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(m.Component),ve=ke,ge=function(e){var t=[];return Object(i.isEmpty)(e.caData.data.links)?wp.element.createElement("h3",{className:"no-data"},Object(l.__)("There are no recommended Links for this researched keyword.","rank-math")):(Object(i.forEach)(e.caData.data.links,(function(e){return t.push(wp.element.createElement("li",null,wp.element.createElement("a",{href:e,rel:"noreferrer",target:"_blank"},e)))})),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{initialOpen:!0},wp.element.createElement("div",{className:"rank-math-section-heading"},wp.element.createElement("h2",null,Object(l.__)("Related External Links","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Links%20KB%20Icon&utm_campaign=WP#links",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about Links.","rank-math")},"﹖")),wp.element.createElement("p",null,Object(l.__)("Use some of these external links in the content area. It is recommended to add","rank-math")," ",wp.element.createElement("a",{href:"https://rankmath.com/kb/about-and-mentions-schema/",rel:"noreferrer",target:"_blank"},Object(l.__)("about or mention Schema.","rank-math")))),wp.element.createElement("ul",null,t))))},_e=function(e){"social"===e&&Object(h.dispatch)("rank-math").toggleSnippetEditor(!0)},Oe=function(e){return wp.element.createElement(X,{className:"rank-math-contentai-tabs",activeClass:"is-active",tabs:[{name:"keywords",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Keywords","rank-math"))),view:se,className:"rank-math-keywords-tab"},{name:"questions",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Questions","rank-math"))),view:ve,className:"rank-math-questions-tab"},{name:"links",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("span",null,Object(l.__)("Links","rank-math"))),view:ge,className:"rank-math-recommended-links-tab"}],onSelect:_e,data:e},(function(t){return wp.element.createElement("div",{className:"rank-math-contentai-tab-content-"+t.name},Object(m.createElement)(t.view,e))}))},je=n(15),Ee=n.n(je),Se=function(e){var t=e.tags,n=e.components,r=e.children;return n=n||{},!1===Object(i.isUndefined)(t)&&(t=t.split(",")).forEach((function(e){var t=e;n[e]=wp.element.createElement(t,null)})),Ee()({mixedString:r,components:n})};function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Re(e,t){return Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Re(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ie(e);if(t){var a=Ie(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Te(this,n)}}function Te(e,t){if(t&&("object"===Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ae(e)}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(s,e);var t,n,r,o=xe(s);function s(){var e;return Pe(this,s),(e=o.apply(this,arguments)).state={keyword:e.props.keyword,showResearch:e.props.keyword!==rankMath.ca_keyword.keyword,country:e.props.country,credits:1,creditsValue:rankMath.ca_credits,loading:!1,loadingCredits:!1},e.setState=e.setState.bind(Ae(e)),e}return t=s,(n=[{key:"componentDidMount",value:function(){!this.state.creditsValue&&rankMath.isUserRegistered&&this.updateCredits()}},{key:"updateCredits",value:function(){var e=this;this.setState({loadingCredits:!0}),y()({method:"POST",path:"/rankmath/v1/ca/getCredits"}).catch((function(t){e.setState({loadingCredits:!1}),alert(t.message)})).then((function(t){e.setState({creditsValue:t}),e.setState({loadingCredits:!1})}))}},{key:"render",value:function(){var e=rankMath.isUserRegistered&&Object(i.isNumber)(this.state.credits),t=c()("rank-math-content-ai-data",{loading:this.state.loading,blurred:!e}),n=this.props.data;return(!e&&Object(i.isEmpty)(n)||"show_dummy_data"===n)&&(n=this.getDummyData()),wp.element.createElement(m.Fragment,null,wp.element.createElement(u.PanelBody,{className:"rank-math-content-ai-wrapper",initialOpen:!0},wp.element.createElement(React.Fragment,null,this.getHeader(),!rankMath.isUserRegistered&&this.connectAccountNotice(),rankMath.isUserRegistered&&!e&&this.creditsNotice(e),e&&this.keywordField(),wp.element.createElement("div",{className:t},wp.element.createElement("span",{className:"loader-text"},wp.element.createElement("span",null,Object(l.__)("Fetching Search Results","rank-math")),wp.element.createElement("span",null,Object(l.__)("Analysing Your Competitors","rank-math")),wp.element.createElement("span",null,Object(l.__)("Crunching the Numbers","rank-math")),wp.element.createElement("span",null,Object(l.__)("Cooking a Personalized SEO Plan","rank-math")),wp.element.createElement("span",null,Object(l.__)("Final Touches to the SEO Recommendations","rank-math"))),Object(i.isString)(n)&&wp.element.createElement("h3",{className:"no-data"},n),!Object(i.isEmpty)(n)&&!Object(i.isString)(n)&&wp.element.createElement("div",null,wp.element.createElement("h3",{className:"rank-math-ca-section-title"},Object(l.__)("Content AI","rank-math"),wp.element.createElement("span",null,Object(l.__)("New!","rank-math")),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20KB%20Icon&utm_campaign=WP",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Content AI Knowledge Base.","rank-math")},"﹖")),wp.element.createElement(C,null),wp.element.createElement(K,{recommendations:n.recommendations,hasCredits:e,content:this.props.content,researcher:this.props.researcher,updateAiScore:this.props.updateAiScore,hasThumbnail:this.props.hasThumbnail}),wp.element.createElement(Oe,{caData:this.props,updateAiScore:this.props.updateAiScore,hasCredits:e}))))))}},{key:"getDummyData",value:function(){return{keywords:{content:{"rank math":{keyword:"rank math",average:17,count:12},"rank math vs yoast seo":{keyword:"rank math vs yoast seo",average:1,count:1},"what is rank math":{keyword:"what is rank math",average:1,count:1},"rank math schema":{keyword:"rank math schema",average:1,count:1},"rank math configuration":{keyword:"rank math configuration",average:1,count:1},"rank math pro version":{keyword:"rank math pro version",average:1,count:2},"rank math comparison":{keyword:"rank math comparison",average:1,count:1},"rank math for seo":{keyword:"rank math for seo",average:1,count:1},"seo by rank math":{keyword:"seo by rank math",average:1,count:0}}},related_keywords:["rank math plugin","rank math pricing","rank math vs yoast","rank math review","rank math premium","how to use rank math","rank math training","rank math woocommerce","wordpress seo plugin"],recommendations:{wordCount:1829,linkCount:{total:16},headingCount:{total:9},mediaCount:{total:18}}}}},{key:"getHeader",value:function(){var e=this;return wp.element.createElement("div",{className:"rank-math-ca-top-section"},wp.element.createElement(u.Button,{onClick:function(){return a()(".rank-math-general-tab").trigger("click")}},wp.element.createElement("i",{className:"dashicons dashicons-arrow-left-alt"}),Object(l.__)("Back","rank-math")),wp.element.createElement(u.SelectControl,{value:this.state.country,onChange:function(t){return e.setState({country:t,showResearch:!0})},options:rankMath.countries}))}},{key:"keywordField",value:function(){var e=this,t=c()("rank-math-tooltip update-credits",{loading:this.state.loadingCredits});return wp.element.createElement("div",{className:"rank-math-ca-keywords-wrapper"},wp.element.createElement("div",{className:"rank-math-ca-credits-wrapper"},wp.element.createElement(u.TextControl,{label:Object(l.__)("Focus Keyword","rank-math"),value:this.state.keyword,onChange:function(t){return e.setState({keyword:t,showResearch:!0})},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()},help:wp.element.createElement(React.Fragment,null,Object(l.__)("Upgrade to buy more credits from ","rank-math"),wp.element.createElement("a",{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Upgrade%20Text&utm_campaign=WP#pricing-tables",rel:"noreferrer",target:"_blank",title:Object(l.__)("Content AI Pricing.","rank-math")},Object(l.__)("here.","rank-math"))),placeholder:Object(l.__)("Suggested length 2-3 Words","rank-math")}),wp.element.createElement("div",{className:"help-text"},Object(l.__)("To learn how to use it","rank-math")," ",wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Content%20AI%20Sidebar%20KB%20Link&utm_campaign=WP",target:"_blank",rel:"noreferrer"},Object(l.__)("Click here","rank-math"))),!this.state.showResearch&&!this.state.loading&&!Object(i.isEmpty)(this.props.data)&&wp.element.createElement(u.Button,{className:"rank-math-ca-force-update rank-math-tooltip left",onClick:function(){return e.props.researchKeyword(e.state,e.setState,!0)}},wp.element.createElement("i",{className:"dashicons dashicons-image-rotate"}),wp.element.createElement("span",null,Object(l.__)("Refresh will use one new credit.","rank-math"))),wp.element.createElement("div",{className:"rank-math-ca-credits"},wp.element.createElement(u.Button,{className:t,onClick:function(){return e.updateCredits()}},wp.element.createElement("i",{className:"dashicons dashicons-image-rotate"}),wp.element.createElement("span",null,Object(l.__)("Click to refresh the available credits.","rank-math"))),wp.element.createElement("span",null,Object(l.__)("Credits","rank-math")),wp.element.createElement("a",{href:"https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20Credits%20Tooltip%20Icon&utm_campaign=WP#credits-usage",rel:"noreferrer",target:"_blank",className:"rank-math-help-icon",title:Object(l.__)("Know more about credits.","rank-math")},"﹖"),wp.element.createElement("strong",null,this.state.creditsValue))),this.state.showResearch&&wp.element.createElement(u.Button,{className:"is-primary",onClick:function(){return e.props.researchKeyword(e.state,e.setState)},title:Object(l.__)("One credit will be used.","rank-math"),disabled:!this.state.keyword},Object(l.__)("Research","rank-math")))}},{key:"connectAccountNotice",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-warning"},wp.element.createElement("h3",null,Object(l.__)("Content AI","rank-math")),wp.element.createElement("p",null,Object(l.__)("Please connect your account to use this feature.","rank-math")),wp.element.createElement(u.Button,{href:rankMath.connectSiteUrl,className:"is-primary"},Object(l.__)("Connect Now","rank-math")))}},{key:"creditsNotice",value:function(){return wp.element.createElement("div",{className:"rank-math-ca-warning"},wp.element.createElement("h3",null,Object(l.__)("Content AI","rank-math")),"site_limit_reached"===this.state.credits&&wp.element.createElement("p",null,wp.element.createElement(Se,{components:{link1:wp.element.createElement("a",{href:"https://rankmath.com/my-account/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP",target:"_blank",rel:"noopener noreferrer"}),link2:wp.element.createElement("a",{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP#pricing-tables",target:"_blank",rel:"noopener noreferrer"})}},Object(l.__)("All credits assigned to this site are used. Please add more credits from {{link1}}My Account{{/link1}} Page or {{link2}}upgrade your plan{{/link2}}.","rank-math"))),"account_limit_reached"===this.state.credits&&wp.element.createElement(React.Fragment,null,wp.element.createElement("p",null,Object(l.__)("You don't have any credits left.","rank-math")),wp.element.createElement(u.Button,{href:"https://rankmath.com/content-ai/?utm_source=Plugin&utm_medium=Sidebar%20No%20Credits&utm_campaign=WP#pricing-tables",target:"_blank",rel:"noreferrer",className:"is-primary"},Object(l.__)("Get More Credits","rank-math"))))}}])&&Ne(t.prototype,n),r&&Ne(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(m.Component),Be=Object(d.compose)(Object(h.withSelect)((function(e){var t=rankMathEditor.assessor.analyzer.researcher,n=t.paper;return{data:e("rank-math").getKeywordsData(),keyword:Object(i.get)(rankMath.ca_keyword,"keyword",e("rank-math").getKeywords().split(",")[0]),country:Object(i.get)(rankMath.ca_keyword,"country",rankMath.contentAiCountry),researcher:t,content:Object(i.isUndefined)(n)?"":n.getTextLower(),title:Object(i.isUndefined)(n)?"":n.getTitle().toLowerCase(),description:Object(i.isUndefined)(n)?"":n.getDescription().toLowerCase(),hasThumbnail:Object(i.isUndefined)(n)?"":n.hasThumbnail(),score:e("rank-math").getContentAIScore()}})),Object(h.withDispatch)((function(e,t){return{researchKeyword:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.force_update=r,t.objectID=rankMath.objectID,t.objectType=rankMath.objectType,n({showResearch:!1,loading:!0}),y()({method:"POST",path:"/rankmath/v1/ca/researchKeyword",data:t}).catch((function(e){n({loading:!1,showResearch:!0}),alert(e.message)})).then((function(t){n({loading:!1}),e("rank-math").updateKeywordsData(t.data),Object(i.isNull)(t.credits)||Object(i.isUndefined)(t.credits)||n({credits:t.credits,creditsValue:Object(i.isNumber)(t.credits)?t.credits:0})}))},updateAiScore:function(n,r){var a=t.score;a[n]=Object(i.round)(r,2),e("rank-math").updateAIScore(a)}}})))(De),Me=function(){var e=c()("button-secondary rank-math-content-ai",{"is-new":!rankMath.ca_viewed});return wp.element.createElement(u.Button,{className:e,onClick:function(){return a()(".rank-math-content-ai-tab").trigger("click")}},wp.element.createElement("i",{className:"rm-icon rm-icon-target"}),Object(l.__)("Content AI","rank-math"))};Object(s.addFilter)("rankMath.analytics.contentAI","rank-math",(function(){return Me})),Object(s.addAction)("rank_math_loaded","rank-math",(function(){Object(s.addFilter)("rank_math_sidebar_tabs","rank-math",(function(e){return e.push({name:"contentAI",title:wp.element.createElement(m.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-target"}),wp.element.createElement("span",null,Object(l.__)("Content AI","rank-math"))),view:Be,className:"rank-math-content-ai-tab hidden is-active"}),e}));var e=document.getElementById("cmb2-metabox-rank_math_metabox_content_ai");e&&setTimeout((function(){Object(m.render)(Object(m.createElement)(Be),e)}),1e3),"gutenberg"===rankMath.currentEditor&&Object(p.registerPlugin)("rank-math-content-ai-box",{render:function(){var e=Object(h.select)("rank-math").getContentAIScore();return!(!Object(i.isEmpty)(e)||!Object(i.isEmpty)(rankMath.ca_keyword))&&wp.element.createElement(f.PluginPrePublishPanel,{title:Object(l.__)("Content AI","rank-math"),icon:"rm-icon rm-icon-target",initialOpen:"true",className:"rank-math-content-ai-box"},wp.element.createElement("p",null,Object(l.__)("Improve your content with a personal Content AI.","rank-math")),wp.element.createElement(u.Button,{className:"button-primary",onClick:function(){a()(".editor-post-publish-panel__header-cancel-button button").trigger("click"),a()(".rank-math-toolbar-score").parent().hasClass("is-pressed")||a()(".rank-math-toolbar-score").trigger("click"),setTimeout((function(){a()(".rank-math-content-ai-tab").trigger("click")}),100)}},Object(l.__)("Improve Now","rank-math")))}}),"classic"!==rankMath.currentEditor&&a()(document).on("click",".rank-math-open-contentai",(function(e){return e.preventDefault(),a()(".rank-math-content-ai-tab").trigger("click"),!1}))}))}]);
|
includes/modules/content-ai/assets/src/ContentAI.js
CHANGED
@@ -76,8 +76,9 @@ class ContentAI extends Component {
|
|
76 |
blurred: ! hasCredits,
|
77 |
} )
|
78 |
|
79 |
-
|
80 |
-
|
|
|
81 |
}
|
82 |
|
83 |
return (
|
@@ -99,15 +100,15 @@ class ContentAI extends Component {
|
|
99 |
<span>{ __( 'Cooking a Personalized SEO Plan', 'rank-math' ) }</span>
|
100 |
<span>{ __( 'Final Touches to the SEO Recommendations', 'rank-math' ) }</span>
|
101 |
</span>
|
102 |
-
{ isString(
|
103 |
-
{ ! isEmpty(
|
104 |
<h3 className="rank-math-ca-section-title">
|
105 |
{ __( 'Content AI', 'rank-math' ) }
|
106 |
<span>{ __( 'New!', 'rank-math' ) }</span>
|
107 |
<a href="https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20KB%20Icon&utm_campaign=WP" rel="noreferrer" target="_blank" className="rank-math-help-icon" title={ __( 'Content AI Knowledge Base.', 'rank-math' ) }>﹖</a>
|
108 |
</h3>
|
109 |
<ContentAIScore />
|
110 |
-
<Recommendations recommendations={
|
111 |
<ContentAIPanel caData={ this.props } updateAiScore={ this.props.updateAiScore } hasCredits={ hasCredits } />
|
112 |
</div>
|
113 |
}
|
76 |
blurred: ! hasCredits,
|
77 |
} )
|
78 |
|
79 |
+
let data = this.props.data
|
80 |
+
if ( ( ! hasCredits && isEmpty( data ) ) || 'show_dummy_data' === data ) {
|
81 |
+
data = this.getDummyData()
|
82 |
}
|
83 |
|
84 |
return (
|
100 |
<span>{ __( 'Cooking a Personalized SEO Plan', 'rank-math' ) }</span>
|
101 |
<span>{ __( 'Final Touches to the SEO Recommendations', 'rank-math' ) }</span>
|
102 |
</span>
|
103 |
+
{ isString( data ) && <h3 className="no-data">{ data }</h3> }
|
104 |
+
{ ! isEmpty( data ) && ! isString( data ) && <div>
|
105 |
<h3 className="rank-math-ca-section-title">
|
106 |
{ __( 'Content AI', 'rank-math' ) }
|
107 |
<span>{ __( 'New!', 'rank-math' ) }</span>
|
108 |
<a href="https://rankmath.com/kb/how-to-use-content-ai/?utm_source=Plugin&utm_medium=Sidebar%20KB%20Icon&utm_campaign=WP" rel="noreferrer" target="_blank" className="rank-math-help-icon" title={ __( 'Content AI Knowledge Base.', 'rank-math' ) }>﹖</a>
|
109 |
</h3>
|
110 |
<ContentAIScore />
|
111 |
+
<Recommendations recommendations={ data.recommendations } hasCredits={ hasCredits } content={ this.props.content } researcher={ this.props.researcher } updateAiScore={ this.props.updateAiScore } hasThumbnail={ this.props.hasThumbnail } />
|
112 |
<ContentAIPanel caData={ this.props } updateAiScore={ this.props.updateAiScore } hasCredits={ hasCredits } />
|
113 |
</div>
|
114 |
}
|
includes/modules/content-ai/assets/src/Recommendations.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import classnames from 'classnames'
|
5 |
-
import { isObject, isUndefined,
|
6 |
|
7 |
/**
|
8 |
* WordPress dependencies
|
@@ -161,8 +161,8 @@ export default compose(
|
|
161 |
const getWordCount = props.researcher.getResearch( 'wordCount' )
|
162 |
const contentAssets = rankMathEditor.assessor.analyzer.defaultAnalyses.contentHasAssets
|
163 |
wordCount = getWordCount( props.content )
|
164 |
-
images = !
|
165 |
-
videos = !
|
166 |
h2 = ( props.content.match( /<h2\b[^>]*>(.*?)<\/h2>/g ) || [] ).length
|
167 |
h3 = ( props.content.match( /<h3\b[^>]*>(.*?)<\/h3>/g ) || [] ).length
|
168 |
h4 = ( props.content.match( /<h4\b[^>]*>(.*?)<\/h4>/g ) || [] ).length
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import classnames from 'classnames'
|
5 |
+
import { isObject, isUndefined, startCase, forEach, has, ceil } from 'lodash'
|
6 |
|
7 |
/**
|
8 |
* WordPress dependencies
|
161 |
const getWordCount = props.researcher.getResearch( 'wordCount' )
|
162 |
const contentAssets = rankMathEditor.assessor.analyzer.defaultAnalyses.contentHasAssets
|
163 |
wordCount = getWordCount( props.content )
|
164 |
+
images = ! isUndefined( contentAssets ) ? contentAssets.getImages( props.researcher.paper, props.content ) : 0
|
165 |
+
videos = ! isUndefined( contentAssets ) ? contentAssets.getVideos( props.content ) : 0
|
166 |
h2 = ( props.content.match( /<h2\b[^>]*>(.*?)<\/h2>/g ) || [] ).length
|
167 |
h3 = ( props.content.match( /<h3\b[^>]*>(.*?)<\/h3>/g ) || [] ).length
|
168 |
h4 = ( props.content.match( /<h4\b[^>]*>(.*?)<\/h4>/g ) || [] ).length
|
includes/opengraph/class-image.php
CHANGED
@@ -127,8 +127,11 @@ class Image {
|
|
127 |
*/
|
128 |
private function image_tag( $image_meta ) {
|
129 |
$overlay = $this->opengraph->get_overlay_image();
|
130 |
-
$
|
131 |
-
|
|
|
|
|
|
|
132 |
$this->opengraph->tag( 'og:image', esc_url_raw( $og_image ) );
|
133 |
|
134 |
// Add secure URL if detected. Not all services implement this, so the regular one also needs to be rendered.
|
127 |
*/
|
128 |
private function image_tag( $image_meta ) {
|
129 |
$overlay = $this->opengraph->get_overlay_image();
|
130 |
+
$og_image = $image_meta['url'];
|
131 |
+
if ( ! empty( $image_meta['id'] ) ) {
|
132 |
+
$secret = $this->generate_secret( $image_meta['id'], $overlay );
|
133 |
+
$og_image = $overlay ? admin_url( "admin-ajax.php?action=rank_math_overlay_thumb&id={$image_meta['id']}&type={$overlay}&secret={$secret}" ) : $og_image;
|
134 |
+
}
|
135 |
$this->opengraph->tag( 'og:image', esc_url_raw( $og_image ) );
|
136 |
|
137 |
// Add secure URL if detected. Not all services implement this, so the regular one also needs to be rendered.
|
languages/rank-math.pot
CHANGED
@@ -1487,7 +1487,7 @@ msgid "Buy"
|
|
1487 |
msgstr ""
|
1488 |
|
1489 |
#. translators: %d: minutes
|
1490 |
-
#. translators: %
|
1491 |
msgid "%d minute"
|
1492 |
msgid_plural "%d minutes"
|
1493 |
msgstr[0] ""
|
@@ -1556,7 +1556,7 @@ msgstr ""
|
|
1556 |
msgid "Products"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
-
#. translators: 1: current page number, 2:
|
1560 |
msgid "Page %1$d of %2$d"
|
1561 |
msgstr ""
|
1562 |
|
@@ -3329,7 +3329,6 @@ msgid "Your site may not be visible to search engine."
|
|
3329 |
msgstr ""
|
3330 |
|
3331 |
#. translators: %1$s link to the reading settings, %2$s closing tag for the link
|
3332 |
-
#. translators: %1$s resolves to the opening tag of the link to the reading settings, %1$s resolves to the closing tag for the link
|
3333 |
msgid "You must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility."
|
3334 |
msgstr ""
|
3335 |
|
@@ -3476,6 +3475,10 @@ msgstr ""
|
|
3476 |
msgid "Attention: Search Engines can't see your website."
|
3477 |
msgstr ""
|
3478 |
|
|
|
|
|
|
|
|
|
3479 |
msgid "Your site is accessible by search engine."
|
3480 |
msgstr ""
|
3481 |
|
@@ -5307,23 +5310,23 @@ msgstr ""
|
|
5307 |
msgid "Toggle All"
|
5308 |
msgstr ""
|
5309 |
|
5310 |
-
#. translators: %
|
5311 |
msgid "%d day"
|
5312 |
msgid_plural "%d days"
|
5313 |
msgstr[0] ""
|
5314 |
msgstr[1] ""
|
5315 |
|
5316 |
-
#. translators: %
|
5317 |
msgid "%d hour"
|
5318 |
msgid_plural "%d hours"
|
5319 |
msgstr[0] ""
|
5320 |
msgstr[1] ""
|
5321 |
|
5322 |
-
#. translators:
|
5323 |
msgid "%1$s and %2$s"
|
5324 |
msgstr ""
|
5325 |
|
5326 |
-
#. translators:
|
5327 |
msgid "%1$s, %2$s and %3$s"
|
5328 |
msgstr ""
|
5329 |
|
1487 |
msgstr ""
|
1488 |
|
1489 |
#. translators: %d: minutes
|
1490 |
+
#. translators: %d is the number of minutes.
|
1491 |
msgid "%d minute"
|
1492 |
msgid_plural "%d minutes"
|
1493 |
msgstr[0] ""
|
1556 |
msgid "Products"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
+
#. translators: %1$d: current page number, %2$d: max pages.
|
1560 |
msgid "Page %1$d of %2$d"
|
1561 |
msgstr ""
|
1562 |
|
3329 |
msgstr ""
|
3330 |
|
3331 |
#. translators: %1$s link to the reading settings, %2$s closing tag for the link
|
|
|
3332 |
msgid "You must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility."
|
3333 |
msgstr ""
|
3334 |
|
3475 |
msgid "Attention: Search Engines can't see your website."
|
3476 |
msgstr ""
|
3477 |
|
3478 |
+
#. translators: %1$s: opening tag of the link, %2$s: the closing tag
|
3479 |
+
msgid "Navigate to %1$sSettings > Reading%2$s and turn off this option: \"Discourage search engines from indexing this site\"."
|
3480 |
+
msgstr ""
|
3481 |
+
|
3482 |
msgid "Your site is accessible by search engine."
|
3483 |
msgstr ""
|
3484 |
|
5310 |
msgid "Toggle All"
|
5311 |
msgstr ""
|
5312 |
|
5313 |
+
#. translators: %d is the number of days.
|
5314 |
msgid "%d day"
|
5315 |
msgid_plural "%d days"
|
5316 |
msgstr[0] ""
|
5317 |
msgstr[1] ""
|
5318 |
|
5319 |
+
#. translators: %d is the number of hours.
|
5320 |
msgid "%d hour"
|
5321 |
msgid_plural "%d hours"
|
5322 |
msgstr[0] ""
|
5323 |
msgstr[1] ""
|
5324 |
|
5325 |
+
#. translators: placeholders are units of time, e.g. '1 hour and 30 minutes'
|
5326 |
msgid "%1$s and %2$s"
|
5327 |
msgstr ""
|
5328 |
|
5329 |
+
#. translators: placeholders are units of time, e.g. '1 day, 8 hours and 30 minutes'
|
5330 |
msgid "%1$s, %2$s and %3$s"
|
5331 |
msgstr ""
|
5332 |
|
rank-math.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
-
* Version: 1.0.89
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
@@ -34,7 +34,7 @@ final class RankMath {
|
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
-
public $version = '1.0.89';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
9 |
*
|
10 |
* @wordpress-plugin
|
11 |
* Plugin Name: Rank Math SEO
|
12 |
+
* Version: 1.0.89.1
|
13 |
* Plugin URI: https://s.rankmath.com/home
|
14 |
* Description: Rank Math is a revolutionary SEO product that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible.
|
15 |
* Author: Rank Math
|
34 |
*
|
35 |
* @var string
|
36 |
*/
|
37 |
+
public $version = '1.0.89.1';
|
38 |
|
39 |
/**
|
40 |
* Rank Math database version.
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: seo, sitemap, google search console, schema, redirection, WordPress SEO
|
|
5 |
Tested up to: 6.0
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 1.0.89
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
@@ -580,6 +580,11 @@ Please drop us an email at support@rankmath.com and we would be more than happy
|
|
580 |
|
581 |
== Changelog ==
|
582 |
|
|
|
|
|
|
|
|
|
|
|
583 |
= 1.0.89 [May 20, 2022] =
|
584 |
* Added: Support for shortcodes in the [FAQ](https://rankmath.com/kb/faq-schema-block/) & [HowTo](https://rankmath.com/blog/howto-schema/) block content
|
585 |
* Added: [New filter](https://rankmath.com/kb/filters-hooks-api-developer/#allow-line-breaks) to allow line breaks in the FAQ & HowTo block content
|
5 |
Tested up to: 6.0
|
6 |
Requires at least: 5.6
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 1.0.89.1
|
9 |
License: GPL-2.0+
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
11 |
|
580 |
|
581 |
== Changelog ==
|
582 |
|
583 |
+
= 1.0.89.1 [May 21, 2022] =
|
584 |
+
* Fixed: [Content AI](https://rankmath.com/kb/how-to-use-content-ai/#num-6-5-media-count) was not detecting the images present in the content area
|
585 |
+
* Fixed: Content AI was crashing the editor on some setups when the site was not connected to Rank Math account
|
586 |
+
* Fixed: Some sites were showing PHP warning after the last update
|
587 |
+
|
588 |
= 1.0.89 [May 20, 2022] =
|
589 |
* Added: Support for shortcodes in the [FAQ](https://rankmath.com/kb/faq-schema-block/) & [HowTo](https://rankmath.com/blog/howto-schema/) block content
|
590 |
* Added: [New filter](https://rankmath.com/kb/filters-hooks-api-developer/#allow-line-breaks) to allow line breaks in the FAQ & HowTo block content
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'rankmath/seo-by-rank-math',
|
10 |
'dev' => true,
|
11 |
),
|
@@ -52,7 +52,7 @@
|
|
52 |
'type' => 'wordpress-plugin',
|
53 |
'install_path' => __DIR__ . '/../../',
|
54 |
'aliases' => array(),
|
55 |
-
'reference' => '
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'woocommerce/action-scheduler' => array(
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'd589f80017559bddcd6f8443b821e5a2d067f915',
|
9 |
'name' => 'rankmath/seo-by-rank-math',
|
10 |
'dev' => true,
|
11 |
),
|
52 |
'type' => 'wordpress-plugin',
|
53 |
'install_path' => __DIR__ . '/../../',
|
54 |
'aliases' => array(),
|
55 |
+
'reference' => 'd589f80017559bddcd6f8443b821e5a2d067f915',
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
'woocommerce/action-scheduler' => array(
|