| 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 : |
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[886],{3886(e,a,t){t.r(a),t.d(a,{default:()=>_});var n=t(6540),i=t(7850),s=t(5688),l=t(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,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function c(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?r(Object(t),!0).forEach(function(a){d(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function d(e,a,t){return(a=function(e){var a=function(e){if("object"!=o(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,"string");if("object"!=o(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(a)?a:a+""}(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function m(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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 f(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,s,l,o=[],r=!0,c=!1;try{if(s=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;r=!1}else for(;!(r=(n=s.call(t)).done)&&(o.push(n.value),o.length!==a);r=!0);}catch(e){c=!0,i=e}finally{try{if(!r&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,a)||u(e,a)||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 u(e,a){if(e){if("string"==typeof e)return h(e,a);var t={}.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)?h(e,a):void 0}}function h(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=Array(a);t<a;t++)n[t]=e[t];return n}function p(e){var a,t;return((null===(a=window.afmReact)||void 0===a?void 0:a.pluginUrl)||(null===(t=window.afm_object)||void 0===t?void 0:t.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/shell/"+e}function g(){return(0,l.jsx)("img",{className:"afm-select__chevron",src:p("icon-chevron.svg"),alt:"",width:8,height:5})}function _(){var e,a,t,o,r,d,u=(0,s.lA)(),h=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(a=window.afmReact)||void 0===a?void 0:a.nonce)||"",_=f((0,n.useState)(null),2),v=_[0],b=_[1],x=f((0,n.useState)(!0),2),w=x[0],j=x[1],y=f((0,n.useState)(!1),2),N=y[0],k=y[1],S=f((0,n.useState)(null),2),A=S[0],C=S[1],O=f((0,n.useState)("general"),2),I=(O[0],O[1],f((0,n.useState)("general-settings"),2)),F=I[0],P=I[1],D=f((0,n.useState)({}),2),E=D[0],R=D[1],M=f((0,n.useState)(""),2),T=M[0],z=M[1],U=f((0,n.useState)(""),2),W=U[0],K=U[1],L=f((0,n.useState)(!1),2),H=L[0],B=L[1],G=f((0,n.useState)(!1),2),Q=G[0],V=G[1],q=f((0,n.useState)(!1),2),$=q[0],J=q[1],X=f((0,n.useState)(!1),2),Y=X[0],Z=X[1],ee=f((0,n.useState)(["administrator"]),2),ae=ee[0],te=ee[1],ne=f((0,n.useState)({}),2),ie=ne[0],se=ne[1],le=(null===(t=window.afmReact)||void 0===t?void 0:t.hasPro)||!1,oe=(null===(o=window.afmReact)||void 0===o?void 0:o.currentPlan)||"free",re=(null===(r=window.afmReact)||void 0===r||r.pricingUrl,(0,i.w)("advance_themes",oe,le)),ce=(0,i.w)("code_editor_themes",oe,le);(0,n.useLayoutEffect)(function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){sessionStorage.setItem("afm-settings-hash-just-set","true");var a=sessionStorage.getItem("afm-settings-subtab"),t="general-settings";if("general-settings"===a||"advanced-settings"===a)t=a;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||(t=i,sessionStorage.setItem("afm-settings-subtab",i))}}P(t);var s="#/settings/".concat(t);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",t),setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}},[]),(0,n.useEffect)(function(){F&&sessionStorage.setItem("afm-settings-subtab",F)},[F]),(0,n.useEffect)(function(){var e=function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("settings")){if(e.startsWith("settings/")){var a=e.split("/");if(a.length>1){var t=a[1].split("?")[0];if("general-settings"===t||"advanced-settings"===t)return sessionStorage.setItem("afm-settings-subtab",t),void P(function(e){return e!==t?t: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;P(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 de=n.useRef(!0);(0,n.useEffect)(function(){if(de.current){de.current=!1;var e=window.location.hash.replace(/^#/,"").replace(/^\//,"");if(e!=="settings/".concat(F)&&!e.startsWith("settings/")){sessionStorage.setItem("afm-settings-hash-just-set","true");var a="#/settings/".concat(F);if(window.history&&window.history.replaceState){var t=window.location.href.split("#")[0]+a;window.history.replaceState(null,"",t),window.location.hash=a}else window.location.hash=a;setTimeout(function(){sessionStorage.removeItem("afm-settings-hash-just-set")},2e3)}}else{sessionStorage.setItem("afm-settings-hash-just-set","true");var n="#/settings/".concat(F);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)}},[F]),(0,n.useEffect)(function(){u&&h?setTimeout(function(){Promise.all([fetch("".concat(u,"file-manager-advanced/v1/settings"),{credentials:"same-origin",headers:{"X-WP-Nonce":h}}),fetch("".concat(u,"file-manager-advanced/v1/integrations-status"),{credentials:"same-origin",headers:{"X-WP-Nonce":h}})]).then(function(e){var a=f(e,2),t=a[0],n=a[1];return Promise.all([t.ok?t.json():Promise.reject("Failed to fetch settings"),n.ok?n.json():Promise.reject("Failed to fetch integrations")])}).then(function(e){var a=f(e,2),t=a[0],n=a[1];if(b(t),n&&n.connected&&se(n.connected),t&&t.settings){var i=t.settings;R({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?m(i.fma_user_roles):["administrator"];s.includes("administrator")||s.unshift("administrator"),te(s);var l=void 0!==t.public_path_suffix?t.public_path_suffix:i.public_path||"",o=t.public_url||i.public_url||t.url||"";z(l),K(o)}j(!1)}).catch(function(e){console.error("AFM Settings fetch error:",e),j(!1)})},100):console.warn("AFM Settings: Missing API root or nonce")},[u,h]);var me=function(e){if(e.preventDefault(),v&&!N){k(!0),C(null);var a={},t=Array.isArray(ae)&&ae.length?Array.from(new Set(["administrator"].concat(m(ae)))):["administrator"];if(a.fma_user_role=t,["fma_theme","fma_locale","public_path","public_url","upload_max_size","fma_upload_allow","fma_cm_theme"].forEach(function(t){var n=e.target.querySelector('input[name="'.concat(t,'"], select[name="').concat(t,'"], textarea[name="').concat(t,'"]'));n&&(a[t]=n.value||"")}),["hide_path","enable_trash","enable_htaccess","fma_debug_enabled","display_dot_files"].forEach(function(t){if("fma_debug_enabled"===t&&E.hasOwnProperty("fma_debug_enabled"))a[t]="1"===E.fma_debug_enabled||!0===E.fma_debug_enabled?"1":"0",console.log("AFM Debug: Using formValues for fma_debug_enabled:",a[t],"formValues:",E.fma_debug_enabled);else if(E.hasOwnProperty(t))a[t]="1"===E[t]||!0===E[t]?"1":"0";else{var n=e.target.querySelector('input[name="'.concat(t,'"]'));n&&(a[t]=n.checked?"1":"0","fma_debug_enabled"===t&&console.log("AFM Debug: Using DOM for fma_debug_enabled:",a[t],"checked:",n.checked))}}),"advanced-settings"===F){var n=[];e.target.querySelectorAll('input[name="display_ui_options[]"]:checked').forEach(function(e){n.push(e.value)}),a.display_ui_options=n}if("general-settings"===F){var i=[];e.target.querySelectorAll('input[name="blocked_integrations[]"]:checked').forEach(function(e){i.push(e.value)}),a.blocked_integrations=i}console.log("AFM Settings: Submitting data:",a),fetch("".concat(u,"file-manager-advanced/v1/settings"),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":h,"Content-Type":"application/json"},body:JSON.stringify(a)}).then(function(e){return e.json()}).then(function(e){if(k(!1),console.log("AFM Settings: Save response:",e),e.success){var a,t,n,i,s,l,o,r,d,f,u,h;C({type:"success",text:e.message||"Settings saved successfully."});var p=(null==v||null===(a=v.settings)||void 0===a?void 0:a.display_ui_options)||[],g=(null===(t=e.settings)||void 0===t?void 0:t.display_ui_options)||[],_=(null==v||null===(n=v.settings)||void 0===n?void 0:n.fma_locale)||E.fma_locale||"en",x=(null===(i=e.settings)||void 0===i?void 0:i.fma_locale)||_,w=JSON.stringify(m(p).sort())!==JSON.stringify(m(g).sort()),j=_!==x,y=((null==v||null===(s=v.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==v||null===(o=v.settings)||void 0===o?void 0:o.fma_theme)||"light")!==((null===(r=e.settings)||void 0===r?void 0:r.fma_theme)||"light"),S=String(null!==(d=null==v||null===(f=v.settings)||void 0===f?void 0:f.fma_debug_enabled)&&void 0!==d?d:"0"),A=String(null!==(u=null===(h=e.settings)||void 0===h?void 0:h.fma_debug_enabled)&&void 0!==u?u:"0"),O=w||y||N||S!==A;b(function(a){var t;return c(c({},a),{},{settings:e.settings,public_root_path:e.public_root_path||(null==a?void 0:a.public_root_path),public_path_suffix:void 0!==e.public_path_suffix?e.public_path_suffix:null==a?void 0:a.public_path_suffix,public_url:e.public_url||(null===(t=e.settings)||void 0===t?void 0:t.public_url)||(null==a?void 0:a.public_url),url:e.url||(null==a?void 0:a.url),site_url:e.site_url||(null==a?void 0:a.site_url)})}),void 0!==e.public_path_suffix&&z(e.public_path_suffix),e.public_url&&K(e.public_url),e.settings&&(console.log("AFM Settings: Updating formValues with saved settings:",e.settings),R(function(a){var t=c(c({},a),{},{fma_debug_enabled:void 0!==e.settings.fma_debug_enabled?String(e.settings.fma_debug_enabled):a.fma_debug_enabled||"0",fma_theme:e.settings.fma_theme||a.fma_theme||"light",fma_locale:e.settings.fma_locale||a.fma_locale||"en",fma_cm_theme:e.settings.fma_cm_theme||a.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:",t),t}),(O||"advanced-settings"===F)&&(sessionStorage.setItem("afm_force_fm_reinit","true"),sessionStorage.removeItem("afm_ui_options_changed")),j&&(sessionStorage.setItem("afm_locale_changed","true"),(window.location.hash||"").includes("filemanager")&&window.dispatchEvent(new CustomEvent("afm-settings-changed",{detail:{type:"locale"}}))))}else C({type:"error",text:e.message||"Failed to save settings."});setTimeout(function(){return C(null)},5e3)}).catch(function(e){console.error("AFM Settings save error:",e),k(!1),C({type:"error",text:"Failed to save settings. Please try again."}),setTimeout(function(){return C(null)},5e3)})}};if(w)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(!v||!v.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 fe,ue,he,pe,ge,_e=v.settings||{},ve=v.roles||{},be=v.locales||{},xe=v.themes||{},we=v.cm_themes||[],je=v.ui_options||[],ye=function(e){sessionStorage.setItem("afm-settings-hash-just-set","true"),P(e);var a="#/settings/".concat(e);if(window.history&&window.history.replaceState){var t=window.location.href.split("#")[0]+a;window.history.replaceState(null,"",t)}window.location.hash=a,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(),ye("general-settings")},className:"afm-settings-subnav__tab".concat("general-settings"===F?" is-active":""),children:"General"}),(0,l.jsx)("a",{href:"#/settings/advanced-settings",onClick:function(e){e.preventDefault(),ye("advanced-settings")},className:"afm-settings-subnav__tab".concat("advanced-settings"===F?" is-active":""),children:"Advanced"})]}),(0,l.jsx)("div",{className:"afm-settings-body",children:(0,l.jsxs)("div",{className:"afm-settings-card",children:[A&&(0,l.jsxs)("div",{className:"afm-snackbar afm-snackbar-".concat("success"===A.type?"success":"error"),onClick:function(){return C(null)},style:{animation:"afm-slideIn 0.3s ease-out"},children:[(0,l.jsx)("span",{style:{fontSize:"14px",lineHeight:"1.5",flex:"1"},children:A.text}),(0,l.jsx)("button",{type:"button",className:"afm-snackbar-close",onClick:function(e){e.preventDefault(),e.stopPropagation(),C(null)},"aria-label":"Dismiss",children:"×"})]}),"general-settings"===F&&(0,l.jsxs)("form",{onSubmit:me,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(){Z(!Y),B(!1),V(!1),J(!1)},"aria-expanded":Y,children:[(0,l.jsx)("span",{className:"afm-select__value",children:ae.map(function(e){return"administrator"===e?"Administrator":ve[e]&&ve[e].name||e}).join(", ")}),(0,l.jsx)(g,{})]}),Y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return Z(!1)}}),(0,l.jsxs)("div",{className:"afm-select__menu",role:"listbox",children:[(0,l.jsxs)("label",{className:"afm-select__option afm-select__option--check is-disabled",children:[(0,l.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,readOnly:!0}),(0,l.jsx)("span",{children:"Administrator"})]}),Object.keys(ve).filter(function(e){return"administrator"!==e}).map(function(e){var a=-1!==ae.indexOf(e);return(0,l.jsxs)("label",{className:"afm-select__option afm-select__option--check",children:[(0,l.jsx)("input",{type:"checkbox",checked:a,onChange:function(a){te(function(t){var n=new Set(t);return n.add("administrator"),a.target.checked?n.add(e):n.delete(e),Array.from(n)})}}),(0,l.jsx)("span",{children:ve[e]&&ve[e].name?ve[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"==_e.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"==_e.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!==E.upload_max_size?E.upload_max_size:_e.upload_max_size||"0",onChange:function(e){return R(function(a){return c(c({},a),{},{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!==E.fma_upload_allow?E.fma_upload_allow:_e.fma_upload_allow||"all",onChange:function(e){return R(function(a){return c(c({},a),{},{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"})]})]})]}),(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:(ue=(null===(fe=window.afmReact)||void 0===fe?void 0:fe.proImagesURL)||"",he=_e.blocked_integrations||[],pe=le&&"business"===oe,ge=pe?[{key:"onedrive",name:"OneDrive",img:ue+"onedrive.svg",dbKey:"onedrive"},{key:"googledrive",name:"Google Drive",img:ue+"googledrive.svg",dbKey:"googledrive"},{key:"googlecloud",name:"Google Cloud Storage",img:ue+"googlecloud.svg",dbKey:"googlecloud"},{key:"dropbox",name:"Dropbox",img:ue+"dropbox.svg",dbKey:"dropbox"},{key:"amazonses",name:"Amazon S3",img:ue+"amazons3.svg",dbKey:"amazonses"},{key:"pcloud",name:"pCloud",img:ue+"pcloud.svg",dbKey:"pcloud"},{key:"cloudflarer2",name:"Cloudflare R2",img:ue+"cloudflarer2.svg",dbKey:"cloudflarer2"},{key:"wasabi",name:"Wasabi",img:ue+"wasabi.svg",dbKey:"wasabi"}].filter(function(e){return ie[e.dbKey]}):[],pe&&0!==ge.length?(0,l.jsx)("div",{className:"afm-integrations-grid",children:ge.map(function(e){var a=he.includes(e.dbKey);return(0,l.jsxs)("label",{className:"afm-integration-card".concat(a?" is-blocked":""),children:[(0,l.jsx)("input",{type:"checkbox",name:"blocked_integrations[]",value:e.dbKey,defaultChecked:a}),(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:a?"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:N?"Saving...":"Save Changes",disabled:N})})]}),"advanced-settings"===F&&(0,l.jsxs)("form",{onSubmit:me,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(){B(!H),V(!1),J(!1),Z(!1)},"aria-expanded":H,children:[(0,l.jsx)("span",{className:"afm-select__value",children:(null===(d=xe[E.fma_theme||_e.fma_theme||"light"])||void 0===d?void 0:d.title)||"Light"}),(0,l.jsx)(g,{})]}),H&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return B(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:Object.keys(xe).map(function(e){var a=xe[e],t=a.pro&&!v.has_pro,n=a.pro&&v.has_pro&&!re,i=t||n,s=(E.fma_theme||_e.fma_theme||"light")===e;return(0,l.jsxs)("div",{className:"afm-select__option".concat(s?" is-selected":"").concat(i?" is-disabled":""),onClick:function(a){if(a.stopPropagation(),i){var t;B(!1);var n=(null===(t=window.afmReact)||void 0===t?void 0:t.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 R(function(a){return c(c({},a),{},{fma_theme:e})}),B(!1)},children:[(0,l.jsx)("span",{children:a.title}),i&&(0,l.jsx)("img",{src:p("icon-crown.svg"),alt:"",width:16,height:16})]},e)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_theme",value:E.fma_theme||_e.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(){V(!Q),B(!1),J(!1),Z(!1)},"aria-expanded":Q,children:[(0,l.jsx)("span",{className:"afm-select__value",children:Object.keys(be).find(function(e){return be[e]===(E.fma_locale||_e.fma_locale||"en")})||"en (English)"}),(0,l.jsx)(g,{})]}),Q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return V(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:Object.keys(be).map(function(e){var a=be[e],t=(E.fma_locale||_e.fma_locale||"en")===a;return(0,l.jsx)("div",{className:"afm-select__option".concat(t?" is-selected":""),onClick:function(e){e.stopPropagation(),R(function(e){return c(c({},e),{},{fma_locale:a})}),V(!1)},children:(0,l.jsx)("span",{children:e})},e)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_locale",value:E.fma_locale||_e.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:je.map(function(e){var a=void 0===_e.display_ui_options||null===_e.display_ui_options||_e.display_ui_options.length>0&&-1!==_e.display_ui_options.indexOf(e);return(0,l.jsxs)("label",{className:"afm-view-type-grid__item",children:[(0,l.jsx)("input",{type:"checkbox",name:"display_ui_options[]",value:e,defaultChecked:a}),(0,l.jsx)("span",{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(){J(!$),B(!1),V(!1),Z(!1)},"aria-expanded":$,children:[(0,l.jsx)("span",{className:"afm-select__value",children:E.fma_cm_theme||_e.fma_cm_theme||"default"}),(0,l.jsx)(g,{})]}),$&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"afm-select__backdrop",onClick:function(){return J(!1)}}),(0,l.jsx)("div",{className:"afm-select__menu",children:we.map(function(e){var a=e.pro&&!v.has_pro,t=e.pro&&v.has_pro&&!ce,n=a||t,i=(E.fma_cm_theme||_e.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(a){if(a.stopPropagation(),n){var t;J(!1);var i=(null===(t=window.afmReact)||void 0===t?void 0:t.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 R(function(a){return c(c({},a),{},{fma_cm_theme:e.title})}),J(!1)},children:[(0,l.jsx)("span",{children:e.title}),n&&(0,l.jsx)("img",{src:p("icon-crown.svg"),alt:"",width:16,height:16})]},e.title)})})]}),(0,l.jsx)("input",{type:"hidden",name:"fma_cm_theme",value:E.fma_cm_theme||_e.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"===E.fma_debug_enabled||!0===E.fma_debug_enabled||void 0===E.fma_debug_enabled&&"1"==_e.fma_debug_enabled,onChange:function(e){var a=e.target.checked?"1":"0";R(function(e){return c(c({},e),{},{fma_debug_enabled:a})})}}),(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"==_e.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:v.public_root_path||v.path||"",children:v.public_root_path||v.path||""}),(0,l.jsx)("input",{type:"text",id:"public_path",name:"public_path",value:T,onChange:function(e){var a=e.target.value;z(a);var t=((null==v?void 0:v.site_url)||(null==v?void 0:v.url)||window.location.origin).replace(/\/+$/,""),n=a.trim().replace(/^[\\\/]+|[\\\/]+$/g,"").replace(/\.\./g,""),i=n?"".concat(t,"/").concat(n):t;K(i)},placeholder:"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: ",v.public_root_path||v.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:W,onChange:function(e){return K(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: ",v.url||v.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:N?"Saving...":"Save Changes",disabled:N})})]})]})})]})}},5688(e,a,t){function n(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,s,l,o=[],r=!0,c=!1;try{if(s=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;r=!1}else for(;!(r=(n=s.call(t)).done)&&(o.push(n.value),o.length!==a);r=!0);}catch(e){c=!0,i=e}finally{try{if(!r&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,a)||function(e,a){if(e){if("string"==typeof e)return i(e,a);var t={}.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)?i(e,a):void 0}}(e,a)||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,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=Array(a);t<a;t++)n[t]=e[t];return n}function s(){var e,a;return function(e){if(!e||"string"!=typeof e)return e;try{var a=new URL(e,window.location.origin);return a.protocol=window.location.protocol,a.host=window.location.host,a.toString()}catch(a){return e.startsWith("/")?"".concat(window.location.origin).concat(e):e}}((null===(e=window.wpApiSettings)||void 0===e?void 0:e.root)||(null===(a=window.afmReact)||void 0===a?void 0:a.jsonURL)||"".concat(window.location.origin,"/?rest_route=/"))}function l(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s(),i=t.endsWith("/")?t:"".concat(t,"/"),l=String(e||"").replace(/^\//,""),o=Object.entries(a).filter(function(e){var a=n(e,2)[1];return null!=a&&""!==a}).map(function(e){var a=n(e,2),t=a[0],i=a[1];return"".concat(encodeURIComponent(t),"=").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),m="".concat(d,"/?rest_route=/").concat(l);return o.length&&(m+="&".concat(o.join("&"))),m}var f="".concat(i).concat(l);return o.length&&(f+="?".concat(o.join("&"))),f}t.d(a,{_H:()=>l,lA:()=>s})},7850(e,a,t){t.d(a,{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,a,t){return!!t&&"free"!==a&&!!n[a]&&!0===n[a][e]}}}]);
//# sourceMappingURL=886.0f44c829.chunk.js.map