| 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 608.39a134fa.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunkafm_react_admin=self.webpackChunkafm_react_admin||[]).push([[608],{4608(e,t,n){n.r(t),n.d(t,{default:()=>p});var a=n(6540),r=n(961),o=n(5688),l=n(4848);function i(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,a,r,o){var i=a&&a.prototype instanceof s?a:s,u=Object.create(i.prototype);return c(u,"_invoke",function(n,a,r){var o,i,c,s=0,u=r||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return o=t,i=0,c=e,f.n=n,l}};function m(n,a){for(i=n,c=a,t=0;!d&&s&&!r&&t<u.length;t++){var r,o=u[t],m=f.p,h=o[2];n>3?(r=h===a)&&(c=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=e):o[0]<=m&&((r=n<2&&m<o[1])?(i=0,f.v=a,f.n=o[1]):m<h&&(r=n<3||o[0]>a||a>h)&&(o[4]=n,o[5]=a,f.n=h,i=0))}if(r||n>1)return l;throw d=!0,a}return function(r,u,h){if(s>1)throw TypeError("Generator is already running");for(d&&1===u&&m(u,h),i=u,c=h;(t=i<2?e:c)||!d;){o||(i?i<3?(i>1&&(f.n=-1),m(i,c)):f.n=c:f.v=c);try{if(s=2,o){if(i||(r="next"),t=o[r]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,i<2&&(i=0)}else 1===i&&(t=o.return)&&t.call(o),i<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),i=1);o=e}else if((t=(d=f.n<0)?c:n.call(a,f))!==l)break}catch(t){o=e,i=1,c=t}finally{s=1}}return{value:t,done:d}}}(n,r,o),!0),u}var l={};function s(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][a]?t(t([][a]())):(c(t={},a,function(){return this}),t),m=d.prototype=s.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,r,"GeneratorFunction")),e.prototype=Object.create(m),e}return u.prototype=d,c(m,"constructor",d),c(d,"constructor",u),u.displayName="GeneratorFunction",c(d,r,"GeneratorFunction"),c(m),c(m,r,"Generator"),c(m,a,function(){return this}),c(m,"toString",function(){return"[object Generator]"}),(i=function(){return{w:o,m:h}})()}function c(e,t,n,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}c=function(e,t,n,a){function o(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!a,configurable:!a,writable:!a}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},c(e,t,n,a)}function s(e,t,n,a,r,o,l){try{var i=e[o](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(a,r)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(a,r){var o=e.apply(t,n);function l(e){s(o,a,r,l,i,"next",e)}function i(e){s(o,a,r,l,i,"throw",e)}l(void 0)})}}function d(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 a,r,o,l,i=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}(e,t)||f(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 f(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,a=Array(t);n<t;n++)a[n]=e[n];return a}var h=[{value:"all",label:"All"},{value:"uploaded",label:"Uploaded"},{value:"created",label:"Created"},{value:"deleted",label:"Deleted"},{value:"renamed",label:"Renamed"},{value:"duplicated",label:"Duplicated"},{value:"pasted",label:"Pasted"},{value:"updated",label:"Updated"}];function p(){var e,t,n,c,s,p,g,v=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).onContentReady,y=(0,o.lA)(),b=(null===(e=window.wpApiSettings)||void 0===e?void 0:e.nonce)||(null===(t=window.afmReact)||void 0===t?void 0:t.nonce)||"",x=(null===(n=window.afmReact)||void 0===n?void 0:n.pluginUrl)||(null===(c=window.afm_object)||void 0===c?void 0:c.plugin_url)||"/wp-content/plugins/file-manager-advanced/",j="".concat(x,"application/assets/images/shell/"),w=d((0,a.useState)([]),2),N=w[0],k=w[1],S=d((0,a.useState)(!0),2),_=S[0],A=S[1];(0,a.useEffect)(function(){_||null==v||v()},[_,v]);var C=d((0,a.useState)(1),2),D=C[0],M=C[1],T=d((0,a.useState)(1),2),R=T[0],P=T[1],E=d((0,a.useState)(0),2),F=E[0],O=E[1],I=d((0,a.useState)("all"),2),L=I[0],Y=I[1],U=d((0,a.useState)(""),2),W=U[0],G=U[1],J=d((0,a.useState)(""),2),Q=J[0],$=J[1],B=d((0,a.useState)(""),2),H=B[0],X=B[1],z=d((0,a.useState)(null),2),V=z[0],Z=z[1],q=d((0,a.useState)([]),2),K=q[0],ee=q[1],te=d((0,a.useState)(null),2),ne=te[0],ae=te[1],re=(0,a.useRef)(!1),oe=function(e){var t,n=y.endsWith("/")?y:"".concat(y,"/");if(n.includes("rest_route=")){var a="".concat(n.split("rest_route=")[0],"rest_route=");t="".concat(a,"/file-manager-advanced/v1/file-logs&page=").concat(e,"&per_page=").concat(20)}else t="".concat(n,"file-manager-advanced/v1/file-logs?page=").concat(e,"&per_page=").concat(20);if(L&&"all"!==L&&(t+="&filter=".concat(encodeURIComponent(L))),Q&&"string"==typeof Q&&""!==Q.trim()){var r=Q.split(" - ");if(2===r.length){var o=r[0].trim(),l=r[1].trim();o.match(/^\d{4}-\d{2}-\d{2}$/)&&l.match(/^\d{4}-\d{2}-\d{2}$/)&&(t+="&date_range=".concat(encodeURIComponent(Q)))}}return t};(0,a.useEffect)(function(){y&&b?(A(!0),fetch(oe(D),{credentials:"same-origin",headers:{"X-WP-Nonce":b}}).then(function(e){return e.ok?e.json():e.text().then(function(){throw new Error("HTTP ".concat(e.status,": ").concat(e.statusText))})}).then(function(e){k(e.logs||[]),P(e.total_pages||1),O(Number(e.total||e.total_items||0)||0),ee([]),A(!1)}).catch(function(e){console.error("AFM Logs fetch error:",e),A(!1)})):console.warn("AFM Logs: Missing API root or nonce")},[D,L,Q,y,b]);var le=function(){var e=u(i().m(function e(t){var n,a,r;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=String(t||"")){e.n=1;break}return e.a(2,!1);case 1:if(e.p=1,!navigator.clipboard||!window.isSecureContext){e.n=3;break}return e.n=2,navigator.clipboard.writeText(n);case 2:return e.a(2,!0);case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.p=5,(a=document.createElement("textarea")).value=n,a.setAttribute("readonly",""),a.style.position="fixed",a.style.left="-9999px",a.style.opacity="0",document.body.appendChild(a),a.select(),r=document.execCommand("copy"),document.body.removeChild(a),e.a(2,r);case 6:return e.p=6,e.v,e.a(2,!1)}},e,null,[[5,6],[1,4]])}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=u(i().m(function e(t,n){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,le(t);case 1:e.v&&(ae(n),setTimeout(function(){return ae(null)},2e3));case 2:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ce=function(e){if(!e)return"—";var t=parseInt(e,10);if(!isNaN(t)&&t>0){var n=new Date(1e3*t);if(!isNaN(n.getTime())){var a=["January","February","March","April","May","June","July","August","September","October","November","December"][n.getMonth()],r=n.getDate(),o=n.getFullYear(),l=n.getHours(),i=n.getMinutes(),c=l>=12?"pm":"am";l=(l%=12)||12;var s=i<10?"0".concat(i):i;return"".concat(a," ").concat(r,", ").concat(o," ").concat(l,":").concat(s).concat(c)}}if("string"==typeof e){var u=new Date(e);if(!isNaN(u.getTime())){var d=["January","February","March","April","May","June","July","August","September","October","November","December"][u.getMonth()],f=u.getDate(),m=u.getFullYear(),h=u.getHours(),p=u.getMinutes(),g=h>=12?"pm":"am";h=(h%=12)||12;var v=p<10?"0".concat(p):p;return"".concat(d," ").concat(f,", ").concat(m," ").concat(h,":").concat(v).concat(g)}if(e.match(/[A-Za-z]+ \d+, \d{4}/))return e}return e};(0,a.useEffect)(function(){if(!_){var e=setTimeout(function(){if(void 0!==window.jQuery&&"function"==typeof window.jQuery.fn.daterangepicker){var e=window.jQuery("#date-range");e.length&&(e.data("daterangepicker")||(e.daterangepicker({autoUpdateInput:!1}),e.off("cancel.daterangepicker").on("cancel.daterangepicker",function(){e.val(""),$(""),X(""),M(1)}),e.off("apply.daterangepicker").on("apply.daterangepicker",function(t,n){var a="".concat(n.startDate.format("MM/DD/YYYY")," - ").concat(n.endDate.format("MM/DD/YYYY")),r="".concat(n.startDate.format("YYYY-MM-DD")," - ").concat(n.endDate.format("YYYY-MM-DD"));e.val(a),X(a),$(r),M(1)}),re.current=!0))}},200);return function(){return clearTimeout(e)}}},[_]),(0,a.useEffect)(function(){if(Q){var e=Q.split(" - ");if(2===e.length){var t=e[0].trim().split("-"),n=e[1].trim().split("-");3===t.length&&3===n.length&&X("".concat(t[1],"/").concat(t[2],"/").concat(t[0]," - ").concat(n[1],"/").concat(n[2],"/").concat(n[0]))}}else X("")},[Q]);var se,ue,de,fe=(null===(s=window.afmReact)||void 0===s?void 0:s.hasPro)||!1,me=(null===(p=window.afmReact)||void 0===p?void 0:p.currentPlan)||"free",he="boolean"==typeof(null===(g=window.afmReact)||void 0===g?void 0:g.hasFileLogs)?window.afmReact.hasFileLogs:fe&&"free"!==me,pe=!he,ge=pe?[{id:1001,user:"admin",email:"admin@example.com",time:(se=Math.floor(Date.now()/1e3))-3600,event:"Uploaded",file_path:"/wp-content/uploads/2024/11/demo-image.jpg",type:"Image",ip:"192.168.1.100"},{id:1002,user:"editor",email:"editor@example.com",time:se-7200,event:"Deleted",file_path:"/wp-content/uploads/old-document.pdf",type:"Document",ip:"192.168.1.101"},{id:1003,user:"admin",email:"admin@example.com",time:se-10800,event:"Created",file_path:"/wp-content/uploads/new-folder/",type:"Folder",ip:"192.168.1.100"},{id:1004,user:"author",email:"author@example.com",time:se-14400,event:"Renamed",file_path:"/wp-content/uploads/renamed-file.txt",type:"Text",ip:"192.168.1.102"},{id:1005,user:"admin",email:"admin@example.com",time:se-18e3,event:"Duplicated",file_path:"/wp-content/uploads/copy-of-file.png",type:"Image",ip:"192.168.1.100"}]:N,ve=W.trim().toLowerCase(),ye=ve?ge.filter(function(e){return[e.user,e.email,e.event,e.file_path,e.type,e.ip,String(e.id)].filter(Boolean).join(" ").toLowerCase().includes(ve)}):ge,be=ye.length>0&&ye.every(function(e){return K.includes(e.id)}),xe=F||(pe?ye.length:R>1?20*R:ye.length),je=0===ye.length?0:pe||ve?1:20*(D-1)+1,we=0===ye.length?0:pe||ve?ye.length:20*(D-1)+ye.length,Ne=function(){return(0,l.jsxs)("span",{className:"afm-logs-sort","aria-hidden":"true",children:[(0,l.jsx)("img",{src:"".concat(j,"logs-sort.svg"),alt:"",width:"12",height:"12"}),(0,l.jsx)("img",{src:"".concat(j,"logs-sort.svg"),alt:"",width:"12",height:"12",className:"afm-logs-sort__up"})]})};return _?(0,l.jsx)("div",{className:"afm-settings-shell",children:(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:"140px",borderRadius:"6px",marginBottom:"20px"}}),(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"42px",width:"100%",borderRadius:"6px",marginBottom:"20px"}}),[1,2,3,4,5].map(function(e){return(0,l.jsx)("div",{className:"afm-skeleton",style:{height:"48px",width:"100%",borderRadius:"4px",marginBottom:"8px"}},e)})]})})}):(0,l.jsx)("div",{className:"afm-settings-shell",children:(0,l.jsx)("div",{className:"afm-settings-body",children:(0,l.jsxs)("div",{className:"afm-settings-card afm-logs-card",children:[(0,l.jsx)("div",{className:"afm-logs-header",children:(0,l.jsx)("h2",{className:"afm-logs-title",children:"File Logs"})}),(0,l.jsxs)("div",{className:"afm-logs-toolbar",children:[(0,l.jsxs)("label",{className:"afm-logs-search",children:[(0,l.jsx)("img",{src:"".concat(j,"logs-search.svg"),alt:"",width:"13",height:"13"}),(0,l.jsx)("input",{type:"search",value:W,onChange:function(e){return G(e.target.value)},placeholder:"Search","aria-label":"Search logs"})]}),(0,l.jsxs)("div",{className:"afm-logs-toolbar__actions",children:[(0,l.jsx)("select",{className:"afm-logs-select",value:L,onChange:function(e){Y(e.target.value),M(1)},"aria-label":"Filter by event",children:h.map(function(e){return(0,l.jsx)("option",{value:e.value,children:e.label},e.value)})}),(0,l.jsx)("input",{type:"text",placeholder:"Date Range",className:"afm-logs-select afm-logs-daterange",id:"date-range",autoComplete:"off",readOnly:!0,value:H,"aria-label":"Date range"}),(0,l.jsxs)("button",{type:"button",className:"afm-logs-btn afm-logs-btn--reset",onClick:function(){Y("all"),G(""),$(""),X(""),M(1),void 0!==window.jQuery&&window.jQuery("#date-range").val("")},children:[(0,l.jsx)("span",{children:"Reset Filters"}),(0,l.jsx)("img",{src:"".concat(j,"logs-reset.svg"),alt:"",width:"14",height:"10"})]}),(0,l.jsxs)("button",{type:"button",className:"afm-logs-btn afm-logs-btn--danger",onClick:function(){if(window.confirm("Are you sure you want to delete ALL file logs? This action cannot be undone.")){var e=y.endsWith("/")?y:"".concat(y,"/");fetch("".concat(e,"file-manager-advanced/v1/file-logs/all"),{method:"DELETE",credentials:"same-origin",headers:{"X-WP-Nonce":b}}).then(function(e){return e.json()}).then(function(e){e.success&&(k([]),M(1),P(1),O(0),ee([]))}).catch(function(e){return console.error("AFM Logs delete all error:",e)})}},disabled:!he,title:he?"Delete all logs":"Pro feature - Upgrade to unlock",children:[(0,l.jsx)("span",{children:"Delete All"}),(0,l.jsx)("img",{src:"".concat(j,"logs-trash.svg"),alt:"",width:"11",height:"12"})]})]})]}),(0,l.jsx)("div",{className:"afm-logs-table-wrap",children:(0,l.jsxs)("table",{className:"afm-logs-table",children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{style:{width:"55px"}}),(0,l.jsx)("col",{style:{width:"80px"}}),(0,l.jsx)("col",{style:{width:"200px"}}),(0,l.jsx)("col",{style:{width:"200px"}}),(0,l.jsx)("col",{style:{width:"130px"}}),(0,l.jsx)("col",{style:{width:"150px"}}),(0,l.jsx)("col",{style:{width:"150px"}}),(0,l.jsx)("col",{style:{width:"100px"}}),(0,l.jsx)("col",{style:{width:"135px"}})]}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"afm-logs-col-check",scope:"col",children:(0,l.jsx)("input",{type:"checkbox",checked:be,onChange:function(){ee(be?function(e){return e.filter(function(e){return!ye.some(function(t){return t.id===e})})}:function(e){var t=new Set(e);return ye.forEach(function(e){return t.add(e.id)}),Array.from(t)})},disabled:0===ye.length,"aria-label":"Select all logs"})}),(0,l.jsxs)("th",{className:"afm-logs-col-id",scope:"col",children:[(0,l.jsx)("span",{children:"ID"})," ",(0,l.jsx)(Ne,{})]}),(0,l.jsxs)("th",{className:"afm-logs-col-user",scope:"col",children:[(0,l.jsx)("span",{children:"User"})," ",(0,l.jsx)(Ne,{})]}),(0,l.jsxs)("th",{className:"afm-logs-col-datetime",scope:"col",children:[(0,l.jsx)("span",{children:"Date & Time"})," ",(0,l.jsx)(Ne,{})]}),(0,l.jsxs)("th",{className:"afm-logs-col-event",scope:"col",children:[(0,l.jsx)("span",{children:"Event"})," ",(0,l.jsx)(Ne,{})]}),(0,l.jsxs)("th",{className:"afm-logs-col-path",scope:"col",children:[(0,l.jsx)("span",{children:"File Path"})," ",(0,l.jsx)(Ne,{})]}),(0,l.jsx)("th",{className:"afm-logs-col-type",scope:"col",children:"Type"}),(0,l.jsx)("th",{className:"afm-logs-col-created",scope:"col",children:"Created At"}),(0,l.jsx)("th",{className:"afm-logs-col-actions",scope:"col",children:"Actions"})]})}),(0,l.jsx)("tbody",{children:0===ye.length?(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:"9",className:"afm-logs-empty",children:"No logs found."})}):ye.map(function(e){return(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:"afm-logs-col-check",children:(0,l.jsx)("input",{type:"checkbox",checked:K.includes(e.id),onChange:function(){return t=e.id,void ee(function(e){return e.includes(t)?e.filter(function(e){return e!==t}):[].concat(function(e){if(Array.isArray(e))return m(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||f(n)||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.")}(),[t]);var n});var t},"aria-label":"Select log ".concat(e.id)})}),(0,l.jsx)("td",{className:"afm-logs-col-id",children:e.id}),(0,l.jsx)("td",{className:"afm-logs-col-user",children:(0,l.jsxs)("div",{className:"afm-logs-user",children:[(0,l.jsx)("span",{className:"afm-logs-user__name",children:e.user||"—"}),e.email?(0,l.jsx)("span",{className:"afm-logs-user__email",children:e.email}):null]})}),(0,l.jsx)("td",{className:"afm-logs-col-datetime",children:ce(e.time)||"—"}),(0,l.jsx)("td",{className:"afm-logs-col-event",children:e.event||"—"}),(0,l.jsx)("td",{className:"afm-logs-col-path",children:(0,l.jsxs)("div",{className:"afm-logs-path",children:[(0,l.jsx)("span",{className:"afm-logs-path__text",title:e.file_path||"",children:e.file_path||"—"}),e.file_path?(0,l.jsx)("button",{type:"button",className:"afm-logs-icon-btn",onClick:function(){return ie(e.file_path,e.id)},title:ne===e.id?"Copied!":"Copy file path",children:ne===e.id?(0,l.jsx)("span",{className:"dashicons dashicons-yes"}):(0,l.jsx)("img",{src:"".concat(j,"logs-copy.svg"),alt:"",width:"14",height:"14"})}):null]})}),(0,l.jsx)("td",{className:"afm-logs-col-type",children:e.type||"—"}),(0,l.jsx)("td",{className:"afm-logs-col-created",children:e.ip||"—"}),(0,l.jsx)("td",{className:"afm-logs-col-actions",children:(0,l.jsxs)("div",{className:"afm-logs-row-actions",children:[(0,l.jsx)("button",{type:"button",className:"afm-logs-icon-btn",disabled:!he,onClick:function(){return he&&Z(e)},title:he?"View details":"View details (Pro feature)",children:(0,l.jsx)("img",{src:"".concat(j,"logs-view.svg"),alt:"",width:"14",height:"14","aria-hidden":"true"})}),(0,l.jsx)("button",{type:"button",className:"afm-logs-icon-btn",disabled:!he,onClick:function(){return he&&function(e){if(window.confirm("Are you sure you want to delete this file log?")){var t=y.endsWith("/")?y:"".concat(y,"/");fetch("".concat(t,"file-manager-advanced/v1/file-logs/").concat(e),{method:"DELETE",credentials:"same-origin",headers:{"X-WP-Nonce":b}}).then(function(e){return e.json()}).then(function(e){return e.success?fetch(oe(D),{credentials:"same-origin",headers:{"X-WP-Nonce":b}}):null}).then(function(e){return e&&e.ok?e.json():null}).then(function(t){t&&(k(t.logs||[]),P(t.total_pages||1),O(Number(t.total||t.total_items||0)||0),ee(function(t){return t.filter(function(t){return String(t)!==String(e)})}))}).catch(function(e){return console.error("AFM Logs delete error:",e)})}}(e.id)},title:he?"Delete log":"Delete log (Pro feature)",children:(0,l.jsx)("img",{src:"".concat(j,"logs-row-trash.svg"),alt:"",width:"14",height:"14"})})]})})]},e.id)})})]})}),(0,l.jsxs)("div",{className:"afm-logs-pagination",children:[(0,l.jsx)("button",{type:"button",className:"afm-logs-page-btn",disabled:pe||D<=1,onClick:function(){return M(1)},"aria-label":"First page",children:"«"}),(0,l.jsx)("button",{type:"button",className:"afm-logs-page-btn",disabled:pe||D<=1,onClick:function(){return M(D-1)},"aria-label":"Previous page",children:"‹"}),(0,l.jsxs)("span",{className:"afm-logs-page-meta",children:[je,"-",we," of ",xe||we]}),(0,l.jsx)("button",{type:"button",className:"afm-logs-page-btn",disabled:pe||D>=R,onClick:function(){return M(D+1)},"aria-label":"Next page",children:"›"}),(0,l.jsx)("button",{type:"button",className:"afm-logs-page-btn",disabled:pe||D>=R,onClick:function(){return M(R)},"aria-label":"Last page",children:"»"})]}),V&&(0,r.createPortal)((0,l.jsx)("div",{className:"afm-log-detail-modal",onClick:function(){return Z(null)},children:(0,l.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"afm-log-detail-title",className:"afm-log-detail-dialog",onClick:function(e){return e.stopPropagation()},children:[(0,l.jsx)("button",{type:"button",className:"afm-log-detail-close",onClick:function(){return Z(null)},"aria-label":"Close log details",children:"×"}),(0,l.jsx)("h3",{id:"afm-log-detail-title",children:"Log Detail"}),(0,l.jsx)("p",{className:"afm-log-detail-body",children:(ue=V.message,de=String(ue||"").trim(),de?de.split(/(\*\*\*.*?\*\*\*)/g).map(function(e,t){var n=e.match(/^\*\*\*(.*?)\*\*\*$/);return n?(0,l.jsx)("strong",{style:{fontWeight:700},children:n[1]},t):(0,l.jsx)(a.Fragment,{children:e},t)}):"No details available.")})]})}),document.body)]})})})}},5688(e,t,n){function a(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 a,r,o,l,i=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.call(n)).done)&&(i.push(a.value),i.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(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)?r(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 r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function o(){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]:{},n=o(),r=n.endsWith("/")?n:"".concat(n,"/"),l=String(e||"").replace(/^\//,""),i=Object.entries(t).filter(function(e){var t=a(e,2)[1];return null!=t&&""!==t}).map(function(e){var t=a(e,2),n=t[0],r=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))});if(r.includes("rest_route=")){var c="".concat(r.split("rest_route=")[0],"rest_route="),s="".concat(c,"/").concat(l);return i.length&&(s+="&".concat(i.join("&"))),s}if(r.includes("/wp-json")){var u=function(e){try{return new URL(e,window.location.origin).origin}catch(e){return window.location.origin}}(r),d="".concat(u,"/?rest_route=/").concat(l);return i.length&&(d+="&".concat(i.join("&"))),d}var f="".concat(r).concat(l);return i.length&&(f+="?".concat(i.join("&"))),f}n.d(t,{_H:()=>l,lA:()=>o})}}]);
//# sourceMappingURL=608.39a134fa.chunk.js.map