| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/file-manager-advanced/application/assets/dist/ |
Upload File : |
/*! For license information please see 886.fd01a26a.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[886],{3886(e,t,a){a.r(t),a.d(t,{default:()=>x});var n=a(6540),i=a(7850),s=a(5688),l=a(4848);function o(e){return o="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},o(e)}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function c(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach(function(t){d(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function d(e,t,a){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=o(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function u(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(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 m(){var e,t,a="function"==typeof Symbol?Symbol:{},n=a.iterator||"@@iterator",i=a.toStringTag||"@@toStringTag";function s(a,n,i,s){var r=n&&n.prototype instanceof o?n:o,c=Object.create(r.prototype);return f(c,"_invoke",function(a,n,i){var s,o,r,c=0,d=i||[],u=!1,m={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,a){return s=t,o=0,r=e,m.n=a,l}};function f(a,n){for(o=a,r=n,t=0;!u&&c&&!i&&t<d.length;t++){var i,s=d[t],f=m.p,h=s[2];a>3?(i=h===n)&&(r=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=f&&((i=a<2&&f<s[1])?(o=0,m.v=n,m.n=s[1]):f<h&&(i=a<3||s[0]>n||n>h)&&(s[4]=a,s[5]=n,m.n=h,o=0))}if(i||a>1)return l;throw u=!0,n}return function(i,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,h),o=d,r=h;(t=o<2?e:r)||!u;){s||(o?o<3?(o>1&&(m.n=-1),f(o,r)):m.n=r:m.v=r);try{if(c=2,s){if(o||(i="next"),t=s[i]){if(!(t=t.call(s,r)))throw TypeError("iterator result is not an object");if(!t.done)return t;r=t.value,o<2&&(o=0)}else 1===o&&(t=s.return)&&t.call(s),o<2&&(r=TypeError("The iterator does not provide a '"+i+"' method"),o=1);s=e}else if((t=(u=m.n<0)?r:a.call(n,m))!==l)break}catch(t){s=e,o=1,r=t}finally{c=1}}return{value:t,done:u}}}(a,i,s),!0),c}var l={};function o(){}function r(){}function c(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(f(t={},n,function(){return this}),t),u=c.prototype=o.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,f(e,i,"GeneratorFunction")),e.prototype=Object.create(u),e}return r.prototype=c,f(u,"constructor",c),f(c,"constructor",r),r.displayName="GeneratorFunction",f(c,i,"GeneratorFunction"),f(u),f(u,i,"Generator"),f(u,n,function(){return this}),f(u,"toString",function(){return"[object Generator]"}),(m=function(){return{w:s,m:h}})()}function f(e,t,a,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}f=function(e,t,a,n){function s(t,a){f(e,t,function(e){return this._invoke(t,a,e)})}t?i?i(e,t,{value:a,enumerable:!n,configurable:!n,writable:!n}):e[t]=a:(s("next",0),s("throw",1),s("return",2))},f(e,t,a,n)}function h(e,t,a,n,i,s,l){try{var o=e[s](l),r=o.value}catch(e){return void a(e)}o.done?t(r):Promise.resolve(r).then(n,i)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,s,l,o=[],r=!0,c=!1;try{if(s=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;r=!1}else for(;!(r=(n=s.call(a)).done)&&(o.push(n.value),o.length!==t);r=!0);}catch(e){c=!0,i=e}finally{try{if(!r&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||g(e,t)||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 g(e,t){if(e){if("string"==typeof e)return _(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function v(e){var t,a;return((null===(t=window.afmReact)||void 0===t?void 0:t.pluginUrl)||(null===(a=window.afm_object)||void 0===a?void 0:a.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/shell/"+e}function b(){return(0,l.jsx)("img",{className:"afm-select__chevron",src:v("icon-chevron.svg"),alt:"",width:8,height:5})}function x(){var e,t,a,o,r,d,f=(0,s.lA)(),g=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(t=window.afmReact)||void 0===t?void 0:t.nonce)||"",_=p((0,n.useState)(null),2),x=_[0],y=_[1],w=p((0,n.useState)(!0),2),j=w[0],N=w[1],k=p((0,n.useState)(!1),2),S=k[0],O=k[1],A=p((0,n.useState)(null),2),C=A[0],F=A[1],P=p((0,n.useState)("general"),2),I=(P[0],P[1],p((0,n.useState)("general-settings"),2)),E=I[0],D=I[1],T=p((0,n.useState)({}),2),R=T[0],M=T[1],z=p((0,n.useState)(""),2),U=z[0],W=z[1],K=p((0,n.useState)(""),2),G=K[0],L=K[1],B=p((0,n.useState)(!1),2),H=B[0],Q=B[1],V=p((0,n.useState)(!1),2),q=V[0],$=V[1],J=p((0,n.useState)(!1),2),X=J[0],Y=J[1],Z=p((0,n.useState)(!1),2),ee=Z[0],te=Z[1],ae=p((0,n.useState)(["administrator"]),2),ne=ae[0],ie=ae[1],se=p((0,n.useState)({}),2),le=se[0],oe=se[1],re=(null===(a=window.afmReact)||void 0===a?void 0:a.hasPro)||!1,ce=(null===(o=window.afmReact)||void 0===o?void 0:o.currentPlan)||"free",de=(null===(r=window.afmReact)||void 0===r||r.pricingUrl,(0,i.w)("advance_themes",ce,re)),ue=(0,i.w)("code_editor_themes",ce,re);(0,n.useLayoutEffect)(function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){sessionStorage.setItem("afm-settings-hash-just-set","true");var t=sessionStorage.getItem("afm-settings-subtab"),a="general-settings";if("general-settings"===t||"advanced-settings"===t)a=t;else if(e.startsWith("settings/")){var n=e.split("/");if(n.length>1){var i=n[1].split("?")[0];"general-settings"!==i&&"advanced-settings"!==i||(a=i,sessionStorage.setItem("afm-settings-subtab",i))}}D(a);var s="#/settings/".concat(a);if(window.location.hash!==s)if(window.history&&window.history.replaceState){var l=window.location.href.split("#")[0]+s;window.history.replaceState(null,"",l),window.location.hash=s}else window.location.hash=s;sessionStorage.setItem("afm-settings-subtab",a),setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}},[]),(0,n.useEffect)(function(){E&&sessionStorage.setItem("afm-settings-subtab",E)},[E]),(0,n.useEffect)(function(){var e=function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){if(e.startsWith("settings/")){var t=e.split("/");if(t.length>1){var a=t[1].split("?")[0];if("general-settings"===a||"advanced-settings"===a)return sessionStorage.setItem("afm-settings-subtab",a),void D(function(e){return e!==a?a:e})}}if("settings"===e){var n=sessionStorage.getItem("afm-settings-subtab")||"general-settings",i="general-settings"===n||"advanced-settings"===n?n:"general-settings";sessionStorage.setItem("afm-settings-hash-just-set","true");var s="#/settings/".concat(i);if(window.history&&window.history.replaceState){var l=window.location.href.split("#")[0]+s;window.history.replaceState(null,"",l)}else window.location.hash=s;D(function(e){return e!==i?i:e}),setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}}};return window.addEventListener("hashchange",e),(window.location.hash||"").replace(/^#/,"").replace(/^\//,"").startsWith("settings")&&e(),function(){window.removeEventListener("hashchange",e)}},[]);var me=n.useRef(!0);(0,n.useEffect)(function(){if(me.current){me.current=!1;var e=window.location.hash.replace(/^#/,"").replace(/^\//,"");if(e!=="settings/".concat(E)&&!e.startsWith("settings/")){sessionStorage.setItem("afm-settings-hash-just-set","true");var t="#/settings/".concat(E);if(window.history&&window.history.replaceState){var a=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",a),window.location.hash=t}else window.location.hash=t;setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}}else{sessionStorage.setItem("afm-settings-hash-just-set","true");var n="#/settings/".concat(E);if(window.location.hash!==n)if(window.history&&window.history.replaceState){var i=window.location.href.split("#")[0]+n;window.history.replaceState(null,"",i),window.location.hash=n}else window.location.hash=n;setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}},[E]),(0,n.useEffect)(function(){f&&g?setTimeout(function(){Promise.all([fetch("".concat(f,"file-manager-advanced/v1/settings"),{credentials:"same-origin",headers:{"X-WP-Nonce":g}}),fetch("".concat(f,"file-manager-advanced/v1/integrations-status"),{credentials:"same-origin",headers:{"X-WP-Nonce":g}}).catch(function(){return null})]).then(function(){var e,t=(e=m().m(function e(t){var a,n,i,s,l;return m().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=p(t,2),n=a[0],i=a[1],n&&n.ok){e.n=1;break}throw new Error("Failed to fetch settings");case 1:return e.n=2,n.json();case 2:if(s=e.v,l=null,!i||!i.ok){e.n=6;break}return e.p=3,e.n=4,i.json();case 4:l=e.v,e.n=6;break;case 5:e.p=5,e.v,l=null;case 6:return e.a(2,[s,l])}},e,null,[[3,5]])}),function(){var t=this,a=arguments;return new Promise(function(n,i){var s=e.apply(t,a);function l(e){h(s,n,i,l,o,"next",e)}function o(e){h(s,n,i,l,o,"throw",e)}l(void 0)})});return function(e){return t.apply(this,arguments)}}()).then(function(e){var t=p(e,2),a=t[0],n=t[1];if(y(a),n&&n.connected&&oe(n.connected),a&&a.settings){var i=a.settings;M({fma_debug_enabled:i.fma_debug_enabled||"0",fma_theme:i.fma_theme||"light",fma_locale:i.fma_locale||"en",fma_cm_theme:i.fma_cm_theme||"default"});var s=Array.isArray(i.fma_user_roles)&&i.fma_user_roles.length?u(i.fma_user_roles):["administrator"];s.includes("administrator")||s.unshift("administrator"),ie(s);var l=void 0!==a.public_path_suffix?a.public_path_suffix:i.public_path||"",o=a.public_url||i.public_url||a.url||"";W(l),L(o)}N(!1)}).catch(function(e){console.error("AFM Settings fetch error:",e),N(!1)})},100):console.warn("AFM Settings: Missing API root or nonce")},[f,g]);var fe=function(e){if(e.preventDefault(),x&&!S){O(!0),F(null);var t={},a=Array.isArray(ne)&&ne.length?Array.from(new Set(["administrator"].concat(u(ne)))):["administrator"];if(t.fma_user_role=a,["fma_theme","fma_locale","public_path","public_url","upload_max_size","fma_upload_allow","fma_cm_theme"].forEach(function(a){var n=e.target.querySelector('input[name="'.concat(a,'"], select[name="').concat(a,'"], textarea[name="').concat(a,'"]'));n&&(t[a]=n.value||"")}),["hide_path","enable_trash","enable_htaccess","fma_debug_enabled","display_dot_files"].forEach(function(a){if("fma_debug_enabled"===a&&R.hasOwnProperty("fma_debug_enabled"))t[a]="1"===R.fma_debug_enabled||!0===R.fma_debug_enabled?"1":"0",console.log("AFM Debug: Using formValues for fma_debug_enabled:",t[a],"formValues:",R.fma_debug_enabled);else if(R.hasOwnProperty(a))t[a]="1"===R[a]||!0===R[a]?"1":"0";else{var n=e.target.querySelector('input[name="'.concat(a,'"]'));n&&(t[a]=n.checked?"1":"0","fma_debug_enabled"===a&&console.log("AFM Debug: Using DOM for fma_debug_enabled:",t[a],"checked:",n.checked))}}),"advanced-settings"===E){var n=[];e.target.querySelectorAll('input[name="display_ui_options[]"]:checked').forEach(function(e){n.push(e.value)}),t.display_ui_options=n}if("general-settings"===E){var i=[];e.target.querySelectorAll('input[name="blocked_integrations[]"]:checked').forEach(function(e){i.push(e.value)}),t.blocked_integrations=i}console.log("AFM Settings: Submitting data:",t),fetch("".concat(f,"file-manager-advanced/v1/settings"),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":g,"Content-Type":"application/json"},body:JSON.stringify(t)}).then(function(e){return e.json()}).then(function(e){if(O(!1),console.log("AFM Settings: Save response:",e),e.success){var t,a,n,i,s,l,o,r,d,m,f,h;F({type:"success",text:e.message||"Settings saved successfully."});var p=(null==x||null===(t=x.settings)||void 0===t?void 0:t.display_ui_options)||[],g=(null===(a=e.settings)||void 0===a?void 0:a.display_ui_options)||[],_=(null==x||null===(n=x.settings)||void 0===n?void 0:n.fma_locale)||R.fma_locale||"en",v=(null===(i=e.settings)||void 0===i?void 0:i.fma_locale)||_,b=JSON.stringify(u(p).sort())!==JSON.stringify(u(g).sort()),w=_!==v,j=((null==x||null===(s=x.settings)||void 0===s?void 0:s.fma_cm_theme)||"default")!==((null===(l=e.settings)||void 0===l?void 0:l.fma_cm_theme)||"default"),N=((null==x||null===(o=x.settings)||void 0===o?void 0:o.fma_theme)||"light")!==((null===(r=e.settings)||void 0===r?void 0:r.fma_theme)||"light"),k=String(null!==(d=null==x||null===(m=x.settings)||void 0===m?void 0:m.fma_debug_enabled)&&void 0!==d?d:"0"),S=String(null!==(f=null===(h=e.settings)||void 0===h?void 0:h.fma_debug_enabled)&&void 0!==f?f:"0"),A=b||j||N||k!==S;y(function(t){var a;return c(c({},t),{},{settings:e.settings,public_root_path:e.public_root_path||(null==t?void 0:t.public_root_path),public_path_suffix:void 0!==e.public_path_suffix?e.public_path_suffix:null==t?void 0:t.public_path_suffix,public_url:e.public_url||(null===(a=e.settings)||void 0===a?void 0:a.public_url)||(null==t?void 0:t.public_url),url:e.url||(null==t?void 0:t.url),site_url:e.site_url||(null==t?void 0:t.site_url)})}),void 0!==e.public_path_suffix&&W(e.public_path_suffix),e.public_url&&L(e.public_url),e.settings&&(console.log("AFM Settings: Updating formValues with saved settings:",e.settings),M(function(t){var a=c(c({},t),{},{fma_debug_enabled:void 0!==e.settings.fma_debug_enabled?String(e.settings.fma_debug_enabled):t.fma_debug_enabled||"0",fma_theme:e.settings.fma_theme||t.fma_theme||"light",fma_locale:e.settings.fma_locale||t.fma_locale||"en",fma_cm_theme:e.settings.fma_cm_theme||t.fma_cm_theme||"default",upload_max_size:e.settings.upload_max_size||"0",fma_upload_allow:e.settings.fma_upload_allow||"all"});return console.log("AFM Settings: Updated formValues:",a),a}),(A||"advanced-settings"===E)&&(sessionStorage.setItem("afm_force_fm_reinit","true"),sessionStorage.removeItem("afm_ui_options_changed")),w&&(sessionStorage.setItem("afm_locale_changed","true"),(window.location.hash||"").includes("filemanager")&&window.dispatchEvent(new CustomEvent("afm-settings-changed",{detail:{type:"locale"}}))))}else F({type:"error",text:e.message||"Failed to save settings."});setTimeout(function(){return F(null)},5e3)}).catch(function(e){console.error("AFM Settings save error:",e),O(!1),F({type:"error",text:"Failed to save settings. Please try again."}),setTimeout(function(){return F(null)},5e3)})}};if(j)return(0,l.jsxs)("div",{className:"afm-settings-shell",children:[(0,l.jsxs)("div",{className:"afm-settings-subnav","aria-hidden":"true",children:[(0,l.jsx)("span",{className:"afm-settings-subnav__tab is-active",children:"General"}),(0,l.jsx)("span",{className:"afm-settings-subnav__tab",children:"Advanced"})]}),(0,l.jsx)("div",{className:"afm-settings-body",children:(0,l.jsxs)("div",{className:"afm-settings-card",children:[(0,l.jsx)("style",{children:"\n @keyframes afm-skeleton-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n .afm-skeleton {\n background-color: #e2e8f0;\n background-image: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);\n background-size: 200% 100%;\n animation: afm-skeleton-shimmer 1.4s linear infinite;\n }\n "}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"20px",width:"260px",borderRadius:"6px",marginBottom:"16px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",maxWidth:"600px",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",maxWidth:"600px",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"180px",borderRadius:"6px",marginTop:"16px"}})]})})]});if(!x||!x.settings)return(0,l.jsx)("div",{className:"afm-settings-shell",children:(0,l.jsx)("div",{className:"afm-settings-body",children:(0,l.jsx)("div",{className:"afm-settings-card",children:(0,l.jsx)("p",{children:"Failed to load settings."})})})});var he,pe,ge,_e,ve,be=x.settings||{},xe=x.roles||{},ye=x.locales||{},we=x.themes||{},je=x.cm_themes||[],Ne=x.ui_options||[],ke=function(e){sessionStorage.setItem("afm-settings-hash-just-set","true"),D(e);var t="#/settings/".concat(e);if(window.history&&window.history.replaceState){var a=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",a)}window.location.hash=t,setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)};return(0,l.jsxs)("div",{className:"afm-settings-shell",children:[(0,l.jsxs)("nav",{className:"afm-settings-subnav","aria-label":"Settings sections",children:[(0,l.jsx)("a",{href:"#/settings/general-settings",onClick:function(e){e.preventDefault(),ke("general-settings")},className:"afm-settings-subnav__tab".concat("general-settings"===E?" is-active":""),children:"General"}),(0,l.jsx)("a",{href:"#/settings/advanced-settings",onClick:function(e){e.preventDefault(),ke("advanced-settings")},className:"afm-settings-subnav__tab".concat("advanced-settings"===E?" is-active":""),children:"Advanced"})]}),(0,l.jsx)("div",{className:"afm-settings-body",children:(0,l.jsxs)("div",{className:"afm-settings-card",children:[C&&(0,l.jsxs)("div",{className:"afm-snackbar afm-snackbar-".concat("success"===C.type?"success":"error"),onClick:function(){return F(null)},style:{animation:"afm-slideIn 0.3s ease-out"},children:[(0,l.jsx)("span",{style:{fontSize:"14px",lineHeight:"1.5",flex:"1"},children:C.text}),(0,l.jsx)("button",{type:"button",className:"afm-snackbar-close",onClick:function(e){e.preventDefault(),e.stopPropagation(),F(null)},"aria-label":"Dismiss",children:"×"})]}),"general-settings"===E&&(0,l.jsxs)("form",{onSubmit:fe,className:"afm-stacked-form",children:[(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsx)("label",{className:"afm-field-label",children:"Who can access File Manager?"}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Select which WordPress user roles can open Advanced File Manager."})]}),(0,l.jsx)("div",{className:"afm-field-input",children:(0,l.jsxs)("div",{className:"afm-select",children:[(0,l.jsxs)("button",{type:"button",className:"afm-select__trigger",onClick:function(){te(!ee),Q(!1),$(!1),Y(!1)},"aria-expanded":ee,children:[(0,l.jsx)("span",{className:"afm-select__value",children:ne.map(function(e){return"administrator"===e?"Administrator":xe[e]&&xe[e].name||e}).join(", ")}),(0,l.jsx)(b,{})]}),ee&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return te(!1)}}),(0,l.jsxs)("div",{className:"afm-select__menu",role:"listbox",children:[(0,l.jsxs)("div",{className:"afm-select__option afm-select__option--check is-disabled",children:[(0,l.jsx)("input",{type:"checkbox",id:"afm-role-administrator",checked:!0,disabled:!0,readOnly:!0}),(0,l.jsx)("label",{htmlFor:"afm-role-administrator",children:"Administrator"})]}),Object.keys(xe).filter(function(e){return"administrator"!==e}).map(function(e){var t=-1!==ne.indexOf(e),a="afm-role-".concat(e);return(0,l.jsxs)("div",{className:"afm-select__option afm-select__option--check",role:"option",children:[(0,l.jsx)("input",{id:a,type:"checkbox",checked:t,onChange:function(t){ie(function(a){var n=new Set(a);return n.add("administrator"),t.target.checked?n.add(e):n.delete(e),Array.from(n)})}}),(0,l.jsx)("label",{htmlFor:a,children:xe[e]&&xe[e].name?xe[e].name:e})]},e)})]})]})]})})]}),(0,l.jsxs)("div",{className:"afm-form-field afm-form-field--check",children:[(0,l.jsx)("input",{type:"checkbox",id:"display_dot_files",name:"display_dot_files",value:"1",defaultChecked:"1"==be.display_dot_files}),(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"display_dot_files",children:"Hide Dot Files"}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Hide files and folders that start with a dot (.) from the file manager. Default: Disabled"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field afm-form-field--check",children:[(0,l.jsx)("input",{type:"checkbox",id:"hide_path",name:"hide_path",value:"1",defaultChecked:"1"==be.hide_path}),(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"hide_path",children:"Hide File Path in Info Dialog?"}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Hide real path of file in the Get Info dialog box. Default: Disabled"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"upload_max_size",children:"Maximum Upload Size"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsx)("input",{type:"text",id:"upload_max_size",name:"upload_max_size",className:"regular-text",value:void 0!==R.upload_max_size?R.upload_max_size:be.upload_max_size||"0",onChange:function(e){return M(function(t){return c(c({},t),{},{upload_max_size:e.target.value})})}}),(0,l.jsx)("p",{className:"afm-field-help",children:"Maximum upload file size. This size is per files. Can be set as number with unit like 10M, 500K, 1G. 0 means unlimited upload."})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"fma_upload_allow",children:"Mimetypes allowed to upload"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsx)("textarea",{id:"fma_upload_allow",name:"fma_upload_allow",className:"large-text",rows:4,value:void 0!==R.fma_upload_allow?R.fma_upload_allow:be.fma_upload_allow||"all",onChange:function(e){return M(function(t){return c(c({},t),{},{fma_upload_allow:e.target.value})})}}),(0,l.jsx)("p",{className:"afm-field-help",children:"Enter MIME types allowed to upload, multiple comma(,) separated. Example: image/vnd.adobe.photoshop,image/png"}),(0,l.jsxs)("p",{className:"afm-field-help",children:["Default: all"," ",(0,l.jsx)("a",{className:"afm-field-link",href:"https://advancedfilemanager.com/advanced-file-manager-mime-types/",target:"_blank",rel:"noopener noreferrer",children:"MIME Types Help"})]})]})]}),re&&(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsx)("label",{className:"afm-field-label",children:"Blocked Integrations"}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Select integrations to block. Blocked integrations will not appear in the file manager."})]}),(0,l.jsx)("div",{className:"afm-field-input",children:(pe=(null===(he=window.afmReact)||void 0===he?void 0:he.proImagesURL)||"",ge=be.blocked_integrations||[],_e="business"===ce,ve=_e?[{key:"onedrive",name:"OneDrive",img:pe+"onedrive.svg",dbKey:"onedrive"},{key:"googledrive",name:"Google Drive",img:pe+"googledrive.svg",dbKey:"googledrive"},{key:"googlecloud",name:"Google Cloud Storage",img:pe+"googlecloud.svg",dbKey:"googlecloud"},{key:"dropbox",name:"Dropbox",img:pe+"dropbox.svg",dbKey:"dropbox"},{key:"amazonses",name:"Amazon S3",img:pe+"amazons3.svg",dbKey:"amazonses"},{key:"pcloud",name:"pCloud",img:pe+"pcloud.svg",dbKey:"pcloud"},{key:"cloudflarer2",name:"Cloudflare R2",img:pe+"cloudflarer2.svg",dbKey:"cloudflarer2"},{key:"wasabi",name:"Wasabi",img:pe+"wasabi.svg",dbKey:"wasabi"}].filter(function(e){return le[e.dbKey]}):[],_e&&0!==ve.length?(0,l.jsx)("div",{className:"afm-integrations-grid",children:ve.map(function(e){var t=ge.includes(e.dbKey),a="afm-block-integration-".concat(e.dbKey);return(0,l.jsxs)("div",{className:"afm-integration-card".concat(t?" is-blocked":""),children:[(0,l.jsxs)("label",{className:"afm-integration-card__check",htmlFor:a,children:[(0,l.jsx)("input",{id:a,type:"checkbox",name:"blocked_integrations[]",value:e.dbKey,defaultChecked:t}),(0,l.jsxs)("span",{className:"screen-reader-text",children:["Block ",e.name]})]}),(0,l.jsx)("div",{className:"afm-integration-card__icon",children:e.img&&(0,l.jsx)("img",{src:e.img,alt:"",onError:function(e){e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"afm-integration-card__meta",children:[(0,l.jsx)("span",{className:"afm-integration-card__name",children:e.name}),(0,l.jsx)("span",{className:"afm-integration-card__status",children:t?"Blocked":"Connected"})]})]},e.key)})}):(0,l.jsx)("div",{className:"afm-integrations-empty",children:"No connected integrations found."}))})]}),(0,l.jsx)("p",{className:"submit",children:(0,l.jsx)("input",{type:"submit",name:"submit",id:"submit",className:"button button-primary afm-teal-button",value:S?"Saving...":"Save Changes",disabled:S})})]}),"advanced-settings"===E&&(0,l.jsxs)("form",{onSubmit:fe,className:"afm-stacked-form",children:[(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"fma_theme",children:"Theme"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsxs)("div",{className:"afm-select",children:[(0,l.jsxs)("button",{type:"button",className:"afm-select__trigger",onClick:function(){Q(!H),$(!1),Y(!1),te(!1)},"aria-expanded":H,children:[(0,l.jsx)("span",{className:"afm-select__value",children:(null===(d=we[R.fma_theme||be.fma_theme||"light"])||void 0===d?void 0:d.title)||"Light"}),(0,l.jsx)(b,{})]}),H&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return Q(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:Object.keys(we).map(function(e){var t=we[e],a=t.pro&&!x.has_pro,n=t.pro&&x.has_pro&&!de,i=a||n,s=(R.fma_theme||be.fma_theme||"light")===e;return(0,l.jsxs)("div",{className:"afm-select__option".concat(s?" is-selected":"").concat(i?" is-disabled":""),onClick:function(t){if(t.stopPropagation(),i){var a;Q(!1);var n=(null===(a=window.afmReact)||void 0===a?void 0:a.pricingUrl)||"https://advancedfilemanager.com/pricing/";if("function"==typeof window.file_manager_advanced_popup)window.file_manager_advanced_popup(n);else if(void 0!==window.jQuery&&window.jQuery){var s=(0,window.jQuery)("<a>",{class:"on-click-show-popup","fma-href":n,style:"display: none;"}).appendTo("body");s.trigger("click"),setTimeout(function(){s.remove()},100)}else window.open(n,"_blank")}else M(function(t){return c(c({},t),{},{fma_theme:e})}),Q(!1)},children:[(0,l.jsx)("span",{children:t.title}),i&&(0,l.jsx)("img",{src:v("icon-crown.svg"),alt:"",width:16,height:16})]},e)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_theme",value:R.fma_theme||be.fma_theme||"light"})]}),(0,l.jsx)("p",{className:"afm-field-help",children:"Select file manager advanced theme. Default: Light"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"fma_locale",children:"Language"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsxs)("div",{className:"afm-select",children:[(0,l.jsxs)("button",{type:"button",className:"afm-select__trigger",onClick:function(){$(!q),Q(!1),Y(!1),te(!1)},"aria-expanded":q,children:[(0,l.jsx)("span",{className:"afm-select__value",children:Object.keys(ye).find(function(e){return ye[e]===(R.fma_locale||be.fma_locale||"en")})||"en (English)"}),(0,l.jsx)(b,{})]}),q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return $(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:Object.keys(ye).map(function(e){var t=ye[e],a=(R.fma_locale||be.fma_locale||"en")===t;return(0,l.jsx)("div",{className:"afm-select__option".concat(a?" is-selected":""),onClick:function(e){e.stopPropagation(),M(function(e){return c(c({},e),{},{fma_locale:t})}),$(!1)},children:(0,l.jsx)("span",{children:e})},e)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_locale",value:R.fma_locale||be.fma_locale||"en"})]}),(0,l.jsx)("p",{className:"afm-field-help",children:"Select file manager advanced language. Default: en (English)"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",children:"View Type"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsx)("div",{className:"afm-view-type-grid",children:Ne.map(function(e){var t=void 0===be.display_ui_options||null===be.display_ui_options||be.display_ui_options.length>0&&-1!==be.display_ui_options.indexOf(e),a="afm-view-type-".concat(e.replace(/[^a-z0-9_-]/gi,"-"));return(0,l.jsxs)("div",{className:"afm-view-type-grid__item",children:[(0,l.jsx)("input",{id:a,type:"checkbox",name:"display_ui_options[]",value:e,defaultChecked:t}),(0,l.jsx)("label",{htmlFor:a,children:e})]},e)})}),(0,l.jsx)("p",{className:"afm-field-help afm-field-help--md",children:"You can control the view of file manager. By default, all options are checked."})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"fma_cm_theme",children:"Code Editor Theme"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsxs)("div",{className:"afm-select",children:[(0,l.jsxs)("button",{type:"button",className:"afm-select__trigger",onClick:function(){Y(!X),Q(!1),$(!1),te(!1)},"aria-expanded":X,children:[(0,l.jsx)("span",{className:"afm-select__value",children:R.fma_cm_theme||be.fma_cm_theme||"default"}),(0,l.jsx)(b,{})]}),X&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return Y(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:je.map(function(e){var t=e.pro&&!x.has_pro,a=e.pro&&x.has_pro&&!ue,n=t||a,i=(R.fma_cm_theme||be.fma_cm_theme||"default")===e.title;return(0,l.jsxs)("div",{className:"afm-select__option".concat(i?" is-selected":"").concat(n?" is-disabled":""),onClick:function(t){if(t.stopPropagation(),n){var a;Y(!1);var i=(null===(a=window.afmReact)||void 0===a?void 0:a.pricingUrl)||"https://advancedfilemanager.com/pricing/";if("function"==typeof window.file_manager_advanced_popup)window.file_manager_advanced_popup(i);else if(void 0!==window.jQuery&&window.jQuery){var s=(0,window.jQuery)("<a>",{class:"on-click-show-popup","fma-href":i,style:"display: none;"}).appendTo("body");s.trigger("click"),setTimeout(function(){s.remove()},100)}else window.open(i,"_blank")}else M(function(t){return c(c({},t),{},{fma_cm_theme:e.title})}),Y(!1)},children:[(0,l.jsx)("span",{children:e.title}),n&&(0,l.jsx)("img",{src:v("icon-crown.svg"),alt:"",width:16,height:16})]},e.title)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_cm_theme",value:R.fma_cm_theme||be.fma_cm_theme||"default"})]}),(0,l.jsx)("p",{className:"afm-field-help",children:"Select code editor theme. Default: default"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field afm-form-field--check",children:[(0,l.jsx)("input",{type:"checkbox",id:"fma_debug_enabled",name:"fma_debug_enabled",value:"1",checked:"1"===R.fma_debug_enabled||!0===R.fma_debug_enabled||void 0===R.fma_debug_enabled&&"1"==be.fma_debug_enabled,onChange:function(e){var t=e.target.checked?"1":"0";M(function(e){return c(c({},e),{},{fma_debug_enabled:t})})}}),(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsxs)("label",{className:"afm-field-label",htmlFor:"fma_debug_enabled",children:["Debug in Code Editor ",(0,l.jsx)("sup",{className:"afm-field-new",children:"New"})]}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Enable real-time PHP syntax error detection, highlighting, and debugging features in the code editor, Default: Disabled"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field afm-form-field--check",children:[(0,l.jsx)("input",{type:"checkbox",id:"enable_trash",name:"enable_trash",value:"1",defaultChecked:"1"==be.enable_trash}),(0,l.jsxs)("div",{className:"afm-field-head",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"enable_trash",children:"Enable Trash"}),(0,l.jsx)("p",{className:"afm-field-desc",children:"Deleted files will go to trash folder, you can restore later. Default: Disabled"})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"public_path",children:"Web Root Path"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsxs)("div",{className:"afm-input afm-input--path",children:[(0,l.jsx)("span",{className:"afm-input__prefix",title:x.public_root_path||x.path||"",children:x.public_root_path||x.path||""}),(0,l.jsx)("input",{type:"text",id:"public_path",name:"public_path",value:U,onChange:function(e){var t=e.target.value;W(t);var a=((null==x?void 0:x.site_url)||(null==x?void 0:x.url)||window.location.origin).replace(/\/+$/,""),n=t.trim().replace(/^[\\\/]+|[\\\/]+$/g,"").replace(/\.\./g,""),i=n?"".concat(a,"/").concat(n):a;L(i)},placeholder:"Enter relative folder path (e.g. wp-content/uploads)"})]}),(0,l.jsxs)("p",{className:"afm-field-help",children:["File Manager Advanced Root Path, you can change according to your choice. Default: ",x.public_root_path||x.path||""]})]})]}),(0,l.jsxs)("div",{className:"afm-form-field",children:[(0,l.jsx)("label",{className:"afm-field-label",htmlFor:"public_url",children:"Web Root URL"}),(0,l.jsxs)("div",{className:"afm-field-input",children:[(0,l.jsx)("input",{type:"text",id:"public_url",name:"public_url",className:"regular-text",value:G,onChange:function(e){return L(e.target.value)}}),(0,l.jsxs)("p",{className:"afm-field-help",children:["File Manager Advanced Files URL, you can change according to your choice. Default: ",x.url||x.site_url||""]})]})]}),(0,l.jsx)("p",{className:"submit",children:(0,l.jsx)("input",{type:"submit",name:"submit",id:"submit-advanced",className:"button button-primary afm-teal-button",value:S?"Saving...":"Save Changes",disabled:S})})]})]})})]})}},5688(e,t,a){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,s,l,o=[],r=!0,c=!1;try{if(s=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;r=!1}else for(;!(r=(n=s.call(a)).done)&&(o.push(n.value),o.length!==t);r=!0);}catch(e){c=!0,i=e}finally{try{if(!r&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?i(e,t):void 0}}(e,t)||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,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function s(){var e,t;return function(e){if(!e||"string"!=typeof e)return e;try{var t=new URL(e,window.location.origin);return t.protocol=window.location.protocol,t.host=window.location.host,t.toString()}catch(t){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(t=window.afmReact)||void 0===t?void 0:t.jsonURL)||"".concat(window.location.origin,"/?rest_route=/"))}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=s(),i=a.endsWith("/")?a:"".concat(a,"/"),l=String(e||"").replace(/^\//,""),o=Object.entries(t).filter(function(e){var t=n(e,2)[1];return null!=t&&""!==t}).map(function(e){var t=n(e,2),a=t[0],i=t[1];return"".concat(encodeURIComponent(a),"=").concat(encodeURIComponent(String(i)))});if(i.includes("rest_route=")){var r="".concat(i.split("rest_route=")[0],"rest_route="),c="".concat(r,"/").concat(l);return o.length&&(c+="&".concat(o.join("&"))),c}if(i.includes("/wp-json")){var d=function(e){try{return new URL(e,window.location.origin).origin}catch(e){return window.location.origin}}(i),u="".concat(d,"/?rest_route=/").concat(l);return o.length&&(u+="&".concat(o.join("&"))),u}var m="".concat(i).concat(l);return o.length&&(m+="?".concat(o.join("&"))),m}a.d(t,{_H:()=>l,lA:()=>s})},7850(e,t,a){a.d(t,{w:()=>i});var n={basic:{dropbox:!1,googledrive:!1,onedrive:!1,amazons3:!1,github:!1,googlecloud:!1,pcloud:!1,cloudflarer2:!1,wasabi:!1,digitalocean:!1,email_notification:!0,slack_notification:!1,filelogs:!0,adminer:!1,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!1,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!1,gutenberg_blocks:!0,code_editor_themes:!1,ai_integration:!1},professional:{dropbox:!0,googledrive:!0,onedrive:!0,amazons3:!0,github:!0,googlecloud:!0,pcloud:!0,cloudflarer2:!0,wasabi:!0,digitalocean:!1,email_notification:!0,slack_notification:!0,filelogs:!0,adminer:!1,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!1},business:{dropbox:!0,googledrive:!0,onedrive:!0,amazons3:!0,github:!0,googlecloud:!0,pcloud:!0,cloudflarer2:!0,wasabi:!0,digitalocean:!1,email_notification:!0,slack_notification:!0,filelogs:!0,adminer:!0,frontend_access:!0,public_access:!0,role_based_access:!0,individual_access:!0,private_folders:!0,hide_sensitive_files:!0,multilingual:!0,flexible_view:!0,flexible_root:!0,operations_control:!0,complete_operations:!0,advance_themes:!0,gutenberg_blocks:!0,code_editor_themes:!0,ai_integration:!0}};function i(e,t,a){return!!a&&"free"!==t&&!!n[t]&&!0===n[t][e]}}}]);
//# sourceMappingURL=886.fd01a26a.chunk.js.map