From c84c9f36e617fb16f714629bd79fd7cef765e0f4 Mon Sep 17 00:00:00 2001 From: Joxit Date: Fri, 6 May 2022 23:24:49 +0200 Subject: [PATCH] fix(entrypoint): nginx crashes when overriding default.conf fixes #247 closes #251 --- Dockerfile | 2 +- arm32v7.dockerfile | 2 +- arm64v8.dockerfile | 2 +- bin/{entrypoint => 90-docker-registry-ui.sh} | 6 ++++-- debian.dockerfile | 2 +- dist/docker-registry-ui.js | 2 +- package.json | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) rename bin/{entrypoint => 90-docker-registry-ui.sh} (92%) diff --git a/Dockerfile b/Dockerfile index 6cf02c1..dacee9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ENV NGINX_LISTEN_PORT '80' ENV SHOW_CATALOG_NB_TAGS 'false' COPY nginx/default.conf /etc/nginx/conf.d/default.conf -COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh +COPY bin/90-docker-registry-ui.sh /docker-entrypoint.d/90-docker-registry-ui.sh COPY dist/ /usr/share/nginx/html/ COPY favicon.ico /usr/share/nginx/html/ diff --git a/arm32v7.dockerfile b/arm32v7.dockerfile index 8522419..1e513c2 100644 --- a/arm32v7.dockerfile +++ b/arm32v7.dockerfile @@ -23,7 +23,7 @@ ENV NGINX_LISTEN_PORT '80' ENV SHOW_CATALOG_NB_TAGS 'false' COPY nginx/default.conf /etc/nginx/conf.d/default.conf -COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh +COPY bin/90-docker-registry-ui.sh /docker-entrypoint.d/90-docker-registry-ui.sh COPY dist/ /usr/share/nginx/html/ COPY favicon.ico /usr/share/nginx/html/ diff --git a/arm64v8.dockerfile b/arm64v8.dockerfile index 92df1fc..f235fe4 100644 --- a/arm64v8.dockerfile +++ b/arm64v8.dockerfile @@ -23,7 +23,7 @@ ENV NGINX_LISTEN_PORT '80' ENV SHOW_CATALOG_NB_TAGS 'false' COPY nginx/default.conf /etc/nginx/conf.d/default.conf -COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh +COPY bin/90-docker-registry-ui.sh /docker-entrypoint.d/90-docker-registry-ui.sh COPY dist/ /usr/share/nginx/html/ COPY favicon.ico /usr/share/nginx/html/ diff --git a/bin/entrypoint b/bin/90-docker-registry-ui.sh similarity index 92% rename from bin/entrypoint rename to bin/90-docker-registry-ui.sh index 81a0031..f8c9cf3 100755 --- a/bin/entrypoint +++ b/bin/90-docker-registry-ui.sh @@ -58,11 +58,13 @@ if [ -n "${NGINX_PROXY_PASS_URL}" ] ; then fi if [ "$(whoami)" != "root" ]; then - if [ "$NGINX_LISTEN_PORT" = 80 ]; then + if [ "$NGINX_LISTEN_PORT" = "80" ]; then NGINX_LISTEN_PORT="8080" fi sed -i "/user nginx;/d" /etc/nginx/nginx.conf sed -i "s,/var/run/nginx.pid,/tmp/nginx.pid," /etc/nginx/nginx.conf fi -sed -i "s,listen 80;,listen $NGINX_LISTEN_PORT;," /etc/nginx/conf.d/default.conf +if [ "$NGINX_LISTEN_PORT" != "80" ]; then + sed -i "s,listen 80;,listen $NGINX_LISTEN_PORT;," /etc/nginx/conf.d/default.conf +fi diff --git a/debian.dockerfile b/debian.dockerfile index 2404728..d486e90 100644 --- a/debian.dockerfile +++ b/debian.dockerfile @@ -23,7 +23,7 @@ ENV NGINX_LISTEN_PORT '80' ENV SHOW_CATALOG_NB_TAGS 'false' COPY nginx/default.conf /etc/nginx/conf.d/default.conf -COPY bin/entrypoint /docker-entrypoint.d/90-docker-registry-ui.sh +COPY bin/90-docker-registry-ui.sh /docker-entrypoint.d/90-docker-registry-ui.sh COPY dist/ /usr/share/nginx/html/ COPY favicon.ico /usr/share/nginx/html/ diff --git a/dist/docker-registry-ui.js b/dist/docker-registry-ui.js index 577488c..b4692c1 100644 --- a/dist/docker-registry-ui.js +++ b/dist/docker-registry-ui.js @@ -17,4 +17,4 @@ * @license AGPL */ !function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n]+)>/g,(function(e,t){return"$"+i[t]})))}if("function"==typeof r){var o=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,o)),r.apply(this,e)}))}return e[Symbol.replace].call(this,n,r)},r.apply(this,arguments)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ng-p)for(var y=n(e[u],0);p'.concat(e,""),"application/xml").documentElement,!0)}(t,e):function(e,t){var n=de(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function $e(e,t){switch(!0){case ce(e):I(t,e);break;case de(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}var ze=Object.freeze({createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?Ve(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount:function(e,t,n,r){var a=this;if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);var i=r,o=i.fragment,s=i.children,l=i.avoidDOMInjection,u=(s?s[0]:e).parentNode,p=de(e),c=p?function(e,t,n){var r=Array.from(e.childNodes);return Math.max(r.indexOf(t),r.indexOf(n.head)+1,0)}(u,e,r):null;this.createDOM(e);var d=o||this.dom.cloneNode(!0);return this.el=p?u:e,this.children=p?s||Array.from(d.childNodes):null,!l&&d&&$e(e,d),this.bindings=this.bindingsData.map((function(e){return Ge(a.el,e,c)})),this.bindings.forEach((function(e){return e.mount(t,n)})),this.meta=r,this},update:function(e,t){return this.bindings.forEach((function(n){return n.update(e,t)})),this},unmount:function(e,t,n){void 0===n&&(n=!1);var r=this.el;if(!r)return this;switch(this.bindings.forEach((function(r){return r.unmount(e,t,n)})),!0){case r[Y]||null===n:break;case Array.isArray(this.children):k(this.children);break;case!n:R(r);break;case!!n:U(r)}return this.el=null,this},clone:function(){return Object.assign({},this,{meta:{},el:null})}});function He(e,t){return void 0===t&&(t=[]),Object.assign({},ze,{html:e,bindingsData:t})}var Fe=Object.freeze({__proto__:null,template:He,createBinding:Ge,createExpression:Se,bindingTypes:ne,expressionTypes:re});function qe(){return this}function Ke(e){return me(e)?e.prototype&&e.prototype.constructor?new e:e():e}function We(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Xe(e,t){return We("string"==typeof e?(t||document).querySelectorAll(e):e)}var Ye=function(e){return 1===e.length?e[0]:e};function Qe(e,t,r){var a="object"===n(t)?t:s({},t,r),i=Object.keys(a);return We(e).forEach((function(e){i.forEach((function(t){return e.setAttribute(t,a[t])}))})),e}function Je(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return Ye(We(e).map((function(e){return Ye(r.map((function(t){return e[n](t)})))})))}(e,t,"getAttribute")}var Ze,et=new Map,tt=function(){return Ze||(Qe(Ze=Xe("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ze.parentNode||document.head.appendChild(Ze),Ze)},nt={CSS_BY_NAME:et,add:function(e,t){return et.has(e)||(et.set(e,t),this.inject()),this},inject:function(){return tt().innerHTML=f(et.values()).join("\n"),this},remove:function(e){return et.has(e)&&(et.delete(e),this.inject()),this}};function rt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{this.props.link&&(window.location.href=this.props.link),"function"==typeof e&&e(t)}},onWaveStart(e){"function"==typeof this.props.onWaveStart&&this.props.onWaveStart(e)},onWaveEnd(e){"function"==typeof this.props.onWaveEnd&&this.props.onWaveEnd(e)}},template:(e,t,n,r)=>e('
',[{type:n.TAG,getComponent:r,evaluate:e=>"material-waves",slots:[],attributes:[{type:t.ATTRIBUTE,name:"center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,name:"rounded",evaluate:e=>e.props.rounded},{type:t.ATTRIBUTE,name:"opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,name:"color",evaluate:e=>e.props.wavesColor},{type:t.ATTRIBUTE,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}],redundantAttribute:"expr93",selector:"[expr93]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr94",selector:"[expr94]"}]),name:"material-button"},Et={css:null,exports:{state:{titleExist:!0},onMounted(e,t){const n=this.$(".title");n.children&&0!==n.children.length||this.update({titleExist:!1})}},template:(e,t,n,r)=>e('
',[{type:n.IF,evaluate:e=>e.state.titleExist,redundantAttribute:"expr99",selector:"[expr99]",template:e('',[{type:n.SLOT,attributes:[],name:"title",redundantAttribute:"expr100",selector:"[expr100]"}])},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr101",selector:"[expr101]"}]),name:"material-card"},At={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){"function"==typeof this.props.onChange&&this.props.onChange(!this.state.checked,e),this.update({checked:!this.state.checked})}},template:(e,t,n,r)=>e('
',[{redundantAttribute:"expr95",selector:"[expr95]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["checkbox ",e.state.checked?"checked":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{redundantAttribute:"expr96",selector:"[expr96]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr97",selector:"[expr97]"},{redundantAttribute:"expr98",selector:"[expr98]",expressions:[{type:t.VALUE,evaluate:e=>e.state.checked}]}]),name:"material-checkbox"},wt={css:null,exports:{state:{opening:!1,opened:!1},onMounted(){this.state.opened=this.props.opened||!1,this.props.selected&&this.update({selected:props.selected})},onBeforeUpdate(e,t){e.opened!==t.opened&&(t.opening=!0)},onUpdated(e,t){t.opening&&setTimeout((()=>{this.update({opening:!1,opened:e.opened})}),e.opened?0:200)},select({item:e,key:t}){return this.update({selected:t}),"function"==typeof this.props.onSelect&&this.props.onSelect(t,e),!0}},template:(e,t,n,r)=>e('
    ',[{type:n.IF,evaluate:e=>e.state.opening||e.state.opened,redundantAttribute:"expr104",selector:"[expr104]",template:e('
  • ',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["dropdown-content ",e.state.opening?"opening":""].join("")}]},{type:n.EACH,getKey:null,condition:null,template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.props.selected==e.key?"selected":""}]},{type:n.IF,evaluate:e=>!e.item.link,redundantAttribute:"expr106",selector:"[expr106]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.item.title},{type:t.EVENT,name:"onclick",evaluate:e=>e.select.bind(null,{item:e.item,key:e.key})}]}])},{type:n.IF,evaluate:e=>e.item.link,redundantAttribute:"expr107",selector:"[expr107]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.item.title},{type:t.ATTRIBUTE,name:"href",evaluate:e=>e.item.link},{type:t.EVENT,name:"onclick",evaluate:e=>e.select(e.item)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.item.title}]}])}]),redundantAttribute:"expr105",selector:"[expr105]",itemName:"item",indexName:"key",evaluate:e=>e.props.items}])}]),name:"material-dropdown-list"},Ct={css:null,exports:{onMounted(e,t){this.updateClasses()},onUpdated(e,t){this.updateClasses()},updateClasses(){const e=this.$(".mini-footer");for(let e=0;e0&&e.classList.add(`material-footer-${e.slot}`)}},template:(e,t,n,r)=>e('',[{type:n.SLOT,attributes:[],name:"sections",redundantAttribute:"expr108",selector:"[expr108]"},{type:n.SLOT,attributes:[],name:"logo",redundantAttribute:"expr109",selector:"[expr109]"},{type:n.SLOT,attributes:[],name:"link-list",redundantAttribute:"expr110",selector:"[expr110]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr111",selector:"[expr111]"}]),name:"material-footer"},Nt=function(){function e(t){if(a(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 this[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=this[t.valid]||!1)}else t&&-1!=Object.keys(this.base).indexOf(this.type)&&(this.validationType="Type")}return o(e,[{key:"base",get:function(){return{email:/^(([\w\.\-_]+)@[\w\-\_]+(\.\w+){1,}|)$/i,number:/^(\d+|)$/i,tel:/^((\+|\d)?([\d\-\(\)\#])|)+$/i,url:/([--:\w?@%&+~#=]*\.[a-z]{2,4}\/{0,2})((?:[?&](?:\w+)=(?:\w+))+|[--:\w?@%&+~#=]+)?/i}}},{key:"validate",value:function(e){return!this.validationType||this["validateBy"+this.validationType](e)}},{key:"validateByFunction",value:function(e){if(this.validationFunction)return this.validationFunction(e)}},{key:"validateByRegexp",value:function(e){if(this.validationRegexp)return this.validationRegexp.test(e)}},{key:"validateByType",value:function(e){return this.base[this.type].test(e)}}]),e}(),It={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},onMounted(){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 Nt(this.props),this.update({showIcon:!1,value:this.props.value||"",disabled:""===this.props.disabled||this.props.disabled||!1,required:""===this.props.required||this.props.required||!1}),this.$("input").addEventListener("focus",this.changeFocus),this.$("input").addEventListener("blur",this.changeFocus)},onBeforeUpdate(e,t){this.state.error=0!==t.value.length&&!this.validator.validate(t.value)},changeFocus(e){if(this.disabled)return!1;this.update({focused:this.$("input")==document.activeElement}),this.props.focuschanged&&"function"==typeof this.props.focuschanged&&this.props.focuschanged(this.focused,e)},changeValue(e){this.update({value:this.$("input").value}),this.props.valuechanged&&"function"==typeof this.props.valuechanged&&this.props.valuechanged(this.$("input").value,e)},iconClickHandler(e){this.props.iconclicked&&"function"==typeof this.props.iconclicked&&this.props.iconclicked.call(this,e)}},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr112",selector:"[expr112]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["input-content ",e.state.value?"not-empty":null," ",e.state.error?"error":null].join("")}]},{type:n.IF,evaluate:e=>e.props.label,redundantAttribute:"expr113",selector:"[expr113]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.label}]}])},{redundantAttribute:"expr114",selector:"[expr114]",expressions:[{type:t.ATTRIBUTE,name:"type",evaluate:e=>e.props.type||"text"},{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>e.state.disabled},{type:t.ATTRIBUTE,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,name:"required",evaluate:e=>e.state.required}]},{type:n.IF,evaluate:e=>e.props.icon,redundantAttribute:"expr115",selector:"[expr115]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'',bindings:[{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr117",selector:"[expr117]"}]}],attributes:[{type:t.ATTRIBUTE,name:"waves-color",evaluate:e=>e.props["waves-color"]||"#fff"},{type:t.EVENT,name:"onclick",evaluate:e=>e.iconClickHandler},{type:t.ATTRIBUTE,name:"waves-opacity",evaluate:e=>e.props["waves-opacity"]||"0.6"},{type:t.ATTRIBUTE,name:"waves-duration",evaluate:e=>e.props["waves-duration"]||"600"}],redundantAttribute:"expr116",selector:"[expr116]"}])},{redundantAttribute:"expr118",selector:"[expr118]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["underline ",e.state.focused?"focused":null," ",e.state.error?"error":null].join("")}]}]),name:"material-input"},Rt={css:null,exports:{state:{transition:!1,opened:!1},onMounted(e,t){},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){const n=this.$(".content");if(n)for(let e=0;ee('
    ',[{type:n.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr120",selector:"[expr120]",template:e('
    ',[{redundantAttribute:"expr121",selector:"[expr121]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]},{redundantAttribute:"expr122",selector:"[expr122]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["popup ",e.state.transition?"opening":""," ",e.props.animation||"top"].join("")}]},{type:n.SLOT,attributes:[],name:"title",redundantAttribute:"expr123",selector:"[expr123]"},{type:n.SLOT,attributes:[],name:"content",redundantAttribute:"expr124",selector:"[expr124]"},{type:n.SLOT,attributes:[],name:"action",redundantAttribute:"expr125",selector:"[expr125]"}])}]),name:"material-popup"},kt={css:null,exports:{state:{toasts:{}},onBeforeUpdate(e,t){e.message&&!t.internal&&this.addToast({message:e.message,isError:e.isError},e.duration),t.internal=!1},addToast(e,t){var n=this.toastID=Math.random().toString(36).substring(7);this.state.toasts[n]=Object.assign(e,{opening:!0}),setTimeout((()=>{this.state.toasts[n].opening=!1,this.update({toasts:this.state.toasts,internal:!0})}),50),this.state.toasts[n].interval=setTimeout((()=>{this.removeToast(n)}),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,n,r)=>e('
    ',[{type:n.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,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)}]}]),redundantAttribute:"expr132",selector:"[expr132]",itemName:"toastID",indexName:null,evaluate:e=>Object.keys(e.state.toasts)}]),name:"material-snackbar"},Ut={css:null,exports:{state:{selected:0},onMounted(e,t){const n=this.$(".line");this.$$("material-button").forEach((e=>{e.style.width=(100/this.props.tabs.length).toFixed(2)+"%",n&&(n.style.width=e.style.width)})),this.setLinePosition()},onTabChanged(e,t){this.update({selected:t}),this.setLinePosition(),"function"==typeof this.props.onTabChanged&&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+"%")},cut:e=>e.length>props.cut?e.substr(0,props.cut)+"...":e},template:(e,t,n,r)=>e('
    ',[{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'
    ',bindings:[{redundantAttribute:"expr135",selector:"[expr135]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.cut?e.cut(e.tab.title):e.tab.title},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.tab.title}]}]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>t=>e.onTabChanged(t,e.k)},{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.state.selected==e.k?"selected":""},{type:t.ATTRIBUTE,name:"waves-opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,name:"waves-duration",evaluate:e=>e.props.wavesDuration},{type:t.ATTRIBUTE,name:"waves-center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,name:"waves-color",evaluate:e=>e.props.wavesColor}]}]),redundantAttribute:"expr134",selector:"[expr134]",itemName:"tab",indexName:"k",evaluate:e=>e.props.tabs},{type:n.IF,evaluate:e=>e.props.useLine,redundantAttribute:"expr136",selector:"[expr136]",template:e('
    ',[])},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr137",selector:"[expr137]"}]),name:"material-tabs"},Ot=function(e){l(i,e);var t,n,r=(t=i,n=c(),function(){var e,r=u(t);if(n){var a=u(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return m(this,e)});function i(e,t,n){var o;return a(this,i),o=r.call(this),e||console.error("You should set container to the wave!"),o.container=e,o.maxOpacity=t.opacity||.6,o.duration=t.duration||750,o.color=t.color||"#fff",o.center=t.center||!1,o.event=n,o.containerBound=o.receiveBound(),o.maxScale=o.containerBound.size/100*10,o.created=Date.now(),o.start={},o.createNode(),o.waveIn(),o}return o(i,[{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,n=Date.now()-this.created,r=Math.round(this.duration/2)-n;setTimeout((function(){t.setStyles(0),setTimeout((function(){t.wave.parentNode===t.container&&(t.container.removeChild(t.wave),e())}),t.duration)}),r>0?r: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(n){e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";")})),t}}]),i}(function(){function e(){a(this,e)}return o(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"!==n(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 n in e)n in t||(t[n]=e[n]);return t}}]),e}()),Bt={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new Ot(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,n,r)=>e('
    ',[{redundantAttribute:"expr138",selector:"[expr138]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"};function St(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:o}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,a=void 0===r?"./":r,i="[^"+Lt(t.delimiter||"/#?")+"]+?",o=[],s=0,l=0,u="",p=function(e){if(l-1:void 0===b;a||(m+="(?:"+d+"(?="+c+"))?"),T||(m+="(?="+d+"|"+c+")")}return new RegExp(m,Dt(n))}(St(e,n),t,n)}function _t(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,a=n.exec(e.source);a;)t.push({name:a[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),a=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return _t(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",Dt(n))}(e,t,n):jt(e,t,n)}!function(e){var t=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),o=new k(r||[]);return i._invoke=function(e,t,n){var r=d;return function(a,i){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===a)throw i;return O()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=N(o,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?g:m,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=g,n.method="throw",n.arg=l.arg)}}}(e,n,o),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d="suspendedStart",m="suspendedYield",h="executing",g="completed",f={};function v(){}function y(){}function x(){}var b={};u(b,o,(function(){return this}));var T=Object.getPrototypeOf,E=T&&T(T(U([])));E&&E!==r&&a.call(E,o)&&(b=E);var A=x.prototype=v.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,l){var u=c(e[i],e,o);if("throw"!==u.type){var p=u.arg,d=p.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var i;this._invoke=function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}}function N(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var a=c(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function U(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:U(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var Mt=Symbol();function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;a',[{type:n.IF,evaluate:function(e){return e.state.route},redundantAttribute:"expr0",selector:"[expr0]",template:e('',[{type:n.SLOT,attributes:[{type:t.ATTRIBUTE,name:"route",evaluate:function(e){return e.state.route}}],name:"default",redundantAttribute:"expr1",selector:"[expr1]"}])}])},name:"route-hoc"},cn=function(){return dn()||global},dn=function(){return"undefined"==typeof window?null:window},mn=function(){return"undefined"==typeof document?null:document},hn=function(){var e=dn();return e?e.location:{}},gn=(ln=cn()).requestAnimationFrame||ln.setTimeout,fn=function(){var e=cn();return e.cancelAnimationFrame||e.clearTimeout}(),vn="popstate",yn="click",xn="/",bn=/^.+?\/\/+[^/]+/,Tn=function(e){return e[e.length-1]===xn?e.substr(0,e.length-1):e},En=function(e){var t,n=dn().location,r=n?"".concat(n.protocol,"//").concat(n.host):"",a=(n||{}).pathname;switch(!0){case!1===Boolean(e):return Tn("".concat(r).concat(a||""));case/(www|http(s)?:)/.test(e):return e;case"#"===e[0]:return"".concat(r).concat(a&&a!==xn?a:"").concat(e);case e===xn:return Tn(r);default:return Tn("".concat(r).concat((t=e)[0]===xn?t:"".concat(xn).concat(t)))}};function An(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function wn(e,t,n,r,a){var i;e=An(e),(i=t,i.split(/\s/)).forEach((function(t){e.forEach((function(e){return e[r](t,n,a||!1)}))}))}function Cn(e,t,n,r){return wn(e,t,n,"addEventListener",r),e}function Nn(e,t,n,r){return wn(e,t,n,"removeEventListener",r),e}var In=function(e){return 1===e.length?e[0]:e};function Rn(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return In(An(e).map((function(e){return In(r.map((function(t){return e[n](t)})))})))}(e,t,"hasAttribute")}var kn=function(){return Yt.push(Ln(String(hn().href)))},Un=function(e){var t=e.includes(Qt.base)?e:Qt.base+e,n=hn(),r="undefined"==typeof history?null:history,a=mn();r&&t!==n.href&&r.pushState(null,a.title,t)},On=function e(t){return t&&!Bn(t)?e(t.parentNode):t},Bn=function(e){return"A"===e.nodeName},Sn=function(e){return!e||!Bn(e)||Rn(e,"download")||!Rn(e,"href")||function(e){return e.target&&"_self"!==e.target}(e)||-1===e.href.indexOf(hn().href.match(bn)[0])},Ln=function(e){return e.replace(Qt.base,"")},Dn=function(e){if(!function(e){return e.which&&1!==e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented}(e)){var t=On(e.target);if(!Sn(t)&&!function(e){return e.split("#").length>1}(t.href)&&function(e){return!Qt.base||e.includes(Qt.base)}(t.href)){var n=Ln(t.href);Yt.push(n),e.preventDefault()}}};var jn,_n="base",Mn=bt.DOMBindings,Pn=Mn.template,Gn=Mn.bindingTypes,Vn=!1,$n={css:null,exports:(jn=function(e){var t=e.slots,n=e.attributes,r=e.props;Vn&&function(e){throw new Error(e)}("Multiple components are not supported");var a=function(e){return n&&n.find((function(t){return t.name.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))===e}))};return{slot:null,el:null,teardown:null,mount:function(e,t){var n,r,i,o=this,s=a("initialRoute"),l=s?s.evaluate(t):null,u=on();Vn=!0,this.el=e,this.teardown=(n=this.root,r=dn(),i=n||mn(),r&&(Cn(r,vn,kn),Cn(i,yn,Dn)),Yt.on.value(Un),function(){r&&(Nn(r,vn,kn),Nn(i,yn,Dn)),Yt.off.value(Un)}),this.setBase(t),u&&!l?this.createSlot(t):(Yt.on.value((function e(){o.createSlot(t),Yt.off.value(e)})),Yt.push(l||window.location.href))},createSlot:function(e){if(t&&t.length){var n=a("onStarted");this.slot=Pn(null,[{type:Gn.SLOT,name:"default"}]),this.slot.mount(this.el,{slots:t},e),n&&n.evaluate(e)(on())}},update:function(e){var t=this;this.setBase(e),this.slot&&(fn(this.deferred),this.deferred=gn((function(){t.slot.update({},e)})))},unmount:function(){var e;this.teardown(),Vn=!1,this.slot&&(e=this.slot).unmount.apply(e,arguments)},getBase:function(e){var t=a(_n);return t?this.el.getAttribute(_n)||t.evaluate(e):"/"},setBase:function(e){var t;t=r?r.base:this.getBase(e),Qt.base=En(t)}}},me(jn)||xe('riot.pure accepts only arguments of type "function"'),jn[Y]=!0,jn),template:null,name:"router-hoc"},zn="registryServer";function Hn(e){if(null==e||isNaN(e))return"?";if(0===e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)));return Math.ceil(e/Math.pow(1024,t))+" "+["Bytes","KB","MB","GB","TB"][t]}function Fn(e,t,n){return n||(n=100),e?e.slice((t-1)*n,n*t):[]}function qn(e,t){return t||(t=100),e?Math.trunc(e.length/t)+1:0}function Kn(e){return e?e.replace(/^https?:\/\//,""):""}function Wn(e){return e>="0"&&e<="9"}var Xn={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 Yn(e){try{var t=JSON.parse(localStorage.getItem(zn));if(t instanceof Array)return isNaN(e)?t.map((function(e){return e.trim().replace(/\/*$/,"")})):t[e]}catch(e){}return isNaN(e)?[]:""}function Qn(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(zn,JSON.stringify(e))}function Jn(e){var t=e.trim().replace(/\/*$/,""),n=Yn().filter((function(e){return e!==t}));return Qn([t].concat(n)),t}function Zn(e){if(e)return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)}function er(e){return!0===e||"true"===e}function tr(){var e={};return window.location.search.slice(1).split("&").forEach((function(t){var n=t.indexOf("=");e[t.slice(0,n)]=n<0?"":t.slice(n+1)})),e}function nr(e){var t=tr();for(var n in e)null===e[n]?delete t[n]:t[n]=e[n];return t}function rr(e){var t=[];for(var n in e)n&&void 0!==e[n]&&t.push("".concat(n,"=").concat(e[n]));return 0===t.length?"":"?".concat(t.join("&"))}function ar(e){var t=window.location,n=nr(e);return t.origin+t.pathname+rr(n)}var ir={home:function(){Yt.push(ar({page:null}))},taglist:function(e){Yt.push("".concat(ar({page:null}),"#!/taglist/").concat(e))},getTagListImage:function(){return on().replace(/^.*(#!)?\/?taglist\//,"")},history:function(e,t){Yt.push("".concat(ar({page:null}),"#!/taghistory/image/").concat(e,"/tag/").concat(t))},getTagHistoryImage:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$2")},getTagHistoryTag:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$3")},updateQueryString:function(e){var t=rr(nr(e));history.pushState(null,"",t+window.location.hash)},updateUrlQueryParam:function(e){this.updateQueryString({url:Zn(e)})},getUrlQueryParam:function(){var e=tr().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 tr().page}},or=function(){function e(t){a(this,e),this.oReq=new XMLHttpRequest,this.oReq.hasHeader=sr,this.oReq.getErrorMessage=lr,this._events={},this._headers={},this.onAuthentication=t&&t.onAuthentication,this.withCredentials=t&&t.withCredentials}return o(e,[{key:"getContentDigest",value:function(e){this.oReq.hasHeader("Docker-Content-Digest")?e(this.oReq.getResponseHeader("Docker-Content-Digest")):window.crypto&&window.TextEncoder&&crypto.subtle.digest("SHA-256",(new TextEncoder).encode(this.oReq.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(t,n){this._events[t]=n;var r=this;switch(t){case"loadend":r.oReq.addEventListener("loadend",(function(){if(401!==this.status||this.withCredentials)n.bind(this)();else{var t=this.hasHeader("www-authenticate")&&pr(this.getResponseHeader("www-authenticate"));r.onAuthentication(t,(function(t){var n=new XMLHttpRequest;for(var a in n._url=r._url,n.open(r._method,r._url),r._events)n.addEventListener(a,r._events[a]);for(var i in r._headers)n.setRequestHeader(i,r._headers[i]);t&&t.token?n.setRequestHeader("Authorization","Bearer ".concat(t.token)):n.withCredentials=!0,n.hasHeader=sr,n.getErrorMessage=e.getErrorMessage,r.oReq=n,n.send()}))}}));break;case"load":r.oReq.addEventListener("load",(function(){401!==this.status&&n.bind(this)()}));break;default:r.oReq.addEventListener(t,(function(){n.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(){this.oReq.send()}}]),e}(),sr=function(e){return this.getAllResponseHeaders().split("\n").some((function(t){return new RegExp("^"+e+":","i").test(t)}))},lr=function(){return this._url.match("^http://")&&"https:"===window.location.protocol?"Mixed Content: The page at `"+window.location.origin+"` was loaded over HTTPS, but requested an insecure server endpoint `"+new URL(this._url).origin+"`. This request has been blocked; the content must be served over HTTPS.":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+"`":"Incorrect server endpoint."},ur=r(/Bearer realm="([^"]+)",service="([^"]+)",scope="([^"]+)"/,{realm:1,service:2,scope:3}),pr=function(e){var t=ur.exec(e);return t&&t.groups};function cr(e,t){return!e||t&&t.toLowerCase().indexOf(e)>=0}var dr,mr,hr,gr,fr,vr,yr,xr,br={css:'search-bar material-input,[is="search-bar"] material-input{ position: absolute; top: 0em; right: 64px; max-width: 20%; } @media screen and (max-width: 400px) { search-bar material-input,[is="search-bar"] material-input{ display: none; } } search-bar material-input input,[is="search-bar"] material-input input{ color: #fff; }',exports:{onMounted(e,t){const n=this.$("input");let r="";const a=()=>{r!==n.value&&e.onSearch(n.value.toLowerCase()),r=n.value};n.addEventListener("keyup",a),Yt.on.value((()=>{n.value="",a()})),window.addEventListener("keydown",(e=>{if(114===e.keyCode||e.ctrlKey&&70===e.keyCode){if(document.activeElement===n)return!0;e.preventDefault(),n.focus()}}))}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-input",slots:[],attributes:[],redundantAttribute:"expr14",selector:"[expr14]"}]),name:"search-bar"},Tr={css:null,exports:{components:{CatalogElement:{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),e.showCatalogNbTags&&t.image&&this.getNbTags(e,t)},onBeforeUpdate(e,t){e.filterResults&&t.images?t.nImages=t.images.filter((t=>cr(e.filterResults,t))).length:t.nImages=t.images&&t.images.length},onClick(){const e=this.state;e.repo?(this.update({expanded:!this.state.expanded,expanding:!0}),setTimeout((()=>{this.update({expanding:!1})}),50)):ir.taglist(e.image)},getNbTags(e,t){const n=this,r=new or({onAuthentication:e.onAuthentication});r.addEventListener("load",(function(){if(200===this.status){const e=(JSON.parse(this.responseText).tags||[]).length;n.update({nbTags:e})}else 404===this.status?e.onNotify("Server not found",!0):e.onNotify(this.responseText,!0)})),r.addEventListener("error",(function(){e.onNotify(this.getErrorMessage(),!0)})),r.open("GET",e.registryUrl+"/v2/"+t.image+"/tags/list"),r.send()},matchSearch:cr},template:(e,t,n,r)=>e('
    ',[{type:n.IF,evaluate:e=>!e.props.filterResults||e.state.nImages>0||e.matchSearch(e.props.filterResults,e.state.image),redundantAttribute:"expr45",selector:"[expr45]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'send
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-waves",slots:[],attributes:[],redundantAttribute:"expr47",selector:"[expr47]"},{redundantAttribute:"expr48",selector:"[expr48]",expressions:[{type:t.TEXT,childNodeIndex:1,evaluate:e=>[e.state.image||e.state.repo].join("")}]},{type:n.IF,evaluate:e=>e.state.images,redundantAttribute:"expr49",selector:"[expr49]",template:e(' expand_more',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images"].join("")}]},{redundantAttribute:"expr50",selector:"[expr50]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["material-icons animated ",e.state.expanded?"expanded":""].join("")}]}])},{type:n.IF,evaluate:e=>e.props.showCatalogNbTags&&e.state.image,redundantAttribute:"expr51",selector:"[expr51]",template:e(' ',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nbTags," tags"].join("")}]}])}]}],attributes:[{type:t.ATTRIBUTE,name:"expanded",evaluate:e=>e.state.expanded},{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}],redundantAttribute:"expr46",selector:"[expr46]"},{type:n.EACH,getKey:null,condition:e=>e.state.images,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,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,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags},{type:t.ATTRIBUTE,name:"class",evaluate:e=>["animated ",e.state.expanded||e.props.filterResults?"":"hide"," ",e.state.expanding?"expanding":""].join("")},{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item}]}]),redundantAttribute:"expr52",selector:"[expr52]",itemName:"item",indexName:null,evaluate:e=>e.state.images}])}]),name:"catalog-element"}},state:{registryName:"",length:0,loadend:!1,repositories:[],registryUrl:""},onBeforeMount(e){this.state.registryName=e.registryName,this.state.catalogElementsLimit=e.catalogElementsLimit},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 n=[];const r=this,a=new or({onAuthentication:this.props.onAuthentication});a.addEventListener("load",(function(){200===this.status?(n=JSON.parse(this.responseText).repositories||[],n.sort(),n=n.reduce((function(e,t){const n=t.indexOf("/");if(n>0){const r=t.substring(0,n)+"/";return 0!==e.length&&e[e.length-1].repo==r||e.push({repo:r,images:[]}),e[e.length-1].images.push(t),e}return e.push(t),e}),[])):404===this.status?r.props.onNotify("Server not found",!0):r.props.onNotify(this.responseText)})),a.addEventListener("error",(function(){r.props.onNotify(this.getErrorMessage(),!0)})),a.addEventListener("loadend",(function(){r.update({repositories:n,nRepositories:n.length,nImages:n.reduce(((e,t)=>e+(t.images&&t.images.length||1)),0),loadend:!0})})),a.open("GET",`${e.registryUrl}/v2/_catalog?n=${t.catalogElementsLimit}`),a.send()}},template:(e,t,n,r)=>e('
    ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

    ',bindings:[{redundantAttribute:"expr16",selector:"[expr16]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Repositories of ",e.state.registryName].join("")}]},{redundantAttribute:"expr17",selector:"[expr17]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images in ",e.state.nRepositories," repositories"].join("")}]}]}],attributes:[],redundantAttribute:"expr15",selector:"[expr15]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr18",selector:"[expr18]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr19",selector:"[expr19]"}])},{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,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,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags}]}]),redundantAttribute:"expr20",selector:"[expr20]",itemName:"item",indexName:null,evaluate:e=>e.state.repositories}]),name:"catalog"},Er={exports:{}};dr=Er,mr="*",hr=Object.defineProperties,gr=Object.entries,fr=function(e,t){return function(n,r){return e.has(n)?e.get(n).add(r):e.set(n,(new Set).add(r)),t}},vr=function(e,t){return function(n,r){return n!==mr||r?function(e,t,n,r){if(r){var a=e.get(n);a&&(a.delete(r),0===a.size&&e.delete(n))}else e.delete(n)}(e,0,n,r):e.clear(),t}},yr=function(e,t){return function(e,n){return t.on(e,(function r(){t.off(e,r);for(var a=arguments.length,i=new Array(a),o=0;o1?r-1:0),i=1;i0&&Wn(e[e.length-1].charAt(0))==Wn(t)?e[e.length-1]+=t:e.push(t),e};function Cr(e,t){for(var n=e.tag.match(/./g).reduce(wr,[]),r=t.tag.match(/./g).reduce(wr,[]),a=0;a{this.update({digest:e})}))},onMounted(e,t){e.image.trigger("get-content-digest")},onBeforeUpdate(e,t){t.checked=e.checked},deleteImage(){this.props.handleCheckboxChange(Ur,this.props.image)},handleCheckboxChange(e){const t=e?Rr:kr;this.props.handleCheckboxChange(t,this.props.image)}},template:(e,t,n,r)=>e('',[{type:n.IF,evaluate:e=>!e.props.multiDelete,redundantAttribute:"expr146",selector:"[expr146]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>!e.state.digest},{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImage}]}])},{type:n.IF,evaluate:e=>e.props.multiDelete,redundantAttribute:"expr147",selector:"[expr147]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>!e.state.digest},{type:t.EVENT,name:"onChange",evaluate:e=>e.handleCheckboxChange},{type:t.ATTRIBUTE,name:"checked",evaluate:e=>e.state.checked}]}])}]),name:"remove-image"};const Rr="CHECK",kr="UNCHECK",Ur="DELETE";const Or=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}},Br=function(e,t){return Or(e.key)-Or(t.key)},Sr=function(e,t){switch(e){case"created":return new Date(t).toLocaleString();case"created_by":const e=t.match(/\/bin\/sh *-c *#\(nop\) *([A-Z]+)/);return e&&e[1]||"RUN";case"size":return Hn(t);case"Entrypoint":case"Cmd":return(t||[]).join(" ");case"Labels":return Object.keys(t||{}).map((function(e){return t[e]?e+"="+t[e]:""}));case"Volumes":case"ExposedPorts":return Object.keys(t)}return t||""};var Lr={css:null,exports:{components:{Catalog:Tr,TagList:{css:null,exports:{components:{Pagination:{css:null,exports:null,template:(e,t,n,r)=>e('
    ',[{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'
    ',bindings:[{type:n.IF,evaluate:e=>e.p.icon,redundantAttribute:"expr54",selector:"[expr54]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.icon}]}])},{type:n.IF,evaluate:e=>!e.p.icon,redundantAttribute:"expr55",selector:"[expr55]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.page}]}])}]}],attributes:[{type:t.ATTRIBUTE,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=>()=>e.props.onPageUpdate(e.p.page)}]}]),redundantAttribute:"expr53",selector:"[expr53]",itemName:"p",indexName:null,evaluate:e=>e.props.pages}]),name:"pagination"},TagTable:{css:null,exports:{components:{ImageDate:{css:null,exports:{onMounted(e){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"],n=[1,60,3600,86400,2592e3,31104e3,1/0],r=(new Date-e)/1e3,a=0;a=r)return t[2*a];if(n[a+1]>r)return Math.floor(r/n[a])+" "+t[2*a+1]}}(e.creationDate)} ago`,getLocalDate:e=>e.ociImage?"unavailable on OCI index/Buildkit export cache":e.creationDate&&e.creationDate.toLocaleString()||"unknown"},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr140",selector:"[expr140]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getDate(e.props.image)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>["Creation date ",e.getLocalDate(e.props.image)].join("")}]}]),name:"image-date"},ImageSize:{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=>Hn(e.size)},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr139",selector:"[expr139]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getImageSize(e.props.image)}]}]),name:"image-size"},ImageTag:{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,n,r)=>e('
    ',[{redundantAttribute:"expr141",selector:"[expr141]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.image.tag},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.state.sha256}]}]),name:"image-tag"},ImageContentDigest:{css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){e.image.digest||(t.chars=-1,e.image.one("content-digest",(t=>{this.digest=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.digest||"",getDigest:(e,t)=>t>=70?e.digest||"":t<=0?"":e.digest&&e.digest.slice(0,t)+"..."},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr142",selector:"[expr142]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getDigest(e.props.image,e.state.chars)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.getTitle(e.props.image,e.state.chars)}]}]),name:"image-content-digest"},CopyToClipboard:{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.digest}`,load(e,t){"tag"===e.target||e.image.digest||(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(Xn)}},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr144",selector:"[expr144]",expressions:[{type:t.VALUE,evaluate:e=>e.getDockerCmd(e.props)}]},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'content_copy',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.copy}],redundantAttribute:"expr145",selector:"[expr145]"}]),name:"copy-to-clipboard"},RemoveImage:Ir,TagHistoryButton:{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(){this.props.image.ociImage||ir.history(this.props.image.name,this.props.image.tag)}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'history',bindings:[]}],attributes:[{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.buttonTittle()},{type:t.EVENT,name:"onClick",evaluate:e=>e.routeToHistory},{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>e.props.image.ociImage}],redundantAttribute:"expr143",selector:"[expr143]"}]),name:"tag-history-button"},ConfirmDeleteImage:{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 n=new Set;return e.forEach((e=>{e.digest&&n.add(e.digest)})),t.filter((e=>n.has(e.digest)))},deleteImages(){this.props.toDelete.forEach((e=>this.getContentDigestThenDelete(e,this.props)))},getContentDigestThenDelete({name:e,tag:t},n){const{registryUrl:r,onNotify:a,onAuthentication:i}=n,o=new or({onAuthentication:i}),s=this;o.addEventListener("loadend",(function(){200===this.status||202===this.status?o.getContentDigest((function(r){r?s.deleteImage({name:e,tag:t,digest:r},n):a(ERROR_CAN_NOT_READ_CONTENT_DIGEST)})):404===this.status?a(`Manifest for ${e}:${t} not found`,!0):a(this.responseText)})),o.open("GET",`${r}/v2/${e}/manifests/${t}`),o.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"),o.send()},deleteImage({name:e,tag:t,digest:n},r){const{registryUrl:a,ignoreError:i,onNotify:o,onAuthentication:s,onClick:l}=r,u=new or({onAuthentication:s});u.addEventListener("loadend",(function(){200===this.status||202===this.status?(ir.taglist(e),o(`Deleting ${e}:${t} image. Run \`registry garbage-collect config.yml\` on your registry`)):404===this.status?i||o({message:"Digest not found for this image in your registry.",isError:!0}):o(this.responseText),l()})),u.open("DELETE",`${a}/v2/${e}/manifests/${n}`),u.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json"),u.addEventListener("error",(function(){o({message:"An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].",isError:!0})})),u.send()}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
    These images will be deleted
    ',bindings:[]},{id:"content",html:'
    ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.image.name,":",e.image.tag].join("")}]}]),redundantAttribute:"expr149",selector:"[expr149]",itemName:"image",indexName:null,evaluate:e=>e.displayImagesToDelete(e.props.toDelete,e.props.tags)}]},{id:"action",html:'
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Delete\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}],redundantAttribute:"expr150",selector:"[expr150]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr151",selector:"[expr151]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr148",selector:"[expr148]"}]),name:"confirm-delete-image"}},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,t){if(!0===t.altKey){Fn(this.props.tags,this.props.page).filter((e=>cr(this.props.filterResults,e.tag))).forEach((e=>this.state.toDelete.add(e))),this.update({multiDelete:!0,toDelete:this.state.toDelete})}else this.update({multiDelete:e})},onRemoveImageChange(e,t){let n=!1,r=!1;switch(e){case Rr:this.state.toDelete.add(t);break;case kr:this.state.toDelete.delete(t);break;case Ur:this.state.toDelete.clear(),this.state.toDelete.add(t),n=!0,r=!0}this.update({toDelete:this.state.toDelete,confirmDeleteImage:n,singleDeleteAction:r})},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 n=Fn(e,t);return"date"===this.state.orderType?n.sort(((e,t)=>this.state.desc?e.creationDate.getTime()-t.creationDate.getTime():t.creationDate.getTime()-e.creationDate.getTime())):"size"===this.state.orderType&&n.sort(((e,t)=>this.state.desc?e.size-t.size:t.size-e.size)),n},matchSearch:cr},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"confirm-delete-image",slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.state.confirmDeleteImage},{type:t.EVENT,name:"on-click",evaluate:e=>e.onConfirmDeleteImageClick},{type:t.ATTRIBUTE,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,name:"tags",evaluate:e=>e.props.tags},{type:t.ATTRIBUTE,name:"to-delete",evaluate:e=>e.state.toDelete}],redundantAttribute:"expr56",selector:"[expr56]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'
    \n Creation date\n \n Size\n \n Tag\n History
    ',bindings:[{redundantAttribute:"expr58",selector:"[expr58]",expressions:[{type:t.ATTRIBUTE,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:"expr59",selector:"[expr59]",expressions:[{type:t.ATTRIBUTE,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:n.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr60",selector:"[expr60]",template:e("Content Digest",[])},{redundantAttribute:"expr61",selector:"[expr61]",expressions:[{type:t.ATTRIBUTE,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:n.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr62",selector:"[expr62]",template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["remove-tag ",e.state.toDelete.size>0&&!e.state.singleDeleteAction?"delete":""].join("")}]},{type:n.IF,evaluate:e=>0===e.state.toDelete.size||e.state.singleDeleteAction,redundantAttribute:"expr63",selector:"[expr63]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,name:"checked",evaluate:e=>e.state.multiDelete},{type:t.EVENT,name:"onChange",evaluate:e=>e.onRemoveImageHeaderChange}]}])},{type:n.IF,evaluate:e=>e.state.toDelete.size>0&&!e.state.singleDeleteAction,redundantAttribute:"expr64",selector:"[expr64]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}]}])}])},{type:n.EACH,getKey:null,condition:e=>e.matchSearch(e.props.filterResults,e.image.tag),template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"image-date",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr66",selector:"[expr66]"},{type:n.TAG,getComponent:r,evaluate:e=>"image-size",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr67",selector:"[expr67]"},{type:n.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr68",selector:"[expr68]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"image-content-digest",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr69",selector:"[expr69]"},{type:n.TAG,getComponent:r,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr70",selector:"[expr70]"}])},{type:n.TAG,getComponent:r,evaluate:e=>"image-tag",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr71",selector:"[expr71]"},{type:n.TAG,getComponent:r,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr72",selector:"[expr72]"},{type:n.TAG,getComponent:r,evaluate:e=>"tag-history-button",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr73",selector:"[expr73]"},{type:n.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr74",selector:"[expr74]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"remove-image",slots:[],attributes:[{type:t.ATTRIBUTE,name:"multi-delete",evaluate:e=>e.state.multiDelete},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,name:"handleCheckboxChange",evaluate:e=>e.onRemoveImageChange},{type:t.ATTRIBUTE,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:"expr75",selector:"[expr75]"}])}]),redundantAttribute:"expr65",selector:"[expr65]",itemName:"image",indexName:null,evaluate:e=>e.getPage(e.props.tags,e.props.page)}]}],attributes:[],redundantAttribute:"expr57",selector:"[expr57]"}]),name:"tag-table"}},onBeforeMount(e){this.state={registryName:e.registryName,tags:[],loadend:!1,asc:!0,page:ir.getPageQueryParam()||1}},onMounted(e,t){this.display(e,t),window.addEventListener("resize",this.onResize),window.requestAnimationFrame(this.onResize)},display(e,t){t.tags=[];const n=this,r=new or({onAuthentication:e.onAuthentication});r.addEventListener("load",(function(){if(200===this.status){const r=(JSON.parse(this.responseText).tags||[]).map((t=>new Nr(e.image,t,{registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}))).sort(Cr);window.requestAnimationFrame(n.onResize),n.update({page:Math.min(t.page,qn(r)),tags:r})}else 404===this.status?n.props.onNotify("Server not found",!0):n.props.onNotify(this.responseText,!0)})),r.addEventListener("error",(function(){n.props.onNotify(this.getErrorMessage(),!0),t.tags=[]})),r.addEventListener("loadend",(function(){n.update({loadend:!0})})),r.open("GET",e.registryUrl+"/v2/"+e.image+"/tags/list"),r.send(),t.asc=!0},onPageUpdate(e){this.update({page:e}),ir.updatePageQueryParam(e)},onResize(){const e=window.innerWidth;let t=0;const n=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,n>20&&(t-=n-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(Cr),this.state.asc=!0),this.update()},getPageLabels:function(e,t){var n=[],r=10;if(1===t)return n;1!==e&&t>=r&&(n.push({icon:"first_page",page:1}),n.push({icon:"chevron_left",page:e-1}));for(var a=Math.round(Math.max(1,Math.min(e-5,t-r+1))),i=a;ir,"space-right":e===t&&t>r});return e!==t&&t>=r&&(n.push({icon:"chevron_right",page:e+1}),n.push({icon:"last_page",page:t})),n},getNumPages:qn,router:ir},template:(e,t,n,r)=>e('
    ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'arrow_back',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.router.home}],redundantAttribute:"expr22",selector:"[expr22]"},{redundantAttribute:"expr23",selector:"[expr23]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Tags of ",e.props.image].join("")}]},{redundantAttribute:"expr24",selector:"[expr24]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Sourced from ",e.state.registryName+"/"+e.props.image].join("")}]},{redundantAttribute:"expr25",selector:"[expr25]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.tags.length," tags"].join("")}]}]}],attributes:[],redundantAttribute:"expr21",selector:"[expr21]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr26",selector:"[expr26]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr27",selector:"[expr27]"}])},{type:n.TAG,getComponent:r,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr28",selector:"[expr28]"},{type:n.IF,evaluate:e=>e.state.loadend,redundantAttribute:"expr29",selector:"[expr29]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"tag-table",slots:[],attributes:[{type:t.ATTRIBUTE,name:"tags",evaluate:e=>e.state.tags},{type:t.ATTRIBUTE,name:"asc",evaluate:e=>e.state.asc},{type:t.ATTRIBUTE,name:"page",evaluate:e=>e.state.page},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:e=>e.props.showContentDigest},{type:t.ATTRIBUTE,name:"is-image-remove-activated",evaluate:e=>e.props.isImageRemoveActivated},{type:t.EVENT,name:"onReverseOrder",evaluate:e=>e.onReverseOrder},{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication}]}])},{type:n.TAG,getComponent:r,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr30",selector:"[expr30]"}]),name:"tag-list"},TagHistory:{css:null,exports:{components:{TagHistoryElement:{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{ background-size: 24px auto; background-image: url(\'images/docker-logo.svg\'); background-repeat: no-repeat; } 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 p,[is="tag-history-element"] .headline p{ font-weight: bold; line-height: 20px; position: relative; display: inline; top: -4px; } 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":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";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)},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,n,r)=>e('

    ',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.state.key}]},{redundantAttribute:"expr89",selector:"[expr89]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.icon}]},{redundantAttribute:"expr90",selector:"[expr90]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.name}]},{type:n.IF,evaluate:e=>e.state.value,redundantAttribute:"expr91",selector:"[expr91]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.value}]}])},{type:n.EACH,getKey:null,condition:e=>e.state.values,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.value}]}]),redundantAttribute:"expr92",selector:"[expr92]",itemName:"value",indexName:null,evaluate:e=>e.state.values}]),name:"tag-history-element"}},onBeforeMount(e,t){t.elements=[],t.image=new Nr(e.image,e.tag,{list:!0,registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}),t.image.fillInfo()},onMounted(e,t){t.image.on("blobs",this.processBlobs),t.image.on("list",this.multiArchList)},onTabChanged(e,t){const n=this.state,{registryUrl:r,onNotify:a}=this.props;if(n.elements=[],n.image.variants[t]=n.image.variants[t]||new Nr(this.props.image,e.digest,{list:!1,registryUrl:r,onNotify:a}),n.image.variants[t].blobs)return this.processBlobs(n.image.variants[t].blobs);n.image.variants[t].fillInfo(),n.image.variants[t].on("blobs",this.processBlobs)},processBlobs(e){this.state;const{historyCustomLabels:t}=this.props;function n(e){const t=[];for(var n in e)if(e.hasOwnProperty(n)&&"empty_layer"!=n){const r=e[n],a={key:n,value:Sr(n,r)};t.push(a)}return t.sort(Br)}const r=new Array(e.history.length+1);r[0]=n(function(e,{historyCustomLabels:t}){const n=["architecture","User","created","docker_version","os","Cmd","Entrypoint","Env","Labels","User","Volumes","WorkingDir","author","id","ExposedPorts"].reduce((function(t,n){const r=e[n]||e.config[n];return r&&"architecture"===n&&e.variant?t[n]=r+e.variant:r&&(t[n]=r),t}),{});return!n.author&&n.Labels&&n.Labels.maintainer&&(n.author=e.config.Labels.maintainer,delete n.Labels.maintainer),n.Labels&&t.filter((e=>n.Labels[e])).forEach((e=>{n[`custom-label-${e}`]=n.Labels[e],delete n.Labels[e]})),n}(e,{historyCustomLabels:t})),e.history.forEach((function(t,a){r[e.history.length-a]=n(t)})),this.update({elements:r,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(){ir.taglist(this.props.image)}},template:(e,t,n,r)=>e('
    ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

    history

    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'arrow_back',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.toTaglist}],redundantAttribute:"expr38",selector:"[expr38]"},{redundantAttribute:"expr39",selector:"[expr39]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["History of ",e.props.image,":",e.props.tag].join("")}]}]}],attributes:[],redundantAttribute:"expr37",selector:"[expr37]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr40",selector:"[expr40]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr41",selector:"[expr41]"}])},{type:n.IF,evaluate:e=>e.state.archs&&e.state.loadend,redundantAttribute:"expr42",selector:"[expr42]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-tabs",slots:[],attributes:[{type:t.ATTRIBUTE,name:"useLine",evaluate:e=>!0},{type:t.ATTRIBUTE,name:"tabs",evaluate:e=>e.state.archs},{type:t.EVENT,name:"onTabChanged",evaluate:e=>e.onTabChanged}]}])},{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'',bindings:[{type:n.EACH,getKey:null,condition:e=>e.entry.value&&e.entry.value.length>0,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"tag-history-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"entry",evaluate:e=>e.entry}]}]),redundantAttribute:"expr44",selector:"[expr44]",itemName:"entry",indexName:null,evaluate:e=>e.element}]}],attributes:[]}]),redundantAttribute:"expr43",selector:"[expr43]",itemName:"element",indexName:null,evaluate:e=>e.state.elements}]),name:"tag-history"},DialogsMenu:{css:'dialogs-menu > .container,[is="dialogs-menu"] > .container{ position: absolute; top: 0px; right: 16px; color: #000; list-style-type: disc; margin-block-start: 0.7em; } dialogs-menu .overlay,[is="dialogs-menu"] .overlay{ position: fixed; height: 100%; width: 100%; top: 0; right: 0; z-index: 10; } dialogs-menu material-button,[is="dialogs-menu"] material-button{ background: rgba(255, 255, 255, 0); float: right; z-index: 2; } dialogs-menu material-button .content i.material-icons,[is="dialogs-menu"] material-button .content i.material-icons{ color: #fff; font-size: 24px; } dialogs-menu material-dropdown-list,[is="dialogs-menu"] material-dropdown-list{ display: inline-block; position: relative; } dialogs-menu material-dropdown-list ul.dropdown-content,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content{ min-width: 156px; padding: 8px 0; margin: 0; } dialogs-menu material-dropdown-list ul.dropdown-content li span,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content li span{ font-size: 1rem; line-height: 1.2em; } 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:{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=Jn(e.value);ir.home(),this.props.onServerChange(t),this.props.onClose(),setTimeout((()=>ir.updateUrlQueryParam(t)),100)}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
    Add your Server ?
    ',bindings:[]},{id:"content",html:'
    Write your URL without /v2
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-input",slots:[],attributes:[{type:t.EVENT,name:"onkeyup",evaluate:e=>e.onKeyUp}],redundantAttribute:"expr77",selector:"[expr77]"}]},{id:"action",html:'
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Add\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.add}],redundantAttribute:"expr78",selector:"[expr78]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr79",selector:"[expr79]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr76",selector:"[expr76]"}]),name:"add-registry-url"},ChangeRegistryUrl:{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; line-height: 24px; height: 24px; border-bottom: 1px solid #2f6975; appearance: none; -moz-appearance: none; -webkit-appearance: none; margin: 1.5em 0; }',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 n=Jn(t.value);ir.home(),this.props.onServerChange(n),this.props.onClose(),setTimeout((()=>ir.updateUrlQueryParam(n)),100)},getRegistryServers:Yn},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
    Change your Server ?
    ',bindings:[]},{id:"content",html:'
    ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url},{type:t.ATTRIBUTE,name:"value",evaluate:e=>e.url}]}]),redundantAttribute:"expr86",selector:"[expr86]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()}]},{id:"action",html:'
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Change\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.change}],redundantAttribute:"expr87",selector:"[expr87]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr88",selector:"[expr88]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr85",selector:"[expr85]"}]),name:"change-registry-url"},RemoveRegistryUrl:{css:'remove-registry-url material-popup .popup material-button,[is="remove-registry-url"] material-popup .popup material-button{ margin-right: 1em; } remove-registry-url material-popup .popup material-button .content i.material-icons,[is="remove-registry-url"] material-popup .popup material-button .content i.material-icons{ color: #777; }',exports:{remove(e){const t=e.currentTarget.attributes.url&&e.currentTarget.attributes.url.value;var n;n=t,Qn(Yn().filter((function(e){return e!==n}))),setTimeout((()=>this.update()),100)},getRegistryServers:Yn},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
    Remove your Registry Server ?
    ',bindings:[]},{id:"content",html:'
    ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(' ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.remove},{type:t.ATTRIBUTE,name:"url",evaluate:e=>e.url}],redundantAttribute:"expr82",selector:"[expr82]"},{redundantAttribute:"expr83",selector:"[expr83]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url}]}]),redundantAttribute:"expr81",selector:"[expr81]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()}]},{id:"action",html:'
    ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Close\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr84",selector:"[expr84]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr80",selector:"[expr80]"}]),name:"remove-registry-url"}},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,t){this.update({[t.name]:!0,isDropdownOpened:!1})},onClose(e){return()=>{this.update({[e]:!1,isDropdownOpened:!1})}},onClick(){this.update({isDropdownOpened:!this.state.isDropdownOpened})}},template:(e,t,n,r)=>e('
    ',[{type:n.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr31",selector:"[expr31]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"add-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:n.TAG,getComponent:r,evaluate:e=>"change-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:"expr32",selector:"[expr32]"},{type:n.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr33",selector:"[expr33]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"remove-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'more_vert',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.onClick}],redundantAttribute:"expr34",selector:"[expr34]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-dropdown-list",slots:[],attributes:[{type:t.ATTRIBUTE,name:"items",evaluate:e=>e.dropdownItems.filter((t=>t.ro||!e.props.readOnlyRegistries))},{type:t.EVENT,name:"onSelect",evaluate:e=>e.onDropdownSelect},{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.state.isDropdownOpened}],redundantAttribute:"expr35",selector:"[expr35]"},{type:n.IF,evaluate:e=>e.state.isDropdownOpened,redundantAttribute:"expr36",selector:"[expr36]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])}]),name:"dialogs-menu"},SearchBar:br,Router:$n,Route:pn},onUpdated(e,t){t.snackbarIsError=!1,t.snackbarMessage=void 0},onBeforeMount(e){(e.defaultRegistries&&e.defaultRegistries.length>0&&0===Yn().length||er(e.readOnlyRegistries))&&Qn(e.defaultRegistries);const t=e.registryUrl||("true"===e.singleRegistry?void 0:ir.getUrlQueryParam()||Yn(0))||window.location.origin+window.location.pathname.replace(/\/+$/,"");this.state.registryUrl=t.replace(/\/$/,"").replace(/index(\.html?)?$/,""),this.state.name=e.name||Kn(e.registryUrl),this.state.catalogElementsLimit=e.catalogElementsLimit||1e5,this.state.pullUrl=this.pullUrl(this.state.registryUrl,e.pullUrl)},onServerChange(e){this.update({registryUrl:e,name:Kn(e),pullUrl:this.pullUrl(e),snackbarMessage:"Registry server changed to `"+e+"`."})},onAuthentication(e,t){if(e&&e.realm&&e.service&&e.scope){const{realm:n,service:r,scope:a}=e,i=new XMLHttpRequest;i.addEventListener("loadend",(()=>{try{const e=JSON.parse(i.responseText);t(e)}catch(e){this.notifySnackbar(`Failed to log in: ${e.message}`,!0)}})),i.open("GET",`${n}?service=${r}&scope=${a}`),i.send()}else t()},onAuthenticationClose(){this.update({authenticationDialogOpened:!1})},pullUrl:(e,t)=>Kn(t||e&&e.length>0&&e||window.location.host),notifySnackbar(e,t){"string"==typeof e?this.update({snackbarMessage:e,snackbarIsError:t||!1}):e&&e.message&&this.update({snackbarMessage:e.message,snackbarIsError:e.isError})},onSearch(e){this.update({filter:e})},baseRoute:"([^#]*?)/(\\?[^#]*?)?(#!)?(/?)",router:ir,version:"2.2.0",truthy:er,stringToArray:function(e){return e&&"string"==typeof e?e.split(","):[]}},template:(e,t,n,r)=>e('
    ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-navbar",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"search-bar",slots:[],attributes:[{type:t.EVENT,name:"on-search",evaluate:e=>e.onSearch}],redundantAttribute:"expr1",selector:"[expr1]"},{type:n.IF,evaluate:e=>"true"!==e.props.singleRegistry,redundantAttribute:"expr2",selector:"[expr2]",template:e(null,[{type:n.TAG,getComponent:r,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,name:"default-registries",evaluate:e=>e.props.defaultRegistries},{type:t.ATTRIBUTE,name:"read-only-registries",evaluate:e=>e.truthy(e.props.readOnlyRegistries)}]}])}]}],attributes:[],redundantAttribute:"expr0",selector:"[expr0]"},{type:n.TAG,getComponent:r,evaluate:e=>"router",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"catalog",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"catalog-elements-limit",evaluate:e=>e.state.catalogElementsLimit},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication},{type:t.ATTRIBUTE,name:"show-catalog-nb-tags",evaluate:e=>e.truthy(e.props.showCatalogNbTags)}],redundantAttribute:"expr5",selector:"[expr5]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>e.baseRoute}],redundantAttribute:"expr4",selector:"[expr4]"},{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"tag-list",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.router.getTagListImage()},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:e=>e.truthy(e.props.showContentDigest)},{type:t.ATTRIBUTE,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,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication}],redundantAttribute:"expr7",selector:"[expr7]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>[e.baseRoute,"taglist/(.*)"].join("")}],redundantAttribute:"expr6",selector:"[expr6]"},{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"tag-history",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.router.getTagHistoryImage()},{type:t.ATTRIBUTE,name:"tag",evaluate:e=>e.router.getTagHistoryTag()},{type:t.ATTRIBUTE,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,name:"history-custom-labels",evaluate:e=>e.stringToArray(e.props.historyCustomLabels)}],redundantAttribute:"expr9",selector:"[expr9]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>[e.baseRoute,"taghistory/(.*)"].join("")}],redundantAttribute:"expr8",selector:"[expr8]"}]}],attributes:[],redundantAttribute:"expr3",selector:"[expr3]"},{type:n.TAG,getComponent:r,evaluate:e=>"registry-authentication",slots:[],attributes:[{type:t.ATTRIBUTE,name:"realm",evaluate:e=>e.state.realm},{type:t.ATTRIBUTE,name:"scope",evaluate:e=>e.state.scope},{type:t.ATTRIBUTE,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,name:"opened",evaluate:e=>e.state.authenticationDialogOpened}],redundantAttribute:"expr10",selector:"[expr10]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-snackbar",slots:[],attributes:[{type:t.ATTRIBUTE,name:"message",evaluate:e=>e.state.snackbarMessage},{type:t.ATTRIBUTE,name:"is-error",evaluate:e=>e.state.snackbarIsError}],redundantAttribute:"expr11",selector:"[expr11]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-footer",slots:[{id:"logo",html:' ',bindings:[{redundantAttribute:"expr13",selector:"[expr13]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Docker Registry UI ",e.version].join("")}]}]},{id:"link-list",html:'',bindings:[]}],attributes:[],redundantAttribute:"expr12",selector:"[expr12]"}]),name:"docker-registry-ui"};xt("material-card",Et),xt("material-footer",Ct),xt("material-navbar",{css:null,exports:null,template:(e,t,n,r)=>e('',[{expressions:[{type:t.ATTRIBUTE,name:"role",evaluate:e=>"toolbar"}]},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr119",selector:"[expr119]"}]),name:"material-navbar"}),xt("material-spinner",{css:null,exports:null,template:(e,t,n,r)=>e('',[{redundantAttribute:"expr133",selector:"[expr133]",expressions:[{type:t.ATTRIBUTE,name:"stroke-width",evaluate:e=>e.props.strokewidth||3}]}]),name:"material-spinner"}),xt("material-button",Tt),xt("material-waves",Bt),xt("material-checkbox",At),xt("material-snackbar",kt),xt("material-tabs",Ut),xt("material-dropdown-list",wt),xt("material-popup",Rt),xt("material-input",It);for(var Dr,jr=(Dr=Lr,function(e,t,n){var r=void 0===n?{}:n,a=r.slots,i=r.attributes,o=r.parentScope;return function(){for(var e=arguments.length,t=new Array(e),n=0;ng-p)for(var y=n(e[u],0);p'.concat(e,""),"application/xml").documentElement,!0)}(t,e):function(e,t){var n=de(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}function $e(e,t){switch(!0){case ce(e):I(t,e);break;case de(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}var ze=Object.freeze({createDOM:function(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?Ve(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount:function(e,t,n,r){var a=this;if(void 0===r&&(r={}),!e)throw new Error("Please provide DOM node to mount properly your template");this.el&&this.unmount(t);var i=r,o=i.fragment,s=i.children,l=i.avoidDOMInjection,u=(s?s[0]:e).parentNode,p=de(e),c=p?function(e,t,n){var r=Array.from(e.childNodes);return Math.max(r.indexOf(t),r.indexOf(n.head)+1,0)}(u,e,r):null;this.createDOM(e);var d=o||this.dom.cloneNode(!0);return this.el=p?u:e,this.children=p?s||Array.from(d.childNodes):null,!l&&d&&$e(e,d),this.bindings=this.bindingsData.map((function(e){return Ge(a.el,e,c)})),this.bindings.forEach((function(e){return e.mount(t,n)})),this.meta=r,this},update:function(e,t){return this.bindings.forEach((function(n){return n.update(e,t)})),this},unmount:function(e,t,n){void 0===n&&(n=!1);var r=this.el;if(!r)return this;switch(this.bindings.forEach((function(r){return r.unmount(e,t,n)})),!0){case r[Y]||null===n:break;case Array.isArray(this.children):k(this.children);break;case!n:R(r);break;case!!n:U(r)}return this.el=null,this},clone:function(){return Object.assign({},this,{meta:{},el:null})}});function He(e,t){return void 0===t&&(t=[]),Object.assign({},ze,{html:e,bindingsData:t})}var Fe=Object.freeze({__proto__:null,template:He,createBinding:Ge,createExpression:Se,bindingTypes:ne,expressionTypes:re});function qe(){return this}function Ke(e){return me(e)?e.prototype&&e.prototype.constructor?new e:e():e}function We(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function Xe(e,t){return We("string"==typeof e?(t||document).querySelectorAll(e):e)}var Ye=function(e){return 1===e.length?e[0]:e};function Qe(e,t,r){var a="object"===n(t)?t:s({},t,r),i=Object.keys(a);return We(e).forEach((function(e){i.forEach((function(t){return e.setAttribute(t,a[t])}))})),e}function Je(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return Ye(We(e).map((function(e){return Ye(r.map((function(t){return e[n](t)})))})))}(e,t,"getAttribute")}var Ze,et=new Map,tt=function(){return Ze||(Qe(Ze=Xe("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ze.parentNode||document.head.appendChild(Ze),Ze)},nt={CSS_BY_NAME:et,add:function(e,t){return et.has(e)||(et.set(e,t),this.inject()),this},inject:function(){return tt().innerHTML=f(et.values()).join("\n"),this},remove:function(e){return et.has(e)&&(et.delete(e),this.inject()),this}};function rt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{this.props.link&&(window.location.href=this.props.link),"function"==typeof e&&e(t)}},onWaveStart(e){"function"==typeof this.props.onWaveStart&&this.props.onWaveStart(e)},onWaveEnd(e){"function"==typeof this.props.onWaveEnd&&this.props.onWaveEnd(e)}},template:(e,t,n,r)=>e('
    ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-waves",slots:[],attributes:[{type:t.ATTRIBUTE,name:"center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,name:"rounded",evaluate:e=>e.props.rounded},{type:t.ATTRIBUTE,name:"opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,name:"color",evaluate:e=>e.props.wavesColor},{type:t.ATTRIBUTE,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}],redundantAttribute:"expr93",selector:"[expr93]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr94",selector:"[expr94]"}]),name:"material-button"},Et={css:null,exports:{state:{titleExist:!0},onMounted(e,t){const n=this.$(".title");n.children&&0!==n.children.length||this.update({titleExist:!1})}},template:(e,t,n,r)=>e('
    ',[{type:n.IF,evaluate:e=>e.state.titleExist,redundantAttribute:"expr99",selector:"[expr99]",template:e('',[{type:n.SLOT,attributes:[],name:"title",redundantAttribute:"expr100",selector:"[expr100]"}])},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr101",selector:"[expr101]"}]),name:"material-card"},At={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){"function"==typeof this.props.onChange&&this.props.onChange(!this.state.checked,e),this.update({checked:!this.state.checked})}},template:(e,t,n,r)=>e('
    ',[{redundantAttribute:"expr95",selector:"[expr95]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["checkbox ",e.state.checked?"checked":""].join("")},{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{redundantAttribute:"expr96",selector:"[expr96]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onChange}]},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr97",selector:"[expr97]"},{redundantAttribute:"expr98",selector:"[expr98]",expressions:[{type:t.VALUE,evaluate:e=>e.state.checked}]}]),name:"material-checkbox"},wt={css:null,exports:{state:{opening:!1,opened:!1},onMounted(){this.state.opened=this.props.opened||!1,this.props.selected&&this.update({selected:props.selected})},onBeforeUpdate(e,t){e.opened!==t.opened&&(t.opening=!0)},onUpdated(e,t){t.opening&&setTimeout((()=>{this.update({opening:!1,opened:e.opened})}),e.opened?0:200)},select({item:e,key:t}){return this.update({selected:t}),"function"==typeof this.props.onSelect&&this.props.onSelect(t,e),!0}},template:(e,t,n,r)=>e('
      ',[{type:n.IF,evaluate:e=>e.state.opening||e.state.opened,redundantAttribute:"expr105",selector:"[expr105]",template:e('
    • ',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["dropdown-content ",e.state.opening?"opening":""].join("")}]},{type:n.EACH,getKey:null,condition:null,template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.props.selected==e.key?"selected":""}]},{type:n.IF,evaluate:e=>!e.item.link,redundantAttribute:"expr107",selector:"[expr107]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.item.title},{type:t.EVENT,name:"onclick",evaluate:e=>e.select.bind(null,{item:e.item,key:e.key})}]}])},{type:n.IF,evaluate:e=>e.item.link,redundantAttribute:"expr108",selector:"[expr108]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.item.title},{type:t.ATTRIBUTE,name:"href",evaluate:e=>e.item.link},{type:t.EVENT,name:"onclick",evaluate:e=>e.select(e.item)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.item.title}]}])}]),redundantAttribute:"expr106",selector:"[expr106]",itemName:"item",indexName:"key",evaluate:e=>e.props.items}])}]),name:"material-dropdown-list"},Ct={css:null,exports:{onMounted(e,t){this.updateClasses()},onUpdated(e,t){this.updateClasses()},updateClasses(){const e=this.$(".mini-footer");for(let e=0;e0&&e.classList.add(`material-footer-${e.slot}`)}},template:(e,t,n,r)=>e('',[{type:n.SLOT,attributes:[],name:"sections",redundantAttribute:"expr122",selector:"[expr122]"},{type:n.SLOT,attributes:[],name:"logo",redundantAttribute:"expr123",selector:"[expr123]"},{type:n.SLOT,attributes:[],name:"link-list",redundantAttribute:"expr124",selector:"[expr124]"},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr125",selector:"[expr125]"}]),name:"material-footer"},Nt=function(){function e(t){if(a(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 this[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=this[t.valid]||!1)}else t&&-1!=Object.keys(this.base).indexOf(this.type)&&(this.validationType="Type")}return o(e,[{key:"base",get:function(){return{email:/^(([\w\.\-_]+)@[\w\-\_]+(\.\w+){1,}|)$/i,number:/^(\d+|)$/i,tel:/^((\+|\d)?([\d\-\(\)\#])|)+$/i,url:/([--:\w?@%&+~#=]*\.[a-z]{2,4}\/{0,2})((?:[?&](?:\w+)=(?:\w+))+|[--:\w?@%&+~#=]+)?/i}}},{key:"validate",value:function(e){return!this.validationType||this["validateBy"+this.validationType](e)}},{key:"validateByFunction",value:function(e){if(this.validationFunction)return this.validationFunction(e)}},{key:"validateByRegexp",value:function(e){if(this.validationRegexp)return this.validationRegexp.test(e)}},{key:"validateByType",value:function(e){return this.base[this.type].test(e)}}]),e}(),It={css:null,exports:{state:{focused:!1,showIcon:!1,value:"",disabled:!1,required:!1,error:!1},onMounted(){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 Nt(this.props),this.update({showIcon:!1,value:this.props.value||"",disabled:""===this.props.disabled||this.props.disabled||!1,required:""===this.props.required||this.props.required||!1}),this.$("input").addEventListener("focus",this.changeFocus),this.$("input").addEventListener("blur",this.changeFocus)},onBeforeUpdate(e,t){this.state.error=0!==t.value.length&&!this.validator.validate(t.value)},changeFocus(e){if(this.disabled)return!1;this.update({focused:this.$("input")==document.activeElement}),this.props.focuschanged&&"function"==typeof this.props.focuschanged&&this.props.focuschanged(this.focused,e)},changeValue(e){this.update({value:this.$("input").value}),this.props.valuechanged&&"function"==typeof this.props.valuechanged&&this.props.valuechanged(this.$("input").value,e)},iconClickHandler(e){this.props.iconclicked&&"function"==typeof this.props.iconclicked&&this.props.iconclicked.call(this,e)}},template:(e,t,n,r)=>e('
      ',[{redundantAttribute:"expr109",selector:"[expr109]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["input-content ",e.state.value?"not-empty":null," ",e.state.error?"error":null].join("")}]},{type:n.IF,evaluate:e=>e.props.label,redundantAttribute:"expr110",selector:"[expr110]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.label}]}])},{redundantAttribute:"expr111",selector:"[expr111]",expressions:[{type:t.ATTRIBUTE,name:"type",evaluate:e=>e.props.type||"text"},{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>e.state.disabled},{type:t.ATTRIBUTE,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,name:"required",evaluate:e=>e.state.required}]},{type:n.IF,evaluate:e=>e.props.icon,redundantAttribute:"expr112",selector:"[expr112]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'',bindings:[{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr114",selector:"[expr114]"}]}],attributes:[{type:t.ATTRIBUTE,name:"waves-color",evaluate:e=>e.props["waves-color"]||"#fff"},{type:t.EVENT,name:"onclick",evaluate:e=>e.iconClickHandler},{type:t.ATTRIBUTE,name:"waves-opacity",evaluate:e=>e.props["waves-opacity"]||"0.6"},{type:t.ATTRIBUTE,name:"waves-duration",evaluate:e=>e.props["waves-duration"]||"600"}],redundantAttribute:"expr113",selector:"[expr113]"}])},{redundantAttribute:"expr115",selector:"[expr115]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["underline ",e.state.focused?"focused":null," ",e.state.error?"error":null].join("")}]}]),name:"material-input"},Rt={css:null,exports:{state:{transition:!1,opened:!1},onMounted(e,t){},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){const n=this.$(".content");if(n)for(let e=0;ee('
      ',[{type:n.IF,evaluate:e=>e.props.opened||e.state.opened,redundantAttribute:"expr116",selector:"[expr116]",template:e('
      ',[{redundantAttribute:"expr117",selector:"[expr117]",expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]},{redundantAttribute:"expr118",selector:"[expr118]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["popup ",e.state.transition?"opening":""," ",e.props.animation||"top"].join("")}]},{type:n.SLOT,attributes:[],name:"title",redundantAttribute:"expr119",selector:"[expr119]"},{type:n.SLOT,attributes:[],name:"content",redundantAttribute:"expr120",selector:"[expr120]"},{type:n.SLOT,attributes:[],name:"action",redundantAttribute:"expr121",selector:"[expr121]"}])}]),name:"material-popup"},kt={css:null,exports:{state:{toasts:{}},onBeforeUpdate(e,t){e.message&&!t.internal&&this.addToast({message:e.message,isError:e.isError},e.duration),t.internal=!1},addToast(e,t){var n=this.toastID=Math.random().toString(36).substring(7);this.state.toasts[n]=Object.assign(e,{opening:!0}),setTimeout((()=>{this.state.toasts[n].opening=!1,this.update({toasts:this.state.toasts,internal:!0})}),50),this.state.toasts[n].interval=setTimeout((()=>{this.removeToast(n)}),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,n,r)=>e('
      ',[{type:n.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,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)}]}]),redundantAttribute:"expr126",selector:"[expr126]",itemName:"toastID",indexName:null,evaluate:e=>Object.keys(e.state.toasts)}]),name:"material-snackbar"},Ut={css:null,exports:{state:{selected:0},onMounted(e,t){const n=this.$(".line");this.$$("material-button").forEach((e=>{e.style.width=(100/this.props.tabs.length).toFixed(2)+"%",n&&(n.style.width=e.style.width)})),this.setLinePosition()},onTabChanged(e,t){this.update({selected:t}),this.setLinePosition(),"function"==typeof this.props.onTabChanged&&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+"%")},cut:e=>e.length>props.cut?e.substr(0,props.cut)+"...":e},template:(e,t,n,r)=>e('
      ',[{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'
      ',bindings:[{redundantAttribute:"expr136",selector:"[expr136]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.cut?e.cut(e.tab.title):e.tab.title},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.tab.title}]}]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>t=>e.onTabChanged(t,e.k)},{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.state.selected==e.k?"selected":""},{type:t.ATTRIBUTE,name:"waves-opacity",evaluate:e=>e.props.wavesOpacity},{type:t.ATTRIBUTE,name:"waves-duration",evaluate:e=>e.props.wavesDuration},{type:t.ATTRIBUTE,name:"waves-center",evaluate:e=>e.props.wavesCenter},{type:t.ATTRIBUTE,name:"waves-color",evaluate:e=>e.props.wavesColor}]}]),redundantAttribute:"expr135",selector:"[expr135]",itemName:"tab",indexName:"k",evaluate:e=>e.props.tabs},{type:n.IF,evaluate:e=>e.props.useLine,redundantAttribute:"expr137",selector:"[expr137]",template:e('
      ',[])},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr138",selector:"[expr138]"}]),name:"material-tabs"},Ot=function(e){l(i,e);var t,n,r=(t=i,n=c(),function(){var e,r=u(t);if(n){var a=u(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return m(this,e)});function i(e,t,n){var o;return a(this,i),o=r.call(this),e||console.error("You should set container to the wave!"),o.container=e,o.maxOpacity=t.opacity||.6,o.duration=t.duration||750,o.color=t.color||"#fff",o.center=t.center||!1,o.event=n,o.containerBound=o.receiveBound(),o.maxScale=o.containerBound.size/100*10,o.created=Date.now(),o.start={},o.createNode(),o.waveIn(),o}return o(i,[{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,n=Date.now()-this.created,r=Math.round(this.duration/2)-n;setTimeout((function(){t.setStyles(0),setTimeout((function(){t.wave.parentNode===t.container&&(t.container.removeChild(t.wave),e())}),t.duration)}),r>0?r: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(n){e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";")})),t}}]),i}(function(){function e(){a(this,e)}return o(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"!==n(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 n in e)n in t||(t[n]=e[n]);return t}}]),e}()),Bt={css:null,exports:{onMounted(){this._waves=[],this._events=[]},launch(e){var t=new Ot(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,n,r)=>e('
      ',[{redundantAttribute:"expr134",selector:"[expr134]",expressions:[{type:t.EVENT,name:"onmousedown",evaluate:e=>e.launch}]}]),name:"material-waves"};function St(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:o}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,a=void 0===r?"./":r,i="[^"+Lt(t.delimiter||"/#?")+"]+?",o=[],s=0,l=0,u="",p=function(e){if(l-1:void 0===b;a||(m+="(?:"+d+"(?="+c+"))?"),T||(m+="(?="+d+"|"+c+")")}return new RegExp(m,Dt(n))}(St(e,n),t,n)}function _t(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,a=n.exec(e.source);a;)t.push({name:a[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),a=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return _t(e,t,n).source}));return new RegExp("(?:"+r.join("|")+")",Dt(n))}(e,t,n):jt(e,t,n)}!function(e){var t=function(e){var t,r=Object.prototype,a=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),o=new k(r||[]);return i._invoke=function(e,t,n){var r=d;return function(a,i){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===a)throw i;return O()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=N(o,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?g:m,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=g,n.method="throw",n.arg=l.arg)}}}(e,n,o),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=p;var d="suspendedStart",m="suspendedYield",h="executing",g="completed",f={};function v(){}function y(){}function x(){}var b={};u(b,o,(function(){return this}));var T=Object.getPrototypeOf,E=T&&T(T(U([])));E&&E!==r&&a.call(E,o)&&(b=E);var A=x.prototype=v.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(i,o,s,l){var u=c(e[i],e,o);if("throw"!==u.type){var p=u.arg,d=p.value;return d&&"object"===n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(d).then((function(e){p.value=e,s(p)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var i;this._invoke=function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}}function N(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var a=c(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function U(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;R(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:U(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var Mt=Symbol();function Pt(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;a',[{type:n.IF,evaluate:function(e){return e.state.route},redundantAttribute:"expr0",selector:"[expr0]",template:e('',[{type:n.SLOT,attributes:[{type:t.ATTRIBUTE,name:"route",evaluate:function(e){return e.state.route}}],name:"default",redundantAttribute:"expr1",selector:"[expr1]"}])}])},name:"route-hoc"},cn=function(){return dn()||global},dn=function(){return"undefined"==typeof window?null:window},mn=function(){return"undefined"==typeof document?null:document},hn=function(){var e=dn();return e?e.location:{}},gn=(ln=cn()).requestAnimationFrame||ln.setTimeout,fn=function(){var e=cn();return e.cancelAnimationFrame||e.clearTimeout}(),vn="popstate",yn="click",xn="/",bn=/^.+?\/\/+[^/]+/,Tn=function(e){return e[e.length-1]===xn?e.substr(0,e.length-1):e},En=function(e){var t,n=dn().location,r=n?"".concat(n.protocol,"//").concat(n.host):"",a=(n||{}).pathname;switch(!0){case!1===Boolean(e):return Tn("".concat(r).concat(a||""));case/(www|http(s)?:)/.test(e):return e;case"#"===e[0]:return"".concat(r).concat(a&&a!==xn?a:"").concat(e);case e===xn:return Tn(r);default:return Tn("".concat(r).concat((t=e)[0]===xn?t:"".concat(xn).concat(t)))}};function An(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function wn(e,t,n,r,a){var i;e=An(e),(i=t,i.split(/\s/)).forEach((function(t){e.forEach((function(e){return e[r](t,n,a||!1)}))}))}function Cn(e,t,n,r){return wn(e,t,n,"addEventListener",r),e}function Nn(e,t,n,r){return wn(e,t,n,"removeEventListener",r),e}var In=function(e){return 1===e.length?e[0]:e};function Rn(e,t){return function(e,t,n){var r="string"==typeof t?[t]:t;return In(An(e).map((function(e){return In(r.map((function(t){return e[n](t)})))})))}(e,t,"hasAttribute")}var kn=function(){return Yt.push(Ln(String(hn().href)))},Un=function(e){var t=e.includes(Qt.base)?e:Qt.base+e,n=hn(),r="undefined"==typeof history?null:history,a=mn();r&&t!==n.href&&r.pushState(null,a.title,t)},On=function e(t){return t&&!Bn(t)?e(t.parentNode):t},Bn=function(e){return"A"===e.nodeName},Sn=function(e){return!e||!Bn(e)||Rn(e,"download")||!Rn(e,"href")||function(e){return e.target&&"_self"!==e.target}(e)||-1===e.href.indexOf(hn().href.match(bn)[0])},Ln=function(e){return e.replace(Qt.base,"")},Dn=function(e){if(!function(e){return e.which&&1!==e.which||e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented}(e)){var t=On(e.target);if(!Sn(t)&&!function(e){return e.split("#").length>1}(t.href)&&function(e){return!Qt.base||e.includes(Qt.base)}(t.href)){var n=Ln(t.href);Yt.push(n),e.preventDefault()}}};var jn,_n="base",Mn=bt.DOMBindings,Pn=Mn.template,Gn=Mn.bindingTypes,Vn=!1,$n={css:null,exports:(jn=function(e){var t=e.slots,n=e.attributes,r=e.props;Vn&&function(e){throw new Error(e)}("Multiple components are not supported");var a=function(e){return n&&n.find((function(t){return t.name.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))===e}))};return{slot:null,el:null,teardown:null,mount:function(e,t){var n,r,i,o=this,s=a("initialRoute"),l=s?s.evaluate(t):null,u=on();Vn=!0,this.el=e,this.teardown=(n=this.root,r=dn(),i=n||mn(),r&&(Cn(r,vn,kn),Cn(i,yn,Dn)),Yt.on.value(Un),function(){r&&(Nn(r,vn,kn),Nn(i,yn,Dn)),Yt.off.value(Un)}),this.setBase(t),u&&!l?this.createSlot(t):(Yt.on.value((function e(){o.createSlot(t),Yt.off.value(e)})),Yt.push(l||window.location.href))},createSlot:function(e){if(t&&t.length){var n=a("onStarted");this.slot=Pn(null,[{type:Gn.SLOT,name:"default"}]),this.slot.mount(this.el,{slots:t},e),n&&n.evaluate(e)(on())}},update:function(e){var t=this;this.setBase(e),this.slot&&(fn(this.deferred),this.deferred=gn((function(){t.slot.update({},e)})))},unmount:function(){var e;this.teardown(),Vn=!1,this.slot&&(e=this.slot).unmount.apply(e,arguments)},getBase:function(e){var t=a(_n);return t?this.el.getAttribute(_n)||t.evaluate(e):"/"},setBase:function(e){var t;t=r?r.base:this.getBase(e),Qt.base=En(t)}}},me(jn)||xe('riot.pure accepts only arguments of type "function"'),jn[Y]=!0,jn),template:null,name:"router-hoc"},zn="registryServer";function Hn(e){if(null==e||isNaN(e))return"?";if(0===e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)));return Math.ceil(e/Math.pow(1024,t))+" "+["Bytes","KB","MB","GB","TB"][t]}function Fn(e,t,n){return n||(n=100),e?e.slice((t-1)*n,n*t):[]}function qn(e,t){return t||(t=100),e?Math.trunc(e.length/t)+1:0}function Kn(e){return e?e.replace(/^https?:\/\//,""):""}function Wn(e){return e>="0"&&e<="9"}var Xn={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 Yn(e){try{var t=JSON.parse(localStorage.getItem(zn));if(t instanceof Array)return isNaN(e)?t.map((function(e){return e.trim().replace(/\/*$/,"")})):t[e]}catch(e){}return isNaN(e)?[]:""}function Qn(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(zn,JSON.stringify(e))}function Jn(e){var t=e.trim().replace(/\/*$/,""),n=Yn().filter((function(e){return e!==t}));return Qn([t].concat(n)),t}function Zn(e){if(e)return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)}function er(e){return!0===e||"true"===e}function tr(){var e={};return window.location.search.slice(1).split("&").forEach((function(t){var n=t.indexOf("=");e[t.slice(0,n)]=n<0?"":t.slice(n+1)})),e}function nr(e){var t=tr();for(var n in e)null===e[n]?delete t[n]:t[n]=e[n];return t}function rr(e){var t=[];for(var n in e)n&&void 0!==e[n]&&t.push("".concat(n,"=").concat(e[n]));return 0===t.length?"":"?".concat(t.join("&"))}function ar(e){var t=window.location,n=nr(e);return t.origin+t.pathname+rr(n)}var ir={home:function(){Yt.push(ar({page:null}))},taglist:function(e){Yt.push("".concat(ar({page:null}),"#!/taglist/").concat(e))},getTagListImage:function(){return on().replace(/^.*(#!)?\/?taglist\//,"")},history:function(e,t){Yt.push("".concat(ar({page:null}),"#!/taghistory/image/").concat(e,"/tag/").concat(t))},getTagHistoryImage:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$2")},getTagHistoryTag:function(){return on().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/,"$3")},updateQueryString:function(e){var t=rr(nr(e));history.pushState(null,"",t+window.location.hash)},updateUrlQueryParam:function(e){this.updateQueryString({url:Zn(e)})},getUrlQueryParam:function(){var e=tr().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 tr().page}},or=function(){function e(t){a(this,e),this.oReq=new XMLHttpRequest,this.oReq.hasHeader=sr,this.oReq.getErrorMessage=lr,this._events={},this._headers={},this.onAuthentication=t&&t.onAuthentication,this.withCredentials=t&&t.withCredentials}return o(e,[{key:"getContentDigest",value:function(e){this.oReq.hasHeader("Docker-Content-Digest")?e(this.oReq.getResponseHeader("Docker-Content-Digest")):window.crypto&&window.TextEncoder&&crypto.subtle.digest("SHA-256",(new TextEncoder).encode(this.oReq.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(t,n){this._events[t]=n;var r=this;switch(t){case"loadend":r.oReq.addEventListener("loadend",(function(){if(401!==this.status||this.withCredentials)n.bind(this)();else{var t=this.hasHeader("www-authenticate")&&pr(this.getResponseHeader("www-authenticate"));r.onAuthentication(t,(function(t){var n=new XMLHttpRequest;for(var a in n._url=r._url,n.open(r._method,r._url),r._events)n.addEventListener(a,r._events[a]);for(var i in r._headers)n.setRequestHeader(i,r._headers[i]);t&&t.token?n.setRequestHeader("Authorization","Bearer ".concat(t.token)):n.withCredentials=!0,n.hasHeader=sr,n.getErrorMessage=e.getErrorMessage,r.oReq=n,n.send()}))}}));break;case"load":r.oReq.addEventListener("load",(function(){401!==this.status&&n.bind(this)()}));break;default:r.oReq.addEventListener(t,(function(){n.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(){this.oReq.send()}}]),e}(),sr=function(e){return this.getAllResponseHeaders().split("\n").some((function(t){return new RegExp("^"+e+":","i").test(t)}))},lr=function(){return this._url.match("^http://")&&"https:"===window.location.protocol?"Mixed Content: The page at `"+window.location.origin+"` was loaded over HTTPS, but requested an insecure server endpoint `"+new URL(this._url).origin+"`. This request has been blocked; the content must be served over HTTPS.":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+"`":"Incorrect server endpoint."},ur=r(/Bearer realm="([^"]+)",service="([^"]+)",scope="([^"]+)"/,{realm:1,service:2,scope:3}),pr=function(e){var t=ur.exec(e);return t&&t.groups};function cr(e,t){return!e||t&&t.toLowerCase().indexOf(e)>=0}var dr,mr,hr,gr,fr,vr,yr,xr,br={css:'search-bar material-input,[is="search-bar"] material-input{ position: absolute; top: 0em; right: 64px; max-width: 20%; } @media screen and (max-width: 400px) { search-bar material-input,[is="search-bar"] material-input{ display: none; } } search-bar material-input input,[is="search-bar"] material-input input{ color: #fff; }',exports:{onMounted(e,t){const n=this.$("input");let r="";const a=()=>{r!==n.value&&e.onSearch(n.value.toLowerCase()),r=n.value};n.addEventListener("keyup",a),Yt.on.value((()=>{n.value="",a()})),window.addEventListener("keydown",(e=>{if(114===e.keyCode||e.ctrlKey&&70===e.keyCode){if(document.activeElement===n)return!0;e.preventDefault(),n.focus()}}))}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-input",slots:[],attributes:[],redundantAttribute:"expr14",selector:"[expr14]"}]),name:"search-bar"},Tr={css:null,exports:{components:{CatalogElement:{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),e.showCatalogNbTags&&t.image&&this.getNbTags(e,t)},onBeforeUpdate(e,t){e.filterResults&&t.images?t.nImages=t.images.filter((t=>cr(e.filterResults,t))).length:t.nImages=t.images&&t.images.length},onClick(){const e=this.state;e.repo?(this.update({expanded:!this.state.expanded,expanding:!0}),setTimeout((()=>{this.update({expanding:!1})}),50)):ir.taglist(e.image)},getNbTags(e,t){const n=this,r=new or({onAuthentication:e.onAuthentication});r.addEventListener("load",(function(){if(200===this.status){const e=(JSON.parse(this.responseText).tags||[]).length;n.update({nbTags:e})}else 404===this.status?e.onNotify("Server not found",!0):e.onNotify(this.responseText,!0)})),r.addEventListener("error",(function(){e.onNotify(this.getErrorMessage(),!0)})),r.open("GET",e.registryUrl+"/v2/"+t.image+"/tags/list"),r.send()},matchSearch:cr},template:(e,t,n,r)=>e('
      ',[{type:n.IF,evaluate:e=>!e.props.filterResults||e.state.nImages>0||e.matchSearch(e.props.filterResults,e.state.image),redundantAttribute:"expr65",selector:"[expr65]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'send
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-waves",slots:[],attributes:[],redundantAttribute:"expr67",selector:"[expr67]"},{redundantAttribute:"expr68",selector:"[expr68]",expressions:[{type:t.TEXT,childNodeIndex:1,evaluate:e=>[e.state.image||e.state.repo].join("")}]},{type:n.IF,evaluate:e=>e.state.images,redundantAttribute:"expr69",selector:"[expr69]",template:e(' expand_more',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images"].join("")}]},{redundantAttribute:"expr70",selector:"[expr70]",expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["material-icons animated ",e.state.expanded?"expanded":""].join("")}]}])},{type:n.IF,evaluate:e=>e.props.showCatalogNbTags&&e.state.image,redundantAttribute:"expr71",selector:"[expr71]",template:e(' ',[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nbTags," tags"].join("")}]}])}]}],attributes:[{type:t.ATTRIBUTE,name:"expanded",evaluate:e=>e.state.expanded},{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}],redundantAttribute:"expr66",selector:"[expr66]"},{type:n.EACH,getKey:null,condition:e=>e.state.images,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,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,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags},{type:t.ATTRIBUTE,name:"class",evaluate:e=>["animated ",e.state.expanded||e.props.filterResults?"":"hide"," ",e.state.expanding?"expanding":""].join("")},{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item}]}]),redundantAttribute:"expr72",selector:"[expr72]",itemName:"item",indexName:null,evaluate:e=>e.state.images}])}]),name:"catalog-element"}},state:{registryName:"",length:0,loadend:!1,repositories:[],registryUrl:""},onBeforeMount(e){this.state.registryName=e.registryName,this.state.catalogElementsLimit=e.catalogElementsLimit},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 n=[];const r=this,a=new or({onAuthentication:this.props.onAuthentication});a.addEventListener("load",(function(){200===this.status?(n=JSON.parse(this.responseText).repositories||[],n.sort(),n=n.reduce((function(e,t){const n=t.indexOf("/");if(n>0){const r=t.substring(0,n)+"/";return 0!==e.length&&e[e.length-1].repo==r||e.push({repo:r,images:[]}),e[e.length-1].images.push(t),e}return e.push(t),e}),[])):404===this.status?r.props.onNotify("Server not found",!0):r.props.onNotify(this.responseText)})),a.addEventListener("error",(function(){r.props.onNotify(this.getErrorMessage(),!0)})),a.addEventListener("loadend",(function(){r.update({repositories:n,nRepositories:n.length,nImages:n.reduce(((e,t)=>e+(t.images&&t.images.length||1)),0),loadend:!0})})),a.open("GET",`${e.registryUrl}/v2/_catalog?n=${t.catalogElementsLimit}`),a.send()}},template:(e,t,n,r)=>e('
      ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

      ',bindings:[{redundantAttribute:"expr26",selector:"[expr26]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Repositories of ",e.state.registryName].join("")}]},{redundantAttribute:"expr27",selector:"[expr27]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.nImages," images in ",e.state.nRepositories," repositories"].join("")}]}]}],attributes:[],redundantAttribute:"expr25",selector:"[expr25]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr28",selector:"[expr28]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr29",selector:"[expr29]"}])},{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"catalog-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"item",evaluate:e=>e.item},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.ATTRIBUTE,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,name:"show-catalog-nb-tags",evaluate:e=>e.props.showCatalogNbTags}]}]),redundantAttribute:"expr30",selector:"[expr30]",itemName:"item",indexName:null,evaluate:e=>e.state.repositories}]),name:"catalog"},Er={exports:{}};dr=Er,mr="*",hr=Object.defineProperties,gr=Object.entries,fr=function(e,t){return function(n,r){return e.has(n)?e.get(n).add(r):e.set(n,(new Set).add(r)),t}},vr=function(e,t){return function(n,r){return n!==mr||r?function(e,t,n,r){if(r){var a=e.get(n);a&&(a.delete(r),0===a.size&&e.delete(n))}else e.delete(n)}(e,0,n,r):e.clear(),t}},yr=function(e,t){return function(e,n){return t.on(e,(function r(){t.off(e,r);for(var a=arguments.length,i=new Array(a),o=0;o1?r-1:0),i=1;i0&&Wn(e[e.length-1].charAt(0))==Wn(t)?e[e.length-1]+=t:e.push(t),e};function Cr(e,t){for(var n=e.tag.match(/./g).reduce(wr,[]),r=t.tag.match(/./g).reduce(wr,[]),a=0;a{this.update({digest:e})}))},onMounted(e,t){e.image.trigger("get-content-digest")},onBeforeUpdate(e,t){t.checked=e.checked},deleteImage(){this.props.handleCheckboxChange(Ur,this.props.image)},handleCheckboxChange(e){const t=e?Rr:kr;this.props.handleCheckboxChange(t,this.props.image)}},template:(e,t,n,r)=>e('',[{type:n.IF,evaluate:e=>!e.props.multiDelete,redundantAttribute:"expr145",selector:"[expr145]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>!e.state.digest},{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImage}]}])},{type:n.IF,evaluate:e=>e.props.multiDelete,redundantAttribute:"expr146",selector:"[expr146]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>!e.state.digest},{type:t.EVENT,name:"onChange",evaluate:e=>e.handleCheckboxChange},{type:t.ATTRIBUTE,name:"checked",evaluate:e=>e.state.checked}]}])}]),name:"remove-image"};const Rr="CHECK",kr="UNCHECK",Ur="DELETE";const Or=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}},Br=function(e,t){return Or(e.key)-Or(t.key)},Sr=function(e,t){switch(e){case"created":return new Date(t).toLocaleString();case"created_by":const e=t.match(/\/bin\/sh *-c *#\(nop\) *([A-Z]+)/);return e&&e[1]||"RUN";case"size":return Hn(t);case"Entrypoint":case"Cmd":return(t||[]).join(" ");case"Labels":return Object.keys(t||{}).map((function(e){return t[e]?e+"="+t[e]:""}));case"Volumes":case"ExposedPorts":return Object.keys(t)}return t||""};var Lr={css:null,exports:{components:{Catalog:Tr,TagList:{css:null,exports:{components:{Pagination:{css:null,exports:null,template:(e,t,n,r)=>e('
      ',[{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'
      ',bindings:[{type:n.IF,evaluate:e=>e.p.icon,redundantAttribute:"expr74",selector:"[expr74]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.icon}]}])},{type:n.IF,evaluate:e=>!e.p.icon,redundantAttribute:"expr75",selector:"[expr75]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.p.page}]}])}]}],attributes:[{type:t.ATTRIBUTE,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=>()=>e.props.onPageUpdate(e.p.page)}]}]),redundantAttribute:"expr73",selector:"[expr73]",itemName:"p",indexName:null,evaluate:e=>e.props.pages}]),name:"pagination"},TagTable:{css:null,exports:{components:{ImageDate:{css:null,exports:{onMounted(e){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"],n=[1,60,3600,86400,2592e3,31104e3,1/0],r=(new Date-e)/1e3,a=0;a=r)return t[2*a];if(n[a+1]>r)return Math.floor(r/n[a])+" "+t[2*a+1]}}(e.creationDate)} ago`,getLocalDate:e=>e.ociImage?"unavailable on OCI index/Buildkit export cache":e.creationDate&&e.creationDate.toLocaleString()||"unknown"},template:(e,t,n,r)=>e('
      ',[{redundantAttribute:"expr144",selector:"[expr144]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getDate(e.props.image)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>["Creation date ",e.getLocalDate(e.props.image)].join("")}]}]),name:"image-date"},ImageSize:{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=>Hn(e.size)},template:(e,t,n,r)=>e('
      ',[{redundantAttribute:"expr141",selector:"[expr141]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getImageSize(e.props.image)}]}]),name:"image-size"},ImageTag:{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,n,r)=>e('
      ',[{redundantAttribute:"expr139",selector:"[expr139]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.props.image.tag},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.state.sha256}]}]),name:"image-tag"},ImageContentDigest:{css:null,exports:{onMounted(e,t){this.load(e,t)},onUpdated(e,t){this.load(e,t)},load(e,t){e.image.digest||(t.chars=-1,e.image.one("content-digest",(t=>{this.digest=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.digest||"",getDigest:(e,t)=>t>=70?e.digest||"":t<=0?"":e.digest&&e.digest.slice(0,t)+"..."},template:(e,t,n,r)=>e('
      ',[{redundantAttribute:"expr140",selector:"[expr140]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.getDigest(e.props.image,e.state.chars)},{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.getTitle(e.props.image,e.state.chars)}]}]),name:"image-content-digest"},CopyToClipboard:{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.digest}`,load(e,t){"tag"===e.target||e.image.digest||(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(Xn)}},template:(e,t,n,r)=>e('
      ',[{redundantAttribute:"expr142",selector:"[expr142]",expressions:[{type:t.VALUE,evaluate:e=>e.getDockerCmd(e.props)}]},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'content_copy',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.copy}],redundantAttribute:"expr143",selector:"[expr143]"}]),name:"copy-to-clipboard"},RemoveImage:Ir,TagHistoryButton:{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(){this.props.image.ociImage||ir.history(this.props.image.name,this.props.image.tag)}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'history',bindings:[]}],attributes:[{type:t.ATTRIBUTE,name:"title",evaluate:e=>e.buttonTittle()},{type:t.EVENT,name:"onClick",evaluate:e=>e.routeToHistory},{type:t.ATTRIBUTE,name:"disabled",evaluate:e=>e.props.image.ociImage}],redundantAttribute:"expr147",selector:"[expr147]"}]),name:"tag-history-button"},ConfirmDeleteImage:{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 n=new Set;return e.forEach((e=>{e.digest&&n.add(e.digest)})),t.filter((e=>n.has(e.digest)))},deleteImages(){this.props.toDelete.forEach((e=>this.getContentDigestThenDelete(e,this.props)))},getContentDigestThenDelete({name:e,tag:t},n){const{registryUrl:r,onNotify:a,onAuthentication:i}=n,o=new or({onAuthentication:i}),s=this;o.addEventListener("loadend",(function(){200===this.status||202===this.status?o.getContentDigest((function(r){r?s.deleteImage({name:e,tag:t,digest:r},n):a(ERROR_CAN_NOT_READ_CONTENT_DIGEST)})):404===this.status?a(`Manifest for ${e}:${t} not found`,!0):a(this.responseText)})),o.open("GET",`${r}/v2/${e}/manifests/${t}`),o.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"),o.send()},deleteImage({name:e,tag:t,digest:n},r){const{registryUrl:a,ignoreError:i,onNotify:o,onAuthentication:s,onClick:l}=r,u=new or({onAuthentication:s});u.addEventListener("loadend",(function(){200===this.status||202===this.status?(ir.taglist(e),o(`Deleting ${e}:${t} image. Run \`registry garbage-collect config.yml\` on your registry`)):404===this.status?i||o({message:"Digest not found for this image in your registry.",isError:!0}):o(this.responseText),l()})),u.open("DELETE",`${a}/v2/${e}/manifests/${n}`),u.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json"),u.addEventListener("error",(function(){o({message:"An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].",isError:!0})})),u.send()}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
      These images will be deleted
      ',bindings:[]},{id:"content",html:'
      ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.image.name,":",e.image.tag].join("")}]}]),redundantAttribute:"expr149",selector:"[expr149]",itemName:"image",indexName:null,evaluate:e=>e.displayImagesToDelete(e.props.toDelete,e.props.tags)}]},{id:"action",html:'
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Delete\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}],redundantAttribute:"expr150",selector:"[expr150]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr151",selector:"[expr151]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr148",selector:"[expr148]"}]),name:"confirm-delete-image"}},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,t){if(!0===t.altKey){Fn(this.props.tags,this.props.page).filter((e=>cr(this.props.filterResults,e.tag))).forEach((e=>this.state.toDelete.add(e))),this.update({multiDelete:!0,toDelete:this.state.toDelete})}else this.update({multiDelete:e})},onRemoveImageChange(e,t){let n=!1,r=!1;switch(e){case Rr:this.state.toDelete.add(t);break;case kr:this.state.toDelete.delete(t);break;case Ur:this.state.toDelete.clear(),this.state.toDelete.add(t),n=!0,r=!0}this.update({toDelete:this.state.toDelete,confirmDeleteImage:n,singleDeleteAction:r})},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 n=Fn(e,t);return"date"===this.state.orderType?n.sort(((e,t)=>this.state.desc?e.creationDate.getTime()-t.creationDate.getTime():t.creationDate.getTime()-e.creationDate.getTime())):"size"===this.state.orderType&&n.sort(((e,t)=>this.state.desc?e.size-t.size:t.size-e.size)),n},matchSearch:cr},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"confirm-delete-image",slots:[],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.state.confirmDeleteImage},{type:t.EVENT,name:"on-click",evaluate:e=>e.onConfirmDeleteImageClick},{type:t.ATTRIBUTE,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,name:"tags",evaluate:e=>e.props.tags},{type:t.ATTRIBUTE,name:"to-delete",evaluate:e=>e.state.toDelete}],redundantAttribute:"expr45",selector:"[expr45]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'
      \n Creation date\n \n Size\n \n Tag\n History
      ',bindings:[{redundantAttribute:"expr47",selector:"[expr47]",expressions:[{type:t.ATTRIBUTE,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:"expr48",selector:"[expr48]",expressions:[{type:t.ATTRIBUTE,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:n.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr49",selector:"[expr49]",template:e("Content Digest",[])},{redundantAttribute:"expr50",selector:"[expr50]",expressions:[{type:t.ATTRIBUTE,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:n.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr51",selector:"[expr51]",template:e('',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>["remove-tag ",e.state.toDelete.size>0&&!e.state.singleDeleteAction?"delete":""].join("")}]},{type:n.IF,evaluate:e=>0===e.state.toDelete.size||e.state.singleDeleteAction,redundantAttribute:"expr52",selector:"[expr52]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-checkbox",slots:[],attributes:[{type:t.ATTRIBUTE,name:"checked",evaluate:e=>e.state.multiDelete},{type:t.EVENT,name:"onChange",evaluate:e=>e.onRemoveImageHeaderChange}]}])},{type:n.IF,evaluate:e=>e.state.toDelete.size>0&&!e.state.singleDeleteAction,redundantAttribute:"expr53",selector:"[expr53]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.deleteImages}]}])}])},{type:n.EACH,getKey:null,condition:e=>e.matchSearch(e.props.filterResults,e.image.tag),template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"image-date",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr55",selector:"[expr55]"},{type:n.TAG,getComponent:r,evaluate:e=>"image-size",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr56",selector:"[expr56]"},{type:n.IF,evaluate:e=>e.props.showContentDigest,redundantAttribute:"expr57",selector:"[expr57]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"image-content-digest",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr58",selector:"[expr58]"},{type:n.TAG,getComponent:r,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr59",selector:"[expr59]"}])},{type:n.TAG,getComponent:r,evaluate:e=>"image-tag",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr60",selector:"[expr60]"},{type:n.TAG,getComponent:r,evaluate:e=>"copy-to-clipboard",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify}],redundantAttribute:"expr61",selector:"[expr61]"},{type:n.TAG,getComponent:r,evaluate:e=>"tag-history-button",slots:[],attributes:[{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image}],redundantAttribute:"expr62",selector:"[expr62]"},{type:n.IF,evaluate:e=>e.props.isImageRemoveActivated,redundantAttribute:"expr63",selector:"[expr63]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"remove-image",slots:[],attributes:[{type:t.ATTRIBUTE,name:"multi-delete",evaluate:e=>e.state.multiDelete},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.image},{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,name:"handleCheckboxChange",evaluate:e=>e.onRemoveImageChange},{type:t.ATTRIBUTE,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:"expr64",selector:"[expr64]"}])}]),redundantAttribute:"expr54",selector:"[expr54]",itemName:"image",indexName:null,evaluate:e=>e.getPage(e.props.tags,e.props.page)}]}],attributes:[],redundantAttribute:"expr46",selector:"[expr46]"}]),name:"tag-table"}},onBeforeMount(e){this.state={registryName:e.registryName,tags:[],loadend:!1,asc:!0,page:ir.getPageQueryParam()||1}},onMounted(e,t){this.display(e,t),window.addEventListener("resize",this.onResize),window.requestAnimationFrame(this.onResize)},display(e,t){t.tags=[];const n=this,r=new or({onAuthentication:e.onAuthentication});r.addEventListener("load",(function(){if(200===this.status){const r=(JSON.parse(this.responseText).tags||[]).map((t=>new Nr(e.image,t,{registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}))).sort(Cr);window.requestAnimationFrame(n.onResize),n.update({page:Math.min(t.page,qn(r)),tags:r})}else 404===this.status?n.props.onNotify("Server not found",!0):n.props.onNotify(this.responseText,!0)})),r.addEventListener("error",(function(){n.props.onNotify(this.getErrorMessage(),!0),t.tags=[]})),r.addEventListener("loadend",(function(){n.update({loadend:!0})})),r.open("GET",e.registryUrl+"/v2/"+e.image+"/tags/list"),r.send(),t.asc=!0},onPageUpdate(e){this.update({page:e}),ir.updatePageQueryParam(e)},onResize(){const e=window.innerWidth;let t=0;const n=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,n>20&&(t-=n-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(Cr),this.state.asc=!0),this.update()},getPageLabels:function(e,t){var n=[],r=10;if(1===t)return n;1!==e&&t>=r&&(n.push({icon:"first_page",page:1}),n.push({icon:"chevron_left",page:e-1}));for(var a=Math.round(Math.max(1,Math.min(e-5,t-r+1))),i=a;ir,"space-right":e===t&&t>r});return e!==t&&t>=r&&(n.push({icon:"chevron_right",page:e+1}),n.push({icon:"last_page",page:t})),n},getNumPages:qn,router:ir},template:(e,t,n,r)=>e('
      ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'arrow_back',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.router.home}],redundantAttribute:"expr16",selector:"[expr16]"},{redundantAttribute:"expr17",selector:"[expr17]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Tags of ",e.props.image].join("")}]},{redundantAttribute:"expr18",selector:"[expr18]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Sourced from ",e.state.registryName+"/"+e.props.image].join("")}]},{redundantAttribute:"expr19",selector:"[expr19]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>[e.state.tags.length," tags"].join("")}]}]}],attributes:[],redundantAttribute:"expr15",selector:"[expr15]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr20",selector:"[expr20]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr21",selector:"[expr21]"}])},{type:n.TAG,getComponent:r,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr22",selector:"[expr22]"},{type:n.IF,evaluate:e=>e.state.loadend,redundantAttribute:"expr23",selector:"[expr23]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"tag-table",slots:[],attributes:[{type:t.ATTRIBUTE,name:"tags",evaluate:e=>e.state.tags},{type:t.ATTRIBUTE,name:"asc",evaluate:e=>e.state.asc},{type:t.ATTRIBUTE,name:"page",evaluate:e=>e.state.page},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:e=>e.props.showContentDigest},{type:t.ATTRIBUTE,name:"is-image-remove-activated",evaluate:e=>e.props.isImageRemoveActivated},{type:t.EVENT,name:"onReverseOrder",evaluate:e=>e.onReverseOrder},{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.props.registryUrl},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.props.pullUrl},{type:t.EVENT,name:"on-notify",evaluate:e=>e.props.onNotify},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.props.filterResults},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.props.onAuthentication}]}])},{type:n.TAG,getComponent:r,evaluate:e=>"pagination",slots:[],attributes:[{type:t.ATTRIBUTE,name:"pages",evaluate:e=>e.getPageLabels(e.state.page,e.getNumPages(e.state.tags))},{type:t.EVENT,name:"onPageUpdate",evaluate:e=>e.onPageUpdate}],redundantAttribute:"expr24",selector:"[expr24]"}]),name:"tag-list"},TagHistory:{css:null,exports:{components:{TagHistoryElement:{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{ background-size: 24px auto; background-image: url(\'images/docker-logo.svg\'); background-repeat: no-repeat; } 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 p,[is="tag-history-element"] .headline p{ font-weight: bold; line-height: 20px; position: relative; display: inline; top: -4px; } 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":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";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)},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,n,r)=>e('

      ',[{expressions:[{type:t.ATTRIBUTE,name:"class",evaluate:e=>e.state.key}]},{redundantAttribute:"expr89",selector:"[expr89]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.icon}]},{redundantAttribute:"expr90",selector:"[expr90]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.name}]},{type:n.IF,evaluate:e=>e.state.value,redundantAttribute:"expr91",selector:"[expr91]",template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.state.value}]}])},{type:n.EACH,getKey:null,condition:e=>e.state.values,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.value}]}]),redundantAttribute:"expr92",selector:"[expr92]",itemName:"value",indexName:null,evaluate:e=>e.state.values}]),name:"tag-history-element"}},onBeforeMount(e,t){t.elements=[],t.image=new Nr(e.image,e.tag,{list:!0,registryUrl:e.registryUrl,onNotify:e.onNotify,onAuthentication:e.onAuthentication}),t.image.fillInfo()},onMounted(e,t){t.image.on("blobs",this.processBlobs),t.image.on("list",this.multiArchList)},onTabChanged(e,t){const n=this.state,{registryUrl:r,onNotify:a}=this.props;if(n.elements=[],n.image.variants[t]=n.image.variants[t]||new Nr(this.props.image,e.digest,{list:!1,registryUrl:r,onNotify:a}),n.image.variants[t].blobs)return this.processBlobs(n.image.variants[t].blobs);n.image.variants[t].fillInfo(),n.image.variants[t].on("blobs",this.processBlobs)},processBlobs(e){this.state;const{historyCustomLabels:t}=this.props;function n(e){const t=[];for(var n in e)if(e.hasOwnProperty(n)&&"empty_layer"!=n){const r=e[n],a={key:n,value:Sr(n,r)};t.push(a)}return t.sort(Br)}const r=new Array(e.history.length+1);r[0]=n(function(e,{historyCustomLabels:t}){const n=["architecture","User","created","docker_version","os","Cmd","Entrypoint","Env","Labels","User","Volumes","WorkingDir","author","id","ExposedPorts"].reduce((function(t,n){const r=e[n]||e.config[n];return r&&"architecture"===n&&e.variant?t[n]=r+e.variant:r&&(t[n]=r),t}),{});return!n.author&&n.Labels&&n.Labels.maintainer&&(n.author=e.config.Labels.maintainer,delete n.Labels.maintainer),n.Labels&&t.filter((e=>n.Labels[e])).forEach((e=>{n[`custom-label-${e}`]=n.Labels[e],delete n.Labels[e]})),n}(e,{historyCustomLabels:t})),e.history.forEach((function(t,a){r[e.history.length-a]=n(t)})),this.update({elements:r,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(){ir.taglist(this.props.image)}},template:(e,t,n,r)=>e('
      ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'

      history

      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'arrow_back',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.toTaglist}],redundantAttribute:"expr38",selector:"[expr38]"},{redundantAttribute:"expr39",selector:"[expr39]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["History of ",e.props.image,":",e.props.tag].join("")}]}]}],attributes:[],redundantAttribute:"expr37",selector:"[expr37]"},{type:n.IF,evaluate:e=>!e.state.loadend,redundantAttribute:"expr40",selector:"[expr40]",template:e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-spinner",slots:[],attributes:[],redundantAttribute:"expr41",selector:"[expr41]"}])},{type:n.IF,evaluate:e=>e.state.archs&&e.state.loadend,redundantAttribute:"expr42",selector:"[expr42]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-tabs",slots:[],attributes:[{type:t.ATTRIBUTE,name:"useLine",evaluate:e=>!0},{type:t.ATTRIBUTE,name:"tabs",evaluate:e=>e.state.archs},{type:t.EVENT,name:"onTabChanged",evaluate:e=>e.onTabChanged}]}])},{type:n.EACH,getKey:null,condition:null,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"material-card",slots:[{id:"default",html:'',bindings:[{type:n.EACH,getKey:null,condition:e=>e.entry.value&&e.entry.value.length>0,template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"tag-history-element",slots:[],attributes:[{type:t.ATTRIBUTE,name:"entry",evaluate:e=>e.entry}]}]),redundantAttribute:"expr44",selector:"[expr44]",itemName:"entry",indexName:null,evaluate:e=>e.element}]}],attributes:[]}]),redundantAttribute:"expr43",selector:"[expr43]",itemName:"element",indexName:null,evaluate:e=>e.state.elements}]),name:"tag-history"},DialogsMenu:{css:'dialogs-menu > .container,[is="dialogs-menu"] > .container{ position: absolute; top: 0px; right: 16px; color: #000; list-style-type: disc; margin-block-start: 0.7em; } dialogs-menu .overlay,[is="dialogs-menu"] .overlay{ position: fixed; height: 100%; width: 100%; top: 0; right: 0; z-index: 10; } dialogs-menu material-button,[is="dialogs-menu"] material-button{ background: rgba(255, 255, 255, 0); float: right; z-index: 2; } dialogs-menu material-button .content i.material-icons,[is="dialogs-menu"] material-button .content i.material-icons{ color: #fff; font-size: 24px; } dialogs-menu material-dropdown-list,[is="dialogs-menu"] material-dropdown-list{ display: inline-block; position: relative; } dialogs-menu material-dropdown-list ul.dropdown-content,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content{ min-width: 156px; padding: 8px 0; margin: 0; } dialogs-menu material-dropdown-list ul.dropdown-content li span,[is="dialogs-menu"] material-dropdown-list ul.dropdown-content li span{ font-size: 1rem; line-height: 1.2em; } 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:{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=Jn(e.value);ir.home(),this.props.onServerChange(t),this.props.onClose(),setTimeout((()=>ir.updateUrlQueryParam(t)),100)}},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
      Add your Server ?
      ',bindings:[]},{id:"content",html:'
      Write your URL without /v2
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-input",slots:[],attributes:[{type:t.EVENT,name:"onkeyup",evaluate:e=>e.onKeyUp}],redundantAttribute:"expr77",selector:"[expr77]"}]},{id:"action",html:'
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Add\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.add}],redundantAttribute:"expr78",selector:"[expr78]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr79",selector:"[expr79]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr76",selector:"[expr76]"}]),name:"add-registry-url"},ChangeRegistryUrl:{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; line-height: 24px; height: 24px; border-bottom: 1px solid #2f6975; appearance: none; -moz-appearance: none; -webkit-appearance: none; margin: 1.5em 0; }',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 n=Jn(t.value);ir.home(),this.props.onServerChange(n),this.props.onClose(),setTimeout((()=>ir.updateUrlQueryParam(n)),100)},getRegistryServers:Yn},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
      Change your Server ?
      ',bindings:[]},{id:"content",html:'
      ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(" ",[{expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url},{type:t.ATTRIBUTE,name:"value",evaluate:e=>e.url}]}]),redundantAttribute:"expr81",selector:"[expr81]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()}]},{id:"action",html:'
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Change\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.change}],redundantAttribute:"expr82",selector:"[expr82]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Cancel\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr83",selector:"[expr83]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClick}],redundantAttribute:"expr80",selector:"[expr80]"}]),name:"change-registry-url"},RemoveRegistryUrl:{css:'remove-registry-url material-popup .popup material-button,[is="remove-registry-url"] material-popup .popup material-button{ margin-right: 1em; } remove-registry-url material-popup .popup material-button .content i.material-icons,[is="remove-registry-url"] material-popup .popup material-button .content i.material-icons{ color: #777; }',exports:{remove(e){const t=e.currentTarget.attributes.url&&e.currentTarget.attributes.url.value;var n;n=t,Qn(Yn().filter((function(e){return e!==n}))),setTimeout((()=>this.update()),100)},getRegistryServers:Yn},template:(e,t,n,r)=>e('',[{type:n.TAG,getComponent:r,evaluate:e=>"material-popup",slots:[{id:"title",html:'
      Remove your Registry Server ?
      ',bindings:[]},{id:"content",html:'
      ',bindings:[{type:n.EACH,getKey:null,condition:null,template:e(' ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'delete',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.remove},{type:t.ATTRIBUTE,name:"url",evaluate:e=>e.url}],redundantAttribute:"expr86",selector:"[expr86]"},{redundantAttribute:"expr87",selector:"[expr87]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>e.url}]}]),redundantAttribute:"expr85",selector:"[expr85]",itemName:"url",indexName:null,evaluate:e=>e.getRegistryServers()}]},{id:"action",html:'
      ',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:"\n Close\n ",bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr88",selector:"[expr88]"}]}],attributes:[{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.props.opened},{type:t.EVENT,name:"onClick",evaluate:e=>e.props.onClose}],redundantAttribute:"expr84",selector:"[expr84]"}]),name:"remove-registry-url"}},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,t){this.update({[t.name]:!0,isDropdownOpened:!1})},onClose(e){return()=>{this.update({[e]:!1,isDropdownOpened:!1})}},onClick(){this.update({isDropdownOpened:!this.state.isDropdownOpened})}},template:(e,t,n,r)=>e('
      ',[{type:n.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr31",selector:"[expr31]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"add-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:n.TAG,getComponent:r,evaluate:e=>"change-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:"expr32",selector:"[expr32]"},{type:n.IF,evaluate:e=>!e.props.readOnlyRegistries,redundantAttribute:"expr33",selector:"[expr33]",template:e(null,[{type:n.TAG,getComponent:r,evaluate:e=>"remove-registry-url",slots:[],attributes:[{type:t.ATTRIBUTE,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:n.TAG,getComponent:r,evaluate:e=>"material-button",slots:[{id:"default",html:'more_vert',bindings:[]}],attributes:[{type:t.EVENT,name:"onClick",evaluate:e=>e.onClick}],redundantAttribute:"expr34",selector:"[expr34]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-dropdown-list",slots:[],attributes:[{type:t.ATTRIBUTE,name:"items",evaluate:e=>e.dropdownItems.filter((t=>t.ro||!e.props.readOnlyRegistries))},{type:t.EVENT,name:"onSelect",evaluate:e=>e.onDropdownSelect},{type:t.ATTRIBUTE,name:"opened",evaluate:e=>e.state.isDropdownOpened}],redundantAttribute:"expr35",selector:"[expr35]"},{type:n.IF,evaluate:e=>e.state.isDropdownOpened,redundantAttribute:"expr36",selector:"[expr36]",template:e(null,[{expressions:[{type:t.EVENT,name:"onclick",evaluate:e=>e.onClick}]}])}]),name:"dialogs-menu"},SearchBar:br,Router:$n,Route:pn},onUpdated(e,t){t.snackbarIsError=!1,t.snackbarMessage=void 0},onBeforeMount(e){(e.defaultRegistries&&e.defaultRegistries.length>0&&0===Yn().length||er(e.readOnlyRegistries))&&Qn(e.defaultRegistries);const t=e.registryUrl||("true"===e.singleRegistry?void 0:ir.getUrlQueryParam()||Yn(0))||window.location.origin+window.location.pathname.replace(/\/+$/,"");this.state.registryUrl=t.replace(/\/$/,"").replace(/index(\.html?)?$/,""),this.state.name=e.name||Kn(e.registryUrl),this.state.catalogElementsLimit=e.catalogElementsLimit||1e5,this.state.pullUrl=this.pullUrl(this.state.registryUrl,e.pullUrl)},onServerChange(e){this.update({registryUrl:e,name:Kn(e),pullUrl:this.pullUrl(e),snackbarMessage:"Registry server changed to `"+e+"`."})},onAuthentication(e,t){if(e&&e.realm&&e.service&&e.scope){const{realm:n,service:r,scope:a}=e,i=new XMLHttpRequest;i.addEventListener("loadend",(()=>{try{const e=JSON.parse(i.responseText);t(e)}catch(e){this.notifySnackbar(`Failed to log in: ${e.message}`,!0)}})),i.open("GET",`${n}?service=${r}&scope=${a}`),i.send()}else t()},onAuthenticationClose(){this.update({authenticationDialogOpened:!1})},pullUrl:(e,t)=>Kn(t||e&&e.length>0&&e||window.location.host),notifySnackbar(e,t){"string"==typeof e?this.update({snackbarMessage:e,snackbarIsError:t||!1}):e&&e.message&&this.update({snackbarMessage:e.message,snackbarIsError:e.isError})},onSearch(e){this.update({filter:e})},baseRoute:"([^#]*?)/(\\?[^#]*?)?(#!)?(/?)",router:ir,version:"2.2.1",truthy:er,stringToArray:function(e){return e&&"string"==typeof e?e.split(","):[]}},template:(e,t,n,r)=>e('
      ',[{type:n.TAG,getComponent:r,evaluate:e=>"material-navbar",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"search-bar",slots:[],attributes:[{type:t.EVENT,name:"on-search",evaluate:e=>e.onSearch}],redundantAttribute:"expr1",selector:"[expr1]"},{type:n.IF,evaluate:e=>"true"!==e.props.singleRegistry,redundantAttribute:"expr2",selector:"[expr2]",template:e(null,[{type:n.TAG,getComponent:r,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,name:"default-registries",evaluate:e=>e.props.defaultRegistries},{type:t.ATTRIBUTE,name:"read-only-registries",evaluate:e=>e.truthy(e.props.readOnlyRegistries)}]}])}]}],attributes:[],redundantAttribute:"expr0",selector:"[expr0]"},{type:n.TAG,getComponent:r,evaluate:e=>"router",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"catalog",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"catalog-elements-limit",evaluate:e=>e.state.catalogElementsLimit},{type:t.EVENT,name:"on-notify",evaluate:e=>e.notifySnackbar},{type:t.ATTRIBUTE,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication},{type:t.ATTRIBUTE,name:"show-catalog-nb-tags",evaluate:e=>e.truthy(e.props.showCatalogNbTags)}],redundantAttribute:"expr5",selector:"[expr5]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>e.baseRoute}],redundantAttribute:"expr4",selector:"[expr4]"},{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"tag-list",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.router.getTagListImage()},{type:t.ATTRIBUTE,name:"show-content-digest",evaluate:e=>e.truthy(e.props.showContentDigest)},{type:t.ATTRIBUTE,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,name:"filter-results",evaluate:e=>e.state.filter},{type:t.EVENT,name:"on-authentication",evaluate:e=>e.onAuthentication}],redundantAttribute:"expr7",selector:"[expr7]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>[e.baseRoute,"taglist/(.*)"].join("")}],redundantAttribute:"expr6",selector:"[expr6]"},{type:n.TAG,getComponent:r,evaluate:e=>"route",slots:[{id:"default",html:'',bindings:[{type:n.TAG,getComponent:r,evaluate:e=>"tag-history",slots:[],attributes:[{type:t.ATTRIBUTE,name:"registry-url",evaluate:e=>e.state.registryUrl},{type:t.ATTRIBUTE,name:"registry-name",evaluate:e=>e.state.name},{type:t.ATTRIBUTE,name:"pull-url",evaluate:e=>e.state.pullUrl},{type:t.ATTRIBUTE,name:"image",evaluate:e=>e.router.getTagHistoryImage()},{type:t.ATTRIBUTE,name:"tag",evaluate:e=>e.router.getTagHistoryTag()},{type:t.ATTRIBUTE,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,name:"history-custom-labels",evaluate:e=>e.stringToArray(e.props.historyCustomLabels)}],redundantAttribute:"expr9",selector:"[expr9]"}]}],attributes:[{type:t.ATTRIBUTE,name:"path",evaluate:e=>[e.baseRoute,"taghistory/(.*)"].join("")}],redundantAttribute:"expr8",selector:"[expr8]"}]}],attributes:[],redundantAttribute:"expr3",selector:"[expr3]"},{type:n.TAG,getComponent:r,evaluate:e=>"registry-authentication",slots:[],attributes:[{type:t.ATTRIBUTE,name:"realm",evaluate:e=>e.state.realm},{type:t.ATTRIBUTE,name:"scope",evaluate:e=>e.state.scope},{type:t.ATTRIBUTE,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,name:"opened",evaluate:e=>e.state.authenticationDialogOpened}],redundantAttribute:"expr10",selector:"[expr10]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-snackbar",slots:[],attributes:[{type:t.ATTRIBUTE,name:"message",evaluate:e=>e.state.snackbarMessage},{type:t.ATTRIBUTE,name:"is-error",evaluate:e=>e.state.snackbarIsError}],redundantAttribute:"expr11",selector:"[expr11]"},{type:n.TAG,getComponent:r,evaluate:e=>"material-footer",slots:[{id:"logo",html:' ',bindings:[{redundantAttribute:"expr13",selector:"[expr13]",expressions:[{type:t.TEXT,childNodeIndex:0,evaluate:e=>["Docker Registry UI ",e.version].join("")}]}]},{id:"link-list",html:'',bindings:[]}],attributes:[],redundantAttribute:"expr12",selector:"[expr12]"}]),name:"docker-registry-ui"};xt("material-card",Et),xt("material-footer",Ct),xt("material-navbar",{css:null,exports:null,template:(e,t,n,r)=>e('',[{expressions:[{type:t.ATTRIBUTE,name:"role",evaluate:e=>"toolbar"}]},{type:n.SLOT,attributes:[],name:"default",redundantAttribute:"expr104",selector:"[expr104]"}]),name:"material-navbar"}),xt("material-spinner",{css:null,exports:null,template:(e,t,n,r)=>e('',[{redundantAttribute:"expr133",selector:"[expr133]",expressions:[{type:t.ATTRIBUTE,name:"stroke-width",evaluate:e=>e.props.strokewidth||3}]}]),name:"material-spinner"}),xt("material-button",Tt),xt("material-waves",Bt),xt("material-checkbox",At),xt("material-snackbar",kt),xt("material-tabs",Ut),xt("material-dropdown-list",wt),xt("material-popup",Rt),xt("material-input",It);for(var Dr,jr=(Dr=Lr,function(e,t,n){var r=void 0===n?{}:n,a=r.slots,i=r.attributes,o=r.parentScope;return function(){for(var e=arguments.length,t=new Array(e),n=0;n