/*
* Copyright (C) 2016-2023 Jones Magloire @Joxit
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*
* @license AGPL
*/
!function(){"use strict";
/* Riot WIP, @license MIT */var e,t=new Map,r=Symbol("riot-component"),a=new Set,n="is",o="mount",i="update",s="unmount",l="shouldUpdate",u="onBeforeMount",p="onMounted",c="onBeforeUpdate",d="onUpdated",m="onBeforeUnmount",h="onUnmounted",g="props",v="state",f="slots",y="root",x=Symbol("pure"),b=Symbol("is_updating"),T=Symbol("parent"),E=Symbol("attributes"),A=Symbol("template"),w=0,C=2,k=3,I={ATTRIBUTE:w,EVENT:1,TEXT:C,VALUE:k};
/* Riot WIP, @license MIT */function R(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))}function N(e,t){throw new Error(e,{cause:t})}function U(e){var t=this,r=new Map,a=function(a){return(r.has(a)||r.set(a,e.call(t,a)))&&r.get(a)};return a.cache=r,a}function B(e){return e.reduce((function(e,t){var r=t.value,a=t.type;switch(!0){case!t.name&&a===w:return Object.assign({},e,r);case a===k:e.value=t.value;break;default:e[R(t.name)]=t.value}return e}),{})}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function S(e){for(var t=1;t=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),w(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;w(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function j(){j=function(e,t){return new r(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function r(e,a,n){var o=new RegExp(e,a);return t.set(o,n||t.get(e)),F(o,r.prototype)}function a(e,r){var a=t.get(r);return Object.keys(a).reduce((function(t,r){var n=a[r];if("number"==typeof n)t[r]=e[n];else{for(var o=0;void 0===e[n[o]]&&o+1]+)>/g,(function(e,t){var r=o[t];return"$"+(Array.isArray(r)?r.join("$"):r)})))}if("function"==typeof n){var i=this;return e[Symbol.replace].call(this,r,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,i)),n.apply(this,e)}))}return e[Symbol.replace].call(this,r,n)},j.apply(this,arguments)}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,a=new Array(t);rg-p)for(var y=r(e[u],0);p'.concat(e,""),"application/xml").documentElement,!0)}(t,e):function(e,t){var r=ne(t)?t:document.createElement("template");return r.innerHTML=e,r.content}(t,e)}var Ye={createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?Ke(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount:function(e,t,r,a){var n=this;void 0===a&&(a={}),e||N("Please provide DOM node to mount properly your template"),this.el&&this.unmount(t);var o=a,i=o.fragment,s=o.children,l=o.avoidDOMInjection,u=(s?s[0]:e).parentNode,p=ne(e),c=p?function(e,t,r){var a=Array.from(e.childNodes);return Math.max(a.indexOf(t),a.indexOf(r.head)+1,0)}(u,e,a):null;this.createDOM(e);var d=i||this.dom.cloneNode(!0);return this.el=p?u:e,this.children=p?s||Array.from(d.childNodes):null,!l&&d&&function(e,t){switch(!0){case ae(e):!function(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}(t,e);break;case ne(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}(e,d),this.bindings=this.bindingsData.map((function(e){return We(n.el,e,c)})),this.bindings.forEach((function(e){return e.mount(t,r)})),this.meta=a,this},update:function(e,t){return this.bindings.forEach((function(r){return r.update(e,t)})),this},unmount:function(e,t,r){void 0===r&&(r=!1);var a=this.el;if(!a)return this;switch(this.bindings.forEach((function(a){return a.unmount(e,t,r)})),!0){case a[x]||null===r:break;case Array.isArray(this.children):!function(e){for(var t=0;t1?t-1:0),a=1;a0?a:0)}},{key:"setStyles",value:function(e){this.wave.setAttribute("style",this.convertStyle({top:"".concat(this.start.x,"px"),left:"".concat(this.start.y,"px"),transform:"scale(".concat(this.maxScale,")"),"transition-duration":"".concat(this.duration,"ms"),"transition-timing-function":"cubic-bezier(0.250, 0.460, 0.450, 0.940)",background:this.color,opacity:e}))}},{key:"convertStyle",value:function(e){var t="";return Object.keys(e).forEach((function(r){e.hasOwnProperty(r)&&(t+=r+":"+e[r]+";")})),t}}]),n}(function(){function e(){M(this,e)}return P(e,[{key:"receiveBound",value:function(){var e;this.container||console.error("Yor class must contain a container. It is DOM Element. Define please this.container property.");var t=this.container&&this.container.ownerDocument,r=t.documentElement;"undefined"!==L(this.container.getBoundingClientRect)&&(e=this.container.getBoundingClientRect());var a=this.getWindow(t);return this.mix(e,{size:Math.max(e.width,e.height),offsetTop:e.top+a.pageYOffset-r.clientTop,offsetLeft:e.left+a.pageXOffset-r.clientLeft})}},{key:"isWindow",value:function(e){return null!==e&&e===e.window}},{key:"getWindow",value:function(e){return this.isWindow(e)?e:9===e.nodeType&&e.defaultView}},{key:"mix",value:function(e,t){for(var r in e)r in t||(t[r]=e[r]);return t}}]),e}()),wt={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new At(this.$("#waves"),this.props,e);this._waves.push(t),this.props.onWaveStart&&this.props.onWaveStart(t),this._events.length||(this._events.push(e.target.addEventListener("mouseup",(()=>this.hold()))),this._events.push(e.target.addEventListener("mouseleave",(()=>this.hold()))))},hold(){this._waves[this._waves.length-1]&&this._waves[this._waves.length-1].waveOut(this.waveOut),this._waves[this._waves.length-1]&&this._waves.slice(this._waves.length-1,1)},waveOut(){this.props.onWaveEnd&&this.props.onWaveEnd()}},template:(e,t,r,a)=>e('',[{redundantAttribute:"expr169",selector:"[expr169]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"},Ct=function(e){return""===e||"true"===e},kt=function(e){if("function"==typeof e){var t=z(Array,Array.prototype.slice.call(arguments)).slice(1);e.apply(void 0,K(t))}},It={array:function(e){if(!e)return[];for(var t=[],r=0;r{kt(e.onClick,t)}},onUpdated(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){Rt.forEach((r=>{Ct(e[r])?(this.root.firstElementChild.setAttribute(r,!0),t.attributes[r]=!0):t.attributes[r]=!1}));const r=t.attributes.inverted?e.color:e.textColor,a=t.attributes.inverted?e.textColor:e.color;this.root.firstElementChild.style.background=a,this.root.firstElementChild.style.color=r,t.attributes.outlined&&(this.root.firstElementChild.style["border-color"]=a,this.root.firstElementChild.style.color=r,this.root.firstElementChild.style.background="")},onWaveStart(e){kt(this.props.onWaveStart,e)},onWaveEnd(e){kt(this.props.onWaveEnd,e)},attributeToBool:Ct},template:(e,t,r,a)=>e('',[{type:r.IF,evaluate:e=>e.props.href,redundantAttribute:"expr131",selector:"[expr131]",template:e('
',[{redundantAttribute:"expr149",selector:"[expr149]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["checkbox ",e.state.checked?"checked":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{redundantAttribute:"expr150",selector:"[expr150]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:r.SLOT,attributes:[],name:"default",redundantAttribute:"expr151",selector:"[expr151]"},{redundantAttribute:"expr152",selector:"[expr152]",expressions:[{type:t.VALUE,evaluate:e=>e.state.checked}]}]),name:"material-checkbox"},Bt={css:null,exports:{state:{transition:!1,opened:!1},onBeforeUpdate(e,t){t.opened!==e.opened&&(t.transition=!0,setTimeout((()=>this.update({opened:e.opened,transition:!1})),e.opened?0:200))},onUpdated(e,t){e.onClick&&this.$$(".material-dropdown-item").forEach(((e,t)=>{e.onclick=r=>{const a=e.attributes.getNamedItem("item");r.target.item=a&&a.value,r.target.index=t,kt(this.props.onClick,r)}}))}},template:(e,t,r,a)=>e('',[{type:r.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr163",selector:"[expr163]",template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["material-dropdown-container ",!!e.state.transition&&"opening"," ",e.props.animation||"top"].join("")}]},{type:r.IF,evaluate:e=>!e.props.items,redundantAttribute:"expr164",selector:"[expr164]",template:e('',[{type:r.SLOT,attributes:[],name:"default",redundantAttribute:"expr165",selector:"[expr165]"}])},{type:r.EACH,getKey:null,condition:null,template:e('',[{type:r.IF,evaluate:e=>!e.item.href,redundantAttribute:"expr167",selector:"[expr167]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item.name||e.item.title}]}])},{type:r.IF,evaluate:e=>e.item.href,redundantAttribute:"expr168",selector:"[expr168]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,name:"href",evaluate:e=>e.item.href},{type:t.ATTRIBUTE,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item.name||e.item.title},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.item.title}]}])}]),redundantAttribute:"expr166",selector:"[expr166]",itemName:"item",indexName:"key",evaluate:e=>e.props.items}])}]),name:"material-dropdown"},Ot=function(){function e(t){if(M(this,e),t||console.debug("Sorry, but for using validate mixin you should add an opts argument"),this.type=t.type,t.valid){if(this.validationType="function"==typeof t.valid?"Function":"Regexp","Regexp"===this.validationType)try{this.validationRegexp=new RegExp(t.valid)}catch(e){throw new Error("Something wrong with your regular expression!. Checkout --- ".concat(e))}"Function"===this.validationType&&(this.validationFunction=t.valid||!1)}else t&&-1!=Object.keys(this.base).indexOf(this.type)&&(this.validationType="Type")}return P(e,[{key:"base",get:function(){return{email:/^(([\w\.\-_]+)@[\w\-\_]+(\.\w+){1,}|)$/i,number:/^(\d+|)$/i,tel:/^((\+|\d)?([\d\-\(\)\#])|)+$/i,url:/([--:\w?@%&+~#=]*\.[a-z]{2,4}\/{0,2})((?:[?&](?:\w+)=(?:\w+))+|[--:\w?@%&+~#=]+)?/i}}},{key:"validate",value:function(e){return!this.validationType||this["validateBy"+this.validationType](e)}},{key:"validateByFunction",value:function(e){if(this.validationFunction)return this.validationFunction(e)}},{key:"validateByRegexp",value:function(e){if(this.validationRegexp)return this.validationRegexp.test(e)}},{key:"validateByType",value:function(e){return this.base[this.type].test(e)}}]),e}();const St=["disabled","rounded","outlined","inverted","icon"];var Dt={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},components:{MaterialButton:Nt},onMounted(e,t){if(this.required="",this.notSupportedTypes=["date","color","datetime","month","range","time"],-1!=this.notSupportedTypes.indexOf(this.props.type))throw new Error(`Sorry but we do not support ${this.props.type} type yet!`);this.validator=new Ot(this.props),this.update({showIcon:!1,value:this.props.value||""}),this.$("input").addEventListener("focus",this.changeFocus),this.$("input").addEventListener("blur",this.changeFocus),this.updateAttributes(e,t)},onBeforeUpdate(e,t){this.state.value=this.$("input").value,this.state.error=0!==t.value.length&&!this.validator.validate(t.value)||0===t.value.length&&Ct(e.required)},onUpdated(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){const r=function(e,t){return e.reduce((function(e,r){return e[r]=Ct(t[r]),e}),{})}(St,e),a=r.inverted?e.textColor:e.color,n=r.inverted?e.color:e.textColor;It.children(this.$(".underline")).forEach((e=>e.style.background=a)),this.$("input").style.color=n,this.$("label")&&(this.$("label").style.color=e.labelColor||n),(r.outlined||r.rounded)&&(this.$(".input-content").style["border-color"]=a)},changeFocus(e){if(Ct(this.props.disabled))return!1;const t=this.$("input")==document.activeElement;this.state.focused!=t&&(this.update({focused:t}),kt(this.props.onFocus,t,e))},changeValue(e){this.update({value:this.$("input").value}),kt(this.props.onValueChange,this.$("input").value,e)},iconClickHandler(e){kt.call(this,this.props.onIconClick,e)},attributeToBool:Ct},template:(e,t,r,a)=>e('
Mixed Content: The page at ``\n was loaded over HTTPS, but requested an insecure server endpoint ``.\n
This request may has been blocked; the content must be served over HTTPS.
\n You may unset the option `REGISTRY_URL` and set the registry server container URL in\n `NGINX_PROXY_PASS_URL`. It\'s usually the name of your container, and it should be on the shame\n network as the UI.\n