(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=jQuery;var n=t.n(e);const r=wp.hooks;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function a(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.productImages=n()(".product_images"),this.events(),this.hooks()},(e=[{key:"hooks",value:function(){(0,r.addFilter)("rank_math_content","rank-math-pro",this.getContent.bind(this),11),(0,r.addFilter)("rankMath_analysis_contentLength","rank-math-pro",this.changeFilteredText.bind(this),11),(0,r.addFilter)("rankMath_analysis_contentLength_boundaries","rank-math-pro",this.contentBoundaries.bind(this),11),(0,r.addAction)("rank_math_data_changed","rank-math-pro",this.refreshResults.bind(this))}},{key:"getContent",value:function(t){return this.productImages.length?(this.productImages.find("li").each((function(){void 0!==n()(this).find("img")[0]&&(t+=n()(this).find("img")[0].outerHTML)})),t):t}},{key:"events",value:function(){this.productImages.length&&this.productImages.on("DOMSubtreeModified",(function(){rankMathEditor.refresh("content")}))}},{key:"changeFilteredText",value:function(t){return t.failed=t.failed.replace("600","200"),t.emptyContent=t.emptyContent.replace("600-2500","200"),t}},{key:"contentBoundaries",value:function(t,e){return e&&"product"!==e.getPostType()?t:{recommended:{boundary:200,score:8},belowRecommended:{boundary:150,score:5},medium:{boundary:120,score:4},belowMedium:{boundary:100,score:3},low:{boundary:80,score:2}}}},{key:"refreshResults",value:function(t){"schemas"===t&&rankMathEditor.refresh("content")}}])&&i(t.prototype,e),o&&i(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,o}();n()((function(){new u}))})();