From 77ee5ffa5441f4a8bd41f4cd01f9d7b5afd0213a Mon Sep 17 00:00:00 2001 From: krumware Date: Wed, 16 Oct 2024 15:51:53 +0000 Subject: [PATCH] CI Build Artifacts --- assets/app-launcher/app-launcher-0.1.32.tgz | Bin 0 -> 2712 bytes assets/index.yaml | 34 +++++++-- assets/pirate-locale/pirate-locale-0.1.2.tgz | Bin 2013 -> 2012 bytes charts/app-launcher/0.1.32/Chart.yaml | 19 +++++ charts/app-launcher/0.1.32/README.md | 70 ++++++++++++++++++ .../0.1.32/templates/_helpers.tpl | 52 +++++++++++++ charts/app-launcher/0.1.32/templates/cr.yaml | 12 +++ charts/app-launcher/0.1.32/values.yaml | 6 ++ extensions/app-launcher/0.1.32/files.txt | 7 ++ .../plugin/app-launcher-0.1.32.umd.min.1.js | 2 + .../app-launcher-0.1.32.umd.min.1.js.map | 1 + .../plugin/app-launcher-0.1.32.umd.min.2.js | 2 + .../app-launcher-0.1.32.umd.min.2.js.map | 1 + .../plugin/app-launcher-0.1.32.umd.min.js | 16 ++++ .../plugin/app-launcher-0.1.32.umd.min.js.map | 1 + .../app-launcher/0.1.32/plugin/package.json | 21 ++++++ 16 files changed, 238 insertions(+), 6 deletions(-) create mode 100644 assets/app-launcher/app-launcher-0.1.32.tgz create mode 100644 charts/app-launcher/0.1.32/Chart.yaml create mode 100644 charts/app-launcher/0.1.32/README.md create mode 100644 charts/app-launcher/0.1.32/templates/_helpers.tpl create mode 100644 charts/app-launcher/0.1.32/templates/cr.yaml create mode 100644 charts/app-launcher/0.1.32/values.yaml create mode 100644 extensions/app-launcher/0.1.32/files.txt create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js.map create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js.map create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.js create mode 100644 extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.js.map create mode 100644 extensions/app-launcher/0.1.32/plugin/package.json diff --git a/assets/app-launcher/app-launcher-0.1.32.tgz b/assets/app-launcher/app-launcher-0.1.32.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ac8e84fefdf62e37db230716c5f70d8cdd22eb88 GIT binary patch literal 2712 zcmV;J3TO2niwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI@(Z`?NW&(HcRrkih($Jf%XA93y$O@W-77Dm%Hh?5rmso_#1 ziD!yr_}KNH)BpW2q@;ah9lO^w?cq!yh%A!Bd46VwT4qcxSx~$|J3eWc^~I94^3KN` zlgVUqd~_85pG+p(|L-3@I=r)g^muak_?Z6Pp*P2m@4)1va&g57&NF*w^1IL47Vf`f zFr~C-UTEc}831RVNnID5c`vaLdd$&!Q3))kU|DpNoy$t$jAYAPu@`6(p%b~6*iHXo0RgAFd25kK}T<_8%wX83bb z>=%azS&5EYVSIeIZa}~bkBZhpr7gVdd_!9%BmpcdoL5pP=Y|kW|ESD zw*fPNF32`k11NpMc!N`@m~?m>d4Jup5&s@rBbi4x{-r@_(7M8#-wy@X#Q)*sV1FzA zkM|!P-Nyf?7?+phhuO0W!&C{rL7>nFUBzb}+kx!i_}5>v%gY=}tb{@s4S70uXy<4P z+BAZEwTuPnp-An-_e8PyF{PGuWPx`CB8tQDVSE(rS*R*;0i%2b9W7KPJ!X;36N}6v zu;B#4swKP)OvVb8vVRny$bP~^JFfS10tw?_hMWb5;B<@dZJ41|=+PyyD}l0fz$}6k zt?*ca*WerB;QnkGRr1yMXS7zR8k|A?pvX=uuqctaPIpw~Fri%1UV0}yEQFLWLkN!e zbig9>9k{6U9q6(D}b8#PrF{ExY1zP)8zCyiB@EdwV`N zUj9brj1|gPF#6o(pS#f(t#s(k{cQK+ru(hgm4c>AfMnBX+s;waD#>OjZ(`rLd}Z8i zq1N@Cp1V37-ho9U8AllX{|H9EjDCAm>9*A>vFdKXYFe0hZBVv_YsQiNDO_HHP+W%c z10oiQi4QDvD3N<@pLYipYwpxZ|8!_nXpR|EoDZ=~ozGDEUtaFm@($hx?Qu&R?^8*Q zSeeh3iBRuaXK3ewZ|_gqJnNXhxjwhW&3E#WI-U>eE#X74TNa_5XNu#dBIPub}m#oh1aJqVhfnH=vm1; zqh9a^n6#=}A}*yp-6h>N5XIMNRRYgzXv-l#yaOdviORzf?Wf9&_*-?Y{~51CcN;g} zci7I+!u_o(Xf3hywNN^^*y@cRJScv!q85tDo<6G5XrcT^xG}4n+^`zmc`d-~OP&x*GExMy60|HsEi$J^h3_789I|C5Zn{muR6 z<^HoCM6&F|^B|~~b)q#AVTm4$UZAal1h2J>p9Vy0te#Wb%Q-qHWtkA&$m%(|o zE*{6Va$1U#+Bn}}3qpAf41!Ac2es5QCRbb$pce3x@C_(rUM@k~nkn%wEP*pyx+otq z-V6d@2`;qpUTSgl%Ap1Au$ zv^6-(pNxuesks}AHl{dZaV~IC7*&s8Axhso89kbOJ_08FlhGB9+HHbJWAtT~-MtH6 zBlE$c%d#9^cTTWj{isDIj-lEQf)1@unq zmc3;t%yal|!xAnSqpgo?X;-}Q8U*K7I|rp8!;`pultrb!cC1Evx(idXY>UKHAKpc*`zaOc>}(&I@C?ne|IIRXa7X*9r%X%6d$B0;1;R;6HGd2*c{jN z-|^aWSZp(Pk|v0^SB-GV>aNiX&InAd4fAy`*dtc;qKjQRoewTS;9)R{+Hc+A5=AV~ z9)1w=`qz#s2*v5&r| z+tG*23AAfjNh`2ukP$yl5IE)Vz4kawP9q%fU~MvUe|Maie#L4SrE^B z>#-m2hso`L`A$owclr%Li~boekhyMWLdEcr66TSEHC$xBG^}?aO z=Rj)CWSpfmon^0j0>I#Gx9iMQWCukrUHZsmS}4&V_3WI$C%9e+uG^Lj|7OXo>Lq+rWQPU34C-n*qch0m z3V8-XPhXrq`JykB{=xV;suEtmeEucGBTAgViTFb4+gmXUN&i2S0DSEgw9Hcm`3z1g z67QZxkXol&OarQhsRS=j1r@nsa=_N8q7~=braUE-(sSkoJ(kF>ExoE>eS>xn76=Pw zTap+h*DZnxl1kUN0iAaRJV$@eQLTuZmEsE3q1848UtUpNSW2>7jdZ|gQ6p!m2*|P| zF`(i)C_)pamLQx9RF6hM;<3>)H5Cta-Tk=-rgLN=hoT!uw{bgA@qUiBfS-^QN>&rT z`|?I=5M>NZaIL0VHbTW(wHqis`R*PO&A(k`7&%6BVg$mI%I=vP*X=xg?7^{b} zjNlQy775QNJ5&{U-Hr_0H81N5H{FlmHY_sKn5zn`s{(8kDOzUe6+XMYin$%P<97T3 S= v1.16.0-0 < v1.30.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < v2.9.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins + catalog.cattle.io/ui-version: '>= 2.7.2 < v2.9.0-0' + apiVersion: v2 + appVersion: 0.1.32 + created: "2024-10-16T15:51:30.241909281Z" + description: App Launcher extension for Rancher + digest: 4619cbb3ec1384fa8228e6b2f4a57dd8ff42787d0e109e0c28cd6625827ef8d6 + icon: https://raw.githubusercontent.com/krumIO/krum-rancher-extensions/main/pkg/app-launcher/icon.svg + name: app-launcher + type: application + urls: + - assets/app-launcher/app-launcher-0.1.32.tgz + version: 0.1.32 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: 'Krum Platform Tools: App Launcher' @@ -517,22 +539,22 @@ entries: pirate-locale: - annotations: catalog.cattle.io/certified: rancher - catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0' + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.29.0-0' catalog.cattle.io/namespace: cattle-ui-plugin-system catalog.cattle.io/os: linux catalog.cattle.io/permits-os: linux, windows - catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.9.0-0' catalog.cattle.io/scope: management catalog.cattle.io/ui-component: plugins apiVersion: v2 appVersion: 0.1.2 - created: "2023-08-15T19:20:59.427284663Z" + created: "2024-10-16T15:51:30.242102923Z" description: pirate-locale plugin - digest: ea65ac9760e8bae6249a3623972288feeb6d9005c858d6f2f1f0e43ef819b78a + digest: 3c06407e8ca99cb554f40d71e8e1423c7df2e55bcba2ef3fd35ade1a08de67d9 name: pirate-locale type: application urls: - - https://github.com/krumIO/krum-rancher-extensions-demo/releases/download/pirate-locale-0.1.2/pirate-locale-0.1.2.tgz + - assets/pirate-locale/pirate-locale-0.1.2.tgz version: 0.1.2 - annotations: catalog.cattle.io/certified: rancher @@ -553,4 +575,4 @@ entries: urls: - assets/pirate-locale/pirate-locale-0.1.1.tgz version: 0.1.1 -generated: "2024-07-15T23:42:28.197266462Z" +generated: "2024-10-16T15:51:30.241537865Z" diff --git a/assets/pirate-locale/pirate-locale-0.1.2.tgz b/assets/pirate-locale/pirate-locale-0.1.2.tgz index 296316441c63b7c78787c8b795783c7653b645ec..6f53c527aa2babf240087634eabbf73b1e339c23 100644 GIT binary patch delta 1974 zcmV;n2TAzd58MxsJb!I-+cpx;Xa0({avdc-38G}jp3^kF$vL^J?{Z1TPMXQ5&Wc=$ zh(Le=K*_Ar|9%62)LZ1(y?Wf~R2a{Q1{aHGU$G08T%)DFPzeeeoaU%4tFaId?r_9$ z93LMY`QJE>w}0c4_+MQGt?Bc!?_)Ucc|9ksc}ipGbfT;h;(v?D;A$>Gki>~_$-wH0B7nxP zHmCulI>jWXF=QwVMZdR@`*H2qjDJf-DbSJ`{FIX@NgHO%-<%3=i2uWQG~9~+Og-*hJTf?z(O_o%5h{rhLdGIv%qJUL}UWThyIZl7gd(=OX&1F(C{Ley2r@FJk^Aj z0GB(sTvfxT3Wcvw+=1r>V9|RDygj{jJ2+tsOen$15ExYu{HL0bmSo8Uu`^C0HGrBx z@Pb=P!78vhH}GgudzCzYb>V2aoPsGSdCa1-41Y8ULeuCjQPLupCTK6raSIDB1WX7j z<8T^4557TrvxeKOywWnymP*}D*{$-feSaIp3$x_&7ca#4>Fq7M!njmNV8YIWuEN?D z=f>o(1XpS*36uB-nNeRo~p4fWqJK0Ms2|DKHY{onnJ^$UnEFD>T7XvSqahIeOg!fiuA z7E`q7dcj-dq*dMG^HNyTT=r}yB0n9dLh`(Uw^*JJpFwh&lC*H-*1O8g;ahdB|9>CW zWq0crJ~C9yNyDS9DroIsX=|adG27~mA3tWVHJ@^cqUBFAEftq`47s(X84m^;7i`LH zUQH@P+Eq^^ElX4}nCYrGd+mSv?RC{s1~ZuE{Sv2S25WPh!5waXyfWJM+?ik#bMtC{ z68uTVri+}vc=r6iFIbV@=^i)s|9^43eg8i?iud{dKE^|M<2?XghD+raZT5(wXIevn zmg=6XylZmpD?)}6RM+=728FG`5T16>sd zaFKJDwhIEwiwSAd13|WHAjf%g5s+097To5bDh(;k`zGh*K@`1Gmd5ZlZ#Oi4!ypbf zK$lpQB1nuHGOY?Pr|;}1nlN=Nv*vCd1eeo*u^>&N1};Qptb1o5R|_yzk^{oeC~M#; zp@u|NBJ~PNa!zwf8Fb%rr+*Bm?y!-{;G+_PXU$c=-{B*cWO}gh;4BFd%yAG!|5Q4l zcVx;sb+>XfA0>KVh*l?3IF0-f)Eqm5)%TfZsfnV858(&30IT45cQ9CR61sxV0 zGPkE+xjg*ZC0Z@g8amJ3oIU-nb+3P5GIQO|yYrXdgXfjfyu;RIcxNbz-a8hK>op@khNS+P0z=Z zU)y~72`!^TkZM(?YJVYn-kf0`IstEo!G|>jTw2nZE3y1tlvE1`*F$h%1)sS%w7Mdg zR7rx8NFR8eoGNKGpHw!a1tB0unHq5WQ!+b%vo<|A&W@Q?E@+`pnl@w&_i1Zp>On>% zAk#$dU4b4%>HJ#Lr;3ba@Sb2nB5{H097KuKXP)4}0%aIi=uNX z$mNz^aQ9V4TMEkHxsqKQR&ongDKMnDs*I=^{NQp?R!N_mKqzG>n6$upLXCHMH>e4w zK_+h7MBJ#D%P%Ixk!%08GpHz2La2o^iy<^UmkE6!aWV({B5yzT<4-*P7XSeN|8F;1 I(f}j?00%?MvH$=8 delta 1975 zcmV;o2T1tb58V%tJb!y{8#fZq-}@=X$`wv}67{enc6*RF7X zkbzPviCCJ8`_7KNIz6s;A+xay~*Ezdb+6VNErg7jXpxtmgNLE3O7Cvg1zLm0B* zm<@UZ_zs3_^f&)_ymzU@l1zmuO(0J89Pd@a&A9BD+E^<0E>mU#f=l;d@7s!W$*t+F zsJgJ^GE+;lmw&twZCip7J8J|Ou`l2^sj6rKB}$x8Nz(46a=e$SvQm2D9OmAnpZYVZ3Sz?Bk}6nd6n4OBf_c@JPpQ87TauB_TP^G1qw&z zYbSu~;(vJhU?=`hhvV@f{%>P=?|HExt$9Wh=ya0Y34ig)WOOy3AV}g=_+((UqXeMw zt1W5(sUBlm&;)W6hLYb~$iw*T*p7coWhKy(>Hk!as7M=TtKXaou8IGX!DzS>|KpS4 z*&+UKV_aSJzfGQgs8D8L3j!bdpz`pXhH5bRw*Sj7$<v!7XqdP z&Ul;#Fo18+Ua#RcE3dW8^OaI}Q+BJo&%VEj;)Pl9`AZOD^6=)CU1MCSBQjwZQCD$o zi*sx8SAwfFmo|saH>UTE>Fn@|o8H{d_CIdB--ca%&@>02w`s6#<0z3z;FQEo>>J3} z#(&)vYE$3wxhWIjBWS7wrUae8cA)c9=hsJ-DoZ6JRC5EUkuYK{NR-SJ{Q!RgS69Gg zDqQvj5m^NB1wuoDQmgc{W+S%YPL1@BR&}y}hgHSqt628M_Nv;wy4thkBfNLY(vCJh z-9NiTT1yFP03vH^c{eShwX+uMsJR{3AlTg(q^zbsrDi!!BcNj9Uf z5##qhkPhQk$LH$5RDZoL@S6H>I5;`kssA2~4*lQljLi#(PcJPN!(`57Hi6gYFXL@P zNftA-=zGB%eu_q%;Q^kt$+U? z)>U^K7Tz;dE=a?@ohoSKU}`KW(!|l04EH zO0-mWedS$~Z(k8|l%S47k7H2S8Vq5kW*~S@-G(aXGUM_XYSM;84qOI$&1Z#$(5*0d z<=g6G(hb{pYEEzw)7lyY*a9tJ=DTu`v~0l!cjZ5at8E5vRj=@Wp&vt-Dt~``fyzO< z@(3;q?$dTjV0k$uZMq=H9vdid(Od-NPQsGg0+iE`(V}MxUL7ULb7g4)uZng<6E=+E za0B!K%SuFvQA4g(8RQI|{ZtcXo@L(L&4b`_7BQBjNz}lFaK`#~1`4$VZ7%84u}C@nZGC}VK^ihp}$cy-5(R1WWy5Ik?L`oj+Iup-liWdLVMh-i+ZB>AV( z5xpl<)~mafqxmS&1w*txk>Y6-j-ck)>94=fG)qmA+`S7ws3lkh7fvS0kilc2B*nc7 zZ)Z)FGTbU%d#c*o#ET_~B_jsszCjTpUP4tRWK@wq(^F0+8V8{u)PJ^yPL0}IAuQ;y z!^+j+*Dld&nbpvF^z!`ScddK<1Jk+hc3xjR`yK+Xj20cXDZ^_+N%F?C@LWF= zA}s{UyyG9o3m%CJK118M|H`FbpSMw<#Bu8prXrjl!M~lcFjK8oFin+{77SU-<;-+L zJcYH*m!H@&dIXtPRez?IvK!19=b;nvb{M?fK)|IXo%<3i+(k*X^l$?N4_5HGk3*{+ z!PKQGN+Nv}bn;k9tNGN~m==V90%c~v?@#Ic2+rH|;5mC{R{5ZXQfbjK24t#9HIYXI|W=V2E zCHdUajqbkAXe&V(JW=x4#+BTHRSFDguAC7ygCBe@%AE|k34~IHqDf1vr_^{?aD$p) z7G>hLO~j3gxiD-(9Jvl(JEMwnC4^dfvlv3t^_egP5+`$XDDn>DF#g2je*pjh|Nq=i JNi6^*002mr)@uL& diff --git a/charts/app-launcher/0.1.32/Chart.yaml b/charts/app-launcher/0.1.32/Chart.yaml new file mode 100644 index 0000000..72daf04 --- /dev/null +++ b/charts/app-launcher/0.1.32/Chart.yaml @@ -0,0 +1,19 @@ +annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/kube-version: '>= v1.16.0-0 < v1.30.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.8.0-0 < v2.9.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins + catalog.cattle.io/display-name: 'Krum Platform Tools: App Launcher' + catalog.cattle.io/ui-version: '>= 2.7.2 < v2.9.0-0' +apiVersion: v2 +appVersion: 0.1.32 +description: App Launcher extension for Rancher +name: app-launcher +type: application +version: 0.1.32 +icon: >- + https://raw.githubusercontent.com/krumIO/krum-rancher-extensions/main/pkg/app-launcher/icon.svg diff --git a/charts/app-launcher/0.1.32/README.md b/charts/app-launcher/0.1.32/README.md new file mode 100644 index 0000000..14e0f84 --- /dev/null +++ b/charts/app-launcher/0.1.32/README.md @@ -0,0 +1,70 @@ +# Rancher App Launcher Extension + +Rancher App Launcher Extension is a simple yet powerful tool for improved accessibility and resource discovery within Kubernetes. The extension is designed to extract ingresses from various clusters and consolidate them into a unified global resource page. With neatly organized cards for each discovered service, the tool offers an efficient method of displaying and accessing your Rancher services, making the Rancher experience seamless for both new and experienced users. + +The extension intends to improve the discoverability of services and offer a straightforward way to navigate the complexities of multi-cluster environments. + +App Launcher Extension preview image + +## Features + +- Unified resource page for all discovered services and ingresses +- Convenient access to services with a simple click +- Global apps section for user-selected favorites and global apps defined by cluster YAML files +- Grid and list views for easy navigation +- Multi-cluster support for viewing services across different clusters + +## Usage + +### Filter by Name + +- Use the Filter box in the toolbar to search through all of the objects that your user credentials have access to across clusters. + +### Filter by Cluster + +- This page showcases cards for each discovered service and ingress, allowing you to conveniently open the service with a simple click. + *The extension is designed to improve discoverability and offer a straightforward way to navigate the complexities of multi-cluster environments.* + +### Change views + +- The view can be changed with the view buttons in the toolbar, to switch between grid view and list view. + +### Select favorites (user) + +- Star service or ingress objects to surface them to the Global Apps section for easier discovery on repeat visits. +- Note: This is currently limited + +### Tag "Global" Apps (admin) + +Global apps will show at the top of the App Launcher page as a combination of global apps defined by cluster YAML files and user-selected favorites. + +- Apps tagged in Yaml will persist for all users. +- (currently) User-selected favorites will only persist for the user who selected them and are stored in the browser's local storage. + +To select a Service or Ingress as a Global App, add the following annotation to the Service or Ingress: + +```yaml +metadata: + annotations: + extensions.applauncher/global-app: "true" +``` + +## Installation + +Please follow the instructions for installing the extension collection at the repository root: https://github.com/krumIO/krum-rancher-extensions/ + +## Development + +1. Clone this repository to your machine. +2. Install the npm dependencies using the command `yarn install`. +3. Run the extension collection locally with the command `API= yarn dev`. + +## Contribution + +Your contribution matters! If you're looking to enhance the functionalities of this extension or have innovative ideas to improve the discoverability further, we warmly welcome pull requests. Let's make the Rancher environment more user-friendly together! + +## Support + +If you encounter any issues, have questions or suggestions, please file them in our issue tracker. We're committed to providing a smooth user experience and appreciate your feedback to continually improve. + +Rancher App Launcher Extension is here to address the need for effective discoverability within the Rancher platform. Let's make resource navigation simpler and more efficient! diff --git a/charts/app-launcher/0.1.32/templates/_helpers.tpl b/charts/app-launcher/0.1.32/templates/_helpers.tpl new file mode 100644 index 0000000..bd2ec19 --- /dev/null +++ b/charts/app-launcher/0.1.32/templates/_helpers.tpl @@ -0,0 +1,52 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "extension-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "extension-server.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "extension-server.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "extension-server.labels" -}} +helm.sh/chart: {{ include "extension-server.chart" . }} +{{ include "extension-server.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "extension-server.selectorLabels" -}} +app.kubernetes.io/name: {{ include "extension-server.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/app-launcher/0.1.32/templates/cr.yaml b/charts/app-launcher/0.1.32/templates/cr.yaml new file mode 100644 index 0000000..2e30e53 --- /dev/null +++ b/charts/app-launcher/0.1.32/templates/cr.yaml @@ -0,0 +1,12 @@ +apiVersion: catalog.cattle.io/v1 +kind: UIPlugin +metadata: + name: {{ include "extension-server.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: {{ include "extension-server.labels" . | nindent 4 }} +spec: + plugin: + name: {{ include "extension-server.fullname" . }} + version: {{ (semver (default .Chart.AppVersion .Values.plugin.versionOverride)).Original }} + endpoint: https://raw.githubusercontent.com/krumIO/krum-rancher-extensions/gh-pages/extensions/app-launcher/0.1.32 + noCache: {{ .Values.plugin.noCache }} diff --git a/charts/app-launcher/0.1.32/values.yaml b/charts/app-launcher/0.1.32/values.yaml new file mode 100644 index 0000000..9cc1bd5 --- /dev/null +++ b/charts/app-launcher/0.1.32/values.yaml @@ -0,0 +1,6 @@ +nameOverride: "" +fullnameOverride: "" +plugin: + enabled: true + versionOverride: "" + noCache: false diff --git a/extensions/app-launcher/0.1.32/files.txt b/extensions/app-launcher/0.1.32/files.txt new file mode 100644 index 0000000..4ab4748 --- /dev/null +++ b/extensions/app-launcher/0.1.32/files.txt @@ -0,0 +1,7 @@ +plugin/app-launcher-0.1.32.umd.min.1.js +plugin/app-launcher-0.1.32.umd.min.1.js.map +plugin/app-launcher-0.1.32.umd.min.2.js +plugin/app-launcher-0.1.32.umd.min.2.js.map +plugin/app-launcher-0.1.32.umd.min.js +plugin/app-launcher-0.1.32.umd.min.js.map +plugin/package.json diff --git a/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js new file mode 100644 index 0000000..cd1d844 --- /dev/null +++ b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_32"]=("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_32"]||[]).push([[1],{"7ada":function(e,t,n){(function(n){var o,a,i;(function(n,r){a=[],o=r,i="function"===typeof o?o.apply(t,a):o,void 0===i||(e.exports=i)})(0,(function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function o(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){c(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function a(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,c=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var c=r.URL||r.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?i(s):a(s.href)?o(e,t,n):i(s,s.target="_blank")):(s.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(s.href)}),4e4),setTimeout((function(){i(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,r){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,r),n);else if(a(e))o(e,n,r);else{var c=document.createElement("a");c.href=e,c.target="_blank",setTimeout((function(){i(c)}))}}:function(e,t,n,a){if(a=a||open("","_blank"),a&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var i="application/octet-stream"===e.type,c=/constructor/i.test(r.HTMLElement)||r.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||i&&c)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},l.readAsDataURL(e)}else{var f=r.URL||r.webkitURL,u=f.createObjectURL(e);a?a.location=u:location.href=u,a=null,setTimeout((function(){f.revokeObjectURL(u)}),4e4)}});r.saveAs=c.saveAs=c,e.exports=c}))}).call(this,n("7d15"))}}]); +//# sourceMappingURL=app-launcher-0.1.32.umd.min.1.js.map \ No newline at end of file diff --git a/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js.map b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js.map new file mode 100644 index 0000000..a13181f --- /dev/null +++ b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.1.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://app-launcher-0.1.32//home/runner/work/krum-rancher-extensions/krum-rancher-extensions/node_modules/file-saver/dist/FileSaver.min.js"],"names":["this","b","a","autoBom","console","warn","test","type","Blob","c","d","e","XMLHttpRequest","open","responseType","onload","response","onerror","error","send","status","dispatchEvent","MouseEvent","document","createEvent","initMouseEvent","window","f","self","global","saveAs","HTMLAnchorElement","prototype","g","h","i","URL","webkitURL","j","createElement","name","download","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","title","body","innerText","HTMLElement","safari","userAgent","FileReader","onloadend","result","replace","readAsDataURL","k","l","module","exports"],"mappings":"2LAAA,qCAAwD,EAAO,GAAE,IAAE,kEAAnE,CAA0JA,GAAK,WAAW,aAAa,SAASC,EAAEC,EAAED,GAAG,MAAM,oBAAoBA,EAAEA,EAAE,CAACE,SAAQ,GAAI,iBAAiBF,IAAIG,QAAQC,KAAK,sDAAsDJ,EAAE,CAACE,SAASF,IAAIA,EAAEE,SAAS,6EAA6EG,KAAKJ,EAAEK,MAAM,IAAIC,KAAK,CAAC,SAASN,GAAG,CAACK,KAAKL,EAAEK,OAAOL,EAAE,SAASO,EAAER,EAAEQ,EAAEC,GAAG,IAAIC,EAAE,IAAIC,eAAeD,EAAEE,KAAK,MAAMZ,GAAGU,EAAEG,aAAa,OAAOH,EAAEI,OAAO,WAAWb,EAAES,EAAEK,SAASP,EAAEC,IAAIC,EAAEM,QAAQ,WAAWb,QAAQc,MAAM,4BAA4BP,EAAEQ,OAAO,SAAST,EAAER,GAAG,IAAID,EAAE,IAAIW,eAAeX,EAAEY,KAAK,OAAOX,GAAE,GAAI,IAAID,EAAEkB,OAAO,MAAMjB,IAAI,OAAO,KAAKD,EAAEmB,QAAQ,KAAKnB,EAAEmB,OAAO,SAAST,EAAET,GAAG,IAAIA,EAAEmB,cAAc,IAAIC,WAAW,UAAU,MAAMb,GAAG,IAAIR,EAAEsB,SAASC,YAAY,eAAevB,EAAEwB,eAAe,SAAQ,GAAG,EAAGC,OAAO,EAAE,EAAE,EAAE,GAAG,IAAG,GAAG,GAAG,GAAG,EAAG,EAAE,MAAMxB,EAAEmB,cAAcpB,IAAI,IAAI0B,EAAE,iBAAiBD,QAAQA,OAAOA,SAASA,OAAOA,OAAO,iBAAiBE,MAAMA,KAAKA,OAAOA,KAAKA,KAAK,iBAAiBC,GAAQA,EAAOA,SAASA,EAAOA,OAAO,EAAO3B,EAAEyB,EAAEG,SAAS,iBAAiBJ,QAAQA,SAASC,EAAE,aAAa,aAAaI,kBAAkBC,UAAU,SAAS/B,EAAEgC,EAAEC,GAAG,IAAIC,EAAER,EAAES,KAAKT,EAAEU,UAAUC,EAAEf,SAASgB,cAAc,KAAKN,EAAEA,GAAGhC,EAAEuC,MAAM,WAAWF,EAAEG,SAASR,EAAEK,EAAEI,IAAI,WAAW,iBAAiBzC,GAAGqC,EAAEK,KAAK1C,EAAEqC,EAAEM,SAASC,SAASD,OAAOjC,EAAE2B,GAAG5B,EAAE4B,EAAEK,MAAMlC,EAAER,EAAEgC,EAAEC,GAAGvB,EAAE2B,EAAEA,EAAEQ,OAAO,YAAYR,EAAEK,KAAKR,EAAEY,gBAAgB9C,GAAG+C,YAAW,WAAWb,EAAEc,gBAAgBX,EAAEK,QAAO,KAAKK,YAAW,WAAWrC,EAAE2B,KAAI,KAAK,qBAAqBY,UAAU,SAASvB,EAAEM,EAAEC,GAAG,GAAGD,EAAEA,GAAGN,EAAEa,MAAM,WAAW,iBAAiBb,EAAEuB,UAAUC,iBAAiBlD,EAAE0B,EAAEO,GAAGD,QAAQ,GAAGvB,EAAEiB,GAAGlB,EAAEkB,EAAEM,EAAEC,OAAO,CAAC,IAAIC,EAAEZ,SAASgB,cAAc,KAAKJ,EAAEQ,KAAKhB,EAAEQ,EAAEW,OAAO,SAASE,YAAW,WAAWrC,EAAEwB,QAAO,SAASjC,EAAED,EAAES,EAAEC,GAAG,GAAGA,EAAEA,GAAGE,KAAK,GAAG,UAAUF,IAAIA,EAAEY,SAAS6B,MAAMzC,EAAEY,SAAS8B,KAAKC,UAAU,kBAAkB,iBAAiBpD,EAAE,OAAOO,EAAEP,EAAED,EAAES,GAAG,IAAIuB,EAAE,6BAA6B/B,EAAEK,KAAK2B,EAAE,eAAe5B,KAAKqB,EAAE4B,cAAc5B,EAAE6B,OAAOrB,EAAE,eAAe7B,KAAK4C,UAAUO,WAAW,IAAItB,GAAGF,GAAGC,IAAI,iBAAiBwB,WAAW,CAAC,IAAIpB,EAAE,IAAIoB,WAAWpB,EAAEqB,UAAU,WAAW,IAAIzD,EAAEoC,EAAEsB,OAAO1D,EAAEiC,EAAEjC,EAAEA,EAAE2D,QAAQ,eAAe,yBAAyBlD,EAAEA,EAAEkC,SAASF,KAAKzC,EAAE2C,SAAS3C,EAAES,EAAE,MAAM2B,EAAEwB,cAAc5D,OAAO,CAAC,IAAI6D,EAAEpC,EAAES,KAAKT,EAAEU,UAAU2B,EAAED,EAAEhB,gBAAgB7C,GAAGS,EAAEA,EAAEkC,SAASmB,EAAEnB,SAASF,KAAKqB,EAAErD,EAAE,KAAKqC,YAAW,WAAWe,EAAEd,gBAAgBe,KAAI,QAAQrC,EAAEG,OAAO5B,EAAE4B,OAAO5B,EAA+B+D,EAAOC,QAAQhE,O","file":"app-launcher-0.1.32.umd.min.1.js","sourcesContent":["(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open(\"GET\",b),e.responseType=\"blob\",e.onload=function(){a(e.response,c,d)},e.onerror=function(){console.error(\"could not download file\")},e.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open(\"\",\"_blank\"),e&&(e.document.title=e.document.body.innerText=\"downloading...\"),\"string\"==typeof a)return c(a,b,d);var g=\"application/octet-stream\"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((i||g&&h)&&\"object\"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a,\"undefined\"!=typeof module&&(module.exports=a)});\n\n//# sourceMappingURL=FileSaver.min.js.map"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js new file mode 100644 index 0000000..96bd5da --- /dev/null +++ b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js @@ -0,0 +1,2 @@ +(("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_32"]=("undefined"!==typeof self?self:this)["webpackJsonpapp_launcher_0_1_32"]||[]).push([[2],{"1bb6":function(n,e){const o=[{product:{"app-launcher":"App Launcher"},appLauncher:{launch:"Launch",launchEndpoint:"Launch {endpoint}",launchAnEndpointFromSelection:"Select an endpoint to launch",noEndpointFoundForApp:"No endpoint found for app",noServicesFound:"No services found",loading:"Loading...",loadingServices:"Loading services...",selectCluster:"Select a cluster",globalApps:"Global Apps",filter:"Filter",aToZ:"A-Z",zToA:"Z-A"}}];n.exports=o.length<=1?o[0]:o}}]); +//# sourceMappingURL=app-launcher-0.1.32.umd.min.2.js.map \ No newline at end of file diff --git a/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js.map b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js.map new file mode 100644 index 0000000..be50bec --- /dev/null +++ b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://app-launcher-0.1.32/./l10n/en-us.yaml"],"names":["doc","module","exports","length"],"mappings":"wLAAA,MAAMA,EAAM,CAAC,CAAE,QAAU,CAAE,eAAe,gBAAkB,YAAc,CAAE,OAAS,SAAU,eAAiB,oBAAqB,8BAAgC,+BAAgC,sBAAwB,4BAA6B,gBAAkB,oBAAqB,QAAU,aAAc,gBAAkB,sBAAuB,cAAgB,mBAAoB,WAAa,cAAe,OAAS,SAAU,KAAO,MAAO,KAAO,SAC1cC,EAAOC,QAAUF,EAAIG,QAAU,EAAIH,EAAI,GAAKA","file":"app-launcher-0.1.32.umd.min.2.js","sourcesContent":["const doc = [({\"product\":({\"app-launcher\":\"App Launcher\"}), \"appLauncher\":({\"launch\":\"Launch\", \"launchEndpoint\":\"Launch {endpoint}\", \"launchAnEndpointFromSelection\":\"Select an endpoint to launch\", \"noEndpointFoundForApp\":\"No endpoint found for app\", \"noServicesFound\":\"No services found\", \"loading\":\"Loading...\", \"loadingServices\":\"Loading services...\", \"selectCluster\":\"Select a cluster\", \"globalApps\":\"Global Apps\", \"filter\":\"Filter\", \"aToZ\":\"A-Z\", \"zToA\":\"Z-A\"})})];\nmodule.exports = doc.length <= 1 ? doc[0] : doc;"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.js b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.js new file mode 100644 index 0000000..d62ad54 --- /dev/null +++ b/extensions/app-launcher/0.1.32/plugin/app-launcher-0.1.32.umd.min.js @@ -0,0 +1,16 @@ +(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("__jszip"),require("__jsyaml"),require("vue")):"function"===typeof define&&define.amd?define(["__jszip","__jsyaml"],e):"object"===typeof exports?exports["app-launcher-0.1.32"]=e(require("__jszip"),require("__jsyaml"),require("vue")):t["app-launcher-0.1.32"]=e(t["__jszip"],t["__jsyaml"],t["Vue"])})("undefined"!==typeof self?self:this,(function(t,e,n){return function(t){function e(e){for(var n,o,i=e[0],a=e[1],s=0,l=[];s=e?t:""+Array(e+1-r.length).join(n)+t},p={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+d(r,2,"0")+":"+d(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return{M:a,y:l,w:i,d:o,D:"date",h:r,m:n,s:e,ms:t,Q:s}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h="en",v={};v[h]=f;var b=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var o=t.name;v[o]=t,r=o}return!n&&r&&(h=r),r||!n&&h},m=function(t,e){if(b(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new w(n)},y=p;y.l=g,y.i=b,y.w=function(t,e){return m(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var w=function(){function d(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=d.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(c);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return y},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=m(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return m(t)t.nameDisplay).slice(0,5)},plusMore(){const t=this.toRemove.length-this.names.length;return this.t("promptRemove.andOthers",{count:t})}},watch:{value:{handler(t){this.handleRoleDeletionCheck(t,t[0].type,this.$route.hash)},immediate:!0}},methods:{resourceNames:o["m"],async handleRoleDeletionCheck(t,e,n){let r,o;this.warning="";let a=0;const s=new Set;switch(this.info=this.t("rbac.globalRoles.waiting",{count:t.length}),e){case i["k"].GLOBAL_ROLE:r=i["k"].GLOBAL_ROLE_BINDING,o="globalRoleName";break;default:r=n.includes(l)?i["k"].CLUSTER_ROLE_TEMPLATE_BINDING:i["k"].PROJECT_ROLE_TEMPLATE_BINDING,o="roleTemplateName";break}try{var c;const e=await this.$store.dispatch("management/request",{url:"/v1/"+r,method:"get"},{root:!0}),n=await this.$store.dispatch("management/request",{url:"/v1/"+i["k"].USER,method:"get"},{root:!0}),l=null===(c=n.data)||void 0===c?void 0:c.reduce((t,e)=>(e.username&&(t[e.id]=e),t),{});e.data&&e.data.length?(t.forEach(t=>{const n=e.data.filter(e=>e[o]===t.id);if(n.length){const t=[...new Set(n.map(t=>t.userName).filter(t=>l[t]))];t.length&&(a++,t.forEach(t=>s.add(t)))}}),a&&s.size?(this.info="",this.warning=this.t("rbac.globalRoles.usersBound",{count:s.size})):this.info=this.t("rbac.globalRoles.notBound",null,!0)):this.info=this.t("rbac.globalRoles.notBound",null,!0)}catch(u){this.info=this.t("rbac.globalRoles.unableToCheck")}}}}},"0634":function(t,e,n){var r=n("2ed5"),o=n("5e27");function i(t,e){return r(t,o(t),e)}t.exports=i},"0652":function(t,e,n){var r=n("ae68"),o=n("e2e2"),i=n("f72d");function a(t){return i(t)?r(t):o(t)}t.exports=a},"06a5":function(t,e,n){var r=n("1ec9"),o=n("659f"),i=n("4778"),a=n("c991"),s=n("9243"),l=n("c316"),c=n("dda8"),u=n("41dd"),d=1,p="[object Arguments]",f="[object Array]",h="[object Object]",v=Object.prototype,b=v.hasOwnProperty;function g(t,e,n,v,g,m){var y=l(t),w=l(e),_=y?f:s(t),x=w?f:s(e);_=_==p?h:_,x=x==p?h:x;var O=_==h,k=x==h,A=_==x;if(A&&c(t)){if(!c(e))return!1;y=!0,O=!1}if(A&&!O)return m||(m=new r),y||u(t)?o(t,e,n,v,g,m):i(t,e,_,n,v,g,m);if(!(n&d)){var E=O&&b.call(t,"__wrapped__"),S=k&&b.call(e,"__wrapped__");if(E||S){var C=E?t.value():t,T=S?e.value():e;return m||(m=new r),g(C,T,n,v,m)}}return!!A&&(m||(m=new r),a(t,e,n,v,g,m))}t.exports=g},"06cb":function(t,e){var n=/\w*$/;function r(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}t.exports=r},"0831":function(t,e,n){var r=n("1eb8");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("2b69c083",r,!0,{sourceMap:!1,shadowMode:!1})},"084c":function(t,e,n){var r=n("c364");function o(t){return function(e){return r(e,t)}}t.exports=o},"09b2":function(t,e){var n=Object.prototype;function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}t.exports=r},"0a87":function(t,e,n){var r=n("e902");function o(t){return r(this.__data__,t)>-1}t.exports=o},"0cfa":function(t,e,n){var r=n("b952");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("43eabed8",r,!0,{sourceMap:!1,shadowMode:!1})},"0df0":function(t,e,n){"use strict";var r=n("1032");n.d(e,"a",(function(){return r["a"]}))},"0e05":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".cluster-actions[data-v-88f0655a]{display:flex;align-items:center;gap:1rem;position:fixed;right:5.8%;top:4.3rem;z-index:2;padding-bottom:.425rem;padding-right:4.4rem;background:inherit;border-bottom:var(--header-border-size) solid var(--header-border)}.icon-button[data-v-88f0655a]{padding:0;color:var(--primary);font-size:1.8rem}.icon-button[data-v-88f0655a],.sort-button[data-v-88f0655a]{background:none;border:none;cursor:pointer}.sort-button[data-v-88f0655a]{padding:none;color:#555;font-size:1.3rem;display:flex;align-items:center}.sort-label[data-v-88f0655a]{color:var(--primary);font-size:1rem;cursor:pointer}.sort-buttons[data-v-88f0655a]{display:flex;gap:1rem;align-items:center}.sort-button[data-v-88f0655a]:hover{color:var(--primary-hover)}.sort-button.active[data-v-88f0655a]{color:var(--primary)}.search-input[data-v-88f0655a]{text-align:right;justify-content:flex-end;display:flex;input[data-v-88f0655a]{width:190px;padding:11px;font-size:1rem;border:1px solid var(--border);border-radius:4px}}.select-wrapper select[data-v-88f0655a]{padding:.8rem;border:1px solid #ccc;border-radius:4px}",""]),t.exports=e},"0e19":function(t,e,n){var r=n("4b2c"),o=n("2822"),i=n("907a"),a="[object Null]",s="[object Undefined]",l=r?r.toStringTag:void 0;function c(t){return null==t?void 0===t?s:a:l&&l in Object(t)?o(t):i(t)}t.exports=c},"0e30":function(t,e){function n(){return!1}t.exports=n},"0ed3":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;ot.advFilterSelectedLabel=e.label},model:{value:t.advFilterSelectedProp,callback:function(e){t.advFilterSelectedProp=e},expression:"advFilterSelectedProp"}})],1),e("div",{staticClass:"bottom-block"},[e("button",{staticClass:"btn role-secondary",attrs:{disabled:!t.advancedFilteringValues.length},on:{click:t.clearAllAdvancedFilters}},[t._v(" "+t._s(t.t("sortableTable.resetFilters"))+" ")]),e("button",{staticClass:"btn role-primary",on:{click:t.addAdvancedFilter}},[t._v(" "+t._s(t.t("sortableTable.add"))+" ")])])])]):t.search?e("input",{directives:[{name:"model",rawName:"v-model",value:t.eventualSearchQuery,expression:"eventualSearchQuery"}],ref:"searchQuery",staticClass:"input-sm search-box",attrs:{type:"search",placeholder:t.t("sortableTable.search")},domProps:{value:t.eventualSearchQuery},on:{input:function(e){e.target.composing||(t.eventualSearchQuery=e.target.value)}}}):t._e(),t._t("header-button")],2):t._e()]):t._e()],2),e("table",{staticClass:"sortable-table",class:t.classObject,attrs:{width:"100%"}},[t.showHeaders?e("THead",{attrs:{"label-for":t.labelFor,columns:t.columns,group:t.group,"group-options":t.advGroupOptions,"has-advanced-filtering":t.hasAdvancedFiltering,"adv-filter-hide-labels-as-cols":t.advFilterHideLabelsAsCols,"table-actions":t.tableActions,"table-cols-options":t.columnOptions,"row-actions":t.rowActions,"sub-expand-column":t.subExpandColumn,"row-actions-width":t.rowActionsWidth,"how-much-selected":t.howMuchSelected,"sort-by":t.sortBy,"default-sort-by":t._defaultSortBy,descending:t.descending,"no-rows":t.noRows,loading:t.loading&&!t.loadingDelay,"no-results":t.noResults},on:{"on-toggle-all":t.onToggleAll,"on-sort-change":t.changeSort,"col-visibility-change":t.changeColVisibility,"group-value-change":e=>t.$emit("group-value-change",e),"update-cols-options":t.updateColsOptions}}):t._e(),t.loading&&!t.loadingDelay?e("div"):t.loading?e("tbody",[t._t("loading",(function(){return[e("tr",[e("td",{attrs:{colspan:t.fullColspan}},[e("div",{staticClass:"data-loading"},[e("i",{staticClass:"icon-spin icon icon-spinner"}),e("t",{attrs:{k:"generic.loading",raw:!0}})],1)])])]}))],2):t.noRows?e("tbody",[t._t("no-rows",(function(){return[e("tr",{staticClass:"no-rows"},[e("td",{attrs:{colspan:t.fullColspan}},[t.showNoRows?e("t",{attrs:{k:t.noRowsKey}}):t._e()],1)])]}))],2):t.noResults?e("tbody",[t._t("no-results",(function(){return[e("tr",{staticClass:"no-results"},[e("td",{staticClass:"text-center",attrs:{colspan:t.fullColspan}},[e("t",{attrs:{k:t.noDataKey}})],1)])]}))],2):t._l(t.displayRows,(function(n){return e("tbody",{key:n.key,class:{group:t.groupBy}},[t.groupBy?t._t("group-row",(function(){return[e("tr",{staticClass:"group-row"},[e("td",{attrs:{colspan:t.fullColspan}},[t._t("group-by",(function(){return[e("div",{directives:[{name:"trim-whitespace",rawName:"v-trim-whitespace"}],staticClass:"group-tab"},[t._v(" "+t._s(n.ref)+" ")])]}),{group:n.grp})],2)])]}),{group:n,fullColspan:t.fullColspan}):t._e(),t._l(n.rows,(function(n,r){return[t._t("main-row",(function(){return[t._t("main-row:"+(n.row.mainRowKey||r),(function(){return[e("tr",{key:n.key,staticClass:"main-row",class:{"has-sub-row":n.showSubRow},attrs:{"data-testid":t.componentTestid+"-"+r+"-row","data-node-id":n.key,"data-cant-run-bulk-action-of-interest":t.actionOfInterest&&!n.canRunBulkActionOfInterest}},[t.tableActions?e("td",{staticClass:"row-check",attrs:{align:"middle"}},[t._v(" "+t._s(n.mainRowKey)),e("Checkbox",{staticClass:"selection-checkbox",attrs:{"data-node-id":n.key,"data-testid":t.componentTestid+"-"+r+"-checkbox",value:t.selectedRows.includes(n.row)}})],1):t._e(),t.subExpandColumn?e("td",{staticClass:"row-expand",attrs:{align:"middle"}},[e("i",{class:{icon:!0,"icon-chevron-right":!t.expanded[n.row[t.keyField]],"icon-chevron-down":!!t.expanded[n.row[t.keyField]]},attrs:{"data-title":"Toggle Expand"},on:{click:function(e){return e.stopPropagation(),t.toggleExpand(n.row)}}})]):t._e(),t._l(n.columns,(function(o,i){return[t._t("col:"+o.col.name,(function(){return[e("td",{directives:[{name:"show",rawName:"v-show",value:!t.hasAdvancedFiltering||t.hasAdvancedFiltering&&o.col.isColVisible,expression:"!hasAdvancedFiltering || (hasAdvancedFiltering && col.col.isColVisible)"}],key:o.col.name,class:{["col-"+o.dasherize]:!!o.col.formatter,[o.col.breakpoint]:!!o.col.breakpoint,["skip-select"]:o.col.skipSelect},attrs:{"data-title":o.col.label,"data-testid":`sortable-cell-${r}-${i}`,align:o.col.align||"left",width:o.col.width}},[t._t("cell:"+o.col.name,(function(){return[o.component&&o.needRef?e(o.component,t._b({ref:"column",refInFor:!0,tag:"component",attrs:{value:o.value,row:n.row,col:o.col,"row-key":n.key,"get-custom-detail-link":t.getCustomDetailLink}},"component",o.col.formatterOpts,!1)):o.component?e(o.component,t._b({tag:"component",attrs:{value:o.value,row:n.row,col:o.col,"row-key":n.key}},"component",o.col.formatterOpts,!1)):o.col.formatter?e(o.col.formatter,t._b({tag:"component",attrs:{value:o.value,row:n.row,col:o.col,"row-key":n.key}},"component",o.col.formatterOpts,!1)):""!==o.value?[t._v(" "+t._s(o.formatted)+" ")]:o.col.dashIfEmpty?[e("span",{staticClass:"text-muted"},[t._v("—")])]:t._e()]}),{row:n.row,col:o.col,value:o.value})],2)]}),{row:n.row,col:o.col,dt:t.dt,expanded:t.expanded,rowKey:n.key})]})),t.rowActions?e("td",{attrs:{align:"middle"}},[t._t("row-actions",(function(){return[e("button",{ref:"actionButton"+r,refInFor:!0,staticClass:"btn btn-sm role-multi-action actions",attrs:{id:`actionButton+${r}+${n.row&&n.row.name?n.row.name:""}`,"data-testid":t.componentTestid+"-"+r+"-action-button","aria-haspopup":"true","aria-expanded":"false",type:"button"},on:{click:function(e){return t.handleActionButtonClick(r,e)}}},[e("i",{staticClass:"icon icon-actions"})])]}),{row:n.row})],2):t._e()],2)]}),{fullColspan:t.fullColspan})]}),{row:n.row}),n.showSubRow?t._t("sub-row",(function(){return[n.row.stateDescription?e("tr",{key:n.row[t.keyField]+"-description",staticClass:"state-description sub-row",attrs:{"data-testid":t.componentTestid+"-"+r+"-row-description"},on:{mouseenter:t.onRowMouseEnter,mouseleave:t.onRowMouseLeave}},[t.tableActions?e("td",{staticClass:"row-check",attrs:{align:"middle"}}):t._e(),e("td",{class:{"text-error":n.row.stateObj.error},attrs:{colspan:t.fullColspan-(t.tableActions?1:0)}},[t._v(" "+t._s(n.row.stateDescription)+" ")])]):t._e()]}),{fullColspan:t.fullColspan,row:n.row,subMatches:t.subMatches,keyField:t.keyField,componentTestid:t.componentTestid,i:r,onRowMouseEnter:t.onRowMouseEnter,onRowMouseLeave:t.onRowMouseLeave}):t._e()]}))],2)}))],2),t.showPaging?e("div",{staticClass:"paging"},[e("button",{staticClass:"btn btn-sm role-multi-action",attrs:{type:"button",disabled:1==t.page},on:{click:function(e){return t.goToPage("first")}}},[e("i",{staticClass:"icon icon-chevron-beginning"})]),e("button",{staticClass:"btn btn-sm role-multi-action",attrs:{type:"button",disabled:1==t.page},on:{click:function(e){return t.goToPage("prev")}}},[e("i",{staticClass:"icon icon-chevron-left"})]),e("span",[t._v(" "+t._s(t.pagingDisplay)+" ")]),e("button",{staticClass:"btn btn-sm role-multi-action",attrs:{type:"button",disabled:t.page==t.totalPages},on:{click:function(e){return t.goToPage("next")}}},[e("i",{staticClass:"icon icon-chevron-right"})]),e("button",{staticClass:"btn btn-sm role-multi-action",attrs:{type:"button",disabled:t.page==t.totalPages},on:{click:function(e){return t.goToPage("last")}}},[e("i",{staticClass:"icon icon-chevron-end"})])]):t._e(),t.search?e("button",{directives:[{name:"shortkey",rawName:"v-shortkey.once",value:["/"],expression:"['/']",modifiers:{once:!0}}],staticClass:"hide",on:{shortkey:function(e){return t.focusSearch()}}}):t._e(),t.tableActions?[e("button",{directives:[{name:"shortkey",rawName:"v-shortkey",value:["j"],expression:"['j']"}],staticClass:"hide",on:{shortkey:function(e){return t.focusNext(e)}}}),e("button",{directives:[{name:"shortkey",rawName:"v-shortkey",value:["k"],expression:"['k']"}],staticClass:"hide",on:{shortkey:function(e){return t.focusPrevious(e)}}}),e("button",{directives:[{name:"shortkey",rawName:"v-shortkey",value:["shift","j"],expression:"['shift','j']"}],staticClass:"hide",on:{shortkey:function(e){return t.focusNext(e,!0)}}}),e("button",{directives:[{name:"shortkey",rawName:"v-shortkey",value:["shift","k"],expression:"['shift','k']"}],staticClass:"hide",on:{shortkey:function(e){return t.focusPrevious(e,!0)}}}),t._t("shortkeys")]:t._e()],2)},o=[],i=n("9ce4"),a=n("050d"),s=n.n(a),l=n("330a"),c=n.n(l),u=n("2cb5"),d=n("e24b"),p=n("bddd"),f=n("0df0"),h=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("button",{ref:"btn",class:t.classes,attrs:{name:t.name,type:t.type,disabled:t.isDisabled,"tab-index":t.tabIndex,"data-testid":t.componentTestid+"-async-button"},on:{click:t.clicked}},["manual-refresh"===t.mode?e("span",[t._v(t._s(t.t("action.refresh")))]):t._e(),t.displayIcon?e("i",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.tooltip,expression:"tooltip"}],class:{icon:!0,"icon-lg":!0,[t.displayIcon]:!0}}):t._e(),"text"===t.labelAs&&t.displayLabel?e("span",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.tooltip,expression:"tooltip"},{name:"clean-html",rawName:"v-clean-html",value:t.displayLabel,expression:"displayLabel"}]}):t._e()])},v=[],b=n("8bbf"),g=n.n(b),m={memberOfObject:(t,e)=>Object.entries(t||{}).find(([t])=>t===e),memberOfComponent:(t,e)=>t[e]};const y={ACTION:"action",WAITING:"waiting",SUCCESS:"success",ERROR:"error"},w="text",_="tooltip";var x=g.a.extend({props:{mode:{type:String,default:"edit"},delay:{type:Number,default:5e3},name:{type:String,default:null},disabled:{type:Boolean,default:!1},type:{type:String,default:"button"},tabIndex:{type:Number,default:null},actionColor:{type:String,default:"role-primary"},waitingColor:{type:String,default:"bg-primary"},successColor:{type:String,default:"bg-success"},errorColor:{type:String,default:"bg-error"},actionLabel:{type:String,default:null},waitingLabel:{type:String,default:null},successLabel:{type:String,default:null},errorLabel:{type:String,default:null},icon:{type:String,default:null},labelAs:{type:String,default:w},size:{type:String,default:""},currentPhase:{type:String,default:y.ACTION},componentTestid:{type:String,default:"action-button"},manual:{type:Boolean,default:!1}},data(){return{phase:this.currentPhase}},watch:{currentPhase(t){this.phase=t}},computed:{classes(){const t=this.phase+"Color",e=m.memberOfComponent(this,t),n={btn:!0,[e]:!0};return this.size&&(n["btn-"+this.size]=!0),n},displayIcon(){const t=this.$store.getters["i18n/exists"],e=this.$store.getters["i18n/t"],n=`asyncButton.${this.mode}.${this.phase}Icon`,r=`asyncButton.default.${this.phase}Icon`;let o="";return this.icon?o=this.icon:t(n)?o="icon-"+e(n):t(r)&&(o="icon-"+e(r)),this.isSpinning&&(o||(o="icon-spinner"),o+=" icon-spin"),o},displayLabel(){const t=m.memberOfComponent(this,this.phase+"Label"),e=this.$store.getters["i18n/exists"],n=this.$store.getters["i18n/t"],r=`asyncButton.${this.mode}.${this.phase}`,o="asyncButton.default."+this.phase;return t||(e(r)?n(r):e(o)?n(o):"")},isSpinning(){return this.phase===y.WAITING},isDisabled(){return this.disabled||this.phase===y.WAITING},tooltip(){return this.labelAs===_?{content:this.displayLabel,hideOnTargetClick:!1}:null}},beforeDestroy(){this.timer&&clearTimeout(this.timer)},methods:{clicked(t){if(t&&(t.stopPropagation(),t.preventDefault()),this.isDisabled)return;this.timer&&clearTimeout(this.timer),this.manual||(this.phase=y.WAITING);const e=t=>{this.done(t)};this.$emit("click",e)},done(t){"cancelled"===t?this.phase=y.ACTION:(this.phase=t?y.SUCCESS:y.ERROR,this.timer=setTimeout(()=>{this.timerDone()},this.delay))},timerDone(){this.phase!==y.SUCCESS&&this.phase!==y.ERROR||(this.phase=y.ACTION)},focus(){this.$refs.btn.focus()}}}),O=x,k=(n("a783"),n("d802")),A=Object(k["a"])(O,h,v,!1,null,"5ad06a13",null),E=A.exports,S=function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-button-group"},[e("div",{staticClass:"dropdown-button bg-primary",class:{"one-action":!t.dualAction,[t.buttonSize]:!0,disabled:t.disableButton}},[e("v-popover",{attrs:{placement:"bottom",container:!1,disabled:t.disableButton,"popper-options":{modifiers:{flip:{enabled:!1}}}},scopedSlots:t._u([{key:"popover",fn:function(){return[t._t("popover-content")]},proxy:!0}],null,!0)},[t._t("button-content",(function(){return[e("button",{ref:"popoverButton",staticClass:"icon-container bg-primary no-left-border-radius",class:t.buttonSize,attrs:{disabled:t.disableButton,type:"button"}},[t._v(" Button "),e("i",{staticClass:"icon icon-chevron-down"})])]}),{buttonSize:t.buttonSize})],2)],1)])},C=[],T={name:"ActionDropdown",props:{size:{type:String,default:""},dualAction:{type:Boolean,default:!0},disableButton:{type:Boolean,default:!1}},computed:{buttonSize(){const{size:t}=this;let e;switch(t){case"":e="btn";break;case"xs":e="btn btn-xs";break;case"sm":e="btn btn-sm";break;case"lg":e="btn btn-lg";break;default:}return e}},methods:{hasSlot(t="default"){return!!this.$slots[t]||!!this.$scopedSlots[t]},togglePopover(){}}},R=T,I=(n("bdf6"),Object(k["a"])(R,S,C,!1,null,null,null)),L=I.exports,N=n("05ca"),j=n.n(N),D=n("44db"),P=n.n(D),$=function(){var t=this,e=t._self._c;return e("thead",[e("tr",{class:{loading:t.loading}},[t.tableActions?e("th",{attrs:{width:t.checkWidth,align:"middle"}},[e("Checkbox",{staticClass:"check",attrs:{"data-testid":"sortable-table_check_select_all",indeterminate:t.isIndeterminate,disabled:t.noRows||t.noResults},model:{value:t.isAll,callback:function(e){t.isAll=e},expression:"isAll"}})],1):t._e(),t.subExpandColumn?e("th",{attrs:{width:t.expandWidth}}):t._e(),t._l(t.columns,(function(n){return e("th",{directives:[{name:"show",rawName:"v-show",value:!t.hasAdvancedFiltering||t.hasAdvancedFiltering&&n.isColVisible,expression:"!hasAdvancedFiltering || (hasAdvancedFiltering && col.isColVisible)"}],key:n.name,class:{sortable:n.sort,[n.breakpoint]:!!n.breakpoint},attrs:{align:n.align||"left",width:n.width},on:{click:function(e){return e.preventDefault(),t.changeSort(e,n)}}},[e("div",{staticClass:"table-header-container",class:{"not-filterable":t.hasAdvancedFiltering&&!n.isFilter}},[n.sort?e("span",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.tooltip(n),expression:"tooltip(col)"}]},[e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.labelFor(n),expression:"labelFor(col)"}]}),e("i",{directives:[{name:"show",rawName:"v-show",value:t.hasAdvancedFiltering&&!n.isFilter,expression:"hasAdvancedFiltering && !col.isFilter"},{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.t("sortableTable.tableHeader.noFilter"),expression:"t('sortableTable.tableHeader.noFilter')"}],staticClass:"icon icon-info not-filter-icon"}),e("span",{staticClass:"icon-stack"},[e("i",{staticClass:"icon icon-sort icon-stack-1x faded"}),t.isCurrent(n)&&!t.descending?e("i",{staticClass:"icon icon-sort-down icon-stack-1x"}):t._e(),t.isCurrent(n)&&t.descending?e("i",{staticClass:"icon icon-sort-up icon-stack-1x"}):t._e()])]):e("span",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.tooltip(n),expression:"tooltip(col)"}]},[t._v(t._s(t.labelFor(n)))])])])})),t.rowActions&&t.hasAdvancedFiltering&&t.tableColsOptions.length?e("th",{attrs:{width:t.rowActionsWidth}},[e("div",{ref:"table-options",staticClass:"table-options-group"},[e("button",{staticClass:"btn btn-sm role-multi-action table-options-btn",attrs:{"aria-haspopup":"true","aria-expanded":"false",type:"button"},on:{click:t.tableColsOptionsClick}},[e("i",{staticClass:"icon icon-actions"})]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.tableColsOptionsVisibility,expression:"tableColsOptionsVisibility"}],staticClass:"table-options-container",style:t.tableColsMenuPosition},[t.hasAdvGrouping?e("div",{staticClass:"table-options-grouping"},[e("span",{staticClass:"table-options-col-subtitle"},[t._v(t._s(t.t("sortableTable.tableHeader.groupBy"))+":")]),e("LabeledSelect",{staticClass:"table-options-grouping-select",attrs:{clearable:!0,options:t.groupOptions,disabled:!1,searchable:!1,mode:"edit",multiple:!1,taggable:!1},model:{value:t.advGroup,callback:function(e){t.advGroup=e},expression:"advGroup"}})],1):t._e(),e("p",{staticClass:"table-options-col-subtitle mb-20"},[t._v(" "+t._s(t.t("sortableTable.tableHeader.show"))+": ")]),e("ul",t._l(t.tableColsOptions,(function(n,r){return e("li",{directives:[{name:"show",rawName:"v-show",value:n.isTableOption,expression:"col.isTableOption"}],key:r,class:{visible:!n.preventColToggle}},[e("Checkbox",{directives:[{name:"show",rawName:"v-show",value:!n.preventColToggle,expression:"!col.preventColToggle"}],staticClass:"table-options-checkbox",attrs:{label:n.label},on:{input:function(e){return t.tableOptionsCheckbox(e,n.label)}},model:{value:n.isColVisible,callback:function(e){t.$set(n,"isColVisible",e)},expression:"col.isColVisible"}})],1)})),0)])])]):t.rowActions?e("th",{attrs:{width:t.rowActionsWidth}}):t._e()],2)])},F=[],M=n("98d3");function U(t,e){var n;if(t=null===(n=t)||void 0===n?void 0:n.parentElement,!t)return null;const r=t.matches||t.matchesSelector;return r.call(t,e)?t:U(t,e)}const B="all",G="some",q="none";var V={mounted(){const t=this.$el.querySelector("TABLE");this._onRowClickBound=this.onRowClick.bind(this),this._onRowMousedownBound=this.onRowMousedown.bind(this),this._onRowContextBound=this.onRowContext.bind(this),t.addEventListener("click",this._onRowClickBound),t.addEventListener("mousedown",this._onRowMousedownBound),t.addEventListener("contextmenu",this._onRowContextBound)},beforeDestroy(){const t=this.$el.querySelector("TABLE");t.removeEventListener("click",this._onRowClickBound),t.removeEventListener("mousedown",this._onRowMousedownBound),t.removeEventListener("contextmenu",this._onRowContextBound)},computed:{howMuchSelected(){const t=this.pagedRows.length,e=this.selectedRows.length;return e>=t&&t>0?B:e>0?G:q},bulkActionsForSelection(){let t=!1;const e=this.pagedRows,n=this.arrangedRows;let r=this.selectedRows;if(!this.selectedRows.length){if(!n)return[];const e=n[0];r=e?[e]:[],t=!0}const o={};for(const a of e)if(a.availableActions)for(const t of a.availableActions)t.bulkable&&H(o,t,!1);for(const a of r)if(a.availableActions)for(const t of a.availableActions)t.bulkable&&t.enabled&&H(o,t,!1);const i=W(o,t);return i.forEach(t=>{const e=this.selectedRows.some(e=>{const n=e.availableActions||[];return n.some(e=>e.action===t.action&&e.enabled)});t.enabled=this.selectedRows.length>0&&e}),i.sort((t,e)=>(e.weight||0)-(t.weight||0))}},data(){return{selectedRows:[],prevNode:null}},watch:{pagedRows(){const t=this.pagedRows,e=[];for(const n of this.selectedRows)t.includes(n)||e.push(n);this.update([],e)}},methods:{onToggleAll(t){return t?(this.update(this.pagedRows,[]),!0):(this.update([],this.pagedRows),!1)},onRowMousedown(t){(Object(M["d"])(t)||this.isSelectionCheckbox(t.target))&&t.preventDefault()},onRowMouseEnter(t){const e=t.target.closest("TR");if(e.classList.contains("sub-row")){const t=e.previousElementSibling;t.classList.add("sub-row-hovered")}},onRowMouseLeave(t){const e=t.target.closest("TR");if(e.classList.contains("sub-row")){const t=e.previousElementSibling;t.classList.remove("sub-row-hovered")}},nodeForEvent(t){const e=t.target.tagName,n=t.target,r=n.closest(".actions");if(n.classList.contains("select-all-check"))return;if(!r&&("A"===e||"BUTTON"===e||U(n,".btn")))return;const o=t.target.closest("TR");return this.nodeForRow(o)},nodeForRow(t){var e;if(null!==(e=t)&&void 0!==e&&e.classList.contains("separator-row"))return;while(t&&!t.classList.contains("main-row"))t=t.previousElementSibling;if(!t)return;const n=t.dataset.nodeId;if(!n)return;const r=this.pagedRows.find(t=>Object(d["g"])(t,this.keyField)===n);return r},async onRowClick(t){const e=this.nodeForEvent(t),n=t.target.closest("TD"),r=null===n||void 0===n?void 0:n.classList.contains("skip-select");if(r)return;const o=this.selectedRows,i=this.isSelectionCheckbox(t.target)||(null===n||void 0===n?void 0:n.classList.contains("row-check")),a=null===n||void 0===n?void 0:n.classList.contains("row-expand"),s=this.pagedRows;if(this.$emit("rowClick",t),!e)return;if(a)return void this.toggleExpand(e);const l=t.target.closest(".actions");if(l){let n=[e];if(this.mangleActionResources){const t=l.querySelector("i");t.classList.remove("icon-actions"),t.classList.add("icon-spinner"),t.classList.add("icon-spin");try{n=await this.mangleActionResources(n)}finally{t.classList.remove("icon-spinner"),t.classList.remove("icon-spin"),t.classList.add("icon-actions")}}return void this.$store.commit("action-menu/show",{resources:n,event:t,elem:l})}const c=o.includes(e);let u=this.prevNode;if(u&&s.includes(u)||(u=e),Object(M["c"])(t))this.toggle(e);else if(Object(M["d"])(t)){const t=this.nodesBetween(u,e);c?this.update([],t):this.update(t,[])}else i?this.toggle(e):this.update([e],s);this.prevNode=e},async onRowContext(t){const e=this.nodeForEvent(t);if(Object(M["e"])(t))return;if(!e)return;t.preventDefault(),t.stopPropagation(),this.prevNode=e;const n=this.selectedRows.includes(e);n||this.update([e],this.selectedRows.slice());let r=this.selectedRows;this.mangleActionResources&&(r=await this.mangleActionResources(r)),this.$store.commit("action-menu/show",{resources:r,event:t})},keySelectRow(t,e=!1){const n=this.nodeForRow(t),r=this.pagedRows;n&&(e?this.update([n],[]):this.update([n],r),this.prevNode=n)},isSelectionCheckbox(t){return"INPUT"===t.tagName&&"checkbox"===t.type&&null!==t.closest(".selection-checkbox")},nodesBetween(t,e){let n=[];const r=this.groupBy;if(r){const r=this.groupedRows;let o=this.groupIdx(t),i=this.groupIdx(e);if(!o||!i)return[];(o.group>i.group||o.group===i.group&&o.item>i.item)&&([o,i]=[i,o]);for(let t=o.group;t<=i.group;t++){const e=r[t].rows;let a=o.group===t?o.item:0;while(e[a]&&(t!this.selectedRows.includes(t)),n},groupIdx(t){const e=this.groupedRows;for(let n=0;n{const e=this.selectedRows.findIndex(e=>e===t);-1!==e&&this.selectedRows.splice(e,1)}),t&&this.selectedRows.push(...t),e.length&&this.$nextTick(()=>{for(let t=0;t{for(let e=0;e{this.$emit("selection",this.selectedRows)})},updateInput(t,e,n){const r=Object(d["g"])(t,n);if(r){const t=this.$el.querySelector(`div[data-checkbox-ctrl][data-node-id="${r}"]`);if(t&&!t.disabled){const n=t.querySelector("label");n&&(n.value=e);let r=t.closest("tr"),o=!0;while(r&&(o||r.classList.contains("sub-row")))e?r.classList.add("row-selected"):r.classList.remove("row-selected"),r=r.nextElementSibling,o=!1}}},select(t){t.forEach(t=>{const e=Object(d["g"])(t,this.keyField),n=this.$el.querySelector(`label[data-node-id="${e}"]`);n.dispatchEvent(new Event("click"))})},applyTableAction(t,e,n){const r={alt:n&&Object(M["a"])(n),event:n},o=this.selectedRows.filter(e=>{const n=e.availableActions.find(e=>e.action===t.action);return null===n||void 0===n?void 0:n.enabled});K(o,t,e,r,this),this.actionOfInterest=null},clearSelection(){this.update([],this.selectedRows)}}};let z=0;function H(t,e,n=!0){let r=e.action;r||(r="anon"+z,z++);let o=t[r];return o||(o=Object.assign({},e),t[r]=o,o.allEnabled=!1),e.enabled?o.anyEnabled=!0:o.allEnabled=!1,n&&(o.available=(o.available||0)+(e.enabled?1:0),o.total=(o.total||0)+1),o}function W(t,e=!1){const n=Object(p["c"])(Object.values(t),"anyEnabled",!0);for(const r of n)r.enabled=!e&&r.available>=r.total;return n}function K(t,e,n,r={},o){if(n=n||[],e.invoke){const i={action:e,event:r.event,isAlt:!!r.alt};return e.invoke.apply(o,[i,t||[],n])}if(t.length>1&&e.bulkAction&&!r.alt){const r=t[0][e.bulkAction];if(r)return r.call(t[0],t,...n)}const i=[];for(const a of t){let t;t=r.alt&&e.altAction?a[e.altAction]:a[e.action],t&&i.push(t.apply(a,n))}return Promise.all(i)}const Y="left",X="right",J="top",Q="center",Z="center",tt="bottom",et="auto";function nt(t){const e=t.getBoundingClientRect(),n=t.offsetWidth,r=t.offsetHeight;return{top:e.top,right:e.left+n,bottom:e.top+r,left:e.left,width:n,height:r}}function rt(t){return{top:t.clientY,left:t.clientX,bottom:t.clientY,right:t.clientX,width:0,height:0}}function ot(){const t=window.innerWidth,e=window.innerHeight,n=window.pageYOffset,r=window.pageXOffset;return{top:n,right:r+t,bottom:n+e,left:r,width:t,height:e}}function it(t,e,n,r){let{positionX:o=et,positionY:i=et}=n||{};const{fudgeX:a=0,fudgeY:s=0,overlapX:l=!0,overlapY:c=!1}=n||{},u=ot();let d;d=e instanceof Event?rt(e):nt(e);let p={};t&&(p=nt(t)),r&&(p={top:0,right:147,bottom:163,left:0,width:147,height:80});const f={position:"absolute"},h={left:l?d.left:d.right,center:(d.left+d.right)/2,right:l?d.right:d.left,top:c?d.bottom:d.top,middle:(d.top+d.bottom)/2,bottom:c?d.top:d.bottom},v={left:u.right-p.width-h.left,center:Math.min(u.right-p.width/2-h.center,h.center-p.width/2-u.left),right:h.right-p.width-u.left,top:h.bottom-p.height-u.top,middle:Math.min(h.middle-p.height/2-u.top,u.bottom-p.height/2-h.middle),bottom:u.bottom-p.height-h.top};switch(o===Q&&v.center<0&&(o=et),o===et?o=v.left<0||1.5*v.right>v.left?X:Y:i===Y&&v.left<0?o=X:i===X&&v.right<0&&(o=Y),o){case Y:f.left=h.left-a+"px";break;case Q:f.left=(h.left+h.right)/2-p.width/2-a+"px";break;case X:f.left=h.right+a-p.width+"px";break}switch(i===Z&&v.middle<0&&(i=et),i===et?i=v.top<0||1.5*v.bottom>v.top?tt:J:i===J&&v.top<0?i=tt:i===tt&&v.bottom<0&&(i=J),i){case J:f.top=h.top+s-p.height+"px";break;case Q:f.top=(h.top+h.bottom)/2+s-p.height+"px";break;case tt:f.top=h.bottom-s+"px";break}return f}var at=function(){var t=this,e=t._self._c;return e("div",{ref:"select",staticClass:"labeled-select",class:{disabled:t.isView||t.disabled,focused:t.focused,[t.mode]:!0,[t.status]:t.status,taggable:t.$attrs.taggable,taggable:t.$attrs.multiple,hoverable:t.hoverTooltip,"compact-input":t.isCompact,"no-label":!t.hasLabel},on:{click:t.focusSearch,focus:t.focusSearch}},[e("div",{class:{"labeled-container":!0,raised:t.raised,empty:t.empty,[t.mode]:!0},style:{border:"none"}},[t.hasLabel?e("label",[t.labelKey?e("t",{attrs:{k:t.labelKey}}):t.label?[t._v(t._s(t.label))]:t._e(),t.requiredField?e("span",{staticClass:"required"},[t._v("*")]):t._e()],2):t._e()]),e("v-select",t._g(t._b({ref:"select-input",staticClass:"inline",class:{"no-label":!(t.label||"").length},attrs:{"append-to-body":t.appendToBody,"calculate-position":t.positionDropdown,clearable:t.clearable,disabled:t.isView||t.disabled||t.loading,"get-option-key":t.getOptionKey,"get-option-label":e=>t.getOptionLabel(e),label:t.optionLabel,options:t.options,"map-keydown":t.mappedKeys,placeholder:t.placeholder,reduce:e=>t.reduce(e),searchable:t.isSearchable,selectable:t.selectable,value:null==t.value||t.loading?"":t.value,"dropdown-should-open":t.dropdownShouldOpen},on:{"search:blur":t.onBlur,"search:focus":t.onFocus,search:t.onSearch,open:t.onOpen,close:t.onClose,"option:selected":function(e){return t.$emit("selecting",e)}},scopedSlots:t._u([{key:"option",fn:function(n){return["group"===n.kind?[e("div",{staticClass:"vs__option-kind-group"},[e("b",[t._v(t._s(t.getOptionLabel(n)))]),n.badge?e("div",[t._v(" "+t._s(n.badge)+" ")]):t._e()])]:"divider"===n.kind?[e("hr")]:"highlighted"===n.kind?[e("div",{staticClass:"option-kind-highlighted"},[t._v(" "+t._s(n.label)+" ")])]:e("div",{on:{mousedown:e=>t.onClickOption(n,e)}},[t._v(" "+t._s(t.getOptionLabel(n))+" "),n.error?e("i",{staticClass:"icon icon-warning pull-right",staticStyle:{"font-size":"20px"}}):t._e()])]}},t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}}))],null,!0)},"v-select",t.$attrs,!1),t.$listeners)),t.loading?e("i",{staticClass:"icon icon-spinner icon-spin icon-lg"}):t._e(),t.tooltip&&!t.focused?e("LabeledTooltip",{attrs:{hover:t.hoverTooltip,value:t.tooltip,status:t.status}}):t._e(),t.validationMessage?e("LabeledTooltip",{attrs:{hover:t.hoverTooltip,value:t.validationMessage}}):t._e()],1)},st=[],lt=g.a.extend({props:{compact:{type:Boolean,default:null},label:{type:String,default:null},labelKey:{type:String,default:null}},computed:{isCompact(){return null!==this.compact?this.compact:!(this.label||this.labelKey)}}}),ct=n("da25");function ut(t,e){t&&("function"===typeof e&&(e=e()),t.style.width="string"!==typeof e?e+"px":e)}function dt(t){if(t&&t.length)return t.length?parseFloat(getComputedStyle(t[0]).width.replace("px","")):parseFloat(getComputedStyle(t).width.replace("px",""))}var pt=g.a.extend({inheritAttrs:!1,props:{mode:{type:String,default:ct["l"]},label:{type:String,default:null},labelKey:{type:String,default:null},placeholderKey:{type:String,default:null},tooltip:{type:[String,Object],default:null},hoverTooltip:{type:Boolean,default:!0},tooltipKey:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:""},value:{type:[String,Number,Object],default:""},options:{default:null,type:Array},searchable:{default:!1,type:Boolean},rules:{default:()=>[],type:Array,validator:t=>t.every(t=>["function"].includes(typeof t))},requireDirty:{default:!0,type:Boolean}},data(){return{raised:this.mode===ct["p"]||!!(""+this.value),focused:!1,blurred:null}},computed:{requiredField(){return this.required||this.rules.some(t=>"required"===(null===t||void 0===t?void 0:t.name))},empty(){return!!(""+this.value)},isView(){return this.mode===ct["p"]},isDisabled(){return this.disabled||this.isView},isSearchable(){const{searchable:t}=this,e=this.options||[];return!!(t||e.length>=10)},validationMessage(){const t=this.rules.find(t=>"required"===(null===t||void 0===t?void 0:t.name)),e=[],n=null===this||void 0===this?void 0:this.value;if(t&&this.blurred&&!this.focused){const e=t(n);if(e)return e}for(const r of this.rules){const t=r(n);t&&"required"!==r.name&&e.push(t)}return e.length>0&&(this.blurred||this.focused||!this.requireDirty)?e.join(", "):void 0}},methods:{resizeHandler(){this.$nextTick(()=>{const t=this.$refs.select.querySelector("ul.vs__dropdown-menu"),e=dt(this.$refs.select)||0,n=dt(t)||0;nthis.optionKey?this.get(t,this.optionKey):this.getOptionLabel(t),r=n(t),o=this.value||[],i=o.findIndex(t=>n(t)===r);i<0||(this.value.splice(i,1),this.$emit("input",this.value),e.preventDefault(),e.stopPropagation(),this.closeOnSelect&&this.$refs["select-input"].closeSearchOptions())}function _t(t,e,n,r){const o=e.$parent.$el,i=o.getBoundingClientRect(),a=r||"bottom-start",s=document.body.offsetHeight,l=s-window.scrollY-i.y-1;let c;if(!a.includes("top")){c=i.y+i.height-1;const e=c+t.offsetHeight;e>window.innerHeight?c=void 0:c+=window.scrollY}c?(t.style.top=c+"px",t.classList.remove("vs__dropdown-up"),o.classList.remove("vs__dropdown-up")):(t.style.bottom=l+"px",t.classList.add("vs__dropdown-up"),o.classList.add("vs__dropdown-up")),t.style.left=i.x+"px",t.style.width="min-content",t.style.minWidth=i.width+"px"}var xt=n("9e74"),Ot=n.n(xt),kt={name:"LabeledSelect",components:{LabeledTooltip:mt},mixins:[lt,pt,yt["a"]],props:{appendToBody:{default:!0,type:Boolean},clearable:{default:!1,type:Boolean},disabled:{default:!1,type:Boolean},required:{default:!1,type:Boolean},hoverTooltip:{default:!0,type:Boolean},loading:{default:!1,type:Boolean},localizedLabel:{default:!1,type:Boolean},optionKey:{default:null,type:String},optionLabel:{default:"label",type:String},placement:{default:null,type:String},reduce:{default:t=>t&&"object"===typeof t&&void 0!==t.value?t.value:t,type:Function},selectable:{default:t=>!t||!t.disabled&&"group"!==t.kind&&"divider"!==t.kind&&!t.loading,type:Function},status:{default:null,type:String},tooltip:{default:null,type:[String,Object]},value:{default:null,type:[String,Object,Number,Array,Boolean]},options:{type:Array,required:!0},closeOnSelect:{type:Boolean,default:!0}},data(){return{selectedVisibility:"visible",shouldOpen:!0}},computed:{hasLabel(){return!this.isCompact&&(!!this.label||!!this.labelKey||!!this.$slots.label)}},methods:{focusSearch(){const t=Date.now()-this.blurred;!this.focused&&t<250||this.$nextTick(()=>{var t;const e=null===(t=this.$refs["select-input"])||void 0===t?void 0:t.searchEl;e&&e.focus()})},onFocus(){this.selectedVisibility="hidden",this.onFocusLabeled()},onBlur(){this.selectedVisibility="visible",this.onBlurLabeled()},onOpen(){this.$emit("on-open"),this.resizeHandler()},onClose(){this.$emit("on-close")},getOptionLabel(t){if(t){if("object"===typeof this.options[0]){const e=this.getUpdatedOption(t);if(e){const t=Object(d["g"])(e,this.optionLabel);return this.localizedLabel&&this.$store.getters["i18n/t"](t)||t}}if(this.$attrs["get-option-label"])return this.$attrs["get-option-label"](t);if(Object(d["g"])(t,this.optionLabel)){if(this.localizedLabel){const e=Object(d["g"])(t,this.optionLabel);return this.$store.getters["i18n/t"](e)||e}return Object(d["g"])(t,this.optionLabel)}return t}},getUpdatedOption(t){const e=this.options&&!this.options.find(e=>t[this.optionLabel]===e[this.optionLabel]);return e?this.options.find(e=>Ot()(this.reduce(t),this.reduce(e))):void 0},positionDropdown(t,e,{width:n}){_t(t,e,n,this.placement)},get:d["g"],onClickOption(t,e){wt.call(this,t,e)},dropdownShouldOpen(t,e=!1){const{noDrop:n,mutableLoading:r}=t,{open:o}=t,i=this.shouldOpen;return e?(t.open=!0,!0):(!1===i&&(this.shouldOpen=!0,t.closeSearchOptions()),!n&&(o&&i&&!r))},onSearch(t){t&&this.dropdownShouldOpen(this.$refs["select-input"],!0)},getOptionKey(t){return this.optionKey?Object(d["g"])(t,this.optionKey):this.getOptionLabel(t)}}},At=kt,Et=(n("3345"),Object(k["a"])(At,at,st,!1,null,"529406d8",null)),St=Et.exports,Ct={components:{Checkbox:f["a"],LabeledSelect:St},props:{columns:{type:Array,required:!0},sortBy:{type:String,required:!0},defaultSortBy:{type:String,default:""},group:{type:String,default:""},groupOptions:{type:Array,default:()=>[]},descending:{type:Boolean,required:!0},hasAdvancedFiltering:{type:Boolean,required:!1},tableColsOptions:{type:Array,default:()=>[]},tableActions:{type:Boolean,required:!0},rowActions:{type:Boolean,required:!0},howMuchSelected:{type:String,required:!0},checkWidth:{type:Number,default:30},rowActionsWidth:{type:Number,required:!0},subExpandColumn:{type:Boolean,default:!1},expandWidth:{type:Number,default:30},labelFor:{type:Function,required:!0},noRows:{type:Boolean,default:!0},noResults:{type:Boolean,default:!0},loading:{type:Boolean,required:!1}},data(){return{tableColsOptionsVisibility:!1,tableColsMenuPosition:null}},watch:{advancedFilteringValues(){this.watcherUpdateLiveAndDelayed(!0,!1)},tableColsOptionsVisibility(t){t?(window.addEventListener("click",this.onClickOutside),this.$emit("update-cols-options")):window.removeEventListener("click",this.onClickOutside)}},computed:{isAll:{get(){return this.howMuchSelected!==q},set(t){this.$emit("on-toggle-all",t)}},hasAdvGrouping(){var t,e;return(null===(t=this.group)||void 0===t?void 0:t.length)&&(null===(e=this.groupOptions)||void 0===e?void 0:e.length)},advGroup:{get(){return this.group||this.advGroup},set(t){this.$emit("group-value-change",t)}},isIndeterminate(){return this.howMuchSelected===G}},methods:{changeSort(t,e){if(!e.sort)return;let n=!1;this.sortBy===e.name&&(n=!this.descending),this.$emit("on-sort-change",e.name,n)},isCurrent(t){return t.name===this.sortBy},tableColsOptionsClick(t){const e=document.querySelector(".table-options-container"),n=document.querySelector(".table-options-btn");this.tableColsMenuPosition=it(e,t||n,{overlapX:!0,fudgeX:326,fudgeY:-22,positionX:Q,positionY:et}),this.tableColsOptionsVisibility=!this.tableColsOptionsVisibility},onClickOutside(t){const e=this.$refs["table-options"];e&&!e.contains(t.target)&&(this.tableColsOptionsVisibility=!1)},tableOptionsCheckbox(t,e){this.$emit("col-visibility-change",{label:e,value:t})},tooltip(t){if(!t.tooltip)return null;const e=this.$store.getters["i18n/exists"];return e(t.tooltip)?this.t(t.tooltip):t.tooltip}}},Tt=Ct,Rt=(n("3b9b"),n("0151"),Object(k["a"])(Tt,$,F,!1,null,"36bf3081",null)),It=Rt.exports;const Lt="allcols",Nt="All Columns",jt=":::islabel";var Dt={data(){return{searchQuery:null,previousFilter:null,previousResult:null}},computed:{searchFields(){const t=Pt(this.columns);return this.extraSearchFields&&Object(p["b"])(t,this.extraSearchFields),t},filteredRows(){return this.hasAdvancedFiltering?this.handleAdvancedFiltering():this.handleFiltering()}},methods:{handleAdvancedFiltering(){if(this.subMatches=null,this.searchQuery.length){const t=(this.arrangedRows||[]).slice(),e=t.filter(t=>this.searchQuery.every(e=>{if(e.prop===Lt){const n=this.advFilterSelectOptions.slice(1);let r=[];return n.forEach(t=>{if(t.value.includes("[")&&t.value.includes("]"))r=r.concat(JSON.parse(t.value));else{const e=t.isLabel?`${t.label}${jt}`:t.value;r.push(e)}}),Ft(r,[e.value],t)}{if(e.prop.includes("[")&&e.prop.includes("]"))return Ft(JSON.parse(e.prop),[e.value],t);let n=e.prop;return e.prop.includes("metadata.labels")&&(n=`${e.label}${jt}`),Ft([n],[e.value],t)}}));return e}return this.arrangedRows},handleFiltering(){const t=(this.searchQuery||"").trim().toLowerCase();let e;if(t&&this.previousResult&&t.startsWith(this.previousFilter)?e=this.previousResult.slice():(this.previousResult=null,e=(this.arrangedRows||[]).slice()),this.previousFilter=t,!t.length)return this.subMatches=null,this.previousResult=null,e;const n=this.searchFields,r=t.split(/\s*[, ]\s*/),o=this.subSearch,i=this.subFields,a={};for(let s=e.length-1;s>=0;s--){const t=e[s];let l=0,c=!0;if(c=Ft(n,r,t),i&&o){const e=t[o]||[];for(let n=e.length-1;n>=0;n--){let e=!0;e=Ft(i,r,t),e&&l++}a[Object(d["g"])(t,this.keyField)]=l}c||0!==l||Object(p["g"])(e,s)}return this.subMatches=a,this.previousResult=e,e}},watch:{arrangedRows(t){this.previousResult=null}}};function Pt(t){const e=[];return(t||[]).forEach(t=>{const n=t.search;n?"string"===typeof n?Object(p["a"])(e,n):Object(p["f"])(n)&&Object(p["b"])(e,n):!1===n||Object(p["a"])(e,t.value||t.name)}),e.filter(t=>!!t)}const $t=/^[0-9a-f\.:]+$/i;function Ft(t,e,n){for(let r=0;r0&&(t=r.substr(e+1),r=r.substr(0,e)),o=r.includes(".")?Object(d["g"])(n,r):n[r]}if(void 0!==o&&(o=(""+o).toLowerCase(),o))if(t){if("exact"===t){if(o===e)return!0}else if("ip"===t){const t=$t.test(e);if(t){const t=new RegExp(`(?:^|\\.)${e}(?:\\.|$)`);if(t.test(o))return!0}}else if("prefix"===t&&0===o.indexOf(e))return!0}else if(o.includes((""+e).toLowerCase()))return!0}return!1}var Ut=n("1d19"),Bt={computed:{sortFields(){let t=(this.groupBy?this.groupSort||this.groupBy:null)||[],e=[];const n=(this.columns||this.headers).find(t=>t&&t.name&&t.name.toLowerCase()===this.sortBy.toLowerCase());this.sortBy&&n&&n.sort&&(e=n.sort),Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]);const r=[...t,...e];return Object(p["a"])(r,"nameSort"),Object(p["a"])(r,"id"),r},arrangedRows(){let t;if(this.sortGenerationFn&&(t=`${this.sortGenerationFn.apply(this)}/${this.rows.length}/${this.descending}/${this.sortFields.join(",")}`,this.cacheKey===t))return this.cachedRows;const e=Object(Ut["a"])(this.rows,this.sortFields,this.descending);return t&&(this.cacheKey=t,this.cachedRows=e),e}},data(){let t=null;if(this._defaultSortBy=this.defaultSortBy,!this._defaultSortBy){const t=this.headers.find(t=>!!t.defaultSort),e=this.headers.find(t=>"name"===t.name);if(t)this._defaultSortBy=t.name;else if(e)this._defaultSortBy=e.name;else{const t=this.headers.filter(t=>"state"!==t.name)[0];this._defaultSortBy=t?t.name:"id"}}return t&&this.headers.find(e=>e.name===t)||(t=this._defaultSortBy),{sortBy:t,descending:!1,cachedRows:null,cacheKey:null}},methods:{changeSort(t,e){this.sortBy=t,this.descending=e,this.setPage(1)}}},Gt=n("5000"),qt={computed:{indexFrom(){return Math.max(0,1+this.perPage*(this.page-1))},indexTo(){return Math.min(this.filteredRows.length,this.indexFrom+this.perPage-1)},totalPages(){return Math.ceil(this.filteredRows.length/this.perPage)},showPaging(){return!this.loading&&this.paging&&this.totalPages>1},pagingDisplay(){const t={...this.pagingParams||{},count:this.filteredRows.length,pages:this.totalPages,from:this.indexFrom,to:this.indexTo};return this.$store.getters["i18n/t"](this.pagingLabel,t)},pagedRows(){return this.paging?this.filteredRows.slice(this.indexFrom-1,this.indexTo):this.filteredRows}},data(){const t=this.getPerPage();return{page:1,perPage:t}},watch:{pagedRows(){const t=this.indexFrom,e=this.filteredRows.length;this.totalPages>0&&this.page>1&&t>e&&this.setPage(this.totalPages)}},methods:{getPerPage(){let t=this.rowsPerPage||0;return t<=0&&(t=parseInt(this.$store.getters["prefs/get"](Gt["d"]),10)||0),t<=0&&(t=10),t},setPage(t){this.page!==t&&(this.page=t)},goToPage(t){let e;switch(t){case"first":e=1;break;case"prev":e=Math.max(1,this.page-1);break;case"next":e=Math.min(this.totalPages,this.page+1);break;case"last":e=this.totalPages;break}this.setPage(e)},getPageByRow(t,e=(t=>t)){const n=this.filteredRows.map(e).indexOf(t);return-1===n?null:Math.ceil(n/this.perPage)}}},Vt={computed:{groupedRows(){const t=this.groupBy,e=this.groupRef||t;if(!t)return[{key:"default",ref:"default",rows:this.pagedRows}];const n=[],r={};for(const o of this.pagedRows){const i=Object(d["g"])(o,t)||"",a=Object(d["g"])(o,e);let s=r[i];s?s.rows.push(o):(s={key:i,ref:a,rows:[o]},r[i]=s,n.push(s))}return n}}};const zt="inline-block";var Ht={data(){return{bulkActionsClass:"bulk",bulkActionClass:"bulk-action",bulkActionsDropdownClass:"bulk-actions-dropdown",bulkActionAvailabilityClass:"action-availability",hiddenActions:[],updateHiddenBulkActions:P()(this.protectedUpdateHiddenBulkActions,10)}},beforeDestroy(){window.removeEventListener("resize",this.onWindowResize)},mounted(){window.addEventListener("resize",this.onWindowResize),this.updateHiddenBulkActions()},watch:{selectedRows(){this.updateHiddenBulkActions()},keyedAvailableActions(){this.updateHiddenBulkActions()}},computed:{availableActions(){return this.bulkActionsForSelection.filter(t=>!t.external)},keyedAvailableActions(){return this.availableActions.map(t=>t.action)},selectedRowsText(){return this.selectedRows.length?this.t("sortableTable.actionAvailability.selected",{actionable:this.selectedRows.length}):null},actionTooltip(){if(!this.selectedRows.length||!this.actionOfInterest)return null;const t=this.selectedRows.filter(this.canRunBulkActionOfInterest).length;return t===this.selectedRows.length?null:this.t("sortableTable.actionAvailability.some",{actionable:t,total:this.selectedRows.length})}},methods:{onWindowResize(){this.updateHiddenBulkActions(),this.onScroll()},protectedUpdateHiddenBulkActions(){if(!this.$refs.container)return;const t=this.$refs.container.querySelector("."+this.bulkActionsClass),e=this.$refs.container.querySelector("."+this.bulkActionsDropdownClass);if(!t||!e)return;const n=t.offsetWidth,r=this.$refs.container.querySelectorAll("."+this.bulkActionClass),o=Array.from(r||[]),i=this.$refs.container.querySelector("."+this.bulkActionAvailabilityClass);let a=0;this.selectedRowsText&&(i?(i.style.display=zt,a=i.offsetWidth):i.style.display="none;"),this.hiddenActions=[];let s=0,l=!1,c=n-a;for(let u=0;u=c)if(l){const e=t.attributes.getNamedItem("id").value;this.hiddenActions.push(this.availableActions.find(t=>t.action===e)),t.style.display="none"}else e.style.display=zt,u=-1,s=0,l=!0,c=n-e.offsetWidth-a}l||(e.style.display="none")}}};const Wt=Lt;var Kt={props:{group:{type:String,default:()=>""},groupOptions:{type:Array,default:()=>[]},hasAdvancedFiltering:{type:Boolean,default:!1},advFilterHideLabelsAsCols:{type:Boolean,default:!1},advFilterPreventFilteringLabels:{type:Boolean,default:!1}},data(){return{columnOptions:[],colOptionsWatcher:null,advancedFilteringVisibility:!1,advancedFilteringValues:[],advFilterSearchTerm:null,advFilterSelectedProp:Wt,advFilterSelectedLabel:Nt,column:null}},mounted(){this.hasAdvancedFiltering&&this.updateColsOptions()},watch:{advancedFilteringValues(){this.watcherUpdateLiveAndDelayed(!0,!1)},advancedFilteringVisibility(t){t?(window.addEventListener("click",this.onClickOutside),this.updateColsOptions()):window.removeEventListener("click",this.onClickOutside)}},computed:{advFilterSelectOptions(){return this.columnOptions.filter(t=>t.isFilter&&!t.preventFiltering)},advGroupOptions(){return this.groupOptions.map(t=>({label:this.t(t.tooltipKey),value:t.value}))}},methods:{handleColsVisibilyAndFiltering(t){const e=t;return this.columnOptions.forEach(t=>{if(t.isTableOption){const n=e.findIndex(e=>e.name===t.name);-1!==n?(e[n].isColVisible=t.isColVisible,e[n].isFilter=t.isFilter):e.push(t)}}),e},setColsOptions(){let t=[];const e=[],n=[],r=this.headers.slice().filter(t=>!t.maxPageSize||t.maxPageSize&&t.maxPageSize>=this.perPage);return r.forEach(t=>{var e;const r=t.name,o=t.labelKey?this.t(""+t.labelKey):t.label,i=!(Object.keys(t).includes("search")&&!t.search);let a=t.sort;const s=t.valueProp||t.value;let l=null,c=!0;if(t.sort&&s?("string"===typeof t.sort&&(a=t.sort.includes(":")?[t.sort.split(":")[0]]:[t.sort]),l=a.includes(s)?JSON.stringify([s]):JSON.stringify(a.concat([s]))):l=s?JSON.stringify([s]):null,null!==(e=this.columnOptions)&&void 0!==e&&e.length){const t=this.columnOptions.find(t=>t.name===r&&t.label===o);t&&(c=t.isColVisible)}n.push({name:r,label:o,value:l,isFilter:i,isTableOption:!0,isColVisible:c})}),this.rows.length&&this.rows.forEach(t=>{var n,r,o;null!==(n=t.metadata)&&void 0!==n&&n.labels&&Object.keys(null===(r=t.metadata)||void 0===r?void 0:r.labels).length&&Object.keys(null===(o=t.metadata)||void 0===o?void 0:o.labels).forEach(t=>{var n;const r={name:t,label:t,value:"metadata.labels."+t,isFilter:!0,isTableOption:!0,isColVisible:!1,isLabel:!0,preventFiltering:this.advFilterPreventFilteringLabels,preventColToggle:this.advFilterHideLabelsAsCols};if(null!==(n=this.columnOptions)&&void 0!==n&&n.length){const e=this.columnOptions.find(e=>e.name===t&&e.label===t);e&&(r.isColVisible=e.isColVisible)}e.filter(e=>e.label===t).length||e.push(r)})}),t=n.concat(e),t.length&&t.unshift({name:Nt,label:Nt,value:Lt,isFilter:!0,isTableOption:!1}),t},addAdvancedFilter(){this.advFilterSelectedProp&&this.advFilterSearchTerm&&(this.advancedFilteringValues.push({prop:this.advFilterSelectedProp,value:this.advFilterSearchTerm,label:this.advFilterSelectedLabel}),this.eventualSearchQuery=this.advancedFilteringValues,this.advancedFilteringVisibility=!1,this.advFilterSelectedProp=Wt,this.advFilterSelectedLabel=Nt,this.advFilterSearchTerm=null)},clearAllAdvancedFilters(){this.advancedFilteringValues=[],this.eventualSearchQuery=this.advancedFilteringValues,this.advancedFilteringVisibility=!1,this.advFilterSelectedProp=Wt,this.advFilterSelectedLabel=Nt,this.advFilterSearchTerm=null},clearAdvancedFilter(t){this.advancedFilteringValues.splice(t,1),this.eventualSearchQuery=this.advancedFilteringValues},onClickOutside(t){const e=this.$refs["advanced-filter-group"];e&&!e.contains(t.target)&&(this.advancedFilteringVisibility=!1)},updateColsOptions(){this.columnOptions=this.setColsOptions()},changeColVisibility(t){const e=this.columnOptions.findIndex(e=>e.label===t.label);-1!==e&&(this.columnOptions[e].isColVisible=t.value)}}};const Yt={},Xt={TABLET:"tablet",LAPTOP:"laptop",DESKTOP:"desktop"};var Jt={name:"SortableTable",components:{THead:It,Checkbox:f["a"],AsyncButton:E,ActionDropdown:L,LabeledSelect:St},mixins:[Dt,Bt,qt,Vt,V,Ht,Kt],props:{headers:{type:Array,required:!0},rows:{type:Array,required:!0},keyField:{type:String,default:"_key"},loading:{type:Boolean,required:!1},groupBy:{type:String,default:null},groupRef:{type:String,default:null},groupSort:{type:Array,default:null},defaultSortBy:{type:String,default:null},tableActions:{type:Boolean,default:!0},rowActions:{type:Boolean,default:!0},mangleActionResources:{type:Function,default:null},rowActionsWidth:{type:Number,default:40},search:{type:Boolean,default:!0},extraSearchFields:{type:Array,default:null},subRows:{type:Boolean,default:!1},subExpandable:{type:Boolean,default:!1},subExpandColumn:{type:Boolean,default:!1},subSearch:{type:String,default:null},subFields:{type:Array,default:null},topDivider:{type:Boolean,default:!0},bodyDividers:{type:Boolean,default:!1},overflowX:{type:Boolean,default:!1},overflowY:{type:Boolean,default:!1},paging:{type:Boolean,default:!1},pagingLabel:{type:String,default:"sortableTable.paging.generic"},pagingParams:{type:Object,default:null},rowsPerPage:{type:Number,default:null},noRowsKey:{type:String,default:"sortableTable.noRows"},showNoRows:{type:Boolean,default:!0},noDataKey:{type:String,default:"sortableTable.noData"},showHeaders:{type:Boolean,default:!0},sortGenerationFn:{type:Function,default:null},getCustomDetailLink:{type:Function,default:null},componentTestid:{type:String,default:"sortable-table"},useQueryParamsForSimpleFiltering:{type:Boolean,default:!1},forceUpdateLiveAndDelayed:{type:Number,default:0}},data(){var t;let e="",n="";var r,o;!this.hasAdvancedFiltering&&this.useQueryParamsForSimpleFiltering&&null!==(t=this.$route.query)&&void 0!==t&&t.q&&(e=null===(r=this.$route.query)||void 0===r?void 0:r.q,n=null===(o=this.$route.query)||void 0===o?void 0:o.q);return{currentPhase:y.WAITING,expanded:{},searchQuery:e,eventualSearchQuery:n,actionOfInterest:null,loadingDelay:!1}},mounted(){this._loadingDelayTimer=setTimeout(()=>{this.loadingDelay=!0},200);const t=document.querySelector("main");this._onScroll=this.onScroll.bind(this),null===t||void 0===t||t.addEventListener("scroll",this._onScroll)},beforeDestroy(){clearTimeout(this.loadingDelayTimer),clearTimeout(this._scrollTimer),clearTimeout(this._loadingDelayTimer),clearTimeout(this._liveColumnsTimer),clearTimeout(this._delayedColumnsTimer),clearTimeout(this.manualRefreshTimer);const t=document.querySelector("main");null===t||void 0===t||t.removeEventListener("scroll",this._onScroll)},watch:{eventualSearchQuery:P()((function(t){if(this.searchQuery=t,!this.hasAdvancedFiltering&&this.useQueryParamsForSimpleFiltering){var e;const n={name:this.$route.name,params:{...this.$route.params},query:{...this.$route.query,q:t}};!t&&null!==(e=this.$route.query)&&void 0!==e&&e.q&&(n.query={}),this.$router.replace(n)}}),200),descending(t,e){this.watcherUpdateLiveAndDelayed(t,e)},searchQuery(t,e){this.watcherUpdateLiveAndDelayed(t,e)},sortFields(t,e){this.watcherUpdateLiveAndDelayed(t,e)},groupBy(t,e){this.watcherUpdateLiveAndDelayed(t,e)},namespaces(t,e){this.watcherUpdateLiveAndDelayed(t,e)},page(t,e){this.watcherUpdateLiveAndDelayed(t,e)},forceUpdateLiveAndDelayed(t,e){this.watcherUpdateLiveAndDelayed(t,e)},initalLoad:{handler(t){t&&(this._didinit=!0,this.$nextTick(()=>this.updateLiveAndDelayed()))},immediate:!0},manualRefreshLoadingFinished:{handler(t,e){this.currentPhase=t?y.ACTION:y.WAITING,t&&t!==e&&this.$nextTick(()=>this.updateLiveAndDelayed())},immediate:!0}},created(){this.debouncedRefreshTableData=P()(this.refreshTableData,500)},computed:{...Object(i["a"])({isTooManyItemsToAutoUpdate:"resource-fetch/isTooManyItemsToAutoUpdate"}),...Object(i["a"])({isManualRefreshLoading:"resource-fetch/manualRefreshIsLoading"}),namespaces(){return this.$store.getters["activeNamespaceCache"]},initalLoad(){var t;return!(this.loading||this._didinit||null===(t=this.rows)||void 0===t||!t.length)},manualRefreshLoadingFinished(){var t;return!(this.loading||!this._didinit||null===(t=this.rows)||void 0===t||!t.length||this.isManualRefreshLoading)},fullColspan(){let t=0;for(let e=0;e!t.maxPageSize||t.maxPageSize&&t.maxPageSize>=this.perPage);if(this.groupBy){const e=t.find(t=>t.name===this.groupBy);e&&Object(p["h"])(t,e)}const e=t.find(t=>!t.width);if(!e){const e=t.find(t=>t.canBeVariable);if(e){const n=Object(d["e"])(e);delete n.width,t.splice(t.indexOf(e),1,n)}}if(this.hasAdvancedFiltering){const e=this.handleColsVisibilyAndFiltering(t);return e}return t},dt(){const t={check:"Select: ",actions:"Actions: "};return this.columns.forEach(e=>{t[e.name]=(e.label||e.name)+":"}),t},classObject(){return{"top-divider":this.topDivider,"body-dividers":this.bodyDividers,"overflow-y":this.overflowY,"overflow-x":this.overflowX}},hasLiveColumns(){const t=this.columns.find(t=>{var e;return(null===(e=t.formatter)||void 0===e?void 0:e.startsWith("Live"))||t.liveUpdates});return!!t},hasDelayedColumns(){const t=this.columns.find(t=>t.delayLoading);return!!t},columnFormmatterIDs(){const t={};return this.columns.forEach(e=>{e.formatter&&(t[e.formatter]=Object(u["c"])(e.formatter))}),t},displayRows(){const t=[],e=this.columnFormmatterIDs;return this.groupedRows.forEach(n=>{const r={grp:n,key:n.key,ref:n.ref,rows:[]};t.push(r),n.rows.forEach(t=>{const n={row:t,key:this.get(t,this.keyField),showSubRow:this.showSubRow(t,this.keyField),canRunBulkActionOfInterest:this.canRunBulkActionOfInterest(t),columns:[]};r.rows.push(n),this.columns.forEach(r=>{var o;const i=r.delayLoading?void 0:this.valueFor(t,r,r.isLabel);let a,s=i,l=!1;if(Array.isArray(i)&&(s=i.join(", ")),r.formatter)if(Yt[r.formatter])a=Yt[r.formatter],l=!0;else{var c;const t=null===(c=this.$plugin)||void 0===c?void 0:c.getDynamic("formatters",r.formatter);t&&(a=t,l=!0)}n.columns.push({col:r,value:i,formatted:s,component:a,needRef:l,delayed:r.delayLoading,live:(null===(o=r.formatter)||void 0===o?void 0:o.startsWith("Live"))||r.liveUpdates,label:this.labelFor(r),dasherize:e[r.formatter]||""})})})}),t}},methods:{refreshTableData(){this.$store.dispatch("resource-fetch/doManualRefresh")},get:d["g"],dasherize:u["c"],onScroll(){(this.hasLiveColumns||this.hasDelayedColumns)&&(clearTimeout(this._liveColumnsTimer),clearTimeout(this._scrollTimer),clearTimeout(this._delayedColumnsTimer),this._scrollTimer=setTimeout(()=>{this.updateLiveColumns(),this.updateDelayedColumns()},300))},watcherUpdateLiveAndDelayed(t,e){t!==e&&this.$nextTick(()=>this.updateLiveAndDelayed())},updateLiveAndDelayed(){this.hasLiveColumns&&this.updateLiveColumns(),this.hasDelayedColumns&&this.updateDelayedColumns()},updateDelayedColumns(){if(clearTimeout(this._delayedColumnsTimer),!this.$refs.column||0===this.pagedRows.length)return;const t=this.$refs.column.filter(t=>t.startDelayedLoading&&!t.__delayedLoading),e=(window.innerHeight||document.documentElement.clientHeight)+100;let n=0;for(let r=0;r=0&&i<=e&&(o.startDelayedLoading(!0),o.__delayedLoading=!0,n++,4===n))return void(this._delayedColumnsTimer=setTimeout(this.updateDelayedColumns,100))}},updateLiveColumns(){if(clearTimeout(this._liveColumnsTimer),!this.$refs.column||!this.hasLiveColumns||0===this.pagedRows.length)return;const t=window.innerHeight||document.documentElement.clientHeight,e=this.$refs.column.filter(t=>!!t.liveUpdate),n=s()();let r=Number.MAX_SAFE_INTEGER;for(let o=0;o=0&&a<=t){const t=i.liveUpdate(n);tthis.updateLiveColumns(),1e3*r)},labelFor(t){return t.labelKey?this.t(t.labelKey,void 0,!0):t.label?t.label:Object(u["p"])(t.name)},valueFor(t,e,n){if("function"===typeof e.value)return e.value(t);var r,o,i;if(n)return null!==(r=t.metadata)&&void 0!==r&&r.labels&&null!==(o=t.metadata)&&void 0!==o&&o.labels[e.label]?null===(i=t.metadata)||void 0===i?void 0:i.labels[e.label]:"";const a=e.value||e.name,s=Object(d["g"])(t,a);return null===s||void 0===s?"":s},isExpanded(t){const e=t[this.keyField];return!!this.expanded[e]},toggleExpand(t){const e=t[this.keyField],n=!this.expanded[e];return this.expanded[e]=n,this.expanded={...this.expanded},n},setBulkActionOfInterest(t){this.actionOfInterest=t},canRunBulkActionOfInterest(t){var e;if(!this.actionOfInterest||c()(null===t||void 0===t?void 0:t.availableActions))return!1;const n=null===(e=t.availableActions)||void 0===e?void 0:e.find(t=>t.action===this.actionOfInterest.action);return null===n||void 0===n?void 0:n.enabled},focusSearch(){this.$refs.searchQuery&&(this.$refs.searchQuery.focus(),this.$refs.searchQuery.select())},nearestCheckbox(){var t;return null===(t=document.activeElement.closest("tr.main-row"))||void 0===t?void 0:t.querySelector(".checkbox-custom")},focusAdjacent(t=!0){const e=Array.from(this.$el.querySelectorAll(".checkbox-custom")),n=this.nearestCheckbox();let r=-1;return r=n?e.indexOf(n)+(t?1:-1):t?1:e.length-1,r<1?(r=1,null):r>=e.length?(r=e.length-1,null):e[r]?(e[r].focus(),e[r]):void 0},focusNext:j()((function(t,e=!1){const n=this.focusAdjacent(!0),r=U(n,"tr");null!==r&&void 0!==r&&r.classList.contains("row-selected")||this.keySelectRow(r,e)}),50),focusPrevious:j()((function(t,e=!1){const n=this.focusAdjacent(!1),r=U(n,"tr");null!==r&&void 0!==r&&r.classList.contains("row-selected")||this.keySelectRow(r,e)}),50),showSubRow(t,e){const n=this.subRows&&(!this.subExpandable||this.expanded[Object(d["g"])(t,e)]),r=t.stateDescription;return n||r},handleActionButtonClick(t,e){this.$emit("clickedActionButton",{event:e,targetElement:this.$refs["actionButton"+t][0]})}}},Qt=Jt,Zt=(n("8303"),n("6420"),Object(k["a"])(Qt,r,o,!1,null,"940c6fb8",null));e["b"]=Zt.exports},1001:function(t,e,n){var r=n("986c");function o(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}t.exports=o},1032:function(t,e,n){"use strict";var r=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"checkbox-outer-container",attrs:{"data-checkbox-ctrl":""}},[e("label",{staticClass:"checkbox-container",class:{disabled:t.isDisabled},attrs:{for:t.id},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.clicked(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.clicked(e))}],click:function(e){return t.clicked(e)}}},[e("input",{attrs:{type:"checkbox",tabindex:-1,name:t.id},domProps:{checked:t.isChecked,value:t.valueWhenTrue},on:{click:function(t){t.stopPropagation(),t.preventDefault()}}}),e("span",{staticClass:"checkbox-custom",class:{indeterminate:t.indeterminate},attrs:{tabindex:t.isDisabled?-1:0,"aria-label":t.label,"aria-checked":!!t.value,role:"checkbox"}}),t.$slots.label||t.label||t.labelKey||t.tooltipKey||t.tooltip?e("span",{staticClass:"checkbox-label",class:{"checkbox-primary":t.primary}},[t._t("label",(function(){return[t.labelKey?e("t",{attrs:{k:t.labelKey,raw:!0}}):t.label?[t._v(t._s(t.label))]:t._e(),t.tooltipKey?e("i",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.t(t.tooltipKey),expression:"t(tooltipKey)"}],staticClass:"checkbox-info icon icon-info icon-lg"}):t.tooltip?e("i",{directives:[{name:"clean-tooltip",rawName:"v-clean-tooltip",value:t.tooltip,expression:"tooltip"}],staticClass:"checkbox-info icon icon-info icon-lg"}):t._e()]}))],2):t._e()]),t.descriptionKey||t.description?e("div",{staticClass:"checkbox-outer-container-description"},[t.descriptionKey?e("t",{attrs:{k:t.descriptionKey}}):t.description?[t._v(" "+t._s(t.description)+" ")]:t._e()],2):t._e()])},o=[],i=n("8bbf"),a=n.n(i),s=n("da25"),l=n("bddd"),c=n("736a"),u=n.n(c),d=a.a.extend({name:"Checkbox",props:{value:{type:[Boolean,Array,String],default:!1},label:{type:String,default:null},labelKey:{type:String,default:null},id:{type:String,default:String(1e3*Math.random())},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},mode:{type:String,default:s["l"]},tooltip:{type:[String,Object],default:null},tooltipKey:{type:String,default:null},valueWhenTrue:{type:[Boolean,String,Number],default:!0},descriptionKey:{type:String,default:null},description:{type:String,default:null},primary:{type:Boolean,default:!1}},computed:{isDisabled(){return this.disabled||this.mode===s["p"]},isChecked(){return this.isMulti(this.value)?this.findTrueValues(this.value):this.value===this.valueWhenTrue}},methods:{clicked(t){if("A"===t.target.tagName&&t.target.href)return!0;if(t.stopPropagation(),t.preventDefault(),this.isDisabled)return;const e={bubbles:!0,cancelable:!1,shiftKey:t.shiftKey,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey},n=new CustomEvent("click",e),r=u()(this.value);this.isMulti(r)?(this.isChecked?Object(l["h"])(r,this.valueWhenTrue):Object(l["a"])(r,this.valueWhenTrue),this.$emit("input",r)):this.isString(this.valueWhenTrue)?this.isChecked?this.$emit("input",null):this.$emit("input",this.valueWhenTrue):(this.$emit("input",!r),this.$el.dispatchEvent(n))},isMulti(t){return Array.isArray(t)},isString(t){return"string"===typeof t},findTrueValues(t){return t.find(t=>t===this.valueWhenTrue)||!1}}}),p=d,f=(n("b5fc"),n("d802")),h=Object(f["a"])(p,r,o,!1,null,null,null);e["a"]=h.exports},"108e":function(t,e){function n(t){return function(e){return null==e?void 0:e[t]}}t.exports=n},"10d1":function(t,e,n){var r=n("201b"),o=function(){return r.Date.now()};t.exports=o},1386:function(t,e){function n(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}t.exports=n},"13ee":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".cluster-list-view[data-v-56771e1c]{margin-bottom:2rem}.cluster-list-view .favorite-icon[data-v-56771e1c]{margin-right:1rem;background:none}",""]),t.exports=e},"1a22":function(t,e,n){var r=n("59a3");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("e0e37dd4",r,!0,{sourceMap:!1,shadowMode:!1})},"1ab6":function(t,e,n){(function(t){var r=n("201b"),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o,s=a?r.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(t,e){if(e)return t.slice();var n=t.length,r=l?l(n):new t.constructor(n);return t.copy(r),r}t.exports=c}).call(this,n("6984")(t))},"1ada":function(t,e,n){var r=n("e350");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("513fcb75",r,!0,{sourceMap:!1,shadowMode:!1})},"1c25":function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}function i(t){t.register("l10n","en-us",()=>n.e(2).then(n.t.bind(null,"1bb6",7)))}var a=function(){var t=this,e=t._self._c;return t.loading?e("Loading",{attrs:{label:t.$store.getters["i18n/t"]("appLauncher.loading")}}):e("div",{staticClass:"main-container"},[e("ClusterActions",{attrs:{"search-query":t.searchQuery,"is-grid-view":"grid"===t.selectedView,"selected-cluster":t.selectedCluster,"cluster-options":t.clusterOptions,"sort-order":t.tableHeaders[0].sortOrder},on:{"update:search-query":t.updateSearchQuery,"toggle-sort":t.toggleSortOrder,"update:selected-cluster":function(e){t.selectedCluster=e},"set-view":function(e){t.selectedView=e}}}),t.favoritedApps.length>0?e("div",[e("div",{staticClass:"cluster-header"},[e("h2",[t._v(t._s(t.t("appLauncher.globalApps")))])]),e("div",{staticClass:"services-by-cluster-grid"},t._l(t.sortedFavoritedApps,(function(n){return e("AppLauncherCard",{key:`${n.clusterId}-${n.id}-${n.kind}-fav`,attrs:{app:n,isInGlobalView:!0,"favorited-apps":t.favoritedApps},on:{"toggle-favorite":t.toggleFavorite}})})),1)]):t._e(),t.selectedCluster?e("div",["grid"===t.selectedView?e("div",t._l(t.displayedClusterData,(function(n){return e("div",{key:n.id},[e("ClusterGridView",{attrs:{"cluster-data":n,"favorited-apps":t.favoritedApps},on:{"toggle-favorite":t.toggleFavorite}})],1)})),0):"list"===t.selectedView?e("div",t._l(t.displayedClusterData,(function(n){return e("div",{key:n.id},[e("ClusterListView",{attrs:{"cluster-data":n,"favorited-apps":t.favoritedApps,"table-headers":t.tableHeaders},on:{"toggle-favorite":t.toggleFavorite}})],1)})),0):t._e()]):e("div",[e("p",[t._v(t._s(t.$store.getters["i18n/t"]("appLauncher.noClusterSelected")))])])],1)},s=[],l=n("907c"),c=function(){var t=this,e=t._self._c;return t.loading?e("div",{staticClass:"loading-indicator"},[t.showMessage?e("div",{staticClass:"overlay",class:{"overlay-content-mode":"content"===t.mode,"overlay-main-mode":"main"===t.mode}},[e("t",{attrs:{k:"generic.loading",raw:!0}})],1):t._e()]):e("div",[t._t("default")],2)},u=[],d={props:{loading:{type:Boolean,default:!0},mode:{type:String,default:"content"},noDelay:{type:Boolean,default:!1}},data(){return{timer:null,showMessage:this.noDelay}},mounted(){this.timer=setTimeout(()=>{this.showMessage=!0},250)},beforeDestroy(){clearTimeout(this.timer)}},p=d,f=(n("4720"),n("d802")),h=Object(f["a"])(p,c,u,!1,null,"23723280",null),v=h.exports,b=function(){var t=this,e=t._self._c;return t.app?e("Card",{staticClass:"app-launcher-card",attrs:{"show-highlight-border":!1,sticky:!0},scopedSlots:t._u([{key:"title",fn:function(){var n,r,o;return[e("div",{staticStyle:{width:"100%"}},[e("p",{staticStyle:{"font-size":"1.2rem"}},[t._v(" "+t._s(null===(n=t.app.metadata)||void 0===n?void 0:n.name)+" ")]),e("div",{staticStyle:{color:"var(--input-label)",display:"flex","justify-content":"space-between","margin-top":"4px"}},["Service"===t.app.kind&&void 0!==(null===(r=t.app.metadata)||void 0===r||null===(r=r.labels)||void 0===r?void 0:r["app.kubernetes.io/version"])?e("p",[t._v(" "+t._s(t.kubernetesVersion)+" ")]):t._e(),"Service"===t.app.kind&&void 0!==(null===(o=t.app.metadata)||void 0===o||null===(o=o.labels)||void 0===o?void 0:o["helm.sh/chart"])?e("p",[t._v(" "+t._s(t.helmChart)+" ")]):t._e(),"Ingress"===t.app.kind?e("p",[t._v(" Ingress ")]):t._e()])])]},proxy:!0},{key:"body",fn:function(){return["Service"===t.app.kind?e("p",[t._v(" "+t._s((t.isGlobalApp||t.isFavorited)&&t.isInGlobalView?t.app.clusterName+"/":"")+t._s(t.namespace)+"/"+t._s(t.name)+" ")]):t._e(),"Ingress"===t.app.kind?e("p",[t._v(" "+t._s((t.isGlobalApp||t.isFavorited)&&t.isInGlobalView?t.app.clusterName+": ":"")+t._s(t.ingressPath)+" ")]):t._e()]},proxy:!0},{key:"actions",fn:function(){var n,r,o,i,a;return[t.isGlobalApp?e("i",{staticClass:"icon icon-globe icon-only"}):e("button",{staticClass:"icon-button",on:{click:t.toggleFavorite}},[e("i",{class:["icon",t.isFavorited?"icon-star":"icon-star-open"]})]),(null!==(n=null===(r=t.endpoints)||void 0===r?void 0:r.length)&&void 0!==n?n:0)<=1&&"Service"===t.app.kind?e("a",{staticClass:"btn role-primary",attrs:{disabled:!(null!==(o=t.endpoints)&&void 0!==o&&o.length),href:null===(i=t.endpoints[0])||void 0===i?void 0:i.value,target:"_blank",rel:"noopener noreferrer nofollow",title:0===(null===(a=t.endpoints)||void 0===a?void 0:a.length)?t.t("appLauncher.noEndpointFoundForApp"):t.t("appLauncher.launchEndpoint",{endpoint:t.endpoints[0].label})}},[t._v(" "+t._s(t.t("appLauncher.launch"))+" ")]):"Ingress"===t.app.kind?e("a",{staticClass:"btn role-primary",attrs:{href:t.ingressPath,target:"_blank",rel:"noopener noreferrer nofollow"}},[t._v(" "+t._s(t.t("appLauncher.launch"))+" ")]):e("ButtonDropDown",{attrs:{"button-label":t.t("appLauncher.launch"),"dropdown-options":t.endpoints,title:t.t("appLauncher.launchAnEndpointFromSelection")},on:{"click-action":e=>t.openLink(e.value)}})]},proxy:!0}],null,!1,345375573)}):t._e()},g=[],m=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"card-container",class:{"highlight-border":t.showHighlightBorder,"card-sticky":t.sticky},attrs:{"data-testid":"card"}},[e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-title",attrs:{"data-testid":"card-title-slot"}},[t._t("title",(function(){return[t._v(" "+t._s(t.title)+" ")]}))],2),e("hr"),e("div",{staticClass:"card-body",attrs:{"data-testid":"card-body-slot"}},[t._t("body",(function(){return[t._v(" "+t._s(t.content)+" ")]}))],2),t.showActions?e("div",{staticClass:"card-actions",attrs:{"data-testid":"card-actions-slot"}},[t._t("actions",(function(){return[e("button",{staticClass:"btn role-primary",on:{click:t.buttonAction}},[t._v(" "+t._s(t.buttonText)+" ")])]}))],2):t._e()])])},y=[],w=n("8bbf"),_=n.n(w),x=_.a.extend({name:"Card",props:{title:{type:String,default:""},content:{type:String,default:""},buttonAction:{type:Function,default:()=>{}},buttonText:{type:String,default:"go"},showHighlightBorder:{type:Boolean,default:!0},showActions:{type:Boolean,default:!0},sticky:{type:Boolean,default:!1}}}),O=x,k=(n("7a93"),Object(f["a"])(O,m,y,!1,null,null,null)),A=k.exports,E=function(){var t=this,e=t._self._c;return e("v-select",t._b({ref:"button-dropdown",staticClass:"button-dropdown btn",class:{disabled:t.disabled,focused:t.focused},attrs:{"append-to-body":!0,"calculate-position":t.withPopper,searchable:!1,clearable:!1,"close-on-select":t.closeOnSelect,filterable:!1,value:t.buttonLabel,options:t.dropdownOptions,"map-keydown":t.mappedKeys,"get-option-key":e=>t.optionKey?t.get(e,t.optionKey):t.getOptionLabel(e),"get-option-label":e=>t.getOptionLabel(e),selectable:t.selectable},on:{"search:blur":t.onBlur,"search:focus":t.onFocus,input:function(e){return t.$emit("click-action",e)}},scopedSlots:t._u([{key:"selected-option",fn:function(n){return[e("button",{staticClass:"dropdown-button-two btn",attrs:{tabindex:"-1",type:"button"},on:{click:function(e){return t.ddButtonAction(n)},focus:t.focusSearch}},[t._v(" "+t._s(n.label)+" ")])]}},t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return["selected-option"!==n?t._t(n,null,null,e):t._e()]}}}))],null,!0)},"v-select",t.$attrs,!1),[e("template",{slot:"no-options"},[t._t("no-options")],2)],2)},S=[];function C(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function T(t){if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e?e.defaultView:window}return t}function R(t){var e=T(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function I(t){var e=T(t).Element;return t instanceof e||t instanceof Element}function L(t){var e=T(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function N(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function j(t){return t!==T(t)&&L(t)?N(t):R(t)}function D(t){return t?(t.nodeName||"").toLowerCase():null}function P(t){return(I(t)?t.ownerDocument:t.document).documentElement}function $(t){return C(P(t)).left+R(t).scrollLeft}function F(t){return T(t).getComputedStyle(t)}function M(t){var e=F(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function U(t,e,n){void 0===n&&(n=!1);var r=P(e),o=C(t),i=L(e),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&(("body"!==D(e)||M(r))&&(a=j(e)),L(e)?(s=C(e),s.x+=e.clientLeft,s.y+=e.clientTop):r&&(s.x=$(r))),{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function B(t){return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}function G(t){return"html"===D(t)?t:t.assignedSlot||t.parentNode||t.host||P(t)}function q(t){return["html","body","#document"].indexOf(D(t))>=0?t.ownerDocument.body:L(t)&&M(t)?t:q(G(t))}function V(t,e){void 0===e&&(e=[]);var n=q(t),r="body"===D(n),o=T(n),i=r?[o].concat(o.visualViewport||[],M(n)?n:[]):n,a=e.concat(i);return r?a:a.concat(V(G(i)))}function z(t){return["table","td","th"].indexOf(D(t))>=0}function H(t){if(!L(t)||"fixed"===F(t).position)return null;var e=t.offsetParent;if(e){var n=P(e);if("body"===D(e)&&"static"===F(e).position&&"static"!==F(n).position)return n}return e}function W(t){var e=G(t);while(L(e)&&["html","body"].indexOf(D(e))<0){var n=F(e);if("none"!==n.transform||"none"!==n.perspective||n.willChange&&"auto"!==n.willChange)return e;e=e.parentNode}return null}function K(t){var e=T(t),n=H(t);while(n&&z(n)&&"static"===F(n).position)n=H(n);return n&&"body"===D(n)&&"static"===F(n).position?e:n||W(t)||e}var Y="top",X="bottom",J="right",Q="left",Z="auto",tt=[Y,X,J,Q],et="start",nt="end",rt="clippingParents",ot="viewport",it="popper",at="reference",st=tt.reduce((function(t,e){return t.concat([e+"-"+et,e+"-"+nt])}),[]),lt=[].concat(tt,[Z]).reduce((function(t,e){return t.concat([e,e+"-"+et,e+"-"+nt])}),[]),ct="beforeRead",ut="read",dt="afterRead",pt="beforeMain",ft="main",ht="afterMain",vt="beforeWrite",bt="write",gt="afterWrite",mt=[ct,ut,dt,pt,ft,ht,vt,bt,gt];function yt(t){var e=new Map,n=new Set,r=[];function o(t){n.add(t.name);var i=[].concat(t.requires||[],t.requiresIfExists||[]);i.forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||o(t)})),r}function wt(t){var e=yt(t);return mt.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}function _t(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function xt(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign(Object.assign(Object.assign({},n),e),{},{options:Object.assign(Object.assign({},n.options),e.options),data:Object.assign(Object.assign({},n.data),e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function kt(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function Lt(t){var e,n=t.reference,r=t.element,o=t.placement,i=o?Tt(o):null,a=o?Rt(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case Y:e={x:s,y:n.y-r.height};break;case X:e={x:s,y:n.y+n.height};break;case J:e={x:n.x+n.width,y:l};break;case Q:e={x:n.x-r.width,y:l};break;default:e={x:n.x,y:n.y}}var c=i?It(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case et:e[c]=Math.floor(e[c])-Math.floor(n[u]/2-r[u]/2);break;case nt:e[c]=Math.floor(e[c])+Math.ceil(n[u]/2-r[u]/2);break;default:}}return e}function Nt(t){var e=t.state,n=t.name;e.modifiersData[n]=Lt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var jt={name:"popperOffsets",enabled:!0,phase:"read",fn:Nt,data:{}},Dt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pt(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return{x:Math.round(e*o)/o||0,y:Math.round(n*o)/o||0}}function $t(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.offsets,a=t.position,s=t.gpuAcceleration,l=t.adaptive,c=Pt(i),u=c.x,d=c.y,p=i.hasOwnProperty("x"),f=i.hasOwnProperty("y"),h=Q,v=Y,b=window;if(l){var g=K(n);g===T(n)&&(g=P(n)),o===Y&&(v=X,d-=g.clientHeight-r.height,d*=s?1:-1),o===Q&&(h=J,u-=g.clientWidth-r.width,u*=s?1:-1)}var m,y=Object.assign({position:a},l&&Dt);return s?Object.assign(Object.assign({},y),{},(m={},m[v]=f?"0":"",m[h]=p?"0":"",m.transform=(b.devicePixelRatio||1)<2?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",m)):Object.assign(Object.assign({},y),{},(e={},e[v]=f?d+"px":"",e[h]=p?u+"px":"",e.transform="",e))}function Ft(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s={placement:Tt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),$t(Object.assign(Object.assign({},s),{},{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),$t(Object.assign(Object.assign({},s),{},{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-placement":e.placement})}var Mt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ft,data:{}};function Ut(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];L(o)&&D(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))}function Bt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],o=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]),a=i.reduce((function(t,e){return t[e]="",t}),{});L(r)&&D(r)&&(Object.assign(r.style,a),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}}var Gt={name:"applyStyles",enabled:!0,phase:"write",fn:Ut,effect:Bt,requires:["computeStyles"]};function qt(t,e,n){var r=Tt(t),o=[Q,Y].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign(Object.assign({},e),{},{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Q,J].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Vt(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=void 0===o?[0,0]:o,a=lt.reduce((function(t,n){return t[n]=qt(n,e.rects,i),t}),{}),s=a[e.placement],l=s.x,c=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=a}var zt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vt},Ht={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ht[t]}))}var Kt={start:"end",end:"start"};function Yt(t){return t.replace(/start|end/g,(function(t){return Kt[t]}))}function Xt(t){var e=T(t),n=P(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+$(t),y:s}}function Jt(t){var e=P(t),n=R(t),r=t.ownerDocument.body,o=Math.max(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Math.max(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+$(t),s=-n.scrollTop;return"rtl"===F(r||e).direction&&(a+=Math.max(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:i,x:a,y:s}}function Qt(t,e){var n=Boolean(e.getRootNode&&e.getRootNode().host);if(t.contains(e))return!0;if(n){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Zt(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function te(t){var e=C(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ee(t,e){return e===ot?Zt(Xt(t)):L(e)?te(e):Zt(Jt(P(t)))}function ne(t){var e=V(G(t)),n=["absolute","fixed"].indexOf(F(t).position)>=0,r=n&&L(t)?K(t):t;return I(r)?e.filter((function(t){return I(t)&&Qt(t,r)&&"body"!==D(t)})):[]}function re(t,e,n){var r="clippingParents"===e?ne(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(e,n){var r=ee(t,n);return e.top=Math.max(r.top,e.top),e.right=Math.min(r.right,e.right),e.bottom=Math.min(r.bottom,e.bottom),e.left=Math.max(r.left,e.left),e}),ee(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function oe(){return{top:0,right:0,bottom:0,left:0}}function ie(t){return Object.assign(Object.assign({},oe()),t)}function ae(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function se(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=void 0===r?t.placement:r,i=n.boundary,a=void 0===i?rt:i,s=n.rootBoundary,l=void 0===s?ot:s,c=n.elementContext,u=void 0===c?it:c,d=n.altBoundary,p=void 0!==d&&d,f=n.padding,h=void 0===f?0:f,v=ie("number"!==typeof h?h:ae(h,tt)),b=u===it?at:it,g=t.elements.reference,m=t.rects.popper,y=t.elements[p?b:u],w=re(I(y)?y:y.contextElement||P(t.elements.popper),a,l),_=C(g),x=Lt({reference:_,element:m,strategy:"absolute",placement:o}),O=Zt(Object.assign(Object.assign({},m),x)),k=u===it?O:_,A={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},E=t.modifiersData.offset;if(u===it&&E){var S=E[o];Object.keys(A).forEach((function(t){var e=[J,X].indexOf(t)>=0?1:-1,n=[Y,X].indexOf(t)>=0?"y":"x";A[t]+=S[n]*e}))}return A}function le(t,e){void 0===e&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?lt:l,u=Rt(r),d=u?s?st:st.filter((function(t){return Rt(t)===u})):tt,p=d.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=d);var f=p.reduce((function(e,n){return e[n]=se(t,{placement:n,boundary:o,rootBoundary:i,padding:a})[Tt(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}function ce(t){if(Tt(t)===Z)return[];var e=Wt(t);return[Yt(t),e,Yt(e)]}function ue(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,v=n.allowedAutoPlacements,b=e.options.placement,g=Tt(b),m=g===b,y=l||(m||!h?[Wt(b)]:ce(b)),w=[b].concat(y).reduce((function(t,n){return t.concat(Tt(n)===Z?le(e,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),_=e.rects.reference,x=e.rects.popper,O=new Map,k=!0,A=w[0],E=0;E=0,I=R?"width":"height",L=se(e,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),N=R?T?J:Q:T?X:Y;_[I]>x[I]&&(N=Wt(N));var j=Wt(N),D=[];if(i&&D.push(L[C]<=0),s&&D.push(L[N]<=0,L[j]<=0),D.every((function(t){return t}))){A=S,k=!1;break}O.set(S,D)}if(k)for(var P=h?3:1,$=function(t){var e=w.find((function(e){var n=O.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},F=P;F>0;F--){var M=$(F);if("break"===M)break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0)}}var de={name:"flip",enabled:!0,phase:"main",fn:ue,requiresIfExists:["offset"],data:{_skip:!1}};function pe(t){return"x"===t?"y":"x"}function fe(t,e,n){return Math.max(t,Math.min(e,n))}function he(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,v=void 0===h?0:h,b=se(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=Tt(e.placement),m=Rt(e.placement),y=!m,w=It(g),_=pe(w),x=e.modifiersData.popperOffsets,O=e.rects.reference,k=e.rects.popper,A="function"===typeof v?v(Object.assign(Object.assign({},e.rects),{},{placement:e.placement})):v,E={x:0,y:0};if(x){if(i){var S="y"===w?Y:Q,C="y"===w?X:J,T="y"===w?"height":"width",R=x[w],I=x[w]+b[S],L=x[w]-b[C],N=f?-k[T]/2:0,j=m===et?O[T]:k[T],D=m===et?-k[T]:-O[T],P=e.elements.arrow,$=f&&P?B(P):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:oe(),M=F[S],U=F[C],G=fe(0,O[T],$[T]),q=y?O[T]/2-N-G-M-A:j-G-M-A,V=y?-O[T]/2+N+G+U+A:D+G+U+A,z=e.elements.arrow&&K(e.elements.arrow),H=z?"y"===w?z.clientTop||0:z.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][w]:0,Z=x[w]+q-W-H,tt=x[w]+V-W,nt=fe(f?Math.min(I,Z):I,R,f?Math.max(L,tt):L);x[w]=nt,E[w]=nt-R}if(s){var rt="x"===w?Y:Q,ot="x"===w?X:J,it=x[_],at=it+b[rt],st=it-b[ot],lt=fe(at,it,st);x[_]=lt,E[_]=lt-it}e.modifiersData[r]=E}}var ve={name:"preventOverflow",enabled:!0,phase:"main",fn:he,requiresIfExists:["offset"]};function be(t){var e,n=t.state,r=t.name,o=n.elements.arrow,i=n.modifiersData.popperOffsets,a=Tt(n.placement),s=It(a),l=[Q,J].indexOf(a)>=0,c=l?"height":"width";if(o&&i){var u=n.modifiersData[r+"#persistent"].padding,d=B(o),p="y"===s?Y:Q,f="y"===s?X:J,h=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],v=i[s]-n.rects.reference[s],b=K(o),g=b?"y"===s?b.clientHeight||0:b.clientWidth||0:0,m=h/2-v/2,y=u[p],w=g-d[c]-u[f],_=g/2-d[c]/2+m,x=fe(y,_,w),O=s;n.modifiersData[r]=(e={},e[O]=x,e.centerOffset=x-_,e)}}function ge(t){var e=t.state,n=t.options,r=t.name,o=n.element,i=void 0===o?"[data-popper-arrow]":o,a=n.padding,s=void 0===a?0:a;null!=i&&("string"!==typeof i||(i=e.elements.popper.querySelector(i),i))&&Qt(e.elements.popper,i)&&(e.elements.arrow=i,e.modifiersData[r+"#persistent"]={padding:ie("number"!==typeof s?s:ae(s,tt))})}var me={name:"arrow",enabled:!0,phase:"main",fn:be,effect:ge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ye(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function we(t){return[Y,J,X,Q].some((function(e){return t[e]>=0}))}function _e(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=se(e,{elementContext:"reference"}),s=se(e,{altBoundary:!0}),l=ye(a,r),c=ye(s,o,i),u=we(l),d=we(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var xe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_e},Oe=[Ct,jt,Mt,Gt,zt,de,ve,me,xe],ke=At({defaultModifiers:Oe}),Ae=n("e24b"),Ee=n("9c38"),Se=n.n(Ee),Ce=n("9f16"),Te={mixins:[Ce["a"]],props:{buttonLabel:{default:"",type:String},closeOnSelect:{default:!0,type:Boolean},disabled:{default:!1,type:Boolean},dropdownOptions:{default:()=>[],type:Array},optionKey:{default:null,type:String},optionLabel:{default:"label",type:String},size:{default:null,type:String},value:{default:null,type:String},placement:{default:"bottom-start",type:String},selectable:{default:t=>!t||!t.disabled&&"group"!==t.kind&&"divider"!==t.kind&&!t.loading,type:Function}},data(){return{focused:!1}},methods:{withPopper(t,e,{width:n}){const r=e.$refs.search.clientWidth,o=t.clientWidth;t.style.width=oi.destroy()},ddButtonAction(t){this.focusSearch(),this.$emit("dd-button-action",t)},getOptionLabel(t){return Se()(t)?t:this.$attrs["get-option-label"]?this.$attrs["get-option-label"](t):Object(Ae["g"])(t,this.optionLabel)?this.localizedLabel?this.$store.getters["i18n/t"](Object(Ae["g"])(t,this.optionLabel)):Object(Ae["g"])(t,this.optionLabel):t},onFocus(){return this.onFocusLabeled()},onFocusLabeled(){this.focused=!0},onBlur(){return this.onBlurLabeled()},onBlurLabeled(){this.focused=!1},focusSearch(){this.$nextTick(()=>{const t=this.$refs["button-dropdown"].searchEl;t&&t.focus()})},get:Ae["g"]}},Re=Te,Ie=(n("ea11"),Object(f["a"])(Re,E,S,!1,null,"4b526572",null)),Le=Ie.exports,Ne=n("4048"),je=(n("b10f"),n("330a"),n("640c"));function De(t){const e=t.tls||[];return e.flatMap(t=>t.hosts||[])}function Pe(t,e){return De(t).includes(e)}function $e(t,e,n={}){const r=t.spec,o=e.host||"",i=n.path||"";let a="";return o&&(a=Pe(r,o)?"https://":"http://"),`${a}${o}${i}`}je["a"];var Fe={components:{Card:A,ButtonDropDown:Le},props:{favoritedApps:{type:Array,required:!0},app:{type:Object,default:null},isInGlobalView:{type:Boolean,default:!1}},methods:{openLink(t){window.open(t)},toggleFavorite(){this.$emit("toggle-favorite",this.app)}},computed:{endpoints(){var t,e;return null!==(t=null===(e=this.app)||void 0===e||null===(e=e.spec)||void 0===e||null===(e=e.ports)||void 0===e?void 0:e.map(t=>{var e;const n=`${Object(Ne["b"])(t.port,t.protocol)?"https":"http"}:${null===(e=this.app.metadata)||void 0===e?void 0:e.name}:${t.port}`;return{label:`${n}${"UDP"===t.protocol?" (UDP)":""}`,value:`/k8s/clusters/${this.app.clusterId}/api/v1/namespaces/${this.app.metadata.namespace}/services/${n}/proxy`}}))&&void 0!==t?t:[]},computedServiceName(){var t,e,n;return null!==(t=null===(e=this.app)||void 0===e||null===(e=e.metadata)||void 0===e||null===(e=e.labels)||void 0===e?void 0:e["app.kubernetes.io/component"])&&void 0!==t?t:null===(n=this.app)||void 0===n||null===(n=n.metadata)||void 0===n?void 0:n.name},helmChart(){var t;return null===(t=this.app)||void 0===t||null===(t=t.metadata)||void 0===t||null===(t=t.labels)||void 0===t?void 0:t["helm.sh/chart"]},kubernetesVersion(){var t;return null===(t=this.app)||void 0===t||null===(t=t.metadata)||void 0===t||null===(t=t.labels)||void 0===t?void 0:t["app.kubernetes.io/version"]},name(){var t;return null===(t=this.app)||void 0===t||null===(t=t.metadata)||void 0===t?void 0:t.name},namespace(){var t;return null===(t=this.app)||void 0===t||null===(t=t.metadata)||void 0===t?void 0:t.namespace},isFavorited(){return this.favoritedApps.some(t=>(null===t||void 0===t?void 0:t.id)===this.app.id&&(null===t||void 0===t?void 0:t.kind)===this.app.kind)},isGlobalApp(){var t;return"true"===(null===(t=this.app)||void 0===t||null===(t=t.metadata)||void 0===t||null===(t=t.annotations)||void 0===t?void 0:t["extensions.applauncher/global-app"])},ingressPath(){var t;return $e(this.app,null===(t=this.app)||void 0===t||null===(t=t.spec)||void 0===t||null===(t=t.rules)||void 0===t?void 0:t[0])}},name:"AppLauncherCard",layout:"plain"},Me=Fe,Ue=(n("9e35"),Object(f["a"])(Me,b,g,!1,null,"6e6b3554",null)),Be=Ue.exports,Ge=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cluster-actions"},[e("div",{staticClass:"search-input"},[e("input",{attrs:{placeholder:t.$store.getters["i18n/t"]("appLauncher.filter")},domProps:{value:t.searchQuery},on:{input:function(e){return t.$emit("update:search-query",e.target.value)}}})]),t.isGridView?e("div",{staticClass:"sort-buttons",on:{click:function(e){return t.$emit("toggle-sort")}}},[e("div",{staticClass:"sort-button",class:{active:"asc"===t.sortOrder},attrs:{disabled:"asc"===t.sortOrder}},[e("i",{staticClass:"icon-chevron-up"})]),e("div",{staticClass:"sort-label"},[e("p",[t._v(t._s(t.aToZorZtoA))])]),e("div",{staticClass:"sort-button",class:{active:"desc"===t.sortOrder},attrs:{disabled:"desc"===t.sortOrder}},[e("i",{staticClass:"icon-chevron-down"})])]):t._e(),e("div",{staticClass:"select-wrapper"},[e("select",{staticClass:"cluster-select",domProps:{value:t.selectedCluster},on:{change:function(e){return t.$emit("update:selected-cluster",e.target.value)}}},t._l(t.clusterOptions,(function(n){return e("option",{key:n.value,domProps:{value:n.value}},[t._v(" "+t._s(n.label)+" ")])})),0)]),e("button",{staticClass:"icon-button",on:{click:function(e){return t.$emit("set-view","grid")}}},[e("i",{staticClass:"icon icon-apps"})]),e("button",{staticClass:"icon-button",on:{click:function(e){return t.$emit("set-view","list")}}},[e("i",{staticClass:"icon icon-list-flat"})])])},qe=[],Ve={name:"ClusterActions",props:{searchQuery:{type:String,required:!0},isGridView:{type:Boolean,required:!0},sortOrder:{type:String,required:!0},selectedCluster:{type:String,required:!0},clusterOptions:{type:Array,required:!0}},computed:{aToZorZtoA(){return console.log(this.$store.getters["i18n/t"]("appLauncher.aToZ")),"asc"===this.sortOrder?this.$store.getters["i18n/t"]("appLauncher.aToZ"):this.$store.getters["i18n/t"]("appLauncher.zToA")}},emits:["update:search-query","toggle-sort","update:selected-cluster","set-view"]},ze=Ve,He=(n("de94"),Object(f["a"])(ze,Ge,qe,!1,null,"88f0655a",null)),We=He.exports,Ke=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cluster-grid-view"},[e("div",{staticClass:"cluster-header"},[e("h1",[t._v(" "+t._s(t.clusterData.name)+" ")])]),e("div",{staticClass:"services-by-cluster-grid"},t._l(t.clusterData.filteredApps,(function(n){return e("AppLauncherCard",{key:`${n.clusterId}-${n.id}-${n.kind}`,attrs:{app:n,isInGlobalView:!1,"favorited-apps":t.favoritedApps},on:{"toggle-favorite":function(e){return t.$emit("toggle-favorite",e)}}})})),1)])},Ye=[],Xe={name:"ClusterGridView",components:{AppLauncherCard:Be},props:{clusterData:{type:Object,required:!0},favoritedApps:{type:Array,required:!0}},emits:["toggle-favorite"]},Je=Xe,Qe=(n("9d1b"),Object(f["a"])(Je,Ke,Ye,!1,null,"1dd06ec8",null)),Ze=Qe.exports,tn=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cluster-list-view"},[e("div",{staticClass:"cluster-header"},[e("h1",[t._v(" "+t._s(t.clusterData.name)+" ")])]),e("SortableTable",{attrs:{rows:t.clusterData.filteredApps,headers:t.tableHeaders,"row-key":"uniqueId",search:!1,"table-actions":!1,"row-actions":!1,"no-rows-text":t.$store.getters["i18n/t"]("appLauncher.noAppsFound")},scopedSlots:t._u([{key:"cell:name",fn:function({row:e}){return[t._v(" "+t._s(e.metadata.name)+" ")]}},{key:"cell:namespace",fn:function({row:e}){return[t._v(" "+t._s(e.metadata.namespace)+" ")]}},{key:"cell:version",fn:function({row:e}){var n;return[t._v(" "+t._s(null===(n=e.metadata.labels)||void 0===n?void 0:n["app.kubernetes.io/version"])+" ")]}},{key:"cell:helmChart",fn:function({row:e}){var n;return[t._v(" "+t._s(null===(n=e.metadata.labels)||void 0===n?void 0:n["helm.sh/chart"])+" ")]}},{key:"cell:actions",fn:function({row:n}){var r,o;return[e("div",{staticStyle:{display:"flex","justify-content":"flex-end"}},[e("button",{staticClass:"icon-button favorite-icon",on:{click:function(e){return t.$emit("toggle-favorite",n)}}},[e("i",{class:["icon",t.isFavorited(n,t.favoritedApps)?"icon-star":"icon-star-open"]})]),(null===(r=t.getEndpoints(n))||void 0===r?void 0:r.length)<=1?e("a",{staticClass:"btn role-primary",attrs:{href:null===(o=t.getEndpoints(n)[0])||void 0===o?void 0:o.value,target:"_blank",rel:"noopener noreferrer nofollow"}},[t._v(" "+t._s(t.t("appLauncher.launch"))+" ")]):e("ButtonDropDown",{attrs:{"button-label":t.t("appLauncher.launch"),"dropdown-options":t.getEndpoints(n),title:t.t("appLauncher.launchAnEndpointFromSelection")},on:{"click-action":t.openLink}})],1)]}}])})],1)},en=[],nn=n("0fb1"),rn={name:"ClusterListView",components:{SortableTable:nn["b"],ButtonDropDown:Le},props:{clusterData:{type:Object,required:!0},favoritedApps:{type:Array,required:!0},tableHeaders:{type:Array,required:!0}},methods:{isFavorited(t,e){return e.some(e=>e.id===t.id&&e.kind===t.kind)},getEndpoints(t){var e,n;return null!==(e=null===t||void 0===t||null===(n=t.spec.ports)||void 0===n?void 0:n.map(e=>{const n=`${Object(Ne["b"])(e.port,e.protocol)?"https":"http"}:${t.metadata.name}:${e.port}`;return{label:`${n}${"UDP"===e.protocol?" (UDP)":""}`,value:`/k8s/clusters/${t.clusterId}/api/v1/namespaces/${t.metadata.namespace}/services/${n}/proxy`}}))&&void 0!==e?e:[]},openLink(t){window.open(t.value,"_blank")}},emits:["toggle-favorite"]},on=rn,an=(n("2551"),Object(f["a"])(on,tn,en,!1,null,"56771e1c",null)),sn=an.exports,ln={components:{Loading:v,AppLauncherCard:Be,ClusterActions:We,ClusterGridView:Ze,ClusterListView:sn},data(){return{servicesByCluster:[],ingressesByCluster:[],loading:!0,selectedCluster:null,clusterOptions:[],selectedView:"grid",favoritedApps:[],searchQuery:"",tableHeaders:[{name:"name",label:"Name",value:"metadata.name",sort:"metadata.name",sortOrder:"asc"},{name:"namespace",label:"Namespace",value:"metadata.namespace"},{name:"version",label:"Version",value:'metadata.labels["app.kubernetes.io/version"]'},{name:"helmChart",label:"Helm Chart",value:'metadata.labels["helm.sh/chart"]'},{name:"actions",label:"Actions",value:"actions",align:"right"}]}},async mounted(){try{const t=await this.getClusters();this.servicesByCluster=await this.getServicesByCluster(t),this.ingressesByCluster=await this.getIngressesByCluster(t),this.selectedCluster="ALL_CLUSTERS",this.generateClusterOptions(),this.servicesByCluster.forEach(t=>{t.services.forEach(e=>{var n;"true"===(null===(n=e.metadata)||void 0===n||null===(n=n.annotations)||void 0===n?void 0:n["extensions.applauncher/global-app"])&&this.favoritedApps.push({...e,clusterId:t.id,clusterName:t.name})})}),this.ingressesByCluster.forEach(t=>{t.ingresses.forEach(e=>{var n;"true"===(null===(n=e.metadata)||void 0===n||null===(n=n.annotations)||void 0===n?void 0:n["extensions.applauncher/global-app"])&&this.favoritedApps.push({...e,clusterId:t.id,clusterName:t.name})})});const e=localStorage.getItem("favoritedApps");e&&this.favoritedApps.push(...JSON.parse(e))}catch(t){console.error("Error fetching clusters",t)}finally{this.loading=!1}},methods:{async getClusters(){return await this.$store.dispatch("management/findAll",{type:l["k"].CLUSTER})},getCluster(t){return this.servicesByCluster.find(e=>e.id===t)||null},async getServicesByCluster(t){return await Promise.all(t.filter(t=>t.isReady).map(async t=>{const e={name:t.spec.displayName,id:t.id,services:[],loading:!0,error:!1};try{const n=(await this.$store.dispatch("cluster/request",{url:`/k8s/clusters/${t.id}/v1/services`})).data;e.services=n.map(e=>({...e,clusterId:t.id,clusterName:t.spec.displayName}))}catch(n){console.error(`Error fetching services for cluster ${t.id}:`,n),e.error=!0}finally{e.loading=!1}return e}))},async getIngressesByCluster(t){return Promise.all(t.filter(t=>t.isReady).map(async t=>{const e={name:t.spec.displayName,id:t.id,ingresses:[],loading:!0,error:!1};try{const n=(await this.$store.dispatch("cluster/request",{url:`/k8s/clusters/${t.id}/v1/networking.k8s.io.ingresses`})).data;e.ingresses=n.map(e=>({...e,clusterId:t.id,clusterName:t.spec.displayName}))}catch(n){console.error(`Error fetching ingresses for cluster ${t.id}:`,n),e.error=!0}finally{e.loading=!1}return e}))},generateClusterOptions(){this.clusterOptions=[{label:"All Clusters",value:"ALL_CLUSTERS"},...this.servicesByCluster.map(t=>({label:t.name,value:t.id}))]},toggleSortOrder(){this.tableHeaders[0].sortOrder="asc"===this.tableHeaders[0].sortOrder?"desc":"asc"},toggleFavorite(t){const e=this.favoritedApps.findIndex(e=>e.id===t.id&&e.kind===t.kind);-1!==e?this.favoritedApps.splice(e,1):this.favoritedApps.push({...t});const n=JSON.stringify(this.favoritedApps.filter(t=>{var e;return"true"!==(null===(e=t.metadata.annotations)||void 0===e?void 0:e["extensions.applauncher/global-app"])}));localStorage.setItem("favoritedApps",n)},updateSearchQuery(t){this.searchQuery=t}},computed:{aToZorZtoA(){return"asc"===this.tableHeaders[0].sortOrder?"A-Z":"Z-A"},displayedClusterData(){if("ALL_CLUSTERS"===this.selectedCluster){const t=this.servicesByCluster.map(t=>{var e,n;return{...t,ingresses:(null===(e=this.ingressesByCluster.find(e=>e.id===t.id))||void 0===e?void 0:e.ingresses)||[],filteredApps:this.filteredApps(t.services,(null===(n=this.ingressesByCluster.find(e=>e.id===t.id))||void 0===n?void 0:n.ingresses)||[])}});return t}{const e=this.getCluster(this.selectedCluster);if(e){var t;const n=(null===(t=this.ingressesByCluster.find(t=>t.id===e.id))||void 0===t?void 0:t.ingresses)||[],r=e.services,o=this.filteredApps(r,n);return[{...e,ingresses:n,filteredApps:o}]}console.error("Cluster not found:",this.selectedCluster)}return[]},sortedFavoritedApps(){return this.favoritedApps.sort((t,e)=>{const n=t.metadata.name.toLowerCase(),r=e.metadata.name.toLowerCase();return"asc"===this.tableHeaders[0].sortOrder?n.localeCompare(r):r.localeCompare(n)})},filteredApps(){return(t,e)=>{const n=[...t||[],...e||[]].sort((t,e)=>{const n=t.metadata.name.toLowerCase(),r=e.metadata.name.toLowerCase();return"asc"===this.tableHeaders[0].sortOrder?n.localeCompare(r):r.localeCompare(n)});if(""===this.searchQuery.trim())return n;{const t=this.searchQuery.trim().toLowerCase();return n.filter(e=>{var n,r;return e.metadata.name.toLowerCase().includes(t)||e.metadata.namespace.toLowerCase().includes(t)||(null===(n=e.metadata.labels)||void 0===n||null===(n=n["app.kubernetes.io/version"])||void 0===n?void 0:n.toLowerCase().includes(t))||(null===(r=e.metadata.labels)||void 0===r||null===(r=r["helm.sh/chart"])||void 0===r?void 0:r.toLowerCase().includes(t))||e.metadata.fields.includes(t)})}}}},layout:"plain"},cn=ln,un=(n("606c"),Object(f["a"])(cn,a,s,!1,null,"22735813",null)),dn=un.exports,pn=n("2902");const fn=[{name:pn["b"]+"-c-cluster",path:`/${pn["b"]}/c/:cluster`,component:dn,meta:{product:pn["b"],cluster:pn["a"],pkg:pn["b"]}}];var hn=fn,vn=function(t){i(t),t.metadata=n("9224"),t.addProduct(n("85d6")),t.addRoutes(hn)};e["default"]=vn},"1d19":function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return v}));var r=n("e24b"),o=n("2cb5");const i={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object FileList]":"filelist"},{toString:a}=Object.prototype;function s(t){if(null===t)return"null";if(void 0===t)return"undefined";let e=i[a.call(t)]||"object";return"object"===e&&(t instanceof Error?e="error":t instanceof Date&&(e="date")),e}function l(t,e){const n=t-e;return(n>0)-(n<0)}const c={undefined:0,null:1,boolean:2,number:3,string:4,array:5,object:6,instance:7,function:8,class:9,date:10};function u(t,e){const n=s(t),r=s(e),o=l(c[n],c[r]);if(o)return o;switch(n){case"boolean":case"number":return l(t,e);case"string":return l(t.localeCompare(e),0);case"array":{const n=t.length,r=e.length,o=Math.min(n,r);for(let i=0;i{for(let i=0;it.match(h)?Object(o["o"])(t,10,"0"):t).join("").trim()}},"1d5f":function(t){t.exports=JSON.parse('{"hasStylesheet":"true"}')},"1eb8":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".text.info[data-v-5050d908]{display:flex;align-items:center}.text.info>span[data-v-5050d908]{margin-right:5px}",""]),t.exports=e},"1ec9":function(t,e,n){var r=n("fa8a"),o=n("44d9"),i=n("1386"),a=n("052a"),s=n("2fab"),l=n("e3f8");function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=o,c.prototype["delete"]=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,t.exports=c},"1fcb":function(t,e,n){var r=n("3336"),o=n("c294"),i=o((function(t,e,n){r(t,e,n)}));t.exports=i},"1fce":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length,o=Array(r);while(++n-1)||n.indexOf(",")>-1||n.indexOf("/")>-1||r.StringUtilities.containsAny(o,t.specialCharacters))if(!e&&o.indexOf(",")>-1&&-1==o.indexOf("-")&&-1==o.indexOf("/")&&!r.StringUtilities.containsAny(n,t.specialCharacters)){var a=o.split(",");i+=this.i18n.at();for(var s=0;s0&&c.length>0&&(i+=", "),i+=c,i.length>0&&u.length>0&&(i+=", "),i+=u}else{var d=n.split("-");i+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,d[0],""),this.formatTime(o,d[1],""))}else i+=this.i18n.atSpace()+this.formatTime(o,n,e);return i},t.prototype.getSecondsDescription=function(){var t=this,e=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Seconds(),e)}),(function(e){return t.i18n.secondsX0ThroughX1PastTheMinute()}),(function(e){return"0"==e?"":parseInt(e)<20?t.i18n.atX0SecondsPastTheMinute():t.i18n.atX0SecondsPastTheMinuteGt20()||t.i18n.atX0SecondsPastTheMinute()}));return e},t.prototype.getMinutesDescription=function(){var t=this,e=this.expressionParts[0],n=this.expressionParts[2],o=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Minutes(),e)}),(function(e){return t.i18n.minutesX0ThroughX1PastTheHour()}),(function(r){try{return"0"==r&&-1==n.indexOf("/")&&""==e?t.i18n.everyHour():parseInt(r)<20?t.i18n.atX0MinutesPastTheHour():t.i18n.atX0MinutesPastTheHourGt20()||t.i18n.atX0MinutesPastTheHour()}catch(o){return t.i18n.atX0MinutesPastTheHour()}}));return o},t.prototype.getHoursDescription=function(){var t=this,e=this.expressionParts[2],n=this.getSegmentDescription(e,this.i18n.everyHour(),(function(e){return t.formatTime(e,"0","")}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Hours(),e)}),(function(e){return t.i18n.betweenX0AndX1()}),(function(e){return t.i18n.atX0()}));return n},t.prototype.getDayOfWeekDescription=function(){var t=this,e=this.i18n.daysOfTheWeek(),n=null;return n="*"==this.expressionParts[5]?"":this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),(function(t){var n=t;return t.indexOf("#")>-1?n=t.substr(0,t.indexOf("#")):t.indexOf("L")>-1&&(n=n.replace("L","")),e[parseInt(n)]}),(function(e){return 1==parseInt(e)?"":r.StringUtilities.format(t.i18n.commaEveryX0DaysOfTheWeek(),e)}),(function(e){return t.i18n.commaX0ThroughX1()}),(function(e){var n=null;if(e.indexOf("#")>-1){var r=e.substring(e.indexOf("#")+1),o=null;switch(r){case"1":o=t.i18n.first();break;case"2":o=t.i18n.second();break;case"3":o=t.i18n.third();break;case"4":o=t.i18n.fourth();break;case"5":o=t.i18n.fifth();break}n=t.i18n.commaOnThe()+o+t.i18n.spaceX0OfTheMonth()}else if(e.indexOf("L")>-1)n=t.i18n.commaOnTheLastX0OfTheMonth();else{var i="*"!=t.expressionParts[3];n=i?t.i18n.commaAndOnX0():t.i18n.commaOnlyOnX0()}return n})),n},t.prototype.getMonthDescription=function(){var t=this,e=this.i18n.monthsOfTheYear(),n=this.getSegmentDescription(this.expressionParts[4],"",(function(t){return e[parseInt(t)-1]}),(function(e){return 1==parseInt(e)?"":r.StringUtilities.format(t.i18n.commaEveryX0Months(),e)}),(function(e){return t.i18n.commaMonthX0ThroughMonthX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()}));return n},t.prototype.getDayOfMonthDescription=function(){var t=this,e=null,n=this.expressionParts[3];switch(n){case"L":e=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":e=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var o=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(o){var i=parseInt(o[0].replace("W","")),a=1==i?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),i.toString());e=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),a);break}var s=n.match(/L-(\d{1,2})/);if(s){var l=s[1];e=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(),l);break}if("*"==n&&"*"!=this.expressionParts[5])return"";e=this.getSegmentDescription(n,this.i18n.commaEveryDay(),(function(e){return"L"==e?t.i18n.lastDay():t.i18n.dayX0?r.StringUtilities.format(t.i18n.dayX0(),e):e}),(function(e){return"1"==e?t.i18n.commaEveryDay():t.i18n.commaEveryX0Days()}),(function(e){return t.i18n.commaBetweenDayX0AndX1OfTheMonth()}),(function(e){return t.i18n.commaOnDayX0OfTheMonth()}));break}return e},t.prototype.getYearDescription=function(){var t=this,e=this.getSegmentDescription(this.expressionParts[6],"",(function(t){return/^\d+$/.test(t)?new Date(parseInt(t),1).getFullYear().toString():t}),(function(e){return r.StringUtilities.format(t.i18n.commaEveryX0Years(),e)}),(function(e){return t.i18n.commaYearX0ThroughYearX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()}));return e},t.prototype.getSegmentDescription=function(t,e,n,o,i,a){var s=this,l=null;if(t)if("*"===t)l=e;else if(r.StringUtilities.containsAny(t,["/","-",","]))if(t.indexOf("/")>-1){var c=t.split("/");if(l=r.StringUtilities.format(o(c[1]),c[1]),c[0].indexOf("-")>-1){var u=this.generateBetweenSegmentDescription(c[0],i,n);0!=u.indexOf(", ")&&(l+=", "),l+=u}else if(!r.StringUtilities.containsAny(c[0],["*",","])){var d=r.StringUtilities.format(a(c[0]),n(c[0]));d=d.replace(", ",""),l+=r.StringUtilities.format(this.i18n.commaStartingX0(),d)}}else if(t.indexOf(",")>-1){c=t.split(",");for(var p="",f=0;f0&&c.length>2&&(p+=",",f0&&c.length>1&&(f==c.length-1||2==c.length)&&(p+=this.i18n.spaceAnd()+" "),c[f].indexOf("-")>-1){u=this.generateBetweenSegmentDescription(c[f],(function(t){return s.i18n.commaX0ThroughX1()}),n);u=u.replace(", ",""),p+=u}else p+=n(c[f]);l=r.StringUtilities.format(a(t),p)}else t.indexOf("-")>-1&&(l=this.generateBetweenSegmentDescription(t,i,n));else l=r.StringUtilities.format(a(t),n(t));else l="";return l},t.prototype.generateBetweenSegmentDescription=function(t,e,n){var o="",i=t.split("-"),a=n(i[0]),s=n(i[1]);s=s.replace(":00",":59");var l=e(t);return o+=r.StringUtilities.format(l,a,s),o},t.prototype.formatTime=function(t,e,n){var r=parseInt(t),o="",i=!1;this.options.use24HourTimeFormat||(i=this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime(),o=i?this.getPeriod(r)+" ":" "+this.getPeriod(r),r>12&&(r-=12),0===r&&(r=12));var a=e,s="";return n&&(s=":"+("00"+n).substring(n.length)),""+(i?o:"")+("00"+r.toString()).substring(r.toString().length)+":"+("00"+a.toString()).substring(a.toString().length)+s+(i?"":o)},t.prototype.transformVerbosity=function(t,e){return e||(t=t.replace(new RegExp(", "+this.i18n.everyMinute(),"g"),""),t=t.replace(new RegExp(", "+this.i18n.everyHour(),"g"),""),t=t.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),t=t.replace(/\, ?$/,"")),t},t.prototype.getPeriod=function(t){return t>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();e.ExpressionDescriptor=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.format=function(t){for(var e=[],n=1;n-1}))},t}();e.StringUtilities=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){void 0===e&&(e=!0),this.expression=t,this.dayOfWeekStartIndexZero=e}return t.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},t.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only "+e.length+" part"+(1==e.length?"":"s")+". At least 5 parts are required.");if(5==e.length)e.unshift(""),e.push("");else if(6==e.length)/\d{4}$/.test(e[5])?e.unshift(""):e.push("");else if(e.length>7)throw new Error("Expression has "+e.length+" parts; too many!");return e},t.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),0==t[0].indexOf("0/")&&(t[0]=t[0].replace("0/","*/")),0==t[1].indexOf("0/")&&(t[1]=t[1].replace("0/","*/")),0==t[2].indexOf("0/")&&(t[2]=t[2].replace("0/","*/")),0==t[3].indexOf("1/")&&(t[3]=t[3].replace("1/","*/")),0==t[4].indexOf("1/")&&(t[4]=t[4].replace("1/","*/")),0==t[5].indexOf("1/")&&(t[5]=t[5].replace("1/","*/")),0==t[6].indexOf("1/")&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.dayOfWeekStartIndexZero?"7"==n&&(r="0"):r=(parseInt(n)-1).toString(),t.replace(n,r)})),"L"==t[5]&&(t[5]="6"),"?"==t[3]&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)t[5]=t[5].replace(new RegExp(r,"gi"),n[r].toString());var o={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var i in o)t[4]=t[4].replace(new RegExp(i,"gi"),o[i].toString());"0"==t[0]&&(t[0]=""),/\*|\-|\,|\//.test(t[2])||!/\*|\//.test(t[1])&&!/\*|\//.test(t[0])||(t[2]+="-"+t[2]);for(var a=0;a-1&&!/^\*|\-|\,/.test(t[a])){var s=null;switch(a){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(null!=s){var l=t[a].split("/");t[a]=l[0]+"-"+s+"/"+l[1]}}},t.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3])},t.prototype.assertNoInvalidCharacters=function(t,e){var n=e.match(/[A-KM-VX-Z]+/gi);if(n&&n.length)throw new Error(t+" part contains invalid values: '"+n.toString()+"'")},t}();e.CronParser=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},t.prototype.atX0MinutesPastTheHourGt20=function(){return null},t.prototype.commaMonthX0ThroughMonthX1=function(){return null},t.prototype.commaYearX0ThroughYearX1=function(){return null},t.prototype.use24HourTimeFormatByDefault=function(){return!1},t.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},t.prototype.everyMinute=function(){return"every minute"},t.prototype.everyHour=function(){return"every hour"},t.prototype.atSpace=function(){return"At "},t.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},t.prototype.at=function(){return"At"},t.prototype.spaceAnd=function(){return" and"},t.prototype.everySecond=function(){return"every second"},t.prototype.everyX0Seconds=function(){return"every %s seconds"},t.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},t.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},t.prototype.everyX0Minutes=function(){return"every %s minutes"},t.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},t.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},t.prototype.everyX0Hours=function(){return"every %s hours"},t.prototype.betweenX0AndX1=function(){return"between %s and %s"},t.prototype.atX0=function(){return"at %s"},t.prototype.commaEveryDay=function(){return", every day"},t.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},t.prototype.commaX0ThroughX1=function(){return", %s through %s"},t.prototype.first=function(){return"first"},t.prototype.second=function(){return"second"},t.prototype.third=function(){return"third"},t.prototype.fourth=function(){return"fourth"},t.prototype.fifth=function(){return"fifth"},t.prototype.commaOnThe=function(){return", on the "},t.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},t.prototype.lastDay=function(){return"the last day"},t.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},t.prototype.commaOnlyOnX0=function(){return", only on %s"},t.prototype.commaAndOnX0=function(){return", and on %s"},t.prototype.commaEveryX0Months=function(){return", every %s months"},t.prototype.commaOnlyInX0=function(){return", only in %s"},t.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},t.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},t.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},t.prototype.firstWeekday=function(){return"first weekday"},t.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},t.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},t.prototype.commaEveryX0Days=function(){return", every %s days"},t.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},t.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},t.prototype.commaEveryHour=function(){return", every hour"},t.prototype.commaEveryX0Years=function(){return", every %s years"},t.prototype.commaStartingX0=function(){return", starting %s"},t.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},t}();e.en=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(5);r.ExpressionDescriptor.initialize(new o.enLocaleLoader),e.default=r.ExpressionDescriptor;var i=r.ExpressionDescriptor.toString;e.toString=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=function(){function t(){}return t.prototype.load=function(t){t["en"]=new r.en},t}();e.enLocaleLoader=o}])}))},"212d":function(t,e,n){var r=n("bf10"),o=n("201b"),i=r(o,"Promise");t.exports=i},2357:function(t,e,n){var r=n("e972"),o=/^\s+/;function i(t){return t?t.slice(0,r(t)+1).replace(o,""):t}t.exports=i},2419:function(t,e,n){var r=n("872c"),o=n("aa31"),i=n("7049");function a(t){var e=-1,n=null==t?0:t.length;this.__data__=new r;while(++eo(t)).join(" ")}function o(t){return t=t||"",t.substr(0,1).toUpperCase()+t.substr(1)}function i(t,e,n=" ",r=!1){if(t=""+t,t.length>=e)return t;const o=e-t.length+1,i=new Array(o).join(n).substr(0,o);return r?t+i:i+t}n.d(e,"a",(function(){return r})),n.d(e,"p",(function(){return o})),n.d(e,"o",(function(){return i})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"l",(function(){return h})),n.d(e,"k",(function(){return v})),n.d(e,"m",(function(){return b})),n.d(e,"g",(function(){return g})),n.d(e,"c",(function(){return _})),n.d(e,"b",(function(){return x})),n.d(e,"i",(function(){return O})),n.d(e,"d",(function(){return k})),n.d(e,"j",(function(){return A})),n.d(e,"n",(function(){return S})),n.d(e,"h",(function(){return C}));const a={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function s(t){return String(t).replace(/[&<>"']/g,t=>a[t])}function l(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(t){t=Math.max(0,t||1);const e=[];let n;if(window.crypto&&window.crypto.getRandomValues){const r=new Uint32Array(t);for(window.crypto.getRandomValues(r),n=0;ne[t%e.length]).join(""):null}function v(t){return t.match(/.*[^aeiou]y$/i)?t.substr(0,t.length-1)+"ies":t.endsWith("ics")?t:t.endsWith("s")?t+"es":t+"s"}function b(t,e,n){return t.reduce((r,o,i)=>(i>=5||(r+=`${s(o)}`,i===t.length-1?r+=e:r+=i===t.length-2?n("generic.and"):n("generic.comma")),r),"")}function g(t,e=2,n=" ",r=null){t="string"===typeof t?t.split(/\n/):t||[];const o=new Array(e+1).join(n),i=t.map(t=>{let e="",n=t;if(r){const o=t.match(r);o&&(e=o[o.length-1],n=t.substr(o[0].length))}return`${e}${o}${n}`}),a=i.join("\n");return a}const m=/([a-z\d])([A-Z])/g;function y(t){return t.replace(m,"$1_$2").toLowerCase()}const w=/[ _]/g;function _(t){return y(t).replace(w,"-")}function x(t,e){return"float"===e?t=parseFloat(t)||null:"int"===e?(t=parseInt(t,10),isNaN(t)&&(t=null)):"boolean"===e&&("true"===t.toLowerCase()?t=!0:"false"===t.toLowerCase()&&(t=!1)),t}function O(t,e=[]){return e.some(e=>{const n=t||"",r=k(e);return n.match(r)})}function k(t,e=!0){return"string"===typeof t?e?new RegExp(`^${l(t)}$`,"i"):new RegExp(""+l(t),"i"):t}function A(t){return s(t||"").replace(/(\r\n|\r|\n)/g,"
\n")}const E=/[^."']+|"([^"]*)"|'([^']*)'/g;function S(t){return t.includes('"')||t.includes("'")?t.match(E).map(t=>t.replace(/['"]/g,"")):t.split(".")}function C(t){let e="";for(const n of t)n.includes(".")?e+=`."${n}"`:e+="."+n;return e.startsWith(".")&&(e=e.substr(1)),e}},"2cbd":function(t,e){function n(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}t.exports=n},"2db8":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".text.info[data-v-effd72b0]{display:flex;align-items:center}.text.info>span[data-v-effd72b0]{margin-right:5px}",""]),t.exports=e},"2e63":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length;while(++n-1}t.exports=o},"3ad3":function(t,e,n){var r=n("4c0b"),o=r(Object.keys,Object);t.exports=o},"3b54":function(t,e,n){var r=n("c364"),o=n("cb86"),i=n("c68c");function a(t,e,n){var a=-1,s=e.length,l={};while(++anull===t?""+encodeURIComponent(e):`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"),r}function o(t,e){const n=e.toLowerCase();return i([t],[443,8443],["443"])||"https"===n}function i(t,e,n){for(let r=0;r(n&&(r[e.q.name][n]=o),"")),r}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),a.options={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","queryStr","anchor"],q:{name:"query",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}}},"405d":function(t,e,n){var r=n("bf10"),o=n("201b"),i=r(o,"DataView");t.exports=i},"40cc":function(t,e,n){var r=n("e697"),o=Object.prototype,i=o.hasOwnProperty;function a(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}t.exports=a},"413d":function(t,e){function n(t,e){var n=-1,r=t.length;e||(e=Array(r));while(++npre{padding:2px;vertical-align:middle}",""]),t.exports=e},"44a5":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABjFBMVEVHcEwMMiwJLi4MMiwMMiwNMy0MMysMMiwNNC4MMiwMMiwMMiwMMiwMMiz///8MMix9ko7O1tUQNS+pt7UTODLn6+oNMy2/ycihr63c4eAONC5xh4RHZF/d4uFhenbi5+YrTUdyiIXM1NJsg4AqTEbJ0dAaPjjX3dyRo6C5xMPl6en2+Pjr7u4qS0YgQz0yUk1cdnLAysgPNC6GmZYfQj2TpKF7j4xrgn9vhoJPamZQa2cvUEuQoZ6Nn5xWcW3o7OuKnJk3VlH9/f2ls7Gvu7lMaGO9yMYUODMeQTzN1dTv8fEhRD5Tbmr19/eotrQzU06VpqPI0M/CzMpqgn68x8XS2djs7+5AXlqsubcVOTOerasdQDuYqKYwUUuClpN4jYlje3dUb2tSbWh6jotTbWmXp6X6+/vq7e3P19aSo6H4+fnK0tFBX1oZPTj09fXu8fB8kY41VVBCYFuuu7n+/v40VE9Xcm17kI3W3Nu2wb9IZWC+yMfg5OQ+XFc2VVBZc2+ntbO7xsSZqaY/XVnvk2EjAAAADnRSTlMArxyp8Siw8ifvrq3s8H1RQAIAAAFMSURBVDjLzZNVcwIxEICDH5Vd3B2KFYe6UHd3d3d37x9vrsNAe8Mdb51+D5lJ9stsks0SIpMrkAeFiCFEpkQBlAyRoyDlRCEsSAmW4G8FX2O9qrauwfU9ae/mCE01dsih17Zq0Ar9CUtBiHZ1wE+yVjcdzZOpnOAdBi4DAM4F85SFFQxjUIzIIursDlZYKRoHI8aWTHNUiO/ASfoiepSO/Baqlw2z4WkqbMPpOaauMxir4hjGGb2WCntwhi9PcHV5nAlz0yR7qWCGB3xP+p4DIdwohEKdPcYRdx97TQ8k8DGI+ApxpElaVKqgE0BXeOp9uMfPN8Qb2MIhAAdd9AegWZMXXAdwSx/VfwijiG1qtYlutnnUWk2+Fl6Auw+THiZ4q7m2yx5rfJC/3PPrm6s2w3/4cjxCicapJCJhQUIYweatEBPClEl5G1MiJl+FK1ex1JQuFwAAAABJRU5ErkJggg=="},"44d9":function(t,e,n){var r=n("fa8a");function o(){this.__data__=new r,this.size=0}t.exports=o},"44db":function(t,e,n){var r=n("b506"),o=n("10d1"),i=n("9ef5"),a="Expected a function",s=Math.max,l=Math.min;function c(t,e,n){var c,u,d,p,f,h,v=0,b=!1,g=!1,m=!0;if("function"!=typeof t)throw new TypeError(a);function y(e){var n=c,r=u;return c=u=void 0,v=e,p=t.apply(r,n),p}function w(t){return v=t,f=setTimeout(O,e),b?y(t):p}function _(t){var n=t-h,r=t-v,o=e-n;return g?l(o,d-r):o}function x(t){var n=t-h,r=t-v;return void 0===h||n>=e||n<0||g&&r>=d}function O(){var t=o();if(x(t))return k(t);f=setTimeout(O,_(t))}function k(t){return f=void 0,m&&c?y(t):(c=u=void 0,p)}function A(){void 0!==f&&clearTimeout(f),v=0,c=h=u=f=void 0}function E(){return void 0===f?p:k(o())}function S(){var t=o(),n=x(t);if(c=arguments,u=this,h=t,n){if(void 0===f)return w(h);if(g)return clearTimeout(f),f=setTimeout(O,e),y(h)}return void 0===f&&(f=setTimeout(O,e)),p}return e=i(e)||0,r(n)&&(b=!!n.leading,g="maxWait"in n,d=g?s(i(n.maxWait)||0,e):d,m="trailing"in n?!!n.trailing:m),S.cancel=A,S.flush=E,S}t.exports=c},"45d2":function(t){t.exports=JSON.parse('{"hasStylesheet":"false"}')},"45fa":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".card-container{border-radius:var(--border-radius);display:flex;flex-basis:40%;margin:10px;min-height:100px;padding:10px;box-shadow:0 0 20px var(--shadow)}.card-container.highlight-border{border-left:5px solid var(--primary)}.card-container:not(.top){align-items:top;flex-direction:row;justify-content:start}.card-container .card-wrap{width:100%}.card-container .card-body{color:var(--input-label);display:flex;flex-direction:column;justify-content:center}.card-container .card-actions{align-self:end;display:flex;padding-top:20px}.card-container .card-title{align-items:center;display:flex;width:100%}.card-container .card-title h5{margin:0}.card-container .card-title .flex-right{margin-left:auto}.card-container.card-sticky{overflow:hidden}.card-container.card-sticky .card-wrap{display:flex;flex-direction:column}.card-container.card-sticky .card-wrap .card-body{justify-content:flex-start;overflow:scroll}.card-container.card-sticky .card-wrap>*{flex:0}.card-container.card-sticky .card-wrap .card-body{flex:1}",""]),t.exports=e},"470c":function(t,e,n){var r=n("0e05");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("ace678a6",r,!0,{sourceMap:!1,shadowMode:!1})},4720:function(t,e,n){"use strict";n("969a")},4774:function(t,e,n){var r=n("cd68"),o=n("500b"),i=n("ecf6");function a(t,e){return i(o(t,e,r),t+"")}t.exports=a},4778:function(t,e,n){var r=n("4b2c"),o=n("986c"),i=n("a4fc"),a=n("659f"),s=n("6944"),l=n("5e52"),c=1,u=2,d="[object Boolean]",p="[object Date]",f="[object Error]",h="[object Map]",v="[object Number]",b="[object RegExp]",g="[object Set]",m="[object String]",y="[object Symbol]",w="[object ArrayBuffer]",_="[object DataView]",x=r?r.prototype:void 0,O=x?x.valueOf:void 0;function k(t,e,n,r,x,k,A){switch(n){case _:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!k(new o(t),new o(e)));case d:case p:case v:return i(+t,+e);case f:return t.name==e.name&&t.message==e.message;case b:case m:return t==e+"";case h:var E=s;case g:var S=r&c;if(E||(E=l),t.size!=e.size&&!S)return!1;var C=A.get(t);if(C)return C==e;r|=u,A.set(t,e);var T=a(E(t),E(e),r,x,k,A);return A["delete"](t),T;case y:if(O)return O.call(t)==O.call(e)}return!1}t.exports=k},"479b":function(t,e,n){var r=n("a4fc"),o=n("f72d"),i=n("a67c"),a=n("b506");function s(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?o(n)&&i(e,n.length):"string"==s&&e in n)&&r(n[e],t)}t.exports=s},"489a":function(t,e){var n=Object.prototype,r=n.hasOwnProperty;function o(t,e){return null!=t&&r.call(t,e)}t.exports=o},"494f":function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},4968:function(t,e,n){var r=n("6d0c");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("33805afa",r,!0,{sourceMap:!1,shadowMode:!1})},"4a83":function(t,e,n){var r=n("d3e6"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},"4ac6":function(t,e,n){"use strict";n.d(e,"f",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"g",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"e",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return u}));const r="field.cattle.io/name",o="field.cattle.io/description",i="field.cattle.io/projectId",a="field.cattle.io/publicEndpoints",s=/cattle\.io\//,l=[s],c=[s],u={CLOUD_INIT:"harvesterhci.io/cloud-init-template",CLOUD_PROVIDER_IPAM:"cloudprovider.harvesterhci.io/ipam",NETWORK_ROUTE:"network.harvesterhci.io/route",IMAGE_NAME:"harvesterhci.io/image-name",NETWORK_TYPE:"network.harvesterhci.io/type",PRIMARY_SERVICE:"cloudprovider.harvesterhci.io/primary-service"}},"4b2c":function(t,e,n){var r=n("201b"),o=r.Symbol;t.exports=o},"4b48":function(t,e){function n(t,e){return t.has(e)}t.exports=n},"4b7a":function(t,e,n){var r=n("effc"),o=n("280a"),i=n("cd68"),a=n("c316"),s=n("d440");function l(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):s(t)}t.exports=l},"4c0b":function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},"4db8":function(t,e,n){var r=n("683a");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("62bef53a",r,!0,{sourceMap:!1,shadowMode:!1})},"4efd":function(t,e,n){var r=n("d856"),o=n("54f6"),i=n("f9f5"),a=n("40cc"),s=n("994b");function l(t){var e=-1,n=null==t?0:t.length;this.clear();while(++et.replace(/^ui-/,""),mangleWrite:t=>"ui-"+t}),o("pcs","",{asCookie:a,asUserPreference:!1}),o("locale","en-us",{asCookie:a}),o("keymap","sublime",{options:["sublime","emacs","vim"]}),o("per-page",100,{options:[10,25,50,100],parseJSON:i})),d=(o("logs-wrap",!0,{parseJSON:i}),o("logs-time",!0,{parseJSON:i}),o("logs-range","30 minutes",{parseJSON:i}),o("hide-repos",[],{parseJSON:i}),o("hide-desc",[],{parseJSON:i}),o("hide-sensitive",!0,{options:[!0,!1],parseJSON:i}),o("show-pre-release",!1,{options:[!1,!0],parseJSON:i}),o("chart-mode","featured",{parseJSON:i}),o("date-format","ddd, MMM D YYYY",{options:["ddd, MMM D YYYY","ddd, D MMM YYYY","D/M/YYYY","M/D/YYYY","YYYY-MM-DD"]}),o("time-format","h:mm:ss a",{options:["h:mm:ss a","HH:mm:ss"]}),o("time-zone","local"),o("dev",!1,{parseJSON:i})),p=o("view-in-api",!1,{parseJSON:i,inheritFrom:d}),f=(o("all-namespaces",!1,{parseJSON:i,inheritFrom:d}),o("theme-shortcut",!1,{parseJSON:i,inheritFrom:d}),o("last-visited","home",{parseJSON:i}),o("seen-whatsnew","",{parseJSON:i}),o("read-whatsnew","",{parseJSON:i}),o("after-login-route","home",{parseJSON:i})),h=(o("home-page-cards",{},{parseJSON:i}),o("plugin-developer",!1,{parseJSON:i,inheritFrom:d}),"rke1"),v="rke2";o("provisioner",v,{options:[h,v]}),o("scale-pool-prompt",null,{parseJSON:i})},"500b":function(t,e,n){var r=n("cda3"),o=Math.max;function i(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){var i=arguments,a=-1,s=o(i.length-e,0),l=Array(s);while(++abutton{height:20px;line-height:14px}.labeled-select.taggable[data-v-529406d8] .vs__selected-options .vs__selected>button:hover{background-color:var(--primary);border-radius:0}.labeled-select.taggable[data-v-529406d8] .vs__selected-options .vs__selected>button:hover:after{color:#fff}.labeled-select[data-v-529406d8] .vs__selected-options{margin-top:-5px}.labeled-select[data-v-529406d8] .v-select:not(.vs--single) .vs__selected-options{padding:5px 0}.labeled-select[data-v-529406d8] .vs__actions:after{position:relative;top:-10px}.labeled-select[data-v-529406d8] .v-select.vs--open .vs__dropdown-toggle{color:var(--outline)!important}[data-v-529406d8] .labeled-select.disabled .labeled-container,[data-v-529406d8] .labeled-select.disabled .vs__dropdown-toggle,[data-v-529406d8] .labeled-select.disabled input,[data-v-529406d8] .labeled-select.disabled label{cursor:not-allowed}.labeled-select .no-label[data-v-529406d8].v-select:not(.vs--single){min-height:33px}.labeled-select .no-label[data-v-529406d8].selected{padding-top:8px;padding-bottom:9px;position:relative;max-height:2.3em;overflow:hidden}.labeled-select .no-label[data-v-529406d8] .vs__selected-options{padding:8px 0 7px 0}.vs__dropdown-menu .vs__dropdown-option .vs__option-kind-group[data-v-529406d8]{display:flex}.vs__dropdown-menu .vs__dropdown-option .vs__option-kind-group>b[data-v-529406d8]{flex:1}.vs__dropdown-menu .vs__dropdown-option .vs__option-kind-group>div[data-v-529406d8]{background-color:var(--primary);border-radius:4px;color:var(--primary-text);font-size:12px;height:18px;line-height:18px;margin-top:1px;padding:0 10px}.vs__dropdown-option>.option-kind-highlighted[data-v-529406d8]{color:var(--dropdown-highlight-text)}.vs__dropdown-option.vs__dropdown-option--highlight>.option-kind-highlighted[data-v-529406d8],.vs__dropdown-option.vs__dropdown-option--selected>.option-kind-highlighted[data-v-529406d8],.vs__dropdown-option>.option-kind-highlighted[data-v-529406d8]:hover{color:var(--dropdown-hover-text)}",""]),t.exports=e},"51db":function(t,e,n){var r=n("445c"),o=r();t.exports=o},"54f6":function(t,e){function n(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=n},"55e2":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"mb-10"},[t._v(" "+t._s(t.t("promptRemove.attemptingToRemove",{type:t.type}))+" "),e("span",{staticClass:"display-name"},[t._v(t._s(t.displayName+"."))]),t.canSeeProjectlessNamespaces?t._e():[e("span",{staticClass:"delete-warning"},[t._v(" "+t._s(t.t("promptRemove.willDeleteAssociatedNamespaces")))]),t._v(" "),e("br"),e("div",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.resourceNames(t.names,t.plusMore,t.t),expression:"resourceNames(names, plusMore, t)"}],staticClass:"mt-10"})]],2),t.filteredNamespaces.length>0&&t.canSeeProjectlessNamespaces?e("div",{staticClass:"mt-20 remove-project-dialog"},[e("Checkbox",{attrs:{label:t.t("promptRemove.deleteAssociatedNamespaces")},model:{value:t.deleteProjectNamespaces,callback:function(e){t.deleteProjectNamespaces=e},expression:"deleteProjectNamespaces"}}),e("div",{staticClass:"mt-10 ml-20"},[e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.resourceNames(t.names,t.plusMore,t.t),expression:"resourceNames(names, plusMore, t)"}]})])],1):t._e()])])},o=[],i=n("9ce4"),a=n("4ac6"),s=n("907c"),l=n("0df0"),c=n("2cb5"),u={name:"ProjectAndNamespacesPromptRemove",components:{Checkbox:l["a"]},props:{value:{type:Array,default:()=>[]},type:{type:String,required:!0}},async fetch(){this.allNamespaces=await this.$store.dispatch("cluster/findAll",{type:s["m"]}),this.allProjects=await this.$store.dispatch("management/findAll",{type:s["k"].PROJECT})},data(){return{deleteProjectNamespaces:!1,allNamespaces:[],allProjects:[]}},computed:{...Object(i["b"])("action-menu",["toRemove"]),...Object(i["a"])({t:"i18n/t"}),...Object(i["a"])(["currentCluster"]),currentProject(){return this.allProjects?this.value[0]:{}},filteredNamespaces(){return this.currentProject?this.allNamespaces.filter(t=>{var e;return t.metadata.labels[a["g"]]===(null===(e=this.currentProject.metadata)||void 0===e?void 0:e.name)}):[]},plusMore(){const t=this.filteredNamespaces.length>5?this.filteredNamespaces.length-5:0;return this.t("promptRemove.andOthers",{count:t})},displayName(){var t;return null===(t=this.currentProject)||void 0===t||null===(t=t.spec)||void 0===t?void 0:t.displayName},names(){return this.filteredNamespaces.map(t=>t.nameDisplay).slice(0,5)},canSeeProjectlessNamespaces(){return this.currentCluster.canUpdate}},methods:{resourceNames:c["m"],remove(){return!(!this.deleteProjectNamespaces&&this.canSeeProjectlessNamespaces)&&Promise.all(this.filteredNamespaces.map(t=>t.remove())).then(()=>!1)}}},d=u,p=(n("872e"),n("d802")),f=Object(p["a"])(d,r,o,!1,null,"3a26ac99",null);e["default"]=f.exports},5801:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-10"},[e("div",{staticClass:"mb-30"},[t._v(" "+t._s(t.t("promptRemove.attemptingToRemove",{type:t.type}))+" "),e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.podNames,expression:"podNames"}],staticClass:"machine-name"})]),e("div",{staticClass:"mb-30"},[e("Checkbox",{attrs:{label:t.t("promptForceRemove.forceDelete")},model:{value:t.forceDelete,callback:function(e){t.forceDelete=e},expression:"forceDelete"}})],1),e("Banner",{attrs:{color:"warning","label-key":"promptForceRemove.podRemoveWarning"}}),t._l(t.errors,(function(t,n){return e("Banner",{key:n,attrs:{color:"error",label:t}})}))],2)},o=[],i=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"banner",class:{[t.color]:!0}},[t.icon?e("div",{staticClass:"banner__icon",attrs:{"data-testid":"banner-icon"}},[e("i",{staticClass:"icon icon-2x",class:t.icon})]):t._e(),e("div",{staticClass:"banner__content",class:{closable:t.closable,stacked:t.stacked,icon:t.icon},attrs:{"data-testid":"banner-content"}},[t._t("default",(function(){return[t.labelKey?e("t",{attrs:{k:t.labelKey,raw:!0}}):t.messageLabel?e("span",[t._v(t._s(t.messageLabel))]):e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.nlToBr(t.label),expression:"nlToBr(label)"}]})]})),t.closable?e("div",{staticClass:"banner__content__closer",on:{click:function(e){return t.$emit("close")}}},[e("i",{staticClass:"icon icon-close closer-icon",attrs:{"data-testid":"banner-close"}})]):t._e()],2)])},a=[],s=n("8bbf"),l=n.n(s),c=n("2cb5"),u=n("3e9d"),d=l.a.extend({props:{color:{type:String,default:"secondary"},label:{type:[String,Error,Object],default:null},labelKey:{type:String,default:null},icon:{type:String,default:null},closable:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1}},computed:{messageLabel(){return"string"!==typeof this.label?Object(u["c"])(this.label):void 0}},methods:{nlToBr:c["j"]}}),p=d,f=(n("c4a4"),n("d802")),h=Object(f["a"])(p,i,a,!1,null,"02d86e5d",null),v=h.exports,b=n("1032"),g=n("9ce4"),m=n("9ec3"),y={name:"PromptRemovePodDialog",components:{Banner:v,Checkbox:b["a"]},props:{value:{type:Array,default:()=>[]},names:{type:Array,default:()=>[]},type:{type:String,required:!0}},data(){return{errors:[],forceDelete:!1}},computed:{...Object(g["b"])("action-menu",["toRemove"]),...Object(g["a"])({t:"i18n/t"}),plusMore(){const t=this.names.length-this.names.length;return this.t("promptRemove.andOthers",{count:t})},podNames(){return this.names.reduce((t,e,n)=>(n>=5||(t+=`${e}`,n===this.names.length-1?t+=this.plusMore:t+=n===this.toRemove.length-2?" and ":", "),t),"")}},methods:{async remove(t){const e=this.$parent.$parent.$parent;let n;e.doneLocation&&(n={...e.doneLocation});try{await Promise.all(this.value.map(t=>this.removePod(t))),n&&!Object(m["isEmpty"])(n)&&e.currentRouter.push(n),e.close()}catch(r){e.error=r,t(!1)}},removePod(t){const e=this.forceDelete?{data:{gracePeriod:0,force:!0}}:void 0;return t.remove(e)}}},w=y,_=(n("418e"),Object(f["a"])(w,r,o,!1,null,"db441fb2",null));e["default"]=_.exports},5877:function(e,n){e.exports=t},"59a3":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".services-by-cluster-grid[data-v-1dd06ec8]{display:grid;grid-gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.cluster-header[data-v-1dd06ec8]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0;background:var(--header-bg);border-bottom:var(--header-border-size) solid var(--header-border);height:var(--header-height);position:sticky;top:0;z-index:1}.favorite-icon[data-v-1dd06ec8]{margin-right:1rem}",""]),t.exports=e},"5b4b":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length,o=0,i=[];while(++n=c&&(p=l,f=!1,e=new r(e));t:while(++d0&&n(u)?e>1?i(u,e-1,n,a,s):r(s,u):a||(s[s.length]=u)}return s}t.exports=i},"629b":function(t,e,n){var r=n("6bcf"),o=1/0;function i(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}t.exports=i},"640c":function(t,e,n){"use strict";n.d(e,"a",(function(){return Oe}));var r=n("4ac6"),o=n("8eaf"),i=n.n(o),a=n("7fd6"),s=n.n(a),l=n("8bbf"),c=n.n(l),u=n("2cb5"),d=n("da25"),p=n("5000"),f=n("bddd"),h=n("330a"),v=n.n(h);function b(t,e,n,r){const o=r.includes("verifyLocal"),i=t.localOutputRefs||[],a=t.globalOutputRefs||[];o?v()(i)&&v()(a)&&n.push(e["i18n/t"]("validation.flowOutput.both")):v()(a)&&n.push(e["i18n/t"]("validation.flowOutput.global"))}function g(t,e,n,r){v()(t)||v()(t.api_key)&&n.push(e["i18n/t"]("validation.output.logdna.apiKey"))}var m=n("8cb9"),y=n.n(m),w=n("e24b");function _(t,e,n,r,o=[]){r=r||{};const{invalidChars:i,forHostname:a=!1,errorKey:s=(a?"hostname":"label"),maxLength:l=63,minLength:c=1,validChars:u="A-Za-z0-9-"}=r;k(t,{validChars:u,invalidChars:i},e,n,o),"-"===t.slice(0,1)&&o.push(n["i18n/t"](`validation.dns.${s}.startHyphen`,{key:e})),"-"===t.slice(-1)&&o.push(n["i18n/t"](`validation.dns.${s}.endHyphen`,{key:e}));const d=c,p=l;return t.lengthp&&o.push(n["i18n/t"](`validation.dns.${s}.tooLongLabel`,{key:e,max:p})),o}function x(t,e,n){const r=`model.${t}.${e}`,o=r+".label";return n["i18n/exists"](r+".label")?n["i18n/t"](o):n["i18n/exists"](r)?n["i18n/t"](r):e.match(/.Id$/)?Object(u["a"])(e.replace(/Id$/,"")):Object(u["a"])(e)}function O(t,e,n,r,o=[]){const{nullable:i,required:a,type:s="",minLength:l,maxLength:c,min:u,max:d}=e,p=t?Object(w["g"])(t,"length"):0;if(!i&&a&&("object"===typeof t&&v()(t)||!t&&0!==t))return o.push(r["i18n/t"]("validation.required",{key:n})),o;if(null===t)return o;const f=0===s.indexOf("array[")?"arrayLength":"stringLength";let h=l,b=c;return h&&b?(pb)&&(h===b?o.push(r["i18n/t"](`validation.${f}.exactly`,{key:n,count:h})):o.push(r["i18n/t"](`validation.${f}.between`,{key:n,min:h,max:b}))):h&&pb&&o.push(r["i18n/t"](`validation.${f}.max`,{key:n,count:b})),h=u,b=d,null!==t&&h&&b?(tb)&&(h===b?o.push(r["i18n/t"]("validation.number.exactly",{key:n,val:b})):o.push(r["i18n/t"]("validation.number.between",{key:n,min:h,max:b}))):h&&tb&&o.push(r["i18n/t"]("validation.number.max",{key:n,val:b})),o}function k(t,e,n,r,o=[]){const{validChars:i,invalidChars:a}=e,s=[];if(i&&s.push(`[^${e.validChars}]`),a&&s.push(`[${e.invalidChars}]`),s.length){const e=new RegExp(`(${s.join("|")})`,"g");let i=t.match(e);i&&(i=y()(i).map(t=>" "===t?"[space]":t),o.push(r["i18n/t"]("validation.chars",{key:n,count:i.length,chars:i.join(" ")})))}return o}function A(t,e,n,r,o=[]){r=r||{};const{max:i=253,restricted:a=!1}=r;"."===t.slice(0,1)&&o.push(n["i18n/t"]("validation.dns.hostname.startDot",{key:e})),a&&t.length>1&&"."===t.slice(-1)&&o.push(n["i18n/t"]("validation.dns.hostname.endDot",{key:e})),0===t.length&&o.push(n["i18n/t"]("validation.dns.hostname.empty",{key:e})),t.length>i&&o.push(n["i18n/t"]("validation.dns.hostname.tooLong",{key:e,max:i}));const s=t.split(/\./);let l;for(let c=0;c{const{name:i,nodePort:a,port:s,targetPort:l}=t,c=r+1;if(o.length>1&&v()(i)&&n.push(e["i18n/t"]("validation.service.ports.name.required",{position:c})),!v()(i)){const t=E(i,"name",e,void 0,n);v()(t)||(n=n.length&&n.length>0?[...n,...t]:t)}if(a){const t=parseInt(a,10);isNaN(t)&&n.push(e["i18n/t"]("validation.service.ports.nodePort.requiredInt",{position:c}))}if(s){const t=parseInt(s,10);isNaN(t)&&n.push(e["i18n/t"]("validation.service.ports.port.requiredInt",{position:c}))}else n.push(e["i18n/t"]("validation.service.ports.port.required",{position:c}));if(l){const t=e["i18n/t"]("validation.service.ports.targetPort.ianaAt",{position:c}),r=parseInt(l,10),o=new RegExp("^\\d+$"),i=o.test(l);if(i)(r<1||r>65535)&&n.push(e["i18n/t"]("validation.service.ports.targetPort.between",{position:c}));else{const r={ianaServiceName:!0,maxLength:15,validChars:"A-Za-z0-9-"},o=E(l,t,e,r,n);v()(o)||n.push(...o)}}else n.push(e["i18n/t"]("validation.service.ports.targetPort.required",{position:c}))}),n)}function R(t,e,n,r){const o=["ClusterIP","NodePort","LoadBalancer"],i=null===t||void 0===t?void 0:t.type;return o.includes(i),n}function I(t,e,n,r){if("ExternalName"===(null===t||void 0===t?void 0:t.type))if(v()(null===t||void 0===t?void 0:t.externalName))n.push(e["i18n/t"]("validation.service.externalName.none"));else{const r=A(t.externalName,"ExternalName",e,void 0,n);v()(r)||(n=n.length&&n.length>0?[...n,...r]:r)}return n}var L=n("d66a"),N=n.n(L);function j(t,e,n,r){return v()(null===t||void 0===t?void 0:t.groups)&&n.push(e["i18n/t"]("validation.prometheusRule.groups.required")),n}function D(t=[],e,n,r){return t.forEach((t,r)=>{const o=r+1;v()(null===t||void 0===t?void 0:t.name)&&n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.name",{index:o})),v()(null===t||void 0===t?void 0:t.rules)?n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.singleEntry",{index:o})):t.rules.forEach((t,r)=>{const i=r+1;N()(t,"alert")&&v()(null===t||void 0===t?void 0:t.alert)?n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.rule.alertName",{groupIndex:o,ruleIndex:i})):N()(t,"record")&&v()(null===t||void 0===t?void 0:t.record)&&n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.rule.recordName",{groupIndex:o,ruleIndex:i})),(N()(t,"expr")&&v()(t.expr)||!N()(t,"expr"))&&n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.rule.expr",{groupIndex:o,ruleIndex:i})),N()(t,"alert")&&(N()(t,"labels")&&v()(t.labels)||!N()(t,"labels"))&&n.push(e["i18n/t"]("validation.prometheusRule.groups.valid.rule.labels",{groupIndex:o,ruleIndex:i}))})}),n}function P(t,e,n,r){v()(null===t||void 0===t?void 0:t.match)&&v()(null===t||void 0===t?void 0:t["match_re"])&&n.push(e["i18n/t"]("validation.monitoring.route.match"))}function $(t,e,n,r,o){/^\d+[hms]$/.test(t)||n.push(e["i18n/t"]("validation.monitoring.route.interval",{key:o}))}function F(t,e,n){let r;r=t.jobTemplate?Object(w["g"])(t,"jobTemplate.spec.template.spec"):Object(w["g"])(t,"template.spec"),r.containers&&r.containers.length?r.containers.forEach(t=>{t&&!t.image&&n.push(e["i18n/t"]("workload.validation.containerImage",{name:t.name}))}):n.push(e["i18n/t"]("validation.required",{key:e["i18n/t"]("workload.container.titles.containers")}))}var M=n("2105"),U=n.n(M);function B(t="",e,n){try{U.a.toString(t)}catch(r){n.push(e["i18n/t"]("validation.invalidCron"))}}function G(t,e,n){if(!t)return;const{podAffinity:r,podAntiAffinity:o}=t;if(r&&!Object(w["h"])(r)){const{preferredDuringSchedulingIgnoredDuringExecution:t=[],requiredDuringSchedulingIgnoredDuringExecution:o=[]}=r;t.forEach((t,r)=>{const o={index:r,group:e["i18n/t"]("validation.podAffinity.affinityTitle"),rules:e["i18n/t"]("validation.podAffinity.preferredDuringSchedulingIgnoredDuringExecution")};q(t,o,e,n);const{podAffinityTerm:i={}}=t;V(i,o,e,n),z(i,o,e,n)}),o.forEach((t,r)=>{const o={index:r,group:e["i18n/t"]("validation.podAffinity.affinityTitle"),rules:e["i18n/t"]("validation.podAffinity.requiredDuringSchedulingIgnoredDuringExecution")};V(t,o,e,n),z(t,o,e,n)})}if(o&&!Object(w["h"])(o)){const{preferredDuringSchedulingIgnoredDuringExecution:t=[],requiredDuringSchedulingIgnoredDuringExecution:r=[]}=o;t.forEach((t,r)=>{const o={index:r,group:e["i18n/t"]("validation.podAffinity.antiAffinityTitle"),rules:e["i18n/t"]("validation.podAffinity.preferredDuringSchedulingIgnoredDuringExecution")};q(t,o,e,n);const{podAffinityTerm:i={}}=t;V(i,o,e,n),z(i,o,e,n)}),r.forEach((t,r)=>{const o={index:r,group:e["i18n/t"]("validation.podAffinity.antiAffinityTitle"),rules:e["i18n/t"]("validation.podAffinity.requiredDuringSchedulingIgnoredDuringExecution")};V(t,o,e,n),z(t,o,e,n)})}}function q(t,e,n,r){const{weight:o=1}=t;("number"!==typeof o||o>100||o<1)&&r.push(n["i18n/t"]("validation.number.between",{key:n["i18n/t"]("workload.scheduling.matchExpressions.weight"),min:1,max:100,...e}))}function V(t,e,n,r){const{topologyKey:o}=t,i=RegExp("([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]");o&&i.test(o)||r.push(n["i18n/t"]("validation.podAffinity.topologyKey",e))}function z(t,e,n,r){const o=["In","NotIn","Exists","DoesNotExist"],{labelSelector:i}=t;if(i&&!Object(w["h"])(i)){const{matchExpressions:t=[]}=i;t.forEach((t,i)=>{const{operator:a,values:s}=t;o.includes(a)||r.push(n["i18n/t"]("validation.podAffinity.matchExpressions.operator",e)),"In"===a||"NotIn"===a?s&&s.length||r.push(n["i18n/t"]("validation.podAffinity.matchExpressions.valuesMustBeDefined",e)):s&&s.length&&r.push(n["i18n/t"]("validation.podAffinity.matchExpressions.valueMustBeEmpty",e))})}}var H=n("907c");function W(t=[],e,n,r=[]){t.some(t=>v()(t.verbs))&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.missingVerb")),t.some(t=>{var e,n;return(null===(e=t.resources)||void 0===e?void 0:e.length)&&(null===(n=t.nonResourceURLs)||void 0===n?void 0:n.length)})&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.noResourceAndNonResource")),r[0]===H["u"].ROLE?(t.some(t=>v()(t.resources))&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.missingResource")),t.some(t=>v()(t.apiGroups))&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.missingApiGroup"))):t.some(t=>{var e,n;return(null===(e=t.resources)||void 0===e?void 0:e.length)&&(null===(n=t.nonResourceUrls)||void 0===n?void 0:n.length)})&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.noResourceAndNonResource")),t.some(t=>v()(t.resources)&&v()(t.nonResourceURLs))&&n.push(e["i18n/t"]("validation.roleTemplate.roleTemplateRules.missingOneResource"))}function K(t,e,n,r,o){const i="true"===r[0];return i&&(t||"").match(/^(c-.{5}|local)$/i)&&n.push(e["i18n/t"]("validation.cluster.name")),n}var Y={clusterName:K,clusterIp:R,externalName:I,flowOutput:b,groupsAreValid:D,logdna:g,ruleGroups:j,interval:$,servicePort:T,matching:P,containerImages:F,cronSchedule:B,podAffinity:G,roleTemplateRules:W},X=n("5877"),J=n.n(X);async function Q(t,e,r="text/plain;charset=utf-8"){const o=new Blob([e],{type:r}),{saveAs:i}=await n.e(1).then(n.t.bind(null,"7ada",7));return i(o,t)}function Z(t){const e=new J.a;for(const n in t)e.file(n,t[n]);return e.generateAsync({type:"blob"}).then(t=>t)}function tt(){this.queue=[],this.offset=0,this.getLength=function(){return this.queue.length-this.offset},this.isEmpty=function(){return 0===this.queue.length},this.enqueue=function(t){this.queue.push(t)},this.dequeue=function(){if(0===this.queue.length)return;const t=this.queue[this.offset];return 2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),t},this.peek=function(){return this.queue.length>0?this.queue[this.offset]:void 0},this.clear=function(){this.offset=0,this.queue.length=0}}function et(t,e,n,r=!1){return r&&console.log("eachLimit of",t.length," items",e,"at a time"),new Promise((o,i)=>{const a=new tt;let s=0,l=!1;const c=[];for(let e=0;e{r&&console.log("Done",t),c[e]=n,s--,u()}).catch(e=>{r&&console.log("Failed",e,t),l=!0,i(e)})}}}u()})}var nt=n("1d19"),rt=n("b10f"),ot=n.n(rt);const it=t=>t.toLowerCase().startsWith("https://"),at=t=>/^(?:https?:\/\/)?(?:localhost|127\.0\.0\.1)/i.test(t),st=t=>ot()(t)&&(null===t||void 0===t?void 0:t.toLowerCase().endsWith("/"));function lt(t,e,n){return e=ct(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ct(t){var e=ut(t,"string");return"symbol"==typeof e?e:e+""}function ut(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}class dt{constructor(t){lt(this,"empty",void 0),lt(this,"int",void 0),lt(this,"string",void 0),lt(this,"isNumber",void 0),lt(this,"isInt",void 0),this.string=String(t),this.int=parseInt(this.string,10),this.empty=!t&&0!==this.int,this.isNumber=!isNaN(this.int)&&!this.string.includes("e"),this.isInt=this.isNumber&&!this.string.includes(".")}}const pt=(t,e)=>{for(const n of e){const e=n(t);if(e)return e}};var ft=function(t,{key:e="Value"}){const n=n=>r=>"."===(null===r||void 0===r?void 0:r.slice(0,1))?t(`validation.dns.${n}.startDot`,{key:e}):void 0,o=n=>r=>"."===(null===r||void 0===r?void 0:r.slice(-1))?t(`validation.dns.${n}.endDot`,{key:e}):void 0,i=n=>r=>{var o;return null!==r&&void 0!==r&&null!==(o=r.slice(0,1))&&void 0!==o&&o.match(/[0-9]/)?t(`validation.dns.${n}.startNumber`,{key:e}):void 0},a=n=>r=>"-"===(null===r||void 0===r?void 0:r.slice(0,1))?t(`validation.dns.${n}.startHyphen`,{key:e}):void 0,s=n=>r=>"-"===(null===r||void 0===r?void 0:r.slice(-1))?t(`validation.dns.${n}.endHyphen`,{key:e}):void 0,l=n=>r=>Number(r)r=>Number(r)>Number(n)?t("validation.maxValue",{key:e,max:n}):void 0,u=([n,r])=>o=>l(n)(o)||c(r)(o)?t("validation.betweenValues",{key:e,min:n,max:r}):void 0,d=n=>r=>r.lengthr=>r.length>Number(n)?t("validation.maxLength",{key:e,max:n}):void 0,f=([n,r])=>o=>d(n)(o)||p(r)(o)?t("validation.betweenLengths",{key:e,min:n,max:r}):void 0,h=n=>isNaN(parseInt(n,10))?t("validation.number.requiredInt",{key:e}):void 0,b=n=>!Number.isInteger(+n)||(""+n).match(/\.+/g)?t("validation.number.requiredInt",{key:e}):void 0,g=n=>+n<0?t("validation.number.isPositive",{key:e}):void 0,m=n=>{const r=""+n,o=r.match(/(^0+)(.+)/);return o?t("validation.number.isOctal",{key:e}):void 0},y=n=>parseInt(n,10)<1||parseInt(n,10)>65535?t("validation.number.between",{key:e,min:"1",max:"65535"}):void 0,w=n=>{const r=null===n||void 0===n?void 0:n.match(/[^${'A-Za-z0-9-'}]/g);if(r)return t("validation.chars",{key:e,count:r.length,chars:r.map(t=>" "===t?"Space":`"${t}"`).join(", ")})},_=n=>"--"===(null===n||void 0===n?void 0:n.substr(2,2))&&"xn"!==(null===n||void 0===n?void 0:n.substr(0,2))?t("validation.dns.doubleHyphen",{key:e}):void 0,x=n=>"--"===(null===n||void 0===n?void 0:n.substr(2,2))&&"xn"!==(null===n||void 0===n?void 0:n.substr(0,2))?t("validation.dns.doubleHyphen",{key:e}):void 0,O=n=>(r="")=>0===r.length?t(`validation.dns.${n}.emptyLabel`,{key:e,min:1}):void 0,k=(n,r=63)=>(o="")=>o.length>r?t(`validation.dns.${n}.tooLongLabel`,{key:e,max:r}):void 0,A=(n="")=>n.length>253?t("validation.dns.hostname.tooLong",{key:e,max:253}):void 0,E=(n="")=>"/"!==n[0]&&n.length>0?t("validation.path",{key:e}):void 0,S=n=>n||!1===n?void 0:t("validation.required",{key:e}),C=(n="")=>n.toLowerCase()!==n?t("validation.noUpperCase",{key:e}):void 0,T=e=>{try{U.a.toString(e)}catch(n){return t("validation.invalidCron")}},R=e=>e&&!it(e)?t("validation.setting.serverUrl.https"):void 0,I=e=>at(e)?t("validation.setting.serverUrl.localhost"):void 0,L=e=>st(e)?t("validation.setting.serverUrl.trailingForwardSlash"):void 0,j=e=>e&&!ot()(e)?t("validation.setting.serverUrl.url"):void 0,D=n=>/^\d+[hms]$/.test(n)?void 0:t("validation.monitoring.route.interval",{key:e}),P=e=>null!==e&&void 0!==e&&e.image?void 0:t("workload.validation.containerImage",{name:e.name}),$=e=>{var n,r;const o=e.jobTemplate?null===e||void 0===e||null===(n=e.jobTemplate)||void 0===n||null===(n=n.spec)||void 0===n||null===(n=n.template)||void 0===n||null===(n=n.spec)||void 0===n?void 0:n.containers:null===e||void 0===e||null===(r=e.template)||void 0===r||null===(r=r.spec)||void 0===r?void 0:r.containers;return o&&o.length?o.map(t=>P(t)).find(t=>t):t("validation.required",{key:t("workload.container.titles.containers")})},F=t=>{const e=[w,a("label"),s("label"),_,k("label")];return pt(t,e)},M=t=>{const e=[w,a("label"),s("label"),x,O("label"),k("label",15)];return pt(t,e)},B=t=>{const e=[w,i("label"),a("label"),s("label"),_,O("label"),k("label")];return pt(t,e)},G=t=>{if(t){const e=[n("hostname"),A,o("hostname")],r=pt(t,e);if(r)return r;const i=t.split("."),l=[w,a("hostname"),s("hostname"),_,O("hostname"),k("hostname")];for(let t=0;t(t=t?t.replace(/^\*\./,""):t,G(t)),V=e=>v()(e)?t("validation.service.externalName.none"):G(e),z=t=>"This is an error returned by the testRule validator",W=e=>v()(null===e||void 0===e?void 0:e.groups)?t("validation.prometheusRule.groups.required"):void 0,K=e=>n=>{var r;return e&&null!==(r=n||"")&&void 0!==r&&r.match(/^(c-.{5}|local)$/i)?t("validation.cluster.name"):void 0},Y=e=>{const{name:n,idx:r}=e,o=new dt(e.nodePort),i=new dt(e.port),a=new dt(e.targetPort);if(v()(n))return t("validation.service.ports.name.required",{position:r+1});if(!o.empty){if(!o.isInt)return t("validation.service.ports.nodePort.requiredInt",{position:r+1});if(o.int<1||o.int>65535)return t("validation.service.ports.nodePort.between",{position:r+1})}if(i.empty)return t("validation.service.ports.port.required",{position:r+1});var s;if(!i.isInt)return t("validation.service.ports.port.requiredInt",{position:r+1});if(i.int<1||i.int>65535)return t("validation.service.ports.port.between",{position:r+1});if(null!==(s=i.string)&&void 0!==s&&s.includes("."))return i;if(a.empty)return t("validation.service.ports.targetPort.required",{position:r+1});if(a.isInt){if(a.int<1||a.int>65535)return t("validation.service.ports.targetPort.between",{position:r+1})}else{const t=M(a.string);if(t)return t}},X=(e,n)=>{let r;return v()(null===e||void 0===e?void 0:e.name)?t("validation.prometheusRule.groups.valid.name",{index:n}):v()(e.rules)?t("validation.prometheusRule.groups.valid.singleEntry",{index:n}):(e.rules.forEach((e,o)=>{const i=o+1;N()(e,"alert")&&v()(null===e||void 0===e?void 0:e.alert)&&!r?r=t("validation.prometheusRule.groups.valid.rule.alertName",{groupIndex:n,ruleIndex:i}):N()(e,"record")&&v()(null===e||void 0===e?void 0:e.record)&&(r=t("validation.prometheusRule.groups.valid.rule.recordName",{groupIndex:n,ruleIndex:i})),(N()(e,"expr")&&v()(e.expr)&&!r||!N()(e,"expr")&&!r)&&(r=t("validation.prometheusRule.groups.valid.rule.expr",{groupIndex:n,ruleIndex:i})),N()(e,"alert")&&(N()(e,"labels")&&v()(e.labels)&&!r||!N()(e,"labels")&&!r)&&(r=t("validation.prometheusRule.groups.valid.rule.labels",{groupIndex:n,ruleIndex:i}))}),r)},J=t=>{const e=[...t];let n;return e.forEach((t,e,r)=>{n=X(t,e+1),n&&(r.length=e+1)}),n},Q=e=>{if(v()(null===e||void 0===e?void 0:e.match)&&v()(null===e||void 0===e?void 0:e["match_re"]))return t("validation.monitoring.route.match")},Z=e=>(n=[])=>{if(n.some(t=>v()(t.verbs)))return t("validation.roleTemplate.roleTemplateRules.missingVerb");if(n.some(t=>{var e,n;return(null===(e=t.resources)||void 0===e?void 0:e.length)&&(null===(n=t.nonResourceURLs)||void 0===n?void 0:n.length)}))return t("validation.roleTemplate.roleTemplateRules.noResourceAndNonResource");if(e===H["u"].ROLE){if(n.some(t=>v()(t.resources)))return t("validation.roleTemplate.roleTemplateRules.missingResource");if(n.some(t=>v()(t.apiGroups)))return t("validation.roleTemplate.roleTemplateRules.missingApiGroup")}else if(n.some(t=>v()(t.resources)&&v()(t.nonResourceURLs)))return t("validation.roleTemplate.roleTemplateRules.missingOneResource")},tt=t=>{},et=e=>{const n=JSON.parse(e),r=n.type;if(!r)return t("validation.required",{key:"Type"});if("s3"===r){if(!n.accessKeyId)return t("validation.required",{key:"accessKeyId"});if(!n.secretAccessKey)return t("validation.required",{key:"secretAccessKey"});if(!n.bucketRegion)return t("validation.required",{key:"bucketRegion"});if(!n.bucketName)return t("validation.required",{key:"bucketName"})}},nt=e=>{const n=["qcow","qcow2","raw","img","iso"];if(!e||""===e)return;const r=e.split("/").pop(),o=r.split(".").pop().toLowerCase();return n.includes(o)?void 0:t("harvester.validation.image.ruleTip")},rt=(e={})=>{if(!e[r["d"].IMAGE_NAME])return t("validation.required",{key:t("harvester.image.fileName")})},lt=r=>{const i=null===r||void 0===r?void 0:r.match(/[^a-z0-9.-]/g);return i?t("validation.chars",{key:e,count:i.length,chars:i.map(t=>" "===t?"Space":`"${t}"`).join(", ")}):pt(r,[a("label"),s("label"),n("label"),o("label"),S])};return{absolutePath:E,backupTarget:et,betweenLengths:f,betweenValues:u,clusterIp:tt,clusterName:K,containerImage:P,containerImages:$,cronSchedule:T,dnsLabel:F,dnsLabelIanaServiceName:M,dnsLabelRestricted:B,externalName:V,fileRequired:rt,groupsAreValid:J,hostname:G,imageUrl:nt,interval:D,https:R,localhost:I,trailingForwardSlash:L,url:j,matching:Q,maxLength:p,maxValue:c,minLength:d,minValue:l,noUpperCase:C,portNumber:y,required:S,requiredInt:h,isInteger:b,isPositive:g,isOctal:m,roleTemplateRules:Z,ruleGroups:W,servicePort:Y,subDomain:lt,testRule:z,wildcardHostname:q}};const ht=(t,e="",n=3e6,r=500,o=!1)=>{return i("Starting wait for",e),new Promise((o,a)=>{t()&&(i("Wait for",e||"unknown","done immediately"),o(void 0));const s=setTimeout(()=>{if(i("Wait for",e,"timed out"),clearInterval(l),clearTimeout(s),!e)throw new Error(`waitFor timed out after ${n/1e3} seconds`);a(new Error("Failed waiting for: "+e))},n),l=setInterval(()=>{t()?(i("Wait for",e,"done"),clearInterval(l),clearTimeout(s),o(void 0)):e&&i("Wait for",e,"not done yet")},r)});function i(...t){o&&console.log(...t)}};var vt=n("7838"),bt=n.n(vt),gt=n("ddd1"),mt=n.n(gt),yt=(n("6552"),n("daaf")),wt=n.n(yt),_t=n("9c38"),xt=n.n(_t);H["w"];function Ot(t){var e;return t=((null===(e=t)||void 0===e?void 0:e.type)||t||"").toLowerCase(),t}var kt,At,Et,St,Ct,Tt;(function(t){t["ACTION"]="Action",t["TAB"]="Tab",t["PANEL"]="Panel",t["CARD"]="Card",t["TABLE_COL"]="TableColumn"})(kt||(kt={})),function(t){t["HEADER"]="header-action",t["TABLE"]="table-action"}(At||(At={})),function(t){t["DETAILS_MASTHEAD"]="details-masthead",t["DETAIL_TOP"]="detail-top",t["RESOURCE_LIST"]="resource-list"}(Et||(Et={})),function(t){t["RESOURCE_DETAIL"]="tab",t["CLUSTER_CREATE_RKE2"]="cluster-create-rke2"}(St||(St={})),function(t){t["CLUSTER_DASHBOARD_CARD"]="cluster-dashboard-card"}(Ct||(Ct={})),function(t){t["RESOURCE"]="resource-list"}(Tt||(Tt={}));var Rt=n("98d3");var It=n("0fb1");const Lt={name:"state",labelKey:"tableHeaders.state",sort:["stateSort","nameSort"],value:"stateDisplay",getValue:t=>t.stateDisplay,width:100,default:"unknown",formatter:"BadgeStateFormatter"},Nt={name:"localOutputRefs",labelKey:"tableHeaders.output",value:"outputs",sort:["outputsSortable"],formatter:"ListLink",formatterOpts:{options:{internal:!0}}},jt=(H["o"],{name:"age",labelKey:"tableHeaders.age",value:"creationTimestamp",getValue:t=>t.creationTimestamp,sort:"creationTimestamp:desc",search:!1,formatter:"LiveDate",width:100,align:"left"}),Dt={name:"pod_images",labelKey:"tableHeaders.podImages",value:"imageNames",getValue:t=>t.imageNames,sort:"imageNames",formatter:"PodImages"},Pt=(It["a"].LAPTOP,r["b"],It["a"].DESKTOP,{name:"scope",value:"clusterName",labelKey:"tableHeaders.scope",dashIfEmpty:!0,align:"left",sort:["scope"],width:100});n("b506");var $t=n("8535");n("1fcb");const Ft=["metadata.clusterName","metadata.creationTimestamp","metadata.deletionGracePeriodSeconds","metadata.deletionTimestamp","metadata.finalizers","metadata.generateName","metadata.generation","metadata.initializers","metadata.managedFields","metadata.ownerReferences","metadata.resourceVersion","metadata.relationships","metadata.selfLink","metadata.state","metadata.uid","spec.versions.schema","status","stringData","links","_name","_labels","_annotations"];var Mt=n("66fb");function Ut(t,e,n){return e=Bt(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bt(t){var e=Gt(t,"string");return"symbol"==typeof e?e:e+""}function Gt(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}class qt{constructor(){Ut(this,"cachedGcPrefs",Mt["a"]),Ut(this,"cachedGcPrefsStamp",""),Ut(this,"debugLog",(...t)=>{qt.ENABLE_DEBUG_LOGGING&&console.debug("GC",...t)}),Ut(this,"gcLastRun",0),Ut(this,"getUiPerfGarbageCollection",t=>{var e;const n=null===(e=t.management.types[H["k"].SETTING])||void 0===e?void 0:e.list.find(t=>t.id===$t["a"].UI_PERFORMANCE);if(!n||!n.value)return;const r=`${n.metadata.generation}-${n.metadata.resourceVersion}`;if(this.cachedGcPrefsStamp!==r){this.debugLog(`Updating ${$t["a"].UI_PERFORMANCE} cache`),this.cachedGcPrefsStamp=r;const t=JSON.parse(n.value);this.cachedGcPrefs=t.garbageCollection}return this.cachedGcPrefs}),Ut(this,"lastAccessedCache",{}),Ut(this,"lastRouteChange",0)}gcEnabledAll(t,e){return this.gcEnabledForStore(t.state)&&this.gcEnabledSetting(t)&&this.gcEnabledForType(t,e)}gcEnabledSetting(t){const{rootState:e}=t,n=this.getUiPerfGarbageCollection(e);return null===n||void 0===n?void 0:n.enabled}gcEnabledForStore(t){var e;return null===t||void 0===t||null===(e=t.config)||void 0===e?void 0:e.supportsGc}gcEnabledForType(t,e){const{getters:n}=t;return!(!e||n.gcIgnoreTypes[e])}gcEnabledInterval(t){const{rootState:e}=t,n=this.getUiPerfGarbageCollection(e);return{enabled:null===n||void 0===n?void 0:n.enabledInterval,interval:(null===n||void 0===n?void 0:n.interval)||0}}gcEnabledRoute(t){const{rootState:e}=t,n=this.getUiPerfGarbageCollection(e);return null===n||void 0===n?void 0:n.enabledOnNavigate}garbageCollect(t,e={}){const n=(new Date).getTime();if(null===this.gcLastRun||n-this.gcLastRun{var u;if(!s)return void this.debugLog(i+": Skipping (no accessed time)");if(!this.gcEnabledForType(t,i))return void this.debugLog(i+": Skipping (type ignored by store)");if(e[i])return void this.debugLog(i+": Skipping (navigating to type)");if(n-s<=l)return void this.debugLog(i+": Skipping (recently accessed)");if(void 0!==this.lastRouteChange&&this.lastRouteChange0&&console.info("Garbage Collected Resources",r),this.debugLog("------ Finished ------")}gcUpdateLastAccessed(t,e){if(!this.gcEnabledAll(t,e))return;const n=t.state.config.namespace;this.lastAccessedCache[n]||(this.lastAccessedCache[n]={}),this.lastAccessedCache[n][e]=(new Date).getTime()}gcUpdateRouteChanged(){this.lastRouteChange=(new Date).getTime()}gcResetStore(t){const e=t.config.namespace;delete this.lastAccessedCache[e],this.debugLog("Forgetting Store:",e)}gcResetType(t,e){const n=t.config.namespace;this.lastAccessedCache[n]&&(delete this.lastAccessedCache[n][e],this.debugLog("Forgetting Type:",n,e))}}Ut(qt,"ENABLE_DEBUG_LOGGING",!1),Ut(qt,"GC_RE_RUN_GAP",5e3);new qt;n("4048");n("3e9d");function Vt(){const t=zt(document.head.getElementsByTagName("link"));return t?t.href:""}function zt(t){for(let n=0;n{if(ne(r,t.locationConfig,i||{})){if(e===kt.CARD)n===Ct.CLUSTER_DASHBOARD_CARD&&t.labelKey&&(a[l].label=o.t(t.labelKey));else if(e===kt.ACTION&&(n===At.TABLE&&(t.labelKey&&(a[l].label=o.t(t.labelKey)),a[l].bulkable=a[l].multiple||a[l].bulkable,a[l].action||(a[l].action="custom-table-action-"+Object(u["l"])(10).toLowerCase())),n===At.HEADER&&t.shortcut))if("string"===typeof t.shortcut)a[l].shortcutLabel=()=>Rt["b"]?`(⌘-${t.shortcut.toUpperCase()})`:`(Ctrl-${t.shortcut.toUpperCase()})`,a[l].shortcutKey={windows:["ctrl",t.shortcut],mac:["meta",t.shortcut]};else if("object"===typeof t.shortcut&&!Array.isArray(t.shortcut)&&null!==t.shortcut){a[l].shortcutKey=t.shortcut;const e=Rt["b"]?a[l].shortcut.mac:a[l].shortcut.windows?a[l].shortcut.windows:[];let n="";e.forEach((t,r)=>{r`(${n})`}s.push(a[l])}})}return s}const oe=["string","date","blob","enum","multiline","masked","password","dnsLabel","hostname"],ie=["dnsLabel","dnsLabelRestricted","hostname"],ae={disabled:"inactive",notapplied:"Not Applied",notready:"Not Ready",waitapplied:"Wait Applied",outofsync:"Out of Sync","in-progress":"In Progress",gitupdating:"Git Updating",errapplied:"Err Applied",waitcheckin:"Wait Check-In",off:"Disabled",waitingforinfrastructure:"Waiting for Infra",waitingfornoderef:"Waiting for Node Ref"},se="warning",le="x",ce=1e3,ue=3e4,de={IN_USE:"in-use",IN_PROGRESS:"in-progress",PENDING_ROLLBACK:"pending-rollback",PENDING_UPGRADE:"pending-upgrade",ABORTED:"aborted",ACTIVATING:"activating",ACTIVE:"active",AVAILABLE:"available",BACKED_UP:"backedup",BOUND:"bound",BUILDING:"building",COMPLETED:"completed",CORDONED:"cordoned",COUNT:"count",CREATED:"created",CREATING:"creating",DEACTIVATING:"deactivating",DEGRADED:"degraded",DENIED:"denied",DEPLOYED:"deployed",DEPLOYING:"deploying",DISABLED:"disabled",DISCONNECTED:"disconnected",DRAINED:"drained",DRAINING:"draining",ERR_APPLIED:"errapplied",ERROR:"error",ERRORING:"erroring",ERRORS:"errors",EXPIRED:"expired",EXPIRING:"expiring",FAIL:"fail",FAILED:"failed",HEALTHY:"healthy",INACTIVE:"inactive",INFO:"info",INITIALIZING:"initializing",INPROGRESS:"inprogress",LOCKED:"locked",MIGRATING:"migrating",MISSING:"missing",MODIFIED:"modified",NOT_APPLICABLE:"notApplicable",NOT_APLLIED:"notapplied",NOT_READY:"notready",OFF:"off",ORPHANED:"orphaned",OTHER:"other",OUT_OF_SYNC:"outofsync",ON_GOING:"on-going",PASS:"pass",PASSED:"passed",PAUSED:"paused",PENDING:"pending",PROVISIONING:"provisioning",PROVISIONED:"provisioned",PURGED:"purged",PURGING:"purging",READY:"ready",RECONNECTING:"reconnecting",REGISTERING:"registering",REINITIALIZING:"reinitializing",RELEASED:"released",REMOVED:"removed",REMOVING:"removing",REQUESTED:"requested",RESTARTING:"restarting",RESTORING:"restoring",RESIZING:"resizing",RUNNING:"running",SKIP:"skip",SKIPPED:"skipped",STARTING:"starting",STOPPED:"stopped",STOPPING:"stopping",SUCCEEDED:"succeeded",SUCCESS:"success",SUCCESSFUL:"successful",SUPERSEDED:"superseded",SUSPENDED:"suspended",UNAVAILABLE:"unavailable",UNHEALTHY:"unhealthy",UNINSTALLED:"uninstalled",UNINSTALLING:"uninstalling",UNKNOWN:"unknown",UNTRIGGERED:"untriggered",UPDATING:"updating",WAIT_APPLIED:"waitapplied",WAIT_CHECKIN:"waitcheckin",WAITING:"waiting",WARNING:"warning"};const pe={[de.IN_USE]:{color:"success",icon:"dot-open",label:"In Use",compoundIcon:"checkmark"},[de.IN_PROGRESS]:{color:"info",icon:"tag",label:"In Progress",compoundIcon:"info"},[de.PENDING_ROLLBACK]:{color:"info",icon:"dot-half",label:"Pending Rollback",compoundIcon:"info"},[de.PENDING_UPGRADE]:{color:"info",icon:"dot-half",label:"Pending Update",compoundIcon:"info"},[de.ABORTED]:{color:"warning",icon:"error",label:"Aborted",compoundIcon:"warning"},[de.ACTIVATING]:{color:"info",icon:"tag",label:"Activating",compoundIcon:"info"},[de.ACTIVE]:{color:"success",icon:"dot-open",label:"Active",compoundIcon:"checkmark"},[de.AVAILABLE]:{color:"success",icon:"dot-open",label:"Available",compoundIcon:"checkmark"},[de.BACKED_UP]:{color:"success",icon:"backup",label:"Backed Up",compoundIcon:"checkmark"},[de.BOUND]:{color:"success",icon:"dot",label:"Bound",compoundIcon:"checkmark"},[de.BUILDING]:{color:"success",icon:"dot-open",label:"Building",compoundIcon:"checkmark"},[de.COMPLETED]:{color:"success",icon:"dot",label:"Completed",compoundIcon:"checkmark"},[de.CORDONED]:{color:"info",icon:"tag",label:"Cordoned",compoundIcon:"info"},[de.COUNT]:{color:"success",icon:"dot-open",label:"Count",compoundIcon:"checkmark"},[de.CREATED]:{color:"info",icon:"tag",label:"Created",compoundIcon:"info"},[de.CREATING]:{color:"info",icon:"tag",label:"Creating",compoundIcon:"info"},[de.DEACTIVATING]:{color:"info",icon:"adjust",label:"Deactivating",compoundIcon:"info"},[de.DEGRADED]:{color:"warning",icon:"error",label:"Degraded",compoundIcon:"warning"},[de.DENIED]:{color:"error",icon:"adjust",label:"Denied",compoundIcon:"error"},[de.DEPLOYED]:{color:"success",icon:"dot-open",label:"Deployed",compoundIcon:"checkmark"},[de.DISABLED]:{color:"warning",icon:"error",label:"Disabled",compoundIcon:"warning"},[de.DISCONNECTED]:{color:"warning",icon:"error",label:"Disconnected",compoundIcon:"warning"},[de.DRAINED]:{color:"info",icon:"tag",label:"Drained",compoundIcon:"info"},[de.DRAINING]:{color:"warning",icon:"tag",label:"Draining",compoundIcon:"warning"},[de.ERR_APPLIED]:{color:"error",icon:"error",label:"Error Applied",compoundIcon:"error"},[de.ERROR]:{color:"error",icon:"error",label:"Error",compoundIcon:"error"},[de.ERRORING]:{color:"error",icon:"error",label:"Erroring",compoundIcon:"error"},[de.ERRORS]:{color:"error",icon:"error",label:"Errors",compoundIcon:"error"},[de.EXPIRED]:{color:"error",icon:"error",label:"Expired",compoundIcon:"warning"},[de.EXPIRING]:{color:"warning",icon:"error",label:"Expiring",compoundIcon:"error"},[de.FAIL]:{color:"error",icon:"error",label:"Fail",compoundIcon:"error"},[de.FAILED]:{color:"error",icon:"error",label:"Failed",compoundIcon:"error"},[de.HEALTHY]:{color:"success",icon:"dot-open",label:"Healthy",compoundIcon:"checkmark"},[de.INACTIVE]:{color:"error",icon:"dot",label:"Inactive",compoundIcon:"error"},[de.INITIALIZING]:{color:"warning",icon:"error",label:"Initializing",compoundIcon:"warning"},[de.INPROGRESS]:{color:"info",icon:"spinner",label:"In Progress",compoundIcon:"info"},[de.INFO]:{color:"info",icon:"info",label:"Info",compoundIcon:"info"},[de.LOCKED]:{color:"warning",icon:"adjust",label:"Locked",compoundIcon:"warning"},[de.MIGRATING]:{color:"info",icon:"info",label:"Migrated",compoundIcon:"info"},[de.MISSING]:{color:"warning",icon:"adjust",label:"Missing",compoundIcon:"warning"},[de.MODIFIED]:{color:"warning",icon:"edit",label:"Modified",compoundIcon:"warning"},[de.NOT_APPLICABLE]:{color:"warning",icon:"tag",label:"Not Applicable",compoundIcon:"warning"},[de.NOT_APLLIED]:{color:"warning",icon:"tag",label:"Not Applied",compoundIcon:"warning"},[de.NOT_READY]:{color:"warning",icon:"tag",label:"Not Ready",compoundIcon:"warning"},[de.OFF]:{color:"darker",icon:"error",label:"Off"},[de.ON_GOING]:{color:"info",icon:"info",label:"Info",compoundIcon:"info"},[de.ORPHANED]:{color:"warning",icon:"tag",label:"Orphaned",compoundIcon:"warning"},[de.OTHER]:{color:"info",icon:"info",label:"Other",compoundIcon:"info"},[de.OUT_OF_SYNC]:{color:"warning",icon:"tag",label:"Out Of Sync",compoundIcon:"warning"},[de.PASS]:{color:"success",icon:"dot-dotfill",label:"Pass",compoundIcon:"checkmark"},[de.PASSED]:{color:"success",icon:"dot-dotfill",label:"Passed",compoundIcon:"checkmark"},[de.PAUSED]:{color:"info",icon:"info",label:"Paused",compoundIcon:"info"},[de.PENDING]:{color:"info",icon:"tag",label:"Pending",compoundIcon:"info"},[de.PROVISIONING]:{color:"info",icon:"dot",label:"Provisioning",compoundIcon:"info"},[de.PROVISIONED]:{color:"success",icon:"dot",label:"Provisioned",compoundIcon:"checkmark"},[de.PURGED]:{color:"error",icon:"purged",label:"Purged",compoundIcon:"error"},[de.PURGING]:{color:"info",icon:"purged",label:"Purging",compoundIcon:"info"},[de.READY]:{color:"success",icon:"dot-open",label:"Ready",compoundIcon:"checkmark"},[de.RECONNECTING]:{color:"error",icon:"error",label:"Reconnecting",compoundIcon:"error"},[de.REGISTERING]:{color:"info",icon:"tag",label:"Registering",compoundIcon:"info"},[de.REINITIALIZING]:{color:"warning",icon:"error",label:"Reinitializing",compoundIcon:"warning"},[de.RELEASED]:{color:"warning",icon:"error",label:"Released",compoundIcon:"warning"},[de.REMOVED]:{color:"error",icon:"trash",label:"Removed",compoundIcon:"error"},[de.REMOVING]:{color:"info",icon:"trash",label:"Removing",compoundIcon:"info"},[de.REQUESTED]:{color:"info",icon:"tag",label:"Requested",compoundIcon:"info"},[de.RESTARTING]:{color:"info",icon:"adjust",label:"Restarting",compoundIcon:"info"},[de.RESTORING]:{color:"info",icon:"medicalcross",label:"Restoring",compoundIcon:"info"},[de.RESIZING]:{color:"warning",icon:"dot",label:"Resizing",compoundIcon:"warning"},[de.RUNNING]:{color:"success",icon:"dot-open",label:"Running",compoundIcon:"checkmark"},[de.SKIP]:{color:"info",icon:"dot-open",label:"Skip",compoundIcon:"info"},[de.SKIPPED]:{color:"info",icon:"dot-open",label:"Skipped",compoundIcon:"info"},[de.STARTING]:{color:"info",icon:"adjust",label:"Starting",compoundIcon:"info"},[de.STOPPED]:{color:"error",icon:"dot",label:"Stopped",compoundIcon:"error"},[de.STOPPING]:{color:"info",icon:"adjust",label:"Stopping",compoundIcon:"info"},[de.SUCCEEDED]:{color:"success",icon:"dot-dotfill",label:"Succeeded",compoundIcon:"checkmark"},[de.SUCCESS]:{color:"success",icon:"dot-open",label:"Success",compoundIcon:"checkmark"},[de.SUCCESSFUL]:{color:"success",icon:"dot-open",label:"Successful"},[de.SUPERSEDED]:{color:"info",icon:"dot-open",label:"Superseded",compoundIcon:"info"},[de.SUSPENDED]:{color:"info",icon:"pause",label:"Suspended",compoundIcon:"info"},[de.UNAVAILABLE]:{color:"error",icon:"error",label:"Unavailable",compoundIcon:"error"},[de.UNHEALTHY]:{color:"error",icon:"error",label:"Unhealthy",compoundIcon:"error"},[de.UNINSTALLED]:{color:"info",icon:"trash",label:"Uninstalled",compoundIcon:"info"},[de.UNINSTALLING]:{color:"info",icon:"trash",label:"Uninstalling",compoundIcon:"info"},[de.UNKNOWN]:{color:"warning",icon:"x",label:"Unknown",compoundIcon:"warning"},[de.UNTRIGGERED]:{color:"success",icon:"tag",label:"Untriggered",compoundIcon:"checkmark"},[de.UPDATING]:{color:"warning",icon:"tag",label:"Updating",compoundIcon:"warning"},[de.WAIT_APPLIED]:{color:"info",icon:"tag",label:"Wait Applied",compoundIcon:"info"},[de.WAIT_CHECKIN]:{color:"warning",icon:"tag",label:"Wait Checkin",compoundIcon:"warning"},[de.WAITING]:{color:"info",icon:"tag",label:"Waiting",compoundIcon:"info"},[de.WARNING]:{color:"warning",icon:"error",label:"Warning",compoundIcon:"warning"},[de.DEPLOYING]:{color:"info",icon:"info",label:"Deploying",compoundIcon:"info"}};const fe={error:1,warning:2,info:3,success:4,ready:5,notready:6,other:7};function he(t,e,n){if(e)return"text-error";if(n)return"text-info";const r=(t||"active").toLowerCase();let o;return pe[r]&&pe[r].color&&(o=ge.call(this,pe[r].color)),o||(o=se),"text-"+o}function ve(t){const e=(t||"active").toLowerCase();return ae[e]?ae[e]:e.split(/-/).map(u["p"]).join("-")}function be(t,e){return t=t.replace(/^(text|bg)-/,""),`${fe[t]||fe["other"]} ${e}`}function ge(t){return wt()(t)?t(this):t}class me{constructor(t,e,n=null,r=!1){for(const o in t)this[o]=t[o];Object.defineProperty(this,"$ctx",{value:e,enumerable:!1}),n&&Object.defineProperty(this,"__rehydrate",{value:n,enumerable:!0,configurable:!0}),r&&Object.defineProperty(this,"__clone",{value:!0,enumerable:!0,configurable:!0,writable:!0})}get $getters(){return this.$ctx.getters}get $rootGetters(){return this.$ctx.rootGetters}get $dispatch(){return this.$ctx.dispatch}get $state(){return this.$ctx.state}get $rootState(){return this.$ctx.rootState}get customValidationRules(){return[]}get _key(){const t=this.metadata;if(t){if(t.uid)return t.uid;if(t.namespace)return`${this.type}/${t.namespace}/${t.name}`}return this.id?`${this.type}/${this.id}`:`${this.type}/${Math.random()}`}get schema(){return this.$getters["schemaFor"](this.type)}toString(){return`[${this.type}: ${this.id}]`}get typeDisplay(){const t=this.schema;return t?this.$rootGetters["type-map/labelFor"](t):"?"}get nameDisplay(){var t,e,n;return this.displayName||(null===(t=this.spec)||void 0===t?void 0:t.displayName)||(null===(e=this.metadata)||void 0===e||null===(e=e.annotations)||void 0===e?void 0:e[r["f"]])||this.name||(null===(n=this.metadata)||void 0===n?void 0:n.name)||this.id}get nameSort(){return Object(nt["b"])(this.nameDisplay).toLowerCase()}get namespacedName(){var t;const e=null===(t=this.metadata)||void 0===t?void 0:t.namespace,n=this.nameDisplay;return e?`${e}:${n}`:n}get namespacedNameSort(){return Object(nt["b"])(this.namespacedName).toLowerCase()}get groupByLabel(){var t;const e=null===(t=this.metadata)||void 0===t?void 0:t.namespace;let n;return n=e?this.t("resourceTable.groupLabel.namespace",{name:Object(u["e"])(e)}):this.t("resourceTable.groupLabel.notInANamespace"),n}setLabels(){throw new Error("Implement setLabels in subclass")}setLabel(){throw new Error("Implement setLabel in subclass")}setAnnotations(t){throw new Error("Implement setAnnotations in subclass")}setAnnotation(t,e){throw new Error("Implement setAnnotation in subclass")}get stateDisplay(){return ve(this.state)}get stateColor(){var t,e;return he.call(this,this.state,null===(t=this.stateObj)||void 0===t?void 0:t.error,null===(e=this.stateObj)||void 0===e?void 0:e.transitioning)}get stateBackground(){return this.stateColor.replace("text-","bg-")}get stateIcon(){let t=!1,e=!1;if(this.metadata&&this.metadata.state&&(t=this.metadata.state.transitioning,e=this.metadata.state.error),t)return"icon icon-spinner icon-spin";if(e)return"icon icon-error";const n=(this.state||"").toLowerCase();let r;return pe[n]&&pe[n].icon&&(r=ge.call(this,pe[n].icon)),r||(r=le),"icon icon-"+r}get stateSort(){return be(this.stateColor,this.stateDisplay)}get stateDescription(){var t,e,n;const r=(null===(t=this.stateObj)||void 0===t?void 0:t.transitioning)||!1,o=(null===(e=this.stateObj)||void 0===e?void 0:e.error)||!1,i=null===(n=this.stateObj)||void 0===n?void 0:n.message;return r||o?Object(u["p"])(i):""}get stateObj(){var t;return null===(t=this.metadata)||void 0===t?void 0:t.state}waitForTestFn(t,e,n,r){return ht(()=>t.apply(this),e,n||ue,r||ce,!0)}waitForState(t,e,n){return this.waitForTestFn(()=>(this.state||"").toLowerCase()===t.toLowerCase(),"state="+t,e,n)}waitForTransition(){return this.waitForTestFn(()=>!this.transitioning,"transition completion",void 0,void 0)}waitForAction(t){return this.waitForTestFn(()=>this.hasAction(t),"action="+t,void 0,void 0)}waitForLink(t){return this.waitForTestFn(()=>this.hasLink(t),"link="+t,void 0,void 0)}hasCondition(t){return this.isCondition(t,null)}isCondition(t,e="True"){if(!this.status||!this.status.conditions)return!1;const n=Object(f["d"])(this.status.conditions||[],"type",t);return!!n&&(!e||(n.status||"").toLowerCase()===(""+e).toLowerCase())}waitForCondition(t,e="True",n=ue,r=ce){return this.waitForTestFn(()=>this.isCondition(t,e),`condition ${t}=${e}`,n,r)}get availableActions(){const t=this._availableActions;let e=null;const n=t.filter(t=>{if(!1===t.enabled)return!1;const n=t.divider,r=!n||n&&!e;return e=n,r});while(n.length&&n[0].divider)n.shift();while(n.length&&n[n.length-1].divider)n.pop();for(let r=1;r{const e={...t},r=e.enabled,o=typeof r;switch(o){case"undefined":e.enabled=!0;break;case"function":Object.defineProperty(e,"enabled",{get:()=>r(this)});break;case"boolean":break;default:console.warn("Unsupported 'enabled' property type for action: "+(t.label||t.labelKey)),delete e.enabled;break}n.push(e)})),n}get canDelete(){return this._canDelete}get _canDelete(){return this.hasLink("remove")&&this.$rootGetters["type-map/optionsFor"](this.type).isRemovable}get canClone(){return!0}get canUpdate(){return this.hasLink("update")&&this.$rootGetters["type-map/optionsFor"](this.type).isEditable}get canCustomEdit(){return this.$rootGetters["type-map/hasCustomEdit"](this.type,this.id)}get canCreate(){var t;return!(this.schema&&(null===(t=this.schema)||void 0===t||!t.collectionMethods.find(t=>"post"===t.toLowerCase())))&&this.$rootGetters["type-map/optionsFor"](this.type).isCreatable}get canViewInApi(){return this.hasLink("self")&&this.$rootGetters["prefs/get"](p["e"])}get canYaml(){return this.hasLink("view")}get canEditYaml(){var t;return(null===(t=this.schema)||void 0===t||null===(t=t.resourceMethods)||void 0===t||!t.find(t=>"blocked-PUT"===t))&&this.canUpdate}hasLink(t){return!!this.linkFor(t)}linkFor(t){return(this.links||{})[t]}followLink(t,e={}){if(e.url||(e.url=(this.links||{})[t]),e.urlSuffix&&(e.url+=e.urlSuffix),!e.url)throw new Error(`Unknown link ${t} on ${this.type} ${this.id}`);return this.$dispatch("request",{opt:e,type:this.type})}hasAction(t){return!!this.actionLinkFor(t)}actionLinkFor(t){return(this.actions||this.actionLinks||{})[t]}doAction(t,e,n={}){return this.$dispatch("resourceAction",{resource:this,actionName:t,body:e,opt:n})}async doActionGrowl(t,e,n={}){try{await this.$dispatch("resourceAction",{resource:this,actionName:t,body:e,opt:n})}catch(r){this.$dispatch("growl/fromError",{title:this.$rootGetters["i18n/t"]("generic.notification.title.error"),err:r.data||r},{root:!0})}}patch(t,e={},n=!1,r=!1){if(e.url||(e.url=this.linkFor("view")||this.linkFor("self")),e.method="patch",e.headers=e.headers||{},!e.headers["content-type"]){const t=n?"application/strategic-merge-patch+json":"application/json-patch+json";e.headers["content-type"]=t}e.data=t;const o=this.$dispatch("request",{opt:e,type:this.type});return r?o.catch(t=>{const e=this.t("resource.errors.update",{name:this.name});console.error(e,t),this.$dispatch("growl/error",{title:e,message:null===t||void 0===t?void 0:t.message,timeout:5e3},{root:!0})}):o}save(){return this._save(...arguments)}cleanForSave(t,e){return delete t.__rehydrate,delete t.__clone,t}processSaveResponse(t){}async _save(t={}){var e;const n=!this.id,r=await this.validationErrors(this,t.ignoreFields);if(!v()(r))return Promise.reject(r);if(null!==(e=this.metadata)&&void 0!==e&&e.resourceVersion&&(this.metadata.resourceVersion=""+this.metadata.resourceVersion),!t.url)if(n){const e=this.$getters["schemaFor"](this.type);let n=e.linkFor("collection");e.attributes&&e.attributes.namespaced&&this.metadata&&this.metadata.namespace&&(n+="/"+this.metadata.namespace),t.url=n}else t.url=this.linkFor("update")||this.linkFor("self");if(t.method||(t.method=n?"post":"put"),t.headers||(t.headers={}),t.headers["content-type"]||(t.headers["content-type"]="application/json"),t.headers["accept"]||(t.headers["accept"]="application/json"),t.data=this.toSave()||{...this},t.data._type&&(t.data.type=t.data._type),t.data._name&&(t.data.name=t.data._name),t.data._labels&&(t.data.labels=t.data._labels),t.data._annotations&&(t.data.annotations=t.data._annotations),t.data=this.cleanForSave(t.data,n),null!==t&&void 0!==t&&t.replace&&"put"===t.method){const e=t.url.includes("?")?"&":"?";t.url=`${t.url}${e}_replace=true`,delete t.replace}try{const e=await this.$dispatch("request",{opt:t,type:this.type});this.processSaveResponse(e),e&&"Table"!==e.kind&&await this.$dispatch("load",{data:e,existing:n?this:void 0})}catch(o){return this.type&&this.id&&409===(null===o||void 0===o?void 0:o._status)&&await this.$dispatch("find",{type:this.type,id:this.id,opt:{force:!0}}),Promise.reject(o)}return this}remove(){return this._remove(...arguments)}async _remove(t={}){t.url||(t.url=this.linkFor("self")),t.method="delete";const e=await this.$dispatch("request",{opt:t,type:this.type});204===(null===e||void 0===e?void 0:e._status)&&await this.$dispatch("ws.resource.remove",{data:this})}currentRoute(){return window.$nuxt.$route}currentRouter(){return window.$nuxt.$router}get listLocation(){return{name:"c-cluster-product-resource",params:{product:this.$rootGetters["productId"],cluster:this.$rootGetters["clusterId"],resource:this.type}}}get _detailLocation(){var t,e,n;const r=this.$getters["schemaFor"](this.type),o=null===(t=this.id)||void 0===t?void 0:t.replace(/.*\//,"");return{name:`c-cluster-product-resource${null!==r&&void 0!==r&&null!==(e=r.attributes)&&void 0!==e&&e.namespaced?"-namespace":""}-id`,params:{product:this.$rootGetters["productId"],cluster:this.$rootGetters["clusterId"],resource:this.type,namespace:null===(n=this.metadata)||void 0===n?void 0:n.namespace,id:o}}}get detailLocation(){return this._detailLocation}goToDetail(){this.currentRouter().push(this.detailLocation)}goToClone(t={}){const e=this.detailLocation;e.query={...e.query,[d["c"]]:d["h"],[d["a"]]:d["o"],...t},this.currentRouter().push(e)}goToEdit(t={}){const e=this.detailLocation;e.query={...e.query,[d["c"]]:d["l"],[d["a"]]:d["o"],...t},this.currentRouter().push(e)}goToViewConfig(t={}){const e=this.detailLocation;e.query={...e.query,[d["c"]]:d["p"],[d["a"]]:d["i"],...t},this.currentRouter().push(e)}goToEditYaml(){const t=this.detailLocation;t.query={...t.query,[d["c"]]:d["l"],[d["a"]]:d["q"]},this.currentRouter().push(t)}goToViewYaml(){const t=this.detailLocation;t.query={...t.query,[d["c"]]:d["p"],[d["a"]]:d["q"]},this.currentRouter().push(t)}cloneYaml(t={}){const e=this.detailLocation;e.query={...e.query,[d["c"]]:d["h"],[d["a"]]:d["q"],...t},this.currentRouter().push(e)}async download(){const t=await this.followLink("view",{headers:{accept:"application/yaml"}}),e=await this.cleanForDownload(t.data);Q(this.nameDisplay+".yaml",e,"application/yaml")}async downloadBulk(t){const e={},n=[];for(const o of t){let t=o.nameDisplay+".yaml",e=2;while(n.includes(t))t=`${o.nameDisplay}_${e++}.yaml`;n.push(t)}await et(t,10,(t,r)=>t.followLink("view",{headers:{accept:"application/yaml"}}).then(async t=>{const o=t.data||t,i=await this.cleanForDownload(o);e["resources/"+n[r]]=i}));const r=await Z(e);Q("resources.zip",r,"application/zip")}viewInApi(){window.open(this.links.self,"_blank")}promptRemove(t){t||(t=this),this.$dispatch("promptRemove",t)}get confirmRemove(){return!1}applyDefaults(){}get urlFromAttrs(){const t=this.$getters["schemaFor"](this.type),{metadata:{namespace:e="default"}}=this;let n=t.links.collection;const r=null===t||void 0===t?void 0:t.attributes;if(!r)throw new Error("Attributes must be present on the schema");const{group:o,resource:i}=r;return n=`${n.slice(0,n.indexOf("/v1"))}/apis/${o}/namespaces/${e}/${i}`,n}cleanYaml(t,e="edit"){try{const n=bt.a.load(t);"edit"!==e&&this.$dispatch("cleanForNew",n),n._type&&(n.type=n._type,delete n._type);const r=bt.a.dump(n,{skipInvalid:!0});return r}catch(n){return null}}cleanForNew(){this.$dispatch("cleanForNew",this)}cleanForDiff(){this.$dispatch("cleanForDiff",this.toJSON())}async cleanForDownload(t){return this.$dispatch("cleanForDownload",t)}yamlForSave(t){try{const e=bt.a.load(t);if(e)return this._type&&(e._type=e.type),bt.a.dump(e)}catch(e){return null}}async saveYaml(t){await this._saveYaml(t)}async _saveYaml(t){var e;const n=bt.a.load(t);if(null!==(e=this.schema)&&void 0!==e&&null!==(e=e.attributes)&&void 0!==e&&e.namespaced&&!n.metadata.namespace){const t=this.$rootGetters["i18n/t"]("resourceYaml.errors.namespaceRequired");throw t}let r;const o=!this.id,i={"content-type":"application/yaml",accept:"application/json"};r=o?await this.schema.followLink("collection",{method:"POST",headers:i,data:t}):await this.followLink("update",{method:"PUT",headers:i,data:t}),await this.$dispatch("load",{data:r,existing:o?this:void 0}),this.isSpoofed&&await this.$dispatch("cluster/findAll",{type:this.type,opt:{force:!0}},{root:!0})}get modelValidationRules(){const t=[],e=null===this||void 0===this?void 0:this.customValidationRules.filter(t=>!!t.validators||!!t.required).map(t=>{const e=ft(this.t,{displayKey:null!==t&&void 0!==t&&t.translationKey?this.t(t.translationKey):"Value"});return{path:t.path,rules:[...t.validators||[],...t.required?["required"]:[],...["dnsLabel","dnsLabelRestricted","hostname"].includes(t.type)?[t.type]:[]].map(t=>{if(t.includes(":")){const[n,r]=t.split(":");return e[n](r)}return e[t]}).filter(t=>!!t)}}).filter(t=>t.rules.length>0);return t.push(...e),t}customValidationErrors(t,e=[]){const n=[];let{customValidationRules:r}=this;return v()(r)||(wt()(r)&&(r=r()),r.filter(t=>!e.includes(t.path)).forEach(e=>{const{path:r,requiredIf:o,validators:i=[],type:a}=e;let s=Object(w["g"])(t,r);const l=mt()(i||[]);let u=r;if(e.translationKey&&this.$rootGetters["i18n/exists"](e.translationKey)&&(u=this.t(e.translationKey)),xt()(s)&&(s=s.trim()),o){const e=Object(w["g"])(t,o);!v()(e)&&v()(s)&&0!==s&&n.push(this.t("validation.required",{key:u}))}if(O(s,e,u,this.$rootGetters,n),k(s,e,u,this.$rootGetters,n),!v()(s)&&ie.includes(a)){const e=(s||"").toLowerCase();e!==s&&(s=e,c.a.set(t,r,s)),n.push(...S(s,a,u,this.$rootGetters,n))}l.forEach(e=>{const r=e.split(":"),o=r.slice(0,1),i=r.slice(1)||null,a=Object.prototype.hasOwnProperty.call(Y,o);if(!v()(o)&&a)Y[o](s,this.$rootGetters,n,i,u,t);else if(!v()(o)&&!a){var l;const e=null===(l=this.$rootState.$plugin)||void 0===l?void 0:l.getValidator(o);e?e(s,this.$rootGetters,n,i,u,t):console.warn(this.t("validation.custom.missing",{validatorName:o}))}})})),n}validationErrors(t=this,e){const n=[],{type:r,schema:o}=t,i=Ot(r);if(!r)return console.warn(this.t("validation.noType"),t),n;if(!o)return n;const a=o.resourceFields||{},s=Object.keys(a);let l,d,p,f;for(let b=0;b0)r.push(this.t("validation.required",{key:f})),n.push(...r);else{if("id"!==d&&!v()(p)&&ie.includes(o)){const e=(p||"").toLowerCase();e!==p&&(p=e,c.a.set(t,d,p)),r.push(...S(p,o,f,this.$rootGetters,r))}n.push(...r)}}return y()([...n,...this.customValidationErrors(t)])}get ownersByType(){var t;const e=(null===(t=this.metadata)||void 0===t?void 0:t.ownerReferences)||[],n={};return e.forEach(t=>{n[t.kind]?n[t.kind].push(t):n[t.kind]=[t]}),n}get owners(){const t=[];for(const e in this.ownersByType){const n=this.$rootGetters["cluster/schema"](e);if(n){const r=n.id,o=this.$rootGetters["cluster/all"](r);this.ownersByType[e].forEach((e,n)=>{const r=o.find(t=>{var n;return(null===t||void 0===t||null===(n=t.metadata)||void 0===n?void 0:n.uid)===e.uid});r&&t.push(r)})}}return t}get details(){return this._details}get _details(){var t;const e=[];return(null===(t=this.owners)||void 0===t?void 0:t.length)>0&&e.push({label:this.t("resourceDetail.detailTop.ownerReferences",{count:this.owners.length}),formatter:"ListLinkDetail",content:this.owners.map(t=>({key:t.id,row:t,col:{},value:t.metadata.name}))}),Object(w["g"])(this,"metadata.deletionTimestamp")&&e.push({label:this.t("resourceDetail.detailTop.deleted"),formatter:"LiveDate",formatterOpts:{addSuffix:!0},content:Object(w["g"])(this,"metadata.deletionTimestamp")}),e}get t(){return this.$rootGetters["i18n/t"]}findOwners(){return this._getRelationship("owner","from")}getOwners(){return this._getRelationship("owner","from")}findOwned(){return this._findRelationship("owner","to")}_relationshipsFor(t,e){var n;const r={selectors:[],ids:[]};if(null===(n=this.metadata)||void 0===n||null===(n=n.relationships)||void 0===n||!n.length)return r;for(const o of this.metadata.relationships)if(("any"===t||o.rel===t)&&o[e+"Type"])if(o.selector)Object(f["b"])(r.selectors,{type:o.toType,namespace:o.toNamespace,selector:o.selector});else{const t=o[e+"Type"];let n=o[e+"Namespace"],i=o[e+"Id"];if(!n&&i.includes("/")){const t=i.indexOf("/");n=i.substr(0,t),i=i.substr(t+1)}const a=(n?n+"/":"")+i;Object(f["a"])(r.ids,{type:t,namespace:n,name:i,id:a})}return r}_getRelationship(t,e){var n;const r=this._relationshipsFor(t,e);return null!==(n=r.selectors)&&void 0!==n&&n.length&&console.warn("Sync request for a relationship that is a selector"),r.ids||[]}async _findRelationship(t,e){const{selectors:n,ids:r}=this._relationshipsFor(t,e),o=[];for(const i of n){const t=await this.$dispatch("findMatching",i);Object(f["b"])(o,t.data)}for(const i of r){const{type:t,id:e}=i;let n=this.$getters["byId"](t,e);if(!n)try{n=await this.$dispatch("find",{type:t,id:e})}catch{}n&&Object(f["a"])(o,n)}return o}get shortId(){const t=this.id.split("/");return t.length>1?t[1]:t[0]}toJSON(){const t={},e=Object.keys(this);for(const r of e){var n;null!==(n=this[r])&&void 0!==n&&n.toJSON?t[r]=this[r].toJSON():t[r]=Object(w["e"])(this[r])}return t}toSave(){}get creationTimestamp(){var t;return null===(t=this.metadata)||void 0===t?void 0:t.creationTimestamp}get yamlFolding(){return[]}}function ye(t){const e=["state","name","description","labels","annotations"];return e.forEach(e=>delete t[e]),t}class we extends me{constructor(t,e,n=null,r=!1){const o=ye(t);super(o,e,n,r)}get labels(){var t;const e=(null===(t=this.metadata)||void 0===t?void 0:t.labels)||{};return i()(e,(t,e)=>Object(u["i"])(e,r["e"]))}setLabels(t){this.metadata||(this.metadata={});const e=this.metadata.labels||{},n=s()(e,(t,e)=>Object(u["i"])(e,r["e"]));c.a.set(this.metadata,"labels",{...n,...t})}setLabel(t,e){var n;e?(this.metadata||(this.metadata={}),this.metadata.labels||(this.metadata.labels={}),c.a.set(this.metadata.labels,t,e)):null!==(n=this.metadata)&&void 0!==n&&n.labels&&(c.a.set(this.metadata.labels,t,void 0),delete this.metadata.labels[t])}get annotations(){var t;const e=(null===(t=this.metadata)||void 0===t?void 0:t.annotations)||{};return i()(e,(t,e)=>Object(u["i"])(e,r["a"]))}setAnnotations(t){this.metadata||(this.metadata={});const e=this.metadata.annotations||{},n=s()(e,(t,e)=>Object(u["i"])(e,r["a"]));c.a.set(this.metadata,"annotations",{...n,...t})}setAnnotation(t,e){var n;e?(this.metadata||(this.metadata={}),this.metadata.annotations||(this.metadata.annotations={}),c.a.set(this.metadata.annotations,t,e)):null!==(n=this.metadata)&&void 0!==n&&n.annotations&&(c.a.set(this.metadata.annotations,t,void 0),delete this.metadata.annotations[t])}get state(){var t;return(null===(t=this.stateObj)||void 0===t?void 0:t.name)||"unknown"}}const _e=["metadata.resourceVersion","metadata.fields","metadata.clusterName","metadata.deletionGracePeriodSeconds","metadata.generateName"],xe=Ft.filter(t=>!_e.includes(t));class Oe extends we{get name(){var t;return(null===(t=this.metadata)||void 0===t?void 0:t.name)||this._name}get namespace(){var t;return null===(t=this.metadata)||void 0===t?void 0:t.namespace}get description(){var t,e;return(null===(t=this.metadata)||void 0===t||null===(t=t.annotations)||void 0===t?void 0:t[r["c"]])||(null===(e=this.spec)||void 0===e?void 0:e.description)||this._description}set description(t){var e;null!==(e=this.metadata)&&void 0!==e&&e.annotations&&(this.metadata.annotations[r["c"]]=t),this.spec&&(this.spec.description=t),this._description=t}cleanForSave(t,e){const n=super.cleanForSave(t);for(const r of xe)Object(w["f"])(n,r);return n}}},6420:function(t,e,n){"use strict";n("c736")},6552:function(t,e,n){var r=n("51db"),o=n("0f8f"),i=n("cc7f");function a(t,e){return null==t?t:r(t,o(e),i)}t.exports=a},"659f":function(t,e,n){var r=n("2419"),o=n("9b25"),i=n("4b48"),a=1,s=2;function l(t,e,n,l,c,u){var d=n&a,p=t.length,f=e.length;if(p!=f&&!(d&&f>p))return!1;var h=u.get(t),v=u.get(e);if(h&&v)return h==e&&v==t;var b=-1,g=!0,m=n&s?new r:void 0;u.set(t,e),u.set(e,t);while(++bi[data-v-940c6fb8]{font-size:20px;height:20px;margin-right:5px;width:20px}.search-box[data-v-940c6fb8]{height:40px;margin-left:10px;min-width:180px}",""]),t.exports=e},"66fa":function(t){t.exports=JSON.parse('{"hasStylesheet":"false"}')},"66fb":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r={enabled:!1,enabledInterval:!0,interval:300,enabledOnNavigate:!0,ageThreshold:120,countThreshold:500}},"683a":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".manual-refresh i[data-v-5ad06a13]{margin:0 0 0 8px!important;font-size:1rem!important}",""]),t.exports=e},6944:function(t,e){function n(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}t.exports=n},6984:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"6a68":function(t,e,n){var r=n("c02d"),o=n("a4fc");function i(t,e,n){(void 0!==n&&!o(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}t.exports=i},"6bcf":function(t,e,n){var r=n("0e19"),o=n("b4b4"),i="[object Symbol]";function a(t){return"symbol"==typeof t||o(t)&&r(t)==i}t.exports=a},"6d0c":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".delete-warning[data-v-3a26ac99]{color:var(--error)}.remove-project-dialog[data-v-3a26ac99]{border:1px solid var(--border);padding:10px;border-radius:5px}.remove-project-dialog .display-name[data-v-3a26ac99]{font-weight:700}",""]),t.exports=e},"6d56":function(t,e,n){var r=n("4b2c"),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;function a(t){return i?Object(i.call(t)):{}}t.exports=a},"6efc":function(t,e,n){var r=n("ff7d"),o=n("b4b4"),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},"6f75":function(t,e,n){var r=n("45fa");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("c06bfc06",r,!0,{sourceMap:!1,shadowMode:!1})},7049:function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},7195:function(t,e,n){var r=n("2e63"),o=n("bc61"),i=n("cca9"),a=n("4b7a"),s=n("ff00"),l=n("c316"),c=n("dda8"),u=n("daaf"),d=n("b506"),p=n("41dd");function f(t,e,n){var f=l(t),h=f||c(t)||p(t);if(e=a(e,4),null==n){var v=t&&t.constructor;n=h?f?new v:[]:d(t)&&u(v)?o(s(t)):{}}return(h?r:i)(t,(function(t,r,o){return e(n,t,r,o)})),n}t.exports=f},"71bd":function(t,e,n){var r=n("6a68"),o=n("1ab6"),i=n("e91b"),a=n("413d"),s=n("b03d"),l=n("6efc"),c=n("c316"),u=n("35d9"),d=n("dda8"),p=n("daaf"),f=n("b506"),h=n("2a46"),v=n("41dd"),b=n("2cbd"),g=n("e127");function m(t,e,n,m,y,w,_){var x=b(t,n),O=b(e,n),k=_.get(O);if(k)r(t,n,k);else{var A=w?w(x,O,n+"",t,e,_):void 0,E=void 0===A;if(E){var S=c(O),C=!S&&d(O),T=!S&&!C&&v(O);A=O,S||C||T?c(x)?A=x:u(x)?A=a(x):C?(E=!1,A=o(O,!0)):T?(E=!1,A=i(O,!0)):A=[]:h(O)||l(O)?(A=x,l(x)?A=g(x):f(x)&&!p(x)||(A=s(O))):E=!1}E&&(_.set(O,A),y(A,O,m,w,_),_["delete"](O)),r(t,n,A)}}t.exports=m},"71d2":function(t,e,n){var r=n("6290"),o=1/0;function i(t){var e=null==t?0:t.length;return e?r(t,o):[]}t.exports=i},"735f":function(t,e){var n=Function.prototype,r=n.toString;function o(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}t.exports=o},"736a":function(t,e,n){var r=n("927d"),o=1,i=4;function a(t){return r(t,o|i)}t.exports=a},"73b4":function(t,e,n){var r=n("0ee5"),o=n("cfd2"),i=n("9f54");function a(t,e,n){return e===e?i(t,e,n):r(t,o,n)}t.exports=a},"73bd":function(t,e,n){var r=n("c02d"),o=n("a4fc"),i=Object.prototype,a=i.hasOwnProperty;function s(t,e,n){var i=t[e];a.call(t,e)&&o(i,n)&&(void 0!==n||e in t)||r(t,e,n)}t.exports=s},7576:function(t,e,n){var r=n("30c0");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("2d7e8ca0",r,!0,{sourceMap:!1,shadowMode:!1})},"770e":function(t,e,n){var r=n("25c2");function o(t){return null==t?"":r(t)}t.exports=o},7745:function(t,e,n){var r=n("24da");function o(t){var e=r(this,t)["delete"](t);return this.size-=e?1:0,e}t.exports=o},7838:function(t,n){t.exports=e},"78bc":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[[t._v(" "+t._s(t.t("promptRemove.attemptingToRemove",{type:t.type}))+" "),e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.resourceNames(t.names,t.plusMore,t.t),expression:"resourceNames(names, plusMore, t)"}]})],t.info?e("div",{staticClass:"text info mb-10 mt-20"},[e("span",{directives:[{name:"clean-html",rawName:"v-clean-html",value:t.info,expression:"info"}]})]):t._e(),t.warning?e("div",{staticClass:"text-warning mb-10 mt-20"},[t._v(" "+t._s(t.warning)+" ")]):t._e()],2)},o=[],i=n("060c"),a={name:"GlobalRolePromptRemove",mixins:[i["default"]],props:{value:{type:Array,default:()=>[]},type:{type:String,required:!0}}},s=a,l=(n("f967"),n("d802")),c=Object(l["a"])(s,r,o,!1,null,"effd72b0",null);e["default"]=c.exports},"78dd":function(t,e){function n(t){return function(){return t}}t.exports=n},"799b":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".app-launcher-card[data-v-6e6b3554] .card-body{overflow:hidden!important}.icon-button[data-v-6e6b3554]{cursor:pointer}.icon-button[data-v-6e6b3554],.icon-only[data-v-6e6b3554]{background:none;border:none;padding:0;color:var(--primary);font-size:1.8rem;margin-right:1rem}.icon-only[data-v-6e6b3554]{margin-top:.5rem}",""]),t.exports=e},"79ab":function(t,e,n){var r=n("24da");function o(t){return r(this,t).get(t)}t.exports=o},"7a93":function(t,e,n){"use strict";n("6f75")},"7bad":function(t,e,n){var r=n("24da");function o(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}t.exports=o},"7bdd":function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n("7d15"))},"7d15":function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},"7ecd":function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,'.filter-select .vs__selected-options .vs__selected{text-align:left}.sortable-table{border-collapse:collapse;min-width:400px;border-radius:5px 5px 0 0;outline:1px solid var(--border);overflow:hidden;background:var(--sortable-table-bg);border-radius:4px}.sortable-table.overflow-x{overflow-x:visible}.sortable-table.overflow-y{overflow-y:visible}.sortable-table td{padding:8px 5px;border:0}.sortable-table td:first-child{padding-left:10px}.sortable-table td:last-child{padding-right:10px}.sortable-table td.row-check{padding-top:12px}.sortable-table tbody tr{border-bottom:1px solid var(--sortable-table-top-divider);background-color:var(--sortable-table-row-bg)}.sortable-table tbody tr.main-row.has-sub-row{border-bottom:0}.sortable-table tbody tr.main-row:not(.row-selected):hover+.sub-row{background-color:var(--sortable-table-hover-bg)}.sortable-table tbody tr:last-of-type{border-bottom:0}.sortable-table tbody tr.sub-row-hovered,.sortable-table tbody tr:hover{background-color:var(--sortable-table-hover-bg)}.sortable-table tbody tr.state-description>td{font-size:13px;padding-top:0;overflow-wrap:anywhere}.sortable-table tbody tr.active-row{color:var(--sortable-table-header-bg)}.sortable-table tbody tr.row-selected{background:var(--sortable-table-selected-bg)}.sortable-table tbody .no-rows td{padding:30px 0;text-align:center}.sortable-table tbody .no-results:hover,.sortable-table tbody .no-rows:hover{background-color:var(--body-bg)}.sortable-table tbody.group:before{content:"";display:block;height:20px;background-color:transparent}.sortable-table tbody tr.group-row{background-color:initial}.sortable-table tbody tr.group-row:first-child{border-bottom:2px solid var(--sortable-table-row-bg)}.sortable-table tbody tr.group-row:not(:first-child){margin-top:20px}.sortable-table tbody tr.group-row td{padding:0}.sortable-table tbody tr.group-row td:first-of-type{border-left:1px solid var(--sortable-table-accent-bg)}.sortable-table tbody tr.group-row .group-tab{height:40px;line-height:40px;padding:0 10px;border-radius:4px 4px 0 0;background-color:var(--sortable-table-row-bg);position:relative;top:1px;display:inline-block;z-index:10;min-width:72px}.sortable-table tbody tr.group-row .group-tab:after,.sortable-table tbody tr.group-row .group-tab:before{content:" ";display:table}.sortable-table tbody tr.group-row .group-tab:after{clear:both}.sortable-table tbody tr.group-row .group-tab>SPAN{color:var(--sortable-table-group-label)}.sortable-table tbody tr.group-row .group-tab:after{height:40px;width:70px;border-radius:5px 5px 0 0;background-color:var(--sortable-table-row-bg);content:"";position:absolute;right:-15px;top:0;transform:skewX(40deg);z-index:-1}.for-inputs TABLE.sortable-table{width:100%;border-collapse:collapse;margin-bottom:10px}.for-inputs TABLE.sortable-table>TBODY>TR>TD,.for-inputs TABLE.sortable-table>THEAD>TR>TH{padding-right:10px;padding-bottom:10px}.for-inputs TABLE.sortable-table>TBODY>TR>TD:last-of-type,.for-inputs TABLE.sortable-table>THEAD>TR>TH:last-of-type{padding-right:0}.for-inputs TABLE.sortable-table>TBODY>TR:first-of-type>TD{padding-top:10px}.for-inputs TABLE.sortable-table>TBODY>TR:last-of-type>TD{padding-bottom:0}.for-inputs.clone TABLE.sortable-table>THEAD>TR>TH,.for-inputs.create TABLE.sortable-table>THEAD>TR>TH,.for-inputs.edit TABLE.sortable-table>THEAD>TR>TH{border-color:transparent}.sortable-table-header{position:relative;z-index:11}.sortable-table-header.titled{display:flex;align-items:center}.fixed-header-actions.button{grid-template-columns:[bulk] auto [middle] min-content [search] minmax(min-content,350px)}.fixed-header-actions{padding:0 0 20px 0;width:100%;z-index:11;background:transparent;display:grid;grid-template-columns:[bulk] auto [middle] min-content [search] minmax(min-content,200px);grid-column-gap:10px}.fixed-header-actions.advanced-filtering{grid-template-columns:[bulk] auto [middle] minmax(min-content,auto) [search] minmax(min-content,auto)}.fixed-header-actions .bulk{grid-area:bulk}.fixed-header-actions .bulk>BUTTON{display:none}.fixed-header-actions .bulk>BUTTON:not(:last-of-type){margin-right:10px}.fixed-header-actions .bulk .action-availability{display:none;margin-left:10px;vertical-align:middle;margin-top:2px}.fixed-header-actions .bulk .dropdown-button li.disabled{color:var(--disabled-text);cursor:not-allowed}.fixed-header-actions .bulk .dropdown-button li.disabled:hover{color:var(--disabled-text);background-color:unset;cursor:not-allowed}.fixed-header-actions .bulk .bulk-action .icon{vertical-align:-10%}.fixed-header-actions .middle{grid-area:middle;white-space:nowrap}.fixed-header-actions .middle .icon.icon-backup.animate{animation-name:spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fixed-header-actions .search{grid-area:search;text-align:right;justify-content:flex-end}.fixed-header-actions .bulk-actions-dropdown{display:none}.fixed-header-actions .bulk-actions-dropdown .dropdown-button{background-color:var(--primary)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button:hover{background-color:var(--primary-hover-bg);color:var(--primary-hover-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button .icon-chevron-down,.fixed-header-actions .bulk-actions-dropdown .dropdown-button>*{color:var(--primary-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button .button-divider{border-color:var(--primary-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled{border-color:var(--disabled-bg)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled .icon-chevron-down{color:var(--disabled-text)!important}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled .button-divider{border-color:var(--disabled-text)}.paging{margin-top:10px;text-align:center}.paging SPAN{display:inline-block;min-width:200px}',""]),t.exports=e},"7f57":function(t){t.exports=JSON.parse('{"hasStylesheet":"true"}')},"7fd6":function(t,e,n){var r=n("1fce"),o=n("4b7a"),i=n("3b54"),a=n("cc5e");function s(t,e){if(null==t)return{};var n=r(a(t),(function(t){return[t]}));return e=o(e),i(t,n,(function(t,n){return e(t,n[0])}))}t.exports=s},8001:function(t,e,n){var r=n("5fe6"),o=n("6290"),i=n("b3e4");function a(t,e,n){var a=t.length;if(a<2)return a?i(t[0]):[];var s=-1,l=Array(a);while(++s[]},type:{type:String,required:!0}}},s=a,l=(n("b349"),n("d802")),c=Object(l["a"])(s,r,o,!1,null,"5050d908",null);e["default"]=c.exports},"872c":function(t,e,n){var r=n("9b9a"),o=n("7745"),i=n("79ab"),a=n("f522"),s=n("7bad");function l(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}t.exports=i},"907a":function(t,e){var n=Object.prototype,r=n.toString;function o(t){return r.call(t)}t.exports=o},"907c":function(t,e,n){"use strict";n.d(e,"A",(function(){return r})),n.d(e,"p",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"i",(function(){return u})),n.d(e,"j",(function(){return d})),n.d(e,"m",(function(){return p})),n.d(e,"o",(function(){return f})),n.d(e,"n",(function(){return h})),n.d(e,"q",(function(){return v})),n.d(e,"r",(function(){return b})),n.d(e,"s",(function(){return g})),n.d(e,"t",(function(){return m})),n.d(e,"v",(function(){return y})),n.d(e,"w",(function(){return w})),n.d(e,"y",(function(){return _})),n.d(e,"x",(function(){return x})),n.d(e,"B",(function(){return O})),n.d(e,"u",(function(){return k})),n.d(e,"D",(function(){return A})),n.d(e,"E",(function(){return E})),n.d(e,"a",(function(){return I})),n.d(e,"l",(function(){return L})),n.d(e,"z",(function(){return N})),n.d(e,"k",(function(){return j})),n.d(e,"g",(function(){return D})),n.d(e,"C",(function(){return P})),n.d(e,"d",(function(){return $}));const r={PREFERENCE:"userpreference"},o={APP:"app",AUTH_CONFIG:"authconfig",ETCD_BACKUP:"etcdbackup",CLUSTER:"cluster",CLUSTER_TOKEN:"clusterregistrationtoken",CLUSTER_ROLE_TEMPLATE_BINDING:"clusterRoleTemplateBinding",CLOUD_CREDENTIAL:"cloudcredential",FLEET_WORKSPACES:"fleetworkspace",GLOBAL_ROLE:"globalRole",GLOBAL_ROLE_BINDING:"globalRoleBinding",NODE_POOL:"nodePool",NODE:"node",PRINCIPAL:"principal",PROJECT:"project",PROJECT_ROLE_TEMPLATE_BINDING:"projectroletemplatebinding",SPOOFED:{GROUP_PRINCIPAL:"group.principal"},ROLE_TEMPLATE:"roleTemplate",TOKEN:"token",USER:"user"},i="configmap",a="count",s="event",l="endpoints",c="autoscaling.horizontalpodautoscaler",u="networking.k8s.io.ingress",d="limitrange",p="namespace",f="node",h="networking.k8s.io.networkpolicy",v="pod",b="policy.poddisruptionbudget",g="persistentvolume",m="persistentvolumeclaim",y="resourcequota",w="schema",_="service",x="secret",O="storage.k8s.io.storageclass",k={ROLE:"rbac.authorization.k8s.io.role",CLUSTER_ROLE:"rbac.authorization.k8s.io.clusterrole",ROLE_BINDING:"rbac.authorization.k8s.io.rolebinding",CLUSTER_ROLE_BINDING:"rbac.authorization.k8s.io.clusterrolebinding"},A="workload",E={DEPLOYMENT:"apps.deployment",CRON_JOB:"batch.cronjob",DAEMON_SET:"apps.daemonset",JOB:"batch.job",STATEFUL_SET:"apps.statefulset",REPLICA_SET:"apps.replicaset",REPLICATION_CONTROLLER:"replicationcontroller"},{DAEMON_SET:S,CRON_JOB:C,JOB:T,...R}=E,I={CLUSTER_REPO:"catalog.cattle.io.clusterrepo",OPERATION:"catalog.cattle.io.operation",APP:"catalog.cattle.io.app",REPO:"catalog.cattle.io.repo"},L={ALERTMANAGER:"monitoring.coreos.com.alertmanager",ALERTMANAGERCONFIG:"monitoring.coreos.com.alertmanagerconfig",PODMONITOR:"monitoring.coreos.com.podmonitor",PROMETHEUS:"monitoring.coreos.com.prometheus",PROMETHEUSRULE:"monitoring.coreos.com.prometheusrule",SERVICEMONITOR:"monitoring.coreos.com.servicemonitor",THANOSRULER:"monitoring.coreos.com.thanosruler",SPOOFED:{RECEIVER:"monitoring.coreos.com.receiver",RECEIVER_SPEC:"monitoring.coreos.com.receiver.spec",RECEIVER_EMAIL:"monitoring.coreos.com.receiver.email",RECEIVER_SLACK:"monitoring.coreos.com.receiver.slack",RECEIVER_WEBHOOK:"monitoring.coreos.com.receiver.webhook",RECEIVER_PAGERDUTY:"monitoring.coreos.com.receiver.pagerduty",RECEIVER_OPSGENIE:"monitoring.coreos.com.receiver.opsgenie",RECEIVER_HTTP_CONFIG:"monitoring.coreos.com.receiver.httpconfig",RESPONDER:"monitoring.coreos.com.receiver.responder",ROUTE:"monitoring.coreos.com.route",ROUTE_SPEC:"monitoring.coreos.com.route.spec",ALERTMANAGERCONFIG_RECEIVER_SPEC:"monitoring.coreos.com.v1alpha1.alertmanagerconfig.spec.receivers",ALERTMANAGERCONFIG_ROUTE_SPEC:"monitoring.coreos.com.v1alpha1.alertmanagerconfig.spec.route"}},N="rke.cattle.io.etcdsnapshot",j={AUTH_CONFIG:"management.cattle.io.authconfig",CATALOG_TEMPLATE:"management.cattle.io.catalogtemplate",CLUSTER:"management.cattle.io.cluster",CLUSTER_ROLE_TEMPLATE_BINDING:"management.cattle.io.clusterroletemplatebinding",FEATURE:"management.cattle.io.feature",KONTAINER_DRIVER:"management.cattle.io.kontainerdriver",MULTI_CLUSTER_APP:"management.cattle.io.multiclusterapp",NODE:"management.cattle.io.node",NODE_DRIVER:"management.cattle.io.nodedriver",NODE_POOL:"management.cattle.io.nodepool",NODE_TEMPLATE:"management.cattle.io.nodetemplate",PROJECT:"management.cattle.io.project",PROJECT_ROLE_TEMPLATE_BINDING:"management.cattle.io.projectroletemplatebinding",ROLE_TEMPLATE:"management.cattle.io.roletemplate",SETTING:"management.cattle.io.setting",USER:"management.cattle.io.user",TOKEN:"management.cattle.io.token",GLOBAL_ROLE:"management.cattle.io.globalrole",GLOBAL_ROLE_BINDING:"management.cattle.io.globalrolebinding",PSA:"management.cattle.io.podsecurityadmissionconfigurationtemplate",MANAGED_CHART:"management.cattle.io.managedchart",USER_NOTIFICATION:"management.cattle.io.rancherusernotification",GLOBAL_DNS_PROVIDER:"management.cattle.io.globaldnsprovider",RKE_TEMPLATE:"management.cattle.io.clustertemplate",RKE_TEMPLATE_REVISION:"management.cattle.io.clustertemplaterevision"},D={BUNDLE:"fleet.cattle.io.bundle",BUNDLE_DEPLOYMENT:"fleet.cattle.io.bundledeployment",CLUSTER:"fleet.cattle.io.cluster",CLUSTER_GROUP:"fleet.cattle.io.clustergroup",DASHBOARD:"fleet.cattle.io.dashboard",GIT_REPO:"fleet.cattle.io.gitrepo",WORKSPACE:"management.cattle.io.fleetworkspace",TOKEN:"fleet.cattle.io.clusterregistrationtoken",BUNDLE_NAMESPACE_MAPPING:"fleet.cattle.io.bundlenamespacemapping",GIT_REPO_RESTRICTION:"fleet.cattle.io.gitreporestriction"},P={CLUSTER_MEMBERS:"cluster-members",PROJECT_NAMESPACES:"projects-namespaces",NAMESPACES:"namespaces"},$="fleet-default"},9224:function(t){t.exports=JSON.parse('{"name":"app-launcher","description":"App Launcher extension for Rancher","version":"0.1.32","private":false,"rancher":{"annotations":{"catalog.cattle.io/rancher-version":">= 2.8.0-0 < v2.9.0-0","catalog.cattle.io/kube-version":">= v1.16.0-0 < v1.30.0-0","catalog.cattle.io/display-name":"Krum Platform Tools: App Launcher","catalog.cattle.io/ui-version":">= 2.7.2 < v2.9.0-0"}},"author":"Krumware","icon":"https://raw.githubusercontent.com/krumIO/krum-rancher-extensions/main/pkg/app-launcher/icon.svg","scripts":{"dev":"./node_modules/.bin/nuxt dev","nuxt":"./node_modules/.bin/nuxt"},"engines":{"node":">=12"},"devDependencies":{"@vue/cli-plugin-babel":"5.0.8","@vue/cli-service":"5.0.8","@vue/cli-plugin-typescript":"5.0.8"},"browserslist":["> 1%","last 2 versions","not dead"]}')},9243:function(t,e,n){var r=n("405d"),o=n("a9e0"),i=n("212d"),a=n("3819"),s=n("e3e5"),l=n("0e19"),c=n("735f"),u="[object Map]",d="[object Object]",p="[object Promise]",f="[object Set]",h="[object WeakMap]",v="[object DataView]",b=c(r),g=c(o),m=c(i),y=c(a),w=c(s),_=l;(r&&_(new r(new ArrayBuffer(1)))!=v||o&&_(new o)!=u||i&&_(i.resolve())!=p||a&&_(new a)!=f||s&&_(new s)!=h)&&(_=function(t){var e=l(t),n=e==d?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case b:return v;case g:return u;case m:return p;case y:return f;case w:return h}return e}),t.exports=_},"927d":function(t,e,n){var r=n("1ec9"),o=n("2e63"),i=n("73bd"),a=n("b4f4"),s=n("42b6"),l=n("1ab6"),c=n("413d"),u=n("0233"),d=n("0634"),p=n("b650"),f=n("cc5e"),h=n("9243"),v=n("dd09"),b=n("ecda"),g=n("b03d"),m=n("c316"),y=n("dda8"),w=n("35bb"),_=n("b506"),x=n("fe22"),O=n("0652"),k=n("cc7f"),A=1,E=2,S=4,C="[object Arguments]",T="[object Array]",R="[object Boolean]",I="[object Date]",L="[object Error]",N="[object Function]",j="[object GeneratorFunction]",D="[object Map]",P="[object Number]",$="[object Object]",F="[object RegExp]",M="[object Set]",U="[object String]",B="[object Symbol]",G="[object WeakMap]",q="[object ArrayBuffer]",V="[object DataView]",z="[object Float32Array]",H="[object Float64Array]",W="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",J="[object Uint8ClampedArray]",Q="[object Uint16Array]",Z="[object Uint32Array]",tt={};function et(t,e,n,T,R,I){var L,D=e&A,P=e&E,F=e&S;if(n&&(L=R?n(t,T,R,I):n(t)),void 0!==L)return L;if(!_(t))return t;var M=m(t);if(M){if(L=v(t),!D)return c(t,L)}else{var U=h(t),B=U==N||U==j;if(y(t))return l(t,D);if(U==$||U==C||B&&!R){if(L=P||B?{}:g(t),!D)return P?d(t,s(L,t)):u(t,a(L,t))}else{if(!tt[U])return R?t:{};L=b(t,U,D)}}I||(I=new r);var G=I.get(t);if(G)return G;I.set(t,L),x(t)?t.forEach((function(r){L.add(et(r,e,n,r,t,I))})):w(t)&&t.forEach((function(r,o){L.set(o,et(r,e,n,o,t,I))}));var q=F?P?f:p:P?k:O,V=M?void 0:q(t);return o(V||t,(function(r,o){V&&(o=r,r=t[o]),i(L,o,et(r,e,n,o,t,I))})),L}tt[C]=tt[T]=tt[q]=tt[V]=tt[R]=tt[I]=tt[z]=tt[H]=tt[W]=tt[K]=tt[Y]=tt[D]=tt[P]=tt[$]=tt[F]=tt[M]=tt[U]=tt[B]=tt[X]=tt[J]=tt[Q]=tt[Z]=!0,tt[L]=tt[N]=tt[G]=!1,t.exports=et},"930a":function(t,e,n){var r=n("e902"),o=Array.prototype,i=o.splice;function a(t){var e=this.__data__,n=r(e,t);if(n<0)return!1;var o=e.length-1;return n==o?e.pop():i.call(e,n,1),--this.size,!0}t.exports=a},"94a3":function(t,e,n){var r=n("5fe6"),o=n("6290"),i=n("4774"),a=n("35d9"),s=i((function(t,e){return a(t)?r(t,o(e,1,a,!0)):[]}));t.exports=s},"94dd":function(t,e,n){var r=n("1001");function o(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}t.exports=o},"969a":function(t,e,n){var r=n("1ff2");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("b363079e",r,!0,{sourceMap:!1,shadowMode:!1})},"986c":function(t,e,n){var r=n("201b"),o=r.Uint8Array;t.exports=o},"98d3":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return p}));const r="undefined"===typeof window?"server":window.navigator.platform.toLowerCase(),o="undefined"===typeof window?"server":window.navigator.userAgent,i=(r.includes("linux")||r.includes("unix"),r.includes("mac")),a=(r.includes("win"),i?"metaKey":"ctrlKey"),s=a,l="shiftKey";function c(t){return!!t[a]}function u(t){return!!t[s]}function d(t){return!!t[l]}function p(t){return t.ctrlKey&&2===t.button}o.includes("Gecko/");const f=o.includes("Chrome/");!f&&o.includes("AppleWebKit/"),!f&&o.includes("Safari/"),/Android|webOS|iPhone|iPad|iPod|IEMobile/i.test(o)},"994b":function(t,e,n){var r=n("e697"),o="__lodash_hash_undefined__";function i(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?o:e,this}t.exports=i},"9b25":function(t,e){function n(t,e){var n=-1,r=null==t?0:t.length;while(++n=2)t.mixin({beforeCreate:r});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[r].concat(t.init):r,n.call(this,t)}}function r(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,"a",(function(){return L})),n.d(e,"b",(function(){return I}));var o="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},i=o.__VUE_DEVTOOLS_GLOBAL_HOOK__;function a(t){i&&(t._devtoolHook=i,i.emit("vuex:init",t),i.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){i.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){i.emit("vuex:action",t,e)}),{prepend:!0}))}function s(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function l(t){return null!==t&&"object"===typeof t}function c(t){return t&&"function"===typeof t.then}function u(t,e){return function(){return t(e)}}var d=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},d.prototype.addChild=function(t,e){this._children[t]=e},d.prototype.removeChild=function(t){delete this._children[t]},d.prototype.getChild=function(t){return this._children[t]},d.prototype.hasChild=function(t){return t in this._children},d.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},d.prototype.forEachChild=function(t){s(this._children,t)},d.prototype.forEachGetter=function(t){this._rawModule.getters&&s(this._rawModule.getters,t)},d.prototype.forEachAction=function(t){this._rawModule.actions&&s(this._rawModule.actions,t)},d.prototype.forEachMutation=function(t){this._rawModule.mutations&&s(this._rawModule.mutations,t)},Object.defineProperties(d.prototype,p);var f=function(t){this.register([],t,!1)};function h(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return void 0;h(t.concat(r),e.getChild(r),n.modules[r])}}f.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},f.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},f.prototype.update=function(t){h([],this.root,t)},f.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new d(e,n);if(0===t.length)this.root=o;else{var i=this.get(t.slice(0,-1));i.addChild(t[t.length-1],o)}e.modules&&s(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},f.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},f.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var v;var b=function(t){var e=this;void 0===t&&(t={}),!v&&"undefined"!==typeof window&&window.Vue&&R(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new v,this._makeLocalGettersCache=Object.create(null);var o=this,i=this,s=i.dispatch,l=i.commit;this.dispatch=function(t,e){return s.call(o,t,e)},this.commit=function(t,e,n){return l.call(o,t,e,n)},this.strict=r;var c=this._modules.root.state;_(this,c,[],this._modules.root),w(this,c),n.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:v.config.devtools;u&&a(this)},g={state:{configurable:!0}};function m(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function y(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;_(t,n,[],t._modules.root,!0),w(t,n,e)}function w(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};s(o,(function(e,n){i[n]=u(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var a=v.config.silent;v.config.silent=!0,t._vm=new v({data:{$$state:e},computed:i}),v.config.silent=a,t.strict&&S(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),v.nextTick((function(){return r.$destroy()})))}function _(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!i&&!o){var s=C(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit((function(){v.set(s,l,r.state)}))}var c=r.context=x(t,a,n);r.forEachMutation((function(e,n){var r=a+n;k(t,r,e,c)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,o=e.handler||e;A(t,r,o,c)})),r.forEachGetter((function(e,n){var r=a+n;E(t,r,e,c)})),r.forEachChild((function(r,i){_(t,e,n.concat(i),r,o)}))}function x(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=T(n,r,o),a=i.payload,s=i.options,l=i.type;return s&&s.root||(l=e+l),t.dispatch(l,a)},commit:r?t.commit:function(n,r,o){var i=T(n,r,o),a=i.payload,s=i.options,l=i.type;s&&s.root||(l=e+l),t.commit(l,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return O(t,e)}},state:{get:function(){return C(t.state,n)}}}),o}function O(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function k(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push((function(e){n.call(t,r.state,e)}))}function A(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push((function(e){var o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return c(o)||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}function E(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function S(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function C(t,e){return e.reduce((function(t,e){return t[e]}),t)}function T(t,e,n){return l(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function R(t){v&&t===v||(v=t,r(v))}g.state.get=function(){return this._vm._data.$$state},g.state.set=function(t){0},b.prototype.commit=function(t,e,n){var r=this,o=T(t,e,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),l=this._mutations[i];l&&(this._withCommit((function(){l.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,r.state)})))},b.prototype.dispatch=function(t,e){var n=this,r=T(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(c){0}var l=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){l.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(c){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(c){0}e(t)}))}))}},b.prototype.subscribe=function(t,e){return m(t,this._subscribers,e)},b.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return m(n,this._actionSubscribers,e)},b.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},b.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},b.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),_(this,this.state,t,this._modules.get(t),n.preserveState),w(this,this.state)},b.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=C(e.state,t.slice(0,-1));v.delete(n,t[t.length-1])})),y(this)},b.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},b.prototype.hotUpdate=function(t){this._modules.update(t),y(this,!0)},b.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(b.prototype,g);var I=D((function(t,e){var n={};return N(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=P(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),L=(D((function(t,e){var n={};return N(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=P(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),D((function(t,e){var n={};return N(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||P(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})));D((function(t,e){var n={};return N(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=P(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n}));function N(t){return j(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function j(t){return Array.isArray(t)||l(t)}function D(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function P(t,e,n){var r=t._modulesNamespaceMap[n];return r}}).call(this,n("7d15"))},"9d1b":function(t,e,n){"use strict";n("1a22")},"9d57":function(t,e,n){var r=n("2db8");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("1ae5fe58",r,!0,{sourceMap:!1,shadowMode:!1})},"9dfc":function(t,e,n){var r=n("5b4b"),o=n("4774"),i=n("8001"),a=n("35d9"),s=o((function(t){return i(r(t,a))}));t.exports=s},"9e35":function(t,e,n){"use strict";n("b120")},"9e74":function(t,e,n){var r=n("3584");function o(t,e){return r(t,e)}t.exports=o},"9e79":function(t,e){function n(){}t.exports=n},"9ec3":function(t,e,n){(function(t,r){var o; +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(){var i,a="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",p=500,f="__lodash_placeholder__",h=1,v=2,b=4,g=1,m=2,y=1,w=2,_=4,x=8,O=16,k=32,A=64,E=128,S=256,C=512,T=30,R="...",I=800,L=16,N=1,j=2,D=3,P=1/0,$=9007199254740991,F=17976931348623157e292,M=NaN,U=4294967295,B=U-1,G=U>>>1,q=[["ary",E],["bind",y],["bindKey",w],["curry",x],["curryRight",O],["flip",C],["partial",k],["partialRight",A],["rearg",S]],V="[object Arguments]",z="[object Array]",H="[object AsyncFunction]",W="[object Boolean]",K="[object Date]",Y="[object DOMException]",X="[object Error]",J="[object Function]",Q="[object GeneratorFunction]",Z="[object Map]",tt="[object Number]",et="[object Null]",nt="[object Object]",rt="[object Promise]",ot="[object Proxy]",it="[object RegExp]",at="[object Set]",st="[object String]",lt="[object Symbol]",ct="[object Undefined]",ut="[object WeakMap]",dt="[object WeakSet]",pt="[object ArrayBuffer]",ft="[object DataView]",ht="[object Float32Array]",vt="[object Float64Array]",bt="[object Int8Array]",gt="[object Int16Array]",mt="[object Int32Array]",yt="[object Uint8Array]",wt="[object Uint8ClampedArray]",_t="[object Uint16Array]",xt="[object Uint32Array]",Ot=/\b__p \+= '';/g,kt=/\b(__p \+=) '' \+/g,At=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,St=/[&<>"']/g,Ct=RegExp(Et.source),Tt=RegExp(St.source),Rt=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,Lt=/<%=([\s\S]+?)%>/g,Nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jt=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/[\\^$.*+?()[\]{}|]/g,$t=RegExp(Pt.source),Ft=/^\s+/,Mt=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Gt=/,? & /,qt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Vt=/[()=,{}\[\]\/\s]/,zt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Yt=/^0b[01]+$/i,Xt=/^\[object .+?Constructor\]$/,Jt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,te=/($^)/,ee=/['\n\r\u2028\u2029\\]/g,ne="\\ud800-\\udfff",re="\\u0300-\\u036f",oe="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",ae=re+oe+ie,se="\\u2700-\\u27bf",le="a-z\\xdf-\\xf6\\xf8-\\xff",ce="\\xac\\xb1\\xd7\\xf7",ue="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",de="\\u2000-\\u206f",pe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\ufe0e\\ufe0f",ve=ce+ue+de+pe,be="['’]",ge="["+ne+"]",me="["+ve+"]",ye="["+ae+"]",we="\\d+",_e="["+se+"]",xe="["+le+"]",Oe="[^"+ne+ve+we+se+le+fe+"]",ke="\\ud83c[\\udffb-\\udfff]",Ae="(?:"+ye+"|"+ke+")",Ee="[^"+ne+"]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",Ce="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="["+fe+"]",Re="\\u200d",Ie="(?:"+xe+"|"+Oe+")",Le="(?:"+Te+"|"+Oe+")",Ne="(?:"+be+"(?:d|ll|m|re|s|t|ve))?",je="(?:"+be+"(?:D|LL|M|RE|S|T|VE))?",De=Ae+"?",Pe="["+he+"]?",$e="(?:"+Re+"(?:"+[Ee,Se,Ce].join("|")+")"+Pe+De+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ue=Pe+De+$e,Be="(?:"+[_e,Se,Ce].join("|")+")"+Ue,Ge="(?:"+[Ee+ye+"?",ye,Se,Ce,ge].join("|")+")",qe=RegExp(be,"g"),Ve=RegExp(ye,"g"),ze=RegExp(ke+"(?="+ke+")|"+Ge+Ue,"g"),He=RegExp([Te+"?"+xe+"+"+Ne+"(?="+[me,Te,"$"].join("|")+")",Le+"+"+je+"(?="+[me,Te+Ie,"$"].join("|")+")",Te+"?"+Ie+"+"+Ne,Te+"+"+je,Me,Fe,we,Be].join("|"),"g"),We=RegExp("["+Re+ne+ae+he+"]"),Ke=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xe=-1,Je={};Je[ht]=Je[vt]=Je[bt]=Je[gt]=Je[mt]=Je[yt]=Je[wt]=Je[_t]=Je[xt]=!0,Je[V]=Je[z]=Je[pt]=Je[W]=Je[ft]=Je[K]=Je[X]=Je[J]=Je[Z]=Je[tt]=Je[nt]=Je[it]=Je[at]=Je[st]=Je[ut]=!1;var Qe={};Qe[V]=Qe[z]=Qe[pt]=Qe[ft]=Qe[W]=Qe[K]=Qe[ht]=Qe[vt]=Qe[bt]=Qe[gt]=Qe[mt]=Qe[Z]=Qe[tt]=Qe[nt]=Qe[it]=Qe[at]=Qe[st]=Qe[lt]=Qe[yt]=Qe[wt]=Qe[_t]=Qe[xt]=!0,Qe[X]=Qe[J]=Qe[ut]=!1;var Ze={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},tn={"&":"&","<":"<",">":">",'"':""","'":"'"},en={"&":"&","<":"<",">":">",""":'"',"'":"'"},nn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rn=parseFloat,on=parseInt,an="object"==typeof t&&t&&t.Object===Object&&t,sn="object"==typeof self&&self&&self.Object===Object&&self,ln=an||sn||Function("return this")(),cn=e&&!e.nodeType&&e,un=cn&&"object"==typeof r&&r&&!r.nodeType&&r,dn=un&&un.exports===cn,pn=dn&&an.process,fn=function(){try{var t=un&&un.require&&un.require("util").types;return t||pn&&pn.binding&&pn.binding("util")}catch(e){}}(),hn=fn&&fn.isArrayBuffer,vn=fn&&fn.isDate,bn=fn&&fn.isMap,gn=fn&&fn.isRegExp,mn=fn&&fn.isSet,yn=fn&&fn.isTypedArray;function wn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function _n(t,e,n,r){var o=-1,i=null==t?0:t.length;while(++o-1}function Sn(t,e,n){var r=-1,o=null==t?0:t.length;while(++r-1);return n}function tr(t,e){var n=t.length;while(n--&&Fn(e,t[n],0)>-1);return n}function er(t,e){var n=t.length,r=0;while(n--)t[n]===e&&++r;return r}var nr=qn(Ze),rr=qn(tn);function or(t){return"\\"+nn[t]}function ir(t,e){return null==t?i:t[e]}function ar(t){return We.test(t)}function sr(t){return Ke.test(t)}function lr(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function cr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ur(t,e){return function(n){return t(e(n))}}function dr(t,e){var n=-1,r=t.length,o=0,i=[];while(++n-1}function Gr(t,e){var n=this.__data__,r=uo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function qr(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e=e?t:e)),t}function mo(t,e,n,r,o,a){var s,l=e&h,c=e&v,u=e&b;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!ku(t))return t;var d=lu(t);if(d){if(s=es(t),!l)return oa(t,s)}else{var p=Ja(t),f=p==J||p==Q;if(fu(t))return Ki(t,l);if(p==nt||p==V||f&&!o){if(s=c||f?{}:ns(t),!l)return c?sa(t,ho(s,t)):aa(t,fo(s,t))}else{if(!Qe[p])return o?t:{};s=rs(t,p,l)}}a||(a=new Qr);var g=a.get(t);if(g)return g;a.set(t,s),$u(t)?t.forEach((function(r){s.add(mo(r,e,n,r,t,a))})):Eu(t)&&t.forEach((function(r,o){s.set(o,mo(r,e,n,o,t,a))}));var m=u?c?Ua:Ma:c?Od:xd,y=d?i:m(t);return xn(y||t,(function(r,o){y&&(o=r,r=t[o]),co(s,o,mo(r,e,n,o,t,a))})),s}function yo(t){var e=xd(t);return function(n){return wo(n,t,e)}}function wo(t,e,n){var r=n.length;if(null==t)return!r;t=ne(t);while(r--){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function _o(t,e,n){if("function"!=typeof t)throw new ie(c);return As((function(){t.apply(i,n)}),e)}function xo(t,e,n,r){var o=-1,i=En,a=!0,l=t.length,c=[],u=e.length;if(!l)return c;n&&(e=Cn(e,Xn(n))),r?(i=Sn,a=!1):e.length>=s&&(i=Qn,a=!1,e=new Yr(e));t:while(++oo?0:o+n),r=r===i||r>o?o:Ku(r),r<0&&(r+=o),r=n>r?0:Yu(r);while(n0&&n(s)?e>1?To(s,e-1,n,r,o):Tn(o,s):r||(o[o.length]=s)}return o}var Ro=da(),Io=da(!0);function Lo(t,e){return t&&Ro(t,e,xd)}function No(t,e){return t&&Io(t,e,xd)}function jo(t,e){return An(e,(function(e){return _u(t[e])}))}function Do(t,e){e=Vi(e,t);var n=0,r=e.length;while(null!=t&&ne}function Mo(t,e){return null!=t&&de.call(t,e)}function Uo(t,e){return null!=t&&e in ne(t)}function Bo(t,e,n){return t>=Be(e,n)&&t=120&&p.length>=120)?new Yr(l&&p):i}p=t[0];var f=-1,h=c[0];t:while(++f-1)s!==t&&Ae.call(s,l,1),Ae.call(t,l,1)}return t}function gi(t,e){var n=t?e.length:0,r=n-1;while(n--){var o=e[n];if(n==r||o!==i){var i=o;as(o)?Ae.call(t,o,1):Pi(t,o)}}return t}function mi(t,e){return t+je(He()*(e-t+1))}function yi(t,e,r,o){var i=-1,a=Ue(Ne((e-t)/(r||1)),0),s=n(a);while(a--)s[o?a:++i]=t,t+=r;return s}function wi(t,e){var n="";if(!t||e<1||e>$)return n;do{e%2&&(n+=t),e=je(e/2),e&&(t+=t)}while(e);return n}function _i(t,e){return Es(ws(t,e,Rp),t+"")}function xi(t){return io(Bd(t))}function Oi(t,e){var n=Bd(t);return Ts(n,go(e,0,n.length))}function ki(t,e,n,r){if(!ku(t))return t;e=Vi(e,t);var o=-1,a=e.length,s=a-1,l=t;while(null!=l&&++oi?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;var a=n(i);while(++o>>1,a=t[i];null!==a&&!Mu(a)&&(n?a<=e:a=s){var u=e?null:Ta(t);if(u)return pr(u);a=!1,o=Qn,c=new Yr}else c=e?[]:l;t:while(++r=r?t:Ci(t,e,n)}var Wi=Re||function(t){return ln.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=_e?_e(n):new t.constructor(n);return t.copy(r),r}function Yi(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function Xi(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function Ji(t){var e=new t.constructor(t.source,Wt.exec(t));return e.lastIndex=t.lastIndex,e}function Qi(t){return hr?ne(hr.call(t)):{}}function Zi(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ta(t,e){if(t!==e){var n=t!==i,r=null===t,o=t===t,a=Mu(t),s=e!==i,l=null===e,c=e===e,u=Mu(e);if(!l&&!u&&!a&&t>e||a&&s&&c&&!l&&!u||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!u&&t=s)return l;var c=n[r];return l*("desc"==c?-1:1)}}return t.index-e.index}function na(t,e,r,o){var i=-1,a=t.length,s=r.length,l=-1,c=e.length,u=Ue(a-s,0),d=n(c+u),p=!o;while(++l1?n[o-1]:i,s=o>2?n[2]:i;a=t.length>3&&"function"==typeof a?(o--,a):i,s&&ss(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=ne(e);while(++r-1?o[a?e[s]:s]:i}}function ma(t){return Fa((function(e){var n=e.length,r=n,o=Er.prototype.thru;t&&e.reverse();while(r--){var a=e[r];if("function"!=typeof a)throw new ie(c);if(o&&!s&&"wrapper"==Ga(a))var s=new Er([],!0)}r=s?r:n;while(++r1&&y.reverse(),p&&ul))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=-1,f=!0,h=n&m?new Yr:i;a.set(t,e),a.set(e,t);while(++p1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ut,"{\n/* [wrapped with "+e+"] */\n")}function is(t){return lu(t)||su(t)||!!(Ee&&t&&t[Ee])}function as(t,e){var n=typeof t;return e=null==e?$:e,!!e&&("number"==n||"symbol"!=n&&Qt.test(t))&&t>-1&&t%1==0&&t0){if(++e>=I)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ts(t,e){var n=-1,r=t.length,o=r-1;e=e===i?r:e;while(++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,Pl(t,n)}));function zl(t){var e=_r(t);return e.__chain__=!0,e}function Hl(t,e){return e(t),t}function Wl(t,e){return e(t)}var Kl=Fa((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return bo(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Sr&&as(n)?(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Wl,args:[o],thisArg:i}),new Er(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));function Yl(){return zl(this)}function Xl(){return new Er(this.value(),this.__chain__)}function Jl(){this.__values__===i&&(this.__values__=Hu(this.value()));var t=this.__index__>=this.__values__.length,e=t?i:this.__values__[this.__index__++];return{done:t,value:e}}function Ql(){return this}function Zl(t){var e,n=this;while(n instanceof Ar){var r=js(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e}function tc(){var t=this.__wrapped__;if(t instanceof Sr){var e=t;return this.__actions__.length&&(e=new Sr(this)),e=e.reverse(),e.__actions__.push({func:Wl,args:[hl],thisArg:i}),new Er(e,this.__chain__)}return this.thru(hl)}function ec(){return Mi(this.__wrapped__,this.__actions__)}var nc=la((function(t,e,n){de.call(t,n)?++t[n]:vo(t,n,1)}));function rc(t,e,n){var r=lu(t)?kn:Ao;return n&&ss(t,e,n)&&(e=i),r(t,Va(e,3))}function oc(t,e){var n=lu(t)?An:Co;return n(t,Va(e,3))}var ic=ga(Hs),ac=ga(Ws);function sc(t,e){return To(bc(t,e),1)}function lc(t,e){return To(bc(t,e),P)}function cc(t,e,n){return n=n===i?1:Ku(n),To(bc(t,e),n)}function uc(t,e){var n=lu(t)?xn:Oo;return n(t,Va(e,3))}function dc(t,e){var n=lu(t)?On:ko;return n(t,Va(e,3))}var pc=la((function(t,e,n){de.call(t,n)?t[n].push(e):vo(t,n,[e])}));function fc(t,e,n,r){t=uu(t)?t:Bd(t),n=n&&!r?Ku(n):0;var o=t.length;return n<0&&(n=Ue(o+n,0)),Fu(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Fn(t,e,n)>-1}var hc=_i((function(t,e,r){var o=-1,i="function"==typeof e,a=uu(t)?n(t.length):[];return Oo(t,(function(t){a[++o]=i?wn(e,t,r):Vo(t,e,r)})),a})),vc=la((function(t,e,n){vo(t,n,e)}));function bc(t,e){var n=lu(t)?Cn:ai;return n(t,Va(e,3))}function gc(t,e,n,r){return null==t?[]:(lu(e)||(e=null==e?[]:[e]),n=r?i:n,lu(n)||(n=null==n?[]:[n]),pi(t,e,n))}var mc=la((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));function yc(t,e,n){var r=lu(t)?Rn:Vn,o=arguments.length<3;return r(t,Va(e,4),n,o,Oo)}function wc(t,e,n){var r=lu(t)?In:Vn,o=arguments.length<3;return r(t,Va(e,4),n,o,ko)}function _c(t,e){var n=lu(t)?An:Co;return n(t,Bc(Va(e,3)))}function xc(t){var e=lu(t)?io:xi;return e(t)}function Oc(t,e,n){e=(n?ss(t,e,n):e===i)?1:Ku(e);var r=lu(t)?ao:Oi;return r(t,e)}function kc(t){var e=lu(t)?so:Si;return e(t)}function Ac(t){if(null==t)return 0;if(uu(t))return Fu(t)?br(t):t.length;var e=Ja(t);return e==Z||e==at?t.size:ri(t).length}function Ec(t,e,n){var r=lu(t)?Ln:Ti;return n&&ss(t,e,n)&&(e=i),r(t,Va(e,3))}var Sc=_i((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ss(t,e[0],e[1])?e=[]:n>2&&ss(e[0],e[1],e[2])&&(e=[e[0]]),pi(t,To(e,1),[])})),Cc=Ie||function(){return ln.Date.now()};function Tc(t,e){if("function"!=typeof e)throw new ie(c);return t=Ku(t),function(){if(--t<1)return e.apply(this,arguments)}}function Rc(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Ia(t,E,i,i,i,i,e)}function Ic(t,e){var n;if("function"!=typeof e)throw new ie(c);return t=Ku(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Lc=_i((function(t,e,n){var r=y;if(n.length){var o=dr(n,qa(Lc));r|=k}return Ia(t,r,e,n,o)})),Nc=_i((function(t,e,n){var r=y|w;if(n.length){var o=dr(n,qa(Nc));r|=k}return Ia(e,r,t,n,o)}));function jc(t,e,n){e=n?i:e;var r=Ia(t,x,i,i,i,i,i,e);return r.placeholder=jc.placeholder,r}function Dc(t,e,n){e=n?i:e;var r=Ia(t,O,i,i,i,i,i,e);return r.placeholder=Dc.placeholder,r}function Pc(t,e,n){var r,o,a,s,l,u,d=0,p=!1,f=!1,h=!0;if("function"!=typeof t)throw new ie(c);function v(e){var n=r,a=o;return r=o=i,d=e,s=t.apply(a,n),s}function b(t){return d=t,l=As(y,e),p?v(t):s}function g(t){var n=t-u,r=t-d,o=e-n;return f?Be(o,a-r):o}function m(t){var n=t-u,r=t-d;return u===i||n>=e||n<0||f&&r>=a}function y(){var t=Cc();if(m(t))return w(t);l=As(y,g(t))}function w(t){return l=i,h&&r?v(t):(r=o=i,s)}function _(){l!==i&&Wi(l),d=0,r=u=o=l=i}function x(){return l===i?s:w(Cc())}function O(){var t=Cc(),n=m(t);if(r=arguments,o=this,u=t,n){if(l===i)return b(u);if(f)return Wi(l),l=As(y,e),v(u)}return l===i&&(l=As(y,e)),s}return e=Xu(e)||0,ku(n)&&(p=!!n.leading,f="maxWait"in n,a=f?Ue(Xu(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),O.cancel=_,O.flush=x,O}var $c=_i((function(t,e){return _o(t,1,e)})),Fc=_i((function(t,e,n){return _o(t,Xu(e)||0,n)}));function Mc(t){return Ia(t,C)}function Uc(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(c);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Uc.Cache||qr),n}function Bc(t){if("function"!=typeof t)throw new ie(c);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Gc(t){return Ic(2,t)}Uc.Cache=qr;var qc=zi((function(t,e){e=1==e.length&&lu(e[0])?Cn(e[0],Xn(Va())):Cn(To(e,1),Xn(Va()));var n=e.length;return _i((function(r){var o=-1,i=Be(r.length,n);while(++o=e})),su=zo(function(){return arguments}())?zo:function(t){return Au(t)&&de.call(t,"callee")&&!ke.call(t,"callee")},lu=n.isArray,cu=hn?Xn(hn):Ho;function uu(t){return null!=t&&Ou(t.length)&&!_u(t)}function du(t){return Au(t)&&uu(t)}function pu(t){return!0===t||!1===t||Au(t)&&$o(t)==W}var fu=Pe||Kp,hu=vn?Xn(vn):Wo;function vu(t){return Au(t)&&1===t.nodeType&&!ju(t)}function bu(t){if(null==t)return!0;if(uu(t)&&(lu(t)||"string"==typeof t||"function"==typeof t.splice||fu(t)||Uu(t)||su(t)))return!t.length;var e=Ja(t);if(e==Z||e==at)return!t.size;if(fs(t))return!ri(t).length;for(var n in t)if(de.call(t,n))return!1;return!0}function gu(t,e){return Ko(t,e)}function mu(t,e,n){n="function"==typeof n?n:i;var r=n?n(t,e):i;return r===i?Ko(t,e,i,n):!!r}function yu(t){if(!Au(t))return!1;var e=$o(t);return e==X||e==Y||"string"==typeof t.message&&"string"==typeof t.name&&!ju(t)}function wu(t){return"number"==typeof t&&$e(t)}function _u(t){if(!ku(t))return!1;var e=$o(t);return e==J||e==Q||e==H||e==ot}function xu(t){return"number"==typeof t&&t==Ku(t)}function Ou(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=$}function ku(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Au(t){return null!=t&&"object"==typeof t}var Eu=bn?Xn(bn):Xo;function Su(t,e){return t===e||Jo(t,e,Ha(e))}function Cu(t,e,n){return n="function"==typeof n?n:i,Jo(t,e,Ha(e),n)}function Tu(t){return Nu(t)&&t!=+t}function Ru(t){if(ps(t))throw new o(l);return Qo(t)}function Iu(t){return null===t}function Lu(t){return null==t}function Nu(t){return"number"==typeof t||Au(t)&&$o(t)==tt}function ju(t){if(!Au(t)||$o(t)!=nt)return!1;var e=xe(t);if(null===e)return!0;var n=de.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ue.call(n)==ve}var Du=gn?Xn(gn):Zo;function Pu(t){return xu(t)&&t>=-$&&t<=$}var $u=mn?Xn(mn):ti;function Fu(t){return"string"==typeof t||!lu(t)&&Au(t)&&$o(t)==st}function Mu(t){return"symbol"==typeof t||Au(t)&&$o(t)==lt}var Uu=yn?Xn(yn):ei;function Bu(t){return t===i}function Gu(t){return Au(t)&&Ja(t)==ut}function qu(t){return Au(t)&&$o(t)==dt}var Vu=Ea(ii),zu=Ea((function(t,e){return t<=e}));function Hu(t){if(!t)return[];if(uu(t))return Fu(t)?gr(t):oa(t);if(Se&&t[Se])return lr(t[Se]());var e=Ja(t),n=e==Z?cr:e==at?pr:Bd;return n(t)}function Wu(t){if(!t)return 0===t?t:0;if(t=Xu(t),t===P||t===-P){var e=t<0?-1:1;return e*F}return t===t?t:0}function Ku(t){var e=Wu(t),n=e%1;return e===e?n?e-n:e:0}function Yu(t){return t?go(Ku(t),0,U):0}function Xu(t){if("number"==typeof t)return t;if(Mu(t))return M;if(ku(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ku(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Yn(t);var n=Yt.test(t);return n||Jt.test(t)?on(t.slice(2),n?2:8):Kt.test(t)?M:+t}function Ju(t){return ia(t,Od(t))}function Qu(t){return t?go(Ku(t),-$,$):0===t?t:0}function Zu(t){return null==t?"":ji(t)}var td=ca((function(t,e){if(fs(e)||uu(e))ia(e,xd(e),t);else for(var n in e)de.call(e,n)&&co(t,n,e[n])})),ed=ca((function(t,e){ia(e,Od(e),t)})),nd=ca((function(t,e,n,r){ia(e,Od(e),t,r)})),rd=ca((function(t,e,n,r){ia(e,xd(e),t,r)})),od=Fa(bo);function id(t,e){var n=Or(t);return null==e?n:fo(n,e)}var ad=_i((function(t,e){t=ne(t);var n=-1,r=e.length,o=r>2?e[2]:i;o&&ss(e[0],e[1],o)&&(r=1);while(++n1),e})),ia(t,Ua(t),n),r&&(n=mo(n,h|v|b,ja));var o=e.length;while(o--)Pi(n,e[o]);return n}));function Td(t,e){return Id(t,Bc(Va(e)))}var Rd=Fa((function(t,e){return null==t?{}:fi(t,e)}));function Id(t,e){if(null==t)return{};var n=Cn(Ua(t),(function(t){return[t]}));return e=Va(e),hi(t,n,(function(t,n){return e(t,n[0])}))}function Ld(t,e,n){e=Vi(e,t);var r=-1,o=e.length;o||(o=1,t=i);while(++re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=He();return Be(t+o*(e-t+rn("1e-"+((o+"").length-1))),e)}return mi(t,e)}var Hd=ha((function(t,e,n){return e=e.toLowerCase(),t+(n?Wd(e):e)}));function Wd(t){return wp(Zu(t).toLowerCase())}function Kd(t){return t=Zu(t),t&&t.replace(Zt,nr).replace(Ve,"")}function Yd(t,e,n){t=Zu(t),e=ji(e);var r=t.length;n=n===i?r:go(Ku(n),0,r);var o=n;return n-=e.length,n>=0&&t.slice(n,o)==e}function Xd(t){return t=Zu(t),t&&Tt.test(t)?t.replace(St,rr):t}function Jd(t){return t=Zu(t),t&&$t.test(t)?t.replace(Pt,"\\$&"):t}var Qd=ha((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Zd=ha((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),tp=fa("toLowerCase");function ep(t,e,n){t=Zu(t),e=Ku(e);var r=e?br(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Oa(je(o),n)+t+Oa(Ne(o),n)}function np(t,e,n){t=Zu(t),e=Ku(e);var r=e?br(t):0;return e&&r>>0,n?(t=Zu(t),t&&("string"==typeof e||null!=e&&!Du(e))&&(e=ji(e),!e&&ar(t))?Hi(gr(t),0,n):t.split(e,n)):[]}var cp=ha((function(t,e,n){return t+(n?" ":"")+wp(e)}));function up(t,e,n){return t=Zu(t),n=null==n?0:go(Ku(n),0,t.length),e=ji(e),t.slice(n,n+e.length)==e}function dp(t,e,n){var r=_r.templateSettings;n&&ss(t,e,n)&&(e=i),t=Zu(t),e=nd({},e,r,La);var a,s,l=nd({},e.imports,r.imports,La),c=xd(l),d=Jn(l,c),p=0,f=e.interpolate||te,h="__p += '",v=re((e.escape||te).source+"|"+f.source+"|"+(f===Lt?Ht:te).source+"|"+(e.evaluate||te).source+"|$","g"),b="//# sourceURL="+(de.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xe+"]")+"\n";t.replace(v,(function(e,n,r,o,i,l){return r||(r=o),h+=t.slice(p,l).replace(ee,or),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),i&&(s=!0,h+="';\n"+i+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),p=l+e.length,e})),h+="';\n";var g=de.call(e,"variable")&&e.variable;if(g){if(Vt.test(g))throw new o(u)}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(Ot,""):h).replace(kt,"$1").replace(At,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=xp((function(){return Mt(c,b+"return "+h).apply(i,d)}));if(m.source=h,yu(m))throw m;return m}function pp(t){return Zu(t).toLowerCase()}function fp(t){return Zu(t).toUpperCase()}function hp(t,e,n){if(t=Zu(t),t&&(n||e===i))return Yn(t);if(!t||!(e=ji(e)))return t;var r=gr(t),o=gr(e),a=Zn(r,o),s=tr(r,o)+1;return Hi(r,a,s).join("")}function vp(t,e,n){if(t=Zu(t),t&&(n||e===i))return t.slice(0,mr(t)+1);if(!t||!(e=ji(e)))return t;var r=gr(t),o=tr(r,gr(e))+1;return Hi(r,0,o).join("")}function bp(t,e,n){if(t=Zu(t),t&&(n||e===i))return t.replace(Ft,"");if(!t||!(e=ji(e)))return t;var r=gr(t),o=Zn(r,gr(e));return Hi(r,o).join("")}function gp(t,e){var n=T,r=R;if(ku(e)){var o="separator"in e?e.separator:o;n="length"in e?Ku(e.length):n,r="omission"in e?ji(e.omission):r}t=Zu(t);var a=t.length;if(ar(t)){var s=gr(t);a=s.length}if(n>=a)return t;var l=n-br(r);if(l<1)return r;var c=s?Hi(s,0,l).join(""):t.slice(0,l);if(o===i)return c+r;if(s&&(l+=c.length-l),Du(o)){if(t.slice(l).search(o)){var u,d=c;o.global||(o=re(o.source,Zu(Wt.exec(o))+"g")),o.lastIndex=0;while(u=o.exec(d))var p=u.index;c=c.slice(0,p===i?l:p)}}else if(t.indexOf(ji(o),l)!=l){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+r}function mp(t){return t=Zu(t),t&&Ct.test(t)?t.replace(Et,yr):t}var yp=ha((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),wp=fa("toUpperCase");function _p(t,e,n){return t=Zu(t),e=n?i:e,e===i?sr(t)?xr(t):Dn(t):t.match(e)||[]}var xp=_i((function(t,e){try{return wn(t,i,e)}catch(n){return yu(n)?n:new o(n)}})),Op=Fa((function(t,e){return xn(e,(function(e){e=Is(e),vo(t,e,Lc(t[e],t))})),t}));function kp(t){var e=null==t?0:t.length,n=Va();return t=e?Cn(t,(function(t){if("function"!=typeof t[1])throw new ie(c);return[n(t[0]),t[1]]})):[],_i((function(n){var r=-1;while(++r$)return[];var n=U,r=Be(t,U);e=Va(e),t-=U;var o=Wn(r,e);while(++n0||e<0)?new Sr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(e=Ku(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},Sr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Sr.prototype.toArray=function(){return this.take(U)},Lo(Sr.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=_r[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(_r.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,l=e instanceof Sr,c=s[0],u=l||lu(e),d=function(t){var e=o.apply(_r,Tn([t],s));return r&&p?e[0]:e};u&&n&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,h=a&&!p,v=l&&!f;if(!a&&u){e=v?e:new Sr(this);var b=t.apply(e,s);return b.__actions__.push({func:Wl,args:[d],thisArg:i}),new Er(b,p)}return h&&v?t.apply(this,s):(b=this.thru(d),h?r?b.value()[0]:b.value():b)})})),xn(["pop","push","shift","sort","splice","unshift"],(function(t){var e=ae[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);_r.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(lu(o)?o:[],t)}return this[n]((function(n){return e.apply(lu(n)?n:[],t)}))}})),Lo(Sr.prototype,(function(t,e){var n=_r[e];if(n){var r=n.name+"";de.call(cn,r)||(cn[r]=[]),cn[r].push({name:e,func:n})}})),cn[ya(i,w).name]=[{name:"wrapper",func:i}],Sr.prototype.clone=Cr,Sr.prototype.reverse=Tr,Sr.prototype.value=Rr,_r.prototype.at=Kl,_r.prototype.chain=Yl,_r.prototype.commit=Xl,_r.prototype.next=Jl,_r.prototype.plant=Zl,_r.prototype.reverse=tc,_r.prototype.toJSON=_r.prototype.valueOf=_r.prototype.value=ec,_r.prototype.first=_r.prototype.head,Se&&(_r.prototype[Se]=Ql),_r},kr=Or();ln._=kr,o=function(){return kr}.call(e,n,e,r),o===i||(r.exports=o)}).call(this)}).call(this,n("7d15"),n("6984")(t))},"9ef5":function(t,e,n){var r=n("2357"),o=n("b506"),i=n("6bcf"),a=NaN,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function d(t){if("number"==typeof t)return t;if(i(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=l.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):s.test(t)?a:+t}t.exports=d},"9f16":function(t,e,n){"use strict";e["a"]={methods:{mappedKeys(t,e){const n={...t};return n[9]=t=>{if(!e.open)return;t.preventDefault();const n=e.filteredOptions.length,r=e.typeAheadPointer;return t.shiftKey?0===r?e.onEscape():e.typeAheadUp():r+1===n?e.onEscape():e.typeAheadDown()},n[27]=t=>(e.open=!1,e.search="",!1),n[13]=(t,n)=>{if(!e.open)return void(e.open=!0);let r=e.filteredOptions[e.typeAheadPointer];e.$emit("option:selecting",r),e.isOptionSelected(r)||(e.taggable&&!e.optionExists(r)&&e.$emit("option:created",r),e.multiple&&(r=e.selectedValue.concat(r)),e.updateValue(r),e.$emit("option:selected",r),e.closeOnSelect&&(e.open=!1,e.typeAheadPointer=-1),e.clearSearchOnSelect&&(e.search=""))},n[38]=t=>(t.preventDefault(),e.open||(e.open=!0),e.typeAheadUp()),n[40]=t=>(t.preventDefault(),e.open||(e.open=!0),e.typeAheadDown()),n}}}},"9f54":function(t,e){function n(t,e,n){var r=n-1,o=t.length;while(++r-1&&t%1==0&&tSPAN[data-v-36bf3081]{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.sortable>SPAN[data-v-36bf3081]:active,.sortable>SPAN[data-v-36bf3081]:hover{text-decoration:underline;color:var(--body-text)}thead tr[data-v-36bf3081]{background-color:var(--sortable-table-header-bg);color:var(--body-text);text-align:left}thead tr[data-v-36bf3081]:not(.loading){border-bottom:1px solid var(--sortable-table-top-divider)}th[data-v-36bf3081]{padding:8px 5px;font-weight:400;border:0;color:var(--body-text)}th .table-header-container[data-v-36bf3081]{display:inherit}th .table-header-container>span[data-v-36bf3081]{display:flex;align-items:center}th .table-header-container.not-filterable[data-v-36bf3081],th .table-header-container.not-filterable .icon-stack[data-v-36bf3081]{margin-top:-2px}th .table-header-container .not-filter-icon[data-v-36bf3081]{font-size:16px;color:var(--primary);vertical-align:super}th[data-v-36bf3081]:first-child{padding-left:10px}th[data-v-36bf3081]:last-child{padding-right:10px}th:not(.sortable)>SPAN[data-v-36bf3081]{display:block;margin-bottom:2px}th A[data-v-36bf3081]{color:var(--body-text)}@media only screen and (max-width:480px){th.desktop[data-v-36bf3081],th.laptop[data-v-36bf3081],th.tablet[data-v-36bf3081]{display:none}}@media only screen and (max-width:992px){th.desktop[data-v-36bf3081],th.laptop[data-v-36bf3081]{display:none}}@media only screen and (max-width:1281px){th.desktop[data-v-36bf3081]{display:none}}.icon-stack[data-v-36bf3081]{width:12px}.icon-sort.faded[data-v-36bf3081]{opacity:.3}",""]),t.exports=e},aa31:function(t,e){var n="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,n),this}t.exports=r},ae68:function(t,e,n){var r=n("d99b"),o=n("6efc"),i=n("c316"),a=n("dda8"),s=n("a67c"),l=n("41dd"),c=Object.prototype,u=c.hasOwnProperty;function d(t,e){var n=i(t),c=!n&&o(t),d=!n&&!c&&a(t),p=!n&&!c&&!d&&l(t),f=n||c||d||p,h=f?r(t.length,String):[],v=h.length;for(var b in t)!e&&!u.call(t,b)||f&&("length"==b||d&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||s(b,v))||h.push(b);return h}t.exports=d},b022:function(t,e){function n(t,e,n){var r=-1,o=null==t?0:t.length;while(++r.vs__dropdown-toggle .vs__actions:after{font-size:1.6rem}.button-dropdown.btn-lg[data-v-4b526572]>.vs__dropdown-toggle .vs__actions:after{font-size:2.6rem}.button-dropdown[data-v-4b526572]{background:var(--accent-btn);border:solid 1px var(--link);color:var(--link);padding:0}.button-dropdown.vs--open[data-v-4b526572]{outline:none;box-shadow:none}.button-dropdown[data-v-4b526572]:hover .vs__dropdown-toggle .vs__actions,.button-dropdown[data-v-4b526572]:hover .vs__selected-options{background:var(--accent-btn-hover)}.button-dropdown[data-v-4b526572]:hover .vs__selected-options .vs__selected button{background-color:transparent;color:var(--accent-btn-hover-text)}.button-dropdown[data-v-4b526572]:hover .vs__dropdown-toggle .vs__actions:after{color:var(--accent-btn-hover-text)}.button-dropdown[data-v-4b526572]>.vs__dropdown-toggle{width:100%;display:grid;grid-template-columns:75% 25%;border:none;background:transparent}.button-dropdown[data-v-4b526572]>.vs__dropdown-toggle .vs__actions:after{color:var(--link);line-height:1}.button-dropdown[data-v-4b526572] .vs__selected-options .vs__selected{margin:unset;border:none}.button-dropdown[data-v-4b526572] .vs__selected-options .vs__selected button{border:none;background:transparent;color:var(--link)}.button-dropdown[data-v-4b526572] .vs__selected-options .vs__search{position:absolute;opacity:0;padding:0}.button-dropdown[data-v-4b526572] .vs__dropdown-menu{min-width:unset;width:-moz-fit-content;width:fit-content}",""]),t.exports=e},b10f:function(t,e){t.exports=i;var n=/^(?:\w+:)?\/\/(\S+)$/,r=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,o=/^[^\s\.]+\.\S{2,}$/;function i(t){if("string"!==typeof t)return!1;var e=t.match(n);if(!e)return!1;var i=e[1];return!!i&&!(!r.test(i)&&!o.test(i))}},b120:function(t,e,n){var r=n("799b");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("0ed3").default;o("4ca0f316",r,!0,{sourceMap:!1,shadowMode:!1})},b349:function(t,e,n){"use strict";n("0831")},b3e4:function(t,e,n){var r=n("2419"),o=n("39f2"),i=n("b022"),a=n("4b48"),s=n("f533"),l=n("5e52"),c=200;function u(t,e,n){var u=-1,d=o,p=t.length,f=!0,h=[],v=h;if(n)f=!1,d=i;else if(p>=c){var b=e?null:s(t);if(b)return l(b);f=!1,d=a,v=new r}else v=e?[]:h;t:while(++u-1&&t%1==0&&t<=n}t.exports=r},b952:function(t,e,n){var r=n("5eaa");e=r(!1),e.push([t.i,".dropdown-button-group .no-left-border-radius{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-button-group .no-right-border-radius{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-button-group .btn{line-height:normal;border:0}.dropdown-button-group .btn-group-xs>.btn,.dropdown-button-group .btn-xs,.dropdown-button-group .btn-xs .btn-label{padding:2px 3px;font-size:13px}.dropdown-button-group .v-popover .text-right{margin-top:5px}.dropdown-button-group .v-popover .trigger{height:100%}.dropdown-button-group .v-popover .trigger .icon-container{height:100%;padding:10px 10px 10px 10px}.dropdown-button-group .v-popover .trigger .icon-container i{transform:scale(1)}.dropdown-button-group .v-popover .trigger .icon-container.btn-xs{padding:2px 4px 4px 4px}.dropdown-button-group .v-popover .trigger .icon-container.btn-sm{padding:10px 10px 10px 10px}.dropdown-button-group .v-popover .trigger .icon-container.btn-lg{padding:18px 10px 10px 10px}.dropdown-button-group .v-popover .trigger .icon-container:focus{outline-style:none;box-shadow:none;border-color:transparent}.dropdown-button-group .dropdown-button{background:var(--tooltip-bg);color:var(--link-text);padding:0;display:inline-flex}.dropdown-button-group .dropdown-button .wrapper-content button{border-right:0}.dropdown-button-group .dropdown-button .icon-chevron-down,.dropdown-button-group .dropdown-button>*{color:var(--primary);background-color:transparent}.dropdown-button-group .dropdown-button.bg-primary:hover{background:var(--accent-btn-hover)}.dropdown-button-group .dropdown-button.one-action{position:relative}.dropdown-button-group .dropdown-button.one-action>.btn{padding:15px 35px 15px 15px}.dropdown-button-group .dropdown-button.one-action .v-popover .trigger{position:absolute;top:0;right:0;left:0;bottom:0}.dropdown-button-group .dropdown-button.one-action .v-popover .trigger BUTTON{position:absolute;right:0}.dropdown-button-group .popover{border:none}.dropdown-button-group .tooltip{margin-top:0}.dropdown-button-group .tooltip[x-placement^=bottom] .tooltip-arrow{border-bottom-color:var(--dropdown-border)}.dropdown-button-group .tooltip[x-placement^=bottom] .tooltip-arrow:after{border-bottom-color:var(--dropdown-bg)}.dropdown-button-group .tooltip .tooltip-inner{color:var(--dropdown-text);background-color:var(--dropdown-bg);border:1px solid var(--dropdown-border);padding:0;text-align:left}.dropdown-button-group .tooltip .tooltip-inner LI{padding:10px}.dropdown-button-group .tooltip .tooltip-inner LI.divider{padding-top:0;padding-bottom:0}.dropdown-button-group .tooltip .tooltip-inner LI.divider>.divider-inner{padding:0;border-bottom:1px solid var(--dropdown-divider);width:125%;margin:0 auto}.dropdown-button-group .tooltip .tooltip-inner LI:not(.divider):hover{background-color:var(--dropdown-hover-bg);color:var(--dropdown-hover-text);cursor:pointer}.dropdown-button-group .user-info{border-bottom:1px solid var(--border);display:block}",""]),t.exports=e},bc61:function(t,e,n){var r=n("b506"),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},bddd:function(t,e,n){"use strict";n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return f}));n("9dfc");var r=n("e24b");function o(t,e){const n=t.indexOf(e);return n>=0&&t.splice(n,1),t}function i(t,e){let n,r=[];for(n=0;nt-e);const o=[];let i,a;while(r.length){i=r.shift(),a=i;while(r.length&&r[0]===a+1)a=r.shift();o.push({start:i,end:a})}for(n=o.length-1;n>=0;n--){const{start:e,end:r}=o[n];t.splice(e,r-e+1)}return t}function a(t,e){const n=t.indexOf(e);-1===n&&t.push(e)}function s(t,e){const n=[];for(const r of e)t.includes(r)||n.includes(r)||n.push(r);t.push(...n)}function l(t,e,...n){t.splice(e,0,...n)}function c(t){return Array.isArray(t)}function u(t,e,n=1){if(e<0)throw new Error("Index too low");if(e+n>t.length)throw new Error("Index + length too high");return t.splice(e,n),t}function d(t,e,n,o){return e=e||[],"object"===typeof n?e[t](t=>{for(const e in n){const o=n[e],i=Object(r["g"])(t,e);if("undefined"===typeof o){if(!i)return!1}else if(i!==o)return!1}return!0}):void 0===o?e[t](t=>!!Object(r["g"])(t,n)):e[t](t=>Object(r["g"])(t,n)===o)}function p(t,e,n){return d("filter",t,e,n)}function f(t,e,n){return d("find",t,e,n)}},bdf6:function(t,e,n){"use strict";n("0cfa")},bf10:function(t,e,n){var r=n("e672"),o=n("e29f");function i(t,e){var n=o(t,e);return r(n)?n:void 0}t.exports=i},c02d:function(t,e,n){var r=n("3f3f");function o(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}t.exports=o},c294:function(t,e,n){var r=n("4774"),o=n("479b");function i(t){return r((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);while(++rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}var k=Object.prototype.hasOwnProperty;function A(t,e){return t=t.slice(),t.push(e),t}function E(t,e){return e=e.slice(),e.unshift(t),e}var S=function(t){s(n,t);var e=b(n);function n(t){var r;return a(this,n),r=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),r.avoidNew=!0,r.value=t,r.name="NewError",r}return n}(f(Error));function C(t,e,n,r,o){if(!(this instanceof C))try{return new C(t,e,n,r,o)}catch(c){if(!c.avoidNew)throw c;return c.value}"string"===typeof t&&(o=r,r=n,n=e,e=t,t=null);var a=t&&"object"===i(t);if(t=t||{},this.json=t.json||n,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=!k.call(t,"wrap")||t.wrap,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||r||null,this.otherTypeCallback=t.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==t.autostart){var s={path:a?t.path:e};a?"json"in t&&(s.json=t.json):s.json=n;var l=this.evaluate(s);if(!l||"object"!==i(l))throw new S(l);return l}}C.prototype.evaluate=function(t,e,n,r){var o=this,a=this.parent,s=this.parentProperty,l=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&"object"===i(t)&&!Array.isArray(t)){if(!t.path&&""!==t.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!k.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var u=t;e=u.json,l=k.call(t,"flatten")?t.flatten:l,this.currResultType=k.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=k.call(t,"sandbox")?t.sandbox:this.currSandbox,c=k.call(t,"wrap")?t.wrap:c,this.currPreventEval=k.call(t,"preventEval")?t.preventEval:this.currPreventEval,n=k.call(t,"callback")?t.callback:n,this.currOtherTypeCallback=k.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,a=k.call(t,"parent")?t.parent:a,s=k.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(a=a||null,s=s||null,Array.isArray(t)&&(t=C.toPathString(t)),(t||""===t)&&e){var d=C.toPathArray(t);"$"===d[0]&&d.length>1&&d.shift(),this._hasParentSelector=null;var p=this._trace(d,e,["$"],a,s,n).filter((function(t){return t&&!t.isParentSelector}));return p.length?c||1!==p.length||p[0].hasArrExpr?p.reduce((function(t,e){var n=o._getPreferredOutput(e);return l&&Array.isArray(n)?t=t.concat(n):t.push(n),t}),[]):this._getPreferredOutput(p[0]):c?[]:void 0}},C.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":var n=Array.isArray(t.path)?t.path:C.toPathArray(t.path);return t.pointer=C.toPointer(n),t.path="string"===typeof t.path?t.path:C.toPathString(t.path),t;case"value":case"parent":case"parentProperty":return t[e];case"path":return C.toPathString(t[e]);case"pointer":return C.toPointer(t.path);default:throw new TypeError("Unknown result type")}},C.prototype._handleCallback=function(t,e,n){if(e){var r=this._getPreferredOutput(t);t.path="string"===typeof t.path?t.path:C.toPathString(t.path),e(r,n,t)}},C.prototype._trace=function(t,e,n,r,o,a,s,l){var c,u=this;if(!t.length)return c={path:n,value:e,parent:r,parentProperty:o,hasArrExpr:s},this._handleCallback(c,a,"value"),c;var d=t[0],p=t.slice(1),f=[];function h(t){Array.isArray(t)?t.forEach((function(t){f.push(t)})):f.push(t)}if(("string"!==typeof d||l)&&e&&k.call(e,d))h(this._trace(p,e[d],A(n,d),e,d,a,s));else if("*"===d)this._walk(d,p,e,n,r,o,a,(function(t,e,n,r,o,i,a,s){h(u._trace(E(t,n),r,o,i,a,s,!0,!0))}));else if(".."===d)h(this._trace(p,e,n,r,o,a,s)),this._walk(d,p,e,n,r,o,a,(function(t,e,n,r,o,a,s,l){"object"===i(r[t])&&h(u._trace(E(e,n),r[t],A(o,t),r,t,l,!0))}));else{if("^"===d)return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:p,isParentSelector:!0};if("~"===d)return c={path:A(n,d),value:o,parent:r,parentProperty:null},this._handleCallback(c,a,"property"),c;if("$"===d)h(this._trace(p,e,n,null,null,a,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))h(this._slice(d,p,e,n,r,o,a));else if(0===d.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(d,p,e,n,r,o,a,(function(t,e,n,r,o,i,a,s){u._eval(e.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),r[t],t,o,i,a)&&h(u._trace(E(t,n),r,o,i,a,s,!0))}))}else if("("===d[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(E(this._eval(d,e,n[n.length-1],n.slice(0,-1),r,o),p),e,n,r,o,a,s))}else if("@"===d[0]){var v=!1,b=d.slice(1,-2);switch(b){case"scalar":e&&["object","function"].includes(i(e))||(v=!0);break;case"boolean":case"string":case"undefined":case"function":i(e)===b&&(v=!0);break;case"integer":!Number.isFinite(e)||e%1||(v=!0);break;case"number":Number.isFinite(e)&&(v=!0);break;case"nonFinite":"number"!==typeof e||Number.isFinite(e)||(v=!0);break;case"object":e&&i(e)===b&&(v=!0);break;case"array":Array.isArray(e)&&(v=!0);break;case"other":v=this.currOtherTypeCallback(e,n,r,o);break;case"null":null===e&&(v=!0);break;default:throw new TypeError("Unknown value type "+b)}if(v)return c={path:n,value:e,parent:r,parentProperty:o},this._handleCallback(c,a,"value"),c}else if("`"===d[0]&&e&&k.call(e,d.slice(1))){var g=d.slice(1);h(this._trace(p,e[g],A(n,g),e,g,a,s,!0))}else if(d.includes(",")){var m,y=d.split(","),w=O(y);try{for(w.s();!(m=w.n()).done;){var _=m.value;h(this._trace(E(_,p),e,n,r,o,a,!0))}}catch(I){w.e(I)}finally{w.f()}}else!l&&e&&k.call(e,d)&&h(this._trace(p,e[d],A(n,d),e,d,a,s,!0))}if(this._hasParentSelector)for(var x=0;x-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return d(Function,g(n).concat([s])).apply(void 0,g(o))}};var R=n("8bbf"),I=n.n(R),L=(n("7195"),n("b506")),N=n.n(L),j=n("c316"),D=n.n(j),P=n("9e74"),$=n.n(P),F=(n("94a3"),n("2cb5")),M=n("bddd");function U(t,e,n){let r=t;if(!r)return;const o=Object(F["n"])(e);for(let i=0;it[e]||{},t)[r]}function V(t){return o()(t)}function z(t){return!t||!Object.keys(t).length}function H(t){return Object.keys(t).map(e=>{const n=t[e];Array.isArray(n)?(t[e]=n.map(t=>{if(null!==t&&void 0!==t)return H(t)}),0===t[e].length&&delete t[e]):"undefined"===typeof n||null===n?delete t[e]:N()(n)&&(z(n)&&delete t[e],t[e]=H(n))}),t}function W(t,e){const n=Object.keys(t||{}),r=Object.keys(e||{});if(n.length!==r.length)return!1;for(let o=0;o=e?t:\"\"+Array(e+1-r.length).join(n)+t},d={s:c,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+c(r,2,\"0\")+\":\"+c(i,2,\"0\")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,u),i=e-r<0,s=t.clone().add(n+(i?-1:1),u);return Number(-(n+(e-r)/(i?r-s:s-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return{M:u,y:a,w:s,d:i,D:\"date\",h:r,m:n,s:e,ms:t,Q:o}[h]||String(h||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},$={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\")},l=\"en\",m={};m[l]=$;var y=function(t){return t instanceof v},M=function(t,e,n){var r;if(!t)return l;if(\"string\"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var i=t.name;m[i]=t,r=i}return!n&&r&&(l=r),r||!n&&l},g=function(t,e){if(y(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new v(n)},D=d;D.l=M,D.i=y,D.w=function(t,e){return g(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var v=function(){function c(t){this.$L=this.$L||M(t.locale,null,!0),this.parse(t)}var d=c.prototype;return d.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(D.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},d.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},d.$utils=function(){return D},d.isValid=function(){return!(\"Invalid Date\"===this.$d.toString())},d.isSame=function(t,e){var n=g(t);return this.startOf(e)<=n&&n<=this.endOf(e)},d.isAfter=function(t,e){return g(t) {\n const norman = await this.basicNorman;\n\n norman.rules = this.rules;\n norman.locked = this.locked;\n norman.clusterCreatorDefault = this.clusterCreatorDefault || false;\n norman.projectCreatorDefault = this.projectCreatorDefault || false;\n norman.context = this.context;\n norman.description = this.description;\n norman.roleTemplateIds = this.roleTemplateNames;\n\n return norman;\n })();\n }\n\n get canCreate() {\n const schema = this.$getters['schemaFor'](this.type);\n\n return schema?.resourceMethods.find((verb) => CREATE_VERBS.has(verb));\n }\n\n goToClone(moreQuery = {}) {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _CLONE,\n [AS]: _UNFLAG,\n roleContext: this.subtype,\n ...moreQuery\n };\n\n this.currentRouter().push(location);\n }\n\n async save() {\n const norman = await this.norman;\n\n for (const rule of norman.rules) {\n if (rule.nonResourceURLs && rule.nonResourceURLs.length) {\n delete rule.resources;\n delete rule.apiGroups;\n } else {\n delete rule.nonResourceURLs;\n }\n }\n\n return norman.save();\n }\n\n async remove() {\n const norman = await this.norman;\n\n await norman.remove();\n }\n}\n","import { mapState, mapGetters } from 'vuex';\nimport { resourceNames } from '@shell/utils/string';\nimport { MANAGEMENT } from '@shell/config/types';\nimport { SUBTYPE_MAPPING } from '@shell/models/management.cattle.io.roletemplate';\nconst CLUSTER = SUBTYPE_MAPPING.CLUSTER.key;\n\nexport default {\n data() {\n return {\n warning: '',\n info: '',\n };\n },\n\n computed: {\n ...mapState('action-menu', ['toRemove']),\n ...mapGetters({ t: 'i18n/t' }),\n\n names() {\n return this.toRemove.map((obj) => obj.nameDisplay).slice(0, 5);\n },\n\n plusMore() {\n const remaining = this.toRemove.length - this.names.length;\n\n return this.t('promptRemove.andOthers', { count: remaining });\n },\n },\n watch: {\n value: {\n handler(neu) {\n this.handleRoleDeletionCheck(neu, neu[0].type, this.$route.hash);\n },\n immediate: true\n }\n },\n methods: {\n resourceNames,\n async handleRoleDeletionCheck(rolesToRemove, resourceType, queryHash) {\n this.warning = '';\n let resourceToCheck;\n let propToMatch;\n let numberOfRolesWithBinds = 0;\n const uniqueUsersWithBinds = new Set();\n\n this.info = this.t('rbac.globalRoles.waiting', { count: rolesToRemove.length });\n\n switch (resourceType) {\n case MANAGEMENT.GLOBAL_ROLE:\n resourceToCheck = MANAGEMENT.GLOBAL_ROLE_BINDING;\n propToMatch = 'globalRoleName';\n break;\n default:\n if (queryHash.includes(CLUSTER)) {\n resourceToCheck = MANAGEMENT.CLUSTER_ROLE_TEMPLATE_BINDING;\n } else {\n resourceToCheck = MANAGEMENT.PROJECT_ROLE_TEMPLATE_BINDING;\n }\n propToMatch = 'roleTemplateName';\n break;\n }\n\n try {\n const request = await this.$store.dispatch('management/request', {\n url: `/v1/${ resourceToCheck }`,\n method: 'get',\n }, { root: true });\n\n // We need to fetch the users here in order to get an accurate count when selecting global roles.\n const users = await this.$store.dispatch('management/request', {\n url: `/v1/${ MANAGEMENT.USER }`,\n method: 'get',\n }, { root: true });\n\n const userMap = users.data?.reduce((map, user) => {\n if ( user.username ) {\n map[user.id] = user;\n }\n\n return map;\n }, {});\n\n if (request.data && request.data.length) {\n rolesToRemove.forEach((toRemove) => {\n const usedRoles = request.data.filter((item) => item[propToMatch] === toRemove.id);\n\n if (usedRoles.length) {\n const uniqueUsers = [...new Set(usedRoles.map((item) => item.userName).filter((user) => userMap[user]))];\n\n if (uniqueUsers.length) {\n numberOfRolesWithBinds++;\n uniqueUsers.forEach((user) => uniqueUsersWithBinds.add(user));\n }\n }\n });\n\n if (numberOfRolesWithBinds && uniqueUsersWithBinds.size) {\n this.info = '';\n this.warning = this.t('rbac.globalRoles.usersBound', { count: uniqueUsersWithBinds.size });\n } else {\n this.info = this.t('rbac.globalRoles.notBound', null, true);\n }\n } else {\n this.info = this.t('rbac.globalRoles.notBound', null, true);\n }\n } catch (e) {\n this.info = this.t('rbac.globalRoles.unableToCheck');\n }\n },\n },\n};\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionDropdown.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionDropdown.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ActionDropdown.vue?vue&type=template&id=70f0de36\"\nimport script from \"./ActionDropdown.vue?vue&type=script&lang=js\"\nexport * from \"./ActionDropdown.vue?vue&type=script&lang=js\"\nimport style0 from \"./ActionDropdown.vue?vue&type=style&index=0&id=70f0de36&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('thead',[_c('tr',{class:{'loading': _vm.loading}},[(_vm.tableActions)?_c('th',{attrs:{\"width\":_vm.checkWidth,\"align\":\"middle\"}},[_c('Checkbox',{staticClass:\"check\",attrs:{\"data-testid\":\"sortable-table_check_select_all\",\"indeterminate\":_vm.isIndeterminate,\"disabled\":_vm.noRows || _vm.noResults},model:{value:(_vm.isAll),callback:function ($$v) {_vm.isAll=$$v},expression:\"isAll\"}})],1):_vm._e(),(_vm.subExpandColumn)?_c('th',{attrs:{\"width\":_vm.expandWidth}}):_vm._e(),_vm._l((_vm.columns),function(col){return _c('th',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.hasAdvancedFiltering || (_vm.hasAdvancedFiltering && col.isColVisible)),expression:\"!hasAdvancedFiltering || (hasAdvancedFiltering && col.isColVisible)\"}],key:col.name,class:{ sortable: col.sort, [col.breakpoint]: !!col.breakpoint},attrs:{\"align\":col.align || 'left',\"width\":col.width},on:{\"click\":function($event){$event.preventDefault();return _vm.changeSort($event, col)}}},[_c('div',{staticClass:\"table-header-container\",class:{ 'not-filterable': _vm.hasAdvancedFiltering && !col.isFilter }},[(col.sort)?_c('span',{directives:[{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.tooltip(col)),expression:\"tooltip(col)\"}]},[_c('span',{directives:[{name:\"clean-html\",rawName:\"v-clean-html\",value:(_vm.labelFor(col)),expression:\"labelFor(col)\"}]}),_c('i',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.hasAdvancedFiltering && !col.isFilter),expression:\"hasAdvancedFiltering && !col.isFilter\"},{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.t('sortableTable.tableHeader.noFilter')),expression:\"t('sortableTable.tableHeader.noFilter')\"}],staticClass:\"icon icon-info not-filter-icon\"}),_c('span',{staticClass:\"icon-stack\"},[_c('i',{staticClass:\"icon icon-sort icon-stack-1x faded\"}),(_vm.isCurrent(col) && !_vm.descending)?_c('i',{staticClass:\"icon icon-sort-down icon-stack-1x\"}):_vm._e(),(_vm.isCurrent(col) && _vm.descending)?_c('i',{staticClass:\"icon icon-sort-up icon-stack-1x\"}):_vm._e()])]):_c('span',{directives:[{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.tooltip(col)),expression:\"tooltip(col)\"}]},[_vm._v(_vm._s(_vm.labelFor(col)))])])])}),(_vm.rowActions && _vm.hasAdvancedFiltering && _vm.tableColsOptions.length)?_c('th',{attrs:{\"width\":_vm.rowActionsWidth}},[_c('div',{ref:\"table-options\",staticClass:\"table-options-group\"},[_c('button',{staticClass:\"btn btn-sm role-multi-action table-options-btn\",attrs:{\"aria-haspopup\":\"true\",\"aria-expanded\":\"false\",\"type\":\"button\"},on:{\"click\":_vm.tableColsOptionsClick}},[_c('i',{staticClass:\"icon icon-actions\"})]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.tableColsOptionsVisibility),expression:\"tableColsOptionsVisibility\"}],staticClass:\"table-options-container\",style:(_vm.tableColsMenuPosition)},[(_vm.hasAdvGrouping)?_c('div',{staticClass:\"table-options-grouping\"},[_c('span',{staticClass:\"table-options-col-subtitle\"},[_vm._v(_vm._s(_vm.t('sortableTable.tableHeader.groupBy'))+\":\")]),_c('LabeledSelect',{staticClass:\"table-options-grouping-select\",attrs:{\"clearable\":true,\"options\":_vm.groupOptions,\"disabled\":false,\"searchable\":false,\"mode\":\"edit\",\"multiple\":false,\"taggable\":false},model:{value:(_vm.advGroup),callback:function ($$v) {_vm.advGroup=$$v},expression:\"advGroup\"}})],1):_vm._e(),_c('p',{staticClass:\"table-options-col-subtitle mb-20\"},[_vm._v(\" \"+_vm._s(_vm.t('sortableTable.tableHeader.show'))+\": \")]),_c('ul',_vm._l((_vm.tableColsOptions),function(col,index){return _c('li',{directives:[{name:\"show\",rawName:\"v-show\",value:(col.isTableOption),expression:\"col.isTableOption\"}],key:index,class:{ 'visible': !col.preventColToggle }},[_c('Checkbox',{directives:[{name:\"show\",rawName:\"v-show\",value:(!col.preventColToggle),expression:\"!col.preventColToggle\"}],staticClass:\"table-options-checkbox\",attrs:{\"label\":col.label},on:{\"input\":function($event){return _vm.tableOptionsCheckbox($event, col.label)}},model:{value:(col.isColVisible),callback:function ($$v) {_vm.$set(col, \"isColVisible\", $$v)},expression:\"col.isColVisible\"}})],1)}),0)])])]):(_vm.rowActions)?_c('th',{attrs:{\"width\":_vm.rowActionsWidth}}):_vm._e()],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export function getParent(el, parentSelector) {\n el = el?.parentElement;\n\n if (!el) {\n return null;\n }\n\n const matchFn = el.matches || el.matchesSelector;\n\n if (!matchFn.call(el, parentSelector)) {\n return getParent(el, parentSelector);\n }\n\n return el;\n}\n","import { isMore, isRange, suppressContextMenu, isAlternate } from '@shell/utils/platform';\nimport { get } from '@shell/utils/object';\nimport { filterBy } from '@shell/utils/array';\nimport { getParent } from '@shell/utils/dom';\n\nexport const ALL = 'all';\nexport const SOME = 'some';\nexport const NONE = 'none';\n\nexport default {\n mounted() {\n const table = this.$el.querySelector('TABLE');\n\n this._onRowClickBound = this.onRowClick.bind(this);\n this._onRowMousedownBound = this.onRowMousedown.bind(this);\n this._onRowContextBound = this.onRowContext.bind(this);\n\n table.addEventListener('click', this._onRowClickBound);\n table.addEventListener('mousedown', this._onRowMousedownBound);\n table.addEventListener('contextmenu', this._onRowContextBound);\n },\n\n beforeDestroy() {\n const table = this.$el.querySelector('TABLE');\n\n table.removeEventListener('click', this._onRowClickBound);\n table.removeEventListener('mousedown', this._onRowMousedownBound);\n table.removeEventListener('contextmenu', this._onRowContextBound);\n },\n\n computed: {\n // Used for the table-level selection check-box to show checked (all selected)/intermediate (some selected)/unchecked (none selected)\n howMuchSelected() {\n const total = this.pagedRows.length;\n const selected = this.selectedRows.length;\n\n if ( selected >= total && total > 0 ) {\n return ALL;\n } else if ( selected > 0 ) {\n return SOME;\n }\n\n return NONE;\n },\n\n // NOTE: The logic here could be simplified and made more performant\n bulkActionsForSelection() {\n let disableAll = false;\n // pagedRows is all rows in the current page\n const all = this.pagedRows;\n const allRows = this.arrangedRows;\n let selected = this.selectedRows;\n\n // Nothing is selected\n if ( !this.selectedRows.length ) {\n // and there are no rows\n if ( !allRows ) {\n return [];\n }\n\n const firstNode = allRows[0];\n\n selected = firstNode ? [firstNode] : [];\n disableAll = true;\n }\n\n const map = {};\n\n // Find and add all the actions for all the nodes so that we know\n // what all the possible actions are\n for ( const node of all ) {\n if (node.availableActions) {\n for ( const act of node.availableActions ) {\n if ( act.bulkable ) {\n _add(map, act, false);\n }\n }\n }\n }\n\n // Go through all the selected items and add the actions (which were already identified above)\n // as available for some (or all) of the selected nodes\n for ( const node of selected ) {\n if (node.availableActions) {\n for ( const act of node.availableActions ) {\n if ( act.bulkable && act.enabled ) {\n _add(map, act, false);\n }\n }\n }\n }\n\n // If there's no items actually selected, we want to see all the actions\n // so you know what exists, but have them all be disabled since there's nothing to do them on.\n const out = _filter(map, disableAll);\n\n // Enable a bulkaction if some of the selected items can perform the action\n out.forEach((bulkAction) => {\n const actionEnabledForSomeSelected = this.selectedRows.some((node) => {\n const availableActions = node.availableActions || [];\n\n return availableActions.some((action) => action.action === bulkAction.action && action.enabled);\n });\n\n bulkAction.enabled = this.selectedRows.length > 0 && actionEnabledForSomeSelected;\n });\n\n return out.sort((a, b) => (b.weight || 0) - (a.weight || 0));\n }\n },\n\n data() {\n return {\n // List of selected items in the table\n selectedRows: [],\n prevNode: null,\n };\n },\n\n watch: {\n // On page change\n pagedRows() {\n // When the table contents changes:\n // - Remove items that are in the selection but no longer in the table.\n\n const content = this.pagedRows;\n const toRemove = [];\n\n for (const node of this.selectedRows) {\n if (!content.includes(node) ) {\n toRemove.push(node);\n }\n }\n\n this.update([], toRemove);\n }\n },\n\n methods: {\n onToggleAll(value) {\n if ( value ) {\n this.update(this.pagedRows, []);\n\n return true;\n } else {\n this.update([], this.pagedRows);\n\n return false;\n }\n },\n\n onRowMousedown(e) {\n if ( isRange(e) || this.isSelectionCheckbox(e.target) ) {\n e.preventDefault();\n }\n },\n\n onRowMouseEnter(e) {\n const tr = e.target.closest('TR');\n\n if (tr.classList.contains('sub-row')) {\n const trMainRow = tr.previousElementSibling;\n\n trMainRow.classList.add('sub-row-hovered');\n }\n },\n\n onRowMouseLeave(e) {\n const tr = e.target.closest('TR');\n\n if (tr.classList.contains('sub-row')) {\n const trMainRow = tr.previousElementSibling;\n\n trMainRow.classList.remove('sub-row-hovered');\n }\n },\n\n nodeForEvent(e) {\n const tagName = e.target.tagName;\n const tgt = e.target;\n const actionElement = tgt.closest('.actions');\n\n if ( tgt.classList.contains('select-all-check') ) {\n return;\n }\n\n if ( !actionElement ) {\n if (\n tagName === 'A' ||\n tagName === 'BUTTON' ||\n getParent(tgt, '.btn')\n ) {\n return;\n }\n }\n\n const tgtRow = e.target.closest('TR');\n\n return this.nodeForRow(tgtRow);\n },\n\n nodeForRow(tgtRow) {\n if ( tgtRow?.classList.contains('separator-row') ) {\n return;\n }\n\n while ( tgtRow && !tgtRow.classList.contains('main-row') ) {\n tgtRow = tgtRow.previousElementSibling;\n }\n\n if ( !tgtRow ) {\n return;\n }\n\n const nodeId = tgtRow.dataset.nodeId;\n\n if ( !nodeId ) {\n return;\n }\n\n const node = this.pagedRows.find( (x) => get(x, this.keyField) === nodeId );\n\n return node;\n },\n\n async onRowClick(e) {\n const node = this.nodeForEvent(e);\n const td = e.target.closest('TD');\n const skipSelect = td?.classList.contains('skip-select');\n\n if (skipSelect) {\n return;\n }\n const selection = this.selectedRows;\n const isCheckbox = this.isSelectionCheckbox(e.target) || td?.classList.contains('row-check');\n const isExpand = td?.classList.contains('row-expand');\n const content = this.pagedRows;\n\n this.$emit('rowClick', e);\n\n if ( !node ) {\n return;\n }\n\n if ( isExpand ) {\n this.toggleExpand(node);\n\n return;\n }\n\n const actionElement = e.target.closest('.actions');\n\n if ( actionElement ) {\n let resources = [node];\n\n if ( this.mangleActionResources ) {\n const i = actionElement.querySelector('i');\n\n i.classList.remove('icon-actions');\n i.classList.add('icon-spinner');\n i.classList.add('icon-spin');\n\n try {\n resources = await this.mangleActionResources(resources);\n } finally {\n i.classList.remove('icon-spinner');\n i.classList.remove('icon-spin');\n i.classList.add('icon-actions');\n }\n }\n\n this.$store.commit(`action-menu/show`, {\n resources,\n event: e,\n elem: actionElement\n });\n\n return;\n }\n\n const isSelected = selection.includes(node);\n let prevNode = this.prevNode;\n\n // PrevNode is only valid if it's in the current content\n if ( !prevNode || !content.includes(prevNode) ) {\n prevNode = node;\n }\n\n if ( isMore(e) ) {\n this.toggle(node);\n } else if ( isRange(e) ) {\n const toToggle = this.nodesBetween(prevNode, node);\n\n if ( isSelected ) {\n this.update([], toToggle);\n } else {\n this.update(toToggle, []);\n }\n } else if ( isCheckbox ) {\n this.toggle(node);\n } else {\n this.update([node], content);\n }\n\n this.prevNode = node;\n },\n\n async onRowContext(e) {\n const node = this.nodeForEvent(e);\n\n if ( suppressContextMenu(e) ) {\n return;\n }\n\n if ( !node ) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n this.prevNode = node;\n const isSelected = this.selectedRows.includes(node);\n\n if ( !isSelected ) {\n this.update([node], this.selectedRows.slice());\n }\n\n let resources = this.selectedRows;\n\n if ( this.mangleActionResources ) {\n resources = await this.mangleActionResources(resources);\n }\n\n this.$store.commit(`action-menu/show`, {\n resources,\n event: e,\n });\n },\n\n keySelectRow(row, more = false) {\n const node = this.nodeForRow(row);\n const content = this.pagedRows;\n\n if ( !node ) {\n return;\n }\n\n if ( more ) {\n this.update([node], []);\n } else {\n this.update([node], content);\n }\n\n this.prevNode = node;\n },\n\n isSelectionCheckbox(element) {\n return element.tagName === 'INPUT' &&\n element.type === 'checkbox' &&\n element.closest('.selection-checkbox') !== null;\n },\n\n nodesBetween(a, b) {\n let toToggle = [];\n const key = this.groupBy;\n\n if ( key ) {\n // Grouped has 2 levels to look through\n const grouped = this.groupedRows;\n\n let from = this.groupIdx(a);\n let to = this.groupIdx(b);\n\n if ( !from || !to ) {\n return [];\n }\n\n // From has to come before To\n if ( (from.group > to.group) || ((from.group === to.group) && (from.item > to.item)) ) {\n [from, to] = [to, from];\n }\n\n for ( let i = from.group ; i <= to.group ; i++ ) {\n const items = grouped[i].rows;\n let j = (from.group === i ? from.item : 0);\n\n while ( items[j] && ( i < to.group || j <= to.item )) {\n toToggle.push(items[j]);\n j++;\n }\n }\n } else {\n // Ungrouped is much simpler\n const content = this.pagedRows;\n let from = content.indexOf(a);\n let to = content.indexOf(b);\n\n [from, to] = [Math.min(from, to), Math.max(from, to)];\n toToggle = content.slice(from, to + 1);\n }\n\n // check if there is already duplicate content selected (selectedRows) on the list to toggle...\n toToggle = toToggle.filter((item) => !this.selectedRows.includes(item));\n\n return toToggle;\n },\n\n groupIdx(node) {\n const grouped = this.groupedRows;\n\n for ( let i = 0 ; i < grouped.length ; i++ ) {\n const rows = grouped[i].rows;\n\n for ( let j = 0 ; j < rows.length ; j++ ) {\n if ( rows[j] === node ) {\n return {\n group: i,\n item: j\n };\n }\n }\n }\n\n return null;\n },\n\n toggle(node) {\n const add = [];\n const remove = [];\n\n if (this.selectedRows.includes(node)) {\n remove.push(node);\n } else {\n add.push(node);\n }\n\n this.update(add, remove);\n },\n\n update(toAdd, toRemove) {\n toRemove.forEach((row) => {\n const index = this.selectedRows.findIndex((r) => r === row);\n\n if (index !== -1) {\n this.selectedRows.splice(index, 1);\n }\n });\n\n if ( toAdd ) {\n this.selectedRows.push(...toAdd);\n }\n\n // Uncheck and check the checkboxes of nodes that have been added/removed\n if (toRemove.length) {\n this.$nextTick(() => {\n for ( let i = 0 ; i < toRemove.length ; i++ ) {\n this.updateInput(toRemove[i], false, this.keyField);\n }\n });\n }\n\n if (toAdd.length) {\n this.$nextTick(() => {\n for ( let i = 0 ; i < toAdd.length ; i++ ) {\n this.updateInput(toAdd[i], true, this.keyField);\n }\n });\n }\n\n this.$nextTick(() => {\n this.$emit('selection', this.selectedRows);\n });\n },\n\n updateInput(node, on, keyField) {\n const id = get(node, keyField);\n\n if ( id ) {\n // Note: This is looking for the checkbox control for the row\n const input = this.$el.querySelector(`div[data-checkbox-ctrl][data-node-id=\"${ id }\"]`);\n\n if ( input && !input.disabled ) {\n const label = input.querySelector('label');\n\n if (label) {\n label.value = on;\n }\n let tr = input.closest('tr');\n let first = true;\n\n while ( tr && (first || tr.classList.contains('sub-row') ) ) {\n if (on) {\n tr.classList.add('row-selected');\n } else {\n tr.classList.remove('row-selected');\n }\n tr = tr.nextElementSibling;\n first = false;\n }\n }\n }\n },\n\n select(nodes) {\n nodes.forEach((node) => {\n const id = get(node, this.keyField);\n const input = this.$el.querySelector(`label[data-node-id=\"${ id }\"]`);\n\n input.dispatchEvent(new Event('click'));\n });\n },\n\n applyTableAction(action, args, event) {\n const opts = { alt: event && isAlternate(event), event };\n\n // Go through the table selection and filter out those actions that can't run the chosen action\n const executableSelection = this.selectedRows.filter((row) => {\n const matchingResourceAction = row.availableActions.find((a) => a.action === action.action);\n\n return matchingResourceAction?.enabled;\n });\n\n _execute(executableSelection, action, args, opts, this);\n\n this.actionOfInterest = null;\n },\n\n clearSelection() {\n this.update([], this.selectedRows);\n },\n\n }\n};\n\n// ---------------------------------------------------------------------\n// --- Helpers that were in selectionStore.js --------------------------\n// ---------------------------------------------------------------------\n\nlet anon = 0;\n\nfunction _add(map, act, incrementCounts = true) {\n let id = act.action;\n\n if ( !id ) {\n id = `anon${ anon }`;\n anon++;\n }\n\n let obj = map[id];\n\n if ( !obj ) {\n obj = Object.assign({}, act);\n map[id] = obj;\n obj.allEnabled = false;\n }\n\n if ( !act.enabled ) {\n obj.allEnabled = false;\n } else {\n obj.anyEnabled = true;\n }\n\n if ( incrementCounts ) {\n obj.available = (obj.available || 0) + (!act.enabled ? 0 : 1 );\n obj.total = (obj.total || 0) + 1;\n }\n\n return obj;\n}\n\nfunction _filter(map, disableAll = false) {\n const out = filterBy(Object.values(map), 'anyEnabled', true);\n\n for ( const act of out ) {\n if ( disableAll ) {\n act.enabled = false;\n } else {\n act.enabled = ( act.available >= act.total );\n }\n }\n\n return out;\n}\n\nfunction _execute(resources, action, args, opts = {}, ctx) {\n args = args || [];\n\n // New pattern for extensions - always call invoke\n if (action.invoke) {\n const actionOpts = {\n action,\n event: opts.event,\n isAlt: !!opts.alt,\n };\n\n return action.invoke.apply(ctx, [actionOpts, resources || [], args]);\n }\n\n if ( resources.length > 1 && action.bulkAction && !opts.alt ) {\n const fn = resources[0][action.bulkAction];\n\n if ( fn ) {\n return fn.call(resources[0], resources, ...args);\n }\n }\n\n const promises = [];\n\n for ( const resource of resources ) {\n let fn;\n\n if (opts.alt && action.altAction) {\n fn = resource[action.altAction];\n } else {\n fn = resource[action.action];\n }\n\n if ( fn ) {\n promises.push(fn.apply(resource, args));\n }\n }\n\n return Promise.all(promises);\n}\n","// @TODO replace this with popper.js...\n\nexport const LEFT = 'left';\nexport const RIGHT = 'right';\nexport const TOP = 'top';\nexport const CENTER = 'center'; // These are both the same externally so you can use either,\nexport const MIDDLE = 'center'; // but have different meaning inside this file (center->left/right, middle->top/bottom)\nexport const BOTTOM = 'bottom';\nexport const AUTO = 'auto';\n\nexport function boundingRect(elem) {\n const pos = elem.getBoundingClientRect();\n const width = elem.offsetWidth;\n const height = elem.offsetHeight;\n\n return {\n top: pos.top,\n right: pos.left + width,\n bottom: pos.top + height,\n left: pos.left,\n width,\n height,\n };\n}\n\nexport function fakeRectFor(event) {\n return {\n top: event.clientY,\n left: event.clientX,\n bottom: event.clientY,\n right: event.clientX,\n width: 0,\n height: 0,\n };\n}\n\nexport function screenRect() {\n const width = window.innerWidth;\n const height = window.innerHeight;\n const top = window.pageYOffset;\n const left = window.pageXOffset;\n\n return {\n top,\n right: left + width,\n bottom: top + height,\n left,\n width,\n height,\n };\n}\n\nexport function fitOnScreen(contentElem, triggerElemOrEvent, opt, useDefaults) {\n let {\n positionX = AUTO, // Preferred horizontal position\n positionY = AUTO, // Preferred vertical position\n } = opt || {};\n\n const {\n fudgeX = 0,\n fudgeY = 0,\n overlapX = true, // Position on \"top\" of the trigger horizontally\n overlapY = false, // Position on \"top\" of the trigger vertically\n } = opt || {};\n\n const screen = screenRect();\n let trigger;\n\n if ( triggerElemOrEvent instanceof Event ) {\n trigger = fakeRectFor(triggerElemOrEvent);\n } else {\n trigger = boundingRect(triggerElemOrEvent);\n }\n\n let content = {};\n\n if (contentElem) {\n content = boundingRect(contentElem);\n }\n\n if (useDefaults) {\n content = {\n top: 0,\n right: 147,\n bottom: 163,\n left: 0,\n width: 147,\n height: 80\n };\n }\n\n // console.log('screen', screen);\n // console.log('trigger', trigger);\n // console.log('content', content);\n\n const style = { position: 'absolute' };\n\n const originFor = {\n left: (overlapX ? trigger.left : trigger.right ),\n center: (trigger.left + trigger.right ) / 2,\n right: (overlapX ? trigger.right : trigger.left ),\n top: (overlapY ? trigger.bottom : trigger.top ),\n middle: (trigger.top + trigger.bottom ) / 2,\n bottom: (overlapY ? trigger.top : trigger.bottom ),\n };\n\n // console.log('origin', originFor);\n\n const gapIf = {\n left: screen.right - content.width - originFor.left,\n center: Math.min(screen.right - (content.width / 2) - originFor.center, originFor.center - (content.width / 2) - screen.left),\n right: originFor.right - content.width - screen.left,\n top: originFor.bottom - content.height - screen.top,\n middle: Math.min(originFor.middle - (content.height / 2) - screen.top, screen.bottom - (content.height / 2) - originFor.middle),\n bottom: screen.bottom - content.height - originFor.top,\n };\n\n // console.log('gapIf', gapIf);\n\n if ( positionX === CENTER && gapIf.center < 0) {\n positionX = AUTO;\n }\n\n if ( positionX === AUTO ) {\n positionX = gapIf.left < 0 || gapIf.right * 1.5 > gapIf.left ? RIGHT : LEFT;\n } else if ( positionY === LEFT && gapIf.left < 0 ) {\n positionX = RIGHT;\n } else if ( positionY === RIGHT && gapIf.right < 0 ) {\n positionX = LEFT;\n }\n\n switch ( positionX ) {\n case LEFT:\n style.left = `${ originFor.left - fudgeX }px`;\n break;\n case CENTER:\n style.left = `${ ((originFor.left + originFor.right) / 2) - (content.width / 2) - fudgeX }px`;\n break;\n case RIGHT:\n style.left = `${ originFor.right + fudgeX - content.width }px`;\n // style.right = `${ screen.width - originFor.right - fudgeX }px`;\n break;\n }\n\n if ( positionY === MIDDLE && gapIf.middle < 0) {\n positionY = AUTO;\n }\n\n if ( positionY === AUTO ) {\n positionY = gapIf.top < 0 || gapIf.bottom * 1.5 > gapIf.top ? BOTTOM : TOP;\n } else if ( positionY === TOP && gapIf.top < 0 ) {\n positionY = BOTTOM;\n } else if ( positionY === BOTTOM && gapIf.bottom < 0 ) {\n positionY = TOP;\n }\n\n switch ( positionY ) {\n case TOP:\n style.top = `${ originFor.top + fudgeY - content.height }px`;\n break;\n case CENTER:\n style.top = `${ ((originFor.top + originFor.bottom) / 2) + fudgeY - content.height }px`;\n break;\n case BOTTOM:\n style.top = `${ originFor.bottom - fudgeY }px`;\n break;\n }\n\n // console.log(positionX, positionY, style);\n\n return style;\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:\"select\",staticClass:\"labeled-select\",class:{\n disabled: _vm.isView || _vm.disabled,\n focused: _vm.focused,\n [_vm.mode]: true,\n [_vm.status]: _vm.status,\n taggable: _vm.$attrs.taggable,\n taggable: _vm.$attrs.multiple,\n hoverable: _vm.hoverTooltip,\n 'compact-input': _vm.isCompact,\n 'no-label': !_vm.hasLabel,\n },on:{\"click\":_vm.focusSearch,\"focus\":_vm.focusSearch}},[_c('div',{class:{ 'labeled-container': true, raised: _vm.raised, empty: _vm.empty, [_vm.mode]: true },style:({ border: 'none' })},[(_vm.hasLabel)?_c('label',[(_vm.labelKey)?_c('t',{attrs:{\"k\":_vm.labelKey}}):(_vm.label)?[_vm._v(_vm._s(_vm.label))]:_vm._e(),(_vm.requiredField)?_c('span',{staticClass:\"required\"},[_vm._v(\"*\")]):_vm._e()],2):_vm._e()]),_c('v-select',_vm._g(_vm._b({ref:\"select-input\",staticClass:\"inline\",class:{ 'no-label': !(_vm.label || '').length },attrs:{\"append-to-body\":_vm.appendToBody,\"calculate-position\":_vm.positionDropdown,\"clearable\":_vm.clearable,\"disabled\":_vm.isView || _vm.disabled || _vm.loading,\"get-option-key\":_vm.getOptionKey,\"get-option-label\":(opt) => _vm.getOptionLabel(opt),\"label\":_vm.optionLabel,\"options\":_vm.options,\"map-keydown\":_vm.mappedKeys,\"placeholder\":_vm.placeholder,\"reduce\":(x) => _vm.reduce(x),\"searchable\":_vm.isSearchable,\"selectable\":_vm.selectable,\"value\":_vm.value != null && !_vm.loading ? _vm.value : '',\"dropdown-should-open\":_vm.dropdownShouldOpen},on:{\"search:blur\":_vm.onBlur,\"search:focus\":_vm.onFocus,\"search\":_vm.onSearch,\"open\":_vm.onOpen,\"close\":_vm.onClose,\"option:selected\":function($event){return _vm.$emit('selecting', $event)}},scopedSlots:_vm._u([{key:\"option\",fn:function(option){return [(option.kind === 'group')?[_c('div',{staticClass:\"vs__option-kind-group\"},[_c('b',[_vm._v(_vm._s(_vm.getOptionLabel(option)))]),(option.badge)?_c('div',[_vm._v(\" \"+_vm._s(option.badge)+\" \")]):_vm._e()])]:(option.kind === 'divider')?[_c('hr')]:(option.kind === 'highlighted')?[_c('div',{staticClass:\"option-kind-highlighted\"},[_vm._v(\" \"+_vm._s(option.label)+\" \")])]:_c('div',{on:{\"mousedown\":(e) => _vm.onClickOption(option, e)}},[_vm._v(\" \"+_vm._s(_vm.getOptionLabel(option))+\" \"),(option.error)?_c('i',{staticClass:\"icon icon-warning pull-right\",staticStyle:{\"font-size\":\"20px\"}}):_vm._e()])]}},_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [_vm._t(slot,null,null,scope)]}}})],null,true)},'v-select',_vm.$attrs,false),_vm.$listeners)),(_vm.loading)?_c('i',{staticClass:\"icon icon-spinner icon-spin icon-lg\"}):_vm._e(),(_vm.tooltip && !_vm.focused)?_c('LabeledTooltip',{attrs:{\"hover\":_vm.hoverTooltip,\"value\":_vm.tooltip,\"status\":_vm.status}}):_vm._e(),(!!_vm.validationMessage)?_c('LabeledTooltip',{attrs:{\"hover\":_vm.hoverTooltip,\"value\":_vm.validationMessage}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from 'vue';\n\nexport default Vue.extend({\n props: {\n compact: {\n type: Boolean,\n default: null\n },\n label: {\n type: String,\n default: null\n },\n\n labelKey: {\n type: String,\n default: null\n },\n },\n\n computed: {\n isCompact(): boolean {\n // Compact if explicitly set - otherwise compact if there is no label\n return this.compact !== null ? this.compact : !(this.label || this.labelKey);\n }\n }\n});\n","/**\n * Sets the width of a DOM element. Adapted from [youmightnotneedjquery.com](https://youmightnotneedjquery.com/#set_width)\n * @param {Element} el - The target DOM element\n * @param {function | string | number} val - The desired width represented as a Number\n */\nexport function setWidth(el, val) {\n if (!el) {\n return;\n }\n\n if (typeof val === 'function') {\n val = val();\n }\n\n if (typeof val === 'string') {\n el.style.width = val;\n\n return;\n }\n\n el.style.width = `${ val }px`;\n}\n\n/**\n * Gets the width of a DOM element. Adapted from [youmightnotneedjquery.com](https://youmightnotneedjquery.com/#get_width)\n * @param {Element} el - The target DOM element\n * @returns Number representing the width for the provided element\n */\nexport function getWidth(el) {\n if (!el || !el.length) {\n return;\n }\n\n if (el.length) {\n return parseFloat(getComputedStyle(el[0]).width.replace('px', ''));\n } else {\n return parseFloat(getComputedStyle(el).width.replace('px', ''));\n }\n}\n","import Vue from 'vue';\nimport { _EDIT, _VIEW } from '@shell/config/query-params';\nimport { getWidth, setWidth } from '@shell/utils/width';\n\ninterface LabeledFormElement {\n raised: boolean;\n focused: boolean;\n blurred: number | null;\n}\n\nexport default Vue.extend({\n inheritAttrs: false,\n\n props: {\n mode: {\n type: String,\n default: _EDIT,\n },\n\n label: {\n type: String,\n default: null\n },\n\n labelKey: {\n type: String,\n default: null\n },\n\n placeholderKey: {\n type: String,\n default: null\n },\n\n tooltip: {\n type: [String, Object],\n default: null\n },\n\n hoverTooltip: {\n type: Boolean,\n default: true,\n },\n\n tooltipKey: {\n type: String,\n default: null\n },\n\n required: {\n type: Boolean,\n default: false,\n },\n\n disabled: {\n type: Boolean,\n default: false,\n },\n\n placeholder: {\n type: [String, Number],\n default: ''\n },\n\n value: {\n type: [String, Number, Object],\n default: ''\n },\n\n options: {\n default: null,\n type: Array\n },\n\n searchable: {\n default: false,\n type: Boolean\n },\n\n rules: {\n default: () => [],\n type: Array,\n // we only want functions in the rules array\n validator: (rules: any) => rules.every((rule: any) => ['function'].includes(typeof rule))\n },\n\n requireDirty: {\n default: true,\n type: Boolean\n }\n },\n\n data(): LabeledFormElement {\n return {\n raised: this.mode === _VIEW || !!`${ this.value }`,\n focused: false,\n blurred: null,\n };\n },\n\n computed: {\n requiredField(): boolean {\n // using \"any\" for a type on \"rule\" here is dirty but the use of the optional chaining operator makes it safe for what we're doing here.\n return (this.required || this.rules.some((rule: any): boolean => rule?.name === 'required'));\n },\n empty(): boolean {\n return !!`${ this.value }`;\n },\n\n isView(): boolean {\n return this.mode === _VIEW;\n },\n\n isDisabled(): boolean {\n return this.disabled || this.isView;\n },\n\n isSearchable(): boolean {\n const { searchable } = this;\n const options = ( this.options || [] );\n\n if (searchable || options.length >= 10) {\n return true;\n }\n\n return false;\n },\n validationMessage(): string | undefined {\n // we want to grab the required rule passed in if we can but if it's not there then we can just grab it from the formRulesGenerator\n const requiredRule = this.rules.find((rule: any) => rule?.name === 'required') as Function;\n const ruleMessages = [];\n const value = this?.value;\n\n if (requiredRule && this.blurred && !this.focused) {\n const message = requiredRule(value);\n\n if (!!message) {\n return message;\n }\n }\n\n for (const rule of this.rules as Function[]) {\n const message = rule(value);\n\n if (!!message && rule.name !== 'required') { // we're catching 'required' above so we can ignore it here\n ruleMessages.push(message);\n }\n }\n if (ruleMessages.length > 0 && (this.blurred || this.focused || !this.requireDirty)) {\n return ruleMessages.join(', ');\n } else {\n return undefined;\n }\n }\n },\n\n methods: {\n resizeHandler() {\n // since the DD is positioned there is no way to 'inherit' the size of the input, this calcs the size of the parent and set the dd width if it is smaller. If not let it grow with the regular styles\n this.$nextTick(() => {\n const DD = (this.$refs.select as HTMLElement).querySelector('ul.vs__dropdown-menu');\n\n const selectWidth = getWidth(this.$refs.select as Element) || 0;\n const dropWidth = getWidth(DD as Element) || 0;\n\n if (dropWidth < selectWidth) {\n setWidth(DD as Element, selectWidth);\n }\n });\n },\n onFocus() {\n this.$emit('on-focus');\n\n return this.onFocusLabeled();\n },\n\n onFocusLabeled() {\n this.raised = true;\n this.focused = true;\n },\n\n onBlur() {\n this.$emit('on-blur');\n\n return this.onBlurLabeled();\n },\n\n onBlurLabeled() {\n this.focused = false;\n\n if ( !this.value ) {\n this.raised = false;\n }\n\n this.blurred = Date.now();\n }\n }\n});\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{ref:\"container\",staticClass:\"labeled-tooltip\",class:{[_vm.status]: true, hoverable: _vm.hover}},[(_vm.hover)?[_c('i',{directives:[{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.value.content ? { ...{content: _vm.value.content, classes: [`tooltip-${_vm.status}`]}, ..._vm.value } : _vm.value),expression:\"value.content ? { ...{content: value.content, classes: [`tooltip-${status}`]}, ...value } : value\"}],staticClass:\"icon status-icon\",class:{'hover':!_vm.value, [_vm.iconClass]: true}})]:[_c('i',{staticClass:\"icon status-icon\",class:{'hover':!_vm.value}}),(_vm.value)?_c('div',{staticClass:\"tooltip\",attrs:{\"x-placement\":\"bottom\"}},[_c('div',{staticClass:\"tooltip-arrow\"}),_c('div',{staticClass:\"tooltip-inner\"},[_vm._v(\" \"+_vm._s(_vm.value)+\" \")])]):_vm._e()]],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue';\n\nexport default Vue.extend({\n props: {\n /**\n * The Labeled Tooltip value.\n */\n value: {\n type: [String, Object],\n default: null\n },\n\n /**\n * The status for the Labeled Tooltip. Controls the Labeled Tooltip class.\n * @values info, success, warning, error\n */\n status: {\n type: String,\n default: 'error'\n },\n\n /**\n * Displays the Labeled Tooltip on mouse hover.\n */\n hover: {\n type: Boolean,\n default: true\n }\n },\n computed: {\n iconClass() {\n return this.status === 'error' ? 'icon-warning' : 'icon-info';\n }\n }\n});\n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./LabeledTooltip.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./LabeledTooltip.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./LabeledTooltip.vue?vue&type=template&id=6fc47e64\"\nimport script from \"./LabeledTooltip.vue?vue&type=script&lang=ts\"\nexport * from \"./LabeledTooltip.vue?vue&type=script&lang=ts\"\nimport style0 from \"./LabeledTooltip.vue?vue&type=style&index=0&id=6fc47e64&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export function onClickOption(option, e) {\r\n if (!this.$attrs.multiple) {\r\n return;\r\n }\r\n\r\n const getValue = (opt) => (this.optionKey ? this.get(opt, this.optionKey) : this.getOptionLabel(opt));\r\n const optionValue = getValue(option);\r\n const value = this.value || [];\r\n const optionIndex = value.findIndex((option) => getValue(option) === optionValue);\r\n\r\n if (optionIndex < 0) {\r\n return;\r\n }\r\n\r\n this.value.splice(optionIndex, 1);\r\n\r\n this.$emit('input', this.value);\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n if (this.closeOnSelect) {\r\n this.$refs['select-input'].closeSearchOptions();\r\n }\r\n}\r\n\r\n// This is a simpler positionner for the dropdown for a select control\r\n// We used to use popper for these, but it does not suppotr fractional pixel placements which\r\n// means the dropdown does not appear aligned to the control when placed in a column-based layout\r\nexport function calculatePosition(dropdownList, component, width, placement) {\r\n const selectEl = component.$parent.$el;\r\n const r = selectEl.getBoundingClientRect();\r\n const p = placement || 'bottom-start';\r\n const docHeight = document.body.offsetHeight;\r\n const bottom = docHeight - window.scrollY - r.y - 1;\r\n let top;\r\n\r\n // If placement is not at the top, then position if underneath\r\n if (!p.includes('top')) {\r\n // Position is bottom\r\n top = r.y + r.height - 1;\r\n\r\n // Check to see if the dropdown would fall off the screen, if so, try putting it above\r\n const end = top + dropdownList.offsetHeight;\r\n\r\n if (end > window.innerHeight) {\r\n top = undefined;\r\n } else {\r\n top += window.scrollY;\r\n }\r\n }\r\n\r\n if (!top) {\r\n dropdownList.style.bottom = `${ bottom }px`;\r\n dropdownList.classList.add('vs__dropdown-up');\r\n selectEl.classList.add('vs__dropdown-up');\r\n } else {\r\n dropdownList.style.top = `${ top }px`;\r\n dropdownList.classList.remove('vs__dropdown-up');\r\n selectEl.classList.remove('vs__dropdown-up');\r\n }\r\n\r\n dropdownList.style.left = `${ r.x }px`;\r\n dropdownList.style.width = 'min-content';\r\n dropdownList.style.minWidth = `${ r.width }px`;\r\n}\r\n","\n\n\n \n \n \n \n \n\n\n\n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./LabeledSelect.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./LabeledSelect.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./LabeledSelect.vue?vue&type=template&id=529406d8&scoped=true\"\nimport script from \"./LabeledSelect.vue?vue&type=script&lang=js\"\nexport * from \"./LabeledSelect.vue?vue&type=script&lang=js\"\nimport style0 from \"./LabeledSelect.vue?vue&type=style&index=0&id=529406d8&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"529406d8\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n \n \n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./THead.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./THead.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./THead.vue?vue&type=template&id=36bf3081&scoped=true\"\nimport script from \"./THead.vue?vue&type=script&lang=js\"\nexport * from \"./THead.vue?vue&type=script&lang=js\"\nimport style0 from \"./THead.vue?vue&type=style&index=0&id=36bf3081&prod&lang=scss&scoped=true\"\nimport style1 from \"./THead.vue?vue&type=style&index=1&id=36bf3081&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"36bf3081\",\n null\n \n)\n\nexport default component.exports","import { get } from '@shell/utils/object';\nimport { addObject, addObjects, isArray, removeAt } from '@shell/utils/array';\n\nexport const ADV_FILTER_ALL_COLS_VALUE = 'allcols';\nexport const ADV_FILTER_ALL_COLS_LABEL = 'All Columns';\nconst LABEL_IDENTIFIER = ':::islabel';\n\nexport default {\n data() {\n return {\n searchQuery: null,\n previousFilter: null,\n previousResult: null,\n };\n },\n\n computed: {\n searchFields() {\n const out = columnsToSearchField(this.columns);\n\n if ( this.extraSearchFields ) {\n addObjects(out, this.extraSearchFields);\n }\n\n return out;\n },\n\n /*\n subFields: computed('subHeaders.@each.{searchField,name}', 'extraSearchSubFields.[]', function() {\n let out = headersToSearchField(get(this, 'subHeaders'));\n\n return out.addObjects(get(this, 'extraSearchSubFields') || []);\n }),\n */\n filteredRows() {\n // PROP hasAdvancedFiltering comes from Advanced Filtering mixin (careful changing data var there...)\n if (!this.hasAdvancedFiltering) {\n return this.handleFiltering();\n } else {\n return this.handleAdvancedFiltering();\n }\n },\n },\n\n methods: {\n handleAdvancedFiltering() {\n this.subMatches = null;\n\n if (this.searchQuery.length) {\n const out = (this.arrangedRows || []).slice();\n\n const res = out.filter((row) => {\n return this.searchQuery.every((f) => {\n if (f.prop === ADV_FILTER_ALL_COLS_VALUE) {\n // advFilterSelectOptions comes from Advanced Filtering mixin\n // remove the All Columns option from the list so that we don't iterate over it\n const allCols = this.advFilterSelectOptions.slice(1);\n let searchFields = [];\n\n allCols.forEach((col) => {\n if (col.value.includes('[') && col.value.includes(']')) {\n searchFields = searchFields.concat(JSON.parse(col.value));\n } else {\n // this means we are on the presence of a label, which should be dealt\n // carefully because of object path such row.metadata.labels.\"app.kubernetes.io/managed-by\n const value = col.isLabel ? `${ col.label }${ LABEL_IDENTIFIER }` : col.value;\n\n searchFields.push(value);\n }\n });\n\n return handleStringSearch(searchFields, [f.value], row);\n } else {\n if (f.prop.includes('[') && f.prop.includes(']')) {\n return handleStringSearch(JSON.parse(f.prop), [f.value], row);\n }\n\n let prop = f.prop;\n\n // this means we are on the presence of a label, which should be dealt\n // carefully because of object path such row.metadata.labels.\"app.kubernetes.io/managed-by\"\n if (f.prop.includes('metadata.labels')) {\n prop = `${ f.label }${ LABEL_IDENTIFIER }`;\n }\n\n return handleStringSearch([prop], [f.value], row);\n }\n });\n });\n\n return res;\n }\n\n // return arrangedRows array if we don't have anything to search for...\n return this.arrangedRows;\n },\n\n handleFiltering() {\n const searchText = (this.searchQuery || '').trim().toLowerCase();\n let out;\n\n if ( searchText && this.previousResult && searchText.startsWith(this.previousFilter) ) {\n // If the new search is an addition to the last one, we can start with the same set of results as last time\n // and filter those down, since adding more searchText can only reduce the number of results.\n out = this.previousResult.slice();\n } else {\n this.previousResult = null;\n out = (this.arrangedRows || []).slice();\n }\n\n this.previousFilter = searchText;\n\n if ( !searchText.length ) {\n this.subMatches = null;\n this.previousResult = null;\n\n return out;\n }\n\n const searchFields = this.searchFields;\n const searchTokens = searchText.split(/\\s*[, ]\\s*/);\n const subSearch = this.subSearch;\n const subFields = this.subFields;\n const subMatches = {};\n\n for ( let i = out.length - 1 ; i >= 0 ; i-- ) {\n const row = out[i];\n let hits = 0;\n let mainFound = true;\n\n mainFound = handleStringSearch(searchFields, searchTokens, row);\n\n if ( subFields && subSearch) {\n const subRows = row[subSearch] || [];\n\n for ( let k = subRows.length - 1 ; k >= 0 ; k-- ) {\n let subFound = true;\n\n subFound = handleStringSearch(subFields, searchTokens, row);\n\n if ( subFound ) {\n hits++;\n }\n }\n\n subMatches[get(row, this.keyField)] = hits;\n }\n\n if ( !mainFound && hits === 0 ) {\n removeAt(out, i);\n }\n }\n\n this.subMatches = subMatches;\n this.previousResult = out;\n\n return out;\n }\n },\n\n watch: {\n arrangedRows(q) {\n // The rows changed so the old filter result is no longer useful\n this.previousResult = null;\n }\n },\n};\n\nfunction columnsToSearchField(columns) {\n const out = [];\n\n (columns || []).forEach((column) => {\n const field = column.search;\n\n if ( field ) {\n if ( typeof field === 'string' ) {\n addObject(out, field);\n } else if ( isArray(field) ) {\n addObjects(out, field);\n }\n } else if ( field === false ) {\n // Don't add the name\n } else {\n // Use value/name as the default\n addObject(out, column.value || column.name);\n }\n });\n\n return out.filter((x) => !!x);\n}\n\nconst ipLike = /^[0-9a-f\\.:]+$/i;\n\nfunction handleStringSearch(searchFields, searchTokens, row) {\n for ( let j = 0 ; j < searchTokens.length ; j++ ) {\n let expect = true;\n let token = searchTokens[j];\n\n if ( token.substr(0, 1) === '!' ) {\n expect = false;\n token = token.substr(1);\n }\n\n if ( token && matches(searchFields, token, row) !== expect ) {\n return false;\n }\n\n return true;\n }\n}\n\nfunction matches(fields, token, item) {\n for ( let field of fields ) {\n if ( !field ) {\n continue;\n }\n\n // some items might not even have metadata.labels or metadata.labels.something... ignore those items. Nothing to filter by\n if (typeof field !== 'function' &&\n field.includes(LABEL_IDENTIFIER) &&\n (!item.metadata.labels || !item.metadata.labels[field.replace(LABEL_IDENTIFIER, '')])) {\n continue;\n }\n\n let modifier;\n let val;\n\n if (typeof field === 'function') {\n val = field(item);\n } else if (field.includes(LABEL_IDENTIFIER)) {\n val = item.metadata.labels[field.replace(LABEL_IDENTIFIER, '')];\n } else {\n const idx = field.indexOf(':');\n\n if ( idx > 0 ) {\n modifier = field.substr(idx + 1);\n field = field.substr(0, idx);\n }\n\n if ( field.includes('.') ) {\n val = get(item, field);\n } else {\n val = item[field];\n }\n }\n\n if ( val === undefined ) {\n continue;\n }\n\n val = (`${ val }`).toLowerCase();\n if ( !val ) {\n continue;\n }\n\n if ( !modifier ) {\n if ( val.includes((`${ token }`).toLowerCase()) ) {\n return true;\n }\n } else if ( modifier === 'exact' ) {\n if ( val === token ) {\n return true;\n }\n } else if ( modifier === 'ip' ) {\n const tokenMayBeIp = ipLike.test(token);\n\n if ( tokenMayBeIp ) {\n const re = new RegExp(`(?:^|\\\\.)${ token }(?:\\\\.|$)`);\n\n if ( re.test(val) ) {\n return true;\n }\n }\n } else if ( modifier === 'prefix' ) {\n if ( val.indexOf(token) === 0) {\n return true;\n }\n }\n }\n\n return false;\n}\n","import { sortBy } from '@shell/utils/sort';\nimport { addObject } from '@shell/utils/array';\n\nexport default {\n computed: {\n sortFields() {\n let fromGroup = ( this.groupBy ? this.groupSort || this.groupBy : null) || [];\n let fromColumn = [];\n\n const column = (this.columns || this.headers).find((x) => x && x.name && x.name.toLowerCase() === this.sortBy.toLowerCase());\n\n if ( this.sortBy && column && column.sort ) {\n fromColumn = column.sort;\n }\n\n if ( !Array.isArray(fromGroup) ) {\n fromGroup = [fromGroup];\n }\n\n if ( !Array.isArray(fromColumn) ) {\n fromColumn = [fromColumn];\n }\n\n const out = [...fromGroup, ...fromColumn];\n\n addObject(out, 'nameSort');\n addObject(out, 'id');\n\n return out;\n },\n\n arrangedRows() {\n let key;\n\n if ( this.sortGenerationFn ) {\n key = `${ this.sortGenerationFn.apply(this) }/${ this.rows.length }/${ this.descending }/${ this.sortFields.join(',') }`;\n\n if ( this.cacheKey === key ) {\n return this.cachedRows;\n }\n }\n\n const out = sortBy(this.rows, this.sortFields, this.descending);\n\n if ( key ) {\n this.cacheKey = key;\n this.cachedRows = out;\n }\n\n return out;\n },\n },\n\n data() {\n let sortBy = null;\n\n this._defaultSortBy = this.defaultSortBy;\n\n // Try to find a reasonable default sort\n if ( !this._defaultSortBy ) {\n const markedColumn = this.headers.find((x) => !!x.defaultSort);\n const nameColumn = this.headers.find( (x) => x.name === 'name');\n\n if ( markedColumn ) {\n this._defaultSortBy = markedColumn.name;\n } else if ( nameColumn ) {\n // Use the name column if there is one\n this._defaultSortBy = nameColumn.name;\n } else {\n // The first column that isn't state\n const first = this.headers.filter( (x) => x.name !== 'state' )[0];\n\n if ( first ) {\n this._defaultSortBy = first.name;\n } else {\n // I give up\n this._defaultSortBy = 'id';\n }\n }\n }\n\n // If the sort column doesn't exist or isn't specified, use default\n if ( !sortBy || !this.headers.find((x) => x.name === sortBy ) ) {\n sortBy = this._defaultSortBy;\n }\n\n return {\n sortBy,\n descending: false,\n cachedRows: null,\n cacheKey: null,\n };\n },\n\n methods: {\n changeSort(sort, desc) {\n this.sortBy = sort;\n this.descending = desc;\n\n // Always go back to the first page when the sort is changed\n this.setPage(1);\n },\n },\n};\n","import { ROWS_PER_PAGE } from '@shell/store/prefs';\n\nexport default {\n computed: {\n indexFrom() {\n return Math.max(0, 1 + this.perPage * (this.page - 1));\n },\n\n indexTo() {\n return Math.min(this.filteredRows.length, this.indexFrom + this.perPage - 1);\n },\n\n totalPages() {\n return Math.ceil(this.filteredRows.length / this.perPage );\n },\n\n showPaging() {\n return !this.loading && this.paging && this.totalPages > 1;\n },\n\n pagingDisplay() {\n const opt = {\n ...(this.pagingParams || {}),\n\n count: this.filteredRows.length,\n pages: this.totalPages,\n from: this.indexFrom,\n to: this.indexTo,\n };\n\n return this.$store.getters['i18n/t'](this.pagingLabel, opt);\n },\n\n pagedRows() {\n if ( this.paging ) {\n return this.filteredRows.slice(this.indexFrom - 1, this.indexTo);\n } else {\n return this.filteredRows;\n }\n }\n },\n\n data() {\n const perPage = this.getPerPage();\n\n return { page: 1, perPage };\n },\n\n watch: {\n pagedRows() {\n // Go to the last page if we end up \"past\" the last page because the table changed\n\n const from = this.indexFrom;\n const last = this.filteredRows.length;\n\n if ( this.totalPages > 0 && this.page > 1 && from > last ) {\n this.setPage(this.totalPages);\n }\n }\n },\n\n methods: {\n getPerPage() {\n // perPage can not change while the list is displayed\n let out = this.rowsPerPage || 0;\n\n if ( out <= 0 ) {\n out = parseInt(this.$store.getters['prefs/get'](ROWS_PER_PAGE), 10) || 0;\n }\n\n // This should ideally never happen, but the preference value could be invalid, so return something...\n if ( out <= 0 ) {\n out = 10;\n }\n\n return out;\n },\n\n setPage(num) {\n if (this.page === num) {\n return;\n }\n\n this.page = num;\n },\n\n goToPage(which) {\n let page;\n\n switch (which) {\n case 'first':\n page = 1;\n break;\n case 'prev':\n page = Math.max(1, this.page - 1 );\n break;\n case 'next':\n page = Math.min(this.totalPages, this.page + 1 );\n break;\n case 'last':\n page = this.totalPages;\n break;\n }\n\n this.setPage(page);\n },\n\n getPageByRow(rowId, getRowId = (x) => x) {\n const pos = this.filteredRows.map(getRowId).indexOf(rowId);\n\n if (pos === -1) {\n return null;\n }\n\n return Math.ceil(pos / this.perPage);\n }\n }\n};\n","import { get } from '@shell/utils/object';\n\nexport default {\n computed: {\n groupedRows() {\n const groupKey = this.groupBy;\n const refKey = this.groupRef || groupKey;\n\n if ( !groupKey) {\n return [{\n key: 'default',\n ref: 'default',\n rows: this.pagedRows,\n }];\n }\n\n const out = [];\n const map = {};\n\n for ( const obj of this.pagedRows ) {\n const key = get(obj, groupKey) || '';\n const ref = get(obj, refKey);\n let entry = map[key];\n\n if ( entry ) {\n entry.rows.push(obj);\n } else {\n entry = {\n key,\n ref,\n rows: [obj]\n };\n map[key] = entry;\n out.push(entry);\n }\n }\n\n return out;\n }\n }\n};\n","import debounce from 'lodash/debounce';\n\n// Use a visible display type to reduce flickering\nconst displayType = 'inline-block';\n\nexport default {\n\n data() {\n return {\n bulkActionsClass: 'bulk',\n bulkActionClass: 'bulk-action',\n bulkActionsDropdownClass: 'bulk-actions-dropdown',\n bulkActionAvailabilityClass: 'action-availability',\n\n hiddenActions: [],\n\n updateHiddenBulkActions: debounce(this.protectedUpdateHiddenBulkActions, 10)\n };\n },\n\n beforeDestroy() {\n window.removeEventListener('resize', this.onWindowResize);\n },\n\n mounted() {\n window.addEventListener('resize', this.onWindowResize);\n this.updateHiddenBulkActions();\n },\n\n watch: {\n selectedRows() {\n this.updateHiddenBulkActions();\n },\n keyedAvailableActions() {\n this.updateHiddenBulkActions();\n },\n },\n\n computed: {\n availableActions() {\n return this.bulkActionsForSelection.filter((act) => !act.external);\n },\n\n keyedAvailableActions() {\n return this.availableActions.map((aa) => aa.action);\n },\n\n selectedRowsText() {\n if (!this.selectedRows.length) {\n return null;\n }\n\n return this.t('sortableTable.actionAvailability.selected', { actionable: this.selectedRows.length });\n },\n\n // Shows a tooltip if the bulk action that the user is hovering over can not be applied to all selected rows\n actionTooltip() {\n if (!this.selectedRows.length || !this.actionOfInterest) {\n return null;\n }\n\n const runnableTotal = this.selectedRows.filter(this.canRunBulkActionOfInterest).length;\n\n if (runnableTotal === this.selectedRows.length) {\n return null;\n }\n\n return this.t('sortableTable.actionAvailability.some', {\n actionable: runnableTotal,\n total: this.selectedRows.length,\n });\n },\n },\n\n methods: {\n onWindowResize() {\n this.updateHiddenBulkActions();\n this.onScroll();\n },\n\n /**\n * Determine if any actions wrap over to a new line, if so group them into a dropdown instead\n */\n protectedUpdateHiddenBulkActions() {\n if (!this.$refs.container) {\n return;\n }\n\n const actionsContainer = this.$refs.container.querySelector(`.${ this.bulkActionsClass }`);\n const actionsDropdown = this.$refs.container.querySelector(`.${ this.bulkActionsDropdownClass }`);\n\n if (!actionsContainer || !actionsDropdown) {\n return;\n }\n\n const actionsContainerWidth = actionsContainer.offsetWidth;\n const actionsHTMLCollection = this.$refs.container.querySelectorAll(`.${ this.bulkActionClass }`);\n const actions = Array.from(actionsHTMLCollection || []);\n\n // Determine if the 'x selected' label should show and it's size\n const selectedRowsText = this.$refs.container.querySelector(`.${ this.bulkActionAvailabilityClass }`);\n let selectedRowsTextWidth = 0;\n\n if (this.selectedRowsText) {\n if (selectedRowsText) {\n selectedRowsText.style.display = displayType;\n selectedRowsTextWidth = selectedRowsText.offsetWidth;\n } else {\n selectedRowsText.style.display = 'none;';\n }\n }\n\n this.hiddenActions = [];\n\n let cumulativeWidth = 0;\n let showActionsDropdown = false;\n let totalAvailableWidth = actionsContainerWidth - selectedRowsTextWidth;\n\n // Loop through all actions to determine if some exceed the available space in the row, if so hide them and instead show in a dropdown\n for (let i = 0; i < actions.length; i++) {\n const ba = actions[i];\n\n ba.style.display = displayType;\n const actionWidth = ba.offsetWidth;\n\n cumulativeWidth += actionWidth + 15;\n if (cumulativeWidth >= totalAvailableWidth) {\n // There are too many actions so the drop down will be visible.\n if (!showActionsDropdown) {\n // If we haven't previously enabled the drop down...\n actionsDropdown.style.display = displayType;\n // By showing the drop down some previously visible actions may now be hidden, so start the process again\n // ... except taking into account the width of drop down width in the available space\n i = -1;\n cumulativeWidth = 0;\n showActionsDropdown = true;\n totalAvailableWidth = actionsContainerWidth - actionsDropdown.offsetWidth - selectedRowsTextWidth;\n } else {\n // Collate the actions in an array and hide in the normal row\n const id = ba.attributes.getNamedItem('id').value;\n\n this.hiddenActions.push(this.availableActions.find((aa) => aa.action === id));\n ba.style.display = 'none';\n }\n }\n }\n\n if (!showActionsDropdown) {\n actionsDropdown.style.display = 'none';\n }\n }\n }\n};\n","import { ADV_FILTER_ALL_COLS_VALUE, ADV_FILTER_ALL_COLS_LABEL } from './filtering';\n\nconst DEFAULT_ADV_FILTER_COLS_VALUE = ADV_FILTER_ALL_COLS_VALUE;\n\nexport default {\n props: {\n /**\n * Group value\n * To be used on the THead component when adv filtering is present\n */\n group: {\n type: String,\n default: () => ''\n },\n /**\n * Group options\n * All of the grouping options available to be used on the THead component when adv filtering is present\n */\n groupOptions: {\n type: Array,\n default: () => []\n },\n /**\n * Flag that controls visibility of advanced filtering feature\n */\n hasAdvancedFiltering: {\n type: Boolean,\n default: false\n },\n /**\n * Flag that controls visibility of labels as possibe toggable cols to be displayed on the Sortable Table\n */\n advFilterHideLabelsAsCols: {\n type: Boolean,\n default: false\n },\n /**\n * Flag that prevents filtering by labels\n */\n advFilterPreventFilteringLabels: {\n type: Boolean,\n default: false\n },\n },\n data() {\n return {\n columnOptions: [],\n colOptionsWatcher: null,\n advancedFilteringVisibility: false,\n advancedFilteringValues: [],\n advFilterSearchTerm: null,\n advFilterSelectedProp: DEFAULT_ADV_FILTER_COLS_VALUE,\n advFilterSelectedLabel: ADV_FILTER_ALL_COLS_LABEL,\n column: null,\n };\n },\n\n mounted() {\n if (this.hasAdvancedFiltering) {\n // trigger to first populate the cols options for filters\n this.updateColsOptions();\n }\n },\n\n watch: {\n advancedFilteringValues() {\n // passing different dummy args to make sure update is triggered\n this.watcherUpdateLiveAndDelayed(true, false);\n },\n advancedFilteringVisibility(neu) {\n if (neu) {\n // check if user clicked outside the advanced filter box\n window.addEventListener('click', this.onClickOutside);\n\n // update filtering options and toggable cols every time dropdown is open\n this.updateColsOptions();\n } else {\n // unregister click event\n window.removeEventListener('click', this.onClickOutside);\n }\n }\n },\n\n computed: {\n advFilterSelectOptions() {\n return this.columnOptions.filter((c) => c.isFilter && !c.preventFiltering);\n },\n\n advGroupOptions() {\n return this.groupOptions.map((item) => {\n return {\n label: this.t(item.tooltipKey),\n value: item.value\n };\n });\n },\n },\n\n methods: {\n handleColsVisibilyAndFiltering(cols) {\n const allCols = cols;\n\n this.columnOptions.forEach((advCol) => {\n if (advCol.isTableOption) {\n const index = allCols.findIndex((col) => col.name === advCol.name);\n\n if (index !== -1) {\n allCols[index].isColVisible = advCol.isColVisible;\n allCols[index].isFilter = advCol.isFilter;\n } else {\n allCols.push(advCol);\n }\n }\n });\n\n return allCols;\n },\n // advanced filtering methods\n setColsOptions() {\n let opts = [];\n const rowLabels = [];\n const headerProps = [];\n\n // Filter out any columns that are too heavy to show for large page sizes\n const filteredHeaders = this.headers.slice().filter((c) => (!c.maxPageSize || (c.maxPageSize && c.maxPageSize >= this.perPage)));\n\n // add table cols from config (headers)\n filteredHeaders.forEach((prop) => {\n const name = prop.name;\n const label = prop.labelKey ? this.t(`${ prop.labelKey }`) : prop.label;\n const isFilter = !!((!Object.keys(prop).includes('search') || prop.search));\n let sortVal = prop.sort;\n const valueProp = prop.valueProp || prop.value;\n let value = null;\n let isColVisible = true;\n\n if (prop.sort && valueProp) {\n if (typeof prop.sort === 'string') {\n sortVal = prop.sort.includes(':') ? [prop.sort.split(':')[0]] : [prop.sort];\n }\n\n if (!sortVal.includes(valueProp)) {\n value = JSON.stringify(sortVal.concat([valueProp]));\n } else {\n value = JSON.stringify([valueProp]);\n }\n } else if (valueProp) {\n value = JSON.stringify([valueProp]);\n } else {\n value = null;\n }\n\n // maintain current visibility of cols if they exist already\n if (this.columnOptions?.length) {\n const opt = this.columnOptions.find((colOpt) => colOpt.name === name && colOpt.label === label);\n\n if (opt) {\n isColVisible = opt.isColVisible;\n }\n }\n\n headerProps.push({\n name,\n label,\n value,\n isFilter,\n isTableOption: true,\n isColVisible\n });\n });\n\n // add labels as table cols\n if (this.rows.length) {\n this.rows.forEach((row) => {\n if (row.metadata?.labels && Object.keys(row.metadata?.labels).length) {\n Object.keys(row.metadata?.labels).forEach((label) => {\n const res = {\n name: label,\n label,\n value: `metadata.labels.${ label }`,\n isFilter: true,\n isTableOption: true,\n isColVisible: false,\n isLabel: true,\n preventFiltering: this.advFilterPreventFilteringLabels,\n preventColToggle: this.advFilterHideLabelsAsCols\n };\n\n // maintain current visibility of cols if they exist already\n if (this.columnOptions?.length) {\n const opt = this.columnOptions.find((colOpt) => colOpt.name === label && colOpt.label === label);\n\n if (opt) {\n res.isColVisible = opt.isColVisible;\n }\n }\n\n if (!rowLabels.filter((row) => row.label === label).length) {\n rowLabels.push(res);\n }\n });\n }\n });\n }\n\n opts = headerProps.concat(rowLabels);\n\n // add find on all cols option...\n if (opts.length) {\n opts.unshift({\n name: ADV_FILTER_ALL_COLS_LABEL,\n label: ADV_FILTER_ALL_COLS_LABEL,\n value: ADV_FILTER_ALL_COLS_VALUE,\n isFilter: true,\n isTableOption: false\n });\n }\n\n return opts;\n },\n addAdvancedFilter() {\n // set new advanced filter\n if (this.advFilterSelectedProp && this.advFilterSearchTerm) {\n this.advancedFilteringValues.push({\n prop: this.advFilterSelectedProp,\n value: this.advFilterSearchTerm,\n label: this.advFilterSelectedLabel\n });\n\n this.eventualSearchQuery = this.advancedFilteringValues;\n\n this.advancedFilteringVisibility = false;\n this.advFilterSelectedProp = DEFAULT_ADV_FILTER_COLS_VALUE;\n this.advFilterSelectedLabel = ADV_FILTER_ALL_COLS_LABEL;\n this.advFilterSearchTerm = null;\n }\n },\n clearAllAdvancedFilters() {\n this.advancedFilteringValues = [];\n this.eventualSearchQuery = this.advancedFilteringValues;\n\n this.advancedFilteringVisibility = false;\n this.advFilterSelectedProp = DEFAULT_ADV_FILTER_COLS_VALUE;\n this.advFilterSelectedLabel = ADV_FILTER_ALL_COLS_LABEL;\n this.advFilterSearchTerm = null;\n },\n clearAdvancedFilter(index) {\n this.advancedFilteringValues.splice(index, 1);\n this.eventualSearchQuery = this.advancedFilteringValues;\n },\n onClickOutside(event) {\n const advFilterBox = this.$refs['advanced-filter-group'];\n\n if (!advFilterBox || advFilterBox.contains(event.target)) {\n return;\n }\n this.advancedFilteringVisibility = false;\n },\n updateColsOptions() {\n this.columnOptions = this.setColsOptions();\n },\n\n // cols visibility\n changeColVisibility(colData) {\n const index = this.columnOptions.findIndex((col) => col.label === colData.label);\n\n if (index !== -1) {\n this.columnOptions[index].isColVisible = colData.value;\n }\n },\n },\n};\n","\n\n\n\n \n\n \n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--14-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=940c6fb8&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=940c6fb8&prod&lang=scss&scoped=true\"\nimport style1 from \"./index.vue?vue&type=style&index=1&id=940c6fb8&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"940c6fb8\",\n null\n \n)\n\nexport default component.exports","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"checkbox-outer-container\",attrs:{\"data-checkbox-ctrl\":\"\"}},[_c('label',{staticClass:\"checkbox-container\",class:{ 'disabled': _vm.isDisabled},attrs:{\"for\":_vm.id},on:{\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;$event.preventDefault();return _vm.clicked($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"space\",32,$event.key,[\" \",\"Spacebar\"]))return null;$event.preventDefault();return _vm.clicked($event)}],\"click\":function($event){return _vm.clicked($event)}}},[_c('input',{attrs:{\"type\":\"checkbox\",\"tabindex\":-1,\"name\":_vm.id},domProps:{\"checked\":_vm.isChecked,\"value\":_vm.valueWhenTrue},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();}}}),_c('span',{staticClass:\"checkbox-custom\",class:{indeterminate: _vm.indeterminate},attrs:{\"tabindex\":_vm.isDisabled ? -1 : 0,\"aria-label\":_vm.label,\"aria-checked\":!!_vm.value,\"role\":\"checkbox\"}}),(_vm.$slots.label || _vm.label || _vm.labelKey || _vm.tooltipKey || _vm.tooltip)?_c('span',{staticClass:\"checkbox-label\",class:{ 'checkbox-primary': _vm.primary }},[_vm._t(\"label\",function(){return [(_vm.labelKey)?_c('t',{attrs:{\"k\":_vm.labelKey,\"raw\":true}}):(_vm.label)?[_vm._v(_vm._s(_vm.label))]:_vm._e(),(_vm.tooltipKey)?_c('i',{directives:[{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.t(_vm.tooltipKey)),expression:\"t(tooltipKey)\"}],staticClass:\"checkbox-info icon icon-info icon-lg\"}):(_vm.tooltip)?_c('i',{directives:[{name:\"clean-tooltip\",rawName:\"v-clean-tooltip\",value:(_vm.tooltip),expression:\"tooltip\"}],staticClass:\"checkbox-info icon icon-info icon-lg\"}):_vm._e()]})],2):_vm._e()]),(_vm.descriptionKey || _vm.description)?_c('div',{staticClass:\"checkbox-outer-container-description\"},[(_vm.descriptionKey)?_c('t',{attrs:{\"k\":_vm.descriptionKey}}):(_vm.description)?[_vm._v(\" \"+_vm._s(_vm.description)+\" \")]:_vm._e()],2):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue, { PropType } from 'vue';\nimport { _EDIT, _VIEW } from '@shell/config/query-params';\nimport { addObject, removeObject } from '@shell/utils/array';\nimport cloneDeep from 'lodash/cloneDeep';\n\nexport default Vue.extend({\n name: 'Checkbox',\n\n props: {\n /**\n * The checkbox value.\n */\n value: {\n type: [Boolean, Array, String] as PropType,\n default: false\n },\n\n /**\n * The checkbox label.\n */\n label: {\n type: String,\n default: null\n },\n\n /**\n * The i18n key to use for the checkbox label.\n */\n labelKey: {\n type: String,\n default: null\n },\n\n /**\n * Random ID generated for binding label to input.\n */\n id: {\n type: String,\n default: String(Math.random() * 1000)\n },\n\n /**\n * Disable the checkbox.\n */\n disabled: {\n type: Boolean,\n default: false\n },\n\n /**\n * Display an indeterminate state. Useful for cases where a checkbox might\n * be the parent to child checkboxes, and we need to show that a subset of\n * children are checked.\n */\n indeterminate: {\n type: Boolean,\n default: false\n },\n\n /**\n * The checkbox editing mode.\n * @values _EDIT, _VIEW\n */\n mode: {\n type: String,\n default: _EDIT\n },\n\n /**\n * The contents of the checkbox tooltip.\n */\n tooltip: {\n type: [String, Object],\n default: null\n },\n\n /**\n * The i18n key to use for the checkbox tooltip.\n */\n tooltipKey: {\n type: String,\n default: null\n },\n\n /**\n * A custom value to use when the checkbox is checked.\n */\n valueWhenTrue: {\n type: [Boolean, String, Number],\n default: true\n },\n\n /**\n * The i18n key to use for the checkbox description.\n */\n descriptionKey: {\n type: String,\n default: null\n },\n\n /**\n * The checkbox description.\n */\n description: {\n type: String,\n default: null\n },\n\n /**\n * Primary checkbox displays label so that it stands out more\n */\n primary: {\n type: Boolean,\n default: false\n },\n },\n\n computed: {\n /**\n * Determines if the checkbox is disabled.\n * @returns boolean: True when the disabled prop is true or when mode is\n * View.\n */\n isDisabled(): boolean {\n return (this.disabled || this.mode === _VIEW);\n },\n /**\n * Determines if the checkbox is checked when using custom values or\n * multiple values.\n * @returns boolean: True when at least one value is true in a collection or\n * when value matches `this.valueWhenTrue`.\n */\n isChecked(): boolean {\n return this.isMulti(this.value) ? this.findTrueValues(this.value) : this.value === this.valueWhenTrue;\n }\n },\n\n methods: {\n /**\n * Toggles the checked state for the checkbox and emits an 'input' event.\n */\n clicked(event: MouseEvent): boolean | void {\n if ((event.target as HTMLLinkElement).tagName === 'A' && (event.target as HTMLLinkElement).href) {\n // Ignore links inside the checkbox label so you can click them\n return true;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n if (this.isDisabled) {\n return;\n }\n\n const customEvent = {\n bubbles: true,\n cancelable: false,\n shiftKey: event.shiftKey,\n altKey: event.altKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey\n };\n\n const click = new CustomEvent('click', customEvent);\n\n // Flip the value\n const value = cloneDeep(this.value);\n\n if (this.isMulti(value)) {\n if (this.isChecked) {\n removeObject(value, this.valueWhenTrue);\n } else {\n addObject(value, this.valueWhenTrue);\n }\n this.$emit('input', value);\n } else if (this.isString(this.valueWhenTrue)) {\n if (this.isChecked) {\n this.$emit('input', null);\n } else {\n this.$emit('input', this.valueWhenTrue);\n }\n } else {\n this.$emit('input', !value);\n this.$el.dispatchEvent(click);\n }\n },\n\n /**\n * Determines if there are multiple values for the checkbox.\n */\n isMulti(value: boolean | boolean[] | string): value is boolean[] {\n return Array.isArray(value);\n },\n\n isString(value: boolean | number | string): value is boolean {\n return typeof value === 'string';\n },\n\n /**\n * Finds the first true value for multiple checkboxes.\n * @param value A collection of values for the checkbox.\n */\n findTrueValues(value: boolean[]): boolean {\n return value.find((v) => v === this.valueWhenTrue) || false;\n }\n }\n});\n","import mod from \"-!../../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../../thread-loader/dist/cjs.js!../../../../../babel-loader/lib/index.js!../../../../../ts-loader/index.js??ref--15-3!../../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Checkbox.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../../thread-loader/dist/cjs.js!../../../../../babel-loader/lib/index.js!../../../../../ts-loader/index.js??ref--15-3!../../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Checkbox.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Checkbox.vue?vue&type=template&id=1fdb6d7b\"\nimport script from \"./Checkbox.vue?vue&type=script&lang=ts\"\nexport * from \"./Checkbox.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Checkbox.vue?vue&type=style&index=0&id=1fdb6d7b&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".cluster-list-view[data-v-56771e1c]{margin-bottom:2rem}.cluster-list-view .favorite-icon[data-v-56771e1c]{margin-right:1rem;background:none}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Loading.vue?vue&type=template&id=23723280&scoped=true\"\nimport script from \"./Loading.vue?vue&type=script&lang=js\"\nexport * from \"./Loading.vue?vue&type=script&lang=js\"\nimport style0 from \"./Loading.vue?vue&type=style&index=0&id=23723280&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23723280\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.app)?_c('Card',{staticClass:\"app-launcher-card\",attrs:{\"show-highlight-border\":false,\"sticky\":true},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('div',{staticStyle:{\"width\":\"100%\"}},[_c('p',{staticStyle:{\"font-size\":\"1.2rem\"}},[_vm._v(\" \"+_vm._s(_vm.app.metadata?.name)+\" \")]),_c('div',{staticStyle:{\"color\":\"var(--input-label)\",\"display\":\"flex\",\"justify-content\":\"space-between\",\"margin-top\":\"4px\"}},[(_vm.app.kind === 'Service' && _vm.app.metadata?.labels?.['app.kubernetes.io/version'] !== undefined)?_c('p',[_vm._v(\" \"+_vm._s(_vm.kubernetesVersion)+\" \")]):_vm._e(),(_vm.app.kind === 'Service' && _vm.app.metadata?.labels?.['helm.sh/chart'] !== undefined)?_c('p',[_vm._v(\" \"+_vm._s(_vm.helmChart)+\" \")]):_vm._e(),(_vm.app.kind === 'Ingress')?_c('p',[_vm._v(\" Ingress \")]):_vm._e()])])]},proxy:true},{key:\"body\",fn:function(){return [(_vm.app.kind === 'Service')?_c('p',[_vm._v(\" \"+_vm._s((_vm.isGlobalApp || _vm.isFavorited) && _vm.isInGlobalView ? `${_vm.app.clusterName}/` : '')+_vm._s(_vm.namespace)+\"/\"+_vm._s(_vm.name)+\" \")]):_vm._e(),(_vm.app.kind === 'Ingress')?_c('p',[_vm._v(\" \"+_vm._s((_vm.isGlobalApp || _vm.isFavorited) && _vm.isInGlobalView ? `${_vm.app.clusterName}: ` : '')+_vm._s(_vm.ingressPath)+\" \")]):_vm._e()]},proxy:true},{key:\"actions\",fn:function(){return [(!_vm.isGlobalApp)?_c('button',{staticClass:\"icon-button\",on:{\"click\":_vm.toggleFavorite}},[_c('i',{class:['icon', _vm.isFavorited ? 'icon-star' : 'icon-star-open']})]):_c('i',{staticClass:\"icon icon-globe icon-only\"}),((_vm.endpoints?.length ?? 0) <= 1 && _vm.app.kind === 'Service')?_c('a',{staticClass:\"btn role-primary\",attrs:{\"disabled\":!_vm.endpoints?.length,\"href\":_vm.endpoints[0]?.value,\"target\":\"_blank\",\"rel\":\"noopener noreferrer nofollow\",\"title\":_vm.endpoints?.length === 0 ? _vm.t('appLauncher.noEndpointFoundForApp') : _vm.t('appLauncher.launchEndpoint', {\n endpoint: _vm.endpoints[0].label,\n })}},[_vm._v(\" \"+_vm._s(_vm.t('appLauncher.launch'))+\" \")]):(_vm.app.kind === 'Ingress')?_c('a',{staticClass:\"btn role-primary\",attrs:{\"href\":_vm.ingressPath,\"target\":\"_blank\",\"rel\":\"noopener noreferrer nofollow\"}},[_vm._v(\" \"+_vm._s(_vm.t('appLauncher.launch'))+\" \")]):_c('ButtonDropDown',{attrs:{\"button-label\":_vm.t('appLauncher.launch'),\"dropdown-options\":_vm.endpoints,\"title\":_vm.t('appLauncher.launchAnEndpointFromSelection')},on:{\"click-action\":(o) => _vm.openLink(o.value)}})]},proxy:true}],null,false,345375573)}):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"card-container\",class:{'highlight-border': _vm.showHighlightBorder, 'card-sticky': _vm.sticky},attrs:{\"data-testid\":\"card\"}},[_c('div',{staticClass:\"card-wrap\"},[_c('div',{staticClass:\"card-title\",attrs:{\"data-testid\":\"card-title-slot\"}},[_vm._t(\"title\",function(){return [_vm._v(\" \"+_vm._s(_vm.title)+\" \")]})],2),_c('hr'),_c('div',{staticClass:\"card-body\",attrs:{\"data-testid\":\"card-body-slot\"}},[_vm._t(\"body\",function(){return [_vm._v(\" \"+_vm._s(_vm.content)+\" \")]})],2),(_vm.showActions)?_c('div',{staticClass:\"card-actions\",attrs:{\"data-testid\":\"card-actions-slot\"}},[_vm._t(\"actions\",function(){return [_c('button',{staticClass:\"btn role-primary\",on:{\"click\":_vm.buttonAction}},[_vm._v(\" \"+_vm._s(_vm.buttonText)+\" \")])]})],2):_vm._e()])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue';\n\nexport default Vue.extend({\n name: 'Card',\n props: {\n /**\n * The card's title.\n */\n title: {\n type: String,\n default: ''\n },\n /**\n * The text content for the card's body.\n */\n content: {\n type: String,\n default: ''\n },\n /**\n * The function to invoke when the default action button is clicked.\n */\n buttonAction: {\n type: Function,\n default: (): void => { }\n },\n /**\n * The text for the default action button.\n */\n buttonText: {\n type: String,\n default: 'go'\n },\n /**\n * Toggles the card's highlight-border class.\n */\n showHighlightBorder: {\n type: Boolean,\n default: true\n },\n /**\n * Toggles the card's Actions section.\n */\n showActions: {\n type: Boolean,\n default: true\n },\n sticky: {\n type: Boolean,\n default: false,\n },\n }\n});\n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Card.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Card.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Card.vue?vue&type=template&id=6b7b8e40\"\nimport script from \"./Card.vue?vue&type=script&lang=ts\"\nexport * from \"./Card.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Card.vue?vue&type=style&index=0&id=6b7b8e40&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('v-select',_vm._b({ref:\"button-dropdown\",staticClass:\"button-dropdown btn\",class:{\n disabled: _vm.disabled,\n focused: _vm.focused,\n },attrs:{\"append-to-body\":true,\"calculate-position\":_vm.withPopper,\"searchable\":false,\"clearable\":false,\"close-on-select\":_vm.closeOnSelect,\"filterable\":false,\"value\":_vm.buttonLabel,\"options\":_vm.dropdownOptions,\"map-keydown\":_vm.mappedKeys,\"get-option-key\":(opt) => (_vm.optionKey ? _vm.get(opt, _vm.optionKey) : _vm.getOptionLabel(opt)),\"get-option-label\":(opt) => _vm.getOptionLabel(opt),\"selectable\":_vm.selectable},on:{\"search:blur\":_vm.onBlur,\"search:focus\":_vm.onFocus,\"input\":function($event){return _vm.$emit('click-action', $event)}},scopedSlots:_vm._u([{key:\"selected-option\",fn:function(option){return [_c('button',{staticClass:\"dropdown-button-two btn\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"},on:{\"click\":function($event){return _vm.ddButtonAction(option)},\"focus\":_vm.focusSearch}},[_vm._v(\" \"+_vm._s(option.label)+\" \")])]}},_vm._l((_vm.$scopedSlots),function(_,slot){return {key:slot,fn:function(scope){return [(slot !== 'selected-option')?_vm._t(slot,null,null,scope):_vm._e()]}}})],null,true)},'v-select',_vm.$attrs,false),[_c('template',{slot:\"no-options\"},[_vm._t(\"no-options\")],2)],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export default function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n}","/*:: import type { Window } from '../types'; */\n\n/*:: declare function getWindow(node: Node | Window): Window; */\nexport default function getWindow(node) {\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getWindow from \"./getWindow.js\";\n/*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n Element); */\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n/*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n HTMLElement); */\n\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nexport { isElement, isHTMLElement };","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe: assume body is always available\n return (isElement(element) ? element.ownerDocument : element.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\"; // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","// Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\nexport default function getLayoutRect(element) {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || // DOM Element detected\n // $FlowFixMe: need a better way to handle this...\n element.host || // ShadowRoot detected\n // $FlowFixMe: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the \nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = getNodeName(scrollParent) === 'body';\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n var offsetParent = element.offsetParent;\n\n if (offsetParent) {\n var html = getDocumentElement(offsetParent);\n\n if (getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && getComputedStyle(html).position !== 'static') {\n return html;\n }\n }\n\n return offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static') {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, {\n options: Object.assign(Object.assign({}, existing.options), current.options),\n data: Object.assign(Object.assign({}, existing.data), current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nexport * from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = Math.floor(offsets[mainAxis]) - Math.floor(reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = Math.floor(offsets[mainAxis]) + Math.ceil(reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsets(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: Math.round(x * dpr) / dpr || 0,\n y: Math.round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive;\n\n var _roundOffsets = roundOffsets(offsets),\n x = _roundOffsets.x,\n y = _roundOffsets.y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n } // $FlowFixMe: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n /*:: offsetParent = (offsetParent: Element); */\n\n\n if (placement === top) {\n sideY = bottom;\n y -= offsetParent.clientHeight - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right;\n x -= offsetParent.clientWidth - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref3) {\n var state = _ref3.state,\n options = _ref3.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false\n })));\n }\n\n state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = element.ownerDocument.body;\n var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","export default function contains(parent, child) {\n // $FlowFixMe: hasOwnProperty doesn't seem to work in tests\n var isShadow = Boolean(child.getRootNode && child.getRootNode().host); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (isShadow) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign(Object.assign({}, rect), {}, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = Math.max(rect.top, accRect.top);\n accRect.right = Math.min(rect.right, accRect.right);\n accRect.bottom = Math.min(rect.bottom, accRect.bottom);\n accRect.left = Math.max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\n\n/*:: type OverflowsMap = { [ComputedPlacement]: number }; */\n\n/*;; type OverflowsMap = { [key in ComputedPlacement]: number }; */\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements; // $FlowFixMe\n\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","export default function within(min, value, max) {\n return Math.max(min, Math.min(value, max));\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(_min, _offset, _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = state.modifiersData[name + \"#persistent\"].padding;\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element,\n _options$padding = options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n state.modifiersData[name + \"#persistent\"] = {\n padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./index.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","\n\n\n \n\n\n\n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ButtonDropdown.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ButtonDropdown.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ButtonDropdown.vue?vue&type=template&id=4b526572&scoped=true\"\nimport script from \"./ButtonDropdown.vue?vue&type=script&lang=js\"\nexport * from \"./ButtonDropdown.vue?vue&type=script&lang=js\"\nimport style0 from \"./ButtonDropdown.vue?vue&type=style&index=0&id=4b526572&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4b526572\",\n null\n \n)\n\nexport default component.exports","import { SECRET, SERVICE } from '@shell/config/types';\nimport isUrl from 'is-url';\nimport { get } from '@shell/utils/object';\nimport isEmpty from 'lodash/isEmpty';\nimport SteveModel from '@shell/plugins/steve/steve-class';\n\nfunction tlsHosts(spec) {\n const tls = spec.tls || [];\n\n return tls.flatMap((tls) => tls.hosts || []);\n}\n\nfunction isTlsHost(spec, host) {\n return tlsHosts(spec).includes(host);\n}\n\nexport function ingressFullPath(resource, rule, path = {}) {\n const spec = resource.spec;\n const hostValue = rule.host || '';\n const pathValue = path.path || '';\n let protocol = '';\n\n if (hostValue) {\n protocol = isTlsHost(spec, hostValue) ? 'https://' : 'http://';\n }\n\n return `${ protocol }${ hostValue }${ pathValue }`;\n}\n\nexport default class Ingress extends SteveModel {\n get tlsHosts() {\n return tlsHosts(this.spec);\n }\n\n get isTlsHost() {\n return (host) => isTlsHost(this.spec, host);\n }\n\n targetTo(workloads, serviceName) {\n if (!serviceName) {\n return null;\n }\n\n const isTargetsWorkload = serviceName.startsWith('ingress-');\n const id = `${ this.namespace }/${ serviceName }`;\n\n if ( isTargetsWorkload ) {\n const workload = workloads.find((w) => w.id === (id));\n\n return workload?.detailLocation || '';\n } else {\n return {\n name: 'c-cluster-product-resource-namespace-id',\n params: {\n resource: SERVICE,\n id: serviceName,\n namespace: this.namespace,\n }\n };\n }\n }\n\n createRulesForListPage(workloads, certificates) {\n const rules = this.spec.rules || [];\n\n return rules.flatMap((rule) => {\n const paths = rule?.http?.paths || [];\n\n return paths.map((path) => this.createPathForListPage(workloads, rule, path, certificates));\n });\n }\n\n createPathForListPage(workloads, rule, path, certificates) {\n const serviceName = get(path?.backend, this.serviceNamePath);\n const fullPath = this.fullPath(rule, path);\n\n return {\n // isUrl thinks urls which contain '*' are valid so I'm adding an additional check for '*'\n isUrl: isUrl(fullPath) && !fullPath.includes('*'),\n pathType: path.pathType,\n fullPath,\n serviceName,\n serviceTargetTo: this.targetTo(workloads, serviceName),\n certs: this.certLinks(rule, certificates),\n targetLink: this.targetLink(workloads, serviceName),\n port: get(path?.backend, this.servicePortPath)\n };\n }\n\n fullPath(rule, path) {\n return ingressFullPath(this, rule, path);\n }\n\n certLink(cert, certificates = []) {\n const secretName = cert.secretName || this.t('ingress.rulesAndCertificates.defaultCertificate');\n let to;\n\n if (cert.secretName && certificates.includes(secretName)) {\n to = {\n name: 'c-cluster-product-resource-namespace-id',\n params: {\n resource: SECRET,\n id: secretName\n }\n };\n }\n\n return {\n to,\n text: secretName,\n options: { internal: true }\n };\n }\n\n certLinks(rule, certificates) {\n const certs = this.spec.tls || [];\n const matchingCerts = certs.filter((cert) => {\n const hosts = cert.hosts || [];\n\n return hosts.includes(rule.host);\n });\n\n return matchingCerts.map((cert) => this.certLink(cert, certificates));\n }\n\n targetLink(workloads, serviceName) {\n return {\n to: this.targetTo(workloads, serviceName),\n text: serviceName,\n options: { internal: true }\n };\n }\n\n createDefaultService(workloads) {\n const backend = get(this.spec, this.defaultBackendPath);\n const serviceName = get(backend, this.serviceNamePath);\n\n if ( !serviceName ) {\n return null;\n }\n\n return {\n name: serviceName,\n targetTo: this.targetTo(workloads, serviceName)\n };\n }\n\n get cache() {\n if (!this.cacheObject) {\n this.cacheObject = {};\n }\n\n return this.cacheObject;\n }\n\n get showPathType() {\n if (!this.cache.showPathType) {\n this.cache.showPathType = this.$rootGetters['cluster/pathExistsInSchema'](this.type, 'spec.rules.http.paths.pathType');\n }\n\n return this.cache.showPathType;\n }\n\n get useNestedBackendField() {\n if (!this.cache.useNestedBackendField) {\n this.cache.useNestedBackendField = this.$rootGetters['cluster/pathExistsInSchema'](this.type, 'spec.rules.http.paths.backend.service.name');\n }\n\n return this.cache.useNestedBackendField;\n }\n\n get serviceNamePath() {\n const nestedPath = 'service.name';\n const flatPath = 'serviceName';\n\n return this.useNestedBackendField ? nestedPath : flatPath;\n }\n\n get servicePortPath() {\n const nestedPath = 'service.port.number';\n const flatPath = 'servicePort';\n\n return this.useNestedBackendField ? nestedPath : flatPath;\n }\n\n get defaultBackendPath() {\n const defaultBackend = this.$rootGetters['cluster/pathExistsInSchema'](this.type, 'spec.defaultBackend');\n\n return defaultBackend ? 'defaultBackend' : 'backend';\n }\n\n get hasDefaultBackend() {\n return !isEmpty(this.spec[this.defaultBackendPath]);\n }\n\n get details() {\n const out = this._details;\n\n if (this.spec?.ingressClassName) {\n out.push({\n label: this.t('ingress.ingressClass.label'),\n content: this.spec.ingressClassName,\n });\n }\n\n return out;\n }\n}\n","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./AppLauncherCard.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./AppLauncherCard.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./AppLauncherCard.vue?vue&type=template&id=6e6b3554&scoped=true\"\nimport script from \"./AppLauncherCard.vue?vue&type=script&lang=js\"\nexport * from \"./AppLauncherCard.vue?vue&type=script&lang=js\"\nimport style0 from \"./AppLauncherCard.vue?vue&type=style&index=0&id=6e6b3554&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6e6b3554\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"cluster-actions\"},[_c('div',{staticClass:\"search-input\"},[_c('input',{attrs:{\"placeholder\":_vm.$store.getters['i18n/t']('appLauncher.filter')},domProps:{\"value\":_vm.searchQuery},on:{\"input\":function($event){return _vm.$emit('update:search-query', $event.target.value)}}})]),(_vm.isGridView)?_c('div',{staticClass:\"sort-buttons\",on:{\"click\":function($event){return _vm.$emit('toggle-sort')}}},[_c('div',{staticClass:\"sort-button\",class:{ active: _vm.sortOrder === 'asc' },attrs:{\"disabled\":_vm.sortOrder === 'asc'}},[_c('i',{staticClass:\"icon-chevron-up\"})]),_c('div',{staticClass:\"sort-label\"},[_c('p',[_vm._v(_vm._s(_vm.aToZorZtoA))])]),_c('div',{staticClass:\"sort-button\",class:{ active: _vm.sortOrder === 'desc' },attrs:{\"disabled\":_vm.sortOrder === 'desc'}},[_c('i',{staticClass:\"icon-chevron-down\"})])]):_vm._e(),_c('div',{staticClass:\"select-wrapper\"},[_c('select',{staticClass:\"cluster-select\",domProps:{\"value\":_vm.selectedCluster},on:{\"change\":function($event){return _vm.$emit('update:selected-cluster', $event.target.value)}}},_vm._l((_vm.clusterOptions),function(option){return _c('option',{key:option.value,domProps:{\"value\":option.value}},[_vm._v(\" \"+_vm._s(option.label)+\" \")])}),0)]),_c('button',{staticClass:\"icon-button\",on:{\"click\":function($event){return _vm.$emit('set-view', 'grid')}}},[_c('i',{staticClass:\"icon icon-apps\"})]),_c('button',{staticClass:\"icon-button\",on:{\"click\":function($event){return _vm.$emit('set-view', 'list')}}},[_c('i',{staticClass:\"icon icon-list-flat\"})])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterActions.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterActions.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ClusterActions.vue?vue&type=template&id=88f0655a&scoped=true\"\nimport script from \"./ClusterActions.vue?vue&type=script&lang=js\"\nexport * from \"./ClusterActions.vue?vue&type=script&lang=js\"\nimport style0 from \"./ClusterActions.vue?vue&type=style&index=0&id=88f0655a&prod&scoped=true&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"88f0655a\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"cluster-grid-view\"},[_c('div',{staticClass:\"cluster-header\"},[_c('h1',[_vm._v(\" \"+_vm._s(_vm.clusterData.name)+\" \")])]),_c('div',{staticClass:\"services-by-cluster-grid\"},_vm._l((_vm.clusterData.filteredApps),function(app){return _c('AppLauncherCard',{key:`${app.clusterId}-${app.id}-${app.kind}`,attrs:{\"app\":app,\"isInGlobalView\":false,\"favorited-apps\":_vm.favoritedApps},on:{\"toggle-favorite\":function($event){return _vm.$emit('toggle-favorite', $event)}}})}),1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterGridView.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterGridView.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ClusterGridView.vue?vue&type=template&id=1dd06ec8&scoped=true\"\nimport script from \"./ClusterGridView.vue?vue&type=script&lang=js\"\nexport * from \"./ClusterGridView.vue?vue&type=script&lang=js\"\nimport style0 from \"./ClusterGridView.vue?vue&type=style&index=0&id=1dd06ec8&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1dd06ec8\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"cluster-list-view\"},[_c('div',{staticClass:\"cluster-header\"},[_c('h1',[_vm._v(\" \"+_vm._s(_vm.clusterData.name)+\" \")])]),_c('SortableTable',{attrs:{\"rows\":_vm.clusterData.filteredApps,\"headers\":_vm.tableHeaders,\"row-key\":'uniqueId',\"search\":false,\"table-actions\":false,\"row-actions\":false,\"no-rows-text\":_vm.$store.getters['i18n/t']('appLauncher.noAppsFound')},scopedSlots:_vm._u([{key:\"cell:name\",fn:function({ row }){return [_vm._v(\" \"+_vm._s(row.metadata.name)+\" \")]}},{key:\"cell:namespace\",fn:function({ row }){return [_vm._v(\" \"+_vm._s(row.metadata.namespace)+\" \")]}},{key:\"cell:version\",fn:function({ row }){return [_vm._v(\" \"+_vm._s(row.metadata.labels?.['app.kubernetes.io/version'])+\" \")]}},{key:\"cell:helmChart\",fn:function({ row }){return [_vm._v(\" \"+_vm._s(row.metadata.labels?.['helm.sh/chart'])+\" \")]}},{key:\"cell:actions\",fn:function({ row }){return [_c('div',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"flex-end\"}},[_c('button',{staticClass:\"icon-button favorite-icon\",on:{\"click\":function($event){return _vm.$emit('toggle-favorite', row)}}},[_c('i',{class:['icon', _vm.isFavorited(row, _vm.favoritedApps) ? 'icon-star' : 'icon-star-open']})]),(_vm.getEndpoints(row)?.length <= 1)?_c('a',{staticClass:\"btn role-primary\",attrs:{\"href\":_vm.getEndpoints(row)[0]?.value,\"target\":\"_blank\",\"rel\":\"noopener noreferrer nofollow\"}},[_vm._v(\" \"+_vm._s(_vm.t('appLauncher.launch'))+\" \")]):_c('ButtonDropDown',{attrs:{\"button-label\":_vm.t('appLauncher.launch'),\"dropdown-options\":_vm.getEndpoints(row),\"title\":_vm.t('appLauncher.launchAnEndpointFromSelection')},on:{\"click-action\":_vm.openLink}})],1)]}}])})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterListView.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterListView.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ClusterListView.vue?vue&type=template&id=56771e1c&scoped=true\"\nimport script from \"./ClusterListView.vue?vue&type=script&lang=js\"\nexport * from \"./ClusterListView.vue?vue&type=script&lang=js\"\nimport style0 from \"./ClusterListView.vue?vue&type=style&index=0&id=56771e1c&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"56771e1c\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=22735813&scoped=true\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=22735813&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"22735813\",\n null\n \n)\n\nexport default component.exports","import Dashboard from '../pages/index.vue';\nimport { PRODUCT_NAME, BLANK_CLUSTER } from '../config/app-launcher';\n\nconst routes = [\n {\n name: `${ PRODUCT_NAME }-c-cluster`,\n path: `/${ PRODUCT_NAME }/c/:cluster`,\n component: Dashboard,\n meta: {\n product: PRODUCT_NAME,\n cluster: BLANK_CLUSTER,\n pkg: PRODUCT_NAME\n }\n }\n];\n\nexport default routes;","import { importTypes } from '@rancher/auto-import';\nimport { IPlugin } from '@shell/core/types';\nimport extensionRouting from './routing/extension-routing';\n\n// Init the package\nexport default function (plugin: IPlugin) {\n // Auto-import model, detail, edit from the folders\n importTypes(plugin);\n // Provide plugin metadata from package.json\n plugin.metadata = require('./package.json');\n // Load a product\n plugin.addProduct(require('./product'));\n // Add Vue routes\n plugin.addRoutes(extensionRouting);\n}\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","import { get } from './object';\nimport { strPad } from './string';\n\n// Based on https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/runtime/lib/type-of.js\n// and https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/runtime/lib/mixins/array.js\n/*\nCopyright (c) 2019 Yehuda Katz, Tom Dale and Ember.js contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n// ........................................\n// TYPING & ARRAY MESSAGING\n//\nconst TYPE_MAP = {\n '[object Boolean]': 'boolean',\n '[object Number]': 'number',\n '[object String]': 'string',\n '[object Function]': 'function',\n '[object Array]': 'array',\n '[object Date]': 'date',\n '[object RegExp]': 'regexp',\n '[object Object]': 'object',\n '[object FileList]': 'filelist',\n};\n\nconst { toString } = Object.prototype;\n\n/**\n Returns a consistent type for the passed object.\n\n Use this instead of the built-in `typeof` to get the type of an item.\n It will return the same result across all browsers and includes a bit\n more detail. Here is what will be returned:\n\n | Return Value | Meaning |\n |---------------|------------------------------------------------------|\n | 'string' | String primitive or String object. |\n | 'number' | Number primitive or Number object. |\n | 'boolean' | Boolean primitive or Boolean object. |\n | 'null' | Null value |\n | 'undefined' | Undefined value |\n | 'function' | A function |\n | 'array' | An instance of Array |\n | 'regexp' | An instance of RegExp |\n | 'date' | An instance of Date |\n | 'filelist' | An instance of FileList |\n | 'error' | An instance of the Error object |\n | 'object' | A JavaScript object |\n\n Examples:\n\n import { typeOf } from '@shell/utils/type-of';\n\n typeOf(); // 'undefined'\n typeOf(null); // 'null'\n typeOf(undefined); // 'undefined'\n typeOf('michael'); // 'string'\n typeOf(new String('michael')); // 'string'\n typeOf(101); // 'number'\n typeOf(new Number(101)); // 'number'\n typeOf(true); // 'boolean'\n typeOf(new Boolean(true)); // 'boolean'\n typeOf(A); // 'function'\n typeOf([1, 2, 90]); // 'array'\n typeOf(/abc/); // 'regexp'\n typeOf(new Date()); // 'date'\n typeOf(event.target.files); // 'filelist'\n typeOf(new Error('teamocil')); // 'error'\n\n // 'normal' JavaScript object\n typeOf({ a: 'b' }); // 'object'\n*/\nexport function typeOf(item) {\n if (item === null) {\n return 'null';\n }\n if (item === undefined) {\n return 'undefined';\n }\n let ret = TYPE_MAP[toString.call(item)] || 'object';\n\n if (ret === 'object') {\n if (item instanceof Error) {\n ret = 'error';\n } else if (item instanceof Date) {\n ret = 'date';\n }\n }\n\n return ret;\n}\n\nexport function spaceship(a, b) {\n const diff = a - b;\n\n return (diff > 0) - (diff < 0);\n}\n\nconst TYPE_ORDER = {\n undefined: 0,\n null: 1,\n boolean: 2,\n number: 3,\n string: 4,\n array: 5,\n object: 6,\n instance: 7,\n function: 8,\n class: 9,\n date: 10,\n};\n\nexport function compare(a, b) {\n const typeA = typeOf(a);\n const typeB = typeOf(b);\n\n const res = spaceship(TYPE_ORDER[typeA], TYPE_ORDER[typeB]);\n\n if ( res ) {\n return res;\n }\n\n switch (typeA) {\n case 'boolean':\n case 'number':\n return spaceship(a, b);\n\n case 'string':\n return spaceship(a.localeCompare(b), 0);\n\n case 'array': {\n const aLen = a.length;\n const bLen = b.length;\n const len = Math.min(aLen, bLen);\n\n for (let i = 0; i < len; i++) {\n const r = compare(a[i], b[i]);\n\n if (r !== 0) {\n return r;\n }\n }\n\n // all elements are equal now\n // shorter array should be ordered first\n return spaceship(aLen, bLen);\n }\n case 'date':\n return spaceship(a.getTime(), b.getTime());\n }\n\n return 0;\n}\n\nexport function parseField(str) {\n const parts = str.split(/:/);\n\n if ( parts.length === 2 && parts[1] === 'desc' ) {\n return { field: parts[0], reverse: true };\n } else {\n return { field: str, reverse: false };\n }\n}\n\nexport function sortBy(ary, keys, desc) {\n if ( !Array.isArray(keys) ) {\n keys = [keys];\n }\n\n return (ary || []).slice().sort((objA, objB) => {\n for ( let i = 0 ; i < keys.length ; i++ ) {\n const parsed = parseField(keys[i]);\n const a = get(objA, parsed.field);\n const b = get(objB, parsed.field);\n let res = compare(a, b);\n\n if ( res ) {\n if ( desc ) {\n res *= -1;\n }\n\n if ( parsed.reverse ) {\n res *= -1;\n }\n\n return res;\n }\n }\n\n return 0;\n });\n}\n\n// Turn foo1-bar2 into foo0000000001-bar0000000002 so that the numbers sort numerically\nconst splitRegex = /([^\\d]+)/;\nconst notNumericRegex = /^[0-9]+$/;\n\nexport function sortableNumericSuffix(str) {\n if ( typeof str !== 'string' ) {\n return str;\n }\n\n return str.split(splitRegex).map((x) => x.match(notNumericRegex) ? strPad(x, 10, '0') : x).join('').trim();\n}\n\nexport function isNumeric(num) {\n return !!`${ num }`.match(notNumericRegex);\n}\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".text.info[data-v-5050d908]{display:flex;align-items:center}.text.info>span[data-v-5050d908]{margin-right:5px}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".overlay[data-v-23723280]{align-items:center;background-color:var(--overlay-bg);display:flex;justify-content:center;position:absolute;bottom:0;top:0;left:0;right:0;text-align:center;z-index:51}.overlay-content-mode[data-v-23723280],.overlay-main-mode[data-v-23723280]{top:var(--header-height)}.overlay-content-mode[data-v-23723280]{left:calc(var(--nav-width))}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cronstrue\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cronstrue\"] = factory();\n\telse\n\t\troot[\"cronstrue\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar stringUtilities_1 = __webpack_require__(1);\nvar cronParser_1 = __webpack_require__(2);\nvar ExpressionDescriptor = (function () {\n function ExpressionDescriptor(expression, options) {\n this.expression = expression;\n this.options = options;\n this.expressionParts = new Array(5);\n if (ExpressionDescriptor.locales[options.locale]) {\n this.i18n = ExpressionDescriptor.locales[options.locale];\n }\n else {\n console.warn(\"Locale '\" + options.locale + \"' could not be found; falling back to 'en'.\");\n this.i18n = ExpressionDescriptor.locales[\"en\"];\n }\n if (options.use24HourTimeFormat === undefined) {\n options.use24HourTimeFormat = this.i18n.use24HourTimeFormatByDefault();\n }\n }\n ExpressionDescriptor.toString = function (expression, _a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, use24HourTimeFormat = _b.use24HourTimeFormat, _f = _b.locale, locale = _f === void 0 ? \"en\" : _f;\n var options = {\n throwExceptionOnParseError: throwExceptionOnParseError,\n verbose: verbose,\n dayOfWeekStartIndexZero: dayOfWeekStartIndexZero,\n use24HourTimeFormat: use24HourTimeFormat,\n locale: locale\n };\n var descripter = new ExpressionDescriptor(expression, options);\n return descripter.getFullDescription();\n };\n ExpressionDescriptor.initialize = function (localesLoader) {\n ExpressionDescriptor.specialCharacters = [\"/\", \"-\", \",\", \"*\"];\n localesLoader.load(ExpressionDescriptor.locales);\n };\n ExpressionDescriptor.prototype.getFullDescription = function () {\n var description = \"\";\n try {\n var parser = new cronParser_1.CronParser(this.expression, this.options.dayOfWeekStartIndexZero);\n this.expressionParts = parser.parse();\n var timeSegment = this.getTimeOfDayDescription();\n var dayOfMonthDesc = this.getDayOfMonthDescription();\n var monthDesc = this.getMonthDescription();\n var dayOfWeekDesc = this.getDayOfWeekDescription();\n var yearDesc = this.getYearDescription();\n description += timeSegment + dayOfMonthDesc + dayOfWeekDesc + monthDesc + yearDesc;\n description = this.transformVerbosity(description, this.options.verbose);\n description = description.charAt(0).toLocaleUpperCase() + description.substr(1);\n }\n catch (ex) {\n if (!this.options.throwExceptionOnParseError) {\n description = this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();\n }\n else {\n throw \"\" + ex;\n }\n }\n return description;\n };\n ExpressionDescriptor.prototype.getTimeOfDayDescription = function () {\n var secondsExpression = this.expressionParts[0];\n var minuteExpression = this.expressionParts[1];\n var hourExpression = this.expressionParts[2];\n var description = \"\";\n if (!stringUtilities_1.StringUtilities.containsAny(minuteExpression, ExpressionDescriptor.specialCharacters) &&\n !stringUtilities_1.StringUtilities.containsAny(hourExpression, ExpressionDescriptor.specialCharacters) &&\n !stringUtilities_1.StringUtilities.containsAny(secondsExpression, ExpressionDescriptor.specialCharacters)) {\n description += this.i18n.atSpace() + this.formatTime(hourExpression, minuteExpression, secondsExpression);\n }\n else if (!secondsExpression &&\n minuteExpression.indexOf(\"-\") > -1 &&\n !(minuteExpression.indexOf(\",\") > -1) &&\n !(minuteExpression.indexOf(\"/\") > -1) &&\n !stringUtilities_1.StringUtilities.containsAny(hourExpression, ExpressionDescriptor.specialCharacters)) {\n var minuteParts = minuteExpression.split(\"-\");\n description += stringUtilities_1.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(), this.formatTime(hourExpression, minuteParts[0], \"\"), this.formatTime(hourExpression, minuteParts[1], \"\"));\n }\n else if (!secondsExpression &&\n hourExpression.indexOf(\",\") > -1 &&\n hourExpression.indexOf(\"-\") == -1 &&\n hourExpression.indexOf(\"/\") == -1 &&\n !stringUtilities_1.StringUtilities.containsAny(minuteExpression, ExpressionDescriptor.specialCharacters)) {\n var hourParts = hourExpression.split(\",\");\n description += this.i18n.at();\n for (var i = 0; i < hourParts.length; i++) {\n description += \" \";\n description += this.formatTime(hourParts[i], minuteExpression, \"\");\n if (i < hourParts.length - 2) {\n description += \",\";\n }\n if (i == hourParts.length - 2) {\n description += this.i18n.spaceAnd();\n }\n }\n }\n else {\n var secondsDescription = this.getSecondsDescription();\n var minutesDescription = this.getMinutesDescription();\n var hoursDescription = this.getHoursDescription();\n description += secondsDescription;\n if (description.length > 0 && minutesDescription.length > 0) {\n description += \", \";\n }\n description += minutesDescription;\n if (description.length > 0 && hoursDescription.length > 0) {\n description += \", \";\n }\n description += hoursDescription;\n }\n return description;\n };\n ExpressionDescriptor.prototype.getSecondsDescription = function () {\n var _this = this;\n var description = this.getSegmentDescription(this.expressionParts[0], this.i18n.everySecond(), function (s) {\n return s;\n }, function (s) {\n return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Seconds(), s);\n }, function (s) {\n return _this.i18n.secondsX0ThroughX1PastTheMinute();\n }, function (s) {\n return s == \"0\"\n ? \"\"\n : parseInt(s) < 20\n ? _this.i18n.atX0SecondsPastTheMinute()\n : _this.i18n.atX0SecondsPastTheMinuteGt20() || _this.i18n.atX0SecondsPastTheMinute();\n });\n return description;\n };\n ExpressionDescriptor.prototype.getMinutesDescription = function () {\n var _this = this;\n var secondsExpression = this.expressionParts[0];\n var hourExpression = this.expressionParts[2];\n var description = this.getSegmentDescription(this.expressionParts[1], this.i18n.everyMinute(), function (s) {\n return s;\n }, function (s) {\n return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Minutes(), s);\n }, function (s) {\n return _this.i18n.minutesX0ThroughX1PastTheHour();\n }, function (s) {\n try {\n return s == \"0\" && hourExpression.indexOf(\"/\") == -1 && secondsExpression == \"\"\n ? _this.i18n.everyHour()\n : parseInt(s) < 20\n ? _this.i18n.atX0MinutesPastTheHour()\n : _this.i18n.atX0MinutesPastTheHourGt20() || _this.i18n.atX0MinutesPastTheHour();\n }\n catch (e) {\n return _this.i18n.atX0MinutesPastTheHour();\n }\n });\n return description;\n };\n ExpressionDescriptor.prototype.getHoursDescription = function () {\n var _this = this;\n var expression = this.expressionParts[2];\n var description = this.getSegmentDescription(expression, this.i18n.everyHour(), function (s) {\n return _this.formatTime(s, \"0\", \"\");\n }, function (s) {\n return stringUtilities_1.StringUtilities.format(_this.i18n.everyX0Hours(), s);\n }, function (s) {\n return _this.i18n.betweenX0AndX1();\n }, function (s) {\n return _this.i18n.atX0();\n });\n return description;\n };\n ExpressionDescriptor.prototype.getDayOfWeekDescription = function () {\n var _this = this;\n var daysOfWeekNames = this.i18n.daysOfTheWeek();\n var description = null;\n if (this.expressionParts[5] == \"*\") {\n description = \"\";\n }\n else {\n description = this.getSegmentDescription(this.expressionParts[5], this.i18n.commaEveryDay(), function (s) {\n var exp = s;\n if (s.indexOf(\"#\") > -1) {\n exp = s.substr(0, s.indexOf(\"#\"));\n }\n else if (s.indexOf(\"L\") > -1) {\n exp = exp.replace(\"L\", \"\");\n }\n return daysOfWeekNames[parseInt(exp)];\n }, function (s) {\n if (parseInt(s) == 1) {\n return \"\";\n }\n else {\n return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(), s);\n }\n }, function (s) {\n return _this.i18n.commaX0ThroughX1();\n }, function (s) {\n var format = null;\n if (s.indexOf(\"#\") > -1) {\n var dayOfWeekOfMonthNumber = s.substring(s.indexOf(\"#\") + 1);\n var dayOfWeekOfMonthDescription = null;\n switch (dayOfWeekOfMonthNumber) {\n case \"1\":\n dayOfWeekOfMonthDescription = _this.i18n.first();\n break;\n case \"2\":\n dayOfWeekOfMonthDescription = _this.i18n.second();\n break;\n case \"3\":\n dayOfWeekOfMonthDescription = _this.i18n.third();\n break;\n case \"4\":\n dayOfWeekOfMonthDescription = _this.i18n.fourth();\n break;\n case \"5\":\n dayOfWeekOfMonthDescription = _this.i18n.fifth();\n break;\n }\n format = _this.i18n.commaOnThe() + dayOfWeekOfMonthDescription + _this.i18n.spaceX0OfTheMonth();\n }\n else if (s.indexOf(\"L\") > -1) {\n format = _this.i18n.commaOnTheLastX0OfTheMonth();\n }\n else {\n var domSpecified = _this.expressionParts[3] != \"*\";\n format = domSpecified ? _this.i18n.commaAndOnX0() : _this.i18n.commaOnlyOnX0();\n }\n return format;\n });\n }\n return description;\n };\n ExpressionDescriptor.prototype.getMonthDescription = function () {\n var _this = this;\n var monthNames = this.i18n.monthsOfTheYear();\n var description = this.getSegmentDescription(this.expressionParts[4], \"\", function (s) {\n return monthNames[parseInt(s) - 1];\n }, function (s) {\n if (parseInt(s) == 1) {\n return \"\";\n }\n else {\n return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0Months(), s);\n }\n }, function (s) {\n return _this.i18n.commaMonthX0ThroughMonthX1() || _this.i18n.commaX0ThroughX1();\n }, function (s) {\n return _this.i18n.commaOnlyInMonthX0 ? _this.i18n.commaOnlyInMonthX0() : _this.i18n.commaOnlyInX0();\n });\n return description;\n };\n ExpressionDescriptor.prototype.getDayOfMonthDescription = function () {\n var _this = this;\n var description = null;\n var expression = this.expressionParts[3];\n switch (expression) {\n case \"L\":\n description = this.i18n.commaOnTheLastDayOfTheMonth();\n break;\n case \"WL\":\n case \"LW\":\n description = this.i18n.commaOnTheLastWeekdayOfTheMonth();\n break;\n default:\n var weekDayNumberMatches = expression.match(/(\\d{1,2}W)|(W\\d{1,2})/);\n if (weekDayNumberMatches) {\n var dayNumber = parseInt(weekDayNumberMatches[0].replace(\"W\", \"\"));\n var dayString = dayNumber == 1\n ? this.i18n.firstWeekday()\n : stringUtilities_1.StringUtilities.format(this.i18n.weekdayNearestDayX0(), dayNumber.toString());\n description = stringUtilities_1.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(), dayString);\n break;\n }\n else {\n var lastDayOffSetMatches = expression.match(/L-(\\d{1,2})/);\n if (lastDayOffSetMatches) {\n var offSetDays = lastDayOffSetMatches[1];\n description = stringUtilities_1.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(), offSetDays);\n break;\n }\n else if (expression == \"*\" && this.expressionParts[5] != \"*\") {\n return \"\";\n }\n else {\n description = this.getSegmentDescription(expression, this.i18n.commaEveryDay(), function (s) {\n return s == \"L\" ? _this.i18n.lastDay() : ((_this.i18n.dayX0) ? stringUtilities_1.StringUtilities.format(_this.i18n.dayX0(), s) : s);\n }, function (s) {\n return s == \"1\" ? _this.i18n.commaEveryDay() : _this.i18n.commaEveryX0Days();\n }, function (s) {\n return _this.i18n.commaBetweenDayX0AndX1OfTheMonth();\n }, function (s) {\n return _this.i18n.commaOnDayX0OfTheMonth();\n });\n }\n break;\n }\n }\n return description;\n };\n ExpressionDescriptor.prototype.getYearDescription = function () {\n var _this = this;\n var description = this.getSegmentDescription(this.expressionParts[6], \"\", function (s) {\n return /^\\d+$/.test(s) ? new Date(parseInt(s), 1).getFullYear().toString() : s;\n }, function (s) {\n return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0Years(), s);\n }, function (s) {\n return _this.i18n.commaYearX0ThroughYearX1() || _this.i18n.commaX0ThroughX1();\n }, function (s) {\n return _this.i18n.commaOnlyInYearX0 ? _this.i18n.commaOnlyInYearX0() : _this.i18n.commaOnlyInX0();\n });\n return description;\n };\n ExpressionDescriptor.prototype.getSegmentDescription = function (expression, allDescription, getSingleItemDescription, getIntervalDescriptionFormat, getBetweenDescriptionFormat, getDescriptionFormat) {\n var _this = this;\n var description = null;\n if (!expression) {\n description = \"\";\n }\n else if (expression === \"*\") {\n description = allDescription;\n }\n else if (!stringUtilities_1.StringUtilities.containsAny(expression, [\"/\", \"-\", \",\"])) {\n description = stringUtilities_1.StringUtilities.format(getDescriptionFormat(expression), getSingleItemDescription(expression));\n }\n else if (expression.indexOf(\"/\") > -1) {\n var segments = expression.split(\"/\");\n description = stringUtilities_1.StringUtilities.format(getIntervalDescriptionFormat(segments[1]), segments[1]);\n if (segments[0].indexOf(\"-\") > -1) {\n var betweenSegmentDescription = this.generateBetweenSegmentDescription(segments[0], getBetweenDescriptionFormat, getSingleItemDescription);\n if (betweenSegmentDescription.indexOf(\", \") != 0) {\n description += \", \";\n }\n description += betweenSegmentDescription;\n }\n else if (!stringUtilities_1.StringUtilities.containsAny(segments[0], [\"*\", \",\"])) {\n var rangeItemDescription = stringUtilities_1.StringUtilities.format(getDescriptionFormat(segments[0]), getSingleItemDescription(segments[0]));\n rangeItemDescription = rangeItemDescription.replace(\", \", \"\");\n description += stringUtilities_1.StringUtilities.format(this.i18n.commaStartingX0(), rangeItemDescription);\n }\n }\n else if (expression.indexOf(\",\") > -1) {\n var segments = expression.split(\",\");\n var descriptionContent = \"\";\n for (var i = 0; i < segments.length; i++) {\n if (i > 0 && segments.length > 2) {\n descriptionContent += \",\";\n if (i < segments.length - 1) {\n descriptionContent += \" \";\n }\n }\n if (i > 0 && segments.length > 1 && (i == segments.length - 1 || segments.length == 2)) {\n descriptionContent += this.i18n.spaceAnd() + \" \";\n }\n if (segments[i].indexOf(\"-\") > -1) {\n var betweenSegmentDescription = this.generateBetweenSegmentDescription(segments[i], function (s) {\n return _this.i18n.commaX0ThroughX1();\n }, getSingleItemDescription);\n betweenSegmentDescription = betweenSegmentDescription.replace(\", \", \"\");\n descriptionContent += betweenSegmentDescription;\n }\n else {\n descriptionContent += getSingleItemDescription(segments[i]);\n }\n }\n description = stringUtilities_1.StringUtilities.format(getDescriptionFormat(expression), descriptionContent);\n }\n else if (expression.indexOf(\"-\") > -1) {\n description = this.generateBetweenSegmentDescription(expression, getBetweenDescriptionFormat, getSingleItemDescription);\n }\n return description;\n };\n ExpressionDescriptor.prototype.generateBetweenSegmentDescription = function (betweenExpression, getBetweenDescriptionFormat, getSingleItemDescription) {\n var description = \"\";\n var betweenSegments = betweenExpression.split(\"-\");\n var betweenSegment1Description = getSingleItemDescription(betweenSegments[0]);\n var betweenSegment2Description = getSingleItemDescription(betweenSegments[1]);\n betweenSegment2Description = betweenSegment2Description.replace(\":00\", \":59\");\n var betweenDescriptionFormat = getBetweenDescriptionFormat(betweenExpression);\n description += stringUtilities_1.StringUtilities.format(betweenDescriptionFormat, betweenSegment1Description, betweenSegment2Description);\n return description;\n };\n ExpressionDescriptor.prototype.formatTime = function (hourExpression, minuteExpression, secondExpression) {\n var hour = parseInt(hourExpression);\n var period = \"\";\n var setPeriodBeforeTime = false;\n if (!this.options.use24HourTimeFormat) {\n setPeriodBeforeTime = this.i18n.setPeriodBeforeTime && this.i18n.setPeriodBeforeTime();\n period = setPeriodBeforeTime ? this.getPeriod(hour) + \" \" : \" \" + this.getPeriod(hour);\n if (hour > 12) {\n hour -= 12;\n }\n if (hour === 0) {\n hour = 12;\n }\n }\n var minute = minuteExpression;\n var second = \"\";\n if (secondExpression) {\n second = \":\" + (\"00\" + secondExpression).substring(secondExpression.length);\n }\n return \"\" + (setPeriodBeforeTime ? period : \"\") + (\"00\" + hour.toString()).substring(hour.toString().length) + \":\" + (\"00\" + minute.toString()).substring(minute.toString().length) + second + (!setPeriodBeforeTime ? period : \"\");\n };\n ExpressionDescriptor.prototype.transformVerbosity = function (description, useVerboseFormat) {\n if (!useVerboseFormat) {\n description = description.replace(new RegExp(\", \" + this.i18n.everyMinute(), \"g\"), \"\");\n description = description.replace(new RegExp(\", \" + this.i18n.everyHour(), \"g\"), \"\");\n description = description.replace(new RegExp(this.i18n.commaEveryDay(), \"g\"), \"\");\n description = description.replace(/\\, ?$/, \"\");\n }\n return description;\n };\n ExpressionDescriptor.prototype.getPeriod = function (hour) {\n return hour >= 12 ? this.i18n.pm && this.i18n.pm() || \"PM\" : this.i18n.am && this.i18n.am() || \"AM\";\n };\n ExpressionDescriptor.locales = {};\n return ExpressionDescriptor;\n}());\nexports.ExpressionDescriptor = ExpressionDescriptor;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar StringUtilities = (function () {\n function StringUtilities() {\n }\n StringUtilities.format = function (template) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n return template.replace(/%s/g, function () {\n return values.shift();\n });\n };\n StringUtilities.containsAny = function (text, searchStrings) {\n return searchStrings.some(function (c) {\n return text.indexOf(c) > -1;\n });\n };\n return StringUtilities;\n}());\nexports.StringUtilities = StringUtilities;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CronParser = (function () {\n function CronParser(expression, dayOfWeekStartIndexZero) {\n if (dayOfWeekStartIndexZero === void 0) { dayOfWeekStartIndexZero = true; }\n this.expression = expression;\n this.dayOfWeekStartIndexZero = dayOfWeekStartIndexZero;\n }\n CronParser.prototype.parse = function () {\n var parsed = this.extractParts(this.expression);\n this.normalize(parsed);\n this.validate(parsed);\n return parsed;\n };\n CronParser.prototype.extractParts = function (expression) {\n if (!this.expression) {\n throw new Error(\"Expression is empty\");\n }\n var parsed = expression.trim().split(/[ ]+/);\n if (parsed.length < 5) {\n throw new Error(\"Expression has only \" + parsed.length + \" part\" + (parsed.length == 1 ? \"\" : \"s\") + \". At least 5 parts are required.\");\n }\n else if (parsed.length == 5) {\n parsed.unshift(\"\");\n parsed.push(\"\");\n }\n else if (parsed.length == 6) {\n if (/\\d{4}$/.test(parsed[5])) {\n parsed.unshift(\"\");\n }\n else {\n parsed.push(\"\");\n }\n }\n else if (parsed.length > 7) {\n throw new Error(\"Expression has \" + parsed.length + \" parts; too many!\");\n }\n return parsed;\n };\n CronParser.prototype.normalize = function (expressionParts) {\n var _this = this;\n expressionParts[3] = expressionParts[3].replace(\"?\", \"*\");\n expressionParts[5] = expressionParts[5].replace(\"?\", \"*\");\n expressionParts[2] = expressionParts[2].replace(\"?\", \"*\");\n if (expressionParts[0].indexOf(\"0/\") == 0) {\n expressionParts[0] = expressionParts[0].replace(\"0/\", \"*/\");\n }\n if (expressionParts[1].indexOf(\"0/\") == 0) {\n expressionParts[1] = expressionParts[1].replace(\"0/\", \"*/\");\n }\n if (expressionParts[2].indexOf(\"0/\") == 0) {\n expressionParts[2] = expressionParts[2].replace(\"0/\", \"*/\");\n }\n if (expressionParts[3].indexOf(\"1/\") == 0) {\n expressionParts[3] = expressionParts[3].replace(\"1/\", \"*/\");\n }\n if (expressionParts[4].indexOf(\"1/\") == 0) {\n expressionParts[4] = expressionParts[4].replace(\"1/\", \"*/\");\n }\n if (expressionParts[5].indexOf(\"1/\") == 0) {\n expressionParts[5] = expressionParts[5].replace(\"1/\", \"*/\");\n }\n if (expressionParts[6].indexOf(\"1/\") == 0) {\n expressionParts[6] = expressionParts[6].replace(\"1/\", \"*/\");\n }\n expressionParts[5] = expressionParts[5].replace(/(^\\d)|([^#/\\s]\\d)/g, function (t) {\n var dowDigits = t.replace(/\\D/, \"\");\n var dowDigitsAdjusted = dowDigits;\n if (_this.dayOfWeekStartIndexZero) {\n if (dowDigits == \"7\") {\n dowDigitsAdjusted = \"0\";\n }\n }\n else {\n dowDigitsAdjusted = (parseInt(dowDigits) - 1).toString();\n }\n return t.replace(dowDigits, dowDigitsAdjusted);\n });\n if (expressionParts[5] == \"L\") {\n expressionParts[5] = \"6\";\n }\n if (expressionParts[3] == \"?\") {\n expressionParts[3] = \"*\";\n }\n if (expressionParts[3].indexOf(\"W\") > -1 &&\n (expressionParts[3].indexOf(\",\") > -1 || expressionParts[3].indexOf(\"-\") > -1)) {\n throw new Error(\"The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.\");\n }\n var days = {\n SUN: 0,\n MON: 1,\n TUE: 2,\n WED: 3,\n THU: 4,\n FRI: 5,\n SAT: 6\n };\n for (var day in days) {\n expressionParts[5] = expressionParts[5].replace(new RegExp(day, \"gi\"), days[day].toString());\n }\n var months = {\n JAN: 1,\n FEB: 2,\n MAR: 3,\n APR: 4,\n MAY: 5,\n JUN: 6,\n JUL: 7,\n AUG: 8,\n SEP: 9,\n OCT: 10,\n NOV: 11,\n DEC: 12\n };\n for (var month in months) {\n expressionParts[4] = expressionParts[4].replace(new RegExp(month, \"gi\"), months[month].toString());\n }\n if (expressionParts[0] == \"0\") {\n expressionParts[0] = \"\";\n }\n if (!/\\*|\\-|\\,|\\//.test(expressionParts[2]) &&\n (/\\*|\\//.test(expressionParts[1]) || /\\*|\\//.test(expressionParts[0]))) {\n expressionParts[2] += \"-\" + expressionParts[2];\n }\n for (var i = 0; i < expressionParts.length; i++) {\n if (expressionParts[i] == \"*/1\") {\n expressionParts[i] = \"*\";\n }\n if (expressionParts[i].indexOf(\"/\") > -1 && !/^\\*|\\-|\\,/.test(expressionParts[i])) {\n var stepRangeThrough = null;\n switch (i) {\n case 4:\n stepRangeThrough = \"12\";\n break;\n case 5:\n stepRangeThrough = \"6\";\n break;\n case 6:\n stepRangeThrough = \"9999\";\n break;\n default:\n stepRangeThrough = null;\n break;\n }\n if (stepRangeThrough != null) {\n var parts = expressionParts[i].split(\"/\");\n expressionParts[i] = parts[0] + \"-\" + stepRangeThrough + \"/\" + parts[1];\n }\n }\n }\n };\n CronParser.prototype.validate = function (parsed) {\n this.assertNoInvalidCharacters(\"DOW\", parsed[5]);\n this.assertNoInvalidCharacters(\"DOM\", parsed[3]);\n };\n CronParser.prototype.assertNoInvalidCharacters = function (partDescription, expression) {\n var invalidChars = expression.match(/[A-KM-VX-Z]+/gi);\n if (invalidChars && invalidChars.length) {\n throw new Error(partDescription + \" part contains invalid values: '\" + invalidChars.toString() + \"'\");\n }\n };\n return CronParser;\n}());\nexports.CronParser = CronParser;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar en = (function () {\n function en() {\n }\n en.prototype.atX0SecondsPastTheMinuteGt20 = function () {\n return null;\n };\n en.prototype.atX0MinutesPastTheHourGt20 = function () {\n return null;\n };\n en.prototype.commaMonthX0ThroughMonthX1 = function () {\n return null;\n };\n en.prototype.commaYearX0ThroughYearX1 = function () {\n return null;\n };\n en.prototype.use24HourTimeFormatByDefault = function () {\n return false;\n };\n en.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {\n return \"An error occured when generating the expression description. Check the cron expression syntax.\";\n };\n en.prototype.everyMinute = function () {\n return \"every minute\";\n };\n en.prototype.everyHour = function () {\n return \"every hour\";\n };\n en.prototype.atSpace = function () {\n return \"At \";\n };\n en.prototype.everyMinuteBetweenX0AndX1 = function () {\n return \"Every minute between %s and %s\";\n };\n en.prototype.at = function () {\n return \"At\";\n };\n en.prototype.spaceAnd = function () {\n return \" and\";\n };\n en.prototype.everySecond = function () {\n return \"every second\";\n };\n en.prototype.everyX0Seconds = function () {\n return \"every %s seconds\";\n };\n en.prototype.secondsX0ThroughX1PastTheMinute = function () {\n return \"seconds %s through %s past the minute\";\n };\n en.prototype.atX0SecondsPastTheMinute = function () {\n return \"at %s seconds past the minute\";\n };\n en.prototype.everyX0Minutes = function () {\n return \"every %s minutes\";\n };\n en.prototype.minutesX0ThroughX1PastTheHour = function () {\n return \"minutes %s through %s past the hour\";\n };\n en.prototype.atX0MinutesPastTheHour = function () {\n return \"at %s minutes past the hour\";\n };\n en.prototype.everyX0Hours = function () {\n return \"every %s hours\";\n };\n en.prototype.betweenX0AndX1 = function () {\n return \"between %s and %s\";\n };\n en.prototype.atX0 = function () {\n return \"at %s\";\n };\n en.prototype.commaEveryDay = function () {\n return \", every day\";\n };\n en.prototype.commaEveryX0DaysOfTheWeek = function () {\n return \", every %s days of the week\";\n };\n en.prototype.commaX0ThroughX1 = function () {\n return \", %s through %s\";\n };\n en.prototype.first = function () {\n return \"first\";\n };\n en.prototype.second = function () {\n return \"second\";\n };\n en.prototype.third = function () {\n return \"third\";\n };\n en.prototype.fourth = function () {\n return \"fourth\";\n };\n en.prototype.fifth = function () {\n return \"fifth\";\n };\n en.prototype.commaOnThe = function () {\n return \", on the \";\n };\n en.prototype.spaceX0OfTheMonth = function () {\n return \" %s of the month\";\n };\n en.prototype.lastDay = function () {\n return \"the last day\";\n };\n en.prototype.commaOnTheLastX0OfTheMonth = function () {\n return \", on the last %s of the month\";\n };\n en.prototype.commaOnlyOnX0 = function () {\n return \", only on %s\";\n };\n en.prototype.commaAndOnX0 = function () {\n return \", and on %s\";\n };\n en.prototype.commaEveryX0Months = function () {\n return \", every %s months\";\n };\n en.prototype.commaOnlyInX0 = function () {\n return \", only in %s\";\n };\n en.prototype.commaOnTheLastDayOfTheMonth = function () {\n return \", on the last day of the month\";\n };\n en.prototype.commaOnTheLastWeekdayOfTheMonth = function () {\n return \", on the last weekday of the month\";\n };\n en.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {\n return \", %s days before the last day of the month\";\n };\n en.prototype.firstWeekday = function () {\n return \"first weekday\";\n };\n en.prototype.weekdayNearestDayX0 = function () {\n return \"weekday nearest day %s\";\n };\n en.prototype.commaOnTheX0OfTheMonth = function () {\n return \", on the %s of the month\";\n };\n en.prototype.commaEveryX0Days = function () {\n return \", every %s days\";\n };\n en.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {\n return \", between day %s and %s of the month\";\n };\n en.prototype.commaOnDayX0OfTheMonth = function () {\n return \", on day %s of the month\";\n };\n en.prototype.commaEveryHour = function () {\n return \", every hour\";\n };\n en.prototype.commaEveryX0Years = function () {\n return \", every %s years\";\n };\n en.prototype.commaStartingX0 = function () {\n return \", starting %s\";\n };\n en.prototype.daysOfTheWeek = function () {\n return [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n };\n en.prototype.monthsOfTheYear = function () {\n return [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n ];\n };\n return en;\n}());\nexports.en = en;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar expressionDescriptor_ts_1 = __webpack_require__(0);\nvar enLocaleLoader_1 = __webpack_require__(5);\nexpressionDescriptor_ts_1.ExpressionDescriptor.initialize(new enLocaleLoader_1.enLocaleLoader());\nexports.default = expressionDescriptor_ts_1.ExpressionDescriptor;\nvar toString = expressionDescriptor_ts_1.ExpressionDescriptor.toString;\nexports.toString = toString;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar en_1 = __webpack_require__(3);\nvar enLocaleLoader = (function () {\n function enLocaleLoader() {\n }\n enLocaleLoader.prototype.load = function (availableLocales) {\n availableLocales[\"en\"] = new en_1.en();\n };\n return enLocaleLoader;\n}());\nexports.enLocaleLoader = enLocaleLoader;\n\n\n/***/ })\n/******/ ]);\n});","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--10-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../node_modules/sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./ClusterListView.vue?vue&type=style&index=0&id=56771e1c&prod&scoped=true&lang=scss\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".actions[data-v-db441fb2]{text-align:right}.machine-name[data-v-db441fb2]{font-weight:600}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nmodule.exports = negate;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.project.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.project.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./management.cattle.io.project.vue?vue&type=template&id=3a26ac99&scoped=true\"\nimport script from \"./management.cattle.io.project.vue?vue&type=script&lang=js\"\nexport * from \"./management.cattle.io.project.vue?vue&type=script&lang=js\"\nimport style0 from \"./management.cattle.io.project.vue?vue&type=style&index=0&id=3a26ac99&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3a26ac99\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"mt-10\"},[_c('div',{staticClass:\"mb-30\"},[_vm._v(\" \"+_vm._s(_vm.t('promptRemove.attemptingToRemove', { type: _vm.type }))+\" \"),_c('span',{directives:[{name:\"clean-html\",rawName:\"v-clean-html\",value:(_vm.podNames),expression:\"podNames\"}],staticClass:\"machine-name\"})]),_c('div',{staticClass:\"mb-30\"},[_c('Checkbox',{attrs:{\"label\":_vm.t('promptForceRemove.forceDelete')},model:{value:(_vm.forceDelete),callback:function ($$v) {_vm.forceDelete=$$v},expression:\"forceDelete\"}})],1),_c('Banner',{attrs:{\"color\":\"warning\",\"label-key\":\"promptForceRemove.podRemoveWarning\"}}),_vm._l((_vm.errors),function(error,i){return _c('Banner',{key:i,attrs:{\"color\":\"error\",\"label\":error}})})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"banner\",class:{\n [_vm.color]: true,\n }},[(_vm.icon)?_c('div',{staticClass:\"banner__icon\",attrs:{\"data-testid\":\"banner-icon\"}},[_c('i',{staticClass:\"icon icon-2x\",class:_vm.icon})]):_vm._e(),_c('div',{staticClass:\"banner__content\",class:{\n closable: _vm.closable,\n stacked: _vm.stacked,\n icon: _vm.icon\n },attrs:{\"data-testid\":\"banner-content\"}},[_vm._t(\"default\",function(){return [(_vm.labelKey)?_c('t',{attrs:{\"k\":_vm.labelKey,\"raw\":true}}):(_vm.messageLabel)?_c('span',[_vm._v(_vm._s(_vm.messageLabel))]):_c('span',{directives:[{name:\"clean-html\",rawName:\"v-clean-html\",value:(_vm.nlToBr(_vm.label)),expression:\"nlToBr(label)\"}]})]}),(_vm.closable)?_c('div',{staticClass:\"banner__content__closer\",on:{\"click\":function($event){return _vm.$emit('close')}}},[_c('i',{staticClass:\"icon icon-close closer-icon\",attrs:{\"data-testid\":\"banner-close\"}})]):_vm._e()],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue from 'vue';\nimport { nlToBr } from '@shell/utils/string';\nimport { stringify } from '@shell/utils/error';\n\nexport default Vue.extend({\n props: {\n /**\n * A color class that represents the color of the banner.\n * @values primary, secondary, success, warning, error, info\n */\n color: {\n type: String,\n default: 'secondary'\n },\n /**\n * The label to display as the banner's default content.\n */\n label: {\n type: [String, Error, Object],\n default: null\n },\n /**\n * The i18n key for the label to display as the banner's default content.\n */\n labelKey: {\n type: String,\n default: null\n },\n /**\n * Add icon for the banner\n */\n icon: {\n type: String,\n default: null\n },\n /**\n * Toggles the banner's close button.\n */\n closable: {\n type: Boolean,\n default: false\n },\n /**\n * Toggles the stacked class for the banner.\n */\n stacked: {\n type: Boolean,\n default: false\n }\n },\n computed: {\n /**\n * Return message text as label.\n */\n messageLabel(): string | void {\n return !(typeof this.label === 'string') ? stringify(this.label) : undefined;\n }\n },\n methods: { nlToBr }\n});\n","import mod from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Banner.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../../cache-loader/dist/cjs.js??ref--15-0!../../../../thread-loader/dist/cjs.js!../../../../babel-loader/lib/index.js!../../../../ts-loader/index.js??ref--15-3!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Banner.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Banner.vue?vue&type=template&id=02d86e5d&scoped=true\"\nimport script from \"./Banner.vue?vue&type=script&lang=ts\"\nexport * from \"./Banner.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Banner.vue?vue&type=style&index=0&id=02d86e5d&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"02d86e5d\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./pod.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./pod.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./pod.vue?vue&type=template&id=db441fb2&scoped=true\"\nimport script from \"./pod.vue?vue&type=script&lang=js\"\nexport * from \"./pod.vue?vue&type=script&lang=js\"\nimport style0 from \"./pod.vue?vue&type=style&index=0&id=db441fb2&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"db441fb2\",\n null\n \n)\n\nexport default component.exports","module.exports = __WEBPACK_EXTERNAL_MODULE__5877__;","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".services-by-cluster-grid[data-v-1dd06ec8]{display:grid;grid-gap:1rem;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.cluster-header[data-v-1dd06ec8]{display:flex;align-items:center;justify-content:space-between;margin:1rem 0;background:var(--header-bg);border-bottom:var(--header-border-size) solid var(--header-border);height:var(--header-height);position:sticky;top:0;z-index:1}.favorite-icon[data-v-1dd06ec8]{margin-right:1rem}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--10-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../node_modules/sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--2-0!../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=22735813&prod&lang=scss&scoped=true\"","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","import isEmpty from 'lodash/isEmpty';\n\nexport function flowOutput(spec, getters, errors, validatorArgs) {\n const verifyLocal = validatorArgs.includes('verifyLocal');\n const localOutputRefs = spec.localOutputRefs || [];\n const globalOutputRefs = spec.globalOutputRefs || [];\n\n if (verifyLocal) {\n if (isEmpty(localOutputRefs) && isEmpty(globalOutputRefs)) {\n errors.push(getters['i18n/t']('validation.flowOutput.both'));\n }\n } else if (isEmpty(globalOutputRefs)) {\n errors.push(getters['i18n/t']('validation.flowOutput.global'));\n }\n}\n","import isEmpty from 'lodash/isEmpty';\r\n\r\nexport function logdna(value, getters, errors, validatorArgs) {\r\n if (isEmpty(value)) {\r\n return;\r\n }\r\n\r\n if (isEmpty(value.api_key)) {\r\n errors.push(getters['i18n/t']('validation.output.logdna.apiKey'));\r\n }\r\n}\r\n","import { validateChars } from './index';\n\nexport function validateKubernetesName(label, displayKey, getters, opts, errors = []) {\n opts = opts || {};\n\n const {\n invalidChars,\n forHostname = false,\n errorKey = (forHostname ? 'hostname' : 'label'),\n maxLength = 63,\n minLength = 1,\n validChars = 'A-Za-z0-9-',\n } = opts;\n\n // Label must consist of a-z, 0-9 and hyphen\n validateChars(label, { validChars, invalidChars }, displayKey, getters, errors);\n\n // Label cannot begin with a hyphen\n if ( label.slice(0, 1) === '-' ) {\n errors.push(getters['i18n/t'](`validation.dns.${ errorKey }.startHyphen`, { key: displayKey }));\n }\n\n // Label cannot end with a hyphen\n if ( label.slice(-1) === '-' ) {\n errors.push(getters['i18n/t'](`validation.dns.${ errorKey }.endHyphen`, { key: displayKey }));\n }\n\n // Label must be 1-63 characters\n const min = minLength;\n const max = maxLength;\n\n if ( label.length < min ) {\n errors.push(getters['i18n/t'](`validation.dns.${ errorKey }.emptyLabel`, { key: displayKey, min }));\n } else if ( label.length > max ) {\n errors.push(getters['i18n/t'](`validation.dns.${ errorKey }.tooLongLabel`, { key: displayKey, max }));\n }\n\n return errors;\n}\n","import isEmpty from 'lodash/isEmpty';\nimport uniq from 'lodash/uniq';\nimport { get } from '@shell/utils/object';\nimport { camelToTitle } from '@shell/utils/string';\nimport { validateKubernetesName } from './kubernetes-name';\n\nexport function displayKeyFor(type, key, getters) {\n const intlPrefix = `model.${ type }.${ key }`;\n const intlPrefixLabel = `${ intlPrefix }.label`;\n\n if ( getters['i18n/exists'](`${ intlPrefix }.label`) ) {\n return getters['i18n/t'](intlPrefixLabel);\n }\n\n if ( getters['i18n/exists'](intlPrefix) ) {\n return getters['i18n/t'](intlPrefix);\n }\n\n if ( key.match(/.Id$/) ) {\n return camelToTitle(key.replace(/Id$/, ''));\n }\n\n return camelToTitle(key);\n}\n\nexport function validateLength(val, field, displayKey, getters, errors = []) {\n const {\n nullable,\n required,\n type = '',\n minLength,\n maxLength,\n min: fieldMin,\n max: fieldMax,\n } = field;\n const len = val ? get(val, 'length') : 0;\n\n if ( !nullable && required) {\n if ((typeof val === 'object' && isEmpty(val)) || (!val && val !== 0)) {\n errors.push(getters['i18n/t']('validation.required', { key: displayKey }));\n\n return errors;\n }\n }\n\n if ( val === null ) {\n return errors;\n }\n\n const lengthKey = (type.indexOf('array[') === 0 ? 'arrayLength' : 'stringLength');\n\n // String and array length:\n let min = minLength;\n let max = maxLength;\n\n if ( min && max ) {\n if ( (len < min) || (len > max) ) {\n if ( min === max ) {\n errors.push(getters['i18n/t'](`validation.${ lengthKey }.exactly`, { key: displayKey, count: min }));\n } else {\n errors.push(getters['i18n/t'](`validation.${ lengthKey }.between`, {\n key: displayKey, min, max\n }));\n }\n }\n } else if ( min && (len < min) ) {\n errors.push(getters['i18n/t'](`validation.${ lengthKey }.min`, { key: displayKey, count: min }));\n } else if ( max && (len > max) ) {\n errors.push(getters['i18n/t'](`validation.${ lengthKey }.max`, { key: displayKey, count: max }));\n }\n\n // Number min/max\n min = fieldMin;\n max = fieldMax;\n\n if ( val !== null && min && max ) {\n if ( (val < min) || (val > max) ) {\n if ( min === max ) {\n errors.push(getters['i18n/t']('validation.number.exactly', { key: displayKey, val: max }));\n } else {\n errors.push(getters['i18n/t']('validation.number.between', {\n key: displayKey, min, max\n }));\n }\n }\n } else if ( min && (val < min) ) {\n errors.push(getters['i18n/t']('validation.number.min', { key: displayKey, val: min }));\n } else if ( max && (val > max) ) {\n errors.push(getters['i18n/t']('validation.number.max', { key: displayKey, val: max }));\n }\n\n return errors;\n}\n\nexport function validateChars(val, field, displayKey, getters, errors = []) {\n const {\n validChars,\n invalidChars\n } = field;\n const test = [];\n\n if ( validChars ) {\n test.push(`[^${ field.validChars }]`);\n }\n\n if ( invalidChars ) {\n test.push(`[${ field.invalidChars }]`);\n }\n\n if ( test.length ) {\n const regex = new RegExp(`(${ test.join('|') })`, 'g');\n let match = val.match(regex);\n\n if ( match ) {\n match = uniq(match).map((chr) => {\n if ( chr === ' ' ) {\n return '[space]';\n } else {\n return chr;\n }\n });\n\n errors.push(getters['i18n/t']('validation.chars', {\n key: displayKey, count: match.length, chars: match.join(' ')\n }));\n }\n }\n\n return errors;\n}\n\nexport function validateHostname(val, displayKey, getters, opts, errors = []) {\n opts = opts || {};\n\n const {\n max = 253,\n restricted = false,\n } = opts;\n\n // Hostname can not start with a dot\n if (val.slice(0, 1) === '.') {\n errors.push(getters['i18n/t']('validation.dns.hostname.startDot', { key: displayKey }));\n }\n\n // Hostname can not end with a dot in restricted mode\n if ( restricted && val.length > 1 && val.slice(-1) === '.' ) {\n errors.push(getters['i18n/t']('validation.dns.hostname.endDot', { key: displayKey }));\n }\n\n // Hostname can not be empty string\n if (val.length === 0) {\n errors.push(getters['i18n/t']('validation.dns.hostname.empty', { key: displayKey }));\n }\n\n // Total length of the hostname can be at most 253 characters\n // (255 minus one for null-termination, and one for the trailing dot of a real FQDN)\n if (val.length > max) {\n errors.push(getters['i18n/t']('validation.dns.hostname.tooLong', { key: displayKey, max }));\n }\n\n // Split the hostname with the dot and validate the element as label\n const labels = val.split(/\\./);\n let label;\n\n for ( let i = 0 ; i < labels.length ; i++ ) {\n label = labels[i];\n\n // Already checked if Hostname starts with a dot\n if ( i === 0 && label === '' ) {\n continue;\n }\n\n // Hostname can end with a dot (this makes it an explicitly fully qualified domain name)\n // so the last element of the labels can be empty string.\n if (i === labels.length - 1 && label === '') {\n continue;\n }\n\n validateDnsLabel(label, displayKey, getters, { forHostname: true }, errors);\n }\n\n return errors;\n}\n\nexport function validateDnsLabel(label, displayKey, getters, opts, errors = []) {\n opts = opts || {};\n\n const {\n forHostname = false,\n errorKey = (forHostname ? 'hostname' : 'label'),\n ianaServiceName = false,\n restricted = false,\n } = opts;\n\n validateKubernetesName(label, displayKey, getters, opts, errors);\n\n // Restricted labels cannot begin with a number\n if ( restricted && label.slice(0, 1).match(/[0-9]/) ) {\n errors.push(getters['i18n/t'](`validation.dns.${ errorKey }.startNumber`, { key: displayKey }));\n }\n\n // Label cannot contain two consecutive hyphens at the 3rd & 4th characters, unless an IDN string\n // If is of type ianaServiceName can not contain two consecutive hyphens in any position\n if (\n ( label.substr(2, 2) === '--' && label.substr(0, 2) !== 'xn' ) ||\n ( ianaServiceName && label.includes('--') )\n ) {\n errors.push(getters['i18n/t'](`validation.dns.doubleHyphen`, { key: displayKey }));\n }\n\n return errors;\n}\n\nexport function validateDnsLikeTypes(val, type, displayKey, getters, opts, errors = []) {\n switch (type) {\n case 'dnsLabel':\n validateDnsLabel(val, displayKey, getters, { restricted: false }, errors);\n break;\n case 'dnsLabelRestricted':\n validateDnsLabel(val, displayKey, getters, { restricted: true }, errors);\n break;\n case 'hostname':\n validateHostname(val, displayKey, getters, { restricted: false }, errors);\n break;\n default:\n break;\n }\n\n return errors;\n}\n\nexport function validateBoolean(val, field, displayKey, getters, errors = []) {\n const { required } = field;\n\n if (required && !val && val !== false) {\n errors.push(getters['i18n/t']('validation.required', { key: displayKey }));\n\n return;\n }\n if (typeof val !== 'boolean' && !!val) {\n errors.push(getters['i18n/t']('validation.boolean', { key: displayKey }));\n }\n}\n","import isEmpty from 'lodash/isEmpty';\nimport { validateDnsLabel, validateHostname } from '@shell/utils/validators';\n\nexport function servicePort(spec, getters, errors, validatorArgs) {\n const { ports, type: serviceType } = spec;\n\n if (serviceType === 'ExternalName') {\n return errors;\n }\n\n if (isEmpty(ports)) {\n errors.push(getters['i18n/t']('validation.required', { key: 'Port Rules' }));\n\n return errors;\n }\n\n ports.forEach((port, ind, ary) => {\n const {\n name,\n nodePort,\n port: pPort,\n targetPort,\n } = port;\n const idx = ind + 1;\n\n if (ary.length > 1 && isEmpty(name)) {\n errors.push(getters['i18n/t']('validation.service.ports.name.required', { position: idx }));\n }\n\n if (!isEmpty(name)) {\n const nameErrors = validateDnsLabel(name, 'name', getters, undefined, errors);\n\n if (!isEmpty(nameErrors)) {\n if (errors.length && errors.length > 0) {\n errors = [...errors, ...nameErrors];\n } else {\n errors = nameErrors;\n }\n }\n }\n\n if (nodePort) {\n const np = parseInt(nodePort, 10);\n\n if (isNaN(np)) {\n errors.push(getters['i18n/t']('validation.service.ports.nodePort.requiredInt', { position: idx }));\n }\n }\n\n if (pPort) {\n const p = parseInt(pPort, 10);\n\n if (isNaN(p)) {\n errors.push(getters['i18n/t']('validation.service.ports.port.requiredInt', { position: idx }));\n }\n } else {\n errors.push(getters['i18n/t']('validation.service.ports.port.required', { position: idx }));\n }\n\n if (targetPort) {\n const tpIanaDisplayKey = getters['i18n/t']('validation.service.ports.targetPort.ianaAt', { position: idx });\n const tp = parseInt(targetPort, 10);\n const tpTest = new RegExp('^\\\\d+$');\n const targetPortIsNumber = tpTest.test(targetPort);\n\n if (!targetPortIsNumber) { // not a number\n /* [rfc6335](https://tools.ietf.org/rfc/rfc6335.txt) port name (IANA_SVC_NAME)\n An alphanumeric (a-z, and 0-9) string, with a maximum length of 15 characters,\n with the '-' character allowed anywhere except the first or the last character or adjacent to another '-' character,\n it must contain at least a(a - z) character\n validateChars(str, { validChars: 'A-Za-z0-9_.-' }, displayKey, intl, errors); */\n const opts = {\n ianaServiceName: true,\n maxLength: 15,\n validChars: 'A-Za-z0-9-',\n };\n const isIanaServiceNameErrors = validateDnsLabel(targetPort, tpIanaDisplayKey, getters, opts, errors);\n\n if (!isEmpty(isIanaServiceNameErrors)) {\n errors.push(...isIanaServiceNameErrors);\n }\n } else if (tp < 1 || tp > 65535) {\n errors.push(getters['i18n/t']('validation.service.ports.targetPort.between', { position: idx }));\n }\n } else {\n errors.push(getters['i18n/t']('validation.service.ports.targetPort.required', { position: idx }));\n }\n });\n\n return errors;\n}\n\nexport function clusterIp(spec, getters, errors, validatorArgs) {\n /*\n clusterIP is the IP address of the service and is usually assigned randomly by the master.\n If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail.\n This field can not be changed through updates.\n Valid values are \\\"None\\\", empty string (\\\"\\\"), or a valid IP address. \\\"None\\\" can be specified for headless services when proxying is not required.\n Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.\n More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies\n */\n const typesToCheck = ['ClusterIP', 'NodePort', 'LoadBalancer'];\n const serviceType = spec?.type;\n\n if (!typesToCheck.includes(serviceType)) {\n // validation only applies to services in the types to check\n return errors;\n }\n\n return errors;\n}\n\nexport function externalName(spec, getters, errors, validatorArgs) {\n /*\n externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service.\n No proxying will be involved.\n Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.\n */\n if (spec?.type === 'ExternalName') {\n if (isEmpty(spec?.externalName)) {\n errors.push(getters['i18n/t']('validation.service.externalName.none'));\n } else {\n const hostNameErrors = validateHostname(spec.externalName, 'ExternalName', getters, undefined, errors);\n\n if (!isEmpty(hostNameErrors)) {\n if (errors.length && errors.length > 0) {\n errors = [...errors, ...hostNameErrors];\n } else {\n errors = hostNameErrors;\n }\n }\n }\n }\n\n return errors;\n}\n","import has from 'lodash/has';\nimport isEmpty from 'lodash/isEmpty';\n\nexport function ruleGroups(spec, getters, errors, validatorArgs) {\n if (isEmpty(spec?.groups)) {\n errors.push(getters['i18n/t']('validation.prometheusRule.groups.required'));\n }\n\n return errors;\n}\n\nexport function groupsAreValid(groups = [], getters, errors, validatorArgs) {\n groups.forEach((group, groupIndex) => {\n const readableGroupIndex = groupIndex + 1; // oh that ol zero based array index....\n\n if (isEmpty(group?.name)) {\n errors.push(\n getters['i18n/t']('validation.prometheusRule.groups.valid.name', { index: readableGroupIndex })\n );\n }\n\n if (isEmpty(group?.rules)) {\n errors.push(\n getters['i18n/t'](\n 'validation.prometheusRule.groups.valid.singleEntry',\n { index: readableGroupIndex }\n )\n );\n } else {\n group.rules.forEach((rule, ruleIndex) => {\n const readableRuleIndex = ruleIndex + 1; // oh that ol zero based array index....\n\n if (has(rule, 'alert') && isEmpty(rule?.alert)) {\n errors.push(\n getters['i18n/t'](\n 'validation.prometheusRule.groups.valid.rule.alertName',\n { groupIndex: readableGroupIndex, ruleIndex: readableRuleIndex }\n )\n );\n } else if (has(rule, 'record') && isEmpty(rule?.record)) {\n errors.push(\n getters['i18n/t'](\n 'validation.prometheusRule.groups.valid.rule.recordName',\n { groupIndex: readableGroupIndex, ruleIndex: readableRuleIndex }\n )\n );\n }\n\n if ((has(rule, 'expr') && isEmpty(rule.expr)) || !has(rule, 'expr')) {\n errors.push(\n getters['i18n/t'](\n 'validation.prometheusRule.groups.valid.rule.expr',\n { groupIndex: readableGroupIndex, ruleIndex: readableRuleIndex }\n )\n );\n }\n\n if (has(rule, 'alert')) {\n if (\n (has(rule, 'labels') && isEmpty(rule.labels)) ||\n !has(rule, 'labels')\n ) {\n errors.push(\n getters['i18n/t'](\n 'validation.prometheusRule.groups.valid.rule.labels',\n { groupIndex: readableGroupIndex, ruleIndex: readableRuleIndex }\n )\n );\n }\n }\n });\n }\n });\n\n return errors;\n}\n","import isEmpty from 'lodash/isEmpty';\n\nexport function matching(spec, getters, errors, validatorArgs) {\n if (isEmpty(spec?.match) && isEmpty(spec?.['match_re'])) {\n errors.push(getters['i18n/t']('validation.monitoring.route.match'));\n }\n}\n\nexport function interval(value, getters, errors, validatorArgs, displayKey) {\n if (!/^\\d+[hms]$/.test(value)) {\n errors.push(getters['i18n/t']('validation.monitoring.route.interval', { key: displayKey }));\n }\n}\n","import { get } from '@shell/utils/object';\n\nexport function containerImages(spec, getters, errors) {\n let podSpec;\n\n if (spec.jobTemplate) {\n // cronjob pod template is nested slightly different than other types\n podSpec = get(spec, 'jobTemplate.spec.template.spec');\n } else {\n podSpec = get(spec, 'template.spec');\n }\n\n if (!podSpec.containers || !podSpec.containers.length) {\n errors.push(getters['i18n/t']('validation.required', { key: getters['i18n/t']('workload.container.titles.containers') }));\n\n return;\n }\n\n podSpec.containers.forEach((container) => {\n if (container && !container.image) {\n errors.push(getters['i18n/t']('workload.validation.containerImage', { name: container.name }));\n }\n });\n}\n","import cronstrue from 'cronstrue';\n\nexport function cronSchedule(schedule = '', getters, errors) {\n try {\n cronstrue.toString(schedule);\n } catch (e) {\n errors.push(getters['i18n/t']('validation.invalidCron'));\n }\n}\n","import { isEmpty } from '@shell/utils/object';\n\n// spec = podSpec.affinity\nexport function podAffinity(spec, getters, errors) {\n if (!spec) {\n return;\n }\n const { podAffinity, podAntiAffinity } = spec;\n\n // pod affinity\n if (podAffinity && !isEmpty(podAffinity)) {\n const { preferredDuringSchedulingIgnoredDuringExecution = [], requiredDuringSchedulingIgnoredDuringExecution = [] } = podAffinity;\n\n preferredDuringSchedulingIgnoredDuringExecution.forEach((term, i) => {\n const errorOpts = {\n index: i,\n group: getters['i18n/t']('validation.podAffinity.affinityTitle'),\n rules: getters['i18n/t']('validation.podAffinity.preferredDuringSchedulingIgnoredDuringExecution')\n };\n\n validateTermWeight(term, errorOpts, getters, errors);\n\n const { podAffinityTerm = {} } = term;\n\n validateTopologyKey(podAffinityTerm, errorOpts, getters, errors);\n validateLabelSelector(podAffinityTerm, errorOpts, getters, errors);\n });\n\n requiredDuringSchedulingIgnoredDuringExecution.forEach((term, i) => {\n const errorOpts = {\n index: i,\n group: getters['i18n/t']('validation.podAffinity.affinityTitle'),\n rules: getters['i18n/t']('validation.podAffinity.requiredDuringSchedulingIgnoredDuringExecution')\n };\n\n validateTopologyKey(term, errorOpts, getters, errors);\n validateLabelSelector(term, errorOpts, getters, errors);\n });\n }\n\n // pod antiaffinity\n if (podAntiAffinity && !isEmpty(podAntiAffinity)) {\n const { preferredDuringSchedulingIgnoredDuringExecution = [], requiredDuringSchedulingIgnoredDuringExecution = [] } = podAntiAffinity;\n\n preferredDuringSchedulingIgnoredDuringExecution.forEach((term, i) => {\n const errorOpts = {\n index: i,\n group: getters['i18n/t']('validation.podAffinity.antiAffinityTitle'),\n rules: getters['i18n/t']('validation.podAffinity.preferredDuringSchedulingIgnoredDuringExecution')\n };\n\n validateTermWeight(term, errorOpts, getters, errors);\n\n const { podAffinityTerm = {} } = term;\n\n validateTopologyKey(podAffinityTerm, errorOpts, getters, errors);\n\n validateLabelSelector(podAffinityTerm, errorOpts, getters, errors);\n });\n\n requiredDuringSchedulingIgnoredDuringExecution.forEach((term, i) => {\n const errorOpts = {\n index: i,\n group: getters['i18n/t']('validation.podAffinity.antiAffinityTitle'),\n rules: getters['i18n/t']('validation.podAffinity.requiredDuringSchedulingIgnoredDuringExecution')\n };\n\n validateTopologyKey(term, errorOpts, getters, errors);\n\n validateLabelSelector(term, errorOpts, getters, errors);\n });\n }\n}\n\n// verify weight (if present) is integer 1-100\nfunction validateTermWeight(affinityTerm, errorOpts, getters, errors) {\n const { weight = 1 } = affinityTerm;\n\n if (typeof weight !== 'number' || weight > 100 || weight < 1 ) {\n errors.push(getters['i18n/t']('validation.number.between', {\n key: getters['i18n/t']('workload.scheduling.matchExpressions.weight'),\n min: 1,\n max: 100,\n ...errorOpts\n }));\n }\n}\n\n// verify topology key is present and matches regexp for labels\nfunction validateTopologyKey(affinityTerm, errorOpts, getters, errors) {\n const { topologyKey } = affinityTerm;\n const regexp = RegExp('([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]');\n\n if (!topologyKey || !regexp.test(topologyKey)) {\n errors.push(getters['i18n/t']('validation.podAffinity.topologyKey', errorOpts));\n }\n}\n\n/*\n verify that each matchExpression in labelSelector:\n operator is one of ['In', 'NotIn', 'Exists', 'DoesNotExist']\n values is defined if operator is In or NotIn\n values is empty if operator is Exists or DoesNotExist\n */\nfunction validateLabelSelector(affinityTerm, errorOpts, getters, errors) {\n const validOperators = ['In', 'NotIn', 'Exists', 'DoesNotExist'];\n\n const { labelSelector } = affinityTerm;\n\n if (labelSelector && !isEmpty(labelSelector)) {\n const { matchExpressions = [] } = labelSelector;\n\n matchExpressions.forEach((rule, i) => {\n const { operator, values } = rule;\n\n if (!validOperators.includes(operator)) {\n errors.push(getters['i18n/t']('validation.podAffinity.matchExpressions.operator', errorOpts));\n }\n if (operator === 'In' || operator === 'NotIn') {\n if (!values || !values.length) {\n errors.push(getters['i18n/t']('validation.podAffinity.matchExpressions.valuesMustBeDefined', errorOpts));\n }\n } else if (values && values.length) {\n errors.push(getters['i18n/t']('validation.podAffinity.matchExpressions.valueMustBeEmpty', errorOpts));\n }\n });\n }\n}\n","import { RBAC } from '@shell/config/types';\r\nimport isEmpty from 'lodash/isEmpty';\r\n\r\nexport function roleTemplateRules(rules = [], getters, errors, validatorArgs = []) {\r\n if (rules.some((rule) => isEmpty(rule.verbs))) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingVerb'));\r\n }\r\n\r\n if (rules.some((rule) => rule.resources?.length && rule.nonResourceURLs?.length)) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource'));\r\n }\r\n\r\n if (validatorArgs[0] === RBAC.ROLE) {\r\n if (rules.some((rule) => isEmpty(rule.resources))) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingResource'));\r\n }\r\n if (rules.some((rule) => isEmpty(rule.apiGroups))) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingApiGroup'));\r\n }\r\n } else if (rules.some((rule) => rule.resources?.length && rule.nonResourceUrls?.length)) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource'));\r\n }\r\n\r\n if (rules.some((rule) => isEmpty(rule.resources) && isEmpty(rule.nonResourceURLs))) {\r\n errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingOneResource'));\r\n }\r\n}\r\n","export function clusterName(pathValue, getters, errors, validatorArgs, displayKey) {\n const isRke2 = validatorArgs[0] === 'true'\n;\n\n if (isRke2) {\n if ((pathValue || '').match(/^(c-.{5}|local)$/i)) {\n errors.push(getters['i18n/t']('validation.cluster.name'));\n }\n }\n\n return errors;\n}\n","import { flowOutput } from '@shell/utils/validators/flow-output';\nimport { logdna } from '@shell/utils/validators/logging-outputs';\nimport { clusterIp, externalName, servicePort } from '@shell/utils/validators/service';\nimport { ruleGroups, groupsAreValid } from '@shell/utils/validators/prometheusrule';\nimport { interval, matching } from '@shell/utils/validators/monitoring-route';\nimport { containerImages } from '@shell/utils/validators/container-images';\nimport { cronSchedule } from '@shell/utils/validators/cron-schedule';\nimport { podAffinity } from '@shell/utils/validators/pod-affinity';\nimport { roleTemplateRules } from '@shell/utils/validators/role-template';\nimport { clusterName } from '@shell/utils/validators/cluster-name';\n\n/**\n* Custom validation functions beyond normal scalr types\n* Validator must export a function name should match the validator name on the customValidationRules rule\n* Exported function is used as a lookup key in resource-class:validationErrors:customValidationRules loop\n*/\nexport default {\n clusterName,\n clusterIp,\n externalName,\n flowOutput,\n groupsAreValid,\n logdna,\n ruleGroups,\n interval,\n servicePort,\n matching,\n containerImages,\n cronSchedule,\n podAffinity,\n roleTemplateRules,\n};\n","import JSZip from 'jszip';\n\nexport async function downloadFile(fileName, content, contentType = 'text/plain;charset=utf-8') {\n const blob = new Blob([content], { type: contentType });\n const { saveAs } = await import('file-saver');\n\n return saveAs(blob, fileName);\n}\n\n// {[fileName1]:data1, [fileName2]:data2}\nexport function generateZip(files) {\n // Moving this to a dynamic const JSZip = import('jszip') didn't work... figure out later\n const zip = new JSZip();\n\n for ( const fileName in files) {\n zip.file(fileName, files[fileName]);\n }\n\n return zip.generateAsync({ type: 'blob' }).then((contents) => {\n return contents;\n });\n}\n\nexport function downloadUrl(url, id = '__downloadIframe') {\n let iframe = document.getElementById(id);\n\n if ( !iframe ) {\n iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n iframe.id = id;\n document.body.appendChild(iframe);\n }\n\n iframe.src = url;\n}\n","/*\nQueue.js\nA function to represent a queue\n\nCreated by Stephen Morley - http://code.stephenmorley.org/ - and released under\nthe terms of the CC0 1.0 Universal legal code:\n\nhttp://creativecommons.org/publicdomain/zero/1.0/legalcode\n*/\n\n/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure -\n * items are added to the end of the queue and removed from the front.\n */\nexport default function Queue() {\n // initialise the queue and offset\n this.queue = [];\n this.offset = 0;\n\n // Returns the length of the queue.\n this.getLength = function() {\n return (this.queue.length - this.offset);\n };\n\n // Returns true if the queue is empty, and false otherwise.\n this.isEmpty = function() {\n return (this.queue.length === 0);\n };\n\n /* Enqueues the specified item. The parameter is:\n *\n * item - the item to enqueue\n */\n this.enqueue = function(item) {\n this.queue.push(item);\n };\n\n /* Dequeues an item and returns it. If the queue is empty, the value\n * 'undefined' is returned.\n */\n this.dequeue = function() {\n // if the queue is empty, return immediately\n if (this.queue.length === 0) {\n return undefined;\n }\n\n // store the item at the front of the queue\n const item = this.queue[this.offset];\n\n // increment the offset and remove the free space if necessary\n if (++this.offset * 2 >= this.queue.length) {\n this.queue = this.queue.slice(this.offset);\n this.offset = 0;\n }\n\n // return the dequeued item\n return item;\n };\n\n /* Returns the item at the front of the queue (without dequeuing it). If the\n * queue is empty then undefined is returned.\n */\n this.peek = function() {\n return (this.queue.length > 0 ? this.queue[this.offset] : undefined);\n };\n\n this.clear = function() {\n this.offset = 0;\n this.queue.length = 0;\n };\n}\n","import Queue from './queue';\n\nasync function _hash(hash, fnName) {\n const keys = Object.keys(hash);\n const promises = Object.values(hash);\n\n const res = await Promise[fnName](promises);\n const out = {};\n\n for ( let i = 0 ; i < keys.length ; i++ ) {\n out[keys[i]] = res[i];\n }\n\n return out;\n}\n\nexport function allHash(hash) {\n return _hash(hash, 'all');\n}\n\nexport function allHashSettled(hash) {\n return _hash(hash, 'allSettled');\n}\n\nexport function eachLimit(items, limit, iterator, debug = false) {\n if (debug) {\n console.log('eachLimit of', items.length, ' items', limit, 'at a time'); // eslint-disable-line no-console\n }\n\n return new Promise((resolve, reject) => {\n const queue = new Queue();\n let pending = 0;\n let failed = false;\n const out = [];\n\n for (let i = 0; i < items.length; i++) {\n queue.enqueue({ item: items[i], idx: i });\n }\n\n process();\n\n function process() {\n if (debug) {\n console.log(`process, queue=${ queue.getLength() }, pending=${ pending }, failed=${ failed }`); // eslint-disable-line no-console\n }\n\n if (failed) {\n return;\n }\n\n if (queue.isEmpty() && pending === 0) {\n return resolve(out);\n }\n\n while (!queue.isEmpty() && pending < limit && !failed) {\n const { item, idx } = queue.dequeue();\n\n if (debug) {\n console.log('Running', item); // eslint-disable-line no-console\n }\n\n pending++;\n\n iterator(item, idx).then((res) => {\n if (debug) {\n console.log('Done', item); // eslint-disable-line no-console\n }\n\n out[idx] = res;\n\n pending--;\n process();\n }).catch((err) => {\n if (debug) {\n console.log('Failed', err, item); // eslint-disable-line no-console\n }\n\n failed = true;\n reject(err);\n });\n }\n }\n });\n}\n\nexport function deferred(name) {\n const out = {};\n\n out.promise = new Promise((resolve, reject) => {\n out.resolve = resolve;\n out.reject = reject;\n }, name);\n\n return out;\n}\n\n/**\n * Apply the result of a promise to a given object's property\n *\n * This is a non-blocking method\n *\n * @param promise Promise to fetch result for\n * @param obj Object to set result of promise to\n * @param key Property in object to set result to\n * @param label Description of what promise is trying to do\n */\nexport function setPromiseResult(promise, obj, key, label) {\n promise\n .then((res) => {\n obj[key] = res;\n })\n .catch((e) => {\n console.warn('Failed to: ', label, e); // eslint-disable-line no-console\n });\n}\n","import isUrl from 'is-url';\n\nexport const isServerUrl = (value) => value === 'server-url';\n\nexport const isHttps = (value) => value.toLowerCase().startsWith('https://');\n\nexport const isLocalhost = (value) => (/^(?:https?:\\/\\/)?(?:localhost|127\\.0\\.0\\.1)/i).test(value);\n\nexport const hasTrailingForwardSlash = (value) => isUrl(value) && value?.toLowerCase().endsWith('/');\n","import { RBAC } from '@shell/config/types';\nimport { HCI } from '@shell/config/labels-annotations';\nimport isEmpty from 'lodash/isEmpty';\nimport has from 'lodash/has';\nimport isUrl from 'is-url';\n// import uniq from 'lodash/uniq';\nimport cronstrue from 'cronstrue';\nimport { Translation } from '@shell/types/t';\nimport { isHttps, isLocalhost, hasTrailingForwardSlash } from '@shell/utils/validators/setting';\n\n// import uniq from 'lodash/uniq';\nexport type Validator = (val: any, arg?: any) => T;\n\nexport type ValidatorFactory = (arg1: any, arg2?: any) => Validator\n\ntype ServicePort = {\n name?: string,\n nodePort?: string | number,\n port?: string | number,\n targetPort?: string | number,\n idx: number\n}\n\nexport class Port {\n empty: boolean;\n int: number;\n string: string;\n isNumber: boolean;\n isInt: boolean;\n constructor(port: number | string | undefined) {\n this.string = String(port);\n this.int = parseInt(this.string, 10);\n this.empty = (!port && this.int !== 0);\n this.isNumber = !isNaN(this.int) && !this.string.includes('e'); // leaving out the exponent edge case to keep the logic simple and because port numbers aren't that big...\n this.isInt = this.isNumber && !this.string.includes('.');\n }\n}\n\nconst runValidators = (val: any, validators: Validator[]) => {\n for (const validator of validators) {\n const message = validator(val);\n\n if (message) {\n return message;\n }\n }\n};\n\nexport interface ValidationOptions {\n key?: string,\n}\n\n// \"t\" is the function name we use for getting a translated string\nexport default function(t: Translation, { key = 'Value' }: ValidationOptions): { [key:string]: Validator | ValidatorFactory } {\n // utility validators these validators only get used by other validators\n const startDot: ValidatorFactory = (label: string): Validator => (val: string) => val?.slice(0, 1) === '.' ? t(`validation.dns.${ label }.startDot`, { key }) : undefined;\n\n const endDot = (label: string): Validator => (val: string) => val?.slice(-1) === '.' ? t(`validation.dns.${ label }.endDot`, { key }) : undefined;\n\n const startNumber: ValidatorFactory = (label: string): Validator => (val: string) => val?.slice(0, 1)?.match(/[0-9]/) ? t(`validation.dns.${ label }.startNumber`, { key }) : undefined;\n\n const startHyphen: ValidatorFactory = (label: string): Validator => (val: string) => val?.slice(0, 1) === '-' ? t(`validation.dns.${ label }.startHyphen`, { key }) : undefined;\n\n const endHyphen: ValidatorFactory = (label: string): Validator => (val: string) => val?.slice(-1) === '-' ? t(`validation.dns.${ label }.endHyphen`, { key }) : undefined;\n\n const minValue: ValidatorFactory = (min: string) => (val: string | number) => Number(val) < Number(min) ? t('validation.minValue', { key, min }) : undefined;\n\n const maxValue: ValidatorFactory = (max: string) => (val: string | number) => Number(val) > Number(max) ? t('validation.maxValue', { key, max }) : undefined;\n\n const betweenValues: ValidatorFactory = ([min, max]: string[]) => (val: string | number) => minValue(min)(val) || maxValue(max)(val) ? t('validation.betweenValues', {\n key, min, max\n }) : undefined;\n\n const minLength: ValidatorFactory = (min: string) => (val: string) => val.length < Number(min) ? t('validation.minLength', { key, min }) : undefined;\n\n const maxLength: ValidatorFactory = (max: string) => (val: string) => val.length > Number(max) ? t('validation.maxLength', { key, max }) : undefined;\n\n const betweenLengths: ValidatorFactory = ([min, max]: string[]) => (val: string) => minLength(min)(val) || maxLength(max)(val) ? t('validation.betweenLengths', {\n key, min, max\n }) : undefined;\n\n const requiredInt: Validator = (val: string) => isNaN(parseInt(val, 10)) ? t('validation.number.requiredInt', { key }) : undefined;\n\n const isInteger: Validator = (val: string | number) => !Number.isInteger(+val) || `${ val }`.match(/\\.+/g) ? t('validation.number.requiredInt', { key }) : undefined;\n\n const isPositive: Validator = (val: string | number) => +val < 0 ? t('validation.number.isPositive', { key }) : undefined;\n\n const isOctal: Validator = (val: string | number) => {\n const valueString = `${ val }`;\n const isValid = valueString.match(/(^0+)(.+)/);\n\n return isValid ? t('validation.number.isOctal', { key }) : undefined;\n };\n\n const portNumber: Validator = (val: string) => parseInt(val, 10) < 1 || parseInt(val, 10) > 65535 ? t('validation.number.between', {\n key, min: '1', max: '65535'\n }) : undefined;\n\n const dnsChars: Validator = (val: string) => {\n const matchedChars = val?.match(/[^${'A-Za-z0-9-'}]/g);\n\n if (matchedChars) {\n return t('validation.chars', {\n key, count: matchedChars.length, chars: matchedChars.map((char) => char === ' ' ? 'Space' : `\"${ char }\"`).join(', ')\n });\n }\n\n return undefined;\n };\n\n // the weird edge case here deals with internationalized domain names which are prepended with 'xn--'\n // https://datatracker.ietf.org/doc/html/rfc5891#section-4.2.3.1\n const dnsDoubleDash: Validator = (val: string) => (val?.substr(2, 2) === '--' && val?.substr(0, 2) !== 'xn') ? t(`validation.dns.doubleHyphen`, { key }) : undefined;\n\n const dnsIanaServiceNameDoubleDash: Validator = (val: string) => (val?.substr(2, 2) === '--' && val?.substr(0, 2) !== 'xn') ? t(`validation.dns.doubleHyphen`, { key }) : undefined;\n\n const dnsEmpty: ValidatorFactory = (label: string): Validator => (val = '') => val.length === 0 ? t(`validation.dns.${ label }.emptyLabel`, { key, min: 1 }) : undefined;\n\n const dnsTooLong: ValidatorFactory = (label: string, length = 63): Validator => (val = '') => val.length > length ? t(`validation.dns.${ label }.tooLongLabel`, { key, max: length }) : undefined;\n\n // eslint-disable-next-line no-unused-vars\n const hostnameEmpty: Validator = (val = '') => val.length === 0 ? t('validation.dns.hostname.empty', { key }) : undefined;\n\n const hostnameTooLong: Validator = (val = '') => val.length > 253 ? t('validation.dns.hostname.tooLong', { key, max: 253 }) : undefined;\n\n const absolutePath: Validator = (val = '') => val[0] !== '/' && val.length > 0 ? t('validation.path', { key }) : undefined;\n\n const required: Validator = (val: any) => !val && val !== false ? t('validation.required', { key }) : undefined;\n\n const noUpperCase: Validator = (val = '') => val.toLowerCase() !== val ? t('validation.noUpperCase', { key }) : undefined;\n\n const cronSchedule: Validator = (val: string) => {\n try {\n cronstrue.toString(val);\n } catch (e) {\n return t('validation.invalidCron');\n }\n };\n\n const https: Validator = (val: string) => val && !isHttps(val) ? t('validation.setting.serverUrl.https') : undefined;\n\n const localhost: Validator = (val: string) => isLocalhost(val) ? t('validation.setting.serverUrl.localhost') : undefined;\n\n const trailingForwardSlash: Validator = (val: string) => hasTrailingForwardSlash(val) ? t('validation.setting.serverUrl.trailingForwardSlash') : undefined;\n\n const url: Validator = (val: string) => val && !isUrl(val) ? t('validation.setting.serverUrl.url') : undefined;\n\n const interval: Validator = (val: string) => !/^\\d+[hms]$/.test(val) ? t('validation.monitoring.route.interval', { key }) : undefined;\n\n const containerImage: Validator = (val: any) => !val?.image ? t('workload.validation.containerImage', { name: val.name }) : undefined;\n\n const containerImages: Validator = (val: any | [any]) => {\n const containers = val.jobTemplate ? val?.jobTemplate?.spec?.template?.spec?.containers : val?.template?.spec?.containers;\n\n if (!containers || !containers.length) {\n return t('validation.required', { key: t('workload.container.titles.containers') });\n }\n\n // making sure each container has an image name\n return containers.map((container: any) => containerImage(container)).find((containerError: string) => containerError);\n };\n\n const dnsLabel: Validator = (val: string) => {\n const validators = [\n dnsChars,\n startHyphen('label'),\n endHyphen('label'),\n dnsDoubleDash,\n // dnsEmpty('label'), // questionable as to if this is needed if the field is also required...\n dnsTooLong('label')\n ];\n\n return runValidators(val, validators);\n };\n\n const dnsLabelIanaServiceName: Validator = (val: string) => {\n const validators = [\n dnsChars,\n startHyphen('label'),\n endHyphen('label'),\n dnsIanaServiceNameDoubleDash,\n dnsEmpty('label'), // questionable as to if this is needed if the field is also required...\n dnsTooLong('label', 15)\n ];\n\n return runValidators(val, validators);\n };\n\n const dnsLabelRestricted: Validator = (val: string) => {\n const validators = [\n dnsChars,\n startNumber('label'),\n startHyphen('label'),\n endHyphen('label'),\n dnsDoubleDash,\n dnsEmpty('label'), // questionable as to if this is needed if the field is also required...\n dnsTooLong('label')\n ];\n\n return runValidators(val, validators);\n };\n\n const hostname: Validator = (val: string) => {\n if (val) {\n const validators = [\n startDot('hostname'),\n hostnameTooLong,\n endDot('hostname')\n ];\n\n const hostNameMessage = runValidators(val, validators);\n\n if (hostNameMessage) {\n return hostNameMessage;\n }\n\n const labels = val.split('.');\n const labelValidators = [\n dnsChars,\n startHyphen('hostname'),\n endHyphen('hostname'),\n dnsDoubleDash,\n dnsEmpty('hostname'),\n dnsTooLong('hostname')\n ];\n\n for ( let i = 0; i < labels.length; i++ ) {\n const labelMessage = runValidators(labels[i], labelValidators);\n\n if (labelMessage) {\n return labelMessage;\n }\n }\n }\n };\n\n const wildcardHostname: Validator = (val: string) => {\n // allow wildcard in first part of hostname\n val = val ? val.replace(/^\\*\\./, '') : val;\n\n return hostname(val);\n };\n\n const externalName: Validator = (val: string) => {\n if (isEmpty(val)) {\n return t('validation.service.externalName.none');\n } else {\n return hostname(val);\n }\n };\n\n const testRule = (val: string | undefined) => {\n return 'This is an error returned by the testRule validator';\n };\n\n const ruleGroups: Validator = (val: {groups?: any}) => isEmpty(val?.groups) ? t('validation.prometheusRule.groups.required') : undefined;\n\n const clusterName: ValidatorFactory = (isRke2: boolean): Validator => (val: string | undefined) => isRke2 && (val || '')?.match(/^(c-.{5}|local)$/i) ? t('validation.cluster.name') : undefined;\n\n const servicePort: Validator = (val: ServicePort) => {\n const {\n name,\n idx\n } = val;\n\n const nodePort = new Port(val.nodePort);\n const listeningPort = new Port(val.port);\n const targetPort = new Port(val.targetPort);\n\n if (isEmpty(name)) {\n return t('validation.service.ports.name.required', { position: idx + 1 });\n }\n\n if (!nodePort.empty) {\n if (!nodePort.isInt) {\n return t('validation.service.ports.nodePort.requiredInt', { position: idx + 1 });\n } else if (nodePort.int < 1 || nodePort.int > 65535) {\n return t('validation.service.ports.nodePort.between', { position: idx + 1 });\n }\n }\n\n if (!listeningPort.empty) {\n if (!listeningPort.isInt) {\n return t('validation.service.ports.port.requiredInt', { position: idx + 1 });\n } else if (listeningPort.int < 1 || listeningPort.int > 65535) {\n return t('validation.service.ports.port.between', { position: idx + 1 });\n } else if (listeningPort.string?.includes('.')) {\n return listeningPort;\n }\n } else {\n return t('validation.service.ports.port.required', { position: idx + 1 });\n }\n\n if (!targetPort.empty) {\n if (!targetPort.isInt) {\n const ianaServiceNameErrors = dnsLabelIanaServiceName(targetPort.string);\n\n if (ianaServiceNameErrors) {\n return ianaServiceNameErrors;\n }\n } else if (targetPort.int < 1 || targetPort.int > 65535) {\n return t('validation.service.ports.targetPort.between', { position: idx + 1 });\n }\n } else {\n return t('validation.service.ports.targetPort.required', { position: idx + 1 });\n }\n\n return undefined;\n };\n\n const groupIsValid: Validator = (val, readableIndex) => {\n let returnMessage: string | undefined;\n\n if (isEmpty(val?.name)) {\n return t('validation.prometheusRule.groups.valid.name', { index: readableIndex });\n }\n\n if (isEmpty(val.rules)) {\n return t('validation.prometheusRule.groups.valid.singleEntry', { index: readableIndex });\n } else {\n val.rules.forEach((rule: any, idx: number) => {\n const readableRuleIndex = idx + 1;\n\n if (has(rule, 'alert') && isEmpty(rule?.alert) && !returnMessage) {\n returnMessage = t('validation.prometheusRule.groups.valid.rule.alertName', { groupIndex: readableIndex, ruleIndex: readableRuleIndex });\n } else if (has(rule, 'record') && isEmpty(rule?.record)) {\n returnMessage = t('validation.prometheusRule.groups.valid.rule.recordName', { groupIndex: readableIndex, ruleIndex: readableRuleIndex });\n }\n\n if ((has(rule, 'expr') && isEmpty(rule.expr) && !returnMessage) || (!has(rule, 'expr') && !returnMessage)) {\n returnMessage = t('validation.prometheusRule.groups.valid.rule.expr', { groupIndex: readableIndex, ruleIndex: readableRuleIndex });\n }\n\n if (has(rule, 'alert')) {\n if (\n (has(rule, 'labels') && isEmpty(rule.labels) && !returnMessage) ||\n (!has(rule, 'labels') && !returnMessage)\n ) {\n returnMessage = t('validation.prometheusRule.groups.valid.rule.labels', { groupIndex: readableIndex, ruleIndex: readableRuleIndex });\n }\n }\n });\n }\n\n return returnMessage;\n };\n\n const groupsAreValid: Validator = (val) => {\n const groups = [...val]; // making a new array in the function because I'm gonna mutate it later...\n let message;\n\n groups.forEach((group, idx, arr) => {\n message = groupIsValid(group, idx + 1);\n if (!!message) {\n arr.length = idx + 1; // this is a tricksy way of breaking a forEach loop since we just want the first message\n }\n });\n\n return message;\n };\n\n const matching: Validator = (val) => {\n if (isEmpty(val?.match) && isEmpty(val?.['match_re'])) {\n return t('validation.monitoring.route.match');\n }\n };\n\n const roleTemplateRules: ValidatorFactory = (type): Validator => (val = []) => {\n if (val.some((rule: any) => isEmpty(rule.verbs))) {\n return t('validation.roleTemplate.roleTemplateRules.missingVerb');\n }\n\n if (val.some((rule: any) => rule.resources?.length && rule.nonResourceURLs?.length)) {\n return t('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource');\n }\n\n if (type === RBAC.ROLE) {\n if (val.some((rule: any) => isEmpty(rule.resources))) {\n return t('validation.roleTemplate.roleTemplateRules.missingResource');\n }\n\n if (val.some((rule: any) => isEmpty(rule.apiGroups))) {\n return t('validation.roleTemplate.roleTemplateRules.missingApiGroup');\n }\n } else if (val.some((rule: any) => isEmpty(rule.resources) && isEmpty(rule.nonResourceURLs))) {\n return t('validation.roleTemplate.roleTemplateRules.missingOneResource');\n }\n\n return undefined;\n };\n\n // The existing validator for clusterIp never actually returns an error\n const clusterIp: Validator = (val) => undefined;\n\n const backupTarget: Validator = (val) => {\n const parseValue = JSON.parse(val);\n const type = parseValue.type;\n\n if (!type) {\n return t('validation.required', { key: 'Type' });\n }\n\n if (type === 's3') {\n if (!parseValue.accessKeyId) {\n return t('validation.required', { key: 'accessKeyId' });\n }\n\n if (!parseValue.secretAccessKey) {\n return t('validation.required', { key: 'secretAccessKey' });\n }\n\n if (!parseValue.bucketRegion) {\n return t('validation.required', { key: 'bucketRegion' });\n }\n\n if (!parseValue.bucketName) {\n return t('validation.required', { key: 'bucketName' });\n }\n }\n\n return undefined;\n };\n\n const imageUrl: Validator = (val) => {\n const VM_IMAGE_FILE_FORMAT = ['qcow', 'qcow2', 'raw', 'img', 'iso'];\n\n if (!val || val === '') {\n return undefined;\n }\n\n const urlSlug = val.split('/').pop();\n const fileExtension = urlSlug.split('.').pop().toLowerCase();\n\n if (!VM_IMAGE_FILE_FORMAT.includes(fileExtension)) {\n return t('harvester.validation.image.ruleTip');\n }\n\n return undefined;\n };\n\n const fileRequired: Validator = (val = {}) => {\n if (!val[HCI.IMAGE_NAME]) {\n return t('validation.required', { key: t('harvester.image.fileName') });\n }\n };\n\n const subDomain: Validator = (val) => {\n const matchedChars = val?.match(/[^a-z0-9.-]/g);\n\n if (matchedChars) {\n return t('validation.chars', {\n key, count: matchedChars.length, chars: matchedChars.map((char: string) => char === ' ' ? 'Space' : `\"${ char }\"`).join(', ')\n });\n }\n\n return runValidators(val, [startHyphen('label'), endHyphen('label'), startDot('label'), endDot('label'), required]);\n };\n\n return {\n absolutePath,\n backupTarget,\n betweenLengths,\n betweenValues,\n clusterIp,\n clusterName,\n containerImage,\n containerImages,\n cronSchedule,\n dnsLabel,\n dnsLabelIanaServiceName,\n dnsLabelRestricted,\n externalName,\n fileRequired,\n groupsAreValid,\n hostname,\n imageUrl,\n interval,\n https,\n localhost,\n trailingForwardSlash,\n url,\n matching,\n maxLength,\n maxValue,\n minLength,\n minValue,\n noUpperCase,\n portNumber,\n required,\n requiredInt,\n isInteger,\n isPositive,\n isOctal,\n roleTemplateRules,\n ruleGroups,\n servicePort,\n subDomain,\n testRule,\n wildcardHostname,\n };\n}\n","export const waitFor = (testFn: Function, msg = '', timeoutMs = 3000000, intervalMs = 500, log = false): Promise => {\n gatedLog('Starting wait for', msg);\n\n return new Promise((resolve, reject) => {\n if (testFn()) {\n gatedLog('Wait for', msg || 'unknown', 'done immediately');\n resolve(this);\n }\n const timeout = setTimeout(() => {\n gatedLog('Wait for', msg, 'timed out');\n clearInterval(interval);\n clearTimeout(timeout);\n if (msg) {\n reject(new Error(`Failed waiting for: ${ msg }`));\n } else {\n throw new Error(`waitFor timed out after ${ timeoutMs / 1000 } seconds`);\n }\n }, timeoutMs);\n const interval = setInterval(() => {\n if ( testFn() ) {\n gatedLog('Wait for', msg, 'done');\n clearInterval(interval);\n clearTimeout(timeout);\n resolve(this);\n } else if (msg) {\n gatedLog('Wait for', msg, 'not done yet');\n }\n }, intervalMs);\n });\n\n function gatedLog(...args: any[]) {\n if (log) {\n console.log(...args); // eslint-disable-line no-console\n }\n }\n};\n","import { SCHEMA } from '@shell/config/types';\n\nimport { applyChangeset, changeset, changesetConflicts } from '@shell/utils/object';\n\nexport const KEY_FIELD_FOR = {\n [SCHEMA]: '_id',\n default: 'id',\n};\n\nexport function keyFieldFor(type) {\n return KEY_FIELD_FOR[type] || KEY_FIELD_FOR['default'];\n}\n\nexport function normalizeType(type) {\n type = (type?.type || type || '').toLowerCase();\n\n return type;\n}\n\n// Detect and resolve conflicts from a 409 response.\n// If they are resolved, return a false-y value\n// Else they can't be resolved, return an array of errors to show to the user.\nexport async function handleConflict(initialValueJSON, value, liveValue, rootGetters, store, storeNamespace) {\n const orig = await store.dispatch(`${ storeNamespace }/cleanForDiff`, initialValueJSON, { root: true });\n const user = await store.dispatch(`${ storeNamespace }/cleanForDiff`, value.toJSON(), { root: true });\n const cur = await store.dispatch(`${ storeNamespace }/cleanForDiff`, liveValue.toJSON(), { root: true });\n\n const bgChange = changeset(orig, cur);\n const userChange = changeset(orig, user);\n const actualConflicts = changesetConflicts(bgChange, userChange);\n\n console.log('Background Change', bgChange); // eslint-disable-line no-console\n console.log('User Change', userChange); // eslint-disable-line no-console\n console.log('Conflicts', actualConflicts); // eslint-disable-line no-console\n\n value.metadata.resourceVersion = liveValue.metadata.resourceVersion;\n applyChangeset(value, bgChange);\n\n if ( actualConflicts.length ) {\n // Stop the save and let the user inspect and continue editing\n const out = [rootGetters['i18n/t']('validation.conflict', { fields: actualConflicts.join(', '), fieldCount: actualConflicts.length })];\n\n return out;\n } else {\n // The save can continue\n return false;\n }\n}\n","import { ProductFunction } from './plugin';\nimport { RouteConfig, Location } from 'vue-router';\n\n// Cluster Provisioning types\nexport * from './types-provisioning';\n\n// package.json metadata\nexport interface PackageMetadata {\n name: string;\n version: string;\n description: string;\n icon: string;\n}\n\n// export interface Route {\n// name: string;\n// path: string;\n// component: Object | Function,\n// children: Route[];\n// }\n\nexport type VuexStoreObject = { [key: string]: any }\nexport type CoreStoreSpecifics = { state: () => VuexStoreObject, getters: VuexStoreObject, mutations: VuexStoreObject, actions: VuexStoreObject }\nexport type CoreStoreConfig = { namespace: string, baseUrl?: string, modelBaseClass?: string, supportsStream?: boolean, isClusterStore?: boolean }\nexport type CoreStoreInit = (store: any, ctx: any) => void;\nexport type RegisterStore = () => (store: any) => void\nexport type UnregisterStore = (store: any) => void\n\nexport type PluginRouteConfig = {parent?: string, route: RouteConfig}\n\nexport type OnEnterLeavePackageConfig = {\n clusterId: string,\n product: string,\n oldProduct: string,\n isExt: string,\n oldIsExt: string\n}\n\nexport type OnNavToPackage = (store: any, config: OnEnterLeavePackageConfig) => Promise;\nexport type OnNavAwayFromPackage = (store: any, config: OnEnterLeavePackageConfig) => Promise;\nexport type OnLogOut = (store: any) => Promise;\n\n/** Enum regarding the extensionable areas/places of the UI */\nexport enum ExtensionPoint {\n ACTION = 'Action', // eslint-disable-line no-unused-vars\n TAB = 'Tab', // eslint-disable-line no-unused-vars\n PANEL = 'Panel', // eslint-disable-line no-unused-vars\n CARD = 'Card', // eslint-disable-line no-unused-vars\n TABLE_COL = 'TableColumn', // eslint-disable-line no-unused-vars\n}\n\n/** Enum regarding action locations that are extensionable in the UI */\nexport enum ActionLocation {\n HEADER = 'header-action', // eslint-disable-line no-unused-vars\n TABLE = 'table-action', // eslint-disable-line no-unused-vars\n}\n\n/** Enum regarding panel locations that are extensionable in the UI */\nexport enum PanelLocation {\n DETAILS_MASTHEAD = 'details-masthead', // eslint-disable-line no-unused-vars\n DETAIL_TOP = 'detail-top', // eslint-disable-line no-unused-vars\n RESOURCE_LIST = 'resource-list', // eslint-disable-line no-unused-vars\n}\n\n/** Enum regarding tab locations that are extensionable in the UI */\nexport enum TabLocation {\n RESOURCE_DETAIL = 'tab', // eslint-disable-line no-unused-vars\n CLUSTER_CREATE_RKE2 = 'cluster-create-rke2', // eslint-disable-line no-unused-vars\n}\n\n/** Enum regarding card locations that are extensionable in the UI */\nexport enum CardLocation {\n CLUSTER_DASHBOARD_CARD = 'cluster-dashboard-card', // eslint-disable-line no-unused-vars\n}\n\n/** Enum regarding table col locations that are extensionable in the UI */\nexport enum TableColumnLocation {\n RESOURCE = 'resource-list', // eslint-disable-line no-unused-vars\n}\n\n/** Definition of the shortcut object (keyboard shortcuts) */\nexport type ShortCutKey = {\n windows?: string[];\n mac?: string[];\n};\n\n/** Definition of the action options (table actions) */\nexport type ActionOpts = {\n event: any;\n isAlt: boolean;\n action: any;\n};\n\n/** Definition of an extension action (options that can be passed when setting an extension action) */\nexport type Action = {\n label?: string;\n labelKey?: string;\n tooltipKey?: string;\n tooltip?: string;\n shortcut?: string | ShortCutKey;\n svg?: Function;\n icon?: string;\n multiple?: boolean;\n enabled?: Function | boolean;\n invoke: (opts: ActionOpts, resources: any[], globals?: any) => void | boolean | Promise;\n};\n\n/** Definition of a panel (options that can be passed when defining an extension panel enhancement) */\nexport type Panel = {\n component: Function;\n};\n\n/** Definition of a card (options that can be passed when defining an extension card enhancement) */\nexport type Card = {\n label?: string;\n labelKey?: string;\n component: Function;\n};\n\nexport type TableColumn = any;\n\n/** Definition of a tab (options that can be passed when defining an extension tab enhancement) */\nexport type Tab = {\n name: string;\n label?: string;\n labelKey?: string;\n tooltipKey?: string;\n tooltip?: string;\n showHeader?: boolean;\n weight?: number;\n component: Function;\n};\n\n/** Definition of the locationConfig object (used in extensions) */\nexport type LocationConfig = {\n product?: string[],\n resource?: string[],\n namespace?: string[],\n cluster?: string[],\n id?: string[],\n mode?: string[],\n hash?: string[],\n /**\n * path match from URL (excludes host address)\n */\n path?: { [key: string]: string | boolean}[],\n /**\n * Query Params from URL\n */\n queryParam?: { [key: string]: string},\n /**\n * Context specific params.\n *\n * Components can provide additional context specific params that this value must match\n */\n context?: { [key: string]: string},\n};\n\nexport interface ProductOptions {\n /**\n * The category this product belongs under. i.e. 'config'\n */\n category?: string;\n\n /**\n * Hide the Copy KubeConfig button in the header\n */\n hideCopyConfig?: boolean;\n\n /**\n * Hide the Download KubeConfig button in the header\n */\n hideKubeConfig?: boolean;\n\n /**\n * Hide the Kubectl Shell button in the header\n */\n hideKubeShell?: boolean;\n\n /**\n * Hide the Namespace location\n */\n hideNamespaceLocation?: boolean;\n\n /**\n * Hide the system resources\n */\n\n hideSystemResources?: boolean;\n /**\n * The icon that should be displayed beside this item in the navigation.\n */\n icon?: string,\n\n /**\n * Only load the product if the feature is present\n */\n ifFeature?: string | RegExp;\n\n /**\n * Only load the product if the type is present\n */\n ifHave?: string;\n\n /**\n * Only load the product if the group is present\n */\n ifHaveGroup?: string | RegExp;\n\n /**\n * Only load the product if the type is present\n */\n ifHaveType?: string | RegExp;\n\n /**\n * The vuex store that this product should use by default i.e. 'management'\n */\n inStore?: string;\n\n /**\n * Show the cluster switcher in the navigation\n */\n showClusterSwitcher?: boolean;\n\n /**\n * Show the namespace filter in the header\n */\n showNamespaceFilter?: boolean;\n\n /**\n * A number used to determine where in navigation this item will be placed. The highest number will be at the top of the list.\n */\n weight?: number;\n\n /**\n * The route that the product will lead to if click on in navigation.\n */\n to?: Location;\n\n /**\n * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.\n */\n // ifHaveVerb: string | RegExp;\n // removable: string;\n // showWorkspaceSwitcher: boolean;\n // supportRoute: string;\n // typeStoreMap: string;\n}\n\nexport interface HeaderOptions {\n /**\n * Name of the header. This should be unique.\n */\n name?: string;\n\n /**\n * A string that will show in the table column as a header\n */\n label?: string;\n\n /**\n * A translation key where the resulting string will show in the table column as a header\n */\n labelKey?: string;\n\n /**\n * A string which represents the path to access the value from the row object i.e. `row.meta.value`.\n */\n value?: string;\n\n /**\n * A string which represents the path to access the value from the row object which we'll use to sort i.e. `row.meta.value`\n */\n sort?: string | string[];\n\n /**\n * A string which represents the path to access the value from the row object which we'll use to search i.e. `row.meta.value`.\n * It can be false to disable searching on this field\n */\n search?: string | boolean;\n\n /**\n * Number of pixels the column should be in the table\n */\n width?: number;\n\n /**\n * The name of a custom formatter. The available formatters can bee seen in `@rancher/shell/components/formatter`\n */\n formatter?: string;\n\n /**\n * These options are dependent on the formatter that's chosen. Examples can be seen in `@rancher/shell/components/formatter` and `@rancher/shell/config/table-headers`\n */\n formatterOpts?: any;\n\n /**\n * Provide a function which accets a row and returns the value that should be displayed in the column\n * @param row This can be any value which represents the row\n * @returns Can return {@link string | number | null | undefined} to display in the column\n */\n getValue?: (row: any) => string | number | null | undefined;\n}\n\nexport interface ConfigureTypeOptions {\n /**\n * The resource can edit/show yaml\n */\n canYaml?: boolean;\n\n /**\n * Modify the way the name looks when displayed\n */\n displayName?: string;\n\n /**\n * New resources can be created of this type\n */\n isCreatable?: boolean;\n\n /**\n * Resources of this type can be deleted/removed\n */\n isRemovable?: boolean;\n\n /**\n * Resources of this type can be edited\n */\n isEditable?: boolean;\n\n /**\n * This type should be grouped by namespaces when displayed in a table\n */\n namespaced?: boolean;\n\n /**\n * Show the age column in when displaying this type in a table\n */\n showAge?: boolean;\n\n /**\n * Show the masthead at the top of the list view of this type\n */\n showListMasthead?: boolean;\n\n /**\n * Show the state column in when displaying this type in a table\n */\n showState?: boolean;\n\n /**\n * Define where this type/page should navigate to (menu entry routing)\n */\n customRoute?: Object;\n\n /**\n * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.\n */\n // alias\n // depaginate\n // graphConfig\n // hasGraph\n // limit\n // listGroups\n // localOnly\n // location\n // match\n // realResource\n // resource\n // resourceDetail\n // resourceEdit\n // showConfigView\n}\n\nexport interface ConfigureVirtualTypeOptions extends ConfigureTypeOptions {\n /**\n * The translation key displayed anywhere this type is referenced\n */\n labelKey: string;\n\n /**\n * An identifier that should be unique across all types\n */\n name: string;\n\n /**\n * The route that this type should correspond to {@link PluginRouteConfig} {@link RouteConfig}\n */\n route: PluginRouteConfig | RouteConfig | Object;\n}\n\nexport interface DSLReturnType {\n /**\n * Register multiple types by name and place them all in a group if desired. Primarily used for grouping things in the cluster explorer navigation.\n * @param types A list of types that are going to be registered\n * @param group Conditionally a group you want to places all the types in\n * @returns {@link void}\n */\n basicType: (types: string[], group?: string) => void;\n\n /**\n * Configure a myriad of options for the specified type\n * @param type The type to be configured\n * @param options {@link ConfigureTypeOptions}\n * @returns {@link void}\n */\n configureType: (type: string, options: ConfigureTypeOptions) => void;\n\n /**\n * Register the headers/columns that should be used when rendering a table for the specified type.\n * @param type The type you'd like to register headers/columns for.\n * @param headers {@link HeaderOptions[]}\n * @returns {@link void}\n */\n headers: (type: string, headers: HeaderOptions[]) => void;\n\n /**\n * Create and register a new product\n * @param options {@link ProductOptions}\n * @returns {@link void}\n */\n product: (options: ProductOptions) => void;\n\n /**\n * Create and label a group. The group will show up in navigation\n * @param groupNane Name of the group\n * @param label Label in navigation\n * @returns {@link void}\n */\n mapGroup: (groupName: string, label: string) => void;\n\n /**\n * Create and configure a myriad of options for a type\n * @param options {@link ConfigureVirtualTypeOptions}\n * @returns {@link void}\n */\n virtualType: (options: ConfigureVirtualTypeOptions) => void;\n\n /**\n * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.\n */\n // componentForType: (type: string, replacementType: string)\n // groupBy: (type: string, field: string)\n // hideBulkActions: (type: string, field)\n // ignoreGroup: (regexOrString)\n // ignoreType: (regexOrString)\n //\n // mapType: (match, replace)\n // moveType: (match, group)\n // setGroupDefaultType: (input, defaultType)\n // spoofedType: (obj)\n // weightGroup: (input, weight, forBasic)\n // weightType: (input, weight, forBasic)\n}\n\n/**\n * Interface for a Dashboard plugin\n */\nexport interface IPlugin {\n /**\n * Add a product\n * @param importFn Function that will import the module containing a product definition\n */\n addProduct(importFn: ProductFunction): void;\n\n /**\n * Add a locale to the i18n store\n * @param locale Locale id (e.g. en-us)\n * @param label Label for the locale to be displayed in the i18n chooser\n */\n addLocale(locale: string, label: string): void;\n\n /**\n * Plugin metadata\n */\n metadata: PackageMetadata;\n\n /**\n * Validators used in the same manner as shell/utils/custom-validators\n */\n validators: {[key: string]: Function};\n\n /**\n * Add a module containing localisations for a specific locale\n */\n addL10n(locale: string, fn: Function): void;\n\n /**\n * Add a route to the Vue Router\n */\n addRoute(route: RouteConfig): void;\n addRoute(parent: string, route: RouteConfig): void;\n\n /**\n * Adds an action/button to the UI\n */\n addAction(where: ActionLocation | string, when: LocationConfig | string, action: Action): void;\n\n /**\n * Adds a tab to the UI (ResourceTabs component)\n */\n addTab(where: TabLocation | string, when: LocationConfig | string, action: Tab): void;\n\n /**\n * Adds a panel/component to the UI\n */\n addPanel(where: PanelLocation | string, when: LocationConfig | string, action: Panel): void;\n\n /**\n * Adds a card to the UI\n */\n addCard(where: CardLocation | string, when: LocationConfig | string, action: Card): void;\n\n /**\n * Adds a new column to the SortableTable component\n */\n addTableColumn(where: TableColumnLocation | string, when: LocationConfig | string, action: TableColumn): void;\n\n /**\n * Set the component to use for the landing home page\n * @param component Home page component\n */\n setHomePage(component: any): void;\n\n /**\n * Add routes to the Vue Router\n */\n addRoutes(routes: PluginRouteConfig[] | RouteConfig[]): void;\n\n /**\n * Add a hook to be called when the plugin is uninstalled\n * @param hook Function to call when the plugin is uninstalled\n */\n addUninstallHook(hook: Function): void;\n\n /**\n * Add a generic Vuex Store\n */\n addStore(storeName: string, register: RegisterStore, unregister: UnregisterStore): void;\n /**\n * Add a dashboard Vuex store.\n *\n * This will contain the toolset (getters/mutations/actions/etc) required by the dashboard to support Dashboard components. Most of these\n * will be automatically supplemented when the store is registered, others though will need to be provided to supply package specific\n * functionality (see storeSpecifics). For instance a component may request to fetch all of a resource type which, via a number of generic\n * actions, will eventually call a `request` action which will make the raw http request. This is a pkg specific feature so needs the\n * `request` action needs to be supplied in the `storeSpecifics`\n */\n addDashboardStore(storeName: string, storeSpecifics: CoreStoreSpecifics, config: CoreStoreConfig, init?: CoreStoreInit): void;\n\n /**\n * Add hooks that will execute when a user navigates\n * - to a route owned by this package\n * - from a route owned by this package\n */\n addNavHooks(\n onEnter?: OnNavToPackage,\n onLeave?: OnNavAwayFromPackage,\n onLogOut?: OnLogOut\n ): void;\n\n /**\n * Register 'something' that can be dynamically loaded - e.g. model, edit, create, list, i18n\n * @param {String} type type of thing to register, e.g. 'edit'\n * @param {String} name unique name of 'something'\n * @param {Function} fn function that dynamically loads the module for the thing being registered\n */\n register(type: string, name: string, fn: Function | Boolean): void;\n\n /**\n * Will return all of the configuration functions used for creating a new product.\n * @param store The store that was passed to the function that's passed to `plugin.addProduct(function)`\n * @param productName The name of the new product. This name is displayed in the navigation.\n */\n DSL(store: any, productName: string): DSLReturnType;\n}\n\n// Internal interface\n// Built-in extensions may use this, but external extensions should not, as this is subject to change\n// Defined as any for now\nexport type IInternal = any;\n","import { CATTLE_PUBLIC_ENDPOINTS } from '@shell/config/labels-annotations';\nimport { NODE as NODE_TYPE } from '@shell/config/types';\nimport { COLUMN_BREAKPOINTS } from '@shell/components/SortableTable/index.vue';\n\n// Note: 'id' is always the last sort, so you don't have to specify it here.\n\nexport const STATE = {\n name: 'state',\n labelKey: 'tableHeaders.state',\n sort: ['stateSort', 'nameSort'],\n value: 'stateDisplay',\n getValue: (row) => row.stateDisplay,\n width: 100,\n default: 'unknown',\n formatter: 'BadgeStateFormatter',\n};\n\nexport const DOWNLOAD = {\n name: 'download',\n labelKey: 'tableHeaders.download',\n value: 'download',\n canBeVariable: true,\n align: 'right',\n};\n\n// This header is used for nodes in\n// both Cluster Explorer and Cluster Management.\nexport const INTERNAL_EXTERNAL_IP = {\n // @TODO this is called internal/external but displays external/internal (╯°□°)╯︵ ┻━┻\n name: 'internal-external-ip',\n labelKey: 'tableHeaders.internalExternalIp',\n search: ['externalIp', 'internalIp'],\n sort: ['externalIp', 'internalIp'],\n formatter: 'InternalExternalIP'\n};\n\nexport const NAME = {\n name: 'name',\n labelKey: 'tableHeaders.name',\n value: 'nameDisplay',\n getValue: (row) => row.nameDisplay,\n sort: ['nameSort'],\n formatter: 'LinkDetail',\n canBeVariable: true,\n};\n\nexport const LOGGING_OUTPUT_PROVIDERS = {\n name: 'logging-output-providers',\n labelKey: 'tableHeaders.loggingOutputProviders',\n value: 'providersDisplay',\n sort: ['providersSortable'],\n formatter: 'List',\n};\n\nexport const SIMPLE_NAME = {\n name: 'name',\n labelKey: 'tableHeaders.simpleName',\n value: 'name',\n sort: ['name'],\n width: 200,\n canBeVariable: true,\n};\n\nexport const EFFECT = {\n name: 'effect',\n labelKey: 'tableHeaders.effect',\n value: 'effect',\n sort: ['effect'],\n};\n\nexport const STORAGE_CLASS_PROVISIONER = {\n name: 'storage_class_provisioner',\n labelKey: 'tableHeaders.storage_class_provisioner',\n value: 'provisionerDisplay',\n sort: ['provisioner'],\n};\n\nexport const STORAGE_CLASS_DEFAULT = {\n name: 'storage_class_default',\n labelKey: 'tableHeaders.default',\n value: 'isDefault',\n sort: ['isDefault'],\n formatter: 'Checked',\n};\n\nexport const PERSISTENT_VOLUME_SOURCE = {\n name: 'persistent_volume_source',\n labelKey: 'tableHeaders.persistentVolumeSource',\n value: 'source',\n sort: ['provisioner'],\n};\n\nexport const PERSISTENT_VOLUME_CLAIM = {\n name: 'persistent-volume-claim',\n labelKey: 'tableHeaders.persistentVolumeClaim',\n sort: ['nameSort'],\n value: 'claimName',\n formatter: 'LinkDetail',\n formatterOpts: { reference: 'claim.detailLocation' },\n};\n\nexport const OUTPUT = {\n name: 'localOutputRefs',\n labelKey: 'tableHeaders.output',\n value: 'outputs',\n sort: ['outputsSortable'],\n formatter: 'ListLink',\n formatterOpts: { options: { internal: true } },\n};\n\nexport const CONFIGURED_PROVIDERS = {\n name: 'providers',\n labelKey: 'tableHeaders.providers',\n value: 'providersDisplay',\n sort: 'providersSortable',\n formatter: 'List'\n};\n\nexport const CLUSTER_OUTPUT = {\n ...OUTPUT,\n name: 'globalOutputRefs',\n value: 'clusterOutputs',\n sort: ['clusterOutputsSortable'],\n labelKey: 'tableHeaders.clusterOutput',\n};\n\nexport const ID_UNLINKED = {\n name: 'id',\n labelKey: 'tableHeaders.id',\n value: 'id',\n sort: ['id'],\n canBeVariable: true,\n};\n\nexport const NAME_UNLINKED = {\n name: 'name',\n labelKey: 'tableHeaders.nameUnlinked',\n value: 'nameDisplay',\n sort: ['nameSort'],\n canBeVariable: true,\n};\n\nexport const NAMESPACE = {\n name: 'namespace',\n labelKey: 'tableHeaders.namespace',\n value: 'namespace',\n getValue: (row) => row.namespace,\n sort: 'namespace',\n dashIfEmpty: true,\n};\n\nexport const NODE = {\n name: 'node',\n labelKey: 'tableHeaders.node',\n value: 'spec.nodeName',\n getValue: (row) => row.spec?.nodeName,\n sort: 'spec.nodeName',\n formatter: 'LinkName',\n formatterOpts: { type: NODE_TYPE },\n};\n\nexport const NODE_NAME = {\n name: 'nodeName',\n labelKey: 'tableHeaders.nodeName',\n sort: 'name',\n value: 'name',\n getValue: (row) => row.name,\n formatter: 'LinkDetail',\n};\n\nexport const ROLES = {\n name: 'roles',\n labelKey: 'tableHeaders.roles',\n sort: 'roles',\n value: 'roles'\n};\n\nexport const VERSION = {\n name: 'version',\n labelKey: 'tableHeaders.version',\n sort: 'version',\n value: 'version',\n getValue: (row) => row.version\n};\n\nexport const CPU = {\n name: 'cpu',\n labelKey: 'tableHeaders.cpu',\n sort: 'cpuUsage',\n search: false,\n value: 'cpuUsagePercentage',\n formatter: 'PercentageBar',\n width: 120,\n};\n\nexport const RAM = {\n name: 'ram',\n labelKey: 'tableHeaders.ram',\n sort: 'ramUsage',\n search: false,\n value: 'ramUsagePercentage',\n formatter: 'PercentageBar',\n width: 120,\n};\n\nexport const PRINCIPAL = {\n name: 'principal',\n labelKey: 'tableHeaders.name',\n sort: 'principal.loginName',\n value: 'principalId',\n formatter: 'Principal',\n};\n\nexport const PODS = {\n name: 'pods',\n labelKey: 'tableHeaders.pods',\n sort: 'podConsumed',\n search: false,\n value: (row) => row.podConsumedUsage,\n formatter: 'PercentageBar',\n width: 120,\n};\n\nexport const AGE = {\n name: 'age',\n labelKey: 'tableHeaders.age',\n value: 'creationTimestamp',\n getValue: (row) => row.creationTimestamp,\n sort: 'creationTimestamp:desc',\n search: false,\n formatter: 'LiveDate',\n width: 100,\n align: 'left'\n};\n\nexport const AGE_NORMAN = {\n ...AGE,\n getValue: (row) => row.created,\n value: 'created',\n sort: 'created:desc',\n};\n\nexport const CREATION_DATE = {\n name: 'date',\n labelKey: 'tableHeaders.date',\n value: 'metadata.creationTimestamp',\n sort: ['date'],\n formatter: 'Date'\n};\n\nexport const DESCRIPTION = {\n name: 'description',\n labelKey: 'tableHeaders.description',\n align: 'left',\n sort: ['description'],\n width: 300,\n};\n\nexport const DURATION = {\n name: 'duration',\n labelKey: 'tableHeaders.duration',\n value: 'duration.value',\n sort: 'duration.seconds',\n formatter: 'LiveDuration',\n};\n\nexport const IMAGE_NAME = {\n name: 'image',\n labelKey: 'tableHeaders.image',\n value: 'image',\n sort: ['image', 'nameSort'],\n formatter: 'ImageName',\n};\n\nexport const POD_IMAGES = {\n name: 'pod_images',\n labelKey: 'tableHeaders.podImages',\n value: 'imageNames',\n getValue: (row) => row.imageNames,\n sort: 'imageNames',\n // search: 'imageNames',\n formatter: 'PodImages'\n};\n\nexport const POD_RESTARTS = {\n name: 'pod_restarts',\n labelKey: 'tableHeaders.podRestarts',\n formatter: 'LivePodRestarts',\n delayLoading: true,\n value: 'restartCount',\n getValue: (row) => row.restartCount,\n // This column is expensive to compute, so don't make it searchable\n search: false,\n liveUpdates: true\n};\n\nexport const ENDPOINTS = {\n name: 'endpoint',\n labelKey: 'tableHeaders.endpoints',\n value: 'status.endpoints',\n formatter: 'Endpoints',\n width: 60,\n align: 'center',\n};\n\nexport const SCALE = {\n name: 'scale',\n labelKey: 'tableHeaders.scale',\n value: 'scales.desired',\n sort: ['scales.desired', 'nameSort'],\n formatter: 'Scale',\n width: 60,\n align: 'center',\n};\n\nexport const SIMPLE_SCALE = {\n name: 'simple-scale',\n labelKey: 'tableHeaders.simpleScale',\n value: 'scale',\n sort: ['scale']\n};\n\nexport const WEIGHT = {\n name: 'weight',\n labelKey: 'tableHeaders.weight',\n value: 'status.computedWeight',\n sort: 'status.computedWeight',\n formatter: 'Weight',\n width: 60,\n align: 'center',\n};\n\nexport const SUCCESS = {\n name: 'success',\n labelKey: 'tableHeaders.success',\n value: 'success',\n width: 100,\n align: 'right',\n};\n\nexport const REQ_RATE = {\n name: 'req-rate',\n labelKey: 'tableHeaders.reqRate',\n value: 'rps',\n width: 100,\n align: 'right',\n};\n\nexport const P95 = {\n name: 'p95',\n labelKey: 'tableHeaders.p95',\n value: 'p95',\n width: 100,\n align: 'right',\n};\n\nexport const KEYS = {\n name: 'keys',\n labelKey: 'tableHeaders.keys',\n sort: false,\n value: 'keysDisplay',\n};\n\nexport const TARGET_KIND = {\n name: 'target-kind',\n labelKey: 'tableHeaders.targetKind',\n value: 'kindDisplay',\n width: 100,\n};\n\nexport const TARGET = {\n name: 'target',\n labelKey: 'tableHeaders.target',\n value: 'targetDisplay',\n};\n\nexport const USERNAME = {\n name: 'username',\n labelKey: 'tableHeaders.username',\n value: 'username',\n dashIfEmpty: true,\n sort: 'username',\n};\n\nexport const USER_DISPLAY_NAME = {\n name: 'name',\n labelKey: 'tableHeaders.name',\n value: 'nameDisplay',\n sort: ['nameSort'],\n dashIfEmpty: true,\n};\n\nexport const USER_PROVIDER = {\n name: 'provider',\n labelKey: 'tableHeaders.provider',\n value: 'providerDisplay',\n dashIfEmpty: true,\n sort: 'providerDisplay',\n};\n\nexport const USER_ID = {\n name: 'user-id',\n labelKey: 'tableHeaders.userId',\n value: 'id',\n formatter: 'LinkDetail',\n canBeVariable: true,\n sort: 'id',\n};\n\nexport const ADDRESS = {\n name: 'address',\n labelKey: 'tableHeaders.address',\n value: 'address',\n sort: ['address'],\n};\n\nexport const SIMPLE_TYPE = {\n name: 'type',\n labelKey: 'tableHeaders.simpleType',\n value: 'type',\n sort: ['type'],\n width: 175,\n};\n\nexport const IMAGE_SIZE = {\n name: 'sizeBytes',\n labelKey: 'tableHeaders.imageSize',\n value: 'sizeBytes',\n sort: ['sizeBytes'],\n formatter: 'Si'\n};\n\nexport const TYPE = {\n name: 'type',\n labelKey: 'tableHeaders.type',\n value: 'typeDisplay',\n getValue: (row) => row.typeDisplay,\n sort: ['typeDisplay'],\n width: 100,\n};\n\nexport const SUB_TYPE = {\n name: 'subType',\n labelKey: 'tableHeaders.subType',\n value: 'subTypeDisplay',\n sort: ['subTypeDisplay'],\n width: 120,\n};\n\nexport const EVENT_TYPE = {\n name: 'type',\n labelKey: 'tableHeaders.type',\n value: 'eventType',\n sort: 'eventType',\n};\n\nexport const STATUS = {\n name: 'status',\n labelKey: 'tableHeaders.status',\n value: 'status',\n sort: ['status'],\n width: 175\n};\nexport const LAST_SEEN_TIME = {\n name: 'lastSeen',\n labelKey: 'tableHeaders.lastSeen',\n value: 'lastSeen',\n sort: 'lastTimestamp:desc',\n tooltip: 'tableHeaders.lastSeenTooltip'\n};\nexport const LAST_HEARTBEAT_TIME = {\n name: 'lastHeartbeatTime',\n labelKey: 'tableHeaders.lastSeen',\n value: 'lastHeartbeatTime',\n sort: ['lastHeartbeatTime'],\n formatter: 'LiveDate',\n width: 175\n};\nexport const REASON = {\n name: 'reason',\n labelKey: 'tableHeaders.reason',\n value: 'reason',\n sort: ['reason']\n};\nexport const OBJECT = {\n name: 'object',\n labelKey: 'tableHeaders.object',\n value: 'involvedObject',\n sort: ['involvedObject.kind', 'involvedObject.name'],\n canBeVariable: true,\n formatter: 'InvolvedObjectLink',\n};\nexport const RECLAIM_POLICY = {\n name: 'reclaimPolicy',\n labelKey: 'tableHeaders.reclaimPolicy',\n value: 'spec.persistentVolumeReclaimPolicy',\n sort: ['spec.persistentVolumeReclaimPolicy']\n};\nexport const PV_REASON = {\n name: 'pvReason',\n labelKey: 'tableHeaders.reason',\n value: 'status.reason',\n sort: ['status.reason']\n};\n\nexport const MESSAGE = {\n name: 'message',\n labelKey: 'tableHeaders.message',\n value: 'message',\n sort: ['message']\n};\nexport const KEY = {\n name: 'key',\n labelKey: 'tableHeaders.key',\n value: 'key',\n sort: ['key']\n};\nexport const VALUE = {\n name: 'value',\n labelKey: 'tableHeaders.value',\n value: 'value',\n sort: ['value'],\n};\n\nexport const BUILT_IN = {\n name: 'builtIn',\n labelKey: 'tableHeaders.builtIn',\n value: 'builtIn',\n sort: ['builtIn'],\n align: 'center',\n formatter: 'IconIsDefault'\n};\n\nexport const CLUSTER_CREATOR_DEFAULT = {\n name: 'default',\n labelKey: 'tableHeaders.clusterCreatorDefault',\n value: 'default',\n sort: ['Default'],\n align: 'center',\n formatter: 'IconIsDefault'\n};\n\nexport const RBAC_DEFAULT = {\n name: 'default',\n labelKey: 'tableHeaders.default',\n value: 'default',\n formatter: 'Checked',\n sort: ['default']\n};\n\nexport const RBAC_BUILTIN = {\n name: 'builtin',\n labelKey: 'tableHeaders.builtin',\n value: 'builtin',\n formatter: 'Checked',\n sort: ['builtin']\n};\n\nexport const RESOURCE = {\n name: 'resource',\n labelKey: 'tableHeaders.resource',\n value: 'resource',\n sort: ['resourceNames']\n};\n\nexport const API_GROUP = {\n name: 'apigroups',\n labelKey: 'tableHeaders.apiGroup',\n value: 'apiGroups',\n sort: ['apiGroups']\n};\n\nexport const INGRESS_CLASS = {\n name: 'ingressClassName',\n labelKey: 'tableHeaders.ingressClass',\n value: `$['spec']['ingressClassName']`,\n sort: `$['spec']['ingressClassName']`,\n};\n\nexport const INGRESS_DEFAULT_BACKEND = {\n name: 'ingressDefaultBackend',\n labelKey: 'tableHeaders.ingressDefaultBackend',\n value: 'hasDefaultBackend',\n sort: ['hasDefaultBackend:desc'],\n formatter: 'Checked',\n width: 75,\n align: 'center'\n};\n\nexport const INGRESS_TARGET = {\n name: 'ingressTarget',\n labelKey: 'tableHeaders.ingressTarget',\n value: \"$['spec']\",\n formatter: 'IngressTarget',\n sort: \"$['spec']['rules'][0].host\",\n};\n\nexport const SPEC_TYPE = {\n name: 'type',\n labelKey: 'tableHeaders.type',\n value: `$['spec']['type']`,\n sort: `$['spec']['type']`,\n formatter: 'ServiceType',\n};\n\nexport const TARGET_PORT = {\n formatter: 'ServiceTargets',\n labelKey: 'tableHeaders.targetPort',\n name: 'targetPort',\n sort: `$['spec']['targetPort']`,\n value: `$['spec']['targetPort']`,\n};\n\nexport const SELECTOR = {\n formatter: 'KeyValue',\n name: 'selector',\n labelKey: 'tableHeaders.selector',\n value: `$['spec']['selector']`,\n sort: `$['spec']['selector']`,\n};\n\nexport const CHART = {\n name: 'chart',\n labelKey: 'tableHeaders.chart',\n value: 'chartDisplay',\n sort: ['chartDisplay', 'versionSort'],\n};\n\nexport const CHART_UPGRADE = {\n name: 'upgrade',\n labelKey: 'tableHeaders.upgrade',\n value: 'upgradeAvailable',\n sort: 'upgradeAvailableSort:desc',\n dashIfEmpty: true,\n};\n\nexport const RESOURCES = {\n name: 'resources',\n labelKey: 'tableHeaders.resources',\n value: 'spec.resources.length',\n sort: 'spec.resources.length',\n width: 100,\n};\n\nexport const URL = {\n name: 'url',\n labelKey: 'tableHeaders.url',\n value: 'spec.url',\n sort: 'spec.url',\n};\n\nexport const LAST_UPDATED = {\n name: 'lastUpdated',\n labelKey: 'tableHeaders.lastUpdated',\n value: 'lastTransitionTime',\n formatter: 'LiveDate',\n formatterOpts: { addSuffix: true },\n sort: ['lastTransitionTime']\n};\n\nexport const WORKSPACE = {\n name: 'workspace',\n label: 'Workspace',\n value: 'metadata.namespace',\n sort: ['metadata.namespace', 'nameSort'],\n};\n\nexport const WORKLOAD_IMAGES = {\n ...POD_IMAGES,\n value: '',\n breakpoint: COLUMN_BREAKPOINTS.LAPTOP\n};\n\nexport const WORKLOAD_ENDPOINTS = {\n name: 'workloadEndpoints',\n labelKey: 'tableHeaders.endpoints',\n value: `$['metadata']['annotations']['${ CATTLE_PUBLIC_ENDPOINTS }']`,\n getValue: (row) => row.metadata?.annotations?.[CATTLE_PUBLIC_ENDPOINTS],\n formatter: 'Endpoints',\n dashIfEmpty: true,\n breakpoint: COLUMN_BREAKPOINTS.DESKTOP,\n maxPageSize: 25, // Hide this column when the page size is bigger than 25\n};\n\nexport const WORKLOAD_HEALTH_SCALE = {\n name: 'workloadHealthScale',\n labelKey: 'tableHeaders.health',\n formatter: 'WorkloadHealthScale',\n getValue: () => undefined,\n width: 150,\n skipSelect: true,\n delayLoading: true,\n // This column is expensive to compute, so don't make it searchable\n search: false,\n liveUpdates: true,\n};\n\nexport const FLEET_SUMMARY = {\n name: 'summary',\n labelKey: 'tableHeaders.resources',\n value: 'status.resourceCounts',\n sort: false,\n search: false,\n formatter: 'FleetSummaryGraph',\n align: 'center',\n width: 100,\n};\n\nexport const FLEET_REPO_CLUSTER_SUMMARY = {\n name: 'clusterSummary',\n labelKey: 'tableHeaders.clusterResources',\n value: 'status.resourceCounts',\n sort: false,\n search: false,\n formatter: 'FleetClusterSummaryGraph',\n align: 'center',\n width: 100,\n};\n\nexport const FLEET_REPO_PER_CLUSTER_STATE = {\n name: 'perClusterState',\n labelKey: 'tableHeaders.repoPerClusterState',\n tooltip: 'tableHeaders.repoPerClusterStateTooltip',\n sort: ['stateSort', 'nameSort'],\n width: 100,\n default: 'unknown',\n formatter: 'BadgeStateFormatter',\n formatterOpts: { arbitrary: true }\n\n};\n\nexport const APP_SUMMARY = {\n name: 'summary',\n labelKey: 'tableHeaders.resources',\n value: 'deployedResources.length',\n sort: false,\n search: false,\n formatter: 'AppSummaryGraph',\n align: 'center',\n width: 100,\n};\n\nexport const CONSTRAINT_VIOLATION_CONSTRAINT_LINK = {\n name: 'Constraint',\n labelKey: 'tableHeaders.constraint',\n value: 'constraintLink',\n sort: `constraintLink.text`,\n formatter: 'Link',\n formatterOpts: { options: { internal: true } },\n};\n\nexport const CONSTRAINT_VIOLATION_RESOURCE_LINK = {\n name: 'Name',\n labelKey: 'tableHeaders.name',\n value: 'resourceLink',\n sort: `resourceLink.text`,\n search: `resourceLink.text`,\n formatter: 'Link',\n formatterOpts: { options: { internal: true } },\n};\n\nexport const CONSTRAINT_VIOLATION_TYPE = {\n name: 'Type',\n labelKey: 'tableHeaders.type',\n value: `kind`,\n sort: `kind`\n};\n\nexport const CONSTRAINT_VIOLATION_NAMESPACE = {\n name: 'Namespace',\n labelKey: 'tableHeaders.namespace',\n value: `namespace`,\n sort: `namespace`,\n search: `namespace`,\n};\n\nexport const CONSTRAINT_VIOLATION_MESSAGE = {\n name: 'Message',\n labelKey: 'tableHeaders.message',\n value: `message`,\n sort: `message`\n};\n\nexport const CONSTRAINT_VIOLATION_TEMPLATE_LINK = {\n name: 'TemplateLink',\n labelKey: 'tableHeaders.template',\n value: `templateLink`,\n sort: `templateLink.text`,\n formatter: 'Link',\n formatterOpts: { options: { internal: true } },\n};\n\nexport const CONSTRAINT_VIOLATION_COUNT = {\n name: 'Count',\n labelKey: 'tableHeaders.count',\n value: `count`,\n sort: `count`,\n formatter: 'QualityText',\n formatterOpts: {\n qualityFn(value) {\n if (value <= 10) {\n return 'success';\n }\n\n if (value <= 20) {\n return 'warning';\n }\n\n return 'error';\n }\n }\n};\n\nexport const RECEIVER_PROVIDERS = {\n name: 'receiver-providers',\n label: 'Configured Providers',\n value: 'receiverTypes',\n sort: 'receiverTypes',\n formatter: 'List',\n};\n\nexport const CONFIGURED_RECEIVER = {\n name: 'receiver',\n label: 'Configured Receiver',\n value: 'receiverLink',\n sort: 'receiverLink.text',\n formatter: 'Link',\n formatterOpts: { options: { internal: true } },\n};\n\nexport const GROUP_NAME = {\n name: 'group-name',\n labelKey: 'tableHeaders.groupName',\n value: 'id',\n sort: ['name'],\n search: ['name'],\n formatter: 'Principal',\n width: 350\n};\n\nexport const GROUP_ROLE_NAME = {\n name: 'group-role-names',\n labelKey: 'tableHeaders.groupRoleNames',\n value: 'id',\n formatter: 'PrincipalGroupBindings',\n};\n\nexport const HPA_REFERENCE = {\n name: 'reference',\n labelKey: 'tableHeaders.hpaReference',\n value: 'spec.scaleTargetRef.name',\n sort: 'spec.scaleTargetRef.name',\n};\n\nexport const MIN_REPLICA = {\n name: 'minimum-replica',\n labelKey: 'tableHeaders.minReplicas',\n value: 'spec.minReplicas',\n sort: 'spec.minReplicas',\n};\n\nexport const MAX_REPLICA = {\n name: 'maximum-replica',\n labelKey: 'tableHeaders.maxReplicas',\n value: 'spec.maxReplicas',\n sort: 'spec.maxReplicas',\n};\n\nexport const CURRENT_REPLICA = {\n name: 'current-replica',\n labelKey: 'tableHeaders.currentReplicas',\n value: 'status.currentReplicas',\n sort: 'status.currentReplicas',\n};\n\nexport const EXPIRY_STATE = {\n ...STATE,\n value: '$',\n formatter: 'LiveExpiryBadgeState',\n};\n\nexport const ACCESS_KEY = {\n name: 'id',\n labelKey: 'tableHeaders.accessKey',\n align: 'left',\n sort: ['name'],\n width: 200,\n};\n\nexport const SCOPE = {\n name: 'scope',\n value: 'clusterName',\n labelKey: 'tableHeaders.scope',\n dashIfEmpty: true,\n align: 'left',\n sort: ['scope'],\n width: 100,\n};\n\nexport const SCOPE_NORMAN = {\n ...SCOPE,\n value: 'clusterId',\n sort: ['clusterId'],\n};\n\nexport const EXPIRES = {\n name: 'expires',\n value: 'expiresAt',\n labelKey: 'tableHeaders.expires',\n align: 'left',\n sort: ['expiresAt'],\n width: 200,\n formatter: 'LiveExpiryDate'\n};\n\nexport const RESTART = {\n name: 'restart',\n labelKey: 'tableHeaders.restart',\n value: 'restartRequired',\n sort: ['restartRequired', 'nameSort'],\n formatter: 'Checked',\n width: 75,\n align: 'center'\n};\n\nexport const ROLE = {\n name: 'role',\n value: 'roleDisplay',\n labelKey: 'tableHeaders.role',\n};\n\nexport const FEATURE_DESCRIPTION = {\n name: 'description',\n labelKey: 'tableHeaders.description',\n value: 'status.description',\n align: 'left',\n sort: ['status.description'],\n formatter: 'Translate',\n formatterOpts: { prefix: 'featureFlags.description' },\n};\n\nexport const STATE_NORMAN = {\n name: 'state',\n labelKey: 'tableHeaders.state',\n sort: ['stateSort', 'nameSort'],\n value: 'stateDisplay',\n width: 100,\n default: 'unknown',\n formatter: 'BadgeStateFormatter',\n};\n\nexport const KUBE_NODE_OS = {\n name: 'operating-system',\n labelKey: 'tableHeaders.operatingSystem',\n value: 'status.nodeInfo.operatingSystem',\n sort: ['status.nodeInfo.operatingSystem'],\n formatter: 'Capitalize'\n};\n\nexport const MACHINE_NODE_OS = {\n name: 'operating-system',\n labelKey: 'tableHeaders.operatingSystem',\n value: 'operatingSystem',\n sort: ['operatingSystem'],\n formatter: 'Capitalize',\n dashIfEmpty: true,\n};\n\nexport const MANAGEMENT_NODE_OS = {\n name: 'operating-system',\n labelKey: 'tableHeaders.operatingSystem',\n value: 'status.internalNodeStatus.nodeInfo.operatingSystem',\n sort: ['status.internalNodeStatus.nodeInfo.operatingSystem'],\n formatter: 'Capitalize',\n dashIfEmpty: true,\n};\n\n// FLEET\n\nexport const FLEET_BUNDLE_LAST_UPDATED = {\n name: 'lastUpdated',\n labelKey: 'tableHeaders.lastUpdated',\n value: 'lastUpdateTime',\n formatter: 'LiveDate',\n formatterOpts: { addSuffix: true },\n sort: ['lastUpdateTime']\n};\n\nexport const FLEET_BUNDLE_TYPE = {\n name: 'bundleType',\n labelKey: 'tableHeaders.fleetBundleType',\n value: 'bundleType',\n sort: ['bundleType'],\n width: 100,\n};\n\nexport const FLEET_REPO_CLUSTERS_READY = {\n name: 'clustersReady',\n labelKey: 'tableHeaders.clustersReady',\n value: 'status.readyClusters',\n sort: 'status.readyClusters',\n search: false,\n};\n\nexport const FLEET_REPO_TARGET = {\n name: 'target',\n labelKey: 'tableHeaders.target',\n value: 'targetInfo.modeDisplay',\n sort: ['targetInfo.modeDisplay', 'targetInfo.cluster', 'targetInfo.clusterGroup'],\n\n};\n\nexport const FLEET_REPO = {\n name: 'repo',\n labelKey: 'tableHeaders.repo',\n value: 'repoDisplay',\n sort: 'repoDisplay',\n search: ['spec.repo', 'status.commit'],\n};\n\nexport const UI_PLUGIN_CATALOG = [\n {\n name: 'state',\n labelKey: 'tableHeaders.state',\n sort: ['stateSort', 'nameSort'],\n value: 'state',\n width: 100,\n default: 'unknown',\n formatter: 'BadgeStateFormatter',\n formatterOpts: { arbitrary: true }\n },\n {\n name: 'name',\n labelKey: 'tableHeaders.name',\n value: 'name',\n sort: ['nameSort'],\n formatter: 'LinkDetail'\n },\n {\n name: 'image',\n sort: ['image'],\n labelKey: 'plugins.manageCatalog.headers.image.label',\n value: 'image'\n },\n {\n name: 'repository',\n sort: ['repository'],\n labelKey: 'plugins.manageCatalog.headers.repository.label',\n value: 'repo.metadata.name'\n }\n];\n","import { indent as _indent } from '@shell/utils/string';\nimport { addObject, findBy, removeObject, removeObjects } from '@shell/utils/array';\nimport jsyaml from 'js-yaml';\nimport { cleanUp, isEmpty } from '@shell/utils/object';\n\nexport const SIMPLE_TYPES = [\n 'string',\n 'multiline',\n 'masked',\n 'password',\n 'float',\n 'int',\n 'date',\n 'blob',\n 'boolean',\n 'version'\n];\n\nconst ALWAYS_ADD = [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'metadata.name',\n 'spec',\n 'spec.selector',\n 'spec.selector.matchLabels',\n 'spec.template',\n 'spec.template.metadata',\n 'spec.template.metadata.labels',\n 'spec.template.spec.containers.name',\n 'spec.template.spec.containers.image',\n];\n\nexport const NEVER_ADD = [\n 'metadata.clusterName',\n 'metadata.creationTimestamp',\n 'metadata.deletionGracePeriodSeconds',\n 'metadata.deletionTimestamp',\n 'metadata.finalizers',\n 'metadata.generateName',\n 'metadata.generation',\n 'metadata.initializers',\n 'metadata.managedFields',\n 'metadata.ownerReferences',\n 'metadata.resourceVersion',\n 'metadata.relationships',\n 'metadata.selfLink',\n 'metadata.state',\n 'metadata.uid',\n // CRD -> Schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. If we allow processing we fall into inf loop on openAPIV3Schema.allOf which contains a cyclical ref of allOf props.\n 'spec.versions.schema',\n 'status',\n 'stringData',\n 'links',\n '_name',\n '_labels',\n '_annotations',\n];\n\nexport const ACTIVELY_REMOVE = [\n 'metadata.managedFields',\n 'metadata.relationships',\n 'metadata.state',\n 'status',\n 'links',\n 'type',\n 'id'\n];\n\nconst INDENT = 2;\n\nexport function createYamlWithOptions(schemas, type, data, options) {\n return createYaml(\n schemas,\n type,\n data,\n true, 0, '', null,\n options\n );\n}\n\nexport function createYaml(\n schemas,\n type,\n data,\n processAlwaysAdd = true,\n depth = 0,\n path = '',\n rootType = null,\n dataOptions = {}\n) {\n const schema = findBy(schemas, 'id', type);\n\n if ( !rootType ) {\n rootType = type;\n }\n\n if ( !schema ) {\n return `Error loading schema for ${ type }`;\n }\n\n data = data || {};\n\n if ( depth === 0 ) {\n const attr = schema.attributes || {};\n\n // Default to data.apiVersion/kind to accommodate spoofed types that aggregate multiple types\n data.apiVersion = (attr.group ? `${ attr.group }/${ attr.version }` : attr.version) || data.apiVersion;\n data.kind = attr.kind || data.kind;\n }\n\n const regularFields = [];\n\n if (processAlwaysAdd) {\n // Add all the parents of each key so that spec.template.foo.blah\n // causes 'spec', 'template' and 'foo' keys to be created\n const always = ALWAYS_ADD.slice();\n\n for ( let i = always.length - 1 ; i >= 0 ; i-- ) {\n let entry = always[i].split(/\\./);\n\n while ( entry.length ) {\n addObject(always, entry.join('.'));\n entry = entry.slice(0, -1);\n }\n }\n\n // Mark always fields as regular so they're not commented out\n for ( const entry of always ) {\n const parts = entry.split(/\\./);\n const key = parts[parts.length - 1];\n const prefix = parts.slice(0, -1).join('.');\n\n if ( prefix === path && schema.resourceFields && schema.resourceFields[key] ) {\n addObject(regularFields, key);\n }\n }\n }\n\n // Include all fields in schema's resourceFields as comments\n const commentFields = Object.keys(schema.resourceFields || {});\n\n commentFields.forEach((key) => {\n if ( typeof data[key] !== 'undefined' || (depth === 0 && key === '_type') ) {\n addObject(regularFields, key);\n }\n });\n\n // add any fields defined in data as uncommented fields in yaml\n for ( const key in data ) {\n if ( typeof data[key] !== 'undefined' ) {\n addObject(regularFields, key);\n }\n }\n\n // ACTIVELY_REMOVE are fields that should be removed even if they are defined in data\n for ( const entry of ACTIVELY_REMOVE ) {\n const parts = entry.split(/\\./);\n const key = parts[parts.length - 1];\n const prefix = parts.slice(0, -1).join('.');\n\n if ( prefix === path) {\n removeObject(regularFields, key);\n }\n }\n\n // NEVER_ADD are fields that should not be added as comments, but may added as regular fields if already defined in data\n for ( const entry of NEVER_ADD ) {\n const parts = entry.split(/\\./);\n const key = parts[parts.length - 1];\n const prefix = parts.slice(0, -1).join('.');\n\n if ( prefix === path && schema.resourceFields && schema.resourceFields[key] ) {\n removeObject(commentFields, key);\n }\n }\n\n // do not include commented fields if already defined in data\n removeObjects(commentFields, regularFields);\n\n const regular = regularFields.map((k) => stringifyField(k));\n const comments = commentFields.map((k) => {\n // Don't add a namespace comment for types that aren't namespaced.\n if ( path === 'metadata' && k === 'namespace' ) {\n const rootSchema = findBy(schemas, 'id', rootType);\n\n if ( rootSchema && !rootSchema.attributes?.namespaced ) {\n return null;\n }\n }\n\n return comment(stringifyField(k));\n });\n\n const out = [...regular, ...comments]\n .filter((x) => x !== null)\n .join('\\n')\n .trim();\n\n return out;\n\n // ---------------\n\n function stringifyField(key) {\n const field = schema.resourceFields?.[key];\n let out = `${ key }:`;\n\n // '_type' in steve maps to kubernetes 'type' field; show 'type' field in yaml\n if (key === '_type') {\n out = 'type:';\n }\n\n // if a key on data is not listed in the schema's resourceFields, just convert it to yaml, add indents where needed, and return\n if ( !field ) {\n if (data[key]) {\n try {\n const cleaned = cleanUp(data);\n const parsedData = jsyaml.dump(cleaned[key]);\n\n if ( typeof data[key] === 'object' || Array.isArray(data[key]) ) {\n out += `\\n${ indent(parsedData.trim()) }`;\n } else {\n out += ` ${ parsedData.trim() }`;\n }\n\n return out;\n } catch (e) {\n console.error(`Error: Unable to parse map data for yaml key: ${ key }`, e); // eslint-disable-line no-console\n }\n }\n\n return null;\n }\n\n const type = typeMunge(field.type);\n const mapOf = typeRef('map', type);\n const arrayOf = typeRef('array', type);\n const referenceTo = typeRef('reference', type);\n\n // type == map[mapOf]\n if ( mapOf ) {\n // if key is defined in data, convert the value to yaml, add newline+indent and add to output yaml string\n if (data[key]) {\n try {\n const cleaned = cleanUp(data);\n const parsedData = dumpBlock(cleaned[key], dataOptions[key]);\n\n out += `\\n${ indent(parsedData) }`;\n } catch (e) {\n console.error(`Error: Unable to parse map data for yaml of type: ${ type }`, e); // eslint-disable-line no-console\n }\n }\n\n if ( SIMPLE_TYPES.includes(mapOf) ) {\n out += `# key: ${ mapOf }`;\n } else {\n // If not a simple type ie some sort of object/array, recusively build out commented fields (note data = null here) per the type's (mapOf's) schema\n const chunk = createYaml(schemas, mapOf, null, processAlwaysAdd, depth + 1, (path ? `${ path }.${ key }` : key), rootType, dataOptions);\n let indented = indent(chunk);\n\n // convert \"# foo\" to \"#foo\"\n indented = indented.replace(/^(#)?\\s\\s\\s\\s/, '$1');\n\n out += `${ indented }`;\n }\n\n return out;\n }\n\n // type == array[arrayOf]\n if ( arrayOf ) {\n if (data[key]) {\n try {\n const cleaned = cleanUp(data);\n\n if ( cleaned?.[key] ) {\n const parsedData = jsyaml.dump(cleaned[key]);\n\n out += `\\n${ indent(parsedData.trim()) }`;\n }\n } catch (e) {\n console.error(`Error: Unale to parse array data for yaml of type: ${ type }`, e); // eslint-disable-line no-console\n }\n }\n\n if ( SIMPLE_TYPES.includes(arrayOf) ) {\n out += `\\n# - ${ arrayOf }`;\n } else {\n const chunk = createYaml(schemas, arrayOf, null, false, depth + 1, (path ? `${ path }.${ key }` : key), rootType, dataOptions);\n let indented = indent(chunk, 2);\n\n // turn \"# foo\" into \"# - foo\"\n indented = indented.replace(/^(#)?\\s*\\s\\s([^\\s])/, '$1 - $2');\n\n out += `\\n${ indented }`;\n }\n\n return out;\n }\n\n if ( referenceTo ) {\n out += ` #${ referenceTo }`;\n\n return out;\n }\n\n if ( SIMPLE_TYPES.includes(type) ) {\n if (key === '_type' && typeof data[key] === 'undefined' && typeof data['type'] !== 'undefined') {\n out += ` ${ serializeSimpleValue(data['type']) }`;\n } else if ( typeof data[key] === 'undefined' ) {\n out += ` #${ serializeSimpleValue(type) }`;\n } else {\n out += ` ${ serializeSimpleValue(data[key]) }`;\n }\n\n return out;\n }\n\n /**\n * .spec is the type used for the Logging chart Output and ClusterOutput resource spec.\n * Without this Output and ClusterOutput specs are empty.\n */\n if ( type === 'json' || type === '.spec') {\n try {\n const parsedData = jsyaml.dump(data[key]);\n\n if (parsedData) {\n out += `\\n${ indent(parsedData.trim()) }`;\n } else {\n out += ` #${ type }`;\n }\n\n return out;\n } catch (e) {\n }\n }\n\n const subDef = findBy(schemas, 'id', type);\n\n if ( subDef) {\n let chunk;\n\n if (subDef?.resourceFields && !isEmpty(subDef?.resourceFields)) {\n chunk = createYaml(schemas, type, data[key], processAlwaysAdd, depth + 1, (path ? `${ path }.${ key }` : key), rootType, dataOptions);\n } else if (data[key]) {\n // if there are no fields defined on the schema but there are in the data, just format data as yaml and add to output yaml\n try {\n const parsed = jsyaml.dump(data[key]);\n\n chunk = parsed.trim();\n } catch (e) {\n console.error(`Error: Unale to parse data for yaml of type: ${ type }`, e); // eslint-disable-line no-console\n }\n }\n\n out += `\\n${ indent(chunk) }`;\n } else {\n out += ` #${ type }`;\n }\n\n return out;\n }\n}\n\nfunction comment(lines) {\n return (lines || '').split('\\n').map((x) => `#${ x.replace(/#/g, '') }`).join('\\n');\n}\n\nfunction indent(lines, depth = 1) {\n return _indent(lines, depth * INDENT, ' ', /^#/);\n}\n\nfunction serializeSimpleValue(data) {\n return jsyaml.dump(data).trim();\n}\n\nexport function getBlockDescriptor(value, key) {\n const header = getBlockHeader(value, key);\n\n return {\n header,\n indentation: getBlockIndentation(header),\n };\n}\n\n/**\n *\n * @param {string} value the block of text to be parsed\n * @param {*} blockKey the key of the block\n * @returns the key + the block scalar indicators, see https://yaml-multiline.info - Block Scalars\n */\nfunction getBlockHeader(value, blockKey) {\n const card = `(${ blockKey })[\\\\:][\\\\s|\\\\t]+[\\\\|\\\\>][\\\\d]*[\\\\-\\\\+]?`;\n const re = new RegExp(card, 'gi');\n\n const found = value.match(re);\n\n return found?.[0] || '';\n}\n\n/**\n *\n * @param {string} blockHeader the key + the block scalar indicators\n * @returns the indentation indicator from the block header, see https://yaml-multiline.info - Indentation\n */\nfunction getBlockIndentation(blockHeader) {\n const blockScalars = blockHeader.substr(blockHeader.indexOf(':') + 1);\n\n const indentation = blockScalars.match(/\\d+/);\n\n return indentation?.[0] || '';\n}\n\nexport function typeRef(type, str) {\n const re = new RegExp(`^${ type }\\\\[(.*)\\\\]$`);\n const match = str.match(re);\n\n if ( match ) {\n return typeMunge(match[1]);\n }\n}\n\nexport function typeMunge(type) {\n if ( type === 'integer' ) {\n return 'int';\n }\n\n if ( type === 'io.k8s.apimachinery.pkg.api.resource.Quantity' ) {\n return 'string';\n }\n\n return type;\n}\n\nexport function saferDump(obj) {\n const out = jsyaml.dump(obj || {});\n\n if ( out === '{}\\n' ) {\n return '';\n }\n\n return out;\n}\n\n/**\n * Handles newlines indicators in the multiline blocks.\n *\n * this is required since jsyaml.dump doesn't support chomping and scalar style at the moment.\n * see: https://github.com/nodeca/js-yaml/issues/171\n\n * @typedef {Object} DumpBlockOptions\n * @property {('>' | '|')} [scalarStyle] - The scalar style.\n * @property {('-' | '+' | '' | null)} [chomping] - The chomping style.\n *\n * @param {*} data the multiline block\n * @param {Object} options - Serialization options for jsyaml.dump.\n * @param {number} options.lineWidth - Set max line width. Set -1 for unlimited width.\n * @param {DumpBlockOptions} [options.dynamicProperties] - Options for dynamic properties.\n * Developers can provide their own property names under `options`.\n *\n * @returns the result of jsyaml.dump with the addition of multiline indicators\n */\nexport function dumpBlock(data, options = {}) {\n const parsed = jsyaml.dump(data, options);\n\n let out = parsed;\n\n const blockFields = Object.keys(data).filter((k) => {\n if (typeof data[k] === 'string') {\n return data[k].includes('\\n');\n }\n });\n\n if (blockFields.length) {\n for (const key of blockFields) {\n const { header, indentation } = getBlockDescriptor(out, key);\n\n const scalarStyle = options[key]?.scalarStyle ?? '|';\n const chomping = options[key]?.chomping ?? '';\n\n /**\n * Replace the original block indicators with the ones provided in the options param\n */\n if (header) {\n out = out.replace(header, `${ key }: ${ scalarStyle }${ chomping }${ indentation }`);\n }\n }\n }\n\n return out;\n}\n","import { SETTING } from '@shell/config/settings';\nimport { COUNT, MANAGEMENT } from '@shell/config/types';\nimport { GC_DEFAULTS, GC_PREFERENCES } from './gc-types';\n\nclass GarbageCollect {\n private static ENABLE_DEBUG_LOGGING = false;\n\n /**\n * Don't run GC if it's been run within 5 seconds\n */\n private static GC_RE_RUN_GAP = 1000 * 5;\n\n private cachedGcPrefs: GC_PREFERENCES = GC_DEFAULTS;\n\n private cachedGcPrefsStamp = '';\n\n private debugLog = (...args: any) => {\n if (GarbageCollect.ENABLE_DEBUG_LOGGING) {\n console.debug('GC', ...args); // eslint-disable-line no-console\n }\n };\n\n /**\n * Time the GC last ran\n */\n private gcLastRun: number | null = 0;\n\n /**\n * To avoid JSON.parse on the `ui-performance` setting keep a local cache\n */\n private getUiPerfGarbageCollection = (rootState: any) => {\n const uiPerfSetting = rootState.management.types[MANAGEMENT.SETTING]?.list.find((s: any) => s.id === SETTING.UI_PERFORMANCE);\n\n if (!uiPerfSetting || !uiPerfSetting.value) {\n // Could be in the process of logging out\n return undefined;\n }\n const stamp = `${ uiPerfSetting.metadata.generation }-${ uiPerfSetting.metadata.resourceVersion }`;\n\n if (this.cachedGcPrefsStamp !== stamp) {\n this.debugLog(`Updating ${ SETTING.UI_PERFORMANCE } cache`);\n this.cachedGcPrefsStamp = stamp;\n const uiPerfSettingParsed = JSON.parse(uiPerfSetting.value);\n\n this.cachedGcPrefs = uiPerfSettingParsed.garbageCollection;\n }\n\n return this.cachedGcPrefs;\n };\n\n /**\n * The last time a resource was accessed by either find or getters style functions\n */\n private lastAccessedCache: {\n [store: string]: {\n [type: string]: number;\n }\n } = {}\n\n /**\n * Track when a logged in route changes.\n */\n private lastRouteChange = 0;\n\n // ------------- GC Enabled ---------------------\n\n gcEnabledAll(pseudoCtx: any, type: string) {\n return this.gcEnabledForStore(pseudoCtx.state) && this.gcEnabledSetting(pseudoCtx) && this.gcEnabledForType(pseudoCtx, type);\n }\n\n gcEnabledSetting(pseudoCtx: any) {\n const { rootState } = pseudoCtx;\n\n // Don't use a getter... as we'll end up triggering ourselves again\n const uiPerfGarbageCollection = this.getUiPerfGarbageCollection(rootState);\n\n return uiPerfGarbageCollection?.enabled;\n }\n\n gcEnabledForStore(state: any) {\n return state?.config?.supportsGc;\n }\n\n /**\n * Store can require certain types are not GC'd (for example `cluster` and `schema`s, `counts`, etc)\n */\n gcEnabledForType(pseudoCtx: any, type: string) {\n const { getters } = pseudoCtx;\n\n if (!type || getters.gcIgnoreTypes[type]) {\n return false;\n }\n\n return true;\n }\n\n gcEnabledInterval(pseudoCtx: any) {\n const { rootState } = pseudoCtx;\n\n // Don't use a getter... as we'll end up triggering ourselves again\n const uiPerfGarbageCollection = this.getUiPerfGarbageCollection(rootState);\n\n return {\n enabled: uiPerfGarbageCollection?.enabledInterval,\n interval: uiPerfGarbageCollection?.interval || 0\n };\n }\n\n gcEnabledRoute(pseudoCtx: any) {\n const { rootState } = pseudoCtx;\n\n // Don't use a getter... as we'll end up triggering ourselves again\n const uiPerfGarbageCollection = this.getUiPerfGarbageCollection(rootState);\n\n return uiPerfGarbageCollection?.enabledOnNavigate;\n }\n\n // ------------- GC (actual) ---------------------\n\n /**\n * Remove stale resource types from the store and stop watching them for changes\n */\n garbageCollect(ctx: any, ignoreTypes: {[type: string]: boolean} = {}) {\n const now = new Date().getTime();\n\n // Is gc currently running OR has run in the past GC_RE_RUN_GAP return early\n if (this.gcLastRun === null || now - this.gcLastRun < GarbageCollect.GC_RE_RUN_GAP) {\n this.debugLog('Skipping (running or recently run)', this.gcLastRun ? new Date(this.gcLastRun) : 'running');\n\n return;\n }\n\n this.gcLastRun = null;\n const gcd: {[type: string]: number} = {};\n\n try {\n const { getters, rootState, dispatch } = ctx;\n\n if (!rootState.clusterReady) {\n this.debugLog('Skipping (cluster not ready)');\n this.gcLastRun = new Date().getTime();\n\n return ;\n }\n this.debugLog(`------ Started ------`);\n\n const uiPerfGarbageCollection = this.getUiPerfGarbageCollection(rootState);\n\n if (!uiPerfGarbageCollection) {\n return ;\n }\n const maxAge = uiPerfGarbageCollection.ageThreshold * 1000;\n const maxCount = uiPerfGarbageCollection.countThreshold;\n\n this.debugLog(`Max Age: ${ maxAge }. Max Count: ${ maxCount }`);// , 'Cache', this.lastAccessedCache\n\n const store = ctx.state.config.namespace;\n\n // this.debugLog('Cache', this.lastAccessedCache);\n\n Object.entries((this.lastAccessedCache[store] || {})).forEach(([type, lastAccessed]) => {\n if (!lastAccessed) {\n // There's no last accessed time... gc is probably disabled in another way\n this.debugLog(`${ type }: Skipping (no accessed time)`);\n\n return;\n }\n\n if (!this.gcEnabledForType(ctx, type)) {\n // This specific store is telling us to ignore the type (for example `cluster` store will not GC schema's, counts, etc)\n this.debugLog(`${ type }: Skipping (type ignored by store)`);\n\n return;\n }\n\n if (ignoreTypes[type]) {\n // We're going to a place that needs the resource\n this.debugLog(`${ type }: Skipping (navigating to type)`);\n\n return;\n }\n\n if (now - lastAccessed <= maxAge) {\n // The resource was recently accessed\n\n this.debugLog(`${ type }: Skipping (recently accessed)`);\n\n return;\n }\n\n if (this.lastRouteChange !== undefined && this.lastRouteChange < lastAccessed ) {\n // The resource is being used in the current route/page\n this.debugLog(`${ type }: Skipping (used in current route/page)`);\n\n return;\n }\n\n const countFromResource = getters.all(COUNT)[0].counts[type]?.summary.count;\n const currentCount = countFromResource ?? 0;\n\n if (currentCount === undefined || currentCount < maxCount) {\n // There's too few resources, we might as well keep them to avoid a network request when we need them again\n this.debugLog(`${ type }: Skipping (too few of resource)`);\n\n return;\n }\n\n this.debugLog(`${ type }: Removing from store`);\n dispatch('forgetType', type);\n gcd[type] = currentCount;\n });\n\n this.gcLastRun = new Date().getTime();\n } catch (e) {\n this.debugLog(`: Error`, e);\n this.gcLastRun = new Date().getTime();\n }\n\n if (Object.keys(gcd).length > 0) {\n console.info('Garbage Collected Resources', gcd); // eslint-disable-line no-console\n }\n\n this.debugLog(`------ Finished ------`);\n }\n\n // ------------- GC Update local cache ---------------------\n\n /**\n * Update the time that the resource type was accessed\n * This needs to run after any type initialisation (aka registerType)\n */\n gcUpdateLastAccessed(pseudoCtx: any, type: string) {\n if (!this.gcEnabledAll(pseudoCtx, type)) {\n return;\n }\n const store = pseudoCtx.state.config.namespace;\n\n if (!this.lastAccessedCache[store]) {\n this.lastAccessedCache[store] = {};\n }\n\n this.lastAccessedCache[store][type] = new Date().getTime();\n }\n\n /**\n * Update the time the user last changed routes\n */\n gcUpdateRouteChanged() {\n this.lastRouteChange = new Date().getTime();\n }\n\n // ------------- GC reset ---------------------\n\n /**\n * Remove all cached access times for the given store\n */\n gcResetStore(state: any) {\n const store = state.config.namespace;\n\n delete this.lastAccessedCache[store];\n\n this.debugLog('Forgetting Store:', store);\n }\n\n /**\n * Remove cached access time for the given resource type\n */\n gcResetType(state: any, type: string) {\n const store = state.config.namespace;\n\n if (!this.lastAccessedCache[store]) {\n return;\n }\n delete this.lastAccessedCache[store][type];\n\n this.debugLog('Forgetting Type:', store, type);\n }\n}\n\nconst gc = new GarbageCollect();\n\nexport default gc;\n","import { SETTING } from '@shell/config/settings';\nimport { MANAGEMENT } from '@shell/config/types';\n\nlet favIconSet = false;\n\nexport function haveSetFavIcon() {\n return favIconSet;\n}\n\nexport function setFavIcon(store) {\n const res = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FAVICON);\n const brandSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.BRAND);\n const link = findIconLink(document.head.getElementsByTagName('link'));\n\n if (link) {\n let brandImage;\n\n if (brandSetting?.value === 'suse') {\n brandImage = require('~shell/assets/brand/suse/favicon.png');\n } else if (brandSetting?.value === 'csp') {\n brandImage = require('~shell/assets/brand/csp/favicon.png');\n }\n\n link.href = res?.value || brandImage || defaultFavIcon;\n favIconSet = true;\n }\n}\n\nfunction getCurrentFavIcon() {\n const link = findIconLink(document.head.getElementsByTagName('link'));\n\n return link ? link.href : '';\n}\n\nfunction findIconLink(links) {\n for (let i = 0; i < links.length; i++) {\n const link = links[i];\n\n if (link.rel?.includes('icon')) {\n return link;\n }\n }\n\n return undefined;\n}\n\nconst defaultFavIcon = getCurrentFavIcon();\n","\n/**\n * Some plugins won't be bundled with the dashboard build but loaded on demand at run time.\n * This file allows 'manager' style plugins to defined how to determine if a unknown route\n * belongs to one of their associated plugins and how that plugin can be loaded\n */\nclass DynamicPluginLoader {\n dynamicPluginLoaders = [];\n\n register(reg) {\n this.dynamicPluginLoaders.push(reg);\n }\n\n async check({ route, store }) {\n for (const dpl of this.dynamicPluginLoaders) {\n // Check that the route is valid and then load the plugin associated with it\n const res = await dpl.load({ route, store });\n\n if (res) {\n return res;\n }\n }\n }\n}\n\nconst dynamicPluginLoader = new DynamicPluginLoader();\n\nexport default dynamicPluginLoader;\n","// Github repo cache\nexport const GITHUB_REPOS = 'githubRepos';\nexport const GITHUB_SCOPES = 'githubScopes';\nexport const _DATE = 'Updated';\n\nexport const BACK_TO = 'backTo';\n","import { MANAGEMENT } from '@shell/config/types';\n\nconst definitions = {};\n\nexport const create = function(name, def) {\n definitions[name] = { def };\n\n return name;\n};\n\nexport const mapFeature = function(name) {\n return {\n get() {\n return this.$store.getters['features/get'](name);\n },\n\n set(value) {\n throw new Error('The feature store only supports getting');\n }\n };\n};\n\n// --------------------\n// The default (2nd arg) is used only if the flag is missing entirely from the server.\n// This is mainly useful for development before the flag has been created in the API..\n\nexport const MULTI_CLUSTER = create('multi-cluster-management', true);\nexport const LEGACY = create('legacy', false);\nexport const RKE2 = create('rke2', true);\nexport const RKE1_UI = create('rke1-ui', true);\nexport const UNSUPPORTED_STORAGE_DRIVERS = create('unsupported-storage-drivers', false);\nexport const FLEET = create('continuous-delivery', true);\nexport const HARVESTER = create('harvester', true);\nexport const HARVESTER_CONTAINER = create('harvester-baremetal-container-workload', false);\nexport const FLEET_WORKSPACE_BACK = create('provisioningv2-fleet-workspace-back-population', false);\n\n// Not currently used.. no point defining ones we don't use\n// export const EMBEDDED_CLUSTER_API = create('embedded-cluster-api', true);\n// export const ISTIO_VIRTUAL_SERVICE_UI = create('istio-virtual-service-ui', true);\n// export const PROVISIONINGV2 = create('provisioningv2', true);\n// export const AUTH = create('auth', true);\n\n// --------------------\n\nexport const getters = {\n get: (state, getters, rootState, rootGetters) => (name) => {\n const definition = definitions[name];\n\n if (!definition) {\n throw new Error(`Unknown feature: ${ name }`);\n }\n\n const entry = rootGetters['management/byId'](MANAGEMENT.FEATURE, name);\n\n if ( entry ) {\n return entry.enabled;\n }\n\n return definition.def;\n },\n};\n\nexport const actions = {\n loadServer({ rootGetters, dispatch }) {\n if ( rootGetters['management/canList'](MANAGEMENT.FEATURE) ) {\n return dispatch('management/findAll', { type: MANAGEMENT.FEATURE }, { root: true });\n }\n },\n};\n","import { REDIRECTED } from '@shell/config/cookies';\nimport { NAME as EXPLORER } from '@shell/config/product/explorer';\nimport {\n SETUP, TIMED_OUT, UPGRADED, _FLAGGED, _UNFLAG\n} from '@shell/config/query-params';\nimport { SETTING } from '@shell/config/settings';\nimport { MANAGEMENT, NORMAN, DEFAULT_WORKSPACE } from '@shell/config/types';\nimport { _ALL_IF_AUTHED } from '@shell/plugins/dashboard-store/actions';\nimport { applyProducts } from '@shell/store/type-map';\nimport { findBy } from '@shell/utils/array';\nimport { ClusterNotFoundError, RedirectToError } from '@shell/utils/error';\nimport { get } from '@shell/utils/object';\nimport { setFavIcon, haveSetFavIcon } from '@shell/utils/favicon';\nimport dynamicPluginLoader from '@shell/pkg/dynamic-plugin-loader';\nimport { AFTER_LOGIN_ROUTE, WORKSPACE } from '@shell/store/prefs';\nimport { BACK_TO } from '@shell/config/local-storage';\nimport { NAME as FLEET_NAME } from '@shell/config/product/fleet.js';\nimport { canViewResource } from '@shell/utils/auth';\n\nconst getPackageFromRoute = (route) => {\n if (!route?.meta) {\n return;\n }\n // Sometimes meta is an array... sometimes not\n const arraySafe = Array.isArray(route.meta) ? route.meta : [route.meta];\n\n return arraySafe.find((m) => !!m.pkg)?.pkg;\n};\n\nconst getResourceFromRoute = (to) => {\n let resource = to.params?.resource;\n\n if (!resource) {\n resource = findMeta(to, 'resource');\n }\n\n return resource;\n};\n\nlet beforeEachSetup = false;\n\nfunction findMeta(route, key) {\n if (route?.meta) {\n const meta = Array.isArray(route.meta) ? route.meta : [route.meta];\n\n for (let i = 0; i < meta.length; i++) {\n if (meta[i][key]) {\n return meta[i][key];\n }\n }\n }\n\n return undefined;\n}\n\nexport function getClusterFromRoute(to) {\n let cluster = to.params?.cluster;\n\n if (!cluster) {\n cluster = findMeta(to, 'cluster');\n }\n\n return cluster;\n}\n\nexport function getProductFromRoute(to) {\n let product = to.params?.product;\n\n if ( !product ) {\n const match = to.name?.match(/^c-cluster-([^-]+)/);\n\n if ( match ) {\n product = match[1];\n }\n }\n\n // If still no product, see if the route indicates the product via route metadata\n if (!product) {\n product = findMeta(to, 'product');\n }\n\n return product;\n}\n\nfunction setProduct(store, to, redirect) {\n let product = getProductFromRoute(to);\n\n // since all products are hardcoded as routes (ex: c-local-explorer), if we match the wildcard route it means that the product does not exist\n if ((product && (!to.matched.length || (to.matched.length && to.matched[0].path === '/c/:cluster/:product'))) ||\n // if the product grabbed from the route is not registered, then we don't have it!\n (product && !store.getters['type-map/isProductRegistered'](product))) {\n store.dispatch('loadingError', new Error(store.getters['i18n/t']('nav.failWhale.productNotFound', { productNotFound: product }, true)));\n\n return () => redirect(302, '/fail-whale');\n }\n\n if ( !product ) {\n product = EXPLORER;\n }\n\n const oldProduct = store.getters['productId'];\n const oldStore = store.getters['currentProduct']?.inStore;\n\n if ( product !== oldProduct ) {\n store.commit('setProduct', product);\n }\n\n const neuStore = store.getters['currentProduct']?.inStore;\n\n if ( neuStore !== oldStore ) {\n // If the product store changes, clear the catalog.\n // There might be management catalog items in it vs cluster.\n store.commit('catalog/reset');\n }\n\n return false;\n}\n\n/**\n * Check that the resource is valid, if not redirect to fail whale\n *\n * This requires that\n * - product is set\n * - product's store is set and setup (so we can check schema's within it)\n * - product's store has the schemaFor getter (extension stores might not have it)\n * - there's a resource associated with route (meta or param)\n */\nfunction invalidResource(store, to, redirect) {\n const product = store.getters['currentProduct'];\n const resource = getResourceFromRoute(to);\n\n // In order to check a resource is valid we need these\n if (!product || !resource) {\n return false;\n }\n\n if (canViewResource(store, resource)) {\n return false;\n }\n\n // Unknown resource, redirect to fail whale\n\n store.dispatch('loadingError', new Error(store.getters['i18n/t']('nav.failWhale.resourceNotFound', { resource }, true)));\n\n return () => redirect(302, '/fail-whale');\n}\n\nexport default async function({\n route, app, store, redirect, $cookies, req, isDev, from, $plugin, next\n}) {\n if ( route.path && typeof route.path === 'string') {\n // Ignore webpack hot module reload requests\n if ( route.path.startsWith('/__webpack_hmr/') ) {\n return;\n }\n\n // Ignore the error page\n if ( route.path.startsWith('/fail-whale') ) {\n return;\n }\n }\n\n // This tells Ember not to redirect back to us once you've already been to dashboard once.\n if ( !$cookies.get(REDIRECTED) ) {\n $cookies.set(REDIRECTED, 'true', {\n path: '/',\n sameSite: true,\n secure: true,\n });\n }\n\n const upgraded = route.query[UPGRADED] === _FLAGGED;\n\n if ( upgraded ) {\n app.router.applyQuery({ [UPGRADED]: _UNFLAG });\n\n store.dispatch('growl/success', {\n title: store.getters['i18n/t']('serverUpgrade.title'),\n message: store.getters['i18n/t']('serverUpgrade.message'),\n timeout: 0,\n });\n }\n\n // Initial ?setup=admin-password can technically be on any route\n let initialPass = route.query[SETUP];\n let firstLogin = null;\n\n try {\n // Load settings, which will either be just the public ones if not logged in, or all if you are\n await store.dispatch('management/findAll', {\n type: MANAGEMENT.SETTING,\n opt: {\n load: _ALL_IF_AUTHED, url: `/v1/${ MANAGEMENT.SETTING }`, redirectUnauthorized: false\n }\n });\n\n // Set the favicon - use custom one from store if set\n if (!haveSetFavIcon()) {\n setFavIcon(store);\n }\n\n const res = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FIRST_LOGIN);\n const plSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.PL);\n\n firstLogin = res?.value === 'true';\n\n if (!initialPass && plSetting?.value === 'Harvester') {\n initialPass = 'admin';\n }\n } catch (e) {\n }\n\n if ( firstLogin === null ) {\n try {\n const res = await store.dispatch('rancher/find', {\n type: 'setting',\n id: SETTING.FIRST_LOGIN,\n opt: { url: `/v3/settings/${ SETTING.FIRST_LOGIN }` }\n });\n\n firstLogin = res?.value === 'true';\n\n const plSetting = await store.dispatch('rancher/find', {\n type: 'setting',\n id: SETTING.PL,\n opt: { url: `/v3/settings/${ SETTING.PL }` }\n });\n\n if (!initialPass && plSetting?.value === 'Harvester') {\n initialPass = 'admin';\n }\n } catch (e) {\n }\n }\n\n // TODO show error if firstLogin and default pass doesn't work\n if ( firstLogin ) {\n const ok = await tryInitialSetup(store, initialPass);\n\n if (ok) {\n if (initialPass) {\n store.dispatch('auth/setInitialPass', initialPass);\n }\n\n return redirect({ name: 'auth-setup' });\n } else {\n return redirect({ name: 'auth-login' });\n }\n }\n\n // Make sure you're actually logged in\n function isLoggedIn(me) {\n store.commit('auth/hasAuth', true);\n store.commit('auth/loggedInAs', me.id);\n }\n\n function notLoggedIn() {\n store.commit('auth/hasAuth', true);\n\n if ( route.name === 'index' ) {\n return redirect(302, '/auth/login');\n } else {\n return redirect(302, `/auth/login?${ TIMED_OUT }`);\n }\n }\n\n function noAuth() {\n store.commit('auth/hasAuth', false);\n }\n\n if ( store.getters['auth/enabled'] !== false && !store.getters['auth/loggedIn'] ) {\n // `await` so we have one successfully request whilst possibly logged in (ensures fromHeader is populated from `x-api-cattle-auth`)\n await store.dispatch('auth/getUser');\n\n const v3User = store.getters['auth/v3User'] || {};\n\n if (v3User?.mustChangePassword) {\n return redirect({ name: 'auth-setup' });\n }\n\n // In newer versions the API calls return the auth state instead of having to make a new call all the time.\n const fromHeader = store.getters['auth/fromHeader'];\n\n if ( fromHeader === 'none' ) {\n noAuth();\n } else if ( fromHeader === 'true' ) {\n const me = await findMe(store);\n\n isLoggedIn(me);\n } else if ( fromHeader === 'false' ) {\n notLoggedIn();\n } else {\n // Older versions look at principals and see what happens\n try {\n const me = await findMe(store);\n\n isLoggedIn(me);\n } catch (e) {\n const status = e?._status;\n\n if ( status === 404 ) {\n noAuth();\n } else {\n if ( status === 401 ) {\n notLoggedIn();\n } else {\n store.commit('setError', { error: e, locationError: new Error('Auth Middleware') });\n }\n\n return;\n }\n }\n }\n\n store.dispatch('gcStartIntervals');\n }\n\n const backTo = window.localStorage.getItem(BACK_TO);\n\n if (backTo) {\n window.localStorage.removeItem(BACK_TO);\n\n window.location.href = backTo;\n }\n\n // GC should be notified of route change before any find/get request is made that might be used for that page\n store.dispatch('gcRouteChanged', route);\n\n // Load stuff\n let localCheckResource = false;\n\n await applyProducts(store, $plugin);\n\n // Setup a beforeEach hook once to keep track of the current product\n if ( !beforeEachSetup ) {\n beforeEachSetup = true;\n // This only needs to happen when beforeEach hook hasn't run (the initial load)\n localCheckResource = true;\n\n store.app.router.beforeEach((to, from, next) => {\n // NOTE - This beforeEach runs AFTER this middleware. So anything in this middleware that requires it must set it manually\n let redirected = setProduct(store, to, redirect);\n\n if (redirected) {\n return redirected();\n }\n\n redirected = invalidResource(store, to, redirect);\n\n if (redirected) {\n return redirected();\n }\n\n next();\n });\n\n // Call it for the initial pageload\n const redirected = setProduct(store, route, redirect);\n\n if (redirected) {\n return redirected();\n }\n\n store.app.router.afterEach((to, from) => {\n // Clear state used to record if back button was used for navigation\n setTimeout(() => {\n window._popStateDetected = false;\n }, 1);\n });\n }\n\n try {\n let clusterId = get(route, 'params.cluster');\n\n // Route can provide cluster ID via metadata\n if (!clusterId && route) {\n clusterId = getClusterFromRoute(route);\n }\n\n const pkg = getPackageFromRoute(route);\n const product = getProductFromRoute(route);\n\n const oldPkg = getPackageFromRoute(from);\n const oldProduct = getProductFromRoute(from);\n\n // Leave an old pkg where we weren't before?\n const oldPkgPlugin = oldPkg ? Object.values($plugin.getPlugins()).find((p) => p.name === oldPkg) : null;\n\n if (oldPkg && oldPkg !== pkg ) {\n // Execute anything optional the plugin wants to. For example resetting it's store to remove data\n await oldPkgPlugin.onLeave(store, {\n clusterId,\n product,\n oldProduct,\n oldIsExt: !!oldPkg\n });\n }\n\n // Sometimes this needs to happen before or alongside other things... but is always needed\n const always = [\n store.dispatch('loadManagement')\n ];\n\n // Entering a new package where we weren't before?\n const newPkgPlugin = pkg ? Object.values($plugin.getPlugins()).find((p) => p.name === pkg) : null;\n\n // Note - We can't block on oldPkg !== newPkg because on a fresh load the `from` route equals the `to` route\n if (pkg && (oldPkg !== pkg || from.fullPath === route.fullPath)) {\n // Execute mandatory store actions\n await Promise.all(always);\n\n // Execute anything optional the plugin wants to\n await newPkgPlugin.onEnter(store, {\n clusterId,\n product,\n oldProduct,\n oldIsExt: !!oldPkg\n });\n }\n\n if (!route.matched?.length) {\n // If there are no matching routes we could be trying to nav to a page belonging to a dynamic plugin which needs loading\n await Promise.all([\n ...always,\n ]);\n\n // If a plugin claims the route and is loaded correctly we'll get a route back\n const newLocation = await dynamicPluginLoader.check({ route, store });\n\n // If we have a new location, double check that it's actually valid\n const resolvedRoute = newLocation ? store.app.router.resolve(newLocation) : null;\n\n if (resolvedRoute?.route.matched.length) {\n // Note - don't use `redirect` or `store.app.route` (breaks feature by failing to run middleware in default layout)\n return next(newLocation);\n }\n }\n\n // Ensure that the activeNamespaceCache is updated given the change of context either from or to a place where it uses workspaces\n // When fleet moves to it's own package this should be moved to pkg onEnter/onLeave\n if ((oldProduct === FLEET_NAME || product === FLEET_NAME) && oldProduct !== product) {\n // See note above for store.app.router.beforeEach, need to setProduct manually, for the moment do this in a targeted way\n const redirected = setProduct(store, route, redirect);\n\n if (redirected) {\n return redirected();\n }\n\n store.commit('updateWorkspace', {\n value: store.getters['prefs/get'](WORKSPACE) || DEFAULT_WORKSPACE,\n getters: store.getters\n });\n }\n\n // Always run loadCluster, it handles 'unload' as well\n // Run them in parallel\n await Promise.all([\n ...always,\n store.dispatch('loadCluster', {\n id: clusterId,\n oldPkg: oldPkgPlugin,\n newPkg: newPkgPlugin,\n product,\n oldProduct,\n targetRoute: route\n })\n ]);\n\n if (localCheckResource) {\n const redirected = invalidResource(store, route, redirect);\n\n if (redirected) {\n return redirected();\n }\n }\n\n if (!clusterId) {\n clusterId = store.getters['defaultClusterId']; // This needs the cluster list, so no parallel\n const isSingleProduct = store.getters['isSingleProduct'];\n\n if (isSingleProduct?.afterLoginRoute) {\n const value = {\n name: 'c-cluster-product',\n ...isSingleProduct.afterLoginRoute,\n params: {\n cluster: clusterId,\n ...isSingleProduct.afterLoginRoute?.params\n },\n };\n\n await store.dispatch('prefs/set', {\n key: AFTER_LOGIN_ROUTE,\n value,\n });\n }\n }\n } catch (e) {\n if ( e.name === ClusterNotFoundError.name ) {\n return redirect(302, '/home');\n } if ( e.name === RedirectToError.name ) {\n return redirect(302, e.url);\n } else {\n // Sets error 500 if lost connection to API\n store.commit('setError', { error: e, locationError: new Error(store.getters['i18n/t']('nav.failWhale.authMiddleware')) });\n\n return redirect(302, '/fail-whale');\n }\n }\n}\n\nasync function findMe(store) {\n // First thing we do in loadManagement is fetch principals anyway.... so don't ?me=true here\n const principals = await store.dispatch('rancher/findAll', {\n type: NORMAN.PRINCIPAL,\n opt: {\n url: '/v3/principals',\n redirectUnauthorized: false,\n }\n });\n\n const me = findBy(principals, 'me', true);\n\n return me;\n}\n\nasync function tryInitialSetup(store, password = 'admin') {\n try {\n const res = await store.dispatch('auth/login', {\n provider: 'local',\n body: {\n username: 'admin',\n password\n },\n });\n\n return res._status === 200;\n } catch (e) {\n console.error('Error trying initial setup', e); // eslint-disable-line no-console\n\n return false;\n }\n}\n","import { ActionLocation, CardLocation, ExtensionPoint } from '@shell/core/types';\nimport { isMac } from '@shell/utils/platform';\nimport { ucFirst, randomStr } from '@shell/utils/string';\nimport {\n _EDIT, _CONFIG, _DETAIL, _LIST, _CREATE\n} from '@shell/config/query-params';\nimport { getProductFromRoute } from '@shell/middleware/authenticated';\nimport { isEqual } from '@shell/utils/object';\n\nfunction checkRouteProduct($route, locationConfigParam) {\n const product = getProductFromRoute($route);\n\n // alias for the homepage\n if (locationConfigParam === 'home' && $route.name === 'home') {\n return true;\n } else if (locationConfigParam === product) {\n return true;\n }\n\n return false;\n}\n\nfunction checkRouteMode({ name, query }, locationConfigParam) {\n if (locationConfigParam === _EDIT && query.mode && query.mode === _EDIT && !query.as) {\n return true;\n } else if (locationConfigParam === _CONFIG && query.as && query.as === _CONFIG) {\n return true;\n } else if (locationConfigParam === _DETAIL && !query.as && name.includes('-id') && (!query.mode || query?.mode !== _EDIT)) {\n return true;\n // alias to target all list views\n } else if (locationConfigParam === _LIST && !name.includes('-id') && name.includes('-resource')) {\n return true;\n // alias to target create views\n } else if (locationConfigParam === _CREATE && name.endsWith('-create')) {\n return true;\n }\n\n return false;\n}\n\nfunction checkExtensionRouteBinding($route, locationConfig, context) {\n // if no configuration is passed, consider it as global\n if (!Object.keys(locationConfig).length) {\n return true;\n }\n\n const { params } = $route;\n\n // \"params\" to be checked based on the locationConfig\n // This has become overloaded with mode and context\n const paramsToCheck = [\n 'product',\n 'resource',\n 'namespace',\n 'cluster',\n 'id',\n 'mode',\n 'path',\n 'hash',\n // url query params\n 'queryParam',\n // Custom context specific params provided by the extension, not to be confused with location params\n 'context',\n ];\n\n let res = true;\n\n for (let i = 0; i < paramsToCheck.length; i++) {\n const param = paramsToCheck[i];\n\n if (locationConfig[param]) {\n const asArray = Array.isArray(locationConfig[param]) ? locationConfig[param] : [locationConfig[param]];\n\n for (let x = 0; x < asArray.length; x++) {\n const locationConfigParam = asArray[x];\n\n if (locationConfigParam) {\n if (param === 'hash') {\n res = $route.hash ? $route.hash.includes(locationConfigParam) : false;\n // handle \"product\" in a separate way...\n } else if (param === 'product') {\n res = checkRouteProduct($route, locationConfigParam);\n // also handle \"mode\" in a separate way because it mainly depends on query params\n } else if (param === 'mode') {\n res = checkRouteMode($route, locationConfigParam);\n } else if (param === 'resource') {\n // Match exact resource but also allow resource of '*' to match any resource\n res = (params[param] && locationConfigParam === '*') || locationConfigParam === params[param];\n } else if (param === 'context') {\n // Need all keys and values to match\n res = isEqual(locationConfigParam, context);\n // evaluate queryParam in route\n } else if (param === 'queryParam') {\n res = isEqual(locationConfigParam, $route.query);\n // evaluate path in route\n } else if (param === 'path' && locationConfigParam.urlPath) {\n if (locationConfigParam.endsWith) {\n res = $route.path.endsWith(locationConfigParam.urlPath);\n } else if (!Object.keys(locationConfigParam).includes('exact') || locationConfigParam.exact) {\n res = locationConfigParam.urlPath === $route.path;\n } else {\n res = $route.path.includes(locationConfigParam.urlPath);\n }\n } else if (locationConfigParam === params[param]) {\n res = true;\n } else {\n res = false;\n }\n }\n\n // If a single location config param is good then this is an param (aka ['pods', 'configmap'] = pods or configmaps)\n if (res) {\n break;\n }\n }\n\n // If a single param (set of location config params) is bad then this is not an acceptable location\n if (!res) {\n break;\n }\n }\n }\n\n return res;\n}\n\nexport function getApplicableExtensionEnhancements(pluginCtx, actionType, uiArea, currRoute, translationCtx = pluginCtx, context) {\n const extensionEnhancements = [];\n\n // gate it so that we prevent errors on older versions of dashboard\n if (pluginCtx.$plugin?.getUIConfig) {\n const actions = pluginCtx.$plugin.getUIConfig(actionType, uiArea);\n\n actions.forEach((action, i) => {\n if (checkExtensionRouteBinding(currRoute, action.locationConfig, context || {})) {\n // ADD CARD PLUGIN UI ENHANCEMENT\n if (actionType === ExtensionPoint.CARD) {\n // intercept to apply translation\n if (uiArea === CardLocation.CLUSTER_DASHBOARD_CARD && action.labelKey) {\n actions[i].label = translationCtx.t(action.labelKey);\n }\n\n // ADD ACTION PLUGIN UI ENHANCEMENT\n } else if (actionType === ExtensionPoint.ACTION) {\n // TABLE ACTION\n if (uiArea === ActionLocation.TABLE) {\n // intercept to apply translation\n if (action.labelKey) {\n actions[i].label = translationCtx.t(action.labelKey);\n }\n\n // bulkable flag\n actions[i].bulkable = actions[i].multiple || actions[i].bulkable;\n\n // populate action identifier to prevent errors\n if (!actions[i].action) {\n actions[i].action = `custom-table-action-${ randomStr(10).toLowerCase() }`;\n }\n }\n\n // extract simplified shortcut definition on plugin - HEADER ACTION\n if (uiArea === ActionLocation.HEADER && action.shortcut) {\n // if it's a string, then assume CTRL for windows and META for mac\n if (typeof action.shortcut === 'string') {\n actions[i].shortcutLabel = () => {\n return isMac ? `(\\u2318-${ action.shortcut.toUpperCase() })` : `(Ctrl-${ action.shortcut.toUpperCase() })`;\n };\n actions[i].shortcutKey = { windows: ['ctrl', action.shortcut], mac: ['meta', action.shortcut] };\n // correct check for an Object type in JS... handle the object passed\n } else if (typeof action.shortcut === 'object' && !Array.isArray(action.shortcut) && action.shortcut !== null) {\n actions[i].shortcutKey = action.shortcut;\n const keyboardCombo = isMac ? actions[i].shortcut.mac : actions[i].shortcut.windows ? actions[i].shortcut.windows : [];\n let scLabel = '';\n\n keyboardCombo.forEach((key, i) => {\n if (i < keyboardCombo.length - 1) {\n if (key === 'meta') {\n key = '\\u2318';\n } else {\n key = ucFirst(key);\n }\n scLabel += `${ key }`;\n scLabel += '-';\n } else {\n scLabel += `${ key.toUpperCase() }`;\n }\n });\n\n actions[i].shortcutLabel = () => {\n return `(${ scLabel })`;\n };\n }\n }\n }\n\n extensionEnhancements.push(actions[i]);\n }\n });\n }\n\n return extensionEnhancements;\n}\n","import { NORMAN_NAME } from '@shell/config/labels-annotations';\nimport {\n _CLONE,\n _CONFIG,\n _EDIT,\n _UNFLAG,\n _VIEW,\n _YAML,\n AS,\n MODE\n} from '@shell/config/query-params';\nimport { VIEW_IN_API } from '@shell/store/prefs';\nimport { addObject, addObjects, findBy, removeAt } from '@shell/utils/array';\nimport CustomValidators from '@shell/utils/custom-validators';\nimport { downloadFile, generateZip } from '@shell/utils/download';\nimport { clone, get } from '@shell/utils/object';\nimport { eachLimit } from '@shell/utils/promise';\nimport { sortableNumericSuffix } from '@shell/utils/sort';\nimport { coerceStringTypeToScalarType, escapeHtml, ucFirst } from '@shell/utils/string';\nimport {\n displayKeyFor,\n validateBoolean,\n validateChars,\n validateDnsLikeTypes,\n validateLength,\n} from '@shell/utils/validators';\nimport formRulesGenerator from '@shell/utils/validators/formRules/index';\nimport { waitFor } from '@shell/utils/async';\nimport jsyaml from 'js-yaml';\nimport compact from 'lodash/compact';\nimport forIn from 'lodash/forIn';\nimport isEmpty from 'lodash/isEmpty';\nimport isFunction from 'lodash/isFunction';\nimport isString from 'lodash/isString';\nimport uniq from 'lodash/uniq';\nimport Vue from 'vue';\n\nimport { normalizeType } from './normalize';\n\nimport { ExtensionPoint, ActionLocation } from '@shell/core/types';\nimport { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';\n\nconst STRING_LIKE_TYPES = [\n 'string',\n 'date',\n 'blob',\n 'enum',\n 'multiline',\n 'masked',\n 'password',\n 'dnsLabel',\n 'hostname',\n];\nconst DNS_LIKE_TYPES = ['dnsLabel', 'dnsLabelRestricted', 'hostname'];\n\nconst REMAP_STATE = {\n disabled: 'inactive',\n notapplied: 'Not Applied',\n notready: 'Not Ready',\n waitapplied: 'Wait Applied',\n outofsync: 'Out of Sync',\n 'in-progress': 'In Progress',\n gitupdating: 'Git Updating',\n errapplied: 'Err Applied',\n waitcheckin: 'Wait Check-In',\n off: 'Disabled',\n waitingforinfrastructure: 'Waiting for Infra',\n waitingfornoderef: 'Waiting for Node Ref'\n};\n\nconst DEFAULT_COLOR = 'warning';\nconst DEFAULT_ICON = 'x';\n\nconst DEFAULT_WAIT_INTERVAL = 1000;\nconst DEFAULT_WAIT_TMIMEOUT = 30000;\n\nexport const STATES_ENUM = {\n IN_USE: 'in-use',\n IN_PROGRESS: 'in-progress',\n PENDING_ROLLBACK: 'pending-rollback',\n PENDING_UPGRADE: 'pending-upgrade',\n ABORTED: 'aborted',\n ACTIVATING: 'activating',\n ACTIVE: 'active',\n AVAILABLE: 'available',\n BACKED_UP: 'backedup',\n BOUND: 'bound',\n BUILDING: 'building',\n COMPLETED: 'completed',\n CORDONED: 'cordoned',\n COUNT: 'count',\n CREATED: 'created',\n CREATING: 'creating',\n DEACTIVATING: 'deactivating',\n DEGRADED: 'degraded',\n DENIED: 'denied',\n DEPLOYED: 'deployed',\n DEPLOYING: 'deploying',\n DISABLED: 'disabled',\n DISCONNECTED: 'disconnected',\n DRAINED: 'drained',\n DRAINING: 'draining',\n ERR_APPLIED: 'errapplied',\n ERROR: 'error',\n ERRORING: 'erroring',\n ERRORS: 'errors',\n EXPIRED: 'expired',\n EXPIRING: 'expiring',\n FAIL: 'fail',\n FAILED: 'failed',\n HEALTHY: 'healthy',\n INACTIVE: 'inactive',\n INFO: 'info',\n INITIALIZING: 'initializing',\n INPROGRESS: 'inprogress',\n LOCKED: 'locked',\n MIGRATING: 'migrating',\n MISSING: 'missing',\n MODIFIED: 'modified',\n NOT_APPLICABLE: 'notApplicable',\n NOT_APLLIED: 'notapplied',\n NOT_READY: 'notready',\n OFF: 'off',\n ORPHANED: 'orphaned',\n OTHER: 'other',\n OUT_OF_SYNC: 'outofsync',\n ON_GOING: 'on-going',\n PASS: 'pass',\n PASSED: 'passed',\n PAUSED: 'paused',\n PENDING: 'pending',\n PROVISIONING: 'provisioning',\n PROVISIONED: 'provisioned',\n PURGED: 'purged',\n PURGING: 'purging',\n READY: 'ready',\n RECONNECTING: 'reconnecting',\n REGISTERING: 'registering',\n REINITIALIZING: 'reinitializing',\n RELEASED: 'released',\n REMOVED: 'removed',\n REMOVING: 'removing',\n REQUESTED: 'requested',\n RESTARTING: 'restarting',\n RESTORING: 'restoring',\n RESIZING: 'resizing',\n RUNNING: 'running',\n SKIP: 'skip',\n SKIPPED: 'skipped',\n STARTING: 'starting',\n STOPPED: 'stopped',\n STOPPING: 'stopping',\n SUCCEEDED: 'succeeded',\n SUCCESS: 'success',\n SUCCESSFUL: 'successful',\n SUPERSEDED: 'superseded',\n SUSPENDED: 'suspended',\n UNAVAILABLE: 'unavailable',\n UNHEALTHY: 'unhealthy',\n UNINSTALLED: 'uninstalled',\n UNINSTALLING: 'uninstalling',\n UNKNOWN: 'unknown',\n UNTRIGGERED: 'untriggered',\n UPDATING: 'updating',\n WAIT_APPLIED: 'waitapplied',\n WAIT_CHECKIN: 'waitcheckin',\n WAITING: 'waiting',\n WARNING: 'warning',\n};\n\nexport function mapStateToEnum(statusString) {\n // e.g. in fleet Status is Capitalized. This function will map it to the enum\n return Object.values(STATES_ENUM).find((val) => {\n return val.toLowerCase() === statusString.toLocaleLowerCase();\n });\n}\n\nexport const STATES = {\n [STATES_ENUM.IN_USE]: {\n color: 'success', icon: 'dot-open', label: 'In Use', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.IN_PROGRESS]: {\n color: 'info', icon: 'tag', label: 'In Progress', compoundIcon: 'info'\n },\n [STATES_ENUM.PENDING_ROLLBACK]: {\n color: 'info', icon: 'dot-half', label: 'Pending Rollback', compoundIcon: 'info'\n },\n [STATES_ENUM.PENDING_UPGRADE]: {\n color: 'info', icon: 'dot-half', label: 'Pending Update', compoundIcon: 'info'\n },\n [STATES_ENUM.ABORTED]: {\n color: 'warning', icon: 'error', label: 'Aborted', compoundIcon: 'warning'\n },\n [STATES_ENUM.ACTIVATING]: {\n color: 'info', icon: 'tag', label: 'Activating', compoundIcon: 'info'\n },\n [STATES_ENUM.ACTIVE]: {\n color: 'success', icon: 'dot-open', label: 'Active', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.AVAILABLE]: {\n color: 'success', icon: 'dot-open', label: 'Available', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.BACKED_UP]: {\n color: 'success', icon: 'backup', label: 'Backed Up', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.BOUND]: {\n color: 'success', icon: 'dot', label: 'Bound', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.BUILDING]: {\n color: 'success', icon: 'dot-open', label: 'Building', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.COMPLETED]: {\n color: 'success', icon: 'dot', label: 'Completed', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.CORDONED]: {\n color: 'info', icon: 'tag', label: 'Cordoned', compoundIcon: 'info'\n },\n [STATES_ENUM.COUNT]: {\n color: 'success', icon: 'dot-open', label: 'Count', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.CREATED]: {\n color: 'info', icon: 'tag', label: 'Created', compoundIcon: 'info'\n },\n [STATES_ENUM.CREATING]: {\n color: 'info', icon: 'tag', label: 'Creating', compoundIcon: 'info'\n },\n [STATES_ENUM.DEACTIVATING]: {\n color: 'info', icon: 'adjust', label: 'Deactivating', compoundIcon: 'info'\n },\n [STATES_ENUM.DEGRADED]: {\n color: 'warning', icon: 'error', label: 'Degraded', compoundIcon: 'warning'\n },\n [STATES_ENUM.DENIED]: {\n color: 'error', icon: 'adjust', label: 'Denied', compoundIcon: 'error'\n },\n [STATES_ENUM.DEPLOYED]: {\n color: 'success', icon: 'dot-open', label: 'Deployed', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.DISABLED]: {\n color: 'warning', icon: 'error', label: 'Disabled', compoundIcon: 'warning'\n },\n [STATES_ENUM.DISCONNECTED]: {\n color: 'warning', icon: 'error', label: 'Disconnected', compoundIcon: 'warning'\n },\n [STATES_ENUM.DRAINED]: {\n color: 'info', icon: 'tag', label: 'Drained', compoundIcon: 'info'\n },\n [STATES_ENUM.DRAINING]: {\n color: 'warning', icon: 'tag', label: 'Draining', compoundIcon: 'warning'\n },\n [STATES_ENUM.ERR_APPLIED]: {\n color: 'error', icon: 'error', label: 'Error Applied', compoundIcon: 'error'\n },\n [STATES_ENUM.ERROR]: {\n color: 'error', icon: 'error', label: 'Error', compoundIcon: 'error'\n },\n [STATES_ENUM.ERRORING]: {\n color: 'error', icon: 'error', label: 'Erroring', compoundIcon: 'error'\n },\n [STATES_ENUM.ERRORS]: {\n color: 'error', icon: 'error', label: 'Errors', compoundIcon: 'error'\n },\n [STATES_ENUM.EXPIRED]: {\n color: 'error', icon: 'error', label: 'Expired', compoundIcon: 'warning'\n },\n [STATES_ENUM.EXPIRING]: {\n color: 'warning', icon: 'error', label: 'Expiring', compoundIcon: 'error'\n },\n [STATES_ENUM.FAIL]: {\n color: 'error', icon: 'error', label: 'Fail', compoundIcon: 'error'\n },\n [STATES_ENUM.FAILED]: {\n color: 'error', icon: 'error', label: 'Failed', compoundIcon: 'error'\n },\n [STATES_ENUM.HEALTHY]: {\n color: 'success', icon: 'dot-open', label: 'Healthy', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.INACTIVE]: {\n color: 'error', icon: 'dot', label: 'Inactive', compoundIcon: 'error'\n },\n [STATES_ENUM.INITIALIZING]: {\n color: 'warning', icon: 'error', label: 'Initializing', compoundIcon: 'warning'\n },\n [STATES_ENUM.INPROGRESS]: {\n color: 'info', icon: 'spinner', label: 'In Progress', compoundIcon: 'info'\n },\n [STATES_ENUM.INFO]: {\n color: 'info', icon: 'info', label: 'Info', compoundIcon: 'info'\n },\n [STATES_ENUM.LOCKED]: {\n color: 'warning', icon: 'adjust', label: 'Locked', compoundIcon: 'warning'\n },\n [STATES_ENUM.MIGRATING]: {\n color: 'info', icon: 'info', label: 'Migrated', compoundIcon: 'info'\n },\n [STATES_ENUM.MISSING]: {\n color: 'warning', icon: 'adjust', label: 'Missing', compoundIcon: 'warning'\n },\n [STATES_ENUM.MODIFIED]: {\n color: 'warning', icon: 'edit', label: 'Modified', compoundIcon: 'warning'\n },\n [STATES_ENUM.NOT_APPLICABLE]: {\n color: 'warning', icon: 'tag', label: 'Not Applicable', compoundIcon: 'warning'\n },\n [STATES_ENUM.NOT_APLLIED]: {\n color: 'warning', icon: 'tag', label: 'Not Applied', compoundIcon: 'warning'\n },\n [STATES_ENUM.NOT_READY]: {\n color: 'warning', icon: 'tag', label: 'Not Ready', compoundIcon: 'warning'\n },\n [STATES_ENUM.OFF]: {\n color: 'darker', icon: 'error', label: 'Off'\n },\n [STATES_ENUM.ON_GOING]: {\n color: 'info', icon: 'info', label: 'Info', compoundIcon: 'info'\n },\n [STATES_ENUM.ORPHANED]: {\n color: 'warning', icon: 'tag', label: 'Orphaned', compoundIcon: 'warning'\n },\n [STATES_ENUM.OTHER]: {\n color: 'info', icon: 'info', label: 'Other', compoundIcon: 'info'\n },\n [STATES_ENUM.OUT_OF_SYNC]: {\n color: 'warning', icon: 'tag', label: 'Out Of Sync', compoundIcon: 'warning'\n },\n [STATES_ENUM.PASS]: {\n color: 'success', icon: 'dot-dotfill', label: 'Pass', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.PASSED]: {\n color: 'success', icon: 'dot-dotfill', label: 'Passed', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.PAUSED]: {\n color: 'info', icon: 'info', label: 'Paused', compoundIcon: 'info'\n },\n [STATES_ENUM.PENDING]: {\n color: 'info', icon: 'tag', label: 'Pending', compoundIcon: 'info'\n },\n [STATES_ENUM.PROVISIONING]: {\n color: 'info', icon: 'dot', label: 'Provisioning', compoundIcon: 'info'\n },\n [STATES_ENUM.PROVISIONED]: {\n color: 'success', icon: 'dot', label: 'Provisioned', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.PURGED]: {\n color: 'error', icon: 'purged', label: 'Purged', compoundIcon: 'error'\n },\n [STATES_ENUM.PURGING]: {\n color: 'info', icon: 'purged', label: 'Purging', compoundIcon: 'info'\n },\n [STATES_ENUM.READY]: {\n color: 'success', icon: 'dot-open', label: 'Ready', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.RECONNECTING]: {\n color: 'error', icon: 'error', label: 'Reconnecting', compoundIcon: 'error'\n },\n [STATES_ENUM.REGISTERING]: {\n color: 'info', icon: 'tag', label: 'Registering', compoundIcon: 'info'\n },\n [STATES_ENUM.REINITIALIZING]: {\n color: 'warning', icon: 'error', label: 'Reinitializing', compoundIcon: 'warning'\n },\n [STATES_ENUM.RELEASED]: {\n color: 'warning', icon: 'error', label: 'Released', compoundIcon: 'warning'\n },\n [STATES_ENUM.REMOVED]: {\n color: 'error', icon: 'trash', label: 'Removed', compoundIcon: 'error'\n },\n [STATES_ENUM.REMOVING]: {\n color: 'info', icon: 'trash', label: 'Removing', compoundIcon: 'info'\n },\n [STATES_ENUM.REQUESTED]: {\n color: 'info', icon: 'tag', label: 'Requested', compoundIcon: 'info'\n },\n [STATES_ENUM.RESTARTING]: {\n color: 'info', icon: 'adjust', label: 'Restarting', compoundIcon: 'info'\n },\n [STATES_ENUM.RESTORING]: {\n color: 'info', icon: 'medicalcross', label: 'Restoring', compoundIcon: 'info'\n },\n [STATES_ENUM.RESIZING]: {\n color: 'warning', icon: 'dot', label: 'Resizing', compoundIcon: 'warning'\n },\n [STATES_ENUM.RUNNING]: {\n color: 'success', icon: 'dot-open', label: 'Running', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.SKIP]: {\n color: 'info', icon: 'dot-open', label: 'Skip', compoundIcon: 'info'\n },\n [STATES_ENUM.SKIPPED]: {\n color: 'info', icon: 'dot-open', label: 'Skipped', compoundIcon: 'info'\n },\n [STATES_ENUM.STARTING]: {\n color: 'info', icon: 'adjust', label: 'Starting', compoundIcon: 'info'\n },\n [STATES_ENUM.STOPPED]: {\n color: 'error', icon: 'dot', label: 'Stopped', compoundIcon: 'error'\n },\n [STATES_ENUM.STOPPING]: {\n color: 'info', icon: 'adjust', label: 'Stopping', compoundIcon: 'info'\n },\n [STATES_ENUM.SUCCEEDED]: {\n color: 'success', icon: 'dot-dotfill', label: 'Succeeded', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.SUCCESS]: {\n color: 'success', icon: 'dot-open', label: 'Success', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.SUCCESSFUL]: {\n color: 'success', icon: 'dot-open', label: 'Successful'\n },\n [STATES_ENUM.SUPERSEDED]: {\n color: 'info', icon: 'dot-open', label: 'Superseded', compoundIcon: 'info'\n },\n [STATES_ENUM.SUSPENDED]: {\n color: 'info', icon: 'pause', label: 'Suspended', compoundIcon: 'info'\n },\n [STATES_ENUM.UNAVAILABLE]: {\n color: 'error', icon: 'error', label: 'Unavailable', compoundIcon: 'error'\n },\n [STATES_ENUM.UNHEALTHY]: {\n color: 'error', icon: 'error', label: 'Unhealthy', compoundIcon: 'error'\n },\n [STATES_ENUM.UNINSTALLED]: {\n color: 'info', icon: 'trash', label: 'Uninstalled', compoundIcon: 'info'\n },\n [STATES_ENUM.UNINSTALLING]: {\n color: 'info', icon: 'trash', label: 'Uninstalling', compoundIcon: 'info'\n },\n [STATES_ENUM.UNKNOWN]: {\n color: 'warning', icon: 'x', label: 'Unknown', compoundIcon: 'warning'\n },\n [STATES_ENUM.UNTRIGGERED]: {\n color: 'success', icon: 'tag', label: 'Untriggered', compoundIcon: 'checkmark'\n },\n [STATES_ENUM.UPDATING]: {\n color: 'warning', icon: 'tag', label: 'Updating', compoundIcon: 'warning'\n },\n [STATES_ENUM.WAIT_APPLIED]: {\n color: 'info', icon: 'tag', label: 'Wait Applied', compoundIcon: 'info'\n },\n [STATES_ENUM.WAIT_CHECKIN]: {\n color: 'warning', icon: 'tag', label: 'Wait Checkin', compoundIcon: 'warning'\n },\n [STATES_ENUM.WAITING]: {\n color: 'info', icon: 'tag', label: 'Waiting', compoundIcon: 'info'\n },\n [STATES_ENUM.WARNING]: {\n color: 'warning', icon: 'error', label: 'Warning', compoundIcon: 'warning'\n },\n [STATES_ENUM.DEPLOYING]: {\n color: 'info', icon: 'info', label: 'Deploying', compoundIcon: 'info'\n },\n};\n\nexport function getStatesByType(type = 'info') {\n const out = {\n info: [],\n error: [],\n success: [],\n warning: [],\n unknown: [],\n };\n\n forIn(STATES, (state, stateKey) => {\n if (state.color) {\n if (out[state.color]) {\n out[state.color].push(stateKey);\n } else {\n out.unknown.push(stateKey);\n }\n }\n });\n\n return out;\n}\n\nconst SORT_ORDER = {\n error: 1,\n warning: 2,\n info: 3,\n success: 4,\n ready: 5,\n notready: 6,\n other: 7,\n};\n\nexport function getStateLabel(state) {\n const lowercaseState = state.toLowerCase();\n\n return STATES[lowercaseState] ? STATES[lowercaseState].label : STATES[STATES_ENUM.UNKNOWN].label;\n}\n\nexport function colorForState(state, isError, isTransitioning) {\n if ( isError ) {\n return 'text-error';\n }\n\n if ( isTransitioning ) {\n return 'text-info';\n }\n\n const key = (state || 'active').toLowerCase();\n let color;\n\n if ( STATES[key] && STATES[key].color ) {\n color = maybeFn.call(this, STATES[key].color);\n }\n\n if ( !color ) {\n color = DEFAULT_COLOR;\n }\n\n return `text-${ color }`;\n}\n\nexport function stateDisplay(state) {\n // @TODO use translations\n const key = (state || 'active').toLowerCase();\n\n if ( REMAP_STATE[key] ) {\n return REMAP_STATE[key];\n }\n\n return key.split(/-/).map(ucFirst).join('-');\n}\n\nexport function primaryDisplayStatusFromCount(status) {\n const statusOrder = [\n STATES_ENUM.ERROR,\n STATES_ENUM.FAILED,\n STATES_ENUM.WARNING,\n STATES_ENUM.MODIFIED,\n STATES_ENUM.WAIT_APPLIED,\n STATES_ENUM.ORPHANED,\n STATES_ENUM.MISSING,\n STATES_ENUM.UNKNOWN,\n STATES_ENUM.NOT_READY,\n STATES_ENUM.READY,\n ];\n\n // sort status by order of statusOrder\n const existingStatuses = Object.keys(status).filter((key) => {\n return status[key] > 0 && statusOrder.includes(key.toLowerCase());\n }).sort((a, b) => statusOrder.indexOf(a.toLowerCase()) - statusOrder.indexOf(b.toLowerCase()));\n\n return existingStatuses[0] ? existingStatuses[0] : STATES_ENUM.UNKNOWN;\n}\n\nexport function stateSort(color, display) {\n color = color.replace(/^(text|bg)-/, '');\n\n return `${ SORT_ORDER[color] || SORT_ORDER['other'] } ${ display }`;\n}\n\nexport function isConditionReadyAndWaiting(condition) {\n if (!condition) {\n return false;\n }\n\n return condition?.type?.toLowerCase() === 'ready' && condition?.reason?.toLowerCase() === 'waiting';\n}\n\nfunction maybeFn(val) {\n if ( isFunction(val) ) {\n return val(this);\n }\n\n return val;\n}\n\nexport default class Resource {\n constructor(data, ctx, rehydrateNamespace = null, setClone = false) {\n for ( const k in data ) {\n this[k] = data[k];\n }\n\n Object.defineProperty(this, '$ctx', {\n value: ctx,\n enumerable: false,\n });\n\n if ( rehydrateNamespace ) {\n Object.defineProperty(this, '__rehydrate', {\n value: rehydrateNamespace,\n enumerable: true,\n configurable: true\n });\n }\n\n if ( setClone ) {\n Object.defineProperty(this, '__clone', {\n value: true,\n enumerable: true,\n configurable: true,\n writable: true\n });\n }\n }\n\n get '$getters'() {\n return this.$ctx.getters;\n }\n\n get '$rootGetters'() {\n return this.$ctx.rootGetters;\n }\n\n get '$dispatch'() {\n return this.$ctx.dispatch;\n }\n\n get '$state'() {\n return this.$ctx.state;\n }\n\n get '$rootState'() {\n return this.$ctx.rootState;\n }\n\n get customValidationRules() {\n return [\n /**\n * Essentially a fake schema object with additional params to extend validation\n *\n * @param {nullable} Value is nullable\n * @param {path} Path on the resource to the value to validate\n * @param {required} Value required\n * @param {requiredIf} Value required if value at path not empty\n * @param {translationKey} Human readable display key for param in path e.g. metadata.name === Name\n * @param {type} Type of field to validate\n * @param {validators} array of strings where item is name of exported validator function in custom-validators, args can be passed by prepending args separated by colon. e.g maxLength:63\n */\n /* {\n nullable: false,\n path: 'spec.ports',\n required: true,\n type: 'array',\n validators: ['servicePort'],\n } */\n ];\n }\n\n get _key() {\n const m = this.metadata;\n\n if ( m ) {\n if ( m.uid ) {\n return m.uid;\n }\n\n if ( m.namespace ) {\n return `${ this.type }/${ m.namespace }/${ m.name }`;\n }\n }\n\n if ( this.id ) {\n return `${ this.type }/${ this.id }`;\n }\n\n return `${ this.type }/${ Math.random() }`;\n }\n\n get schema() {\n return this.$getters['schemaFor'](this.type);\n }\n\n toString() {\n return `[${ this.type }: ${ this.id }]`;\n }\n\n get typeDisplay() {\n const schema = this.schema;\n\n if ( schema ) {\n return this.$rootGetters['type-map/labelFor'](schema);\n }\n\n return '?';\n }\n\n get nameDisplay() {\n return this.displayName || this.spec?.displayName || this.metadata?.annotations?.[NORMAN_NAME] || this.name || this.metadata?.name || this.id;\n }\n\n get nameSort() {\n return sortableNumericSuffix(this.nameDisplay).toLowerCase();\n }\n\n get namespacedName() {\n const namespace = this.metadata?.namespace;\n const name = this.nameDisplay;\n\n if ( namespace ) {\n return `${ namespace }:${ name }`;\n }\n\n return name;\n }\n\n get namespacedNameSort() {\n return sortableNumericSuffix(this.namespacedName).toLowerCase();\n }\n\n get groupByLabel() {\n const name = this.metadata?.namespace;\n let out;\n\n if ( name ) {\n out = this.t('resourceTable.groupLabel.namespace', { name: escapeHtml(name) });\n } else {\n out = this.t('resourceTable.groupLabel.notInANamespace');\n }\n\n return out;\n }\n\n setLabels(/* val */) {\n throw new Error('Implement setLabels in subclass');\n }\n\n setLabel(/* key, val */) {\n throw new Error('Implement setLabel in subclass');\n }\n\n setAnnotations(val) {\n throw new Error('Implement setAnnotations in subclass');\n }\n\n setAnnotation(key, val) {\n throw new Error('Implement setAnnotation in subclass');\n }\n\n // You can override the displayed by providing your own stateDisplay (and possibly using the function exported above)\n get stateDisplay() {\n return stateDisplay(this.state);\n }\n\n get stateColor() {\n return colorForState.call(\n this,\n this.state,\n this.stateObj?.error,\n this.stateObj?.transitioning\n );\n }\n\n get stateBackground() {\n return this.stateColor.replace('text-', 'bg-');\n }\n\n get stateIcon() {\n let trans = false;\n let error = false;\n\n if ( this.metadata && this.metadata.state ) {\n trans = this.metadata.state.transitioning;\n error = this.metadata.state.error;\n }\n\n if ( trans ) {\n return 'icon icon-spinner icon-spin';\n }\n\n if ( error ) {\n return 'icon icon-error';\n }\n\n const key = (this.state || '').toLowerCase();\n let icon;\n\n if ( STATES[key] && STATES[key].icon ) {\n icon = maybeFn.call(this, STATES[key].icon);\n }\n\n if ( !icon ) {\n icon = DEFAULT_ICON;\n }\n\n return `icon icon-${ icon }`;\n }\n\n get stateSort() {\n return stateSort(this.stateColor, this.stateDisplay);\n }\n\n get stateDescription() {\n const trans = this.stateObj?.transitioning || false;\n const error = this.stateObj?.error || false;\n const message = this.stateObj?.message;\n\n return trans || error ? ucFirst(message) : '';\n }\n\n get stateObj() {\n return this.metadata?.state;\n }\n\n // ------------------------------------------------------------------\n\n waitForTestFn(fn, msg, timeoutMs, intervalMs) {\n return waitFor(() => fn.apply(this), msg, timeoutMs || DEFAULT_WAIT_TMIMEOUT, intervalMs || DEFAULT_WAIT_INTERVAL, true);\n }\n\n waitForState(state, timeout, interval) {\n return this.waitForTestFn(() => {\n return (this.state || '').toLowerCase() === state.toLowerCase();\n }, `state=${ state }`, timeout, interval);\n }\n\n waitForTransition() {\n return this.waitForTestFn(() => {\n return !this.transitioning;\n }, 'transition completion', undefined, undefined);\n }\n\n waitForAction(name) {\n return this.waitForTestFn(() => {\n return this.hasAction(name);\n }, `action=${ name }`, undefined, undefined);\n }\n\n waitForLink(name) {\n return this.waitForTestFn(() => {\n return this.hasLink(name);\n }, `link=${ name }`, undefined, undefined);\n }\n\n hasCondition(condition) {\n return this.isCondition(condition, null);\n }\n\n isCondition(condition, withStatus = 'True') {\n if ( !this.status || !this.status.conditions ) {\n return false;\n }\n\n const entry = findBy((this.status.conditions || []), 'type', condition);\n\n if ( !entry ) {\n return false;\n }\n\n if ( !withStatus ) {\n return true;\n }\n\n return (entry.status || '').toLowerCase() === `${ withStatus }`.toLowerCase();\n }\n\n waitForCondition(name, withStatus = 'True', timeoutMs = DEFAULT_WAIT_TMIMEOUT, intervalMs = DEFAULT_WAIT_INTERVAL) {\n return this.waitForTestFn(() => {\n return this.isCondition(name, withStatus);\n }, `condition ${ name }=${ withStatus }`, timeoutMs, intervalMs);\n }\n\n // ------------------------------------------------------------------\n\n get availableActions() {\n const all = this._availableActions;\n\n // Remove disabled items and consecutive dividers\n let last = null;\n const out = all.filter((item) => {\n if ( item.enabled === false ) {\n return false;\n }\n\n const cur = item.divider;\n const ok = !cur || (cur && !last);\n\n last = cur;\n\n return ok;\n });\n\n // Remove dividers at the beginning\n while ( out.length && out[0].divider ) {\n out.shift();\n }\n\n // Remove dividers at the end\n while ( out.length && out[out.length - 1].divider ) {\n out.pop();\n }\n\n // Remove consecutive dividers in the middle\n for ( let i = 1 ; i < out.length ; i++ ) {\n if ( out[i].divider && out[i - 1].divider ) {\n removeAt(out, i, 1);\n i--;\n }\n }\n\n return out;\n }\n\n // You can add custom actions by overriding your own availableActions (and probably reading super._availableActions)\n get _availableActions() {\n // get menu actions available by plugins configuration\n const currentRoute = this.currentRouter().app._route;\n const extensionMenuActions = getApplicableExtensionEnhancements(this.$rootState, ExtensionPoint.ACTION, ActionLocation.TABLE, currentRoute, this);\n\n const all = [\n { divider: true },\n {\n action: this.canUpdate ? 'goToEdit' : 'goToViewConfig',\n label: this.t(this.canUpdate ? 'action.edit' : 'action.view'),\n icon: 'icon icon-edit',\n enabled: this.canCustomEdit,\n },\n {\n action: this.canEditYaml ? 'goToEditYaml' : 'goToViewYaml',\n label: this.t(this.canEditYaml ? 'action.editYaml' : 'action.viewYaml'),\n icon: 'icon icon-file',\n enabled: this.canYaml,\n },\n {\n action: (this.canCustomEdit ? 'goToClone' : 'cloneYaml'),\n label: this.t('action.clone'),\n icon: 'icon icon-copy',\n enabled: this.canClone && this.canCreate && (this.canCustomEdit || this.canYaml),\n },\n { divider: true },\n {\n action: 'download',\n label: this.t('action.download'),\n icon: 'icon icon-download',\n bulkable: true,\n bulkAction: 'downloadBulk',\n enabled: this.canYaml,\n weight: -9,\n },\n {\n action: 'viewInApi',\n label: this.t('action.viewInApi'),\n icon: 'icon icon-external-link',\n enabled: this.canViewInApi,\n },\n {\n action: 'promptRemove',\n altAction: 'remove',\n label: this.t('action.remove'),\n icon: 'icon icon-trash',\n bulkable: true,\n enabled: this.canDelete,\n bulkAction: 'promptRemove',\n weight: -10, // Delete always goes last\n },\n ];\n\n // Extension actions get added to the end, so add a divider if there are any\n if (extensionMenuActions.length) {\n // Add a divider first\n all.push({ divider: true });\n\n extensionMenuActions.forEach((action) => {\n const newActionInstance = { ...action };\n\n const enabledFn = newActionInstance.enabled;\n const typeofEnabled = typeof enabledFn;\n\n switch (typeofEnabled) {\n case 'undefined':\n newActionInstance.enabled = true;\n break;\n case 'function':\n Object.defineProperty(newActionInstance, 'enabled', { get: () => enabledFn(this) });\n break;\n case 'boolean':\n // no op, just use it directly\n break;\n default:\n // unsupported value\n console.warn(`Unsupported 'enabled' property type for action: ${ action.label || action.labelKey }` ); // eslint-disable-line no-console\n delete newActionInstance.enabled;\n break;\n }\n\n all.push(newActionInstance);\n });\n }\n\n return all;\n }\n\n // ------------------------------------------------------------------\n\n get canDelete() {\n return this._canDelete;\n }\n\n get _canDelete() {\n return this.hasLink('remove') && this.$rootGetters['type-map/optionsFor'](this.type).isRemovable;\n }\n\n get canClone() {\n return true;\n }\n\n get canUpdate() {\n return this.hasLink('update') && this.$rootGetters['type-map/optionsFor'](this.type).isEditable;\n }\n\n get canCustomEdit() {\n return this.$rootGetters['type-map/hasCustomEdit'](this.type, this.id);\n }\n\n get canCreate() {\n if ( this.schema && !this.schema?.collectionMethods.find((x) => x.toLowerCase() === 'post') ) {\n return false;\n }\n\n return this.$rootGetters['type-map/optionsFor'](this.type).isCreatable;\n }\n\n get canViewInApi() {\n return this.hasLink('self') && this.$rootGetters['prefs/get'](VIEW_IN_API);\n }\n\n get canYaml() {\n return this.hasLink('view');\n }\n\n get canEditYaml() {\n return this.schema?.resourceMethods?.find((x) => x === 'blocked-PUT') ? false : this.canUpdate;\n }\n\n // ------------------------------------------------------------------\n\n hasLink(linkName) {\n return !!this.linkFor(linkName);\n }\n\n linkFor(linkName) {\n return (this.links || {})[linkName];\n }\n\n followLink(linkName, opt = {}) {\n if ( !opt.url ) {\n opt.url = (this.links || {})[linkName];\n }\n\n if ( opt.urlSuffix ) {\n opt.url += opt.urlSuffix;\n }\n\n if ( !opt.url ) {\n throw new Error(`Unknown link ${ linkName } on ${ this.type } ${ this.id }`);\n }\n\n return this.$dispatch('request', { opt, type: this.type } );\n }\n\n // ------------------------------------------------------------------\n\n hasAction(actionName) {\n return !!this.actionLinkFor(actionName);\n }\n\n actionLinkFor(actionName) {\n return (this.actions || this.actionLinks || {})[actionName];\n }\n\n doAction(actionName, body, opt = {}) {\n return this.$dispatch('resourceAction', {\n resource: this,\n actionName,\n body,\n opt,\n });\n }\n\n async doActionGrowl(actionName, body, opt = {}) {\n try {\n await this.$dispatch('resourceAction', {\n resource: this,\n actionName,\n body,\n opt,\n });\n } catch (err) {\n this.$dispatch('growl/fromError', {\n title: this.$rootGetters['i18n/t']('generic.notification.title.error'),\n err: err.data || err,\n }, { root: true });\n }\n }\n\n // ------------------------------------------------------------------\n\n patch(data, opt = {}, merge = false, alertOnError = false) {\n if ( !opt.url ) {\n // Workaround for the links not being correct - view link is the only one that seems correct\n opt.url = this.linkFor('view') || this.linkFor('self');\n }\n\n opt.method = 'patch';\n opt.headers = opt.headers || {};\n\n if (!opt.headers['content-type']) {\n const contentType = merge ? 'application/strategic-merge-patch+json' : 'application/json-patch+json';\n\n opt.headers['content-type'] = contentType;\n }\n opt.data = data;\n\n const dispatch = this.$dispatch('request', { opt, type: this.type } );\n\n return !alertOnError ? dispatch : dispatch.catch((e) => {\n const title = this.t('resource.errors.update', { name: this.name });\n\n console.error(title, e); // eslint-disable-line no-console\n\n this.$dispatch('growl/error', {\n title,\n message: e?.message,\n timeout: 5000\n }, { root: true });\n });\n }\n\n save() {\n return this._save(...arguments);\n }\n\n /**\n * Remove any unwanted properties from the object that will be saved\n */\n cleanForSave(data, forNew) {\n delete data.__rehydrate;\n delete data.__clone;\n\n return data;\n }\n\n /**\n * Allow to handle the response of the save request\n * @param {*} res Full request response\n */\n processSaveResponse(res) { }\n\n async _save(opt = {}) {\n const forNew = !this.id;\n\n const errors = await this.validationErrors(this, opt.ignoreFields);\n\n if (!isEmpty(errors)) {\n return Promise.reject(errors);\n }\n\n if ( this.metadata?.resourceVersion ) {\n this.metadata.resourceVersion = `${ this.metadata.resourceVersion }`;\n }\n\n if ( !opt.url ) {\n if ( forNew ) {\n const schema = this.$getters['schemaFor'](this.type);\n let url = schema.linkFor('collection');\n\n if ( schema.attributes && schema.attributes.namespaced && this.metadata && this.metadata.namespace ) {\n url += `/${ this.metadata.namespace }`;\n }\n\n opt.url = url;\n } else {\n opt.url = this.linkFor('update') || this.linkFor('self');\n }\n }\n\n if ( !opt.method ) {\n opt.method = ( forNew ? 'post' : 'put' );\n }\n\n if ( !opt.headers ) {\n opt.headers = {};\n }\n\n if ( !opt.headers['content-type'] ) {\n opt.headers['content-type'] = 'application/json';\n }\n\n if ( !opt.headers['accept'] ) {\n opt.headers['accept'] = 'application/json';\n }\n\n // @TODO remove this once the API maps steve _type <-> k8s type in both directions\n opt.data = this.toSave() || { ...this };\n\n if (opt.data._type) {\n opt.data.type = opt.data._type;\n }\n\n if (opt.data._name) {\n opt.data.name = opt.data._name;\n }\n\n if (opt.data._labels) {\n opt.data.labels = opt.data._labels;\n }\n\n if (opt.data._annotations) {\n opt.data.annotations = opt.data._annotations;\n }\n\n opt.data = this.cleanForSave(opt.data, forNew);\n\n // handle \"replace\" opt as a query param _replace=true for norman PUT requests\n if (opt?.replace && opt.method === 'put') {\n const argParam = opt.url.includes('?') ? '&' : '?';\n\n opt.url = `${ opt.url }${ argParam }_replace=true`;\n delete opt.replace;\n }\n\n try {\n const res = await this.$dispatch('request', { opt, type: this.type } );\n\n // Allow to process response independently from the related models\n this.processSaveResponse(res);\n\n // Steve sometimes returns Table responses instead of the resource you just saved.. ignore\n if ( res && res.kind !== 'Table') {\n await this.$dispatch('load', { data: res, existing: (forNew ? this : undefined ) });\n }\n } catch (e) {\n if ( this.type && this.id && e?._status === 409) {\n // If there's a conflict, try to load the new version\n await this.$dispatch('find', {\n type: this.type,\n id: this.id,\n opt: { force: true }\n });\n }\n\n return Promise.reject(e);\n }\n\n return this;\n }\n\n remove() {\n return this._remove(...arguments);\n }\n\n async _remove(opt = {}) {\n if ( !opt.url ) {\n opt.url = this.linkFor('self');\n }\n\n opt.method = 'delete';\n\n const res = await this.$dispatch('request', { opt, type: this.type } );\n\n if ( res?._status === 204 ) {\n // If there's no body, assume the resource was immediately deleted\n // and drop it from the store as if a remove event happened.\n await this.$dispatch('ws.resource.remove', { data: this });\n }\n }\n\n // ------------------------------------------------------------------\n\n currentRoute() {\n return window.$nuxt.$route;\n }\n\n currentRouter() {\n return window.$nuxt.$router;\n }\n\n get listLocation() {\n return {\n name: `c-cluster-product-resource`,\n params: {\n product: this.$rootGetters['productId'],\n cluster: this.$rootGetters['clusterId'],\n resource: this.type,\n }\n };\n }\n\n get _detailLocation() {\n const schema = this.$getters['schemaFor'](this.type);\n\n const id = this.id?.replace(/.*\\//, '');\n\n return {\n name: `c-cluster-product-resource${ schema?.attributes?.namespaced ? '-namespace' : '' }-id`,\n params: {\n product: this.$rootGetters['productId'],\n cluster: this.$rootGetters['clusterId'],\n resource: this.type,\n namespace: this.metadata?.namespace,\n id,\n }\n };\n }\n\n get detailLocation() {\n return this._detailLocation;\n }\n\n goToDetail() {\n this.currentRouter().push(this.detailLocation);\n }\n\n goToClone(moreQuery = {}) {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _CLONE,\n [AS]: _UNFLAG,\n ...moreQuery\n };\n\n this.currentRouter().push(location);\n }\n\n goToEdit(moreQuery = {}) {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _EDIT,\n [AS]: _UNFLAG,\n ...moreQuery\n };\n\n this.currentRouter().push(location);\n }\n\n goToViewConfig(moreQuery = {}) {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _VIEW,\n [AS]: _CONFIG,\n ...moreQuery\n };\n\n this.currentRouter().push(location);\n }\n\n goToEditYaml() {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _EDIT,\n [AS]: _YAML\n };\n\n this.currentRouter().push(location);\n }\n\n goToViewYaml() {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _VIEW,\n [AS]: _YAML\n };\n\n this.currentRouter().push(location);\n }\n\n cloneYaml(moreQuery = {}) {\n const location = this.detailLocation;\n\n location.query = {\n ...location.query,\n [MODE]: _CLONE,\n [AS]: _YAML,\n ...moreQuery\n };\n\n this.currentRouter().push(location);\n }\n\n async download() {\n const value = await this.followLink('view', { headers: { accept: 'application/yaml' } });\n const data = await this.cleanForDownload(value.data);\n\n downloadFile(`${ this.nameDisplay }.yaml`, data, 'application/yaml');\n }\n\n async downloadBulk(items) {\n const files = {};\n const names = [];\n\n for ( const item of items ) {\n let name = `${ item.nameDisplay }.yaml`;\n let i = 2;\n\n while ( names.includes(name) ) {\n name = `${ item.nameDisplay }_${ i++ }.yaml`;\n }\n\n names.push(name);\n }\n\n await eachLimit(items, 10, (item, idx) => {\n return item.followLink('view', { headers: { accept: 'application/yaml' } } ).then(async(data) => {\n const yaml = data.data || data;\n const cleanedYaml = await this.cleanForDownload(yaml);\n\n files[`resources/${ names[idx] }`] = cleanedYaml;\n });\n });\n\n const zip = await generateZip(files);\n\n downloadFile('resources.zip', zip, 'application/zip');\n }\n\n viewInApi() {\n window.open(this.links.self, '_blank');\n }\n\n promptRemove(resources) {\n if ( !resources ) {\n resources = this;\n }\n\n this.$dispatch('promptRemove', resources);\n }\n\n get confirmRemove() {\n return false;\n }\n\n applyDefaults() {\n }\n\n get urlFromAttrs() {\n const schema = this.$getters['schemaFor'](this.type);\n const { metadata:{ namespace = 'default' } } = this;\n let url = schema.links.collection;\n\n const attributes = schema?.attributes;\n\n if (!attributes) {\n throw new Error('Attributes must be present on the schema');\n }\n const { group, resource } = attributes;\n\n url = `${ url.slice(0, url.indexOf('/v1')) }/apis/${ group }/namespaces/${ namespace }/${ resource }`;\n\n return url;\n }\n\n // convert yaml to object, clean for new if creating/cloning\n // map _type to type\n cleanYaml(yaml, mode = 'edit') {\n try {\n const obj = jsyaml.load(yaml);\n\n if (mode !== 'edit') {\n this.$dispatch(`cleanForNew`, obj);\n }\n\n if (obj._type) {\n obj.type = obj._type;\n delete obj._type;\n }\n const out = jsyaml.dump(obj, { skipInvalid: true });\n\n return out;\n } catch (e) {\n return null;\n }\n }\n\n cleanForNew() {\n this.$dispatch(`cleanForNew`, this);\n }\n\n cleanForDiff() {\n this.$dispatch(`cleanForDiff`, this.toJSON());\n }\n\n async cleanForDownload(yaml) {\n return this.$dispatch(`cleanForDownload`, yaml);\n }\n\n yamlForSave(yaml) {\n try {\n const obj = jsyaml.load(yaml);\n\n if (obj) {\n if (this._type) {\n obj._type = obj.type;\n }\n\n return jsyaml.dump(obj);\n }\n } catch (e) {\n return null;\n }\n }\n\n async saveYaml(yaml) {\n await this._saveYaml(yaml);\n }\n\n async _saveYaml(yaml) {\n /* Multipart support, but need to know the right cluster and work for management store\n and \"apply\" seems to only work for create, not update.\n\n const ary = jsyaml.loadAll(yaml); // will throw on invalid yaml, and return one or more documents (usually one)\n\n if ( ary.length > 1 ) {\n await this.$rootGetters['currentCluster'].doAction('apply', {\n yaml,\n defaultNamespace: this.metadata.namespace,\n });\n }\n\n const parsed = ary[0];\n */\n\n const parsed = jsyaml.load(yaml); // will throw on invalid yaml, and return one or more documents (usually one)\n\n if ( this.schema?.attributes?.namespaced && !parsed.metadata.namespace ) {\n const err = this.$rootGetters['i18n/t']('resourceYaml.errors.namespaceRequired');\n\n throw err;\n }\n\n let res;\n const isCreate = !this.id;\n const headers = {\n 'content-type': 'application/yaml',\n accept: 'application/json',\n };\n\n if ( isCreate ) {\n res = await this.schema.followLink('collection', {\n method: 'POST',\n headers,\n data: yaml\n });\n } else {\n res = await this.followLink('update', {\n method: 'PUT',\n headers,\n data: yaml\n });\n }\n\n await this.$dispatch(`load`, {\n data: res,\n existing: (isCreate ? this : undefined)\n });\n\n if (this.isSpoofed) {\n await this.$dispatch('cluster/findAll', { type: this.type, opt: { force: true } }, { root: true });\n }\n }\n\n get modelValidationRules() {\n const rules = [];\n\n const customValidationRulesets = this?.customValidationRules\n .filter((rule) => !!rule.validators || !!rule.required)\n .map((rule) => {\n const formRules = formRulesGenerator(this.t, { displayKey: rule?.translationKey ? this.t(rule.translationKey) : 'Value' });\n\n return {\n path: rule.path,\n rules: [\n ...(rule.validators || []),\n ...rule.required ? ['required'] : [],\n ...['dnsLabel', 'dnsLabelRestricted', 'hostname'].includes(rule.type) ? [rule.type] : []\n ]\n .map((rule) => {\n if (rule.includes(':')) {\n const [ruleKey, ruleArg] = rule.split(':');\n\n return formRules[ruleKey](ruleArg);\n }\n\n return formRules[rule];\n }\n )\n .filter((rule) => !!rule)\n };\n })\n .filter((ruleset) => ruleset.rules.length > 0);\n\n rules.push(...customValidationRulesets);\n\n return rules;\n }\n\n customValidationErrors(data, ignorePaths = []) {\n const errors = [];\n\n let { customValidationRules } = this;\n\n if (!isEmpty(customValidationRules)) {\n if (isFunction(customValidationRules)) {\n customValidationRules = customValidationRules();\n }\n\n customValidationRules.filter((rule) => !ignorePaths.includes(rule.path)).forEach((rule) => {\n const {\n path,\n requiredIf: requiredIfPath,\n validators = [],\n type: fieldType,\n } = rule;\n let pathValue = get(data, path);\n\n const parsedRules = compact((validators || []));\n let displayKey = path;\n\n if (rule.translationKey && this.$rootGetters['i18n/exists'](rule.translationKey)) {\n displayKey = this.t(rule.translationKey);\n }\n\n if (isString(pathValue)) {\n pathValue = pathValue.trim();\n }\n if (requiredIfPath) {\n const reqIfVal = get(data, requiredIfPath);\n\n if (!isEmpty(reqIfVal) && (isEmpty(pathValue) && pathValue !== 0)) {\n errors.push(this.t('validation.required', { key: displayKey }));\n }\n }\n\n validateLength(pathValue, rule, displayKey, this.$rootGetters, errors);\n validateChars(pathValue, rule, displayKey, this.$rootGetters, errors);\n\n if ( !isEmpty(pathValue) && DNS_LIKE_TYPES.includes(fieldType) ) {\n // DNS types should be lowercase\n const tolower = (pathValue || '').toLowerCase();\n\n if ( tolower !== pathValue ) {\n pathValue = tolower;\n\n Vue.set(data, path, pathValue);\n }\n\n errors.push(...validateDnsLikeTypes(pathValue, fieldType, displayKey, this.$rootGetters, errors));\n }\n\n parsedRules.forEach((validator) => {\n const validatorAndArgs = validator.split(':');\n const validatorName = validatorAndArgs.slice(0, 1);\n const validatorArgs = validatorAndArgs.slice(1) || null;\n const validatorExists = Object.prototype.hasOwnProperty.call(CustomValidators, validatorName);\n\n if (!isEmpty(validatorName) && validatorExists) {\n CustomValidators[validatorName](pathValue, this.$rootGetters, errors, validatorArgs, displayKey, data);\n } else if (!isEmpty(validatorName) && !validatorExists) {\n // Check if validator is imported from plugin\n const pluginValidator = this.$rootState.$plugin?.getValidator(validatorName);\n\n if (pluginValidator) {\n pluginValidator(pathValue, this.$rootGetters, errors, validatorArgs, displayKey, data);\n } else {\n // eslint-disable-next-line\n console.warn(this.t('validation.custom.missing', { validatorName }));\n }\n }\n });\n });\n }\n\n return errors;\n }\n\n validationErrors(data = this, ignoreFields) {\n const errors = [];\n const {\n type: originalType,\n schema\n } = data;\n const type = normalizeType(originalType);\n\n if ( !originalType ) {\n // eslint-disable-next-line\n console.warn(this.t('validation.noType'), data);\n\n return errors;\n }\n\n if ( !schema ) {\n // eslint-disable-next-line\n // console.warn(this.t('validation.noSchema'), originalType, data);\n\n return errors;\n }\n\n const fields = schema.resourceFields || {};\n const keys = Object.keys(fields);\n let field, key, val, displayKey;\n\n for ( let i = 0 ; i < keys.length ; i++ ) {\n const fieldErrors = [];\n\n key = keys[i];\n field = fields[key];\n val = get(data, key);\n displayKey = displayKeyFor(type, key, this.$rootGetters);\n\n const fieldType = field?.type ? normalizeType(field.type) : null;\n const valIsString = isString(val);\n\n if ( ignoreFields && ignoreFields.includes(key) ) {\n continue;\n }\n\n if ( val === undefined ) {\n val = null;\n }\n\n if (valIsString) {\n if (fieldType) {\n Vue.set(data, key, coerceStringTypeToScalarType(val, fieldType));\n }\n\n // Empty strings on nullable string fields -> null\n if ( field.nullable && val.length === 0 && STRING_LIKE_TYPES.includes(fieldType)) {\n val = null;\n\n Vue.set(data, key, val);\n }\n }\n if (fieldType === 'boolean') {\n validateBoolean(val, field, displayKey, this.$rootGetters, fieldErrors);\n } else {\n validateLength(val, field, displayKey, this.$rootGetters, fieldErrors);\n validateChars(val, field, displayKey, this.$rootGetters, fieldErrors);\n }\n\n if (fieldErrors.length > 0) {\n fieldErrors.push(this.t('validation.required', { key: displayKey }));\n errors.push(...fieldErrors);\n continue;\n }\n\n // IDs claim to be these but are lies...\n if ( key !== 'id' && !isEmpty(val) && DNS_LIKE_TYPES.includes(fieldType) ) {\n // DNS types should be lowercase\n const tolower = (val || '').toLowerCase();\n\n if ( tolower !== val ) {\n val = tolower;\n\n Vue.set(data, key, val);\n }\n\n fieldErrors.push(...validateDnsLikeTypes(val, fieldType, displayKey, this.$rootGetters, fieldErrors));\n }\n errors.push(...fieldErrors);\n }\n\n return uniq([...errors, ...this.customValidationErrors(data)]);\n }\n\n get ownersByType() {\n const ownerReferences = this.metadata?.ownerReferences || [];\n const ownersByType = {};\n\n ownerReferences.forEach((owner) => {\n if (!ownersByType[owner.kind]) {\n ownersByType[owner.kind] = [owner];\n } else {\n ownersByType[owner.kind].push(owner);\n }\n });\n\n return ownersByType;\n }\n\n get owners() {\n const owners = [];\n\n for ( const kind in this.ownersByType) {\n const schema = this.$rootGetters['cluster/schema'](kind);\n\n if (schema) {\n const type = schema.id;\n const allOfResourceType = this.$rootGetters['cluster/all']( type );\n\n this.ownersByType[kind].forEach((resource, idx) => {\n const resourceInstance = allOfResourceType.find((resourceByType) => resourceByType?.metadata?.uid === resource.uid);\n\n if (resourceInstance) {\n owners.push(resourceInstance);\n }\n });\n }\n }\n\n return owners;\n }\n\n get details() {\n return this._details;\n }\n\n get _details() {\n const details = [];\n\n if (this.owners?.length > 0) {\n details.push({\n label: this.t('resourceDetail.detailTop.ownerReferences', { count: this.owners.length }),\n formatter: 'ListLinkDetail',\n content: this.owners.map((owner) => ({\n key: owner.id,\n row: owner,\n col: {},\n value: owner.metadata.name\n }))\n });\n }\n\n if (get(this, 'metadata.deletionTimestamp')) {\n details.push({\n label: this.t('resourceDetail.detailTop.deleted'),\n formatter: 'LiveDate',\n formatterOpts: { addSuffix: true },\n content: get(this, 'metadata.deletionTimestamp')\n });\n }\n\n return details;\n }\n\n get t() {\n return this.$rootGetters['i18n/t'];\n }\n\n // Returns array of MODELS that own this resource (async, network call)\n findOwners() {\n return this._getRelationship('owner', 'from');\n }\n\n // Returns array of {type, namespace, id} objects that own this resource (sync)\n getOwners() {\n return this._getRelationship('owner', 'from');\n }\n\n findOwned() {\n return this._findRelationship('owner', 'to');\n }\n\n _relationshipsFor(rel, direction) {\n const out = { selectors: [], ids: [] };\n\n if ( !this.metadata?.relationships?.length ) {\n return out;\n }\n\n for ( const r of this.metadata.relationships ) {\n if ( rel !== 'any' && r.rel !== rel ) {\n continue;\n }\n\n if ( !r[`${ direction }Type`] ) {\n continue;\n }\n\n if ( r.selector ) {\n addObjects(out.selectors, {\n type: r.toType,\n namespace: r.toNamespace,\n selector: r.selector\n });\n } else {\n const type = r[`${ direction }Type`];\n let namespace = r[`${ direction }Namespace`];\n let name = r[`${ direction }Id`];\n\n if ( !namespace && name.includes('/') ) {\n const idx = name.indexOf('/');\n\n namespace = name.substr(0, idx);\n name = name.substr(idx + 1);\n }\n\n const id = (namespace ? `${ namespace }/` : '') + name;\n\n addObject(out.ids, {\n type,\n namespace,\n name,\n id,\n });\n }\n }\n\n return out;\n }\n\n _getRelationship(rel, direction) {\n const res = this._relationshipsFor(rel, direction);\n\n if ( res.selectors?.length ) {\n // eslint-disable-next-line no-console\n console.warn('Sync request for a relationship that is a selector');\n }\n\n return res.ids || [];\n }\n\n async _findRelationship(rel, direction) {\n const { selectors, ids } = this._relationshipsFor(rel, direction);\n const out = [];\n\n for ( const sel of selectors ) {\n const matching = await this.$dispatch('findMatching', sel);\n\n addObjects(out, matching.data);\n }\n\n for ( const obj of ids ) {\n const { type, id } = obj;\n let matching = this.$getters['byId'](type, id);\n\n if ( !matching ) {\n try {\n matching = await this.$dispatch('find', { type, id });\n } catch {\n }\n }\n if (matching) {\n addObject(out, matching);\n }\n }\n\n return out;\n }\n\n get shortId() {\n const splitId = this.id.split('/');\n\n return splitId.length > 1 ? splitId[1] : splitId[0];\n }\n\n toJSON() {\n const out = {};\n const keys = Object.keys(this);\n\n for ( const k of keys ) {\n if ( this[k]?.toJSON ) {\n out[k] = this[k].toJSON();\n } else {\n out[k] = clone(this[k]);\n }\n }\n\n return out;\n }\n\n /**\n * Allow models to override the object that is sent when saving this resource\n */\n toSave() {\n return undefined;\n }\n\n get creationTimestamp() {\n return this.metadata?.creationTimestamp;\n }\n\n /**\n * Allows model to specify JSON Paths that should be folded in the YAML editor by default\n */\n get yamlFolding() {\n return [];\n }\n}\n","import { ANNOTATIONS_TO_IGNORE_REGEX, LABELS_TO_IGNORE_REGEX } from '@shell/config/labels-annotations';\nimport omitBy from 'lodash/omitBy';\nimport pickBy from 'lodash/pickBy';\nimport Vue from 'vue';\nimport { matchesSomeRegex } from '@shell/utils/string';\nimport Resource from '@shell/plugins/dashboard-store/resource-class';\n\n// these are defined elsewhere in Steve models and will cause the error \"Cannot set property of [object Object] which has only a getter\" if defined at top-level\nexport function cleanHybridResources(data) {\n const potentialNormanHoldovers = ['state', 'name', 'description', 'labels', 'annotations'];\n\n potentialNormanHoldovers.forEach((key) => delete data[key]);\n\n return data;\n}\n\nexport default class HybridModel extends Resource {\n constructor(data, ctx, rehydrateNamespace = null, setClone = false) {\n const cleanedData = cleanHybridResources(data);\n\n super(cleanedData, ctx, rehydrateNamespace, setClone);\n }\n\n get labels() {\n const all = this.metadata?.labels || {};\n\n return omitBy(all, (value, key) => {\n return matchesSomeRegex(key, LABELS_TO_IGNORE_REGEX);\n });\n }\n\n setLabels(val) {\n if ( !this.metadata ) {\n this.metadata = {};\n }\n\n const all = this.metadata.labels || {};\n const wasIgnored = pickBy(all, (value, key) => {\n return matchesSomeRegex(key, LABELS_TO_IGNORE_REGEX);\n });\n\n Vue.set(this.metadata, 'labels', { ...wasIgnored, ...val });\n }\n\n setLabel(key, val) {\n if ( val ) {\n if ( !this.metadata ) {\n this.metadata = {};\n }\n\n if ( !this.metadata.labels ) {\n this.metadata.labels = {};\n }\n\n Vue.set(this.metadata.labels, key, val);\n } else if ( this.metadata?.labels ) {\n Vue.set(this.metadata.labels, key, undefined);\n delete this.metadata.labels[key];\n }\n }\n\n get annotations() {\n const all = this.metadata?.annotations || {};\n\n return omitBy(all, (value, key) => {\n return matchesSomeRegex(key, ANNOTATIONS_TO_IGNORE_REGEX);\n });\n }\n\n setAnnotations(val) {\n if ( !this.metadata ) {\n this.metadata = {};\n }\n\n const all = this.metadata.annotations || {};\n const wasIgnored = pickBy(all, (value, key) => {\n return matchesSomeRegex(key, ANNOTATIONS_TO_IGNORE_REGEX);\n });\n\n Vue.set(this.metadata, 'annotations', { ...wasIgnored, ...val });\n }\n\n setAnnotation(key, val) {\n if ( val ) {\n if ( !this.metadata ) {\n this.metadata = {};\n }\n\n if ( !this.metadata.annotations ) {\n this.metadata.annotations = {};\n }\n\n Vue.set(this.metadata.annotations, key, val);\n } else if ( this.metadata?.annotations ) {\n Vue.set(this.metadata.annotations, key, undefined);\n delete this.metadata.annotations[key];\n }\n }\n\n get state() {\n return this.stateObj?.name || 'unknown';\n }\n}\n","import { DESCRIPTION } from '@shell/config/labels-annotations';\nimport HybridModel from './hybrid-class';\nimport { NEVER_ADD } from '@shell/utils/create-yaml';\nimport { deleteProperty } from '@shell/utils/object';\n\n// Some fields that are removed for YAML (NEVER_ADD) are required via API\nconst STEVE_ADD = [\n 'metadata.resourceVersion',\n 'metadata.fields',\n 'metadata.clusterName',\n 'metadata.deletionGracePeriodSeconds',\n 'metadata.generateName',\n];\nconst STEVE_NEVER_SAVE = NEVER_ADD.filter((na) => !STEVE_ADD.includes(na));\n\nexport default class SteveModel extends HybridModel {\n get name() {\n return this.metadata?.name || this._name;\n }\n\n get namespace() {\n return this.metadata?.namespace;\n }\n\n get description() {\n return this.metadata?.annotations?.[DESCRIPTION] || this.spec?.description || this._description;\n }\n\n /**\n * Set description based on the type of model available with private fallback\n */\n set description(value) {\n if (this.metadata?.annotations) {\n this.metadata.annotations[DESCRIPTION] = value;\n }\n\n if (this.spec) {\n this.spec.description = value;\n }\n\n this._description = value;\n }\n\n cleanForSave(data, forNew) {\n const val = super.cleanForSave(data);\n\n for (const field of STEVE_NEVER_SAVE) {\n deleteProperty(val, field);\n }\n\n return val;\n }\n}\n","export * from \"-!../../../../vue-style-loader/index.js??ref--10-oneOf-1-0!../../../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=1&id=940c6fb8&prod&lang=scss\"","var baseFor = require('./_baseFor'),\n castFunction = require('./_castFunction'),\n keysIn = require('./keysIn');\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nmodule.exports = forIn;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".manual-refresh[data-v-940c6fb8]{height:40px}.advanced-filter-group[data-v-940c6fb8]{position:relative;margin-left:10px}.advanced-filter-group .advanced-filter-container[data-v-940c6fb8]{position:absolute;top:38px;right:0;width:300px;border:1px solid var(--primary);background-color:var(--body-bg);padding:20px;z-index:2}.advanced-filter-group .advanced-filter-container .middle-block[data-v-940c6fb8]{display:flex;align-items:center;margin-top:20px}.advanced-filter-group .advanced-filter-container .middle-block span[data-v-940c6fb8]{margin-right:20px}.advanced-filter-group .advanced-filter-container .middle-block button[data-v-940c6fb8]{margin-left:20px}.advanced-filter-group .advanced-filter-container .bottom-block[data-v-940c6fb8]{display:flex;align-items:center;margin-top:40px;justify-content:space-between}.advanced-filters-applied[data-v-940c6fb8]{display:inline-flex;margin:0;padding:0;list-style:none;max-width:100%;flex-wrap:wrap;justify-content:flex-end}.advanced-filters-applied li[data-v-940c6fb8]{margin:0 20px 10px 0;padding:2px 5px;border:1px solid;display:flex;align-items:center;position:relative;height:20px}.advanced-filters-applied li[data-v-940c6fb8]:nth-child(4n+1){border-color:var(--success)}.advanced-filters-applied li:nth-child(4n+1) .bg[data-v-940c6fb8]{background-color:var(--success)}.advanced-filters-applied li[data-v-940c6fb8]:nth-child(4n+2){border-color:var(--warning)}.advanced-filters-applied li:nth-child(4n+2) .bg[data-v-940c6fb8]{background-color:var(--warning)}.advanced-filters-applied li[data-v-940c6fb8]:nth-child(4n+3){border-color:var(--info)}.advanced-filters-applied li:nth-child(4n+3) .bg[data-v-940c6fb8]{background-color:var(--info)}.advanced-filters-applied li[data-v-940c6fb8]:nth-child(4n+4){border-color:var(--error)}.advanced-filters-applied li:nth-child(4n+4) .bg[data-v-940c6fb8]{background-color:var(--error)}.advanced-filters-applied li .bg[data-v-940c6fb8]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.2;z-index:-1}.advanced-filters-applied li .label[data-v-940c6fb8]{margin-right:10px;font-size:11px}.advanced-filters-applied li .cross[data-v-940c6fb8]{font-size:12px;font-weight:700;cursor:pointer}td .actions.role-multi-action[data-v-940c6fb8]{background-color:transparent;border:none}td .actions.role-multi-action[data-v-940c6fb8]:focus,td .actions.role-multi-action[data-v-940c6fb8]:hover{background-color:var(--accent-btn);box-shadow:none}@media only screen and (max-width:480px){td.desktop[data-v-940c6fb8],td.laptop[data-v-940c6fb8],td.tablet[data-v-940c6fb8]{display:none}}@media only screen and (max-width:992px){td.desktop[data-v-940c6fb8],td.laptop[data-v-940c6fb8]{display:none}}@media only screen and (max-width:1281px){td.desktop[data-v-940c6fb8]{display:none}}tr td div.data-loading[data-v-940c6fb8]{align-items:center;display:flex;justify-content:center;padding:20px 0}tr td div.data-loading>i[data-v-940c6fb8]{font-size:20px;height:20px;margin-right:5px;width:20px}.search-box[data-v-940c6fb8]{height:40px;margin-left:10px;min-width:180px}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","export type GC_PREFERENCES = {\n enabled: boolean,\n enabledInterval: boolean,\n interval: number,\n enabledOnNavigate: boolean,\n ageThreshold: number,\n countThreshold: number\n}\n\nexport const GC_DEFAULTS: GC_PREFERENCES = {\n enabled: false,\n\n // When GC Runs\n enabledInterval: true,\n interval: 1 * 60 * 5,\n enabledOnNavigate: true,\n\n // How GC handles resources when GC'ing\n ageThreshold: 1 * 60 * 2,\n countThreshold: 500,\n};\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".manual-refresh i[data-v-5ad06a13]{margin:0 0 0 8px!important;font-size:1rem!important}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".delete-warning[data-v-3a26ac99]{color:var(--error)}.remove-project-dialog[data-v-3a26ac99]{border:1px solid var(--border);padding:10px;border-radius:5px}.remove-project-dialog .display-name[data-v-3a26ac99]{font-weight:700}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.globalrole.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.globalrole.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./management.cattle.io.globalrole.vue?vue&type=template&id=effd72b0&scoped=true\"\nimport script from \"./management.cattle.io.globalrole.vue?vue&type=script&lang=js\"\nexport * from \"./management.cattle.io.globalrole.vue?vue&type=script&lang=js\"\nimport style0 from \"./management.cattle.io.globalrole.vue?vue&type=style&index=0&id=effd72b0&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"effd72b0\",\n null\n \n)\n\nexport default component.exports","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".app-launcher-card[data-v-6e6b3554] .card-body{overflow:hidden!important}.icon-button[data-v-6e6b3554]{cursor:pointer}.icon-button[data-v-6e6b3554],.icon-only[data-v-6e6b3554]{background:none;border:none;padding:0;color:var(--primary);font-size:1.8rem;margin-right:1rem}.icon-only[data-v-6e6b3554]{margin-top:.5rem}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","export * from \"-!../../../../vue-style-loader/index.js??ref--10-oneOf-1-0!../../../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./Card.vue?vue&type=style&index=0&id=6b7b8e40&prod&lang=scss\"","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../@vue/cli-service/node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".filter-select .vs__selected-options .vs__selected{text-align:left}.sortable-table{border-collapse:collapse;min-width:400px;border-radius:5px 5px 0 0;outline:1px solid var(--border);overflow:hidden;background:var(--sortable-table-bg);border-radius:4px}.sortable-table.overflow-x{overflow-x:visible}.sortable-table.overflow-y{overflow-y:visible}.sortable-table td{padding:8px 5px;border:0}.sortable-table td:first-child{padding-left:10px}.sortable-table td:last-child{padding-right:10px}.sortable-table td.row-check{padding-top:12px}.sortable-table tbody tr{border-bottom:1px solid var(--sortable-table-top-divider);background-color:var(--sortable-table-row-bg)}.sortable-table tbody tr.main-row.has-sub-row{border-bottom:0}.sortable-table tbody tr.main-row:not(.row-selected):hover+.sub-row{background-color:var(--sortable-table-hover-bg)}.sortable-table tbody tr:last-of-type{border-bottom:0}.sortable-table tbody tr.sub-row-hovered,.sortable-table tbody tr:hover{background-color:var(--sortable-table-hover-bg)}.sortable-table tbody tr.state-description>td{font-size:13px;padding-top:0;overflow-wrap:anywhere}.sortable-table tbody tr.active-row{color:var(--sortable-table-header-bg)}.sortable-table tbody tr.row-selected{background:var(--sortable-table-selected-bg)}.sortable-table tbody .no-rows td{padding:30px 0;text-align:center}.sortable-table tbody .no-results:hover,.sortable-table tbody .no-rows:hover{background-color:var(--body-bg)}.sortable-table tbody.group:before{content:\\\"\\\";display:block;height:20px;background-color:transparent}.sortable-table tbody tr.group-row{background-color:initial}.sortable-table tbody tr.group-row:first-child{border-bottom:2px solid var(--sortable-table-row-bg)}.sortable-table tbody tr.group-row:not(:first-child){margin-top:20px}.sortable-table tbody tr.group-row td{padding:0}.sortable-table tbody tr.group-row td:first-of-type{border-left:1px solid var(--sortable-table-accent-bg)}.sortable-table tbody tr.group-row .group-tab{height:40px;line-height:40px;padding:0 10px;border-radius:4px 4px 0 0;background-color:var(--sortable-table-row-bg);position:relative;top:1px;display:inline-block;z-index:10;min-width:72px}.sortable-table tbody tr.group-row .group-tab:after,.sortable-table tbody tr.group-row .group-tab:before{content:\\\" \\\";display:table}.sortable-table tbody tr.group-row .group-tab:after{clear:both}.sortable-table tbody tr.group-row .group-tab>SPAN{color:var(--sortable-table-group-label)}.sortable-table tbody tr.group-row .group-tab:after{height:40px;width:70px;border-radius:5px 5px 0 0;background-color:var(--sortable-table-row-bg);content:\\\"\\\";position:absolute;right:-15px;top:0;transform:skewX(40deg);z-index:-1}.for-inputs TABLE.sortable-table{width:100%;border-collapse:collapse;margin-bottom:10px}.for-inputs TABLE.sortable-table>TBODY>TR>TD,.for-inputs TABLE.sortable-table>THEAD>TR>TH{padding-right:10px;padding-bottom:10px}.for-inputs TABLE.sortable-table>TBODY>TR>TD:last-of-type,.for-inputs TABLE.sortable-table>THEAD>TR>TH:last-of-type{padding-right:0}.for-inputs TABLE.sortable-table>TBODY>TR:first-of-type>TD{padding-top:10px}.for-inputs TABLE.sortable-table>TBODY>TR:last-of-type>TD{padding-bottom:0}.for-inputs.clone TABLE.sortable-table>THEAD>TR>TH,.for-inputs.create TABLE.sortable-table>THEAD>TR>TH,.for-inputs.edit TABLE.sortable-table>THEAD>TR>TH{border-color:transparent}.sortable-table-header{position:relative;z-index:11}.sortable-table-header.titled{display:flex;align-items:center}.fixed-header-actions.button{grid-template-columns:[bulk] auto [middle] min-content [search] minmax(min-content,350px)}.fixed-header-actions{padding:0 0 20px 0;width:100%;z-index:11;background:transparent;display:grid;grid-template-columns:[bulk] auto [middle] min-content [search] minmax(min-content,200px);grid-column-gap:10px}.fixed-header-actions.advanced-filtering{grid-template-columns:[bulk] auto [middle] minmax(min-content,auto) [search] minmax(min-content,auto)}.fixed-header-actions .bulk{grid-area:bulk}.fixed-header-actions .bulk>BUTTON{display:none}.fixed-header-actions .bulk>BUTTON:not(:last-of-type){margin-right:10px}.fixed-header-actions .bulk .action-availability{display:none;margin-left:10px;vertical-align:middle;margin-top:2px}.fixed-header-actions .bulk .dropdown-button li.disabled{color:var(--disabled-text);cursor:not-allowed}.fixed-header-actions .bulk .dropdown-button li.disabled:hover{color:var(--disabled-text);background-color:unset;cursor:not-allowed}.fixed-header-actions .bulk .bulk-action .icon{vertical-align:-10%}.fixed-header-actions .middle{grid-area:middle;white-space:nowrap}.fixed-header-actions .middle .icon.icon-backup.animate{animation-name:spin;animation-duration:1s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fixed-header-actions .search{grid-area:search;text-align:right;justify-content:flex-end}.fixed-header-actions .bulk-actions-dropdown{display:none}.fixed-header-actions .bulk-actions-dropdown .dropdown-button{background-color:var(--primary)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button:hover{background-color:var(--primary-hover-bg);color:var(--primary-hover-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button .icon-chevron-down,.fixed-header-actions .bulk-actions-dropdown .dropdown-button>*{color:var(--primary-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button .button-divider{border-color:var(--primary-text)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled{border-color:var(--disabled-bg)}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled .icon-chevron-down{color:var(--disabled-text)!important}.fixed-header-actions .bulk-actions-dropdown .dropdown-button.disabled .button-divider{border-color:var(--disabled-text)}.paging{margin-top:10px;text-align:center}.paging SPAN{display:inline-block;min-width:200px}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n basePickBy = require('./_basePickBy'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nmodule.exports = pickBy;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseUniq = require('./_baseUniq');\n\n/**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\nfunction baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n}\n\nmodule.exports = baseXor;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","export * from \"-!../../../../vue-style-loader/index.js??ref--10-oneOf-1-0!../../../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../../@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../../postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../../sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../../cache-loader/dist/cjs.js??ref--2-0!../../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=940c6fb8&prod&lang=scss&scoped=true\"","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","// Settings\nimport { GC_DEFAULTS, GC_PREFERENCES } from '@shell/utils/gc/gc-types';\n\ninterface GlobalSettingRuleset {\n name: string,\n key?: string | number,\n factoryArg?: string | number | (string | number)[]\n}\n\ninterface GlobalSetting {\n [key: string]: {\n alias?: string,\n canReset?: boolean,\n customFormatter?: string,\n from?: string,\n kind?: string,\n options?: string[]\n readOnly?: boolean,\n /**\n * Function used from the form validation\n */\n ruleSet?: GlobalSettingRuleset[],\n };\n}\n\n// Adapted from: https://github.com/rancher/ui/blob/08c379a9529f740666a704b52522a468986c3520/lib/shared/addon/utils/constants.js#L564\n// Setting IDs\nexport const SETTING = {\n VERSION_RANCHER: 'server-version',\n VERSION_CLI: 'cli-version',\n VERSION_MACHINE: 'machine-version',\n VERSION_HELM: 'helm-version',\n CLI_URL: {\n DARWIN: 'cli-url-darwin',\n WINDOWS: 'cli-url-windows',\n LINUX: 'cli-url-linux',\n },\n API_HOST: 'api-host',\n CA_CERTS: 'cacerts',\n\n // Allow the local cluster to be hidden\n HIDE_LOCAL_CLUSTER: 'hide-local-cluster',\n AUTH_TOKEN_MAX_TTL_MINUTES: 'auth-token-max-ttl-minutes',\n KUBECONFIG_GENERATE_TOKEN: 'kubeconfig-generate-token',\n KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES: 'kubeconfig-default-token-ttl-minutes',\n ENGINE_URL: 'engine-install-url',\n ENGINE_ISO_URL: 'engine-iso-url',\n FIRST_LOGIN: 'first-login',\n INGRESS_IP_DOMAIN: 'ingress-ip-domain',\n SERVER_URL: 'server-url',\n RKE_METADATA_CONFIG: 'rke-metadata-config',\n TELEMETRY: 'telemetry-opt',\n EULA_AGREED: 'eula-agreed',\n AUTH_USER_INFO_MAX_AGE_SECONDS: 'auth-user-info-max-age-seconds',\n AUTH_USER_SESSION_TTL_MINUTES: 'auth-user-session-ttl-minutes',\n AUTH_USER_INFO_RESYNC_CRON: 'auth-user-info-resync-cron',\n AUTH_LOCAL_VALIDATE_DESC: 'auth-password-requirements-description',\n PASSWORD_MIN_LENGTH: 'password-min-length', // CATTLE_PASSWORD_MIN_LENGTH\n CLUSTER_TEMPLATE_ENFORCEMENT: 'cluster-template-enforcement',\n UI_INDEX: 'ui-index',\n UI_DASHBOARD_INDEX: 'ui-dashboard-index',\n UI_DASHBOARD_HARVESTER_LEGACY_PLUGIN: 'ui-dashboard-harvester-legacy-plugin',\n UI_OFFLINE_PREFERRED: 'ui-offline-preferred',\n SYSTEM_DEFAULT_REGISTRY: 'system-default-registry',\n UI_ISSUES: 'ui-issues',\n PL: 'ui-pl',\n PL_RANCHER_VALUE: 'rancher',\n SUPPORTED: 'has-support',\n BANNERS: 'ui-banners',\n ISSUES: 'ui-issues',\n BRAND: 'ui-brand',\n LOGO_LIGHT: 'ui-logo-light',\n LOGO_DARK: 'ui-logo-dark',\n PRIMARY_COLOR: 'ui-primary-color',\n LINK_COLOR: 'ui-link-color',\n COMMUNITY_LINKS: 'ui-community-links',\n FAVICON: 'ui-favicon',\n UI_PERFORMANCE: 'ui-performance',\n UI_CUSTOM_LINKS: 'ui-custom-links',\n UI_SUPPORTED_K8S_VERSIONS: 'ui-k8s-supported-versions-range',\n /**\n * Allow the backend to force a light/dark theme. Used in non-rancher world and results in the theme used\n * both pre and post log in. If not present defaults to the usual process\n */\n THEME: 'ui-theme',\n SYSTEM_NAMESPACES: 'system-namespaces',\n /**\n * Cluster Agent configuration\n */\n CLUSTER_AGENT_DEFAULT_AFFINITY: 'cluster-agent-default-affinity',\n FLEET_AGENT_DEFAULT_AFFINITY: 'fleet-agent-default-affinity',\n /**\n * manage rancher repositories in extensions (official, partners repos)\n */\n ADD_EXTENSION_REPOS_BANNER_DISPLAY: 'display-add-extension-repos-banner'\n};\n\n// These are the settings that are allowed to be edited via the UI\nexport const ALLOWED_SETTINGS: GlobalSetting = {\n [SETTING.CA_CERTS]: { kind: 'multiline', readOnly: true },\n [SETTING.ENGINE_URL]: {},\n [SETTING.ENGINE_ISO_URL]: {},\n [SETTING.PASSWORD_MIN_LENGTH]: {\n kind: 'integer',\n ruleSet: [\n {\n name: 'betweenValues',\n key: 'Password',\n factoryArg: [2, 256]\n },\n {\n name: 'isInteger',\n key: 'Password',\n },\n {\n name: 'isPositive',\n key: 'Password',\n },\n {\n name: 'isOctal',\n key: 'Password',\n }\n ],\n },\n [SETTING.INGRESS_IP_DOMAIN]: {},\n [SETTING.AUTH_USER_INFO_MAX_AGE_SECONDS]: {},\n [SETTING.AUTH_USER_SESSION_TTL_MINUTES]: {},\n [SETTING.AUTH_TOKEN_MAX_TTL_MINUTES]: {},\n [SETTING.KUBECONFIG_GENERATE_TOKEN]: { kind: 'boolean' },\n [SETTING.KUBECONFIG_DEFAULT_TOKEN_TTL_MINUTES]: { kind: 'integer' },\n [SETTING.AUTH_USER_INFO_RESYNC_CRON]: {},\n [SETTING.SERVER_URL]: { kind: 'url', canReset: true },\n [SETTING.RKE_METADATA_CONFIG]: { kind: 'json' },\n [SETTING.SYSTEM_DEFAULT_REGISTRY]: {},\n [SETTING.UI_INDEX]: {},\n [SETTING.UI_DASHBOARD_INDEX]: {},\n [SETTING.UI_OFFLINE_PREFERRED]: {\n kind: 'enum',\n options: ['dynamic', 'true', 'false']\n },\n [SETTING.BRAND]: { canReset: true },\n [SETTING.CLUSTER_TEMPLATE_ENFORCEMENT]: { kind: 'boolean' },\n [SETTING.TELEMETRY]: {\n kind: 'enum',\n options: ['prompt', 'in', 'out']\n },\n [SETTING.HIDE_LOCAL_CLUSTER]: { kind: 'boolean' },\n};\n\n/**\n * Settings on how to handle warnings returning in api responses, specifically which to show as growls\n */\nexport interface PerfSettingsWarningHeaders {\n /**\n * Warning is a string containing multiple entries. This determines how they are split up\n *\n * See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1693-warnings#design-details\n */\n separator: string,\n /**\n * Show warnings in a notification if they're not in this block list\n */\n notificationBlockList: string[]\n}\n\nexport interface PerfSettingsKubeApi {\n /**\n * Settings related to the response header `warnings` value\n */\n warningHeader: PerfSettingsWarningHeaders\n}\n\nexport interface PerfSettings {\n inactivity: {\n enabled: boolean;\n threshold: number;\n };\n incrementalLoading: {\n enabled: boolean;\n threshold: number;\n };\n manualRefresh: {};\n disableWebsocketNotification: boolean;\n garbageCollection: GC_PREFERENCES;\n forceNsFilterV2: any;\n advancedWorker: {};\n kubeAPI: PerfSettingsKubeApi;\n}\n\nexport const DEFAULT_PERF_SETTING: PerfSettings = {\n inactivity: {\n enabled: false,\n threshold: 900,\n },\n incrementalLoading: {\n enabled: true,\n threshold: 1500,\n },\n manualRefresh: {\n enabled: false,\n threshold: 1500,\n },\n disableWebsocketNotification: true,\n garbageCollection: GC_DEFAULTS,\n forceNsFilterV2: { enabled: false },\n advancedWorker: { enabled: false },\n kubeAPI: {\n /**\n * Settings related to the response header `warnings` value\n */\n warningHeader: {\n /**\n * Warning is a string containing multiple entries. This determines how they are split up\n *\n * See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1693-warnings#design-details\n */\n separator: '299 - ',\n /**\n * Show warnings in a notification if they're not in this block list\n */\n notificationBlockList: ['299 - unknown field']\n }\n }\n};\n","import { IPlugin } from '@shell/core/types';\nimport { PRODUCT_NAME, BLANK_CLUSTER } from './config/app-launcher';\n// import { MAIN_APP_LAUNCHER_LOCATION } from './routing/extension-routing';\n\nexport function init($plugin: IPlugin, store: any) {\n const { product } = $plugin.DSL(store, PRODUCT_NAME);\n\n // registering a top-level product\n product({\n category: 'global',\n icon: 'apps',\n inStore: 'management',\n weight: 100,\n to: {\n name: `${ PRODUCT_NAME }-c-cluster`,\n path: `/${ PRODUCT_NAME }/c/:cluster/dashboard`,\n params: {\n product: PRODUCT_NAME,\n cluster: BLANK_CLUSTER,\n pkg: PRODUCT_NAME\n }\n },\n });\n}\n","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.roletemplate.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../cache-loader/dist/cjs.js??ref--14-0!../../../thread-loader/dist/cjs.js!../../../babel-loader/lib/index.js!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.roletemplate.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./management.cattle.io.roletemplate.vue?vue&type=template&id=5050d908&scoped=true\"\nimport script from \"./management.cattle.io.roletemplate.vue?vue&type=script&lang=js\"\nexport * from \"./management.cattle.io.roletemplate.vue?vue&type=script&lang=js\"\nimport style0 from \"./management.cattle.io.roletemplate.vue?vue&type=style&index=0&id=5050d908&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5050d908\",\n null\n \n)\n\nexport default component.exports","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","export * from \"-!../../../vue-style-loader/index.js??ref--10-oneOf-1-0!../../../@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../../@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../postcss-loader/src/index.js??ref--10-oneOf-1-2!../../../postcss-loader/src/index.js??ref--10-oneOf-1-3!../../../sass-loader/dist/cjs.js??ref--10-oneOf-1-4!../../../cache-loader/dist/cjs.js??ref--2-0!../../../@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./management.cattle.io.project.vue?vue&type=style&index=0&id=3a26ac99&prod&lang=scss&scoped=true\"","// style-loader: Adds some css to the DOM by adding a