edge/pkg/sdk/client/dist/client.js

340 lines
302 KiB
JavaScript
Raw Permalink Normal View History

2023-10-25 21:27:41 +02:00
var Edge=(()=>{var JH=Object.create;var Mi=Object.defineProperty,XH=Object.defineProperties,gb=Object.getOwnPropertyDescriptor,QH=Object.getOwnPropertyDescriptors,ZH=Object.getOwnPropertyNames,hb=Object.getOwnPropertySymbols,r6=Object.getPrototypeOf,qb=Object.prototype.hasOwnProperty,e6=Object.prototype.propertyIsEnumerable;var pb=(e,r,t)=>r in e?Mi(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ot=(e,r)=>{for(var t in r||(r={}))qb.call(r,t)&&pb(e,t,r[t]);if(hb)for(var t of hb(r))e6.call(r,t)&&pb(e,t,r[t]);return e},$i=(e,r)=>XH(e,QH(r));var u=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),t6=(e,r)=>{for(var t in r)Mi(e,t,{get:r[t],enumerable:!0})},yb=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ZH(r))!qb.call(e,n)&&n!==t&&Mi(e,n,{get:()=>r[n],enumerable:!(i=gb(r,n))||i.enumerable});return e};var mb=(e,r,t)=>(t=e!=null?JH(r6(e)):{},yb(r||!e||!e.__esModule?Mi(t,"default",{value:e,enumerable:!0}):t,e)),i6=e=>yb(Mi({},"__esModule",{value:!0}),e),sr=(e,r,t,i)=>{for(var n=i>1?void 0:i?gb(r,t):r,a=e.length-1,o;a>=0;a--)(o=e[a])&&(n=(i?o(r,t,n):o(n))||n);return i&&n&&Mi(r,t,n),n};var Kl=(e,r,t)=>new Promise((i,n)=>{var a=c=>{try{s(t.next(c))}catch(l){n(l)}},o=c=>{try{s(t.throw(c))}catch(l){n(l)}},s=c=>c.done?i(c.value):Promise.resolve(c.value).then(a,o);s((t=t.apply(e,r)).next())});var I=u((UPr,bb)=>{var Eu=function(e){return e&&e.Math==Math&&e};bb.exports=Eu(typeof globalThis=="object"&&globalThis)||Eu(typeof window=="object"&&window)||Eu(typeof self=="object"&&self)||Eu(typeof window=="object"&&window)||function(){return this}()||Function("return this")()});var b=u((kPr,Sb)=>{Sb.exports=function(e){try{return!!e()}catch(r){return!0}}});var x=u((BPr,Eb)=>{var n6=b();Eb.exports=!n6(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Li=u((HPr,Ib)=>{var a6=b();Ib.exports=!a6(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var O=u((GPr,Ob)=>{var o6=Li(),Iu=Function.prototype.call;Ob.exports=o6?Iu.bind(Iu):function(){return Iu.apply(Iu,arguments)}});var sa=u(xb=>{"use strict";var Ab={}.propertyIsEnumerable,wb=Object.getOwnPropertyDescriptor,u6=wb&&!Ab.call({1:2},1);xb.f=u6?function(r){var t=wb(this,r);return!!t&&t.enumerable}:Ab});var Ar=u((VPr,Tb)=>{Tb.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var S=u((zPr,Cb)=>{var _b=Li(),Rb=Function.prototype,Yl=Rb.call,s6=_b&&Rb.bind.bind(Yl,Yl);Cb.exports=_b?s6:function(e){return function(){return Yl.apply(e,arguments)}}});var cr=u((KPr,Nb)=>{var Pb=S(),c6=Pb({}.toString),l6=Pb("".slice);Nb.exports=function(e){return l6(c6(e),8,-1)}});var Ne=u((YPr,Mb)=>{var v6=S(),f6=b(),d6=cr(),Jl=Object,h6=v6("".split);Mb.exports=f6(function(){return!Jl("z").propertyIsEnumerable(0)})?function(e){return d6(e)=="String"?h6(e,""):Jl(e)}:Jl});var hr=u((JPr,$b)=>{$b.exports=function(e){return e==null}});var Y=u((XPr,Lb)=>{var p6=hr(),g6=TypeError;Lb.exports=function(e){if(p6(e))throw g6("Can't call method on "+e);return e}});var rr=u((QPr,Db)=>{var q6=Ne(),y6=Y();Db.exports=function(e){return q6(y6(e))}});var Ql=u((ZPr,Fb)=>{var Xl=typeof document=="object"&&document.all,m6=typeof Xl=="undefined"&&Xl!==void 0;Fb.exports={all:Xl,IS_HTMLDDA:m6}});var P=u((rNr,Ub)=>{var jb=Ql(),b6=jb.all;Ub.exports=jb.IS_HTMLDDA?function(e){return typeof e=="function"||e===b6}:function(e){return typeof e=="function"}});var _=u((eNr,Hb)=>{var kb=P(),Bb=Ql(),S6=Bb.all;Hb.exports=Bb.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:kb(e)||e===S6}:function(e){return typeof e=="object"?e!==null:kb(e)}});var D=u((tNr,Gb)=>{var Zl=I(),E6=P(),I6=function(e){return E6(e)?e:void 0};Gb.exports=function(e,r){return arguments.length<2?I6(Zl[e]):Zl[e]&&Zl[e][r]}});var pr=u((iNr,Wb)=>{var O6=S();Wb.exports=O6({}.isPrototypeOf)});var ve=u((nNr,Vb)=>{Vb.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var fe=u((aNr,Qb)=>{var Xb=I(),rv=ve(),zb=Xb.process,Kb=Xb.Deno,Yb=zb&&zb.versions||Kb&&Kb.version,Jb=Yb&&Yb.v8,ie,Ou;Jb&&(ie
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var ii=u(($Fr,QT)=>{var Htr=S(),Gtr=Y(),Wtr=C(),Nd=Ba(),XT=Htr("".replace),Vtr=RegExp("^["+Nd+"]+"),ztr=RegExp("(^|[^"+Nd+"])["+Nd+"]+$"),Pd=function(e){return function(r){var t=Wtr(Gtr(r));return e&1&&(t=XT(t,Vtr,"")),e&2&&(t=XT(t,ztr,"$1")),t}};QT.exports={start:Pd(1),end:Pd(2),trim:Pd(3)}});var a_=u(()=>{"use strict";var Ktr=h(),Md=k(),Ytr=x(),e_=I(),$d=Gi(),t_=S(),Jtr=ki(),ZT=N(),Xtr=Kt(),Qtr=pr(),Ztr=st(),i_=la(),rir=b(),eir=Me().f,tir=lr().f,iir=W().f,nir=ka(),air=ii().trim,Ha="Number",tn=e_[Ha],r_=$d[Ha],Ld=tn.prototype,oir=e_.TypeError,uir=t_("".slice),$s=t_("".charCodeAt),sir=function(e){var r=i_(e,"number");return typeof r=="bigint"?r:cir(r)},cir=function(e){var r=i_(e,"number"),t,i,n,a,o,s,c,l;if(Ztr(r))throw oir("Cannot convert a Symbol value to a number");if(typeof r=="string"&&r.length>2){if(r=air(r),t=$s(r,0),t===43||t===45){if(i=$s(r,2),i===88||i===120)return NaN}else if(t===48){switch($s(r,1)){case 66:case 98:n=2,a=49;break;case 79:case 111:n=8,a=55;break;default:return+r}for(o=uir(r,2),s=o.length,c=0;c<s;c++)if(l=$s(o,c),l<48||l>a)return NaN;return parseInt(o,n)}}return+r},Dd=Jtr(Ha,!tn(" 0o1")||!tn("0b1")||tn("+0x1")),lir=function(e){return Qtr(Ld,e)&&rir(function(){nir(e)})},Ls=function(r){var t=arguments.length<1?0:tn(sir(r));return lir(this)?Xtr(Object(t),this,Ls):t};Ls.prototype=Ld;Dd&&!Md&&(Ld.constructor=Ls);Ktr({global:!0,constructor:!0,wrap:!0,forced:Dd},{Number:Ls});var n_=function(e,r){for(var t=Ytr?eir(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0,n;t.length>i;i++)ZT(r,n=t[i])&&!ZT(e,n)&&iir(e,n,tir(r,n))};Md&&r_&&n_($d[Ha],r_);(Dd||Md)&&n_($d[Ha],tn)});var o_=u(()=>{var vir=h();vir({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var s_=u((UFr,u_)=>{var fir=I(),dir=fir.isFinite;u_.exports=Number.isFinite||function(r){return typeof r=="number"&&dir(r)}});var c_=u(()=>{var hir=h(),pir=s_();hir({target:"Number",stat:!0},{isFinite:pir})});var Ds=u((HFr,l_)=>{var gir=_(),qir=Math.floor;l_.exports=Number.isInteger||function(r){return!gir(r)&&isFinite(r)&&qir(r)===r}});var v_=u(()=>{var yir=h(),mir=Ds();yir({target:"Number",stat:!0},{isInteger:mir})});var f_=u(()=>{var bir=h();bir({target:"Number",stat:!0},{isNaN:function(r){return r!=r}})});var d_=u(()=>{var Sir=h(),Eir=Ds(),Iir=Math.abs;Sir({target:"Number",stat:!0},{isSafeInteger:function(r){return Eir(r)&&Iir(r)<=9007199254740991}})});var h_=u(()=>{var Oir=h();Oir({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})});var p_=u(()=>{var Air=h();Air({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})});var Fd=u((rjr,m_)=>{var y_=I(),wir=b(),xir=S(),Tir=C(),_ir=ii().trim,Rir=Ba(),Cir=xir("".charAt),Fs=y_.parseFloat,g_=y_.Symbol,q_=g_&&g_.iterator,Pir=1/Fs(Rir+"-0")!==-1/0||q_&&!wir(function(){Fs(Object(q_))});m_.exports=Pir?function(r){var t=_ir(Tir(r)),i=Fs(t);return i===0&&Cir(t,0)=="-"?-0:i}:Fs});var S_=u(()=>{var Nir=h(),b_=Fd();Nir({target:"Number",stat:!0,forced:Number.parseFloat!=b_},{parseFloat:b_})});var jd=u((ijr,x_)=>{var A_=I(),Mir=b(),$ir=S(),Lir=C(),Dir=ii().trim,E_=Ba(),Ga=A_.parseInt,I_=A_.Symbol,O_=I_&&I_.iterator,w_=/^[+-]?0x/i,Fir=$ir(w_.exec),jir=Ga(E_+"08")!==8||Ga(E_+"0x16")!==22||O_&&!Mir(function(){Ga(Object(O_))});x_.exports=jir?function(r,t){var i=Dir(Lir(r));return Ga(i,t>>>0||(Fir(w_,i)?16:10))}:Ga});var __=u(()=>{var Uir=h(),T_=jd();Uir({target:"Number",stat:!0,forced:Number.parseInt!=T_},{parseInt:T_})});var M_=u(()=>{"use strict";var kir=h(),kd=S(),Bir=V(),Hir=ka(),Gir=$a(),Wir=Cd(),Ud=b(),Vir=RangeError,R_=String,zir=isFinite,Kir=Math.abs,Yir=Math.floor,C_=Math.pow,Jir=Math.round,be=kd(1 .toExponential),Xir=kd(Gir),P_=kd("".slice),N_=be(-69e-12,4)==="-6.9000e-11"&&be(1.255,2)==="1.25e+0"&&be(12345,3)==="1.235e+4"&&be
`)&&e.flags==="s")})});var Bh=u((Dkr,GC)=>{var tlr=b(),ilr=I(),nlr=ilr.RegExp;GC.exports=tlr(function(){var e=nlr("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"})});var ZC=u(()=>{var alr=x(),Vh=I(),eo=S(),olr=ki(),ulr=Kt(),slr=J(),clr=Me().f,WC=pr(),llr=dn(),VC=C(),vlr=hn(),YC=ro(),flr=Zv(),dlr=G(),hlr=b(),plr=N(),glr=H().enforce,qlr=Zt(),ylr=T(),JC=Xs(),XC=Bh(),mlr=ylr("match"),xt=Vh.RegExp,pn=xt.prototype,blr=Vh.SyntaxError,Slr=eo(pn.exec),Qs=eo("".charAt),zC=eo("".replace),KC=eo("".indexOf),Elr=eo("".slice),Ilr=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ci=/a/g,Hh=/a/g,Olr=new xt(ci)!==ci,QC=YC.MISSED_STICKY,Alr=YC.UNSUPPORTED_Y,wlr=alr&&(!Olr||QC||JC||XC||hlr(function(){return Hh[mlr]=!1,xt(ci)!=ci||xt(Hh)==Hh||xt(ci,"i")!="/a/i"})),xlr=function(e){for(var r=e.length,t=0,i="",n=!1,a;t<=r;t++){if(a=Qs(e,t),a==="\\"){i+=a+Qs(e,++t);continue}!n&&a==="."?i+="[\\s\\S]":(a==="["?n=!0:a==="]"&&(n=!1),i+=a)}return i},Tlr=function(e){for(var r=e.length,t=0,i="",n=[],a={},o=!1,s=!1,c=0,l="",f;t<=r;t++){if(f=Qs(e,t),f==="\\")f=f+Qs(e,++t);else if(f==="]")o=!1;else if(!o)switch(!0){case f==="[":o=!0;break;case f==="(":Slr(Ilr,Elr(e,t+1))&&(t+=2,s=!0),i+=f,c++;continue;case(f===">"&&s):if(l===""||plr(a,l))throw new blr("Invalid capture group name");a[l]=!0,n[n.length]=[l,c],s=!1,l="";continue}s?l+=f:i+=f}return[i,n]};if(olr("RegExp",wlr)){for(wt=function(r,t){var i=WC(pn,this),n=llr(r),a=t===void 0,o=[],s=r,c,l,f,v,d,p;if(!i&&n&&a&&r.constructor===wt)return r;if((n||WC(pn,r))&&(r=r.source,a&&(t=vlr(s))),r=r===void 0?"":VC(r),t=t===void 0?"":VC(t),s=r,JC&&"dotAll"in ci&&(l=!!t&&KC(t,"s")>-1,l&&(t=zC(t,/s/g,""))),c=t,QC&&"sticky"in ci&&(f=!!t&&KC(t,"y")>-1,f&&Alr&&(t=zC(t,/y/g,""))),XC&&(v=Tlr(r),r=v[0],o=v[1]),d=ulr(xt(r,t),i?this:pn,wt),(l||f||o.length)&&(p=glr(d),l&&(p.dotAll=!0,p.raw=wt(xlr(r),c)),f&&(p.sticky=!0),o.length&&(p.groups=o)),r!==s)try{slr(d,"source",s===""?"(?:)":s)}catch(q){}return d},Gh=clr(xt),Wh=0;Gh.length>Wh;)flr(wt,xt,Gh[Wh++]);pn.constructor=wt,wt.prototype=pn,dlr(Vh,"RegExp",wt,{constructor:!0})}var wt,Gh,Wh;qlr("RegExp")});var eP=u(()=>{var _lr=x(),Rlr=Xs(),Clr=cr(),Plr=Q(),Nlr=H().get,rP=RegExp.prototype,Mlr=TypeError;_lr&&Rlr&&Plr(rP,"dotAll",{configurable:!0,get:function(){if(this!==rP){if(Clr(this)==="RegExp")return!!Nlr(this).dotAll;throw Mlr("Incompatible receiver, RegExp required")}}})});var to=u((Bkr,iP)=>{"use strict";var gn=O(),rc=S(),$lr=C(),Llr=Js(),Dlr=ro(),Flr=Bt(),jlr=X(),Ulr=H().get,klr=Xs(),Blr=Bh(),Hlr=Flr("native-string-replace",String.prototype.replace),Zs=RegExp.prototype.exec,Kh=Zs,Glr=rc("".charAt),Wlr=rc("".indexOf),Vlr=rc("".replace),zh=rc("".slice),Yh=function(){var e=/a/,r=/b*/g;return gn(Zs,e,"a"),gn(Zs,r,"a"),e.lastIndex!==0||r.lastIndex!==0}(),tP=Dlr.BROKEN_CARET,Jh=/()??/.exec("")[1]!==void 0,zlr=Yh||Jh||tP||klr||Blr;zlr&&(Kh=function(r){var t=this,i=Ulr(t),n=$lr(r),a=i.raw,o,s,c,l,f,v,d;if(a)return a.lastIndex=t.lastIndex,o=gn(Kh,a,n),t.lastIndex=a.lastIndex,o;var p=i.groups,q=tP&&t.sticky,g=gn(Llr,t),y=t.source,m=0,E=n;if(q&&(g=Vlr(g,"y",""),Wlr(g,"g")===-1&&(g+="g"),E=zh(n,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Glr(n,t.lastIndex-1)!==`
`)&&(y="(?: "+y+")",E=" "+E,m++),s=new RegExp("^(?:"+y+")",g)),Jh&&(s=new RegExp("^"+y+"$(?!\\s)",g)),Yh&&(c=t.lastIndex),l=gn(Zs,q?s:t,E),q?l?(l.input=zh(l.input,m),l[0]=zh(l[0],m),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:Yh&&l&&(t.lastIndex=t.global?l.index+l[0].length:c),Jh&&l&&l.length>1&&gn(Hlr,l[0],s,function(){for(f=1;f<arguments.length-2;f++)arguments[f]===void 0&&(l[f]=void 0)}),l&&p)for(l.groups=v=jlr(null),f=0;f<p.length;f++)d=p[f],v[d[0]]=l[d[1]];return l});iP.exports=Kh});var ec=u(()=>{"use strict";var Klr=h(),nP=to();Klr({target:"RegExp",proto:!0,forced:/./.exec!==nP},{exec:nP})});var uP=u(()=>{var Ylr=I(),Jlr=x(),Xlr=Q(),Qlr=Js(),Zlr=b(),aP=Ylr.RegExp,oP=aP.prototype,rvr=Jlr&&Zlr(function(){var e=!0;try{aP(".","d")}catch(c){e=!1}var r={},t="",i=e?"dgimsy":"gimsy",n=function(c,l){Object.defineProperty(r,c,{get:function(){return t+=l,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(a.hasIndices="d");for(var o in a)n(o,a[o]);var s=Object.getOwnPropertyDescriptor(oP,"flags").get.call(r);return s!==i||t!==i});rvr&&Xlr(oP,"flags",{configurable:!0,get:Qlr})});var cP=u(()=>{var evr=x(),tvr=ro().MISSED_STICKY,ivr=cr(),nvr=Q(),avr=H().get,sP=RegExp.prototype,ovr=TypeError;evr&&tvr&&nvr(sP,"sticky",{configurable:!0,get:function(){if(this!==sP){if(ivr(this)==="RegExp")return!!avr(this).sticky;throw ovr("Incompatible receiver, RegExp required")}}})});var fP=u(()=>{"use strict";ec();var uvr=h(),lP=O(),svr=P(),vP=A(),cvr=C(),lvr=function(){var e=!1,r=/[ac]/;return r.exec=function(){return e=!0,/./.exec.apply(this,arguments)},r.test("abc")===!0&&e}(),vvr=/./.test;uvr({target:"RegExp",proto:!0,forced:!lvr},{test:function(e){var r=vP(this),t=cvr(e),i=r.exec;if(!svr(i))return lP(vvr,r,t);var n=lP(i,r,t);return n===null?!1:(vP(n),!0)}})});var pP=u(()=>{"use strict";var fvr=Ht().PROPER,dvr=G(),hvr=A(),dP=C(),pvr=b(),gvr=hn(),Xh="toString",qvr=RegExp.prototype,hP=qvr[Xh],yvr=pvr(function(){return hP.call({source:"a",flags:"b"})!="/a/b"}),mvr=fvr&&hP.name!=Xh;(yvr||mvr)&&dvr(RegExp.prototype,Xh,function(){var r=hvr(this),t=dP(r.source),i=dP(gvr(r));return"/"+t+"/"+i},{unsafe:!0})});var gP=u(()=>{"use strict";var bvr=Da(),Svr=Ad();bvr("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Svr)});var qP=u(()=>{gP()});var Qh=u(()=>{"use strict";var Evr=h(),Ivr=S(),Ovr=Y(),Avr=V(),wvr=C(),xvr=b(),Tvr=Ivr("".charAt),_vr=xvr(function(){return"\u{20BB7}".at(-2)!=="\uD842"});Evr({target:"String",proto:!0,forced:_vr},{at:function(r){var t=wvr(Ovr(this)),i=t.length,n=Avr(r),a=n>=0?n:i+n;return a<0||a>=i?void 0:Tvr(t,a)}})});var io=u((aBr,bP)=>{var Zh=S(),Rvr=V(),Cvr=C(),Pvr=Y(),Nvr=Zh("".charAt),yP=Zh("".charCodeAt),Mvr=Zh("".slice),mP=function(e){return function(r,t){var i=Cvr(Pvr(r)),n=Rvr(t),a=i.length,o,s;return n<0||n>=a?e?"":void 0:(o=yP(i,n),o<55296||o>56319||n+1===a||(s=yP(i,n+1))<56320||s>57343?e?Nvr(i,n):o:e?Mvr(i,n,n+2):(o-55296<<10)+(s-56320)+65536)}};bP.exports={codeAt:mP(!1),charAt:mP(!0)}});var SP=u(()=>{"use strict";var $vr=h(),Lvr=io().codeAt;$vr({target:"String",proto:!0},{codePointAt:function(r){return Lvr(this,r)}})});var tc=u((sBr,EP)=>{var Dvr=dn(),Fvr=TypeError;EP.exports=function(e){if(Dvr(e))throw Fvr("The method doesn't accept regular expressions");return e}});var ic=u((cBr,IP)=>{var jvr=T(),Uvr=jvr("match");IP.exports=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[Uvr]=!1,"/./"[e](r)}catch(i){}}return!1}});var TP=u(()=>{"use strict";var kvr=h(),wP=$e(),Bvr=lr().f,Hvr=wr(),OP=C(),Gvr=tc(),Wvr=Y(),Vvr=ic(),zvr=k(),AP=wP("".endsWith),Kvr=wP("".slice),Yvr=Math.min,xP=Vvr("endsWith"),Jvr=!zvr&&!xP&&!!function(){var e=Bvr(String.prototype,"endsWith");return e&&!e.writable}();kvr({target:"String",proto:!0,forced:!Jvr&&!xP},{endsWith:function(r){var t=OP(Wvr(this));Gvr(r);var i=arguments.length>1?arguments[1]:void 0,n=t.length,a=i===void 0?n:Yvr(Hvr(i),n),o=OP(r);return AP?AP(t,o,a):Kvr(t,a-o.length,a)===o}})});var CP=u(()=>{var Xvr=h(),Qvr=S(),Zvr=Br(),rfr=RangeError,_P=String.fromCharCode,RP=String.fromCodePoint,efr=Qvr([].
`,"\\r":"\r","\\t":" "},Vwr=/^[\da-f]{4}$/i,zwr=/^[\u0000-\u001F]$/;RU.exports=function(e,r){for(var t=!0,i="";r<e.length;){var n=Wwr(e,r);if(n=="\\"){var a=xU(e,r,r+2);if(Bwr(_U,a))i+=_U[a],r+=2;else if(a=="\\u"){r+=2;var o=xU(e,r,r+4);if(!TU(Vwr,o))throw hl("Bad Unicode escape at: "+r);i+=Gwr(Hwr(o,16)),r+=4}else throw hl('Unknown escape sequence: "'+a+'"')}else if(n=='"'){t=!1,r++;break}else{if(TU(zwr,n))throw hl("Bad control character in string literal at: "+r);i+=n,r++}}if(t)throw hl("Unterminated string at: "+r);return{value:i,end:r}}});var FU=u(()=>{"use strict";var Kwr=h(),Ywr=x(),xy=I(),Jwr=D(),pl=S(),Xwr=O(),LU=P(),Qwr=_(),Zwr=he(),rxr=N(),exr=C(),CU=F(),Oy=Hr(),DU=b(),txr=my(),ixr=ut(),PU=xy.JSON,nxr=xy.Number,Hn=xy.SyntaxError,Ty=PU&&PU.parse,axr=Jwr("Object","keys"),oxr=Object.getOwnPropertyDescriptor,fr=pl("".charAt),by=pl("".slice),Sy=pl(/./.exec),NU=pl([].push),Ey=/^\d$/,uxr=/^[1-9]$/,sxr=/^(-|\d)$/,Vo=/^[\t\n\r ]$/,Iy=0,MU=1,cxr=function(e,r){e=exr(e);var t=new wy(e,0,""),i=t.parse(),n=i.value,a=t.skip(Vo,i.end);if(a<e.length)throw Hn('Unexpected extra character: "'+fr(e,a)+'" after the parsed data at: '+a);return LU(r)?Ay({"":n},"",r,i):n},Ay=function(e,r,t,i){var n=e[r],a=i&&n===i.value,o=a&&typeof i.source=="string"?{source:i.source}:{},s,c,l,f,v;if(Qwr(n)){var d=Zwr(n),p=a?i.nodes:d?[]:{};if(d)for(s=p.length,l=CU(n),f=0;f<l;f++)$U(n,f,Ay(n,""+f,t,f<s?p[f]:void 0));else for(c=axr(n),l=CU(c),f=0;f<l;f++)v=c[f],$U(n,v,Ay(n,v,t,rxr(p,v)?p[v]:void 0))}return Xwr(t,e,r,n,o)},$U=function(e,r,t){if(Ywr){var i=oxr(e,r);if(i&&!i.configurable)return}t===void 0?delete e[r]:Oy(e,r,t)},lxr=function(e,r,t,i){this.value=e,this.end=r,this.source=t,this.nodes=i},wy=function(e,r){this.source=e,this.index=r};wy.prototype={fork:function(e){return new wy(this.source,e)},parse:function(){var e=this.source,r=this.skip(Vo,this.index),t=this.fork(r),i=fr(e,r);if(Sy(sxr,i))return t.number();switch(i){case"{":return t.object();case"[":return t.array();case'"':return t.string();case"t":return t.keyword(!0);case"f":return t.keyword(!1);case"n":return t.keyword(null)}throw Hn('Unexpected character: "'+i+'" at: '+r)},node:function(e,r,t,i,n){return new lxr(r,i,e?null:by(this.source,t,i),n)},object:function(){for(var e=this.source,r=this.index+1,t=!1,i={},n={};r<e.length;){if(r=this.until(['"',"}"],r),fr(e,r)=="}"&&!t){r++;break}var a=this.fork(r).string(),o=a.value;r=a.end,r=this.until([":"],r)+1,r=this.skip(Vo,r),a=this.fork(r).parse(),Oy(n,o,a),Oy(i,o,a.value),r=this.until([",","}"],a.end);var s=fr(e,r);if(s==",")t=!0,r++;else if(s=="}"){r++;break}}return this.node(MU,i,this.index,r,n)},array:function(){for(var e=this.source,r=this.index+1,t=!1,i=[],n=[];r<e.length;){if(r=this.skip(Vo,r),fr(e,r)=="]"&&!t){r++;break}var a=this.fork(r).parse();if(NU(n,a),NU(i,a.value),r=this.until([",","]"],a.end),fr(e,r)==",")t=!0,r++;else if(fr(e,r)=="]"){r++;break}}return this.node(MU,i,this.index,r,n)},string:function(){var e=this.index,r=txr(this.source,this.index+1);return this.node(Iy,r.value,e,r.end)},number:function(){var e=this.source,r=this.index,t=r;if(fr(e,t)=="-"&&t++,fr(e,t)=="0")t++;else if(Sy(uxr,fr(e,t)))t=this.skip(Ey,++t);else throw Hn("Failed to parse number at: "+t);if(fr(e,t)=="."&&(t=this.skip(Ey,++t)),fr(e,t)=="e"||fr(e,t)=="E"){t++,(fr(e,t)=="+"||fr(e,t)=="-")&&t++;var i=t;if(t=this.skip(Ey,t),i==t)throw Hn("Failed to parse number's exponent value at: "+t)}return this.node(Iy,nxr(by(e,r,t)),r,t)},keyword:function(e){var r=""+e,t=this.index,i=t+r.length;if(by(this.source,t,i)!=r)throw Hn("Failed to parse value at: "+t);return this.node(Iy,e,t,i)},skip:function(e,r){for(var t=this.source;r<t.length&&Sy(e,fr(t,r));r++);return r},until:function(e,r){r=this.skip(Vo,r);for(var t=fr(this.source,r),i=0;i<e.length;i++)if(e[i]==t)return r;throw Hn('Unexpected character: "'+t+'" at: '+r)}};var vxr=DU(function(){var e="9007199254740993",r;return Ty(e,function(t,i,n){r=n.source}),r!==e}),fxr=ixr&&!DU(function(){return 1/Ty("-0 ")!==-1/0});Kwr({target:"JSON",stat:!0,forced:vxr},{parse:function(r,t){return fxr&&!LU(t)?Ty(r):cxr(r,t)}})
`),t===-1)break;var n=i.slice(0,t);n&&(Ft("message",n),this.emit("message",n))}};Yo.prototype._cleanup=function(){Ft("_cleanup"),this.removeAllListeners()};Yo.prototype.abort=function(){Ft("abort"),this.xo&&(this.xo.close(),Ft("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()};I5.exports=Yo});var sm=u((sVr,T5)=>{"use strict";var A5=br().EventEmitter,G1r=j(),w5=Ye(),W1r=Ur(),Xo=window.XMLHttpRequest,Nr=function(){};function _e(e,r,t,i){Nr(e,r);var n=this;A5.call(this),setTimeout(function(){n._start(e,r,t,i)},0)}G1r(_e,A5);_e.prototype._start=function(e,r,t,i){var n=this;try{this.xhr=new Xo}catch(o){}if(!this.xhr){Nr("no xhr"),this.emit("finish",0,"no xhr support"),this._cleanup();return}r=W1r.addQuery(r,"t="+ +new Date),this.unloadRef=w5.unloadAdd(function(){Nr("unload cleanup"),n._cleanup(!0)});try{this.xhr.open(e,r,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){Nr("xhr timeout"),n.emit("finish",0,""),n._cleanup(!1)})}catch(o){Nr("exception",o),this.emit("finish",0,""),this._cleanup(!1);return}if((!i||!i.noCredentials)&&_e.supportsCORS&&(Nr("withCredentials"),this.xhr.withCredentials=!0),i&&i.headers)for(var a in i.headers)this.xhr.setRequestHeader(a,i.headers[a]);this.xhr.onreadystatechange=function(){if(n.xhr){var o=n.xhr,s,c;switch(Nr("readyState",o.readyState),o.readyState){case 3:try{c=o.status,s=o.responseText}catch(l){}Nr("status",c),c===1223&&(c=204),c===200&&s&&s.length>0&&(Nr("chunk"),n.emit("chunk",c,s));break;case 4:c=o.status,Nr("status",c),c===1223&&(c=204),(c===12005||c===12029)&&(c=0),Nr("finish",c,o.responseText),n.emit("finish",c,o.responseText),n._cleanup(!1);break}}};try{n.xhr.send(t)}catch(o){n.emit("finish",0,""),n._cleanup(!1)}};_e.prototype._cleanup=function(e){if(Nr("cleanup"),!!this.xhr){if(this.removeAllListeners(),w5.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(r){}this.unloadRef=this.xhr=null}};_e.prototype.close=function(){Nr("close"),this._cleanup(!0)};_e.enabled=!!Xo;var O5=["Active"].concat("Object").join("X");!_e.enabled&&O5 in window&&(Nr("overriding xmlhttprequest"),Xo=function(){try{return new window[O5]("Microsoft.XMLHTTP")}catch(e){return null}},_e.enabled=!!new Xo);var x5=!1;try{x5="withCredentials"in new Xo}catch(e){}_e.supportsCORS=x5;T5.exports=_e});var Qo=u((cVr,_5)=>{"use strict";var V1r=j(),wl=sm();function cm(e,r,t,i){wl.call(this,e,r,t,i)}V1r(cm,wl);cm.enabled=wl.enabled&&wl.supportsCORS;_5.exports=cm});var Jn=u((lVr,R5)=>{"use strict";var z1r=j(),lm=sm();function vm(e,r,t){lm.call(this,e,r,t,{noCredentials:!0})}z1r(vm,lm);vm.enabled=lm.enabled;R5.exports=vm});var Xn=u((vVr,C5)=>{"use strict";C5.exports={isOpera:function(){return window.navigator&&/opera/i.test(window.navigator.userAgent)},isKonqueror:function(){return window.navigator&&/konqueror/i.test(window.navigator.userAgent)},hasDomain:function(){if(!window.document)return!0;try{return!!window.document.domain}catch(e){return!1}}}});var M5=u((fVr,N5)=>{"use strict";var K1r=j(),P5=Ii(),Y1r=Jo(),fm=Qo(),J1r=Jn(),X1r=Xn();function Qn(e){if(!J1r.enabled&&!fm.enabled)throw new Error("Transport created when disabled");P5.call(this,e,"/xhr_streaming",Y1r,fm)}K1r(Qn,P5);Qn.enabled=function(e){return e.nullOrigin||X1r.isOpera()?!1:fm.enabled};Qn.transportName="xhr-streaming";Qn.roundTrips=2;Qn.needBody=!!window.document;N5.exports=Qn});var xl=u((dVr,D5)=>{"use strict";var $5=br().EventEmitter,Q1r=j(),L5=Ye(),Z1r=Xn(),rCr=Ur(),jt=function(){};function Oi(e,r,t){jt(e,r);var i=this;$5.call(this),setTimeout(function(){i._start(e,r,t)},0)}Q1r(Oi,$5);Oi.prototype._start=function(e,r,t){jt("_start");var i=this,n=new window.XDomainRequest;r=rCr.addQuery(r,"t="+ +new Date),n.onerror=function(){jt("onerror"),i._error()},n.ontimeout=function(){jt("ontimeout"),i._error()},n.onprogress=function(){jt("progress",n.responseText),i.emit("chunk",200,n.responseText)},n.onload=function(){jt("load"),i.emit("finish",200,n.responseText),i._cleanup(!1)},this.xdr=n,this.unloadRef=L5
`),bu.content.appendChild(Su)),n.add(mu),a.delete(mu),window.ShadyCSS.prepareTemplateStyles(bu,mu),db&&window.ShadyCSS.nativeShadow&&(Su=bu.content.querySelector("style"))!==null&&bu.content.appendChild(Su)}(ir,Pe),d.removeChild(p),(w=window.ShadyCSS)===null||w===void 0?void 0:w.nativeShadow){var vb=Pe.content.querySelector("style");vb!==null&&d.appendChild(vb.cloneNode(!0))}R.insertBefore(d,ur),this._$AA=B,this._$AB=ur}else g.call(this,y,m)},q._$AC=function(y){var m,E=(m=this.options)===null||m===void 0?void 0:m.scope,w=f.get(E);w===void 0&&f.set(E,w=new Map);var R=w.get(y.strings);return R===void 0&&w.set(y.strings,R=new o(y,this.options)),R}}}),(i=globalThis.litElementPolyfillSupport)!==null&&i!==void 0||(globalThis.litElementPolyfillSupport=function(o){var s=o.LitElement;if(window.ShadyCSS!==void 0&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){s._$AJ=!0;var c=s.prototype,l=c.createRenderRoot;c.createRenderRoot=function(){return this.renderOptions.scope=this.localName,l.call(this)}}})});(function(){"use strict";var e=!1,r=[],t=!1,i;function n(){window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}function a(){window.customElements&&customElements.polyfillWrapFlushCallback&&customElements.polyfillWrapFlushCallback(function(m){i=m,t&&i()})}function o(){a(),s()}function s(){window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(window.document),e=!0,c().then(n)}function c(){t=!1;var m=r.map(function(E){return E instanceof Function?E():E});return r=[],Promise.all(m).then(function(){t=!0,i&&i()}).catch(function(E){console.error(E)})}window.WebComponents=window.WebComponents||{},window.WebComponents.ready=window.WebComponents.ready||!1,window.WebComponents.waitFor=window.WebComponents.waitFor||function(m){m&&(r.push(m),e&&c())},window.WebComponents._batchCustomElements=a;var l="webcomponents-loader.js",f=[];(!("attachShadow"in Element.prototype&&"getRootNode"in Element.prototype)||window.ShadyDOM&&window.ShadyDOM.force)&&f.push("sd"),(!window.customElements||window.customElements.forcePolyfill)&&f.push("ce");var v=function(){var m=document.createElement("template");if(!("content"in m)||!(m.content.cloneNode()instanceof DocumentFragment))return!0;var E=document.createElement("template");E.content.appendChild(document.createElement("div")),m.content.appendChild(E);var w=m.cloneNode(!0);return w.content.childNodes.length===0||w.content.firstChild.content.childNodes.length===0}();if((!window.Promise||!Array.from||!window.URL||!window.Symbol||v)&&(f=["sd-ce-pf"]),f.length){var d=function(){var m=function(R){return R},E={createHTML:m,createScript:m,createScriptURL:m},w=window.trustedTypes&&window.trustedTypes.createPolicy("webcomponents-loader",E);return w||E}(),p,q="bundles/webcomponents-"+f.join("-")+".js";if(window.WebComponents.root)p=window.WebComponents.root+q,window.trustedTypes&&window.trustedTypes.isScriptURL(window.WebComponents.root)&&(p=d.createScriptURL(p));else{var g=document.querySelector('script[src*="'+l+'"]');p=d.createScriptURL(g.src.replace(l,q))}var y=document.createElement("script");y.src=p,document.readyState==="loading"?(y.setAttribute("onload",d.createScript("window.WebComponents._batchCustomElements()")),document.write(d.createHTML(y.outerHTML)),document.addEventListener("DOMContentLoaded",s)):(y.addEventListener("load",function(){o()}),y.addEventListener("error",function(){throw new Error("Could not load polyfill bundle"+p)}),document.head.appendChild(y))}else document.readyState==="complete"?(e=!0,n()):(window.addEventListener("load",s),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",s),s()}))})();var Vn=class{constructor(){this.listeners={}}addEventListener(r,t){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push(t)}removeEventListener(r,t){if(!(r in this.listeners))return;let i=this.listeners[r];for(var n=0,a=i.length;n<a;n++)if(i[n]===t){i.splice(n,1);return}}dispatchEvent(r){if(!(r.type in this.listeners))return!0;let t=this.listeners[r.type].s
\f\r]`,du=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,LH=/-->/g,DH=/>/g,_i=RegExp(`>|${Gm}(?:([^\\s"'>=/]+)(${Gm}*=${Gm}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),FH=/'/g,jH=/"/g,GH=/^(?:script|style|textarea|title)$/i,WH=e=>(r,...t)=>({_$litType$:e,strings:r,values:t}),Or=WH(1),n7r=WH(2),Ri=Symbol.for("lit-noChange"),or=Symbol.for("lit-nothing"),UH=new WeakMap,ia=aa.createTreeWalker(aa,129,null,!1),OPr=(e,r)=>{let t=e.length-1,i=[],n,a=r===2?"<svg>":"",o=du;for(let c=0;c<t;c++){let l=e[c],f,v,d=-1,p=0;for(;p<l.length&&(o.lastIndex=p,v=o.exec(l),v!==null);)p=o.lastIndex,o===du?v[1]==="!--"?o=LH:v[1]!==void 0?o=DH:v[2]!==void 0?(GH.test(v[2])&&(n=RegExp("</"+v[2],"g")),o=_i):v[3]!==void 0&&(o=_i):o===_i?v[0]===">"?(o=n!=null?n:du,d=-1):v[1]===void 0?d=-2:(d=o.lastIndex-v[2].length,f=v[1],o=v[3]===void 0?_i:v[3]==='"'?jH:FH):o===jH||o===FH?o=_i:o===LH||o===DH?o=du:(o=_i,n=void 0);let q=o===_i&&e[c+1].startsWith("/>")?" ":"";a+=o===du?l+EPr:d>=0?(i.push(f),l.slice(0,d)+Wm+l.slice(d)+Ut+q):l+Ut+(d===-2?(i.push(void 0),c):q)}let s=a+(e[t]||"<?>")+(r===2?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[$H!==void 0?$H.createHTML(s):s,i]},Ci=class{constructor({strings:r,_$litType$:t},i){let n;this.parts=[];let a=0,o=0,s=r.length-1,c=this.parts,[l,f]=OPr(r,t);if(this.el=Ci.createElement(l,i),ia.currentNode=this.el.content,t===2){let v=this.el.content,d=v.firstChild;d.remove(),v.append(...d.childNodes)}for(;(n=ia.nextNode())!==null&&c.length<s;){if(n.nodeType===1){if(n.hasAttributes()){let v=[];for(let d of n.getAttributeNames())if(d.endsWith(Wm)||d.startsWith(Ut)){let p=f[o++];if(v.push(d),p!==void 0){let q=n.getAttribute(p.toLowerCase()+Wm).split(Ut),g=/([.?@])?(.*)/.exec(p);c.push({type:1,index:a,name:g[2],strings:q,ctor:g[1]==="."?zm:g[1]==="?"?Km:g[1]==="@"?Ym:ua})}else c.push({type:6,index:a})}for(let d of v)n.removeAttribute(d)}if(GH.test(n.tagName)){let v=n.textContent.split(Ut),d=v.length-1;if(d>0){n.textContent=na?na.emptyScript:"";for(let p=0;p<d;p++)n.append(v[p],hu()),ia.nextNode(),c.push({type:2,index:++a});n.append(v[d],hu())}}}else if(n.nodeType===8)if(n.data===BH)c.push({type:2,index:a});else{let v=-1;for(;(v=n.data.indexOf(Ut,v+1))!==-1;)c.push({type:7,index:a}),v+=Ut.length-1}a++}}static createElement(r,t){let i=aa.createElement("template");return i.innerHTML=r,i}};function oa(e,r,t=e,i){var n,a,o,s;if(r===Ri)return r;let c=i!==void 0?(n=t._$Co)===null||n===void 0?void 0:n[i]:t._$Cl,l=pu(r)?void 0:r._$litDirective$;return(c==null?void 0:c.constructor)!==l&&((a=c==null?void 0:c._$AO)===null||a===void 0||a.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,t,i)),i!==void 0?((o=(s=t)._$Co)!==null&&o!==void 0?o:s._$Co=[])[i]=c:t._$Cl=c),c!==void 0&&(r=oa(e,c._$AS(e,r.values),c,i)),r}var Vm=class{constructor(r,t){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){var t;let{el:{content:i},parts:n}=this._$AD,a=((t=r==null?void 0:r.creationScope)!==null&&t!==void 0?t:aa).importNode(i,!0);ia.currentNode=a;let o=ia.nextNode(),s=0,c=0,l=n[0];for(;l!==void 0;){if(s===l.index){let f;l.type===2?f=new Pi(o,o.nextSibling,this,r):l.type===1?f=new l.ctor(o,l.name,l.strings,this,r):l.type===6&&(f=new Jm(o,this,r)),this._$AV.push(f),l=n[++c]}s!==(l==null?void 0:l.index)&&(o=ia.nextNode(),s++)}return a}v(r){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(r,i,t),t+=i.strings.length-2):i._$AI(r[t])),t++}},Pi=class{constructor(r,t,i,n){var a;this.type=2,this._$AH=or,this._$AN=void 0,this._$AA=r,this._$AB=t,this._$AM=i,this.options=n,this._$Cp=(a=n==null?void 0:n.isConnected)===null||a===void 0||a}get _$AU(){var r,t;return(t=(r=this._$AM)===null||r===void 0?void 0:r._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let r=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(r==null?void 0:r.nodeType)===11&&(r=t.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,t=this){r=oa(this,r,t),pu(r)?r===or||r==null||r===""?(this._$AH!==or&&this._$AR(),this._$AH=or):r!==this._$AH&&r!==Ri&&this._(r):r._$litType$!==void 0?this.g(r):r.nodeType!==void 0?this.$(r):IPr(r)?th
<div class="menu-item-icon">
2023-10-25 21:27:41 +02:00
${this.iconUrl?Or`<img src="${this.iconUrl}" />`:""}
</div>
<div class="menu-item-label">
${this.label}
</div>
<div class="menu-item-panel">
<slot></slot>
</div>
2023-10-25 21:27:41 +02:00
`}_handleClick(){this.selected?this.unselect():this.select()}select(){this.selected=!0;let t=new CustomEvent(ub,{bubbles:!0,composed:!0,detail:{element:this}});this.dispatchEvent(t)}unselect(){this.selected=!1;let t=new CustomEvent(sb,{bubbles:!0,composed:!0,detail:{element:this}});this.dispatchEvent(t)}};kt.styles=it`
:host {
display: inline-block;
height: 100%;
flex: 1;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-bottom: 1px solid rgb(229,231,235);
border-top: 10px solid transparent;
transition: all 100ms ease-out;
background-color: #fff;
}
:host(:hover) {
background-color: rgb(249,250,251);
}
:host(.selected) {
border-top: 10px solid #03A9F4;
border-bottom: 1px solid transparent;
background-color: #fff;
}
:host(.unselected) {
background-color: hsl(210 20% 95% / 1);
}
.menu-item-icon {
height: 30px;
width: 30px;
overflow: hidden;
}
.menu-item-icon > img {
width: 100%;
height: 100%;
}
.menu-item-panel {
display: none;
position: fixed;
top: 65px;
left: 0;
right: 0;
z-index: 9999;
background-color: #fff;
box-shadow: 0px 4px 5px 0px hsl(0deg 0% 0% / 10%);
max-height: 75%;
overflow-y: auto;
}
:host(.selected) .menu-item-panel {
display: block;
}
.menu-item-label {
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
color: black;
font-size: 14px;
margin: 3px 0;
}
2023-10-25 21:27:41 +02:00
`,sr([dr({attribute:"icon-url",type:String})],kt.prototype,"iconUrl",2),sr([dr({attribute:"label",type:String})],kt.prototype,"label",2),sr([KH()],kt.prototype,"selected",2);var cb="/edge/api/v1",lb=(a=>(a[a.visitor=0]="visitor",a[a.user=1]="user",a[a.superuser=2]="superuser",a[a.admin=3]="admin",a[a.superadmin=4]="superadmin",a))(lb||{}),te=class extends Mr{constructor(){super();this._apps=[];this._loading=!1;this.addEventListener(ub,this._handleMenuItemSelected.bind(this)),this.addEventListener(sb,this._handleMenuItemUnselected.bind(this)),this._fetchApps(),this._fetchProfile()}render(){let t=this._renderApps();return Or`
<edge-menu-item name='menu' label="${this.appTitle||"App"}" icon-url='${this.appIconUrl||eb}'>
<edge-menu-sub-item name='home' label='Home' icon-url='${nb}' link-url='/'></edge-menu-sub-item>
<slot></slot>
</edge-menu-item>
${this._renderApps()}
${this._renderProfile()}
2023-10-25 21:27:41 +02:00
`}_fetchApps(){return this._loading=!0,fetch(`${cb}/apps`).then(t=>t.json()).then(t=>{var i;if(t.error)throw new Error(`Unexpected server error: ${t.error.code}`);return((i=t.data)==null?void 0:i.manifests)||[]}).then(t=>{let i=t.map(n=>{let a={method:"POST",body:JSON.stringify({}),headers:{"Content-Type":"application/json"}};return fetch(`${cb}/apps/${n.id}/url`,a).then(o=>o.json()).then(o=>{var s;if(o.error)throw new Error(`Unexpected server error: ${o.error.code}`);return n.url=(s=o.data)==null?void 0:s.url,n})});return Promise.all(i)}).then(t=>{this._loading=!1,this._apps=t}).catch(t=>{console.error(t),this._loading=!1})}_fetchProfile(){return fetch(`${cb}/profile`).then(t=>t.json()).then(t=>{var i;if(t.error)switch(t.error.code){case"unauthorized":return null;default:throw new Error(`Unexpected server error: ${t.error.code}`)}return(i=t.data)==null?void 0:i.profile}).then(t=>{this._profile=t}).catch(t=>console.error(t))}_renderApps(){let t;return this._loading?t=[Or`<edge-loader></edge-loader>`]:t=this._apps.filter(i=>this._canAccess(i)).map(i=>{var a,o;let n=(i.url||"")+(((o=(a=i.metadata)==null?void 0:a.paths)==null?void 0:o.icon)||"")||gu;return Or`
<edge-menu-sub-item
name='${i.id}'
label='${i.title}'
icon-url='${n}'
link-url='${i.url||"#"}'>
</edge-menu-sub-item>
`}),Or`
<edge-menu-item name='apps' label='Apps' icon-url='${tb}'>
${t}
</edge-menu-item>
2023-10-25 21:27:41 +02:00
`}_canAccess(t){var a,o;let i=((a=this._profile)==null?void 0:a.edge_role)||"visitor",n=((o=t.metadata)==null?void 0:o.minimumRole)||"visitor";return lb[i]>=lb[n]}_renderProfile(){let t=this._profile;return Or`
<edge-menu-item name='profile' label="${(t==null?void 0:t.preferred_username)||"Profile"}" icon-url='${rb}'>
${t&&t.iss!="anon"?Or`<edge-menu-sub-item name='login' label='Logout' icon-url='${ab}' link-url='/edge/auth/logout'></edge-menu-sub-item>`:Or`<edge-menu-sub-item name='login' label='Login' icon-url='${ib}' link-url='/edge/auth/login'></edge-menu-sub-item>`}
</edge-menu-item>
2023-10-25 21:27:41 +02:00
`}_handleMenuItemSelected(t){let i=t.detail.element;i.classList.add("selected"),i.classList.remove("unselected");for(let n,a=0;n=this._menuItems[a];a++)n!==i&&(n.unselect(),n.classList.add("unselected"))}_handleMenuItemUnselected(t){if(t.detail.element.classList.remove("selected"),this.renderRoot.querySelectorAll("edge-menu-item.selected").length===0)for(let a,o=0;a=this._menuItems[o];o++)a.classList.remove("unselected")}};te.styles=it`
:host {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 60px;
background-color: #fff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
z-index: 9999;
}
:host([hidden]) {
display: none;
}
2023-10-25 21:27:41 +02:00
`,sr([dr({attribute:"app-icon-url",type:String})],te.prototype,"appIconUrl",2),sr([dr({attribute:"app-title",type:String})],te.prototype,"appTitle",2),sr([dr({attribute:"hidden",type:Boolean})],te.prototype,"hidden",2),sr([dr()],te.prototype,"_apps",2),sr([dr()],te.prototype,"_profile",2),sr([dr()],te.prototype,"_loading",2),sr([YH("edge-menu-item")],te.prototype,"_menuItems",2);var at=class extends Mr{render(){return Or`
<a href="${this.linkUrl?this.linkUrl:"#"}">
<img class="edge-menu-sub-item-icon" src="${this.iconUrl?this.iconUrl:gu}" />
<span class="edge-menu-sub-item-label">${this.label}</span>
</a>
2023-10-25 21:27:41 +02:00
`}};at.styles=it`
:host {
display: block;
flex: 1;
cursor: pointer;
transition: all 100ms ease-out;
border-bottom: 1px solid rgb(229,231,235);
padding: 5px 0 5px 7px;
border-left: 5px solid transparent;
}
:host([inactive]) {
cursor: initial;
}
:host(:hover) {
border-left: 5px solid #03A9F4;
background-color: rgb(28 169 247 / 10%);
}
a {
font-size: 20px;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
text-decoration: none;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
height: 40px;
color: black;
}
.edge-menu-sub-item-icon {
height: 25px;
width: 25px;
}
.edge-menu-sub-item-label {
margin-left: 5px;
}
2023-10-25 21:27:41 +02:00
`,sr([dr({attribute:"label"})],at.prototype,"label",2),sr([dr({attribute:"icon-url"})],at.prototype,"iconUrl",2),sr([dr({attribute:"link-url"})],at.prototype,"linkUrl",2),sr([dr({attribute:"inactive",type:Boolean})],at.prototype,"inactive",2);var Vl=class extends Vn{constructor(){super();this.debug=!1,this._handleWindowMessage=this._handleWindowMessage.bind(this),this._initObservers=this._initObservers.bind(this),window.addEventListener("load",this._initObservers),window.addEventListener("message",this._handleWindowMessage)}post(t,i=window.parent){i&&(this._log("sending crossframe message",t),i.postMessage(t,"*"))}_log(...t){this.debug&&console.log(...t)}_handleWindowMessage(t){let i=t.data;if(!i||!i.type||!i.data)return;let n=new CustomEvent(i.type,{cancelable:!0,detail:i.data});this.dispatchEvent(n)}_initObservers(){this._initResizeObserver(),this._initTitleMutationObserver()}_initTitleMutationObserver(){let t=new MutationObserver(n=>{let a=n[0].target.textContent;this.post({type:"title_changed",data:{title:a}})}),i=document.querySelector("title");i&&(this.post({type:"title_changed",data:{title:i.textContent}}),t.observe(i,{subtree:!0,characterData:!0,childList:!0}))}_initResizeObserver(){let t=new ResizeObserver(()=>{let n=document.documentElement.getBoundingClientRect(),a=n.height,o=n.width;this.post({type:"size_changed",data:{height:a,width:o}})});document.body&&t.observe(document.documentElement)}};var qu="edge-auto-padding",zl=class{constructor(){this._items={},this._handleLoad=this._handleLoad.bind(this),window.addEventListener("load",this._handleLoad)}setItem(r,t,i){return this._items[r]={label:t,iconUrl:i!=null&&i.iconUrl?i==null?void 0:i.iconUrl:"",linkUrl:i!=null&&i.linkUrl?i==null?void 0:i.linkUrl:"#",order:i!=null&&i.order?i==null?void 0:i.order:0},this._render(),this}removeItem(r){return delete this._items[r],this._render(),this}setAppIconUrl(r){return this._appIconUrl=r,this._render(),this}setAppTitle(r){return this._appTitle=r,this._render(),this}show(){this._hidden&&(this._hidden=!1,this._previousBodyAutoPadding?document.body.setAttribute(qu,this._previousBodyAutoPadding):document.body.removeAttribute(qu),this._render())}hide(){this._hidden||(this._hidden=!0,this._previousBodyAutoPadding=document.body.getAttribute(qu),document.body.setAttribute(qu,"false"),this._render())}_handleLoad(){this._init()}_init(){this._initMenu(),this._initGlobalStyle()}_initMenu(){let r=document.createElement("edge-menu");document.body.appendChild(r),this._menu=r,this._render()}_initGlobalStyle(){let r=document.createElement("style");r.textContent=`
body:not([${qu}="false"]) {
padding-top: 60px;
}
2023-10-25 21:27:41 +02:00
`,document.head.appendChild(r)}_render(){if(!this._menu)return;this._hidden?this._menu.setAttribute("hidden","true"):this._menu.removeAttribute("hidden"),this._appIconUrl?this._menu.setAttribute("app-icon-url",this._appIconUrl):this._menu.removeAttribute("app-icon-url"),this._appTitle?this._menu.setAttribute("app-title",this._appTitle):this._menu.removeAttribute("app-title");let r=[],t=Object.keys(this._items).map(i=>ot({name:i},this._items[i])).sort((i,n)=>i.order-n.order);for(let i,n=0;i=t[n];n++){let a=document.createElement("edge-menu-sub-item");a.label=i.label,a.iconUrl=i.iconUrl,a.linkUrl=i.linkUrl,r.push(a)}this._menu.replaceChildren(...r)}};var yu=class extends Mr{constructor(){super()}render(){return Or`
<div class="container">
<img class="icon" src="${ob}" />
Chargement en cours
</div>
`}};yu.styles=it`
:host {
display: inline-block;
height: 100%;
width: 100%;
border-bottom: 1px solid rgb(229,231,235);
border-top: 10px solid transparent;
background-color: #fff;
min-height: 50px;
padding: 10px 0;
}
.container {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
font-size: 14px;
color: black;
}
.icon {
height: 35px;
animation-duration: 3s;
animation-name: spin;
animation-iteration-count: infinite;
}
@keyframes spin {
from {
transform: rotateZ(0deg);
}
to {
transform: rotateZ(360deg);
}
}
`;customElements.define("edge-menu",te);customElements.define("edge-menu-item",kt);customElements.define("edge-menu-sub-item",at);customElements.define("edge-loader",yu);var $Pr=new Ul,LPr=new Vl,DPr=new zl;return i6(FPr);})();
/*! Bundled license information:
@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js:
(**
@license @nocompile
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*)
lit/polyfill-support.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@webcomponents/webcomponentsjs/webcomponents-loader.js:
(**
* @license
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*)
@lit/reactive-element/css-tag.js:
(**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/reactive-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/lit-html.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-element/lit-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
lit-html/is-server.js:
(**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/custom-element.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/property.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/state.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/base.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/event-options.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/query.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/query-all.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/query-async.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/query-assigned-elements.js:
(**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
@lit/reactive-element/decorators/query-assigned-nodes.js:
(**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*)
*/
//# sourceMappingURL=client.js.map