WordPress SEO Plugin – Rank Math - Version 1.0.102.1

Version Description

Download this release

Release Info

Developer rankmath
Plugin Icon 128x128 WordPress SEO Plugin – Rank Math
Version 1.0.102.1
Comparing to
See all releases

Code changes from version 1.0.102 to 1.0.102.1

assets/admin/js/rank-math-app.js CHANGED
@@ -1 +1 @@
1
- !function(){var e={184:function(e,t){var n;!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},705:function(e,t,n){var a=n(639).Symbol;e.exports=a},239:function(e,t,n){var a=n(705),i=n(607),r=n(333),o=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):r(e)}},561:function(e,t,n){var a=n(990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(i,""):e}},957:function(e,t,n){var a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=a},607:function(e,t,n){var a=n(705),i=Object.prototype,r=i.hasOwnProperty,o=i.toString,s=a?a.toStringTag:void 0;e.exports=function(e){var t=r.call(e,s),n=e[s];try{e[s]=void 0;var a=!0}catch(e){}var i=o.call(e);return a&&(t?e[s]=n:delete e[s]),i}},333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:function(e,t,n){var a=n(957),i="object"==typeof self&&self&&self.Object===Object&&self,r=a||i||Function("return this")();e.exports=r},990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},279:function(e,t,n){var a=n(218),i=n(771),r=n(841),o=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,p,d,u,h,m=0,g=!1,f=!1,w=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,a=c;return l=c=void 0,m=t,d=e.apply(a,n)}function y(e){return m=e,u=setTimeout(k,t),g?v(e):d}function b(e){var n=e-h;return void 0===h||n>=t||n<0||f&&e-m>=p}function k(){var e=i();if(b(e))return T(e);u=setTimeout(k,function(e){var n=t-(e-h);return f?s(n,p-(e-m)):n}(e))}function T(e){return u=void 0,w&&l?v(e):(l=c=void 0,d)}function E(){var e=i(),n=b(e);if(l=arguments,c=this,h=e,n){if(void 0===u)return y(h);if(f)return clearTimeout(u),u=setTimeout(k,t),v(h)}return void 0===u&&(u=setTimeout(k,t)),d}return t=r(t)||0,a(n)&&(g=!!n.leading,p=(f="maxWait"in n)?o(r(n.maxWait)||0,t):p,w="trailing"in n?!!n.trailing:w),E.cancel=function(){void 0!==u&&clearTimeout(u),m=0,l=h=c=u=void 0},E.flush=function(){return void 0===u?d:T(i())},E}},218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},448:function(e,t,n){var a=n(239),i=n(5);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==a(e)}},771:function(e,t,n){var a=n(639);e.exports=function(){return a.Date.now()}},841:function(e,t,n){var a=n(561),i=n(218),r=n(448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=wp.i18n,t=wp.data,a=wp.hooks,i=wp.element,r=n(184),o=n.n(r),s=lodash,l=wp.compose,c=wp.components;function p(e){return p="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},p(e)}var d=["tabId","onClick","children","selected"];function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(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,a=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}function k(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var T=function(e){var t=e.tabId,n=e.onClick,a=e.children,i=e.selected,r=k(e,d);return wp.element.createElement(c.Button,b({role:"tab",tabIndex:i?null:-1,"aria-selected":i,id:t,onClick:n},r),a)},E=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&&m(e,t)}(r,e);var t,n,a,i=g(r);function r(){var e;u(this,r),y(w(e=i.apply(this,arguments)),"handleClick",(function(t){var n=e.props.onSelect,a=void 0===n?s.noop:n;e.setState({selected:t}),a(t)})),y(w(e),"onNavigate",(function(e,t){t.click()}));var t=e.props,n=t.tabs,a=t.initialTabName;return e.state={selected:a||(n.length>0?n[0].name:null)},e}return t=r,(n=[{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,a=n.activeClass,i=void 0===a?"is-active":a,r=n.className,l=n.instanceId,p=n.orientation,d=void 0===p?"horizontal":p,u=n.tabs,h=(0,s.find)(u,{name:t}),m=l+"-"+h.name,g=u.slice(4);return wp.element.createElement("div",{className:r},wp.element.createElement(c.NavigableMenu,{role:"tablist",orientation:d,onNavigate:this.onNavigate,className:"components-tab-panel__tabs "+t},u.slice(0,4).map((function(n){return wp.element.createElement(T,{className:o()("components-tab-panel__tabs-item",n.className,y({},i,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:(0,s.partial)(e.handleClick,n.name)},n.title)})),g.map((function(n){return wp.element.createElement(T,{className:o()("components-tab-panel__tabs-item",n.className,y({},i,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:(0,s.partial)(e.handleClick,n.name)},n.title)}))),h&&wp.element.createElement("div",{"aria-labelledby":m,role:"tabpanel",id:m+"-view",className:"components-tab-panel__tab-content"},this.props.children(h)))}}])&&h(t.prototype,n),a&&h(t,a),Object.defineProperty(t,"prototype",{writable:!1}),r}(i.Component),_=(0,l.withInstanceId)(E),O=document.createElement("div");function x(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),O.innerHTML=e,e=O.textContent,O.textContent=""),e}function C(e,t,n){var a=0;return!1!==(0,s.get)(n,"pixelWidth",!1)&&(a=Math.min(100,Math.floor(t/n.pixelWidth*100))),Math.max(Math.min(100,Math.floor(e/n.max*100)),a)+"%"}function N(e,t){return e<=t.min||e>t.max}function S(e,t){return e<=t.minWidth||e>t.pixelWidth}var I=function(e){var t=function(e,t){var n=x(e).length,a=0,i=!1;if(!1!==(0,s.get)(t,"pixelWidth",!1)){i=!0;var r=document.createTextNode(e),o=document.createElement("span");o.appendChild(r),o.id="rank-math-width-tester",o.className=t.widthCheckerClass;var l=document.body.appendChild(o);a=document.getElementById("rank-math-width-tester").offsetWidth,l.outerHTML=""}return{left:C(n,a,t),isInvalid:N(n,t),isInvalidWidth:!!i&&S(a,t),count:n+" / "+t.max,pixelWidth:i?a+"px / "+t.pixelWidth+"px":""}}(e.source,e),n=t.pixelWidth?" (".concat(t.pixelWidth,")"):"";return wp.element.createElement("span",{className:o()("length-indicator-wrapper",{invalid:t.isInvalid||t.isInvalidWidth})},wp.element.createElement("span",{className:"length-count"},t.count,n),wp.element.createElement("span",{className:"length-indicator"},wp.element.createElement("span",{style:{left:t.left}})))},D=wp.htmlEntities,M=React;function A(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function P(e,t){let n,a,i=[];for(let r=0;r<e.length;r++){const o=e[r];if("string"!==o.type){if(void 0===t[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof t[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=t[o.value],a=r;break}i.push(t[o.value])}else i.push(o.value)}if(n){const r=function(e,t){const n=t[e];let a=0;for(let i=e+1;i<t.length;i++){const e=t[i];if(e.value===n.value){if("componentOpen"===e.type){a++;continue}if("componentClose"===e.type){if(0===a)return i;a--}}}throw new Error("Missing closing component token `"+n.value+"`")}(a,e),o=P(e.slice(a+1,r),t),s=(0,M.cloneElement)(n,{},o);if(i.push(s),r<e.length-1){const n=P(e.slice(r+1),t);i=i.concat(n)}}return i=i.filter(Boolean),0===i.length?null:1===i.length?i[0]:(0,M.createElement)(M.Fragment,null,...i)}function R(e){const{mixedString:t,components:n,throwErrors:a}=e;if(!n)return t;if("object"!=typeof n){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const i=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(A)}(t);try{return P(i,n)}catch(e){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}var j=function(e){var t=e.tags,n=e.components,a=e.children;return n=n||{},!1===(0,s.isUndefined)(t)&&(t=t.split(",")).forEach((function(e){var t=e;n[e]=wp.element.createElement(t,null)})),R({mixedString:a,components:n})};function L(e){return L="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},L(e)}function F(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}function U(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,a=z(e);if(t){var i=z(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return B(this,n)}}function B(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return V(e)}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var W=function(t){!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&&H(e,t)}(l,t);var n,a,r,o=U(l);function l(e){var t,n,a,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t=o.call(this,e),n=V(t),i={},(a="state")in n?Object.defineProperty(n,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[a]=i,t.state.variables=t.getFiltered(),t.state.filtered=t.state.variables,t.state.display="none",t.state.isOpen=!1,t.handleOutsideClick=t.handleOutsideClick.bind(V(t)),t}return n=l,(a=[{key:"getFiltered",value:function(){var e=this.props.exclude,t=Object.values(rankMath.variables);return(0,s.isUndefined)(e)?t:t.filter((function(t){return!e.includes(t.variable)}))}},{key:"render",value:function(){var t=this;return wp.element.createElement(i.Fragment,null,wp.element.createElement("div",{className:"rank-math-variables-dropdown",style:{display:this.state.display},ref:function(e){t.node=e}},wp.element.createElement(c.TextControl,{autoComplete:"off",placeholder:(0,D.decodeEntities)((0,e.__)("Search &hellip;","rank-math")),onChange:function(e){t.handleSearch(e)}}),wp.element.createElement("ul",null,this.state.filtered.map((function(e,n){return wp.element.createElement("li",{key:n,"data-var":e.variable,role:"presentation",onClick:function(){t.props.onClick(e)}},wp.element.createElement("strong",null,e.name),wp.element.createElement("span",null,wp.element.createElement(j,{tags:"strong"},e.description.replace("<strong>","{{strong}}").replace("</strong>","{{/strong}}"))))}),this))),wp.element.createElement(c.Button,{icon:"arrow-down-alt2",onClick:function(){t.toggle()}}))}},{key:"toggle",value:function(){this.state.isOpen?document.removeEventListener("click",this.handleOutsideClick,!0):document.addEventListener("click",this.handleOutsideClick,!0),this.setState({display:this.state.isOpen?"none":"block",isOpen:!this.state.isOpen})}},{key:"handleOutsideClick",value:function(e){this.node.contains(e.target)||this.toggle()}},{key:"handleSearch",value:function(e){var t=e.toLowerCase();2>t.length?this.setState({filtered:this.state.variables}):this.setState({filtered:this.state.variables.filter((function(e){return-1!==Object.values(e).join(" ").toLowerCase().indexOf(t)}))})}}])&&F(n.prototype,a),r&&F(n,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(i.Component),G=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{title:t.getTitle(),serpTitle:t.getSerpTitle()}})),(0,t.withDispatch)((function(e){return{updateTitle:function(t){e("rank-math").updateSerpTitle(t),e("rank-math").updateTitle(t)}}})))((function(t){var n=t.title,a=t.serpTitle,i=t.updateTitle;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-title"},(0,e.__)("Title","rank-math")),wp.element.createElement(I,{source:a,min:15,max:60,pixelWidth:580,widthCheckerClass:"title"}),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-editor-title",value:n,placeholder:rankMath.assessor.serpData.titleTemplate,help:(0,e.__)("This is what will appear in the first line when this post shows up in the search results.","rank-math"),onChange:i}),wp.element.createElement(W,{exclude:["seo_title","seo_description"],onClick:function(e){return i(n+" %"+e.variable+"%")}})))})),K=rankMathAnalyzer,$=wp.url;var q=(0,l.compose)((0,t.withSelect)((function(e){var t=rankMathEditor.assessor.dataCollector,n=e("rank-math").getSerpSlug();return{permalink:n||t.getSlug(),serpPermalink:t.getPermalink()}})),(0,t.withDispatch)((function(){return{updatePermalink:function(e){rankMathEditor.updatePermalink(K.Helpers.sanitizeText(e),!0)},updatePermalinkSanitize:function(e){rankMathEditor.updatePermalinkSanitize(function(e){return e=e.replace(/,/g,""),e=K.Helpers.removeDiacritics(e),K.Helpers.sanitizeText(e)}(e))}}})))((function(t){var n=t.permalink,a=t.serpPermalink,i=t.updatePermalink,r=t.updatePermalinkSanitize;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-permalink"},(0,e.__)("Permalink","rank-math")),wp.element.createElement(I,{source:(0,$.safeDecodeURIComponent)(a),min:5,max:75}),wp.element.createElement(c.TextControl,{id:"rank-math-editor-permalink",value:rankMath.is_front_page?"/":(0,$.safeDecodeURIComponent)(n),onChange:i,help:rankMath.is_front_page?(0,e.__)("Editing Homepage permalink is not possible.","rank-math"):(0,e.__)("This is the unique URL of this page, displayed below the post title in the search results.","rank-math"),disabled:rankMath.is_front_page?"disabled":"",onBlur:function(e){r(e.target.value)}}))})),Y=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{description:t.getDescription(),serpDescription:t.getSerpDescription()}})),(0,t.withDispatch)((function(e){return{updateDescription:function(t){e("rank-math").updateSerpDescription(t),e("rank-math").updateDescription(t)}}})))((function(t){var n=t.description,a=t.serpDescription,i=t.updateDescription;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-description"},(0,e.__)("Description","rank-math")),wp.element.createElement(I,{source:a,min:80,max:160,pixelWidth:920,widthCheckerClass:"description"}),wp.element.createElement("div",{className:"variable-group rank-math-description-variables"},wp.element.createElement(c.TextareaControl,{id:"rank-math-editor-description",value:x(n),placeholder:a||(0,s.unescape)(rankMath.assessor.serpData.descriptionTemplate),help:(0,e.__)("This is what will appear as the description when this post shows up in the search results.","rank-math"),onChange:i}),wp.element.createElement(W,{exclude:["seo_title","seo_description"],onClick:function(e){return i(n+" %"+e.variable+"%")}})))})),X=(0,l.compose)((0,t.withSelect)((function(e){return{type:e("rank-math").getSnippetPreviewType()}})),(0,t.withDispatch)((function(e,t){return{updatePreviewType:function(n){e("rank-math").updateSnippetPreviewType(n===t.type?"":n)}}})))((function(e){var t=e.type,n=e.updatePreviewType,a=o()("button button-secondary button-small",{active:"desktop"===t}),i=o()("button button-secondary button-small",{active:"mobile"===t});return wp.element.createElement("div",{className:"rank-math-button-devices alignright"},wp.element.createElement("div",{onClick:function(){return n("desktop")},className:a},wp.element.createElement("i",{className:"rm-icon rm-icon-desktop"})),wp.element.createElement("div",{onClick:function(){return n("mobile")},className:i},wp.element.createElement("i",{className:"rm-icon rm-icon-mobile"})))}));function J(e){return 100<e?"bad-fk dark":80<e?"good-fk":50<e?"ok-fk":"bad-fk"}var Z=(0,t.withSelect)((function(e){var t=e("rank-math");return{score:t.getAnalysisScore(),isRefreshing:t.isRefreshing()}}))((function(e){var t=e.score;return wp.element.createElement("div",{className:"seo-score "+J(t)},wp.element.createElement("div",{className:"score-text"},t," / 100"))}));function Q(e,t,n,a){return(0,s.isUndefined)(t)?t:(t=(0,s.truncate)(t,{length:n,separator:a||" "}),""===e?t:t.replace(new RegExp(function(e){return e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}(e),"gi"),(function(e){return'<mark className="highlight">'+e+"</mark>"})))}var ee=function(e,t){for(var n=[],a=1;a<=e;a++)n.push(wp.element.createElement(c.Dashicon,{key:Math.random(),size:"13",icon:"star-"+t}));return n},te=(0,t.withSelect)((function(e){var t=e("rank-math").getSchemas();return{schema:(0,s.find)(t,(function(e){return!(0,s.isEmpty)(e.metadata.isPrimary)}))}}))((function(t){var n=t.schema;if((0,s.isEmpty)(n))return null;var a=(0,s.get)(n,"review.reviewRating",{}),i=a.ratingValue;if((0,s.isEmpty)(i))return null;(0,s.get)(a,"worstRating",1);var r=(0,s.get)(a,"bestRating",5);return wp.element.createElement("div",{className:"rank-math-rating-preview"},wp.element.createElement("div",{className:"serp-ratings"},ee(r,"filled"),function(e,t,n){return e*=100/n,wp.element.createElement("div",{className:"serp-result",style:{width:e+"%"}},ee(n,"filled"))}(i,0,r)),wp.element.createElement("span",{className:"serp-rating-label"},(0,e.__)("Rating: ","rank-math")),wp.element.createElement("span",{className:"serp-rating-value"},i))}));function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=(0,t.withSelect)((function(e){var t=e("rank-math"),n=t.getRobots();return{title:t.getSerpTitle(),permalink:rankMathEditor.assessor.dataCollector.getPermalink(),description:t.getSerpDescription(),previewType:t.getSnippetPreviewType(),isNoIndex:"noindex"in n,keyword:t.getSelectedKeyword().data.value}}))((function(t){var n,a=t.title,i=t.permalink,r=t.description,s=t.previewType,l=void 0===s?"desktop":s,c=t.isNoIndex,p=t.keyword,d=t.onClick,u=t.showScore,h=void 0===u||u,m=t.showDevices,g=void 0!==m&&m,f=o()("serp-preview",(ne(n={"expanded-preview":""!==l},"".concat(l,"-preview"),""!==l&&g),ne(n,"noindex-preview",c),n)),w=o()("serp-title",{capitalize:rankMath.capitalizeTitle}),v=rankMathEditor.assessor.getResearch("slugify")(p);return wp.element.createElement("div",{className:f},wp.element.createElement("div",{className:"serp-preview-title","data-title":(0,e.__)("Preview","rank-math"),"data-desktop":(0,e.__)("Desktop Preview","rank-math"),"data-mobile":(0,e.__)("Mobile Preview","rank-math")},h&&wp.element.createElement(Z,null)," ",g&&wp.element.createElement(X,null)),wp.element.createElement("div",{className:"serp-preview-wrapper"},wp.element.createElement("div",{className:"serp-preview-bg"},wp.element.createElement("div",{className:"serp-preview-input"},wp.element.createElement("input",{type:"text",value:p||(0,e.__)("Rank Math","rank-math"),disabled:!0}),wp.element.createElement("span",{className:"serp-icon-search"},wp.element.createElement("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))),wp.element.createElement("span",{className:"serp-icon-mic"})),wp.element.createElement("div",{className:"serp-preview-menus"},wp.element.createElement("ul",null,wp.element.createElement("li",{className:"current"},wp.element.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIvPjxwYXRoIGZpbGw9IiMzNEE4NTMiIGQ9Ik0xMCAydjJhNiA2IDAgMCAxIDYgNmgyYTggOCAwIDAgMC04LTh6Ii8+PHBhdGggZmlsbD0iI0VBNDMzNSIgZD0iTTEwIDRWMmE4IDggMCAwIDAtOCA4aDJjMC0zLjMgMi43LTYgNi02eiIvPjxwYXRoIGZpbGw9IiNGQkJDMDQiIGQ9Ik00IDEwSDJhOCA4IDAgMCAwIDggOHYtMmMtMy4zIDAtNi0yLjY5LTYtNnoiLz48cGF0aCBmaWxsPSIjNDI4NUY0IiBkPSJNMjIgMjAuNTlsLTUuNjktNS42OUE3Ljk2IDcuOTYgMCAwIDAgMTggMTBoLTJhNiA2IDAgMCAxLTYgNnYyYzEuODUgMCAzLjUyLS42NCA0Ljg4LTEuNjhsNS42OSA1LjY5TDIyIDIwLjU5eiIvPjwvc3ZnPgo=",alt:"","data-atf":"1"}),(0,e.__)("All","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{d:"M14 13l4 5H6l4-4 1.79 1.78L14 13zm-6.01-2.99A2 2 0 0 0 8 6a2 2 0 0 0-.01 4.01zM22 5v14a3 3 0 0 1-3 2.99H5c-1.64 0-3-1.36-3-3V5c0-1.64 1.36-3 3-3h14c1.65 0 3 1.36 3 3zm-2.01 0a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h7v-.01h7a1 1 0 0 0 1-1V5z"}))," ",(0,e.__)("Images","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{clipRule:"evenodd",d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{clipRule:"evenodd",d:"M10 16.5l6-4.5-6-4.5v9zM5 20h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1zm14.5 2H5a3 3 0 0 1-3-3V4.4A2.4 2.4 0 0 1 4.4 2h15.2A2.4 2.4 0 0 1 22 4.4v15.1a2.5 2.5 0 0 1-2.5 2.5z",fillRule:"evenodd"}))," ",(0,e.__)("Videos","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{d:"M12 11h6v2h-6v-2zm-6 6h12v-2H6v2zm0-4h4V7H6v6zm16-7.22v12.44c0 1.54-1.34 2.78-3 2.78H5c-1.64 0-3-1.25-3-2.78V5.78C2 4.26 3.36 3 5 3h14c1.64 0 3 1.25 3 2.78zM19.99 12V5.78c0-.42-.46-.78-1-.78H5c-.54 0-1 .36-1 .78v12.44c0 .42.46.78 1 .78h14c.54 0 1-.36 1-.78V12zM12 9h6V7h-6v2z"}))," ",(0,e.__)("News","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 16 16"},wp.element.createElement("path",{d:"M7.503 0c3.09 0 5.502 2.487 5.502 5.427 0 2.337-1.13 3.694-2.26 5.05-.454.528-.906 1.13-1.358 1.734-.452.603-.754 1.508-.98 1.96-.226.452-.377.829-.904.829-.528 0-.678-.377-.905-.83-.226-.451-.527-1.356-.98-1.959-.452-.603-.904-1.206-1.356-1.734C3.132 9.121 2 7.764 2 5.427 2 2.487 4.412 0 7.503 0zm0 1.364c-2.283 0-4.14 1.822-4.14 4.063 0 1.843.86 2.873 1.946 4.177.468.547.942 1.178 1.4 1.79.34.452.596.99.794 1.444.198-.455.453-.992.793-1.445.459-.61.931-1.242 1.413-1.803 1.074-1.29 1.933-2.32 1.933-4.163 0-2.24-1.858-4.063-4.139-4.063zm0 2.734a1.33 1.33 0 11-.001 2.658 1.33 1.33 0 010-2.658"}))," ",(0,e.__)("Maps","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))," ",(0,e.__)("More","rank-math"))),wp.element.createElement("ul",{className:"menus-right"},wp.element.createElement("li",null,(0,e.__)("Settings","rank-math")),wp.element.createElement("li",null,(0,e.__)("Tools","rank-math")))),wp.element.createElement("div",{className:"serp-preview-result-stats"},(0,e.__)("About 43,700,000 results (0.32 seconds) ","rank-math"))),wp.element.createElement("div",{className:"serp-preview-body",role:"button",tabIndex:0,onClick:function(){d&&d()}},wp.element.createElement("div",{className:"group"},wp.element.createElement("img",{src:rankMath.siteFavIcon,width:"16",height:"16",className:"serp-preview-favicon",alt:""}),wp.element.createElement("div",{className:"serp-url",dangerouslySetInnerHTML:{__html:Q(v,K.Helpers.sanitizeText((0,$.safeDecodeURIComponent)(i)),75,/-? +/)}})),wp.element.createElement("div",{className:"group"},wp.element.createElement("h5",{className:w,dangerouslySetInnerHTML:{__html:Q(p,K.Helpers.sanitizeText(a),60)}})),wp.element.createElement(te,null),wp.element.createElement("div",{className:"group"},wp.element.createElement("div",{className:"serp-description",dangerouslySetInnerHTML:{__html:Q(p,K.Helpers.sanitizeText(r),160)}}))),wp.element.createElement("div",{className:"serp-preview-noindex"},wp.element.createElement("h3",null,(0,e.__)("Noindex robots meta is enabled","rank-math")),wp.element.createElement("p",null,(0,e.__)("This page will not appear in search results. You can disable noindex in the Advanced tab.","rank-math")))))})),ie=(0,t.withSelect)((function(e){return{isNoIndex:"noindex"in e("rank-math").getRobots()}}))((function(){return wp.element.createElement("div",{className:"rank-math-editor-general"},wp.element.createElement(ae,{showScore:!1,showDevices:!0}),wp.element.createElement(G,null),wp.element.createElement(q,null),wp.element.createElement(Y,null))}));function re(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=rankMath.links[e]||"";if(!n)return"#";if(!t)return n;var a={utm_source:"Plugin",utm_medium:encodeURIComponent(t),utm_campaign:"WP"};return n+"?"+Object.keys(a).map((function(e){return"".concat(e,"=").concat(a[e])})).join("&")}var oe=jQuery,se=n.n(oe);function le(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var ce=new(function(){function e(){var t,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a=null,(n="map")in(t=this)?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a}var t,n,a;return t=e,(n=[{key:"swap",value:function(e,t){var n=this;if(!(e=e||""))return"";var a=new RegExp(/%(([a-z0-9_-]+)\(([^)]*)\)|[^\s]+)%/,"giu");return e.replace(" %page%","").replace("%sep% %sep%","%sep%").replace(a,(function(e){return n.replace(t,e)})).trim()}},{key:"replace",value:function(e,t){var n=t.toLowerCase().slice(1,-1);return["term_description","user_description"].includes(n)?"undefined"!=typeof tinymce&&tinymce.activeEditor&&"rank_math_description_editor"===tinymce.activeEditor.id?tinymce.activeEditor.getContent():se()("#description").val():n.includes("customfield(")?(n=n.replace("customfield(","").replace(")",""))in rankMath.customFields?rankMath.customFields[n]:"":(e=e||this.getMap(),(n="seo_description"===(n="seo_title"===(n=n.includes("(")?n.split("(")[0]:n)?"title":n)?"excerpt":n)in e?e[n]:"")}},{key:"getMap",value:function(){var e=this;return null!==this.map||(this.map={},se().each(rankMath.variables,(function(t,n){t=t.toLowerCase().replace(/%+/g,"").split("(")[0],e.map[t]=n.example}))),this.map}},{key:"setVariable",value:function(e,t){null!==this.map?this.map[e]=t:void 0!==rankMath.variables[e]&&(rankMath.variables[e].example=t)}}])&&le(t.prototype,n),a&&le(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}());function pe(e){return pe="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},pe(e)}var de=function(e){var t=o()("rank-math-social-preview","rank-math-social-preview-"+e.network,e.cardType),n=o()("rank-math-social-preview-title",{capitalize:rankMath.capitalizeTitle});return wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"rank-math-social-preview-item"},wp.element.createElement("div",{className:"rank-math-social-preview-meta"},wp.element.createElement("div",{className:"social-profile-image"}),e.children),wp.element.createElement("div",{className:"rank-math-social-preview-item-wrapper"},wp.element.createElement("div",{className:"rank-math-social-preview-image"},wp.element.createElement("img",{className:"rank-math-social-image-thumbnail",src:e.image,alt:""}),e.hasOverlay&&e.imageOverlay&&"object"===pe(rankMath.overlayImages[e.imageOverlay])&&wp.element.createElement("img",{src:rankMath.overlayImages[e.imageOverlay].url,className:"rank-math-social-preview-image-overlay overlay-position-"+rankMath.overlayImages[e.imageOverlay].position,alt:""})),wp.element.createElement("div",{className:"rank-math-social-preview-caption"},"facebook"===e.network&&wp.element.createElement("h4",{className:"rank-math-social-preview-publisher"},e.siteurl),wp.element.createElement("h3",{className:n},e.title?ce.swap(e.title):e.serpTitle),wp.element.createElement("p",{className:"rank-math-social-preview-description"},e.description?ce.swap(e.description):e.serpDescription),"twitter"===e.network&&wp.element.createElement(i.Fragment,null,wp.element.createElement("h4",{className:"rank-math-social-preview-publisher"},wp.element.createElement(c.Dashicon,{icon:"admin-links"}),e.siteurl))))))},ue=wp.mediaUtils,he=function(t){return wp.element.createElement("div",{className:"components-base-control field-group"},wp.element.createElement(ue.MediaUpload,{allowedTypes:["image"],multiple:!1,value:t.imageID,render:function(n){var a=n.open;return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.Button,{onClick:a,className:"button",isPrimary:!0},t.imageID>0?(0,e.__)("Replace Image","rank-math"):(0,e.__)("Add Image","rank-math")),t.imageID>0&&wp.element.createElement(c.Button,{className:"button",isDestructive:!0,isLink:!0,onClick:t.removeImage},(0,e.__)("Remove Image","rank-math")))},onSelect:t.updateImage}),wp.element.createElement("p",{className:"components-base-control__help"},(0,e.__)("Upload at least 600x315px image. Recommended size is 1200x630px.","rank-math")),wp.element.createElement("div",{className:"notice notice-warning inline hidden"},wp.element.createElement("p",null,(0,e.__)("Image is smaller than the minimum size, please select a different image.","rank-math"))))};function me(){var e=rankMath.overlayImages,t=[];return Object.keys(e).forEach((function(n){t.push({label:e[n].name,value:n})})),t}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ge.apply(this,arguments)}var fe=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=function(){if(t.getFacebookImage())return t.getFacebookImage();var e=t.getFeaturedImage();return(0,s.isUndefined)(e)||""===e?rankMath.defautOgImage:t.getFeaturedImage().source_url}();return{title:t.getFacebookTitle(),description:t.getFacebookDescription(),serpTitle:t.getSerpTitle(),serpDescription:t.getSerpDescription(),author:t.getFacebookAuthor(),image:n,imageID:t.getFacebookImageID(),hasOverlay:t.getFacebookHasOverlay(),imageOverlay:t.getFacebookImageOverlay()}})),(0,t.withDispatch)((function(e){return{removeImage:function(){e("rank-math").updateFacebookImage(""),e("rank-math").updateFacebookImageID(0),e("rank-math").updateFacebookHasOverlay(!1)},updateImage:function(t){e("rank-math").updateFacebookImage(t.url),e("rank-math").updateFacebookImageID(t.id)},updateTitle:function(t){e("rank-math").updateFacebookTitle(t)},updateDescription:function(t){e("rank-math").updateFacebookDescription(t)},updateImageOverlay:function(t){e("rank-math").updateFacebookImageOverlay(t)},toggleOverlay:function(t){e("rank-math").updateFacebookHasOverlay(t)}}})))((function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(de,ge({},t,{network:"facebook",siteurl:rankMath.parentDomain}),wp.element.createElement("div",{className:"social-name"},rankMath.assessor.serpData.authorName),wp.element.createElement("div",{className:"social-time"},wp.element.createElement("span",null,(0,e.__)("2 hrs","rank-math")),wp.element.createElement("span",null,wp.element.createElement(c.Dashicon,{icon:"admin-site",size:"12"})))),wp.element.createElement("div",{className:"notice notice-alt notice-info components-base-control"},wp.element.createElement("p",null,(0,e.__)("Customize the title, description and images of your post used while sharing on Facebook and Twitter.","rank-math")," ",wp.element.createElement("a",{href:re("meta-box-social-tab","Gutenberg Social Tab"),target:"_blank",rel:"noreferrer noopener"},(0,e.__)("Read more","rank-math")))),wp.element.createElement(he,t),wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-facebook-title"},(0,e.__)("Title","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-facebook-title",value:t.title,placeholder:t.serpTitle,onChange:t.updateTitle}),wp.element.createElement(W,{onClick:function(e){return t.updateTitle(t.title+" %"+e.variable+"%")}}))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-facebook-description"},(0,e.__)("Description","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextareaControl,{id:"rank-math-facebook-description",value:t.description,placeholder:t.serpDescription,onChange:t.updateDescription}),wp.element.createElement(W,{onClick:function(e){return t.updateDescription(t.description+" %"+e.variable+"%")}}))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Add icon overlay to thumbnail","rank-math"),checked:t.hasOverlay,onChange:t.toggleOverlay}),wp.element.createElement("div",{className:t.hasOverlay?"components-base-control":"hidden"},wp.element.createElement(c.SelectControl,{value:t.imageOverlay,label:(0,e.__)("Icon overlay","rank-math"),options:me(),onChange:t.updateImageOverlay}),!rankMath.isPro&&wp.element.createElement("div",{className:"notice notice-alt notice-warning"},wp.element.createElement("p",null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:re("pro","Gutenberg Social Tab"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("You can add custom thumbnail overlays with {{link}}Rank Math Pro{{/link}}.","rank-math")))))))})),we=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{country:t.getTwitterAppCountry(),description:t.getTwitterAppDescription(),iphoneName:t.getTwitterAppIphoneName(),iphoneID:t.getTwitterAppIphoneID(),iphoneUrl:t.getTwitterAppIphoneUrl(),ipadName:t.getTwitterAppIpadName(),ipadID:t.getTwitterAppIpadID(),ipadUrl:t.getTwitterAppIpadUrl(),googleplayName:t.getTwitterAppGoogleplayName(),googleplayID:t.getTwitterAppGoogleplayID(),googleplayUrl:t.getTwitterAppGoogleplayUrl()}})),(0,t.withDispatch)((function(e){return{updateAppIphoneName:function(t){e("rank-math").updateTwitterAppIphoneName(t)},updateAppIphoneID:function(t){e("rank-math").updateTwitterAppIphoneID(t)},updateAppIphoneUrl:function(t){e("rank-math").updateTwitterAppIphoneUrl(t)},updateAppIpadName:function(t){e("rank-math").updateTwitterAppIpadName(t)},updateAppIpadID:function(t){e("rank-math").updateTwitterAppIpadID(t)},updateAppIpadUrl:function(t){e("rank-math").updateTwitterAppIpadUrl(t)},updateAppGoogleplayName:function(t){e("rank-math").updateTwitterAppGoogleplayName(t)},updateAppGoogleplayID:function(t){e("rank-math").updateTwitterAppGoogleplayID(t)},updateAppGoogleplayUrl:function(t){e("rank-math").updateTwitterAppGoogleplayUrl(t)},updateAppDescription:function(t){e("rank-math").updateTwitterAppDescription(t)},updateAppCountry:function(t){e("rank-math").updateTwitterAppCountry(t)}}})))((function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TextControl,{value:t.description,label:(0,e.__)("App Description","rank-math"),help:(0,e.__)("You can use this as a more concise description than what you may have on the app store. This field has a maximum of 200 characters. (optional)","rank-math"),onChange:t.updateAppDescription}),function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TextControl,{value:t.iphoneName,label:(0,e.__)("iPhone App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppIphoneName}),wp.element.createElement(c.TextControl,{value:t.iphoneID,label:(0,e.__)("iPhone App ID","rank-math"),help:(0,e.__)("The numeric representation of your app ID in the App Store.","rank-math"),onChange:t.updateAppIphoneID}),wp.element.createElement(c.TextControl,{value:t.iphoneUrl,label:(0,e.__)("iPhone App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppIphoneUrl}))}(t),function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TextControl,{value:t.ipadName,label:(0,e.__)("iPad App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppIpadName}),wp.element.createElement(c.TextControl,{value:t.ipadID,label:(0,e.__)("iPad App ID","rank-math"),help:(0,e.__)("The numeric representation of your app ID in the App Store.","rank-math"),onChange:t.updateAppIpadID}),wp.element.createElement(c.TextControl,{value:t.ipadUrl,label:(0,e.__)("iPad App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppIpadUrl}))}(t),function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TextControl,{value:t.googleplayName,label:(0,e.__)("Google Play App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppGoogleplayName}),wp.element.createElement(c.TextControl,{value:t.googleplayID,label:(0,e.__)("Google Play App ID","rank-math"),help:(0,e.__)("Your app ID in the Google Play (.i.e. com.android.app)","rank-math"),onChange:t.updateAppGoogleplayID}),wp.element.createElement(c.TextControl,{value:t.googleplayUrl,label:(0,e.__)("Google Play App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppGoogleplayUrl}))}(t),wp.element.createElement(c.TextControl,{value:t.country,label:(0,e.__)("App Country","rank-math"),help:(0,e.__)("If your application is not available in the US App Store, you must set this value to the two-letter country code for the App Store that contains your application.","rank-math"),onChange:t.updateAppCountry}))})),ve=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{url:t.getTwitterPlayerUrl(),size:t.getTwitterPlayerSize(),stream:t.getTwitterPlayerStream(),ctype:t.getTwitterPlayerStreamCtype()}})),(0,t.withDispatch)((function(e){return{updatePlayerUrl:function(t){e("rank-math").updateTwitterPlayerUrl(t)},updatePlayerSize:function(t){e("rank-math").updateTwitterPlayerSize(t)},updatePlayerStreamUrl:function(t){e("rank-math").updateTwitterPlayerStreamUrl(t)},updatePlayerStreamCtype:function(t){e("rank-math").updateTwitterPlayerStreamCtype(t)}}})))((function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TextControl,{value:t.url,label:(0,e.__)("Player URL","rank-math"),help:(0,e.__)("HTTPS URL to iFrame player. This must be a HTTPS URL which does not generate active mixed content warnings in a web browser. The audio or video player must not require plugins such as Adobe Flash.","rank-math"),onChange:t.updatePlayerUrl}),wp.element.createElement(c.TextControl,{value:t.size,label:(0,e.__)("Player Size","rank-math"),help:(0,e.__)("iFrame width and height, specified in pixels in the following format: 600x400.","rank-math"),onChange:t.updatePlayerSize}),wp.element.createElement(c.TextControl,{value:t.stream,label:(0,e.__)("Stream URL","rank-math"),help:(0,e.__)("Optional URL to raw stream that will be rendered in Twitter’s mobile applications directly. If provided, the stream must be delivered in the MPEG-4 container format (the .mp4 extension). The container can store a mix of audio and video with the following codecs: Video: H.264, Baseline Profile (BP), Level 3.0, up to 640 x 480 at 30 fps. Audio: AAC, Low Complexity Profile (LC).","rank-math"),onChange:t.updatePlayerStreamUrl}),wp.element.createElement(c.TextControl,{value:t.ctype,label:(0,e.__)("Stream Content Type","rank-math"),help:(0,e.__)("The MIME type/subtype combination that describes the content contained in twitter:player:stream. Takes the form specified in RFC 6381. Currently supported content_type values are those defined in RFC 4337 (MIME Type Registration for MP4).","rank-math"),onChange:t.updatePlayerStreamCtype}))}));function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ye.apply(this,arguments)}var be=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=t.getTwitterUseFacebook(),a=function(){if(n&&t.getFacebookImage())return t.getFacebookImage();if(t.getTwitterImage())return t.getTwitterImage();var e=t.getFeaturedImage();return(0,s.isUndefined)(e)||""===e?rankMath.defautOgImage:t.getFeaturedImage().source_url}();return{useFacebook:n,cardType:t.getTwitterCardType(),title:n?t.getFacebookTitle():t.getTwitterTitle(),description:n?t.getFacebookDescription():t.getTwitterDescription(),serpTitle:t.getSerpTitle(),serpDescription:t.getSerpDescription(),author:t.getTwitterAuthor(),image:a,imageID:n?t.getFacebookImageID():t.getTwitterImageID(),hasOverlay:n?t.getFacebookHasOverlay():t.getTwitterHasOverlay(),imageOverlay:n?t.getFacebookImageOverlay():t.getTwitterImageOverlay()}})),(0,t.withDispatch)((function(e){return{removeImage:function(){e("rank-math").updateTwitterImage(""),e("rank-math").updateTwitterImageID(0),e("rank-math").updateTwitterHasOverlay(!1)},updateImage:function(t){e("rank-math").updateTwitterImage(t.url),e("rank-math").updateTwitterImageID(t.id)},updateTitle:function(t){e("rank-math").updateTwitterTitle(t)},updateDescription:function(t){e("rank-math").updateTwitterDescription(t)},updateImageOverlay:function(t){e("rank-math").updateTwitterImageOverlay(t)},toggleUseFacebook:function(t){e("rank-math").updateTwitterUseFacebook(t)},updateCardType:function(t){e("rank-math").updateTwitterCardType(t)},toggleOverlay:function(t){e("rank-math").updateTwitterHasOverlay(t)}}})))((function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(de,ye({},t,{network:"twitter",siteurl:rankMath.parentDomain,classes:t.cardType,description:(0,s.truncate)(t.description?t.description:t.serpDescription,{length:240,separator:" "})}),wp.element.createElement("div",{className:"social-name"},rankMath.assessor.serpData.authorName,wp.element.createElement("span",{className:"social-username"},"@",t.author),wp.element.createElement("span",{className:"social-time"},(0,e.__)("2h","rank-math"))),wp.element.createElement("div",{className:"social-text"},(0,e.__)("The card for your website will look little something like this!","rank-math"))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Use Data from Facebook Tab","rank-math"),checked:t.useFacebook,onChange:t.toggleUseFacebook})),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.SelectControl,{value:t.cardType,label:(0,e.__)("Card Type","rank-math"),options:[{value:"summary_large_image",label:(0,e.__)("Summary Card with Large Image","rank-math")},{value:"summary_card",label:(0,e.__)("Summary Card","rank-math")},{value:"app",label:(0,e.__)("App Card","rank-math")},{value:"player",label:(0,e.__)("Player Card","rank-math")}],onChange:t.updateCardType})),"player"===t.cardType&&wp.element.createElement("div",{className:"notice notice-alt notice-info"},wp.element.createElement("p",null,(0,e.__)("Video clips and audio streams have a special place on the Twitter platform thanks to the Player Card. Player Cards must be submitted for approval before they can be used. More information: ","rank-math"),wp.element.createElement("a",{href:"https://dev.twitter.com/cards/types/player",target:"blank"},"https://dev.twitter.com/cards/types/player"))),"app"===t.cardType&&wp.element.createElement("div",{className:"notice notice-alt notice-info"},wp.element.createElement("p",null,(0,e.__)("The App Card is a great way to represent mobile applications on Twitter and to drive installs. More information: ","rank-math"),wp.element.createElement("a",{href:"https://dev.twitter.com/cards/types/app",target:"blank"}," https://dev.twitter.com/cards/types/app"))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement(he,t),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-twitter-title"},(0,e.__)("Title","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-twitter-title",value:t.title,placeholder:t.serpTitle,onChange:t.updateTitle}),wp.element.createElement(W,{onClick:function(e){return t.updateTitle(t.title+" %"+e.variable+"%")}}))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-twitter-description"},(0,e.__)("Description","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextareaControl,{id:"rank-math-twitter-description",value:t.description,placeholder:t.serpDescription,onChange:t.updateDescription}),wp.element.createElement(W,{onClick:function(e){return t.updateDescription(t.description+" %"+e.variable+"%")}}))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Add icon overlay to thumbnail","rank-math"),checked:t.hasOverlay,onChange:t.toggleOverlay}),wp.element.createElement("div",{className:t.hasOverlay?"components-base-control":"hidden"},wp.element.createElement(c.SelectControl,{value:t.imageOverlay,label:(0,e.__)("Icon overlay","rank-math"),options:me(),onChange:t.updateImageOverlay}),!rankMath.isPro&&wp.element.createElement("div",{className:"notice notice-alt notice-warning"},wp.element.createElement("p",null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:re("pro","Gutenberg Social Tab"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("You can add custom thumbnail overlays with {{link}}Rank Math Pro{{/link}}.","rank-math")))))),"player"===t.cardType&&wp.element.createElement(ve,null),"app"===t.cardType&&wp.element.createElement(we,null))})),ke=function(){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.TabPanel,{className:"rank-math-editor-social",activeClass:"is-active",tabs:[{name:"facebook",title:wp.element.createElement(i.Fragment,null,wp.element.createElement(c.Dashicon,{icon:"facebook-alt"}),(0,e.__)("Facebook","rank-math")),view:fe,className:"button-facebook"},{name:"twitter",title:wp.element.createElement(i.Fragment,null,wp.element.createElement(c.Dashicon,{icon:"twitter"}),(0,e.__)("Twitter","rank-math")),view:be,className:"button-twitter"}]},(function(e){return(0,i.createElement)(e.view)})))};function Te(e){return Te="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},Te(e)}function Ee(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function Oe(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,a=Ne(e);if(t){var i=Ne(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return xe(this,n)}}function xe(e,t){if(t&&("object"===Te(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 Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}var Se=function(t){!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&&_e(e,t)}(s,t);var n,a,r,o=Oe(s);function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=o.call(this))._handleRef=e._handleRef.bind(Ce(e)),e}return n=s,(a=[{key:"componentDidMount",value:function(){var e=se()(this.component),t=e.find(".stars a"),n=e.find(".smiley");t.on("mouseenter",(function(){var e=se()(this).index();t.removeClass("highlighted"),t.slice(0,e+1).addClass("highlighted"),e<2?n.removeClass("normal happy").addClass("angry"):e>3?n.removeClass("normal angry").addClass("happy"):n.removeClass("happy angry").addClass("normal")}))}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"_handleRef",value:function(e){this.component=e}},{key:"render",value:function(){for(var t=this,n=[],a=1;a<=5;a++)n.push(wp.element.createElement("a",{key:a,href:"https://s.rankmath.com/wpreview",target:"_blank",rel:"noopener noreferrer"},wp.element.createElement("span",{className:"dashicons dashicons-star-filled"})));return wp.element.createElement("div",{className:"ask-review",ref:this._handleRef},wp.element.createElement("h3",null,(0,e.__)("Rate Rank Math SEO","rank-math")),wp.element.createElement("p",null,wp.element.createElement(j,{tags:"em"},(0,e.__)("Hey, we noticed you are using Rank Math SEO plugin for more than a week now –{{em}}that's awesome!{{/em}} Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?","rank-math"))),wp.element.createElement("div",{className:"stars-wrapper"},wp.element.createElement("div",{className:"face"},wp.element.createElement("div",{className:"smiley happy"},wp.element.createElement("div",{className:"eyes"},wp.element.createElement("div",{className:"eye"}),wp.element.createElement("div",{className:"eye"})),wp.element.createElement("div",{className:"mouth"}))),wp.element.createElement("div",{className:"stars"},n)),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(i.Fragment,null,wp.element.createElement("span",null,(0,e.__)("I already did. Please don't show this message again.","rank-math"))),onChange:function(){return t.alreadyReviewed()}}))}},{key:"alreadyReviewed",value:function(){se().ajax({url:rankMath.ajaxurl,data:{action:"rank_math_already_reviewed",security:rankMath.security}}),rankMath.pluginReviewed=!0;var e=se()(this.component);e.animate({opacity:.01},1500,(function(){var t=se()(".rank-math-editor > .components-tab-panel__tabs > button");t.first().click(),t.last().remove(),e.remove()}))}}])&&Ee(n.prototype,a),r&&Ee(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.Component),Ie=(0,c.withFilters)("rankMath.analytics.reportButton")((function(){return null})),De=(0,l.compose)((0,t.withSelect)((function(e){return{isOpen:e("rank-math").isSnippetEditorOpen()}})),(0,t.withDispatch)((function(e,t){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!t.isOpen)}}})))((function(t){var n=t.isOpen,a=t.initialTab,r=void 0===a?"":a,o=t.toggleEditor,s=[{name:"general",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-settings"}),wp.element.createElement("span",null,(0,e.__)("General","rank-math"))),view:ie}];return rankMath.canUser.social&&s.push({name:"social",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-social"}),wp.element.createElement("span",null,(0,e.__)("Social","rank-math"))),view:ke}),rankMath.showReviewTab&&!1===rankMath.pluginReviewed&&s.push({name:"review",className:"review-tab",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-heart-filled"})),view:Se}),wp.element.createElement(i.Fragment,null,wp.element.createElement(c.Button,{isPrimary:!0,className:"rank-math-edit-snippet",onClick:o},(0,e.__)("Edit Snippet","rank-math")),""===r&&wp.element.createElement(Ie,null),n&&wp.element.createElement(c.Modal,{title:(0,e.__)("Preview Snippet Editor","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!1,onRequestClose:o,className:"rank-math-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement(c.TabPanel,{className:"rank-math-tabs rank-math-editor",activeClass:"is-active",initialTabName:r,tabs:s},(function(e){return(0,i.createElement)(e.view)}))))})),Me=function(){return wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(c.BaseControl,{className:"rank-math-social"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Social Media Preview","rank-math")),wp.element.createElement("p",{className:"cmb2-metabox-description"},(0,e.__)("Here you can view and edit the thumbnail, title and description that will be displayed when your site is shared on social media.","rank-math")),wp.element.createElement("p",{className:"cmb2-metabox-description"},(0,e.__)("Click on the button below to view and edit the preview.","rank-math")),wp.element.createElement(De,{buttonLabel:(0,e.__)("Preview & Edit Social Media","rank-math"),initialTab:"social"})))};function Ae(e){return Ae="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},Ae(e)}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}function Le(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,a=He(e);if(t){var i=He(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"===Ae(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 He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}var Ue=function(t){!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&&je(e,t)}(p,t);var n,a,r,l=Le(p);function p(){return Pe(this,p),l.apply(this,arguments)}return n=p,(a=[{key:"shouldComponentUpdate",value:function(e){return e.isLoaded!==this.props.isLoaded||e.selectedKeyword.index!==this.props.selectedKeyword.index||e.isRefreshing!==this.props.isRefreshing}},{key:"render",value:function(){var e=this,t=rankMathEditor.getSelectedKeyword();return this.results=rankMathEditor.resultManager.getResult(t),this.isPrimary=0===this.props.selectedKeyword.index,(0,s.isUndefined)(this.results)?null:Object.keys(this.getGroups()).map((function(t){return e.renderGroup(t)}))}},{key:"renderGroup",value:function(t){this.errors=0;var n=this.renderGroupItems(t);return wp.element.createElement(c.PanelBody,{key:"panel-"+t,title:wp.element.createElement(i.Fragment,null,this.getGroupTitle(t),0===this.errors?wp.element.createElement("span",{className:"rank-math-group-score test-ok"},(0,e.__)("All Good","rank-math")):wp.element.createElement("span",{className:"rank-math-group-score test-fail"},this.errors," ",(0,e.__)("Errors","rank-math"))),initialOpen:"basic"===t,className:"rank-math-checklist"},wp.element.createElement("ul",null,n))}},{key:"renderGroupItems",value:function(e){var t=this,n=this.results.results,a=this.getGroupItems(e);return Object.keys(a).map((function(e){if((0,s.isUndefined)(n[e])||!t.isPrimary&&a[e])return!1;var i=n[e],r=o()("seo-check-"+e,{"test-ok":i.hasScore(),"test-fail":!i.hasScore()});i.hasScore()&&["contentHasAssets","lengthContent","keywordDensity"].includes(e)&&(r+=" "+function(e,t){var n=(0,s.round)(e/t*100);if(!(100<=n))return 49<n?"test-check-good":30<n?"test-check-ok":"test-check-bad"}(i.getScore(),i.getMaxScore())),!1===i.hasScore()&&(t.errors+=1);var l=t.getLink(e);return wp.element.createElement("li",{key:e,className:r},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:i.getText()}}),l&&wp.element.createElement("a",{href:re("score-100","Content Analysis Single Test KB")+l,rel:"noreferrer",target:"_blank",className:"dashicons-before dashicons-editor-help rank-math-help-icon"}))}))}},{key:"getGroupItems",value:function(e){return("post"===rankMath.objectType?{basic:{keywordInTitle:!0,keywordInMetaDescription:!0,keywordInPermalink:!0,keywordIn10Percent:!0,keywordInContent:!1,lengthContent:!1,hasProductSchema:!0},advanced:{keywordInSubheadings:!1,keywordInImageAlt:!0,keywordDensity:!1,lengthPermalink:!1,linksHasExternals:!1,linksNotAllExternals:!1,linksHasInternal:!1,keywordNotUsed:!0,hasContentAI:!0,isReviewEnabled:!0},"title-readability":{titleStartWithKeyword:!0,titleSentiment:!1,titleHasPowerWords:!1,titleHasNumber:!1},"content-readability":{contentHasTOC:!1,contentHasShortParagraphs:!1,contentHasAssets:!1}}:{basic:{keywordInTitle:!0,keywordInMetaDescription:!0,keywordInPermalink:!0},advanced:{titleStartWithKeyword:!0,keywordNotUsed:!0}})[e]}},{key:"getGroupTitle",value:function(e){return this.getGroups()[e]}},{key:"getGroups",value:function(){return"post"===rankMath.objectType?{basic:(0,e.__)("Basic SEO","rank-math"),advanced:(0,e.__)("Additional","rank-math"),"title-readability":(0,e.__)("Title Readability","rank-math"),"content-readability":(0,e.__)("Content Readability","rank-math")}:{basic:(0,e.__)("Basic SEO","rank-math"),advanced:(0,e.__)("Additional","rank-math")}}},{key:"getLink",value:function(e){var t={keywordInTitle:"#focus-keyword-in-the-seo-title-primary-focus-keyword-only",keywordInMetaDescription:"#focus-keyword-in-the-meta-description-primary-focus-keyword-only",keywordInPermalink:"#focus-keyword-in-the-url-primary-focus-keyword-only",keywordIn10Percent:"#focus-keyword-at-the-beginning-of-the-content",keywordInContent:"#focus-keyword-in-the-content-runs-of-all-focus-keywords",lengthContent:"#overall-content-length",keywordInSubheadings:"#focus-keyword-in-subheading-primary-and-secondary-focus-keywords",keywordInImageAlt:"#focus-keyword-in-image-alt-attributes-primary-focus-keyword-only",keywordDensity:"#keyword-density-primary-and-secondary-focus-keywords",lengthPermalink:"#url-length",linksHasExternals:"#linking-to-external-sources",linksNotAllExternals:"#linking-to-external-content-with-a-followed-link",linksHasInternal:"#linking-to-internal-resources",keywordNotUsed:"#focus-keyword-uniqueness-primary-focus-keyword-only",titleStartWithKeyword:"#focus-keyword-at-the-beginning-of-the-seo-title-only-for-primary-keyword",titleSentiment:"#sentiment-in-a-title",titleHasPowerWords:"#use-of-power-word-in-title",titleHasNumber:"#number-in-title",contentHasTOC:"#table-of-contents",contentHasShortParagraphs:"#use-of-short-paragraphs",contentHasAssets:"#use-of-media-in-your-posts",hasContentAI:"#used-content-ai",hasProductSchema:"#has-product-schema",isReviewEnabled:"#is-review-enabled"};return(0,s.has)(t,e)?t[e]:""}}])&&Re(n.prototype,a),r&&Re(n,r),Object.defineProperty(n,"prototype",{writable:!1}),p}(i.Component),Be=(0,t.withSelect)((function(e){var t=e("rank-math");return{isLoaded:t.isLoaded(),isRefreshing:t.isRefreshing(),selectedKeyword:t.getSelectedKeyword()}}))(Ue),Ve=(0,c.createSlotFill)("RankMathAfterFocusKeyword"),ze=Ve.Fill,We=Ve.Slot,Ge=function(e){var t=e.children,n=e.className;return wp.element.createElement(ze,null,wp.element.createElement("div",{className:n},t))};Ge.Slot=We;var Ke=Ge,$e=(0,t.withSelect)((function(e){return{isPro:e("rank-math").isPro()}}))((function(t){return t.isPro?rankMath.isUserRegistered?wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:re("score-100","General Tab Score Notice"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Read here to {{link}}Score 100/100{{/link}} ","rank-math"))):wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:rankMath.adminurl+"?page=rank-math&view=help",target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Activate your account by {{link}}connecting to Rank Math!{{/link}} ","rank-math"))):wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:re("pro","Gutenberg General Tab Notice"),target:"_blank",rel:"noopener noreferrer"}),strong:wp.element.createElement("strong",null)}},(0,e.__)("Want more? {{link}}{{strong}}Upgrade today to the PRO{{/strong}}{{/link}} version.","rank-math")))})),qe=(0,l.withInstanceId)((function(e){var t=e.className,n=e.instanceId,a=e.children,i="rank-math-tooltip-"+n,r=o()("rank-math-tooltip",t);return wp.element.createElement("span",{className:r},wp.element.createElement("input",{id:i,type:"checkbox"}),wp.element.createElement("label",{htmlFor:i,className:"dashicons-before dashicons-editor-help"}),wp.element.createElement("div",{className:"rank-math-tooltip-content"},a))}));function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=(e,t,n,a)=>(e=""+e,t=""+t,a&&(e=e.trim(),t=t.trim()),n?e==t:e.toLowerCase()==t.toLowerCase()),Qe=(e,t)=>e&&Array.isArray(e)&&e.map((e=>et(e,t)));function et(e,t){var n,a={};for(n in e)t.indexOf(n)<0&&(a[n]=e[n]);return a}function tt(e){var t=document.createElement("div");return e.replace(/\&#?[0-9a-z]+;/gi,(function(e){return t.innerHTML=e,t.innerText}))}function nt(e){return(new DOMParser).parseFromString(e.trim(),"text/html").body.firstElementChild}function at(e,t){for(t=t||"previous";e=e[t+"Sibling"];)if(3==e.nodeType)return e}function it(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;"):e}function rt(e){var t=Object.prototype.toString.call(e).split(" ")[1].slice(0,-1);return e===Object(e)&&"Array"!=t&&"Function"!=t&&"RegExp"!=t&&"HTMLUnknownElement"!=t}function ot(e,t,n){function a(e,t){for(var n in t)if(t.hasOwnProperty(n)){if(rt(t[n])){rt(e[n])?a(e[n],t[n]):e[n]=Object.assign({},t[n]);continue}if(Array.isArray(t[n])){e[n]=Object.assign([],t[n]);continue}e[n]=t[n]}}return e instanceof Object||(e={}),a(e,t),n&&a(e,n),e}function st(){const e=[],t={};for(let n of arguments)for(let a of n)rt(a)?t[a.value]||(e.push(a),t[a.value]=1):e.includes(a)||e.push(a);return e}function lt(e){return String.prototype.normalize?"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:e}var ct=()=>/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent);function pt(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))}function dt(e){return e&&e.classList&&e.classList.contains(this.settings.classNames.tag)}function ut(e,t){var n=window.getSelection();return t=t||n.getRangeAt(0),"string"==typeof e&&(e=document.createTextNode(e)),t&&(t.deleteContents(),t.insertNode(e)),e}var ht={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:()=>{},trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,highlightFirst:!1,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:()=>Promise.resolve(),beforePaste:()=>Promise.resolve(),suggestionClick:()=>Promise.resolve()}};function mt(){this.dropdown={};for(let e in this._dropdown)this.dropdown[e]="function"==typeof this._dropdown[e]?this._dropdown[e].bind(this):this._dropdown[e];this.dropdown.refs()}var gt={refs(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},getHeaderRef(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},getFooterRef(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},getAllSuggestionsRefs(){return[...this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector)]},show(e){var t,n,a,i=this.settings,r="mix"==i.mode&&!i.enforceWhitelist,o=!i.whitelist||!i.whitelist.length,s="manual"==i.dropdown.position;if(e=void 0===e?this.state.inputText:e,!(o&&!r&&!i.templates.dropdownItemNoMatch||!1===i.dropdown.enable||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(e),e&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",e),i.templates.dropdownItemNoMatch&&(a=i.templates.dropdownItemNoMatch.call(this,{value:e}))),!a){if(this.suggestedListItems.length)e&&r&&!this.state.editing.scope&&!Ze(this.suggestedListItems[0].value,e)&&this.suggestedListItems.unshift({value:e});else{if(!e||!r||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:e}]}n=""+(rt(t=this.suggestedListItems[0])?t.value:t),i.autoComplete&&n&&0==n.indexOf(e)&&this.input.autocomplete.suggest.call(this,t)}this.dropdown.fill(a),i.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(i.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=e||!0,this.state.dropdown.query=e,this.setStateSelection(),s||setTimeout((()=>{this.dropdown.position(),this.dropdown.render()})),setTimeout((()=>{this.trigger("dropdown:show",this.DOM.dropdown)}))}},hide(e){var t=this.DOM,n=t.scope,a=t.dropdown,i="manual"==this.settings.dropdown.position&&!e;if(a&&document.body.contains(a)&&!i)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout((()=>{this.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},toggle(e){this.dropdown[this.state.dropdown.visible&&!e?"hide":"show"]()},render(){var e,t,n,a=(e=this.DOM.dropdown,(n=e.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(n),t=n.clientHeight,n.parentNode.removeChild(n),t),i=this.settings;return"number"==typeof i.dropdown.enabled&&i.dropdown.enabled>=0?(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(i.classNames.dropdownInital),this.dropdown.position(a),i.dropdown.appendTarget.appendChild(this.DOM.dropdown),setTimeout((()=>this.DOM.dropdown.classList.remove(i.classNames.dropdownInital)))),this):this},fill(e){e="string"==typeof e?e:this.dropdown.createListHTML(e||this.suggestedListItems);var t,n=this.settings.templates.dropdownContent.call(this,e);this.DOM.dropdown.content.innerHTML=(t=n)?t.replace(/\>[\r\n ]+\</g,"><").replace(/(<.*?>)|\s+/g,((e,t)=>t||" ")):""},fillHeaderFooter(){this.settings.templates;var e=this.dropdown.filterListItems(this.state.dropdown.query),t=this.parseTemplate("dropdownHeader",[e]),n=this.parseTemplate("dropdownFooter",[e]),a=this.dropdown.getHeaderRef(),i=this.dropdown.getFooterRef();t&&(null==a||a.parentNode.replaceChild(t,a)),n&&(null==i||i.parentNode.replaceChild(n,i))},refilter(e){e=e||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(e),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},position(e){var t=this.settings.dropdown;if("manual"!=t.position){var n,a,i,r,o,s,l=this.DOM.dropdown,c=t.placeAbove,p=t.appendTarget===document.body,d=p?window.pageYOffset:t.appendTarget.scrollTop,u=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,h=u.clientHeight,m=Math.max(u.clientWidth||0,window.innerWidth||0)>480?t.position:"all",g=this.DOM["input"==m?"input":"scope"];if(e=e||l.clientHeight,this.state.dropdown.visible){if("text"==m?(i=(n=function(){const e=document.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),n=t.startContainer,a=t.startOffset;let i,r;if(a>0)return r=document.createRange(),r.setStart(n,a-1),r.setEnd(n,a),i=r.getBoundingClientRect(),{left:i.right,top:i.top,bottom:i.bottom};if(n.getBoundingClientRect)return n.getBoundingClientRect()}return{left:-9999,top:-9999}}()).bottom,a=n.top,r=n.left,o="auto"):(s=function(e){for(var t=0,n=0;e&&e!=u;)t+=e.offsetLeft||0,n+=e.offsetTop||0,e=e.parentNode;return{left:t,top:n}}(t.appendTarget),a=(n=g.getBoundingClientRect()).top-s.top,i=n.bottom-1-s.top,r=n.left-s.left,o=n.width+"px"),!p){let e=function(){for(var e=0,n=t.appendTarget.parentNode;n;)e+=n.scrollTop||0,n=n.parentNode;return e}();a+=e,i+=e}a=Math.floor(a),i=Math.ceil(i),c=void 0===c?h-n.bottom<e:c,l.style.cssText="left:"+(r+window.pageXOffset)+"px; width:"+o+";"+(c?"top: "+(a+d)+"px":"top: "+(i+d)+"px"),l.setAttribute("placement",c?"top":"bottom"),l.setAttribute("position",m)}}},events:{binding(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t=this.dropdown.events.callbacks,n=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:t.onKeyDown.bind(this),onMouseOver:t.onMouseOver.bind(this),onMouseLeave:t.onMouseLeave.bind(this),onClick:t.onClick.bind(this),onScroll:t.onScroll.bind(this)},a=e?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(document[a]("scroll",n.position,!0),window[a]("resize",n.position),window[a]("keydown",n.onKeyDown)),this.DOM.dropdown[a]("mouseover",n.onMouseOver),this.DOM.dropdown[a]("mouseleave",n.onMouseLeave),this.DOM.dropdown[a]("mousedown",n.onClick),this.DOM.dropdown.content[a]("scroll",n.onScroll)},callbacks:{onKeyDown(e){if(this.state.hasFocus&&!this.state.composing){var t=this.DOM.dropdown.querySelector(this.settings.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(t);switch(e.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":e.preventDefault();var a=this.dropdown.getAllSuggestionsRefs(),i="ArrowUp"==e.key||"Up"==e.key;t&&(t=this.dropdown.getNextOrPrevOption(t,!i)),t&&t.matches(this.settings.classNames.dropdownItemSelector)||(t=a[i?a.length-1:0]),n=this.dropdown.getSuggestionDataByNode(t),this.dropdown.highlightOption(t,!0);break;case"Escape":case"Esc":this.dropdown.hide();break;case"ArrowRight":if(this.state.actions.ArrowLeft)return;case"Tab":if("mix"!=this.settings.mode&&t&&!this.settings.autoComplete.rightKey&&!this.state.editing){e.preventDefault();var r=this.dropdown.getMappedValue(n);return this.input.autocomplete.set.call(this,r),!1}return!0;case"Enter":e.preventDefault(),this.settings.hooks.suggestionClick(e,{tagify:this,tagData:n,suggestionElm:t}).then((()=>{if(t)return this.dropdown.selectOption(t),t=this.dropdown.getNextOrPrevOption(t,!i),void this.dropdown.highlightOption(t);this.dropdown.hide(),"mix"!=this.settings.mode&&this.addTags(this.state.inputText.trim(),!0)})).catch((e=>e));break;case"Backspace":{if("mix"==this.settings.mode||this.state.editing.scope)return;const e=this.input.raw.call(this);""!=e&&8203!=e.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0))}}}},onMouseOver(e){var t=e.target.closest(this.settings.classNames.dropdownItemSelector);t&&this.dropdown.highlightOption(t)},onMouseLeave(e){this.dropdown.highlightOption()},onClick(e){if(0==e.button&&e.target!=this.DOM.dropdown&&e.target!=this.DOM.dropdown.content){var t=e.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(t);this.state.actions.selectOption=!0,setTimeout((()=>this.state.actions.selectOption=!1),50),this.settings.hooks.suggestionClick(e,{tagify:this,tagData:n,suggestionElm:t}).then((()=>{t?this.dropdown.selectOption(t,e):this.dropdown.hide()})).catch((e=>console.warn(e)))}},onScroll(e){var t=e.target,n=t.scrollTop/(t.scrollHeight-t.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(n)})}}},getSuggestionDataByNode(e){var t=e&&e.getAttribute("value");return this.suggestedListItems.find((e=>e.value==t))||null},getNextOrPrevOption(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n=this.dropdown.getAllSuggestionsRefs(),a=n.findIndex((t=>t===e));return t?n[a+1]:n[a-1]},highlightOption(e,t){var n,a=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(a),this.state.ddItemElm.removeAttribute("aria-selected")),!e)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);n=this.dropdown.getSuggestionDataByNode(e),this.state.ddItemData=n,this.state.ddItemElm=e,e.classList.add(a),e.setAttribute("aria-selected",!0),t&&(e.parentNode.scrollTop=e.clientHeight+e.offsetTop-e.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,n),this.dropdown.position())},selectOption(e,t){var n=this.settings.dropdown,a=n.clearOnSelect,i=n.closeOnSelect;if(!e)return this.addTags(this.state.inputText,!0),void(i&&this.dropdown.hide());t=t||{};var r=e.getAttribute("value"),o="noMatch"==r,s=this.suggestedListItems.find((e=>(e.value||e)==r));this.trigger("dropdown:select",{data:s,elm:e,event:t}),r&&(s||o)?(this.state.editing?this.onEditTagDone(null,ot({__isValid:!0},this.normalizeTags([s])[0])):this["mix"==this.settings.mode?"addMixTags":"addTags"]([s||this.input.raw.call(this)],a),this.DOM.input.parentNode&&(setTimeout((()=>{this.DOM.input.focus(),this.toggleFocusClass(!0),this.setRangeAtStartEnd(!1,this.DOM.input)})),i&&setTimeout(this.dropdown.hide.bind(this)),e.addEventListener("transitionend",(()=>{this.dropdown.fillHeaderFooter(),setTimeout((()=>e.remove()),100)}),{once:!0}),e.classList.add(this.settings.classNames.dropdownItemHidden))):i&&setTimeout(this.dropdown.hide.bind(this))},selectAll(e){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var t=this.dropdown.filterListItems("");return e||(t=this.state.dropdown.suggestions),this.addTags(t,!0),this},filterListItems(e,t){var n,a,i,r,o,s=this.settings,l=s.dropdown,c=(t=t||{},[]),p=[],d=s.whitelist,u=l.maxItems>=0?l.maxItems:1/0,h=l.searchKeys,m=0;if(!(e="select"==s.mode&&this.value.length&&this.value[0][s.tagTextProp]==e?"":e)||!h.length)return c=l.includeSelectedTags?d:d.filter((e=>!this.isTagDuplicate(rt(e)?e.value:e))),this.state.dropdown.suggestions=c,c.slice(0,u);function g(e,t){return t.toLowerCase().split(" ").every((t=>e.includes(t.toLowerCase())))}for(o=l.caseSensitive?""+e:(""+e).toLowerCase();m<d.length;m++){let e,s;n=d[m]instanceof Object?d[m]:{value:d[m]};let u=!Object.keys(n).some((e=>h.includes(e)))?["value"]:h;l.fuzzySearch&&!t.exact?(i=u.reduce(((e,t)=>e+" "+(n[t]||"")),"").toLowerCase().trim(),l.accentedSearch&&(i=lt(i),o=lt(o)),e=0==i.indexOf(o),s=i===o,a=g(i,o)):(e=!0,a=u.some((e=>{var a=""+(n[e]||"");return l.accentedSearch&&(a=lt(a),o=lt(o)),l.caseSensitive||(a=a.toLowerCase()),s=a===o,t.exact?a===o:0==a.indexOf(o)}))),r=!l.includeSelectedTags&&this.isTagDuplicate(rt(n)?n.value:n),a&&!r&&(s&&e?p.push(n):"startsWith"==l.sortby&&e?c.unshift(n):c.push(n))}return this.state.dropdown.suggestions=p.concat(c),"function"==typeof l.sortby?l.sortby(p.concat(c),o):p.concat(c).slice(0,u)},getMappedValue(e){var t=this.settings.dropdown.mapValueTo;return t?"function"==typeof t?t(e):e[t]||e.value:e.value},createListHTML(e){return ot([],e).map(((e,t)=>{"string"!=typeof e&&"number"!=typeof e||(e={value:e});var n=this.dropdown.getMappedValue(e);return n="string"==typeof n?it(n):n,this.settings.templates.dropdownItem.apply(this,[Xe(Xe({},e),{},{mappedValue:n}),this])})).join("")}};const ft="@yaireo/tagify/";var wt,vt={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},yt={wrapper(e,t){return`<tags class="${t.classNames.namespace} ${t.mode?`${t.classNames[t.mode+"Mode"]}`:""} ${e.className}"\n ${t.readonly?"readonly":""}\n ${t.disabled?"disabled":""}\n ${t.required?"required":""}\n ${"select"===t.mode?"spellcheck='false'":""}\n tabIndex="-1">\n <span ${!t.readonly&&t.userInput?"contenteditable":""} tabIndex="0" data-placeholder="${t.placeholder||"&#8203;"}" aria-placeholder="${t.placeholder||""}"\n class="${t.classNames.input}"\n role="textbox"\n aria-autocomplete="both"\n aria-multiline="${"mix"==t.mode}"></span>\n &#8203;\n </tags>`},tag(e,t){let n=t.settings;return`<tag title="${e.title||e.value}"\n contenteditable='false'\n spellcheck='false'\n tabIndex="${n.a11y.focusableTags?0:-1}"\n class="${n.classNames.tag} ${e.class||""}"\n ${this.getAttributes(e)}>\n <x title='' class="${n.classNames.tagX}" role='button' aria-label='remove tag'></x>\n <div>\n <span class="${n.classNames.tagText}">${e[n.tagTextProp]||e.value}</span>\n </div>\n </tag>`},dropdown(e){var t=e.dropdown,n="manual"==t.position,a=`${e.classNames.dropdown}`;return`<div class="${n?"":a} ${t.classname}" role="listbox" aria-labelledby="dropdown">\n <div data-selector='tagify-suggestions-wrapper' class="${e.classNames.dropdownWrapper}"></div>\n </div>`},dropdownContent(e){var t=this.settings,n=this.state.dropdown.suggestions;return`\n ${t.templates.dropdownHeader.call(this,n)}\n ${e}\n ${t.templates.dropdownFooter.call(this,n)}\n `},dropdownItem(e){return`<div ${this.getAttributes(e)}\n class='${this.settings.classNames.dropdownItem} ${e.class?e.class:""}'\n tabindex="0"\n role="option">${e.mappedValue||e.value}</div>`},dropdownHeader(e){return`<header data-selector='tagify-suggestions-header' class="${this.settings.classNames.dropdownHeader}"></header>`},dropdownFooter(e){var t=e.length-this.settings.dropdown.maxItems;return t>0?`<footer data-selector='tagify-suggestions-footer' class="${this.settings.classNames.dropdownFooter}">\n ${t} more items. Refine your search.\n </footer>`:""},dropdownItemNoMatch:null};var bt={customBinding(){this.customEventsList.forEach((e=>{this.on(e,this.settings.callbacks[e])}))},binding(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t,n=this.events.callbacks,a=e?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!e){for(var i in this.state.mainEvents=e,e&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),t=this.listeners.main=this.listeners.main||{focus:["input",n.onFocusBlur.bind(this)],keydown:["input",n.onKeydown.bind(this)],click:["scope",n.onClickScope.bind(this)],dblclick:["scope",n.onDoubleClickScope.bind(this)],paste:["input",n.onPaste.bind(this)],drop:["input",n.onDrop.bind(this)],compositionstart:["input",n.onCompositionStart.bind(this)],compositionend:["input",n.onCompositionEnd.bind(this)]})this.DOM[t[i][0]][a](i,t[i][1]);clearInterval(this.listeners.main.originalInputValueObserverInterval),this.listeners.main.originalInputValueObserverInterval=setInterval(n.observeOriginalInputValue.bind(this),500);var r=this.listeners.main.inputMutationObserver||new MutationObserver(n.onInputDOMChange.bind(this));r&&r.disconnect(),"mix"==this.settings.mode&&r.observe(this.DOM.input,{childList:!0})}},bindGlobal(e){var t,n=this.events.callbacks,a=e?"removeEventListener":"addEventListener";if(e||!this.listeners.global)for(t of(this.listeners.global=this.listeners&&this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:n[this.isIE?"onInputIE":"onInput"].bind(this)},{type:"keydown",target:window,cb:n.onWindowKeyDown.bind(this)},{type:"blur",target:this.DOM.input,cb:n.onFocusBlur.bind(this)}],this.listeners.global))t.target[a](t.type,t.cb)},unbindGlobal(){this.events.bindGlobal.call(this,!0)},callbacks:{onFocusBlur(e){var t,n,a=this.settings,i=e.target?this.trim(e.target.textContent):"",r=null===(t=this.value)||void 0===t||null===(n=t[0])||void 0===n?void 0:n[a.tagTextProp],o=e.type,s=a.dropdown.enabled>=0,l={relatedTarget:e.relatedTarget},c=this.state.actions.selectOption&&(s||!a.dropdown.closeOnSelect),p=this.state.actions.addNew&&s,d=e.relatedTarget&&dt.call(this,e.relatedTarget)&&this.DOM.scope.contains(e.relatedTarget);if("blur"==o){if(e.relatedTarget===this.DOM.scope)return this.dropdown.hide(),void this.DOM.input.focus();this.postUpdate(),a.onChangeAfterBlur&&this.triggerChangeEvent()}if(!c&&!p)if(this.state.hasFocus="focus"==o&&+new Date,this.toggleFocusClass(this.state.hasFocus),"mix"!=a.mode){if("focus"==o)return this.trigger("focus",l),void(0!==a.dropdown.enabled&&a.userInput||this.dropdown.show(this.value.length?"":void 0));"blur"==o&&(this.trigger("blur",l),this.loading(!1),"select"==a.mode&&(d&&(this.removeTags(),i=""),r===i&&(i="")),i&&!this.state.actions.selectOption&&a.addTagOnBlur&&this.addTags(i,!0)),this.DOM.input.removeAttribute("style"),this.dropdown.hide()}else"focus"==o?this.trigger("focus",l):"blur"==e.type&&(this.trigger("blur",l),this.loading(!1),this.dropdown.hide(),this.state.dropdown.visible=void 0,this.setStateSelection())},onCompositionStart(e){this.state.composing=!0},onCompositionEnd(e){this.state.composing=!1},onWindowKeyDown(e){var t,n=document.activeElement;if(dt.call(this,n)&&this.DOM.scope.contains(document.activeElement))switch(t=n.nextElementSibling,e.key){case"Backspace":this.settings.readonly||(this.removeTags(n),(t||this.DOM.input).focus());break;case"Enter":setTimeout(this.editTag.bind(this),0,n)}},onKeydown(e){var t=this.settings;if(!this.state.composing&&t.userInput){"select"==t.mode&&t.enforceWhitelist&&this.value.length&&"Tab"!=e.key&&e.preventDefault();var n=this.trim(e.target.textContent);if(this.trigger("keydown",{event:e}),"mix"==t.mode){switch(e.key){case"Left":case"ArrowLeft":this.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(this.state.editing)return;var a,i,r,o=document.getSelection(),s="Delete"==e.key&&o.anchorOffset==(o.anchorNode.length||0),l=o.anchorNode.previousSibling,c=1==o.anchorNode.nodeType||!o.anchorOffset&&l&&1==l.nodeType&&o.anchorNode.previousSibling,p=tt(this.DOM.input.innerHTML),d=this.getTagElms();if("edit"==t.backspace&&c)return a=1==o.anchorNode.nodeType?null:o.anchorNode.previousElementSibling,setTimeout(this.editTag.bind(this),0,a),void e.preventDefault();if(ct()&&c)return r=at(c),c.hasAttribute("readonly")||c.remove(),this.DOM.input.focus(),void setTimeout((()=>{this.placeCaretAfterNode(r),this.DOM.input.click()}));if("BR"==o.anchorNode.nodeName)return;if((s||c)&&1==o.anchorNode.nodeType?i=0==o.anchorOffset?s?d[0]:null:d[Math.min(d.length,o.anchorOffset)-1]:s?i=o.anchorNode.nextElementSibling:c&&(i=c),3==o.anchorNode.nodeType&&!o.anchorNode.nodeValue&&o.anchorNode.previousElementSibling&&e.preventDefault(),(c||s)&&!t.backspace)return void e.preventDefault();if("Range"!=o.type&&!o.anchorOffset&&o.anchorNode==this.DOM.input&&"Delete"!=e.key)return void e.preventDefault();if("Range"!=o.type&&i&&i.hasAttribute("readonly"))return void this.placeCaretAfterNode(at(i));clearTimeout(wt),wt=setTimeout((()=>{var e=document.getSelection(),t=tt(this.DOM.input.innerHTML),n=!s&&e.anchorNode.previousSibling;if(t.length>=p.length&&n)if(dt.call(this,n)&&!n.hasAttribute("readonly")){if(this.removeTags(n),this.fixFirefoxLastTagNoCaret(),2==this.DOM.input.children.length&&"BR"==this.DOM.input.children[1].tagName)return this.DOM.input.innerHTML="",this.value.length=0,!0}else n.remove();this.value=[].map.call(d,((e,t)=>{var n=this.tagData(e);if(e.parentNode||n.readonly)return n;this.trigger("remove",{tag:e,index:t,data:n})})).filter((e=>e))}),20)}return!0}switch(e.key){case"Backspace":"select"==t.mode&&t.enforceWhitelist&&this.value.length?this.removeTags():this.state.dropdown.visible&&"manual"!=t.dropdown.position||""!=e.target.textContent&&8203!=n.charCodeAt(0)||(!0===t.backspace?this.removeTags():"edit"==t.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;e.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show();break;case"ArrowRight":{let e=this.state.inputSuggestion||this.state.ddItemData;if(e&&t.autoComplete.rightKey)return void this.addTags([e],!0);break}case"Tab":{let a="select"==t.mode;if(!n||a)return!0;e.preventDefault()}case"Enter":if(this.state.dropdown.visible&&"manual"!=t.dropdown.position)return;e.preventDefault(),setTimeout((()=>{this.state.actions.selectOption||this.addTags(n,!0)}))}}},onInput(e){this.postUpdate();var t=this.settings;if("mix"==t.mode)return this.events.callbacks.onMixTagsInput.call(this,e);var n=this.input.normalize.call(this),a=n.length>=t.dropdown.enabled,i={value:n,inputElm:this.DOM.input},r=this.validateTag({value:n});"select"==t.mode&&this.toggleScopeValidation(r),i.isValid=r,this.state.inputText!=n&&(this.input.set.call(this,n,!1),-1!=n.search(t.delimiters)?this.addTags(n)&&this.input.set.call(this):t.dropdown.enabled>=0&&this.dropdown[a?"show":"hide"](n),this.trigger("input",i))},onMixTagsInput(e){var t,n,a,i,r,o,s,l,c=this.settings,p=this.value.length,d=this.getTagElms(),u=document.createDocumentFragment(),h=window.getSelection().getRangeAt(0),m=[].map.call(d,(e=>this.tagData(e).value));if("deleteContentBackward"==e.inputType&&ct()&&this.events.callbacks.onKeydown.call(this,{target:e.target,key:"Backspace"}),this.value.slice().forEach((e=>{e.readonly&&!m.includes(e.value)&&u.appendChild(this.createTagElem(e))})),u.childNodes.length&&(h.insertNode(u),this.setRangeAtStartEnd(!1,u.lastChild)),d.length!=p)return this.value=[].map.call(this.getTagElms(),(e=>this.tagData(e))),void this.update({withoutChangeEvent:!0});if(this.hasMaxTags())return!0;if(window.getSelection&&(o=window.getSelection()).rangeCount>0&&3==o.anchorNode.nodeType){if((h=o.getRangeAt(0).cloneRange()).collapse(!0),h.setStart(o.focusNode,0),a=(t=h.toString().slice(0,h.endOffset)).split(c.pattern).length-1,(n=t.match(c.pattern))&&(i=t.slice(t.lastIndexOf(n[n.length-1]))),i){if(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:i.match(c.pattern)[0],value:i.replace(c.pattern,"")},this.state.tag.baseOffset=o.baseOffset-this.state.tag.value.length,l=this.state.tag.value.match(c.delimiters))return this.state.tag.value=this.state.tag.value.replace(c.delimiters,""),this.state.tag.delimiters=l[0],this.addTags(this.state.tag.value,c.dropdown.clearOnSelect),void this.dropdown.hide();r=this.state.tag.value.length>=c.dropdown.enabled;try{s=(s=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&s.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(e){}(s||a<this.state.mixMode.matchedPatternCount)&&(r=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=a}setTimeout((()=>{this.update({withoutChangeEvent:!0}),this.trigger("input",ot({},this.state.tag,{textContent:this.DOM.input.textContent})),this.state.tag&&this.dropdown[r?"show":"hide"](this.state.tag.value)}),10)},onInputIE(e){var t=this;setTimeout((function(){t.events.callbacks.onInput.call(t,e)}))},observeOriginalInputValue(){this.DOM.originalInput.parentNode||this.destroy(),this.DOM.originalInput.value!=this.DOM.originalInput.tagifyValue&&this.loadOriginalValues()},onClickScope(e){var t=this.settings,n=e.target.closest("."+t.classNames.tag),a=+new Date-this.state.hasFocus;if(e.target!=this.DOM.scope){if(!e.target.classList.contains(t.classNames.tagX))return n?(this.trigger("click",{tag:n,index:this.getNodeIndex(n),data:this.tagData(n),event:e}),void(1!==t.editTags&&1!==t.editTags.clicks||this.events.callbacks.onDoubleClickScope.call(this,e))):void(e.target==this.DOM.input&&("mix"==t.mode&&this.fixFirefoxLastTagNoCaret(),a>500)?this.state.dropdown.visible?this.dropdown.hide():0===t.dropdown.enabled&&"mix"!=t.mode&&this.dropdown.show(this.value.length?"":void 0):"select"!=t.mode||0!==t.dropdown.enabled||this.state.dropdown.visible||this.dropdown.show());this.removeTags(e.target.parentNode)}else this.state.hasFocus||this.DOM.input.focus()},onPaste(e){e.preventDefault();var t,n,a=this.settings;if("select"==a.mode&&a.enforceWhitelist||!a.userInput)return!1;a.readonly||(t=e.clipboardData||window.clipboardData,n=t.getData("Text"),a.hooks.beforePaste(e,{tagify:this,pastedText:n,clipboardData:t}).then((t=>{void 0===t&&(t=n),t&&(this.injectAtCaret(t,window.getSelection().getRangeAt(0)),"mix"==this.settings.mode?this.events.callbacks.onMixTagsInput.call(this,e):this.settings.pasteAsTags?this.addTags(this.state.inputText+t,!0):this.state.inputText=t)})).catch((e=>e)))},onDrop(e){e.preventDefault()},onEditTagInput(e,t){var n=e.closest("."+this.settings.classNames.tag),a=this.getNodeIndex(n),i=this.tagData(n),r=this.input.normalize.call(this,e),o={[this.settings.tagTextProp]:r,__tagId:i.__tagId},s=this.validateTag(o);this.editTagChangeDetected(ot(i,o))||!0!==e.originalIsValid||(s=!0),n.classList.toggle(this.settings.classNames.tagInvalid,!0!==s),i.__isValid=s,n.title=!0===s?i.title||i.value:s,r.length>=this.settings.dropdown.enabled&&(this.state.editing&&(this.state.editing.value=r),this.dropdown.show(r)),this.trigger("edit:input",{tag:n,index:a,data:ot({},this.value[a],{newValue:r}),event:t})},onEditTagPaste(e,t){var n=(t.clipboardData||window.clipboardData).getData("Text");window.getSelection(),t.preventDefault();var a=ut(n);this.setRangeAtStartEnd(!1,a)},onEditTagFocus(e){this.state.editing={scope:e,input:e.querySelector("[contenteditable]")}},onEditTagBlur(e){if(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(e)){var t,n,a=this.settings,i=e.closest("."+a.classNames.tag),r=this.input.normalize.call(this,e),o=this.tagData(i),s=o.__originalData,l=this.editTagChangeDetected(o),c=this.validateTag({[a.tagTextProp]:r,__tagId:o.__tagId});if(r)if(l){if(t=this.hasMaxTags(),n=ot({},s,{[a.tagTextProp]:this.trim(r),__isValid:c}),a.transformTag.call(this,n,s),!0!==(c=(!t||!0===s.__isValid)&&this.validateTag(n))){if(this.trigger("invalid",{data:n,tag:i,message:c}),a.editTags.keepInvalid)return;a.keepInvalidTags?n.__isValid=c:n=s}else a.keepInvalidTags&&(delete n.title,delete n["aria-invalid"],delete n.class);this.onEditTagDone(i,n)}else this.onEditTagDone(i,s);else this.onEditTagDone(i)}},onEditTagkeydown(e,t){if(!this.state.composing)switch(this.trigger("edit:keydown",{event:e}),e.key){case"Esc":case"Escape":t.parentNode.replaceChild(t.__tagifyTagData.__originalHTML,t),this.state.editing=!1;case"Enter":case"Tab":e.preventDefault(),e.target.blur()}},onDoubleClickScope(e){var t,n,a=e.target.closest("."+this.settings.classNames.tag),i=this.tagData(a),r=this.settings;a&&r.userInput&&!1!==i.editable&&(t=a.classList.contains(this.settings.classNames.tagEditing),n=a.hasAttribute("readonly"),"select"==r.mode||r.readonly||t||n||!this.settings.editTags||this.editTag(a),this.toggleFocusClass(!0),this.trigger("dblclick",{tag:a,index:this.getNodeIndex(a),data:this.tagData(a)}))},onInputDOMChange(e){e.forEach((e=>{e.addedNodes.forEach((e=>{if("<div><br></div>"==e.outerHTML)e.replaceWith(document.createElement("br"));else if(1==e.nodeType&&e.querySelector(this.settings.classNames.tagSelector)){let t=document.createTextNode("");3==e.childNodes[0].nodeType&&"BR"!=e.previousSibling.nodeName&&(t=document.createTextNode("\n")),e.replaceWith(t,...[...e.childNodes].slice(0,-1)),this.placeCaretAfterNode(t)}else if(dt.call(this,e)){var t;if(3!=(null===(t=e.previousSibling)||void 0===t?void 0:t.nodeType)||e.previousSibling.textContent||e.previousSibling.remove(),e.previousSibling&&"BR"==e.previousSibling.nodeName){e.previousSibling.replaceWith("\n​");let t=e.nextSibling,n="";for(;t;)n+=t.textContent,t=t.nextSibling;n.trim()&&this.placeCaretAfterNode(e.previousSibling)}}})),e.removedNodes.forEach((e=>{e&&"BR"==e.nodeName&&dt.call(this,t)&&(this.removeTags(t),this.fixFirefoxLastTagNoCaret())}))}));var t=this.DOM.input.lastChild;t&&""==t.nodeValue&&t.remove(),t&&"BR"==t.nodeName||this.DOM.input.appendChild(document.createElement("br"))}}};function kt(e,t){if(!e){console.warn("Tagify:","input element not found",e);const t=new Proxy(this,{get(){return()=>t}});return t}if(e.__tagify)return console.warn("Tagify: ","input element is already Tagified - Same instance is returned.",e),e.__tagify;var n;ot(this,function(e){var t=document.createTextNode("");function n(e,n,a){a&&n.split(/\s+/g).forEach((n=>t[e+"EventListener"].call(t,n,a)))}return{off(e,t){return n("remove",e,t),this},on(e,t){return t&&"function"==typeof t&&n("add",e,t),this},trigger(n,a,i){var r;if(i=i||{cloneData:!0},n)if(e.settings.isJQueryPlugin)"remove"==n&&(n="removeTag"),jQuery(e.DOM.originalInput).triggerHandler(n,[a]);else{try{var o="object"==typeof a?a:{value:a};if((o=i.cloneData?ot({},o):o).tagify=this,a.event&&(o.event=this.cloneEvent(a.event)),a instanceof Object)for(var s in a)a[s]instanceof HTMLElement&&(o[s]=a[s]);r=new CustomEvent(n,{detail:o})}catch(e){console.warn(e)}t.dispatchEvent(r)}}}}(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,t=t||{},this.getPersistedData=(n=t.id,e=>{let t,a="/"+e;if(1==localStorage.getItem(ft+n+"/v",1))try{t=JSON.parse(localStorage[ft+n+a])}catch(e){}return t}),this.setPersistedData=(e=>e?(localStorage.setItem(ft+e+"/v",1),(t,n)=>{let a="/"+n,i=JSON.stringify(t);t&&n&&(localStorage.setItem(ft+e+a,i),dispatchEvent(new Event("storage")))}):()=>{})(t.id),this.clearPersistedData=(e=>t=>{const n=ft+"/"+e+"/";if(t)localStorage.removeItem(n+t);else for(let e in localStorage)e.includes(n)&&localStorage.removeItem(e)})(t.id),this.applySettings(e,t),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(e),mt.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),e.autofocus&&this.DOM.input.focus(),e.__tagify=this}function Tt(e){return Tt="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},Tt(e)}function Et(){return Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Et.apply(this,arguments)}function _t(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ot(e,t){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ot(e,t)}function xt(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,a=St(e);if(t){var i=St(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return Ct(this,n)}}function Ct(e,t){if(t&&("object"===Tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nt(e)}function Nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},St(e)}kt.prototype={_dropdown:gt,helpers:{sameStr:Ze,removeCollectionProp:Qe,omit:et,isObject:rt,parseHTML:nt,escapeHTML:it,extend:ot,concatWithoutDups:st,getUID:pt,isNodeTag:dt},customEventsList:["change","add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim(e){return this.settings.trim&&e&&"string"==typeof e?e.trim():e},parseHTML:nt,templates:yt,parseTemplate(e,t){return e=this.settings.templates[e]||e,this.parseHTML(e.apply(this,t))},set whitelist(e){const t=e&&Array.isArray(e);this.settings.whitelist=t?e:[],this.setPersistedData(t?e:[],"whitelist")},get whitelist(){return this.settings.whitelist},generateClassSelectors(e){for(let t in e){let n=t;Object.defineProperty(e,n+"Selector",{get(){return"."+this[n].split(" ")[0]}})}},applySettings(e,t){ht.templates=this.templates;var n=this.settings=ot({},ht,t);if(n.disabled=e.hasAttribute("disabled"),n.readonly=n.readonly||e.hasAttribute("readonly"),n.placeholder=it(e.getAttribute("placeholder")||n.placeholder||""),n.required=e.hasAttribute("required"),this.generateClassSelectors(n.classNames),void 0===n.dropdown.includeSelectedTags&&(n.dropdown.includeSelectedTags=n.duplicates),this.isIE&&(n.autoComplete=!1),["whitelist","blacklist"].forEach((t=>{var a=e.getAttribute("data-"+t);a&&(a=a.split(n.delimiters))instanceof Array&&(n[t]=a)})),"autoComplete"in t&&!rt(t.autoComplete)&&(n.autoComplete=ht.autoComplete,n.autoComplete.enabled=t.autoComplete),"mix"==n.mode&&(n.autoComplete.rightKey=!0,n.delimiters=t.delimiters||null,n.tagTextProp&&!n.dropdown.searchKeys.includes(n.tagTextProp)&&n.dropdown.searchKeys.push(n.tagTextProp)),e.pattern)try{n.pattern=new RegExp(e.pattern)}catch(e){}if(n.delimiters){n._delimiters=n.delimiters;try{n.delimiters=new RegExp(this.settings.delimiters,"g")}catch(e){}}n.disabled&&(n.userInput=!1),this.TEXTS=Xe(Xe({},vt),n.texts||{}),("select"!=n.mode||t.dropdown.enabled)&&n.userInput||(n.dropdown.enabled=0),n.dropdown.appendTarget=t.dropdown&&t.dropdown.appendTarget?t.dropdown.appendTarget:document.body;let a=this.getPersistedData("whitelist");Array.isArray(a)&&(this.whitelist=Array.isArray(n.whitelist)?st(n.whitelist,a):a)},getAttributes(e){var t,n=this.getCustomAttributes(e),a="";for(t in n)a+=" "+t+(void 0!==e[t]?`="${n[t]}"`:"");return a},getCustomAttributes(e){if(!rt(e))return"";var t,n={};for(t in e)"__"!=t.slice(0,2)&&"class"!=t&&e.hasOwnProperty(t)&&void 0!==e[t]&&(n[t]=it(e[t]));return n},setStateSelection(){var e=window.getSelection(),t={anchorOffset:e.anchorOffset,anchorNode:e.anchorNode,range:e.getRangeAt&&e.rangeCount&&e.getRangeAt(0)};return this.state.selection=t,t},getCSSVars(){var e=getComputedStyle(this.DOM.scope,null);var t;this.CSSVars={tagHideTransition:(e=>{let t=e.value;return"s"==e.unit?1e3*t:t})(function(e){if(!e)return{};var t=(e=e.trim().split(" ")[0]).split(/\d+/g).filter((e=>e)).pop().trim();return{value:+e.split(t).filter((e=>e))[0].trim(),unit:t}}((t="tag-hide-transition",e.getPropertyValue("--"+t))))}},build(e){var t=this.DOM;this.settings.mixMode.integrated?(t.originalInput=null,t.scope=e,t.input=e):(t.originalInput=e,t.originalInput_tabIndex=e.tabIndex,t.scope=this.parseTemplate("wrapper",[e,this.settings]),t.input=t.scope.querySelector(this.settings.classNames.inputSelector),e.parentNode.insertBefore(t.scope,e),e.tabIndex=-1)},destroy(){this.events.unbindGlobal.call(this),this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.DOM.originalInput.tabIndex=this.DOM.originalInput_tabIndex,delete this.DOM.originalInput.__tagify,this.dropdown.hide(!0),clearTimeout(this.dropdownHide__bindEventsTimeout),clearInterval(this.listeners.main.originalInputValueObserverInterval)},loadOriginalValues(e){var t,n=this.settings;if(this.state.blockChangeEvent=!0,void 0===e){const t=this.getPersistedData("value");e=t&&!this.DOM.originalInput.value?t:n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value}if(this.removeAllTags(),e)if("mix"==n.mode)this.parseMixTags(e),(t=this.DOM.input.lastChild)&&"BR"==t.tagName||this.DOM.input.insertAdjacentHTML("beforeend","<br>");else{try{JSON.parse(e)instanceof Array&&(e=JSON.parse(e))}catch(e){}this.addTags(e,!0).forEach((e=>e&&e.classList.add(n.classNames.tagNoAnimation)))}else this.postUpdate();this.state.lastOriginalValueReported=n.mixMode.integrated?"":this.DOM.originalInput.value,this.state.blockChangeEvent=!1},cloneEvent(e){var t={};for(var n in e)"path"!=n&&(t[n]=e[n]);return t},loading(e){return this.state.isLoading=e,this.DOM.scope.classList[e?"add":"remove"](this.settings.classNames.scopeLoading),this},tagLoading(e,t){return e&&e.classList[t?"add":"remove"](this.settings.classNames.tagLoading),this},toggleClass(e,t){"string"==typeof e&&this.DOM.scope.classList.toggle(e,t)},toggleScopeValidation(e){var t=!0===e||void 0===e;!this.settings.required&&e&&e===this.TEXTS.empty&&(t=!0),this.toggleClass(this.settings.classNames.tagInvalid,!t),this.DOM.scope.title=t?"":e},toggleFocusClass(e){this.toggleClass(this.settings.classNames.focus,!!e)},triggerChangeEvent:function(){if(!this.settings.mixMode.integrated){var e=this.DOM.originalInput,t=this.state.lastOriginalValueReported!==e.value,n=new CustomEvent("change",{bubbles:!0});t&&(this.state.lastOriginalValueReported=e.value,n.simulated=!0,e._valueTracker&&e._valueTracker.setValue(Math.random()),e.dispatchEvent(n),this.trigger("change",this.state.lastOriginalValueReported),e.value=this.state.lastOriginalValueReported)}},events:bt,fixFirefoxLastTagNoCaret(){},setRangeAtStartEnd(e,t){e="number"==typeof e?e:!!e,t=t.lastChild||t;var n=document.getSelection();if(n.focusNode&&n.focusNode!==this.DOM.input)return!0;try{n.rangeCount>=1&&["Start","End"].forEach((a=>n.getRangeAt(0)["set"+a](t,e||t.length)))}catch(e){}},placeCaretAfterNode(e){if(e&&e.parentNode){var t=e,n=window.getSelection(),a=n.getRangeAt(0);n.rangeCount&&(a.setStartAfter(t||e),a.collapse(!0),n.removeAllRanges(),n.addRange(a))}},insertAfterTag(e,t){if(t=t||this.settings.mixMode.insertAfterTag,e&&e.parentNode&&t)return t="string"==typeof t?document.createTextNode(t):t,e.parentNode.insertBefore(t,e.nextSibling),t},editTagChangeDetected(e){var t=e.__originalData;for(var n in t)if(!this.dataProps.includes(n)&&e[n]!=t[n])return!0;return!1},getTagTextNode(e){return e.querySelector(this.settings.classNames.tagTextSelector)},setTagTextNode(e,t){this.getTagTextNode(e).innerHTML=it(t)},editTag(e,t){e=e||this.getLastTag(),t=t||{},this.dropdown.hide();var n=this.settings,a=this.getTagTextNode(e),i=this.getNodeIndex(e),r=this.tagData(e),o=this.events.callbacks,s=this,l=!0;if(a){if(!(r instanceof Object&&"editable"in r)||r.editable)return r=this.tagData(e,{__originalData:ot({},r),__originalHTML:e.cloneNode(!0)}),this.tagData(r.__originalHTML,r.__originalData),a.setAttribute("contenteditable",!0),e.classList.add(n.classNames.tagEditing),a.addEventListener("focus",o.onEditTagFocus.bind(this,e)),a.addEventListener("blur",(function(){setTimeout((()=>o.onEditTagBlur.call(s,s.getTagTextNode(e))))})),a.addEventListener("input",o.onEditTagInput.bind(this,a)),a.addEventListener("paste",o.onEditTagPaste.bind(this,a)),a.addEventListener("keydown",(t=>o.onEditTagkeydown.call(this,t,e))),a.addEventListener("compositionstart",o.onCompositionStart.bind(this)),a.addEventListener("compositionend",o.onCompositionEnd.bind(this)),t.skipValidation||(l=this.editTagToggleValidity(e)),a.originalIsValid=l,this.trigger("edit:start",{tag:e,index:i,data:r,isValid:l}),a.focus(),this.setRangeAtStartEnd(!1,a),this}else console.warn("Cannot find element in Tag template: .",n.classNames.tagTextSelector)},editTagToggleValidity(e,t){var n;if(t=t||this.tagData(e))return(n=!("__isValid"in t)||!0===t.__isValid)||this.removeTagsFromValue(e),this.update(),e.classList.toggle(this.settings.classNames.tagNotAllowed,!n),t.__isValid;console.warn("tag has no data: ",e,t)},onEditTagDone(e,t){t=t||{};var n={tag:e=e||this.state.editing.scope,index:this.getNodeIndex(e),previousData:this.tagData(e),data:t};this.trigger("edit:beforeUpdate",n,{cloneData:!1}),this.state.editing=!1,delete t.__originalData,delete t.__originalHTML,e&&t[this.settings.tagTextProp]?(e=this.replaceTag(e,t),this.editTagToggleValidity(e,t),this.settings.a11y.focusableTags?e.focus():this.placeCaretAfterNode(e)):e&&this.removeTags(e),this.trigger("edit:updated",n),this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},replaceTag(e,t){t&&t.value||(t=e.__tagifyTagData),t.__isValid&&1!=t.__isValid&&ot(t,this.getInvalidTagAttrs(t,t.__isValid));var n=this.createTagElem(t);return e.parentNode.replaceChild(n,e),this.updateValueByDOMTags(),n},updateValueByDOMTags(){this.value.length=0,[].forEach.call(this.getTagElms(),(e=>{e.classList.contains(this.settings.classNames.tagNotAllowed.split(" ")[0])||this.value.push(this.tagData(e))})),this.update()},injectAtCaret(e,t){var n;return!(t=t||(null===(n=this.state.selection)||void 0===n?void 0:n.range))&&e?(this.appendMixTags(e),this):(ut(e,t),this.setRangeAtStartEnd(!1,content),this.updateValueByDOMTags(),this.update(),this)},input:{set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n=this.settings.dropdown.closeOnSelect;this.state.inputText=e,t&&(this.DOM.input.innerHTML=it(""+e)),!e&&n&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},raw(){return this.DOM.input.textContent},validate(){var e=!this.state.inputText||!0===this.validateTag({value:this.state.inputText});return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!e),e},normalize(e){var t=e||this.DOM.input,n=[];t.childNodes.forEach((e=>3==e.nodeType&&n.push(e.nodeValue))),n=n.join("\n");try{n=n.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(e){}return n=n.replace(/\s/g," "),this.trim(n)},autocomplete:{suggest(e){if(this.settings.autoComplete.enabled){"string"==typeof(e=e||{})&&(e={value:e});var t=e.value?""+e.value:"",n=t.substr(0,this.state.inputText.length).toLowerCase(),a=t.substring(this.state.inputText.length);t&&this.state.inputText&&n==this.state.inputText.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",a),this.state.inputSuggestion=e):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}},set(e){var t=this.DOM.input.getAttribute("data-suggest"),n=e||(t?this.state.inputText+t:null);return!!n&&("mix"==this.settings.mode?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+n)):(this.input.set.call(this,n),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx(e){return this.value.findIndex((t=>t.__tagId==(e||{}).__tagId))},getNodeIndex(e){var t=0;if(e)for(;e=e.previousElementSibling;)t++;return t},getTagElms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a="."+[...this.settings.classNames.tag.split(" "),...t].join(".");return[].slice.call(this.DOM.scope.querySelectorAll(a))},getLastTag(){var e=this.DOM.scope.querySelectorAll(`${this.settings.classNames.tagSelector}:not(.${this.settings.classNames.tagHide}):not([readonly])`);return e[e.length-1]},tagData(e,t,n){return e?(t&&(e.__tagifyTagData=n?t:ot({},e.__tagifyTagData||{},t)),e.__tagifyTagData):(console.warn("tag element doesn't exist",e,t),t)},isTagDuplicate(e,t,n){var a=0;if("select"==this.settings.mode)return!1;for(let i of this.value){Ze(this.trim(""+e),i.value,t)&&n!=i.__tagId&&a++}return a},getTagIndexByValue(e){var t=[];return this.getTagElms().forEach(((n,a)=>{Ze(this.trim(n.textContent),e,this.settings.dropdown.caseSensitive)&&t.push(a)})),t},getTagElmByValue(e){var t=this.getTagIndexByValue(e)[0];return this.getTagElms()[t]},flashTag(e){e&&(e.classList.add(this.settings.classNames.tagFlash),setTimeout((()=>{e.classList.remove(this.settings.classNames.tagFlash)}),100))},isTagBlacklisted(e){return e=this.trim(e.toLowerCase()),this.settings.blacklist.filter((t=>(""+t).toLowerCase()==e)).length},isTagWhitelisted(e){return!!this.getWhitelistItem(e)},getWhitelistItem(e,t,n){t=t||"value";var a,i=this.settings;return(n=n||i.whitelist).some((n=>{var r="string"==typeof n?n:n[t]||n.value;if(Ze(r,e,i.dropdown.caseSensitive,i.trim))return a="string"==typeof n?{value:n}:n,!0})),a||"value"!=t||"value"==i.tagTextProp||(a=this.getWhitelistItem(e,i.tagTextProp,n)),a},validateTag(e){var t=this.settings,n="value"in e?"value":t.tagTextProp,a=this.trim(e[n]+"");return(e[n]+"").trim()?t.pattern&&t.pattern instanceof RegExp&&!t.pattern.test(a)?this.TEXTS.pattern:!t.duplicates&&this.isTagDuplicate(a,t.dropdown.caseSensitive,e.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(a)||t.enforceWhitelist&&!this.isTagWhitelisted(a)?this.TEXTS.notAllowed:!t.validate||t.validate(e):this.TEXTS.empty},getInvalidTagAttrs(e,t){return{"aria-invalid":!0,class:`${e.class||""} ${this.settings.classNames.tagNotAllowed}`.trim(),title:t}},hasMaxTags(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly(e,t){var n=this.settings;document.activeElement.blur(),n[t||"readonly"]=e,this.DOM.scope[(e?"set":"remove")+"Attribute"](t||"readonly",!0),this.setContentEditable(!e)},setContentEditable(e){this.settings.userInput&&(this.DOM.input.contentEditable=e,this.DOM.input.tabIndex=e?0:-1)},setDisabled(e){this.setReadonly(e,"disabled")},normalizeTags(e){var t=this.settings,n=t.whitelist,a=t.delimiters,i=t.mode,r=t.tagTextProp;t.enforceWhitelist;var o=[],s=!!n&&n[0]instanceof Object,l=Array.isArray(e),c=l&&e[0].value,p=e=>(e+"").split(a).filter((e=>e)).map((e=>({[r]:this.trim(e),value:this.trim(e)})));if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!e.trim())return[];e=p(e)}else l&&(e=[].concat(...e.map((e=>e.value?e:p(e)))));return s&&!c&&(e.forEach((e=>{var t=o.map((e=>e.value)),n=this.dropdown.filterListItems.call(this,e[r],{exact:!0});this.settings.duplicates||(n=n.filter((e=>!t.includes(e.value))));var a=n.length>1?this.getWhitelistItem(e[r],r,n):n[0];a&&a instanceof Object?o.push(a):"mix"!=i&&(null==e.value&&(e.value=e[r]),o.push(e))})),o.length&&(e=o)),e},parseMixTags(e){var t=this.settings,n=t.mixTagsInterpolator,a=t.duplicates,i=t.transformTag,r=t.enforceWhitelist,o=t.maxTags,s=t.tagTextProp,l=[];return e=e.split(n[0]).map(((e,t)=>{var c,p,d,u=e.split(n[1]),h=u[0],m=l.length==o;try{if(h==+h)throw Error;p=JSON.parse(h)}catch(e){p=this.normalizeTags(h)[0]||{value:h}}if(i.call(this,p),m||!(u.length>1)||r&&!this.isTagWhitelisted(p.value)||!a&&this.isTagDuplicate(p.value)){if(e)return t?n[0]+e:e}else p[c=p[s]?s:"value"]=this.trim(p[c]),d=this.createTagElem(p),l.push(p),d.classList.add(this.settings.classNames.tagNoAnimation),u[0]=d.outerHTML,this.value.push(p);return u.join("")})).join(""),this.DOM.input.innerHTML=e,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize(),this.getTagElms().forEach(((e,t)=>this.tagData(e,l[t]))),this.update({withoutChangeEvent:!0}),e},replaceTextWithNode(e,t){if(this.state.tag||t){t=t||this.state.tag.prefix+this.state.tag.value;var n,a,i=this.state.selection||window.getSelection(),r=i.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return r.splitText(i.anchorOffset-o),-1==(n=r.nodeValue.lastIndexOf(t))?!0:(a=r.splitText(n),e&&r.parentNode.replaceChild(e,a),!0)}},selectTag(e,t){var n=this.settings;if(!n.enforceWhitelist||this.isTagWhitelisted(t.value)){this.input.set.call(this,t[n.tagTextProp]||t.value,!0),this.state.actions.selectOption&&setTimeout((()=>this.setRangeAtStartEnd(!1,this.DOM.input)));var a=this.getLastTag();return a?this.replaceTag(a,t):this.appendTag(e),this.value[0]=t,this.update(),this.trigger("add",{tag:e,data:t}),[e]}},addEmptyTag(e){var t=ot({value:""},e||{}),n=this.createTagElem(t);this.tagData(n,t),this.appendTag(n),this.editTag(n,{skipValidation:!0})},addTags(e,t,n){var a=[],i=this.settings,r=[],o=document.createDocumentFragment();if(n=n||i.skipInvalid,!e||0==e.length)return a;switch(e=this.normalizeTags(e),i.mode){case"mix":return this.addMixTags(e);case"select":t=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),e.forEach((e=>{var t,s={},l=Object.assign({},e,{value:e.value+""});if(e=Object.assign({},l),i.transformTag.call(this,e),e.__isValid=this.hasMaxTags()||this.validateTag(e),!0!==e.__isValid){if(n)return;if(ot(s,this.getInvalidTagAttrs(e,e.__isValid),{__preInvalidData:l}),e.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(e.value)),!i.createInvalidTags)return void r.push(e.value)}if("readonly"in e&&(e.readonly?s["aria-readonly"]=!0:delete e.readonly),t=this.createTagElem(e,s),a.push(t),"select"==i.mode)return this.selectTag(t,e);o.appendChild(t),e.__isValid&&!0===e.__isValid?(this.value.push(e),this.trigger("add",{tag:t,index:this.value.length-1,data:e})):(this.trigger("invalid",{data:e,index:this.value.length,tag:t,message:e.__isValid}),i.keepInvalidTags||setTimeout((()=>this.removeTags(t,!0)),1e3)),this.dropdown.position()})),this.appendTag(o),this.update(),e.length&&t&&(this.input.set.call(this,i.createInvalidTags?"":r.join(i._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),i.dropdown.enabled&&this.dropdown.refilter(),a},addMixTags(e){if((e=this.normalizeTags(e))[0].prefix||this.state.tag)return this.prefixedTextToTag(e[0]);"string"==typeof e&&(e=[{value:e}]),this.state.selection;var t=document.createDocumentFragment();return e.forEach((e=>{var n=this.createTagElem(e);t.appendChild(n),this.insertAfterTag(n)})),this.appendMixTags(t),t},appendMixTags(e){var t=!!this.state.selection;t?this.injectAtCaret(e):(this.DOM.input.focus(),(t=this.setStateSelection()).range.setStart(this.DOM.input,t.range.endOffset),t.range.setEnd(this.DOM.input,t.range.endOffset),this.DOM.input.appendChild(e),this.updateValueByDOMTags(),this.update())},prefixedTextToTag(e){var t,n=this.settings,a=this.state.tag.delimiters;if(n.transformTag.call(this,e),e.prefix=e.prefix||this.state.tag?this.state.tag.prefix:(n.pattern.source||n.pattern)[0],t=this.createTagElem(e),this.replaceTextWithNode(t)||this.DOM.input.appendChild(t),setTimeout((()=>t.classList.add(this.settings.classNames.tagNoAnimation)),300),this.value.push(e),this.update(),!a){var i=this.insertAfterTag(t)||t;this.placeCaretAfterNode(i)}return this.state.tag=null,this.trigger("add",ot({},{tag:t},{data:e})),t},appendTag(e){var t=this.DOM,n=t.input;n===t.input?t.scope.insertBefore(e,n):t.scope.appendChild(e)},createTagElem(e,t){e.__tagId=pt();var n,a=ot({},e,Xe({value:it(e.value+"")},t));return function(e){for(var t,n=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,null,!1);t=n.nextNode();)t.textContent.trim()||t.parentNode.removeChild(t)}(n=this.parseTemplate("tag",[a,this])),this.tagData(n,e),n},reCheckInvalidTags(){var e=this.settings;this.getTagElms(e.classNames.tagNotAllowed).forEach(((t,n)=>{var a=this.tagData(t),i=this.hasMaxTags(),r=this.validateTag(a),o=!0===r&&!i;if("select"==e.mode&&this.toggleScopeValidation(r),o)return a=a.__preInvalidData?a.__preInvalidData:{value:a.value},this.replaceTag(t,a);t.title=i||r}))},removeTags(e,t,n){var a,i=this.settings;if(e=e&&e instanceof HTMLElement?[e]:e instanceof Array?e:e?[e]:[this.getLastTag()],a=e.reduce(((e,t)=>{t&&"string"==typeof t&&(t=this.getTagElmByValue(t));var n=this.tagData(t);return t&&n&&!n.readonly&&e.push({node:t,idx:this.getTagIdx(n),data:this.tagData(t,{__removed:!0})}),e}),[]),n="number"==typeof n?n:this.CSSVars.tagHideTransition,"select"==i.mode&&(n=0,this.input.set.call(this)),1==a.length&&"select"!=i.mode&&a[0].node.classList.contains(i.classNames.tagNotAllowed)&&(t=!0),a.length)return i.hooks.beforeRemoveTag(a,{tagify:this}).then((()=>{function e(e){e.node.parentNode&&(e.node.parentNode.removeChild(e.node),t?i.keepInvalidTags&&this.trigger("remove",{tag:e.node,index:e.idx}):(this.trigger("remove",{tag:e.node,index:e.idx,data:e.data}),this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),i.keepInvalidTags&&this.reCheckInvalidTags()))}n&&n>10&&1==a.length?function(t){t.node.style.width=parseFloat(window.getComputedStyle(t.node).width)+"px",document.body.clientTop,t.node.classList.add(i.classNames.tagHide),setTimeout(e.bind(this),n,t)}.call(this,a[0]):a.forEach(e.bind(this)),t||(this.removeTagsFromValue(a.map((e=>e.node))),this.update(),"select"==i.mode&&this.setContentEditable(!0))})).catch((e=>{}))},removeTagsFromDOM(){[].slice.call(this.getTagElms()).forEach((e=>e.parentNode.removeChild(e)))},removeTagsFromValue(e){(e=Array.isArray(e)?e:[e]).forEach((e=>{var t=this.tagData(e),n=this.getTagIdx(t);n>-1&&this.value.splice(n,1)}))},removeAllTags(e){e=e||{},this.value=[],"mix"==this.settings.mode?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout((()=>{this.DOM.input.focus()})),"select"==this.settings.mode&&(this.input.set.call(this),this.setContentEditable(!0)),this.update(e)},postUpdate(){var e,t,n=this.settings,a=n.classNames,i="mix"==n.mode?n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;(this.toggleClass(a.hasMaxTags,this.value.length>=n.maxTags),this.toggleClass(a.hasNoTags,!this.value.length),this.toggleClass(a.empty,!i),"select"==n.mode)&&this.toggleScopeValidation(null===(e=this.value)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.__isValid)},setOriginalInputValue(e){var t=this.DOM.originalInput;this.settings.mixMode.integrated||(t.value=e,t.tagifyValue=t.value,this.setPersistedData(e,"value"))},update(e){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout(function(){var t=this.getInputValue();this.setOriginalInputValue(t),this.postUpdate(),this.settings.onChangeAfterBlur&&(e||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent()}.bind(this),100)},getInputValue(){var e=this.getCleanValue();return"mix"==this.settings.mode?this.getMixedTagsAsString(e):e.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(e):JSON.stringify(e):""},getCleanValue(e){return Qe(e||this.value,this.dataProps)},getMixedTagsAsString(){var e="",t=this,n=this.settings,a=n.originalInputValueFormat||JSON.stringify,i=n.mixTagsInterpolator;return function n(r){r.childNodes.forEach((r=>{if(1==r.nodeType){const o=t.tagData(r);if("BR"==r.tagName&&(e+="\r\n"),o&&dt.call(t,r)){if(o.__removed)return;e+=i[0]+a(et(o,t.dataProps))+i[1]}else r.getAttribute("style")||["B","I","U"].includes(r.tagName)?e+=r.textContent:"DIV"!=r.tagName&&"P"!=r.tagName||(e+="\r\n",n(r))}else e+=r.textContent}))}(this.DOM.input),e}},kt.prototype.removeTag=kt.prototype.removeTags;var It=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&&Ot(e,t)}(o,e);var t,n,i,r=xt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,e))._handleRef=t._handleRef.bind(Nt(t)),t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this;this.tagify=new kt(this.component,this.props.settings||{}),this.props.settings.callbacks.setup&&setTimeout((function(){e.props.settings.callbacks.setup.call(e.tagify),e.tagify.DOM.input.setAttribute("contenteditable",!0),e.tagify.DOM.input.addEventListener("blur",e.props.settings.callbacks.blur)}),100),this.props.settings.callbacks.dragEnd&&this.tagify.DOM.scope.addEventListener("dragend",this.props.settings.callbacks.dragEnd),(0,a.doAction)("rank_math_tagify_init",this)}},{key:"shouldComponentUpdate",value:function(e){return this.tagify.settings.whitelist=e.settings.whitelist,e.showDropdown&&this.tagify.dropdown.show.call(this.tagify,e.showDropdown),!1===e.showDropdown&&this.tagify.dropdown.hide.call(this.tagify,!0),!1}},{key:"_handleRef",value:function(e){this.component=e}},{key:"render",value:function(){var e={ref:this._handleRef,name:this.props.name,className:this.props.className,placeholder:this.props.placeholder};return"textarea"===this.props.mode?wp.element.createElement("textarea",Et({},e,{defaultValue:this.props.initialValue})):wp.element.createElement("input",Et({},e,{defaultValue:this.props.initialValue}))}},{key:"toArray",value:function(){return this.tagify.value.map((function(e){return e.value}))}},{key:"toString",value:function(){return this.toArray().join(",")}},{key:"queryTags",value:function(){return this.tagify.DOM.scope.querySelectorAll("tag")}}])&&_t(t.prototype,n),i&&_t(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.Component),Dt=function(t){var n=t.onClick;return wp.element.createElement(c.Modal,{title:(0,e.__)("Upgrade to re-order Focus Keywords","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!0,onRequestClose:function(){return n()},className:"rank-math-modal rank-math-focus-keywords-cta-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement("div",{className:"components-panel__body rank-math-focus-keywords-cta-wrapper"},wp.element.createElement("div",{id:"rank-math-pro-cta",className:"center"},wp.element.createElement("div",{className:"rank-math-cta-box blue-ticks"},wp.element.createElement("ul",null,wp.element.createElement("li",null,(0,e.__)("Improve the SEO workflow","rank-math")),wp.element.createElement("li",null,(0,e.__)("Set different Primary Focus Keyword","rank-math")),wp.element.createElement("li",null,(0,e.__)("and many other premium SEO features","rank-math"))),wp.element.createElement("a",{className:"button button-primary is-green",href:rankMath.trendsUpgradeLink,rel:"noreferrer noopener",target:"_blank"},rankMath.trendsUpgradeLabel)))))};function Mt(e){return Mt="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},Mt(e)}function At(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Pt(e,t){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pt(e,t)}function Rt(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,a=Ft(e);if(t){var i=Ft(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return jt(this,n)}}function jt(e,t){if(t&&("object"===Mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}function Lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ft(e){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ft(e)}function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ut=function(t){!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&&Pt(e,t)}(c,t);var n,r,o,l=Rt(c);function c(e){var t,n=e.keywords;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Ht(Lt(t=l.call(this)),"state",{}),Ht(Lt(t),"request",null),Ht(Lt(t),"hasAdded",!1),Ht(Lt(t),"clickCount",0),Ht(Lt(t),"singleClickTimer",null),t.state={showCTA:!1},t.tagifyField=(0,i.createRef)(),t.keywords=n,t.hideDropdown=t.hideDropdown.bind(Lt(t)),t.callbacks={add:t.onAdd.bind(Lt(t)),remove:(0,s.debounce)(t.onRemove.bind(Lt(t)),300),"edit:updated":t.onEditUpdated.bind(Lt(t)),click:t.onClick.bind(Lt(t)),dragEnd:t.onDragEnd.bind(Lt(t)),setup:t.onSetup.bind(Lt(t)),blur:t.hideDropdown},rankMath.autoSuggestKeywords&&(t.callbacks.input=(0,s.debounce)(t.onInput.bind(Lt(t)),300)),window.rankMathEditor.focusKeywordField=Lt(t),t}return n=c,(r=[{key:"render",value:function(){var t=this,n=(0,a.applyFilters)("rank_math_focus_keyword_settings",{addTagOnBlur:!0,maxTags:"post"===rankMath.objectType?rankMath.maxTags:1,whitelist:this.state.whitelist||[],focusableTags:!0,transformTag:function(e){e.value=t.stripTags(e.value.replaceAll(",",""))},templates:{tag:function(e){var n=e.title||e.value,a="";if(!e.class){var i=rankMathEditor.resultManager.getScore(K.Helpers.removeDiacritics(n));a+=t.getScoreClass(i)}return"<tag draggable='true' title='".concat(t.stripTags(n),"'\n tabIndex='0'\n contenteditable='false'\n spellcheck='false'\n class='tagify__tag ").concat(e.class?e.class:a,"'\n ").concat(t.getAttributesEsc(e),">\n <x title='' class='tagify__tag__removeBtn' role='button' aria-label='remove tag'></x>\n <div>\n <span class='tagify__tag-text'>").concat(t.stripTags(n),"</span>\n </div>\n </tag>")}},callbacks:this.callbacks},this);return this.setKeywordsClasses(),wp.element.createElement(React.Fragment,null,wp.element.createElement(It,{ref:this.tagifyField,mode:"input",settings:n,showDropdown:this.state.showDropdown,initialValue:this.keywords,placeholder:(0,e.__)("Example: Rank Math SEO","rank-math")}),this.state.showCTA&&wp.element.createElement(Dt,{onClick:function(){return t.setState({showCTA:!1})}}))}},{key:"shouldComponentUpdate",value:function(e,t){return this.state.showCTA!==t.showCTA||this.state.showDropdown!==t.showDropdown||e.isRefreshing!==this.props.isRefreshing||e.keywords!==this.props.keywords}},{key:"getScoreClass",value:function(e){return 80<e?"good-fk":50<e?"ok-fk":"bad-fk"}},{key:"setKeywordsClasses",value:function(){var e=this;if(null!==this.tagifyField.current){var t=this.tagifyField.current,n=t.tagify.value;if(n.length>0){var a=t.queryTags();n.map((function(t,n){if(!(0,s.isUndefined)(a[n])){var i=rankMathEditor.resultManager.getScore(K.Helpers.removeDiacritics(t.value));a[n].classList.remove("ok-fk","good-fk","bad-fk"),a[n].classList.add(e.getScoreClass(i))}}))}}}},{key:"onSetup",value:function(){this.selectFirstKeyword(),this.setKeywordsClasses()}},{key:"onInput",value:function(e){var t=this;(e=(0,s.has)(e.detail,"value")?e.detail.value:e.detail.data.value).length<2||(this.hideDropdown(),this.hasAdded?this.hasAdded=!1:this.request=se().ajax({url:rankMath.keywordsApi.url,data:{keyword:e,locale:rankMath.locale},success:function(n){if(t.hasAdded)t.hasAdded=!1;else{var a=se().map(n,(function(e){return e}));t.setState({whitelist:a,showDropdown:e})}}}))}},{key:"onAdd",value:function(e){this.hasAdded=!0,0===e.detail.index&&this.props.updateSelectedKeyword(e.detail,this.tagifyField.current),this.updateKeywords()}},{key:"onRemove",value:function(e){this.hideDropdown(),0===e.detail.index&&this.onSetup(),rankMathEditor.resultManager.deleteResult(e.detail.data.value),this.selectFirstKeyword(),this.updateKeywords()}},{key:"onClick",value:function(e){var t=this;this.clickCount++,1===this.clickCount?this.singleClickTimer=setTimeout((function(){t.clickCount=0,t.props.updateSelectedKeyword(e.detail,t.tagifyField.current)}),400):2===this.clickCount&&(clearTimeout(this.singleClickTimer),this.clickCount=0)}},{key:"onEditUpdated",value:function(e){this.hasAdded=!0,0===e.detail.index&&this.props.updateSelectedKeyword(e.detail,this.tagifyField.current),this.updateKeywords()}},{key:"selectFirstKeyword",value:function(){var e=this.tagifyField.current,t=e.tagify.value,n={tag:"",index:0,data:{value:""}};t.length>0&&(n={tag:e.queryTags()[0],index:0,data:{value:t[0].value}}),this.props.updateSelectedKeyword(n,e)}},{key:"updateKeywords",value:function(){var e=this.tagifyField.current,t=this.stripTags(e.toString());this.props.updateKeywords(t)}},{key:"onDragEnd",value:function(){1!==this.tagifyField.current.queryTags().length&&this.setState({showCTA:!0})}},{key:"hideDropdown",value:function(){null!==this.request&&(this.request.abort(),this.request=null),this.setState({whitelist:[],showDropdown:!1})}},{key:"getAttributesEsc",value:function(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var t,n,a="",i=Object.keys(e);for(n=i.length;n--;)"class"!==(t=i[n])&&e.hasOwnProperty(t)&&e[t]&&(a+=""+t+(e[t]?'="'.concat(this.stripTags(e[t]),'"'):""));return a}},{key:"stripTags",value:function(e){return e=se()("<textarea />").html(e).text(),((new DOMParser).parseFromString(e,"text/html").body.textContent||"").replace(/["<>]/g,"")||""}}])&&At(n.prototype,r),o&&At(n,o),Object.defineProperty(n,"prototype",{writable:!1}),c}(i.Component),Bt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{keywords:t.getKeywords(),isRefreshing:t.isRefreshing()}})),(0,t.withDispatch)((function(e){return{updateKeywords:function(t){e("rank-math").updateKeywords(t)},updateSelectedKeyword:function(t,n){n.queryTags().forEach((function(e){e.classList.remove("selected")})),(0,s.isUndefined)(t.tag)||""===t.tag||t.tag.classList.add("selected"),e("rank-math").updateSelectedKeyword(t)}}})))(Ut),Vt=(0,c.withFilters)("rankMath.focusKeywords.Trends")((0,l.compose)((0,t.withSelect)((function(e){return{isTrendsCtaOpen:e("rank-math").isTrendsCtaOpen()}})),(0,t.withDispatch)((function(e,t){return{toggleTrendsCta:function(){e("rank-math").toggleTrendsCta(!t.isTrendsCtaOpen)}}})))((function(t){var n=t.isTrendsCtaOpen,a=t.toggleTrendsCta;return wp.element.createElement(i.Fragment,null,wp.element.createElement("a",{href:"#",title:(0,e.__)("Trends","rank-math"),rel:"noreferrer noopener",id:"rank-math-compare-keywords-trigger",className:"button button-icon rank-math-compare-keywords-trigger",dangerouslySetInnerHTML:{__html:rankMath.trendsIcon},onClick:a}),n&&wp.element.createElement(c.Modal,{title:(0,e.__)("Google Trends","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!0,onRequestClose:a,className:"rank-math-modal rank-math-trends-cta-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement("div",{className:"components-panel__body rank-math-trends-cta-wrapper"},wp.element.createElement("img",{src:rankMath.trendsPreviewImage,alt:"",className:"trends-cta blurred"}),wp.element.createElement("div",{id:"rank-math-pro-cta",className:"center"},wp.element.createElement("div",{className:"rank-math-cta-box blue-ticks width-50"},wp.element.createElement("h3",null,(0,e.__)("Track Keyword Trends","rank-math")),wp.element.createElement("ul",null,wp.element.createElement("li",null,(0,e.__)("Data fetched directly from Google","rank-math")),wp.element.createElement("li",null,(0,e.__)("Analyze search trends and compare keywords","rank-math")),wp.element.createElement("li",null,(0,e.__)("See data from a particular Country or timeframe","rank-math"))),wp.element.createElement("a",{className:"button button-primary is-green",href:rankMath.trendsUpgradeLink,rel:"noreferrer noopener",target:"_blank"},rankMath.trendsUpgradeLabel))))))}))),zt=(0,c.withFilters)("rankMath.analytics.contentAI")((function(){return!1})),Wt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{isLoaded:t.isLoaded(),isPillarContent:t.getPillarContent()}})),(0,t.withDispatch)((function(e){return{togglePillarContent:function(t){e("rank-math").updatePillarContent(t)}}})))((function(t){var n=t.isLoaded,a=t.isPillarContent,r=t.togglePillarContent;return n?wp.element.createElement(c.PanelBody,{initialOpen:!0,className:"rank-math-focus-keyword"},wp.element.createElement("h2",{className:"components-panel__body-title"},(0,e.__)("Focus Keyword","rank-math"),wp.element.createElement(qe,null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:re("score-100","General Focus Keyword"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Insert keywords you want to rank for. Try to {{link}}attain 100/100 points{{/link}} for better chances of ranking.","rank-math")))),wp.element.createElement(Vt,null),rankMath.currentEditor&&"classic"!==rankMath.currentEditor&&wp.element.createElement(zt,null),wp.element.createElement(Ke.Slot,null,(function(e){return e.length>0?e:[]})),wp.element.createElement("div",null,wp.element.createElement(Bt,null)),wp.element.createElement($e,null),"post"===rankMath.objectType&&wp.element.createElement(c.CheckboxControl,{className:"pillar-content",label:wp.element.createElement(i.Fragment,null,wp.element.createElement("strong",null,(0,e.__)("This post is Pillar Content","rank-math")),wp.element.createElement("a",{href:re("pillar-content-internal-linking","Pillar Content"),rel:"noreferrer",target:"_blank",className:"dashicons-before dashicons-editor-help rank-math-help-icon"})),checked:a,onChange:r})):null})),Gt=(0,c.createSlotFill)("RankMathAfterEditor"),Kt=Gt.Fill,$t=Gt.Slot,qt=function(e){var t=e.children,n=e.className;return wp.element.createElement(Kt,null,wp.element.createElement(c.PanelRow,{className:n},t))};qt.Slot=$t;var Yt=qt,Xt=(0,t.withDispatch)((function(e){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!0)}}}))((function(e){var t=e.toggleEditor;return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(ae,{onClick:t}),wp.element.createElement(De,null),wp.element.createElement(Yt.Slot,null,(function(e){return e.length>0?e:[]}))),wp.element.createElement(Wt,null),rankMath.canUser.analysis&&wp.element.createElement(Be,null))})),Jt=function(e,t,n){return!1===n?delete e[t]:e[t]=!0,e},Zt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math").getRobots();return{robots:t,isRobotIndex:"index"in t,isRobotNoIndex:"noindex"in t,isRobotNoFollow:"nofollow"in t,isRobotNoArchive:"noarchive"in t,isRobotNoImageIndex:"noimageindex"in t,isRobotNoSnippet:"nosnippet"in t}})),(0,t.withDispatch)((function(e,t){var n=t.robots;return{updateRobots:function(t,a){n=Jt(n,t,a),"index"===t&&(n=Jt(n,"noindex",!a)),"noindex"===t&&(n=Jt(n,"index",!a)),e("rank-math").updateRobots(n)}}})))((function(t){return wp.element.createElement(c.BaseControl,{className:"rank-math-robots",id:"rank-math-robots",label:(0,e.__)("Robots Meta","rank-math")},wp.element.createElement("div",{className:"rank-math-robots-list"},wp.element.createElement(c.CheckboxControl,{className:"robot-choice-index",label:wp.element.createElement(i.Fragment,null,(0,e.__)("Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Instructs search engines to index and show these pages in the search results","rank-math"))),checked:t.isRobotIndex,onChange:function(e){return t.updateRobots("index",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noindex",label:wp.element.createElement(i.Fragment,null,(0,e.__)("No Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents pages from being indexed and displayed in search engine result pages","rank-math"))),checked:t.isRobotNoIndex,onChange:function(e){return t.updateRobots("noindex",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-nofollow",label:wp.element.createElement(i.Fragment,null,(0,e.__)("Nofollow","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents search engines from following links on the pages","rank-math"))),checked:t.isRobotNoFollow,onChange:function(e){return t.updateRobots("nofollow",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noarchive",label:wp.element.createElement(i.Fragment,null,(0,e.__)("No Archive","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents search engines from showing Cached links for pages","rank-math"))),checked:t.isRobotNoArchive,onChange:function(e){return t.updateRobots("noarchive",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noimageindex",label:wp.element.createElement(i.Fragment,null,(0,e.__)("No Image Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("This option prevents images on a page from being indexed by Google and other search engines","rank-math"))),checked:t.isRobotNoImageIndex,onChange:function(e){return t.updateRobots("noimageindex",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-nosnippet",label:wp.element.createElement(i.Fragment,null,(0,e.__)("No Snippet","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents a snippet from being shown in the search results","rank-math"))),checked:t.isRobotNoSnippet,onChange:function(e){return t.updateRobots("nosnippet",e)}})))}));function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(n),!0).forEach((function(t){tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nn=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{redirectionID:t.getRedirectionID(),redirectionUrl:t.getRedirectionUrl(),redirectionType:t.getRedirectionType(),hasRedirect:t.hasRedirect()}})),(0,t.withDispatch)((function(e,t){return{toggle:function(){e("rank-math").updateHasRedirect(!t.hasRedirect),e("rank-math").updateRedirectionItem(en(en({},t),{},{hasRedirect:!t.hasRedirect}))},updateRedirection:function(n,a){e("rank-math").updateRedirection(n,a),e("rank-math").updateRedirectionItem(en(en({},t),{},tn({},n,a)))}}})))((function(t){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.ToggleControl,{className:t.hasRedirect?"is-open":"is-close",label:(0,e.__)("Redirect","rank-math"),checked:t.hasRedirect,onChange:function(){return t.toggle()}}),t.hasRedirect&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Redirection Type","rank-math"),className:t.hasRedirect?"":"hidden",value:t.redirectionType,onChange:function(e){return t.updateRedirection("redirectionType",e)},options:[{value:"301",label:(0,e.__)("301 Permanent Move","rank-math")},{value:"302",label:(0,e.__)("302 Temporary Move","rank-math")},{value:"307",label:(0,e.__)("307 Temporary Redirect","rank-math")},{value:"410",label:(0,e.__)("410 Content Deleted","rank-math")},{value:"451",label:(0,e.__)("451 Content Unavailable for Legal Reasons","rank-math")}]}),!1===["410","451"].includes(t.redirectionType)&&wp.element.createElement(c.TextControl,{type:"url",autoComplete:"off",label:(0,e.__)("Destination URL","rank-math"),value:t.redirectionUrl,placeholder:"https://rankmath.com/",className:t.hasRedirect?"":"hidden",onChange:function(e){return t.updateRedirection("redirectionUrl",e)}}),wp.element.createElement(c.TextControl,{type:"hidden",value:t.redirectionID,className:"hidden"}))})),an=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=rankMathEditor.assessor.dataCollector;return{placeholder:t.getCanonicalUrl()?t.getCanonicalUrl():n.getPermalink()?n.getPermalink():"https://rankmath.com/",canonicalUrl:t.getCanonicalUrl()}})),(0,t.withDispatch)((function(e){return{onUrlChange:function(t){e("rank-math").updateCanonicalUrl(t)}}})))((function(t){var n=t.canonicalUrl,a=t.placeholder,i=t.onUrlChange;return wp.element.createElement(c.BaseControl,{className:"rank-math-canonical"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Canonical URL","rank-math"),wp.element.createElement(qe,null,(0,e.__)("The canonical URL informs search crawlers which page is the main page if you have double content","rank-math"))),wp.element.createElement(c.TextControl,{type:"url",autoComplete:"off",value:n,placeholder:a,onChange:function(e){return i(e)}}))})),rn=(0,l.compose)((0,t.withSelect)((function(e){return{title:e("rank-math").getBreadcrumbTitle()}})),(0,t.withDispatch)((function(e){return{onTitleChange:function(t){e("rank-math").updateBreadcrumbTitle(t)}}})))((function(t){var n=t.title,a=t.onTitleChange;return wp.element.createElement(c.BaseControl,{className:"rank-math-breadcrumb-title"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Breadcrumb Title","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Breadcrumb Title to use for this post","rank-math"))),wp.element.createElement(c.TextControl,{value:n,onChange:function(e){return a(e)}}))}));function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){ln(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn={"max-snippet":-1,"max-video-preview":-1,"max-image-preview":"large"},pn=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math").getAdvancedRobots(),n=sn({},t);(0,s.defaults)(n,cn);var a=null,i=null,r=null;return"max-snippet"in t&&(a=n["max-snippet"]),"max-image-preview"in t&&(i=n["max-image-preview"]),"max-video-preview"in t&&(r=n["max-video-preview"]),{meta:t,isSnippet:a,isImage:i,isVideo:r,maxSnippet:a?n["max-snippet"]:-1,maxImage:n["max-image-preview"],maxVideo:r?n["max-video-preview"]:-1}})),(0,t.withDispatch)((function(e,t){var n=sn({},t.meta);return{updateRobots:function(t,a){(0,s.isBoolean)(a)?!1===a?delete n[t]:n[t]=cn[t]:n[t]=a,e("rank-math").updateAdvancedRobots(n)}}})))((function(t){return wp.element.createElement(c.BaseControl,{className:"rank-math-robots",id:"rank-math-robots",label:(0,e.__)("Advanced Robots Meta","rank-math")},wp.element.createElement("div",{className:"rank-math-robots-list advanced-robots"},wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(i.Fragment,null,(0,e.__)("Max Snippet","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum text-length, in characters, of a snippet for your page","rank-math"))),checked:t.isSnippet,onChange:function(e){return t.updateRobots("max-snippet",e)}}),wp.element.createElement(c.TextControl,{type:"number",value:t.maxSnippet,onChange:function(e){return t.updateRobots("max-snippet",e)}}),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(i.Fragment,null,(0,e.__)("Max Video Preview","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum duration in seconds of an animated video preview","rank-math"))),checked:t.isVideo,onChange:function(e){return t.updateRobots("max-video-preview",e)}}),wp.element.createElement(c.TextControl,{type:"number",value:t.maxVideo,onChange:function(e){return t.updateRobots("max-video-preview",e)}}),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(i.Fragment,null,(0,e.__)("Max Image Preview","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum size of image preview to be shown for images on this page","rank-math"))),checked:t.isImage,onChange:function(e){return t.updateRobots("max-image-preview",e)}}),wp.element.createElement(c.SelectControl,{value:t.maxImage,onChange:function(e){return t.updateRobots("max-image-preview",e)},options:[{value:"large",label:(0,e.__)("Large","rank-math")},{value:"standard",label:(0,e.__)("Standard","rank-math")},{value:"none",label:(0,e.__)("None","rank-math")}]})))})),dn=(0,l.compose)((0,t.withSelect)((function(e){return{showScore:e("rank-math").getShowScoreFrontend()}})),(0,t.withDispatch)((function(e){return{toggleScore:function(t){e("rank-math").toggleFrontendScore(t)}}})))((function(t){var n=t.showScore,a=t.toggleScore;return wp.element.createElement(c.BaseControl,{className:"rank-math-frontend-score"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Show SEO Score on Front-end","rank-math"),checked:n,onChange:a}))})),un=(0,c.createSlotFill)("RankMathAdvancedTab"),hn=un.Fill,mn=un.Slot,gn=function(e){var t=e.children,n=e.className;return wp.element.createElement(hn,null,wp.element.createElement(c.PanelRow,{className:n},t))};gn.Slot=mn;var fn=gn,wn=(0,c.withFilters)("rankMath.advanced.newsSitemap")((function(){return null})),vn=function(){return wp.element.createElement(i.Fragment,null,wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(Zt,null)),wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(pn,null)),wp.element.createElement(wn,null),wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(an,null)),rankMath.assessor.hasBreadcrumb&&wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(rn,null)),rankMath.assessor.hasRedirection&&wp.element.createElement(c.PanelBody,{initialOpen:!0,className:"rank-math-redirect"},wp.element.createElement(nn,null)),rankMath.frontEndScore&&wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(dn,null)),wp.element.createElement(fn.Slot,null,(function(e){return e.length>0?e:[]})))},yn=n(279),bn=n.n(yn),kn={init:function(){this.cacheProps(),this.initVars(),this.bindEvents()},cacheProps:function(){this.root=document.documentElement,this.$wpAdminbar=se()("#wpadminbar")},initVars:function(){this.$wpAdminbar.length&&this.setWpAdminbarHeight.call(this)},bindEvents:function(){window.addEventListener("resize",bn()(this.onWindowResize.bind(this)))},onWindowResize:function(){this.$wpAdminbar.length&&this.setWpAdminbarHeight.call(this)},setWpAdminbarHeight:function(){this.root.style.setProperty("--rankmath-wp-adminbar-height",this.$wpAdminbar.outerHeight()+"px")}};se()((function(){kn.init()}));var Tn=function(e){"social"===e&&(0,t.dispatch)("rank-math").toggleSnippetEditor(!0)},En=function(){return wp.element.createElement(_,{className:"rank-math-tabs",activeClass:"is-active",tabs:(t=[],rankMath.canUser.general&&t.push({name:"general",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-settings",title:(0,e.__)("General","rank-math")}),wp.element.createElement("span",null,(0,e.__)("General","rank-math"))),view:Xt,className:"rank-math-general-tab"}),rankMath.canUser.advanced&&t.push({name:"advanced",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-toolbox",title:(0,e.__)("Advanced","rank-math")}),wp.element.createElement("span",null,(0,e.__)("Advanced","rank-math"))),view:vn,className:"rank-math-advanced-tab"}),rankMath.canUser.social&&t.push({name:"social",title:wp.element.createElement(i.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-social",title:(0,e.__)("Social","rank-math")}),wp.element.createElement("span",null,(0,e.__)("Social","rank-math"))),view:Me,className:"rank-math-social-tab"}),(0,a.applyFilters)("rank_math_sidebar_tabs",t)),onSelect:Tn},(function(e){return wp.element.createElement("div",{className:"rank-math-tab-content-"+e.name},(0,i.createElement)(e.view))}));var t};(0,a.addAction)("rank_math_loaded","rank-math",(function(){(0,a.addFilter)("rank_math_app","rank-math",(function(){return En}))}))}()}();
1
+ !function(){var e={634:function(e){e.exports=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;a<arguments.length;a++){var r=null!=arguments[a]?arguments[a]:{};a%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=(e,t,n,a)=>(e=""+e,t=""+t,a&&(e=e.trim(),t=t.trim()),n?e==t:e.toLowerCase()==t.toLowerCase()),r=(e,t)=>e&&Array.isArray(e)&&e.map((e=>i(e,t)));function i(e,t){var n,a={};for(n in e)t.indexOf(n)<0&&(a[n]=e[n]);return a}function o(e){var t=document.createElement("div");return e.replace(/\&#?[0-9a-z]+;/gi,(function(e){return t.innerHTML=e,t.innerText}))}function s(e){return(new DOMParser).parseFromString(e.trim(),"text/html").body.firstElementChild}function l(e,t){for(t=t||"previous";e=e[t+"Sibling"];)if(3==e.nodeType)return e}function c(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/`|'/g,"&#039;"):e}function p(e){var t=Object.prototype.toString.call(e).split(" ")[1].slice(0,-1);return e===Object(e)&&"Array"!=t&&"Function"!=t&&"RegExp"!=t&&"HTMLUnknownElement"!=t}function d(e,t,n){function a(e,t){for(var n in t)if(t.hasOwnProperty(n)){if(p(t[n])){p(e[n])?a(e[n],t[n]):e[n]=Object.assign({},t[n]);continue}if(Array.isArray(t[n])){e[n]=Object.assign([],t[n]);continue}e[n]=t[n]}}return e instanceof Object||(e={}),a(e,t),n&&a(e,n),e}function u(){const e=[],t={};for(let n of arguments)for(let a of n)p(a)?t[a.value]||(e.push(a),t[a.value]=1):e.includes(a)||e.push(a);return e}function m(e){return String.prototype.normalize?"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:e}var h=()=>/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent);function g(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))}function f(e){return e&&e.classList&&e.classList.contains(this.settings.classNames.tag)}function w(e,t){var n=window.getSelection();return t=t||n.getRangeAt(0),"string"==typeof e&&(e=document.createTextNode(e)),t&&(t.deleteContents(),t.insertNode(e)),e}function v(e,t,n){return e?(t&&(e.__tagifyTagData=n?t:d({},e.__tagifyTagData||{},t)),e.__tagifyTagData):(console.warn("tag element doesn't exist",e,t),t)}var y={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:()=>{},trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,highlightFirst:!1,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:()=>Promise.resolve(),beforePaste:()=>Promise.resolve(),suggestionClick:()=>Promise.resolve()}};function b(){this.dropdown={};for(let e in this._dropdown)this.dropdown[e]="function"==typeof this._dropdown[e]?this._dropdown[e].bind(this):this._dropdown[e];this.dropdown.refs()}var k={refs(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},getHeaderRef(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},getFooterRef(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},getAllSuggestionsRefs(){return[...this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector)]},show(e){var t,n,r,i=this.settings,o="mix"==i.mode&&!i.enforceWhitelist,s=!i.whitelist||!i.whitelist.length,l="manual"==i.dropdown.position;if(e=void 0===e?this.state.inputText:e,!(s&&!o&&!i.templates.dropdownItemNoMatch||!1===i.dropdown.enable||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(e),e&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",e),i.templates.dropdownItemNoMatch&&(r=i.templates.dropdownItemNoMatch.call(this,{value:e}))),!r){if(this.suggestedListItems.length)e&&o&&!this.state.editing.scope&&!a(this.suggestedListItems[0].value,e)&&this.suggestedListItems.unshift({value:e});else{if(!e||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:e}]}n=""+(p(t=this.suggestedListItems[0])?t.value:t),i.autoComplete&&n&&0==n.indexOf(e)&&this.input.autocomplete.suggest.call(this,t)}this.dropdown.fill(r),i.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(i.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=e||!0,this.state.dropdown.query=e,this.setStateSelection(),l||setTimeout((()=>{this.dropdown.position(),this.dropdown.render()})),setTimeout((()=>{this.trigger("dropdown:show",this.DOM.dropdown)}))}},hide(e){var t=this.DOM,n=t.scope,a=t.dropdown,r="manual"==this.settings.dropdown.position&&!e;if(a&&document.body.contains(a)&&!r)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout((()=>{this.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},toggle(e){this.dropdown[this.state.dropdown.visible&&!e?"hide":"show"]()},render(){var e,t,n=((t=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(t),e=t.clientHeight,t.parentNode.removeChild(t),e),a=this.settings;return"number"==typeof a.dropdown.enabled&&a.dropdown.enabled>=0?(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(n),a.dropdown.appendTarget.appendChild(this.DOM.dropdown),setTimeout((()=>this.DOM.dropdown.classList.remove(a.classNames.dropdownInital)))),this):this},fill(e){e="string"==typeof e?e:this.dropdown.createListHTML(e||this.suggestedListItems);var t,n=this.settings.templates.dropdownContent.call(this,e);this.DOM.dropdown.content.innerHTML=(t=n)?t.replace(/\>[\r\n ]+\</g,"><").replace(/(<.*?>)|\s+/g,((e,t)=>t||" ")):""},fillHeaderFooter(){var e=this.dropdown.filterListItems(this.state.dropdown.query),t=this.parseTemplate("dropdownHeader",[e]),n=this.parseTemplate("dropdownFooter",[e]),a=this.dropdown.getHeaderRef(),r=this.dropdown.getFooterRef();t&&(null==a||a.parentNode.replaceChild(t,a)),n&&(null==r||r.parentNode.replaceChild(n,r))},refilter(e){e=e||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(e),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},position(e){var t=this.settings.dropdown;if("manual"!=t.position){var n,a,r,i,o,s,l=this.DOM.dropdown,c=t.placeAbove,p=t.appendTarget===document.body,d=p?window.pageYOffset:t.appendTarget.scrollTop,u=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,m=u.clientHeight,h=Math.max(u.clientWidth||0,window.innerWidth||0)>480?t.position:"all",g=this.DOM["input"==h?"input":"scope"];if(e=e||l.clientHeight,this.state.dropdown.visible){if("text"==h?(r=(n=function(){const e=document.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),n=t.startContainer,a=t.startOffset;let r,i;if(a>0)return i=document.createRange(),i.setStart(n,a-1),i.setEnd(n,a),r=i.getBoundingClientRect(),{left:r.right,top:r.top,bottom:r.bottom};if(n.getBoundingClientRect)return n.getBoundingClientRect()}return{left:-9999,top:-9999}}()).bottom,a=n.top,i=n.left,o="auto"):(s=function(e){for(var t=0,n=0;e&&e!=u;)t+=e.offsetLeft||0,n+=e.offsetTop||0,e=e.parentNode;return{left:t,top:n}}(t.appendTarget),a=(n=g.getBoundingClientRect()).top-s.top,r=n.bottom-1-s.top,i=n.left-s.left,o=n.width+"px"),!p){let e=function(){for(var e=0,n=t.appendTarget.parentNode;n;)e+=n.scrollTop||0,n=n.parentNode;return e}();a+=e,r+=e}a=Math.floor(a),r=Math.ceil(r),c=void 0===c?m-n.bottom<e:c,l.style.cssText="left:"+(i+window.pageXOffset)+"px; width:"+o+";"+(c?"top: "+(a+d)+"px":"top: "+(r+d)+"px"),l.setAttribute("placement",c?"top":"bottom"),l.setAttribute("position",h)}}},events:{binding(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t=this.dropdown.events.callbacks,n=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:t.onKeyDown.bind(this),onMouseOver:t.onMouseOver.bind(this),onMouseLeave:t.onMouseLeave.bind(this),onClick:t.onClick.bind(this),onScroll:t.onScroll.bind(this)},a=e?"addEventListener":"removeEventListener";"manual"!=this.settings.dropdown.position&&(document[a]("scroll",n.position,!0),window[a]("resize",n.position),window[a]("keydown",n.onKeyDown)),this.DOM.dropdown[a]("mouseover",n.onMouseOver),this.DOM.dropdown[a]("mouseleave",n.onMouseLeave),this.DOM.dropdown[a]("mousedown",n.onClick),this.DOM.dropdown.content[a]("scroll",n.onScroll)},callbacks:{onKeyDown(e){if(this.state.hasFocus&&!this.state.composing){var t=this.DOM.dropdown.querySelector(this.settings.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(t);switch(e.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":e.preventDefault();var a=this.dropdown.getAllSuggestionsRefs(),r="ArrowUp"==e.key||"Up"==e.key;t&&(t=this.dropdown.getNextOrPrevOption(t,!r)),t&&t.matches(this.settings.classNames.dropdownItemSelector)||(t=a[r?a.length-1:0]),this.dropdown.highlightOption(t,!0);break;case"Escape":case"Esc":this.dropdown.hide();break;case"ArrowRight":if(this.state.actions.ArrowLeft)return;case"Tab":if("mix"!=this.settings.mode&&t&&!this.settings.autoComplete.rightKey&&!this.state.editing){e.preventDefault();var i=this.dropdown.getMappedValue(n);return this.input.autocomplete.set.call(this,i),!1}return!0;case"Enter":e.preventDefault(),this.settings.hooks.suggestionClick(e,{tagify:this,tagData:n,suggestionElm:t}).then((()=>{if(t)return this.dropdown.selectOption(t),t=this.dropdown.getNextOrPrevOption(t,!r),void this.dropdown.highlightOption(t);this.dropdown.hide(),"mix"!=this.settings.mode&&this.addTags(this.state.inputText.trim(),!0)})).catch((e=>e));break;case"Backspace":{if("mix"==this.settings.mode||this.state.editing.scope)return;const e=this.input.raw.call(this);""!=e&&8203!=e.charCodeAt(0)||(!0===this.settings.backspace?this.removeTags():"edit"==this.settings.backspace&&setTimeout(this.editTag.bind(this),0))}}}},onMouseOver(e){var t=e.target.closest(this.settings.classNames.dropdownItemSelector);t&&this.dropdown.highlightOption(t)},onMouseLeave(e){this.dropdown.highlightOption()},onClick(e){if(0==e.button&&e.target!=this.DOM.dropdown&&e.target!=this.DOM.dropdown.content){var t=e.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(t);this.state.actions.selectOption=!0,setTimeout((()=>this.state.actions.selectOption=!1),50),this.settings.hooks.suggestionClick(e,{tagify:this,tagData:n,suggestionElm:t}).then((()=>{t?this.dropdown.selectOption(t,e):this.dropdown.hide()})).catch((e=>console.warn(e)))}},onScroll(e){var t=e.target,n=t.scrollTop/(t.scrollHeight-t.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(n)})}}},getSuggestionDataByNode(e){var t=e&&e.getAttribute("value");return this.suggestedListItems.find((e=>e.value==t))||null},getNextOrPrevOption(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n=this.dropdown.getAllSuggestionsRefs(),a=n.findIndex((t=>t===e));return t?n[a+1]:n[a-1]},highlightOption(e,t){var n,a=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(a),this.state.ddItemElm.removeAttribute("aria-selected")),!e)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);n=this.dropdown.getSuggestionDataByNode(e),this.state.ddItemData=n,this.state.ddItemElm=e,e.classList.add(a),e.setAttribute("aria-selected",!0),t&&(e.parentNode.scrollTop=e.clientHeight+e.offsetTop-e.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,n),this.dropdown.position())},selectOption(e,t){var n=this.settings.dropdown,a=n.clearOnSelect,r=n.closeOnSelect;if(!e)return this.addTags(this.state.inputText,!0),void(r&&this.dropdown.hide());t=t||{};var i=e.getAttribute("value"),o="noMatch"==i,s=this.suggestedListItems.find((e=>(e.value||e)==i));this.trigger("dropdown:select",{data:s,elm:e,event:t}),i&&(s||o)?(this.state.editing?this.onEditTagDone(null,d({__isValid:!0},this.normalizeTags([s])[0])):this["mix"==this.settings.mode?"addMixTags":"addTags"]([s||this.input.raw.call(this)],a),this.DOM.input.parentNode&&(setTimeout((()=>{this.DOM.input.focus(),this.toggleFocusClass(!0),this.setRangeAtStartEnd(!1,this.DOM.input)})),r&&setTimeout(this.dropdown.hide.bind(this)),e.addEventListener("transitionend",(()=>{this.dropdown.fillHeaderFooter(),setTimeout((()=>e.remove()),100)}),{once:!0}),e.classList.add(this.settings.classNames.dropdownItemHidden))):r&&setTimeout(this.dropdown.hide.bind(this))},selectAll(e){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var t=this.dropdown.filterListItems("");return e||(t=this.state.dropdown.suggestions),this.addTags(t,!0),this},filterListItems(e,t){var n,a,r,i,o,s=this.settings,l=s.dropdown,c=(t=t||{},[]),d=[],u=s.whitelist,h=l.maxItems>=0?l.maxItems:1/0,g=l.searchKeys,f=0;if(!(e="select"==s.mode&&this.value.length&&this.value[0][s.tagTextProp]==e?"":e)||!g.length)return c=l.includeSelectedTags?u:u.filter((e=>!this.isTagDuplicate(p(e)?e.value:e))),this.state.dropdown.suggestions=c,c.slice(0,h);function w(e,t){return t.toLowerCase().split(" ").every((t=>e.includes(t.toLowerCase())))}for(o=l.caseSensitive?""+e:(""+e).toLowerCase();f<u.length;f++){let e,s;n=u[f]instanceof Object?u[f]:{value:u[f]};let h=Object.keys(n).some((e=>g.includes(e)))?g:["value"];l.fuzzySearch&&!t.exact?(r=h.reduce(((e,t)=>e+" "+(n[t]||"")),"").toLowerCase().trim(),l.accentedSearch&&(r=m(r),o=m(o)),e=0==r.indexOf(o),s=r===o,a=w(r,o)):(e=!0,a=h.some((e=>{var a=""+(n[e]||"");return l.accentedSearch&&(a=m(a),o=m(o)),l.caseSensitive||(a=a.toLowerCase()),s=a===o,t.exact?a===o:0==a.indexOf(o)}))),i=!l.includeSelectedTags&&this.isTagDuplicate(p(n)?n.value:n),a&&!i&&(s&&e?d.push(n):"startsWith"==l.sortby&&e?c.unshift(n):c.push(n))}return this.state.dropdown.suggestions=d.concat(c),"function"==typeof l.sortby?l.sortby(d.concat(c),o):d.concat(c).slice(0,h)},getMappedValue(e){var t=this.settings.dropdown.mapValueTo;return t?"function"==typeof t?t(e):e[t]||e.value:e.value},createListHTML(e){return d([],e).map(((e,n)=>{"string"!=typeof e&&"number"!=typeof e||(e={value:e});var a=this.dropdown.getMappedValue(e);return a="string"==typeof a?c(a):a,this.settings.templates.dropdownItem.apply(this,[t(t({},e),{},{mappedValue:a}),this])})).join("")}};const T="@yaireo/tagify/";var E,_={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},O={wrapper:(e,t)=>`<tags class="${t.classNames.namespace} ${t.mode?`${t.classNames[t.mode+"Mode"]}`:""} ${e.className}"\n ${t.readonly?"readonly":""}\n ${t.disabled?"disabled":""}\n ${t.required?"required":""}\n ${"select"===t.mode?"spellcheck='false'":""}\n tabIndex="-1">\n <span ${!t.readonly&&t.userInput?"contenteditable":""} tabIndex="0" data-placeholder="${t.placeholder||"&#8203;"}" aria-placeholder="${t.placeholder||""}"\n class="${t.classNames.input}"\n role="textbox"\n aria-autocomplete="both"\n aria-multiline="${"mix"==t.mode}"></span>\n &#8203;\n </tags>`,tag(e,t){let n=t.settings;return`<tag title="${e.title||e.value}"\n contenteditable='false'\n spellcheck='false'\n tabIndex="${n.a11y.focusableTags?0:-1}"\n class="${n.classNames.tag} ${e.class||""}"\n ${this.getAttributes(e)}>\n <x title='' class="${n.classNames.tagX}" role='button' aria-label='remove tag'></x>\n <div>\n <span class="${n.classNames.tagText}">${e[n.tagTextProp]||e.value}</span>\n </div>\n </tag>`},dropdown(e){var t=e.dropdown,n="manual"==t.position,a=`${e.classNames.dropdown}`;return`<div class="${n?"":a} ${t.classname}" role="listbox" aria-labelledby="dropdown">\n <div data-selector='tagify-suggestions-wrapper' class="${e.classNames.dropdownWrapper}"></div>\n </div>`},dropdownContent(e){var t=this.settings,n=this.state.dropdown.suggestions;return`\n ${t.templates.dropdownHeader.call(this,n)}\n ${e}\n ${t.templates.dropdownFooter.call(this,n)}\n `},dropdownItem(e){return`<div ${this.getAttributes(e)}\n class='${this.settings.classNames.dropdownItem} ${e.class?e.class:""}'\n tabindex="0"\n role="option">${e.mappedValue||e.value}</div>`},dropdownHeader(e){return`<header data-selector='tagify-suggestions-header' class="${this.settings.classNames.dropdownHeader}"></header>`},dropdownFooter(e){var t=e.length-this.settings.dropdown.maxItems;return t>0?`<footer data-selector='tagify-suggestions-footer' class="${this.settings.classNames.dropdownFooter}">\n ${t} more items. Refine your search.\n </footer>`:""},dropdownItemNoMatch:null},x={customBinding(){this.customEventsList.forEach((e=>{this.on(e,this.settings.callbacks[e])}))},binding(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t,n=this.events.callbacks,a=e?"addEventListener":"removeEventListener";if(!this.state.mainEvents||!e){for(var r in this.state.mainEvents=e,e&&!this.listeners.main&&(this.events.bindGlobal.call(this),this.settings.isJQueryPlugin&&jQuery(this.DOM.originalInput).on("tagify.removeAllTags",this.removeAllTags.bind(this))),t=this.listeners.main=this.listeners.main||{focus:["input",n.onFocusBlur.bind(this)],keydown:["input",n.onKeydown.bind(this)],click:["scope",n.onClickScope.bind(this)],dblclick:["scope",n.onDoubleClickScope.bind(this)],paste:["input",n.onPaste.bind(this)],drop:["input",n.onDrop.bind(this)],compositionstart:["input",n.onCompositionStart.bind(this)],compositionend:["input",n.onCompositionEnd.bind(this)]})this.DOM[t[r][0]][a](r,t[r][1]);clearInterval(this.listeners.main.originalInputValueObserverInterval),this.listeners.main.originalInputValueObserverInterval=setInterval(n.observeOriginalInputValue.bind(this),500);var i=this.listeners.main.inputMutationObserver||new MutationObserver(n.onInputDOMChange.bind(this));i&&i.disconnect(),"mix"==this.settings.mode&&i.observe(this.DOM.input,{childList:!0})}},bindGlobal(e){var t,n=this.events.callbacks,a=e?"removeEventListener":"addEventListener";if(e||!this.listeners.global)for(t of(this.listeners.global=this.listeners&&this.listeners.global||[{type:this.isIE?"keydown":"input",target:this.DOM.input,cb:n[this.isIE?"onInputIE":"onInput"].bind(this)},{type:"keydown",target:window,cb:n.onWindowKeyDown.bind(this)},{type:"blur",target:this.DOM.input,cb:n.onFocusBlur.bind(this)}],this.listeners.global))t.target[a](t.type,t.cb)},unbindGlobal(){this.events.bindGlobal.call(this,!0)},callbacks:{onFocusBlur(e){var t,n,a=this.settings,r=e.target?this.trim(e.target.textContent):"",i=null===(t=this.value)||void 0===t||null===(n=t[0])||void 0===n?void 0:n[a.tagTextProp],o=e.type,s=a.dropdown.enabled>=0,l={relatedTarget:e.relatedTarget},c=this.state.actions.selectOption&&(s||!a.dropdown.closeOnSelect),p=this.state.actions.addNew&&s,d=e.relatedTarget&&f.call(this,e.relatedTarget)&&this.DOM.scope.contains(e.relatedTarget);if("blur"==o){if(e.relatedTarget===this.DOM.scope)return this.dropdown.hide(),void this.DOM.input.focus();this.postUpdate(),a.onChangeAfterBlur&&this.triggerChangeEvent()}if(!c&&!p)if(this.state.hasFocus="focus"==o&&+new Date,this.toggleFocusClass(this.state.hasFocus),"mix"!=a.mode){if("focus"==o)return this.trigger("focus",l),void(0!==a.dropdown.enabled&&a.userInput||this.dropdown.show(this.value.length?"":void 0));"blur"==o&&(this.trigger("blur",l),this.loading(!1),"select"==a.mode&&(d&&(this.removeTags(),r=""),i===r&&(r="")),r&&!this.state.actions.selectOption&&a.addTagOnBlur&&this.addTags(r,!0)),this.DOM.input.removeAttribute("style"),this.dropdown.hide()}else"focus"==o?this.trigger("focus",l):"blur"==e.type&&(this.trigger("blur",l),this.loading(!1),this.dropdown.hide(),this.state.dropdown.visible=void 0,this.setStateSelection())},onCompositionStart(e){this.state.composing=!0},onCompositionEnd(e){this.state.composing=!1},onWindowKeyDown(e){var t,n=document.activeElement;if(f.call(this,n)&&this.DOM.scope.contains(document.activeElement))switch(t=n.nextElementSibling,e.key){case"Backspace":this.settings.readonly||(this.removeTags(n),(t||this.DOM.input).focus());break;case"Enter":setTimeout(this.editTag.bind(this),0,n)}},onKeydown(e){var t=this.settings;if(!this.state.composing&&t.userInput){"select"==t.mode&&t.enforceWhitelist&&this.value.length&&"Tab"!=e.key&&e.preventDefault();var n=this.trim(e.target.textContent);if(this.trigger("keydown",{event:e}),"mix"==t.mode){switch(e.key){case"Left":case"ArrowLeft":this.state.actions.ArrowLeft=!0;break;case"Delete":case"Backspace":if(this.state.editing)return;var a,r,i,s=document.getSelection(),c="Delete"==e.key&&s.anchorOffset==(s.anchorNode.length||0),p=s.anchorNode.previousSibling,d=1==s.anchorNode.nodeType||!s.anchorOffset&&p&&1==p.nodeType&&s.anchorNode.previousSibling,u=o(this.DOM.input.innerHTML),m=this.getTagElms();if("edit"==t.backspace&&d)return a=1==s.anchorNode.nodeType?null:s.anchorNode.previousElementSibling,setTimeout(this.editTag.bind(this),0,a),void e.preventDefault();if(h()&&d)return i=l(d),d.hasAttribute("readonly")||d.remove(),this.DOM.input.focus(),void setTimeout((()=>{this.placeCaretAfterNode(i),this.DOM.input.click()}));if("BR"==s.anchorNode.nodeName)return;if((c||d)&&1==s.anchorNode.nodeType?r=0==s.anchorOffset?c?m[0]:null:m[Math.min(m.length,s.anchorOffset)-1]:c?r=s.anchorNode.nextElementSibling:d&&(r=d),3==s.anchorNode.nodeType&&!s.anchorNode.nodeValue&&s.anchorNode.previousElementSibling&&e.preventDefault(),(d||c)&&!t.backspace)return void e.preventDefault();if("Range"!=s.type&&!s.anchorOffset&&s.anchorNode==this.DOM.input&&"Delete"!=e.key)return void e.preventDefault();if("Range"!=s.type&&r&&r.hasAttribute("readonly"))return void this.placeCaretAfterNode(l(r));clearTimeout(E),E=setTimeout((()=>{var e=document.getSelection(),t=o(this.DOM.input.innerHTML),n=!c&&e.anchorNode.previousSibling;if(t.length>=u.length&&n)if(f.call(this,n)&&!n.hasAttribute("readonly")){if(this.removeTags(n),this.fixFirefoxLastTagNoCaret(),2==this.DOM.input.children.length&&"BR"==this.DOM.input.children[1].tagName)return this.DOM.input.innerHTML="",this.value.length=0,!0}else n.remove();this.value=[].map.call(m,((e,t)=>{var n=v(e);if(e.parentNode||n.readonly)return n;this.trigger("remove",{tag:e,index:t,data:n})})).filter((e=>e))}),20)}return!0}switch(e.key){case"Backspace":"select"==t.mode&&t.enforceWhitelist&&this.value.length?this.removeTags():this.state.dropdown.visible&&"manual"!=t.dropdown.position||""!=e.target.textContent&&8203!=n.charCodeAt(0)||(!0===t.backspace?this.removeTags():"edit"==t.backspace&&setTimeout(this.editTag.bind(this),0));break;case"Esc":case"Escape":if(this.state.dropdown.visible)return;e.target.blur();break;case"Down":case"ArrowDown":this.state.dropdown.visible||this.dropdown.show();break;case"ArrowRight":{let e=this.state.inputSuggestion||this.state.ddItemData;if(e&&t.autoComplete.rightKey)return void this.addTags([e],!0);break}case"Tab":{let a="select"==t.mode;if(!n||a)return!0;e.preventDefault()}case"Enter":if(this.state.dropdown.visible&&"manual"!=t.dropdown.position)return;e.preventDefault(),setTimeout((()=>{this.state.actions.selectOption||this.addTags(n,!0)}))}}},onInput(e){this.postUpdate();var t=this.settings;if("mix"==t.mode)return this.events.callbacks.onMixTagsInput.call(this,e);var n=this.input.normalize.call(this),a=n.length>=t.dropdown.enabled,r={value:n,inputElm:this.DOM.input},i=this.validateTag({value:n});"select"==t.mode&&this.toggleScopeValidation(i),r.isValid=i,this.state.inputText!=n&&(this.input.set.call(this,n,!1),-1!=n.search(t.delimiters)?this.addTags(n)&&this.input.set.call(this):t.dropdown.enabled>=0&&this.dropdown[a?"show":"hide"](n),this.trigger("input",r))},onMixTagsInput(e){var t,n,a,r,i,o,s,l,c=this.settings,p=this.value.length,u=this.getTagElms(),m=document.createDocumentFragment(),g=window.getSelection().getRangeAt(0),f=[].map.call(u,(e=>v(e).value));if("deleteContentBackward"==e.inputType&&h()&&this.events.callbacks.onKeydown.call(this,{target:e.target,key:"Backspace"}),this.value.slice().forEach((e=>{e.readonly&&!f.includes(e.value)&&m.appendChild(this.createTagElem(e))})),m.childNodes.length&&(g.insertNode(m),this.setRangeAtStartEnd(!1,m.lastChild)),u.length!=p)return this.value=[].map.call(this.getTagElms(),(e=>v(e))),void this.update({withoutChangeEvent:!0});if(this.hasMaxTags())return!0;if(window.getSelection&&(o=window.getSelection()).rangeCount>0&&3==o.anchorNode.nodeType){if((g=o.getRangeAt(0).cloneRange()).collapse(!0),g.setStart(o.focusNode,0),a=(t=g.toString().slice(0,g.endOffset)).split(c.pattern).length-1,(n=t.match(c.pattern))&&(r=t.slice(t.lastIndexOf(n[n.length-1]))),r){if(this.state.actions.ArrowLeft=!1,this.state.tag={prefix:r.match(c.pattern)[0],value:r.replace(c.pattern,"")},this.state.tag.baseOffset=o.baseOffset-this.state.tag.value.length,l=this.state.tag.value.match(c.delimiters))return this.state.tag.value=this.state.tag.value.replace(c.delimiters,""),this.state.tag.delimiters=l[0],this.addTags(this.state.tag.value,c.dropdown.clearOnSelect),void this.dropdown.hide();i=this.state.tag.value.length>=c.dropdown.enabled;try{s=(s=this.state.flaggedTags[this.state.tag.baseOffset]).prefix==this.state.tag.prefix&&s.value[0]==this.state.tag.value[0],this.state.flaggedTags[this.state.tag.baseOffset]&&!this.state.tag.value&&delete this.state.flaggedTags[this.state.tag.baseOffset]}catch(e){}(s||a<this.state.mixMode.matchedPatternCount)&&(i=!1)}else this.state.flaggedTags={};this.state.mixMode.matchedPatternCount=a}setTimeout((()=>{this.update({withoutChangeEvent:!0}),this.trigger("input",d({},this.state.tag,{textContent:this.DOM.input.textContent})),this.state.tag&&this.dropdown[i?"show":"hide"](this.state.tag.value)}),10)},onInputIE(e){var t=this;setTimeout((function(){t.events.callbacks.onInput.call(t,e)}))},observeOriginalInputValue(){this.DOM.originalInput.parentNode||this.destroy(),this.DOM.originalInput.value!=this.DOM.originalInput.tagifyValue&&this.loadOriginalValues()},onClickScope(e){var t=this.settings,n=e.target.closest("."+t.classNames.tag),a=+new Date-this.state.hasFocus;if(e.target!=this.DOM.scope){if(!e.target.classList.contains(t.classNames.tagX))return n?(this.trigger("click",{tag:n,index:this.getNodeIndex(n),data:v(n),event:e}),void(1!==t.editTags&&1!==t.editTags.clicks||this.events.callbacks.onDoubleClickScope.call(this,e))):void(e.target==this.DOM.input&&("mix"==t.mode&&this.fixFirefoxLastTagNoCaret(),a>500)?this.state.dropdown.visible?this.dropdown.hide():0===t.dropdown.enabled&&"mix"!=t.mode&&this.dropdown.show(this.value.length?"":void 0):"select"!=t.mode||0!==t.dropdown.enabled||this.state.dropdown.visible||this.dropdown.show());this.removeTags(e.target.parentNode)}else this.state.hasFocus||this.DOM.input.focus()},onPaste(e){e.preventDefault();var t,n,a=this.settings;if("select"==a.mode&&a.enforceWhitelist||!a.userInput)return!1;a.readonly||(t=e.clipboardData||window.clipboardData,n=t.getData("Text"),a.hooks.beforePaste(e,{tagify:this,pastedText:n,clipboardData:t}).then((t=>{void 0===t&&(t=n),t&&(this.injectAtCaret(t,window.getSelection().getRangeAt(0)),"mix"==this.settings.mode?this.events.callbacks.onMixTagsInput.call(this,e):this.settings.pasteAsTags?this.addTags(this.state.inputText+t,!0):this.state.inputText=t)})).catch((e=>e)))},onDrop(e){e.preventDefault()},onEditTagInput(e,t){var n=e.closest("."+this.settings.classNames.tag),a=this.getNodeIndex(n),r=v(n),i=this.input.normalize.call(this,e),o={[this.settings.tagTextProp]:i,__tagId:r.__tagId},s=this.validateTag(o);this.editTagChangeDetected(d(r,o))||!0!==e.originalIsValid||(s=!0),n.classList.toggle(this.settings.classNames.tagInvalid,!0!==s),r.__isValid=s,n.title=!0===s?r.title||r.value:s,i.length>=this.settings.dropdown.enabled&&(this.state.editing&&(this.state.editing.value=i),this.dropdown.show(i)),this.trigger("edit:input",{tag:n,index:a,data:d({},this.value[a],{newValue:i}),event:t})},onEditTagPaste(e,t){var n=(t.clipboardData||window.clipboardData).getData("Text");t.preventDefault();var a=w(n);this.setRangeAtStartEnd(!1,a)},onEditTagFocus(e){this.state.editing={scope:e,input:e.querySelector("[contenteditable]")}},onEditTagBlur(e){if(this.state.hasFocus||this.toggleFocusClass(),this.DOM.scope.contains(e)){var t,n,a=this.settings,r=e.closest("."+a.classNames.tag),i=this.input.normalize.call(this,e),o=v(r),s=o.__originalData,l=this.editTagChangeDetected(o),c=this.validateTag({[a.tagTextProp]:i,__tagId:o.__tagId});if(i)if(l){if(t=this.hasMaxTags(),n=d({},s,{[a.tagTextProp]:this.trim(i),__isValid:c}),a.transformTag.call(this,n,s),!0!==(c=(!t||!0===s.__isValid)&&this.validateTag(n))){if(this.trigger("invalid",{data:n,tag:r,message:c}),a.editTags.keepInvalid)return;a.keepInvalidTags?n.__isValid=c:n=s}else a.keepInvalidTags&&(delete n.title,delete n["aria-invalid"],delete n.class);this.onEditTagDone(r,n)}else this.onEditTagDone(r,s);else this.onEditTagDone(r)}},onEditTagkeydown(e,t){if(!this.state.composing)switch(this.trigger("edit:keydown",{event:e}),e.key){case"Esc":case"Escape":t.parentNode.replaceChild(t.__tagifyTagData.__originalHTML,t),this.state.editing=!1;case"Enter":case"Tab":e.preventDefault(),e.target.blur()}},onDoubleClickScope(e){var t,n,a=e.target.closest("."+this.settings.classNames.tag),r=v(a),i=this.settings;a&&i.userInput&&!1!==r.editable&&(t=a.classList.contains(this.settings.classNames.tagEditing),n=a.hasAttribute("readonly"),"select"==i.mode||i.readonly||t||n||!this.settings.editTags||this.editTag(a),this.toggleFocusClass(!0),this.trigger("dblclick",{tag:a,index:this.getNodeIndex(a),data:v(a)}))},onInputDOMChange(e){e.forEach((e=>{e.addedNodes.forEach((e=>{if("<div><br></div>"==e.outerHTML)e.replaceWith(document.createElement("br"));else if(1==e.nodeType&&e.querySelector(this.settings.classNames.tagSelector)){let t=document.createTextNode("");3==e.childNodes[0].nodeType&&"BR"!=e.previousSibling.nodeName&&(t=document.createTextNode("\n")),e.replaceWith(t,...[...e.childNodes].slice(0,-1)),this.placeCaretAfterNode(t)}else if(f.call(this,e)){var t;if(3!=(null===(t=e.previousSibling)||void 0===t?void 0:t.nodeType)||e.previousSibling.textContent||e.previousSibling.remove(),e.previousSibling&&"BR"==e.previousSibling.nodeName){e.previousSibling.replaceWith("\n​");let t=e.nextSibling,n="";for(;t;)n+=t.textContent,t=t.nextSibling;n.trim()&&this.placeCaretAfterNode(e.previousSibling)}}})),e.removedNodes.forEach((e=>{e&&"BR"==e.nodeName&&f.call(this,t)&&(this.removeTags(t),this.fixFirefoxLastTagNoCaret())}))}));var t=this.DOM.input.lastChild;t&&""==t.nodeValue&&t.remove(),t&&"BR"==t.nodeName||this.DOM.input.appendChild(document.createElement("br"))}}};function C(e,t){if(!e){console.warn("Tagify:","input element not found",e);const t=new Proxy(this,{get:()=>()=>t});return t}if(e.__tagify)return console.warn("Tagify: ","input element is already Tagified - Same instance is returned.",e),e.__tagify;var n;d(this,function(e){var t=document.createTextNode("");function n(e,n,a){a&&n.split(/\s+/g).forEach((n=>t[e+"EventListener"].call(t,n,a)))}return{off(e,t){return n("remove",e,t),this},on(e,t){return t&&"function"==typeof t&&n("add",e,t),this},trigger(n,a,r){var i;if(r=r||{cloneData:!0},n)if(e.settings.isJQueryPlugin)"remove"==n&&(n="removeTag"),jQuery(e.DOM.originalInput).triggerHandler(n,[a]);else{try{var o="object"==typeof a?a:{value:a};if((o=r.cloneData?d({},o):o).tagify=this,a.event&&(o.event=this.cloneEvent(a.event)),a instanceof Object)for(var s in a)a[s]instanceof HTMLElement&&(o[s]=a[s]);i=new CustomEvent(n,{detail:o})}catch(e){console.warn(e)}t.dispatchEvent(i)}}}}(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,t=t||{},this.getPersistedData=(n=t.id,e=>{let t,a="/"+e;if(1==localStorage.getItem(T+n+"/v",1))try{t=JSON.parse(localStorage[T+n+a])}catch(e){}return t}),this.setPersistedData=(e=>e?(localStorage.setItem(T+e+"/v",1),(t,n)=>{let a="/"+n,r=JSON.stringify(t);t&&n&&(localStorage.setItem(T+e+a,r),dispatchEvent(new Event("storage")))}):()=>{})(t.id),this.clearPersistedData=(e=>t=>{const n=T+"/"+e+"/";if(t)localStorage.removeItem(n+t);else for(let e in localStorage)e.includes(n)&&localStorage.removeItem(e)})(t.id),this.applySettings(e,t),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(e),b.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),e.autofocus&&this.DOM.input.focus(),e.__tagify=this}return C.prototype={_dropdown:k,helpers:{sameStr:a,removeCollectionProp:r,omit:i,isObject:p,parseHTML:s,escapeHTML:c,extend:d,concatWithoutDups:u,getUID:g,isNodeTag:f},customEventsList:["change","add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim(e){return this.settings.trim&&e&&"string"==typeof e?e.trim():e},parseHTML:s,templates:O,parseTemplate(e,t){return s((e=this.settings.templates[e]||e).apply(this,t))},set whitelist(e){const t=e&&Array.isArray(e);this.settings.whitelist=t?e:[],this.setPersistedData(t?e:[],"whitelist")},get whitelist(){return this.settings.whitelist},generateClassSelectors(e){for(let t in e){let n=t;Object.defineProperty(e,n+"Selector",{get(){return"."+this[n].split(" ")[0]}})}},applySettings(e,n){var a,r;y.templates=this.templates;var i=this.settings=d({},y,n);if(i.disabled=e.hasAttribute("disabled"),i.readonly=i.readonly||e.hasAttribute("readonly"),i.placeholder=c(e.getAttribute("placeholder")||i.placeholder||""),i.required=e.hasAttribute("required"),this.generateClassSelectors(i.classNames),void 0===i.dropdown.includeSelectedTags&&(i.dropdown.includeSelectedTags=i.duplicates),this.isIE&&(i.autoComplete=!1),["whitelist","blacklist"].forEach((t=>{var n=e.getAttribute("data-"+t);n&&(n=n.split(i.delimiters))instanceof Array&&(i[t]=n)})),"autoComplete"in n&&!p(n.autoComplete)&&(i.autoComplete=y.autoComplete,i.autoComplete.enabled=n.autoComplete),"mix"==i.mode&&(i.autoComplete.rightKey=!0,i.delimiters=n.delimiters||null,i.tagTextProp&&!i.dropdown.searchKeys.includes(i.tagTextProp)&&i.dropdown.searchKeys.push(i.tagTextProp)),e.pattern)try{i.pattern=new RegExp(e.pattern)}catch(e){}if(i.delimiters){i._delimiters=i.delimiters;try{i.delimiters=new RegExp(this.settings.delimiters,"g")}catch(e){}}i.disabled&&(i.userInput=!1),this.TEXTS=t(t({},_),i.texts||{}),("select"!=i.mode||null!==(a=n.dropdown)&&void 0!==a&&a.enabled)&&i.userInput||(i.dropdown.enabled=0),i.dropdown.appendTarget=(null===(r=n.dropdown)||void 0===r?void 0:r.appendTarget)||document.body;let o=this.getPersistedData("whitelist");Array.isArray(o)&&(this.whitelist=Array.isArray(i.whitelist)?u(i.whitelist,o):o)},getAttributes(e){var t,n=this.getCustomAttributes(e),a="";for(t in n)a+=" "+t+(void 0!==e[t]?`="${n[t]}"`:"");return a},getCustomAttributes(e){if(!p(e))return"";var t,n={};for(t in e)"__"!=t.slice(0,2)&&"class"!=t&&e.hasOwnProperty(t)&&void 0!==e[t]&&(n[t]=c(e[t]));return n},setStateSelection(){var e=window.getSelection(),t={anchorOffset:e.anchorOffset,anchorNode:e.anchorNode,range:e.getRangeAt&&e.rangeCount&&e.getRangeAt(0)};return this.state.selection=t,t},getCSSVars(){var e,t=getComputedStyle(this.DOM.scope,null);this.CSSVars={tagHideTransition:(e=>{let t=e.value;return"s"==e.unit?1e3*t:t})(function(e){if(!e)return{};var t=(e=e.trim().split(" ")[0]).split(/\d+/g).filter((e=>e)).pop().trim();return{value:+e.split(t).filter((e=>e))[0].trim(),unit:t}}((e="tag-hide-transition",t.getPropertyValue("--"+e))))}},build(e){var t=this.DOM;this.settings.mixMode.integrated?(t.originalInput=null,t.scope=e,t.input=e):(t.originalInput=e,t.originalInput_tabIndex=e.tabIndex,t.scope=this.parseTemplate("wrapper",[e,this.settings]),t.input=t.scope.querySelector(this.settings.classNames.inputSelector),e.parentNode.insertBefore(t.scope,e),e.tabIndex=-1)},destroy(){this.events.unbindGlobal.call(this),this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.DOM.originalInput.tabIndex=this.DOM.originalInput_tabIndex,delete this.DOM.originalInput.__tagify,this.dropdown.hide(!0),clearTimeout(this.dropdownHide__bindEventsTimeout),clearInterval(this.listeners.main.originalInputValueObserverInterval)},loadOriginalValues(e){var t,n=this.settings;if(this.state.blockChangeEvent=!0,void 0===e){const t=this.getPersistedData("value");e=t&&!this.DOM.originalInput.value?t:n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value}if(this.removeAllTags(),e)if("mix"==n.mode)this.parseMixTags(e),(t=this.DOM.input.lastChild)&&"BR"==t.tagName||this.DOM.input.insertAdjacentHTML("beforeend","<br>");else{try{JSON.parse(e)instanceof Array&&(e=JSON.parse(e))}catch(e){}this.addTags(e,!0).forEach((e=>e&&e.classList.add(n.classNames.tagNoAnimation)))}else this.postUpdate();this.state.lastOriginalValueReported=n.mixMode.integrated?"":this.DOM.originalInput.value,this.state.blockChangeEvent=!1},cloneEvent(e){var t={};for(var n in e)"path"!=n&&(t[n]=e[n]);return t},loading(e){return this.state.isLoading=e,this.DOM.scope.classList[e?"add":"remove"](this.settings.classNames.scopeLoading),this},tagLoading(e,t){return e&&e.classList[t?"add":"remove"](this.settings.classNames.tagLoading),this},toggleClass(e,t){"string"==typeof e&&this.DOM.scope.classList.toggle(e,t)},toggleScopeValidation(e){var t=!0===e||void 0===e;!this.settings.required&&e&&e===this.TEXTS.empty&&(t=!0),this.toggleClass(this.settings.classNames.tagInvalid,!t),this.DOM.scope.title=t?"":e},toggleFocusClass(e){this.toggleClass(this.settings.classNames.focus,!!e)},triggerChangeEvent:function(){if(!this.settings.mixMode.integrated){var e=this.DOM.originalInput,t=this.state.lastOriginalValueReported!==e.value,n=new CustomEvent("change",{bubbles:!0});t&&(this.state.lastOriginalValueReported=e.value,n.simulated=!0,e._valueTracker&&e._valueTracker.setValue(Math.random()),e.dispatchEvent(n),this.trigger("change",this.state.lastOriginalValueReported),e.value=this.state.lastOriginalValueReported)}},events:x,fixFirefoxLastTagNoCaret(){},setRangeAtStartEnd(e,t){e="number"==typeof e?e:!!e,t=t.lastChild||t;var n=document.getSelection();if(n.focusNode instanceof Element&&!this.DOM.input.contains(n.focusNode))return!0;try{n.rangeCount>=1&&["Start","End"].forEach((a=>n.getRangeAt(0)["set"+a](t,e||t.length)))}catch(e){}},placeCaretAfterNode(e){if(e&&e.parentNode){var t=e,n=window.getSelection(),a=n.getRangeAt(0);n.rangeCount&&(a.setStartAfter(t),a.collapse(!0),n.removeAllRanges(),n.addRange(a))}},insertAfterTag(e,t){if(t=t||this.settings.mixMode.insertAfterTag,e&&e.parentNode&&t)return t="string"==typeof t?document.createTextNode(t):t,e.parentNode.insertBefore(t,e.nextSibling),t},editTagChangeDetected(e){var t=e.__originalData;for(var n in t)if(!this.dataProps.includes(n)&&e[n]!=t[n])return!0;return!1},getTagTextNode(e){return e.querySelector(this.settings.classNames.tagTextSelector)},setTagTextNode(e,t){this.getTagTextNode(e).innerHTML=c(t)},editTag(e,t){e=e||this.getLastTag(),t=t||{},this.dropdown.hide();var n=this.settings,a=this.getTagTextNode(e),r=this.getNodeIndex(e),i=v(e),o=this.events.callbacks,s=this,l=!0;if(a){if(!(i instanceof Object&&"editable"in i)||i.editable)return i=v(e,{__originalData:d({},i),__originalHTML:e.cloneNode(!0)}),v(i.__originalHTML,i.__originalData),a.setAttribute("contenteditable",!0),e.classList.add(n.classNames.tagEditing),a.addEventListener("focus",o.onEditTagFocus.bind(this,e)),a.addEventListener("blur",(function(){setTimeout((()=>o.onEditTagBlur.call(s,s.getTagTextNode(e))))})),a.addEventListener("input",o.onEditTagInput.bind(this,a)),a.addEventListener("paste",o.onEditTagPaste.bind(this,a)),a.addEventListener("keydown",(t=>o.onEditTagkeydown.call(this,t,e))),a.addEventListener("compositionstart",o.onCompositionStart.bind(this)),a.addEventListener("compositionend",o.onCompositionEnd.bind(this)),t.skipValidation||(l=this.editTagToggleValidity(e)),a.originalIsValid=l,this.trigger("edit:start",{tag:e,index:r,data:i,isValid:l}),a.focus(),this.setRangeAtStartEnd(!1,a),this}else console.warn("Cannot find element in Tag template: .",n.classNames.tagTextSelector)},editTagToggleValidity(e,t){var n;if(t=t||v(e))return(n=!("__isValid"in t)||!0===t.__isValid)||this.removeTagsFromValue(e),this.update(),e.classList.toggle(this.settings.classNames.tagNotAllowed,!n),t.__isValid;console.warn("tag has no data: ",e,t)},onEditTagDone(e,t){t=t||{};var n={tag:e=e||this.state.editing.scope,index:this.getNodeIndex(e),previousData:v(e),data:t};this.trigger("edit:beforeUpdate",n,{cloneData:!1}),this.state.editing=!1,delete t.__originalData,delete t.__originalHTML,e&&t[this.settings.tagTextProp]?(e=this.replaceTag(e,t),this.editTagToggleValidity(e,t),this.settings.a11y.focusableTags?e.focus():this.placeCaretAfterNode(e)):e&&this.removeTags(e),this.trigger("edit:updated",n),this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},replaceTag(e,t){t&&t.value||(t=e.__tagifyTagData),t.__isValid&&1!=t.__isValid&&d(t,this.getInvalidTagAttrs(t,t.__isValid));var n=this.createTagElem(t);return e.parentNode.replaceChild(n,e),this.updateValueByDOMTags(),n},updateValueByDOMTags(){this.value.length=0,[].forEach.call(this.getTagElms(),(e=>{e.classList.contains(this.settings.classNames.tagNotAllowed.split(" ")[0])||this.value.push(v(e))})),this.update()},injectAtCaret(e,t){var n;return!(t=t||(null===(n=this.state.selection)||void 0===n?void 0:n.range))&&e?(this.appendMixTags(e),this):(w(e,t),this.setRangeAtStartEnd(!1,e),this.updateValueByDOMTags(),this.update(),this)},input:{set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n=this.settings.dropdown.closeOnSelect;this.state.inputText=e,t&&(this.DOM.input.innerHTML=c(""+e)),!e&&n&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},raw(){return this.DOM.input.textContent},validate(){var e=!this.state.inputText||!0===this.validateTag({value:this.state.inputText});return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!e),e},normalize(e){var t=e||this.DOM.input,n=[];t.childNodes.forEach((e=>3==e.nodeType&&n.push(e.nodeValue))),n=n.join("\n");try{n=n.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch(e){}return n=n.replace(/\s/g," "),this.trim(n)},autocomplete:{suggest(e){if(this.settings.autoComplete.enabled){"string"==typeof(e=e||{value:""})&&(e={value:e});var t=this.dropdown.getMappedValue(e);if("number"!=typeof t){var n=t.substr(0,this.state.inputText.length).toLowerCase(),a=t.substring(this.state.inputText.length);t&&this.state.inputText&&n==this.state.inputText.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",a),this.state.inputSuggestion=e):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},set(e){var t=this.DOM.input.getAttribute("data-suggest"),n=e||(t?this.state.inputText+t:null);return!!n&&("mix"==this.settings.mode?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+n)):(this.input.set.call(this,n),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx(e){return this.value.findIndex((t=>t.__tagId==(e||{}).__tagId))},getNodeIndex(e){var t=0;if(e)for(;e=e.previousElementSibling;)t++;return t},getTagElms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a="."+[...this.settings.classNames.tag.split(" "),...t].join(".");return[].slice.call(this.DOM.scope.querySelectorAll(a))},getLastTag(){var e=this.DOM.scope.querySelectorAll(`${this.settings.classNames.tagSelector}:not(.${this.settings.classNames.tagHide}):not([readonly])`);return e[e.length-1]},isTagDuplicate(e,t,n){var r=0;if("select"==this.settings.mode)return!1;for(let i of this.value)a(this.trim(""+e),i.value,t)&&n!=i.__tagId&&r++;return r},getTagIndexByValue(e){var t=[];return this.getTagElms().forEach(((n,r)=>{a(this.trim(n.textContent),e,this.settings.dropdown.caseSensitive)&&t.push(r)})),t},getTagElmByValue(e){var t=this.getTagIndexByValue(e)[0];return this.getTagElms()[t]},flashTag(e){e&&(e.classList.add(this.settings.classNames.tagFlash),setTimeout((()=>{e.classList.remove(this.settings.classNames.tagFlash)}),100))},isTagBlacklisted(e){return e=this.trim(e.toLowerCase()),this.settings.blacklist.filter((t=>(""+t).toLowerCase()==e)).length},isTagWhitelisted(e){return!!this.getWhitelistItem(e)},getWhitelistItem(e,t,n){t=t||"value";var r,i=this.settings;return(n=n||i.whitelist).some((n=>{var o="string"==typeof n?n:n[t]||n.value;if(a(o,e,i.dropdown.caseSensitive,i.trim))return r="string"==typeof n?{value:n}:n,!0})),r||"value"!=t||"value"==i.tagTextProp||(r=this.getWhitelistItem(e,i.tagTextProp,n)),r},validateTag(e){var t=this.settings,n="value"in e?"value":t.tagTextProp,a=this.trim(e[n]+"");return(e[n]+"").trim()?t.pattern&&t.pattern instanceof RegExp&&!t.pattern.test(a)?this.TEXTS.pattern:!t.duplicates&&this.isTagDuplicate(a,t.dropdown.caseSensitive,e.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(a)||t.enforceWhitelist&&!this.isTagWhitelisted(a)?this.TEXTS.notAllowed:!t.validate||t.validate(e):this.TEXTS.empty},getInvalidTagAttrs(e,t){return{"aria-invalid":!0,class:`${e.class||""} ${this.settings.classNames.tagNotAllowed}`.trim(),title:t}},hasMaxTags(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly(e,t){var n=this.settings;document.activeElement.blur(),n[t||"readonly"]=e,this.DOM.scope[(e?"set":"remove")+"Attribute"](t||"readonly",!0),this.setContentEditable(!e)},setContentEditable(e){this.settings.userInput&&(this.DOM.input.contentEditable=e,this.DOM.input.tabIndex=e?0:-1)},setDisabled(e){this.setReadonly(e,"disabled")},normalizeTags(e){var t=this.settings,n=t.whitelist,a=t.delimiters,r=t.mode,i=t.tagTextProp,o=[],s=!!n&&n[0]instanceof Object,l=Array.isArray(e),c=l&&e[0].value,p=e=>(e+"").split(a).filter((e=>e)).map((e=>({[i]:this.trim(e),value:this.trim(e)})));if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!e.trim())return[];e=p(e)}else l&&(e=[].concat(...e.map((e=>e.value?e:p(e)))));return s&&!c&&(e.forEach((e=>{var t=o.map((e=>e.value)),n=this.dropdown.filterListItems.call(this,e[i],{exact:!0});this.settings.duplicates||(n=n.filter((e=>!t.includes(e.value))));var a=n.length>1?this.getWhitelistItem(e[i],i,n):n[0];a&&a instanceof Object?o.push(a):"mix"!=r&&(null==e.value&&(e.value=e[i]),o.push(e))})),o.length&&(e=o)),e},parseMixTags(e){var t=this.settings,n=t.mixTagsInterpolator,a=t.duplicates,r=t.transformTag,i=t.enforceWhitelist,o=t.maxTags,s=t.tagTextProp,l=[];return e=e.split(n[0]).map(((e,t)=>{var c,p,d,u=e.split(n[1]),m=u[0],h=l.length==o;try{if(m==+m)throw Error;p=JSON.parse(m)}catch(e){p=this.normalizeTags(m)[0]||{value:m}}if(r.call(this,p),h||!(u.length>1)||i&&!this.isTagWhitelisted(p.value)||!a&&this.isTagDuplicate(p.value)){if(e)return t?n[0]+e:e}else p[c=p[s]?s:"value"]=this.trim(p[c]),d=this.createTagElem(p),l.push(p),d.classList.add(this.settings.classNames.tagNoAnimation),u[0]=d.outerHTML,this.value.push(p);return u.join("")})).join(""),this.DOM.input.innerHTML=e,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize(),this.getTagElms().forEach(((e,t)=>v(e,l[t]))),this.update({withoutChangeEvent:!0}),e},replaceTextWithNode(e,t){if(this.state.tag||t){t=t||this.state.tag.prefix+this.state.tag.value;var n,a,r=this.state.selection||window.getSelection(),i=r.anchorNode,o=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return i.splitText(r.anchorOffset-o),-1==(n=i.nodeValue.lastIndexOf(t))||(a=i.splitText(n),e&&i.parentNode.replaceChild(e,a)),!0}},selectTag(e,t){var n=this.settings;if(!n.enforceWhitelist||this.isTagWhitelisted(t.value)){this.input.set.call(this,t[n.tagTextProp]||t.value,!0),this.state.actions.selectOption&&setTimeout((()=>this.setRangeAtStartEnd(!1,this.DOM.input)));var a=this.getLastTag();return a?this.replaceTag(a,t):this.appendTag(e),this.value[0]=t,this.update(),this.trigger("add",{tag:e,data:t}),[e]}},addEmptyTag(e){var t=d({value:""},e||{}),n=this.createTagElem(t);v(n,t),this.appendTag(n),this.editTag(n,{skipValidation:!0})},addTags(e,t,n){var a=[],r=this.settings,i=[],o=document.createDocumentFragment();if(n=n||r.skipInvalid,!e||0==e.length)return a;switch(e=this.normalizeTags(e),r.mode){case"mix":return this.addMixTags(e);case"select":t=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),e.forEach((e=>{var t,s={},l=Object.assign({},e,{value:e.value+""});if(e=Object.assign({},l),r.transformTag.call(this,e),e.__isValid=this.hasMaxTags()||this.validateTag(e),!0!==e.__isValid){if(n)return;if(d(s,this.getInvalidTagAttrs(e,e.__isValid),{__preInvalidData:l}),e.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(e.value)),!r.createInvalidTags)return void i.push(e.value)}if("readonly"in e&&(e.readonly?s["aria-readonly"]=!0:delete e.readonly),t=this.createTagElem(e,s),a.push(t),"select"==r.mode)return this.selectTag(t,e);o.appendChild(t),e.__isValid&&!0===e.__isValid?(this.value.push(e),this.trigger("add",{tag:t,index:this.value.length-1,data:e})):(this.trigger("invalid",{data:e,index:this.value.length,tag:t,message:e.__isValid}),r.keepInvalidTags||setTimeout((()=>this.removeTags(t,!0)),1e3)),this.dropdown.position()})),this.appendTag(o),this.update(),e.length&&t&&(this.input.set.call(this,r.createInvalidTags?"":i.join(r._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),r.dropdown.enabled&&this.dropdown.refilter(),a},addMixTags(e){if((e=this.normalizeTags(e))[0].prefix||this.state.tag)return this.prefixedTextToTag(e[0]);"string"==typeof e&&(e=[{value:e}]);var t=document.createDocumentFragment();return e.forEach((e=>{var n=this.createTagElem(e);t.appendChild(n),this.insertAfterTag(n)})),this.appendMixTags(t),t},appendMixTags(e){var t=!!this.state.selection;t?this.injectAtCaret(e):(this.DOM.input.focus(),(t=this.setStateSelection()).range.setStart(this.DOM.input,t.range.endOffset),t.range.setEnd(this.DOM.input,t.range.endOffset),this.DOM.input.appendChild(e),this.updateValueByDOMTags(),this.update())},prefixedTextToTag(e){var t,n=this.settings,a=this.state.tag.delimiters;if(n.transformTag.call(this,e),e.prefix=e.prefix||this.state.tag?this.state.tag.prefix:(n.pattern.source||n.pattern)[0],t=this.createTagElem(e),this.replaceTextWithNode(t)||this.DOM.input.appendChild(t),setTimeout((()=>t.classList.add(this.settings.classNames.tagNoAnimation)),300),this.value.push(e),this.update(),!a){var r=this.insertAfterTag(t)||t;this.placeCaretAfterNode(r)}return this.state.tag=null,this.trigger("add",d({},{tag:t},{data:e})),t},appendTag(e){var t=this.DOM,n=t.input;t.scope.insertBefore(e,n)},createTagElem(e,n){e.__tagId=g();var a,r=d({},e,t({value:c(e.value+"")},n));return function(e){for(var t,n=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,null,!1);t=n.nextNode();)t.textContent.trim()||t.parentNode.removeChild(t)}(a=this.parseTemplate("tag",[r,this])),v(a,e),a},reCheckInvalidTags(){var e=this.settings;this.getTagElms(e.classNames.tagNotAllowed).forEach(((t,n)=>{var a=v(t),r=this.hasMaxTags(),i=this.validateTag(a),o=!0===i&&!r;if("select"==e.mode&&this.toggleScopeValidation(i),o)return a=a.__preInvalidData?a.__preInvalidData:{value:a.value},this.replaceTag(t,a);t.title=r||i}))},removeTags(e,t,n){var a,r=this.settings;if(e=e&&e instanceof HTMLElement?[e]:e instanceof Array?e:e?[e]:[this.getLastTag()],a=e.reduce(((e,t)=>{t&&"string"==typeof t&&(t=this.getTagElmByValue(t));var n=v(t);return t&&n&&!n.readonly&&e.push({node:t,idx:this.getTagIdx(n),data:v(t,{__removed:!0})}),e}),[]),n="number"==typeof n?n:this.CSSVars.tagHideTransition,"select"==r.mode&&(n=0,this.input.set.call(this)),1==a.length&&"select"!=r.mode&&a[0].node.classList.contains(r.classNames.tagNotAllowed)&&(t=!0),a.length)return r.hooks.beforeRemoveTag(a,{tagify:this}).then((()=>{function e(e){e.node.parentNode&&(e.node.parentNode.removeChild(e.node),t?r.keepInvalidTags&&this.trigger("remove",{tag:e.node,index:e.idx}):(this.trigger("remove",{tag:e.node,index:e.idx,data:e.data}),this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),r.keepInvalidTags&&this.reCheckInvalidTags()))}n&&n>10&&1==a.length?function(t){t.node.style.width=parseFloat(window.getComputedStyle(t.node).width)+"px",document.body.clientTop,t.node.classList.add(r.classNames.tagHide),setTimeout(e.bind(this),n,t)}.call(this,a[0]):a.forEach(e.bind(this)),t||(this.removeTagsFromValue(a.map((e=>e.node))),this.update(),"select"==r.mode&&this.setContentEditable(!0))})).catch((e=>{}))},removeTagsFromDOM(){[].slice.call(this.getTagElms()).forEach((e=>e.parentNode.removeChild(e)))},removeTagsFromValue(e){(e=Array.isArray(e)?e:[e]).forEach((e=>{var t=v(e),n=this.getTagIdx(t);n>-1&&this.value.splice(n,1)}))},removeAllTags(e){e=e||{},this.value=[],"mix"==this.settings.mode?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout((()=>{this.DOM.input.focus()})),"select"==this.settings.mode&&(this.input.set.call(this),this.setContentEditable(!0)),this.update(e)},postUpdate(){var e,t,n=this.settings,a=n.classNames,r="mix"==n.mode?n.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;this.toggleClass(a.hasMaxTags,this.value.length>=n.maxTags),this.toggleClass(a.hasNoTags,!this.value.length),this.toggleClass(a.empty,!r),"select"==n.mode&&this.toggleScopeValidation(null===(e=this.value)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.__isValid)},setOriginalInputValue(e){var t=this.DOM.originalInput;this.settings.mixMode.integrated||(t.value=e,t.tagifyValue=t.value,this.setPersistedData(e,"value"))},update(e){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout(function(){var t=this.getInputValue();this.setOriginalInputValue(t),this.postUpdate(),this.settings.onChangeAfterBlur&&(e||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent()}.bind(this),100)},getInputValue(){var e=this.getCleanValue();return"mix"==this.settings.mode?this.getMixedTagsAsString(e):e.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(e):JSON.stringify(e):""},getCleanValue(e){return r(e||this.value,this.dataProps)},getMixedTagsAsString(){var e="",t=this,n=this.settings,a=n.originalInputValueFormat||JSON.stringify,r=n.mixTagsInterpolator;return function n(o){o.childNodes.forEach((o=>{if(1==o.nodeType){const s=v(o);if("BR"==o.tagName&&(e+="\r\n"),s&&f.call(t,o)){if(s.__removed)return;e+=r[0]+a(i(s,t.dataProps))+r[1]}else o.getAttribute("style")||["B","I","U"].includes(o.tagName)?e+=o.textContent:"DIV"!=o.tagName&&"P"!=o.tagName||(e+="\r\n",n(o))}else e+=o.textContent}))}(this.DOM.input),e}},C.prototype.removeTag=C.prototype.removeTags,C}()},184:function(e,t){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var o=r.apply(null,n);o&&e.push(o)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},705:function(e,t,n){var a=n(639).Symbol;e.exports=a},239:function(e,t,n){var a=n(705),r=n(607),i=n(333),o=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):i(e)}},561:function(e,t,n){var a=n(990),r=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(r,""):e}},957:function(e,t,n){var a="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=a},607:function(e,t,n){var a=n(705),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,s=a?a.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var a=!0}catch(e){}var r=o.call(e);return a&&(t?e[s]=n:delete e[s]),r}},333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:function(e,t,n){var a=n(957),r="object"==typeof self&&self&&self.Object===Object&&self,i=a||r||Function("return this")();e.exports=i},990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},279:function(e,t,n){var a=n(218),r=n(771),i=n(841),o=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,p,d,u,m,h=0,g=!1,f=!1,w=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,a=c;return l=c=void 0,h=t,d=e.apply(a,n)}function y(e){return h=e,u=setTimeout(k,t),g?v(e):d}function b(e){var n=e-m;return void 0===m||n>=t||n<0||f&&e-h>=p}function k(){var e=r();if(b(e))return T(e);u=setTimeout(k,function(e){var n=t-(e-m);return f?s(n,p-(e-h)):n}(e))}function T(e){return u=void 0,w&&l?v(e):(l=c=void 0,d)}function E(){var e=r(),n=b(e);if(l=arguments,c=this,m=e,n){if(void 0===u)return y(m);if(f)return clearTimeout(u),u=setTimeout(k,t),v(m)}return void 0===u&&(u=setTimeout(k,t)),d}return t=i(t)||0,a(n)&&(g=!!n.leading,p=(f="maxWait"in n)?o(i(n.maxWait)||0,t):p,w="trailing"in n?!!n.trailing:w),E.cancel=function(){void 0!==u&&clearTimeout(u),h=0,l=m=c=u=void 0},E.flush=function(){return void 0===u?d:T(r())},E}},218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},448:function(e,t,n){var a=n(239),r=n(5);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==a(e)}},771:function(e,t,n){var a=n(639);e.exports=function(){return a.Date.now()}},841:function(e,t,n){var a=n(561),r=n(218),i=n(448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={exports:{}};return e[a].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=wp.i18n,t=wp.data,a=wp.hooks,r=wp.element,i=n(184),o=n.n(i),s=lodash,l=wp.compose,c=wp.components;function p(e){return p="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},p(e)}var d=["tabId","onClick","children","selected"];function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function g(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,a=v(e);if(t){var r=v(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},b.apply(this,arguments)}function k(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var T=function(e){var t=e.tabId,n=e.onClick,a=e.children,r=e.selected,i=k(e,d);return wp.element.createElement(c.Button,b({role:"tab",tabIndex:r?null:-1,"aria-selected":r,id:t,onClick:n},i),a)},E=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&&h(e,t)}(i,e);var t,n,a,r=g(i);function i(){var e;u(this,i),y(w(e=r.apply(this,arguments)),"handleClick",(function(t){var n=e.props.onSelect,a=void 0===n?s.noop:n;e.setState({selected:t}),a(t)})),y(w(e),"onNavigate",(function(e,t){t.click()}));var t=e.props,n=t.tabs,a=t.initialTabName;return e.state={selected:a||(n.length>0?n[0].name:null)},e}return t=i,(n=[{key:"render",value:function(){var e=this,t=this.state.selected,n=this.props,a=n.activeClass,r=void 0===a?"is-active":a,i=n.className,l=n.instanceId,p=n.orientation,d=void 0===p?"horizontal":p,u=n.tabs,m=(0,s.find)(u,{name:t}),h=l+"-"+m.name,g=u.slice(4);return wp.element.createElement("div",{className:i},wp.element.createElement(c.NavigableMenu,{role:"tablist",orientation:d,onNavigate:this.onNavigate,className:"components-tab-panel__tabs "+t},u.slice(0,4).map((function(n){return wp.element.createElement(T,{className:o()("components-tab-panel__tabs-item",n.className,y({},r,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:(0,s.partial)(e.handleClick,n.name)},n.title)})),g.map((function(n){return wp.element.createElement(T,{className:o()("components-tab-panel__tabs-item",n.className,y({},r,n.name===t)),tabId:l+"-"+n.name,"aria-controls":l+"-"+n.name+"-view",selected:n.name===t,key:n.name,onClick:(0,s.partial)(e.handleClick,n.name)},n.title)}))),m&&wp.element.createElement("div",{"aria-labelledby":h,role:"tabpanel",id:h+"-view",className:"components-tab-panel__tab-content"},this.props.children(m)))}}])&&m(t.prototype,n),a&&m(t,a),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.Component),_=(0,l.withInstanceId)(E),O=document.createElement("div");function x(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),O.innerHTML=e,e=O.textContent,O.textContent=""),e}function C(e,t,n){var a=0;return!1!==(0,s.get)(n,"pixelWidth",!1)&&(a=Math.min(100,Math.floor(t/n.pixelWidth*100))),Math.max(Math.min(100,Math.floor(e/n.max*100)),a)+"%"}function N(e,t){return e<=t.min||e>t.max}function S(e,t){return e<=t.minWidth||e>t.pixelWidth}var I=function(e){var t=function(e,t){var n=x(e).length,a=0,r=!1;if(!1!==(0,s.get)(t,"pixelWidth",!1)){r=!0;var i=document.createTextNode(e),o=document.createElement("span");o.appendChild(i),o.id="rank-math-width-tester",o.className=t.widthCheckerClass;var l=document.body.appendChild(o);a=document.getElementById("rank-math-width-tester").offsetWidth,l.outerHTML=""}return{left:C(n,a,t),isInvalid:N(n,t),isInvalidWidth:!!r&&S(a,t),count:n+" / "+t.max,pixelWidth:r?a+"px / "+t.pixelWidth+"px":""}}(e.source,e),n=t.pixelWidth?" (".concat(t.pixelWidth,")"):"";return wp.element.createElement("span",{className:o()("length-indicator-wrapper",{invalid:t.isInvalid||t.isInvalidWidth})},wp.element.createElement("span",{className:"length-count"},t.count,n),wp.element.createElement("span",{className:"length-indicator"},wp.element.createElement("span",{style:{left:t.left}})))},D=wp.htmlEntities,M=React;function A(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function P(e,t){let n,a,r=[];for(let i=0;i<e.length;i++){const o=e[i];if("string"!==o.type){if(void 0===t[o.value])throw new Error(`Invalid interpolation, missing component node: \`${o.value}\``);if("object"!=typeof t[o.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${o.value}\``);if("componentClose"===o.type)throw new Error(`Missing opening component token: \`${o.value}\``);if("componentOpen"===o.type){n=t[o.value],a=i;break}r.push(t[o.value])}else r.push(o.value)}if(n){const i=function(e,t){const n=t[e];let a=0;for(let r=e+1;r<t.length;r++){const e=t[r];if(e.value===n.value){if("componentOpen"===e.type){a++;continue}if("componentClose"===e.type){if(0===a)return r;a--}}}throw new Error("Missing closing component token `"+n.value+"`")}(a,e),o=P(e.slice(a+1,i),t),s=(0,M.cloneElement)(n,{},o);if(r.push(s),i<e.length-1){const n=P(e.slice(i+1),t);r=r.concat(n)}}return r=r.filter(Boolean),0===r.length?null:1===r.length?r[0]:(0,M.createElement)(M.Fragment,null,...r)}function R(e){const{mixedString:t,components:n,throwErrors:a}=e;if(!n)return t;if("object"!=typeof n){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const r=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(A)}(t);try{return P(r,n)}catch(e){if(a)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}var j=function(e){var t=e.tags,n=e.components,a=e.children;return n=n||{},!1===(0,s.isUndefined)(t)&&(t=t.split(",")).forEach((function(e){var t=e;n[e]=wp.element.createElement(t,null)})),R({mixedString:a,components:n})};function L(e){return L="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},L(e)}function F(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}function H(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,a=z(e);if(t){var r=z(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return B(this,n)}}function B(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return V(e)}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var W=function(t){!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&&U(e,t)}(l,t);var n,a,i,o=H(l);function l(e){var t,n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t=o.call(this,e),n=V(t),r={},(a="state")in n?Object.defineProperty(n,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[a]=r,t.state.variables=t.getFiltered(),t.state.filtered=t.state.variables,t.state.display="none",t.state.isOpen=!1,t.handleOutsideClick=t.handleOutsideClick.bind(V(t)),t}return n=l,(a=[{key:"getFiltered",value:function(){var e=this.props.exclude,t=Object.values(rankMath.variables);return(0,s.isUndefined)(e)?t:t.filter((function(t){return!e.includes(t.variable)}))}},{key:"render",value:function(){var t=this;return wp.element.createElement(r.Fragment,null,wp.element.createElement("div",{className:"rank-math-variables-dropdown",style:{display:this.state.display},ref:function(e){t.node=e}},wp.element.createElement(c.TextControl,{autoComplete:"off",placeholder:(0,D.decodeEntities)((0,e.__)("Search &hellip;","rank-math")),onChange:function(e){t.handleSearch(e)}}),wp.element.createElement("ul",null,this.state.filtered.map((function(e,n){return wp.element.createElement("li",{key:n,"data-var":e.variable,role:"presentation",onClick:function(){t.props.onClick(e)}},wp.element.createElement("strong",null,e.name),wp.element.createElement("span",null,wp.element.createElement(j,{tags:"strong"},e.description.replace("<strong>","{{strong}}").replace("</strong>","{{/strong}}"))))}),this))),wp.element.createElement(c.Button,{icon:"arrow-down-alt2",onClick:function(){t.toggle()}}))}},{key:"toggle",value:function(){this.state.isOpen?document.removeEventListener("click",this.handleOutsideClick,!0):document.addEventListener("click",this.handleOutsideClick,!0),this.setState({display:this.state.isOpen?"none":"block",isOpen:!this.state.isOpen})}},{key:"handleOutsideClick",value:function(e){this.node.contains(e.target)||this.toggle()}},{key:"handleSearch",value:function(e){var t=e.toLowerCase();2>t.length?this.setState({filtered:this.state.variables}):this.setState({filtered:this.state.variables.filter((function(e){return-1!==Object.values(e).join(" ").toLowerCase().indexOf(t)}))})}}])&&F(n.prototype,a),i&&F(n,i),Object.defineProperty(n,"prototype",{writable:!1}),l}(r.Component),G=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{title:t.getTitle(),serpTitle:t.getSerpTitle()}})),(0,t.withDispatch)((function(e){return{updateTitle:function(t){e("rank-math").updateSerpTitle(t),e("rank-math").updateTitle(t)}}})))((function(t){var n=t.title,a=t.serpTitle,r=t.updateTitle;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-title"},(0,e.__)("Title","rank-math")),wp.element.createElement(I,{source:a,min:15,max:60,pixelWidth:580,widthCheckerClass:"title"}),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-editor-title",value:n,placeholder:rankMath.assessor.serpData.titleTemplate,help:(0,e.__)("This is what will appear in the first line when this post shows up in the search results.","rank-math"),onChange:r}),wp.element.createElement(W,{exclude:["seo_title","seo_description"],onClick:function(e){return r(n+" %"+e.variable+"%")}})))})),K=rankMathAnalyzer,$=wp.url;var q=(0,l.compose)((0,t.withSelect)((function(e){var t=rankMathEditor.assessor.dataCollector,n=e("rank-math").getSerpSlug();return{permalink:n||t.getSlug(),serpPermalink:t.getPermalink()}})),(0,t.withDispatch)((function(){return{updatePermalink:function(e){rankMathEditor.updatePermalink(K.Helpers.sanitizeText(e),!0)},updatePermalinkSanitize:function(e){rankMathEditor.updatePermalinkSanitize(function(e){return e=e.replace(/,/g,""),e=K.Helpers.removeDiacritics(e),K.Helpers.sanitizeText(e)}(e))}}})))((function(t){var n=t.permalink,a=t.serpPermalink,r=t.updatePermalink,i=t.updatePermalinkSanitize;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-permalink"},(0,e.__)("Permalink","rank-math")),wp.element.createElement(I,{source:(0,$.safeDecodeURIComponent)(a),min:5,max:75}),wp.element.createElement(c.TextControl,{id:"rank-math-editor-permalink",value:rankMath.is_front_page?"/":(0,$.safeDecodeURIComponent)(n),onChange:r,help:rankMath.is_front_page?(0,e.__)("Editing Homepage permalink is not possible.","rank-math"):(0,e.__)("This is the unique URL of this page, displayed below the post title in the search results.","rank-math"),disabled:rankMath.is_front_page?"disabled":"",onBlur:function(e){i(e.target.value)}}))})),Y=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{description:t.getDescription(),serpDescription:t.getSerpDescription()}})),(0,t.withDispatch)((function(e){return{updateDescription:function(t){e("rank-math").updateSerpDescription(t),e("rank-math").updateDescription(t)}}})))((function(t){var n=t.description,a=t.serpDescription,r=t.updateDescription;return wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-editor-description"},(0,e.__)("Description","rank-math")),wp.element.createElement(I,{source:a,min:80,max:160,pixelWidth:920,widthCheckerClass:"description"}),wp.element.createElement("div",{className:"variable-group rank-math-description-variables"},wp.element.createElement(c.TextareaControl,{id:"rank-math-editor-description",value:x(n),placeholder:a||(0,s.unescape)(rankMath.assessor.serpData.descriptionTemplate),help:(0,e.__)("This is what will appear as the description when this post shows up in the search results.","rank-math"),onChange:r}),wp.element.createElement(W,{exclude:["seo_title","seo_description"],onClick:function(e){return r(n+" %"+e.variable+"%")}})))})),X=(0,l.compose)((0,t.withSelect)((function(e){return{type:e("rank-math").getSnippetPreviewType()}})),(0,t.withDispatch)((function(e,t){return{updatePreviewType:function(n){e("rank-math").updateSnippetPreviewType(n===t.type?"":n)}}})))((function(e){var t=e.type,n=e.updatePreviewType,a=o()("button button-secondary button-small",{active:"desktop"===t}),r=o()("button button-secondary button-small",{active:"mobile"===t});return wp.element.createElement("div",{className:"rank-math-button-devices alignright"},wp.element.createElement("div",{onClick:function(){return n("desktop")},className:a},wp.element.createElement("i",{className:"rm-icon rm-icon-desktop"})),wp.element.createElement("div",{onClick:function(){return n("mobile")},className:r},wp.element.createElement("i",{className:"rm-icon rm-icon-mobile"})))}));function J(e){return 100<e?"bad-fk dark":80<e?"good-fk":50<e?"ok-fk":"bad-fk"}var Z=(0,t.withSelect)((function(e){var t=e("rank-math");return{score:t.getAnalysisScore(),isRefreshing:t.isRefreshing()}}))((function(e){var t=e.score;return wp.element.createElement("div",{className:"seo-score "+J(t)},wp.element.createElement("div",{className:"score-text"},t," / 100"))}));function Q(e,t,n,a){return(0,s.isUndefined)(t)?t:(t=(0,s.truncate)(t,{length:n,separator:a||" "}),""===e?t:t.replace(new RegExp(function(e){return e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}(e),"gi"),(function(e){return'<mark className="highlight">'+e+"</mark>"})))}var ee=function(e,t){for(var n=[],a=1;a<=e;a++)n.push(wp.element.createElement(c.Dashicon,{key:Math.random(),size:"13",icon:"star-"+t}));return n},te=(0,t.withSelect)((function(e){var t=e("rank-math").getSchemas();return{schema:(0,s.find)(t,(function(e){return!(0,s.isEmpty)(e.metadata.isPrimary)}))}}))((function(t){var n=t.schema;if((0,s.isEmpty)(n))return null;var a=(0,s.get)(n,"review.reviewRating",{}),r=a.ratingValue;if((0,s.isEmpty)(r))return null;(0,s.get)(a,"worstRating",1);var i=(0,s.get)(a,"bestRating",5);return wp.element.createElement("div",{className:"rank-math-rating-preview"},wp.element.createElement("div",{className:"serp-ratings"},ee(i,"filled"),function(e,t,n){return e*=100/n,wp.element.createElement("div",{className:"serp-result",style:{width:e+"%"}},ee(n,"filled"))}(r,0,i)),wp.element.createElement("span",{className:"serp-rating-label"},(0,e.__)("Rating: ","rank-math")),wp.element.createElement("span",{className:"serp-rating-value"},r))}));function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=(0,t.withSelect)((function(e){var t=e("rank-math"),n=t.getRobots();return{title:t.getSerpTitle(),permalink:rankMathEditor.assessor.dataCollector.getPermalink(),description:t.getSerpDescription(),previewType:t.getSnippetPreviewType(),isNoIndex:"noindex"in n,keyword:t.getSelectedKeyword().data.value}}))((function(t){var n,a=t.title,r=t.permalink,i=t.description,s=t.previewType,l=void 0===s?"desktop":s,c=t.isNoIndex,p=t.keyword,d=t.onClick,u=t.showScore,m=void 0===u||u,h=t.showDevices,g=void 0!==h&&h,f=o()("serp-preview",(ne(n={"expanded-preview":""!==l},"".concat(l,"-preview"),""!==l&&g),ne(n,"noindex-preview",c),n)),w=o()("serp-title",{capitalize:rankMath.capitalizeTitle}),v=rankMathEditor.assessor.getResearch("slugify")(p);return wp.element.createElement("div",{className:f},wp.element.createElement("div",{className:"serp-preview-title","data-title":(0,e.__)("Preview","rank-math"),"data-desktop":(0,e.__)("Desktop Preview","rank-math"),"data-mobile":(0,e.__)("Mobile Preview","rank-math")},m&&wp.element.createElement(Z,null)," ",g&&wp.element.createElement(X,null)),wp.element.createElement("div",{className:"serp-preview-wrapper"},wp.element.createElement("div",{className:"serp-preview-bg"},wp.element.createElement("div",{className:"serp-preview-input"},wp.element.createElement("input",{type:"text",value:p||(0,e.__)("Rank Math","rank-math"),disabled:!0}),wp.element.createElement("span",{className:"serp-icon-search"},wp.element.createElement("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))),wp.element.createElement("span",{className:"serp-icon-mic"})),wp.element.createElement("div",{className:"serp-preview-menus"},wp.element.createElement("ul",null,wp.element.createElement("li",{className:"current"},wp.element.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgyNHYyNEgweiIvPjxwYXRoIGZpbGw9IiMzNEE4NTMiIGQ9Ik0xMCAydjJhNiA2IDAgMCAxIDYgNmgyYTggOCAwIDAgMC04LTh6Ii8+PHBhdGggZmlsbD0iI0VBNDMzNSIgZD0iTTEwIDRWMmE4IDggMCAwIDAtOCA4aDJjMC0zLjMgMi43LTYgNi02eiIvPjxwYXRoIGZpbGw9IiNGQkJDMDQiIGQ9Ik00IDEwSDJhOCA4IDAgMCAwIDggOHYtMmMtMy4zIDAtNi0yLjY5LTYtNnoiLz48cGF0aCBmaWxsPSIjNDI4NUY0IiBkPSJNMjIgMjAuNTlsLTUuNjktNS42OUE3Ljk2IDcuOTYgMCAwIDAgMTggMTBoLTJhNiA2IDAgMCAxLTYgNnYyYzEuODUgMCAzLjUyLS42NCA0Ljg4LTEuNjhsNS42OSA1LjY5TDIyIDIwLjU5eiIvPjwvc3ZnPgo=",alt:"","data-atf":"1"}),(0,e.__)("All","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{d:"M14 13l4 5H6l4-4 1.79 1.78L14 13zm-6.01-2.99A2 2 0 0 0 8 6a2 2 0 0 0-.01 4.01zM22 5v14a3 3 0 0 1-3 2.99H5c-1.64 0-3-1.36-3-3V5c0-1.64 1.36-3 3-3h14c1.65 0 3 1.36 3 3zm-2.01 0a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h7v-.01h7a1 1 0 0 0 1-1V5z"}))," ",(0,e.__)("Images","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{clipRule:"evenodd",d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{clipRule:"evenodd",d:"M10 16.5l6-4.5-6-4.5v9zM5 20h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1zm14.5 2H5a3 3 0 0 1-3-3V4.4A2.4 2.4 0 0 1 4.4 2h15.2A2.4 2.4 0 0 1 22 4.4v15.1a2.5 2.5 0 0 1-2.5 2.5z",fillRule:"evenodd"}))," ",(0,e.__)("Videos","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),wp.element.createElement("path",{d:"M12 11h6v2h-6v-2zm-6 6h12v-2H6v2zm0-4h4V7H6v6zm16-7.22v12.44c0 1.54-1.34 2.78-3 2.78H5c-1.64 0-3-1.25-3-2.78V5.78C2 4.26 3.36 3 5 3h14c1.64 0 3 1.25 3 2.78zM19.99 12V5.78c0-.42-.46-.78-1-.78H5c-.54 0-1 .36-1 .78v12.44c0 .42.46.78 1 .78h14c.54 0 1-.36 1-.78V12zM12 9h6V7h-6v2z"}))," ",(0,e.__)("News","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",viewBox:"0 0 16 16"},wp.element.createElement("path",{d:"M7.503 0c3.09 0 5.502 2.487 5.502 5.427 0 2.337-1.13 3.694-2.26 5.05-.454.528-.906 1.13-1.358 1.734-.452.603-.754 1.508-.98 1.96-.226.452-.377.829-.904.829-.528 0-.678-.377-.905-.83-.226-.451-.527-1.356-.98-1.959-.452-.603-.904-1.206-1.356-1.734C3.132 9.121 2 7.764 2 5.427 2 2.487 4.412 0 7.503 0zm0 1.364c-2.283 0-4.14 1.822-4.14 4.063 0 1.843.86 2.873 1.946 4.177.468.547.942 1.178 1.4 1.79.34.452.596.99.794 1.444.198-.455.453-.992.793-1.445.459-.61.931-1.242 1.413-1.803 1.074-1.29 1.933-2.32 1.933-4.163 0-2.24-1.858-4.063-4.139-4.063zm0 2.734a1.33 1.33 0 11-.001 2.658 1.33 1.33 0 010-2.658"}))," ",(0,e.__)("Maps","rank-math")),wp.element.createElement("li",null,wp.element.createElement("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},wp.element.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))," ",(0,e.__)("More","rank-math"))),wp.element.createElement("ul",{className:"menus-right"},wp.element.createElement("li",null,(0,e.__)("Settings","rank-math")),wp.element.createElement("li",null,(0,e.__)("Tools","rank-math")))),wp.element.createElement("div",{className:"serp-preview-result-stats"},(0,e.__)("About 43,700,000 results (0.32 seconds) ","rank-math"))),wp.element.createElement("div",{className:"serp-preview-body",role:"button",tabIndex:0,onClick:function(){d&&d()}},wp.element.createElement("div",{className:"group"},wp.element.createElement("img",{src:rankMath.siteFavIcon,width:"16",height:"16",className:"serp-preview-favicon",alt:""}),wp.element.createElement("div",{className:"serp-url",dangerouslySetInnerHTML:{__html:Q(v,K.Helpers.sanitizeText((0,$.safeDecodeURIComponent)(r)),75,/-? +/)}})),wp.element.createElement("div",{className:"group"},wp.element.createElement("h5",{className:w,dangerouslySetInnerHTML:{__html:Q(p,K.Helpers.sanitizeText(a),60)}})),wp.element.createElement(te,null),wp.element.createElement("div",{className:"group"},wp.element.createElement("div",{className:"serp-description",dangerouslySetInnerHTML:{__html:Q(p,K.Helpers.sanitizeText(i),160)}}))),wp.element.createElement("div",{className:"serp-preview-noindex"},wp.element.createElement("h3",null,(0,e.__)("Noindex robots meta is enabled","rank-math")),wp.element.createElement("p",null,(0,e.__)("This page will not appear in search results. You can disable noindex in the Advanced tab.","rank-math")))))})),re=(0,t.withSelect)((function(e){return{isNoIndex:"noindex"in e("rank-math").getRobots()}}))((function(){return wp.element.createElement("div",{className:"rank-math-editor-general"},wp.element.createElement(ae,{showScore:!1,showDevices:!0}),wp.element.createElement(G,null),wp.element.createElement(q,null),wp.element.createElement(Y,null))}));function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=rankMath.links[e]||"";if(!n)return"#";if(!t)return n;var a={utm_source:"Plugin",utm_medium:encodeURIComponent(t),utm_campaign:"WP"};return n+"?"+Object.keys(a).map((function(e){return"".concat(e,"=").concat(a[e])})).join("&")}var oe=jQuery,se=n.n(oe);function le(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var ce=new(function(){function e(){var t,n,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a=null,(n="map")in(t=this)?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a}var t,n,a;return t=e,(n=[{key:"swap",value:function(e,t){var n=this;if(!(e=e||""))return"";var a=new RegExp(/%(([a-z0-9_-]+)\(([^)]*)\)|[^\s]+)%/,"giu");return e.replace(" %page%","").replace("%sep% %sep%","%sep%").replace(a,(function(e){return n.replace(t,e)})).trim()}},{key:"replace",value:function(e,t){var n=t.toLowerCase().slice(1,-1);return["term_description","user_description"].includes(n)?"undefined"!=typeof tinymce&&tinymce.activeEditor&&"rank_math_description_editor"===tinymce.activeEditor.id?tinymce.activeEditor.getContent():se()("#description").val():n.includes("customfield(")?(n=n.replace("customfield(","").replace(")",""))in rankMath.customFields?rankMath.customFields[n]:"":(e=e||this.getMap(),(n="seo_description"===(n="seo_title"===(n=n.includes("(")?n.split("(")[0]:n)?"title":n)?"excerpt":n)in e?e[n]:"")}},{key:"getMap",value:function(){var e=this;return null!==this.map||(this.map={},se().each(rankMath.variables,(function(t,n){t=t.toLowerCase().replace(/%+/g,"").split("(")[0],e.map[t]=n.example}))),this.map}},{key:"setVariable",value:function(e,t){null!==this.map?this.map[e]=t:void 0!==rankMath.variables[e]&&(rankMath.variables[e].example=t)}}])&&le(t.prototype,n),a&&le(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}());function pe(e){return pe="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},pe(e)}var de=function(e){var t=o()("rank-math-social-preview","rank-math-social-preview-"+e.network,e.cardType),n=o()("rank-math-social-preview-title",{capitalize:rankMath.capitalizeTitle});return wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"rank-math-social-preview-item"},wp.element.createElement("div",{className:"rank-math-social-preview-meta"},wp.element.createElement("div",{className:"social-profile-image"}),e.children),wp.element.createElement("div",{className:"rank-math-social-preview-item-wrapper"},wp.element.createElement("div",{className:"rank-math-social-preview-image"},wp.element.createElement("img",{className:"rank-math-social-image-thumbnail",src:e.image,alt:""}),e.hasOverlay&&e.imageOverlay&&"object"===pe(rankMath.overlayImages[e.imageOverlay])&&wp.element.createElement("img",{src:rankMath.overlayImages[e.imageOverlay].url,className:"rank-math-social-preview-image-overlay overlay-position-"+rankMath.overlayImages[e.imageOverlay].position,alt:""})),wp.element.createElement("div",{className:"rank-math-social-preview-caption"},"facebook"===e.network&&wp.element.createElement("h4",{className:"rank-math-social-preview-publisher"},e.siteurl),wp.element.createElement("h3",{className:n},e.title?ce.swap(e.title):e.serpTitle),wp.element.createElement("p",{className:"rank-math-social-preview-description"},e.description?ce.swap(e.description):e.serpDescription),"twitter"===e.network&&wp.element.createElement(r.Fragment,null,wp.element.createElement("h4",{className:"rank-math-social-preview-publisher"},wp.element.createElement(c.Dashicon,{icon:"admin-links"}),e.siteurl))))))},ue=wp.mediaUtils,me=function(t){return wp.element.createElement("div",{className:"components-base-control field-group"},wp.element.createElement(ue.MediaUpload,{allowedTypes:["image"],multiple:!1,value:t.imageID,render:function(n){var a=n.open;return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.Button,{onClick:a,className:"button",isPrimary:!0},t.imageID>0?(0,e.__)("Replace Image","rank-math"):(0,e.__)("Add Image","rank-math")),t.imageID>0&&wp.element.createElement(c.Button,{className:"button",isDestructive:!0,isLink:!0,onClick:t.removeImage},(0,e.__)("Remove Image","rank-math")))},onSelect:t.updateImage}),wp.element.createElement("p",{className:"components-base-control__help"},(0,e.__)("Upload at least 600x315px image. Recommended size is 1200x630px.","rank-math")),wp.element.createElement("div",{className:"notice notice-warning inline hidden"},wp.element.createElement("p",null,(0,e.__)("Image is smaller than the minimum size, please select a different image.","rank-math"))))};function he(){var e=rankMath.overlayImages,t=[];return Object.keys(e).forEach((function(n){t.push({label:e[n].name,value:n})})),t}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ge.apply(this,arguments)}var fe=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=function(){if(t.getFacebookImage())return t.getFacebookImage();var e=t.getFeaturedImage();return(0,s.isUndefined)(e)||""===e?rankMath.defautOgImage:t.getFeaturedImage().source_url}();return{title:t.getFacebookTitle(),description:t.getFacebookDescription(),serpTitle:t.getSerpTitle(),serpDescription:t.getSerpDescription(),author:t.getFacebookAuthor(),image:n,imageID:t.getFacebookImageID(),hasOverlay:t.getFacebookHasOverlay(),imageOverlay:t.getFacebookImageOverlay()}})),(0,t.withDispatch)((function(e){return{removeImage:function(){e("rank-math").updateFacebookImage(""),e("rank-math").updateFacebookImageID(0),e("rank-math").updateFacebookHasOverlay(!1)},updateImage:function(t){e("rank-math").updateFacebookImage(t.url),e("rank-math").updateFacebookImageID(t.id)},updateTitle:function(t){e("rank-math").updateFacebookTitle(t)},updateDescription:function(t){e("rank-math").updateFacebookDescription(t)},updateImageOverlay:function(t){e("rank-math").updateFacebookImageOverlay(t)},toggleOverlay:function(t){e("rank-math").updateFacebookHasOverlay(t)}}})))((function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(de,ge({},t,{network:"facebook",siteurl:rankMath.parentDomain}),wp.element.createElement("div",{className:"social-name"},rankMath.assessor.serpData.authorName),wp.element.createElement("div",{className:"social-time"},wp.element.createElement("span",null,(0,e.__)("2 hrs","rank-math")),wp.element.createElement("span",null,wp.element.createElement(c.Dashicon,{icon:"admin-site",size:"12"})))),wp.element.createElement("div",{className:"notice notice-alt notice-info components-base-control"},wp.element.createElement("p",null,(0,e.__)("Customize the title, description and images of your post used while sharing on Facebook and Twitter.","rank-math")," ",wp.element.createElement("a",{href:ie("meta-box-social-tab","Gutenberg Social Tab"),target:"_blank",rel:"noreferrer noopener"},(0,e.__)("Read more","rank-math")))),wp.element.createElement(me,t),wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-facebook-title"},(0,e.__)("Title","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-facebook-title",value:t.title,placeholder:t.serpTitle,onChange:t.updateTitle}),wp.element.createElement(W,{onClick:function(e){return t.updateTitle(t.title+" %"+e.variable+"%")}}))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-facebook-description"},(0,e.__)("Description","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextareaControl,{id:"rank-math-facebook-description",value:t.description,placeholder:t.serpDescription,onChange:t.updateDescription}),wp.element.createElement(W,{onClick:function(e){return t.updateDescription(t.description+" %"+e.variable+"%")}}))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Add icon overlay to thumbnail","rank-math"),checked:t.hasOverlay,onChange:t.toggleOverlay}),wp.element.createElement("div",{className:t.hasOverlay?"components-base-control":"hidden"},wp.element.createElement(c.SelectControl,{value:t.imageOverlay,label:(0,e.__)("Icon overlay","rank-math"),options:he(),onChange:t.updateImageOverlay}),!rankMath.isPro&&wp.element.createElement("div",{className:"notice notice-alt notice-warning"},wp.element.createElement("p",null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:ie("pro","Gutenberg Social Tab"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("You can add custom thumbnail overlays with {{link}}Rank Math Pro{{/link}}.","rank-math")))))))})),we=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{country:t.getTwitterAppCountry(),description:t.getTwitterAppDescription(),iphoneName:t.getTwitterAppIphoneName(),iphoneID:t.getTwitterAppIphoneID(),iphoneUrl:t.getTwitterAppIphoneUrl(),ipadName:t.getTwitterAppIpadName(),ipadID:t.getTwitterAppIpadID(),ipadUrl:t.getTwitterAppIpadUrl(),googleplayName:t.getTwitterAppGoogleplayName(),googleplayID:t.getTwitterAppGoogleplayID(),googleplayUrl:t.getTwitterAppGoogleplayUrl()}})),(0,t.withDispatch)((function(e){return{updateAppIphoneName:function(t){e("rank-math").updateTwitterAppIphoneName(t)},updateAppIphoneID:function(t){e("rank-math").updateTwitterAppIphoneID(t)},updateAppIphoneUrl:function(t){e("rank-math").updateTwitterAppIphoneUrl(t)},updateAppIpadName:function(t){e("rank-math").updateTwitterAppIpadName(t)},updateAppIpadID:function(t){e("rank-math").updateTwitterAppIpadID(t)},updateAppIpadUrl:function(t){e("rank-math").updateTwitterAppIpadUrl(t)},updateAppGoogleplayName:function(t){e("rank-math").updateTwitterAppGoogleplayName(t)},updateAppGoogleplayID:function(t){e("rank-math").updateTwitterAppGoogleplayID(t)},updateAppGoogleplayUrl:function(t){e("rank-math").updateTwitterAppGoogleplayUrl(t)},updateAppDescription:function(t){e("rank-math").updateTwitterAppDescription(t)},updateAppCountry:function(t){e("rank-math").updateTwitterAppCountry(t)}}})))((function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TextControl,{value:t.description,label:(0,e.__)("App Description","rank-math"),help:(0,e.__)("You can use this as a more concise description than what you may have on the app store. This field has a maximum of 200 characters. (optional)","rank-math"),onChange:t.updateAppDescription}),function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TextControl,{value:t.iphoneName,label:(0,e.__)("iPhone App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppIphoneName}),wp.element.createElement(c.TextControl,{value:t.iphoneID,label:(0,e.__)("iPhone App ID","rank-math"),help:(0,e.__)("The numeric representation of your app ID in the App Store.","rank-math"),onChange:t.updateAppIphoneID}),wp.element.createElement(c.TextControl,{value:t.iphoneUrl,label:(0,e.__)("iPhone App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppIphoneUrl}))}(t),function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TextControl,{value:t.ipadName,label:(0,e.__)("iPad App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppIpadName}),wp.element.createElement(c.TextControl,{value:t.ipadID,label:(0,e.__)("iPad App ID","rank-math"),help:(0,e.__)("The numeric representation of your app ID in the App Store.","rank-math"),onChange:t.updateAppIpadID}),wp.element.createElement(c.TextControl,{value:t.ipadUrl,label:(0,e.__)("iPad App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppIpadUrl}))}(t),function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TextControl,{value:t.googleplayName,label:(0,e.__)("Google Play App Name","rank-math"),help:(0,e.__)("The name of your app to show.","rank-math"),onChange:t.updateAppGoogleplayName}),wp.element.createElement(c.TextControl,{value:t.googleplayID,label:(0,e.__)("Google Play App ID","rank-math"),help:(0,e.__)("Your app ID in the Google Play (.i.e. com.android.app)","rank-math"),onChange:t.updateAppGoogleplayID}),wp.element.createElement(c.TextControl,{value:t.googleplayUrl,label:(0,e.__)("Google Play App URL","rank-math"),help:(0,e.__)("Your app's custom URL scheme (must include ://).","rank-math"),onChange:t.updateAppGoogleplayUrl}))}(t),wp.element.createElement(c.TextControl,{value:t.country,label:(0,e.__)("App Country","rank-math"),help:(0,e.__)("If your application is not available in the US App Store, you must set this value to the two-letter country code for the App Store that contains your application.","rank-math"),onChange:t.updateAppCountry}))})),ve=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{url:t.getTwitterPlayerUrl(),size:t.getTwitterPlayerSize(),stream:t.getTwitterPlayerStream(),ctype:t.getTwitterPlayerStreamCtype()}})),(0,t.withDispatch)((function(e){return{updatePlayerUrl:function(t){e("rank-math").updateTwitterPlayerUrl(t)},updatePlayerSize:function(t){e("rank-math").updateTwitterPlayerSize(t)},updatePlayerStreamUrl:function(t){e("rank-math").updateTwitterPlayerStreamUrl(t)},updatePlayerStreamCtype:function(t){e("rank-math").updateTwitterPlayerStreamCtype(t)}}})))((function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TextControl,{value:t.url,label:(0,e.__)("Player URL","rank-math"),help:(0,e.__)("HTTPS URL to iFrame player. This must be a HTTPS URL which does not generate active mixed content warnings in a web browser. The audio or video player must not require plugins such as Adobe Flash.","rank-math"),onChange:t.updatePlayerUrl}),wp.element.createElement(c.TextControl,{value:t.size,label:(0,e.__)("Player Size","rank-math"),help:(0,e.__)("iFrame width and height, specified in pixels in the following format: 600x400.","rank-math"),onChange:t.updatePlayerSize}),wp.element.createElement(c.TextControl,{value:t.stream,label:(0,e.__)("Stream URL","rank-math"),help:(0,e.__)("Optional URL to raw stream that will be rendered in Twitter’s mobile applications directly. If provided, the stream must be delivered in the MPEG-4 container format (the .mp4 extension). The container can store a mix of audio and video with the following codecs: Video: H.264, Baseline Profile (BP), Level 3.0, up to 640 x 480 at 30 fps. Audio: AAC, Low Complexity Profile (LC).","rank-math"),onChange:t.updatePlayerStreamUrl}),wp.element.createElement(c.TextControl,{value:t.ctype,label:(0,e.__)("Stream Content Type","rank-math"),help:(0,e.__)("The MIME type/subtype combination that describes the content contained in twitter:player:stream. Takes the form specified in RFC 6381. Currently supported content_type values are those defined in RFC 4337 (MIME Type Registration for MP4).","rank-math"),onChange:t.updatePlayerStreamCtype}))}));function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ye.apply(this,arguments)}var be=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=t.getTwitterUseFacebook(),a=function(){if(n&&t.getFacebookImage())return t.getFacebookImage();if(t.getTwitterImage())return t.getTwitterImage();var e=t.getFeaturedImage();return(0,s.isUndefined)(e)||""===e?rankMath.defautOgImage:t.getFeaturedImage().source_url}();return{useFacebook:n,cardType:t.getTwitterCardType(),title:n?t.getFacebookTitle():t.getTwitterTitle(),description:n?t.getFacebookDescription():t.getTwitterDescription(),serpTitle:t.getSerpTitle(),serpDescription:t.getSerpDescription(),author:t.getTwitterAuthor(),image:a,imageID:n?t.getFacebookImageID():t.getTwitterImageID(),hasOverlay:n?t.getFacebookHasOverlay():t.getTwitterHasOverlay(),imageOverlay:n?t.getFacebookImageOverlay():t.getTwitterImageOverlay()}})),(0,t.withDispatch)((function(e){return{removeImage:function(){e("rank-math").updateTwitterImage(""),e("rank-math").updateTwitterImageID(0),e("rank-math").updateTwitterHasOverlay(!1)},updateImage:function(t){e("rank-math").updateTwitterImage(t.url),e("rank-math").updateTwitterImageID(t.id)},updateTitle:function(t){e("rank-math").updateTwitterTitle(t)},updateDescription:function(t){e("rank-math").updateTwitterDescription(t)},updateImageOverlay:function(t){e("rank-math").updateTwitterImageOverlay(t)},toggleUseFacebook:function(t){e("rank-math").updateTwitterUseFacebook(t)},updateCardType:function(t){e("rank-math").updateTwitterCardType(t)},toggleOverlay:function(t){e("rank-math").updateTwitterHasOverlay(t)}}})))((function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(de,ye({},t,{network:"twitter",siteurl:rankMath.parentDomain,classes:t.cardType,description:(0,s.truncate)(t.description?t.description:t.serpDescription,{length:240,separator:" "})}),wp.element.createElement("div",{className:"social-name"},rankMath.assessor.serpData.authorName,wp.element.createElement("span",{className:"social-username"},"@",t.author),wp.element.createElement("span",{className:"social-time"},(0,e.__)("2h","rank-math"))),wp.element.createElement("div",{className:"social-text"},(0,e.__)("The card for your website will look little something like this!","rank-math"))),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Use Data from Facebook Tab","rank-math"),checked:t.useFacebook,onChange:t.toggleUseFacebook})),wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.SelectControl,{value:t.cardType,label:(0,e.__)("Card Type","rank-math"),options:[{value:"summary_large_image",label:(0,e.__)("Summary Card with Large Image","rank-math")},{value:"summary_card",label:(0,e.__)("Summary Card","rank-math")},{value:"app",label:(0,e.__)("App Card","rank-math")},{value:"player",label:(0,e.__)("Player Card","rank-math")}],onChange:t.updateCardType})),"player"===t.cardType&&wp.element.createElement("div",{className:"notice notice-alt notice-info"},wp.element.createElement("p",null,(0,e.__)("Video clips and audio streams have a special place on the Twitter platform thanks to the Player Card. Player Cards must be submitted for approval before they can be used. More information: ","rank-math"),wp.element.createElement("a",{href:"https://dev.twitter.com/cards/types/player",target:"blank"},"https://dev.twitter.com/cards/types/player"))),"app"===t.cardType&&wp.element.createElement("div",{className:"notice notice-alt notice-info"},wp.element.createElement("p",null,(0,e.__)("The App Card is a great way to represent mobile applications on Twitter and to drive installs. More information: ","rank-math"),wp.element.createElement("a",{href:"https://dev.twitter.com/cards/types/app",target:"blank"}," https://dev.twitter.com/cards/types/app"))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement(me,t),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-twitter-title"},(0,e.__)("Title","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextControl,{id:"rank-math-twitter-title",value:t.title,placeholder:t.serpTitle,onChange:t.updateTitle}),wp.element.createElement(W,{onClick:function(e){return t.updateTitle(t.title+" %"+e.variable+"%")}}))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement("label",{htmlFor:"rank-math-twitter-description"},(0,e.__)("Description","rank-math")),wp.element.createElement("div",{className:"variable-group"},wp.element.createElement(c.TextareaControl,{id:"rank-math-twitter-description",value:t.description,placeholder:t.serpDescription,onChange:t.updateDescription}),wp.element.createElement(W,{onClick:function(e){return t.updateDescription(t.description+" %"+e.variable+"%")}}))),!t.useFacebook&&"app"!==t.cardType&&wp.element.createElement("div",{className:"field-group"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Add icon overlay to thumbnail","rank-math"),checked:t.hasOverlay,onChange:t.toggleOverlay}),wp.element.createElement("div",{className:t.hasOverlay?"components-base-control":"hidden"},wp.element.createElement(c.SelectControl,{value:t.imageOverlay,label:(0,e.__)("Icon overlay","rank-math"),options:he(),onChange:t.updateImageOverlay}),!rankMath.isPro&&wp.element.createElement("div",{className:"notice notice-alt notice-warning"},wp.element.createElement("p",null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:ie("pro","Gutenberg Social Tab"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("You can add custom thumbnail overlays with {{link}}Rank Math Pro{{/link}}.","rank-math")))))),"player"===t.cardType&&wp.element.createElement(ve,null),"app"===t.cardType&&wp.element.createElement(we,null))})),ke=function(){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.TabPanel,{className:"rank-math-editor-social",activeClass:"is-active",tabs:[{name:"facebook",title:wp.element.createElement(r.Fragment,null,wp.element.createElement(c.Dashicon,{icon:"facebook-alt"}),(0,e.__)("Facebook","rank-math")),view:fe,className:"button-facebook"},{name:"twitter",title:wp.element.createElement(r.Fragment,null,wp.element.createElement(c.Dashicon,{icon:"twitter"}),(0,e.__)("Twitter","rank-math")),view:be,className:"button-twitter"}]},(function(e){return(0,r.createElement)(e.view)})))};function Te(e){return Te="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},Te(e)}function Ee(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _e(e,t){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_e(e,t)}function Oe(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,a=Ne(e);if(t){var r=Ne(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return xe(this,n)}}function xe(e,t){if(t&&("object"===Te(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 Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}var Se=function(t){!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&&_e(e,t)}(s,t);var n,a,i,o=Oe(s);function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=o.call(this))._handleRef=e._handleRef.bind(Ce(e)),e}return n=s,(a=[{key:"componentDidMount",value:function(){var e=se()(this.component),t=e.find(".stars a"),n=e.find(".smiley");t.on("mouseenter",(function(){var e=se()(this).index();t.removeClass("highlighted"),t.slice(0,e+1).addClass("highlighted"),e<2?n.removeClass("normal happy").addClass("angry"):e>3?n.removeClass("normal angry").addClass("happy"):n.removeClass("happy angry").addClass("normal")}))}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"_handleRef",value:function(e){this.component=e}},{key:"render",value:function(){for(var t=this,n=[],a=1;a<=5;a++)n.push(wp.element.createElement("a",{key:a,href:"https://s.rankmath.com/wpreview",target:"_blank",rel:"noopener noreferrer"},wp.element.createElement("span",{className:"dashicons dashicons-star-filled"})));return wp.element.createElement("div",{className:"ask-review",ref:this._handleRef},wp.element.createElement("h3",null,(0,e.__)("Rate Rank Math SEO","rank-math")),wp.element.createElement("p",null,wp.element.createElement(j,{tags:"em"},(0,e.__)("Hey, we noticed you are using Rank Math SEO plugin for more than a week now –{{em}}that's awesome!{{/em}} Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?","rank-math"))),wp.element.createElement("div",{className:"stars-wrapper"},wp.element.createElement("div",{className:"face"},wp.element.createElement("div",{className:"smiley happy"},wp.element.createElement("div",{className:"eyes"},wp.element.createElement("div",{className:"eye"}),wp.element.createElement("div",{className:"eye"})),wp.element.createElement("div",{className:"mouth"}))),wp.element.createElement("div",{className:"stars"},n)),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(r.Fragment,null,wp.element.createElement("span",null,(0,e.__)("I already did. Please don't show this message again.","rank-math"))),onChange:function(){return t.alreadyReviewed()}}))}},{key:"alreadyReviewed",value:function(){se().ajax({url:rankMath.ajaxurl,data:{action:"rank_math_already_reviewed",security:rankMath.security}}),rankMath.pluginReviewed=!0;var e=se()(this.component);e.animate({opacity:.01},1500,(function(){var t=se()(".rank-math-editor > .components-tab-panel__tabs > button");t.first().click(),t.last().remove(),e.remove()}))}}])&&Ee(n.prototype,a),i&&Ee(n,i),Object.defineProperty(n,"prototype",{writable:!1}),s}(r.Component),Ie=(0,c.withFilters)("rankMath.analytics.reportButton")((function(){return null})),De=(0,l.compose)((0,t.withSelect)((function(e){return{isOpen:e("rank-math").isSnippetEditorOpen()}})),(0,t.withDispatch)((function(e,t){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!t.isOpen)}}})))((function(t){var n=t.isOpen,a=t.initialTab,i=void 0===a?"":a,o=t.toggleEditor,s=[{name:"general",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-settings"}),wp.element.createElement("span",null,(0,e.__)("General","rank-math"))),view:re}];return rankMath.canUser.social&&s.push({name:"social",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-social"}),wp.element.createElement("span",null,(0,e.__)("Social","rank-math"))),view:ke}),rankMath.showReviewTab&&!1===rankMath.pluginReviewed&&s.push({name:"review",className:"review-tab",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-heart-filled"})),view:Se}),wp.element.createElement(r.Fragment,null,wp.element.createElement(c.Button,{isPrimary:!0,className:"rank-math-edit-snippet",onClick:o},(0,e.__)("Edit Snippet","rank-math")),""===i&&wp.element.createElement(Ie,null),n&&wp.element.createElement(c.Modal,{title:(0,e.__)("Preview Snippet Editor","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!1,onRequestClose:o,className:"rank-math-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement(c.TabPanel,{className:"rank-math-tabs rank-math-editor",activeClass:"is-active",initialTabName:i,tabs:s},(function(e){return(0,r.createElement)(e.view)}))))})),Me=function(){return wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(c.BaseControl,{className:"rank-math-social"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Social Media Preview","rank-math")),wp.element.createElement("p",{className:"cmb2-metabox-description"},(0,e.__)("Here you can view and edit the thumbnail, title and description that will be displayed when your site is shared on social media.","rank-math")),wp.element.createElement("p",{className:"cmb2-metabox-description"},(0,e.__)("Click on the button below to view and edit the preview.","rank-math")),wp.element.createElement(De,{buttonLabel:(0,e.__)("Preview & Edit Social Media","rank-math"),initialTab:"social"})))};function Ae(e){return Ae="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},Ae(e)}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}function Le(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,a=Ue(e);if(t){var r=Ue(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"===Ae(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 Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}var He=function(t){!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&&je(e,t)}(p,t);var n,a,i,l=Le(p);function p(){return Pe(this,p),l.apply(this,arguments)}return n=p,(a=[{key:"shouldComponentUpdate",value:function(e){return e.isLoaded!==this.props.isLoaded||e.selectedKeyword.index!==this.props.selectedKeyword.index||e.isRefreshing!==this.props.isRefreshing}},{key:"render",value:function(){var e=this,t=rankMathEditor.getSelectedKeyword();return this.results=rankMathEditor.resultManager.getResult(t),this.isPrimary=0===this.props.selectedKeyword.index,(0,s.isUndefined)(this.results)?null:Object.keys(this.getGroups()).map((function(t){return e.renderGroup(t)}))}},{key:"renderGroup",value:function(t){this.errors=0;var n=this.renderGroupItems(t);return wp.element.createElement(c.PanelBody,{key:"panel-"+t,title:wp.element.createElement(r.Fragment,null,this.getGroupTitle(t),0===this.errors?wp.element.createElement("span",{className:"rank-math-group-score test-ok"},(0,e.__)("All Good","rank-math")):wp.element.createElement("span",{className:"rank-math-group-score test-fail"},this.errors," ",(0,e.__)("Errors","rank-math"))),initialOpen:"basic"===t,className:"rank-math-checklist"},wp.element.createElement("ul",null,n))}},{key:"renderGroupItems",value:function(e){var t=this,n=this.results.results,a=this.getGroupItems(e);return Object.keys(a).map((function(e){if((0,s.isUndefined)(n[e])||!t.isPrimary&&a[e])return!1;var r=n[e],i=o()("seo-check-"+e,{"test-ok":r.hasScore(),"test-fail":!r.hasScore()});r.hasScore()&&["contentHasAssets","lengthContent","keywordDensity"].includes(e)&&(i+=" "+function(e,t){var n=(0,s.round)(e/t*100);if(!(100<=n))return 49<n?"test-check-good":30<n?"test-check-ok":"test-check-bad"}(r.getScore(),r.getMaxScore())),!1===r.hasScore()&&(t.errors+=1);var l=t.getLink(e);return wp.element.createElement("li",{key:e,className:i},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:r.getText()}}),l&&wp.element.createElement("a",{href:ie("score-100","Content Analysis Single Test KB")+l,rel:"noreferrer",target:"_blank",className:"dashicons-before dashicons-editor-help rank-math-help-icon"}))}))}},{key:"getGroupItems",value:function(e){return("post"===rankMath.objectType?{basic:{keywordInTitle:!0,keywordInMetaDescription:!0,keywordInPermalink:!0,keywordIn10Percent:!0,keywordInContent:!1,lengthContent:!1,hasProductSchema:!0},advanced:{keywordInSubheadings:!1,keywordInImageAlt:!0,keywordDensity:!1,lengthPermalink:!1,linksHasExternals:!1,linksNotAllExternals:!1,linksHasInternal:!1,keywordNotUsed:!0,hasContentAI:!0,isReviewEnabled:!0},"title-readability":{titleStartWithKeyword:!0,titleSentiment:!1,titleHasPowerWords:!1,titleHasNumber:!1},"content-readability":{contentHasTOC:!1,contentHasShortParagraphs:!1,contentHasAssets:!1}}:{basic:{keywordInTitle:!0,keywordInMetaDescription:!0,keywordInPermalink:!0},advanced:{titleStartWithKeyword:!0,keywordNotUsed:!0}})[e]}},{key:"getGroupTitle",value:function(e){return this.getGroups()[e]}},{key:"getGroups",value:function(){return"post"===rankMath.objectType?{basic:(0,e.__)("Basic SEO","rank-math"),advanced:(0,e.__)("Additional","rank-math"),"title-readability":(0,e.__)("Title Readability","rank-math"),"content-readability":(0,e.__)("Content Readability","rank-math")}:{basic:(0,e.__)("Basic SEO","rank-math"),advanced:(0,e.__)("Additional","rank-math")}}},{key:"getLink",value:function(e){var t={keywordInTitle:"#focus-keyword-in-the-seo-title-primary-focus-keyword-only",keywordInMetaDescription:"#focus-keyword-in-the-meta-description-primary-focus-keyword-only",keywordInPermalink:"#focus-keyword-in-the-url-primary-focus-keyword-only",keywordIn10Percent:"#focus-keyword-at-the-beginning-of-the-content",keywordInContent:"#focus-keyword-in-the-content-runs-of-all-focus-keywords",lengthContent:"#overall-content-length",keywordInSubheadings:"#focus-keyword-in-subheading-primary-and-secondary-focus-keywords",keywordInImageAlt:"#focus-keyword-in-image-alt-attributes-primary-focus-keyword-only",keywordDensity:"#keyword-density-primary-and-secondary-focus-keywords",lengthPermalink:"#url-length",linksHasExternals:"#linking-to-external-sources",linksNotAllExternals:"#linking-to-external-content-with-a-followed-link",linksHasInternal:"#linking-to-internal-resources",keywordNotUsed:"#focus-keyword-uniqueness-primary-focus-keyword-only",titleStartWithKeyword:"#focus-keyword-at-the-beginning-of-the-seo-title-only-for-primary-keyword",titleSentiment:"#sentiment-in-a-title",titleHasPowerWords:"#use-of-power-word-in-title",titleHasNumber:"#number-in-title",contentHasTOC:"#table-of-contents",contentHasShortParagraphs:"#use-of-short-paragraphs",contentHasAssets:"#use-of-media-in-your-posts",hasContentAI:"#used-content-ai",hasProductSchema:"#has-product-schema",isReviewEnabled:"#is-review-enabled"};return(0,s.has)(t,e)?t[e]:""}}])&&Re(n.prototype,a),i&&Re(n,i),Object.defineProperty(n,"prototype",{writable:!1}),p}(r.Component),Be=(0,t.withSelect)((function(e){var t=e("rank-math");return{isLoaded:t.isLoaded(),isRefreshing:t.isRefreshing(),selectedKeyword:t.getSelectedKeyword()}}))(He),Ve=(0,c.createSlotFill)("RankMathAfterFocusKeyword"),ze=Ve.Fill,We=Ve.Slot,Ge=function(e){var t=e.children,n=e.className;return wp.element.createElement(ze,null,wp.element.createElement("div",{className:n},t))};Ge.Slot=We;var Ke=Ge,$e=(0,t.withSelect)((function(e){return{isPro:e("rank-math").isPro()}}))((function(t){return t.isPro?rankMath.isUserRegistered?wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:ie("score-100","General Tab Score Notice"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Read here to {{link}}Score 100/100{{/link}} ","rank-math"))):wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:rankMath.adminurl+"?page=rank-math&view=help",target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Activate your account by {{link}}connecting to Rank Math!{{/link}} ","rank-math"))):wp.element.createElement(c.Notice,{status:"warning",isDismissible:!1},wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:ie("pro","Gutenberg General Tab Notice"),target:"_blank",rel:"noopener noreferrer"}),strong:wp.element.createElement("strong",null)}},(0,e.__)("Want more? {{link}}{{strong}}Upgrade today to the PRO{{/strong}}{{/link}} version.","rank-math")))})),qe=(0,l.withInstanceId)((function(e){var t=e.className,n=e.instanceId,a=e.children,r="rank-math-tooltip-"+n,i=o()("rank-math-tooltip",t);return wp.element.createElement("span",{className:i},wp.element.createElement("input",{id:r,type:"checkbox"}),wp.element.createElement("label",{htmlFor:r,className:"dashicons-before dashicons-editor-help"}),wp.element.createElement("div",{className:"rank-math-tooltip-content"},a))})),Ye=n(634),Xe=n.n(Ye);function Je(e){return Je="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},Je(e)}function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ze.apply(this,arguments)}function Qe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function et(e,t){return et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},et(e,t)}function tt(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,a=rt(e);if(t){var r=rt(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return nt(this,n)}}function nt(e,t){if(t&&("object"===Je(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return at(e)}function at(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}var it=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&&et(e,t)}(o,e);var t,n,r,i=tt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e))._handleRef=t._handleRef.bind(at(t)),t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this;this.tagify=new(Xe())(this.component,this.props.settings||{}),this.props.settings.callbacks.setup&&setTimeout((function(){e.props.settings.callbacks.setup.call(e.tagify),e.tagify.DOM.input.setAttribute("contenteditable",!0),e.tagify.DOM.input.addEventListener("blur",e.props.settings.callbacks.blur)}),100),this.props.settings.callbacks.dragEnd&&this.tagify.DOM.scope.addEventListener("dragend",this.props.settings.callbacks.dragEnd),(0,a.doAction)("rank_math_tagify_init",this)}},{key:"shouldComponentUpdate",value:function(e){return this.tagify.settings.whitelist=e.settings.whitelist,e.showDropdown&&this.tagify.dropdown.show.call(this.tagify,e.showDropdown),!1===e.showDropdown&&this.tagify.dropdown.hide.call(this.tagify,!0),!1}},{key:"_handleRef",value:function(e){this.component=e}},{key:"render",value:function(){var e={ref:this._handleRef,name:this.props.name,className:this.props.className,placeholder:this.props.placeholder};return"textarea"===this.props.mode?wp.element.createElement("textarea",Ze({},e,{defaultValue:this.props.initialValue})):wp.element.createElement("input",Ze({},e,{defaultValue:this.props.initialValue}))}},{key:"toArray",value:function(){return this.tagify.value.map((function(e){return e.value}))}},{key:"toString",value:function(){return this.toArray().join(",")}},{key:"queryTags",value:function(){return this.tagify.DOM.scope.querySelectorAll("tag")}}])&&Qe(t.prototype,n),r&&Qe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(r.Component),ot=function(t){var n=t.onClick;return wp.element.createElement(c.Modal,{title:(0,e.__)("Upgrade to re-order Focus Keywords","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!0,onRequestClose:function(){return n()},className:"rank-math-modal rank-math-focus-keywords-cta-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement("div",{className:"components-panel__body rank-math-focus-keywords-cta-wrapper"},wp.element.createElement("div",{id:"rank-math-pro-cta",className:"center"},wp.element.createElement("div",{className:"rank-math-cta-box blue-ticks"},wp.element.createElement("ul",null,wp.element.createElement("li",null,(0,e.__)("Improve the SEO workflow","rank-math")),wp.element.createElement("li",null,(0,e.__)("Set different Primary Focus Keyword","rank-math")),wp.element.createElement("li",null,(0,e.__)("and many other premium SEO features","rank-math"))),wp.element.createElement("a",{className:"button button-primary is-green",href:rankMath.trendsUpgradeLink,rel:"noreferrer noopener",target:"_blank"},rankMath.trendsUpgradeLabel)))))};function st(e){return st="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},st(e)}function lt(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ct(e,t){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ct(e,t)}function pt(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,a=mt(e);if(t){var r=mt(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return dt(this,n)}}function dt(e,t){if(t&&("object"===st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ut(e)}function ut(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mt(e){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mt(e)}function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gt=function(t){!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&&ct(e,t)}(c,t);var n,i,o,l=pt(c);function c(e){var t,n=e.keywords;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),ht(ut(t=l.call(this)),"state",{}),ht(ut(t),"request",null),ht(ut(t),"hasAdded",!1),ht(ut(t),"clickCount",0),ht(ut(t),"singleClickTimer",null),t.state={showCTA:!1},t.tagifyField=(0,r.createRef)(),t.keywords=n,t.hideDropdown=t.hideDropdown.bind(ut(t)),t.callbacks={add:t.onAdd.bind(ut(t)),remove:(0,s.debounce)(t.onRemove.bind(ut(t)),300),"edit:updated":t.onEditUpdated.bind(ut(t)),click:t.onClick.bind(ut(t)),dragEnd:t.onDragEnd.bind(ut(t)),setup:t.onSetup.bind(ut(t)),blur:t.hideDropdown},rankMath.autoSuggestKeywords&&(t.callbacks.input=(0,s.debounce)(t.onInput.bind(ut(t)),300)),window.rankMathEditor.focusKeywordField=ut(t),t}return n=c,(i=[{key:"render",value:function(){var t=this,n=(0,a.applyFilters)("rank_math_focus_keyword_settings",{addTagOnBlur:!0,maxTags:"post"===rankMath.objectType?rankMath.maxTags:1,whitelist:this.state.whitelist||[],focusableTags:!0,transformTag:function(e){e.value=t.stripTags(e.value.replaceAll(",",""))},templates:{tag:function(e){var n=e.title||e.value,a="";if(!e.class){var r=rankMathEditor.resultManager.getScore(K.Helpers.removeDiacritics(n));a+=t.getScoreClass(r)}return"<tag draggable='true' title='".concat(t.stripTags(n),"'\n tabIndex='0'\n contenteditable='false'\n spellcheck='false'\n class='tagify__tag ").concat(e.class?e.class:a,"'\n ").concat(t.getAttributesEsc(e),">\n <x title='' class='tagify__tag__removeBtn' role='button' aria-label='remove tag'></x>\n <div>\n <span class='tagify__tag-text'>").concat(t.stripTags(n),"</span>\n </div>\n </tag>")}},callbacks:this.callbacks},this);return this.setKeywordsClasses(),wp.element.createElement(React.Fragment,null,wp.element.createElement(it,{ref:this.tagifyField,mode:"input",settings:n,showDropdown:this.state.showDropdown,initialValue:this.keywords,placeholder:(0,e.__)("Example: Rank Math SEO","rank-math")}),this.state.showCTA&&wp.element.createElement(ot,{onClick:function(){return t.setState({showCTA:!1})}}))}},{key:"shouldComponentUpdate",value:function(e,t){return this.state.showCTA!==t.showCTA||this.state.showDropdown!==t.showDropdown||e.isRefreshing!==this.props.isRefreshing||e.keywords!==this.props.keywords}},{key:"getScoreClass",value:function(e){return 80<e?"good-fk":50<e?"ok-fk":"bad-fk"}},{key:"setKeywordsClasses",value:function(){var e=this;if(null!==this.tagifyField.current){var t=this.tagifyField.current,n=t.tagify.value;if(n.length>0){var a=t.queryTags();n.map((function(t,n){if(!(0,s.isUndefined)(a[n])){var r=rankMathEditor.resultManager.getScore(K.Helpers.removeDiacritics(t.value));a[n].classList.remove("ok-fk","good-fk","bad-fk"),a[n].classList.add(e.getScoreClass(r))}}))}}}},{key:"onSetup",value:function(){this.selectFirstKeyword(),this.setKeywordsClasses()}},{key:"onInput",value:function(e){var t=this;(e=(0,s.has)(e.detail,"value")?e.detail.value:e.detail.data.value).length<2||(this.hideDropdown(),this.hasAdded?this.hasAdded=!1:this.request=se().ajax({url:rankMath.keywordsApi.url,data:{keyword:e,locale:rankMath.locale},success:function(n){if(t.hasAdded)t.hasAdded=!1;else{var a=se().map(n,(function(e){return e}));t.setState({whitelist:a,showDropdown:e})}}}))}},{key:"onAdd",value:function(e){this.hasAdded=!0,0===e.detail.index&&this.props.updateSelectedKeyword(e.detail,this.tagifyField.current),this.updateKeywords()}},{key:"onRemove",value:function(e){this.hideDropdown(),0===e.detail.index&&this.onSetup(),rankMathEditor.resultManager.deleteResult(e.detail.data.value),this.selectFirstKeyword(),this.updateKeywords()}},{key:"onClick",value:function(e){var t=this;this.clickCount++,1===this.clickCount?this.singleClickTimer=setTimeout((function(){t.clickCount=0,t.props.updateSelectedKeyword(e.detail,t.tagifyField.current)}),400):2===this.clickCount&&(clearTimeout(this.singleClickTimer),this.clickCount=0)}},{key:"onEditUpdated",value:function(e){this.hasAdded=!0,0===e.detail.index&&this.props.updateSelectedKeyword(e.detail,this.tagifyField.current),this.updateKeywords()}},{key:"selectFirstKeyword",value:function(){var e=this.tagifyField.current,t=e.tagify.value,n={tag:"",index:0,data:{value:""}};t.length>0&&(n={tag:e.queryTags()[0],index:0,data:{value:t[0].value}}),this.props.updateSelectedKeyword(n,e)}},{key:"updateKeywords",value:function(){var e=this.tagifyField.current,t=this.stripTags(e.toString());this.props.updateKeywords(t)}},{key:"onDragEnd",value:function(){1!==this.tagifyField.current.queryTags().length&&this.setState({showCTA:!0})}},{key:"hideDropdown",value:function(){null!==this.request&&(this.request.abort(),this.request=null),this.setState({whitelist:[],showDropdown:!1})}},{key:"getAttributesEsc",value:function(e){if("[object Object]"!==Object.prototype.toString.call(e))return"";var t,n,a="",r=Object.keys(e);for(n=r.length;n--;)"class"!==(t=r[n])&&e.hasOwnProperty(t)&&e[t]&&(a+=""+t+(e[t]?'="'.concat(this.stripTags(e[t]),'"'):""));return a}},{key:"stripTags",value:function(e){return e=se()("<textarea />").html(e).text(),((new DOMParser).parseFromString(e,"text/html").body.textContent||"").replace(/["<>]/g,"")||""}}])&&lt(n.prototype,i),o&&lt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),c}(r.Component),ft=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{keywords:t.getKeywords(),isRefreshing:t.isRefreshing()}})),(0,t.withDispatch)((function(e){return{updateKeywords:function(t){e("rank-math").updateKeywords(t)},updateSelectedKeyword:function(t,n){n.queryTags().forEach((function(e){e.classList.remove("selected")})),(0,s.isUndefined)(t.tag)||""===t.tag||t.tag.classList.add("selected"),e("rank-math").updateSelectedKeyword(t)}}})))(gt),wt=(0,c.withFilters)("rankMath.focusKeywords.Trends")((0,l.compose)((0,t.withSelect)((function(e){return{isTrendsCtaOpen:e("rank-math").isTrendsCtaOpen()}})),(0,t.withDispatch)((function(e,t){return{toggleTrendsCta:function(){e("rank-math").toggleTrendsCta(!t.isTrendsCtaOpen)}}})))((function(t){var n=t.isTrendsCtaOpen,a=t.toggleTrendsCta;return wp.element.createElement(r.Fragment,null,wp.element.createElement("a",{href:"#",title:(0,e.__)("Trends","rank-math"),rel:"noreferrer noopener",id:"rank-math-compare-keywords-trigger",className:"button button-icon rank-math-compare-keywords-trigger",dangerouslySetInnerHTML:{__html:rankMath.trendsIcon},onClick:a}),n&&wp.element.createElement(c.Modal,{title:(0,e.__)("Google Trends","rank-math"),closeButtonLabel:(0,e.__)("Close","rank-math"),shouldCloseOnClickOutside:!0,onRequestClose:a,className:"rank-math-modal rank-math-trends-cta-modal",overlayClassName:"rank-math-modal-overlay"},wp.element.createElement("div",{className:"components-panel__body rank-math-trends-cta-wrapper"},wp.element.createElement("img",{src:rankMath.trendsPreviewImage,alt:"",className:"trends-cta blurred"}),wp.element.createElement("div",{id:"rank-math-pro-cta",className:"center"},wp.element.createElement("div",{className:"rank-math-cta-box blue-ticks width-50"},wp.element.createElement("h3",null,(0,e.__)("Track Keyword Trends","rank-math")),wp.element.createElement("ul",null,wp.element.createElement("li",null,(0,e.__)("Data fetched directly from Google","rank-math")),wp.element.createElement("li",null,(0,e.__)("Analyze search trends and compare keywords","rank-math")),wp.element.createElement("li",null,(0,e.__)("See data from a particular Country or timeframe","rank-math"))),wp.element.createElement("a",{className:"button button-primary is-green",href:rankMath.trendsUpgradeLink,rel:"noreferrer noopener",target:"_blank"},rankMath.trendsUpgradeLabel))))))}))),vt=(0,c.withFilters)("rankMath.analytics.contentAI")((function(){return!1})),yt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{isLoaded:t.isLoaded(),isPillarContent:t.getPillarContent()}})),(0,t.withDispatch)((function(e){return{togglePillarContent:function(t){e("rank-math").updatePillarContent(t)}}})))((function(t){var n=t.isLoaded,a=t.isPillarContent,i=t.togglePillarContent;return n?wp.element.createElement(c.PanelBody,{initialOpen:!0,className:"rank-math-focus-keyword"},wp.element.createElement("h2",{className:"components-panel__body-title"},(0,e.__)("Focus Keyword","rank-math"),wp.element.createElement(qe,null,wp.element.createElement(j,{components:{link:wp.element.createElement("a",{href:ie("score-100","General Focus Keyword"),target:"_blank",rel:"noopener noreferrer"})}},(0,e.__)("Insert keywords you want to rank for. Try to {{link}}attain 100/100 points{{/link}} for better chances of ranking.","rank-math")))),wp.element.createElement(wt,null),rankMath.currentEditor&&"classic"!==rankMath.currentEditor&&wp.element.createElement(vt,null),wp.element.createElement(Ke.Slot,null,(function(e){return e.length>0?e:[]})),wp.element.createElement("div",null,wp.element.createElement(ft,null)),wp.element.createElement($e,null),"post"===rankMath.objectType&&wp.element.createElement(c.CheckboxControl,{className:"pillar-content",label:wp.element.createElement(r.Fragment,null,wp.element.createElement("strong",null,(0,e.__)("This post is Pillar Content","rank-math")),wp.element.createElement("a",{href:ie("pillar-content-internal-linking","Pillar Content"),rel:"noreferrer",target:"_blank",className:"dashicons-before dashicons-editor-help rank-math-help-icon"})),checked:a,onChange:i})):null})),bt=(0,c.createSlotFill)("RankMathAfterEditor"),kt=bt.Fill,Tt=bt.Slot,Et=function(e){var t=e.children,n=e.className;return wp.element.createElement(kt,null,wp.element.createElement(c.PanelRow,{className:n},t))};Et.Slot=Tt;var _t=Et,Ot=(0,t.withDispatch)((function(e){return{toggleEditor:function(){e("rank-math").toggleSnippetEditor(!0)}}}))((function(e){var t=e.toggleEditor;return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(ae,{onClick:t}),wp.element.createElement(De,null),wp.element.createElement(_t.Slot,null,(function(e){return e.length>0?e:[]}))),wp.element.createElement(yt,null),rankMath.canUser.analysis&&wp.element.createElement(Be,null))})),xt=function(e,t,n){return!1===n?delete e[t]:e[t]=!0,e},Ct=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math").getRobots();return{robots:t,isRobotIndex:"index"in t,isRobotNoIndex:"noindex"in t,isRobotNoFollow:"nofollow"in t,isRobotNoArchive:"noarchive"in t,isRobotNoImageIndex:"noimageindex"in t,isRobotNoSnippet:"nosnippet"in t}})),(0,t.withDispatch)((function(e,t){var n=t.robots;return{updateRobots:function(t,a){n=xt(n,t,a),"index"===t&&(n=xt(n,"noindex",!a)),"noindex"===t&&(n=xt(n,"index",!a)),e("rank-math").updateRobots(n)}}})))((function(t){return wp.element.createElement(c.BaseControl,{className:"rank-math-robots",id:"rank-math-robots",label:(0,e.__)("Robots Meta","rank-math")},wp.element.createElement("div",{className:"rank-math-robots-list"},wp.element.createElement(c.CheckboxControl,{className:"robot-choice-index",label:wp.element.createElement(r.Fragment,null,(0,e.__)("Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Instructs search engines to index and show these pages in the search results","rank-math"))),checked:t.isRobotIndex,onChange:function(e){return t.updateRobots("index",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noindex",label:wp.element.createElement(r.Fragment,null,(0,e.__)("No Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents pages from being indexed and displayed in search engine result pages","rank-math"))),checked:t.isRobotNoIndex,onChange:function(e){return t.updateRobots("noindex",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-nofollow",label:wp.element.createElement(r.Fragment,null,(0,e.__)("Nofollow","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents search engines from following links on the pages","rank-math"))),checked:t.isRobotNoFollow,onChange:function(e){return t.updateRobots("nofollow",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noarchive",label:wp.element.createElement(r.Fragment,null,(0,e.__)("No Archive","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents search engines from showing Cached links for pages","rank-math"))),checked:t.isRobotNoArchive,onChange:function(e){return t.updateRobots("noarchive",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-noimageindex",label:wp.element.createElement(r.Fragment,null,(0,e.__)("No Image Index","rank-math"),wp.element.createElement(qe,null,(0,e.__)("This option prevents images on a page from being indexed by Google and other search engines","rank-math"))),checked:t.isRobotNoImageIndex,onChange:function(e){return t.updateRobots("noimageindex",e)}}),wp.element.createElement(c.CheckboxControl,{className:"robot-choice-nosnippet",label:wp.element.createElement(r.Fragment,null,(0,e.__)("No Snippet","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Prevents a snippet from being shown in the search results","rank-math"))),checked:t.isRobotNoSnippet,onChange:function(e){return t.updateRobots("nosnippet",e)}})))}));function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){It(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math");return{redirectionID:t.getRedirectionID(),redirectionUrl:t.getRedirectionUrl(),redirectionType:t.getRedirectionType(),hasRedirect:t.hasRedirect()}})),(0,t.withDispatch)((function(e,t){return{toggle:function(){e("rank-math").updateHasRedirect(!t.hasRedirect),e("rank-math").updateRedirectionItem(St(St({},t),{},{hasRedirect:!t.hasRedirect}))},updateRedirection:function(n,a){e("rank-math").updateRedirection(n,a),e("rank-math").updateRedirectionItem(St(St({},t),{},It({},n,a)))}}})))((function(t){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.ToggleControl,{className:t.hasRedirect?"is-open":"is-close",label:(0,e.__)("Redirect","rank-math"),checked:t.hasRedirect,onChange:function(){return t.toggle()}}),t.hasRedirect&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Redirection Type","rank-math"),className:t.hasRedirect?"":"hidden",value:t.redirectionType,onChange:function(e){return t.updateRedirection("redirectionType",e)},options:[{value:"301",label:(0,e.__)("301 Permanent Move","rank-math")},{value:"302",label:(0,e.__)("302 Temporary Move","rank-math")},{value:"307",label:(0,e.__)("307 Temporary Redirect","rank-math")},{value:"410",label:(0,e.__)("410 Content Deleted","rank-math")},{value:"451",label:(0,e.__)("451 Content Unavailable for Legal Reasons","rank-math")}]}),!1===["410","451"].includes(t.redirectionType)&&wp.element.createElement(c.TextControl,{type:"url",autoComplete:"off",label:(0,e.__)("Destination URL","rank-math"),value:t.redirectionUrl,placeholder:"https://rankmath.com/",className:t.hasRedirect?"":"hidden",onChange:function(e){return t.updateRedirection("redirectionUrl",e)}}),wp.element.createElement(c.TextControl,{type:"hidden",value:t.redirectionID,className:"hidden"}))})),Mt=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math"),n=rankMathEditor.assessor.dataCollector;return{placeholder:t.getCanonicalUrl()?t.getCanonicalUrl():n.getPermalink()?n.getPermalink():"https://rankmath.com/",canonicalUrl:t.getCanonicalUrl()}})),(0,t.withDispatch)((function(e){return{onUrlChange:function(t){e("rank-math").updateCanonicalUrl(t)}}})))((function(t){var n=t.canonicalUrl,a=t.placeholder,r=t.onUrlChange;return wp.element.createElement(c.BaseControl,{className:"rank-math-canonical"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Canonical URL","rank-math"),wp.element.createElement(qe,null,(0,e.__)("The canonical URL informs search crawlers which page is the main page if you have double content","rank-math"))),wp.element.createElement(c.TextControl,{type:"url",autoComplete:"off",value:n,placeholder:a,onChange:function(e){return r(e)}}))})),At=(0,l.compose)((0,t.withSelect)((function(e){return{title:e("rank-math").getBreadcrumbTitle()}})),(0,t.withDispatch)((function(e){return{onTitleChange:function(t){e("rank-math").updateBreadcrumbTitle(t)}}})))((function(t){var n=t.title,a=t.onTitleChange;return wp.element.createElement(c.BaseControl,{className:"rank-math-breadcrumb-title"},wp.element.createElement("span",{className:"components-base-control__label"},(0,e.__)("Breadcrumb Title","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Breadcrumb Title to use for this post","rank-math"))),wp.element.createElement(c.TextControl,{value:n,onChange:function(e){return a(e)}}))}));function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach((function(t){jt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lt={"max-snippet":-1,"max-video-preview":-1,"max-image-preview":"large"},Ft=(0,l.compose)((0,t.withSelect)((function(e){var t=e("rank-math").getAdvancedRobots(),n=Rt({},t);(0,s.defaults)(n,Lt);var a=null,r=null,i=null;return"max-snippet"in t&&(a=n["max-snippet"]),"max-image-preview"in t&&(r=n["max-image-preview"]),"max-video-preview"in t&&(i=n["max-video-preview"]),{meta:t,isSnippet:a,isImage:r,isVideo:i,maxSnippet:a?n["max-snippet"]:-1,maxImage:n["max-image-preview"],maxVideo:i?n["max-video-preview"]:-1}})),(0,t.withDispatch)((function(e,t){var n=Rt({},t.meta);return{updateRobots:function(t,a){(0,s.isBoolean)(a)?!1===a?delete n[t]:n[t]=Lt[t]:n[t]=a,e("rank-math").updateAdvancedRobots(n)}}})))((function(t){return wp.element.createElement(c.BaseControl,{className:"rank-math-robots",id:"rank-math-robots",label:(0,e.__)("Advanced Robots Meta","rank-math")},wp.element.createElement("div",{className:"rank-math-robots-list advanced-robots"},wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(r.Fragment,null,(0,e.__)("Max Snippet","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum text-length, in characters, of a snippet for your page","rank-math"))),checked:t.isSnippet,onChange:function(e){return t.updateRobots("max-snippet",e)}}),wp.element.createElement(c.TextControl,{type:"number",value:t.maxSnippet,onChange:function(e){return t.updateRobots("max-snippet",e)}}),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(r.Fragment,null,(0,e.__)("Max Video Preview","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum duration in seconds of an animated video preview","rank-math"))),checked:t.isVideo,onChange:function(e){return t.updateRobots("max-video-preview",e)}}),wp.element.createElement(c.TextControl,{type:"number",value:t.maxVideo,onChange:function(e){return t.updateRobots("max-video-preview",e)}}),wp.element.createElement(c.CheckboxControl,{label:wp.element.createElement(r.Fragment,null,(0,e.__)("Max Image Preview","rank-math"),wp.element.createElement(qe,null,(0,e.__)("Specify a maximum size of image preview to be shown for images on this page","rank-math"))),checked:t.isImage,onChange:function(e){return t.updateRobots("max-image-preview",e)}}),wp.element.createElement(c.SelectControl,{value:t.maxImage,onChange:function(e){return t.updateRobots("max-image-preview",e)},options:[{value:"large",label:(0,e.__)("Large","rank-math")},{value:"standard",label:(0,e.__)("Standard","rank-math")},{value:"none",label:(0,e.__)("None","rank-math")}]})))})),Ut=(0,l.compose)((0,t.withSelect)((function(e){return{showScore:e("rank-math").getShowScoreFrontend()}})),(0,t.withDispatch)((function(e){return{toggleScore:function(t){e("rank-math").toggleFrontendScore(t)}}})))((function(t){var n=t.showScore,a=t.toggleScore;return wp.element.createElement(c.BaseControl,{className:"rank-math-frontend-score"},wp.element.createElement(c.ToggleControl,{label:(0,e.__)("Show SEO Score on Front-end","rank-math"),checked:n,onChange:a}))})),Ht=(0,c.createSlotFill)("RankMathAdvancedTab"),Bt=Ht.Fill,Vt=Ht.Slot,zt=function(e){var t=e.children,n=e.className;return wp.element.createElement(Bt,null,wp.element.createElement(c.PanelRow,{className:n},t))};zt.Slot=Vt;var Wt=zt,Gt=(0,c.withFilters)("rankMath.advanced.newsSitemap")((function(){return null})),Kt=function(){return wp.element.createElement(r.Fragment,null,wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(Ct,null)),wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(Ft,null)),wp.element.createElement(Gt,null),wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(Mt,null)),rankMath.assessor.hasBreadcrumb&&wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(At,null)),rankMath.assessor.hasRedirection&&wp.element.createElement(c.PanelBody,{initialOpen:!0,className:"rank-math-redirect"},wp.element.createElement(Dt,null)),rankMath.frontEndScore&&wp.element.createElement(c.PanelBody,{initialOpen:!0},wp.element.createElement(Ut,null)),wp.element.createElement(Wt.Slot,null,(function(e){return e.length>0?e:[]})))},$t=n(279),qt=n.n($t),Yt={init:function(){this.cacheProps(),this.initVars(),this.bindEvents()},cacheProps:function(){this.root=document.documentElement,this.$wpAdminbar=se()("#wpadminbar")},initVars:function(){this.$wpAdminbar.length&&this.setWpAdminbarHeight.call(this)},bindEvents:function(){window.addEventListener("resize",qt()(this.onWindowResize.bind(this)))},onWindowResize:function(){this.$wpAdminbar.length&&this.setWpAdminbarHeight.call(this)},setWpAdminbarHeight:function(){this.root.style.setProperty("--rankmath-wp-adminbar-height",this.$wpAdminbar.outerHeight()+"px")}};se()((function(){Yt.init()}));var Xt=function(e){"social"===e&&(0,t.dispatch)("rank-math").toggleSnippetEditor(!0)},Jt=function(){return wp.element.createElement(_,{className:"rank-math-tabs",activeClass:"is-active",tabs:(t=[],rankMath.canUser.general&&t.push({name:"general",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-settings",title:(0,e.__)("General","rank-math")}),wp.element.createElement("span",null,(0,e.__)("General","rank-math"))),view:Ot,className:"rank-math-general-tab"}),rankMath.canUser.advanced&&t.push({name:"advanced",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-toolbox",title:(0,e.__)("Advanced","rank-math")}),wp.element.createElement("span",null,(0,e.__)("Advanced","rank-math"))),view:Kt,className:"rank-math-advanced-tab"}),rankMath.canUser.social&&t.push({name:"social",title:wp.element.createElement(r.Fragment,null,wp.element.createElement("i",{className:"rm-icon rm-icon-social",title:(0,e.__)("Social","rank-math")}),wp.element.createElement("span",null,(0,e.__)("Social","rank-math"))),view:Me,className:"rank-math-social-tab"}),(0,a.applyFilters)("rank_math_sidebar_tabs",t)),onSelect:Xt},(function(e){return wp.element.createElement("div",{className:"rank-math-tab-content-"+e.name},(0,r.createElement)(e.view))}));var t};(0,a.addAction)("rank_math_loaded","rank-math",(function(){(0,a.addFilter)("rank_math_app","rank-math",(function(){return Jt}))}))}()}();
assets/admin/js/validate.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t,a={n:function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},d:function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:function(t,a){return Object.prototype.hasOwnProperty.call(t,a)}},e=jQuery;(t=a.n(e)())((function(){window.rankMathValidate={init:function(){this.extendLibrary(),this.watchFields()},extendLibrary:function(){t.validator.addMethod("regex",(function(a,e,n){var i=new RegExp("string"==typeof n?n:t(e).data("validate-pattern"));return this.optional(e)||i.test(a)}),rankMath.validationl10n.regexErrorDefault),t.extend(t.validator.messages,{required:rankMath.validationl10n.requiredErrorDefault,email:rankMath.validationl10n.emailErrorDefault,url:rankMath.validationl10n.urlErrorDefault}),t.extend(t.validator.defaults,{errorClass:"invalid"})},watchFields:function(){var a=this;t(".rank-math-validate-field").on("focus","input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea",(function(){a.fieldValidation(t(this).closest("form"))}))},fieldValidation:function(t){return"1"!==t.data("validated")&&(t.data("validated","1").validate(),!0)}},window.rankMathValidate.init()}))}();
1
+ !function(){var t={587:function(t,e,i){var s,n,r;n=[i(311)],s=function(t){t.extend(t.fn,{validate:function(e){if(this.length){var i=t.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",(function(e){i.submitButton=e.currentTarget,t(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(i.cancelSubmit=!0)})),this.on("submit.validate",(function(e){function s(){var s,n;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),!(i.settings.submitHandler&&!i.settings.debug)||(n=i.settings.submitHandler.call(i,i.currentForm,e),s&&s.remove(),void 0!==n&&n)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)}))),i)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,i,s;return t(this[0]).is("form")?e=this.validate().form():(s=[],e=!0,i=t(this[0].form).validate(),this.each((function(){(e=i.element(this)&&e)||(s=s.concat(i.errorList))})),i.errorList=s),e},rules:function(e,i){var s,n,r,a,o,l,h=this[0],d=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=h&&(!h.form&&d&&(h.form=this.closest("form")[0],h.name=this.attr("name")),null!=h.form)){if(e)switch(n=(s=t.data(h.form,"validator").settings).rules,r=t.validator.staticRules(h),e){case"add":t.extend(r,t.validator.normalizeRule(i)),delete r.messages,n[h.name]=r,i.messages&&(s.messages[h.name]=t.extend(s.messages[h.name],i.messages));break;case"remove":return i?(l={},t.each(i.split(/\s/),(function(t,e){l[e]=r[e],delete r[e]})),l):(delete n[h.name],r)}return(a=t.validator.normalizeRules(t.extend({},t.validator.classRules(h),t.validator.attributeRules(h),t.validator.dataRules(h),t.validator.staticRules(h)),h)).required&&(o=a.required,delete a.required,a=t.extend({required:o},a)),a.remote&&(o=a.remote,delete a.remote,a=t.extend(a,{remote:o})),a}}});var e,i=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.extend(t.expr.pseudos||t.expr[":"],{blank:function(e){return!i(""+t(e).val())},filled:function(e){var s=t(e).val();return null!==s&&!!i(""+s)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(void 0===i||(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,(function(t,i){e=e.replace(new RegExp("\\{"+t+"\\}","g"),(function(){return i}))}))),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,i){var s=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===i.which&&""===this.elementValue(e)||-1!==t.inArray(i.keyCode,s)||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var e,i=this.currentForm,s=this.groups={};function n(e){var s=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");if(!this.form&&s&&(this.form=t(this).closest("form")[0],this.name=t(this).attr("name")),i===this.form){var n=t.data(this.form,"validator"),r="on"+e.type.replace(/^validate/,""),a=n.settings;a[r]&&!t(this).is(a.ignore)&&a[r].call(n,this,e)}}t.each(this.settings.groups,(function(e,i){"string"==typeof i&&(i=i.split(/\s/)),t.each(i,(function(t,i){s[i]=e}))})),e=this.settings.rules,t.each(e,(function(i,s){e[i]=t.validator.normalizeRule(s)})),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",n).on("click.validate","select, option, [type='radio'], [type='checkbox']",n),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var i,s,n=this.clean(e),r=this.validationTargetFor(n),a=this,o=!0;return void 0===r?delete this.invalid[n.name]:(this.prepareElement(r),this.currentElements=t(r),(s=this.groups[r.name])&&t.each(this.groups,(function(t,e){e===s&&t!==r.name&&(n=a.validationTargetFor(a.clean(a.findByName(t))))&&n.name in a.invalid&&(a.currentElements.push(n),o=a.check(n)&&o)})),i=!1!==this.check(r),o=o&&i,this.invalid[r.name]=!i,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!i)),o},showErrors:function(e){if(e){var i=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,(function(t,e){return{message:t,element:i.findByName(e)[0]}})),this.successList=t.grep(this.successList,(function(t){return!(t.name in e)}))}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,(function(t){return t.element.name===e.name})).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter((function(){var s=this.name||t(this).attr("name"),n=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");return!s&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),n&&(this.form=t(this).closest("form")[0],this.name=s),!(this.form!==e.currentForm||s in i||!e.objectLength(t(this).rules())||(i[s]=!0,0))}))},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i,s,n=t(e),r=e.type,a=void 0!==n.attr("contenteditable")&&"false"!==n.attr("contenteditable");return"radio"===r||"checkbox"===r?this.findByName(e.name).filter(":checked").val():"number"===r&&void 0!==e.validity?e.validity.badInput?"NaN":n.val():(i=a?n.text():n.val(),"file"===r?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(s=i.lastIndexOf("/"))>=0||(s=i.lastIndexOf("\\"))>=0?i.substr(s+1):i:"string"==typeof i?i.replace(/\r/g,""):i)},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s,n,r,a=t(e).rules(),o=t.map(a,(function(t,e){return e})).length,l=!1,h=this.elementValue(e);for(s in"function"==typeof a.normalizer?r=a.normalizer:"function"==typeof this.settings.normalizer&&(r=this.settings.normalizer),r&&(h=r.call(e,h),delete a.normalizer),a){n={method:s,parameters:a[s]};try{if("dependency-mismatch"===(i=t.validator.methods[s].call(this,h,e,n.parameters))&&1===o){l=!0;continue}if(l=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,n),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+n.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+n.method+"' method."),t}}if(!l)return this.objectLength(a)&&this.successList.push(e),!0},customDataMessage:function(e,i){return t(e).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){"string"==typeof i&&(i={method:i});var s=this.findDefined(this.customMessage(e.name,i.method),this.customDataMessage(e,i.method),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),n=/\$?\{(\d+)\}/g;return"function"==typeof s?s=s.call(this,i.parameters,e):n.test(s)&&(s=t.validator.format(s.replace(n,"{$1}"),i.parameters)),s},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,i;for(t=0;this.errorList[t];t++)i=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map((function(){return this.element}))},showLabel:function(e,i){var s,n,r,a,o=this.errorsFor(e),l=this.idOrName(e),h=t(e).attr("aria-describedby");o.length?(o.removeClass(this.settings.validClass).addClass(this.settings.errorClass),o.html(i)):(s=o=t("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=o.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(s):this.settings.errorPlacement?this.settings.errorPlacement.call(this,s,t(e)):s.insertAfter(e),o.is("label")?o.attr("for",l):0===o.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(r=o.attr("id"),h?h.match(new RegExp("\\b"+this.escapeCssMeta(r)+"\\b"))||(h+=" "+r):h=r,t(e).attr("aria-describedby",h),(n=this.groups[e.name])&&(a=this,t.each(a.groups,(function(e,i){i===n&&t("[name='"+a.escapeCssMeta(e)+"']",a.currentForm).attr("aria-describedby",o.attr("id"))}))))),!i&&this.settings.success&&(o.text(""),"string"==typeof this.settings.success?o.addClass(this.settings.success):this.settings.success(o,e)),this.toShow=this.toShow.add(o)},errorsFor:function(e){var i=this.escapeCssMeta(this.idOrName(e)),s=t(e).attr("aria-describedby"),n="label[for='"+i+"'], label[for='"+i+"'] *";return s&&(n=n+", #"+this.escapeCssMeta(s).replace(/\s+/g,", #")),this.errors().filter(n)},escapeCssMeta:function(t){return void 0===t?"":t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,i){return!!t(e,i.form).length},function:function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),i&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(t(this.currentForm).trigger("submit"),this.submitButton&&t("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,i){return i="string"==typeof i&&i||"remote",t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:i})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),(function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])})),i},normalizeAttributeRule:function(t,e,i,s){/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(s=Number(s),isNaN(s)&&(s=void 0)),s||0===s?t[i]=s:e===i&&"range"!==e&&(t["date"===e?"dateISO":i]=!0)},attributeRules:function(e){var i,s,n={},r=t(e),a=e.getAttribute("type");for(i in t.validator.methods)"required"===i?(""===(s=e.getAttribute(i))&&(s=!0),s=!!s):s=r.attr(i),this.normalizeAttributeRule(n,a,i,s);return n.maxlength&&/-1|2147483647|524288/.test(n.maxlength)&&delete n.maxlength,n},dataRules:function(e){var i,s,n={},r=t(e),a=e.getAttribute("type");for(i in t.validator.methods)""===(s=r.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()))&&(s=!0),this.normalizeAttributeRule(n,a,i,s);return n},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,(function(s,n){if(!1!==n){if(n.param||n.depends){var r=!0;switch(typeof n.depends){case"string":r=!!t(n.depends,i.form).length;break;case"function":r=n.depends.call(i,i)}r?e[s]=void 0===n.param||n.param:(t.data(i.form,"validator").resetElements(t(i)),delete e[s])}}else delete e[s]})),t.each(e,(function(t,s){e[t]="function"==typeof s&&"normalizer"!==t?s(i):s})),t.each(["minlength","maxlength"],(function(){e[this]&&(e[this]=Number(e[this]))})),t.each(["rangelength","range"],(function(){var t;e[this]&&(Array.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(t=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(t[0]),Number(t[1])]))})),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),(function(){i[this]=!0})),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],i.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var n=t(i).val();return n&&n.length>0}return this.checkable(i)?this.getLength(e,i)>0:null!=e&&e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:(e=!1,function(t,i){return e||(e=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(i)||!/Invalid|NaN/.test(new Date(t).toString())}),dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(t,e,i){var s=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||s>=i},maxlength:function(t,e,i){var s=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||s<=i},rangelength:function(t,e,i){var s=Array.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||s>=i[0]&&s<=i[1]},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(e,i,s){var n,r=t(i).attr("type"),a="Step attribute on input type "+r+" is not supported.",o=["text","number","range"],l=new RegExp("\\b"+r+"\\b"),h=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},d=function(t){return Math.round(t*Math.pow(10,n))},u=!0;if(r&&!l.test(o.join()))throw new Error(a);return n=h(s),(h(e)>n||d(e)%d(s)!=0)&&(u=!1),this.optional(i)||u},equalTo:function(e,i,s){var n=t(s);return this.settings.onfocusout&&n.not(".validate-equalTo-blur").length&&n.addClass("validate-equalTo-blur").on("blur.validate-equalTo",(function(){t(i).valid()})),e===n.val()},remote:function(e,i,s,n){if(this.optional(i))return"dependency-mismatch";n="string"==typeof n&&n||"remote";var r,a,o,l=this.previousValue(i,n);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[i.name][n],this.settings.messages[i.name][n]=l.message,s="string"==typeof s&&{url:s}||s,o=t.param(t.extend({data:e},s.data)),l.old===o?l.valid:(l.old=o,r=this,this.startRequest(i),(a={})[i.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:a,context:r.currentForm,success:function(t){var s,a,o,h=!0===t||"true"===t;r.settings.messages[i.name][n]=l.originalMessage,h?(o=r.formSubmitted,r.resetInternals(),r.toHide=r.errorsFor(i),r.formSubmitted=o,r.successList.push(i),r.invalid[i.name]=!1,r.showErrors()):(s={},a=t||r.defaultMessage(i,{method:n,parameters:e}),s[i.name]=l.message=a,r.invalid[i.name]=!0,r.showErrors(s)),l.valid=h,r.stopRequest(i,h)}},s)),"pending")}}});var s,n={};return t.ajaxPrefilter?t.ajaxPrefilter((function(t,e,i){var s=t.port;"abort"===t.mode&&(n[s]&&n[s].abort(),n[s]=i)})):(s=t.ajax,t.ajax=function(e){var i=("mode"in e?e:t.ajaxSettings).mode,r=("port"in e?e:t.ajaxSettings).port;return"abort"===i?(n[r]&&n[r].abort(),n[r]=s.apply(this,arguments),n[r]):s.apply(this,arguments)}),t},void 0===(r="function"==typeof s?s.apply(e,n):s)||(t.exports=r)},311:function(t){"use strict";t.exports=jQuery}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t,e=i(311),s=i.n(e);i(587);(t=s())((function(){window.rankMathValidate={init:function(){this.extendLibrary(),this.watchFields()},extendLibrary:function(){t.validator.addMethod("regex",(function(e,i,s){var n=new RegExp("string"==typeof s?s:t(i).data("validate-pattern"));return this.optional(i)||n.test(e)}),rankMath.validationl10n.regexErrorDefault),t.extend(t.validator.messages,{required:rankMath.validationl10n.requiredErrorDefault,email:rankMath.validationl10n.emailErrorDefault,url:rankMath.validationl10n.urlErrorDefault}),t.extend(t.validator.defaults,{errorClass:"invalid"})},watchFields:function(){var e=this;t(".rank-math-validate-field").on("focus","input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea",(function(){e.fieldValidation(t(this).closest("form"))}))},fieldValidation:function(t){return"1"!==t.data("validated")&&(t.data("validated","1").validate(),!0)}},window.rankMathValidate.init()}))}()}();
assets/vendor/jquery.caret.min.js DELETED
@@ -1,2 +0,0 @@
1
- // http://code.accursoft.com/caret - 1.3.3
2
- jQuery.fn.caret=function(e){var t=this[0],n=t&&"true"===t.contentEditable;if(0!=arguments.length)return t&&(-1==e&&(e=this[n?"text":"val"]().length),window.getSelection?n?(t.focus(),window.getSelection().collapse(t.firstChild,e)):t.setSelectionRange(e,e):document.body.createTextRange&&(n?((a=document.body.createTextRange()).moveToElementText(t),a.moveStart("character",e),a.collapse(!0)):(a=t.createTextRange()).move("character",e),a.select()),n||t.focus()),this;if(t){if(window.getSelection)return n?(t.focus(),(c=(o=window.getSelection().getRangeAt(0)).cloneRange()).selectNodeContents(t),c.setEnd(o.endContainer,o.endOffset),c.toString().length):t.selectionStart;if(document.selection){if(t.focus(),n){var o=document.selection.createRange();return(c=document.body.createTextRange()).moveToElementText(t),c.setEndPoint("EndToEnd",o),c.text.length}e=0;var c,a=t.createTextRange(),r=(c=document.selection.createRange().duplicate()).getBookmark();for(a.moveToBookmark(r);0!==a.moveStart("character",-1);)e++;return e}if(t.selectionStart)return t.selectionStart}};
 
 
assets/vendor/jquery.validate.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery Validation Plugin - v1.19.0 - 11/28/2018
2
- * https://jqueryvalidation.org/
3
- * Copyright (c) 2018 Jörn Zaefferer; Licensed MIT */
4
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
 
 
 
 
assets/vendor/moment.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.2",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c});
 
includes/admin/class-admin-menu.php CHANGED
@@ -68,7 +68,6 @@ class Admin_Menu implements Runner {
68
  'styles' => [ 'rank-math-dashboard' => '' ],
69
  'scripts' => [
70
  'rank-math-dashboard' => '',
71
- 'rank-math-validate' => '',
72
  ],
73
  ],
74
  'is_network' => is_network_admin() && Helper::is_plugin_active_for_network(),
68
  'styles' => [ 'rank-math-dashboard' => '' ],
69
  'scripts' => [
70
  'rank-math-dashboard' => '',
 
71
  ],
72
  ],
73
  'is_network' => is_network_admin() && Helper::is_plugin_active_for_network(),
includes/admin/class-assets.php CHANGED
@@ -61,10 +61,8 @@ class Assets implements Runner {
61
  wp_register_style( self::PREFIX . 'dashboard-widget', $css . 'dashboard-widget.css', null, rank_math()->version );
62
 
63
  // Scripts.
64
- wp_register_script( 'validate', rank_math()->plugin_url() . 'assets/vendor/jquery.validate.min.js', [ 'jquery' ], '1.19.0', true );
65
- wp_register_script( self::PREFIX . 'validate', $js . 'validate.js', [ 'jquery' ], rank_math()->version, true );
66
- wp_register_script( self::PREFIX . 'common', $js . 'common.js', [ 'jquery', 'validate', 'wp-i18n', 'lodash' ], rank_math()->version, true );
67
- wp_register_script( self::PREFIX . 'dashboard', $js . 'dashboard.js', [ 'jquery', 'clipboard', 'validate' ], rank_math()->version, true );
68
 
69
  // Select2.
70
  wp_register_style( 'select2-rm', $vendor . 'select2/select2.min.css', null, '4.0.6-rc.1' );
61
  wp_register_style( self::PREFIX . 'dashboard-widget', $css . 'dashboard-widget.css', null, rank_math()->version );
62
 
63
  // Scripts.
64
+ wp_register_script( self::PREFIX . 'common', $js . 'common.js', [ 'jquery', 'wp-i18n', 'lodash' ], rank_math()->version, true );
65
+ wp_register_script( self::PREFIX . 'dashboard', $js . 'dashboard.js', [ 'jquery', 'clipboard' ], rank_math()->version, true );
 
 
66
 
67
  // Select2.
68
  wp_register_style( 'select2-rm', $vendor . 'select2/select2.min.css', null, '4.0.6-rc.1' );
includes/admin/class-options.php CHANGED
@@ -241,7 +241,7 @@ class Options {
241
  \CMB2_Hookup::enqueue_cmb_css();
242
  rank_math()->variables->setup_json();
243
  wp_enqueue_style( 'rank-math-options', rank_math()->plugin_url() . 'assets/admin/css/option-panel.css', [ 'select2-rm', 'rank-math-common', 'rank-math-cmb2' ], rank_math()->version );
244
- wp_enqueue_script( 'rank-math-options', rank_math()->plugin_url() . 'assets/admin/js/option-panel.js', [ 'underscore', 'select2-rm', 'lodash', 'rank-math-common', 'rank-math-validate' ], rank_math()->version, true );
245
 
246
  // Add thank you.
247
  Helper::add_json( 'indexUrl', rank_math()->plugin_url() . 'assets/admin/js/search-index/' );
241
  \CMB2_Hookup::enqueue_cmb_css();
242
  rank_math()->variables->setup_json();
243
  wp_enqueue_style( 'rank-math-options', rank_math()->plugin_url() . 'assets/admin/css/option-panel.css', [ 'select2-rm', 'rank-math-common', 'rank-math-cmb2' ], rank_math()->version );
244
+ wp_enqueue_script( 'rank-math-options', rank_math()->plugin_url() . 'assets/admin/js/option-panel.js', [ 'underscore', 'select2-rm', 'lodash', 'rank-math-common' ], rank_math()->version, true );
245
 
246
  // Add thank you.
247
  Helper::add_json( 'indexUrl', rank_math()->plugin_url() . 'assets/admin/js/search-index/' );
includes/admin/class-setup-wizard.php CHANGED
@@ -284,7 +284,7 @@ class Setup_Wizard {
284
  \RankMath\Tools\Update_Score::get()->enqueue();
285
 
286
  // Enqueue javascript.
287
- wp_enqueue_script( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/js/wizard.js', [ 'media-editor', 'select2-rm', 'lodash', 'rank-math-common', 'rank-math-validate' ], rank_math()->version, true );
288
 
289
  Helper::add_json( 'currentStep', $this->step );
290
  Helper::add_json( 'deactivated', esc_html__( 'Deactivated', 'rank-math' ) );
284
  \RankMath\Tools\Update_Score::get()->enqueue();
285
 
286
  // Enqueue javascript.
287
+ wp_enqueue_script( 'rank-math-wizard', rank_math()->plugin_url() . 'assets/admin/js/wizard.js', [ 'media-editor', 'select2-rm', 'lodash', 'rank-math-common' ], rank_math()->version, true );
288
 
289
  Helper::add_json( 'currentStep', $this->step );
290
  Helper::add_json( 'deactivated', esc_html__( 'Deactivated', 'rank-math' ) );
includes/admin/metabox/class-metabox.php CHANGED
@@ -123,7 +123,6 @@ class Metabox implements Runner {
123
  'wp-media-utils',
124
  'rank-math-common',
125
  'rank-math-analyzer',
126
- 'rank-math-validate',
127
  'wp-block-editor',
128
  'rank-math-app',
129
  ],
123
  'wp-media-utils',
124
  'rank-math-common',
125
  'rank-math-analyzer',
 
126
  'wp-block-editor',
127
  'rank-math-app',
128
  ],
languages/rank-math.pot CHANGED
@@ -8,7 +8,7 @@ msgstr ""
8
  "Content-Transfer-Encoding: 8bit\n"
9
  "Language-Team: Rank Math\n"
10
  "Last-Translator: Rank Math\n"
11
- "POT-Creation-Date: 2022-11-14 11:03+0000\n"
12
  "Project-Id-Version: undefined\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
  "Language-Team: Rank Math\n"
10
  "Last-Translator: Rank Math\n"
11
+ "POT-Creation-Date: 2022-11-22 15:49+0000\n"
12
  "Project-Id-Version: undefined\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
rank-math.php CHANGED
@@ -9,7 +9,7 @@
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
- * Version: 1.0.102
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.102';
38
 
39
  /**
40
  * Rank Math database version.
9
  *
10
  * @wordpress-plugin
11
  * Plugin Name: Rank Math SEO
12
+ * Version: 1.0.102.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.102.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.1
6
  Requires at least: 5.6
7
  Requires PHP: 7.4
8
- Stable tag: 1.0.102
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
 
@@ -589,4 +589,7 @@ Please drop us an email at support@rankmath.com and we would be more than happy
589
  * Fixed: Dropdown menus on [Rank Math Analytics tables](https://rankmath.com/kb/analytics/) were not accessible
590
  * Fixed: [Capitalize Titles](https://rankmath.com/kb/titles-and-meta/#capitalize-titles) option was not working well with the accented characters
591
 
 
 
 
592
  Full changelog can be found here - **[Rank Math changelog](https://rankmath.com/changelog/?utm_source=Plugin&utm_medium=Changelog&utm_campaign=WP)**
5
  Tested up to: 6.1
6
  Requires at least: 5.6
7
  Requires PHP: 7.4
8
+ Stable tag: 1.0.102.1
9
  License: GPLv3 or later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
 
589
  * Fixed: Dropdown menus on [Rank Math Analytics tables](https://rankmath.com/kb/analytics/) were not accessible
590
  * Fixed: [Capitalize Titles](https://rankmath.com/kb/titles-and-meta/#capitalize-titles) option was not working well with the accented characters
591
 
592
+ = 1.0.102.1[Nov 22, 2022] =
593
+ * Removed: Unused JS files from the plugin
594
+
595
  Full changelog can be found here - **[Rank Math changelog](https://rankmath.com/changelog/?utm_source=Plugin&utm_medium=Changelog&utm_campaign=WP)**