芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media/system/js/core-es5.min.js
!function(){"use strict";const e=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),t=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,n=(n,r)=>{const a=n.nodeName.toLowerCase();if(r.includes(a))return!e.has(a)||Boolean(t.test(n.nodeValue)||o.test(n.nodeValue));const l=r.filter((e=>e instanceof RegExp));for(let e=0,t=l.length;e
{window.Joomla.current=e},getCurrent:()=>window.Joomla.current},(e=>{e.extend=(e,t)=>{let o=e;return null===e&&(o={}),[].slice.call(Object.keys(t)).forEach((e=>{o[e]=t[e]})),e},e.optionsStorage=e.optionsStorage||null,e.getOptions=(t,o)=>(e.optionsStorage||e.loadOptions(),void 0!==e.optionsStorage[t]?e.optionsStorage[t]:o),e.loadOptions=t=>{if(!t){const t=[].slice.call(document.querySelectorAll(".joomla-script-options.new"));let o=0;if(t.forEach((t=>{const n=t.text||t.textContent,r=JSON.parse(n);r&&(e.loadOptions(r),o+=1),t.className=t.className.replace(" new"," loaded")})),o)return}e.optionsStorage?t&&[].slice.call(Object.keys(t)).forEach((o=>{null!==t[o]&&"object"==typeof e.optionsStorage[o]&&"object"==typeof t[o]?e.optionsStorage[o]=e.extend(e.optionsStorage[o],t[o]):e.optionsStorage[o]=t[o]})):e.optionsStorage=t||{}},e.Text={strings:{},_:(t,o)=>{let n=t,r=o;const a=e.getOptions("joomla.jtext");return a&&(e.Text.load(a),e.loadOptions({"joomla.jtext":null})),r=void 0===r?n:r,n=n.toUpperCase(),void 0!==e.Text.strings[n]?e.Text.strings[n]:r},load:t=>([].slice.call(Object.keys(t)).forEach((o=>{e.Text.strings[o.toUpperCase()]=t[o]})),e.Text)},e.JText=e.Text,e.submitform=(e,t,o)=>{let n=t;const r=e;n||(n=document.getElementById("adminForm")),r&&(n.task.value=r),n.noValidate=!o,o?n.hasAttribute("novalidate")&&n.removeAttribute("novalidate"):n.setAttribute("novalidate","");const a=document.createElement("input");a.classList.add("hidden"),a.type="submit",n.appendChild(a).click(),n.removeChild(a)},e.submitbutton=(t,o,n)=>{let r=document.querySelector(o||"form.form-validate"),a=n;if("string"==typeof o&&null===r&&(r=document.querySelector(`#${o}`)),r){if(null==a){const e=t.split(".");let o=r.getAttribute("data-cancel-task");o||(o=`${e[0]}.cancel`),a=t!==o}a&&!document.formvalidator.isValid(r)||e.submitform(t,r)}else e.submitform(t)},e.checkAll=(e,t)=>{if(!e.form)return!1;const o=t||"cb",n=[].slice.call(e.form.elements);let r=0;return n.forEach((t=>{t.type===e.type&&0===t.id.indexOf(o)&&(t.checked=e.checked,r+=t.checked?1:0)})),e.form.boxchecked&&(e.form.boxchecked.value=r,e.form.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))),!0},e.isChecked=(e,t)=>{let o=t;if(void 0===o?o=document.getElementById("adminForm"):"string"==typeof t&&(o=document.getElementById(t)),o.boxchecked.value=e?parseInt(o.boxchecked.value,10)+1:parseInt(o.boxchecked.value,10)-1,o.boxchecked.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),!o.elements["checkall-toggle"])return;let n,r,a,l=!0;for(n=0,a=o.elements.length;n
{let a=r;void 0===a?a=document.getElementById("adminForm"):"string"==typeof r&&(a=document.getElementById(r)),a.filter_order.value=t,a.filter_order_Dir.value=o,e.submitform(n,a)},e.listItemTask=(t,o,n=null)=>{let r=n;r=null!==n?document.getElementById(n):document.adminForm;const a=r[t];let l,s=0;if(!a)return!1;for(;l=r[`cb${s}`],l;)l.checked=!1,s+=1;return a.checked=!0,r.boxchecked.value=1,e.submitform(o,r),!1},e.replaceTokens=e=>{if(!/^[0-9A-F]{32}$/i.test(e))return;[].slice.call(document.getElementsByTagName("input")).forEach((t=>{"hidden"===t.type&&"1"===t.value&&32===t.name.length&&(t.name=e)}))},e.request=t=>{let o;const n=e.extend({url:"",method:"GET",data:null,perform:!0},t);try{if(o=new XMLHttpRequest,o.open(n.method,n.url,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==n.method){const t=e.getOptions("csrf.token","");t&&o.setRequestHeader("X-CSRF-Token",t),"string"!=typeof n.data||n.headers&&n.headers["Content-Type"]||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(n.headers&&[].slice.call(Object.keys(n.headers)).forEach((e=>{"Content-Type"===e&&"false"===n.headers["Content-Type"]||o.setRequestHeader(e,n.headers[e])})),o.onreadystatechange=()=>{4===o.readyState&&(200===o.status?n.onSuccess&&n.onSuccess.call(window,o.responseText,o):n.onError&&n.onError.call(window,o),n.onComplete&&n.onComplete.call(window,o))},n.perform){if(n.onBefore&&!1===n.onBefore.call(window,o))return o;o.send(n.data)}}catch(e){return window.console&&console.log(e),!1}return o},e.sanitizeHtml=(e,t,o)=>function(e,t,o){if(!e.length)return e;if(o&&"function"==typeof o)return o(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),a=Object.keys(t),l=[].concat(...r.body.querySelectorAll("*"));for(let e=0,o=l.length;e
{n(e,c)||o.removeAttribute(e.nodeName)}))}return r.body.innerHTML}(e,null==t?r:{...r,...t},o),e.ajaxErrorsMessages=(t,o)=>{const n={};if("parsererror"===o){const o=[];let r=t.responseText.trim();for(let e=r.length-1;e>=0;e--)o.unshift(["",r[e].charCodeAt(),";"].join(""));r=o.join(""),n.error=[e.Text._("JLIB_JS_AJAX_ERROR_PARSE").replace("%s",r)]}else"nocontent"===o?n.error=[e.Text._("JLIB_JS_AJAX_ERROR_NO_CONTENT")]:"timeout"===o?n.error=[e.Text._("JLIB_JS_AJAX_ERROR_TIMEOUT")]:"abort"===o?n.error=[e.Text._("JLIB_JS_AJAX_ERROR_CONNECTION_ABORT")]:t.responseJSON&&t.responseJSON.message?n.error=[`${e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)}
${t.responseJSON.message}
`]:t.statusText?n.error=[`${e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)}
${t.statusText}
`]:n.error=[e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return n}})(Joomla)}();