Media File Renamer - Version 5.0.8

Version Description

(2020/09/26) = * Fix: Two options were not working very logically. * Fix: Avoid errors when the PHP Error Logs is too big. * Update: Use Nonce for Rest API.

Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 Media File Renamer
Version 5.0.8
Comparing to
See all releases

Code changes from version 5.0.7 to 5.0.8

app/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){function n(n){for(var r,i,l=n[0],c=n[1],u=n[2],d=0,f=[];d<l.length;d++)i=l[d],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&f.push(a[i][0]),a[i]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(s&&s(n);f.length;)f.shift()();return o.push.apply(o,u||[]),t()}function t(){for(var e,n=0;n<o.length;n++){for(var t=o[n],r=!0,l=1;l<t.length;l++){var c=t[l];0!==a[c]&&(r=!1)}r&&(o.splice(n--,1),e=i(i.s=t[0]))}return e}var r={},a={0:0},o=[];function i(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=r,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,n){if(1&n&&(e=i(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)i.d(t,r,function(n){return e[n]}.bind(null,r));return t},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="";var l=window.wpJsonMfrh=window.wpJsonMfrh||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;o.push([78,1]),t()}({0:function(e,n){e.exports=React},69:function(e,n){e.exports=ReactDOM},78:function(e,n,t){"use strict";t.r(n);var r=wp.i18n.__,a={};a.RENAME=r("Rename","media-file-renamer"),a.DASHBOARD=r("Dashboard","media-file-renamer"),a.PENDING=r("Pending","media-file-renamer"),a.RENAMED=r("Renamed","media-file-renamer"),a.ALL=r("All","media-file-renamer"),a.THUMB=r("Thumb","media-file-renamer"),a.TITLE=r("Title","media-file-renamer"),a.ATTACHED_TO=r("Attached To","media-file-renamer"),a.FILENAME=r("Filename","media-file-renamer");var o=a,i=mfrh_media_file_renamer.prefix,l=mfrh_media_file_renamer.domain,c=mfrh_media_file_renamer.rest_url.replace(/\/+$/,""),u=mfrh_media_file_renamer.api_url.replace(/\/+$/,""),s=mfrh_media_file_renamer.plugin_url.replace(/\/+$/,""),d="1"===mfrh_media_file_renamer.is_pro,f=d&&"1"===mfrh_media_file_renamer.is_registered,m="1"===mfrh_media_file_renamer.mfrh_undo,p="1"===mfrh_media_file_renamer.mfrh_manual_rename,h=t(0),b=t.n(h),g=t(1),y=t.n(g);function v(){return(v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){k(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function R(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return O(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return O(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var j=function(e){var n=e.spinner,t=void 0===n||n,r=e.busy,a=void 0!==r&&r,o=e.overlayStyle,i=R(Object(h.useState)(!0),2),l=i[0],c=i[1];Object(h.useEffect)((function(){var e;return a?c(!0):e=setTimeout((function(){c(!1),e=null}),250),function(){e&&clearTimeout(e)}}),[a]);var u=l?b.a.createElement(b.a.Fragment,null,b.a.createElement("div",{className:"overlay "+(a?"":"overlayHidden"),style:o},Boolean(t)&&b.a.createElement("div",{className:"lds-ellipsis "+(a?"":"spinnerHidden")},b.a.createElement("div",null),b.a.createElement("div",null),b.a.createElement("div",null),b.a.createElement("div",null))),b.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,s=w(w({},e),{},{busy:void 0,spinner:void 0});return b.a.createElement("div",v({style:{position:"relative"}},s),u,e.children)};j.propTypes={busy:y.a.bool.isRequired,spinner:y.a.bool,children:y.a.oneOfType([y.a.arrayOf(y.a.node),y.a.node]).isRequired};var S,P=j,C=t(2),_=t(4),A={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"},T=t(3),N=t(28),I=t.n(N),z=t(29),M=t.n(z),F=t(30),L=t.n(F),B=t(9),q=t.n(B),U=t(10),D=t.n(U),G=t(11),H=t.n(G),W=t(6),$=t.n(W),Y=t(5),J=t.n(Y),V=t(8),K=t.n(V),Z=t(12),Q=t.n(Z),X=t(13),ee=t.n(X),ne=t(31),te=t.n(ne),re=t(32),ae=t.n(re),oe=t(14),ie=t.n(oe),le=t(33),ce=t.n(le),ue=t(34),se=t.n(ue),de=t(35),fe=t.n(de),me=t(36),pe=t.n(me),he=t(37),be=t.n(he),ge=t(38),ye=t.n(ge),ve=t(39),xe=t.n(ve),Ee=t(40),we=t.n(Ee),ke=t(41),Re=t.n(ke),Oe=t(42),je=t.n(Oe),Se=t(43),Pe=t.n(Se),Ce=t(44),_e=t.n(Ce),Ae=t(45),Te=t.n(Ae),Ne=t(46),Ie=t.n(Ne);function ze(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Me=(ze(S={lock:I.a,"lock-open":M.a,"file-undo":L.a,"chevron-double-left":q.a,"chevron-double-right":D.a,"chevron-left":H.a,"chevron-right":$.a,"chevron-down":J.a,"chevron-up":K.a,pause:Q.a,play:ee.a,replay:te.a,check:ae.a,stop:ie.a,delete:ce.a,undo:se.a,alert:fe.a,database:pe.a,pencil:be.a,tools:ye.a,cog:xe.a,close:we.a,cat:Re.a,upload:je.a,trash:Pe.a},"pencil",_e.a),ze(S,"dashboard",Te.a),ze(S,"search",Ie.a),S);function Fe(){return(Fe=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Le(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Be(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ","\n"]);return Be=function(){return e},e}var qe=Object(C.a)((function(e){var n=e.className,t=e.icon,r=void 0===t?null:t,a=e.onClick,o=e.disabled,i=void 0!==o&&o,l=e.color,c=void 0===l?null:l,u=e.children,s=Le(e,["className","icon","onClick","disabled","color","children"]),d=!!r,f="nui-button ".concat(n||"").concat(d?" has-icon":""," ").concat(c?"custom-color":"");return b.a.createElement("button",Fe({type:"button",className:f,onClick:a,disabled:i},s),d&&b.a.createElement(T.Icon,{icon:"string"==typeof r?Me[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),b.a.createElement("span",null,u))}))(Be(),A.fontFamily,A.fontSizeText,A.blue,Object(_.a)(.1,A.blue),A.lightBlue,A.blue,A.blue,Object(_.a)(.1,A.lightBlue),A.red,A.red,Object(_.a)(.1,A.red),A.green,A.green,Object(_.a)(.1,A.green),(function(e){return Ue(e.color)})),Ue=function(e){if(e)return"\n &.custom-color {\n background-color: ".concat(e,";\n border: 1px solid ").concat(e,";\n\n &:hover {\n background-color: ").concat(Object(_.a)(.1,e),";\n }\n }\n ")},De=function(e){return b.a.createElement(qe,e)};function Ge(){return(Ge=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function He(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function We(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return We=function(){return e},e}De.propTypes={className:y.a.oneOf(["primary","secondary","danger","success"]),disabled:y.a.bool,icon:y.a.oneOfType([y.a.instanceOf(T.IconifyIcon),y.a.oneOf(["setting","edit","trash"])]),color:y.a.string,onClick:y.a.func.isRequired},De.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}};var $e=C.a.a(We(),A.yellow,A.white,A.fontFamily,A.white),Ye=function(e){var n=e.show,t=void 0===n||n,r=e.className,a=He(e,["show","className"]);return t?b.a.createElement($e,Ge({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},Je=function(e){return b.a.createElement(Ye,e)};Je.propTypes={show:y.a.bool,className:y.a.string},Je.defaultProps={show:!0,className:void 0};var Ve=t(21),Ke=t.n(Ve);function Ze(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=nn(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Qe(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Xe(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Qe(o,r,a,i,l,"next",e)}function l(e){Qe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function en(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||nn(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(e,n){if(e){if("string"==typeof e)return tn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?tn(e,n):void 0}}function tn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(h.useState)(n),a=en(r,2),o=a[0],i=a[1],l=Object(h.useState)(null),c=en(l,2),u=c[0],s=c[1],d=Object(h.useState)(t),f=en(d,2),m=f[0],p=f[1],b=Object(h.useState)(0),g=en(b,2),y=g[0],v=g[1];return Object(h.useEffect)((function(){void 0!==e&&(e.success?(s(null),i(e.data),v(e.total?e.total:0)):s(e.error)),p(void 0===e)}),[e]),{busy:m,data:o,total:y,error:u}},an=function(){var e=Object(h.useRef)(),n=en(Object(h.useState)({}),2),t=n[0],r=n[1];return Object(h.useEffect)((function(){if(e&&e.current){var n=new ResizeObserver((function(e){var n=e[0];n.contentRect&&r({width:n.contentRect.left+n.contentRect.right,height:n.contentRect.top+n.contentRect.bottom})}));return n.observe(e.current),function(){n.unobserve(e.current)}}}),[]),{ref:e,width:t.width?t.width:0,height:t.height?t.height:0}},on=function(e){var n=Object(h.useRef)(),t=function(t){e&&!n.current.contains(t.target)&&e()};return Object(h.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),n},ln=null,cn=new Ke.a({concurrency:1,autoStart:!1});function un(){var e=hn(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return un=function(){return e},e}function sn(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return dn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dn(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function fn(){var e=hn(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return fn=function(){return e},e}function mn(){var e=hn(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return mn=function(){return e},e}function pn(){var e=hn(["\n display: inline-block;\n"]);return pn=function(){return e},e}function hn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var bn=C.a.div(pn()),gn=C.a.button(mn(),A.blue,A.fontFamily,A.fontSizeText,Object(_.a)(.1,A.blue)),yn=C.a.div(fn(),A.blue,A.lightShadow,A.blue),vn=function(e){var n=e.title,t=e.disabled,r=void 0!==t&&t,a=e.isPro,o=void 0!==a&&a,i=sn(b.a.useState(!1),2),l=i[0],c=i[1],u=on((function(){c(!1)})),s=an(),d=s.ref,f=s.width,m=function(){c(!l)},p=b.a.Children.map(e.children,(function(e){return b.a.cloneElement(e,{isPro:o,disabled:e.props.disabled||r,onClick:function(){e.props.onClick&&e.props.onClick(),m()}})}));return b.a.createElement(bn,{ref:u},b.a.createElement(gn,{ref:d,type:"button",disabled:r,onClick:m},b.a.createElement("span",null,n),b.a.createElement(T.Icon,{icon:J.a,width:"24",height:"24",style:{marginLeft:"4px"}})),l&&b.a.createElement(yn,{style:{transform:"translateX(calc(-50% + ".concat(f/2,"px))")}},p))},xn=C.a.button(un(),A.blue,A.fontFamily,A.fontSizeText,Object(_.a)(.1,A.blue),A.proGray),En=function(e){var n=e.onClick,t=e.children,r=e.isPro,a=e.requirePro,o=void 0!==a&&a,i=e.disabled,l=o&&!r;return b.a.createElement(xn,{type:"button",className:l?"is-pro":"",onClick:n,disabled:i||l},b.a.createElement("span",null,t),l&&!r&&b.a.createElement(Je,null))},wn=function(e){return b.a.createElement(vn,e)},kn=function(e){return b.a.createElement(En,e)};function Rn(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||On(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function On(e,n){if(e){if("string"==typeof e)return jn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?jn(e,n):void 0}}function jn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Sn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return Sn=function(){return e},e}wn.propTypes={title:y.a.string,disabled:y.a.bool,isPro:y.a.bool},wn.defaultProps={title:void 0,disabled:!1,isPro:!1},kn.propTypes={onClick:y.a.func.isRequired,requirePro:y.a.bool},kn.defaultProps={onClick:function(){},requirePro:!1};var Pn=C.a.div(Sn()),Cn=function(e){var n=e.className,t=e.children,r=e.nekoErrors,a=void 0===r?[]:r,o=e.style,i=void 0===o?{}:o,l=Rn(Object(h.useState)(!1),2),c=l[0],u=l[1],s=Rn(Object(h.useState)(!1),2),d=s[0],f=s[1];if(a&&!c){var m,p=function(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=On(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}(a);try{for(p.s();!(m=p.n()).done;){var g=m.value;if(g){u(g);break}}}catch(e){p.e(e)}finally{p.f()}}return b.a.createElement(Pn,{className:n||"",style:i},c&&b.a.createElement("div",{className:"neko-rest-error"},b.a.createElement("div",{className:"container"},!d&&b.a.createElement(b.a.Fragment,null,b.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),b.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),b.a.createElement("p",null,b.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),b.a.createElement("p",{className:"neko-debug"},b.a.createElement("small",null,"URL: ",c.url,b.a.createElement("br",null),"CODE: ",c.code,b.a.createElement("br",null),"MESSAGE: ",c.message,b.a.createElement("br",null)))),c.body&&d&&b.a.createElement("p",{className:"neko-debug"},b.a.createElement("div",{dangerouslySetInnerHTML:{__html:c.body}})),c.body&&b.a.createElement(De,{color:"#a94242",onClick:function(){return f(!d)}},d?"Hide":"Display"," response from server"),b.a.createElement(De,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},_n=function(e){return b.a.createElement(Cn,e)};function An(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Tn(){var e=Mn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return Tn=function(){return e},e}function Nn(){var e=Mn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return Nn=function(){return e},e}function In(){var e=Mn(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return In=function(){return e},e}function zn(){var e=Mn(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return zn=function(){return e},e}function Mn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}_n.propTypes={className:y.a.string,style:y.a.object,nekoErrors:y.a.bool},_n.defaultProps={className:void 0,style:{},nekoErrors:!1};var Fn=C.a.h1(zn(),A.fontFamily,A.fontSizeH1),Ln=C.a.h2(In(),A.fontFamily,A.fontSizeH2),Bn=C.a.p(Nn(),A.fontFamily,A.fontSizeText),qn=C.a.span(Tn(),A.fontFamily,A.fontSizeText),Un=function(e){var n=e.children,t=An(e,["children"]);return e.h1?b.a.createElement(Fn,t,n):e.h2?b.a.createElement(Ln,t,n):e.p?b.a.createElement(Bn,t,n):b.a.createElement(qn,t,n)},Dn=function(e){return b.a.createElement(Un,e)};function Gn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return Gn=function(){return e},e}Dn.propTypes={h1:y.a.any,h2:y.a.any,p:y.a.any},Dn.defaultProps={h1:void 0,h2:void 0,p:void 0};var Hn=C.a.div(Gn(),A.fontSizeText,A.blue,A.blue,A.white,A.white),Wn=function(e){var n=e.title,t=e.children,r=e.className,a=e.busy,o=void 0!==a&&a,i=e.style,l=void 0===i?{}:i;return b.a.createElement(Hn,{className:"nui-block "+(r||""),style:l},b.a.createElement(P,{busy:o},b.a.createElement(Dn,{h2:!0,className:"nui-block-title"},n),b.a.createElement("div",{className:"nui-block-content"},t)))},$n=function(e){return b.a.createElement(Wn,e)};function Yn(){var e=Vn(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return Yn=function(){return e},e}function Jn(){var e=Vn(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return Jn=function(){return e},e}function Vn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}$n.propTypes={title:y.a.string,className:y.a.oneOf(["","primary"]),style:y.a.object},$n.defaultProps={title:void 0,className:"",style:{}};var Kn=C.a.div(Jn(),A.fontSizeText,A.fontFamily,A.white,A.blue),Zn=C.a.div(Yn(),A.lightGray),Qn=function(e){var n=e.children,t=e.header,r=e.headerAlign,a=void 0===r?"left":r,o=e.footer,i=e.footerAlign,l=void 0===i?"right":i,c=e.className,u=e.style,s=void 0===u?{}:u;return b.a.createElement(Kn,{className:c||"",style:s},t&&b.a.createElement(Zn,{className:"align-".concat(a)},t),b.a.createElement("div",{className:"content"},n),o&&b.a.createElement(Zn,{className:"align-".concat(l)},o))},Xn=function(e){return b.a.createElement(Qn,e)};function et(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return et=function(){return e},e}Xn.propTypes={header:y.a.element,headerAlign:y.a.oneOf(["left","right"]),footer:y.a.element,footerAlign:y.a.oneOf(["left","right"]),className:y.a.string,style:y.a.object},Xn.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}};var nt=Object(C.a)((function(e){var n=e.title,t=void 0===n?"":n,r=e.contentAlign,a=void 0===r?"left":r;return b.a.createElement("div",{className:e.className||""},t?b.a.createElement("div",{className:"nui-settings-head"},t):null,b.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},e.children))}))(et(),A.fontFamily,A.fontFamily),tt=function(e){return b.a.createElement(nt,e)};function rt(){var e=ot(["\n background-color: ",";\n color: white;\n"]);return rt=function(){return e},e}function at(){var e=ot(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return at=function(){return e},e}function ot(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}tt.propTypes={title:y.a.string,className:y.a.string,contentAlign:y.a.string},tt.defaultProps={title:"",className:void 0,contentAlign:"left"};var it=C.a.div(at()),lt=Object(C.a)((function(e){return e.children?b.a.createElement("div",{className:e.className},e.children):null}))(rt(),A.blue),ct=function(e){return b.a.createElement(it,{className:"window"},b.a.createElement(lt,null,e.title),e.children)},ut=function(e){return b.a.createElement(ct,e)};function st(){return(st=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function dt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function ft(){var e=pt(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return ft=function(){return e},e}function mt(){var e=pt(["\n display: flex;\n flex-wrap: wrap;\n"]);return mt=function(){return e},e}function pt(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ut.propTypes={title:y.a.string},ut.defaultProps={title:void 0};var ht=C.a.div(mt()),bt=C.a.div(ft()),gt=function(e){return b.a.createElement(ht,null,e.children)},yt=function(e){var n=e.full,t=e.minimal,r=dt(e,["full","minimal"]),a=n?"full":"";return a+=t?" minimal":"",b.a.createElement(bt,st({className:a},r),e.children)},vt=function(e){return b.a.createElement(gt,e)},xt=function(e){return b.a.createElement(yt,e)};vt.propTypes={},vt.defaultProps={},xt.propTypes={full:y.a.any},xt.defaultProps={full:void 0};var Et=t(16),wt=t.n(Et),kt=t(17),Rt=t.n(kt);function Ot(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return Ot=function(){return e},e}var jt=Object(C.a)((function(e){var n=e.id,t=e.name,r=e.checked,a=void 0!==r&&r,o=e.onChange,i=e.label,l=e.description,c=e.isPro,u=e.requirePro,s=void 0!==u&&u&&!c,d=s?"disabled":"";return b.a.createElement("div",{className:["nui-checkbox",e.className,d].join(" ")},b.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){o?o(!a,n):console.log("The onChange handler it not set for this checkbox.",e)},disabled:s}),b.a.createElement("label",{htmlFor:n},b.a.createElement("div",{className:"nui-checkbox-check-container"},b.a.createElement(T.Icon,{icon:a?Rt.a:wt.a,width:"30px",height:"30px",color:s?A.disabledForm:A.blue})),b.a.createElement("div",{className:"nui-checkbox-inner-container"},b.a.createElement("span",{className:"label"},i,b.a.createElement(Je,{className:"inline",show:s})),l?b.a.createElement("small",{className:"description"},l):null)))}))(Ot(),A.fontFamily,A.disabledForm),St=function(e){return b.a.createElement(jt,e)};function Pt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n"]);return Pt=function(){return e},e}St.propTypes={id:y.a.string,name:y.a.string,checked:y.a.bool,label:y.a.string,description:y.a.string,isPro:y.a.bool,requirePro:y.a.bool},St.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1};var Ct=Object(C.a)((function(e){var n=e.name,t=(e.max,e.isPro),r=void 0!==t&&t;return b.a.Children.map(e.children,(function(e){return e.props.name?e:b.a.cloneElement(e,{name:n,isPro:r})}))}))(Pt()),_t=function(e){return b.a.createElement(Ct,e)};function At(){return(At=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Tt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Nt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Nt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function It(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function zt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return zt=function(){return e},e}_t.propTypes={name:y.a.string,mas:y.a.number,isPro:y.a.bool},_t.defaultProps={name:void 0,mas:-1,isPro:!1};var Mt=Object(C.a)((function(e){var n=e.id,t=e.name,r=e.value,a=void 0===r?"":r,o=e.description,i=e.placeholder,l=void 0===i?"":i,c=e.onEnter,u=void 0===c?null:c,s=e.readOnly,d=void 0!==s&&s,f=e.type,m=void 0===f?"text":f,p=e.step,g=void 0===p?1:p,y=e.min,v=void 0===y?1:y,x=e.max,E=void 0===x?999:x,w=e.maxLength,k=void 0===w?3:w,R=e.className,O=e.style,j=e.natural,S=void 0!==j&&j,P=It(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),C=Tt(Object(h.useState)(a),2),_=C[0],A=C[1],T=!!e.onChange;Object(h.useEffect)((function(){T||A(a)}),[a]);var N=function(t){T?e.onChange(t.target.value,n):A(t.target.value,n)},I=function(t){u&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},z=function(t){e.onBlur&&a!==t.target.value&&e.onBlur(t.target.value,n)},M="neko-input ".concat(S?" natural":"");return b.a.createElement("div",{className:[R].join(" "),style:O},"number"===m?b.a.createElement("input",At({className:[M].join(" ")},P,{id:n,name:t,value:T?a:_,type:m,step:g,min:v,max:E,maxlength:k,placeholder:l,onChange:N,onKeyPress:I,onBlur:z,readOnly:d})):b.a.createElement("input",At({className:[M].join(" ")},P,{id:n,name:t,value:T?a:_,type:m,spellcheck:"false",placeholder:l,onChange:N,onKeyPress:I,onBlur:z,readOnly:d})),o&&b.a.createElement("p",{className:"neko-input-description"},o))}))(zt(),A.fontFamily,A.fontSizeText,A.blue,A.gray,A.fontFamily,A.fontSizeSmall),Ft=function(e){return b.a.createElement(Mt,e)};function Lt(){return(Lt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Bt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return qt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ut(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Dt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return Dt=function(){return e},e}Ft.propTypes={id:y.a.string,type:y.a.oneOf(["number","text"]),name:y.a.string,value:y.a.string,description:y.a.string,placeholder:y.a.string,onChange:y.a.func,onEnter:y.a.func,onBlur:y.a.func,readOnly:y.a.bool,step:y.a.number,min:y.a.number,max:y.a.number,maxLength:y.a.number,natural:y.a.bool},Ft.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1};var Gt=Object(C.a)((function(e){var n=e.id,t=e.name,r=e.value,a=void 0===r?"":r,o=e.description,i=e.placeholder,l=void 0===i?"":i,c=e.onEnter,u=void 0===c?null:c,s=e.readOnly,d=void 0!==s&&s,f=(e.maxLength,e.className),m=e.style,p=Ut(e,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),g=Bt(Object(h.useState)(a),2),y=g[0],v=g[1],x=!!e.onChange;Object(h.useEffect)((function(){x||v(a)}),[a]);return b.a.createElement("div",{className:[f].join(" "),style:m},b.a.createElement("textarea",Lt({className:"neko-textarea"},p,{id:n,name:t,spellcheck:"false",placeholder:l,onChange:function(t){x?e.onChange(t.target.value,n):v(t.target.value,n)},onKeyPress:function(t){u&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},onBlur:function(t){e.onBlur&&a!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:d}),x?a:y),o&&b.a.createElement("p",{className:"neko-input-description"},o))}))(Dt(),A.fontFamily,A.fontSizeText,A.blue,A.gray,A.fontFamily,A.fontSizeSmall),Ht=function(e){return b.a.createElement(Gt,e)};Ht.propTypes={id:y.a.string,name:y.a.string,value:y.a.string,description:y.a.string,placeholder:y.a.string,onChange:y.a.func,onEnter:y.a.func,onBlur:y.a.func,readOnly:y.a.bool},Ht.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1};var Wt=t(50),$t=t.n(Wt),Yt=t(51),Jt=t.n(Yt);function Vt(){var e=ir(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return Vt=function(){return e},e}function Kt(){var e=ir(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return Kt=function(){return e},e}function Zt(){return(Zt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Qt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Xt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function er(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function nr(){var e=ir(["\n background-color: ",";\n"]);return nr=function(){return e},e}function tr(){var e=ir(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return tr=function(){return e},e}function rr(){var e=ir(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return rr=function(){return e},e}function ar(){var e=ir(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return ar=function(){return e},e}function or(){var e=ir(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return or=function(){return e},e}function ir(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var lr=C.a.div(or(),A.blue),cr=C.a.div(ar(),A.white,A.blue,A.fontFamily),ur=C.a.div(rr()),sr=C.a.div(tr()),dr=C.a.div(nr(),A.white),fr=function(e){var n,t=e.id,r=e.name,a=e.value,o=e.scrolldown,i=void 0!==o&&o,l=e.isPro,c=void 0!==l&&l,u=e.onChange,s=er(e,["id","name","value","scrolldown","isPro","onChange"]),d=null===(n=b.a.Children.toArray(e.children).find((function(e){return e.props.value===a})))||void 0===n?void 0:n.props,f=(null==d?void 0:d.label)||"Select",m=(null==d?void 0:d.description)||e.description,p=(null==d?void 0:d.requirePro)||!1,g=Qt(Object(h.useState)(!1),2),y=g[0],v=g[1],x=i?on((function(){v(!1)})):null,E=p&&!c,w=function(n){if(n!==a){if(!u)return void console.log("The onChange handler it not set for this checkbox.",e);u(n,t)}i&&v(!1)},k=b.a.Children.map(e.children,(function(e){return b.a.cloneElement(e,{name:e.props.name||r,checked:e.props.value===a,onClick:w,scrolldown:i,isPro:c})}));return i?b.a.createElement(lr,Zt({id:t,ref:x},s,{onClick:function(){return v(!y)},className:["nui-select",y?"show-options":""],childrenLength:k.length}),b.a.createElement(cr,null,f,b.a.createElement("div",{className:"rightContent"},E&&b.a.createElement(Je,null),b.a.createElement(T.Icon,{icon:y?K.a:J.a,width:"24"}))),m&&b.a.createElement(ur,null,m),y&&b.a.createElement(sr,{className:y?"":"hidden"},b.a.createElement(dr,null,[k]))):k},mr=C.a.div(Kt(),A.fontFamily,A.disabledForm),pr=C.a.div(Vt(),A.blue,A.fontFamily,A.white,A.fontFamily),hr=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,o=e.label,i=e.description,l=e.onClick,c=e.scrolldown,u=e.isPro,s=void 0!==u&&u,d=e.requirePro,f=void 0!==d&&d&&!s,m=f?"disabled":"",p=b.a.createElement(mr,{className:"nui-select ".concat(e.className||""," ").concat(m)},b.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return l(e.target.value)},disabled:f}),b.a.createElement("label",{htmlFor:n},b.a.createElement(T.Icon,{icon:a?Jt.a:$t.a,width:"24px",color:f?A.disabledForm:A.blue}),b.a.createElement("div",{className:"inner-container"},b.a.createElement("span",{className:"label"},o,b.a.createElement(Je,{className:"inline",style:{top:-1},show:f})),i?b.a.createElement("small",{className:"description"},i):null))),h=b.a.createElement(pr,{className:"nui-select ".concat(e.className||""," ").concat(m)},b.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:f}),b.a.createElement("div",{className:"option",onClick:function(){return l(r)}},o,b.a.createElement(Je,{show:f})));return c?h:p},br=function(e){return b.a.createElement(fr,e)};br.propTypes={id:y.a.string,name:y.a.string,description:y.a.string,scrolldown:y.a.bool,isPro:y.a.bool,onChange:y.a.func},br.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var gr=function(e){return b.a.createElement(hr,e)};gr.propTypes={id:y.a.string,name:y.a.string,value:y.a.string,checked:y.a.bool,label:y.a.string,description:y.a.string,onClick:y.a.func,scrolldown:y.a.bool,isPro:y.a.bool,requirePro:y.a.bool},gr.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1};var yr=t(18),vr=t.n(yr),xr=t(52),Er=t.n(xr),wr=t(53),kr=t.n(wr);function Rr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Or(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Or(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function jr(){var e=Cr(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return jr=function(){return e},e}function Sr(){var e=Cr(["\n height: 24px;\n width: 24px;\n"]);return Sr=function(){return e},e}function Pr(){var e=Cr(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return Pr=function(){return e},e}function Cr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var _r=function(e){var n=e.chevron,t=void 0===n||n;return b.a.Children.map(e.children,(function(e){return b.a.cloneElement(e,{chevron:t})}))},Ar=C.a.div(Pr()),Tr=C.a.div(Sr()),Nr=C.a.div(jr(),A.finderBorder),Ir=function(e){var n={gallery:kr.a},t=e.title,r=e.chevron,a=!e.icon,o=!!e.icon,i=!!e.children,l=Rr(b.a.useState(!1),2),c=l[0],u=l[1],s=Rr(b.a.useState((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:vr.a})),2),d=s[0],f=s[1],m=b.a.Children.map(e.children,(function(e){return b.a.cloneElement(e,{chevron:r})}));return b.a.createElement("div",null,b.a.createElement(Ar,{onClick:function(){(a||i)&&(o||f(c?vr.a:Er.a),u(!c))},className:"".concat(a||m?"can-expand":"")},r?a||m?b.a.createElement(T.Icon,{icon:c?J.a:$.a,width:"1.5rem",height:"1.5rem"}):b.a.createElement(Tr,null):null,b.a.createElement(T.Icon,{icon:d,color:A.blue,width:"1.5rem",height:"1.5rem"}),b.a.createElement("p",null,t)),c&&b.a.createElement(Nr,{className:"".concat(a?"":"no-line"," ").concat(r?"":"no-chevron")},m))},zr=function(e){return b.a.createElement(_r,e)};zr.propTypes={chevron:y.a.bool},zr.defaultProps={chevron:!0};var Mr=function(e){return b.a.createElement(Ir,e)};function Fr(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return Fr=function(){return e},e}Mr.propTypes={icon:y.a.oneOfType([y.a.instanceOf(T.IconifyIcon),y.a.oneOf(["gallery"])]),title:y.a.string},Mr.defaultProps={icon:vr.a,title:void 0};var Lr=C.a.div(Fr()),Br=function(){return b.a.createElement(Lr,null,b.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),b.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),b.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),b.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),b.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),b.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),b.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),b.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),b.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},qr=function(e){return b.a.createElement(Br,e)};function Ur(e){return(Ur="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)}function Dr(){var e=Hr(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return Dr=function(){return e},e}function Gr(){var e=Hr(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return Gr=function(){return e},e}function Hr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}qr.propTypes={},qr.defaultProps={};var Wr=Object(C.a)((function(e){var n=e.value,t=void 0===n?0:n,r=e.max,a=void 0===r?100:r,o=e.busy,i=void 0!==o&&o,l=e.status;t=Math.min(t,a);var c=parseFloat(t)/parseFloat(a);return b.a.createElement("div",{className:e.className},b.a.createElement($r,{ratio:c,busy:e.busy,status:l}),b.a.createElement("div",{className:"nui-progress-buttons"},i&&e.onPauseClick&&b.a.createElement("div",{className:"nui-progress-button pause",onClick:e.onPauseClick},e.paused?b.a.createElement(T.InlineIcon,{icon:ee.a}):b.a.createElement(T.InlineIcon,{icon:Q.a})),i&&e.onStopClick&&b.a.createElement("div",{className:"nui-progress-button stop",onClick:e.onStopClick},b.a.createElement(T.InlineIcon,{icon:ie.a}))))}))(Gr(),A.blue,Object(_.a)(.1,A.blue),A.red,Object(_.a)(.1,A.red)),$r=Object(C.a)((function(e){var n,t,r,a=isNaN(e.ratio)?0:parseInt(Math.round(100*e.ratio)),o=Ur(e.status),i="undefined"!==o?"string"===o?e.status:e.status(a):"".concat(a,"%");return b.a.createElement("div",{className:e.className,style:(n={minWidth:28},t="minWidth",r=a+"%",t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n)},b.a.createElement("div",null,i))}))(Dr(),A.progress,A.fontFamily,(function(e){return e.busy?"animate-stripes 1.6s linear infinite":"none"})),Yr=function(e){return b.a.createElement(Wr,e)};function Jr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Vr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Vr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Kr(){var e=Qr(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return Kr=function(){return e},e}function Zr(){var e=Qr(["\n\tdisplay: flex;\n"]);return Zr=function(){return e},e}function Qr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Yr.propTypes={value:y.a.number,max:y.a.number,busy:y.a.bool,paused:y.a.bool,onPauseClick:y.a.func,onStopClick:y.a.func,status:y.a.oneOf([y.a.string,y.a.func])},Yr.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0};var Xr=C.a.div(Zr()),ea=C.a.div(Kr(),A.blackRGB,A.white,A.fontFamily,A.fontSizeText,(function(e){return e.visible?"inline-block":"none"}),A.blackRGB,A.blackRGB,A.blackRGB,A.blackRGB,(function(e){return e.style})),na=function(e){var n=e.text,t=void 0===n?"Hello world!":n,r=e.position,a=void 0===r?"top":r,o=Jr(Object(h.useState)(!1),2),i=o[0],l=o[1],c=an(),u=c.ref,s=c.width,d=c.height,f=an(),m=f.ref,p=f.width,g=f.height,y=Object(h.useMemo)((function(){var e=0,n=0;if("top"===a)e=-1*d-5,n=s/2*-1+p/2;else if("bottom"===a)e=g+5,n=s/2*-1+p/2;else if("left"===a){e=(d-g)/2*-1,n=-1*s-5}else if("right"===a){e=(d-g)/2*-1,n=p+5}return{transform:"translateX(".concat(n,"px) translateY(").concat(e,"px)")}}),[a,s,d,p,g]);return b.a.createElement(Xr,null,b.a.createElement(ea,{ref:u,visible:i,className:a,style:y},t),b.a.createElement("div",{ref:m,onMouseEnter:function(){return l(!0)},onMouseLeave:function(){return l(!1)}},e.children))},ta=function(e){return b.a.createElement(na,e)};function ra(){return(ra=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function aa(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function oa(){var e=la(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return oa=function(){return e},e}function ia(){var e=la(["\n display: flex;\n align-items: center;\n"]);return ia=function(){return e},e}function la(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ta.propTypes={text:y.a.string,position:y.a.oneOf(["top","right","bottom","left"])},ta.defaultProps={text:"Hello world!",position:"top"};var ca=C.a.div(ia()),ua=Object(C.a)(T.Icon)(oa(),(function(e){return e.color}),(function(e){return function(e){if(e)return"\n &:hover {\n path {\n fill: ".concat(Object(_.a)(.1,e),";\n }\n }\n ")}(e.color)})),sa=function(e){var n=e.icon,t=e.spinning,r=void 0!==t&&t,a=e.className,o=void 0===a?"":a,i=e.title,l=e.tooltip,c=e.containerStyle,u=e.color,s=aa(e,["icon","spinning","className","title","tooltip","containerStyle","color"]);s.width||s.height||(s.width=s.height=30);var d=function(){return"string"==typeof n?Me[n]||null:n},f="nui-icon ".concat(o).concat(s.onClick?" nui-clickable":"").concat(r?" spin":"");return l?b.a.createElement(ta,{text:l.text,position:l.position||"top"},b.a.createElement(ca,{style:c},b.a.createElement(ua,ra({icon:d(),className:f,color:u},s)))):b.a.createElement(ca,{style:c,title:i},b.a.createElement(ua,ra({icon:d(),className:f,color:u},s)),l?b.a.createElement(ta,null,l):null)},da=function(e){return b.a.createElement(sa,e)};da.propTypes={icon:y.a.oneOfType([y.a.instanceOf(T.IconifyIcon),y.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:y.a.string,spinning:y.a.bool,className:y.a.string,tooltip:y.a.string},da.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0};var fa=t(54),ma=t.n(fa);function pa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return pa=function(){return e},e}var ha=C.a.div(pa(),A.fontFamily,A.fontSizeText,A.header,A.fontFamily,A.fontFamily,A.fontSizeText),ba=function(e){var n=e.title,t=void 0===n?"NekoUI":n,r=e.subtitle,a=void 0===r?"By Jordy Meow":r,o=e.children,i=e.saving,l=void 0!==i&&i;return b.a.createElement(ha,null,b.a.createElement("div",{className:"nui-header-logo-container"},b.a.createElement(qr,null)),b.a.createElement("div",{className:"nui-header-title-container"},b.a.createElement("h1",{className:"nui-header-title"},t),b.a.createElement("small",{className:"nui-header-subtitle"},b.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),b.a.createElement("div",{className:"nui-header-extra-content"},o),l&&b.a.createElement(da,{icon:ma.a,width:"36",height:"36"}))},ga=function(e){return b.a.createElement(ba,e)};function ya(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n"]);return ya=function(){return e},e}ga.propTypes={title:y.a.string,subtitle:y.a.string,saving:y.a.bool},ga.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1};var va=C.a.div(ya(),A.fontFamily,A.blueRGB,A.white,A.darkGray,A.white,A.fontFamily),xa=function(e){var n=e.currentPage,t=e.limit,r=e.onClick,a=e.total,o=Math.ceil(0===a?1:t>0?a/t:1),i="nako-paging-controller-icon ".concat(1===n?"disabled":""),l="nako-paging-controller-icon ".concat(n===o?"disabled":""),c=function(e){r(e)};return b.a.createElement(va,null,b.a.createElement("span",{className:"neko-paging-text"},a," result",a>0?"s":""),b.a.createElement("div",{className:"neko-paging-controller"},b.a.createElement(T.Icon,{icon:q.a,className:i,onClick:function(){return c(1)}}),b.a.createElement(T.Icon,{icon:H.a,className:i,onClick:function(){return c(n-1)}}),b.a.createElement("p",{className:"nako-paging-controller-text"},"Page ",n," of ",o),b.a.createElement(T.Icon,{icon:$.a,className:l,onClick:function(){return c(n+1)}}),b.a.createElement(T.Icon,{icon:D.a,className:l,onClick:function(){return c(o)}})))},Ea=function(e){return b.a.createElement(xa,e)};function wa(){var e=Ra(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return wa=function(){return e},e}function ka(){var e=Ra(["\n display: flex;\n align-items: center;\n"]);return ka=function(){return e},e}function Ra(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Ea.propTypes={currentPage:y.a.number,limit:y.a.number,total:y.a.number,onClick:y.a.func},Ea.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0};var Oa=C.a.div(ka()),ja=C.a.span(wa(),A.blue,A.fontFamily,A.black,A.darkGray,A.darkGray),Sa=function(e){var n=e.id,t=e.value,r=e.onChange,a=e.busy,o=void 0!==a&&a,i=b.a.Children.map(e.children,(function(e,a){return b.a.cloneElement(e,{busy:o,isActive:e.props.value===t,onClick:function(e){e!==t&&r(e,n)}})}));return b.a.createElement(Oa,null,i)},Pa=function(e){var n=e.title,t=e.value,r=void 0===t?0:t,a=e.count,o=e.onClick,i=e.busy,l=e.isActive;return b.a.createElement(ja,{onClick:function(){return o(r)},className:"".concat(l?"is-active":"")},n,b.a.createElement("span",null,"(",i?b.a.createElement(da,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},Ca=function(e){return b.a.createElement(Sa,e)};Ca.propTypes={id:y.a.string,value:y.a.string,onChange:y.a.func},Ca.defaultProps={id:void 0,value:void 0,onChange:void 0};var _a=function(e){return b.a.createElement(Pa,e)};function Aa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return Aa=function(){return e},e}_a.propTypes={title:y.a.string,value:y.a.string,count:y.a.number,onClick:y.a.func,isActive:y.a.bool},_a.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1};var Ta=C.a.section(Aa(),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.backgroundColor}),(function(e){return e.width}),(function(e){return e.width}),(function(e){return e.width+2}),(function(e){return e.width/2+2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.degrees}),(function(e){return e.width+2}),(function(e){return e.width/2})),Na=function(e){var n=e.value,t=void 0===n?1e3:n,r=(e.min,e.max),a=void 0===r?2500:r,o=e.width,i=void 0===o?200:o,l=e.background,c=void 0===l?"#007cba":l,u=e.children,s=180*(t<=a?t:a)/a;return b.a.createElement(Ta,{backgroundColor:c,degrees:s,width:i},b.a.createElement("div",{class:"gauge"},b.a.createElement("div",{class:"mask"},b.a.createElement("div",{class:"semi-circle"}),b.a.createElement("div",{class:"semi-circle--mask"})),b.a.createElement("div",{class:"child-container"},b.a.createElement("div",{class:"child"},b.a.createElement("div",{class:"spacing"}),u))))};function Ia(){var e=Ma(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return Ia=function(){return e},e}function za(){var e=Ma(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return za=function(){return e},e}function Ma(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var Fa=C.a.p(za()),La=C.a.p(Ia()),Ba=t(55),qa=t.n(Ba);function Ua(){return(Ua=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Da(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Ga(){var e=Wa(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return Ga=function(){return e},e}function Ha(){var e=Wa(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return Ha=function(){return e},e}function Wa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $a=C.a.div(Ha(),A.overlay,A.white),Ya=C.a.div(Ga(),A.fontFamily,A.fontFamily),Ja=function(e){var n=e.children,t=e.className,r=e.style,a=e.ok,o=void 0===a?"OK":a,i=e.cancel,l=void 0===i?"Cancel":i,c=e.customButtons,u=void 0===c?null:c,s=e.title,d=void 0===s?"":s,f=e.content,m=void 0===f?"":f,p=e.onOkClick,h=e.onCancelClick,g=Da(e,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),y=r?"custom-modal":"",v=n||b.a.createElement(Ya,null,d&&b.a.createElement("p",{className:"title"},d),m&&b.a.createElement("p",{className:"content"},m),b.a.createElement("div",{className:"button-group"},h&&b.a.createElement(De,{className:"danger",onClick:h},l),p&&b.a.createElement(De,{onClick:p},o),u));return b.a.createElement(b.a.Fragment,null,b.a.createElement($a,{id:"neko-modal-parent"}),b.a.createElement(qa.a,Ua({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(y)},g),v))},Va=function(e){return b.a.createElement(Ja,e)};Va.propTypes={className:y.a.string,style:y.a.object,ok:y.a.string,cancel:y.a.string,title:y.a.string,content:y.a.string,onOkClick:y.a.func,onCancelClick:y.a.func,customButtons:y.a.object},Va.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null};var Ka=t(56),Za=t.n(Ka);function Qa(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Xa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return Xa=function(){return e},e}var eo=C.a.table(Xa(),A.white,A.fontFamily,A.blackRGB,A.blackRGB,A.blue,A.white,A.tableGray,A.blueRGB,A.white),no=function(e){var n=e.checked,t=e.intermediate,r=void 0!==t&&t,a=e.onSelect,o=void 0===a?function(){}:a,i=e.onUnselect,l=void 0===i?function(){}:i;Qa(e,["checked","intermediate","onSelect","onUnselect"]);return b.a.createElement(T.Icon,{icon:r?Za.a:n?Rt.a:wt.a,width:"24px",height:"24px",onClick:function(){n?l():o()}})},to=function(e){var n=e.columns,t=e.data,r=e.busy,a=void 0!==r&&r,o=e.onSelect,i=e.onUnselect,l=e.selectedItems,c=e.sort,u=e.onSortChange,s=n.length+(o?1:0),d=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:n.style||{}}}));return{id:e.id,cells:t}})),f=d.map((function(e){return e.id})),m=f.filter((function(e){return l.includes(e)})).length===f.length,p=!m&&l.length>0,h=b.a.createElement("tr",null,o&&b.a.createElement("th",{className:"table-checkbox-cell"},b.a.createElement(no,{checked:m,intermediate:p,onSelect:function(){return o(f)},onUnselect:function(){i(p?l:f)}})),n.map((function(e){var n=c&&c.accessor===e.accessor,t=c&&"asc"===c.by,r=e.style||{};return b.a.createElement("th",{style:r,key:e.accessor},b.a.createElement("div",{className:e.sortable?"sortable":"",onClick:e.sortable?function(){u(e.accessor,n&&t?"desc":"asc")}:void 0},b.a.createElement("div",null,e.title),b.a.createElement("div",null,e.sortable&&b.a.createElement(T.Icon,{icon:n?t?J.a:K.a:J.a,color:n?A.white:"rgba(".concat(A.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return b.a.createElement(P,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},b.a.createElement(eo,null,b.a.createElement("thead",null,h),b.a.createElement("tbody",null,!d.length&&b.a.createElement("tr",null,b.a.createElement("td",{colspan:s,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),d.map((function(e){return b.a.createElement("tr",{className:l.includes(e.id)?"selected":""},o&&b.a.createElement("td",{className:"table-checkbox-cell"},b.a.createElement(no,{checked:l.includes(e.id),onSelect:function(){return o([e.id])},onUnselect:function(){return i([e.id])}})),e.cells.map((function(e){return b.a.createElement("td",{style:e.style},e.value)})))}))),b.a.createElement("tfoot",null,h)))},ro=function(e){return b.a.createElement(to,e)};function ao(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return oo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function io(){var e=so(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return io=function(){return e},e}function lo(){var e=so(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return lo=function(){return e},e}function co(){var e=so(["\n"]);return co=function(){return e},e}function uo(){var e=so(["\n"]);return uo=function(){return e},e}function so(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ro.propTypes={columns:y.a.arrayOf(y.a.any),data:y.a.arrayOf(y.a.any),busy:y.a.arrayOf(y.a.bool),onSelect:y.a.func,onUnselect:y.a.func,selectedItems:y.a.arrayOf(y.a.object),onSortChange:y.a.func},ro.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0};var fo=C.a.div(uo()),mo=C.a.div(co()),po=C.a.button(lo(),A.fontFamily,A.fontSizeText,A.blue,A.white),ho=C.a.div(io(),A.blue),bo=function(e){var n=ao(b.a.useState(0),2),t=n[0],r=n[1],a=b.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),o=b.a.Children.map(e.children,(function(e,n){return b.a.cloneElement(e,{isActive:n===t})}));return b.a.createElement(fo,null,b.a.createElement(mo,null,a.map((function(n,a){return b.a.createElement(po,{key:n.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(t){!function(n,t,a){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,a))}(a,n,t)}},n.title,b.a.createElement(Je,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:n.requirePro}))}))),o)},go=function(e){var n=e.children,t=e.isActive;return b.a.createElement(ho,{className:"".concat(t?"active":"")},n)},yo=function(e){return b.a.createElement(bo,e)};yo.propTypes={isPro:y.a.bool,onChange:y.a.func},yo.defaultProps={isPro:!1,onChange:void 0};var vo=function(e){return b.a.createElement(go,e)};function xo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Eo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Eo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function wo(){var e=Oo(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return wo=function(){return e},e}function ko(){var e=Oo(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return ko=function(){return e},e}function Ro(){var e=Oo(["\n"]);return Ro=function(){return e},e}function Oo(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}vo.propTypes={isActive:y.a.bool,requirePro:y.a.bool,title:y.a.string},vo.defaultProps={isActive:!1,requirePro:!1,title:void 0};var jo=C.a.div(Ro()),So=C.a.div(ko(),A.blue,A.yellowRGB,A.white,A.fontFamily,A.white),Po=C.a.div(wo(),A.white),Co=function(e){var n=xo(b.a.useState(),2),t=n[0],r=n[1],a=b.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),o=b.a.Children.map(e.children,(function(e,n){return b.a.cloneElement(e,{isActive:n===t})}));return b.a.createElement(jo,null,a.map((function(n,a){return b.a.createElement(b.a.Fragment,null,b.a.createElement(So,{key:n.key,className:"".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(o){!function(n,a,o){if(!a.requirePro){var i=n===t?null:n;r(i),e.onChange&&e.onChange(i,a,o)}}(a,n,o)}},b.a.createElement("p",null,n.title,b.a.createElement(Je,{className:"inline",show:n.requirePro})),b.a.createElement(T.Icon,{icon:a===t?J.a:$.a,className:"neko-side-tab-icon"})),o[a])})))},_o=function(e){var n=e.children,t=e.isActive;return b.a.createElement(Po,{className:"".concat(t?"active":"")},n)},Ao=function(e){return b.a.createElement(Co,e)};Ao.propTypes={isPro:y.a.bool,onChange:y.a.func},Ao.defaultProps={isPro:!1,onChange:void 0};var To=function(e){return b.a.createElement(_o,e)};function No(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.left {\n justify-content: flex-start;\n }\n\n &.right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return No=function(){return e},e}To.propTypes={isActive:y.a.bool,requirePro:y.a.bool,title:y.a.string},To.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Io=C.a.div(No(),A.white,A.blackRGB),zo=function(e){var n=e.align,t=void 0===n?"left":n;return b.a.createElement(Io,{className:t},e.children)},Mo=function(e){return b.a.createElement(zo,e)};Mo.propTypes={align:y.a.oneOf(["left","right"])},Mo.defaultProps={align:"left"};t(22);function Fo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var Lo=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Fo(this,e),this.url=r,this.message=n,this.code=t,this.body=a,this.debug=o};function Bo(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function qo(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Bo(o,r,a,i,l,"next",e)}function l(e){Bo(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Uo(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"==typeof e)return Do(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Do(e,n)}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Do(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Go(e,n){for(var t=[],r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}var Ho=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=Uo(e.data);try{for(t.s();!(n=t.n()).done;){var r=n.value;try{r.meta=JSON.parse(r.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(e){t.e(e)}finally{t.f()}}else if(e.data.meta)try{e.data.meta=JSON.parse(e.data.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return e},Wo=function(){var e=qo(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>1&&void 0!==d[1]?d[1]:{},r=null,a={},o=null,i=null,e.prev=5,e.next=8,fetch("".concat(n),t);case 8:return i=e.sent,e.next=11,i.text();case 11:r=e.sent,(a=JSON.parse(r)).success||(l=!1===a.success?"NOT-SUCCESS":"N/A",c=a.message?a.message:"Unknown error. Check your Console Logs.","rest_no_route"===a.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===a.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),o=new Lo(c,l,n,r||i)),e.next=22;break;case 16:e.prev=16,e.t0=e.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),o=new Lo(s,u,n,r||i,e.t0);case 22:return o&&(console.error("[NekoError] JsonFetcher",o.url,{code:o.code,error:o.error,body:o.body}),a.success=!1,a.error=o),e.abrupt("return",Ho(a));case 24:case"end":return e.stop()}}),e,null,[[5,16]])})));return function(n){return e.apply(this,arguments)}}(),$o=function(){var e=qo(regeneratorRuntime.mark((function e(n,t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Wo(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:r}));case 1:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}();function Yo(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Jo(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Yo(o,r,a,i,l,"next",e)}function l(e){Yo(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Vo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ko(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ko(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ko(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Zo=wp.element,Qo=Zo.useState,Xo=Zo.useEffect,ei=function(e){var n=e.mutate,t=Vo(Qo(e.entry),2),r=t[0],a=t[1],i=Vo(Qo(!1),2),l=i[0],c=i[1],s=Vo(Qo(""),2),d=s[0],f=s[1],h=Vo(Qo(null),2),b=h[0],g=h[1],y=e.natural,v=void 0!==y&&y,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ln){var n=e.concurrency,t=void 0===n?2:n;console.log("Init GlobalQueue"),ln=new Ke.a({concurrency:t,autoStart:!0})}var r=function(){var e=Xe(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ln.add(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return{runTask:r}}({concurrency:2}).runTask;Xo((function(){f(""),e.entry?a(e.entry):e.mediaId&&E(e.mediaId)}),[e.entry]);var E=function(){var e=Jo(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,x(Jo(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$o("".concat(u,"/analyze"),{mediaId:n}));case 1:case"end":return e.stop()}}),e)}))));case 3:t=e.sent,a(t.data),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=Jo(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f(n);case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(){var e=Jo(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a(t),n&&n();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=Jo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,$o("".concat(u,"/rename"),{mediaId:r.ID});case 3:n=e.sent,k(n.data),g(null),c((function(e){return e-1}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=Jo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,$o("".concat(u,"/rename"),{mediaId:r.ID,filename:d});case 3:n=e.sent,k(n.data),g(null),f(""),c((function(e){return e-1}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=Jo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,$o("".concat(u,"/undo"),{mediaId:r.ID});case 3:n=e.sent,k(n.data,r.current_filename),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Jo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,$o("".concat(u,"/set_lock"),{mediaId:r.ID,lock:!r.locked});case 3:n=e.sent,k(n.data),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=!!d,_=C?d:b||(null==r?void 0:r.current_filename);return React.createElement(P,{busy:l},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Ft,{natural:v,readOnly:!p||l,value:_,onChange:w,onEnter:O,style:{marginRight:0,flex:"auto"}}),!C&&React.createElement(da,{icon:(null==r?void 0:r.locked)?"lock":"lock-open",width:24,title:(null==r?void 0:r.locked)?"Unlock, to allow future actions":"Lock, to avoid future actions",style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?A.blue:"#5a5a5a82",onClick:S}),C&&React.createElement(da,{icon:"close",width:24,style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?A.blue:"#5a5a5a82",onClick:function(){f("")}}),!C&&(null==r?void 0:r.proposed_filename)&&!(null==r?void 0:r.proposed_filename_exists)&&React.createElement(De,{style:{marginLeft:5},title:"Rename automatically",onMouseEnter:function(){return g(null==r?void 0:r.proposed_filename)},onMouseLeave:function(){return g(null)},onClick:R},"Auto Rename"),p&&C&&React.createElement(De,{style:{marginLeft:5},title:"Rename manually",onClick:O},o.RENAME),(null==r?void 0:r.proposed_filename_exists)&&React.createElement(da,{icon:"alert",color:"orange",tooltip:{text:"The ideal filename (".concat(r.proposed_filename,") already exists."),position:"left"}}),m&&!C&&(null==r?void 0:r.original_filename)&&React.createElement(da,{icon:"file-undo",title:"Rollback to original",color:A.red,onClick:j,onMouseEnter:function(){return g(null==r?void 0:r.original_filename)},onMouseLeave:function(){return g(null)}})))},ni=t(7);function ti(){var e=li(["\n color: white;\n margin: 0px 15px 15px 15px;\n\n .fatal {\n padding: 8px 12px;\n border-radius: 10px;\n background: #ab3014;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .warning {\n padding: 8px 12px;\n border-radius: 10px;\n background: #b98c0e;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .notice {\n padding: 8px 12px;\n border-radius: 10px;\n background: #23ad74;\n margin: 0 0 10px 0;\n border: 0;\n }\n"]);return ti=function(){return e},e}function ri(){var e=li(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n font-family: Lato;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]);return ri=function(){return e},e}function ai(){var e=li(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return ai=function(){return e},e}function oi(){var e=li(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]);return oi=function(){return e},e}function ii(){var e=li(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]);return ii=function(){return e},e}function li(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var ci=C.a.div(ii()),ui=Object(C.a)($n)(oi()),si=C.a.img(ai()),di=C.a.div(ri()),fi=C.a.div(ti());function mi(e){return function(e){if(Array.isArray(e))return yi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||gi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function hi(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){pi(o,r,a,i,l,"next",e)}function l(e){pi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function bi(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||gi(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gi(e,n){if(e){if("string"==typeof e)return yi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?yi(e,n):void 0}}function yi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var vi=wp.element,xi=vi.useState,Ei=vi.useEffect,wi="".concat(c,"/meow-common/v1"),ki=function(e){var n=e.request,t=e.title,r=e.max,a=bi(xi(!1),2),o=a[0],i=a[1],l=bi(xi([]),2),c=l[0],u=l[1],s=c.length>0?c.reduce((function(e,n){return e+n})):0,d=c.length>0?Math.ceil(s/c.length):0,f=!c.length&&o;Ei((function(){o&&setTimeout(hi(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(new Date).getTime(),e.next=3,$o("".concat(wi,"/").concat(n));case 3:r=(new Date).getTime(),a=r-t,u((function(e){return[].concat(mi(e),[a])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[c]);return React.createElement(ci,{style:{width:200,textAlign:"center"}},React.createElement(Dn,{h2:!0,style:{color:"white"}},t),React.createElement(Na,{size:200,value:f?r:d,max:r},React.createElement("span",{style:{fontSize:20}},f?"START":d+" ms"),React.createElement("span",{style:{fontSize:12}},f?"YOUR ENGINE":c.length+" requests")),React.createElement(De,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Ri(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Oi(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ri(Object(t),!0).forEach((function(n){ji(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ri(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ji(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Si(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Pi(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ci(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ci(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var _i=wp.element,Ai=_i.useState,Ti=_i.useEffect;u&&c&&s||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var Ni="".concat(c,"/meow-common/v1"),Ii=React.createElement(ci,null,React.createElement(Dn,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),zi=React.createElement(ci,null,React.createElement(Dn,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(Dn,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),Mi=React.createElement(ci,null,React.createElement(Dn,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(Dn,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(Dn,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/debugging-wordpress/",target:"_blank"},"How To Debug")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/seo-optimization/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/",target:"_blank"},"Clean Up and Optimize")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/optimize-images-cdn/",target:"_blank"},"Optimize Images")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/best-hosting-services-wordpress/",target:"_blank"},"Best Hosting Services"))))),Fi=React.createElement(ci,null,React.createElement(Dn,{p:!0},"A summarized version of your PHP Error Logs will be displayed here, with the latest errors at the top. After it, you will find information about your PHP, so make sure your scroll down.")),Li=function(){var e=Pi(Ai(!1),2),n=e[0],t=e[1],r=Object(ni.a)("".concat(Ni,"/all_settings/"),Wo),a=r.data,o=r.mutate,i=r.error,l=null==a?void 0:a.data,c=null==l?void 0:l.meowapps_hide_meowapps,u=null==l?void 0:l.force_sslverify,d=Pi(Ai(!1),2),f=d[0],m=d[1],p=Pi(Ai(""),2),h=p[0],b=p[1],g=Pi(Ai(""),2),y=g[0],v=g[1];Ti((function(){i&&!n&&(t(!0),console.error("Error from UseSWR",i.message))}),[i]),Ti((function(){var e=document.getElementById("meow-common-phperrorlogs"),n=document.getElementById("meow-common-phpinfo");b(e.innerHTML),v(n.innerHTML)}),[]);var x=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,t){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Oi({},a.data))[t]=n,o(Oi(Oi({},a),{},{data:r}),!1),m(!0),e.next=6,$o("".concat(Ni,"/update_option"),{name:t,value:n});case 6:i=e.sent,m(!1),i.success||alert(i.message),o();case 10:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Si(o,r,a,i,l,"next",e)}function l(e){Si(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,t){return n.apply(this,arguments)}}(),E=React.createElement(tt,{title:"Main Menu"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(Dn,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:f,checked:c,onChange:x}))),w=React.createElement(tt,{title:"SSL Verify"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(Dn,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:f,checked:u,onChange:x})));return React.createElement(_n,{showRestError:n},React.createElement(ga,{title:"The Dashboard"}),React.createElement(vt,null,React.createElement(xt,{full:!0},React.createElement(yo,null,React.createElement(vo,{title:"Meow Apps"},Ii,React.createElement(vt,null,React.createElement(xt,{minimal:!0},React.createElement(ui,{title:"Media Cleaner",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/media-cleaner.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(ui,{title:"Media File Renamer",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/media-file-renamer.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(ui,{title:"Contact Form Block",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress."))),React.createElement(ui,{title:"Meow Analytics",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(xt,{minimal:!0},React.createElement(ui,{title:"Meow Gallery",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/meow-gallery.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(ui,{title:"Meow Lightbox",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/meow-lightbox.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(ui,{title:"WP/LR Sync",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/wplr-sync.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"WP/LR Sync")),React.createElement("p",null,"Are you using Lightroom? So you know WP/LR Sync already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(ui,{title:"WP Retina 2x",className:"primary"},React.createElement(si,{src:"".concat(s,"/common/img/wp-retina-2x.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"WP Retina 2x")),React.createElement("p",null,"The first and best High-DPI plugin! It enforces high-quality image support and best-practices.")))))),React.createElement(vo,{title:"Performance"},zi,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(ki,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(ki,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(ki,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(vo,{title:"Recommendations"},Mi),React.createElement(vo,{title:"PHP Errors & Info"},Fi,React.createElement(fi,{dangerouslySetInnerHTML:{__html:h}}),React.createElement(di,{dangerouslySetInnerHTML:{__html:y}})),React.createElement(vo,{title:"Settings"},React.createElement($n,{title:"Settings",className:"primary"},E,w))))))};function Bi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function qi(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Bi(o,r,a,i,l,"next",e)}function l(e){Bi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Ui(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Di(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Di(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Gi=wp.element,Hi=Gi.useState,Wi=Gi.useEffect,$i="".concat(c,"/meow-licenser/").concat(i,"/v1"),Yi=function(){var e=Ui(Hi(!1),2),n=e[0],t=e[1],r=Ui(Hi(null),2),a=r[0],o=r[1],i=Ui(Hi(null),2),c=i[0],u=i[1],s=Ui(Hi(""),2),m=s[0],p=s[1],h=f&&(!c||"valid"!==c.license),b=function(){var e=qi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}return e.abrupt("return");case 2:return t(!0),e.next=5,$o("".concat($i,"/get_license"));case 5:n=e.sent,u(n.data),n.data.key&&p(n.data.key),t(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=qi(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,$o("".concat($i,"/set_license"),{serialKey:null});case 3:e.sent.success&&(p(""),u(null),o("licenseRemoved")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=qi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,$o("".concat($i,"/set_license"),{serialKey:m});case 3:(n=e.sent).success&&(u(n.data),n.data&&!n.data.issue&&o("licenseAdded")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Wi((function(){b()}),[]);var v=h?"Forced License":f?"Enabled":"Disabled",x=c&&"valid"===c.license,E="Your license is active. Thanks a lot for your support :)";x||(c?"no_activations_left"===c.issue?E=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",href:"https://store.meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===c.issue?E=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",href:"https://store.meowapps.com"},"Meow Apps Store"),"."):"missing"===c.issue?E="This license does not exist.":"disabled"===c.issue?E="This license has been disabled.":"item_name_mismatch"===c.issue?E="This license seems to be for a different plugin... isn't it? :)":(E=React.createElement("span",null,"There is an unknown error related to this serial key. Really sorry about this! Please ",React.createElement("a",{target:"_blank",href:"https://meowapps.com/contact/"},"contact us"),"."),console.log({license:c})):E="Unknown error :(");var w=React.createElement($n,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",href:"https://meowapps.com/plugin/".concat(l,"/")},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",href:"https://store.meowapps.com/"},"Meow Apps Store"),"."),k=React.createElement($n,{title:"Pro Version (".concat(v,")"),busy:n,className:"primary"},React.createElement(tt,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(Ft,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:n,value:m,onChange:function(e){return p(e)},placeholder:""})),c&&!x&&React.createElement(Fa,null,E),c&&x&&React.createElement(La,null,E),!c&&React.createElement(Dn,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"/plugin/media-file-renamer/"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(tt,{contentAlign:"right"},c&&!x&&React.createElement(De,{className:"secondary",disabled:n||!m,onClick:y},"Retry to validate"),c&&c.key===m&&React.createElement(De,{className:"secondary",disabled:n||!m,onClick:g},"Remove License"),React.createElement(De,{disabled:n||!m||c&&c.key===m,onClick:y},"Validate License")),React.createElement(Va,{isOpen:"licenseAdded"===a,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(Va,{isOpen:"licenseRemoved"===a,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return d?k:w},Ji=wp.element.render;function Vi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ki(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Vi(Object(t),!0).forEach((function(n){Zi(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Vi(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Zi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Qi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Xi(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Qi(o,r,a,i,l,"next",e)}function l(e){Qi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function el(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return nl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nl(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}document.addEventListener("DOMContentLoaded",(function(e){var n=document.getElementById("meow-common-dashboard");n&&Ji(React.createElement(Li,null),n)}));var tl=wp.element,rl=tl.useState,al=(tl.useEffect,{marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"}),ol=function(){var e=Object(ni.a)("".concat(u,"/all_settings/"),Wo),n=e.data,t=e.mutate,r=rn(n,{},!0),a=r.busy,o=r.data,c=r.error,s=el(rl(""),2),m=s[0],p=s[1],h=el(rl(!1),2),b=h[0],g=h[1],y=a||b,v=null==o?void 0:o.mfrh_auto_rename,x=null==o?void 0:o.mfrh_on_upload,E=null==o?void 0:o.mfrh_rename_slug,w=null==o?void 0:o.mfrh_convert_to_ascii,k=null==o?void 0:o.mfrh_update_posts,R=null==o?void 0:o.mfrh_update_postmeta,O=null==o?void 0:o.mfrh_undo,j=null==o?void 0:o.mfrh_manual_rename,S=null==o?void 0:o.mfrh_numbered_files,P=null==o?void 0:o.mfrh_sync_alt,C=null==o?void 0:o.mfrh_sync_media_title,_=null==o?void 0:o.mfrh_force_rename,A=null==o?void 0:o.mfrh_log,T=null==o?void 0:o.mfrh_logsql,N=null==o?void 0:o.mfrh_rename_guid,I=null==o?void 0:o.mfrh_case_insensitive_check,z=null==o?void 0:o.mfrh_rename_on_save,M=[{id:"media_title",value:"media_title",label:React.createElement("span",null,"Based on Media Title"),requirePro:!1},{id:"post_title",value:"post_title",label:React.createElement("span",null,"Based on Attached Post Title"),requirePro:!f},{id:"alt_text",value:"alt_text",label:React.createElement("span",null,"Based on Alternative Text"),requirePro:!f},{id:"anonymize_md5",value:"anonymize_md5",label:React.createElement("span",null,"Anonymize with MD5"),requirePro:!f},{id:"none",value:"none",label:React.createElement("span",null,"Disable Automatic Rename"),requirePro:!1}],F=function(){var e=Xi(regeneratorRuntime.mark((function e(r,a){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=Ki({},n.data))[a]=r,t(Ki(Ki({},n),{},{data:o}),!1),g(!0),e.prev=4,e.next=7,$o("".concat(u,"/update_option"),{name:a,value:r});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:return e.prev=12,g(!1),t(),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[4,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),L=function(){var e=Xi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.next=3,$o("".concat(u,"/refresh_logs"));case 3:(n=e.sent).success&&p(n.data),g(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=Xi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.next=3,$o("".concat(u,"/clear_logs"));case 3:(n=e.sent).success&&p(n.data),g(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=React.createElement($n,{busy:y,title:"Side Updates",className:"primary"},React.createElement(Dn,{p:!0,style:{marginTop:0}},"When the files are renamed, many links to them on your WordPress might be broken. Those options are updating the references to those files. ",React.createElement("strong",null,"Give it a try, every install is different and it might not work for certain kind of references.")),React.createElement(tt,{title:"Posts"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_update_posts",disabled:y,label:"Enable",description:React.createElement(Dn,{p:!0},"Update the references to the renamed files in the ",React.createElement("strong",null,"content")," content and ",React.createElement("strong",null,"excerpt")," of the posts (pages and custom types included)."),value:"1",checked:k,onChange:F}))),React.createElement(tt,{title:"Post Meta"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_update_postmeta",disabled:y,label:"Enable",description:React.createElement(Dn,{p:!0},"Update the references in the ",React.createElement("strong",null,"custom fields")," of the posts (including pages and custom types metadata)."),value:"1",checked:R,onChange:F})))),U=React.createElement(tt,{title:"Method"},React.createElement(br,{id:"mfrh_auto_rename",disabled:y,value:v,scrolldown:!0,name:"mfrh_auto_rename",description:"Attached Post includes all kinds of posts, such as pages, products, etc.",onChange:F},M.map((function(e){return React.createElement(gr,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),D=React.createElement(tt,{title:"On Upload"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_on_upload",disabled:y,label:"Enable",description:"If your image has an EXIF title, it will be used to decide the filename.",value:"1",checked:x,onChange:F}))),G=React.createElement(tt,{title:"Slug/Permalink"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_rename_slug",disabled:y,label:"Sync with filename",description:"Better to keep this un-checked as the link might have been referenced somewhere else.",value:"1",checked:E,onChange:F}))),H=React.createElement(tt,{title:"Transliteration"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_convert_to_ascii",disabled:y,label:"Enable (Recommended)",description:React.createElement(Dn,{p:!0},"Replace accents, emoticons, diacritics, umlauts, cyrillic and any kind of tricky characters by their ASCII equivalent.",React.createElement("br",null)," ",React.createElement("i",null,"Examples: tête → tete, schön → schon, Добро → dobro, etc.")),value:"1",requirePro:!f,checked:w,onChange:F}))),W=React.createElement(tt,{title:"Undo"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_undo",disabled:y,label:"Enable",description:"An undo icon will be added to the UI. This allows to rollback to the original filename.",value:"1",checked:O,onChange:F}))),$=React.createElement(tt,{title:"Manual Rename"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_manual_rename",disabled:y,label:"Enable",description:"An editable field will be added everywhere your files appear in the UI.",value:"1",checked:j,onChange:F}))),Y=React.createElement(tt,{title:"Force Rename"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_force_rename",disabled:y,label:"Enable",description:"Update the references to the file even if the file renaming itself was not successful. You might want to use that option if your install is broken and you are trying to link your Media to files for which the filenames has been altered (after a migration for exemple)",value:"1",requirePro:!f,checked:_,onChange:F}))),J=React.createElement(tt,{title:"Numbered Files"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_numbered_files",disabled:y,label:"Enable Numbering",description:"Identical filenames will be allowed by the plugin and a number will be appended automatically (myfile.jpg, myfile-2.jpg, myfile-3.jpg, etc).",requirePro:!f,value:"1",checked:S,onChange:F}))),V=React.createElement(tt,{title:"ALT Text"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_sync_alt",disabled:y||"media-title"!==v||"post-title"!==v,label:React.createElement(Dn,null,"Sync with Title"),description:"The ALT Text will be synchronized with the title.",requirePro:!f,value:"1",checked:P,onChange:F}))),K=React.createElement(tt,{title:"Media Title"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_sync_media_title",disabled:y||"post-title"!==v,label:React.createElement(Dn,null,"Sync with Title"),description:"The Media Title will be synchronized with the title.",requirePro:!f,value:"1",checked:C,onChange:F}))),Z=React.createElement(tt,{title:"Logs"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_log",label:"Enable",description:React.createElement(Dn,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:A,onChange:F}),React.createElement("div",{style:{marginTop:20}},React.createElement(De,{onClick:L},"Refresh Logs"),React.createElement(De,{className:"danger",onClick:B},"Clear Logs")))),Q=React.createElement(tt,{title:"SQL Logs"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_logsql",disabled:y,label:"Enable",description:React.createElement(Dn,{p:!0},"The files mfrh_sql.log and mfrh_sql_revert.log will be created in the /logs directory and will include the raw SQL queries which were run by the plugin. If there is an issue, the revert SQL file can help you."),requirePro:!f,value:"1",checked:T,onChange:F}))),X=React.createElement(tt,{title:"GUID"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_rename_guid",disabled:y,label:"Sync with filename",description:"The GUID will be renamed like the new filename. Better to keep this un-checked.",value:"1",checked:N,onChange:F}))),ee=React.createElement(tt,{title:"Case Insensitive"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_case_insensitive_check",label:"Enable",value:"1",checked:I,onChange:F,description:React.createElement(React.Fragment,null,'This will consider the file such as "abc.jpg" and "ABC.JPG" as the same file. More information ',React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-file-renamer-faq-issues/"},"here"),". You should check this if you are on a Windows-based server.")}))),ne=React.createElement(tt,{title:"Rename on Post Save"},React.createElement(_t,{max:"1"},React.createElement(St,{id:"mfrh_rename_on_save",disabled:y,label:"Enable (Unsafe)",description:"You can modify the titles of your media while editing a post but, of course, the plugin can't update the HTML at this stage. With this option, the plugin will update the filenames and HTML after that you saved the post.",value:"1",checked:z,onChange:F})));return React.createElement(_n,{nekoErrors:[c]},React.createElement(ga,{title:"Media File Renamer | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(De,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(De,{className:"primary",icon:"dashboard",color:"#8554bb",onClick:function(){return location.href="upload.php?page=mfrh_dashboard"}},"Dashboard"))),React.createElement(vt,null,React.createElement(xt,{full:!0},React.createElement(Xn,null,React.createElement(Dn,{p:!0},"It works out of the box, the default settings are good for most installs. However, you should really have a look at the ",React.createElement("a",{href:"https://meowapps.com/plugin/media-file-renamer/"},"tutorial"),".")),React.createElement(yo,null,React.createElement(vo,{title:"Basic"},React.createElement(vt,null,React.createElement(xt,{minimal:!0},React.createElement($n,{busy:y,title:"Settings",className:"primary"},React.createElement(Dn,{h2:!0},"Automatic"),React.createElement(Dn,{p:!0},"This plugin's main goal is to make the process of optimizing your filenames entirely automatic. By default, your files will be named after the title of your media entry."),U,D,React.createElement(Dn,{h2:!0},"Manual"),$,React.createElement(Dn,{p:!0},"If you are a SEO guru or someone who loves having a perfectly neat filesystem, it is recommended to use automatic renaming first, then to tweak specific files with manual renaming. The ",React.createElement("a",{href:"/wp-admin/upload.php?page=mfrh_dashboard"},"Renamer Dashboard")," makes it very easy."))),React.createElement(xt,{minimal:!0},q,React.createElement($n,{busy:y,title:"UI (Extra Features)",className:"primary"},W)))),React.createElement(vo,{title:"Advanced"},React.createElement(vt,null,React.createElement(xt,{minimal:!0},React.createElement($n,{busy:y,title:"Advanced Settings",className:"primary"},H,J),React.createElement($n,{busy:y,title:"Fields Syncing",className:"primary"},G,X,V,K,React.createElement(Dn,{p:!0},"The fields in the database will be synchronized, but the data already written in your HTML will not be overwritten."))),React.createElement(xt,{minimal:!0},React.createElement($n,{busy:y,title:"Developer Settings",className:"primary"},ee,Y,Q,ne)))),React.createElement(vo,{title:"Pro Version"},React.createElement(Yi,{domain:l,prefix:i,isPro:d,isRegistered:f})),React.createElement(vo,{title:"Logs & Debug"},React.createElement($n,{busy:y,className:"primary"},Z),React.createElement("div",{style:al},m))))))};function il(e){return function(e){if(Array.isArray(e))return dl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||sl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ll(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function cl(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){ll(o,r,a,i,l,"next",e)}function l(e){ll(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ul(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||sl(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(e,n){if(e){if("string"==typeof e)return dl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?dl(e,n):void 0}}function dl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var fl=wp.element,ml=fl.useState,pl=fl.useEffect,hl=fl.useMemo,bl={width:40,height:40,objectFit:"cover"},gl=[{accessor:"thumbnail_url",title:o.THUMB,style:{width:16}},{accessor:"post_title",title:o.TITLE,sortable:!0,style:{width:"25%"}},{accessor:"post_parent",title:o.ATTACHED_TO,sortable:!0,style:{width:"25%"}},{accessor:"current_filename",title:o.FILENAME,sortable:!0}],yl={accessor:"id",by:"asc"},vl=function(){var e=ul(ml("pending"),2),n=e[0],t=e[1],r=ul(ml(),2),a=r[0],i=r[1],l=ul(ml([]),2),c=l[0],s=l[1],d=ul(ml(!1),2),p=d[0],b=d[1],g=ul(ml(""),2),y=g[0],v=g[1],x=ul(ml(""),2),E=x[0],w=x[1],k=ul(ml(yl),2),R=k[0],O=k[1],j=ul(ml(1),2),S=j[0],P=j[1],C=ul(ml(10),2),_=C[0],A=C[1],T=function(){var e=en(Object(h.useState)(new AbortController),2),n=e[0],t=e[1],r=Object(h.useRef)(!1),a=Object(h.useRef)(0),o=en(Object(h.useState)(null),2),i=o[0],l=o[1],c=en(Object(h.useState)(!1),2),u=c[0],s=c[1],d=en(Object(h.useState)(0),2),f=d[0],m=d[1],p=en(Object(h.useState)(!1),2),b=p[0],g=p[1],y=en(Object(h.useState)(!1),2),v=y[0],x=y[1],E=en(Object(h.useState)(0),2),w=E[0],k=E[1],R=function(){var e=Xe(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new AbortController,t(n),g(!1),a.current=0,r.current=!1,s(!1),x(!1),k(0),m(0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=Xe(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){g(!1),a.current=0,r.current=!1,s(!1),x(!1),A(n),l(!0),cn.start(),cn.onIdle().then((function(){C(),e()}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=Xe(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,cn.pause(),s(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Xe(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,g(!1),s(!1),cn.start();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Xe(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,cn.pause(),n.abort(),l(!1),g(!1),x(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=Xe(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,x(!0),l(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=Xe(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:cn.add(Xe(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n.signal);case 3:(o=e.sent).success||(a.current++,r.current||(g(o.error),j())),e.next=16;break;case 7:if(e.prev=7,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=14;break}return console.log("Aborted"),e.abrupt("return");case 14:a.current++,r.current||(g("An error was caught (more information in the console)."),j());case 16:return e.prev=16,k((function(e){return e+1})),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[0,7,16,19]])})))),m((function(e){return e+1}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=Xe(regeneratorRuntime.mark((function e(n){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:cn.clear(),t=Ze(n);try{for(t.s();!(r=t.n()).done;)a=r.value,_(a)}catch(e){t.e(e)}finally{t.f()}k(0);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=Object(h.useCallback)((function(){r.current=!0}),[]),N=Object(h.useCallback)((function(){return a.current}),[]);return{start:O,stop:P,pause:j,resume:S,reset:R,addTask:_,setAlwaysSkip:T,getErrorCount:N,error:b,success:v,busy:i,paused:u,value:w,max:f}}(),N=(S-1)*_,I=R.accessor,z=R.by,M=Object(ni.a)("".concat(u,"/stats"),Wo),F=M.data,L=M.mutate,B=Object(ni.a)(function(e,n){var t=e.includes("index.php?rest_route");return e+(t?"&":"?")+new URLSearchParams(n).toString()}("".concat(u,"/media"),{limit:_,skip:N,filterBy:n,orderBy:I,order:z}),Wo),q=B.data,U=B.mutate,D=rn(F,{pending:"-",renamed:"-",all:"-"},!0),G=D.busy,H=D.data,W=D.error,$=rn(q,[],!0),Y=$.busy,J=$.data,V=$.total,K=$.error,Z=Y||G||p,Q=hl((function(){return J.map((function(e){return{id:e.ID,thumbnail_url:React.createElement("img",{src:e.thumbnail_url,style:bl}),post_title:React.createElement("a",{href:"post.php?post=".concat(e.ID,"&action=edit")},e.post_title),post_parent:React.createElement("div",{style:{maxHeight:35,overflow:"hidden"}},e.post_parent_title?e.post_parent_title:React.createElement("i",{style:{color:"#c1c1c1"}},"None")),current_filename:React.createElement(ei,{entry:e,mutate:function(){U(),L()}})}}))}),[J]);pl((function(){s([]),O(yl),P(1)}),[n]),pl((function(){if(null!==T.busy&&(b(T.busy),!T.busy)){var e=T.getErrorCount();e>0&&w("The process has finished, but ".concat(e," error(s) occurred (check your console).")),T.reset(),s([]),U(),L()}}),[T.busy]);var X=function(){var e=cl(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$o("".concat(u,"/get_all_ids"),{unlockedOnly:n});case 2:if((t=e.sent).success){e.next=6;break}return alert(t.message),e.abrupt("return",[]);case 6:return e.abrupt("return",t.data);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e=cl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,X(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=16;break}return v("Undoing..."),r=t.map((function(e){return function(){var n=cl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Undo Media ".concat(e)),n.next=3,$o("".concat(u,"/undo"),{mediaId:e},t);case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){var e=cl(regeneratorRuntime.mark((function e(){var n,t,r,a,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,X(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=17;break}return v("Analyzing..."),r=Go(t,20),a=r.map((function(e){return function(){var n=cl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,$o("".concat(u,"/analyze"),{mediaIds:e},t);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(a),e.abrupt("return");case 17:b(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=cl(regeneratorRuntime.mark((function e(){var n,t,r,a,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(i.length>0&&void 0!==i[0])||i[0],t=i.length>1&&void 0!==i[1]?i[1]:null,v("Preparing..."),b(!0),!t){e.next=8;break}e.t0=t,e.next=11;break;case 8:return e.next=10,X(n);case 10:e.t0=e.sent;case 11:if(!(r=e.t0)){e.next=18;break}return v("".concat(n?"Locking..":"Unlocking...")),a=Go(r,50),o=a.map((function(e){return function(){var e=cl(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$o("".concat(u,"/set_lock"),{mediaIds:r,lock:n},t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})),T.start(o),e.abrupt("return");case 18:b(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=cl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,v("Preparing..."),b(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,X(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=15;break}return r=t.map((function(e){return function(){var n=cl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Renaming #".concat(e)),n.next=3,$o("".concat(u,"/rename"),{mediaId:e},t);case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),T.start(r),e.abrupt("return");case 15:b(!1);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=React.createElement(React.Fragment,null,React.createElement(De,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-file-renamer/","_blank")}},"Get the Pro Version"),React.createElement(De,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(_n,{nekoErrors:[W,K]},React.createElement(ga,{title:"Media File Renamer | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(De,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(De,{icon:"cog",color:"#8554bb",onClick:function(){return location.href="admin.php?page=mfrh_settings"}},"Settings"))),React.createElement(vt,null,React.createElement(xt,{full:!0},!f&&React.createElement(Xn,{footer:ae},React.createElement(Dn,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Renamer. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),React.createElement(Mo,null,React.createElement(De,{onClick:function(){return ne()}},"Analyze Library"),React.createElement(wn,{title:"Actions"},React.createElement(kn,{requiredPro:!0,onClick:function(){i("autoAttach")}},"Auto-Attach")),"pending"===n&&c.length>0&&React.createElement(React.Fragment,null,React.createElement(De,{className:"secondary",onClick:function(){return re(c)}},"Rename ",React.createElement("strong",null,c.length)," entries"),React.createElement(De,{className:"secondary",onClick:function(){return te(!0,c)}},"Lock ",React.createElement("strong",null,c.length)," entries")),m&&"renamed"===n&&c.length>0&&React.createElement(React.Fragment,null,React.createElement(De,{className:"secondary",onClick:function(){return ee(c)}},"Undo ",React.createElement("strong",null,c.length)," entries")),React.createElement("div",{style:{flex:1}},p&&React.createElement(Yr,{status:function(e){return"".concat(y," (").concat(e,"%)")},busy:p,value:T.value,max:T.max,onStopClick:T.stop})),"all"===n&&React.createElement(React.Fragment,null,React.createElement(De,{className:"secondary",onClick:function(){return te(!0)}},"Lock ",React.createElement("strong",null,"All")),React.createElement(De,{className:"secondary",onClick:function(){return te(!1)}},"Unlock ",React.createElement("strong",null,"All"))),("all"===n||"pending"===n)&&React.createElement(React.Fragment,null,React.createElement(De,{className:"primary",onClick:function(){return i("renameAll")}},"Rename ",React.createElement("strong",null,"All"))),m&&("all"===n||"renamed"===n)&&React.createElement(React.Fragment,null,React.createElement(De,{className:"danger",onClick:function(){return i("undoAll")}},"Undo ",React.createElement("strong",null,"All")))),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(Ca,{value:n,busy:G,onChange:function(e){t(e),P(1)}},React.createElement(_a,{title:o.PENDING,value:"pending",count:H.pending}),React.createElement(_a,{title:"Renamed",value:"renamed",count:H.renamed}),React.createElement(_a,{title:"All",value:"all",count:H.all})),React.createElement(Ea,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}})),React.createElement(ro,{busy:Z,data:Q,columns:gl,sort:R,onSortChange:function(e,n){O({accessor:e,by:n})},onSelect:function(e){s([].concat(il(c),il(e)))},onUnselect:function(e){s(il(c.filter((function(n){return!e.includes(n)}))))},selectedItems:c}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(br,{scrolldown:!0,value:_,onChange:function(e){A(e),P(1)}},React.createElement(gr,{value:5,label:"5 items per page"}),React.createElement(gr,{value:10,label:"10 items per page"}),React.createElement(gr,{value:25,label:"25 items per page"}),React.createElement(gr,{value:50,label:"50 items per page"})),React.createElement(Ea,{currentPage:S,limit:_,total:V,onClick:function(e){return P(e)}}))),React.createElement(Va,{isOpen:"renameAll"===a,onRequestClose:function(){return i(null)},title:"You are about to rename all your (unlocked) files",content:"Renaming files is a dangerous operation. Please make sure you made a backup or your entire WordPress install. Should we start?",onOkClick:function(){i(null),re()},onCancelClick:function(){i(null)}}),React.createElement(Va,{isOpen:"undoAll"===a,onRequestClose:function(){return i(null)},title:"You are about to undo the renaming for all your files",content:"Are you sure you would like to proceed?",onOkClick:function(){i(null),ee()},onCancelClick:function(){i(null)}}),React.createElement(Va,{isOpen:"autoAttach"===a,onRequestClose:function(){return i(null)},title:"Coming soon!",content:"This feature, for Pro users, will scan your WordPress install to attach your unattached files to what they belong to (for example, an image to a product). That will also allow to rename those images automatically.",onOkClick:function(){i(null)}}),React.createElement(Va,{isOpen:E,title:"Success",ok:"Close",content:E,onOkClick:function(){w(""),T.reset()}})))},xl=wp.element.render;function El(){Array.from(document.getElementsByClassName("mfrh-renamer-field")).forEach((function(e){var n=e.getAttribute("data-id");xl(React.createElement(ei,{natural:!0,mediaId:n}),e)}))}document.addEventListener("DOMContentLoaded",(function(e){var n,t;new MutationObserver((function(){El()})).observe(document.documentElement,{childList:!0,subtree:!0}),(n=document.getElementById("mfrh-admin-settings"))&&xl(React.createElement(ol,null),n),(t=document.getElementById("mfrh-media-rename"))&&xl(React.createElement(vl,null),t),El()}))}});
2
  //# sourceMappingURL=index.js.map
1
+ !function(e){function n(n){for(var r,i,l=n[0],c=n[1],u=n[2],d=0,f=[];d<l.length;d++)i=l[d],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&f.push(a[i][0]),a[i]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(s&&s(n);f.length;)f.shift()();return o.push.apply(o,u||[]),t()}function t(){for(var e,n=0;n<o.length;n++){for(var t=o[n],r=!0,l=1;l<t.length;l++){var c=t[l];0!==a[c]&&(r=!1)}r&&(o.splice(n--,1),e=i(i.s=t[0]))}return e}var r={},a={0:0},o=[];function i(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=r,i.d=function(e,n,t){i.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,n){if(1&n&&(e=i(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)i.d(t,r,function(n){return e[n]}.bind(null,r));return t},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,"a",n),n},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.p="";var l=window.wpJsonMfrh=window.wpJsonMfrh||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var u=0;u<l.length;u++)n(l[u]);var s=c;o.push([78,1]),t()}({0:function(e,n){e.exports=React},69:function(e,n){e.exports=ReactDOM},78:function(e,n,t){"use strict";t.r(n);var r=wp.i18n.__,a={};a.RENAME=r("Rename","media-file-renamer"),a.DASHBOARD=r("Dashboard","media-file-renamer"),a.PENDING=r("Pending","media-file-renamer"),a.RENAMED=r("Renamed","media-file-renamer"),a.ALL=r("All","media-file-renamer"),a.THUMB=r("Thumb","media-file-renamer"),a.TITLE=r("Title","media-file-renamer"),a.ATTACHED_TO=r("Attached To","media-file-renamer"),a.FILENAME=r("Filename","media-file-renamer");var o=a,i=mfrh_media_file_renamer.prefix,l=mfrh_media_file_renamer.domain,c=mfrh_media_file_renamer.rest_url.replace(/\/+$/,""),u=mfrh_media_file_renamer.api_url.replace(/\/+$/,""),s=mfrh_media_file_renamer.plugin_url.replace(/\/+$/,""),d="1"===mfrh_media_file_renamer.is_pro,f=d&&"1"===mfrh_media_file_renamer.is_registered,m=mfrh_media_file_renamer.rest_nonce,p="1"===mfrh_media_file_renamer.mfrh_undo,h="1"===mfrh_media_file_renamer.mfrh_manual_rename,b=t(0),g=t.n(b),y=t(1),v=t.n(y);function E(){return(E=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){R(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function R(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return j(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var S=function(e){var n=e.spinner,t=void 0===n||n,r=e.busy,a=void 0!==r&&r,o=e.overlayStyle,i=O(Object(b.useState)(!0),2),l=i[0],c=i[1];Object(b.useEffect)((function(){var e;return a?c(!0):e=setTimeout((function(){c(!1),e=null}),250),function(){e&&clearTimeout(e)}}),[a]);var u=l?g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{className:"overlay "+(a?"":"overlayHidden"),style:o},Boolean(t)&&g.a.createElement("div",{className:"lds-ellipsis "+(a?"":"spinnerHidden")},g.a.createElement("div",null),g.a.createElement("div",null),g.a.createElement("div",null),g.a.createElement("div",null))),g.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,s=k(k({},e),{},{busy:void 0,spinner:void 0});return g.a.createElement("div",E({style:{position:"relative"}},s),u,e.children)};S.propTypes={busy:v.a.bool.isRequired,spinner:v.a.bool,children:v.a.oneOfType([v.a.arrayOf(v.a.node),v.a.node]).isRequired};var P,C=S,_=t(2),A=t(4),T={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"},N=t(3),I=t(28),z=t.n(I),M=t(29),F=t.n(M),L=t(30),B=t.n(L),q=t(9),U=t.n(q),D=t(10),G=t.n(D),H=t(11),W=t.n(H),$=t(6),Y=t.n($),J=t(5),V=t.n(J),K=t(8),Z=t.n(K),X=t(12),Q=t.n(X),ee=t(13),ne=t.n(ee),te=t(31),re=t.n(te),ae=t(32),oe=t.n(ae),ie=t(14),le=t.n(ie),ce=t(33),ue=t.n(ce),se=t(34),de=t.n(se),fe=t(35),me=t.n(fe),pe=t(36),he=t.n(pe),be=t(37),ge=t.n(be),ye=t(38),ve=t.n(ye),xe=t(39),Ee=t.n(xe),we=t(40),ke=t.n(we),Re=t(41),Oe=t.n(Re),je=t(42),Se=t.n(je),Pe=t(43),Ce=t.n(Pe),_e=t(44),Ae=t.n(_e),Te=t(45),Ne=t.n(Te),Ie=t(46),ze=t.n(Ie);function Me(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Fe=(Me(P={lock:z.a,"lock-open":F.a,"file-undo":B.a,"chevron-double-left":U.a,"chevron-double-right":G.a,"chevron-left":W.a,"chevron-right":Y.a,"chevron-down":V.a,"chevron-up":Z.a,pause:Q.a,play:ne.a,replay:re.a,check:oe.a,stop:le.a,delete:ue.a,undo:de.a,alert:me.a,database:he.a,pencil:ge.a,tools:ve.a,cog:Ee.a,close:ke.a,cat:Oe.a,upload:Se.a,trash:Ce.a},"pencil",Ae.a),Me(P,"dashboard",Ne.a),Me(P,"search",ze.a),P);function Le(){return(Le=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Be(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function qe(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n ","\n"]);return qe=function(){return e},e}var Ue=Object(_.a)((function(e){var n=e.className,t=e.icon,r=void 0===t?null:t,a=e.onClick,o=e.disabled,i=void 0!==o&&o,l=e.color,c=void 0===l?null:l,u=e.children,s=Be(e,["className","icon","onClick","disabled","color","children"]),d=!!r,f="nui-button ".concat(n||"").concat(d?" has-icon":""," ").concat(c?"custom-color":"");return g.a.createElement("button",Le({type:"button",className:f,onClick:a,disabled:i},s),d&&g.a.createElement(N.Icon,{icon:"string"==typeof r?Fe[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),g.a.createElement("span",null,u))}))(qe(),T.fontFamily,T.fontSizeText,T.blue,Object(A.a)(.1,T.blue),T.lightBlue,T.blue,T.blue,Object(A.a)(.1,T.lightBlue),T.red,T.red,Object(A.a)(.1,T.red),T.green,T.green,Object(A.a)(.1,T.green),(function(e){return De(e.color)})),De=function(e){if(e)return"\n &.custom-color {\n background-color: ".concat(e,";\n border: 1px solid ").concat(e,";\n\n &:hover {\n background-color: ").concat(Object(A.a)(.1,e),";\n }\n }\n ")},Ge=function(e){return g.a.createElement(Ue,e)};function He(){return(He=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function We(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function $e(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return $e=function(){return e},e}Ge.propTypes={className:v.a.oneOf(["primary","secondary","danger","success"]),disabled:v.a.bool,icon:v.a.oneOfType([v.a.instanceOf(N.IconifyIcon),v.a.oneOf(["setting","edit","trash"])]),color:v.a.string,onClick:v.a.func.isRequired},Ge.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}};var Ye=_.a.a($e(),T.yellow,T.white,T.fontFamily,T.white),Je=function(e){var n=e.show,t=void 0===n||n,r=e.className,a=We(e,["show","className"]);return t?g.a.createElement(Ye,He({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},Ve=function(e){return g.a.createElement(Je,e)};Ve.propTypes={show:v.a.bool,className:v.a.string},Ve.defaultProps={show:!0,className:void 0};var Ke=t(21),Ze=t.n(Ke);function Xe(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=tn(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Qe(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function en(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Qe(o,r,a,i,l,"next",e)}function l(e){Qe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function nn(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||tn(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,n){if(e){if("string"==typeof e)return rn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rn(e,n):void 0}}function rn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(b.useState)(n),a=nn(r,2),o=a[0],i=a[1],l=Object(b.useState)(null),c=nn(l,2),u=c[0],s=c[1],d=Object(b.useState)(t),f=nn(d,2),m=f[0],p=f[1],h=Object(b.useState)(0),g=nn(h,2),y=g[0],v=g[1];return Object(b.useEffect)((function(){void 0!==e&&(e.success?(s(null),i(e.data),v(e.total?e.total:0)):s(e.error)),p(void 0===e)}),[e]),{busy:m,data:o,total:y,error:u}},on=function(){var e=Object(b.useRef)(),n=nn(Object(b.useState)({}),2),t=n[0],r=n[1];return Object(b.useEffect)((function(){if(e&&e.current){var n=new ResizeObserver((function(e){var n=e[0];n.contentRect&&r({width:n.contentRect.left+n.contentRect.right,height:n.contentRect.top+n.contentRect.bottom})}));return n.observe(e.current),function(){n.unobserve(e.current)}}}),[]),{ref:e,width:t.width?t.width:0,height:t.height?t.height:0}},ln=function(e){var n=Object(b.useRef)(),t=function(t){e&&!n.current.contains(t.target)&&e()};return Object(b.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),n},cn=null,un=new Ze.a({concurrency:1,autoStart:!1});function sn(){var e=bn(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return sn=function(){return e},e}function dn(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return fn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fn(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function mn(){var e=bn(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return mn=function(){return e},e}function pn(){var e=bn(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return pn=function(){return e},e}function hn(){var e=bn(["\n display: inline-block;\n"]);return hn=function(){return e},e}function bn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var gn=_.a.div(hn()),yn=_.a.button(pn(),T.blue,T.fontFamily,T.fontSizeText,Object(A.a)(.1,T.blue)),vn=_.a.div(mn(),T.blue,T.lightShadow,T.blue),xn=function(e){var n=e.title,t=e.disabled,r=void 0!==t&&t,a=e.isPro,o=void 0!==a&&a,i=e.style,l=void 0===i?{}:i,c=dn(g.a.useState(!1),2),u=c[0],s=c[1],d=ln((function(){s(!1)})),f=on(),m=f.ref,p=f.width,h=function(){s(!u)},b=g.a.Children.map(e.children,(function(e){return g.a.cloneElement(e,{isPro:o,disabled:e.props.disabled||r,onClick:function(){e.props.onClick&&e.props.onClick(),h()}})}));return g.a.createElement(gn,{ref:d},g.a.createElement(yn,{ref:m,type:"button",disabled:r,onClick:h,style:l},g.a.createElement("span",null,n),g.a.createElement(N.Icon,{icon:V.a,width:"24",height:"24",style:{marginLeft:"4px"}})),u&&g.a.createElement(vn,{style:{transform:"translateX(calc(-50% + ".concat(p/2,"px))")}},b))},En=_.a.button(sn(),T.blue,T.fontFamily,T.fontSizeText,Object(A.a)(.1,T.blue),T.proGray),wn=function(e){var n=e.onClick,t=e.children,r=e.isPro,a=e.requirePro,o=void 0!==a&&a,i=e.disabled,l=o&&!r;return g.a.createElement(En,{type:"button",className:l?"is-pro":"",onClick:n,disabled:i||l},g.a.createElement("span",null,t),l&&!r&&g.a.createElement(Ve,null))},kn=function(e){return g.a.createElement(xn,e)},Rn=function(e){return g.a.createElement(wn,e)};function On(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||jn(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jn(e,n){if(e){if("string"==typeof e)return Sn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Sn(e,n):void 0}}function Sn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Pn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return Pn=function(){return e},e}kn.propTypes={title:v.a.string,disabled:v.a.bool,isPro:v.a.bool},kn.defaultProps={title:void 0,disabled:!1,isPro:!1},Rn.propTypes={onClick:v.a.func.isRequired,requirePro:v.a.bool},Rn.defaultProps={onClick:function(){},requirePro:!1};var Cn=_.a.div(Pn()),_n=function(e){var n=e.className,t=e.children,r=e.nekoErrors,a=void 0===r?[]:r,o=e.style,i=void 0===o?{}:o,l=On(Object(b.useState)(!1),2),c=l[0],u=l[1],s=On(Object(b.useState)(!1),2),d=s[0],f=s[1];if(a&&!c){var m,p=function(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=jn(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}(a);try{for(p.s();!(m=p.n()).done;){var h=m.value;if(h){u(h);break}}}catch(e){p.e(e)}finally{p.f()}}return g.a.createElement(Cn,{className:n||"",style:i},c&&g.a.createElement("div",{className:"neko-rest-error"},g.a.createElement("div",{className:"container"},!d&&g.a.createElement(g.a.Fragment,null,g.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),g.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),g.a.createElement("p",null,g.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),g.a.createElement("p",{className:"neko-debug"},g.a.createElement("small",null,"URL: ",c.url,g.a.createElement("br",null),"CODE: ",c.code,g.a.createElement("br",null),"MESSAGE: ",c.message,g.a.createElement("br",null)))),c.body&&d&&g.a.createElement("p",{className:"neko-debug"},g.a.createElement("div",{dangerouslySetInnerHTML:{__html:c.body}})),c.body&&g.a.createElement(Ge,{color:"#a94242",onClick:function(){return f(!d)}},d?"Hide":"Display"," response from server"),g.a.createElement(Ge,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},An=function(e){return g.a.createElement(_n,e)};function Tn(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Nn(){var e=Fn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return Nn=function(){return e},e}function In(){var e=Fn(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return In=function(){return e},e}function zn(){var e=Fn(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return zn=function(){return e},e}function Mn(){var e=Fn(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return Mn=function(){return e},e}function Fn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}An.propTypes={className:v.a.string,style:v.a.object,nekoErrors:v.a.bool},An.defaultProps={className:void 0,style:{},nekoErrors:!1};var Ln=_.a.h1(Mn(),T.fontFamily,T.fontSizeH1),Bn=_.a.h2(zn(),T.fontFamily,T.fontSizeH2),qn=_.a.p(In(),T.fontFamily,T.fontSizeText),Un=_.a.span(Nn(),T.fontFamily,T.fontSizeText),Dn=function(e){var n=e.children,t=Tn(e,["children"]);return e.h1?g.a.createElement(Ln,t,n):e.h2?g.a.createElement(Bn,t,n):e.p?g.a.createElement(qn,t,n):g.a.createElement(Un,t,n)},Gn=function(e){return g.a.createElement(Dn,e)};function Hn(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return Hn=function(){return e},e}Gn.propTypes={h1:v.a.any,h2:v.a.any,p:v.a.any},Gn.defaultProps={h1:void 0,h2:void 0,p:void 0};var Wn=_.a.div(Hn(),T.fontSizeText,T.blue,T.blue,T.white,T.white),$n=function(e){var n=e.title,t=e.children,r=e.className,a=e.busy,o=void 0!==a&&a,i=e.style,l=void 0===i?{}:i;return g.a.createElement(Wn,{className:"nui-block "+(r||""),style:l},g.a.createElement(C,{busy:o},g.a.createElement(Gn,{h2:!0,className:"nui-block-title"},n),g.a.createElement("div",{className:"nui-block-content"},t)))},Yn=function(e){return g.a.createElement($n,e)};function Jn(){var e=Kn(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return Jn=function(){return e},e}function Vn(){var e=Kn(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return Vn=function(){return e},e}function Kn(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Yn.propTypes={title:v.a.string,className:v.a.oneOf(["","primary"]),style:v.a.object},Yn.defaultProps={title:void 0,className:"",style:{}};var Zn=_.a.div(Vn(),T.fontSizeText,T.fontFamily,T.white,T.blue),Xn=_.a.div(Jn(),T.lightGray),Qn=function(e){var n=e.children,t=e.header,r=e.headerAlign,a=void 0===r?"left":r,o=e.footer,i=e.footerAlign,l=void 0===i?"right":i,c=e.className,u=e.style,s=void 0===u?{}:u;return g.a.createElement(Zn,{className:c||"",style:s},t&&g.a.createElement(Xn,{className:"align-".concat(a)},t),g.a.createElement("div",{className:"content"},n),o&&g.a.createElement(Xn,{className:"align-".concat(l)},o))},et=function(e){return g.a.createElement(Qn,e)};function nt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return nt=function(){return e},e}et.propTypes={header:v.a.element,headerAlign:v.a.oneOf(["left","right"]),footer:v.a.element,footerAlign:v.a.oneOf(["left","right"]),className:v.a.string,style:v.a.object},et.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}};var tt=Object(_.a)((function(e){var n=e.title,t=void 0===n?"":n,r=e.contentAlign,a=void 0===r?"left":r;return g.a.createElement("div",{className:e.className||""},t?g.a.createElement("div",{className:"nui-settings-head"},t):null,g.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},e.children))}))(nt(),T.fontFamily,T.fontFamily),rt=function(e){return g.a.createElement(tt,e)};function at(){var e=it(["\n background-color: ",";\n color: white;\n"]);return at=function(){return e},e}function ot(){var e=it(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return ot=function(){return e},e}function it(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}rt.propTypes={title:v.a.string,className:v.a.string,contentAlign:v.a.string},rt.defaultProps={title:"",className:void 0,contentAlign:"left"};var lt=_.a.div(ot()),ct=Object(_.a)((function(e){return e.children?g.a.createElement("div",{className:e.className},e.children):null}))(at(),T.blue),ut=function(e){return g.a.createElement(lt,{className:"window"},g.a.createElement(ct,null,e.title),e.children)},st=function(e){return g.a.createElement(ut,e)};function dt(){return(dt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function ft(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function mt(){var e=ht(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return mt=function(){return e},e}function pt(){var e=ht(["\n display: flex;\n flex-wrap: wrap;\n"]);return pt=function(){return e},e}function ht(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}st.propTypes={title:v.a.string},st.defaultProps={title:void 0};var bt=_.a.div(pt()),gt=_.a.div(mt()),yt=function(e){return g.a.createElement(bt,null,e.children)},vt=function(e){var n=e.full,t=e.minimal,r=ft(e,["full","minimal"]),a=n?"full":"";return a+=t?" minimal":"",g.a.createElement(gt,dt({className:a},r),e.children)},xt=function(e){return g.a.createElement(yt,e)},Et=function(e){return g.a.createElement(vt,e)};xt.propTypes={},xt.defaultProps={},Et.propTypes={full:v.a.any},Et.defaultProps={full:void 0};var wt=t(16),kt=t.n(wt),Rt=t(17),Ot=t.n(Rt);function jt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return jt=function(){return e},e}var St=Object(_.a)((function(e){var n=e.id,t=e.name,r=e.checked,a=void 0!==r&&r,o=e.onChange,i=e.label,l=e.description,c=e.isPro,u=e.disabled,s=e.requirePro,d=void 0!==s&&s&&!c,f=u||d,m=f?"disabled":"";return g.a.createElement("div",{className:["nui-checkbox",e.className,m].join(" ")},g.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){o?o(!a,n):console.log("The onChange handler it not set for this checkbox.",e)},disabled:f}),g.a.createElement("label",{htmlFor:n},g.a.createElement("div",{className:"nui-checkbox-check-container"},g.a.createElement(N.Icon,{icon:a?Ot.a:kt.a,width:"30px",height:"30px",color:f?T.disabledForm:T.blue})),g.a.createElement("div",{className:"nui-checkbox-inner-container"},g.a.createElement("span",{className:"label"},i,g.a.createElement(Ve,{className:"inline",show:d})),l?g.a.createElement("small",{className:"description"},l):null)))}))(jt(),T.fontFamily,T.disabledForm),Pt=function(e){return g.a.createElement(St,e)};function Ct(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n"]);return Ct=function(){return e},e}Pt.propTypes={id:v.a.string,name:v.a.string,checked:v.a.bool,label:v.a.string,description:v.a.string,isPro:v.a.bool,requirePro:v.a.bool},Pt.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1};var _t=Object(_.a)((function(e){var n=e.name,t=(e.max,e.isPro),r=void 0!==t&&t;return g.a.Children.map(e.children,(function(e){return e.props.name?e:g.a.cloneElement(e,{name:n,isPro:r})}))}))(Ct()),At=function(e){return g.a.createElement(_t,e)};function Tt(){return(Tt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Nt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return It(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return It(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function zt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Mt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return Mt=function(){return e},e}At.propTypes={name:v.a.string,mas:v.a.number,isPro:v.a.bool},At.defaultProps={name:void 0,mas:-1,isPro:!1};var Ft=Object(_.a)((function(e){var n=e.id,t=e.name,r=e.value,a=void 0===r?"":r,o=e.description,i=e.placeholder,l=void 0===i?"":i,c=e.onEnter,u=void 0===c?null:c,s=e.readOnly,d=void 0!==s&&s,f=e.type,m=void 0===f?"text":f,p=e.step,h=void 0===p?1:p,y=e.min,v=void 0===y?1:y,x=e.max,E=void 0===x?999:x,w=e.maxLength,k=void 0===w?3:w,R=e.className,O=e.style,j=e.natural,S=void 0!==j&&j,P=zt(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),C=Nt(Object(b.useState)(a),2),_=C[0],A=C[1],T=!!e.onChange;Object(b.useEffect)((function(){T||A(a)}),[a]);var N=function(t){T?e.onChange(t.target.value,n):A(t.target.value,n)},I=function(t){u&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},z=function(t){e.onBlur&&a!==t.target.value&&e.onBlur(t.target.value,n)},M="neko-input ".concat(S?" natural":"");return g.a.createElement("div",{className:[R].join(" "),style:O},"number"===m?g.a.createElement("input",Tt({className:[M].join(" ")},P,{id:n,name:t,value:T?a:_,type:m,step:h,min:v,max:E,maxlength:k,placeholder:l,onChange:N,onKeyPress:I,onBlur:z,readOnly:d})):g.a.createElement("input",Tt({className:[M].join(" ")},P,{id:n,name:t,value:T?a:_,type:m,spellcheck:"false",placeholder:l,onChange:N,onKeyPress:I,onBlur:z,readOnly:d})),o&&g.a.createElement("p",{className:"neko-input-description"},o))}))(Mt(),T.fontFamily,T.fontSizeText,T.blue,T.gray,T.fontFamily,T.fontSizeSmall),Lt=function(e){return g.a.createElement(Ft,e)};function Bt(){return(Bt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function qt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ut(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ut(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Dt(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Gt(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return Gt=function(){return e},e}Lt.propTypes={id:v.a.string,type:v.a.oneOf(["number","text"]),name:v.a.string,value:v.a.string,description:v.a.string,placeholder:v.a.string,onChange:v.a.func,onEnter:v.a.func,onBlur:v.a.func,readOnly:v.a.bool,step:v.a.number,min:v.a.number,max:v.a.number,maxLength:v.a.number,natural:v.a.bool},Lt.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1};var Ht=Object(_.a)((function(e){var n=e.id,t=e.name,r=e.value,a=void 0===r?"":r,o=e.description,i=e.placeholder,l=void 0===i?"":i,c=e.onEnter,u=void 0===c?null:c,s=e.readOnly,d=void 0!==s&&s,f=(e.maxLength,e.className),m=e.style,p=Dt(e,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),h=qt(Object(b.useState)(a),2),y=h[0],v=h[1],x=!!e.onChange;Object(b.useEffect)((function(){x||v(a)}),[a]);return g.a.createElement("div",{className:[f].join(" "),style:m},g.a.createElement("textarea",Bt({className:"neko-textarea"},p,{id:n,name:t,spellcheck:"false",placeholder:l,onChange:function(t){x?e.onChange(t.target.value,n):v(t.target.value,n)},onKeyPress:function(t){u&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},onBlur:function(t){e.onBlur&&a!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:d}),x?a:y),o&&g.a.createElement("p",{className:"neko-input-description"},o))}))(Gt(),T.fontFamily,T.fontSizeText,T.blue,T.gray,T.fontFamily,T.fontSizeSmall),Wt=function(e){return g.a.createElement(Ht,e)};Wt.propTypes={id:v.a.string,name:v.a.string,value:v.a.string,description:v.a.string,placeholder:v.a.string,onChange:v.a.func,onEnter:v.a.func,onBlur:v.a.func,readOnly:v.a.bool},Wt.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1};var $t=t(50),Yt=t.n($t),Jt=t(51),Vt=t.n(Jt);function Kt(){var e=lr(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return Kt=function(){return e},e}function Zt(){var e=lr(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return Zt=function(){return e},e}function Xt(){return(Xt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Qt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return er(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return er(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function nr(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function tr(){var e=lr(["\n background-color: ",";\n"]);return tr=function(){return e},e}function rr(){var e=lr(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return rr=function(){return e},e}function ar(){var e=lr(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return ar=function(){return e},e}function or(){var e=lr(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return or=function(){return e},e}function ir(){var e=lr(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return ir=function(){return e},e}function lr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var cr=_.a.div(ir(),T.blue),ur=_.a.div(or(),T.white,T.blue,T.fontFamily),sr=_.a.div(ar()),dr=_.a.div(rr()),fr=_.a.div(tr(),T.white),mr=function(e){var n,t=e.id,r=e.name,a=e.value,o=e.scrolldown,i=void 0!==o&&o,l=e.isPro,c=void 0!==l&&l,u=e.onChange,s=nr(e,["id","name","value","scrolldown","isPro","onChange"]),d=null===(n=g.a.Children.toArray(e.children).find((function(e){return e.props.value===a})))||void 0===n?void 0:n.props,f=(null==d?void 0:d.label)||"Select",m=(null==d?void 0:d.description)||e.description,p=(null==d?void 0:d.requirePro)||!1,h=Qt(Object(b.useState)(!1),2),y=h[0],v=h[1],x=i?ln((function(){v(!1)})):null,E=p&&!c,w=function(n){if(n!==a){if(!u)return void console.log("The onChange handler it not set for this checkbox.",e);u(n,t)}i&&v(!1)},k=g.a.Children.map(e.children,(function(e){return g.a.cloneElement(e,{name:e.props.name||r,checked:e.props.value===a,onClick:w,scrolldown:i,isPro:c})}));return i?g.a.createElement(cr,Xt({id:t,ref:x},s,{onClick:function(){return v(!y)},className:["nui-select",y?"show-options":""],childrenLength:k.length}),g.a.createElement(ur,null,f,g.a.createElement("div",{className:"rightContent"},E&&g.a.createElement(Ve,null),g.a.createElement(N.Icon,{icon:y?Z.a:V.a,width:"24"}))),m&&g.a.createElement(sr,null,m),y&&g.a.createElement(dr,{className:y?"":"hidden"},g.a.createElement(fr,null,[k]))):k},pr=_.a.div(Zt(),T.fontFamily,T.disabledForm),hr=_.a.div(Kt(),T.blue,T.fontFamily,T.white,T.fontFamily),br=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,o=e.label,i=e.description,l=e.onClick,c=e.scrolldown,u=e.isPro,s=void 0!==u&&u,d=e.requirePro,f=void 0!==d&&d&&!s,m=f?"disabled":"",p=g.a.createElement(pr,{className:"nui-select ".concat(e.className||""," ").concat(m)},g.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return l(e.target.value)},disabled:f}),g.a.createElement("label",{htmlFor:n},g.a.createElement(N.Icon,{icon:a?Vt.a:Yt.a,width:"24px",color:f?T.disabledForm:T.blue}),g.a.createElement("div",{className:"inner-container"},g.a.createElement("span",{className:"label"},o,g.a.createElement(Ve,{className:"inline",style:{top:-1},show:f})),i?g.a.createElement("small",{className:"description"},i):null))),h=g.a.createElement(hr,{className:"nui-select ".concat(e.className||""," ").concat(m)},g.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:f}),g.a.createElement("div",{className:"option",onClick:function(){return l(r)}},o,g.a.createElement(Ve,{show:f})));return c?h:p},gr=function(e){return g.a.createElement(mr,e)};gr.propTypes={id:v.a.string,name:v.a.string,description:v.a.string,scrolldown:v.a.bool,isPro:v.a.bool,onChange:v.a.func},gr.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var yr=function(e){return g.a.createElement(br,e)};yr.propTypes={id:v.a.string,name:v.a.string,value:v.a.string,checked:v.a.bool,label:v.a.string,description:v.a.string,onClick:v.a.func,scrolldown:v.a.bool,isPro:v.a.bool,requirePro:v.a.bool},yr.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1};var vr=t(18),xr=t.n(vr),Er=t(52),wr=t.n(Er),kr=t(53),Rr=t.n(kr);function Or(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return jr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Sr(){var e=_r(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return Sr=function(){return e},e}function Pr(){var e=_r(["\n height: 24px;\n width: 24px;\n"]);return Pr=function(){return e},e}function Cr(){var e=_r(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return Cr=function(){return e},e}function _r(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var Ar=function(e){var n=e.chevron,t=void 0===n||n;return g.a.Children.map(e.children,(function(e){return g.a.cloneElement(e,{chevron:t})}))},Tr=_.a.div(Cr()),Nr=_.a.div(Pr()),Ir=_.a.div(Sr(),T.finderBorder),zr=function(e){var n={gallery:Rr.a},t=e.title,r=e.chevron,a=!e.icon,o=!!e.icon,i=!!e.children,l=Or(g.a.useState(!1),2),c=l[0],u=l[1],s=Or(g.a.useState((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:xr.a})),2),d=s[0],f=s[1],m=g.a.Children.map(e.children,(function(e){return g.a.cloneElement(e,{chevron:r})}));return g.a.createElement("div",null,g.a.createElement(Tr,{onClick:function(){(a||i)&&(o||f(c?xr.a:wr.a),u(!c))},className:"".concat(a||m?"can-expand":"")},r?a||m?g.a.createElement(N.Icon,{icon:c?V.a:Y.a,width:"1.5rem",height:"1.5rem"}):g.a.createElement(Nr,null):null,g.a.createElement(N.Icon,{icon:d,color:T.blue,width:"1.5rem",height:"1.5rem"}),g.a.createElement("p",null,t)),c&&g.a.createElement(Ir,{className:"".concat(a?"":"no-line"," ").concat(r?"":"no-chevron")},m))},Mr=function(e){return g.a.createElement(Ar,e)};Mr.propTypes={chevron:v.a.bool},Mr.defaultProps={chevron:!0};var Fr=function(e){return g.a.createElement(zr,e)};function Lr(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return Lr=function(){return e},e}Fr.propTypes={icon:v.a.oneOfType([v.a.instanceOf(N.IconifyIcon),v.a.oneOf(["gallery"])]),title:v.a.string},Fr.defaultProps={icon:xr.a,title:void 0};var Br=_.a.div(Lr()),qr=function(){return g.a.createElement(Br,null,g.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),g.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),g.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),g.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),g.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),g.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),g.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),g.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),g.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},Ur=function(e){return g.a.createElement(qr,e)};function Dr(e){return(Dr="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)}function Gr(){var e=Wr(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return Gr=function(){return e},e}function Hr(){var e=Wr(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return Hr=function(){return e},e}function Wr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Ur.propTypes={},Ur.defaultProps={};var $r=Object(_.a)((function(e){var n=e.value,t=void 0===n?0:n,r=e.max,a=void 0===r?100:r,o=e.busy,i=void 0!==o&&o,l=e.status;t=Math.min(t,a);var c=parseFloat(t)/parseFloat(a);return g.a.createElement("div",{className:e.className},g.a.createElement(Yr,{ratio:c,busy:e.busy,status:l}),g.a.createElement("div",{className:"nui-progress-buttons"},i&&e.onPauseClick&&g.a.createElement("div",{className:"nui-progress-button pause",onClick:e.onPauseClick},e.paused?g.a.createElement(N.InlineIcon,{icon:ne.a}):g.a.createElement(N.InlineIcon,{icon:Q.a})),i&&e.onStopClick&&g.a.createElement("div",{className:"nui-progress-button stop",onClick:e.onStopClick},g.a.createElement(N.InlineIcon,{icon:le.a}))))}))(Hr(),T.blue,Object(A.a)(.1,T.blue),T.red,Object(A.a)(.1,T.red)),Yr=Object(_.a)((function(e){var n,t,r,a=isNaN(e.ratio)?0:parseInt(Math.round(100*e.ratio)),o=Dr(e.status),i="undefined"!==o?"string"===o?e.status:e.status(a):"".concat(a,"%");return g.a.createElement("div",{className:e.className,style:(n={minWidth:28},t="minWidth",r=a+"%",t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n)},g.a.createElement("div",null,i))}))(Gr(),T.progress,T.fontFamily,(function(e){return e.busy?"animate-stripes 1.6s linear infinite":"none"})),Jr=function(e){return g.a.createElement($r,e)};function Vr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Kr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Kr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Zr(){var e=Qr(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return Zr=function(){return e},e}function Xr(){var e=Qr(["\n\tdisplay: flex;\n"]);return Xr=function(){return e},e}function Qr(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Jr.propTypes={value:v.a.number,max:v.a.number,busy:v.a.bool,paused:v.a.bool,onPauseClick:v.a.func,onStopClick:v.a.func,status:v.a.oneOf([v.a.string,v.a.func])},Jr.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0};var ea=_.a.div(Xr()),na=_.a.div(Zr(),T.blackRGB,T.white,T.fontFamily,T.fontSizeText,(function(e){return e.visible?"inline-block":"none"}),T.blackRGB,T.blackRGB,T.blackRGB,T.blackRGB,(function(e){return e.style})),ta=function(e){var n=e.text,t=void 0===n?"Hello world!":n,r=e.position,a=void 0===r?"top":r,o=Vr(Object(b.useState)(!1),2),i=o[0],l=o[1],c=on(),u=c.ref,s=c.width,d=c.height,f=on(),m=f.ref,p=f.width,h=f.height,y=Object(b.useMemo)((function(){var e=0,n=0;if("top"===a)e=-1*d-5,n=s/2*-1+p/2;else if("bottom"===a)e=h+5,n=s/2*-1+p/2;else if("left"===a){e=(d-h)/2*-1,n=-1*s-5}else if("right"===a){e=(d-h)/2*-1,n=p+5}return{transform:"translateX(".concat(n,"px) translateY(").concat(e,"px)")}}),[a,s,d,p,h]);return g.a.createElement(ea,null,g.a.createElement(na,{ref:u,visible:i,className:a,style:y},t),g.a.createElement("div",{ref:m,onMouseEnter:function(){return l(!0)},onMouseLeave:function(){return l(!1)}},e.children))},ra=function(e){return g.a.createElement(ta,e)};function aa(){return(aa=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function oa(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function ia(){var e=ca(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return ia=function(){return e},e}function la(){var e=ca(["\n display: flex;\n align-items: center;\n"]);return la=function(){return e},e}function ca(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}ra.propTypes={text:v.a.string,position:v.a.oneOf(["top","right","bottom","left"])},ra.defaultProps={text:"Hello world!",position:"top"};var ua=_.a.div(la()),sa=Object(_.a)(N.Icon)(ia(),(function(e){return e.color}),(function(e){return function(e){if(e)return"\n &:hover {\n path {\n fill: ".concat(Object(A.a)(.1,e),";\n }\n }\n ")}(e.color)})),da=function(e){var n=e.icon,t=e.spinning,r=void 0!==t&&t,a=e.className,o=void 0===a?"":a,i=e.title,l=e.tooltip,c=e.containerStyle,u=e.color,s=oa(e,["icon","spinning","className","title","tooltip","containerStyle","color"]);s.width||s.height||(s.width=s.height=30);var d=function(){return"string"==typeof n?Fe[n]||null:n},f="nui-icon ".concat(o).concat(s.onClick?" nui-clickable":"").concat(r?" spin":"");return l?g.a.createElement(ra,{text:l.text,position:l.position||"top"},g.a.createElement(ua,{style:c},g.a.createElement(sa,aa({icon:d(),className:f,color:u},s)))):g.a.createElement(ua,{style:c,title:i},g.a.createElement(sa,aa({icon:d(),className:f,color:u},s)),l?g.a.createElement(ra,null,l):null)},fa=function(e){return g.a.createElement(da,e)};fa.propTypes={icon:v.a.oneOfType([v.a.instanceOf(N.IconifyIcon),v.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:v.a.string,spinning:v.a.bool,className:v.a.string,tooltip:v.a.string},fa.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0};var ma=t(54),pa=t.n(ma);function ha(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return ha=function(){return e},e}var ba=_.a.div(ha(),T.fontFamily,T.fontSizeText,T.header,T.fontFamily,T.fontFamily,T.fontSizeText),ga=function(e){var n=e.title,t=void 0===n?"NekoUI":n,r=e.subtitle,a=void 0===r?"By Jordy Meow":r,o=e.children,i=e.saving,l=void 0!==i&&i;return g.a.createElement(ba,null,g.a.createElement("div",{className:"nui-header-logo-container"},g.a.createElement(Ur,null)),g.a.createElement("div",{className:"nui-header-title-container"},g.a.createElement("h1",{className:"nui-header-title"},t),g.a.createElement("small",{className:"nui-header-subtitle"},g.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),g.a.createElement("div",{className:"nui-header-extra-content"},o),l&&g.a.createElement(fa,{icon:pa.a,width:"36",height:"36"}))},ya=function(e){return g.a.createElement(ga,e)};function va(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n }\n"]);return va=function(){return e},e}ya.propTypes={title:v.a.string,subtitle:v.a.string,saving:v.a.bool},ya.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1};var xa=_.a.div(va(),T.fontFamily,T.blueRGB,T.white,T.darkGray,T.white,T.fontFamily),Ea=function(e){var n=e.currentPage,t=e.limit,r=e.onClick,a=e.total,o=Math.ceil(0===a?1:t>0?a/t:1),i="nako-paging-controller-icon ".concat(1===n?"disabled":""),l="nako-paging-controller-icon ".concat(n===o?"disabled":""),c=function(e){r(e)};return g.a.createElement(xa,null,g.a.createElement("span",{className:"neko-paging-text"},a," result",a>0?"s":""),g.a.createElement("div",{className:"neko-paging-controller"},g.a.createElement(N.Icon,{icon:U.a,className:i,onClick:function(){return c(1)}}),g.a.createElement(N.Icon,{icon:W.a,className:i,onClick:function(){return c(n-1)}}),g.a.createElement("p",{className:"nako-paging-controller-text"},"Page ",n," of ",o),g.a.createElement(N.Icon,{icon:Y.a,className:l,onClick:function(){return c(n+1)}}),g.a.createElement(N.Icon,{icon:G.a,className:l,onClick:function(){return c(o)}})))},wa=function(e){return g.a.createElement(Ea,e)};function ka(){var e=Oa(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return ka=function(){return e},e}function Ra(){var e=Oa(["\n display: flex;\n align-items: center;\n"]);return Ra=function(){return e},e}function Oa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}wa.propTypes={currentPage:v.a.number,limit:v.a.number,total:v.a.number,onClick:v.a.func},wa.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0};var ja=_.a.div(Ra()),Sa=_.a.span(ka(),T.blue,T.fontFamily,T.black,T.darkGray,T.darkGray),Pa=function(e){var n=e.id,t=e.value,r=e.onChange,a=e.busy,o=void 0!==a&&a,i=g.a.Children.map(e.children,(function(e,a){return g.a.cloneElement(e,{busy:o,isActive:e.props.value===t,onClick:function(e){e!==t&&r(e,n)}})}));return g.a.createElement(ja,null,i)},Ca=function(e){var n=e.title,t=e.value,r=void 0===t?0:t,a=e.count,o=e.onClick,i=e.busy,l=e.isActive;return g.a.createElement(Sa,{onClick:function(){return o(r)},className:"".concat(l?"is-active":"")},n,g.a.createElement("span",null,"(",i?g.a.createElement(fa,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},_a=function(e){return g.a.createElement(Pa,e)};_a.propTypes={id:v.a.string,value:v.a.string,onChange:v.a.func},_a.defaultProps={id:void 0,value:void 0,onChange:void 0};var Aa=function(e){return g.a.createElement(Ca,e)};function Ta(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return Ta=function(){return e},e}Aa.propTypes={title:v.a.string,value:v.a.string,count:v.a.number,onClick:v.a.func,isActive:v.a.bool},Aa.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1};var Na=_.a.section(Ta(),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.backgroundColor}),(function(e){return e.width}),(function(e){return e.width}),(function(e){return e.width+2}),(function(e){return e.width/2+2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.degrees}),(function(e){return e.width+2}),(function(e){return e.width/2})),Ia=function(e){var n=e.value,t=void 0===n?1e3:n,r=(e.min,e.max),a=void 0===r?2500:r,o=e.width,i=void 0===o?200:o,l=e.background,c=void 0===l?"#007cba":l,u=e.children,s=180*(t<=a?t:a)/a;return g.a.createElement(Na,{backgroundColor:c,degrees:s,width:i},g.a.createElement("div",{class:"gauge"},g.a.createElement("div",{class:"mask"},g.a.createElement("div",{class:"semi-circle"}),g.a.createElement("div",{class:"semi-circle--mask"})),g.a.createElement("div",{class:"child-container"},g.a.createElement("div",{class:"child"},g.a.createElement("div",{class:"spacing"}),u))))};function za(){var e=Fa(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return za=function(){return e},e}function Ma(){var e=Fa(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return Ma=function(){return e},e}function Fa(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var La=_.a.p(Ma()),Ba=_.a.p(za());function qa(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n"]);return qa=function(){return e},e}_.a.div(qa());var Ua=t(55),Da=t.n(Ua);function Ga(){return(Ga=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Ha(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function Wa(){var e=Ya(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return Wa=function(){return e},e}function $a(){var e=Ya(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return $a=function(){return e},e}function Ya(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var Ja=_.a.div($a(),T.overlay,T.white),Va=_.a.div(Wa(),T.fontFamily,T.fontFamily),Ka=function(e){var n=e.children,t=e.className,r=e.style,a=e.ok,o=void 0===a?"OK":a,i=e.cancel,l=void 0===i?"Cancel":i,c=e.customButtons,u=void 0===c?null:c,s=e.title,d=void 0===s?"":s,f=e.content,m=void 0===f?"":f,p=e.onOkClick,h=e.onCancelClick,b=Ha(e,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),y=r?"custom-modal":"",v=n||g.a.createElement(Va,null,d&&g.a.createElement("p",{className:"title"},d),m&&g.a.createElement("p",{className:"content"},m),g.a.createElement("div",{className:"button-group"},h&&g.a.createElement(Ge,{className:"danger",onClick:h},l),p&&g.a.createElement(Ge,{onClick:p},o),u));return g.a.createElement(g.a.Fragment,null,g.a.createElement(Ja,{id:"neko-modal-parent"}),g.a.createElement(Da.a,Ga({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(y)},b),v))},Za=function(e){return g.a.createElement(Ka,e)};Za.propTypes={className:v.a.string,style:v.a.object,ok:v.a.string,cancel:v.a.string,title:v.a.string,content:v.a.string,onOkClick:v.a.func,onCancelClick:v.a.func,customButtons:v.a.object},Za.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null};var Xa=t(56),Qa=t.n(Xa);function eo(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function no(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return no=function(){return e},e}var to=_.a.table(no(),T.white,T.fontFamily,T.blackRGB,T.blackRGB,T.blue,T.white,T.tableGray,T.blueRGB,T.white),ro=function(e){var n=e.checked,t=e.intermediate,r=void 0!==t&&t,a=e.onSelect,o=void 0===a?function(){}:a,i=e.onUnselect,l=void 0===i?function(){}:i;eo(e,["checked","intermediate","onSelect","onUnselect"]);return g.a.createElement(N.Icon,{icon:r?Qa.a:n?Ot.a:kt.a,width:"24px",height:"24px",onClick:function(){n?l():o()}})},ao=function(e){var n=e.columns,t=e.data,r=e.busy,a=void 0!==r&&r,o=e.onSelect,i=e.onUnselect,l=e.selectedItems,c=e.sort,u=e.onSortChange,s=n.length+(o?1:0),d=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:n.style||{}}}));return{id:e.id,cells:t}})),f=d.map((function(e){return e.id})),m=f.filter((function(e){return l.includes(e)})).length===f.length,p=!m&&l.length>0,h=n.reduce((function(e,n,t){return!1===n.visible&&e.push(t),e}),[]),b=g.a.createElement("tr",null,o&&g.a.createElement("th",{className:"table-checkbox-cell"},g.a.createElement(ro,{checked:m,intermediate:p,onSelect:function(){return o(f)},onUnselect:function(){i(p?l:f)}})),n.filter((function(e,n){return!h.includes(n)})).map((function(e){var n=c&&c.accessor===e.accessor,t=c&&"asc"===c.by,r=e.style||{};return g.a.createElement("th",{style:r,key:e.accessor},g.a.createElement("div",{className:e.sortable?"sortable":"",onClick:e.sortable?function(){u(e.accessor,n&&t?"desc":"asc")}:void 0},g.a.createElement("div",null,e.title),g.a.createElement("div",null,e.sortable&&g.a.createElement(N.Icon,{icon:n?t?V.a:Z.a:V.a,color:n?T.white:"rgba(".concat(T.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return g.a.createElement(C,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},g.a.createElement(to,null,g.a.createElement("thead",null,b),g.a.createElement("tbody",null,!d.length&&g.a.createElement("tr",null,g.a.createElement("td",{colspan:s,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),d.map((function(e){return g.a.createElement("tr",{className:l.includes(e.id)?"selected":""},o&&g.a.createElement("td",{className:"table-checkbox-cell"},g.a.createElement(ro,{checked:l.includes(e.id),onSelect:function(){return o([e.id])},onUnselect:function(){return i([e.id])}})),e.cells.filter((function(e,n){return!h.includes(n)})).map((function(e){return g.a.createElement("td",{style:e.style},e.value)})))}))),g.a.createElement("tfoot",null,b)))},oo=function(e){return g.a.createElement(ao,e)};function io(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return lo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lo(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function co(){var e=mo(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return co=function(){return e},e}function uo(){var e=mo(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return uo=function(){return e},e}function so(){var e=mo(["\n"]);return so=function(){return e},e}function fo(){var e=mo(["\n"]);return fo=function(){return e},e}function mo(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}oo.propTypes={columns:v.a.arrayOf(v.a.any),data:v.a.arrayOf(v.a.any),busy:v.a.arrayOf(v.a.bool),onSelect:v.a.func,onUnselect:v.a.func,selectedItems:v.a.arrayOf(v.a.object),onSortChange:v.a.func},oo.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0};var po=_.a.div(fo()),ho=_.a.div(so()),bo=_.a.button(uo(),T.fontFamily,T.fontSizeText,T.blue,T.white),go=_.a.div(co(),T.blue),yo=function(e){var n=io(g.a.useState(0),2),t=n[0],r=n[1],a=g.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),o=g.a.Children.map(e.children,(function(e,n){return g.a.cloneElement(e,{isActive:n===t})}));return g.a.createElement(po,null,g.a.createElement(ho,null,a.map((function(n,a){return g.a.createElement(bo,{key:n.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(t){!function(n,t,a){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,a))}(a,n,t)}},n.title,g.a.createElement(Ve,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:n.requirePro}))}))),o)},vo=function(e){var n=e.children,t=e.isActive;return g.a.createElement(go,{className:"".concat(t?"active":"")},n)},xo=function(e){return g.a.createElement(yo,e)};xo.propTypes={isPro:v.a.bool,onChange:v.a.func},xo.defaultProps={isPro:!1,onChange:void 0};var Eo=function(e){return g.a.createElement(vo,e)};function wo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return ko(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ko(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ko(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ro(){var e=So(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return Ro=function(){return e},e}function Oo(){var e=So(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return Oo=function(){return e},e}function jo(){var e=So(["\n"]);return jo=function(){return e},e}function So(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}Eo.propTypes={isActive:v.a.bool,requirePro:v.a.bool,title:v.a.string},Eo.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Po=_.a.div(jo()),Co=_.a.div(Oo(),T.blue,T.yellowRGB,T.white,T.fontFamily,T.white),_o=_.a.div(Ro(),T.white),Ao=function(e){var n=wo(g.a.useState(),2),t=n[0],r=n[1],a=g.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),o=g.a.Children.map(e.children,(function(e,n){return g.a.cloneElement(e,{isActive:n===t})}));return g.a.createElement(Po,null,a.map((function(n,a){return g.a.createElement(g.a.Fragment,null,g.a.createElement(Co,{key:n.key,className:"".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(o){!function(n,a,o){if(!a.requirePro){var i=n===t?null:n;r(i),e.onChange&&e.onChange(i,a,o)}}(a,n,o)}},g.a.createElement("p",null,n.title,g.a.createElement(Ve,{className:"inline",show:n.requirePro})),g.a.createElement(N.Icon,{icon:a===t?V.a:Y.a,className:"neko-side-tab-icon"})),o[a])})))},To=function(e){var n=e.children,t=e.isActive;return g.a.createElement(_o,{className:"".concat(t?"active":"")},n)},No=function(e){return g.a.createElement(Ao,e)};No.propTypes={isPro:v.a.bool,onChange:v.a.func},No.defaultProps={isPro:!1,onChange:void 0};var Io=function(e){return g.a.createElement(To,e)};function zo(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.left {\n justify-content: flex-start;\n }\n\n &.right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return zo=function(){return e},e}Io.propTypes={isActive:v.a.bool,requirePro:v.a.bool,title:v.a.string},Io.defaultProps={isActive:!1,requirePro:!1,title:void 0};var Mo=_.a.div(zo(),T.white,T.blackRGB),Fo=function(e){var n=e.align,t=void 0===n?"left":n;return g.a.createElement(Mo,{className:t},e.children)},Lo=function(e){return g.a.createElement(Fo,e)};Lo.propTypes={align:v.a.oneOf(["left","right"])},Lo.defaultProps={align:"left"};t(22);function Bo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var qo=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};Bo(this,e),this.url=r,this.message=n,this.code=t,this.body=a,this.debug=o};function Uo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Wo(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Do(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Go(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Do(o,r,a,i,l,"next",e)}function l(e){Do(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Ho(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=Wo(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw o}}}}function Wo(e,n){if(e){if("string"==typeof e)return $o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$o(e,n):void 0}}function $o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Yo(e,n){for(var t=[],r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}var Jo=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=Ho(e.data);try{for(t.s();!(n=t.n()).done;){var r=n.value;try{r.meta=JSON.parse(r.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(e){t.e(e)}finally{t.f()}}else if(e.data.meta)try{e.data.meta=JSON.parse(e.data.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return e},Vo=function(){var e=Go(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>1&&void 0!==d[1]?d[1]:{},r=null,a={},o=null,i=null,e.prev=5,e.next=8,fetch("".concat(n),t);case 8:return i=e.sent,e.next=11,i.text();case 11:r=e.sent,(a=JSON.parse(r)).success||(l=!1===a.success?"NOT-SUCCESS":"N/A",c=a.message?a.message:"Unknown error. Check your Console Logs.","rest_no_route"===a.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===a.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),o=new qo(c,l,n,r||i)),e.next=22;break;case 16:e.prev=16,e.t0=e.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),o=new qo(s,u,n,r||i,e.t0);case 22:return o&&(console.error("[NekoError] JsonFetcher",o.url,{code:o.code,error:o.error,body:o.body}),a.success=!1,a.error=o),e.abrupt("return",Jo(a));case 24:case"end":return e.stop()}}),e,null,[[5,16]])})));return function(n){return e.apply(this,arguments)}}(),Ko=function(){var e=Go(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,l,c,u,s,d,f,m,p,h=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:{},r=t.json,a=void 0===r?{}:r,o=t.signal,i=t.file,l=t.nonce,c=i?new FormData:null,i)for(c.append("file",i),u=0,s=Object.entries(a);u<s.length;u++)d=Uo(s[u],2),f=d[0],m=d[1],c.append(f,m);return p=l?{"X-WP-Nonce":l}:{},c||(p["Content-Type"]="application/json"),e.abrupt("return",Vo(n,{method:"POST",headers:p,body:c||JSON.stringify(a),signal:o}));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function Zo(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Xo(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Zo(o,r,a,i,l,"next",e)}function l(e){Zo(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Qo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return ei(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ei(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ei(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var ni=wp.element,ti=ni.useState,ri=ni.useEffect,ai=function(e){var n=e.mutate,t=Qo(ti(e.entry),2),r=t[0],a=t[1],i=Qo(ti(!1),2),l=i[0],c=i[1],s=Qo(ti(""),2),d=s[0],f=s[1],b=Qo(ti(null),2),g=b[0],y=b[1],v=e.natural,x=void 0!==v&&v,E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!cn){var n=e.concurrency,t=void 0===n?2:n;cn=new Ze.a({concurrency:t,autoStart:!0})}var r=function(){var e=en(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cn.add(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return{runTask:r}}({concurrency:2}).runTask;ri((function(){f(""),e.entry?a(e.entry):e.mediaId&&w(e.mediaId)}),[e.entry]);var w=function(){var e=Xo(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,E(Xo(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ko("".concat(u,"/analyze"),{nonce:m,json:{mediaId:n}}));case 1:case"end":return e.stop()}}),e)}))));case 3:t=e.sent,a(t.data),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(){var e=Xo(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f(n);case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=Xo(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a(t),n&&n();case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=Xo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,Ko("".concat(u,"/rename"),{nonce:m,json:{mediaId:r.ID}});case 3:n=e.sent,R(n.data),y(null),c((function(e){return e-1}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=Xo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,Ko("".concat(u,"/rename"),{nonce:m,json:{mediaId:r.ID,filename:d}});case 3:n=e.sent,R(n.data),y(null),f(""),c((function(e){return e-1}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=Xo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,Ko("".concat(u,"/undo"),{nonce:m,json:{mediaId:r.ID}});case 3:n=e.sent,R(n.data,r.current_filename),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Xo(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c((function(e){return e+1})),e.next=3,Ko("".concat(u,"/set_lock"),{nonce:m,json:{mediaId:r.ID,lock:!r.locked}});case 3:n=e.sent,R(n.data),c((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=!!d,A=_?d:g||(null==r?void 0:r.current_filename);return React.createElement(C,{busy:l},React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Lt,{natural:x,readOnly:!h||l,value:A,onChange:k,onEnter:j,style:{marginRight:0,flex:"auto"}}),!_&&React.createElement(fa,{icon:(null==r?void 0:r.locked)?"lock":"lock-open",width:24,title:(null==r?void 0:r.locked)?"Unlock, to allow future actions":"Lock, to avoid future actions",style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?T.blue:"#5a5a5a82",onClick:P}),_&&React.createElement(fa,{icon:"close",width:24,style:{position:"relative",left:-26,marginRight:-22},color:(null==r?void 0:r.locked)?T.blue:"#5a5a5a82",onClick:function(){f("")}}),!_&&(null==r?void 0:r.proposed_filename)&&!(null==r?void 0:r.proposed_filename_exists)&&React.createElement(Ge,{style:{marginLeft:5},title:"Rename automatically",onMouseEnter:function(){return y(null==r?void 0:r.proposed_filename)},onMouseLeave:function(){return y(null)},onClick:O},"Auto Rename"),h&&_&&React.createElement(Ge,{style:{marginLeft:5},title:"Rename manually",onClick:j},o.RENAME),(null==r?void 0:r.proposed_filename_exists)&&React.createElement(fa,{icon:"alert",color:"orange",tooltip:{text:"The ideal filename (".concat(r.proposed_filename,") already exists."),position:"left"}}),p&&!_&&(null==r?void 0:r.original_filename)&&React.createElement(fa,{icon:"file-undo",title:"Rollback to original",color:T.red,onClick:S,onMouseEnter:function(){return y(null==r?void 0:r.original_filename)},onMouseLeave:function(){return y(null)}})))},oi=t(7);function ii(){var e=di(["\n color: white;\n margin: 0px 15px 15px 15px;\n\n .fatal {\n padding: 8px 12px;\n border-radius: 10px;\n background: #ab3014;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .warning {\n padding: 8px 12px;\n border-radius: 10px;\n background: #b98c0e;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .notice {\n padding: 8px 12px;\n border-radius: 10px;\n background: #23ad74;\n margin: 0 0 10px 0;\n border: 0;\n }\n"]);return ii=function(){return e},e}function li(){var e=di(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n font-family: Lato;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]);return li=function(){return e},e}function ci(){var e=di(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return ci=function(){return e},e}function ui(){var e=di(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]);return ui=function(){return e},e}function si(){var e=di(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]);return si=function(){return e},e}function di(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var fi=_.a.div(si()),mi=Object(_.a)(Yn)(ui()),pi=_.a.img(ci()),hi=_.a.div(li()),bi=_.a.div(ii());function gi(e){return function(e){if(Array.isArray(e))return wi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ei(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function vi(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){yi(o,r,a,i,l,"next",e)}function l(e){yi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function xi(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||Ei(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ei(e,n){if(e){if("string"==typeof e)return wi(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wi(e,n):void 0}}function wi(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var ki=wp.element,Ri=ki.useState,Oi=ki.useEffect,ji="".concat(c,"/meow-common/v1"),Si=function(e){var n=e.request,t=e.title,r=e.max,a=xi(Ri(!1),2),o=a[0],i=a[1],l=xi(Ri([]),2),c=l[0],u=l[1],s=c.length>0?c.reduce((function(e,n){return e+n})):0,d=c.length>0?Math.ceil(s/c.length):0,f=!c.length&&o;Oi((function(){o&&setTimeout(vi(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(new Date).getTime(),e.next=3,Ko("".concat(ji,"/").concat(n));case 3:r=(new Date).getTime(),a=r-t,u((function(e){return[].concat(gi(e),[a])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[c]);return React.createElement(fi,{style:{width:200,textAlign:"center"}},React.createElement(Gn,{h2:!0,style:{color:"white"}},t),React.createElement(Ia,{size:200,value:f?r:d,max:r},React.createElement("span",{style:{fontSize:20}},f?"START":d+" ms"),React.createElement("span",{style:{fontSize:12}},f?"YOUR ENGINE":c.length+" requests")),React.createElement(Ge,{style:{width:"100%",marginTop:10},color:o?"#cc3627":"#ccb027",onClick:function(){o||u([]),i(!o)}},o?"Stop":"Start"))};function Pi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ci(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Pi(Object(t),!0).forEach((function(n){_i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pi(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function _i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ai(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Ti(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ni(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ni(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ni(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Ii=wp.element,zi=Ii.useState,Mi=Ii.useEffect;u&&c&&s||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var Fi="".concat(c,"/meow-common/v1"),Li=React.createElement(fi,null,React.createElement(Gn,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),Bi=React.createElement(fi,null,React.createElement(Gn,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(Gn,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),qi=React.createElement(fi,null,React.createElement(Gn,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(Gn,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(Gn,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/debugging-wordpress/",target:"_blank"},"How To Debug")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/seo-optimization/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/",target:"_blank"},"Clean Up and Optimize")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/optimize-images-cdn/",target:"_blank"},"Optimize Images")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/best-hosting-services-wordpress/",target:"_blank"},"Best Hosting Services"))))),Ui=React.createElement(fi,null,React.createElement(Gn,{p:!0},"A summarized version of your PHP Error Logs will be displayed here, with the latest errors at the top. After it, you will find information about your PHP, so make sure your scroll down.")),Di=function(){var e=Ti(zi(!1),2),n=e[0],t=e[1],r=Object(oi.a)("".concat(Fi,"/all_settings/"),Vo),a=r.data,o=r.mutate,i=r.error,l=null==a?void 0:a.data,c=null==l?void 0:l.meowapps_hide_meowapps,u=null==l?void 0:l.force_sslverify,d=Ti(zi(!1),2),f=d[0],p=d[1],h=Ti(zi(""),2),b=h[0],g=h[1],y=Ti(zi(""),2),v=y[0],x=y[1];Mi((function(){i&&!n&&(t(!0),console.error("Error from UseSWR",i.message))}),[i]),Mi((function(){var e=document.getElementById("meow-common-phperrorlogs"),n=document.getElementById("meow-common-phpinfo");g(e.innerHTML),x(n.innerHTML)}),[]);var E=function(){var e,n=(e=regeneratorRuntime.mark((function e(n,t){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Ci({},a.data))[t]=n,o(Ci(Ci({},a),{},{data:r}),!1),p(!0),e.next=6,Ko("".concat(Fi,"/update_option"),{json:{name:t,value:n},nonce:m});case 6:i=e.sent,p(!1),i.success||alert(i.message),o();case 10:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Ai(o,r,a,i,l,"next",e)}function l(e){Ai(o,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,t){return n.apply(this,arguments)}}(),w=React.createElement(rt,{title:"Main Menu"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(Gn,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:f,checked:c,onChange:E}))),k=React.createElement(rt,{title:"SSL Verify"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(Gn,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:f,checked:u,onChange:E})));return React.createElement(An,{showRestError:n},React.createElement(ya,{title:"The Dashboard"}),React.createElement(xt,null,React.createElement(Et,{full:!0},React.createElement(xo,null,React.createElement(Eo,{title:"Meow Apps"},Li,React.createElement(xt,null,React.createElement(Et,{minimal:!0},React.createElement(mi,{title:"Media Cleaner",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/media-cleaner.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(mi,{title:"Media File Renamer",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/media-file-renamer.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(mi,{title:"Contact Form Block",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress."))),React.createElement(mi,{title:"Meow Analytics",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(Et,{minimal:!0},React.createElement(mi,{title:"Meow Gallery",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/meow-gallery.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(mi,{title:"Meow Lightbox",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/meow-lightbox.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(mi,{title:"WP/LR Sync",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/wplr-sync.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"WP/LR Sync")),React.createElement("p",null,"Are you using Lightroom? So you know WP/LR Sync already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(mi,{title:"Perfect Images + Retina",className:"primary"},React.createElement(pi,{src:"".concat(s,"/common/img/wp-retina-2x.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more.")))))),React.createElement(Eo,{title:"Performance"},Bi,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(Si,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(Si,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(Si,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(Eo,{title:"Recommendations"},qi),React.createElement(Eo,{title:"PHP Errors & Info"},Ui,React.createElement(bi,{dangerouslySetInnerHTML:{__html:b}}),React.createElement(hi,{dangerouslySetInnerHTML:{__html:v}})),React.createElement(Eo,{title:"Settings"},React.createElement(Yn,{title:"Settings",className:"primary"},w,k))))))};function Gi(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function Hi(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){Gi(o,r,a,i,l,"next",e)}function l(e){Gi(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Wi(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return $i(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $i(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Yi=wp.element,Ji=Yi.useState,Vi=Yi.useEffect,Ki="".concat(c,"/meow-licenser/").concat(i,"/v1"),Zi=function(){var e=Wi(Ji(!1),2),n=e[0],t=e[1],r=Wi(Ji(null),2),a=r[0],o=r[1],i=Wi(Ji(null),2),c=i[0],u=i[1],s=Wi(Ji(""),2),p=s[0],h=s[1],b=f&&(!c||"valid"!==c.license),g=function(){var e=Hi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d){e.next=2;break}return e.abrupt("return");case 2:return t(!0),e.next=5,Ko("".concat(Ki,"/get_license"),{nonce:m});case 5:n=e.sent,u(n.data),n.data.key&&h(n.data.key),t(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=Hi(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Ko("".concat(Ki,"/set_license"),{nonce:m,json:{serialKey:null}});case 3:e.sent.success&&(h(""),u(null),o("licenseRemoved")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=Hi(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(!0),e.next=3,Ko("".concat(Ki,"/set_license"),{nonce:m,json:{serialKey:p}});case 3:(n=e.sent).success&&(u(n.data),n.data&&!n.data.issue&&o("licenseAdded")),t(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Vi((function(){g()}),[]);var x=b?"Forced License":f?"Enabled":"Disabled",E=c&&"valid"===c.license,w="Your license is active. Thanks a lot for your support :)";E||(c?"no_activations_left"===c.issue?w=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===c.issue?w=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),"."):"missing"===c.issue?w="This license does not exist.":"disabled"===c.issue?w="This license has been disabled.":"item_name_mismatch"===c.issue?w="This license seems to be for a different plugin... isn't it? :)":(w=React.createElement("span",null,"There is an unknown error related to this serial key. Really sorry about this! Please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:c})):w="Unknown error :(");var k=React.createElement(Yn,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/plugin/".concat(l,"/")},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com/"},"Meow Apps Store"),"."),R=React.createElement(Yn,{title:"Pro Version (".concat(x,")"),busy:n,className:"primary"},React.createElement(rt,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(Lt,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:n,value:p,onChange:function(e){return h(e)},placeholder:""})),c&&!E&&React.createElement(La,null,w),c&&E&&React.createElement(Ba,null,w),!c&&React.createElement(Gn,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"/plugin/media-file-renamer/"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(rt,{contentAlign:"right"},c&&!E&&React.createElement(Ge,{className:"secondary",disabled:n||!p,onClick:v},"Retry to validate"),c&&c.key===p&&React.createElement(Ge,{className:"secondary",disabled:n||!p,onClick:y},"Remove License"),React.createElement(Ge,{disabled:n||!p||c&&c.key===p,onClick:v},"Validate License")),React.createElement(Za,{isOpen:"licenseAdded"===a,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(Za,{isOpen:"licenseRemoved"===a,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return d?R:k},Xi=wp.element.render;function Qi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function el(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qi(Object(t),!0).forEach((function(n){nl(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qi(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function nl(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function tl(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function rl(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){tl(o,r,a,i,l,"next",e)}function l(e){tl(o,r,a,i,l,"throw",e)}i(void 0)}))}}function al(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return ol(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ol(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ol(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var n=document.getElementById("meow-common-dashboard");n&&Xi(React.createElement(Di,null),n)})));var il=wp.element.useState,ll={marginTop:10,background:"rgb(0, 72, 88)",padding:10,color:"rgb(58, 212, 58)",maxHeight:600,minHeight:200,display:"block",fontFamily:"monospace",fontSize:12,whiteSpace:"pre",overflowX:"auto",width:"calc(100vw - 276px)"},cl=function(){var e=Object(oi.a)("".concat(u,"/all_settings/"),Vo),n=e.data,t=e.mutate,r=an(n,{},!0),a=r.busy,o=r.data,c=r.error,s=al(il(""),2),p=s[0],h=s[1],b=al(il(!1),2),g=b[0],y=b[1],v=a||g,x=null==o?void 0:o.mfrh_auto_rename,E=null==o?void 0:o.mfrh_on_upload,w=null==o?void 0:o.mfrh_rename_slug,k=null==o?void 0:o.mfrh_convert_to_ascii,R=null==o?void 0:o.mfrh_update_posts,O=null==o?void 0:o.mfrh_update_postmeta,j=null==o?void 0:o.mfrh_undo,S=null==o?void 0:o.mfrh_manual_rename,P=null==o?void 0:o.mfrh_numbered_files,C=null==o?void 0:o.mfrh_sync_alt,_=null==o?void 0:o.mfrh_sync_media_title,A=null==o?void 0:o.mfrh_force_rename,T=null==o?void 0:o.mfrh_log,N=null==o?void 0:o.mfrh_logsql,I=null==o?void 0:o.mfrh_rename_guid,z=null==o?void 0:o.mfrh_case_insensitive_check,M=null==o?void 0:o.mfrh_rename_on_save,F=[{id:"media_title",value:"media_title",label:React.createElement("span",null,"Based on Media Title"),requirePro:!1},{id:"post_title",value:"post_title",label:React.createElement("span",null,"Based on Attached Post Title"),requirePro:!f},{id:"alt_text",value:"alt_text",label:React.createElement("span",null,"Based on Alternative Text"),requirePro:!f},{id:"anonymize_md5",value:"anonymize_md5",label:React.createElement("span",null,"Anonymize with MD5"),requirePro:!f},{id:"none",value:"none",label:React.createElement("span",null,"Disable Automatic Rename"),requirePro:!1}],L=function(){var e=rl(regeneratorRuntime.mark((function e(r,a){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=el({},n.data))[a]=r,t(el(el({},n),{},{data:o}),!1),y(!0),e.prev=4,e.next=7,Ko("".concat(u,"/update_option"),{nonce:m,json:{name:a,value:r}});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:return e.prev=12,y(!1),t(),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[4,9,12,16]])})));return function(n,t){return e.apply(this,arguments)}}(),B=function(){var e=rl(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,Ko("".concat(u,"/refresh_logs"));case 3:(n=e.sent).success&&h(n.data),y(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=rl(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.next=3,Ko("".concat(u,"/clear_logs"));case 3:(n=e.sent).success&&h(n.data),y(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=React.createElement(Yn,{busy:v,title:"Side Updates",className:"primary"},React.createElement(Gn,{p:!0,style:{marginTop:0}},"When the files are renamed, many links to them on your WordPress might be broken. Those options are updating the references to those files. ",React.createElement("strong",null,"Give it a try, every install is different and it might not work for certain kind of references.")),React.createElement(rt,{title:"Posts"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_update_posts",disabled:v,label:"Enable",description:React.createElement(Gn,{p:!0},"Update the references to the renamed files in the ",React.createElement("strong",null,"content")," content and ",React.createElement("strong",null,"excerpt")," of the posts (pages and custom types included)."),value:"1",checked:R,onChange:L}))),React.createElement(rt,{title:"Post Meta"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_update_postmeta",disabled:v,label:"Enable",description:React.createElement(Gn,{p:!0},"Update the references in the ",React.createElement("strong",null,"custom fields")," of the posts (including pages and custom types metadata)."),value:"1",checked:O,onChange:L})))),D=React.createElement(rt,{title:"Method"},React.createElement(gr,{id:"mfrh_auto_rename",disabled:v,value:x,scrolldown:!0,name:"mfrh_auto_rename",description:"Attached Post includes all kinds of Post Types: Posts, Pages, Products, etc.",onChange:L},F.map((function(e){return React.createElement(yr,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),G=React.createElement(rt,{title:"On Upload"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_on_upload",disabled:v,label:"Enable",description:React.createElement(React.Fragment,null,React.createElement("span",null,"If your image has an EXIF title, it will be used to decide the filename. "),"post_title"===x&&React.createElement("span",null,"Note: The Attached Post Title ",React.createElement("u",null,"will not be used")," at the time of the upload due to WordPress API constraints.")),value:"1",checked:E,onChange:L}))),H=React.createElement(rt,{title:"Slug/Permalink"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_rename_slug",disabled:v,label:"Sync with filename",description:"Better to keep this un-checked as the link might have been referenced somewhere else.",value:"1",checked:w,onChange:L}))),W=React.createElement(rt,{title:"Transliteration"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_convert_to_ascii",disabled:v,label:"Enable (Recommended)",description:React.createElement(Gn,{p:!0},"Replace accents, emoticons, diacritics, umlauts, cyrillic and any kind of tricky characters by their ASCII equivalent.",React.createElement("br",null)," ",React.createElement("i",null,"Examples: tête → tete, schön → schon, Добро → dobro, etc.")),value:"1",requirePro:!f,checked:k,onChange:L}))),$=React.createElement(rt,{title:"Undo"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_undo",disabled:v,label:"Enable",description:"An undo icon will be added to the UI. This allows to rollback to the original filename.",value:"1",checked:j,onChange:L}))),Y=React.createElement(rt,{title:"Manual Rename"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_manual_rename",disabled:v,label:"Enable",description:"An editable field will be added everywhere your files appear in the UI.",value:"1",checked:S,onChange:L}))),J=React.createElement(rt,{title:"Force Rename"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_force_rename",disabled:v,label:"Enable",description:"Update the references to the file even if the file renaming itself was not successful. You might want to use that option if your install is broken and you are trying to link your Media to files for which the filenames has been altered (after a migration for exemple)",value:"1",requirePro:!f,checked:A,onChange:L}))),V=React.createElement(rt,{title:"Numbered Files"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_numbered_files",disabled:v,label:"Enable Numbering",description:"Identical filenames will be allowed by the plugin and a number will be appended automatically (myfile.jpg, myfile-2.jpg, myfile-3.jpg, etc).",requirePro:!f,value:"1",checked:P,onChange:L}))),K=React.createElement(rt,{title:"ALT Text"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_sync_alt",disabled:v||!("media_title"===x||"post_title"===x),label:React.createElement(Gn,null,"Synchronize"),description:"The ALT Text will be synchronized with the same source used for the filename.",requirePro:!f,value:"1",checked:C,onChange:L}))),Z=React.createElement(rt,{title:"Media Title"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_sync_media_title",disabled:v||"post_title"!==x,label:React.createElement(Gn,null,"Synchronize"),description:"The Media Title will be synchronized with the same source used for the filename.",requirePro:!f,value:"1",checked:_,onChange:L}))),X=React.createElement(rt,{title:"Logs"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_log",label:"Enable",description:React.createElement(Gn,{p:!0},"Simple logging that explains which actions has been run."),value:"1",checked:T,onChange:L}),React.createElement("div",{style:{marginTop:20}},React.createElement(Ge,{onClick:B},"Refresh Logs"),React.createElement(Ge,{className:"danger",onClick:q},"Clear Logs")))),Q=React.createElement(rt,{title:"SQL Logs"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_logsql",disabled:v,label:"Enable",description:React.createElement(Gn,{p:!0},"The files mfrh_sql.log and mfrh_sql_revert.log will be created in the /logs directory and will include the raw SQL queries which were run by the plugin. If there is an issue, the revert SQL file can help you."),requirePro:!f,value:"1",checked:N,onChange:L}))),ee=React.createElement(rt,{title:"GUID"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_rename_guid",disabled:v,label:"Sync with filename",description:"The GUID will be renamed like the new filename. Better to keep this un-checked.",value:"1",checked:I,onChange:L}))),ne=React.createElement(rt,{title:"Case Insensitive"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_case_insensitive_check",label:"Enable",value:"1",checked:z,onChange:L,description:React.createElement(React.Fragment,null,'This will consider the file such as "abc.jpg" and "ABC.JPG" as the same file. More information ',React.createElement("a",{target:"_blank",href:"https://meowapps.com/media-file-renamer-faq-issues/"},"here"),". You should check this if you are on a Windows-based server.")}))),te=React.createElement(rt,{title:"Rename on Post Save"},React.createElement(At,{max:"1"},React.createElement(Pt,{id:"mfrh_rename_on_save",disabled:v,label:"Enable (Unsafe)",description:"You can modify the titles of your media while editing a post but, of course, the plugin can't update the HTML at this stage. With this option, the plugin will update the filenames and HTML after that you saved the post.",value:"1",checked:M,onChange:L})));return React.createElement(An,{nekoErrors:[c]},React.createElement(ya,{title:"Media File Renamer | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Ge,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Ge,{className:"primary",icon:"dashboard",color:"#8554bb",onClick:function(){return location.href="upload.php?page=mfrh_dashboard"}},"Dashboard"))),React.createElement(xt,null,React.createElement(Et,{full:!0},React.createElement(et,null,React.createElement(Gn,{p:!0},"It works out of the box, the default settings are good for most installs. However, you should really have a look at the ",React.createElement("a",{href:"https://meowapps.com/plugin/media-file-renamer/"},"tutorial"),".")),React.createElement(xo,null,React.createElement(Eo,{title:"Basic"},React.createElement(xt,null,React.createElement(Et,{minimal:!0},React.createElement(Yn,{busy:v,title:"Settings",className:"primary"},React.createElement(Gn,{h2:!0},"Automatic"),React.createElement(Gn,{p:!0},"This plugin's main goal is to make the process of optimizing your filenames entirely automatic. By default, your files will be named after the title of your media entry."),D,G,React.createElement(Gn,{h2:!0},"Manual"),Y,React.createElement(Gn,{p:!0},"If you are a SEO guru or someone who loves having a perfectly neat filesystem, it is recommended to use automatic renaming first, then to tweak specific files with manual renaming. The ",React.createElement("a",{href:"/wp-admin/upload.php?page=mfrh_dashboard"},"Renamer Dashboard")," makes it very easy."))),React.createElement(Et,{minimal:!0},U,React.createElement(Yn,{busy:v,title:"UI (Extra Features)",className:"primary"},$)))),React.createElement(Eo,{title:"Advanced"},React.createElement(xt,null,React.createElement(Et,{minimal:!0},React.createElement(Yn,{busy:v,title:"Advanced Settings",className:"primary"},W,V),React.createElement(Yn,{busy:v,title:"Fields Syncing",className:"primary"},H,ee,K,Z,React.createElement(Gn,{p:!0},"The fields in the database will be synchronized, but the data already written in your HTML will not be overwritten."))),React.createElement(Et,{minimal:!0},React.createElement(Yn,{busy:v,title:"Developer Settings",className:"primary"},ne,J,Q,te)))),React.createElement(Eo,{title:"Pro Version"},React.createElement(Zi,{domain:l,prefix:i,isPro:d,isRegistered:f})),React.createElement(Eo,{title:"Logs & Debug"},React.createElement(Yn,{busy:v,className:"primary"},X),React.createElement("div",{style:ll},p))))))};function ul(e){return function(e){if(Array.isArray(e))return pl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ml(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(e,n,t,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,a)}function dl(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var o=e.apply(n,t);function i(e){sl(o,r,a,i,l,"next",e)}function l(e){sl(o,r,a,i,l,"throw",e)}i(void 0)}))}}function fl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return t}(e,n)||ml(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ml(e,n){if(e){if("string"==typeof e)return pl(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pl(e,n):void 0}}function pl(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var hl=wp.element,bl=hl.useState,gl=hl.useEffect,yl=hl.useMemo,vl={width:40,height:40,objectFit:"cover"},xl=[{accessor:"thumbnail_url",title:o.THUMB,style:{width:16}},{accessor:"post_title",title:o.TITLE,sortable:!0,style:{width:"25%"}},{accessor:"post_parent",title:o.ATTACHED_TO,sortable:!0,style:{width:"25%"}},{accessor:"current_filename",title:o.FILENAME,sortable:!0}],El={accessor:"id",by:"asc"},wl=function(){var e,n,t,r=fl(bl("pending"),2),a=r[0],i=r[1],l=fl(bl(),2),c=l[0],s=l[1],d=fl(bl([]),2),h=d[0],g=d[1],y=fl(bl(!1),2),v=y[0],x=y[1],E=fl(bl(""),2),w=E[0],k=E[1],R=fl(bl(""),2),O=R[0],j=R[1],S=fl(bl(El),2),P=S[0],C=S[1],_=fl(bl(1),2),A=_[0],T=_[1],N=fl(bl(10),2),I=N[0],z=N[1],M=function(){var e=nn(Object(b.useState)(new AbortController),2),n=e[0],t=e[1],r=Object(b.useRef)(!1),a=Object(b.useRef)(0),o=nn(Object(b.useState)(null),2),i=o[0],l=o[1],c=nn(Object(b.useState)(!1),2),u=c[0],s=c[1],d=nn(Object(b.useState)(0),2),f=d[0],m=d[1],p=nn(Object(b.useState)(!1),2),h=p[0],g=p[1],y=nn(Object(b.useState)(!1),2),v=y[0],x=y[1],E=nn(Object(b.useState)(0),2),w=E[0],k=E[1],R=function(){var e=en(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new AbortController,t(n),g(!1),a.current=0,r.current=!1,s(!1),x(!1),k(0),m(0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=en(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){g(!1),a.current=0,r.current=!1,s(!1),x(!1),A(n),l(!0),un.start(),un.onIdle().then((function(){C(),e()}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=en(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,un.pause(),s(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=en(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,g(!1),s(!1),un.start();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=en(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,un.pause(),n.abort(),l(!1),g(!1),x(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=en(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,x(!0),l(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=en(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:un.add(en(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n.signal);case 3:(o=e.sent)&&o.success||console.error("[useNekoTasks] Task returned nothing.",o),o.success||(a.current++,r.current||(g(o.error),j())),e.next=17;break;case 8:if(e.prev=8,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=15;break}return console.log("Aborted"),e.abrupt("return");case 15:a.current++,r.current||(g("An error was caught (more information in the console)."),j());case 17:return e.prev=17,k((function(e){return e+1})),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,8,17,20]])})))),m((function(e){return e+1}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=en(regeneratorRuntime.mark((function e(n){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:un.clear(),t=Xe(n);try{for(t.s();!(r=t.n()).done;)a=r.value,_(a)}catch(e){t.e(e)}finally{t.f()}k(0);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=Object(b.useCallback)((function(){r.current=!0}),[]),N=Object(b.useCallback)((function(){return a.current}),[]);return{start:O,stop:P,pause:j,resume:S,reset:R,addTask:_,setAlwaysSkip:T,getErrorCount:N,error:h,success:v,busy:i,paused:u,value:w,max:f}}(),F=(A-1)*I,L=P.accessor,B=P.by,q=Object(oi.a)("".concat(u,"/stats"),Vo),U=q.data,D=q.mutate,G=Object(oi.a)((e="".concat(u,"/media"),n={limit:I,skip:F,filterBy:a,orderBy:L,order:B},t=e.includes("index.php?rest_route"),e+(t?"&":"?")+new URLSearchParams(n).toString()),Vo),H=G.data,W=G.mutate,$=an(U,{pending:"-",renamed:"-",all:"-"},!0),Y=$.busy,J=$.data,V=$.error,K=an(H,[],!0),Z=K.busy,X=K.data,Q=K.total,ee=K.error,ne=Z||Y||v,te=yl((function(){return X.map((function(e){return{id:e.ID,thumbnail_url:React.createElement("img",{src:e.thumbnail_url,style:vl}),post_title:React.createElement("a",{href:"post.php?post=".concat(e.ID,"&action=edit")},e.post_title),post_parent:React.createElement("div",{style:{maxHeight:35,overflow:"hidden"}},e.post_parent_title?e.post_parent_title:React.createElement("i",{style:{color:"#c1c1c1"}},"None")),current_filename:React.createElement(ai,{entry:e,mutate:function(){W(),D()}})}}))}),[X]);gl((function(){g([]),C(El),T(1)}),[a]),gl((function(){if(null!==M.busy&&(x(M.busy),!M.busy)){var e=M.getErrorCount();e>0&&j("The process has finished, but ".concat(e," error(s) occurred (check your console).")),M.reset(),g([]),W(),D()}}),[M.busy]);var re=function(){var e=dl(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko("".concat(u,"/get_all_ids"),{nonce:m,json:{unlockedOnly:n}});case 2:if((t=e.sent).success){e.next=6;break}return alert(t.message),e.abrupt("return",[]);case 6:return e.abrupt("return",t.data);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ae=function(){var e=dl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,k("Preparing..."),x(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,re(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=16;break}return k("Undoing..."),r=t.map((function(e){return function(){var n=dl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return k("Undo Media ".concat(e)),n.next=3,Ko("".concat(u,"/undo"),{nonce:m,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),M.start(r),e.abrupt("return");case 16:x(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=dl(regeneratorRuntime.mark((function e(){var n,t,r,a,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:null,k("Preparing..."),x(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,re(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=17;break}return k("Analyzing..."),r=Yo(t,20),a=r.map((function(e){return function(){var n=dl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Ko("".concat(u,"/analyze"),{nonce:m,json:{mediaIds:e},signal:t});case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),M.start(a),e.abrupt("return");case 17:x(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=dl(regeneratorRuntime.mark((function e(){var n,t,r,a,o,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!(i.length>0&&void 0!==i[0])||i[0],t=i.length>1&&void 0!==i[1]?i[1]:null,k("Preparing..."),x(!0),!t){e.next=8;break}e.t0=t,e.next=11;break;case 8:return e.next=10,re(n);case 10:e.t0=e.sent;case 11:if(!(r=e.t0)){e.next=18;break}return k("".concat(n?"Locking..":"Unlocking...")),a=Yo(r,50),o=a.map((function(e){return function(){var e=dl(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ko("".concat(u,"/set_lock"),{nonce:m,json:{mediaIds:r,lock:n},signal:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})),M.start(o),e.abrupt("return");case 18:x(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=dl(regeneratorRuntime.mark((function e(){var n,t,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:null,k("Preparing..."),x(!0),!n){e.next=7;break}e.t0=n,e.next=10;break;case 7:return e.next=9,re(!0);case 9:e.t0=e.sent;case 10:if(!(t=e.t0)){e.next=15;break}return r=t.map((function(e){return function(){var n=dl(regeneratorRuntime.mark((function n(t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return k("Renaming #".concat(e)),n.next=3,Ko("".concat(u,"/rename"),{nonce:m,json:{mediaId:e},signal:t});case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()})),M.start(r),e.abrupt("return");case 15:x(!1);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=React.createElement(React.Fragment,null,React.createElement(Ge,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/media-file-renamer/","_blank")}},"Get the Pro Version"),React.createElement(Ge,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(An,{nekoErrors:[V,ee]},React.createElement(ya,{title:"Media File Renamer | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(Ge,{className:"primary",onClick:function(){return window.open("https://meowapps.com/media-file-renamer-tutorial/","_blank")}},"Tutorial"),React.createElement(Ge,{icon:"cog",color:"#8554bb",onClick:function(){return location.href="admin.php?page=mfrh_settings"}},"Settings"))),React.createElement(xt,null,React.createElement(Et,{full:!0},!f&&React.createElement(et,{footer:ce},React.createElement(Gn,{p:!0},"You must ",React.createElement("b",null,"backup the uploads folder and DB")," before using the Renamer. If you don't know how, give a try to ",React.createElement("a",{target:"_blank",href:"https://meow.click/blogvault"},"BlogVault"),". It is also highly recommanded to read the tutorial. Last but not least, check the ",React.createElement("b",null,"Pro Version"),", as it adds many features and also supports the development. This message is only displayed in the free version. Thank you!")),React.createElement(Lo,null,React.createElement(Ge,{onClick:function(){return oe()}},"Analyze Library"),React.createElement(kn,{title:"Actions"},React.createElement(Rn,{requiredPro:!0,onClick:function(){s("autoAttach")}},"Auto-Attach")),"pending"===a&&h.length>0&&React.createElement(React.Fragment,null,React.createElement(Ge,{className:"secondary",onClick:function(){return le(h)}},"Rename ",React.createElement("strong",null,h.length)," entries"),React.createElement(Ge,{className:"secondary",onClick:function(){return ie(!0,h)}},"Lock ",React.createElement("strong",null,h.length)," entries")),p&&"renamed"===a&&h.length>0&&React.createElement(React.Fragment,null,React.createElement(Ge,{className:"secondary",onClick:function(){return ae(h)}},"Undo ",React.createElement("strong",null,h.length)," entries")),React.createElement("div",{style:{flex:1}},v&&React.createElement(Jr,{status:function(e){return"".concat(w," (").concat(e,"%)")},busy:v,value:M.value,max:M.max,onStopClick:M.stop})),"all"===a&&React.createElement(React.Fragment,null,React.createElement(Ge,{className:"secondary",onClick:function(){return ie(!0)}},"Lock ",React.createElement("strong",null,"All")),React.createElement(Ge,{className:"secondary",onClick:function(){return ie(!1)}},"Unlock ",React.createElement("strong",null,"All"))),("all"===a||"pending"===a)&&React.createElement(React.Fragment,null,React.createElement(Ge,{className:"primary",onClick:function(){return s("renameAll")}},"Rename ",React.createElement("strong",null,"All"))),p&&("all"===a||"renamed"===a)&&React.createElement(React.Fragment,null,React.createElement(Ge,{className:"danger",onClick:function(){return s("undoAll")}},"Undo ",React.createElement("strong",null,"All")))),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(_a,{value:a,busy:Y,onChange:function(e){i(e),T(1)}},React.createElement(Aa,{title:o.PENDING,value:"pending",count:J.pending}),React.createElement(Aa,{title:"Renamed",value:"renamed",count:J.renamed}),React.createElement(Aa,{title:"All",value:"all",count:J.all})),React.createElement(wa,{currentPage:A,limit:I,total:Q,onClick:function(e){return T(e)}})),React.createElement(oo,{busy:ne,data:te,columns:xl,sort:P,onSortChange:function(e,n){C({accessor:e,by:n})},onSelect:function(e){g([].concat(ul(h),ul(e)))},onUnselect:function(e){g(ul(h.filter((function(n){return!e.includes(n)}))))},selectedItems:h}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(gr,{scrolldown:!0,value:I,onChange:function(e){z(e),T(1)}},React.createElement(yr,{value:5,label:"5 items per page"}),React.createElement(yr,{value:10,label:"10 items per page"}),React.createElement(yr,{value:25,label:"25 items per page"}),React.createElement(yr,{value:50,label:"50 items per page"})),React.createElement(wa,{currentPage:A,limit:I,total:Q,onClick:function(e){return T(e)}}))),React.createElement(Za,{isOpen:"renameAll"===c,onRequestClose:function(){return s(null)},title:"You are about to rename all your (unlocked) files",content:"Renaming files is a dangerous operation. Please make sure you made a backup or your entire WordPress install. Should we start?",onOkClick:function(){s(null),le()},onCancelClick:function(){s(null)}}),React.createElement(Za,{isOpen:"undoAll"===c,onRequestClose:function(){return s(null)},title:"You are about to undo the renaming for all your files",content:"Are you sure you would like to proceed?",onOkClick:function(){s(null),ae()},onCancelClick:function(){s(null)}}),React.createElement(Za,{isOpen:"autoAttach"===c,onRequestClose:function(){return s(null)},title:"Coming soon!",content:"This feature, for Pro users, will scan your WordPress install to attach your unattached files to what they belong to (for example, an image to a product). That will also allow to rename those images automatically.",onOkClick:function(){s(null)}}),React.createElement(Za,{isOpen:O,title:"Success",ok:"Close",content:O,onOkClick:function(){j(""),M.reset()}})))},kl=wp.element.render;function Rl(){Array.from(document.getElementsByClassName("mfrh-renamer-field")).forEach((function(e){var n=e.getAttribute("data-id");kl(React.createElement(ai,{natural:!0,mediaId:n}),e)}))}document.addEventListener("DOMContentLoaded",(function(e){var n,t;new MutationObserver((function(){Rl()})).observe(document.documentElement,{childList:!0,subtree:!0}),(n=document.getElementById("mfrh-admin-settings"))&&kl(React.createElement(cl,null),n),(t=document.getElementById("mfrh-media-rename"))&&kl(React.createElement(wl,null),t),Rl()}))}});
2
  //# sourceMappingURL=index.js.map
classes/admin.php CHANGED
@@ -51,6 +51,7 @@ class Meow_MFRH_Admin extends MeowCommon_Admin {
51
  'domain' => MFRH_DOMAIN,
52
  'is_pro' => class_exists( 'MeowPro_MFRH_Core' ),
53
  'is_registered' => !!$this->is_registered(),
 
54
  ], $this->get_all_options() ) );
55
  }
56
 
51
  'domain' => MFRH_DOMAIN,
52
  'is_pro' => class_exists( 'MeowPro_MFRH_Core' ),
53
  'is_registered' => !!$this->is_registered(),
54
+ 'rest_nonce' => wp_create_nonce( 'wp_rest' ),
55
  ], $this->get_all_options() ) );
56
  }
57
 
classes/core.php CHANGED
@@ -41,8 +41,6 @@ class Meow_MFRH_Core {
41
  // Side-updates should be ran for CLI and REST
42
  if ( is_admin() || $this->is_rest || $this->is_cli ) {
43
  new Meow_MFRH_Updates( $this );
44
- // if ( $this->method === 'product_title' && class_exists( 'WooCommerce' ) )
45
- // require_once( 'plugins/woocommerce.php' );
46
  }
47
 
48
  // Admin screens
@@ -195,7 +193,6 @@ SQL;
195
  }
196
  break;
197
  case 'post_title':
198
- case 'product_title':
199
  if ( !isset( $_POST['post_id'] ) || $_POST['post_id'] < 1 ) break;
200
  $post = get_post( $_POST['post_id'] );
201
  if ( !empty( $post ) && !empty( $post->post_title ) ) {
@@ -752,14 +749,14 @@ SQL;
752
  if ( empty( $original_filename ) ) {
753
  return true;
754
  }
755
- $res = $this->rename( $mediaId, $original_filename );
756
  if (!!$res) {
757
  delete_post_meta( $mediaId, '_original_filename' );
758
  }
759
  return $res;
760
  }
761
 
762
- function rename( $media, $manual_filename = null, $fromMediaLibrary = true ) {
763
  $id = null;
764
  $post = null;
765
 
@@ -1020,7 +1017,7 @@ SQL;
1020
  $_REQUEST['_wp_original_http_referer'] = get_permalink( $id );
1021
  }
1022
 
1023
- do_action( 'mfrh_media_renamed', $post, $old_filepath, $new_filepath );
1024
  return $post;
1025
  }
1026
 
41
  // Side-updates should be ran for CLI and REST
42
  if ( is_admin() || $this->is_rest || $this->is_cli ) {
43
  new Meow_MFRH_Updates( $this );
 
 
44
  }
45
 
46
  // Admin screens
193
  }
194
  break;
195
  case 'post_title':
 
196
  if ( !isset( $_POST['post_id'] ) || $_POST['post_id'] < 1 ) break;
197
  $post = get_post( $_POST['post_id'] );
198
  if ( !empty( $post ) && !empty( $post->post_title ) ) {
749
  if ( empty( $original_filename ) ) {
750
  return true;
751
  }
752
+ $res = $this->rename( $mediaId, $original_filename, true );
753
  if (!!$res) {
754
  delete_post_meta( $mediaId, '_original_filename' );
755
  }
756
  return $res;
757
  }
758
 
759
+ function rename( $media, $manual_filename = null, $undo = false ) {
760
  $id = null;
761
  $post = null;
762
 
1017
  $_REQUEST['_wp_original_http_referer'] = get_permalink( $id );
1018
  }
1019
 
1020
+ do_action( 'mfrh_media_renamed', $post, $old_filepath, $new_filepath, $undo );
1021
  return $post;
1022
  }
1023
 
classes/rest.php CHANGED
@@ -147,7 +147,6 @@ class Meow_MFRH_Rest
147
  AND post_status='inherit'
148
  AND pm.meta_value IS NULL"
149
  );
150
- error_log(print_r( $ids, 1 ));
151
  }
152
  else {
153
  $ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts p
147
  AND post_status='inherit'
148
  AND pm.meta_value IS NULL"
149
  );
 
150
  }
151
  else {
152
  $ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts p
common/admin.php CHANGED
@@ -5,7 +5,7 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
5
  class MeowCommon_Admin {
6
 
7
  public static $loaded = false;
8
- public static $admin_version = "3.0";
9
 
10
  public $prefix; // prefix used for actions, filters (mfrh)
11
  public $mainfile; // plugin main file (media-file-renamer.php)
@@ -24,9 +24,6 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
24
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
25
  }
26
  }
27
- if ( MeowCommon_Helpers::is_rest() ) {
28
- new MeowCommon_Classes_Rest( $this );
29
- }
30
  MeowCommon_Admin::$loaded = true;
31
  }
32
 
@@ -55,13 +52,15 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
55
  $pathName = basename( $path['dirname'] );
56
  $thisPath = pathinfo( $this->mainfile );
57
  $thisPathName = basename( $thisPath['dirname'] );
 
58
  if ( strpos( $pathName, $thisPathName ) !== false ) {
59
  $new_links = array(
60
  'settings' =>
61
  sprintf( __( '<a href="admin.php?page=%s_settings">Settings</a>', $this->domain ), $this->prefix ),
62
  'license' =>
63
- $this->is_registered() ? '<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>' :
64
- sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>',
 
65
  );
66
  $links = array_merge( $new_links, $links );
67
  }
@@ -148,26 +147,31 @@ if ( !class_exists( 'MeowCommon_Admin' ) ) {
148
  $errorpath = ini_get( 'error_log' );
149
  $output_lines = array();
150
  if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
151
- $file = new SplFileObject( $errorpath, 'r' );
152
- $file->seek( PHP_INT_MAX );
153
- $last_line = $file->key();
154
- $iterator = new LimitIterator( $file, $last_line > 500 ? $last_line - 500 : 0, $last_line );
155
- $lines = iterator_to_array( $iterator );
156
- foreach ( $lines as $line ) {
157
- $newline = '';
158
- if ( preg_match( '/PHP Fatal/', $line ) ) {
159
- $newline = '<div class="fatal">' . $line . '</div>';
160
- }
161
- else if ( preg_match( '/PHP Warning/', $line ) ) {
162
- $newline = '<div class="warning">' . $line . '</div>';
163
- }
164
- else if ( preg_match( '/PHP Notice/', $line ) ) {
165
- $newline = '<div class="notice">' . $line . '</div>';
 
 
 
 
 
 
166
  }
167
- else {
168
- continue;
169
- }
170
- array_push( $output_lines, $newline );
171
  }
172
  }
173
  if ( empty( $output_lines ) ) {
5
  class MeowCommon_Admin {
6
 
7
  public static $loaded = false;
8
+ public static $admin_version = "3.1";
9
 
10
  public $prefix; // prefix used for actions, filters (mfrh)
11
  public $mainfile; // plugin main file (media-file-renamer.php)
24
  add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
25
  }
26
  }
 
 
 
27
  MeowCommon_Admin::$loaded = true;
28
  }
29
 
52
  $pathName = basename( $path['dirname'] );
53
  $thisPath = pathinfo( $this->mainfile );
54
  $thisPathName = basename( $thisPath['dirname'] );
55
+ $isIssue = $this->isPro && !$this->is_registered();
56
  if ( strpos( $pathName, $thisPathName ) !== false ) {
57
  $new_links = array(
58
  'settings' =>
59
  sprintf( __( '<a href="admin.php?page=%s_settings">Settings</a>', $this->domain ), $this->prefix ),
60
  'license' =>
61
+ $this->is_registered() ?
62
+ ('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
63
+ ( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') ),
64
  );
65
  $links = array_merge( $new_links, $links );
66
  }
147
  $errorpath = ini_get( 'error_log' );
148
  $output_lines = array();
149
  if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
150
+ try {
151
+ $file = new SplFileObject( $errorpath, 'r' );
152
+ $file->seek( PHP_INT_MAX );
153
+ $last_line = $file->key();
154
+ $iterator = new LimitIterator( $file, $last_line > 500 ? $last_line - 500 : 0, $last_line );
155
+ $lines = iterator_to_array( $iterator );
156
+ foreach ( $lines as $line ) {
157
+ $newline = '';
158
+ if ( preg_match( '/PHP Fatal/', $line ) ) {
159
+ $newline = '<div class="fatal">' . $line . '</div>';
160
+ }
161
+ else if ( preg_match( '/PHP Warning/', $line ) ) {
162
+ $newline = '<div class="warning">' . $line . '</div>';
163
+ }
164
+ else if ( preg_match( '/PHP Notice/', $line ) ) {
165
+ $newline = '<div class="notice">' . $line . '</div>';
166
+ }
167
+ else {
168
+ continue;
169
+ }
170
+ array_push( $output_lines, $newline );
171
  }
172
+ }
173
+ catch ( OutOfBoundsException $e ) {
174
+ error_log( $e->getMessage() );
 
175
  }
176
  }
177
  if ( empty( $output_lines ) ) {
common/classes/rest.php CHANGED
@@ -2,14 +2,22 @@
2
 
3
  class MeowCommon_Classes_Rest
4
  {
5
- private $namespace = null;
 
6
 
7
- public function __construct( &$admin ) {
8
- $this->admin = $admin;
9
- $this->namespace = "meow-common/v1";
 
10
  if ( !current_user_can( 'administrator' ) ) {
11
  return;
12
  }
 
 
 
 
 
 
13
  add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
14
  }
15
 
2
 
3
  class MeowCommon_Classes_Rest
4
  {
5
+ private $namespace = "meow-common/v1";
6
+ static public $instance = null;
7
 
8
+ static public function init_once() {
9
+ if ( !function_exists( 'wp_get_current_user' ) ) {
10
+ return;
11
+ }
12
  if ( !current_user_can( 'administrator' ) ) {
13
  return;
14
  }
15
+ if ( !MeowCommon_Classes_Rest::$instance ) {
16
+ MeowCommon_Classes_Rest::$instance = new self();
17
+ }
18
+ }
19
+
20
+ private function __construct() {
21
  add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
22
  }
23
 
common/helpers.php CHANGED
@@ -20,37 +20,43 @@ if ( !class_exists( 'MeowCommon_Helpers' ) ) {
20
  return !empty( $_GET['wc-ajax'] );
21
  }
22
 
23
- /**
24
- * Checks if the current request is a WP REST API request.
25
- *
26
- * Case #1: After WP_REST_Request initialisation
27
- * Case #2: Support "plain" permalink settings
28
- * Case #3: It can happen that WP_Rewrite is not yet initialized,
29
- * so do this (wp-settings.php)
30
- * Case #4: URL Path begins with wp-json/ (your REST prefix)
31
- * Also supports WP installations in subfolders
32
- *
33
- * @returns boolean
34
- * @author matzeeable
35
- */
36
-
37
  static function is_rest() {
38
- $prefix = rest_get_url_prefix( );
39
- if ( defined('REST_REQUEST') && REST_REQUEST || isset( $_GET['rest_route'] ) // (#2)
40
- && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0)
41
- return true;
42
- // (#3)
 
 
 
 
 
 
 
 
 
 
 
 
43
  global $wp_rewrite;
44
- if ($wp_rewrite === null) $wp_rewrite = new WP_Rewrite();
45
-
46
- // (#4)
47
- $rest_url = wp_parse_url( trailingslashit( rest_url( ) ) );
48
- $current_url = wp_parse_url( add_query_arg( array( ) ) );
49
  if ( !$rest_url || !$current_url )
50
  return false;
 
 
51
  if ( !empty( $current_url['path'] ) && !empty( $rest_url['path'] ) ) {
52
- return strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
 
 
 
 
53
  }
 
54
  return false;
55
  }
56
 
20
  return !empty( $_GET['wc-ajax'] );
21
  }
22
 
23
+ // Originally created by matzeeable, modified by jordymeow
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  static function is_rest() {
25
+
26
+ // WP_REST_Request init.
27
+ $is_rest_request = defined('REST_REQUEST') && REST_REQUEST;
28
+ if ( $is_rest_request ) {
29
+ MeowCommon_Classes_Rest::init_once();
30
+ return true;
31
+ }
32
+
33
+ // Plain permalinks.
34
+ $prefix = rest_get_url_prefix();
35
+ $request_contains_rest = isset( $_GET['rest_route'] ) && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0;
36
+ if ( $request_contains_rest) {
37
+ MeowCommon_Classes_Rest::init_once();
38
+ return true;
39
+ }
40
+
41
+ // It can happen that WP_Rewrite is not yet initialized, so better to do it.
42
  global $wp_rewrite;
43
+ if ( $wp_rewrite === null ) {
44
+ $wp_rewrite = new WP_Rewrite();
45
+ }
46
+ $rest_url = wp_parse_url( trailingslashit( rest_url() ) );
47
+ $current_url = wp_parse_url( add_query_arg( array() ) );
48
  if ( !$rest_url || !$current_url )
49
  return false;
50
+
51
+ // URL Path begins with wp-json.
52
  if ( !empty( $current_url['path'] ) && !empty( $rest_url['path'] ) ) {
53
+ $request_contains_rest = strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
54
+ if ( $request_contains_rest) {
55
+ MeowCommon_Classes_Rest::init_once();
56
+ return true;
57
+ }
58
  }
59
+
60
  return false;
61
  }
62
 
media-file-renamer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Media File Renamer
4
  Plugin URI: https://meowapps.com
5
  Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
6
- Version: 5.0.7
7
  Author: Jordy Meow
8
  Author URI: https://meowapps.com
9
  Text Domain: media-file-renamer
@@ -14,7 +14,7 @@ Originally developed for two of my websites:
14
  - Haikyo (https://haikyo.org)
15
  */
16
 
17
- define( 'MFRH_VERSION', '5.0.7' );
18
  define( 'MFRH_PREFIX', 'mfrh' );
19
  define( 'MFRH_DOMAIN', 'media-file-renamer' );
20
  define( 'MFRH_ENTRY', __FILE__ );
3
  Plugin Name: Media File Renamer
4
  Plugin URI: https://meowapps.com
5
  Description: Renames your media files for better SEO and a nicer filesystem (automatically or manually).
6
+ Version: 5.0.8
7
  Author: Jordy Meow
8
  Author URI: https://meowapps.com
9
  Text Domain: media-file-renamer
14
  - Haikyo (https://haikyo.org)
15
  */
16
 
17
+ define( 'MFRH_VERSION', '5.0.8' );
18
  define( 'MFRH_PREFIX', 'mfrh' );
19
  define( 'MFRH_DOMAIN', 'media-file-renamer' );
20
  define( 'MFRH_ENTRY', __FILE__ );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a95
5
  Requires at least: 4.8
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.0.7
9
 
10
  Renames your media files for better SEO and a nicer filesystem (automatically or manually).
11
 
@@ -40,7 +40,7 @@ Renaming (or moving) files is a dangerous process. Before doing anything in bulk
40
  If your website seems broken after a few renames, try to **clear your cache**. The cached HTML is often using the old references. You can also enable the Undo feature and try to rollback to the previous filenames. If references aren't updated properly, please write a nice post (not an angry one) in the support threads :) I am trying my best to cover more and more use cases. Please have a look here: [Questions & Issues](https://meowapps.com/media-file-renamer-faq-issues/).
41
 
42
  === A SIMPLER PLUGIN ===
43
- If you only need an editable field to modify the filename, feel free to try [Phoenix Media Rename](https://wordpress.org/plugins/phoenix-media-rename). It's a much simpler plugin and the developer is also very helpful :)
44
 
45
  === FOR DEVELOPERS ===
46
  The plugin can be tweaked in many ways, there are many actions and filters available. Through them, for example, you can customize the automatic renaming to your liking. There is also a little API that you can call. More about this [here](https://meowapps.com/media-file-renamer-faq/).
@@ -66,6 +66,14 @@ The plugin can be tweaked in many ways, there are many actions and filters avail
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
 
 
 
69
  = 5.0.6 (2020/09/08) =
70
  * Update: A check for the rename status was performed for every entry in the Media Library all at the same time, and that was causing slower performance (especially when more than 10 or 20 entries are displayed per page). It's now performed with a maximum of two concurrent requests at a time.
71
  * Note: If you like it, please review the plugin [by clicking here](https://wordpress.org/support/plugin/media-file-renamer/reviews/?rate=5#new-post). It's important for us :) Thank you!
5
  Requires at least: 4.8
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.0.8
9
 
10
  Renames your media files for better SEO and a nicer filesystem (automatically or manually).
11
 
40
  If your website seems broken after a few renames, try to **clear your cache**. The cached HTML is often using the old references. You can also enable the Undo feature and try to rollback to the previous filenames. If references aren't updated properly, please write a nice post (not an angry one) in the support threads :) I am trying my best to cover more and more use cases. Please have a look here: [Questions & Issues](https://meowapps.com/media-file-renamer-faq-issues/).
41
 
42
  === A SIMPLER PLUGIN ===
43
+ If you only need an editable field in order to modify the filename, please try [Phoenix Media Rename](https://wordpress.org/plugins/phoenix-media-rename). It's simpler, and just does that. And yes, we are friends and we collaborate! :)
44
 
45
  === FOR DEVELOPERS ===
46
  The plugin can be tweaked in many ways, there are many actions and filters available. Through them, for example, you can customize the automatic renaming to your liking. There is also a little API that you can call. More about this [here](https://meowapps.com/media-file-renamer-faq/).
66
 
67
  == Changelog ==
68
 
69
+ = 5.0.8 (2020/09/26) =
70
+ * Fix: Two options were not working very logically.
71
+ * Fix: Avoid errors when the PHP Error Logs is too big.
72
+ * Update: Use Nonce for Rest API.
73
+
74
+ = 5.0.7 (2020/09/08) =
75
+ * Fix: Incompatibility with WordPress 4.8.
76
+
77
  = 5.0.6 (2020/09/08) =
78
  * Update: A check for the rename status was performed for every entry in the Media Library all at the same time, and that was causing slower performance (especially when more than 10 or 20 entries are displayed per page). It's now performed with a maximum of two concurrent requests at a time.
79
  * Note: If you like it, please review the plugin [by clicking here](https://wordpress.org/support/plugin/media-file-renamer/reviews/?rate=5#new-post). It's important for us :) Thank you!