- md5
- e37b29d21aef1890ed89c72ca1a3f1ca
- sha1
- 7303fc88048874cce319c755e79c7682ec8ff6bf
- sha256
- 5a1a3503f5521cb34c88220d1892846a0f735c15e6aaf128e4eb739ea594ab75
!function(){return function t(e,o,n){function r(s,u){if(!o[s]){if(!e[s]){var a="function"==typeof require&&require;if(!u&&a)return a(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=o[s]={exports:{}};e[s][0].call(c.exports,function(t){return r(e[s][1][t]||t)},c,c.exports,t,e,o,n)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}}()({1:[function(t,e,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return(r="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function i(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(o=t,-1===Function.toString.call(o).indexOf("[native code]")))return t;var o;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return a(t,arguments,c(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,t)})(t)}function a(t,e,o){return(a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,o){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return o&&l(r,o.prototype),r}).apply(null,arguments)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f;f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,c(e).apply(this,arguments))}var o,n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,u(HTMLElement)),o=e,r=[{key:"observedAttributes",get:function(){return["type","dismiss","acknowledge","href"]}}],(n=[{key:"connectedCallback",value:function(){this.setAttribute("role","alertdialog"),this.classList.add("joomla-alert--show"),this.type&&-1!==["info","warning","danger","success"].indexOf(this.type)||this.setAttribute("type","info"),(this.hasAttribute("dismiss")||this.hasAttribute("acknowledge")||this.hasAttribute("href")&&""!==this.getAttribute("href")&&!this.querySelector("button.joomla-alert--close")&&!this.querySelector("button.joomla-alert-button--close"))&&this.appendCloseButton(),this.dispatchCustomEvent("joomla.alert.show")}},{key:"disconnectedCallback",value:function(){this.removeEventListener("joomla.alert.show",this),this.removeEventListener("joomla.alert.close",this),this.removeEventListener("joomla.alert.closed",this),this.firstChild.tagName&&"button"===this.firstChild.tagName.toLowerCase()&&this.firstChild.removeEventListener("click",this)}},{key:"attributeChangedCallback",value:function(t,e,o){switch(t){case"type":(!o||o&&-1===["info","warning","danger","success"].indexOf(o))&&(this.type="info");break;case"dismiss":case"acknowledge":o&&"true"!==o?this.removeCloseButton():this.appendCloseButton();break;case"href":o&&""!==o?this.querySelector("button.joomla-alert-button--close")||this.appendCloseButton():this.removeCloseButton()}}},{key:"close",value:function(){var t=this;this.dispatchCustomEvent("joomla.alert.close"),this.addEventListener("transitionend",function(){t.dispatchCustomEvent("joomla.alert.closed"),t.parentNode.removeChild(t)},!1),this.classList.remove("joomla-alert--show")}},{key:"dispatchCustomEvent",value:function(t){var e=new CustomEvent(t);e.relatedTarget=this,this.dispatchEvent(e),this.removeEventListener(t,this)}},{key:"appendCloseButton",value:function(){if(!this.querySelector("button.joomla-alert--close")&&!this.querySelector("button.joomla-alert-button--close")){var t=this,e=document.createElement("button");this.hasAttribute("dismiss")?(e.classList.add("joomla-alert--close"),e.innerHTML='<span aria-hidden="true">×</span>',e.setAttribute("aria-label",this.getText("JCLOSE","Close"))):(e.classList.add("joomla-alert-button--close"),this.hasAttribute("acknowledge")?e.innerHTML=this.getText("JOK","ok"):e.innerHTML=this.getText("JOPEN","Open")),this.firstChild?this.insertBefore(e,this.firstChild):this.appendChild(e),e&&(this.href?e.addEventListener("click",function(){t.dispatchCustomEvent("joomla.alert.buttonClicked"),window.location.href=t.href,t.close()}):e.addEventListener("click",function(){t.dispatchCustomEvent("joomla.alert.buttonClicked"),t.getAttribute("data-callback")?(window[t.getAttribute("data-callback")](),t.close()):t.close()})),this.hasAttribute("auto-dismiss")&&setTimeout(function(){t.dispatchCustomEvent("joomla.alert.buttonClicked"),t.hasAttribute("data-callback")?window[t.getAttribute("data-callback")]():t.close()},parseInt(t.getAttribute("auto-dismiss"),10)?t.getAttribute("auto-dismiss"):3e3)}}},{key:"removeCloseButton",value:function(){var t=this.querySelector("button");t&&(t.removeEventListener("click",this),t.parentNode.removeChild(t))}},{key:"getText",value:function(t,e){return window.Joomla&&Joomla.JText&&Joomla.JText._&&"function"==typeof Joomla.JText._&&Joomla.JText._(t)?Joomla.JText._(t):e}},{key:"type",get:function(){return this.getAttribute("type")},set:function(t){return this.setAttribute("type",t)}},{key:"dismiss",get:function(){return this.getAttribute("dismiss")}},{key:"acknowledge",get:function(){return this.getAttribute("acknowledge")}},{key:"href",get:function(){return this.getAttribute("href")}}])&&i(o.prototype,n),r&&i(o,r),e}(),customElements.define("joomla-alert",f)},{}]},{},[1]);
No other release has this exact content. See every version of this file.