!function(){"use strict";function e(){e=function(){return n};var t,n={},i=Object.prototype,r=i.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(t){u=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var r=t&&t.prototype instanceof y?t:y,o=Object.create(r.prototype),l=new D(i||[]);return a(o,"_invoke",{value:_(e,n,l)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var p="suspendedStart",f="suspendedYield",m="executing",g="completed",v={};function y(){}function b(){}function x(){}var k={};u(k,l,(function(){return this}));var w=Object.getPrototypeOf,L=w&&w(w(O([])));L&&L!==i&&r.call(L,l)&&(k=L);var E=x.prototype=y.prototype=Object.create(k);function F(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function J(e,t){function n(i,a,o,l){var s=h(e[i],e,a);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,l)}))}l(s.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function _(e,n,i){var r=p;return function(a,o){if(r===m)throw new Error("Generator is already running");if(r===g){if("throw"===a)throw o;return{value:t,done:!0}}for(i.method=a,i.arg=o;;){var l=i.delegate;if(l){var s=A(l,i);if(s){if(s===v)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===p)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=h(e,n,i);if("normal"===c.type){if(r=i.done?g:f,c.arg===v)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=g,i.method="throw",i.arg=c.arg)}}}function A(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),v;var a=h(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function O(e){if(e||""===e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return b.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=u(x,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},n.awrap=function(e){return{__await:e}},F(J.prototype),u(J.prototype,s,(function(){return this})),n.AsyncIterator=J,n.async=function(e,t,i,r,a){void 0===a&&(a=Promise);var o=new J(d(e,t,i,r),a);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},F(E),u(E,c,"Generator"),u(E,l,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},n.values=O,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(i,r){return l.type="throw",l.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:O(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),v}},n}function t(e,t,n,i,r,a,o){try{var l=e[a](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(i,r)}function n(e){return function(){var n=this,i=arguments;return new Promise((function(r,a){var o=e.apply(n,i);function l(e){t(o,r,a,l,s,"next",e)}function s(e){t(o,r,a,l,s,"throw",e)}l(void 0)}))}}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,a=void 0,"symbol"==typeof(a=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?a:String(a)),i)}var r,a}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function o(e,t,n){return o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&a(r,n.prototype),r},o.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return o(e,arguments,r(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),a(i,e)},l(e)}if(!Joomla)throw new Error("Joomla API is not properly initiated");Joomla.selectedMediaFile={};var s=Joomla.getOptions("media-picker",{});if(!Object.keys(s).length)throw new Error("No supported extensions provided");document.addEventListener("onMediaFileSelected",function(){var t=n(e().mark((function t(n){var i,r,a,o,l,c,u,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Joomla.selectedMediaFile=n.detail,i=Joomla.Modal.getCurrent(),r=i.querySelector(".modal-body")){e.next=5;break}return e.abrupt("return");case 5:if((a=r.querySelector("joomla-field-mediamore"))&&a.parentNode.removeChild(a),!r.closest("joomla-field-media")){e.next=9;break}return e.abrupt("return");case 9:o=s.images,l=s.audios,c=s.videos,u=s.documents,Joomla.selectedMediaFile.path&&(o.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="images":l.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="audios":c.includes(Joomla.selectedMediaFile.extension.toLowerCase())?d="videos":u.includes(Joomla.selectedMediaFile.extension.toLowerCase())&&(d="documents"),d&&r.insertAdjacentHTML("afterbegin",'<joomla-field-mediamore\n parent-id="'+i.id+'"\n type="'+d+'"\n summary-label="'+Joomla.Text._("JFIELD_MEDIA_SUMMARY_LABEL")+'"\n lazy-label="'+Joomla.Text._("JFIELD_MEDIA_LAZY_LABEL")+'"\n alt-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_LABEL")+'"\n alt-check-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_CHECK_LABEL")+'"\n alt-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_ALT_CHECK_DESC_LABEL")+'"\n classes-label="'+Joomla.Text._("JFIELD_MEDIA_CLASS_LABEL")+'"\n figure-classes-label="'+Joomla.Text._("JFIELD_MEDIA_FIGURE_CLASS_LABEL")+'"\n figure-caption-label="'+Joomla.Text._("JFIELD_MEDIA_FIGURE_CAPTION_LABEL")+'"\n embed-check-label="'+Joomla.Text._("JFIELD_MEDIA_EMBED_CHECK_LABEL")+'"\n embed-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_EMBED_CHECK_DESC_LABEL")+'"\n download-check-label="'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_CHECK_LABEL")+'"\n download-check-desc-label="'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_CHECK_DESC_LABEL")+'"\n title-label="'+Joomla.Text._("JFIELD_MEDIA_TITLE_LABEL")+'"\n width-label="'+Joomla.Text._("JFIELD_MEDIA_WIDTH_LABEL")+'"\n height-label="'+Joomla.Text._("JFIELD_MEDIA_HEIGHT_LABEL")+'"\n></joomla-field-mediamore>\n'));case 11:case"end":return e.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());var c=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},u=function(e){return new Promise((function(t,n){var i=new Image;i.src=e,i.onload=function(){Joomla.selectedMediaFile.width=i.width,Joomla.selectedMediaFile.height=i.height,t(!0)},i.onerror=function(){n(!1)}}))},d=function(){var t=n(e().mark((function t(n,i,r){var a,o,l,s,d,h,p,f,m,g,v,y;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.url?(a=Joomla.getOptions("system.paths"),o=a.rootFull,(l=n.url.split(o)).length>1?(Joomla.selectedMediaFile.url=l[1],n.thumb_path?Joomla.selectedMediaFile.thumb=n.thumb_path:Joomla.selectedMediaFile.thumb=!1):n.thumb_path&&(Joomla.selectedMediaFile.url=n.url,Joomla.selectedMediaFile.thumb=n.thumb_path)):Joomla.selectedMediaFile.url=!1,!Joomla.selectedMediaFile.url){e.next=47;break}if(d="",h="",p="",f="",m="",g="",v="",c(i)){e.next=35;break}if(y=r.closest(".modal-content"),!(s=y.querySelector("joomla-field-mediamore"))){e.next=30;break}if("true"===s.getAttribute("alt-check")&&(p=' alt=""'),h=s.getAttribute("alt-value")?' alt="'+s.getAttribute("alt-value")+'"':p,f=s.getAttribute("img-classes")?' class="'+s.getAttribute("img-classes")+'"':"",m=s.getAttribute("fig-classes")?' class="image '+s.getAttribute("fig-classes")+'"':' class="image"',g=s.getAttribute("fig-caption")?""+s.getAttribute("fig-caption"):"","true"!==s.getAttribute("is-lazy")){e.next=30;break}if(d=' loading="lazy" width="'+Joomla.selectedMediaFile.width+'" height="'+Joomla.selectedMediaFile.height+'"',0!==Joomla.selectedMediaFile.width&&0!==Joomla.selectedMediaFile.height){e.next=30;break}return e.prev=21,e.next=24,u(Joomla.selectedMediaFile.url);case 24:d=' loading="lazy" width="'+Joomla.selectedMediaFile.width+'" height="'+Joomla.selectedMediaFile.height+'"',e.next=30;break;case 27:e.prev=27,e.t0=e.catch(21),d="";case 30:v=g?"<figure"+m+'><img src="'+Joomla.selectedMediaFile.url+'"'+f+d+h+' data-path="'+Joomla.selectedMediaFile.path+'"/><figcaption>'+g+"</figcaption></figure>":'<img src="'+Joomla.selectedMediaFile.url+'"'+f+d+h+' data-path="'+Joomla.selectedMediaFile.path+'"/>',s&&s.parentNode.removeChild(s),Joomla.editors.instances[i].replaceSelection(v),e.next=47;break;case 35:if(0!==Joomla.selectedMediaFile.width&&0!==Joomla.selectedMediaFile.height){e.next=45;break}return e.prev=36,e.next=39,u(Joomla.selectedMediaFile.url);case 39:e.next=45;break;case 41:e.prev=41,e.t1=e.catch(36),Joomla.selectedMediaFile.height=0,Joomla.selectedMediaFile.width=0;case 45:r.markValid(),r.setValue(Joomla.selectedMediaFile.url+"#joomlaImage://"+n.path.replace(":","")+"?width="+Joomla.selectedMediaFile.width+"&height="+Joomla.selectedMediaFile.height);case 47:case"end":return e.stop()}}),t,null,[[21,27],[36,41]])})));return function(e,n,i){return t.apply(this,arguments)}}(),h=function(e,t,n,i){if(e.url){var r=Joomla.getOptions("system.paths").rootFull,a=e.url.split(r);a.length>1?Joomla.selectedMediaFile.url=a[1]:Joomla.selectedMediaFile.url=e.url}else Joomla.selectedMediaFile.url=!1;var o;if(Joomla.selectedMediaFile.url)if(c(t))n.markValid(),n.givenType=i,n.setValue(Joomla.selectedMediaFile.url);else{var l;if(o=n.closest(".modal-content").querySelector("joomla-field-mediamore")){var s=o.getAttribute("embed-it");if(s&&"true"===s){if("audios"===i&&(l='<audio controls src="'+Joomla.selectedMediaFile.url+'"></audio>'),"documents"===i){var u=o.getAttribute("title");l='<object type="application/'+Joomla.selectedMediaFile.extension+'" data="'+Joomla.selectedMediaFile.url+'" '+(u?'title="'+u+'"':"")+' width="'+o.getAttribute("width")+'" height="'+o.getAttribute("height")+'">\n '+Joomla.Text._("JFIELD_MEDIA_UNSUPPORTED").replace("{tag}",'<a download href="'+Joomla.selectedMediaFile.url+'">').replace(/{extension}/g,Joomla.selectedMediaFile.extension)+"\n</object>"}"videos"===i&&(l='<video controls width="'+o.getAttribute("width")+'" height="'+o.getAttribute("height")+'">\n <source src="'+Joomla.selectedMediaFile.url+'" type="'+Joomla.selectedMediaFile.fileType+'">\n</video>')}else if(""!==Joomla.editors.instances[t].getSelection())l='<a download href="'+Joomla.selectedMediaFile.url+'">'+Joomla.editors.instances[t].getSelection()+"</a>";else{var d=/([\w-]+)\./.exec(Joomla.selectedMediaFile.url);l='<a download href="'+Joomla.selectedMediaFile.url+'">'+Joomla.Text._("JFIELD_MEDIA_DOWNLOAD_FILE").replace("{file}",d[1])+"</a>"}}o&&o.parentNode.removeChild(o),Joomla.editors.instances[t].replaceSelection(l)}},p=function(){var t=n(e().mark((function t(n,i,r){var a,o,l,c,u;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==n.success){e.next=12;break}if(a=n.data[0],o=s.images,l=s.audios,c=s.videos,u=s.documents,!Joomla.selectedMediaFile.extension||!o.includes(a.extension.toLowerCase())){e.next=5;break}return e.abrupt("return",d(a,i,r));case 5:if(!Joomla.selectedMediaFile.extension||!l.includes(a.extension.toLowerCase())){e.next=7;break}return e.abrupt("return",h(a,i,r,"audios"));case 7:if(!Joomla.selectedMediaFile.extension||!u.includes(a.extension.toLowerCase())){e.next=9;break}return e.abrupt("return",h(a,i,r,"documents"));case 9:if(!Joomla.selectedMediaFile.extension||!c.includes(a.extension.toLowerCase())){e.next=11;break}return e.abrupt("return",h(a,i,r,"videos"));case 11:case 12:return e.abrupt("return","");case 13:case"end":return e.stop()}}),t)})));return function(e,n,i){return t.apply(this,arguments)}}();Joomla.getMedia=function(t,i,r){return new Promise((function(a,o){if(!t||"object"==typeof t&&(!t.path||""===t.path))return Joomla.selectedMediaFile={},void a({resp:{success:!1}});var l=new URL(Joomla.getOptions("media-picker-api").apiBaseUrl?Joomla.getOptions("media-picker-api").apiBaseUrl:Joomla.getOptions("system.paths").baseFull+"index.php?option=com_media&format=json");l.searchParams.append("task","api.files"),l.searchParams.append("url",!0),l.searchParams.append("path",t.path),l.searchParams.append("mediatypes","0,1,2,3"),l.searchParams.append(Joomla.getOptions("csrf.token"),1),fetch(l,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()})).then(function(){var t=n(e().mark((function t(n){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=a,e.next=3,p(n,i,r);case 3:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 5:case"end":return e.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){return o(e)}))}))},Joomla.getImage=Joomla.getMedia;var f=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var o,l,s,c=r.prototype;return c.connectedCallback=function(){var e=this;"images"===this.type?(this.innerHTML="<details open>\n<summary>"+this.summarytext+'</summary>\n<div class="">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-alt">'+this.alttext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-alt" data-is="alt-value" />\n </div>\n </div>\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input" type="checkbox" id="'+this.parentId+'-alt-check">\n <label class="form-check-label" for="'+this.parentId+'-alt-check">'+this.altchecktext+'</label>\n <div><small class="form-text">'+this.altcheckdesctext+'</small></div>\n </div>\n </div>\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input" type="checkbox" id="'+this.parentId+'-lazy" checked>\n <label class="form-check-label" for="'+this.parentId+'-lazy">'+this.lazytext+'</label>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-classes">'+this.classestext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-classes" data-is="img-classes"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-figclasses">'+this.figclassestext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-figclasses" data-is="fig-classes"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-figcaption">'+this.figcaptiontext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-figcaption" data-is="fig-caption"/>\n </div>\n </div>\n</div>\n</details>',this.lazyInputFn=this.lazyInputFn.bind(this),this.altCheckFn=this.altCheckFn.bind(this),this.inputFn=this.inputFn.bind(this),this.lazyInput=this.querySelector("#"+this.parentId+"-lazy"),this.lazyInput.addEventListener("change",this.lazyInputFn),this.altCheck=this.querySelector("#"+this.parentId+"-alt-check"),this.altCheck.addEventListener("input",this.altCheckFn),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){t.addEventListener("input",e.inputFn);var n=t.dataset.is;return n&&e.setAttribute(n,t.value.replace(/"/g,""")),t})),this.setAttribute("is-lazy",!!this.lazyInput.checked),this.setAttribute("alt-check",!1)):["audios","videos","documents"].includes(this.type)&&(this.innerHTML="<details open>\n<summary>"+this.summarytext+'</summary>\n<div class="">\n <div class="form-group">\n <div class="form-check">\n <input class="form-check-input radio" type="radio" name="flexRadioDefault" id="'+this.parentId+'-embed-check-2" value="0" checked>\n <label class="form-check-label" for="'+this.parentId+'-embed-check-2">\n '+this.downloadchecktext+'\n <div><small class="form-text">'+this.downloadcheckdesctext+'</small></div>\n </label>\n </div>\n <div class="form-check">\n <input class="form-check-input radio" type="radio" name="flexRadioDefault" id="'+this.parentId+'-embed-check-1" value="1">\n <label class="form-check-label" for="'+this.parentId+'-embed-check-1">\n '+this.embedchecktext+'\n <div><small class="form-text">'+this.embedcheckdesctext+'</small></div>\n </label>\n </div>\n </div>\n <div class="toggable-parts" style="display: none">\n <div style="display: '+("audios"===this.type?"none":"block")+'">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-width">'+this.widthtext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-width" value="800" data-is="width"/>\n </div>\n </div>\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-height">'+this.heighttext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-height" value="600" data-is="height"/>\n </div>\n </div>\n <div style="display: '+("document"===this.type?"block":"none")+'">\n <div class="form-group">\n <div class="input-group">\n <label class="input-group-text" for="'+this.parentId+'-title">'+this.titletext+'</label>\n <input class="form-control" type="text" id="'+this.parentId+'-title" value="" data-is="title"/>\n </div>\n </div>\n </div>\n </div>\n</div>\n</details>',this.embedInputFn=this.embedInputFn.bind(this),this.inputFn=this.inputFn.bind(this),[].slice.call(this.querySelectorAll(".form-check-input.radio")).map((function(t){return t.addEventListener("input",e.embedInputFn)})),this.setAttribute("embed-it",!1),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){t.addEventListener("input",e.inputFn);var n=t.dataset.is;return n&&e.setAttribute(n,t.value.replace(/"/g,""")),t})))},c.disconnectedCallback=function(){var e=this;"image"===this.type&&(this.lazyInput.removeEventListener("input",this.lazyInputFn),this.altInput.removeEventListener("input",this.inputFn),this.altCheck.removeEventListener("input",this.altCheckFn)),["audio","video","document"].includes(this.type)&&([].slice.call(this.querySelectorAll(".form-check-input.radio")).map((function(t){return t.removeEventListener("input",e.embedInputFn)})),[].slice.call(this.querySelectorAll('input[type="text"]')).map((function(t){return t.removeEventListener("input",e.embedInputFn)}))),this.innerHTML=""},c.lazyInputFn=function(e){this.setAttribute("is-lazy",!!e.target.checked)},c.altCheckFn=function(e){this.setAttribute("alt-check",!!e.target.checked)},c.inputFn=function(e){var t=e.target.dataset.is;t&&this.setAttribute(t,e.target.value.replace(/"/g,"""))},c.embedInputFn=function(e){var t=e.target.value;this.setAttribute("embed-it","0"!==t);var n=this.querySelector(".toggable-parts");n&&("block"!==n.style.display?n.style.display="block":n.style.display="none")},o=r,(l=[{key:"type",get:function(){return this.getAttribute("type")}},{key:"parentId",get:function(){return this.getAttribute("parent-id")}},{key:"lazytext",get:function(){return this.getAttribute("lazy-label")}},{key:"alttext",get:function(){return this.getAttribute("alt-label")}},{key:"altchecktext",get:function(){return this.getAttribute("alt-check-label")}},{key:"altcheckdesctext",get:function(){return this.getAttribute("alt-check-desc-label")}},{key:"embedchecktext",get:function(){return this.getAttribute("embed-check-label")}},{key:"embedcheckdesctext",get:function(){return this.getAttribute("embed-check-desc-label")}},{key:"downloadchecktext",get:function(){return this.getAttribute("download-check-label")}},{key:"downloadcheckdesctext",get:function(){return this.getAttribute("download-check-desc-label")}},{key:"classestext",get:function(){return this.getAttribute("classes-label")}},{key:"figclassestext",get:function(){return this.getAttribute("figure-classes-label")}},{key:"figcaptiontext",get:function(){return this.getAttribute("figure-caption-label")}},{key:"summarytext",get:function(){return this.getAttribute("summary-label")}},{key:"widthtext",get:function(){return this.getAttribute("width-label")}},{key:"heighttext",get:function(){return this.getAttribute("height-label")}},{key:"titletext",get:function(){return this.getAttribute("title-label")}}])&&i(o.prototype,l),s&&i(o,s),Object.defineProperty(o,"prototype",{writable:!1}),r}(l(HTMLElement));customElements.define("joomla-field-mediamore",f)}();