CoreFiles by mySites.guru
core-es5.min.js1 lines, 7,283 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
ce0223c777665e7fa47972b3c29d9dbd
sha1
1909034698b84427ed0dc43da8ea987de66a1d4c
sha256
be96ad589e94d371766adf0194351e4ccddc5d5575f5d56570ba4da463eb6af1
!function(){"use strict";const e=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),t=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/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 s=r.filter((e=>e instanceof RegExp));for(let e=0,t=s.length;e<t;e++)if(s[e].test(a))return!0;return!1};const r={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i,/^data-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[],button:["type"],input:["accept","alt","autocomplete","autofocus","capture","checked","dirname","disabled","height","list","max","maxlength","min","minlength","multiple","type","name","pattern","placeholder","readonly","required","size","src","step","value","width","inputmode"],select:["name"],textarea:["name"],option:["value","selected"]};window.Joomla=window.Joomla||{},window.Joomla.editors=window.Joomla.editors||{},window.Joomla.editors.instances=window.Joomla.editors.instances||{},window.Joomla.Modal=window.Joomla.Modal||{current:"",setCurrent: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,s=!0;for(n=0,a=o.elements.length;n<a;n++)if(r=o.elements[n],"checkbox"===r.type&&"checkall-toggle"!==r.name&&!r.checked){s=!1;break}o.elements["checkall-toggle"].checked=s},e.tableOrdering=(t,o,n,r)=>{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 s,l=0;if(!a)return!1;for(;s=r[`cb${l}`],s;)s.checked=!1,l+=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)}))};const t=[];let o=!1;e.request=n=>{const r=()=>{if(o||0===t.length)return;o=!0;const e=t.shift();e.xhr.send(e.data)};let a;const s=e.extend({url:"",method:"GET",data:null,perform:!0,queued:!1},n);try{if(a=new XMLHttpRequest,a.open(s.method,s.url,!0),a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.setRequestHeader("X-Ajax-Engine","Joomla!"),"GET"!==s.method){const t=e.getOptions("csrf.token","");t&&a.setRequestHeader("X-CSRF-Token",t),"string"!=typeof s.data||s.headers&&s.headers["Content-Type"]||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(s.headers&&[].slice.call(Object.keys(s.headers)).forEach((e=>{"Content-Type"===e&&"false"===s.headers["Content-Type"]||a.setRequestHeader(e,s.headers[e])})),a.onreadystatechange=()=>{4===a.readyState&&(s.queued&&(o=!1,r()),200===a.status?s.onSuccess&&s.onSuccess.call(window,a.responseText,a):s.onError&&s.onError.call(window,a),s.onComplete&&s.onComplete.call(window,a))},s.perform&&!s.queued){if(s.onBefore&&!1===s.onBefore.call(window,a))return a;a.send(s.data)}s.queued&&(t.push({xhr:a,data:s.data}),r())}catch(e){return window.console&&console.log(e),!1}return a},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=[].concat(...r.body.querySelectorAll("*"));for(let e=0,o=a.length;e<o;e++){const o=a[e],r=o.nodeName.toLowerCase();if(!Object.keys(t).includes(r)){o.remove();continue}const s=[].concat(...o.attributes),l=[].concat(t["*"]||[],t[r]||[]);s.forEach((e=>{n(e,l)||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)} <em>${t.responseJSON.message}</em>`]:t.statusText?n.error=[`${e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)} <em>${t.statusText}</em>`]:n.error=[e.Text._("JLIB_JS_AJAX_ERROR_OTHER").replace("%s",t.status)];return n}})(Joomla)}();

The same content is in 2 releases, Joomla 4.2.0-beta2 to 4.2.0-beta3. See them all, or every version of this file.