Plugin Directory

Changeset 2885559


Ignore:
Timestamp:
03/23/2023 10:40:17 AM (3 years ago)
Author:
poweredcache
Message:

Update to version 2.5.3 from GitHub

Location:
powered-cache
Files:
2 deleted
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • powered-cache/tags/2.5.3/assets/js/admin/modules/modal.js

    r2589110 r2885559  
    5757                                            '<span class="sui-icon-check" aria-hidden="true"></span>';
    5858                                    } else {
    59                                         icon = (
    60                                             <span className="sui-icon-close" aria-hidden="true" />
    61                                         );
     59                                        icon =
     60                                            '<span class="sui-icon-close" aria-hidden="true"></span>';
    6261                                    }
    6362
  • powered-cache/tags/2.5.3/dist/js/admin.js

    r2725852 r2885559  
    1 /*! For license information please see admin.js.LICENSE.txt */
    2 !function(){var e={150:function(){function e(t){return e="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},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusFirstDescendant(a))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var o=e.childNodes.length-1;0<=o;o--){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusLastDescendant(a))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(o,a,i,s){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(o),null===this.dialogNode)throw new Error('No element found with id="'+o+'".');var d=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return d.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=r;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof a)this.focusAfterClosed=document.getElementById(a);else{if("object"!==e(a))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=a}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var f=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var h=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var p=new Event("afterOpen");this.dialogNode.dispatchEvent(p)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=this,a=new Event("close");this.dialogNode.dispatchEvent(a),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){o.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=o.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(o.dialogNode.parentNode.classList.remove("sui-modal-sm"),o.dialogNode.parentNode.classList.remove("sui-modal-md"),o.dialogNode.parentNode.classList.remove("sui-modal-lg"),o.dialogNode.parentNode.classList.remove("sui-modal-xl"),o.dialogNode.parentNode.classList.add("sui-modal-"+a))}var i,s,r,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),o.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))r="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(r=n),o.dialogNode.setAttribute("aria-describedby",r)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),r?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+o))}var a,i,s,r;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))a="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(a=i),n.dialogNode.setAttribute("aria-labelledby",a);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(r=e[0].getAttribute("data-modal-describedby"))&&void 0===r||(s=r),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var d=o||this.focusAfterClosed;new t.Dialog(e,d,a,i,s,r)},t.Dialog.prototype.slide=function(o,a,i){var s,r,n,d,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(o);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var f=0;f<c.length;f++)c[f].setAttribute("disabled",!0),c[f].classList.remove("sui-loaded"),c[f].classList.remove("sui-active"),c[f].setAttribute("tabindex","-1"),c[f].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var h=u.getAttribute("data-modal-size");switch(h){case"sm":case"small":h="sm";break;case"md":case"med":case"medium":h="md";break;case"lg":case"large":h="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":h="xl";break;default:h=void 0}void 0!==h&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+h))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(r=u.getAttribute("data-modal-labelledby"))&&void 0===r||(s=r),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(d=u.getAttribute("data-modal-describedby"))&&void 0===d||(n=d),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof a?this.newSlideFocus=document.getElementById(a):"object"===e(a)?this.newSlideFocus=a:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var o=t.getCurrentDialog();o.dialogNode.contains(e.target)?o.lastFocus=e.target:(t.Utils.focusFirstDescendant(o.dialogNode),o.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(o.dialogNode),o.lastFocus=document.activeElement)}},SUI.openModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,o,a,i,s,r)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,o,a,i,s,r)},SUI.slideModal=function(e,o,a){t.getCurrentDialog().slide(e,o,a)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var o,a,i,s,r,n,d,l,c,u,f,h;a=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),r=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),a.on("click",(function(a){o=t(this),d=o.attr("data-modal-open"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-mask"),h=o.attr("data-modal-animated");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,h="undefined"===e(h)||!1===h||"false"!==h,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.openModal(d,c,u,n,i,h),a.preventDefault()})),s.on("click",(function(a){o=t(this),d=o.attr("data-modal-replace"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-replace-mask");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.replaceModal(d,c,u,n,i,h),a.preventDefault()})),r.on("click",(function(a){o=t(this),l=o.attr("data-modal-slide"),u=o.attr("data-modal-slide-focus"),f=o.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(f)&&!1!==f&&""!==f||(f=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,f),a.preventDefault()})),i.on("click",(function(e){SUI.closeModal(h),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var r,n,d=i(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))o.call(r,c)&&(d[c]=r[c]);if(t){n=t(r);for(var u=0;u<n.length;u++)a.call(r,n[u])&&(d[n[u]]=r[n[u]])}}return d}},408:function(e,t,o){"use strict";var a=o(418),i=60103,s=60106;var r=60109,n=60110,d=60112;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;i=u("react.element"),s=u("react.portal"),u("react.fragment"),u("react.strict_mode"),u("react.profiler"),r=u("react.provider"),n=u("react.context"),d=u("react.forward_ref"),u("react.suspense"),l=u("react.memo"),c=u("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}function v(){}function b(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var y=b.prototype=new v;y.constructor=b,a(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},N=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,o){var a,s={},r=null,n=null;if(null!=t)for(a in void 0!==t.ref&&(n=t.ref),void 0!==t.key&&(r=""+t.key),t)N.call(t,a)&&!L.hasOwnProperty(a)&&(s[a]=t[a]);var d=arguments.length-2;if(1===d)s.children=o;else if(1<d){for(var l=Array(d),c=0;c<d;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(a in d=e.defaultProps)void 0===s[a]&&(s[a]=d[a]);return{$$typeof:i,type:e,key:r,ref:n,props:s,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var k=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(e,t,o,a,r){var n=typeof e;"undefined"!==n&&"boolean"!==n||(e=null);var d=!1;if(null===e)d=!0;else switch(n){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case i:case s:d=!0}}if(d)return r=r(d=e),e=""===a?"."+C(d,0):a,Array.isArray(r)?(o="",null!=e&&(o=e.replace(k,"$&/")+"/"),E(r,t,o,"",(function(e){return e}))):null!=r&&(_(r)&&(r=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,o+(!r.key||d&&d.key===r.key?"":(""+r.key).replace(k,"$&/")+"/")+e)),t.push(r)),1;if(d=0,a=""===a?".":a+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=a+C(n=e[l],l);d+=E(n,t,o,c,r)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(n=e.next()).done;)d+=E(n=n.value,t,o,c=a+C(n,l++),r);else if("object"===n)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return d}function D(e,t,o){if(null==e)return e;var a=[],i=0;return E(e,a,"","",(function(e){return t.call(o,e,i++)})),a}function U(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var x={current:null};function S(){var e=x.current;if(null===e)throw Error(h(321));return e}t.createElement=A},294:function(e,t,o){"use strict";e.exports=o(408)},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const o=e(t);return function(){o.on("click",(function(t){!function(t){const o=e(t),a=o.closest(".sui-vertical-tabs"),i=o.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),r=o.data("tab"),n=i.find(`div[data-tab="${r}"]`);a.find("li").removeClass("current"),o.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const o=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?o.show():o.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function o(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,o),s.exports}!function(){"use strict";o(150),o(332),o(880);var e=o(294);const{__:t}=wp.i18n;var a;a=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){a("body").hasClass("toplevel_page_powered-cache")&&a("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const o=a(this).closest(".sui-box"),i=o.find(".sui-box-title"),s=o.find(".sui-box-header button"),r=o.find("#powered-cache-diagnostic-items"),n=a("#powered_cache_run_diagnostic").val(),d=t("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){i.text(t("Running Diagnostic Tests…","powered-cache")),s.attr("disabled",!0),r.empty()},data:{nonce:n,action:"powered_cache_run_diagnostic"},success(t){t.success&&t.data.length&&t.data.forEach((t=>{let o=null;o=t.status?'<span class="sui-icon-check" aria-hidden="true"></span>':(0,e.createElement)("span",{className:"sui-icon-close","aria-hidden":"true"}),r.append(`<li>${o} ${t.description}</li>`)}))}}).done((function(){i.text(d),s.removeAttr("disabled")}))}))},a("body").ready((function(){PoweredCache.pageModals("modals")})),function(e){let t=0;e(".add_cdn_hostname").click((function(o){o.preventDefault();let a=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,a=e(a).attr("id",`cdn-zone-${t}`),e(a).find(".cdn_hostname").val(""),e(a).find(".cdn_zone").prop("selectedIndex",0),e(a).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(a)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const o=t.files[0];e("#powered-cache-import-file-name").text(o.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}();
     1!function(){var e={150:function(){function e(t){return e="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},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var a=0;a<e.childNodes.length;a++){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusFirstDescendant(o))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var a=e.childNodes.length-1;0<=a;a--){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusLastDescendant(o))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(a,o,i,s){var d=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(a),null===this.dialogNode)throw new Error('No element found with id="'+a+'".');var r=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return r.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=d;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof o)this.focusAfterClosed=document.getElementById(o);else{if("object"!==e(o))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=o}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var h=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var f=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var g=new Event("afterOpen");this.dialogNode.dispatchEvent(g)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=this,o=new Event("close");this.dialogNode.dispatchEvent(o),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){a.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=a.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(a.dialogNode.parentNode.classList.remove("sui-modal-sm"),a.dialogNode.parentNode.classList.remove("sui-modal-md"),a.dialogNode.parentNode.classList.remove("sui-modal-lg"),a.dialogNode.parentNode.classList.remove("sui-modal-xl"),a.dialogNode.parentNode.classList.add("sui-modal-"+o))}var i,s,d,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),a.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))d="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(d=n),a.dialogNode.setAttribute("aria-describedby",d)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),d?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+a))}var o,i,s,d;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))o="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(o=i),n.dialogNode.setAttribute("aria-labelledby",o);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(d=e[0].getAttribute("data-modal-describedby"))&&void 0===d||(s=d),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var r=a||this.focusAfterClosed;new t.Dialog(e,r,o,i,s,d)},t.Dialog.prototype.slide=function(a,o,i){var s,d,n,r,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(a);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var h=0;h<c.length;h++)c[h].setAttribute("disabled",!0),c[h].classList.remove("sui-loaded"),c[h].classList.remove("sui-active"),c[h].setAttribute("tabindex","-1"),c[h].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var f=u.getAttribute("data-modal-size");switch(f){case"sm":case"small":f="sm";break;case"md":case"med":case"medium":f="md";break;case"lg":case"large":f="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":f="xl";break;default:f=void 0}void 0!==f&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+f))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(d=u.getAttribute("data-modal-labelledby"))&&void 0===d||(s=d),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(r=u.getAttribute("data-modal-describedby"))&&void 0===r||(n=r),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof o?this.newSlideFocus=document.getElementById(o):"object"===e(o)?this.newSlideFocus=o:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var a=t.getCurrentDialog();a.dialogNode.contains(e.target)?a.lastFocus=e.target:(t.Utils.focusFirstDescendant(a.dialogNode),a.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(a.dialogNode),a.lastFocus=document.activeElement)}},SUI.openModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,a,o,i,s,d)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,a,o,i,s,d)},SUI.slideModal=function(e,a,o){t.getCurrentDialog().slide(e,a,o)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var a,o,i,s,d,n,r,l,c,u,h,f;o=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),d=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),o.on("click",(function(o){a=t(this),r=a.attr("data-modal-open"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-mask"),f=a.attr("data-modal-animated");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,f="undefined"===e(f)||!1===f||"false"!==f,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.openModal(r,c,u,n,i,f),o.preventDefault()})),s.on("click",(function(o){a=t(this),r=a.attr("data-modal-replace"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-replace-mask");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.replaceModal(r,c,u,n,i,f),o.preventDefault()})),d.on("click",(function(o){a=t(this),l=a.attr("data-modal-slide"),u=a.attr("data-modal-slide-focus"),h=a.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(h)&&!1!==h&&""!==h||(h=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,h),o.preventDefault()})),i.on("click",(function(e){SUI.closeModal(f),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},943:function(){const{__:e}=wp.i18n;var t;t=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){t("body").hasClass("toplevel_page_powered-cache")&&t("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const a=t(this).closest(".sui-box"),o=a.find(".sui-box-title"),i=a.find(".sui-box-header button"),s=a.find("#powered-cache-diagnostic-items"),d=t("#powered_cache_run_diagnostic").val(),n=e("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){o.text(e("Running Diagnostic Tests…","powered-cache")),i.attr("disabled",!0),s.empty()},data:{nonce:d,action:"powered_cache_run_diagnostic"},success(e){e.success&&e.data.length&&e.data.forEach((e=>{let t=null;t=e.status?'<span class="sui-icon-check" aria-hidden="true"></span>':'<span class="sui-icon-close" aria-hidden="true"></span>',s.append(`<li>${t} ${e.description}</li>`)}))}}).done((function(){o.text(n),i.removeAttr("disabled")}))}))},t("body").ready((function(){PoweredCache.pageModals("modals")}))},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const a=e(t);return function(){a.on("click",(function(t){!function(t){const a=e(t),o=a.closest(".sui-vertical-tabs"),i=a.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),d=a.data("tab"),n=i.find(`div[data-tab="${d}"]`);o.find("li").removeClass("current"),a.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const a=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?a.show():a.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function a(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,a),s.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";a(150),a(332),a(880),a(943);!function(e){let t=0;e(".add_cdn_hostname").click((function(a){a.preventDefault();let o=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,o=e(o).attr("id",`cdn-zone-${t}`),e(o).find(".cdn_hostname").val(""),e(o).find(".cdn_zone").prop("selectedIndex",0),e(o).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(o)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const a=t.files[0];e("#powered-cache-import-file-name").text(a.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}();
  • powered-cache/tags/2.5.3/includes/admin/dashboard.php

    r2851003 r2885559  
    323323    if ( isset( $options['cdn_hostname'] ) ) {
    324324        foreach ( (array) $options['cdn_hostname'] as $hostname ) {
     325            $hostname = trim( $hostname );
    325326            if ( filter_var( $hostname, FILTER_VALIDATE_URL ) ) {
    326327                $cdn_hostname[] = wp_parse_url( $hostname, PHP_URL_HOST );
  • powered-cache/tags/2.5.3/includes/classes/AdvancedCache.php

    r2851752 r2885559  
    8585        add_filter( 'powered_cache_page_cache_enable', array( $this, 'maybe_caching_disabled' ) );
    8686        add_filter( 'powered_cache_mod_rewrite', array( $this, 'maybe_disable_mod_rewrite' ), 99 );
     87        add_action( 'wp_update_site', array( $this, 'purge_on_site_update' ), 10, 2 );
    8788    }
    8889
     
    281282            clean_site_cache_dir();
    282283        }
     284    }
     285
     286    /**
     287     * Purge site cache when site updated (eg: archived, deleted etc...)
     288     *
     289     * @param \WP_Site $new_site New site object.
     290     * @param \WP_Site $old_site Old site object.
     291     *
     292     * @return void
     293     * @since 2.5.3
     294     */
     295    public function purge_on_site_update( $new_site, $old_site ) {
     296        switch_to_blog( $old_site->id );
     297        if ( $this->settings['async_cache_cleaning'] ) {
     298            $this->cache_purger->push_to_queue( [ 'call' => 'clean_site_cache_dir' ] );
     299            $this->cache_purger->save()->dispatch();
     300        } else {
     301            clean_site_cache_dir();
     302        }
     303        restore_current_blog();
    283304    }
    284305
  • powered-cache/tags/2.5.3/includes/classes/FileOptimizer.php

    r2725852 r2885559  
    201201     *
    202202     * @return string|string[]|null
     203     * @see https://stackoverflow.com/a/29363569
    203204     */
    204205    public function run_html_minify( $buffer ) {
    205         $search = array(
    206             '/\>[^\S ]+/s',  // strip whitespaces after tags, except space
    207             '/[^\S ]+\</s',  // strip whitespaces before tags, except space
    208             '/(\s)+/s',       // shorten multiple whitespace sequences
    209             '/^\\s+|\\s+$/',       // shorten multiple whitespace sequences
     206        $replace = array(
     207            // remove tabs before and after HTML tags
     208            '/\>[^\S ]+/s'               => '>',
     209            '/[^\S ]+\</s'               => '<',
     210            // shorten multiple whitespace sequences; keep new-line characters because they matter in JS!!!
     211            '/([\t ])+/s'                => ' ',
     212            // remove leading and trailing spaces
     213            '/^([\t ])+/m'               => '',
     214            '/([\t ])+$/m'               => '',
     215            // remove JS line comments (simple only); do NOT remove lines containing URL (e.g. 'src="http://server.com/"')!!!
     216            '~//[a-zA-Z0-9 ]+$~m'        => '',
     217            // remove empty lines (sequence of line-end and white-space characters)
     218            '/[\r\n]+([\t ]?[\r\n]+)+/s' => "\n",
     219            // remove empty lines (between HTML tags); cannot remove just any line-end characters because in inline JS they can matter!
     220            '/\>[\r\n\t ]+\</s'          => '><',
     221            // remove "empty" lines containing only JS's block end character; join with next line (e.g. "}\n}\n</script>" --> "}}</script>"
     222            '/}[\r\n\t ]+/s'             => '}',
     223            '/}[\r\n\t ]+,[\r\n\t ]+/s'  => '},',
     224            // remove new-line after JS's function or condition start; join with next line
     225            '/\)[\r\n\t ]?{[\r\n\t ]+/s' => '){',
     226            '/,[\r\n\t ]?{[\r\n\t ]+/s'  => ',{',
     227            // remove new-line after JS's line end (only most obvious and safe cases)
     228            '/\),[\r\n\t ]+/s'           => '),',
     229            // remove quotes from HTML attributes that does not contain spaces; keep quotes around URLs!
     230            '~([\r\n\t ])?([a-zA-Z0-9]+)="([a-zA-Z0-9_/\\-]+)"([\r\n\t ])?~s' => '$1$2=$3$4', // $1 and $4 insert first white-space character found before/after attribute
    210231        );
    211 
    212         $replace = array( '>', '<', '\\1', ' ' );
    213         $buffer  = preg_replace( $search, $replace, $buffer );
     232        $buffer  = preg_replace( array_keys( $replace ), array_values( $replace ), $buffer );
    214233
    215234        return $buffer;
  • powered-cache/tags/2.5.3/includes/compat/domain-mapping.php

    r2589110 r2885559  
    125125    $mapped_domains = [];
    126126
    127     if ( class_exists( '\Mercator\Mapping' ) ) {
     127    if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) {
    128128        $mappings = \Mercator\Mapping::get_by_site( get_current_blog_id() );
    129129        if ( ! is_wp_error( $mappings ) && $mappings ) {
     
    181181 */
    182182function purge_on_site_delete( $site_object ) {
    183     if ( class_exists( '\Mercator\Mapping' ) ) {
     183    if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) {
    184184        $mappings = \Mercator\Mapping::get_by_site( $site_object->id );
    185185        if ( ! is_wp_error( $mappings ) && $mappings ) {
  • powered-cache/tags/2.5.3/includes/file-optimizer.php

    r2749491 r2885559  
    7070define( 'POWERED_CACHE_FO_CACHE_DIR', CONCAT_FILES_ROOT . '/wp-content/cache/min/' );
    7171define( 'POWERED_CACHE_FO_DEBUG', false );
     72
     73if ( ! defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) ) {
     74    define( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS', false );
     75}
    7276
    7377if ( ! file_exists( POWERED_CACHE_FO_CACHE_DIR ) ) {
     
    231235        $stat = stat( $cache_file_name );
    232236
     237        set_cache_headers();
    233238        header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $stat['mtime'] ) . ' GMT' );
    234239        header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $buf ) ) );
     
    353358}
    354359
     360set_cache_headers();
    355361header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $last_modified ) . ' GMT' );
    356362header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $output ) ) );
     
    412418    }
    413419}
     420
     421
     422/**
     423 * Add cache headers
     424 *
     425 * @return void
     426 * @since 2.5.3
     427 */
     428function set_cache_headers() {
     429    if ( defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) && POWERED_CACHE_FO_DISABLE_CACHE_HEADERS ) {
     430        return;
     431    }
     432
     433    $ttl_in_seconds = 31536000; // 365 days
     434    $ttl            = gmdate( "D, d M Y H:i:s", time() + $ttl_in_seconds ) . " GMT";
     435
     436    header( "Expires: $ttl" );
     437    header( "Cache-Control: max-age=$ttl_in_seconds" );
     438}
  • powered-cache/tags/2.5.3/languages/powered-cache.pot

    r2851752 r2885559  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Powered Cache 2.5.2\n"
     5"Project-Id-Version: Powered Cache 2.5.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-01-20T09:12:05+00:00\n"
     12"POT-Creation-Date: 2023-03-23T10:36:33+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.6.0\n"
     14"X-Generator: WP-CLI 2.7.1\n"
    1515"X-Domain: powered-cache\n"
    1616
    1717#. Plugin Name of the plugin
    1818#: includes/admin/dashboard.php:93
    19 #: includes/admin/dashboard.php:434
     19#: includes/admin/dashboard.php:435
    2020#: includes/admin/partials/settings-page.php:40
    2121#: includes/classes/MetaBox.php:98
     
    4242
    4343#: includes/admin/dashboard.php:106
    44 #: includes/admin/dashboard.php:817
     44#: includes/admin/dashboard.php:818
    4545msgid "Settings"
    4646msgstr ""
    4747
    48 #: includes/admin/dashboard.php:462
     48#: includes/admin/dashboard.php:463
    4949msgid "Page cache deleted for all websites!"
    5050msgstr ""
    5151
    52 #: includes/admin/dashboard.php:463
     52#: includes/admin/dashboard.php:464
    5353msgid "Page cache deleted successfully!"
    5454msgstr ""
    5555
    56 #: includes/admin/dashboard.php:464
     56#: includes/admin/dashboard.php:465
    5757msgid "Object cache deleted successfully!"
    5858msgstr ""
    5959
    60 #: includes/admin/dashboard.php:465
     60#: includes/admin/dashboard.php:466
    6161msgid "All cached items flushed successfully!"
    6262msgstr ""
    6363
    64 #: includes/admin/dashboard.php:466
     64#: includes/admin/dashboard.php:467
    6565msgid "The cache preloading has been initialized!"
    6666msgstr ""
    6767
    68 #: includes/admin/dashboard.php:467
     68#: includes/admin/dashboard.php:468
    6969msgid "The Critical CSS generation process has been initialized!"
    7070msgstr ""
    7171
    72 #: includes/admin/dashboard.php:468
     72#: includes/admin/dashboard.php:469
    7373msgid "The Critical CSS generation process has been initialized for all sites! This might take a while, depending on the network size."
    7474msgstr ""
    7575
    76 #: includes/admin/dashboard.php:469
     76#: includes/admin/dashboard.php:470
    7777msgid "Cloudflare cache flushed, it can take up to 30 seconds to delete all cache from Cloudflare!"
    7878msgstr ""
    7979
    80 #: includes/admin/dashboard.php:470
     80#: includes/admin/dashboard.php:471
    8181msgid "Settings have been reset!"
    8282msgstr ""
    8383
    84 #: includes/admin/dashboard.php:471
     84#: includes/admin/dashboard.php:472
    8585msgid "Settings have been imported!"
    8686msgstr ""
    8787
    88 #: includes/admin/dashboard.php:472
     88#: includes/admin/dashboard.php:473
    8989msgid "Settings saved and database being optimized..."
    9090msgstr ""
    9191
    92 #: includes/admin/dashboard.php:473
     92#: includes/admin/dashboard.php:474
    9393msgid "Settings saved."
    9494msgstr ""
    9595
    96 #: includes/admin/dashboard.php:477
     96#: includes/admin/dashboard.php:478
    9797msgid "Page cache for %s language has been deleted!"
    9898msgstr ""
    9999
    100 #: includes/admin/dashboard.php:481
    101100#: includes/admin/dashboard.php:482
    102101#: includes/admin/dashboard.php:483
     
    105104#: includes/admin/dashboard.php:486
    106105#: includes/admin/dashboard.php:487
     106#: includes/admin/dashboard.php:488
    107107msgid "You don't have permission to perform this action!"
    108108msgstr ""
    109109
    110 #: includes/admin/dashboard.php:488
     110#: includes/admin/dashboard.php:489
    111111msgid "Your license key does not seem valid. A valid license is required for the Critical CSS!"
    112112msgstr ""
    113113
    114 #: includes/admin/dashboard.php:489
     114#: includes/admin/dashboard.php:490
    115115msgid "Could not flush Cloudflare cache. Please make sure you entered the correct credentials and zone id!"
    116116msgstr ""
    117117
    118 #: includes/admin/dashboard.php:531
     118#: includes/admin/dashboard.php:532
    119119msgid "Purge All Cache"
    120120msgstr ""
    121121
    122 #: includes/admin/dashboard.php:686
     122#: includes/admin/dashboard.php:687
    123123msgid "wp-config.php is writable."
    124124msgstr ""
    125125
    126 #: includes/admin/dashboard.php:688
     126#: includes/admin/dashboard.php:689
    127127msgid "wp-config.php is not writable. Please make sure the file writable or you can manually define %s constant."
    128128msgstr ""
    129129
    130 #: includes/admin/dashboard.php:701
     130#: includes/admin/dashboard.php:702
    131131msgid "Cache directory %s is not exist!"
    132132msgstr ""
    133133
    134 #: includes/admin/dashboard.php:703
     134#: includes/admin/dashboard.php:704
    135135msgid "Cache directory %s is not writeable!"
    136136msgstr ""
    137137
    138 #: includes/admin/dashboard.php:706
     138#: includes/admin/dashboard.php:707
    139139msgid "Cache directory %s exist and writable!"
    140140msgstr ""
    141141
    142 #: includes/admin/dashboard.php:720
     142#: includes/admin/dashboard.php:721
    143143msgid ".htaccess file %s is not exist!"
    144144msgstr ""
    145145
    146 #: includes/admin/dashboard.php:722
     146#: includes/admin/dashboard.php:723
    147147msgid ".htaccess file %s is not writeable!"
    148148msgstr ""
    149149
    150 #: includes/admin/dashboard.php:725
     150#: includes/admin/dashboard.php:726
    151151msgid ".htaccess file %s exist and writable!"
    152152msgstr ""
    153153
    154 #: includes/admin/dashboard.php:740
     154#: includes/admin/dashboard.php:741
    155155msgid "Required file for the page caching %s is not exist!"
    156156msgstr ""
    157157
    158 #: includes/admin/dashboard.php:742
     158#: includes/admin/dashboard.php:743
    159159msgid "Required file for the page caching %s is not writeable!"
    160160msgstr ""
    161161
    162 #: includes/admin/dashboard.php:745
     162#: includes/admin/dashboard.php:746
    163163msgid "Required file for the page caching %s exist and writable!"
    164164msgstr ""
    165165
    166 #: includes/admin/dashboard.php:760
     166#: includes/admin/dashboard.php:761
    167167msgid "Required file for the object caching %s is not exist!"
    168168msgstr ""
    169169
    170 #: includes/admin/dashboard.php:762
     170#: includes/admin/dashboard.php:763
    171171msgid "Required file for the object caching %s is not writeable!"
    172172msgstr ""
    173173
    174 #: includes/admin/dashboard.php:765
     174#: includes/admin/dashboard.php:766
    175175msgid "Required file for the object caching %s exist and writable!"
    176176msgstr ""
    177177
    178 #: includes/admin/dashboard.php:778
     178#: includes/admin/dashboard.php:779
    179179msgid "Invalid request"
    180180msgstr ""
    181181
    182 #: includes/admin/dashboard.php:820
     182#: includes/admin/dashboard.php:821
    183183msgid "Get Premium"
    184184msgstr ""
     
    12641264msgstr ""
    12651265
    1266 #: includes/classes/AdvancedCache.php:101
     1266#: includes/classes/AdvancedCache.php:102
    12671267msgid "Purge Page Cache [Network Wide - All Sites]"
    12681268msgstr ""
    12691269
    1270 #: includes/classes/AdvancedCache.php:112
     1270#: includes/classes/AdvancedCache.php:113
    12711271msgid "Purge Page Cache"
    12721272msgstr ""
    12731273
    1274 #: includes/classes/AdvancedCache.php:122
     1274#: includes/classes/AdvancedCache.php:123
    12751275msgid "Purge Current Page"
    12761276msgstr ""
  • powered-cache/tags/2.5.3/powered-cache.php

    r2851752 r2885559  
    44 * Plugin URI:        https://poweredcache.com
    55 * Description:       The most powerful caching and performance suite for WordPress. Easily Improve PageSpeed & Web Vitals Score.
    6  * Version:           2.5.2
     6 * Version:           2.5.3
    77 * Requires at least: 5.7
    88 * Requires PHP:      5.6
     
    2626
    2727// Useful global constants.
    28 define( 'POWERED_CACHE_VERSION', '2.5.2' );
     28define( 'POWERED_CACHE_VERSION', '2.5.3' );
    2929define( 'POWERED_CACHE_DB_VERSION', '2.0' );
    3030define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ );
  • powered-cache/tags/2.5.3/readme.txt

    r2851752 r2885559  
    33Tags: cache, caching, web vitals, performance, fastest, page speed, optimization, cdn, object cache, minify, powered cache
    44Requires at least:  5.7
    5 Tested up to:  6.1
    6 Stable tag:  2.5.2
     5Tested up to:  6.2
     6Stable tag:  2.5.3
    77License: GPLv2 (or later)
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    169169
    170170== Changelog ==
     171
     172= 2.5.3 (March 23, 2023) =
     173- Added: Purge site cache on multisite when the site updated. (eg: archived etc...)
     174- Improvements: HTML minification.
     175- Improvements: Set file optimizer default cache header.
     176- Fix: Close icon on diagnostic modal
     177- Fix: Blank space on CDN hostname(s)
     178- Fix: WP Ultimo compatibility. (checking Mercator more strictly)
     179- Tested with WP 6.2
    171180
    172181= 2.5.2 (January 20, 2023) =
  • powered-cache/trunk/assets/js/admin/modules/modal.js

    r2589110 r2885559  
    5757                                            '<span class="sui-icon-check" aria-hidden="true"></span>';
    5858                                    } else {
    59                                         icon = (
    60                                             <span className="sui-icon-close" aria-hidden="true" />
    61                                         );
     59                                        icon =
     60                                            '<span class="sui-icon-close" aria-hidden="true"></span>';
    6261                                    }
    6362
  • powered-cache/trunk/dist/js/admin.js

    r2725852 r2885559  
    1 /*! For license information please see admin.js.LICENSE.txt */
    2 !function(){var e={150:function(){function e(t){return e="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},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusFirstDescendant(a))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var o=e.childNodes.length-1;0<=o;o--){var a=e.childNodes[o];if(t.Utils.attemptFocus(a)||t.Utils.focusLastDescendant(a))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(o,a,i,s){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(o),null===this.dialogNode)throw new Error('No element found with id="'+o+'".');var d=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return d.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=r;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof a)this.focusAfterClosed=document.getElementById(a);else{if("object"!==e(a))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=a}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var f=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var h=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var p=new Event("afterOpen");this.dialogNode.dispatchEvent(p)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=this,a=new Event("close");this.dialogNode.dispatchEvent(a),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){o.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=o.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(o.dialogNode.parentNode.classList.remove("sui-modal-sm"),o.dialogNode.parentNode.classList.remove("sui-modal-md"),o.dialogNode.parentNode.classList.remove("sui-modal-lg"),o.dialogNode.parentNode.classList.remove("sui-modal-xl"),o.dialogNode.parentNode.classList.add("sui-modal-"+a))}var i,s,r,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),o.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))r="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(r=n),o.dialogNode.setAttribute("aria-describedby",r)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),r?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+o))}var a,i,s,r;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))a="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(a=i),n.dialogNode.setAttribute("aria-labelledby",a);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(r=e[0].getAttribute("data-modal-describedby"))&&void 0===r||(s=r),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var d=o||this.focusAfterClosed;new t.Dialog(e,d,a,i,s,r)},t.Dialog.prototype.slide=function(o,a,i){var s,r,n,d,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(o);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var f=0;f<c.length;f++)c[f].setAttribute("disabled",!0),c[f].classList.remove("sui-loaded"),c[f].classList.remove("sui-active"),c[f].setAttribute("tabindex","-1"),c[f].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var h=u.getAttribute("data-modal-size");switch(h){case"sm":case"small":h="sm";break;case"md":case"med":case"medium":h="md";break;case"lg":case"large":h="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":h="xl";break;default:h=void 0}void 0!==h&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+h))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(r=u.getAttribute("data-modal-labelledby"))&&void 0===r||(s=r),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(d=u.getAttribute("data-modal-describedby"))&&void 0===d||(n=d),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof a?this.newSlideFocus=document.getElementById(a):"object"===e(a)?this.newSlideFocus=a:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var o=t.getCurrentDialog();o.dialogNode.contains(e.target)?o.lastFocus=e.target:(t.Utils.focusFirstDescendant(o.dialogNode),o.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(o.dialogNode),o.lastFocus=document.activeElement)}},SUI.openModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,o,a,i,s,r)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,o,a,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,o,a,i,s,r)},SUI.slideModal=function(e,o,a){t.getCurrentDialog().slide(e,o,a)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var o,a,i,s,r,n,d,l,c,u,f,h;a=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),r=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),a.on("click",(function(a){o=t(this),d=o.attr("data-modal-open"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-mask"),h=o.attr("data-modal-animated");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,h="undefined"===e(h)||!1===h||"false"!==h,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.openModal(d,c,u,n,i,h),a.preventDefault()})),s.on("click",(function(a){o=t(this),d=o.attr("data-modal-replace"),c=o.attr("data-modal-close-focus"),u=o.attr("data-modal-open-focus"),n=o.attr("data-modal-replace-mask");var i="false"!==o.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(d)&&!1!==d&&""!==d&&SUI.replaceModal(d,c,u,n,i,h),a.preventDefault()})),r.on("click",(function(a){o=t(this),l=o.attr("data-modal-slide"),u=o.attr("data-modal-slide-focus"),f=o.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(f)&&!1!==f&&""!==f||(f=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,f),a.preventDefault()})),i.on("click",(function(e){SUI.closeModal(h),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},418:function(e){"use strict";var t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach((function(e){a[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var r,n,d=i(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))o.call(r,c)&&(d[c]=r[c]);if(t){n=t(r);for(var u=0;u<n.length;u++)a.call(r,n[u])&&(d[n[u]]=r[n[u]])}}return d}},408:function(e,t,o){"use strict";var a=o(418),i=60103,s=60106;var r=60109,n=60110,d=60112;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;i=u("react.element"),s=u("react.portal"),u("react.fragment"),u("react.strict_mode"),u("react.profiler"),r=u("react.provider"),n=u("react.context"),d=u("react.forward_ref"),u("react.suspense"),l=u("react.memo"),c=u("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}function v(){}function b(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var y=b.prototype=new v;y.constructor=b,a(y,g.prototype),y.isPureReactComponent=!0;var w={current:null},N=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,o){var a,s={},r=null,n=null;if(null!=t)for(a in void 0!==t.ref&&(n=t.ref),void 0!==t.key&&(r=""+t.key),t)N.call(t,a)&&!L.hasOwnProperty(a)&&(s[a]=t[a]);var d=arguments.length-2;if(1===d)s.children=o;else if(1<d){for(var l=Array(d),c=0;c<d;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(a in d=e.defaultProps)void 0===s[a]&&(s[a]=d[a]);return{$$typeof:i,type:e,key:r,ref:n,props:s,_owner:w.current}}function _(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var k=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function E(e,t,o,a,r){var n=typeof e;"undefined"!==n&&"boolean"!==n||(e=null);var d=!1;if(null===e)d=!0;else switch(n){case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case i:case s:d=!0}}if(d)return r=r(d=e),e=""===a?"."+C(d,0):a,Array.isArray(r)?(o="",null!=e&&(o=e.replace(k,"$&/")+"/"),E(r,t,o,"",(function(e){return e}))):null!=r&&(_(r)&&(r=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,o+(!r.key||d&&d.key===r.key?"":(""+r.key).replace(k,"$&/")+"/")+e)),t.push(r)),1;if(d=0,a=""===a?".":a+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=a+C(n=e[l],l);d+=E(n,t,o,c,r)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(n=e.next()).done;)d+=E(n=n.value,t,o,c=a+C(n,l++),r);else if("object"===n)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return d}function D(e,t,o){if(null==e)return e;var a=[],i=0;return E(e,a,"","",(function(e){return t.call(o,e,i++)})),a}function U(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var x={current:null};function S(){var e=x.current;if(null===e)throw Error(h(321));return e}t.createElement=A},294:function(e,t,o){"use strict";e.exports=o(408)},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const o=e(t);return function(){o.on("click",(function(t){!function(t){const o=e(t),a=o.closest(".sui-vertical-tabs"),i=o.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),r=o.data("tab"),n=i.find(`div[data-tab="${r}"]`);a.find("li").removeClass("current"),o.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const o=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?o.show():o.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function o(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,o),s.exports}!function(){"use strict";o(150),o(332),o(880);var e=o(294);const{__:t}=wp.i18n;var a;a=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){a("body").hasClass("toplevel_page_powered-cache")&&a("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const o=a(this).closest(".sui-box"),i=o.find(".sui-box-title"),s=o.find(".sui-box-header button"),r=o.find("#powered-cache-diagnostic-items"),n=a("#powered_cache_run_diagnostic").val(),d=t("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){i.text(t("Running Diagnostic Tests…","powered-cache")),s.attr("disabled",!0),r.empty()},data:{nonce:n,action:"powered_cache_run_diagnostic"},success(t){t.success&&t.data.length&&t.data.forEach((t=>{let o=null;o=t.status?'<span class="sui-icon-check" aria-hidden="true"></span>':(0,e.createElement)("span",{className:"sui-icon-close","aria-hidden":"true"}),r.append(`<li>${o} ${t.description}</li>`)}))}}).done((function(){i.text(d),s.removeAttr("disabled")}))}))},a("body").ready((function(){PoweredCache.pageModals("modals")})),function(e){let t=0;e(".add_cdn_hostname").click((function(o){o.preventDefault();let a=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,a=e(a).attr("id",`cdn-zone-${t}`),e(a).find(".cdn_hostname").val(""),e(a).find(".cdn_zone").prop("selectedIndex",0),e(a).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(a)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const o=t.files[0];e("#powered-cache-import-file-name").text(o.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}();
     1!function(){var e={150:function(){function e(t){return e="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},e(t)}!function(){"use strict";"object"!==e(window.SUI)&&(window.SUI={});var t=t||{};t.KeyCode={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},t.Utils=t.Utils||{},t.Utils.remove=function(e){return e.remove&&"function"===typeof e.remove?e.remove():!(!e.parentNode||!e.parentNode.removeChild||"function"!==typeof e.parentNode.removeChild)&&e.parentNode.removeChild(e)},t.Utils.isFocusable=function(e){if(0<e.tabIndex||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!=e.rel;case"INPUT":return"hidden"!=e.type&&"file"!=e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},t.Utils.simulateClick=function(e){var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)},t.Utils.IgnoreUtilFocusChanges=!1,t.Utils.dialogOpenClass="sui-has-modal",t.Utils.focusFirstDescendant=function(e){for(var a=0;a<e.childNodes.length;a++){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusFirstDescendant(o))return!0}return!1},t.Utils.focusLastDescendant=function(e){for(var a=e.childNodes.length-1;0<=a;a--){var o=e.childNodes[a];if(t.Utils.attemptFocus(o)||t.Utils.focusLastDescendant(o))return!0}return!1},t.Utils.attemptFocus=function(e){if(!t.Utils.isFocusable(e))return!1;t.Utils.IgnoreUtilFocusChanges=!0;try{e.focus()}catch(e){}return t.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===e},t.OpenDialogList=t.OpenDialogList||new Array(0),t.getCurrentDialog=function(){if(t.OpenDialogList&&t.OpenDialogList.length)return t.OpenDialogList[t.OpenDialogList.length-1]},t.closeCurrentDialog=function(){var e=t.getCurrentDialog();return!!e&&(e.close(),!0)},t.handleEscape=function(e){(e.which||e.keyCode)===t.KeyCode.ESC&&t.closeCurrentDialog()&&e.stopPropagation()},t.Dialog=function(a,o,i,s){var d=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(this.dialogNode=document.getElementById(a),null===this.dialogNode)throw new Error('No element found with id="'+a+'".');var r=["dialog","alertdialog"],l=(this.dialogNode.getAttribute("role")||"").trim().split(/\s+/g).some((function(e){return r.some((function(t){return e===t}))}));if(!l)throw new Error("Dialog() requires a DOM element with ARIA role of dialog or alertdialog.");this.isCloseOnEsc=d;var c=new Event("open");this.dialogNode.dispatchEvent(c);var u="sui-modal";if(this.dialogNode.parentNode.classList.contains(u)?this.backdropNode=this.dialogNode.parentNode:(this.backdropNode=document.createElement("div"),this.backdropNode.className=u,this.backdropNode.setAttribute("data-markup","new"),this.dialogNode.parentNode.insertBefore(this.backdropNode,this.dialogNodev),this.backdropNode.appendChild(this.dialogNode)),this.backdropNode.classList.add("sui-active"),document.body.parentNode.classList.add(t.Utils.dialogOpenClass),"string"===typeof o)this.focusAfterClosed=document.getElementById(o);else{if("object"!==e(o))throw new Error("the focusAfterClosed parameter is required for the aria.Dialog constructor.");this.focusAfterClosed=o}"string"===typeof i?this.focusFirst=document.getElementById(i):"object"===e(i)?this.focusFirst=i:this.focusFirst=null;var h=document.createElement("div");this.preNode=this.dialogNode.parentNode.insertBefore(h,this.dialogNode),this.preNode.tabIndex=0,"boolean"===typeof s&&!0===s&&(this.preNode.classList.add("sui-modal-overlay"),this.preNode.onclick=function(){t.getCurrentDialog().close()});var f=document.createElement("div");this.postNode=this.dialogNode.parentNode.insertBefore(f,this.dialogNode.nextSibling),this.postNode.tabIndex=0,0<t.OpenDialogList.length&&t.getCurrentDialog().removeListeners(),this.addListeners(),t.OpenDialogList.push(this),n?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusFirst?this.focusFirst.focus():t.Utils.focusFirstDescendant(this.dialogNode),this.lastFocus=document.activeElement;var g=new Event("afterOpen");this.dialogNode.dispatchEvent(g)},t.Dialog.prototype.close=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=this,o=new Event("close");this.dialogNode.dispatchEvent(o),t.OpenDialogList.pop(),this.removeListeners(),this.preNode.parentNode.removeChild(this.preNode),this.postNode.parentNode.removeChild(this.postNode),e?(this.dialogNode.classList.add("sui-content-fade-out"),this.dialogNode.classList.remove("sui-content-fade-in")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.focusAfterClosed.focus(),setTimeout((function(){a.backdropNode.classList.remove("sui-active")}),300),setTimeout((function(){var e=a.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var o=e[0].getAttribute("data-modal-size");switch(o){case"sm":case"small":o="sm";break;case"md":case"med":case"medium":o="md";break;case"lg":case"large":o="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":o="xl";break;default:o=void 0}void 0!==o&&(a.dialogNode.parentNode.classList.remove("sui-modal-sm"),a.dialogNode.parentNode.classList.remove("sui-modal-md"),a.dialogNode.parentNode.classList.remove("sui-modal-lg"),a.dialogNode.parentNode.classList.remove("sui-modal-xl"),a.dialogNode.parentNode.classList.add("sui-modal-"+o))}var i,s,d,n;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))i="",""===(s=e[0].getAttribute("data-modal-labelledby"))&&void 0===s||(i=s),a.dialogNode.setAttribute("aria-labelledby",i);if(e[0].hasAttribute("data-modal-describedby"))d="",""===(n=e[0].getAttribute("data-modal-describedby"))&&void 0===n||(d=n),a.dialogNode.setAttribute("aria-describedby",d)}}),350),0<t.OpenDialogList.length?t.getCurrentDialog().addListeners():document.body.parentNode.classList.remove(t.Utils.dialogOpenClass);var i=new Event("afterClose");this.dialogNode.dispatchEvent(i)},t.Dialog.prototype.replace=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],n=this;t.OpenDialogList.pop(),this.removeListeners(),t.Utils.remove(this.preNode),t.Utils.remove(this.postNode),d?(this.dialogNode.classList.add("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")):(this.dialogNode.classList.remove("sui-content-fade-in"),this.dialogNode.classList.remove("sui-content-fade-out")),this.backdropNode.classList.remove("sui-active"),setTimeout((function(){var e=n.dialogNode.querySelectorAll(".sui-modal-slide");if(0<e.length){for(var t=0;t<e.length;t++)e[t].setAttribute("disabled",!0),e[t].classList.remove("sui-loaded"),e[t].classList.remove("sui-active"),e[t].setAttribute("tabindex","-1"),e[t].setAttribute("aria-hidden",!0);if(e[0].hasAttribute("data-modal-size")){var a=e[0].getAttribute("data-modal-size");switch(a){case"sm":case"small":a="sm";break;case"md":case"med":case"medium":a="md";break;case"lg":case"large":a="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":a="xl";break;default:a=void 0}void 0!==a&&(n.dialogNode.parentNode.classList.remove("sui-modal-sm"),n.dialogNode.parentNode.classList.remove("sui-modal-md"),n.dialogNode.parentNode.classList.remove("sui-modal-lg"),n.dialogNode.parentNode.classList.remove("sui-modal-xl"),n.dialogNode.parentNode.classList.add("sui-modal-"+a))}var o,i,s,d;if(e[0].classList.add("sui-active"),e[0].classList.add("sui-loaded"),e[0].removeAttribute("disabled"),e[0].removeAttribute("tabindex"),e[0].removeAttribute("aria-hidden"),e[0].hasAttribute("data-modal-labelledby"))o="",""===(i=e[0].getAttribute("data-modal-labelledby"))&&void 0===i||(o=i),n.dialogNode.setAttribute("aria-labelledby",o);if(e[0].hasAttribute("data-modal-describedby"))s="",""===(d=e[0].getAttribute("data-modal-describedby"))&&void 0===d||(s=d),n.dialogNode.setAttribute("aria-describedby",s)}}),350);var r=a||this.focusAfterClosed;new t.Dialog(e,r,o,i,s,d)},t.Dialog.prototype.slide=function(a,o,i){var s,d,n,r,l="sui-fadein",c=(t.getCurrentDialog(),this.dialogNode.querySelectorAll(".sui-modal-slide")),u=document.getElementById(a);switch(i){case"back":case"left":l="sui-fadein-left";break;case"next":case"right":l="sui-fadein-right";break;default:l="sui-fadein"}for(var h=0;h<c.length;h++)c[h].setAttribute("disabled",!0),c[h].classList.remove("sui-loaded"),c[h].classList.remove("sui-active"),c[h].setAttribute("tabindex","-1"),c[h].setAttribute("aria-hidden",!0);if(u.hasAttribute("data-modal-size")){var f=u.getAttribute("data-modal-size");switch(f){case"sm":case"small":f="sm";break;case"md":case"med":case"medium":f="md";break;case"lg":case"large":f="lg";break;case"xl":case"extralarge":case"extraLarge":case"extra-large":f="xl";break;default:f=void 0}void 0!==f&&(this.dialogNode.parentNode.classList.remove("sui-modal-sm"),this.dialogNode.parentNode.classList.remove("sui-modal-md"),this.dialogNode.parentNode.classList.remove("sui-modal-lg"),this.dialogNode.parentNode.classList.remove("sui-modal-xl"),this.dialogNode.parentNode.classList.add("sui-modal-"+f))}u.hasAttribute("data-modal-labelledby")&&(s="",""===(d=u.getAttribute("data-modal-labelledby"))&&void 0===d||(s=d),this.dialogNode.setAttribute("aria-labelledby",s));u.hasAttribute("data-modal-describedby")&&(n="",""===(r=u.getAttribute("data-modal-describedby"))&&void 0===r||(n=r),this.dialogNode.setAttribute("aria-describedby",n));u.classList.add("sui-active"),u.classList.add(l),u.removeAttribute("tabindex"),u.removeAttribute("aria-hidden"),setTimeout((function(){u.classList.add("sui-loaded"),u.classList.remove(l),u.removeAttribute("disabled")}),600),"string"===typeof o?this.newSlideFocus=document.getElementById(o):"object"===e(o)?this.newSlideFocus=o:this.newSlideFocus=null,this.newSlideFocus?this.newSlideFocus.focus():t.Utils.focusFirstDescendant(this.dialogNode)},t.Dialog.prototype.addListeners=function(){document.addEventListener("focus",this.trapFocus,!0),this.isCloseOnEsc&&this.dialogNode.addEventListener("keyup",t.handleEscape)},t.Dialog.prototype.removeListeners=function(){document.removeEventListener("focus",this.trapFocus,!0)},t.Dialog.prototype.trapFocus=function(e){if(!t.Utils.IgnoreUtilFocusChanges){var a=t.getCurrentDialog();a.dialogNode.contains(e.target)?a.lastFocus=e.target:(t.Utils.focusFirstDescendant(a.dialogNode),a.lastFocus==document.activeElement&&t.Utils.focusLastDescendant(a.dialogNode),a.lastFocus=document.activeElement)}},SUI.openModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0;new t.Dialog(e,a,o,i,s,d)},SUI.closeModal=function(e){t.getCurrentDialog().close(e)},SUI.replaceModal=function(e,a,o,i){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],d=arguments.length>5?arguments[5]:void 0,n=t.getCurrentDialog();n.replace(e,a,o,i,s,d)},SUI.slideModal=function(e,a,o){t.getCurrentDialog().slide(e,a,o)}}(),function(t){"use strict";"object"!==e(window.SUI)&&(window.SUI={}),SUI.modalDialog=function(){return function(){var a,o,i,s,d,n,r,l,c,u,h,f;o=t("[data-modal-open]"),i=t("[data-modal-close]"),s=t("[data-modal-replace]"),d=t("[data-modal-slide]"),n=t(".sui-modal-overlay"),o.on("click",(function(o){a=t(this),r=a.attr("data-modal-open"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-mask"),f=a.attr("data-modal-animated");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=this),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,f="undefined"===e(f)||!1===f||"false"!==f,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.openModal(r,c,u,n,i,f),o.preventDefault()})),s.on("click",(function(o){a=t(this),r=a.attr("data-modal-replace"),c=a.attr("data-modal-close-focus"),u=a.attr("data-modal-open-focus"),n=a.attr("data-modal-replace-mask");var i="false"!==a.attr("data-esc-close");"undefined"!==e(c)&&!1!==c&&""!==c||(c=void 0),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),n="undefined"!==e(n)&&!1!==n&&"true"===n,"undefined"!==e(r)&&!1!==r&&""!==r&&SUI.replaceModal(r,c,u,n,i,f),o.preventDefault()})),d.on("click",(function(o){a=t(this),l=a.attr("data-modal-slide"),u=a.attr("data-modal-slide-focus"),h=a.attr("data-modal-slide-intro"),"undefined"!==e(u)&&!1!==u&&""!==u||(u=void 0),"undefined"!==e(h)&&!1!==h&&""!==h||(h=""),"undefined"!==e(l)&&!1!==l&&""!==l&&SUI.slideModal(l,u,h),o.preventDefault()})),i.on("click",(function(e){SUI.closeModal(f),e.preventDefault()}))}(),this},SUI.modalDialog()}(jQuery)},943:function(){const{__:e}=wp.i18n;var t;t=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageModals=function(){t("body").hasClass("toplevel_page_powered-cache")&&t("#pcmodal--powered-cache-diagnostic-test").on("click",(function(){const a=t(this).closest(".sui-box"),o=a.find(".sui-box-title"),i=a.find(".sui-box-header button"),s=a.find("#powered-cache-diagnostic-items"),d=t("#powered_cache_run_diagnostic").val(),n=e("Diagnostic","powered-cache");jQuery.ajax({url:ajaxurl,method:"post",beforeSend(){o.text(e("Running Diagnostic Tests…","powered-cache")),i.attr("disabled",!0),s.empty()},data:{nonce:d,action:"powered_cache_run_diagnostic"},success(e){e.success&&e.data.length&&e.data.forEach((e=>{let t=null;t=e.status?'<span class="sui-icon-check" aria-hidden="true"></span>':'<span class="sui-icon-close" aria-hidden="true"></span>',s.append(`<li>${t} ${e.description}</li>`)}))}}).done((function(){o.text(n),i.removeAttr("disabled")}))}))},t("body").ready((function(){PoweredCache.pageModals("modals")}))},332:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.sideNavigation=function(t){const a=e(t);return function(){a.on("click",(function(t){!function(t){const a=e(t),o=a.closest(".sui-vertical-tabs"),i=a.closest(".sui-row-with-sidenav"),s=i.find("> div[data-tab]"),d=a.data("tab"),n=i.find(`div[data-tab="${d}"]`);o.find("li").removeClass("current"),a.parent().addClass("current"),localStorage.setItem("poweredcache_current_nav",t.hash),s.hide(),n.show()}(t.target),t.preventDefault(),t.stopPropagation()})),window.location.hash&&e(`a[href="${window.location.hash}"]`).length&&e(`a[href^="${window.location.hash}"]`).click();const t=localStorage.getItem("poweredcache_current_nav");t&&e(`a[href="${t}"]`).length&&e(`a[href^="${t}"]`).click()}(),this},e("body").ready((function(){const t=e(".sui-vertical-tab a");PoweredCache.sideNavigation(t)}))},880:function(){var e;e=jQuery,"object"!==typeof window.PoweredCache&&(window.PoweredCache={}),PoweredCache.pageToggles=function(t){if(e("body").hasClass("toplevel_page_powered-cache"))return e('.sui-toggle input[type="checkbox"]').each((function(){const t=e(this);void 0!==t.attr("aria-controls")&&function(t){const a=e(`#${t.attr("aria-controls")}`);t.on("change",(function(){t.is(":checked")?a.show():a.hide()}))}(t)})),this},e("body").ready((function(){PoweredCache.pageToggles("toggles")}))}},t={};function a(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,a),s.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";a(150),a(332),a(880),a(943);!function(e){let t=0;e(".add_cdn_hostname").click((function(a){a.preventDefault();let o=e(".cdn-zone:first").clone();0===t?t=e(".cdn-zone").length:t++,o=e(o).attr("id",`cdn-zone-${t}`),e(o).find(".cdn_hostname").val(""),e(o).find(".cdn_zone").prop("selectedIndex",0),e(o).find("button").removeClass("sui-hidden-important"),e("#cdn-zones").append(o)})),e("#cdn-zones").on("click",".remove_cdn_hostname",(function(){const t=e(this).parents(".cdn-zone");return"cdn-zone-0"===t.attr("id")?(alert("Nice try :) This zone cannot be removed!"),!1):(t.remove(),!0)})),e("#enable_cache_preload").on("change",(function(){e(this).is(":checked")?e("#enable_sitemap_preload_wrapper").show():e("#enable_sitemap_preload_wrapper").hide()})),e("#enable_page_cache").on("change",(function(){e(this).is(":checked")?e("#preload_page_cache_warning_message").hide():e("#preload_page_cache_warning_message").show()})),e("#cloudflare-api-token").on("keyup keypress change",(function(){e(this).val().length>0?e("#cloudflare-api-details").hide():e("#cloudflare-api-details").show()})),e(".heartbeat_dashboard_status").on("change",(function(){"modify"===e(this).val()?e("#heartbeat-dashboard-interval").show():e("#heartbeat-dashboard-interval").hide()})),e(".heartbeat_radio").on("change",(function(){const t=e(this).attr("aria-controls");t&&("modify"===e(this).val()?e(`#${t}`).show():e(`#${t}`).hide())})),e("#powered-cache-import-file-input").on("change",(function(){const t=e(this)[0];if(t.files.length){const a=t.files[0];e("#powered-cache-import-file-name").text(a.name),e("#powered-cache-import-upload-wrap").addClass("sui-has_file"),e("#powered-cache-import-btn").removeAttr("disabled")}else e("#powered-cache-import-file-name").text(""),e("#powered-cache-import-upload-wrap").removeClass("sui-has_file"),e("#powered-cache-import-btn").attr("disabled","disabled")})),e("#powered-cache-import-remove-file").on("click",(function(){e("#powered-cache-import-file-input").val("").trigger("change")}))}(jQuery)}()}();
  • powered-cache/trunk/includes/admin/dashboard.php

    r2851003 r2885559  
    323323    if ( isset( $options['cdn_hostname'] ) ) {
    324324        foreach ( (array) $options['cdn_hostname'] as $hostname ) {
     325            $hostname = trim( $hostname );
    325326            if ( filter_var( $hostname, FILTER_VALIDATE_URL ) ) {
    326327                $cdn_hostname[] = wp_parse_url( $hostname, PHP_URL_HOST );
  • powered-cache/trunk/includes/classes/AdvancedCache.php

    r2851752 r2885559  
    8585        add_filter( 'powered_cache_page_cache_enable', array( $this, 'maybe_caching_disabled' ) );
    8686        add_filter( 'powered_cache_mod_rewrite', array( $this, 'maybe_disable_mod_rewrite' ), 99 );
     87        add_action( 'wp_update_site', array( $this, 'purge_on_site_update' ), 10, 2 );
    8788    }
    8889
     
    281282            clean_site_cache_dir();
    282283        }
     284    }
     285
     286    /**
     287     * Purge site cache when site updated (eg: archived, deleted etc...)
     288     *
     289     * @param \WP_Site $new_site New site object.
     290     * @param \WP_Site $old_site Old site object.
     291     *
     292     * @return void
     293     * @since 2.5.3
     294     */
     295    public function purge_on_site_update( $new_site, $old_site ) {
     296        switch_to_blog( $old_site->id );
     297        if ( $this->settings['async_cache_cleaning'] ) {
     298            $this->cache_purger->push_to_queue( [ 'call' => 'clean_site_cache_dir' ] );
     299            $this->cache_purger->save()->dispatch();
     300        } else {
     301            clean_site_cache_dir();
     302        }
     303        restore_current_blog();
    283304    }
    284305
  • powered-cache/trunk/includes/classes/FileOptimizer.php

    r2725852 r2885559  
    201201     *
    202202     * @return string|string[]|null
     203     * @see https://stackoverflow.com/a/29363569
    203204     */
    204205    public function run_html_minify( $buffer ) {
    205         $search = array(
    206             '/\>[^\S ]+/s',  // strip whitespaces after tags, except space
    207             '/[^\S ]+\</s',  // strip whitespaces before tags, except space
    208             '/(\s)+/s',       // shorten multiple whitespace sequences
    209             '/^\\s+|\\s+$/',       // shorten multiple whitespace sequences
     206        $replace = array(
     207            // remove tabs before and after HTML tags
     208            '/\>[^\S ]+/s'               => '>',
     209            '/[^\S ]+\</s'               => '<',
     210            // shorten multiple whitespace sequences; keep new-line characters because they matter in JS!!!
     211            '/([\t ])+/s'                => ' ',
     212            // remove leading and trailing spaces
     213            '/^([\t ])+/m'               => '',
     214            '/([\t ])+$/m'               => '',
     215            // remove JS line comments (simple only); do NOT remove lines containing URL (e.g. 'src="http://server.com/"')!!!
     216            '~//[a-zA-Z0-9 ]+$~m'        => '',
     217            // remove empty lines (sequence of line-end and white-space characters)
     218            '/[\r\n]+([\t ]?[\r\n]+)+/s' => "\n",
     219            // remove empty lines (between HTML tags); cannot remove just any line-end characters because in inline JS they can matter!
     220            '/\>[\r\n\t ]+\</s'          => '><',
     221            // remove "empty" lines containing only JS's block end character; join with next line (e.g. "}\n}\n</script>" --> "}}</script>"
     222            '/}[\r\n\t ]+/s'             => '}',
     223            '/}[\r\n\t ]+,[\r\n\t ]+/s'  => '},',
     224            // remove new-line after JS's function or condition start; join with next line
     225            '/\)[\r\n\t ]?{[\r\n\t ]+/s' => '){',
     226            '/,[\r\n\t ]?{[\r\n\t ]+/s'  => ',{',
     227            // remove new-line after JS's line end (only most obvious and safe cases)
     228            '/\),[\r\n\t ]+/s'           => '),',
     229            // remove quotes from HTML attributes that does not contain spaces; keep quotes around URLs!
     230            '~([\r\n\t ])?([a-zA-Z0-9]+)="([a-zA-Z0-9_/\\-]+)"([\r\n\t ])?~s' => '$1$2=$3$4', // $1 and $4 insert first white-space character found before/after attribute
    210231        );
    211 
    212         $replace = array( '>', '<', '\\1', ' ' );
    213         $buffer  = preg_replace( $search, $replace, $buffer );
     232        $buffer  = preg_replace( array_keys( $replace ), array_values( $replace ), $buffer );
    214233
    215234        return $buffer;
  • powered-cache/trunk/includes/compat/domain-mapping.php

    r2589110 r2885559  
    125125    $mapped_domains = [];
    126126
    127     if ( class_exists( '\Mercator\Mapping' ) ) {
     127    if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) {
    128128        $mappings = \Mercator\Mapping::get_by_site( get_current_blog_id() );
    129129        if ( ! is_wp_error( $mappings ) && $mappings ) {
     
    181181 */
    182182function purge_on_site_delete( $site_object ) {
    183     if ( class_exists( '\Mercator\Mapping' ) ) {
     183    if ( method_exists( '\Mercator\Mapping', 'get_by_site' ) ) {
    184184        $mappings = \Mercator\Mapping::get_by_site( $site_object->id );
    185185        if ( ! is_wp_error( $mappings ) && $mappings ) {
  • powered-cache/trunk/includes/file-optimizer.php

    r2749491 r2885559  
    7070define( 'POWERED_CACHE_FO_CACHE_DIR', CONCAT_FILES_ROOT . '/wp-content/cache/min/' );
    7171define( 'POWERED_CACHE_FO_DEBUG', false );
     72
     73if ( ! defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) ) {
     74    define( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS', false );
     75}
    7276
    7377if ( ! file_exists( POWERED_CACHE_FO_CACHE_DIR ) ) {
     
    231235        $stat = stat( $cache_file_name );
    232236
     237        set_cache_headers();
    233238        header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $stat['mtime'] ) . ' GMT' );
    234239        header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $buf ) ) );
     
    353358}
    354359
     360set_cache_headers();
    355361header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', $last_modified ) . ' GMT' );
    356362header( 'Content-Length: ' . ( strlen( $pre_output ) + strlen( $output ) ) );
     
    412418    }
    413419}
     420
     421
     422/**
     423 * Add cache headers
     424 *
     425 * @return void
     426 * @since 2.5.3
     427 */
     428function set_cache_headers() {
     429    if ( defined( 'POWERED_CACHE_FO_DISABLE_CACHE_HEADERS' ) && POWERED_CACHE_FO_DISABLE_CACHE_HEADERS ) {
     430        return;
     431    }
     432
     433    $ttl_in_seconds = 31536000; // 365 days
     434    $ttl            = gmdate( "D, d M Y H:i:s", time() + $ttl_in_seconds ) . " GMT";
     435
     436    header( "Expires: $ttl" );
     437    header( "Cache-Control: max-age=$ttl_in_seconds" );
     438}
  • powered-cache/trunk/languages/powered-cache.pot

    r2851752 r2885559  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Powered Cache 2.5.2\n"
     5"Project-Id-Version: Powered Cache 2.5.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/powered-cache\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-01-20T09:12:05+00:00\n"
     12"POT-Creation-Date: 2023-03-23T10:36:33+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.6.0\n"
     14"X-Generator: WP-CLI 2.7.1\n"
    1515"X-Domain: powered-cache\n"
    1616
    1717#. Plugin Name of the plugin
    1818#: includes/admin/dashboard.php:93
    19 #: includes/admin/dashboard.php:434
     19#: includes/admin/dashboard.php:435
    2020#: includes/admin/partials/settings-page.php:40
    2121#: includes/classes/MetaBox.php:98
     
    4242
    4343#: includes/admin/dashboard.php:106
    44 #: includes/admin/dashboard.php:817
     44#: includes/admin/dashboard.php:818
    4545msgid "Settings"
    4646msgstr ""
    4747
    48 #: includes/admin/dashboard.php:462
     48#: includes/admin/dashboard.php:463
    4949msgid "Page cache deleted for all websites!"
    5050msgstr ""
    5151
    52 #: includes/admin/dashboard.php:463
     52#: includes/admin/dashboard.php:464
    5353msgid "Page cache deleted successfully!"
    5454msgstr ""
    5555
    56 #: includes/admin/dashboard.php:464
     56#: includes/admin/dashboard.php:465
    5757msgid "Object cache deleted successfully!"
    5858msgstr ""
    5959
    60 #: includes/admin/dashboard.php:465
     60#: includes/admin/dashboard.php:466
    6161msgid "All cached items flushed successfully!"
    6262msgstr ""
    6363
    64 #: includes/admin/dashboard.php:466
     64#: includes/admin/dashboard.php:467
    6565msgid "The cache preloading has been initialized!"
    6666msgstr ""
    6767
    68 #: includes/admin/dashboard.php:467
     68#: includes/admin/dashboard.php:468
    6969msgid "The Critical CSS generation process has been initialized!"
    7070msgstr ""
    7171
    72 #: includes/admin/dashboard.php:468
     72#: includes/admin/dashboard.php:469
    7373msgid "The Critical CSS generation process has been initialized for all sites! This might take a while, depending on the network size."
    7474msgstr ""
    7575
    76 #: includes/admin/dashboard.php:469
     76#: includes/admin/dashboard.php:470
    7777msgid "Cloudflare cache flushed, it can take up to 30 seconds to delete all cache from Cloudflare!"
    7878msgstr ""
    7979
    80 #: includes/admin/dashboard.php:470
     80#: includes/admin/dashboard.php:471
    8181msgid "Settings have been reset!"
    8282msgstr ""
    8383
    84 #: includes/admin/dashboard.php:471
     84#: includes/admin/dashboard.php:472
    8585msgid "Settings have been imported!"
    8686msgstr ""
    8787
    88 #: includes/admin/dashboard.php:472
     88#: includes/admin/dashboard.php:473
    8989msgid "Settings saved and database being optimized..."
    9090msgstr ""
    9191
    92 #: includes/admin/dashboard.php:473
     92#: includes/admin/dashboard.php:474
    9393msgid "Settings saved."
    9494msgstr ""
    9595
    96 #: includes/admin/dashboard.php:477
     96#: includes/admin/dashboard.php:478
    9797msgid "Page cache for %s language has been deleted!"
    9898msgstr ""
    9999
    100 #: includes/admin/dashboard.php:481
    101100#: includes/admin/dashboard.php:482
    102101#: includes/admin/dashboard.php:483
     
    105104#: includes/admin/dashboard.php:486
    106105#: includes/admin/dashboard.php:487
     106#: includes/admin/dashboard.php:488
    107107msgid "You don't have permission to perform this action!"
    108108msgstr ""
    109109
    110 #: includes/admin/dashboard.php:488
     110#: includes/admin/dashboard.php:489
    111111msgid "Your license key does not seem valid. A valid license is required for the Critical CSS!"
    112112msgstr ""
    113113
    114 #: includes/admin/dashboard.php:489
     114#: includes/admin/dashboard.php:490
    115115msgid "Could not flush Cloudflare cache. Please make sure you entered the correct credentials and zone id!"
    116116msgstr ""
    117117
    118 #: includes/admin/dashboard.php:531
     118#: includes/admin/dashboard.php:532
    119119msgid "Purge All Cache"
    120120msgstr ""
    121121
    122 #: includes/admin/dashboard.php:686
     122#: includes/admin/dashboard.php:687
    123123msgid "wp-config.php is writable."
    124124msgstr ""
    125125
    126 #: includes/admin/dashboard.php:688
     126#: includes/admin/dashboard.php:689
    127127msgid "wp-config.php is not writable. Please make sure the file writable or you can manually define %s constant."
    128128msgstr ""
    129129
    130 #: includes/admin/dashboard.php:701
     130#: includes/admin/dashboard.php:702
    131131msgid "Cache directory %s is not exist!"
    132132msgstr ""
    133133
    134 #: includes/admin/dashboard.php:703
     134#: includes/admin/dashboard.php:704
    135135msgid "Cache directory %s is not writeable!"
    136136msgstr ""
    137137
    138 #: includes/admin/dashboard.php:706
     138#: includes/admin/dashboard.php:707
    139139msgid "Cache directory %s exist and writable!"
    140140msgstr ""
    141141
    142 #: includes/admin/dashboard.php:720
     142#: includes/admin/dashboard.php:721
    143143msgid ".htaccess file %s is not exist!"
    144144msgstr ""
    145145
    146 #: includes/admin/dashboard.php:722
     146#: includes/admin/dashboard.php:723
    147147msgid ".htaccess file %s is not writeable!"
    148148msgstr ""
    149149
    150 #: includes/admin/dashboard.php:725
     150#: includes/admin/dashboard.php:726
    151151msgid ".htaccess file %s exist and writable!"
    152152msgstr ""
    153153
    154 #: includes/admin/dashboard.php:740
     154#: includes/admin/dashboard.php:741
    155155msgid "Required file for the page caching %s is not exist!"
    156156msgstr ""
    157157
    158 #: includes/admin/dashboard.php:742
     158#: includes/admin/dashboard.php:743
    159159msgid "Required file for the page caching %s is not writeable!"
    160160msgstr ""
    161161
    162 #: includes/admin/dashboard.php:745
     162#: includes/admin/dashboard.php:746
    163163msgid "Required file for the page caching %s exist and writable!"
    164164msgstr ""
    165165
    166 #: includes/admin/dashboard.php:760
     166#: includes/admin/dashboard.php:761
    167167msgid "Required file for the object caching %s is not exist!"
    168168msgstr ""
    169169
    170 #: includes/admin/dashboard.php:762
     170#: includes/admin/dashboard.php:763
    171171msgid "Required file for the object caching %s is not writeable!"
    172172msgstr ""
    173173
    174 #: includes/admin/dashboard.php:765
     174#: includes/admin/dashboard.php:766
    175175msgid "Required file for the object caching %s exist and writable!"
    176176msgstr ""
    177177
    178 #: includes/admin/dashboard.php:778
     178#: includes/admin/dashboard.php:779
    179179msgid "Invalid request"
    180180msgstr ""
    181181
    182 #: includes/admin/dashboard.php:820
     182#: includes/admin/dashboard.php:821
    183183msgid "Get Premium"
    184184msgstr ""
     
    12641264msgstr ""
    12651265
    1266 #: includes/classes/AdvancedCache.php:101
     1266#: includes/classes/AdvancedCache.php:102
    12671267msgid "Purge Page Cache [Network Wide - All Sites]"
    12681268msgstr ""
    12691269
    1270 #: includes/classes/AdvancedCache.php:112
     1270#: includes/classes/AdvancedCache.php:113
    12711271msgid "Purge Page Cache"
    12721272msgstr ""
    12731273
    1274 #: includes/classes/AdvancedCache.php:122
     1274#: includes/classes/AdvancedCache.php:123
    12751275msgid "Purge Current Page"
    12761276msgstr ""
  • powered-cache/trunk/powered-cache.php

    r2851752 r2885559  
    44 * Plugin URI:        https://poweredcache.com
    55 * Description:       The most powerful caching and performance suite for WordPress. Easily Improve PageSpeed & Web Vitals Score.
    6  * Version:           2.5.2
     6 * Version:           2.5.3
    77 * Requires at least: 5.7
    88 * Requires PHP:      5.6
     
    2626
    2727// Useful global constants.
    28 define( 'POWERED_CACHE_VERSION', '2.5.2' );
     28define( 'POWERED_CACHE_VERSION', '2.5.3' );
    2929define( 'POWERED_CACHE_DB_VERSION', '2.0' );
    3030define( 'POWERED_CACHE_PLUGIN_FILE', __FILE__ );
  • powered-cache/trunk/readme.txt

    r2851752 r2885559  
    33Tags: cache, caching, web vitals, performance, fastest, page speed, optimization, cdn, object cache, minify, powered cache
    44Requires at least:  5.7
    5 Tested up to:  6.1
    6 Stable tag:  2.5.2
     5Tested up to:  6.2
     6Stable tag:  2.5.3
    77License: GPLv2 (or later)
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    169169
    170170== Changelog ==
     171
     172= 2.5.3 (March 23, 2023) =
     173- Added: Purge site cache on multisite when the site updated. (eg: archived etc...)
     174- Improvements: HTML minification.
     175- Improvements: Set file optimizer default cache header.
     176- Fix: Close icon on diagnostic modal
     177- Fix: Blank space on CDN hostname(s)
     178- Fix: WP Ultimo compatibility. (checking Mercator more strictly)
     179- Tested with WP 6.2
    171180
    172181= 2.5.2 (January 20, 2023) =
Note: See TracChangeset for help on using the changeset viewer.