| 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 707.8d3b4f81.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[707],{8707(e,t,n){n.r(t),n.d(t,{default:()=>_});var i=n(8450),o=(n(824),n(8722)),a=n(5464),r=n(204),l=n(1962);function s(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(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 c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return l}}(e,t)||p(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 p(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function h(e){return h="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},h(e)}function g(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,i,o,a){var s=i&&i.prototype instanceof l?i:l,c=Object.create(s.prototype);return v(c,"_invoke",function(n,i,o){var a,l,s,c=0,d=o||[],u=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,l=0,s=e,f.n=n,r}};function p(n,i){for(l=n,s=i,t=0;!u&&c&&!o&&t<d.length;t++){var o,a=d[t],p=f.p,m=a[2];n>3?(o=m===i)&&(s=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(l=0,f.v=i,f.n=a[1]):p<m&&(o=n<3||a[0]>i||i>m)&&(a[4]=n,a[5]=i,f.n=m,l=0))}if(o||n>1)return r;throw u=!0,i}return function(o,d,m){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,m),l=d,s=m;(t=l<2?e:s)||!u;){a||(l?l<3?(l>1&&(f.n=-1),p(l,s)):f.n=s:f.v=s);try{if(c=2,a){if(l||(o="next"),t=a[o]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=a.return)&&t.call(a),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((t=(u=f.n<0)?s:n.call(i,f))!==r)break}catch(t){a=e,l=1,s=t}finally{c=1}}return{value:t,done:u}}}(n,o,a),!0),c}var r={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var d=[][i]?t(t([][i]())):(v(t={},i,function(){return this}),t),u=c.prototype=l.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,v(u,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(u),v(u,o,"Generator"),v(u,i,function(){return this}),v(u,"toString",function(){return"[object Generator]"}),(g=function(){return{w:a,m:f}})()}function v(e,t,n,i){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,n,i){function a(t,n){v(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},v(e,t,n,i)}function x(e,t,n,i,o,a,r){try{var l=e[a](r),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,o)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(i,o){var a=e.apply(t,n);function r(e){x(a,i,o,r,l,"next",e)}function l(e){x(a,i,o,r,l,"throw",e)}r(void 0)})}}var y=i.lazy(b(g().m(function e(){var t;return g().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.e(595).then(n.bind(n,2595));case 1:return e.n=2,n.e(354).then(n.t.bind(n,3354,23));case 2:return t=e.v,e.a(2,{default:t.default})}},e)}))),w="AFM File Log Recent Activity",j=function(e){return("string"==typeof e?e.trim():"")||w};function _(){var e,t,n,c,u,p,m,g,v,x,b,_=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onContentReady,k=(0,o.lA)(),S=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(t=window.afmReact)||void 0===t?void 0:t.nonce)||"",A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t="".concat(k,"file-manager-advanced/v1/notifications");if(!e||"object"!==h(e))return t;var n=new URLSearchParams(e).toString();return n?"".concat(t).concat(t.includes("?")?"&":"?").concat(n):t},R=f((0,i.useState)(null),2),P=R[0],T=R[1],O=f((0,i.useState)(!0),2),C=O[0],I=O[1];(0,i.useEffect)(function(){C||null==_||_()},[C,_]);var N=f((0,i.useState)(!1),2),z=N[0],E=N[1],F=f((0,i.useState)(null),2),W=F[0],B=F[1],D=f((0,i.useState)("email"),2),L=D[0],M=D[1],U=f((0,i.useState)(!1),2),H=U[0],q=U[1],G=f((0,i.useState)(!1),2),X=G[0],J=G[1],Y=f((0,i.useState)(""),2),$=Y[0],K=Y[1],Q=f((0,i.useState)(""),2),V=Q[0],Z=Q[1],ee=function(e){return e?e.split("\n\n").map(function(e){return"<p>".concat(e.split("\n").join("<br>"),"</p>")}).join(""):""},te=function(e){return e?e.replace(/<p>/g,"").replace(/<\/p>/g,"\n\n").replace(/<br\s*\/?>/gi,"\n").replace(/ /g," ").trim():""},ne=f((0,i.useState)(ee("Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.")),2),ie=ne[0],oe=ne[1],ae=f((0,i.useState)(ee("Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.")),2),re=ae[0],le=ae[1],se=f((0,i.useState)(""),2),ce=se[0],de=se[1],ue=f((0,i.useState)([]),2),fe=ue[0],pe=ue[1],me=f((0,i.useState)([]),2),he=me[0],ge=me[1],ve=(null===(n=window.afmReact)||void 0===n?void 0:n.hasPro)||!1,xe=!(null===(c=window.afmReact)||void 0===c||!c.hasActiveSmtpPlugin),be=(null===(u=window.afmReact)||void 0===u?void 0:u.currentPlan)||"free",ye=(null===(p=window.afmReact)||void 0===p||p.pricingUrl,(null===(m=window.afmReact)||void 0===m?void 0:m.smtpSettingsUrl)||"".concat(window.location.origin,"/wp-admin/admin.php?page=file-manager-advanced-recommend-post-smtp")),we=ye+(ye.includes("?")?"&":"?")+"afm_embed=1",je=function(e){return"email"===e||"slack"===e||"smtp"===e},_e=(0,a.w)("slack_notification",be,ve),ke=!ve,Se=ke||H,Ae=ke||X,Re=ke||H,Pe=(ke||X)&&(ke||_e);(0,i.useLayoutEffect)(function(){var e=sessionStorage.getItem("afm-notifications-subtab");if(!je(e)||"smtp"===e&&xe){var t=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(t.startsWith("notifications/")){var n=t.split("/");if(n.length>1){var i=n[1].split("?")[0].toLowerCase();if(je(i)&&("smtp"!==i||!xe))return sessionStorage.setItem("afm-notifications-subtab",i),void M(i)}}if("notifications"===t)return sessionStorage.setItem("afm-notifications-subtab","email"),void M("email");sessionStorage.setItem("afm-notifications-subtab","email"),M("email")}else M(e)},[]),(0,i.useEffect)(function(){L&&sessionStorage.setItem("afm-notifications-subtab",L)},[L]),(0,i.useEffect)(function(){var e=function(){var e=(window.location.hash||"").replace(/^#/,"").replace(/^\//,"");if(e.startsWith("notifications/")){var t=e.split("/");if(t.length>1){var n=t[1].split("?")[0].toLowerCase();if(je(n)&&("smtp"!==n||!xe))return sessionStorage.setItem("afm-notifications-subtab",n),void M(function(e){return e!==n?n:e})}}if("notifications"===e){var i=sessionStorage.getItem("afm-notifications-subtab")||"email",o=je(i)?i:"email",a="#/notifications/".concat(o);if(window.history&&window.history.replaceState){var r=window.location.href.split("#")[0]+a;window.history.replaceState(null,"",r)}else window.location.hash=a;M(function(e){return e!==o?o:e})}};return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}},[]);var Te=(0,i.useRef)(!0);(0,i.useEffect)(function(){if(Te.current)Te.current=!1;else{var e="#/notifications/".concat(L);if(window.history&&window.history.replaceState){var t=window.location.href.split("#")[0]+e;window.history.replaceState(null,"",t)}else window.location.hash=e}},[L]);var Oe=[{value:"rm",label:"Delete File/Folder"},{value:"mkfile",label:"Create File"},{value:"mkdir",label:"Create Folder"}],Ce=[{code:"{username}",desc:"This will fetch the user's name who did the action"},{code:"{ip_address}",desc:"This will fetch the user's IP Address"},{code:"{event}",desc:"This will fetch which action the user performed (created/deleted)"},{code:"{item_type}",desc:"This will fetch whether the target is a file or folder"},{code:"{file_name}",desc:"This will fetch the file name on which that action was done"},{code:"{ext}",desc:"This will fetch the extension or mime type for the target item"},{code:"{date_time}",desc:"This will fetch the date the user acted on the file"},{code:"{site_name}",desc:"This will fetch the site name on which the action was performed"}];(0,i.useEffect)(function(){if(k&&S){var e=new URLSearchParams(window.location.search).get("webhook_url"),t=Promise.resolve();e&&(t=fetch(A(),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":S,"Content-Type":"application/json"},body:JSON.stringify({slack:{webhook_url:decodeURIComponent(e),enable:"yes"}})}).then(function(){var e=window.location.href.split("&webhook_url=")[0].split("?webhook_url=")[0];window.history.replaceState({},"",e)}).catch(function(e){console.error("AFM Notifications webhook save error:",e)})),t.then(function(){setTimeout(function(){fetch(A({_t:String(Date.now())}),{credentials:"same-origin",headers:{"X-WP-Nonce":S}}).then(function(e){return e.ok?e.json():Promise.reject("Failed to fetch")}).then(function(t){var n,i,o,a,r,l,s,c,d;T(t),q("yes"===(null==t||null===(n=t.email)||void 0===n?void 0:n.enable)),J("yes"===(null==t||null===(i=t.slack)||void 0===i?void 0:i.enable)),K((null==t||null===(o=t.email)||void 0===o?void 0:o.email)||""),Z(j(null==t||null===(a=t.email)||void 0===a?void 0:a.subject)),pe(Array.isArray(null==t||null===(r=t.email)||void 0===r?void 0:r.events)?t.email.events:[]);var u=(null==t||null===(l=t.email)||void 0===l?void 0:l.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";oe(u.includes("<p>")||u.includes("<br>")?u:ee(u)),ge(Array.isArray(null==t||null===(s=t.slack)||void 0===s?void 0:s.events)?t.slack.events:[]);var f=(null==t||null===(c=t.slack)||void 0===c?void 0:c.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";le(f.includes("<p>")||f.includes("<br>")?f:ee(f));var p=e?decodeURIComponent(e):"";de(p||(null==t||null===(d=t.slack)||void 0===d?void 0:d.webhook_url)||""),I(!1)}).catch(function(e){console.error("AFM Notifications fetch error:",e),I(!1)})},500)})}else console.warn("AFM Notifications: Missing API root or nonce")},[k,S]);var Ie=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e&&e.preventDefault&&e.preventDefault(),ve){if(P&&!z){E(!0),B(null);var n={email:d({enable:H?"yes":"no",email:$||"",events:fe||[],subject:j(V),message:te(ie)||""},(null==t?void 0:t.email)||{}),slack:d({enable:X?"yes":"no",webhook_url:ce||"",events:he||[],message:te(re)||""},(null==t?void 0:t.slack)||{})};fetch(A(),{method:"POST",credentials:"same-origin",headers:{"X-WP-Nonce":S,"Content-Type":"application/json"},body:JSON.stringify(n)}).then(function(e){return e.ok?e.json():Promise.reject(e)}).then(function(e){return B({type:"success",text:e.message||"Notification settings saved successfully."}),E(!1),setTimeout(function(){return B(null)},5e3),fetch(A(),{credentials:"same-origin",headers:{"X-WP-Nonce":S}})}).then(function(e){return e.ok?e.json():Promise.reject(e)}).then(function(e){var t,n,i,o,a,r,l,s,c;T(e),q("yes"===(null==e||null===(t=e.email)||void 0===t?void 0:t.enable)),J("yes"===(null==e||null===(n=e.slack)||void 0===n?void 0:n.enable)),K((null==e||null===(i=e.email)||void 0===i?void 0:i.email)||""),Z(j(null==e||null===(o=e.email)||void 0===o?void 0:o.subject)),pe(Array.isArray(null==e||null===(a=e.email)||void 0===a?void 0:a.events)?e.email.events:[]);var d=(null==e||null===(r=e.email)||void 0===r?void 0:r.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";oe(d.includes("<p>")||d.includes("<br>")?d:ee(d)),ge(Array.isArray(null==e||null===(l=e.slack)||void 0===l?void 0:l.events)?e.slack.events:[]);var u=(null==e||null===(s=e.slack)||void 0===s?void 0:s.message)||"Hi {admin_email},\n\nA quick update from the Advanced File Manager plugin on your site {site_name}.\nA {item_type} was {event} by {username} on {date_time}. The {item_type} name is {file_name} with the extension {ext}, and the action was performed from the following IP Address: {ip_address}.";le(u.includes("<p>")||u.includes("<br>")?u:ee(u)),de((null==e||null===(c=e.slack)||void 0===c?void 0:c.webhook_url)||"")}).catch(function(e){console.error("AFM Notifications save error:",e),B({type:"error",text:e.message||"Failed to save notification settings."}),E(!1),setTimeout(function(){return B(null)},5e3)})}}else alert("Pro version is required for notifications.")};if(C)return(0,l.jsxs)("div",{className:"afm-tab-panel",style:{padding:"20px"},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.jsxs)("div",{style:{background:"#fff",border:"1px solid #ccc",padding:"20px"},children:[(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"34px",width:"100%",borderRadius:"6px",marginBottom:"18px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"20px",width:"220px",borderRadius:"6px",marginBottom:"16px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"120px",width:"100%",borderRadius:"6px",marginBottom:"12px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"160px",borderRadius:"6px",marginTop:"10px"}})]})]});null==P||P.email,null==P||P.slack;var Ne=ve&&("email"===L&&H||"slack"===L&&X&&_e),ze=function(e){var t=e.id,n=e.name,i=e.checked,o=e.disabled,a=e.onChange;return(0,l.jsxs)("label",{onClick:function(e){!o&&a&&(e.preventDefault(),e.stopPropagation(),a({target:{checked:!i}}))},style:{display:"inline-block",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,margin:0,padding:0,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",id:t,name:n,value:"yes",checked:i,disabled:o,readOnly:!0,style:{display:"none"}}),(0,l.jsx)("div",{style:{position:"relative",width:"44px",height:"24px",background:i?"#3F6972":"#ccc",borderRadius:"12px",transition:"background 0.3s",pointerEvents:o?"none":"auto"},children:(0,l.jsx)("div",{style:{position:"absolute",top:"2px",left:i?"22px":"2px",width:"20px",height:"20px",background:"#fff",borderRadius:"50%",transition:"left 0.3s",boxShadow:"0 2px 4px rgba(0,0,0,0.2)"}})})]})};return(0,l.jsx)("div",{className:"afm-tab-panel",children:(0,l.jsxs)("div",{className:"wrap",style:{background:"#fff",padding:"20px",border:"1px solid #ccc",position:"relative"},children:[(0,l.jsxs)("h2",{className:"nav-tab-wrapper afm-clean-tabs",style:{marginBottom:"20px",borderBottom:"none"},children:[(0,l.jsxs)("a",{href:"#/notifications/email",onClick:function(e){e.preventDefault(),M("email");var t="#/notifications/email";if(window.history&&window.history.replaceState){var n=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",n)}else window.location.hash=t},className:"nav-tab afm-clean-tab ".concat("email"===L?" nav-tab-active":""),children:["Email Notifications",!ve&&(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#3F6972",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 6px",borderRadius:"10px",textTransform:"uppercase"},children:"PRO"})]}),(0,l.jsxs)("a",{href:"#/notifications/slack",onClick:function(e){e.preventDefault(),M("slack");var t="#/notifications/slack";if(window.history&&window.history.replaceState){var n=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",n)}else window.location.hash=t},className:"nav-tab afm-clean-tab ".concat("slack"===L?" nav-tab-active":""),children:["Slack Notifications",(!ve||ve&&!_e)&&(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#3F6972",color:"#fff",fontSize:"10px",fontWeight:700,padding:"6px",borderRadius:"10px",textTransform:"uppercase"},children:"PRO"})]}),!xe&&(0,l.jsxs)("a",{href:"#/notifications/smtp",onClick:function(e){e.preventDefault(),M("smtp");var t="#/notifications/smtp";if(window.history&&window.history.replaceState){var n=window.location.href.split("#")[0]+t;window.history.replaceState(null,"",n)}else window.location.hash=t},className:"nav-tab afm-clean-tab ".concat("smtp"===L?" nav-tab-active":""),children:["SMTP",(0,l.jsx)("span",{style:{marginLeft:"6px",background:"#16a34a",color:"#fff",fontSize:"10px",fontWeight:700,padding:"2px 6px",borderRadius:"10px",textTransform:"uppercase"},children:"RECOMMENDED"})]})]}),W&&(0,l.jsxs)("div",{className:"afm-snackbar afm-snackbar-".concat("success"===W.type?"success":"error"),onClick:function(){return B(null)},style:{animation:"afm-slideIn 0.3s ease-out"},children:[(0,l.jsx)("span",{style:{fontSize:"14px",lineHeight:"1.5",flex:"1"},children:W.text}),(0,l.jsx)("button",{type:"button",className:"afm-snackbar-close",onClick:function(e){e.preventDefault(),e.stopPropagation(),B(null)},style:{background:"none",border:"none",padding:"0",cursor:"pointer",color:"inherit",fontSize:"18px",lineHeight:"1",marginLeft:"12px",opacity:"0.7",width:"20px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:"×"})]}),"smtp"===L&&!xe&&(0,l.jsx)("iframe",{title:"SMTP",src:we,style:{width:"100%",minHeight:"720px",border:"0",display:"block"}}),"smtp"!==L&&(0,l.jsxs)("form",{onSubmit:function(e){return Ie(e)},children:["email"===L&&(0,l.jsx)(r.A,{shouldShow:!ve,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:Se?"30px":"0",paddingBottom:Se?"15px":"0",borderBottom:Se?"1px solid #e5e5e5":"none",gap:"80px"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,l.jsx)("img",{src:((null===(g=window.afmReact)||void 0===g?void 0:g.pluginUrl)||(null===(v=window.afm_object)||void 0===v?void 0:v.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/email_notification.svg",alt:"Email Notifications",style:{width:"24px",height:"24px",flexShrink:0}}),(0,l.jsx)("h3",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"#0f172a"},children:"Email Notifications"})]}),(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",margin:0,padding:0},children:(0,l.jsx)(ze,{id:"email_enable",name:"email_enable",checked:Se,disabled:!ve,onChange:function(e){var t=!H;q(t),Ie(null,{email:{enable:t?"yes":"no"}})}})})]}),Re&&(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"30px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails"}),(0,l.jsx)("input",{type:"email",id:"email_address",name:"email_address",value:$,onChange:function(e){return K(e.target.value)},disabled:!ve,placeholder:"Enter email address",style:{width:"100%",maxWidth:"500px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:0,fontSize:"13px",color:"#666"},children:"Email address to send notification."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Events Notification"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:Oe.map(function(e){return(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:ve?"pointer":"not-allowed",opacity:ve?1:.5,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",name:"email_events[]",value:e.value,checked:fe.includes(e.value),onChange:function(t){t.target.checked?pe([].concat(s(fe),[e.value])):pe(fe.filter(function(t){return t!==e.value}))},disabled:!ve,style:{marginRight:"10px",width:"18px",height:"18px",cursor:ve?"pointer":"not-allowed",accentColor:"#3F6972"}}),(0,l.jsx)("span",{style:{fontSize:"14px",color:"#0f172a"},children:e.label})]},e.value)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails Subject"}),(0,l.jsx)("input",{type:"text",id:"email_subject",name:"email_subject",value:V,onChange:function(e){return Z(e.target.value)},disabled:!ve,placeholder:w,style:{width:"100%",maxWidth:"500px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:0,fontSize:"13px",color:"#666"},children:"Subject of the email notification."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Emails Message"}),(0,l.jsxs)("div",{style:{maxWidth:"800px"},children:[(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)("div",{style:{padding:"12px",color:"#666"},children:"Loading editor..."}),children:(0,l.jsx)(y,{theme:"snow",value:ie,onChange:oe,readOnly:!ve,modules:{toolbar:[["bold","italic","underline","strike"],[{color:[]},{background:[]},"clean"],[{header:[1,2,3,4,!1]}],[{list:"ordered"},{list:"bullet"}],["link","image"],[{script:"sub"},{script:"super"}],[{align:[]}]]},formats:["bold","italic","underline","strike","color","background","header","list","bullet","link","image","script","align"],style:{backgroundColor:"#fff"}})}),(0,l.jsx)("input",{type:"hidden",name:"email_message",value:ie})]}),(0,l.jsxs)("p",{style:{marginTop:"8px",marginBottom:"12px",fontSize:"13px",color:"#666"},children:["Message body of the email notification. You can use placeholders like ","{file_name}",", ","{action}"," etc."]}),(0,l.jsxs)("div",{style:{background:"#f8f9fa",padding:"15px",borderRadius:"4px",border:"1px solid #e5e5e5",marginTop:"12px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:600,color:"#0f172a"},children:"Available placeholders:"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:Ce.map(function(e,t){return(0,l.jsxs)("div",{style:{fontSize:"13px",color:"#495057",lineHeight:"1.5"},children:[(0,l.jsx)("code",{style:{background:"#e9ecef",padding:"2px 6px",borderRadius:"3px",fontFamily:"monospace",fontSize:"12px",color:"#0f172a"},children:e.code}),(0,l.jsxs)("span",{style:{marginLeft:"8px"},children:["- ",e.desc]})]},t)})})]})]})]})]})}),"slack"===L&&(0,l.jsx)(r.A,{shouldShow:!ve||!_e,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:Ae?"30px":"0",paddingBottom:Ae?"15px":"0",borderBottom:Ae?"1px solid #e5e5e5":"none",gap:"80px"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,l.jsx)("img",{src:((null===(x=window.afmReact)||void 0===x?void 0:x.pluginUrl)||(null===(b=window.afm_object)||void 0===b?void 0:b.plugin_url)||"/wp-content/plugins/file-manager-advanced/")+"application/assets/images/slack_notification.svg",alt:"Slack Notifications",style:{width:"24px",height:"24px",flexShrink:0}}),(0,l.jsx)("h3",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"#0f172a"},children:"Slack Notifications"})]}),(0,l.jsx)("div",{style:{display:"flex",alignItems:"center",margin:0,padding:0},children:(0,l.jsx)(ze,{id:"slack_enable",name:"slack_enable",checked:Ae,disabled:!ve||!_e,onChange:function(e){var t=!X;J(t),Ie(null,{slack:{enable:t?"yes":"no"}})}})})]}),Pe&&(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"30px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Slack Webhook URL"}),(0,l.jsx)("input",{type:"url",id:"slack_webhook_url",name:"slack_webhook_url",value:ce,onChange:function(e){return de(e.target.value)},disabled:!ve||!_e,placeholder:"webhook.slack.com",style:{width:"100%",maxWidth:"600px",padding:"10px 12px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"14px"}}),(0,l.jsx)("p",{style:{marginTop:"8px",marginBottom:"4px",fontSize:"13px",color:"#666"},children:"Enable your Slack Webhook URL to receive notifications."}),(0,l.jsx)("a",{href:"https://slack.advancedfilemanager.com?install_application=true&redirect_to=".concat(encodeURIComponent("".concat(window.location.origin,"/wp-admin/admin.php?page=file_manager_advanced_ui#/notifications/slack"))),target:"_blank",rel:"noopener noreferrer",style:{fontSize:"13px",color:"#3F6972",textDecoration:"underline"},children:"Click here to get your webhook URL"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Events Notification"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:Oe.map(function(e){return(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:ve&&_e?"pointer":"not-allowed",opacity:ve&&_e?1:.5,userSelect:"none"},children:[(0,l.jsx)("input",{type:"checkbox",name:"slack_events[]",value:e.value,checked:he.includes(e.value),onChange:function(t){t.target.checked?ge([].concat(s(he),[e.value])):ge(he.filter(function(t){return t!==e.value}))},disabled:!ve||!_e,style:{marginRight:"10px",width:"18px",height:"18px",cursor:ve?"pointer":"not-allowed",accentColor:"#3F6972"}}),(0,l.jsx)("span",{style:{fontSize:"14px",color:"#0f172a"},children:e.label})]},e.value)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h4",{style:{marginBottom:"12px",fontSize:"16px",fontWeight:600,color:"#0f172a"},children:"Slack Message"}),(0,l.jsxs)("div",{style:{maxWidth:"800px"},children:[(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)("div",{style:{padding:"12px",color:"#666"},children:"Loading editor..."}),children:(0,l.jsx)(y,{theme:"snow",value:re,onChange:le,readOnly:!ve||!_e,modules:{toolbar:[["bold","italic","underline","strike"],[{color:[]},{background:[]},"clean"],[{header:[1,2,3,4,!1]}],[{list:"ordered"},{list:"bullet"}],["link","image"],[{script:"sub"},{script:"super"}],[{align:[]}]]},formats:["bold","italic","underline","strike","color","background","header","list","bullet","link","image","script","align"],style:{backgroundColor:"#fff"}})}),(0,l.jsx)("input",{type:"hidden",name:"slack_message",value:re})]}),(0,l.jsxs)("p",{style:{marginTop:"8px",marginBottom:"12px",fontSize:"13px",color:"#666"},children:["Customize the message to be sent to Slack. You can use placeholders like ","{file_name}",", ","{action}",", etc."]}),(0,l.jsxs)("div",{style:{background:"#f8f9fa",padding:"15px",borderRadius:"4px",border:"1px solid #e5e5e5",marginTop:"12px"},children:[(0,l.jsx)("p",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:600,color:"#0f172a"},children:"Available placeholders:"}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:Ce.map(function(e,t){return(0,l.jsxs)("div",{style:{fontSize:"13px",color:"#495057",lineHeight:"1.5"},children:[(0,l.jsx)("code",{style:{background:"#e9ecef",padding:"2px 6px",borderRadius:"3px",fontFamily:"monospace",fontSize:"12px",color:"#0f172a"},children:e.code}),(0,l.jsxs)("span",{style:{marginLeft:"8px"},children:["- ",e.desc]})]},t)})})]})]})]})]})}),Ne&&(0,l.jsx)("p",{className:"submit",style:{marginTop:"20px",paddingTop:"0"},children:(0,l.jsx)("input",{type:"submit",name:"submit",id:"submit",className:"button button-primary afm-teal-button",value:z?"Saving...":"Save Changes",disabled:z||!ve})})]})]})})}},8722(e,t,n){function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(l.push(i.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function a(){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 r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a(),o=n.endsWith("/")?n:"".concat(n,"/"),r=String(e||"").replace(/^\//,""),l=Object.entries(t).filter(function(e){var t=i(e,2)[1];return null!=t&&""!==t}).map(function(e){var t=i(e,2),n=t[0],o=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(o)))});if(o.includes("rest_route=")){var s="".concat(o.split("rest_route=")[0],"rest_route="),c="".concat(s,"/").concat(r);return l.length&&(c+="&".concat(l.join("&"))),c}if(o.includes("/wp-json")){var d=function(e){try{return new URL(e,window.location.origin).origin}catch(e){return window.location.origin}}(o),u="".concat(d,"/?rest_route=/").concat(r);return l.length&&(u+="&".concat(l.join("&"))),u}var f="".concat(o).concat(r);return l.length&&(f+="?".concat(l.join("&"))),f}n.d(t,{_H:()=>r,lA:()=>a})},5464(e,t,n){n.d(t,{w:()=>o});var i={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 o(e,t,n){return!!n&&"free"!==t&&!!i[t]&&!0===i[t][e]}}}]);
//# sourceMappingURL=707.8d3b4f81.chunk.js.map