/*
 * 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 <http://www.gnu.org/licenses/>.
 * 
 * @license AGPL
 */
!function(){"use strict";
/* Riot WIP, @license MIT */var e=new Map,t=Symbol("riot-component"),r=new Set,a="is",n="mount",o="update",i="unmount",s="shouldUpdate",l="onBeforeMount",u="onMounted",p="onBeforeUpdate",c="onUpdated",d="onBeforeUnmount",m="onUnmounted",h="props",g="state",v="slots",f="root",y=Symbol("pure"),x=Symbol("is_updating"),b=Symbol("parent"),T=Symbol("attributes"),A=Symbol("template");function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function w(e){if(Array.isArray(e))return e}function B(e,t,r){return t=N(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,r||[],N(e).constructor):t.apply(e,r))}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t,r){if(S())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var n=new(e.bind.apply(e,a));return r&&P(n,r.prototype),n}function k(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,H(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function R(e,t,r){return(t=H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function M(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){R(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function j(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function o(r,a,n,o){var l=a&&a.prototype instanceof s?a:s,u=Object.create(l.prototype);return _(u,"_invoke",function(r,a,n){var o,s,l,u=0,p=n||[],c=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,r){return o=t,s=0,l=e,d.n=r,i}};function m(r,a){for(s=r,l=a,t=0;!c&&u&&!n&&t<p.length;t++){var n,o=p[t],m=d.p,h=o[2];r>3?(n=h===a)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=m&&((n=r<2&&m<o[1])?(s=0,d.v=a,d.n=o[1]):m<h&&(n=r<3||o[0]>a||a>h)&&(o[4]=r,o[5]=a,d.n=h,s=0))}if(n||r>1)return i;throw c=!0,a}return function(n,p,h){if(u>1)throw TypeError("Generator is already running");for(c&&1===p&&m(p,h),s=p,l=h;(t=s<2?e:l)||!c;){o||(s?s<3?(s>1&&(d.n=-1),m(s,l)):d.n=l:d.v=l);try{if(u=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(c=d.n<0)?l:r.call(a,d))!==i)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:c}}}(r,n,o),!0),u}var i={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var p=[][a]?t(t([][a]())):(_(t={},a,function(){return this}),t),c=u.prototype=s.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,_(e,n,"GeneratorFunction")),e.prototype=Object.create(c),e}return l.prototype=u,_(c,"constructor",u),_(u,"constructor",l),l.displayName="GeneratorFunction",_(u,n,"GeneratorFunction"),_(c),_(c,n,"Generator"),_(c,a,function(){return this}),_(c,"toString",function(){return"[object Generator]"}),(j=function(){return{w:o,m:d}})()}function _(e,t,r,a){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}_=function(e,t,r,a){function o(t,r){_(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},_(e,t,r,a)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function G(e,t){return w(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(l=(a=o.call(r)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){u=!0,n=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return s}}(e,t)||F(e,t)||D()}function V(e){return w(e)||O(e)||F(e)||D()}function z(e){return function(e){if(Array.isArray(e))return E(e)}(e)||O(e)||F(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function $(e){return $="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},$(e)}function F(e,t){if(e){if("string"==typeof e)return E(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(e,t):void 0}}function X(e){var t="function"==typeof Map?new Map:void 0;return X=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;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,r)}function r(){return C(e,arguments,N(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)},X(e)}function W(){W=function(e,t){return new r(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function r(e,a,n){var o=RegExp(e,a);return t.set(o,n||t.get(e)),P(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<n.length;)o++;t[r]=e[n[o]]}return t},Object.create(null))}return U(r,RegExp),r.prototype.exec=function(t){var r=e.exec.call(this,t);if(r){r.groups=a(r,this);var n=r.indices;n&&(n.groups=a(n,this))}return r},r.prototype[Symbol.replace]=function(r,n){if("string"==typeof n){var o=t.get(this);return e[Symbol.replace].call(this,r,n.replace(/\$<([^>]+)(>|$)/g,function(e,t,r){if(""===r)return e;var a=o[t];return Array.isArray(a)?"$"+a.join("$"):"number"==typeof a?"$"+a:""}))}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)},W.apply(this,arguments)
/* Riot WIP, @license MIT */}var q=1,K=4,J={ATTRIBUTE:0,EVENT:q,TEXT:2,VALUE:3,REF:K};function Y(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function Q(e,t){throw new Error(e,{cause:t})}function Z(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 ee(e){return e.reduce(function(e,t){var r=t.value,a=t.type;switch(!0){case t.type===K:break;case!t.name&&0===a:return L(L({},e),r);case 3===a:e.value=t.value;break;default:e[Y(t.name)]=t.value}return e},{})}
/* Riot WIP, @license MIT */function te(e,t){return $(e)===t}function re(e){var t=e.ownerSVGElement;return!!t||null===t}function ae(e){return"template"===e.tagName.toLowerCase()}function ne(e){return te(e,"function")}function oe(e){return!ie(e)&&e.constructor===Object}function ie(e){return null==e}function se(){return this}function le(e){return ne(e)?e.prototype&&e.prototype.constructor?new e:e():e}function ue(e){return Array.from(e.attributes).reduce(function(e,t){return e[Y(t.name)]=t.value,e},{})}function pe(e){for(;e.firstChild;)e.removeChild(e.firstChild)}var ce=function(e){return e.remove()},de=function(e,t){return t&&t.parentNode&&t.parentNode.insertBefore(e,t)},me=function(e,t){return t&&t.parentNode&&t.parentNode.replaceChild(e,t)},he=R(R(R(R(R({},n,function(e){this.el=e}),o,se),i,function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r?ce(this.el):r||pe(this.el)}),"clone",function(){return L({},this)}),"createDOM",se),ge={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function ve(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object.defineProperty(e,t,L({value:r,enumerable:!1,writable:!1,configurable:!0},a)),e}function fe(e,t,r){return Object.entries(t).forEach(function(t){var a=G(t,2),n=a[0],o=a[1];ve(e,n,o,r)}),e}function ye(e,t){return Object.entries(t).forEach(function(t){var r=G(t,2),a=r[0],n=r[1];e[a]||(e[a]=n)}),e}var xe=Symbol(),be=Symbol();function Te(e){var t=e.dom.cloneNode(!0),r=function(){var e=document.createTextNode(""),t=document.createTextNode("");return e[xe]=!0,t[be]=!0,{head:e,tail:t}}(),a=r.head,n=r.tail;return{avoidDOMInjection:!0,fragment:t,head:a,tail:n,children:[a].concat(z(Array.from(t.childNodes)),[n])}}var Ae=Symbol("unmount"),Ee={nodes:[],mount:function(e,t){return this.update(e,t)},update:function(e,t){var r=this.placeholder,a=this.nodes,n=this.childrenMap,o=e===Ae?null:this.evaluate(e),i=function(e,t,r,a){var n=a.condition,o=a.template,i=a.childrenMap,s=a.itemName,l=a.getKey,u=a.indexName,p=a.root,c=a.isTemplateTag,d=new Map,m=[],h=[];return e.forEach(function(e,a){var g=function(e,t){var r=t.itemName,a=t.indexName,n=t.index,o=t.item;ve(e,r,o),a&&ve(e,a,n);return e}(Object.create(t),{itemName:s,indexName:u,index:a,item:e}),v=l?l(g):a,f=i.get(v),y=[];if(!function(e,t){return!!e&&!e(t)}(n,g)){var x=!f,b=f?f.template:o.clone(),T=b.el||p.cloneNode(),A=c&&x?Te(b):b.meta;x?m.push(function(){return b.mount(T,g,r,A)}):m.push(function(){return b.update(g,r)}),c?y.push.apply(y,z(A.children)):y.push(T),i.delete(v),h.push.apply(h,y),d.set(v,{nodes:y,template:b,context:g,index:a})}}),{newChildrenMap:d,batches:m,futureNodes:h}}(o?Array.from(o):[],e,t,this),s=i.newChildrenMap,l=i.batches,u=i.futureNodes;return function(e,t,r,a){for(var n=t.length,o=e.length,i=n,s=0,l=0,u=null;s<o||l<i;)if(o===s)for(var p=i<n?l?r(t[l-1],-0).nextSibling:r(t[i-l],0):a;l<i;)de(r(t[l++],1),p);else if(i===l)for(;s<o;)u&&u.has(e[s])||ce(r(e[s],-1)),s++;else if(e[s]===t[l])s++,l++;else if(e[o-1]===t[i-1])o--,i--;else if(e[s]===t[i-1]&&t[l]===e[o-1]){var c=r(e[--o],-1).nextSibling;de(r(t[l++],1),r(e[s++],-1).nextSibling),de(r(t[--i],1),c),e[o]=t[i]}else{if(!u){u=new Map;for(var d=l;d<i;)u.set(t[d],d++)}if(u.has(e[s])){var m=u.get(e[s]);if(l<m&&m<i){for(var h=s,g=1;++h<o&&h<i&&u.get(e[h])===m+g;)g++;if(g>m-l)for(var v=r(e[s],0);l<m;)de(r(t[l++],1),v);else me(r(t[l++],1),r(e[s++],-1))}else s++}else ce(r(e[s++],-1))}}(a,u,function(e,t){return function(r,a){if(a<0){var n=e[e.length-1];if(n){var o=n.template,i=n.nodes,s=n.context;i.pop(),i.length||(e.pop(),o.unmount(s,t,null))}}return r}}(Array.from(n.values()),t),r),l.forEach(function(e){return e()}),this.childrenMap=s,this.nodes=u,this},unmount:function(e,t){return this.update(Ae,t),this}};var we={mount:function(e,t){return this.update(e,t)},update:function(e,t){var r,a=this,n=!!this.evaluate(e),o=!this.value&&n,i=this.value&&!n;switch(!0){case o:r=a.node.cloneNode(),de(r,a.placeholder),a.template=a.template.clone(),a.template.mount(r,e,t);break;case i:this.unmount(e);break;default:n&&this.template.update(e,t)}return this.value=n,this},unmount:function(e,t){return this.template.unmount(e,t,!0),this}};var Be="undefined"==typeof Element?{}:Element.prototype,Ie=Z(function(e){return Be.hasOwnProperty(e)});function Ce(e,t){var r=e.node,a=e.name,n=e.isBoolean,o=e.value;if(!a)return o&&function(e,t,r){var a=t?Object.keys(t):[];Object.keys(r).filter(function(e){return!a.includes(e)}).forEach(function(t){return e.removeAttribute(t)})}(r,t,o),void(t&&function(e,t){Object.keys(t).forEach(function(r){return Ce({node:e,name:r},t[r])})}(r,t));!Ie(a)&&(function(e){return te(e,"boolean")}(t)||oe(t)||ne(t))&&(r[a]=t),!function(e,t){return t?!e&&0!==e:null==e}(t,n)?function(e){return["string","number","boolean"].includes($(e))}(t)&&r.setAttribute(a,function(e,t,r){return!0===t&&r?e:t}(a,t,n)):r.removeAttribute(a)}var ke=/^on/,Re={handleEvent:function(e){this[e.type](e)}},Ne=new WeakMap;function Ue(e){return ie(e)?"":e}var Se=function(e,t){return e.childNodes[t]};var Oe=R(R(R(R(R({},0,Ce),q,function(e,t){var r=e.node,a=e.name.replace(ke,""),n=Ne.get(r)||function(e){var t=Object.create(Re);return Ne.set(e,t),t}(r),o=G(function(e){return Array.isArray(e)?e:[e,!1]}(t),2),i=o[0],s=o[1],l=n[a],u=i&&!l;l&&!i&&r.removeEventListener(a,n),u&&r.addEventListener(a,n,s),n[a]=i}),2,function(e,t){e.node.data=Ue(t)}),3,function(e,t){e.node.value=Ue(t)}),K,function(e,t){var r=e.node,a=e.value;t?t(r):a(null)}),De={mount:function(e){return this.value=this.evaluate(e),Oe[this.type](this,this.value),this},update:function(e){var t=this.evaluate(e);return this.value!==t&&(Oe[this.type](this,t),this.value=t),this},unmount:function(){return[q,K].includes(this.type)&&Oe[this.type](this,null),this}};function Me(e,t){return L(L(L({},De),t),{},{node:2===t.type?Se(e,t.childNodeIndex):e})}var Le=function(e,t){return null==t?void 0:t.find(function(t){return t.id===e})},je=function(e,t){return e[b]||t},_e={attributes:[],getTemplateScope:function(e,t){return function(e,t,r){if(!e||!e.length)return r;var a=e.map(function(e){return L(L({},e),{},{value:e.evaluate(t)})});return Object.assign(Object.create(r||null),ee(a))}(this.attributes,e,t)},mount:function(e,t){var r,a=!!e.slots&&Le(this.name,e.slots),n=this.node.parentNode,o=a?je(e,t):e;return this.templateData=null!=a&&a.html?a:Le(this.name,o.slots),this.template=this.templateData&&Fe(this.templateData.html,this.templateData.bindings).createDOM(n)||(null===(r=this.template)||void 0===r?void 0:r.clone()),this.template&&(pe(this.node),this.template.mount(this.node,this.getTemplateScope(e,o),o),this.template.children=Array.from(this.node.childNodes)),Pe(this.node),ce(this.node),this},update:function(e,t){if(this.template){var r=this.templateData?je(e,t):e;this.template.update(this.getTemplateScope(e,r),r)}return this},unmount:function(e,t,r){return this.template&&this.template.unmount(this.getTemplateScope(e,t),null,r),this}};function Pe(e){var t=e&&e.firstChild;t&&(de(t,e),Pe(e))}var Ge={mount:function(e){return this.update(e)},update:function(e,t){var r=this.evaluate(e);return r&&r===this.name?this.tag.update(e):(this.unmount(e,t,!0),this.name=r,this.tag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e?e({slots:t,attributes:r}):Fe(function(e){return e.reduce(function(e,t){return e+t.html},"")}(t),[].concat(z(function(e){return e.reduce(function(e,t){var r=t.bindings;return e.concat(r)},[])}(t)),[{expressions:r.map(function(e){return L({type:0},e)})}]))}(this.getComponent(r),this.slots,this.attributes),this.tag.mount(this.node,e)),this},unmount:function(e,t,r){return this.tag&&this.tag.unmount(r),this}};var Ve=R(R(R(R(R({},1,function(e,t){var r=t.evaluate,a=t.template,n=document.createTextNode("");return de(n,e),ce(e),L(L({},we),{},{node:e,evaluate:r,placeholder:n,template:a.createDOM(e)})}),2,function(e,t){var r,a,n=t.expressions;return r=n.map(function(t){return Me(e,t)}),["mount","update","unmount"].reduce(function(e,t){return L(L({},e),{},R({},t,function(e){return r.map(function(r){return r[t](e)})&&a}))},{})}),0,function(e,t){var r=t.evaluate,a=t.condition,n=t.itemName,o=t.indexName,i=t.getKey,s=t.template,l=document.createTextNode(""),u=e.cloneNode();return de(l,e),ce(e),L(L({},Ee),{},{childrenMap:new Map,node:e,root:u,condition:a,evaluate:r,isTemplateTag:ae(u),template:s.createDOM(e),getKey:i,indexName:o,itemName:n,placeholder:l})}),3,function(e,t){var r=t.evaluate,a=t.getComponent,n=t.slots,o=t.attributes;return L(L({},Ge),{},{node:e,evaluate:r,slots:n,attributes:o,getComponent:a})}),4,function(e,t){var r=t.name,a=t.attributes,n=t.template;return L(L({},_e),{},{attributes:a,template:n,node:e,name:r})});function ze(e,t){return e.map(function(e){return 2===e.type?L(L({},e),{},{childNodeIndex:e.childNodeIndex+t}):e})}function He(e,t){return re(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">'.concat(e,"</svg>"),"application/xml").documentElement,!0)}(t,e):function(e,t){var r=ae(t)?t:document.createElement("template");return r.innerHTML=e,r.content}(t,e)}var $e={createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?He(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount:function(e,t,r){var a=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e||Q("Please provide DOM node to mount properly your template"),this.el&&this.unmount(t);var o=n.fragment,i=n.children,s=n.avoidDOMInjection,l=(i?i[0]:e).parentNode,u=ae(e),p=u?function(e,t,r){var a=Array.from(e.childNodes);return Math.max(a.indexOf(t),a.indexOf(r.head)+1,0)}(l,e,n):null;this.createDOM(e);var c=o||this.dom.cloneNode(!0);return this.el=u?l:e,this.children=u?i||Array.from(c.childNodes):null,!s&&c&&function(e,t){switch(!0){case re(e):!function(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}(t,e);break;case ae(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}(e,c),this.bindings=this.bindingsData.map(function(e){return function(e,t,r){var a=t.selector,n=t.type,o=t.redundantAttribute,i=t.expressions,s=a?e.querySelector(a):e;o&&s.removeAttribute(o);var l=i||[];return(Ve[n]||Ve[2])(s,L(L({},t),{},{expressions:r&&!a?ze(l,r):l}))}(a.el,e,p)}),this.bindings.forEach(function(e){return e.mount(t,r)}),this.meta=n,this},update:function(e,t){return this.bindings.forEach(function(r){return r.update(e,t)}),this},unmount:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.el;if(!a)return this;switch(this.bindings.forEach(function(a){return a.unmount(e,t,r)}),!0){case a[y]||null===r:break;case Array.isArray(this.children):!function(e){for(var t=0;t<e.length;t++)ce(e[t])}(this.children);break;case!r:pe(a);break;case!!r:ce(a)}return this.el=null,this},clone:function(){return L(L({},this),{},{meta:{},el:null})}};function Fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return L(L({},$e),{},{html:e,bindingsData:t})}
/* Riot v9.4.11, @license MIT */var Xe=Object.freeze(R(R(R({},n,se),o,se),i,se)),We=function(e,r){return e[t]=r};
/* Riot v9.4.11, @license MIT */function qe(e){return[n,o,i].reduce(function(t,r){return t[r]=e(r),t},{})}
/* Riot v9.4.11, @license MIT */
/* Riot WIP, @license MIT */
function Ke(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}
/* Riot WIP, @license MIT */function Je(e,t){return Ke("string"==typeof e?(t||document).querySelectorAll(e):e)}var Ye=Object.freeze({$:function(e){return Je(e,this.root)[0]},$$:function(e){return Je(e,this.root)}}),Qe=Object.freeze(R(R(R(R(R(R(R({},s,se),l,se),u,se),p,se),c,se),d,se),m,se)),Ze=function(e){return 1===e.length?e[0]:e};function et(e,t,r){var a="object"===$(t)?t:R({},t,r),n=Object.keys(a);return Ke(e).forEach(function(e){n.forEach(function(t){return e.setAttribute(t,a[t])})}),e}function tt(e,t){return function(e,t,r){var a=[t];return Ze(Ke(e).map(function(e){return Ze(a.map(function(t){return e[r](t)}))}))}(e,t,"getAttribute")}var rt,at=new Map,nt=function(){return rt||(et(rt=Je("style[riot]")[0]||document.createElement("style"),"type","text/css"),rt.parentNode||document.head.appendChild(rt),rt)},ot={CSS_BY_NAME:at,add:function(e,t){return at.has(e)||(at.set(e,t),this.inject()),this},inject:function(){return nt().innerHTML=z(at.values()).join("\n"),this},remove:function(e){return at.has(e)&&(at.delete(e),this.inject()),this}};
/* Riot WIP, @license MIT */
function it(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return function(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return(a=[].concat(r,z(a))).length<e.length?it.apply(void 0,[e].concat(z(a))):e.apply(void 0,z(a))}}
/* Riot v9.4.11, @license MIT */
/* Riot v9.4.11, @license MIT */
function st(e,t){(function(e){return tt(e,a)||e.tagName.toLowerCase()})(e)!==t&&et(e,a,t)}function lt(e,t){return L(L({},e),le(t))}var ut=Z(function(e){var t,r,a,n=null==e||null===(t=e.bindingsData)||void 0===t?void 0:t[0];return null!=n&&n.selector?[]:null!==(r=null==n||null===(a=n.expressions)||void 0===a?void 0:a.reduce(function(e,t){var r=t.name;return t.type===J.ATTRIBUTE?e.concat([r]):e},[]))&&void 0!==r?r:[]});function pt(e,t){var n,o=t.slots,i=t.attributes,E=t.props;return n=function(e){return z(r).reduce(function(e,t){return t(e)||e},e)}(fe(oe(e)?Object.create(e):e,{mount:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return ve(t,y,!1),this[b]=a,this[T]=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map(function(t){return Me(e,t)}),r={};return Object.assign(r,L({expressions:t},qe(function(e){return function(a){return t.forEach(function(t){return t[e](a)}),r}})))}(t,i).mount(a),ve(this,h,Object.freeze(L(L({},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L(L({},ue(e)),le(t))}(t,E)),ee(this[T].expressions)))),this[g]=lt(this[g],r),this[A]=this.template.createDOM(t).clone(),We(t,this),e.name&&st(t,e.name),ve(this,f,t),ve(this,v,o),this[l](this[h],this[g]),this[A].mount(t,this,a),this[u](this[h],this[g]),this},update:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this[b]=t,this[T].update(t));var r=ut(this[A]),n=L(L({},ue({attributes:Array.from(this[f].attributes).filter(function(e){var t=e.name;return!r.includes(t)})})),ee(this[T].expressions));n[a];var o,i,l=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(n,[a].map(H));if(!1!==this[s](l,this[h]))return ve(this,h,Object.freeze(L(L({},t?(o=this[h],i=r,oe(o)?Object.fromEntries(i.map(function(e){return[e,o[e]]})):o):this[h]),l))),this[g]=lt(this[g],e),this[p](this[h],this[g]),this[x]||(this[x]=!0,this[A].update(this,this[b])),this[c](this[h],this[g]),this[x]=!1,this},unmount:function(e){return this[d](this[h],this[g]),this[T].unmount(),this[A].unmount(this,this[b],null===e?null:!e),this[m](this[h],this[g]),this}})),Object.keys(e).filter(function(t){return ne(e[t])}).forEach(function(e){n[e]=n[e].bind(n)}),n}function ct(e){var t=e.css,r=e.template,a=e.componentAPI,n=e.name;return t&&n&&ot.add(n,t),it(pt)(fe(ye(a,L(L({},Qe),{},R(R({},h,{}),g,{}))),L(L(R(R({},v,null),f,null),Ye),{},{name:n,css:t,template:r})))}var dt=function(t){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(le(e)).reduce(function(e,t){var r,a=G(t,2),n=a[0],o=a[1];return e[(r=n,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=ht(o),e},{})}(t.exports?t.exports.components:{});return function(a){return a===t.name?mt(t):r[a]||e.get(a)}},mt=Z(ht);function ht(e){var t=e.css,r=e.template,a=e.exports,o=e.name,i=r?function(e,t,r){return e(Fe,J,ge,r)}(r,0,dt(e)):he;return function(e){var s=e.slots,l=e.attributes,u=e.props;if(a&&a[y])return function(e,t){var r=t.slots,a=t.attributes,o=t.props,i=t.css;t.template&&Q("Pure components can not have html"),i&&Q("Pure components do not have css");var s=ye(e({slots:r,attributes:a,props:o}),Xe);return qe(function(e){return function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(e===n){var o=r[0];ve(o,y,!0),We(o,s)}return s[e].apply(s,r),s}})}(a,{slots:s,attributes:l,props:u,css:t,template:r});var p=le(a)||{},c=ct({css:t,template:i,componentAPI:p,name:o})({slots:s,attributes:l,props:u});return{mount:function(e,t,r){return c.mount(e,r,t)},update:function(e,t){return c.update(t,e)},unmount:function(e){return c.unmount(e)}}}}
/* Riot v9.4.11, @license MIT */function gt(t,r){var a=r.css,n=r.template,o=r.exports;return e.has(t)&&Q('The component "'.concat(t,'" was already registered')),e.set(t,ht({name:t,css:a,template:n,exports:o})),e}
/* Riot WIP, @license MIT */
/* Riot v9.4.11, @license MIT */
function vt(e){return ne(e)||Q('riot.pure accepts only arguments of type "function"'),e[y]=!0,e}
/* Riot v9.4.11, @license MIT */var ft={DOMBindings:{template:Fe,bindingTypes:ge,expressionTypes:J}},yt=function(e){function t(e,r,a){var n;return I(this,t),n=B(this,t),e||console.error("You should set container to the wave!"),n.container=e,n.maxOpacity=r.opacity||.6,n.duration=r.duration||750,n.color=r.color||"#fff",n.center=r.center||!1,n.event=a,n.containerBound=n.receiveBound(),n.maxScale=n.containerBound.size/100*10,n.created=Date.now(),n.start={},n.createNode(),n.waveIn(),n}return U(t,e),k(t,[{key:"createNode",value:function(){this.wave=document.createElement("div"),this.wave.classList.add("wave"),this.container.appendChild(this.wave)}},{key:"waveIn",value:function(){var e=this;this.center&&!this.event&&console.error("Setup at least mouse event... Or just set center attribute"),this.start.x=this.center?this.containerBound.height/2:this.event.pageY-this.containerBound.offsetTop,this.start.y=this.center?this.containerBound.width/2:this.event.pageX-this.containerBound.offsetLeft;var t=-1!==window.navigator.userAgent.indexOf("Trident");setTimeout(function(){return e.setStyles(e.maxOpacity)},t?50:0)}},{key:"waveOut",value:function(e){var t=this,r=Date.now()-this.created,a=Math.round(this.duration/2)-r;setTimeout(function(){t.setStyles(0),setTimeout(function(){t.wave.parentNode===t.container&&(t.container.removeChild(t.wave),e())},t.duration)},a>0?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}}])}(function(){return k(function e(){I(this,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"!==$(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}}])}()),xt={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new yt(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('<div expr112="expr112" id="waves"></div>',[{redundantAttribute:"expr112",selector:"[expr112]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"},bt=function(e){return""===e||"true"===e},Tt=function(e){if("function"==typeof e){var t=C(Array,Array.prototype.slice.call(arguments)).slice(1);e.apply(void 0,z(t))}},At={array:function(e){if(!e)return[];for(var t=[],r=0;r<e.length;r++)t.push(e.item(r));return t},children:function(e){return At.array(e&&e.children)}};const Et=["disabled","rounded","icon","shadow","outlined","inverted"];var wt={css:null,exports:{state:{attributes:{}},components:{MaterialWaves:xt},onMounted(e,t){this.updateAttributes(e,t),this.root.firstElementChild.onclick=t=>{Tt(e.onClick,t)}},onUpdated(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){Et.forEach(r=>{bt(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){Tt(this.props.onWaveStart,e)},onWaveEnd(e){Tt(this.props.onWaveEnd,e)},attributeToBool:bt},template:(e,t,r,a)=>e('<a expr73="expr73"></a><button expr76="expr76"></button>',[{type:r.IF,evaluate:e=>e.props.href,redundantAttribute:"expr73",selector:"[expr73]",template:e('<material-waves expr74="expr74"></material-waves><div class="content"><slot expr75="expr75"></slot></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.props.href},{type:t.ATTRIBUTE,isBoolean:!1,name:"target",evaluate:e=>e.props.target}]},{type:r.IF,evaluate:e=>!e.attributeToBool(e.props.disabled),redundantAttribute:"expr74",selector:"[expr74]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-waves",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,isBoolean:!1,name:"rounded",evaluate:e=>e.props.rounded},{type:t.ATTRIBUTE,isBoolean:!1,name:"opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,isBoolean:!1,name:"color",evaluate:e=>e.props.wavesColor},{type:t.ATTRIBUTE,isBoolean:!1,name:"duration",evaluate:e=>e.props.wavesDuration},{type:t.EVENT,name:"onWaveStart",evaluate:e=>e.onWaveStart},{type:t.EVENT,name:"onWaveEnd",evaluate:e=>e.onWaveEnd}]}])},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr75",selector:"[expr75]"}])},{type:r.IF,evaluate:e=>!e.props.href,redundantAttribute:"expr76",selector:"[expr76]",template:e('<material-waves expr77="expr77"></material-waves><div class="content"><slot expr78="expr78"></slot></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"type",evaluate:e=>e.props.type}]},{type:r.IF,evaluate:e=>!e.attributeToBool(e.props.disabled),redundantAttribute:"expr77",selector:"[expr77]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-waves",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,isBoolean:!1,name:"rounded",evaluate:e=>e.props.rounded},{type:t.ATTRIBUTE,isBoolean:!1,name:"opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,isBoolean:!1,name:"color",evaluate:e=>e.props.wavesColor},{type:t.ATTRIBUTE,isBoolean:!1,name:"duration",evaluate:e=>e.props.wavesDuration},{type:t.EVENT,name:"onWaveStart",evaluate:e=>e.onWaveStart},{type:t.EVENT,name:"onWaveEnd",evaluate:e=>e.onWaveEnd}]}])},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr78",selector:"[expr78]"}])}]),name:"material-button"},Bt={css:null,exports:{onBeforeMount(e,t){t.checked=void 0!==e.checked?e.checked:t.checked},onBeforeUpdate(e,t){t.checked=void 0!==e.checked?e.checked:t.checked},onChange(e){bt(this.props.disabled)||(e.target.checked=!this.state.checked,Tt(this.props.onChange,e),this.update({checked:!this.state.checked}))}},template:(e,t,r,a)=>e('<div expr80="expr80"><div class="checkmark"></div></div><div expr81="expr81" class="label"><slot expr82="expr82"></slot></div><input expr83="expr83" type="hidden"/>',[{redundantAttribute:"expr80",selector:"[expr80]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["checkbox ",e.state.checked?"checked":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{redundantAttribute:"expr81",selector:"[expr81]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr82",selector:"[expr82]"},{redundantAttribute:"expr83",selector:"[expr83]",expressions:[{type:t.VALUE,evaluate:e=>e.state.checked}]}])},It={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,Tt(this.props.onClick,r)}})}},template:(e,t,r,a)=>e('<div expr84="expr84"></div>',[{type:r.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr84",selector:"[expr84]",template:e('<template expr85="expr85"></template><template expr87="expr87"></template>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,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:"expr85",selector:"[expr85]",template:e('<slot expr86="expr86"></slot>',[{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr86",selector:"[expr86]"}])},{type:r.EACH,getKey:null,condition:null,template:e('<span expr88="expr88"></span><a expr89="expr89"></a>',[{type:r.IF,evaluate:e=>!e.item.href,redundantAttribute:"expr88",selector:"[expr88]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item.name||e.item.title}]}])},{type:r.IF,evaluate:e=>e.item.href,redundantAttribute:"expr89",selector:"[expr89]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.item.title].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.item.href},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-dropdown-item ",e.props.selected===e.key?"selected":""].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item.name||e.item.title},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.item.title}]}])}]),redundantAttribute:"expr87",selector:"[expr87]",itemName:"item",indexName:"key",evaluate:e=>e.props.items}])}])},Ct=function(){return k(function e(t){if(I(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")},[{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)}}])}();const kt=["disabled","rounded","outlined","inverted","icon"];var Rt={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},components:{MaterialButton:wt},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 Ct(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&&bt(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]=bt(t[r]),e},{})}(kt,e),a=r.inverted?e.textColor:e.color,n=r.inverted?e.color:e.textColor;At.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(bt(this.props.disabled))return!1;const t=this.$("input")==document.activeElement;this.state.focused!=t&&(this.update({focused:t}),Tt(this.props.onFocus,t,e))},changeValue(e){this.update({value:this.$("input").value}),Tt(this.props.onValueChange,this.$("input").value,e)},iconClickHandler(e){Tt.call(this,this.props.onIconClick,e)},attributeToBool:bt},template:(e,t,r,a)=>e('<div expr91="expr91"><label expr92="expr92" for="input"></label><input expr93="expr93" autocomplete="off"/><div expr94="expr94" class="iconWrapper"></div></div><div expr97="expr97"></div>',[{redundantAttribute:"expr91",selector:"[expr91]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["input-content ",e.state.value?"not-empty":null," ",e.state.error?"error":null].join("")}]},{type:r.IF,evaluate:e=>e.props.label,redundantAttribute:"expr92",selector:"[expr92]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.label}]}])},{redundantAttribute:"expr93",selector:"[expr93]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"type",evaluate:e=>e.props.type||"text"},{type:t.ATTRIBUTE,isBoolean:!0,name:"disabled",evaluate:e=>e.attributeToBool(e.props.disabled)},{type:t.ATTRIBUTE,isBoolean:!1,name:"placeholder",evaluate:e=>e.props.placeholder},{type:t.EVENT,name:"onkeyup",evaluate:e=>e.changeValue},{type:t.VALUE,evaluate:e=>e.state.value},{type:t.ATTRIBUTE,isBoolean:!0,name:"required",evaluate:e=>e.attributeToBool(e.props.required)}]},{type:r.IF,evaluate:e=>e.attributeToBool(e.props.icon),redundantAttribute:"expr94",selector:"[expr94]",template:e('<material-button expr95="expr95" color="rgba(0,0,0,0)" center="true" waves-center="true" icon="true"></material-button>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<slot expr96="expr96"></slot>',bindings:[{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr96",selector:"[expr96]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-color",evaluate:e=>e.props["waves-color"]||"#fff"},{type:t.EVENT,name:"onclick",evaluate:e=>e.iconClickHandler},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-opacity",evaluate:e=>e.props["waves-opacity"]||"0.6"},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-duration",evaluate:e=>e.props["waves-duration"]||"600"}],redundantAttribute:"expr95",selector:"[expr95]"}])},{type:r.IF,evaluate:e=>!e.attributeToBool(e.props.outlined)&&!e.attributeToBool(e.props.rounded),redundantAttribute:"expr97",selector:"[expr97]",template:e('<div class="unfocused-line"></div><div class="focused-line"></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["underline ",e.state.focused?"focused":null," ",e.state.error?"error":null].join("")}]}])}])},Nt={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))},onClick(e){Tt(this.props.onClick,e,"overlay")}},template:(e,t,r,a)=>e('<div expr99="expr99" class="container"></div>',[{type:r.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr99",selector:"[expr99]",template:e('<div expr100="expr100" class="overlay"></div><div class="popup"><div expr101="expr101"><slot expr102="expr102"></slot></div></div>',[{redundantAttribute:"expr100",selector:"[expr100]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]},{redundantAttribute:"expr101",selector:"[expr101]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["content ",e.state.transition?"opening":""," ",e.props.animation||"top"].join("")}]},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr102",selector:"[expr102]"}])}])},Ut={css:null,exports:{state:{toasts:{}},onBeforeUpdate(e,t){e.message&&!t.internal&&this.addToast({message:e.message,isError:e.isError,color:e.color,textColor:e.textColor},e.duration),t.internal=!1},generateStyle(e){let t="";return e.textColor&&(t+=`color: ${e.textColor};`),e.color&&(t+=`background-color: ${e.color};`),t},addToast(e,t){var r=this.toastID=Math.random().toString(36).substring(7);this.state.toasts[r]=Object.assign(e,{opening:!0}),setTimeout(()=>{this.state.toasts[r].opening=!1,this.update({toasts:this.state.toasts,internal:!0})},50),this.state.toasts[r].interval=setTimeout(()=>{this.removeToast(r)},t||5e3)},removeToastByClick(e){return()=>{clearInterval(this.state.toasts[e].interval),this.removeToast(e)}},removeToast(e){this.state.toasts[e]&&(this.state.toasts[e].opening=!0,this.update({toasts:this.state.toasts,internal:!0}),setTimeout(()=>{delete this.state.toasts[e],this.update({toasts:this.state.toasts,internal:!0})},200))}},template:(e,t,r,a)=>e('<div expr113="expr113"></div>',[{type:r.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.toasts[e.toastID].message].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["toast ",e.state.toasts[e.toastID].isError?"error":""," ",e.state.toasts[e.toastID].opening?"opening":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.removeToastByClick(e.toastID)},{type:t.ATTRIBUTE,isBoolean:!1,name:"style",evaluate:e=>e.generateStyle(e.state.toasts[e.toastID])}]}]),redundantAttribute:"expr113",selector:"[expr113]",itemName:"toastID",indexName:null,evaluate:e=>Object.keys(e.state.toasts)}])},St={css:null,exports:{onBeforeMount(e,t){this.updateAttributes(e,t)},onMounted(e,t){this.updateAttributes(e,t)},onBeforeUpdate(e,t){this.updateAttributes(e,t)},updateAttributes(e,t){t.checked=void 0!==e.checked?e.checked:t.checked,e.size&&"string"==typeof e.size&&(this.root.style["font-size"]=e.size);const r=this.$("span.material-switch-track"),a=this.$("span.material-switch-thumb"),n=(t.checked?e.trackSelectedColor:e.trackColor)||null,o=(t.checked?e.thumbSelectedColor:e.thumbColor)||null,i=(t.checked?e.outlineSelectedColor:e.outlineColor)||null;r&&(r.style["background-color"]=n),r&&(r.style["border-color"]=i),a&&(a.style["background-color"]=o,a.children.length>0?a.classList.add("material-switch-thumb-w-icon"):a.classList.remove("material-switch-thumb-w-icon"))},onChange(e){bt(this.props.disabled)||(e.target.checked=!this.state.checked,Tt(this.props.onChange,e),this.update({checked:this.checkedValue()}))},checkedValue(){return bt(this.props.intermediate)?!0!==this.state.checked&&this.state.checked?!this.oldValue:(this.oldValue=this.state.checked,"intermediate"):!this.state.checked},attributeToBool:bt},template:(e,t,r,a)=>e('<span expr104="expr104" class="material-switch-container"><span class="material-switch-thumb"><template expr105="expr105"></template><template expr107="expr107"></template></span><span class="material-switch-track"></span></span>',[{redundantAttribute:"expr104",selector:"[expr104]",expressions:[{type:t.ATTRIBUTE,isBoolean:!0,name:"checked",evaluate:e=>e.state.checked},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:r.IF,evaluate:e=>!e.state.checked,redundantAttribute:"expr105",selector:"[expr105]",template:e('<slot expr106="expr106" name="thumb-icon"></slot>',[{type:r.SLOT,attributes:[],name:"thumb-icon",template:null,redundantAttribute:"expr106",selector:"[expr106]"}])},{type:r.IF,evaluate:e=>e.state.checked,redundantAttribute:"expr107",selector:"[expr107]",template:e('<slot expr108="expr108" name="thumb-selected-icon"></slot>',[{type:r.SLOT,attributes:[],name:"thumb-selected-icon",template:null,redundantAttribute:"expr108",selector:"[expr108]"}])}])},Ot={css:null,exports:{state:{selected:0,widths:{}},components:{MaterialButton:wt},onMounted(e,t){this.$(".line");const r=this.$$("material-button"),a=parseFloat((100/this.props.tabs.length).toFixed(2));r.forEach((e,n)=>{n==r.length-1&&a*r.length!==100?t.widths[n]=a+(100-a*r.length):t.widths[n]=a,e.style.width=`${t.widths[n]}%`}),this.setLinePosition(),this.updateLineColor(e,t),this.setLinePosition()},onUpdated(e,t){this.updateLineColor(e,t)},updateLineColor(e,t){const r=e.inverted?e.lineColor:e.lineSelectedColor,a=e.inverted?e.lineSelectedColor:e.lineColor,n=this.$(".line"),o=this.$(".line-wrapper");n&&o&&(n.style.background=r,o.style.background=a)},onTabChanged(e,t){this.update({selected:t}),this.setLinePosition(),Tt(this.props.onTabChanged,this.props.tabs[t],t)},setLinePosition(){const e=this.$(".line");e&&(e.style.left=(100/this.props.tabs.length).toFixed(2)*this.state.selected+"%",e.style.width=`${this.state.widths[this.state.selected]}%`)},cut:e=>e.length>props.cut?e.substr(0,props.cut)+"...":e},template:(e,t,r,a)=>e('<material-button expr109="expr109"></material-button><div expr111="expr111" class="line-wrapper"></div>',[{type:r.EACH,getKey:null,condition:null,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<div expr110="expr110" class="text"> </div>',bindings:[{redundantAttribute:"expr110",selector:"[expr110]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.cut?e.cut(e.tab.title||e.tab):e.tab.title||e.tab},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.tab.title||e.tab}]}]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>t=>e.onTabChanged(t,e.k)},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>e.state.selected==e.k?"selected":""},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-duration",evaluate:e=>e.props.wavesDuration},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,isBoolean:!1,name:"waves-color",evaluate:e=>e.props.wavesColor},{type:t.ATTRIBUTE,isBoolean:!1,name:"color",evaluate:e=>e.state.selected==e.k&&e.props.inverted?e.props.textSelectedColor:e.props.color},{type:t.ATTRIBUTE,isBoolean:!1,name:"text-color",evaluate:e=>e.state.selected!=e.k||e.props.inverted?e.props.textColor:e.props.textSelectedColor},{type:t.ATTRIBUTE,isBoolean:!1,name:"inverted",evaluate:e=>e.props.inverted}]}]),redundantAttribute:"expr109",selector:"[expr109]",itemName:"tab",indexName:"k",evaluate:e=>e.props.tabs},{type:r.IF,evaluate:e=>e.props.useLine,redundantAttribute:"expr111",selector:"[expr111]",template:e('<div class="line" ref="line"></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"inverted",evaluate:e=>e.props.inverted}]}])}])};function Dt(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var a=e[r];if("*"!==a&&"+"!==a&&"?"!==a)if("\\"!==a)if("{"!==a)if("}"!==a)if(":"!==a)if("("!==a)t.push({type:"CHAR",index:r,value:e[r++]});else{var n=1,o="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0===--n){s++;break}}else if("("===e[s]&&(n++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=e[s++]}else o+=e[s++]+e[s++];if(n)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:o}),r=s}else{for(var i="",s=r+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),a=t.prefixes,n=void 0===a?"./":a,o="[^".concat(Mt(t.delimiter||"/#?"),"]+?"),i=[],s=0,l=0,u="",p=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},c=function(e){var t=p(e);if(void 0!==t)return t;var a=r[l],n=a.type,o=a.index;throw new TypeError("Unexpected ".concat(n," at ").concat(o,", expected ").concat(e))},d=function(){for(var e,t="";e=p("CHAR")||p("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var m=p("CHAR"),h=p("NAME"),g=p("PATTERN");if(h||g){var v=m||"";-1===n.indexOf(v)&&(u+=v,v=""),u&&(i.push(u),u=""),i.push({name:h||s++,prefix:v,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""})}else{var f=m||p("ESCAPED_CHAR");if(f)u+=f;else if(u&&(i.push(u),u=""),p("OPEN")){v=d();var y=p("NAME")||"",x=p("PATTERN")||"",b=d();c("CLOSE"),i.push({name:y||(x?s++:""),pattern:y&&!x?o:x,prefix:v,suffix:b,modifier:p("MODIFIER")||""})}else c("END")}}return i}function Mt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Lt(e){return e&&e.sensitive?"":"i"}function jt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var a=r.strict,n=void 0!==a&&a,o=r.start,i=void 0===o||o,s=r.end,l=void 0===s||s,u=r.encode,p=void 0===u?function(e){return e}:u,c=r.delimiter,d=void 0===c?"/#?":c,m=r.endsWith,h="[".concat(Mt(void 0===m?"":m),"]|$"),g="[".concat(Mt(d),"]"),v=i?"^":"",f=0,y=e;f<y.length;f++){var x=y[f];if("string"==typeof x)v+=Mt(p(x));else{var b=Mt(p(x.prefix)),T=Mt(p(x.suffix));if(x.pattern)if(t&&t.push(x),b||T)if("+"===x.modifier||"*"===x.modifier){var A="*"===x.modifier?"?":"";v+="(?:".concat(b,"((?:").concat(x.pattern,")(?:").concat(T).concat(b,"(?:").concat(x.pattern,"))*)").concat(T,")").concat(A)}else v+="(?:".concat(b,"(").concat(x.pattern,")").concat(T,")").concat(x.modifier);else"+"===x.modifier||"*"===x.modifier?v+="((?:".concat(x.pattern,")").concat(x.modifier,")"):v+="(".concat(x.pattern,")").concat(x.modifier);else v+="(?:".concat(b).concat(T,")").concat(x.modifier)}}if(l)n||(v+="".concat(g,"?")),v+=r.endsWith?"(?=".concat(h,")"):"$";else{var E=e[e.length-1],w="string"==typeof E?g.indexOf(E[E.length-1])>-1:void 0===E;n||(v+="(?:".concat(g,"(?=").concat(h,"))?")),w||(v+="(?=".concat(g,"|").concat(h,")"))}return new RegExp(v,Lt(r))}(Dt(e,r),t,r)}function _t(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,n=r.exec(e.source);n;)t.push({name:n[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),n=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var a=e.map(function(e){return _t(e,t,r).source});return new RegExp("(?:".concat(a.join("|"),")"),Lt(r))}(e,t,r):jt(e,t,r)}var Pt=Symbol();function Gt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new Promise(function(e,r){return function t(a,n){if(!a.length)return e(n);var o=V(a),i=o[0],s=E(o).slice(1),l="function"==typeof i?i(n):i,u=function(e){return t(s,e)};if(null!=l){if(l===Pt)return;if(l.then)return l.then(u,r)}return Promise.resolve(u(l))}(t)})}Gt.cancel=function(){return Pt},Gt.compose=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Gt.apply(void 0,z(t.reverse()))};var Vt=new Set,zt=Symbol();function Ht(e,t){return e.forEach(function(r){r(t)===zt&&e.delete(r)}),e}function $t(e){throw new Error(e)}function Ft(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=new Set,n=new Set,o=new Set,i=new Set(t),s=function(e){var t=j().m(function t(){var r;return j().w(function(t){for(;;)switch(t.n){case 0:return void(t.n=1);case 1:return r=t.v,t.n=2,Gt.apply(void 0,[r].concat(z(e)));case 2:t.n=0;break;case 3:return t.a(2)}},t)})();return t.next(),t}(i),l=Object.create(s),u=function(e){return function(t){return e.add(t)&&l}},p=function(e){return function(t){return e.delete(t)?l:$t("Couldn't remove handler passed by reference")}};return Object.assign(l,{on:Object.freeze({value:u(a),error:u(n),end:u(o)}),off:Object.freeze({value:p(a),error:p(n),end:p(o)}),connect:u(i),push:function(e){var t=l.next(e),r=t.value;return t.done||r.then(function(e){return Ht(a,e)},function(e){return Ht(n,e)}),l},end:function(){return s.return(),Ht(o),[a,n,o,i].forEach(function(e){return e.clear()}),l},fork:function(){return Ft.apply(void 0,z(i))},next:function(e){var t=s.next(e);return s.next(),t}})}Ft.install=function(e,t){return e&&"string"==typeof e||$t("Please provide a name (as string) for your erre plugin"),t&&"function"==typeof t||$t("Please provide a function for your erre plugin"),Vt.has(e)?$t("The ".concat(e," is already part of the erre API, please provide a different name")):(Ft[e]=t,Vt.add(e)),Ft},Ft.install("cancel",Gt.cancel),Ft.install("off",function(){return zt});var Xt=function(e){return e.replace(Yt.base,"")},Wt=function(e){return function(t){return er(t,e)?t:Ft.cancel()}},qt=function(e){if(!Yt.silentErrors)throw new Error(e)},Kt=Ft(function(e){return function(e){return"string"==typeof e}(e)?e:Ft.cancel()}).on.error(qt),Jt=function(e){return L(L({},Yt),e)},Yt={base:"https://localhost",silentErrors:!1,sensitive:!1,strict:!1,end:!0,start:!0,delimiter:"/#?",encode:void 0,endsWith:void 0,prefixes:"./"},Qt=function(e,t,r){return _t(e,t,Jt(r))},Zt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Jt(r).base,n=E(V(t.exec(e))).slice(1),o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C(URL,t)}(e,a);return o.params=n.reduce(function(e,t,a){var n=r.keys&&r.keys[a];return n&&(e[n.name]=t?decodeURIComponent(t):t),e},{}),o},er=function(e,t){return t.test(e)},tr=function(e,t){return[decodeURI,Xt,Wt(e),function(r){return Zt(r,e,t)}]};function rr(e,t){var r,a,n=[],o=_t(e,n,t),i=Ft.apply(void 0,z(tr(o,L(L({},t),{},{keys:n}))));return(r=Kt,a=i,r.on.value(a.push),a.on.end(function(){r.off.value(a.push)}),a).on.error(qt)}var ar="popstate",nr="click",or="/",ir="path",sr=/^.+?\/\/+[^/]+/;function lr(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}var ur,pr=(ur=null,Kt.on.value(function(e){return ur=e}),function(){return ur}),cr=function(e){return 1===e.length?e[0]:e};function dr(e,t,r){var a="string"==typeof t?[t]:t;return cr(lr(e).map(function(e){return cr(a.map(function(t){return e[r](t)}))}))}function mr(e,t){return dr(e,t,"hasAttribute")}var hr,gr=function(){return vr()||global},vr=function(){return"undefined"==typeof window?null:window},fr=function(){return"undefined"==typeof document?null:document},yr=function(){var e=vr();return e?e.location:{}},xr=(hr=gr()).requestAnimationFrame||hr.setTimeout,br=function(){var e=gr();return e.cancelAnimationFrame||e.clearTimeout}(),Tr=function(e,t,r){return e?e.flatMap(function(e){return null==e.name?Object.entries(e.evaluate(r)).map(function(e){var t=G(e,2),r=t[0],a=t[1];return{name:r,evaluate:function(){return a}}}):e}).find(function(e){return e.name.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})===t}):null},Ar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=ft.DOMBindings,r=t.template,a=t.bindingTypes,n=t.expressionTypes;return r(null,[{type:a.SLOT,name:"default",attributes:e.map(function(e){return L(L({},e),{},{type:n.ATTRIBUTE})})}])};function Er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var wr=function(e,t,r){var a=Er.apply(void 0,z(tr(e,r).reverse()))(t);return a.params?a:null},Br={css:null,exports:vt(function(e){var t=e.slots,r=e.attributes,a={before:document.createTextNode(""),after:document.createTextNode("")};return{mount:function(e,t){var n,o=this,i=pr(),s=(null===(n=Tr(r,ir,t))||void 0===n?void 0:n.evaluate(t))||dr(e,ir,"getAttribute"),l=Qt(s,[]),u={pathToRegexp:l,route:i&&er(i,l)?wr(l,i,{}):null};this.el=e,this.slot=Ar([{isBoolean:!1,name:"route",evaluate:function(){return o.state.route}}]),this.context=t,this.state=u,this.boundOnBeforeRoute=this.onBeforeRoute.bind(this),this.boundOnRoute=this.onRoute.bind(this),Kt.on.value(this.boundOnBeforeRoute),this.stream=rr(s).on.value(this.boundOnRoute),e.replaceWith(a.before),a.before.parentNode.insertBefore(a.after,a.before.nextSibling),u.route&&this.mountSlot()},update:function(e){this.context=e,this.state.route&&this.slot.update({},e)},mountSlot:function(){var e=this.state.route;a.before.parentNode.insertBefore(this.el,a.before.nextSibling),this.callLifecycleProperty("onBeforeMount",e),this.slot.mount(this.el,{slots:t},this.context),this.callLifecycleProperty("onMounted",e)},clearDOM:function(e){!function(e,t,r){var a=function(e){if(e&&(e!==t||r)){var n=e.nextSibling;e.remove(),a(n)}};a(r?e:e.nextSibling)}(a.before,a.after,e)},unmount:function(){Kt.off.value(this.boundOnBeforeRoute),this.slot.unmount({},this.context,!0),this.clearDOM(!0),this.stream.end()},onBeforeRoute:function(e){var t=this.state.route;t&&!er(e,this.state.pathToRegexp)&&(this.callLifecycleProperty("onBeforeUnmount",t),this.slot.unmount({},this.context,!0),this.clearDOM(!1),this.state.route=null,this.callLifecycleProperty("onUnmounted",t))},onRoute:function(e){var t,r,a=this.state.route;this.state.route=e,a?(this.callLifecycleProperty("onBeforeUpdate",e),this.slot.update({},this.context),this.callLifecycleProperty("onUpdated",e)):this.mountSlot(),e.hash&&(r=e.hash,/^([a-zA-Z0-9-_*#.:[\]\s>+~()='"]|\\.)+$/.test(r))&&(null===(t=function(e){return lr("string"==typeof e?document.querySelectorAll(e):e)}(e.hash))||void 0===t||t[0].scrollIntoView())},callLifecycleProperty:function(e){for(var t=Tr(r,e,this.context),a=arguments.length,n=new Array(a>1?a-1:0),o=1;o<a;o++)n[o-1]=arguments[o];t&&t.evaluate(this.context).apply(void 0,n)}}}),template:null,name:"route-hoc"},Ir=function(e){return e[e.length-1]===or?e.substr(0,e.length-1):e},Cr=function(e){var t,r=vr().location,a=r?"".concat(r.protocol,"//").concat(r.host):"",n=(r||{}).pathname;switch(!0){case!1===Boolean(e):return Ir("".concat(a).concat(n||""));case/(www|http(s)?:)/.test(e):return e;case"#"===e[0]:return"".concat(a).concat(n&&n!==or?n:"").concat(e);case e===or:return Ir(a);default:return Ir("".concat(a).concat((t=e)[0]===or?t:"".concat(or).concat(t)))}};function kr(e){var t;t={base:Cr(e)},Object.entries(t).forEach(function(e){var t=G(e,2),r=t[0],a=t[1];Object.hasOwn(Yt,r)&&(Yt[r]=a)})}function Rr(e,t,r,a,n){var o;e=lr(e),(o=t,o.split(/\s/)).forEach(function(t){e.forEach(function(e){return e[a](t,r,!1)})})}function Nr(e,t,r,a){return Rr(e,t,r,"addEventListener"),e}function Ur(e,t,r,a){return Rr(e,t,r,"removeEventListener"),e}var Sr=function(){return Kt.push(jr(String(yr().href)))},Or=function(e){var t=e.includes(Yt.base)?e:Yt.base+e,r=yr(),a="undefined"==typeof history?null:history,n=fr();a&&t!==r.href&&a.pushState(null,n.title,t)},Dr=function(e){return e&&!Mr(e)?Dr(e.parentNode):e},Mr=function(e){return"A"===e.nodeName},Lr=function(e){return!e||!Mr(e)||mr(e,"download")||!mr(e,"href")||function(e){return e.target&&"_self"!==e.target}(e)||-1===e.href.indexOf(yr().href.match(sr)[0])},jr=function(e){return e.replace(Yt.base,"")},_r=function(e){if(!function(e){return e.which&&1!==e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented}(e)){var t,r=Dr(e.target);if(!Lr(r)&&(t=r.href,!Yt.base||t.includes(Yt.base)))e.preventDefault(),Kt.push(jr(r.href))}};var Pr="base",Gr=function(e){var t=e.slots,r=e.attributes,a=e.props;return Gr.wasInitialized&&function(e,t){throw new Error(e,{cause:t})}("Multiple <router> components are not supported"),{slot:null,el:null,teardown:null,mount:function(e,t){var a,n,o,i=this,s=Tr(r,"initialRoute",t),l=s?s.evaluate(t):null,u=pr(),p=function(){i.createSlot(t),Kt.off.value(p)};Gr.wasInitialized=!0,this.el=e,this.teardown=(a=this.root,n=vr(),o=a||fr(),n&&(Nr(n,ar,Sr),Nr(o,nr,_r)),Kt.on.value(Or),function(){n&&(Ur(n,ar,Sr),Ur(o,nr,_r)),Kt.off.value(Or)}),this.setBase(t),u&&!l?this.createSlot(t):(Kt.on.value(p),Kt.push(l||window.location.href))},createSlot:function(e){if(t&&t.length){var a=Tr(r,"onStarted",e);this.slot=Ar(),this.slot.mount(this.el,{slots:t},e),a&&a.evaluate(e)(pr())}},update:function(e){var t=this;this.setBase(e),this.slot&&(br(this.deferred),this.deferred=xr(function(){t.slot.update({},e)}))},unmount:function(){var e;(this.teardown(),Gr.wasInitialized=!1,this.slot)&&(e=this.slot).unmount.apply(e,arguments)},getBase:function(e){var t=Tr(r,Pr,e);return t?t.evaluate(e):this.el.getAttribute(Pr)||"/"},setBase:function(e){kr(a?a.base:this.getBase(e))}}};Gr.wasInitialized=!1;var Vr={css:null,exports:vt(Gr),template:null,name:"router-hoc"},zr="registryServer";function Hr(e){var t=["Bytes","KB","MB","GB","TB"];if(null==e||isNaN(e))return"?";if(0===e)return"0 Byte";var r=parseInt(Math.floor(Math.log(e)/Math.log(1024))),a=e/Math.pow(1024,r);if(a<10){var n=(e-Math.floor(a)*Math.pow(1024,r))/Math.pow(1024,r);return"".concat(Math.floor(a),".").concat(Math.floor(10*n)," ").concat(t[r])}return Math.ceil(a)+" "+t[r]}function $r(e,t,r){return r||(r=100),e?e.slice((t-1)*r,r*t):[]}function Fr(e,t){return t||(t=100),e?Math.trunc(e.length/t)+1:0}function Xr(e,t){var r=[],a=10;if(1===t)return r;1!==e&&t>=a&&(r.push({icon:"first_page",page:1}),r.push({icon:"chevron_left",page:e-1}));for(var n=Math.round(Math.max(1,Math.min(e-5,t-a+1))),o=n;o<Math.min(t+1,n+a);o++)r.push({page:o,current:o===e,"space-left":1===e&&t>a,"space-right":e===t&&t>a});return e!==t&&t>=a&&(r.push({icon:"chevron_right",page:e+1}),r.push({icon:"last_page",page:t})),r}function Wr(e){return e?e.replace(/^https?:\/\//,""):""}function qr(e){return e>="0"&&e<="9"}var Kr={message:"Access on registry response was blocked. Try adding the header `Access-Control-Expose-Headers: Docker-Content-Digest` to your proxy or registry: https://docs.docker.com/registry/configuration/#http",isError:!0};function Jr(e){try{var t=JSON.parse(localStorage.getItem(zr));if(t instanceof Array)return isNaN(e)?t.map(function(e){return e.trim().replace(/\/*$/,"")}):t[e]}catch(e){}return isNaN(e)?[]:""}function Yr(e){if("string"==typeof e)e=e.split(",");else if(!Array.isArray(e))throw new Error("setRegistries must be called with string or array parameter");e=e.map(function(e){return e.replace(/\/*$/,"")}),localStorage.setItem(zr,JSON.stringify(e))}function Qr(e){var t=e.trim().replace(/\/*$/,""),r=Jr().filter(function(e){return e!==t});return Yr([t].concat(r)),t}function Zr(e){if(e)return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)}function ea(e){return!0===e||"true"===e}var ta=function(e,t){var r=parseInt(e),a=parseInt(t);return r>a?1:a>r?-1:!isNaN(r)&&isNaN(a)?1:isNaN(r)&&!isNaN(a)?-1:0};function ra(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.0.0",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0.0.0";if(e===t)return!0;e=e.split("."),t=t.split(".");var r=e[2].indexOf("-")>=0,a=ta(e[0],t[0]),n=ta(e[1],t[1]),o=ta(e[2],t[2]);return!r&&(a>0||0===a&&n>0||0===a&&0===n&&o>=0)||!(!r||!(a>0||0===a&&n>0))}function aa(e){if(e)try{return JSON.parse(e)}catch(e){}}function na(){var e={};return window.location.search.slice(1).split("&").forEach(function(t){var r=t.indexOf("=");e[t.slice(0,r)]=r<0?"":t.slice(r+1)}),e}function oa(e){var t=na();for(var r in e)null===e[r]?delete t[r]:t[r]=e[r];return t}function ia(e){var t=[];for(var r in e)r&&void 0!==e[r]&&t.push("".concat(r,"=").concat(e[r]));return 0===t.length?"":"?".concat(t.join("&"))}function sa(e){var t=window.location,r=oa(e);return t.origin+t.pathname+ia(r)}var la={home:function(){return sa({page:null})},taglist:function(e){return"".concat(sa({page:null}),"#!/taglist/").concat(e)},getTagListImage:function(){return pr().replace(/^.*(#!)?\/?taglist\//,"")},history:function(e,t){return"".concat(sa({page:null}),"#!/taghistory/image/").concat(e,"/tag/").concat(t)},getTagHistoryImage:function(){return pr().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$2")},getTagHistoryTag:function(){return pr().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$3")},updateQueryString:function(e){var t=ia(oa(e));history.pushState(null,"",t+window.location.hash)},updateUrlQueryParam:function(e){this.updateQueryString({url:Zr(e)})},getUrlQueryParam:function(){var e=na().url;if(e)try{return function(e){if(e)return e.startsWith("http")?window.decodeURIComponent(e):atob(e)}(e)}catch(t){console.error("Can't decode query parameter URL: ".concat(e),t)}},updatePageQueryParam:function(e){this.updateQueryString({page:e})},getPageQueryParam:function(){return na().page}},ua=/(blobs|manifests)\/sha256:[a-f0-9]+$/,pa=function(e,t){if("GET"===e){var r=ua.exec(t);if(r&&r[0])return r[0]}},ca=function(){return k(function e(t){I(this,e),this.oReq=new XMLHttpRequest,this.oReq.hasHeader=da,this.oReq.getErrorMessage=ma,this._events={},this._headers={},this.onAuthentication=t&&t.onAuthentication,this.withCredentials=t&&t.withCredentials},[{key:"getContentDigest",value:function(e){var t;if(null!==(t=this.cache)&&void 0!==t&&t.dockerContentdigest)e(this.cache.dockerContentdigest);else if(this.oReq.hasHeader("Docker-Content-Digest"))e(this.oReq.getResponseHeader("Docker-Content-Digest"));else if(window.crypto&&window.TextEncoder){var r;crypto.subtle.digest("SHA-256",(new TextEncoder).encode(this.oReq.responseText||(null===(r=this.cache)||void 0===r?void 0:r.responseText))).then(function(t){e("sha256:"+Array.from(new Uint8Array(t)).map(function(e){return e.toString(16).padStart(2,"0")}).join(""))})}}},{key:"addEventListener",value:function(e,t){this._events[e]=t;var r=this;switch(e){case"loadend":r.oReq.addEventListener("loadend",function(){var e=this.hasHeader("www-authenticate")&&ga(this.getResponseHeader("www-authenticate"));401!==this.status||this.withCredentials&&!e?(200===this.status&&function(e,t,r){var a=r.responseText,n=r.dockerContentdigest,o=pa(e,t);if(o)try{sessionStorage.setItem("".concat(o,"/responseText"),a),sessionStorage.setItem("".concat(o,"/dockerContentdigest"),n)}catch(e){}}(r._method,r._url,{responseText:this.responseText,dockerContentdigest:this.getResponseHeader("Docker-Content-Digest")}),t.bind(this)()):r.onAuthentication(e,function(e){var t=new XMLHttpRequest;for(var a in t._url=r._url,t.open(r._method,r._url),r._events)t.addEventListener(a,r._events[a]);for(var n in r._headers)t.setRequestHeader(n,r._headers[n]);e&&e.token?t.setRequestHeader("Authorization","Bearer ".concat(e.token)):e&&e.access_token?t.setRequestHeader("Authorization","Bearer ".concat(e.access_token)):t.withCredentials=!0,t.hasHeader=da,t.getErrorMessage=ma,r.oReq=t,t.send()})});break;case"load":r.oReq.addEventListener("load",function(){401!==this.status&&t.bind(this)()});break;default:r.oReq.addEventListener(e,function(){t.bind(this)()})}}},{key:"setRequestHeader",value:function(e,t){this.oReq.setRequestHeader(e,t),this._headers[e]=t}},{key:"open",value:function(e,t){this._method=e,this._url=t,this.oReq._url=t,this.withCredentials&&(this.oReq.withCredentials=!0),this.oReq.open(e,t)}},{key:"send",value:function(){var e=function(e,t){var r=pa(e,t);if(r)try{return{responseText:sessionStorage.getItem("".concat(r,"/responseText")),dockerContentdigest:sessionStorage.getItem("".concat(r,"/dockerContentdigest"))}}catch(e){}}(this._method,this._url);if(e&&e.responseText)return this.cache=e,this._events.loadend.bind({status:200,responseText:e.responseText})();this.oReq.send()}}])}(),da=function(e){return this.getAllResponseHeaders().split("\n").some(function(t){return new RegExp("^"+e+":","i").test(t)})},ma=function(){return this._url.match("^http://")&&"https:"===window.location.protocol?{code:"MIXED_CONTENT",url:this._url}:this._url&&this._url.match("^http")?this.withCredentials&&!this.hasHeader("Access-Control-Allow-Credentials")?"The `Access-Control-Allow-Credentials` header in the response is missing and must be set to `true` when the request's credentials mode is on. Origin `"+new URL(this._url).origin+"` is therefore not allowed access.":"An error occured: Check your connection and your registry must have `Access-Control-Allow-Origin` header set to `"+window.location.origin+"`":{code:"INCORRECT_URL",url:this._url}},ha=W(/Bearer realm="([^"]+)",service="([^"]+)",scope="([^"]+)"/,{realm:1,service:2,scope:3}),ga=function(e){var t=ha.exec(e);return t&&t.groups};function va(e,t){return!e||t&&t.toLowerCase().indexOf(e)>=0}var fa={css:'search-bar material-input,[is="search-bar"] material-input{ line-height: initial; min-width: 5em; } @media screen and (max-width: 400px) {search-bar material-input,[is="search-bar"] material-input{ display: none; } }',exports:{onMounted(e,t){const r=this.$("input");let a="";const n=()=>{a!==r.value&&e.onSearch(r.value.toLowerCase()),a=r.value};r.addEventListener("keyup",n),Kt.on.value(()=>{r.value="",n()}),window.addEventListener("keydown",e=>{if(114===e.keyCode||e.ctrlKey&&70===e.keyCode){if(document.activeElement===r)return!0;e.preventDefault(),r.focus()}})}},template:(e,t,r,a)=>e('<material-input expr20="expr20" label="Search in page" text-color="var(--header-text)" label-color="var(--header-accent-text)" color="var(--header-accent-text)"></material-input>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-input",slots:[],attributes:[],redundantAttribute:"expr20",selector:"[expr20]"}]),name:"search-bar"},ya={css:null,exports:{onBeforeMount(e,t){e.item.images&&1===e.item.images.length?t.image=e.item.images[0]:"string"==typeof e.item?t.image=e.item:e.item.images&&e.item.repo&&(t.images=e.item.images,t.repo=e.item.repo,t.nImages=e.item.images.length,t.expanded=e.catalogDefaultExpanded),e.showCatalogNbTags&&t.image&&this.getNbTags(e,t)},onMounted(e,t){const r=this.$("material-card");r&&(r.style["z-index"]=e.zIndex)},onBeforeUpdate(e,t){e.filterResults&&t.images?t.nImages=t.images.filter(t=>va(e.filterResults,t)).length:t.nImages=t.images&&t.images.length},onClick(){this.state.repo&&(this.update({expanded:!this.state.expanded,expanding:!0}),setTimeout(()=>{this.update({expanding:!1})},50))},getNbTags(e,t){const r=this,a=new ca({onAuthentication:e.onAuthentication,withCredentials:e.isRegistrySecured});a.addEventListener("loadend",function(){if(200===this.status){const e=(JSON.parse(this.responseText).tags||[]).length;r.update({nbTags:e})}else 404===this.status?e.onNotify("Server not found",!0):e.onNotify(this.responseText,!0)}),a.addEventListener("error",function(){e.onNotify(this.getErrorMessage(),!0)}),a.open("GET",e.registryUrl+"/v2/"+t.image+"/tags/list"),a.send()},matchSearch:va,router:la},template:(e,t,r,a)=>e('<div expr114="expr114" class="content"></div>',[{type:r.IF,evaluate:e=>!e.props.filterResults||e.state.nImages>0||e.matchSearch(e.props.filterResults,e.state.image),redundantAttribute:"expr114",selector:"[expr114]",template:e('<material-card expr115="expr115" class="list highlight"></material-card><catalog-element expr123="expr123"></catalog-element>',[{type:r.IF,evaluate:e=>!e.props.showCatalogNbTags||0!==e.state.nbTags,redundantAttribute:"expr115",selector:"[expr115]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<a expr116="expr116"></a><material-waves expr118="expr118" center="true" color="#ddd"></material-waves><span expr119="expr119"><i class="material-icons">send</i> <div expr120="expr120" class="item-count right"></div><div expr122="expr122" class="item-count right"></div></span>',bindings:[{type:r.IF,evaluate:e=>e.state.image,redundantAttribute:"expr116",selector:"[expr116]",template:e('<material-waves expr117="expr117" center="true" color="#ddd"></material-waves>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.router.taglist(e.state.image)}]},{type:r.TAG,getComponent:a,evaluate:e=>"material-waves",slots:[],attributes:[],redundantAttribute:"expr117",selector:"[expr117]"}])},{type:r.IF,evaluate:e=>e.state.images,redundantAttribute:"expr118",selector:"[expr118]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-waves",slots:[],attributes:[]}])},{redundantAttribute:"expr119",selector:"[expr119]",expressions:[{type:t.TEXT,childNodeIndex:1,evaluate:e=>[e.state.image||e.state.repo].join("")}]},{type:r.IF,evaluate:e=>e.state.images,redundantAttribute:"expr120",selector:"[expr120]",template:e(' <i expr121="expr121">expand_more</i>',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images"].join("")}]},{redundantAttribute:"expr121",selector:"[expr121]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["material-icons animated ",e.state.expanded?"expanded":""].join("")}]}])},{type:r.IF,evaluate:e=>e.props.showCatalogNbTags&&e.state.image,redundantAttribute:"expr122",selector:"[expr122]",template:e(' <i class="material-icons animated"></i>',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nbTags," tags"].join("")}]}])}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"expanded",evaluate:e=>e.state.expanded},{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])},{type:r.EACH,getKey:null,condition:e=>e.state.images,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onnNotify},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.props.isRegistrySecured},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["animated ",e.state.expanded||e.props.filterResults?"":"hide"," ",e.state.expanding?"expanding":""].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"z-index",evaluate:e=>e.props.zIndex-1},{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item}]}]),redundantAttribute:"expr123",selector:"[expr123]",itemName:"item",indexName:null,evaluate:e=>e.state.images}])}]),name:"catalog-element"},xa=function(e){function t(e,r){var a;return I(this,t),(a=B(this,t,[e])).isError=!0,a.code=r,a}return U(t,e),k(t)}(X(Error)),ba="CATALOG_BRANCHING_CONFIGURATION",Ta=function(e,t){if(e.images){if(e.repo===t)return e;for(var r=0;r<e.images.length;r++){var a=Ta(e.images[r],t);if(a)return a}if(t.startsWith(e.repo)){var n={repo:t,images:[]};return e.images.push(n),n}}},Aa=function(e){return""===e?1:parseInt(e)},Ea=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e=Aa(e),t=Aa(t),isNaN(e)||isNaN(t))throw new xa("min and max must be integers: (min: ".concat(e," and max: ").concat(t,"))"),ba);if(e>t)throw new xa("min must be inferior to max (min: ".concat(e," <= max: ").concat(t,")"),ba);if(t<0||e<0)throw new xa("min and max must be greater than equals to 0 (min: ".concat(e," >= 0 and max: ").concat(t," >= 0)"),ba);return 1==t&&(e=1),function(r){return r.sort().reduce(function(r,a){var n=a.split("/");if(n.length>e&&e>0){var o=function(e,t){for(var r="",a=0;a<Math.min(t,e.length-1);a++)r+="".concat(e[a],"/");return r}(n,t),i=r.length>0&&Ta(r[r.length-1],o);return i||(i={repo:o,images:[]},r.push(i)),i.images.push(a),r}return r.push(a),r},[])}},wa={css:"catalog { display: block; margin: auto; } catalog > material-card { width: 100%; }",exports:{components:{CatalogElement:ya},state:{registryName:"",length:0,loadend:!1,repositories:[],registryUrl:""},onBeforeMount(e){this.state.registryName=e.registryName,this.state.catalogElementsLimit=e.catalogElementsLimit;try{this.state.branching=Ea(e.catalogMinBranches,e.catalogMaxBranches)}catch(t){e.onNotify(t)}},onMounted(e,t){this.display(e,t)},onUpdated(e,t){this.display(e,t)},display(e,t){if(e.registryUrl===t.registryUrl)return;t.registryUrl=e.registryUrl;let r=[],a=0;const n=this,o=`${e.registryUrl}/v2/_catalog?n=${t.catalogElementsLimit}`,i=new ca({onAuthentication:this.props.onAuthentication,withCredentials:e.isRegistrySecured});i.addEventListener("load",function(){if(200===this.status)r=JSON.parse(this.responseText).repositories||[],r.sort(),a=r.length,"function"==typeof t.branching&&(r=t.branching(r));else if(404===this.status)n.props.onNotify({code:"CATALOG_NOT_FOUND",url:o},!0);else if(400===this.status){let e;try{e=JSON.parse(this.responseText)}catch(e){}if(!e||!Array.isArray(e.errors))return n.props.onNotify(this.responseText,!0);n.props.onNotify({...e,url:o},!0)}else n.props.onNotify(this.responseText)}),i.addEventListener("error",function(){n.props.onNotify(this.getErrorMessage(),!0)}),i.addEventListener("loadend",function(){n.update({repositories:r,nRepositories:r.length,nImages:a,loadend:!0})}),i.open("GET",o),i.send()}},template:(e,t,r,a)=>e('<material-card expr41="expr41" ref="catalog-tag" class="catalog header"></material-card><div expr44="expr44" class="spinner-wrapper"></div><catalog-element expr46="expr46"></catalog-element>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<div class="material-card-title-action"><h2 expr42="expr42"> <div expr43="expr43" class="item-count"> </div></h2></div>',bindings:[{redundantAttribute:"expr42",selector:"[expr42]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Repositories of ",e.state.registryName].join("")}]},{redundantAttribute:"expr43",selector:"[expr43]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images in ",e.state.nRepositories," repositories"].join("")}]}]}],attributes:[],redundantAttribute:"expr41",selector:"[expr41]"},{type:r.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr44",selector:"[expr44]",template:e('<material-spinner expr45="expr45"></material-spinner>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr45",selector:"[expr45]"}])},{type:r.EACH,getKey:null,condition:null,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"item",evaluate:e=>e.item},{type:t.ATTRIBUTE,isBoolean:!1,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags},{type:t.ATTRIBUTE,isBoolean:!1,name:"catalog-default-expanded",evaluate:e=>e.props.catalogDefaultExpanded||1===e.state.nRepositories},{type:t.ATTRIBUTE,isBoolean:!1,name:"z-index",evaluate:e=>e.props.catalogMaxBranches-e.props.catalogMinBranches+2},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.props.isRegistrySecured}]}]),redundantAttribute:"expr46",selector:"[expr46]",itemName:"item",indexName:null,evaluate:e=>e.state.repositories}]),name:"catalog"};function Ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ia,Ca={exports:{}};var ka,Ra,Na,Ua,Sa,Oa,Da,Ma,La=(Ia||(Ia=1,ka=Ca,Ra="*",Na=Object.defineProperties,Ua=Object.entries,Sa=function(e,t){return function(r,a){return e.has(r)?e.get(r).add(a):e.set(r,(new Set).add(a)),t}},Oa=function(e,t){return function(r,a){return r!==Ra||a?function(e,t,r,a){if(a){var n=e.get(r);n&&(n.delete(a),0===n.size&&e.delete(r))}else e.delete(r)}(e,0,r,a):e.clear(),t}},Da=function(e,t){return function(e,r){return t.on(e,function a(){t.off(e,a);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r.apply(t,o)})}},Ma=function(e,t){return function(r){for(var a=arguments.length,n=new Array(a>1?a-1:0),o=1;o<a;o++)n[o-1]=arguments[o];var i=e.get(r);return i&&i.forEach(function(e){return e.apply(t,n)}),e.get(Ra)&&r!==Ra&&t.trigger.apply(t,[Ra,r].concat(n)),t}},ka.exports=function(e){var t=new Map;return Na(e=e||{},Ua({on:Sa,off:Oa,one:Da,trigger:Ma}).reduce(function(r,a){var n=G(a,2),o=n[0],i=n[1];return r[o]={value:i(t,e),enumerable:!1,writable:!1,configurable:!1},r},{})),e}),Ca.exports),ja=Ba(La),_a=function(e){return e&&e.architecture?e.architecture+(e.variant?e.variant:""):"unknown"},Pa=function(){function e(t,r,a){var n=a.list,o=a.registryUrl,i=a.onNotify,s=a.onAuthentication,l=a.useControlCacheHeader,u=a.isRegistrySecured;I(this,e),this.name=t,this.tag=r,this.chars=0,this.opts={list:n,registryUrl:o,onNotify:i,onAuthentication:s,useControlCacheHeader:l,isRegistrySecured:u},this.ociImage=!1,ja(this),this.on("get-size",function(){return void 0!==this.size?this.trigger("size",this.size):this.fillInfo()}),this.on("get-sha256",function(){return void 0!==this.sha256?this.trigger("sha256",this.sha256):this.fillInfo()}),this.on("get-date",function(){return void 0!==this.creationDate?this.trigger("creation-date",this.creationDate):this.fillInfo()}),this.on("content-digest-chars",function(e){this.chars=e}),this.on("get-content-digest-chars",function(){return this.trigger("content-digest-chars",this.chars)}),this.on("get-content-digest",function(){return void 0!==this.contentDigest?this.trigger("content-digest",this.contentDigest):this.fillInfo()})}return k(e,[{key:"fillInfo",value:function(){if(!this._fillInfoWaiting){this._fillInfoWaiting=!0;var t=new ca({onAuthentication:this.opts.onAuthentication,withCredentials:this.opts.isRegistrySecured}),r=this;t.addEventListener("loadend",function(){if(200===this.status||202===this.status){var a=JSON.parse(this.responseText);if(function(e){return"application/vnd.docker.distribution.manifest.list.v2+json"===e.mediaType||!("application/vnd.oci.image.index.v1+json"!==e.mediaType||!Array.isArray(e.manifests))&&!e.manifests.some(function(e){return"application/vnd.oci.image.manifest.v1+json"!==e.mediaType})}(a)&&r.opts.list){var n=function(e){return e.manifests.filter(function(e){var t=e.annotations;return!t||"attestation-manifest"!==t["vnd.docker.reference.type"]})}(a);r.trigger("list",n),r.manifests=n;var o=a.manifests[0],i=new e(r.name,o.digest,L(L({},r.opts),{},{list:!1}));return s=r,i.on("*",function(e,t){var r;s[(r=e,r.replace(/-[a-z]/,function(e){return e[1].toUpperCase()}))]=t,s.trigger(e,t)}),i.fillInfo(),void(r.variants=[i])}r.ociImage="application/vnd.oci.image.index.v1+json"===a.mediaType,r.layers=a.layers||a.manifests,r.annotations=a.annotations,r.size=r.layers.reduce(function(e,t){return e+t.size},0),r.sha256=a.config&&a.config.digest,r.trigger("size",r.size),r.trigger("sha256",r.sha256),t.getContentDigest(function(e){r.contentDigest=e,r.trigger("content-digest",e),e||r.opts.onNotify(Kr)}),r.ociImage?(r.trigger("creation-date"),r.trigger("blobs"),r.trigger("oci-image")):r.getBlobs(r.sha256)}else 404===this.status?r.opts.onNotify("Manifest for ".concat(r.name,":").concat(r.tag," not found"),!0):r.opts.onNotify(this.responseText);var s}),t.open("GET","".concat(this.opts.registryUrl,"/v2/").concat(r.name,"/manifests/").concat(r.tag)),t.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json"+(r.opts.list?", application/vnd.docker.distribution.manifest.list.v2+json":"")),r.opts.useControlCacheHeader&&t.setRequestHeader("Cache-Control","no-store, no-cache"),t.send()}}},{key:"getBlobs",value:function(e){var t=new ca({onAuthentication:this.opts.onAuthentication,withCredentials:this.opts.isRegistrySecured}),r=this;t.addEventListener("loadend",function(){if(200===this.status||202===this.status){var t,a=JSON.parse(this.responseText);r.creationDate=new Date(a.created||(null===(t=r.annotations)||void 0===t?void 0:t["org.opencontainers.image.created"])),r.blobs=a,r.blobs.history=r.blobs.history||[],r.blobs.history.filter(function(e){return!e.empty_layer}).forEach(function(e,t){e.size=r.layers[t].size,e.id=r.layers[t].digest.replace("sha256:","")}),r.blobs.id=e.replace("sha256:",""),r.trigger("creation-date",r.creationDate),r.trigger("blobs",r.blobs)}else 404===this.status?r.opts.onNotify("Blobs for ".concat(r.name,":").concat(r.tag," not found: blob '").concat(r.blobs,"'"),!0):this.responseText?r.opts.onNotify(this.responseText):r.opts.onNotify('Can"t get blobs for '.concat(r.name,":").concat(r.tag,": blob '").concat(r.blobs,"' (no message error)"),!0)}),t.open("GET","".concat(this.opts.registryUrl,"/v2/").concat(r.name,"/blobs/").concat(e)),t.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json"),t.send()}}])}(),Ga={css:'pagination .container,[is="pagination"] .container{ display: flex; }pagination .container .pagination-centered,[is="pagination"] .container .pagination-centered{ margin: auto; }pagination material-button > :first-child,[is="pagination"] material-button > :first-child{ padding: 0; min-width: 40px; min-height: 44px; }pagination material-button > :first-child .content,[is="pagination"] material-button > :first-child .content{ display: flex; align-content: center; flex-direction: column; font-size: 16px; line-height: 42px; }pagination material-button.current > :first-child.space-left,[is="pagination"] material-button.current > :first-child.space-left{ margin-left: 85px; }pagination material-button.current > :first-child.space-right,[is="pagination"] material-button.current > :first-child.space-right{ margin-right: 85px; }pagination material-button .content i.material-icons,[is="pagination"] material-button .content i.material-icons{ height: unset; }',exports:function(){return this},template:(e,t,r,a)=>e('<div class="container"><div class="pagination-centered"><material-button expr124="expr124" waves-color="rgba(158,158,158,.4)" outlined></material-button></div></div>',[{type:r.EACH,getKey:null,condition:null,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i expr125="expr125" class="material-icons"></i><template expr126="expr126"></template>',bindings:[{type:r.IF,evaluate:e=>e.p.icon,redundantAttribute:"expr125",selector:"[expr125]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.icon}]}])},{type:r.IF,evaluate:e=>!e.p.icon,redundantAttribute:"expr126",selector:"[expr126]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.page}]}])}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"aria-label",evaluate:e=>["page-",e.p.page].join("")},{type:t.ATTRIBUTE,isBoolean:!1,name:"color",evaluate:e=>e.p.current?"var(--accent-text)":"rgba(0, 0, 0, 0 )"},{type:t.ATTRIBUTE,isBoolean:!1,name:"text-color",evaluate:e=>e.p.current?"var(--accent-text)":"var(--primary-text)"},{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>[e.p.current?"current":""," ",e.p["space-left"]?"space-left":""," ",e.p["space-right"]?"space-right":""].join("")},{type:t.EVENT,name:"onClick",evaluate:e=>t=>e.props.onPageUpdate(e.idx)}]}]),redundantAttribute:"expr124",selector:"[expr124]",itemName:"p",indexName:"idx",evaluate:e=>e.props.pages}]),name:"pagination"},Va={css:null,exports:{onMounted(e){this.loadCreationDate(e)},onUpdated(e){this.loadCreationDate(e)},loadCreationDate(e){e.image.creationDate||e.image.ociImage||(e.image.one("creation-date",e=>{this.update({date:e,localDate:e&&e.toLocaleString()})}),e.image.trigger("get-date"))},getDate:e=>e.ociImage?"Not Available":`${function(e){if(void 0===e)return"";for(var t=["a second","seconds","a minute","minutes","an hour","hours","a day","days","a month","months","a year","years"],r=[1,60,3600,86400,2592e3,31104e3,1/0],a=(new Date-e)/1e3,n=0;n<r.length-1;n++){if(2*r[n]>=a)return t[2*n];if(r[n+1]>a)return Math.floor(a/r[n])+" "+t[2*n+1]}}(e.creationDate)} ago`,getLocalDate:e=>e.ociImage?"unavailable on OCI index/Buildkit export cache":e.creationDate&&e.creationDate.toLocaleString()||"unknown"},template:(e,t,r,a)=>e('<div expr174="expr174"> </div>',[{redundantAttribute:"expr174",selector:"[expr174]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getDate(e.props.image)},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>["Creation date ",e.getLocalDate(e.props.image)].join("")}]}]),name:"image-date"},za={css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){"number"!=typeof e.image.size&&(e.image.on("size",e=>{this.update({size:e})}),e.image.trigger("get-size"))},getImageSize:e=>Hr(e.size)},template:(e,t,r,a)=>e('<div expr175="expr175" title="Compressed size of your image."> </div>',[{redundantAttribute:"expr175",selector:"[expr175]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getImageSize(e.props.image)}]}]),name:"image-size"},Ha={css:null,exports:{onMounted(e){e.image.on("sha256",e=>{this.update({sha256:e&&e.substring(0,19)})}),e.image.trigger("get-sha256")}},template:(e,t,r,a)=>e('<div expr176="expr176"> </div>',[{redundantAttribute:"expr176",selector:"[expr176]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.image.tag},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.state.sha256}]}]),name:"image-tag"},$a={css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){e.image.contentDigest||(t.chars=-1,e.image.one("content-digest",t=>{this.contentDigest=t,e.image.on("content-digest-chars",this.onResize),e.image.trigger("get-content-digest-chars")}),e.image.trigger("get-content-digest"))},onResize(e){e!==this.state.chars&&this.update({chars:e})},getTitle:(e,t)=>t>=70?"":e.contentDigest||"",getContentDigest:(e,t)=>t>=70?e.contentDigest||"":t<=0?"":e.contentDigest&&e.contentDigest.slice(0,t)+"..."},template:(e,t,r,a)=>e('<div expr177="expr177"> </div>',[{redundantAttribute:"expr177",selector:"[expr177]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getContentDigest(e.props.image,e.state.chars)},{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.getTitle(e.props.image,e.state.chars)}]}]),name:"image-content-digest"},Fa={css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},getDockerCmd:e=>"tag"===e.target?`docker pull ${e.pullUrl}/${e.image.name}:${e.image.tag}`:`docker pull ${e.pullUrl}/${e.image.name}@${e.image.contentDigest}`,load(e,t){"tag"===e.target||e.image.contentDigest||(e.image.one("content-digest",e=>{this.update()}),e.image.trigger("get-content-digest"))},copy(){const e=this.$("input");e.value?(e.style.display="block",e.select(),document.execCommand("copy"),e.style.display="none",this.props.onNotify("`"+e.value+"` has been copied to clipboard.")):this.props.onNotify(Kr)}},template:(e,t,r,a)=>e('<div class="copy-to-clipboard"><input expr178="expr178" style="display: none; width: 1px; height: 1px"/><material-button expr179="expr179" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" title="Copy pull command." icon></material-button></div>',[{redundantAttribute:"expr178",selector:"[expr178]",expressions:[{type:t.VALUE,evaluate:e=>e.getDockerCmd(e.props)}]},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">content_copy</i>',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.copy}],redundantAttribute:"expr179",selector:"[expr179]"}]),name:"copy-to-clipboard"},Xa={css:null,exports:{onMounted(e){e.image.one("oci-image",()=>{this.update()})},buttonTittle(){return this.props.image.ociImage?"History is unavailable on OCI index/Buildkit export cache":"This will show the history of given tag"},routeToHistory(){if(!this.props.image.ociImage)return la.history(this.props.image.name,this.props.image.tag)}},template:(e,t,r,a)=>e('<material-button expr180="expr180" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" icon></material-button>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">history</i>',bindings:[]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"title",evaluate:e=>e.buttonTittle()},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.routeToHistory()},{type:t.ATTRIBUTE,isBoolean:!1,name:"disabled",evaluate:e=>e.props.image.ociImage}],redundantAttribute:"expr180",selector:"[expr180]"}]),name:"tag-history-button"},Wa={css:null,exports:{onBeforeMount(e,t){t.checked=e.checked,e.image.one("content-digest",e=>{this.update({contentDigest:e})})},onMounted(e,t){e.image.trigger("get-content-digest")},onBeforeUpdate(e,t){t.checked=e.checked},deleteImage(){this.props.handleCheckboxChange(Qa,this.props.image)},handleCheckboxChange(e){const t=e.target.checked?Ja:Ya;this.props.handleCheckboxChange(t,this.props.image,e.shiftKey)}},template:(e,t,r,a)=>e('<material-button expr181="expr181" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" title="This will delete the image." icon></material-button><material-checkbox expr182="expr182" title="Select this tag to delete it."></material-checkbox>',[{type:r.IF,evaluate:e=>!e.props.multiDelete,redundantAttribute:"expr181",selector:"[expr181]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">delete</i>',bindings:[]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"disabled",evaluate:e=>!e.state.contentDigest},{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImage}]}])},{type:r.IF,evaluate:e=>e.props.multiDelete,redundantAttribute:"expr182",selector:"[expr182]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"disabled",evaluate:e=>!e.state.contentDigest},{type:t.EVENT,name:"onChange",evaluate:e=>e.handleCheckboxChange},{type:t.ATTRIBUTE,isBoolean:!1,name:"checked",evaluate:e=>e.state.checked}]}])}]),name:"remove-image"},qa={css:'architectures architectures,[is="architectures"] architectures{ display: flex; flex-direction: column; } architectures .architecture { background-color: var(--hover-background); padding: 2px 4px; border-radius: 12px; margin: 4px 0; text-align: center; } architectures .architecture:first-child { margin-top: 0; } architectures .architecture:last-child { margin-bottom: 0; }',exports:{onMounted(e,t){this.onLoad(e,t)},onUpdated(e,t){e.image!==t.image&&this.onLoad(e,t)},onLoad(e,t){return e.image.manifests?this.onList(e.image.manifests,e,t):e.image.blobs?this.onBlobs(e.image.blobs,e,t):(e.image.on("blobs",r=>this.onBlobs(r,e,t)),void e.image.on("list",r=>this.onList(r,e,t)))},onBlobs(e,t,r){const a=[_a(e)];t.image.manifests||this.update({architectures:a,image:t.image})},onList(e,t,r){const a=e.map(({platform:e})=>_a(e));this.update({architectures:a,image:t.image})}},template:(e,t,r,a)=>e('<div expr183="expr183" class="architecture"></div>',[{type:r.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.architecture}]}]),redundantAttribute:"expr183",selector:"[expr183]",itemName:"architecture",indexName:null,evaluate:e=>e.state.architectures}]),name:"architectures"},Ka={css:'confirm-delete-image,[is="confirm-delete-image"]{ color: #000; list-style-type: disc; margin-block-start: 0.7em; }confirm-delete-image material-popup .content .material-popup-content,[is="confirm-delete-image"] material-popup .content .material-popup-content{ overflow-y: auto; max-height: 250px; }',exports:{displayImagesToDelete(e,t){const r=new Set;return e.forEach(e=>{e.contentDigest&&r.add(e.contentDigest)}),t.filter(e=>r.has(e.contentDigest))},deleteImages(){this.props.toDelete.forEach(e=>this.getContentDigestThenDelete(e,this.props)),this.props.onImageDeleted()},getContentDigestThenDelete({name:e,tag:t},r){const{registryUrl:a,onNotify:n,onAuthentication:o,isRegistrySecured:i}=r,s=new ca({onAuthentication:o,withCredentials:i}),l=this;s.addEventListener("loadend",function(){200===this.status||202===this.status?s.getContentDigest(function(a){a?l.deleteImage({name:e,tag:t,contentDigest:a},r):n(ERROR_CAN_NOT_READ_CONTENT_DIGEST)}):404===this.status?n(`Manifest for ${e}:${t} not found`,!0):n(this.responseText)}),s.open("GET",`${a}/v2/${e}/manifests/${t}`),s.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json"),s.send()},deleteImage({name:e,tag:t,contentDigest:r},a){const{registryUrl:n,ignoreError:o,onNotify:i,onAuthentication:s,onClick:l,isRegistrySecured:u}=a,p=new ca({onAuthentication:s,withCredentials:u});p.addEventListener("loadend",function(){200===this.status||202===this.status?(la.taglist(e),i(`Deleting ${e}:${t} image. Run \`registry garbage-collect config.yml\` on your registry`)):404===this.status?o||i({message:"Digest not found for this image in your registry.",isError:!0}):i(this.responseText),l()}),p.open("DELETE",`${n}/v2/${e}/manifests/${r}`),p.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json"),p.addEventListener("error",function(){const e=this.withCredentials?" When you use credentials on a different hostname, the registry server may fail preflight requests. Check FAQ and issue #104.":"";i({message:"An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE']."+e,isError:!0})}),p.send()}},template:(e,t,r,a)=>e('<material-popup expr184="expr184"></material-popup>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">\n      These images will be deleted\n      <material-button expr185="expr185" color="inherit" text-color="var(--accent-text)" target="_blank" waves-color="var(--hover-background)" href="https://joxit.dev/docker-registry-ui/#:~:text=Why%20when%20I%20delete%20one%20tag,%20all%20tags%20with%20the%20same%20SHA%20are%20deleted%20" icon></material-button></div><div class="material-popup-content"><ul><li expr186="expr186"></li></ul></div><div class="material-popup-action"><material-button expr187="expr187" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button><material-button expr188="expr188" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">help</i>',bindings:[]}],attributes:[],redundantAttribute:"expr185",selector:"[expr185]"},{type:r.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.image.name,":",e.image.tag].join("")}]}]),redundantAttribute:"expr186",selector:"[expr186]",itemName:"image",indexName:null,evaluate:e=>e.displayImagesToDelete(e.props.toDelete,e.props.tags)},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Delete\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}],redundantAttribute:"expr187",selector:"[expr187]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Cancel\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr188",selector:"[expr188]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr184",selector:"[expr184]"}]),name:"confirm-delete-image"};const Ja="CHECK",Ya="UNCHECK",Qa="DELETE";var Za={css:"tag-table table th.architectures { text-align: center; }",exports:{components:{ImageDate:Va,ImageSize:za,ImageTag:Ha,ImageContentDigest:$a,CopyToClipboard:Fa,RemoveImage:Wa,TagHistoryButton:Xa,ConfirmDeleteImage:Ka,Architectures:qa},onBeforeMount(e){this.state={toDelete:new Set,multiDelete:!1,page:e.page}},onBeforeUpdate(e,t){t.page!==e.page&&t.toDelete.clear(),t.page=e.page},deleteImages(){this.update({confirmDeleteImage:!0})},onConfirmDeleteImageClick(){this.state.singleDeleteAction&&this.state.toDelete.clear(),this.update({singleDeleteAction:!1,confirmDeleteImage:!1})},onRemoveImageHeaderChange(e){if(!0===e.altKey){$r(this.props.tags,this.props.page).filter(e=>va(this.props.filterResults,e.tag)).forEach(e=>this.state.toDelete.add(e)),this.update({multiDelete:!0,toDelete:this.state.toDelete,selectedImage:void 0})}else this.update({multiDelete:e.target.checked,selectedImage:void 0})},onRemoveImageChange(e,t,r){let a,n=!1,o=!1;switch(e){case Ja:this.state.toDelete.add(t),r&&(a=this.supportShiftKey(t,!0));break;case Ya:this.state.toDelete.delete(t),r&&(a=this.supportShiftKey(t,!1));break;case Qa:this.state.toDelete.clear(),this.state.toDelete.add(t),n=!0,o=!0}this.update({toDelete:this.state.toDelete,confirmDeleteImage:n,singleDeleteAction:o,selectedImage:a})},supportShiftKey(e,t){if(this.state.selectedImage){let r=!1;return void this.getPage(this.props.tags,this.props.page).filter(t=>t==this.state.selectedImage||t==e?(r=!r,!0):r).forEach(e=>{t?this.state.toDelete.add(e):this.state.toDelete.delete(e)})}return e},onReverseOrder(){this.state.orderType=null,this.state.desc=!1,this.props.onReverseOrder()},onPageReorder(e){this.update({orderType:e,desc:this.state.orderType&&this.state.orderType!==e||!this.state.desc})},getPage(e,t){const r=$r(e,t,this.props.tagsPerPage);return"date"===this.state.orderType?r.sort((e,t)=>this.state.desc?(e.creationDate?.getTime()||0)-(t.creationDate?.getTime()||0):(t.creationDate?.getTime()||0)-(e.creationDate?.getTime()||0)):"size"===this.state.orderType&&r.sort((e,t)=>this.state.desc?e.size-t.size:t.size-e.size),r},matchSearch:va},template:(e,t,r,a)=>e('<confirm-delete-image expr127="expr127"></confirm-delete-image><material-card expr128="expr128" class="taglist"></material-card>',[{type:r.TAG,getComponent:a,evaluate:e=>"confirm-delete-image",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state.confirmDeleteImage},{type:t.EVENT,name:"on-click",evaluate:e=>e.onConfirmDeleteImageClick},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"tags",evaluate:e=>e.props.tags},{type:t.ATTRIBUTE,isBoolean:!1,name:"to-delete",evaluate:e=>e.state.toDelete},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.props.isRegistrySecured},{type:t.EVENT,name:"on-image-deleted",evaluate:e=>e.props.onImageDeleted}],redundantAttribute:"expr127",selector:"[expr127]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<table style="border: none"><thead><tr><th expr129="expr129">\n            Creation date\n          </th><th expr130="expr130">\n            Size\n          </th><th expr131="expr131" id="image-content-digest-header"></th><th expr132="expr132" id="image-tag-header">\n            Tag\n          </th><th class="architectures">Arch</th><th expr133="expr133" class="show-tag-history"></th><th expr134="expr134"></th></tr></thead><tbody><tr expr137="expr137"></tr></tbody></table>',bindings:[{redundantAttribute:"expr129",selector:"[expr129]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["creation-date ",e.state.desc&&"date"===e.state.orderType?"material-card-th-sorted-descending":"material-card-th-sorted-ascending"].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>()=>e.onPageReorder("date")}]},{redundantAttribute:"expr130",selector:"[expr130]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["image-size ",e.state.desc&&"size"===e.state.orderType?"material-card-th-sorted-descending":"material-card-th-sorted-ascending"].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>()=>e.onPageReorder("size")}]},{type:r.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr131",selector:"[expr131]",template:e("Content Digest",[])},{redundantAttribute:"expr132",selector:"[expr132]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>e.props.asc?"material-card-th-sorted-ascending":"material-card-th-sorted-descending"},{type:t.EVENT,name:"onclick",evaluate:e=>e.onReverseOrder}]},{type:r.IF,evaluate:e=>e.props.showTagHistory,redundantAttribute:"expr133",selector:"[expr133]",template:e("History",[])},{type:r.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr134",selector:"[expr134]",template:e('<material-checkbox expr135="expr135" class="indeterminate" title="Toggle multi-delete. Alt+Click to select all tags."></material-checkbox><material-button expr136="expr136" waves-center="true" color="inherit" text-color="var(--neutral-background)" waves-color="var(--hover-background)" title="This will delete selected images." icon></material-button>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>["remove-tag ",e.state.toDelete.size>0&&!e.state.singleDeleteAction?"delete":""].join("")}]},{type:r.IF,evaluate:e=>0===e.state.toDelete.size||e.state.singleDeleteAction,redundantAttribute:"expr135",selector:"[expr135]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"checked",evaluate:e=>e.state.multiDelete},{type:t.EVENT,name:"onChange",evaluate:e=>e.onRemoveImageHeaderChange}]}])},{type:r.IF,evaluate:e=>e.state.toDelete.size>0&&!e.state.singleDeleteAction,redundantAttribute:"expr136",selector:"[expr136]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">delete</i>',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}]}])}])},{type:r.EACH,getKey:null,condition:e=>e.matchSearch(e.props.filterResults,e.image.tag),template:e('<td class="creation-date"><image-date expr138="expr138"></image-date></td><td class="image-size"><image-size expr139="expr139"></image-size></td><td expr140="expr140"></td><td><image-tag expr143="expr143"></image-tag><copy-to-clipboard expr144="expr144" target="tag"></copy-to-clipboard></td><td class="architectures"><architectures expr145="expr145"></architectures></td><td expr146="expr146" class="show-tag-history"></td><td expr148="expr148" class="remove-tag"></td>',[{type:r.TAG,getComponent:a,evaluate:e=>"image-date",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr138",selector:"[expr138]"},{type:r.TAG,getComponent:a,evaluate:e=>"image-size",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr139",selector:"[expr139]"},{type:r.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr140",selector:"[expr140]",template:e('<image-content-digest expr141="expr141"></image-content-digest><copy-to-clipboard expr142="expr142" target="digest"></copy-to-clipboard>',[{type:r.TAG,getComponent:a,evaluate:e=>"image-content-digest",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr141",selector:"[expr141]"},{type:r.TAG,getComponent:a,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,isBoolean:!1,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr142",selector:"[expr142]"}])},{type:r.TAG,getComponent:a,evaluate:e=>"image-tag",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr143",selector:"[expr143]"},{type:r.TAG,getComponent:a,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,isBoolean:!1,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr144",selector:"[expr144]"},{type:r.TAG,getComponent:a,evaluate:e=>"architectures",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr145",selector:"[expr145]"},{type:r.IF,evaluate:e=>e.props.showTagHistory,redundantAttribute:"expr146",selector:"[expr146]",template:e('<tag-history-button expr147="expr147"></tag-history-button>',[{type:r.TAG,getComponent:a,evaluate:e=>"tag-history-button",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr147",selector:"[expr147]"}])},{type:r.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr148",selector:"[expr148]",template:e('<remove-image expr149="expr149"></remove-image>',[{type:r.TAG,getComponent:a,evaluate:e=>"remove-image",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"multi-delete",evaluate:e=>e.state.multiDelete},{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"handleCheckboxChange",evaluate:e=>e.onRemoveImageChange},{type:t.ATTRIBUTE,isBoolean:!1,name:"checked",evaluate:e=>e.state.toDelete.has(e.image)},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication}],redundantAttribute:"expr149",selector:"[expr149]"}])}]),redundantAttribute:"expr137",selector:"[expr137]",itemName:"image",indexName:null,evaluate:e=>e.getPage(e.props.tags,e.props.page)}]}],attributes:[],redundantAttribute:"expr128",selector:"[expr128]"}]),name:"tag-table"},en=/(alpha-(asc|desc);num-(asc|desc))|(num-(asc|desc);alpha-(asc|desc))/,tn=function(e){var t=function(e){switch(e){case"desc":return"alpha-desc;num-desc";case"asc":return"num-asc;alpha-asc";case"alpha-desc":case"alpha-asc":case"num-desc":case"num-asc":return"".concat(e,";").concat(e.startsWith("num")?"alpha":"num","-asc");default:if(!e)return"alpha-asc;num-desc";if(en.test(e))return e;throw new xa("The taglist order `".concat(e,"` is not recognized."))}}(e).split(";").filter(function(e){return e}).map(function(e){return e.split("-").filter(function(e){return e})}).reduce(function(e,t,r){return t.length>1&&(e[t[0]+"Asc"]="asc"===t[1]),0===r&&(e.numFirst="num"===t[0]),e},{});return t},rn=function(e,t){return e.length>0&&qr(e[e.length-1].charAt(0))==qr(t)?e[e.length-1]+=t:e.push(t),e},an=function(e){return e.split("").reduce(rn,[]).map(function(e){return qr(e.charAt(0))?parseInt(e):e})},nn=function(e,t,r){if(t===r)return 0;var a=e.numFirst?1:-1;if("number"==typeof t){var n=e.numAsc?1:-1;return"number"==typeof r?(t-r)*n:-1*a}if("number"==typeof r)return 1*a;var o=e.alphaAsc?1:-1;return t.localeCompare(r)*o},on={css:null,exports:{components:{Pagination:Ga,TagTable:Za},onBeforeMount(e){this.state={registryName:e.registryName,tags:[],loadend:!1,asc:!0,page:la.getPageQueryParam()||1};try{this.state.taglistOrder=tn(e.taglistOrder)}catch(t){e.onNotify(t)}},onMounted(e,t){var r;this.display(e,t),window.addEventListener("resize",this.onResize),window.requestAnimationFrame(this.onResize),this.tagComparator=(r=e.taglistOrder,function(e,t){for(var a=an(e.tag||e),n=an(t.tag||t),o=0;o<a.length&&o<n.length;o++){var i=nn(r,a[o],n[o]);if(0!=i)return i}return(e.tag||e).length-(t.tag||t).length})},display(e,t){t.reload=()=>setTimeout(()=>this.display(e,t),1e3),t.tags=[];const r=this,a=new ca({onAuthentication:e.onAuthentication,withCredentials:e.isRegistrySecured});a.addEventListener("load",function(){if(200===this.status){const a=(JSON.parse(this.responseText).tags||[]).map(t=>new Pa(e.image,t,{list:!0,registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication,useControlCacheHeader:e.useControlCacheHeader,isRegistrySecured:e.isRegistrySecured})).sort(r.tagComparator);window.requestAnimationFrame(r.onResize),r.update({page:Math.min(t.page,Fr(a,e.tagsPerPage)),tags:a})}else 404===this.status?r.props.onNotify("Server not found",!0):r.props.onNotify(this.responseText,!0)}),a.addEventListener("error",function(){r.props.onNotify(this.getErrorMessage(),!0),t.tags=[]}),a.addEventListener("loadend",function(){r.update({loadend:!0})}),a.open("GET",e.registryUrl+"/v2/"+e.image+"/tags/list"),a.send(),t.asc=!0},onPageUpdate(e){const t=Xr(this.state.page,Fr(this.state.tags,this.props.tagsPerPage))[e].page;this.update({page:t}),la.updatePageQueryParam(t)},onResize(){const e=window.innerWidth;let t=0;const r=this.state.tags.reduce(function(e,t){return t.tag.length>e?t.tag.length:e},0);t=e>=1440?71:e<1024?0:15+(e-1024)/416*56,r>20&&(t-=r-20),t=Math.floor(t),this.state.tags.map(function(e){e.trigger("content-digest-chars",t)})},onReverseOrder(){this.state.asc?(this.state.tags.reverse(),this.state.asc=!1):(this.state.tags.sort(this.tagComparator),this.state.asc=!0),this.update()},getPageLabels:Xr,getNumPages:Fr,router:la},template:(e,t,r,a)=>e('<material-card expr47="expr47" class="header"></material-card><div expr52="expr52" class="spinner-wrapper"></div><pagination expr54="expr54"></pagination><tag-table expr55="expr55"></tag-table><pagination expr56="expr56"></pagination>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<div class="material-card-title-action"><material-button expr48="expr48" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" icon></material-button><h2 expr49="expr49"> <div expr50="expr50" class="source-hint"> </div><div expr51="expr51" class="item-count"> </div></h2></div>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">arrow_back</i>',bindings:[]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.router.home()}],redundantAttribute:"expr48",selector:"[expr48]"},{redundantAttribute:"expr49",selector:"[expr49]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Tags of ",e.props.image].join("")}]},{redundantAttribute:"expr50",selector:"[expr50]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Sourced from ",e.state.registryName+"/"+e.props.image].join("")}]},{redundantAttribute:"expr51",selector:"[expr51]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.tags.length," tags"].join("")}]}]}],attributes:[],redundantAttribute:"expr47",selector:"[expr47]"},{type:r.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr52",selector:"[expr52]",template:e('<material-spinner expr53="expr53"></material-spinner>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr53",selector:"[expr53]"}])},{type:r.TAG,getComponent:a,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags,e.props.tagsPerPage))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr54",selector:"[expr54]"},{type:r.IF,evaluate:e=>e.state.loadend,redundantAttribute:"expr55",selector:"[expr55]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"tag-table",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"tags",evaluate:e=>e.state.tags},{type:t.ATTRIBUTE,isBoolean:!1,name:"asc",evaluate:e=>e.state.asc},{type:t.ATTRIBUTE,isBoolean:!1,name:"page",evaluate:e=>e.state.page},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-content-digest",evaluate:e=>e.props.showContentDigest},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-tag-history",evaluate:e=>e.props.showTagHistory},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-image-remove-activated",evaluate:e=>e.props.isImageRemoveActivated},{type:t.EVENT,name:"onReverseOrder",evaluate:e=>e.onReverseOrder},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.ATTRIBUTE,isBoolean:!1,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"tags-per-page",evaluate:e=>e.props.tagsPerPage},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.props.isRegistrySecured},{type:t.EVENT,name:"on-image-deleted",evaluate:e=>()=>e.state.reload()}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags,e.props.tagsPerPage))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr56",selector:"[expr56]"}]),name:"tag-list"},sn={css:'dockerfile material-popup .popup material-button,[is="dockerfile"] material-popup .popup material-button{ margin-right: 1em; }dockerfile material-popup .popup > .content,[is="dockerfile"] material-popup .popup > .content{ max-width: 75em; width: 80%; }dockerfile .material-popup-content,[is="dockerfile"] .material-popup-content{ background-color: var(--hover-background); } @media screen and (max-width: 800px) {dockerfile material-popup .popup > .content,[is="dockerfile"] material-popup .popup > .content{ width: 100%; } }dockerfile .instruction,[is="dockerfile"] .instruction{ font-family: \'Roboto Mono\', monospace !important; margin: 0.75em 0; }dockerfile .instruction .keyword,[is="dockerfile"] .instruction .keyword{ color: var(--accent-text); }',exports:null,template:(e,t,r,a)=>e('<material-popup expr150="expr150"></material-popup>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">Dockerfile</div><div class="material-popup-content"><template expr151="expr151"></template></div><div class="material-popup-action"><material-button expr155="expr155" class="dialog-button" waves-color="rgba(158,158,158,.4)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{type:r.EACH,getKey:null,condition:null,template:e('<template expr152="expr152"></template>',[{type:r.EACH,getKey:null,condition:null,template:e('<div class="instruction"><span expr153="expr153" class="keyword"> </span><span expr154="expr154"> </span></div>',[{redundantAttribute:"expr153",selector:"[expr153]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.element.value}]},{redundantAttribute:"expr154",selector:"[expr154]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>" "+e.element.content}]}]),redundantAttribute:"expr152",selector:"[expr152]",itemName:"element",indexName:null,evaluate:e=>e.props.elements[e.props.elements.length-1-e.idx].filter(e=>"created_by"===e.key)}]),redundantAttribute:"expr151",selector:"[expr151]",itemName:"_",indexName:"idx",evaluate:e=>e.props.elements},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Close\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr155",selector:"[expr155]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr150",selector:"[expr150]"}]),name:"dockerfile"};var ln={css:'tag-history-element.Labels .value,[is="tag-history-element"].Labels .value,tag-history-element.Env .value,[is="tag-history-element"].Env .value{ margin-bottom: 0.5em; }tag-history-element i,[is="tag-history-element"] i{ font-size: 20px; padding: 0px; }tag-history-element.docker_version .headline .material-icons,[is="tag-history-element"].docker_version .headline .material-icons,tag-history-element.docker_version .headline #docker_verion,[is="tag-history-element"].docker_version .headline #docker_verion{ height: 24px; }tag-history-element,[is="tag-history-element"]{ display: block; padding: 20px; min-width: 100px; min-height: 3em; width: 420px; float: left; }tag-history-element .content,[is="tag-history-element"] .content{ overflow-x: auto; }tag-history-element.id .content,[is="tag-history-element"].id .content{ overflow-x: initial; }tag-history-element .headline,[is="tag-history-element"] .headline{ height: 24px; display: flex; flex-direction: row; align-items: center; font-weight: bold; }tag-history-element .headline *,[is="tag-history-element"] .headline *{ margin-right: 6px; }tag-history-element.id div.value,[is="tag-history-element"].id div.value{ font-size: 12px; }',exports:{onBeforeStart(e,t){t.key=e.entry.key,t.icon=function(e){switch(e){case"architecture":return"memory";case"created":return"event";case"docker_version":return"";case"os":return"developer_board";case"Cmd":return"launch";case"Entrypoint":return"input";case"Env":return"notes";case"Labels":return"label";case"User":return"face";case"Volumes":return"storage";case"WorkingDir":case"home":return"home";case"author":return"account_circle";case"id":case"digest":return"settings_ethernet";case"created_by":return"build";case"size":return"get_app";case"ExposedPorts":return"router";case"comment":return"chat";case"sources":return"link";case"keywords":return"receipt";case"name":return"abc";case"kubeVersion":case"appVersion":return"123";default:return e.startsWith("custom-label-")?"label":""}}(e.entry.key),t.name=this.cleanName(e.entry.key),e.entry.value instanceof Array?t.values=e.entry.value:t.value=e.entry.value},onBeforeMount(e,t){this.onBeforeStart(e,t)},onBeforeUpdate(e,t){this.onBeforeStart(e,t)},onMounted(e,t){const r=this.$("#docker_verion");r&&(r.innerHTML=(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 730 730" fill="var(--neutral-text)">\n  <path d="M603.672 530.973c-7.543.12-13.562 6.331-13.443 13.875.119 7.544 6.332 13.562 13.875 13.443 7.495-.118 13.494-6.254 13.445-13.75-.085-7.578-6.297-13.652-13.875-13.568 0 0-.001 0 0 0m0 24.398c-5.975.272-11.04-4.352-11.311-10.326-.271-5.976 4.352-11.04 10.327-11.312 5.975-.27 11.039 4.352 11.31 10.327.01.19.014.382.012.573.204 5.723-4.27 10.527-9.992 10.731-.115.005-.23.007-.346.007"/>\n  <path d="M606.81 544.972v-.185a3.476 3.476 0 002.8-3.076 3.815 3.815 0 00-1.322-3.077 8.675 8.675 0 00-4.707-.984 27.066 27.066 0 00-5.2.431v13.538h3.077v-5.446h1.477c1.754 0 2.554.646 2.83 2.154a11.667 11.667 0 001.047 3.292h3.415a10.381 10.381 0 01-1.016-3.385 3.938 3.938 0 00-2.462-3.292m-3.723-.985h-1.508v-3.908a7.457 7.457 0 011.754 0c1.97 0 2.893.831 2.893 2.062 0 1.231-1.415 2-3.076 2m112.135-241.924c-1.938-1.539-20.03-15.199-58.181-15.199a185.562 185.562 0 00-30.061 2.584c-7.384-50.612-49.228-75.288-51.104-76.395l-10.245-5.908-6.738 9.723a137.318 137.318 0 00-18.214 42.582c-6.831 28.891-2.677 56.027 11.999 79.226-17.722 9.876-46.151 12.307-51.904 12.522H30.096c-12.293.017-22.27 9.952-22.336 22.245a338.69 338.69 0 0020.614 120.946c16.214 42.521 40.336 73.842 71.719 93.01 35.167 21.537 92.302 33.844 157.067 33.844a468.88 468.88 0 0087.226-7.907 364.649 364.649 0 00113.839-41.352 312.969 312.969 0 0077.688-63.596c37.29-42.213 59.505-89.226 76.026-131.007h6.584c40.828 0 65.935-16.338 79.78-30.029a87.08 87.08 0 0021.045-31.167l2.923-8.553z"/>\n  <path d="M73.725 337.54h63.073a5.507 5.507 0 005.507-5.508V275.85a5.507 5.507 0 00-5.476-5.538H73.725a5.507 5.507 0 00-5.507 5.507v56.212a5.507 5.507 0 005.507 5.508m86.918.001h63.073a5.507 5.507 0 005.507-5.508V275.85a5.507 5.507 0 00-5.477-5.538h-63.104a5.537 5.537 0 00-5.538 5.538v56.181a5.54 5.54 0 005.539 5.508m88.24.001h63.073a5.507 5.507 0 005.507-5.508V275.85a5.507 5.507 0 00-5.477-5.538h-63.104a5.507 5.507 0 00-5.507 5.507v56.212a5.51 5.51 0 005.508 5.508m87.195.001h63.073a5.537 5.537 0 005.538-5.508V275.85a5.537 5.537 0 00-5.538-5.538h-63.073a5.507 5.507 0 00-5.507 5.507v56.212a5.508 5.508 0 005.507 5.508m-175.435-80.826h63.073a5.539 5.539 0 005.507-5.538v-56.18a5.507 5.507 0 00-5.507-5.508h-63.073a5.538 5.538 0 00-5.538 5.507v56.181a5.568 5.568 0 005.538 5.538m88.24 0h63.073a5.539 5.539 0 005.507-5.538v-56.18a5.507 5.507 0 00-5.507-5.508h-63.073a5.507 5.507 0 00-5.507 5.507v56.181a5.539 5.539 0 005.507 5.538m87.195 0h63.073a5.568 5.568 0 005.538-5.538v-56.18a5.537 5.537 0 00-5.538-5.508h-63.073a5.507 5.507 0 00-5.507 5.507v56.181a5.539 5.539 0 005.507 5.538m0-80.856h63.073a5.538 5.538 0 005.538-5.507v-56.213a5.537 5.537 0 00-5.538-5.507h-63.073a5.506 5.506 0 00-5.507 5.507v56.212a5.508 5.508 0 005.507 5.508m87.964 161.683h63.073a5.537 5.537 0 005.538-5.508V275.85a5.537 5.537 0 00-5.538-5.538h-63.073a5.508 5.508 0 00-5.507 5.507v56.212a5.508 5.508 0 005.507 5.508"/>\n</svg>\n',"image/svg+xml").firstElementChild.outerHTML)},cleanName:e=>"id"===e?e:"os"===e?"OS":(e.startsWith("custom-label-")&&(e=e.replace("custom-label-","")),e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]/g," ").split(" ").map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" "))},template:(e,t,r,a)=>e('<div class="headline"><i expr156="expr156" class="material-icons"></i><span expr157="expr157" id="docker_verion"></span><span expr158="expr158"> </span></div><div class="content"><div expr159="expr159" class="value"></div><div expr160="expr160" class="values value"></div></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"class",evaluate:e=>e.state.key}]},{type:r.IF,evaluate:e=>"docker_version"!==e.state.key,redundantAttribute:"expr156",selector:"[expr156]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.icon}]}])},{type:r.IF,evaluate:e=>"docker_version"===e.state.key,redundantAttribute:"expr157",selector:"[expr157]",template:e(null,[])},{redundantAttribute:"expr158",selector:"[expr158]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.name}]},{type:r.IF,evaluate:e=>e.state.value,redundantAttribute:"expr159",selector:"[expr159]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.value}]}])},{type:r.EACH,getKey:null,condition:e=>e.state.values,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.value}]}]),redundantAttribute:"expr160",selector:"[expr160]",itemName:"value",indexName:null,evaluate:e=>e.state.values}]),name:"tag-history-element"};const un=function(e){switch(e){case"created":return 1;case"created_by":return 2;case"size":return 3;case"os":return 4;case"architecture":return 5;case"id":return 6;case"linux":return 7;case"docker_version":return 8;default:return 10}},pn=function(e,t){return un(e.key)-un(t.key)},cn=e=>{if(e.startsWith("COPY"))return{value:"COPY",content:e.replace(/^COPY /,"")};let t=e.match(/\/bin\/sh *-c *#\(nop\) *([A-Z]+) (.*)/);return{value:t&&t[1]||"RUN",content:t&&t[2]||e.replace(/^\/bin\/sh *-c *(#\(nop\))?/,"")}},dn=function(e,t){switch(e){case"created":return{key:e,value:new Date(t).toLocaleString()};case"created_by":return t.match(/\/bin\/sh *-c *#\(nop\) *([A-Z]+) (.*)/),{key:e,...cn(t)};case"size":return{key:e,value:Hr(t)};case"Entrypoint":case"Cmd":return{key:e,value:(t||[]).join(" ")};case"Labels":return{key:e,value:Object.keys(t||{}).map(function(e){return t[e]?e+"="+t[e]:""})};case"Volumes":case"ExposedPorts":return{key:e,value:Object.keys(t)}}return{key:e,value:t||""}};var mn={css:'tag-history h2,[is="tag-history"] h2{ flex-grow: 1; display: flex; flex-direction: row; align-items: center; }tag-history h2 .material-icons,[is="tag-history"] h2 .material-icons{ margin-left: .25em; }',exports:{components:{TagHistoryElement:ln,Dockerfile:sn},onBeforeMount(e,t){t.elements=[],t.image=new Pa(e.image,e.tag,{list:!0,registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication,useControlCacheHeader:e.useControlCacheHeader,isRegistrySecured:e.isRegistrySecured}),t.image.fillInfo()},onMounted(e,t){t.image.on("blobs",this.processBlobs),t.image.on("list",this.multiArchList)},onTabChanged(e,t){const r=this.state,{registryUrl:a,onNotify:n,useControlCacheHeader:o}=this.props;if(r.elements=[],r.image.variants[t]=r.image.variants[t]||new Pa(this.props.image,e.digest,{list:!1,registryUrl:a,onNotify:n,useControlCacheHeader:o}),r.image.variants[t].blobs)return this.processBlobs(r.image.variants[t].blobs);r.image.variants[t].fillInfo(),r.image.variants[t].on("blobs",this.processBlobs)},processBlobs(e){this.state;const{historyCustomLabels:t}=this.props;function r(e){const t=[];for(var r in e)if(e.hasOwnProperty(r)&&"empty_layer"!=r){const a=e[r],n=dn(r,a);t.push(n)}return t.sort(pn)}const a=new Array(e.history.length+1);a[0]=r(function(e,{historyCustomLabels:t}){const r=["architecture","User","created","docker_version","os","Cmd","Entrypoint","Env","Labels","User","Volumes","WorkingDir","author","id","ExposedPorts","name","appVersion","kubeVersion","keywords","home","sources"].reduce(function(t,r){const a=e[r]||e.config&&e.config[r];return a&&"architecture"===r&&e.variant?t[r]=a+e.variant:a&&(t[r]=a),t},{});return!r.author&&r.Labels&&r.Labels.maintainer&&(r.author=e.config.Labels.maintainer,delete r.Labels.maintainer),r.Labels&&t.filter(e=>r.Labels[e]).forEach(e=>{r[`custom-label-${e}`]=r.Labels[e],delete r.Labels[e]}),r}(e,{historyCustomLabels:t})),e.history.forEach(function(t,n){a[e.history.length-n]=r(t)}),this.update({elements:a,loadend:!0})},multiArchList(e){const t=(e=e.manifests||e).map(function(e){return{title:e.platform.os+"/"+e.platform.architecture+(e.platform.variant?e.platform.variant:""),digest:e.digest}});this.update({archs:t})},toTaglist(){return la.taglist(this.props.image)},showDockerfile(){this.update({showDockerfile:!0})},onDockerfileClose(){this.update({showDockerfile:!1})}},template:(e,t,r,a)=>e('<material-card expr57="expr57"></material-card><div expr61="expr61" class="spinner-wrapper"></div><dockerfile expr63="expr63"></dockerfile><material-tabs expr64="expr64" color="var(--background)" text-color="var(--primary-text)" text-selected-color="var(--accent-text)" line-color="var(--background)" line-selected-color="var(--accent-text)"></material-tabs><material-card expr65="expr65"></material-card>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<div class="material-card-title-action"><material-button expr58="expr58" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" rounded="true" icon></material-button><h2 expr59="expr59"> <i class="material-icons">history</i></h2><material-button expr60="expr60" text-color="var(--accent-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" rounded="true" outlined></material-button></div>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">arrow_back</i>',bindings:[]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.toTaglist()}],redundantAttribute:"expr58",selector:"[expr58]"},{redundantAttribute:"expr59",selector:"[expr59]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["History of ",e.props.image,":",e.props.tag].join("")}]},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Dockerfile\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.showDockerfile}],redundantAttribute:"expr60",selector:"[expr60]"}]}],attributes:[],redundantAttribute:"expr57",selector:"[expr57]"},{type:r.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr61",selector:"[expr61]",template:e('<material-spinner expr62="expr62"></material-spinner>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr62",selector:"[expr62]"}])},{type:r.TAG,getComponent:a,evaluate:e=>"dockerfile",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state.showDockerfile},{type:t.EVENT,name:"on-close",evaluate:e=>e.onDockerfileClose},{type:t.ATTRIBUTE,isBoolean:!1,name:"elements",evaluate:e=>e.state.elements}],redundantAttribute:"expr63",selector:"[expr63]"},{type:r.IF,evaluate:e=>e.state.archs&&e.state.loadend,redundantAttribute:"expr64",selector:"[expr64]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-tabs",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"useLine",evaluate:e=>!0},{type:t.ATTRIBUTE,isBoolean:!1,name:"tabs",evaluate:e=>e.state.archs},{type:t.EVENT,name:"onTabChanged",evaluate:e=>e.onTabChanged}]}])},{type:r.EACH,getKey:null,condition:null,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"material-card",slots:[{id:"default",html:'<tag-history-element expr66="expr66"></tag-history-element>',bindings:[{type:r.EACH,getKey:null,condition:e=>e.entry.value&&e.entry.value.length>0,template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"tag-history-element",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"entry",evaluate:e=>e.entry}]}]),redundantAttribute:"expr66",selector:"[expr66]",itemName:"entry",indexName:null,evaluate:e=>e.element}]}],attributes:[]}]),redundantAttribute:"expr65",selector:"[expr65]",itemName:"element",indexName:null,evaluate:e=>e.state.elements}]),name:"tag-history"},hn={css:null,exports:{onKeyUp(e){13===e.keyCode&&this.add()},add(){const e=this.$("input");if(!e||!e.value||0===e.value.length)return this.props.onNotify("The input field is empty. Please enter an url.",!0);if(!e.value.startsWith("http"))return this.props.onNotify("The input field should start with http:// or https://.",!0);const t=Qr(e.value);la.home(),this.props.onServerChange(t),this.props.onClose(),setTimeout(()=>la.updateUrlQueryParam(t),100)},registryUrlValidator:e=>/^https?:\/\//.test(e)&&!/\/v2\/?$/.test(e)},template:(e,t,r,a)=>e('<material-popup expr161="expr161"></material-popup>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">Add your Server ?</div><div class="material-popup-content"><material-input expr162="expr162" label="Server URL" text-color="var(--primary-text)" label-color="var(--neutral-text)" color="var(--accent-text)"></material-input><span>Write your URL without /v2</span></div><div class="material-popup-action"><material-button expr163="expr163" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button><material-button expr164="expr164" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"material-input",slots:[],attributes:[{type:t.EVENT,name:"onkeyup",evaluate:e=>e.onKeyUp},{type:t.ATTRIBUTE,isBoolean:!1,name:"valid",evaluate:e=>e.registryUrlValidator}],redundantAttribute:"expr162",selector:"[expr162]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Add\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.add}],redundantAttribute:"expr163",selector:"[expr163]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Cancel\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr164",selector:"[expr164]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr161",selector:"[expr161]"}]),name:"add-registry-url"},gn={css:'change-registry-url select,[is="change-registry-url"] select{ position: relative; outline: 0; box-shadow: none; padding: 0; width: 100%; background: 0 0; border: none; font-weight: 400; font-size: 1em; line-height: 24px; height: 24px; border-bottom: 1px solid var(--accent-text); appearance: none; -moz-appearance: none; -webkit-appearance: none; margin: 1.5em 0; color: var(--primary-text); }change-registry-url select option,[is="change-registry-url"] select option{ background-color: var(--background); }',exports:{change(e){const t=this.$("select");if(!t||!t.value||0===t.value.length)return this.props.onNotify("The select field is empty. Please add an url.",!0);if(!t.value.startsWith("http"))return this.props.onNotify("The select field should start with http:// or https://.",!0);const r=Qr(t.value);la.home(),this.props.onServerChange(r),this.props.onClose(),setTimeout(()=>la.updateUrlQueryParam(r),100)},getRegistryServers:Jr},template:(e,t,r,a)=>e('<material-popup expr165="expr165"></material-popup>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">Change your Server ?</div><div class="material-popup-content"><select><option expr166="expr166"></option></select></div><div class="material-popup-action"><material-button expr167="expr167" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button><material-button expr168="expr168" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{type:r.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url},{type:t.ATTRIBUTE,isBoolean:!1,name:"value",evaluate:e=>e.url}]}]),redundantAttribute:"expr166",selector:"[expr166]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Change\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.change}],redundantAttribute:"expr167",selector:"[expr167]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Cancel\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr168",selector:"[expr168]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr165",selector:"[expr165]"}]),name:"change-registry-url"},vn={css:'remove-registry-url material-popup .popup material-button,[is="remove-registry-url"] material-popup .popup material-button{ margin-right: 1em; }',exports:{remove(e){return t=>{var r;r=e,Yr(Jr().filter(function(e){return e!==r})),setTimeout(()=>this.update(),100)}},getRegistryServers:Jr},template:(e,t,r,a)=>e('<material-popup expr169="expr169"></material-popup>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">Remove your Registry Server ?</div><div class="material-popup-content"><ul class="list"><li expr170="expr170"></li></ul></div><div class="material-popup-action"><material-button expr173="expr173" class="dialog-button" waves-color="rgba(158,158,158,.4)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{type:r.EACH,getKey:null,condition:null,template:e('<span><material-button expr171="expr171" text-color="var(--neutral-text)" color="inherit" waves-color="var(--hover-background)" waves-center="true" icon></material-button><span expr172="expr172" class="url"> </span></span>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">delete</i>',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.remove(e.url)},{type:t.ATTRIBUTE,isBoolean:!1,name:"url",evaluate:e=>e.url}],redundantAttribute:"expr171",selector:"[expr171]"},{redundantAttribute:"expr172",selector:"[expr172]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url}]}]),redundantAttribute:"expr170",selector:"[expr170]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Close\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr173",selector:"[expr173]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr169",selector:"[expr169]"}]),name:"remove-registry-url"},fn={css:'dialogs-menu > .material-dropdown-wrapper,[is="dialogs-menu"] > .material-dropdown-wrapper{ color: var(--primary-text); list-style-type: disc; margin-block-start: 0.7em; }dialogs-menu material-dropdown .material-dropdown-container,[is="dialogs-menu"] material-dropdown .material-dropdown-container,dialogs-menu material-dropdown .material-dropdown-container .material-dropdown-item,[is="dialogs-menu"] material-dropdown .material-dropdown-container .material-dropdown-item{ background-color: var(--background); color: var(--primary-text); }dialogs-menu material-dropdown .material-dropdown-container .material-dropdown-item:hover,[is="dialogs-menu"] material-dropdown .material-dropdown-container .material-dropdown-item:hover{ background-color: rgba(0, 0, 0, 0.12); }dialogs-menu .material-dropdown-wrapper material-dropdown .material-dropdown-container,[is="dialogs-menu"] .material-dropdown-wrapper material-dropdown .material-dropdown-container{ right: 0; top: 2em; }dialogs-menu .overlay,[is="dialogs-menu"] .overlay{ position: fixed; height: 100%; width: 100%; top: 0; right: 0; z-index: 10; }dialogs-menu material-button button,[is="dialogs-menu"] material-button button{ float: right; z-index: 2; }dialogs-menu material-button .content i.material-icons,[is="dialogs-menu"] material-button .content i.material-icons{ font-size: 24px; }dialogs-menu material-popup *,[is="dialogs-menu"] material-popup *{ line-height: 1em; }dialogs-menu material-popup material-button .content,[is="dialogs-menu"] material-popup material-button .content{ line-height: 36px; }',exports:{components:{AddRegistryUrl:hn,ChangeRegistryUrl:gn,RemoveRegistryUrl:vn},dropdownItems:[{title:"Add URL",name:"add-registry-url",ro:!1},{title:"Change URL",name:"change-registry-url",ro:!0},{title:"Remove URL",name:"remove-registry-url",ro:!1}],onDropdownSelect(e){this.update({[e.target.item]:!0,isDropdownOpened:!1})},onClose(e){return()=>{this.update({[e]:!1,isDropdownOpened:!1})}},onClick(){this.update({isDropdownOpened:!this.state.isDropdownOpened})}},template:(e,t,r,a)=>e('<add-registry-url expr67="expr67"></add-registry-url><change-registry-url expr68="expr68"></change-registry-url><remove-registry-url expr69="expr69"></remove-registry-url><div class="material-dropdown-wrapper"><material-button expr70="expr70" waves-center="true" waves-opacity="0.6" waves-duration="600" color="var(--header-background)" text-color="var(--header-text)" icon></material-button><material-dropdown expr71="expr71"></material-dropdown></div><div expr72="expr72" class="overlay"></div>',[{type:r.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr67",selector:"[expr67]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"add-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state["add-registry-url"]},{type:t.EVENT,name:"on-close",evaluate:e=>e.onClose("add-registry-url")},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-server-change",evaluate:e=>e.props.onServerChange}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"change-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state["change-registry-url"]},{type:t.EVENT,name:"on-close",evaluate:e=>e.onClose("change-registry-url")},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-server-change",evaluate:e=>e.props.onServerChange}],redundantAttribute:"expr68",selector:"[expr68]"},{type:r.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr69",selector:"[expr69]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"remove-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state["remove-registry-url"]},{type:t.EVENT,name:"on-close",evaluate:e=>e.onClose("remove-registry-url")},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.EVENT,name:"on-server-change",evaluate:e=>e.props.onServerChange}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:'<i class="material-icons">more_vert</i>',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.onClick}],redundantAttribute:"expr70",selector:"[expr70]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-dropdown",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"items",evaluate:e=>e.dropdownItems.filter(t=>t.ro||!e.props.readOnlyRegistries)},{type:t.EVENT,name:"on-click",evaluate:e=>e.onDropdownSelect},{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state.isDropdownOpened}],redundantAttribute:"expr71",selector:"[expr71]"},{type:r.IF,evaluate:e=>e.state.isDropdownOpened,redundantAttribute:"expr72",selector:"[expr72]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])}]),name:"dialogs-menu"},yn={css:'error-page,[is="error-page"]{ display: flex; flex-direction: row; margin: 20px 3em; }error-page .content,[is="error-page"] .content{ margin: auto; text-align: center; }error-page .content a,[is="error-page"] .content a{ color: var(--accent-text); }error-page .content a:visited,[is="error-page"] .content a:visited{ color: var(--accent-text); }error-page .content p span,[is="error-page"] .content p span{ color: var(--accent-text); font-weight: 700; }error-page .content h2,[is="error-page"] .content h2{ font-weight: 700; }error-page pre,[is="error-page"] pre,error-page code,[is="error-page"] code{ background-color: var(--hover-background); font-family: \'Roboto Mono\', monospace !important; text-align: left; border-radius: 5px; }error-page code,[is="error-page"] code{ padding: 0 0.5em; }error-page pre,[is="error-page"] pre{ padding: 0.5em; }error-page pre .keyword,[is="error-page"] pre .keyword{ color: var(--accent-text); }',exports:{getStatusCode(){const{props:e}=this;switch(e.code){case"CATALOG_NOT_FOUND":return"404";case"PAGINATION_NUMBER_INVALID":return"400"}},URL:window.URL},template:(e,t,r,a)=>e('<div class="content"><h1 expr21="expr21"></h1><h2 expr22="expr22"> </h2><template expr23="expr23"></template><template expr25="expr25"></template><template expr28="expr28"></template><template expr30="expr30"></template><template expr33="expr33"></template></div>',[{type:r.IF,evaluate:e=>e.getStatusCode(),redundantAttribute:"expr21",selector:"[expr21]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getStatusCode()}]}])},{redundantAttribute:"expr22",selector:"[expr22]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.code}]},{type:r.IF,evaluate:e=>"CATALOG_NOT_FOUND"===e.props.code,redundantAttribute:"expr23",selector:"[expr23]",template:e('<p>We received a 404 status code from your registry.</p><p>The contact point was <a expr24="expr24"> </a></p><p>\n        This may be caused by a misconfiguration of Docker Registry UI. Check the\n        <a href="https://joxit.dev/docker-registry-ui/#faq">FAQ</a> and\n        <a href="https://joxit.dev/docker-registry-ui/#available-options">Available options</a></p>',[{redundantAttribute:"expr24",selector:"[expr24]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.url},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.props.url}]}])},{type:r.IF,evaluate:e=>"MIXED_CONTENT"===e.props.code,redundantAttribute:"expr25",selector:"[expr25]",template:e('<p><span>Mixed Content</span>: The page at `<a expr26="expr26"> </a>`\n        was loaded over HTTPS, but requested an insecure server endpoint `<a expr27="expr27"> </a>`.\n      </p><p>This request <span>may</span> has been blocked; the content must be served over HTTPS.</p><p>\n        You may unset the option `<span>REGISTRY_URL</span>` and set the registry server container URL in\n        `<span>NGINX_PROXY_PASS_URL</span>`. It\'s usually the name of your container, and it should be on the same\n        network as the UI.\n      </p><p>You can check the issue <a href="https://github.com/Joxit/docker-registry-ui/issues/277">#277</a>.</p>',[{redundantAttribute:"expr26",selector:"[expr26]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>window.location.origin},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>window.location.origin}]},{redundantAttribute:"expr27",selector:"[expr27]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>new e.URL(e.props.url).origin},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>new e.URL(e.props.url).origin}]}])},{type:r.IF,evaluate:e=>"INCORRECT_URL"===e.props.code,redundantAttribute:"expr28",selector:"[expr28]",template:e('<p expr29="expr29"> </p>',[{redundantAttribute:"expr29",selector:"[expr29]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["`",e.props.url,"` does not seems to be a correct URL, should starts with http:// or https://."].join("")}]}])},{type:r.IF,evaluate:e=>"PAGINATION_NUMBER_INVALID"===e.props.code,redundantAttribute:"expr30",selector:"[expr30]",template:e('<p>\n        A default limit of <code>1000</code> images in catalog has been added in docker registry server\n        <a href="https://github.com/distribution/distribution/releases/tag/v2.8.2">v2.8.2</a> (May 11, 2023) and we\n        cannot exceed this value without configuration.\n      </p><p>\n        The new default value for the UI is <code>1000</code> since\n        <a href="https://github.com/Joxit/docker-registry-ui/milestone/6">2.5.0</a> and was <code>100000</code> from\n        <a href="https://github.com/Joxit/docker-registry-ui/issues/39">0.3.6</a>.\n      </p><h3>Possible fixes</h3><p>\n        You can update the environment variable\n        <code expr31="expr31"> </code> of your\n        <span>docker registry server</span> or you can update your\n        <code>/etc/docker/registry/config.yml</code> configuration of your <span>docker registry server</span> and add\n        those lines:\n      </p><pre>\n<span class="keyword">catalog</span>:\n  <span class="keyword">maxentries</span>: <span expr32="expr32"> </span>\n</pre><p>\n        If you don\'t need that many images, you can reduce the number of elements fetch by the\n        <span>docker registry UI</span> with the environment variable <code>CATALOG_ELEMENTS_LIMIT=1000</code>.\n      </p><p>\n        More about this issue:\n        <a href="https://github.com/Joxit/docker-registry-ui/issues/306">Joxit/docker-registry-ui#306</a>.\n      </p>',[{redundantAttribute:"expr31",selector:"[expr31]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["REGISTRY_CATALOG_MAXENTRIES=",e.props.detail?.n||1e5].join("")}]},{redundantAttribute:"expr32",selector:"[expr32]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.detail?.n||1e5}]}])},{type:r.IF,evaluate:e=>"CATALOG_BRANCHING_CONFIGURATION"===e.props.code,redundantAttribute:"expr33",selector:"[expr33]",template:e('<p expr34="expr34"> </p><p>Configuration environment variables are : CATALOG_MIN_BRANCHES and CATALOG_MAX_BRANCHES</p>',[{redundantAttribute:"expr34",selector:"[expr34]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Wrong configuration for the branching feature: ",e.props.message].join("")}]}])}]),name:"error-page"};const xn="version-notification:latest",bn="version-notification:expiration-date";var Tn,An={css:'version-notification,[is="version-notification"]{ display: inline; }version-notification svg,[is="version-notification"] svg{ margin-left: 10px; cursor: pointer; }version-notification material-popup material-button > a:first-child,[is="version-notification"] material-popup material-button > a:first-child{ display: flex; align-items: center; }version-notification material-popup .material-popup-content code,[is="version-notification"] material-popup .material-popup-content code{ background-color: var(--hover-background); padding: 0 5px; border-radius: 4px; line-height: 1.5em; }version-notification material-popup .material-popup-content b,[is="version-notification"] material-popup .material-popup-content b{ color: var(--accent-text); }',exports:{onMounted(e,t){const r=aa(localStorage.getItem(xn)),a=parseInt(localStorage.getItem(bn));r&&r.tag_name&&this.update({tag_name:r.tag_name,latest:r}),(isNaN(a)||(new Date).getTime()>a)&&this.checkForUpdates(e,t)},onUpdated(e,t){const r=this.$("span");r&&(r.innerHTML=(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 128 128">\n  <path fill="#ca2c31" d="M3.77 71.73l16.34-16.1 27.82-4.93-2.75 14.56L7.57 76.82l-2.43-1.05z"/>\n  <path fill="#a02422" d="M22.94 59.76L5.2 75.88l13.05 6.36 19.81-10.11v-4.77l4.05-10.92zm41.98 28.39l-8.57 3.72-8.09 17.15s7.12 15.77 7.44 15.77c.32 0 4.37.32 4.37.32l14.4-16.1 3.64-27.5-13.19 6.64z"/>\n  <path d="M56.5 100.84s4.77-.97 8.17-2.59c3.4-1.62 7.6-4.04 7.6-4.04l-1.54 13.43-15.05 17.13s-.59-.73-3.09-6.17c-1.99-4.34-2.68-5.89-2.68-5.89l6.59-11.87z" fill="#ca2c31"/>\n  <path d="M31.58 80.66s-5.74-.48-12.03 7.47c-5.74 7.26-8.43 19.08-9.47 22.12s-3.53 3.66-2.7 5.05 4.42 1.31 8.85.76 8.23-1.94 8.23-1.94-.19.48-.83 1.52c-.23.37-1.03.9-.97 1.45.14 1.31 11.36 1.34 20.32-7.88 9.68-9.95 4.98-18.11 4.98-18.11L31.58 80.66z" fill="#f7d74d"/>\n  <path d="M33.31 85.29s-6.19.33-11.31 8.28-7.5 17.16-7.01 17.78c.48.62 10.02-2.83 12.31-2.14 1.57.48.76 2.07 1.18 2.49.35.35 4.49.94 11.19-6.32 6.71-7.26 5.12-17.46 5.12-17.46l-11.48-2.63z" fill="#fbf0b4"/>\n  <path d="M36.35 74.44s-3.11 2.77-4.22 4.36c-1.11 1.59-1.11 1.73-1.04 2.21.07.48 1.22 5.75 6.01 10.37 5.88 5.67 11.13 6.43 11.89 6.43.76 0 5.81-5.67 5.81-5.67l-18.45-17.7z" fill="#858585"/>\n  <path d="M50.1 91.24s5.04 3.31 13.49.47c11.55-3.88 20.02-12.56 30.51-23.52 10.12-10.58 18.61-23.71 18.61-23.71l-5.95-19.93L50.1 91.24z" fill="#437687"/>\n  <path d="M67.99 80.33l1.39-4.32 3.48.49s2.65 1.25 4.6 2.16c1.95.91 4.46 1.6 4.46 1.6l-4.95 4.18s-2.7-1.02-4.67-1.88c-2.22-.97-4.31-2.23-4.31-2.23z" fill="#3f545f"/>\n  <path d="M84.32 16.14s-9.62 5.58-23.41 18.63c-12.43 11.76-21.64 22.4-23.87 31.45-1.86 7.58-.87 12.18 3.36 17.15 4.47 5.26 9.71 7.87 9.71 7.87s3.94.06 20.38-12.59C91 62.86 107.43 36.42 107.43 36.42L84.32 16.14z" fill="#8dafbf"/>\n  <path d="M104.18 41.84s-8.37-3.57-14.34-11.9c-5.93-8.27-5.46-13.86-5.46-13.86s4.96-3.89 16.11-8.34c7.5-2.99 17.71-4.52 21.07-2.03s-2.3 14.98-2.3 14.98l-10.31 19.96-4.77 1.19z" fill="#d83f22"/>\n  <path d="M68.17 80.4s-7.23-3.69-11.83-8.94c-8.7-9.91-10.5-20.79-10.5-20.79l4.37-5.13S51.3 57.1 60.63 67.09c6.08 6.51 12.43 9.49 12.43 9.49s-1.27 1.07-2.63 2.11c-.87.67-2.26 1.71-2.26 1.71z" fill="#6896a5"/>\n  <path d="M112.71 44.48s4.34-5.23 8.45-17.02c5.74-16.44.74-21.42.74-21.42s-1.69 7.82-7.56 18.69c-4.71 8.71-10.41 17-10.41 17s3.14 1.41 4.84 1.9c2.14.62 3.94.85 3.94.85z" fill="#a02422"/>\n  <path d="M39.81 69.66c1.3 1.24 3.27-.06 4.56-3.1 1.3-3.04 1.28-4.74.28-5.46-1.24-.9-3.32 1.07-4.23 2.82-1 1.94-1.59 4.8-.61 5.74zm45.14-49.53s-7.61 5.47-15.73 12.91c-7.45 6.83-12.39 12.17-13.07 13.41-.72 1.33-.73 3.21-.17 4.17s1.8 1.46 2.93.62c1.13-.85 9.18-9.75 16.45-16.11 6.65-5.82 11.78-9.51 11.78-9.51s2.08-3.68 1.74-4.52c-.34-.85-3.93-.97-3.93-.97z" fill="#b3e1ee"/>\n  <path d="M84.95 20.13s5.62-4.31 11.74-7.34c5.69-2.82 11.35-5.17 12.37-3.13.97 1.94-5.37 4.58-10.95 8.14-5.58 3.56-10.95 7.81-10.95 7.81s-.82-1.5-1.35-2.89a23.7 23.7 0 01-.86-2.59z" fill="#ed6a65"/>\n  <path d="M89.59 39.25c-5.57-5.13-13.32-3.75-17.14.81-3.92 4.7-3.63 11.88 1 16.2 4.21 3.92 12.04 4.81 16.76-.69 4.2-4.88 3.94-12.13-.62-16.32z" fill="#e1e1e1"/>\n  <path d="M75.33 41.87c-3.31 3.25-3.13 9.69.81 12.63 3.44 2.57 8.32 2.44 11.38-.69 3.06-3.13 3.06-8.82.19-11.76-3.3-3.37-8.59-3.9-12.38-.18z" fill="#3f545f"/>\n  <path d="M50 76.89s6.19-6.28 6.87-5.6c.68.68.59 4.49-2.37 8.73-2.97 4.24-9.5 11.79-14.67 16.88-5.1 5.01-12.29 10.74-12.97 10.64-.53-.08-2.68-1.15-3.54-2.19-.84-1.03 1.67-5.9 2.68-7.51 1.02-1.61 24-20.95 24-20.95z" fill="#a02524"/>\n  <path d="M21.23 101.85c-.08 1.44 2.12 3.54 2.12 3.54L56.87 71.3s-1.57-1.77-6.19 1.1c-4.66 2.9-8.74 6.38-14.76 12.21-8.39 8.14-14.61 15.8-14.69 17.24z" fill="#ca2c31"/>\n</svg>\n',"image/svg+xml").firstElementChild.outerHTML)},onClose(){this.update({open:!1})},onClick(){this.update({open:!0})},checkForUpdates(e,t){const r=new ca,a=this;r.addEventListener("load",function(){if(localStorage.setItem(bn,(new Date).getTime()+6048e5),200===this.status){const t=aa(this.responseText);t&&a.tag_name!==t.tag_name&&!ra(e.version,t.tag_name)&&e.onNotify("A new version of Docker Registry UI is available!"),localStorage.setItem(xn,this.responseText),a.update({tag_name:t.tag_name,latest:t})}else 404!==this.status&&(e.onNotify("Cannot check for new updates. Will try again in 24 hours. See the browser console."),console.error("Cannot check for new Docker Registry UI updates. This is most likely a GitHub issue. You don't need to worry about it."),console.error(`Got status code ${this.status} from Github API with response ${this.responseText}`))}),r.open("GET","https://api.github.com/repos/joxit/docker-registry-ui/releases/latest"),r.send()},isNewestVersion:ra},template:(e,t,r,a)=>e('<span expr35="expr35"></span><material-popup expr36="expr36"></material-popup>',[{type:r.IF,evaluate:e=>e.state.tag_name&&!e.isNewestVersion(e.props.version,e.state.tag_name),redundantAttribute:"expr35",selector:"[expr35]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"material-popup",slots:[{id:"default",html:'<div class="material-popup-title">Check for updates</div><div class="material-popup-content"><p>The version <b expr37="expr37"> </b> of Docker Registry UI now available.</p><p>You can download the lastest version with docker.</p><code expr38="expr38"> </code></div><div class="material-popup-action"><material-button expr39="expr39" class="dialog-button release-note" waves-color="var(--hover-background)" color="inherit" text-color="var(--accent-text)" target="_blank"></material-button><material-button expr40="expr40" class="dialog-button" waves-color="var(--hover-background)" color="inherit" text-color="var(--primary-text)"></material-button></div>',bindings:[{redundantAttribute:"expr37",selector:"[expr37]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.tag_name}]},{redundantAttribute:"expr38",selector:"[expr38]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["joxit/docker-registry-ui:",e.state.tag_name].join("")}]},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Release Note\n      ",bindings:[]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.state.latest&&e.state.latest.html_url}],redundantAttribute:"expr39",selector:"[expr39]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-button",slots:[{id:"default",html:"\n        Close\n      ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.onClose}],redundantAttribute:"expr40",selector:"[expr40]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state.open},{type:t.EVENT,name:"onClick",evaluate:e=>e.onClose}],redundantAttribute:"expr36",selector:"[expr36]"}]),name:"version-notification"},En={"primary-text":"#25313b","neutral-text":"#777777",background:"#ffffff","hover-background":"#eeeeee","accent-text":"#5f7796","header-text":"#ffffff","header-accent-text":"#7b9ac2","header-background":"#25313b","footer-text":"#ffffff","footer-neutral-text":"#adbacd","footer-background":"#344251"},wn={"primary-text":"#98a8bd","neutral-text":"#6d7fab",background:"#22272e","hover-background":"#343a4b","accent-text":"#5c88ff","header-text":"#ffffff","header-accent-text":"#7ea1ff","header-background":"#333a45","footer-text":"#ffffff","footer-neutral-text":"#98afcf","footer-background":"#344251"},Bn="registryUiTheme",In=function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^theme-/,"")},Cn=function(e,t){var r=function(e){var t=e.theme;if("auto"===t||""===t)switch(localStorage.getItem(Bn)){case"dark":return!0;case"light":return!1;default:if("function"==typeof window.matchMedia){var r=window.matchMedia("(prefers-color-scheme: dark)");return r&&r.matches}}return"dark"===t}(e);Tn=L({},r?wn:En),Object.entries(e).filter(function(e){var t=G(e,2),r=t[0];return t[1]&&/^theme[A-Z]/.test(r)}).map(function(e){var t=G(e,2),r=t[0],a=t[1];return[In(r),a]}).forEach(function(e){var t=G(e,2),r=t[0],a=t[1];return Tn[r]=a}),Object.entries(Tn).forEach(function(e){var r=G(e,2),a=r[0],n=r[1];return t.setProperty("--".concat(a),n)});var a=r?"dark":"light";return localStorage.setItem(Bn,a),a},kn={css:'docker-registry-ui,[is="docker-registry-ui"]{ display: flex; flex-direction: column; min-height: 100vh; }docker-registry-ui main,[is="docker-registry-ui"] main{ flex-grow: 1; margin: 0.5em 0; }docker-registry-ui material-navbar,[is="docker-registry-ui"] material-navbar{ height: 64px; color: var(--header-text); background-color: var(--header-background); }docker-registry-ui material-navbar .menu,[is="docker-registry-ui"] material-navbar .menu{ display: flex; }docker-registry-ui material-navbar .nav-wrapper .menu,[is="docker-registry-ui"] material-navbar .nav-wrapper .menu{ flex-shrink: 1; }docker-registry-ui material-navbar .nav-wrapper .logo,[is="docker-registry-ui"] material-navbar .nav-wrapper .logo{ display: flex; align-items: center; flex-direction: row; }docker-registry-ui material-navbar .nav-wrapper .logo a,[is="docker-registry-ui"] material-navbar .nav-wrapper .logo a{ text-decoration: none; }docker-registry-ui material-navbar .nav-wrapper .logo a:hover,[is="docker-registry-ui"] material-navbar .nav-wrapper .logo a:hover{ text-decoration: underline; }docker-registry-ui material-footer,[is="docker-registry-ui"] material-footer{ color: var(--footer-neutral-text); background-color: var(--footer-background); }docker-registry-ui material-footer .material-footer-logo,[is="docker-registry-ui"] material-footer .material-footer-logo{ color: var(--footer-text); }docker-registry-ui material-switch i,[is="docker-registry-ui"] material-switch i{ user-select: none; }',exports:{components:{Catalog:wa,TagList:on,TagHistory:mn,DialogsMenu:fn,SearchBar:fa,Router:Vr,Route:Br,ErrorPage:yn,VersionNotification:An},onUpdated(e,t){t.snackbarIsError=!1,t.snackbarMessage=void 0},onBeforeMount(e){(e.defaultRegistries&&e.defaultRegistries.length>0&&0===Jr().length||ea(e.readOnlyRegistries))&&Yr(e.defaultRegistries),window.onselectstart=e=>{if(e.target&&e.target.className&&"function"==typeof e.target.className.indexOf)return!["checkbox","checkmark","remove-tag"].find(t=>e.target.className.indexOf(t)>=0)};const t=e.registryUrl||("true"===e.singleRegistry?void 0:la.getUrlQueryParam()||Jr(0))||window.location.origin+window.location.pathname.replace(/\/+$/,"");this.state.registryUrl=t.replace(/\/$/,"").replace(/index(\.html?)?$/,""),this.state.name=e.name||Wr(e.registryUrl),this.state.catalogElementsLimit=e.catalogElementsLimit||1e3,this.state.pullUrl=this.pullUrl(this.state.registryUrl,e.pullUrl),this.state.useControlCacheHeader=e.useControlCacheHeader;const r=Cn(e,this.root.parentNode.style);this.state.themeSwitch="dark"===r},onServerChange(e){this.update({registryUrl:e,name:Wr(e),pullUrl:this.pullUrl(e),snackbarMessage:"Registry server changed to `"+e+"`."})},onAuthentication(e,t){if(e&&e.realm&&e.service&&e.scope){const{realm:r,service:a,scope:n}=e,o=new XMLHttpRequest;o.addEventListener("loadend",()=>{try{const e=JSON.parse(o.responseText);t(e)}catch(e){this.notifySnackbar(`Failed to log in: ${e.message}`,!0)}}),o.withCredentials=!0,o.open("GET",`${r}?service=${a}&scope=${n}`),o.send()}else t()},onAuthenticationClose(){this.update({authenticationDialogOpened:!1})},pullUrl:(e,t)=>Wr(t||e&&e.length>0&&e||window.location.host),notifySnackbar(e,t){"string"==typeof e?this.update({snackbarMessage:e,snackbarIsError:t||!1}):e&&(e.code||e.errors)?(this.update({pageError:e}),setTimeout(()=>delete this.state.pageError,1e3)):e&&e.message&&this.update({snackbarMessage:e.message,snackbarIsError:e.isError})},onSearch(e){this.update({filter:e})},onThemeChange(e){const t=e.target.checked?"dark":"light";Cn({...this.props,theme:t},this.root.parentNode.style),this.update({themeSwitch:e.target.checked})},baseRoute:"([^#]*?)/(\\?[^#]*?)?(#!)?(/?)",router:la,version:"2.6.0",latest:"2.6.0",truthy:ea,falsy:function(e){return!1!==e&&"false"!==e},stringToArray:function(e){return e&&"string"==typeof e?e.split(","):[]}},template:(e,t,r,a)=>e('<header><material-navbar expr0="expr0"></material-navbar></header><main><error-page expr5="expr5"></error-page><error-page expr6="expr6"></error-page><router expr7="expr7"></router><registry-authentication expr14="expr14"></registry-authentication><material-snackbar expr15="expr15"></material-snackbar></main><footer><material-footer expr16="expr16" mini="true"></material-footer></footer>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-navbar",slots:[{id:"default",html:'<span class="logo"><span><a expr1="expr1"> </a></span><version-notification expr2="expr2"></version-notification></span><div class="menu"><search-bar expr3="expr3"></search-bar><dialogs-menu expr4="expr4"></dialogs-menu></div>',bindings:[{redundantAttribute:"expr1",selector:"[expr1]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.dockerRegistryUiTitle.trim()||"Docker Registry UI"},{type:t.ATTRIBUTE,isBoolean:!1,name:"href",evaluate:e=>e.router.home()}]},{type:r.IF,evaluate:e=>e.falsy(e.props.enableVersionNotification),redundantAttribute:"expr2",selector:"[expr2]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"version-notification",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"version",evaluate:e=>e.latest},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar}]}])},{type:r.TAG,getComponent:a,evaluate:e=>"search-bar",slots:[],attributes:[{type:t.EVENT,name:"on-search",evaluate:e=>e.onSearch}],redundantAttribute:"expr3",selector:"[expr3]"},{type:r.IF,evaluate:e=>"true"!==e.props.singleRegistry,redundantAttribute:"expr4",selector:"[expr4]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"dialogs-menu",slots:[],attributes:[{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.EVENT,name:"on-server-change",evaluate:e=>e.onServerChange},{type:t.ATTRIBUTE,isBoolean:!1,name:"default-registries",evaluate:e=>e.props.defaultRegistries},{type:t.ATTRIBUTE,isBoolean:!1,name:"read-only-registries",evaluate:e=>e.truthy(e.props.readOnlyRegistries)}]}])}]}],attributes:[],redundantAttribute:"expr0",selector:"[expr0]"},{type:r.IF,evaluate:e=>e.state.pageError&&!Array.isArray(e.state.pageError.errors),redundantAttribute:"expr5",selector:"[expr5]",template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"error-page",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"code",evaluate:e=>e.state.pageError.code},{type:t.ATTRIBUTE,isBoolean:!1,name:"status",evaluate:e=>e.state.pageError.status},{type:t.ATTRIBUTE,isBoolean:!1,name:"message",evaluate:e=>e.state.pageError.message},{type:t.ATTRIBUTE,isBoolean:!1,name:"url",evaluate:e=>e.state.pageError.url}]}])},{type:r.EACH,getKey:null,condition:e=>e.state.pageError&&Array.isArray(e.state.pageError.errors),template:e(null,[{type:r.TAG,getComponent:a,evaluate:e=>"error-page",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"code",evaluate:e=>e.error.code},{type:t.ATTRIBUTE,isBoolean:!1,name:"detail",evaluate:e=>e.error.detail},{type:t.ATTRIBUTE,isBoolean:!1,name:"message",evaluate:e=>e.error.message},{type:t.ATTRIBUTE,isBoolean:!1,name:"url",evaluate:e=>e.state.pageError.url}]}]),redundantAttribute:"expr6",selector:"[expr6]",itemName:"error",indexName:null,evaluate:e=>e.state.pageError&&e.state.pageError.errors},{type:r.TAG,getComponent:a,evaluate:e=>"router",slots:[{id:"default",html:'<route expr8="expr8"></route><route expr10="expr10"></route><route expr12="expr12"></route>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"route",slots:[{id:"default",html:'<catalog expr9="expr9"></catalog>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"catalog",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,isBoolean:!1,name:"catalog-elements-limit",evaluate:e=>e.state.catalogElementsLimit},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.ATTRIBUTE,isBoolean:!1,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-catalog-nb-tags",evaluate:e=>e.truthy(e.props.showCatalogNbTags)},{type:t.ATTRIBUTE,isBoolean:!1,name:"catalog-default-expanded",evaluate:e=>e.truthy(e.props.catalogDefaultExpanded)},{type:t.ATTRIBUTE,isBoolean:!1,name:"catalog-min-branches",evaluate:e=>e.props.catalogMinBranches},{type:t.ATTRIBUTE,isBoolean:!1,name:"catalog-max-branches",evaluate:e=>e.props.catalogMaxBranches},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.truthy(e.props.isRegistrySecured)}],redundantAttribute:"expr9",selector:"[expr9]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"path",evaluate:e=>e.baseRoute}],redundantAttribute:"expr8",selector:"[expr8]"},{type:r.TAG,getComponent:a,evaluate:e=>"route",slots:[{id:"default",html:'<tag-list expr11="expr11"></tag-list>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"tag-list",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,isBoolean:!1,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.router.getTagListImage()},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-content-digest",evaluate:e=>e.truthy(e.props.showContentDigest)},{type:t.ATTRIBUTE,isBoolean:!1,name:"show-tag-history",evaluate:e=>e.falsy(e.props.showTagHistory)},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-image-remove-activated",evaluate:e=>e.truthy(e.props.isImageRemoveActivated)},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.ATTRIBUTE,isBoolean:!1,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"use-control-cache-header",evaluate:e=>e.truthy(e.props.useControlCacheHeader)},{type:t.ATTRIBUTE,isBoolean:!1,name:"taglist-order",evaluate:e=>e.props.taglistOrder},{type:t.ATTRIBUTE,isBoolean:!1,name:"tags-per-page",evaluate:e=>e.props.tagsPerPage},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.truthy(e.props.isRegistrySecured)}],redundantAttribute:"expr11",selector:"[expr11]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"path",evaluate:e=>[e.baseRoute,"taglist/(.*)"].join("")}],redundantAttribute:"expr10",selector:"[expr10]"},{type:r.TAG,getComponent:a,evaluate:e=>"route",slots:[{id:"default",html:'<tag-history expr13="expr13"></tag-history>',bindings:[{type:r.TAG,getComponent:a,evaluate:e=>"tag-history",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,isBoolean:!1,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,isBoolean:!1,name:"image",evaluate:e=>e.router.getTagHistoryImage()},{type:t.ATTRIBUTE,isBoolean:!1,name:"tag",evaluate:e=>e.router.getTagHistoryTag()},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-image-remove-activated",evaluate:e=>e.truthy(e.props.isImageRemoveActivated)},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication},{type:t.ATTRIBUTE,isBoolean:!1,name:"history-custom-labels",evaluate:e=>e.stringToArray(e.props.historyCustomLabels)},{type:t.ATTRIBUTE,isBoolean:!1,name:"use-control-cache-header",evaluate:e=>e.truthy(e.props.useControlCacheHeader)},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-registry-secured",evaluate:e=>e.truthy(e.props.isRegistrySecured)}],redundantAttribute:"expr13",selector:"[expr13]"}]}],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"path",evaluate:e=>[e.baseRoute,"taghistory/(.*)"].join("")}],redundantAttribute:"expr12",selector:"[expr12]"}]}],attributes:[],redundantAttribute:"expr7",selector:"[expr7]"},{type:r.TAG,getComponent:a,evaluate:e=>"registry-authentication",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"realm",evaluate:e=>e.state.realm},{type:t.ATTRIBUTE,isBoolean:!1,name:"scope",evaluate:e=>e.state.scope},{type:t.ATTRIBUTE,isBoolean:!1,name:"service",evaluate:e=>e.state.service},{type:t.EVENT,name:"on-close",evaluate:e=>e.onAuthenticationClose},{type:t.EVENT,name:"on-authenticated",evaluate:e=>e.state.onAuthenticated},{type:t.ATTRIBUTE,isBoolean:!1,name:"opened",evaluate:e=>e.state.authenticationDialogOpened}],redundantAttribute:"expr14",selector:"[expr14]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-snackbar",slots:[],attributes:[{type:t.ATTRIBUTE,isBoolean:!1,name:"message",evaluate:e=>e.state.snackbarMessage},{type:t.ATTRIBUTE,isBoolean:!1,name:"is-error",evaluate:e=>e.state.snackbarIsError}],redundantAttribute:"expr15",selector:"[expr15]"},{type:r.TAG,getComponent:a,evaluate:e=>"material-footer",slots:[{id:"default",html:'<a expr17="expr17" class="material-footer-logo" href="https://joxit.github.io/docker-registry-ui/"> </a><ul><li><a href="https://github.com/Joxit/docker-registry-ui">Contribute on GitHub</a></li><li><a href="https://github.com/Joxit/docker-registry-ui/blob/main/LICENSE">License AGPL-3.0</a></li><li expr18="expr18"></li></ul>',bindings:[{redundantAttribute:"expr17",selector:"[expr17]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Docker Registry UI ",e.version].join("")}]},{type:r.IF,evaluate:e=>"auto"===e.props.theme||""===e.props.theme,redundantAttribute:"expr18",selector:"[expr18]",template:e('<material-switch expr19="expr19" track-selected-color="var(--accent-text)" outline-selected-color="var(--accent-text)"></material-switch>',[{type:r.TAG,getComponent:a,evaluate:e=>"material-switch",slots:[{id:"thumb-icon",html:'<i slot="thumb-icon" class="material-icons" style="color: white; font-size: 0.75em">wb_sunny</i>',bindings:[]},{id:"thumb-selected-icon",html:'<i slot="thumb-selected-icon" class="material-icons" style="color: #79747e; font-size: 0.75em">\n              brightness_2\n            </i>',bindings:[]}],attributes:[{type:t.EVENT,name:"on-change",evaluate:e=>e.onThemeChange},{type:t.ATTRIBUTE,isBoolean:!1,name:"checked",evaluate:e=>e.state.themeSwitch}],redundantAttribute:"expr19",selector:"[expr19]"}])}]}],attributes:[],redundantAttribute:"expr16",selector:"[expr16]"}]),name:"docker-registry-ui"};gt("material-card",{css:null,exports:null,template:(e,t,r,a)=>e('<slot expr79="expr79"></slot>',[{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr79",selector:"[expr79]"}])}),gt("material-footer",{css:null,exports:{},template:(e,t,r,a)=>e('<div><slot expr90="expr90"></slot></div>',[{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr90",selector:"[expr90]"}])}),gt("material-navbar",{css:null,exports:null,template:(e,t,r,a)=>e('<div class="nav-wrapper"><slot expr98="expr98"></slot></div>',[{expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"role",evaluate:e=>"toolbar"}]},{type:r.SLOT,attributes:[],name:"default",template:null,redundantAttribute:"expr98",selector:"[expr98]"}])}),gt("material-spinner",{css:null,exports:null,template:(e,t,r,a)=>e('<svg class="loader-circular" height="50" width="50"><circle expr103="expr103" class="loader-path" cx="25" cy="25.2" r="19.9" fill="none" stroke-miterlimit="10"/></svg>',[{redundantAttribute:"expr103",selector:"[expr103]",expressions:[{type:t.ATTRIBUTE,isBoolean:!1,name:"stroke-width",evaluate:e=>e.props.strokeWidth||3}]}])}),gt("material-button",wt),gt("material-waves",xt),gt("material-checkbox",Bt),gt("material-snackbar",Ut),gt("material-tabs",Ot),gt("material-dropdown",It),gt("material-popup",Nt),gt("material-input",Rt),gt("material-switch",St);for(var Rn,Nn=(Rn=kn,function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=r.slots,n=r.attributes,o=r.parentScope;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}
/* Riot v9.4.11, @license MIT */(function(t){return t.mount(e,o)},function(e){return e({props:t,slots:a,attributes:n})},ht)(Rn)}),Un=document.getElementsByTagName("docker-registry-ui"),Sn=0;Sn<Un.length;Sn++)Nn(Un.item(Sn))}();
