inferyx-codegate 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. codegate/__init__.py +8 -0
  2. codegate/__main__.py +3 -0
  3. codegate/api/__init__.py +0 -0
  4. codegate/api/admin.py +457 -0
  5. codegate/api/deps.py +36 -0
  6. codegate/api/devproxy.py +132 -0
  7. codegate/api/public.py +371 -0
  8. codegate/app.py +115 -0
  9. codegate/auth/__init__.py +0 -0
  10. codegate/auth/csrf.py +43 -0
  11. codegate/auth/native.py +111 -0
  12. codegate/auth/passwords.py +88 -0
  13. codegate/auth/saml.py +222 -0
  14. codegate/auth/sessions.py +121 -0
  15. codegate/cli/__init__.py +0 -0
  16. codegate/cli/auth_cmd.py +168 -0
  17. codegate/cli/backup_cmd.py +114 -0
  18. codegate/cli/common.py +103 -0
  19. codegate/cli/doctor_cmd.py +136 -0
  20. codegate/cli/main.py +526 -0
  21. codegate/cli/nginx_setup.py +220 -0
  22. codegate/cli/setup_cmd.py +401 -0
  23. codegate/cli/ssh_setup.py +114 -0
  24. codegate/cli/upgrade_cmd.py +209 -0
  25. codegate/config.py +161 -0
  26. codegate/db.py +297 -0
  27. codegate/errors.py +122 -0
  28. codegate/jobs.py +133 -0
  29. codegate/pages.py +177 -0
  30. codegate/resources/__init__.py +20 -0
  31. codegate/resources/docker/Dockerfile +36 -0
  32. codegate/resources/nginx/codegate.conf.tmpl +51 -0
  33. codegate/resources/nginx/map.conf +5 -0
  34. codegate/resources/nginx/site.conf.tmpl +9 -0
  35. codegate/resources/nginx/user.conf.tmpl +19 -0
  36. codegate/resources/systemd/codegate-backup.service.tmpl +7 -0
  37. codegate/resources/systemd/codegate-backup.timer +10 -0
  38. codegate/resources/systemd/codegate.service.tmpl +20 -0
  39. codegate/static/admin/3rdpartylicenses.txt +614 -0
  40. codegate/static/admin/chunk-0r_p7pcB.js +672 -0
  41. codegate/static/admin/chunk-BoGqYCjO.js +1260 -0
  42. codegate/static/admin/chunk-BqiJ460N.js +1269 -0
  43. codegate/static/admin/chunk-BtoaIoDj.js +449 -0
  44. codegate/static/admin/chunk-CB4E-q63.js +255 -0
  45. codegate/static/admin/chunk-CMN75K3s.js +181 -0
  46. codegate/static/admin/chunk-CW_CPa20.js +106 -0
  47. codegate/static/admin/chunk-CcgsCK7w.js +393 -0
  48. codegate/static/admin/chunk-Cjwyuum6.js +375 -0
  49. codegate/static/admin/chunk-D6j6hnz3.js +1 -0
  50. codegate/static/admin/chunk-D9RytJgO.js +1 -0
  51. codegate/static/admin/chunk-DA6TldFU.js +35 -0
  52. codegate/static/admin/chunk-DFGdyoNb.js +1 -0
  53. codegate/static/admin/chunk-DXvCZ3pT.js +1 -0
  54. codegate/static/admin/chunk-DstgVdtz.js +27 -0
  55. codegate/static/admin/chunk-kPDFCwHP.js +102 -0
  56. codegate/static/admin/chunk-yikJ2ObQ.js +1 -0
  57. codegate/static/admin/favicon.ico +0 -0
  58. codegate/static/admin/index.html +14 -0
  59. codegate/static/admin/main-LWBML7JF.js +2347 -0
  60. codegate/static/admin/media/material-icons-JLIDJUWE.woff +0 -0
  61. codegate/static/admin/media/material-icons-LEZCGFVT.woff2 +0 -0
  62. codegate/static/admin/styles-YWRWGLKG.css +1 -0
  63. codegate/system/__init__.py +27 -0
  64. codegate/system/base.py +165 -0
  65. codegate/system/devdocker.py +90 -0
  66. codegate/system/fake.py +199 -0
  67. codegate/system/real.py +493 -0
  68. codegate/system/shell.py +40 -0
  69. codegate/users.py +262 -0
  70. codegate/workspace.py +355 -0
  71. inferyx_codegate-1.1.0.dist-info/METADATA +217 -0
  72. inferyx_codegate-1.1.0.dist-info/RECORD +74 -0
  73. inferyx_codegate-1.1.0.dist-info/WHEEL +4 -0
  74. inferyx_codegate-1.1.0.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,375 @@
1
+ import{$n as eC,$r as yC,An as Yo,Ar as oe,Bn as ab,Br as sb,C as G,Cn as Wn$1,Cr as ma$1,Dn as Xs,Dr as no,Dt as Hw,En as Xi,Er as nn$1,Ft as Ko,G as kt,Gr as wS,Gt as Nt,Hn as ae,Hr as tn,Ht as MS,In as _S,Ir as qr,Jn as cW,Kn as bS,Lt as Kz,Nn as Zy,Nt as Ke,Qn as db,Rr as rb,Rt as Lg,S as At,Sn as Wg,Sr as m,St as Gn$1,T as P,Tr as me,Vn as ad,Vr as sd,Vt as Lw,Wt as Mw,Xn as ct,Xr as xe,Yn as cb,Zn as dS,Zt as Oy,b as Ut,bn as Wd,bt as Fa,c as Xt,cn as Qy,d as ct$1,dn as Rg,dr as ib,ei as yI,er as en,f as de,fr as id,h as on$1,hn as Uw,hr as jg,i as In$1,ii as zw,in as QT,ir as g,jn as Ys,jt as Jt,kn as Ye,kr as od,kt as Ip,lt as Bv,mn as Ug,n as Fn$1,nn as Pp,o as Rn$1,on as Qg,or as gI,ot as Aw,pn as Te,qr as wp,r as He,ri as zo,rt as $r,sn as Qo,sr as gT,st as B,t as $t,tr as fe,u as an$1,ur as i8,ut as CS,v as zt,vr as jw,w as Ot,wt as Gy,x as ue,xt as Gg,y as pt,yr as ke,yt as F3,zn as aW,zr as s8}from"./main-LWBML7JF.js";import{a as L,c as Qt,d as Wt,f as jt,i as It$1,l as Ut$1,n as Bt,o as Lt,p as zt$1,r as Ht,s as Pt,t as At$1,u as Vt}from"./chunk-CMN75K3s.js";import{t as v}from"./chunk-DFGdyoNb.js";import{n as j,t as L$1}from"./chunk-CB4E-q63.js";import{a as Pt$1,c as zt$2,i as Lt$1,n as Ft,o as ba,r as G$1,s as ve,t as Et}from"./chunk-0r_p7pcB.js";import{a as l,i,o as s,r as g$1,t as c}from"./chunk-D6j6hnz3.js";import{n as ke$1,t as ie}from"./chunk-BtoaIoDj.js";import"./chunk-DA6TldFU.js";import{n as Pe,t as Be}from"./chunk-DstgVdtz.js";import{c as Ve,d as Xt$1,f as bn,h as vn,o as Qr,r as Ce,s as Qt$1,t as Be$1,u as Xr}from"./chunk-BoGqYCjO.js";import{n as _t,t as Vt$1}from"./chunk-CW_CPa20.js";var nn=new g(`MAT_SORT_DEFAULT_OPTIONS`);var Dt=(()=>{class e{_defaultOptions;_initializedStream=new no(1);sortables=/* @__PURE__ */ new Map;_stateChanges=new B;active;start=`asc`;get direction(){return this._direction}set direction(t){this._direction=t}_direction=``;disableClear;disabled=!1;sortChange=new me;initialized=this._initializedStream;constructor(t){this._defaultOptions=t}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return``;let n=t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear,a=un(t.start||this.start,n),r=a.indexOf(this.direction)+1;return r>=a.length&&(r=0),a[r]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static ɵfac=function(n){return new(n||e)(Jt(nn,8))};static ɵdir=xe({type:e,selectors:[[``,`matSort`,``]],hostAttrs:[1,`mat-sort`],inputs:{active:[0,`matSortActive`,`active`],start:[0,`matSortStart`,`start`],direction:[0,`matSortDirection`,`direction`],disableClear:[2,`matSortDisableClear`,`disableClear`,Ke],disabled:[2,`matSortDisabled`,`disabled`,Ke]},outputs:{sortChange:`matSortChange`},exportAs:[`matSort`],features:[Xs]})}return e})();function un(e,l){let t=[`asc`,`desc`];return e==`desc`&&t.reverse(),l||t.push(``),t}var an=(()=>{class e{_sort=m(Dt,{optional:!0});_columnDef=m(L,{optional:!0});_changeDetectorRef=m(eC);_focusMonitor=m(Fa);_elementRef=m(oe);_ariaDescriber=m(Kz,{optional:!0});_renderChanges;_animationsDisabled=qr();_recentlyCleared=ke(null);_sortButton;id;arrowPosition=`after`;start;disabled=!1;get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}_sortActionDescription=`Sort`;disableClear;constructor(){m(Nt).load(Gy);let t=m(nn,{optional:!0});this._sort,t?.arrowPosition&&(this.arrowPosition=t?.arrowPosition)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._sort.register(this),this._renderChanges=Bv(this._sort._stateChanges,this._sort.sortChange).subscribe(()=>this._changeDetectorRef.markForCheck()),this._sortButton=this._elementRef.nativeElement.querySelector(`.mat-sort-header-container`),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(()=>{Promise.resolve().then(()=>this._recentlyCleared.set(null))})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._renderChanges?.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_toggleOnInteraction(){if(!this._isDisabled()){let t=this._isSorted(),n=this._sort.direction;this._sort.sort(this),this._recentlyCleared.set(t&&!this._isSorted()?n:null)}}_handleKeydown(t){(t.keyCode===32||t.keyCode===13)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&(this._sort.direction===`asc`||this._sort.direction===`desc`)}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?this._sort.direction==`asc`?`ascending`:`descending`:`none`}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}static ɵfac=function(n){return new(n||e)};static ɵcmp=(function(){let t=[`*`,[[``,`matSortHeaderIcon`,``]]],n=[`*`,`[matSortHeaderIcon]`];function a(g,c){g&1&&(Pp(),en(0,`svg`,3),nn$1(1,`path`,4),tn())}function r(g,c){g&1&&(en(0,`div`,2),Ye(1,1,null,a,2,0),tn())}return Te({type:e,selectors:[[``,`mat-sort-header`,``]],hostAttrs:[1,`mat-sort-header`],hostVars:3,hostBindings:function(c,p){c&1&&Ug(`click`,function(){return p._toggleOnInteraction()})(`keydown`,function(mn){return p._handleKeydown(mn)})(`mouseleave`,function(){return p._recentlyCleared.set(null)}),c&2&&(Wn$1(`aria-sort`,p._getAriaSortAttribute()),ct(`mat-sort-header-disabled`,p._isDisabled()))},inputs:{id:[0,`mat-sort-header`,`id`],arrowPosition:`arrowPosition`,start:`start`,disabled:[2,`disabled`,`disabled`,Ke],sortActionDescription:`sortActionDescription`,disableClear:[2,`disableClear`,`disableClear`,Ke]},exportAs:[`matSortHeader`],ngContentSelectors:n,decls:4,vars:17,consts:[[1,`mat-sort-header-container`,`mat-focus-indicator`],[1,`mat-sort-header-content`],[1,`mat-sort-header-arrow`],[`viewBox`,`0 -960 960 960`,`focusable`,`false`,`aria-hidden`,`true`],[`d`,`M440-240v-368L296-464l-56-56 240-240 240 240-56 56-144-144v368h-80Z`]],template:function(c,p){c&1&&(Gn$1(t),en(0,`div`,0)(1,`div`,1),Ye(2),tn(),Yo(3,r,3,0,`div`,2),tn()),c&2&&(ct(`mat-sort-header-sorted`,p._isSorted())(`mat-sort-header-position-before`,p.arrowPosition===`before`)(`mat-sort-header-descending`,p._sort.direction===`desc`)(`mat-sort-header-ascending`,p._sort.direction===`asc`)(`mat-sort-header-recently-cleared-ascending`,p._recentlyCleared()===`asc`)(`mat-sort-header-recently-cleared-descending`,p._recentlyCleared()===`desc`)(`mat-sort-header-animations-disabled`,p._animationsDisabled),Wn$1(`tabindex`,p._isDisabled()?null:0)(`role`,p._isDisabled()?null:`button`),zo(3),Ko(p._renderArrow()?3:-1))},styles:[`.mat-sort-header {
2
+ cursor: pointer;
3
+ }
4
+
5
+ .mat-sort-header-disabled {
6
+ cursor: default;
7
+ }
8
+
9
+ .mat-sort-header-container {
10
+ display: flex;
11
+ align-items: center;
12
+ letter-spacing: normal;
13
+ outline: 0;
14
+ }
15
+ [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused .mat-sort-header-container {
16
+ border-bottom: var(--%NS%mat-focus-indicator-fallback-border-style, solid) 1px currentColor;
17
+ }
18
+ .mat-sort-header-container::before {
19
+ margin: calc(calc(var(--%NS%mat-focus-indicator-border-width, 3px) + 4px) * -1);
20
+ }
21
+
22
+ .mat-sort-header-content {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+
27
+ .mat-sort-header-position-before {
28
+ flex-direction: row-reverse;
29
+ }
30
+
31
+ @keyframes _mat-sort-header-recently-cleared-ascending {
32
+ from {
33
+ transform: translateY(0);
34
+ opacity: 1;
35
+ }
36
+ to {
37
+ transform: translateY(-25%);
38
+ opacity: 0;
39
+ }
40
+ }
41
+ @keyframes _mat-sort-header-recently-cleared-descending {
42
+ from {
43
+ transform: translateY(0) rotate(180deg);
44
+ opacity: 1;
45
+ }
46
+ to {
47
+ transform: translateY(25%) rotate(180deg);
48
+ opacity: 0;
49
+ }
50
+ }
51
+ .mat-sort-header-arrow {
52
+ height: 12px;
53
+ width: 12px;
54
+ position: relative;
55
+ transition: transform 225ms cubic-bezier(0.4, 0, 0.2, 1), opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
56
+ opacity: 0;
57
+ overflow: visible;
58
+ color: var(--%NS%mat-sort-arrow-color, var(--%NS%mat-sys-on-surface));
59
+ }
60
+ .mat-sort-header.cdk-keyboard-focused .mat-sort-header-arrow, .mat-sort-header.cdk-program-focused .mat-sort-header-arrow, .mat-sort-header:hover .mat-sort-header-arrow {
61
+ opacity: 0.54;
62
+ }
63
+ .mat-sort-header .mat-sort-header-sorted .mat-sort-header-arrow {
64
+ opacity: 1;
65
+ }
66
+ .mat-sort-header-descending .mat-sort-header-arrow {
67
+ transform: rotate(180deg);
68
+ }
69
+ .mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow {
70
+ transform: translateY(-25%);
71
+ }
72
+ .mat-sort-header-recently-cleared-ascending .mat-sort-header-arrow {
73
+ transition: none;
74
+ animation: _mat-sort-header-recently-cleared-ascending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
75
+ }
76
+ .mat-sort-header-recently-cleared-descending .mat-sort-header-arrow {
77
+ transition: none;
78
+ animation: _mat-sort-header-recently-cleared-descending 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
79
+ }
80
+ .mat-sort-header-animations-disabled .mat-sort-header-arrow {
81
+ transition-duration: 0ms;
82
+ animation-duration: 0ms;
83
+ }
84
+ .mat-sort-header-arrow > svg, .mat-sort-header-arrow [matSortHeaderIcon] {
85
+ width: 24px;
86
+ height: 24px;
87
+ fill: currentColor;
88
+ position: absolute;
89
+ top: 50%;
90
+ left: 50%;
91
+ margin: -12px 0 0 -12px;
92
+ transform: translateZ(0);
93
+ }
94
+ .mat-sort-header-arrow, [dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow {
95
+ margin: 0 0 0 6px;
96
+ }
97
+ .mat-sort-header-position-before .mat-sort-header-arrow, [dir=rtl] .mat-sort-header-arrow {
98
+ margin: 0 6px 0 0;
99
+ }
100
+ `],encapsulation:2})})()}return e})();var on=(()=>{class e{static ɵfac=function(n){return new(n||e)};static ɵmod=fe({type:e});static ɵinj=ae({imports:[$r]})}return e})();var rn=new g(`MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS`,{providedIn:`root`,factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})});var ln=new g(`MatButtonToggleGroup`);var yn={provide:de,useExisting:Xi(()=>It),multi:!0};var ft=class{source;value;constructor(l,t){this.source=l,this.value=t}};var It=(()=>{class e{_changeDetector=m(eC);_dir=m(gT,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=m(Wd).getId(`mat-button-toggle-group-`);vertical=!1;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(n=>n.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new me;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value===`rtl`?`rtl`:`ltr`}change=new me;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=m(rn,{optional:!0});this.appearance=t&&t.appearance?t.appearance:`standard`,this._hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this._hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new kt(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled||Oy(t))return;let a=t.target.id,r=this._buttonToggles.toArray().findIndex(c=>c.buttonId===a),g=null;switch(t.keyCode){case 32:case 13:g=this._buttonToggles.get(r)||null;break;case 38:g=this._getNextButton(r,-1);break;case 37:g=this._getNextButton(r,this.dir===`ltr`?-1:1);break;case 40:g=this._getNextButton(r,1);break;case 39:g=this._getNextButton(r,this.dir===`ltr`?1:-1);break;default:return}g&&(t.preventDefault(),g._onButtonClick(),g.focus())}_emitChangeEvent(t){let n=new ft(t,this.value);this._rawValue=n.value,this._controlValueAccessorChangeFn(n.value),this.change.emit(n)}_syncButtonToggle(t,n,a=!1,r=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?n?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then(()=>this._updateModelValue(t,a)):this._updateModelValue(t,a)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>`u`?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(n=>t.value!=null&&n===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let n=this._buttonToggles.get(t);if(!n.disabled){n.tabIndex=0;break}}}_getNextButton(t,n){let a=this._buttonToggles;for(let r=1;r<=a.length;r++){let g=(t+n*r+a.length)%a.length,c=a.get(g);if(c&&!c.disabled)return c}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let n=this._buttonToggles.toArray();if(this.multiple&&t?(this._clearSelection(),t.forEach(a=>this._selectValue(a,n))):(this._clearSelection(),this._selectValue(t,n)),!this.multiple&&n.every(a=>a.tabIndex===-1)){for(let a of n)if(!a.disabled){a.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,n){for(let a of n)if(a.value===t){a.checked=!0,this._selectionModel.select(a),this.multiple||(a.tabIndex=0);break}}_updateModelValue(t,n){n&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static ɵfac=function(n){return new(n||e)};static ɵdir=xe({type:e,selectors:[[`mat-button-toggle-group`]],contentQueries:function(n,a,r){if(n&1&&Wg(r,yt,5),n&2){let g;Hw(g=Uw())&&(a._buttonToggles=g)}},hostAttrs:[1,`mat-button-toggle-group`],hostVars:6,hostBindings:function(n,a){n&1&&Ug(`keydown`,function(g){return a._keydown(g)}),n&2&&(Wn$1(`role`,a.multiple?`group`:`radiogroup`)(`aria-disabled`,a.disabled),ct(`mat-button-toggle-vertical`,a.vertical)(`mat-button-toggle-group-appearance-standard`,a.appearance===`standard`))},inputs:{appearance:`appearance`,name:`name`,vertical:[2,`vertical`,`vertical`,Ke],value:`value`,multiple:[2,`multiple`,`multiple`,Ke],disabled:[2,`disabled`,`disabled`,Ke],disabledInteractive:[2,`disabledInteractive`,`disabledInteractive`,Ke],hideSingleSelectionIndicator:[2,`hideSingleSelectionIndicator`,`hideSingleSelectionIndicator`,Ke],hideMultipleSelectionIndicator:[2,`hideMultipleSelectionIndicator`,`hideMultipleSelectionIndicator`,Ke]},outputs:{valueChange:`valueChange`,change:`change`},exportAs:[`matButtonToggleGroup`],features:[db([yn,{provide:ln,useExisting:e}])]})}return e})();var yt=(()=>{class e{_changeDetectorRef=m(eC);_elementRef=m(oe);_focusMonitor=m(Fa);_idGenerator=m(Wd);_animationDisabled=qr();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(t){this._tabIndex.set(t)}_tabIndex;disableRipple=!1;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new me;constructor(){m(Nt).load(Gy);let t=m(ln,{optional:!0}),n=m(new ma$1(`tabindex`),{optional:!0})||``,a=m(rn,{optional:!0});this._tabIndex=ke(parseInt(n)||0),this.buttonToggleGroup=t,this._appearance=a&&a.appearance?a.appearance:`standard`,this._disabledInteractive=a?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId(`mat-button-toggle-`),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add(`mat-button-toggle-animations-enabled`),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let n=this.buttonToggleGroup._buttonToggles.find(a=>a.tabIndex===0);n&&(n.tabIndex=-1),this.tabIndex=0}this.change.emit(new ft(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static ɵfac=function(n){return new(n||e)};static ɵcmp=(function(){let t=[`button`],n=[`*`];function a(r,g){if(r&1&&(Ys(0,`div`,2),jg(1,`mat-pseudo-checkbox`,6),od()),r&2){let c=jw();zo(),Lg(`disabled`,c.disabled)}}return Te({type:e,selectors:[[`mat-button-toggle`]],viewQuery:function(g,c){if(g&1&&Gg(t,5),g&2){let p;Hw(p=Uw())&&(c._buttonElement=p.first)}},hostAttrs:[`role`,`presentation`,1,`mat-button-toggle`],hostVars:14,hostBindings:function(g,c){g&1&&Ug(`focus`,function(){return c.focus()}),g&2&&(Wn$1(`aria-label`,null)(`aria-labelledby`,null)(`id`,c.id)(`name`,null),ct(`mat-button-toggle-standalone`,!c.buttonToggleGroup)(`mat-button-toggle-checked`,c.checked)(`mat-button-toggle-disabled`,c.disabled)(`mat-button-toggle-disabled-interactive`,c.disabledInteractive)(`mat-button-toggle-appearance-standard`,c.appearance===`standard`))},inputs:{ariaLabel:[0,`aria-label`,`ariaLabel`],ariaLabelledby:[0,`aria-labelledby`,`ariaLabelledby`],id:`id`,name:`name`,value:`value`,tabIndex:`tabIndex`,disableRipple:[2,`disableRipple`,`disableRipple`,Ke],appearance:`appearance`,checked:[2,`checked`,`checked`,Ke],disabled:[2,`disabled`,`disabled`,Ke],disabledInteractive:[2,`disabledInteractive`,`disabledInteractive`,Ke]},outputs:{change:`change`},exportAs:[`matButtonToggle`],ngContentSelectors:n,decls:7,vars:13,consts:[[`button`,``],[`type`,`button`,1,`mat-button-toggle-button`,`mat-focus-indicator`,3,`click`,`id`,`disabled`],[1,`mat-button-toggle-checkbox-wrapper`],[1,`mat-button-toggle-label-content`],[1,`mat-button-toggle-focus-overlay`],[`matRipple`,``,1,`mat-button-toggle-ripple`,3,`matRippleTrigger`,`matRippleDisabled`],[`state`,`checked`,`aria-hidden`,`true`,`appearance`,`minimal`,3,`disabled`]],template:function(g,c){if(g&1&&(Gn$1(),Ys(0,`button`,1,0),Ug(`click`,function(){return c._onButtonClick()}),Yo(2,a,2,1,`div`,2),Ys(3,`span`,3),Ye(4),od()(),jg(5,`span`,4)(6,`span`,5)),g&2){let p=zw(1);Lg(`id`,c.buttonId)(`disabled`,c.disabled&&!c.disabledInteractive||null),Wn$1(`role`,c.isSingleSelector()?`radio`:`button`)(`tabindex`,c.disabled&&!c.disabledInteractive?-1:c.tabIndex)(`aria-pressed`,c.isSingleSelector()?null:c.checked)(`aria-checked`,c.isSingleSelector()?c.checked:null)(`name`,c._getButtonName())(`aria-label`,c.ariaLabel)(`aria-labelledby`,c.ariaLabelledby)(`aria-disabled`,c.disabled&&c.disabledInteractive?`true`:null),zo(2),Ko(c.buttonToggleGroup&&(!c.buttonToggleGroup.multiple&&!c.buttonToggleGroup.hideSingleSelectionIndicator||c.buttonToggleGroup.multiple&&!c.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),zo(4),Lg(`matRippleTrigger`,p)(`matRippleDisabled`,c.disableRipple||c.disabled)}},dependencies:[F3,Rn$1],styles:[`.mat-button-toggle-standalone,
101
+ .mat-button-toggle-group {
102
+ position: relative;
103
+ display: inline-flex;
104
+ flex-direction: row;
105
+ white-space: nowrap;
106
+ overflow: hidden;
107
+ -webkit-tap-highlight-color: transparent;
108
+ border-radius: var(--%NS%mat-button-toggle-legacy-shape);
109
+ transform: translateZ(0);
110
+ }
111
+ .mat-button-toggle-standalone:not([class*=mat-elevation-z]),
112
+ .mat-button-toggle-group:not([class*=mat-elevation-z]) {
113
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
114
+ }
115
+ @media (forced-colors: active) {
116
+ .mat-button-toggle-standalone,
117
+ .mat-button-toggle-group {
118
+ outline: solid 1px;
119
+ }
120
+ }
121
+
122
+ .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,
123
+ .mat-button-toggle-group-appearance-standard {
124
+ border-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
125
+ border: solid 1px var(--%NS%mat-button-toggle-divider-color, var(--%NS%mat-sys-outline));
126
+ }
127
+ .mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,
128
+ .mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox {
129
+ --%NS%mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--%NS%mat-button-toggle-selected-state-text-color, var(--%NS%mat-sys-on-secondary-container));
130
+ }
131
+ .mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),
132
+ .mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]) {
133
+ box-shadow: none;
134
+ }
135
+ @media (forced-colors: active) {
136
+ .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,
137
+ .mat-button-toggle-group-appearance-standard {
138
+ outline: 0;
139
+ }
140
+ }
141
+
142
+ .mat-button-toggle-vertical {
143
+ flex-direction: column;
144
+ }
145
+ .mat-button-toggle-vertical .mat-button-toggle-label-content {
146
+ display: block;
147
+ }
148
+
149
+ .mat-button-toggle {
150
+ white-space: nowrap;
151
+ position: relative;
152
+ color: var(--%NS%mat-button-toggle-legacy-text-color);
153
+ font-family: var(--%NS%mat-button-toggle-legacy-label-text-font);
154
+ font-size: var(--%NS%mat-button-toggle-legacy-label-text-size);
155
+ line-height: var(--%NS%mat-button-toggle-legacy-label-text-line-height);
156
+ font-weight: var(--%NS%mat-button-toggle-legacy-label-text-weight);
157
+ letter-spacing: var(--%NS%mat-button-toggle-legacy-label-text-tracking);
158
+ --%NS%mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--%NS%mat-button-toggle-legacy-selected-state-text-color);
159
+ }
160
+ .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay {
161
+ opacity: var(--%NS%mat-button-toggle-legacy-focus-state-layer-opacity);
162
+ }
163
+ .mat-button-toggle .mat-icon svg {
164
+ vertical-align: top;
165
+ }
166
+
167
+ .mat-button-toggle-checkbox-wrapper {
168
+ display: inline-block;
169
+ justify-content: flex-start;
170
+ align-items: center;
171
+ width: 0;
172
+ height: 18px;
173
+ line-height: 18px;
174
+ overflow: hidden;
175
+ box-sizing: border-box;
176
+ position: absolute;
177
+ top: 50%;
178
+ left: 16px;
179
+ transform: translate3d(0, -50%, 0);
180
+ }
181
+ [dir=rtl] .mat-button-toggle-checkbox-wrapper {
182
+ left: auto;
183
+ right: 16px;
184
+ }
185
+ .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper {
186
+ left: 12px;
187
+ }
188
+ [dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper {
189
+ left: auto;
190
+ right: 12px;
191
+ }
192
+ .mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper {
193
+ width: 18px;
194
+ }
195
+ .mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper {
196
+ transition: width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1);
197
+ }
198
+ .mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper {
199
+ transition: none;
200
+ }
201
+
202
+ .mat-button-toggle-checked {
203
+ color: var(--%NS%mat-button-toggle-legacy-selected-state-text-color);
204
+ background-color: var(--%NS%mat-button-toggle-legacy-selected-state-background-color);
205
+ }
206
+
207
+ .mat-button-toggle-disabled {
208
+ pointer-events: none;
209
+ color: var(--%NS%mat-button-toggle-legacy-disabled-state-text-color);
210
+ background-color: var(--%NS%mat-button-toggle-legacy-disabled-state-background-color);
211
+ --%NS%mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--%NS%mat-button-toggle-legacy-disabled-state-text-color);
212
+ }
213
+ .mat-button-toggle-disabled.mat-button-toggle-checked {
214
+ background-color: var(--%NS%mat-button-toggle-legacy-disabled-selected-state-background-color);
215
+ }
216
+
217
+ .mat-button-toggle-disabled-interactive {
218
+ pointer-events: auto;
219
+ }
220
+
221
+ .mat-button-toggle-appearance-standard {
222
+ color: var(--%NS%mat-button-toggle-text-color, var(--%NS%mat-sys-on-surface));
223
+ background-color: var(--%NS%mat-button-toggle-background-color, transparent);
224
+ font-family: var(--%NS%mat-button-toggle-label-text-font, var(--%NS%mat-sys-label-large-font));
225
+ font-size: var(--%NS%mat-button-toggle-label-text-size, var(--%NS%mat-sys-label-large-size));
226
+ line-height: var(--%NS%mat-button-toggle-label-text-line-height, var(--%NS%mat-sys-label-large-line-height));
227
+ font-weight: var(--%NS%mat-button-toggle-label-text-weight, var(--%NS%mat-sys-label-large-weight));
228
+ letter-spacing: var(--%NS%mat-button-toggle-label-text-tracking, var(--%NS%mat-sys-label-large-tracking));
229
+ }
230
+ .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard + .mat-button-toggle-appearance-standard {
231
+ border-left: solid 1px var(--%NS%mat-button-toggle-divider-color, var(--%NS%mat-sys-outline));
232
+ }
233
+ [dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard + .mat-button-toggle-appearance-standard {
234
+ border-left: none;
235
+ border-right: solid 1px var(--%NS%mat-button-toggle-divider-color, var(--%NS%mat-sys-outline));
236
+ }
237
+ .mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard + .mat-button-toggle-appearance-standard {
238
+ border-left: none;
239
+ border-right: none;
240
+ border-top: solid 1px var(--%NS%mat-button-toggle-divider-color, var(--%NS%mat-sys-outline));
241
+ }
242
+ .mat-button-toggle-appearance-standard.mat-button-toggle-checked {
243
+ color: var(--%NS%mat-button-toggle-selected-state-text-color, var(--%NS%mat-sys-on-secondary-container));
244
+ background-color: var(--%NS%mat-button-toggle-selected-state-background-color, var(--%NS%mat-sys-secondary-container));
245
+ }
246
+ .mat-button-toggle-appearance-standard.mat-button-toggle-disabled {
247
+ color: var(--%NS%mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--%NS%mat-sys-on-surface) 38%, transparent));
248
+ background-color: var(--%NS%mat-button-toggle-disabled-state-background-color, transparent);
249
+ }
250
+ .mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox {
251
+ --%NS%mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--%NS%mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--%NS%mat-sys-on-surface) 38%, transparent));
252
+ }
253
+ .mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked {
254
+ color: var(--%NS%mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--%NS%mat-sys-on-surface) 38%, transparent));
255
+ background-color: var(--%NS%mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--%NS%mat-sys-on-surface) 12%, transparent));
256
+ }
257
+ .mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay {
258
+ background-color: var(--%NS%mat-button-toggle-state-layer-color, var(--%NS%mat-sys-on-surface));
259
+ }
260
+ .mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay {
261
+ opacity: var(--%NS%mat-button-toggle-hover-state-layer-opacity, var(--%NS%mat-sys-hover-state-layer-opacity));
262
+ }
263
+ .mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay {
264
+ opacity: var(--%NS%mat-button-toggle-focus-state-layer-opacity, var(--%NS%mat-sys-focus-state-layer-opacity));
265
+ }
266
+ @media (hover: none) {
267
+ .mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay {
268
+ display: none;
269
+ }
270
+ }
271
+
272
+ .mat-button-toggle-label-content {
273
+ -webkit-user-select: none;
274
+ user-select: none;
275
+ display: inline-block;
276
+ padding: 0 16px;
277
+ line-height: var(--%NS%mat-button-toggle-legacy-height);
278
+ position: relative;
279
+ }
280
+ .mat-button-toggle-appearance-standard .mat-button-toggle-label-content {
281
+ padding: 0 12px;
282
+ line-height: var(--%NS%mat-button-toggle-height, 40px);
283
+ }
284
+
285
+ .mat-button-toggle-label-content > * {
286
+ vertical-align: middle;
287
+ }
288
+
289
+ .mat-button-toggle-focus-overlay {
290
+ top: 0;
291
+ left: 0;
292
+ right: 0;
293
+ bottom: 0;
294
+ position: absolute;
295
+ border-radius: inherit;
296
+ pointer-events: none;
297
+ opacity: 0;
298
+ background-color: var(--%NS%mat-button-toggle-legacy-state-layer-color);
299
+ }
300
+
301
+ @media (forced-colors: active) {
302
+ .mat-button-toggle-checked .mat-button-toggle-focus-overlay {
303
+ border-bottom: solid 500px;
304
+ opacity: 0.5;
305
+ height: 0;
306
+ }
307
+ .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay {
308
+ opacity: 0.6;
309
+ }
310
+ .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay {
311
+ border-bottom: solid 500px;
312
+ }
313
+ }
314
+ .mat-button-toggle .mat-button-toggle-ripple {
315
+ top: 0;
316
+ left: 0;
317
+ right: 0;
318
+ bottom: 0;
319
+ position: absolute;
320
+ pointer-events: none;
321
+ }
322
+
323
+ .mat-button-toggle-button {
324
+ border: 0;
325
+ background: none;
326
+ color: inherit;
327
+ padding: 0;
328
+ margin: 0;
329
+ font: inherit;
330
+ outline: none;
331
+ width: 100%;
332
+ cursor: pointer;
333
+ }
334
+ .mat-button-toggle-animations-enabled .mat-button-toggle-button {
335
+ transition: padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1);
336
+ }
337
+ .mat-button-toggle-vertical .mat-button-toggle-button {
338
+ transition: none;
339
+ }
340
+ .mat-button-toggle-disabled .mat-button-toggle-button {
341
+ cursor: default;
342
+ }
343
+ .mat-button-toggle-button::-moz-focus-inner {
344
+ border: 0;
345
+ }
346
+ .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper) {
347
+ padding-left: 30px;
348
+ }
349
+ [dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper) {
350
+ padding-left: 0;
351
+ padding-right: 30px;
352
+ }
353
+
354
+ .mat-button-toggle-standalone.mat-button-toggle-appearance-standard {
355
+ --%NS%mat-focus-indicator-border-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
356
+ }
357
+
358
+ .mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before {
359
+ border-top-right-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
360
+ border-bottom-right-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
361
+ }
362
+ .mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before {
363
+ border-top-left-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
364
+ border-bottom-left-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
365
+ }
366
+
367
+ .mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before {
368
+ border-bottom-right-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
369
+ border-bottom-left-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
370
+ }
371
+ .mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before {
372
+ border-top-right-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
373
+ border-top-left-radius: var(--%NS%mat-button-toggle-shape, var(--%NS%mat-sys-corner-extra-large));
374
+ }
375
+ `],encapsulation:2})})()}return e})();var sn=(()=>{class e{static ɵfac=function(n){return new(n||e)};static ɵmod=fe({type:e});static ɵinj=ae({imports:[Zy,yt,$r]})}return e})();var Tn=(e,l)=>l.key;function Dn(e,l){if(e&1){let t=Lw();Ys(0,`button`,21),Ug(`click`,function(){Ip(t);let a=jw(2);return wp(a.copy())}),Ys(1,`mat-icon`),dS(2,`content_copy`),od(),dS(3,` Copy`),od()}}function In(e,l){if(e&1){let t=Lw();Ys(0,`div`,15)(1,`mat-form-field`)(2,`mat-label`),dS(3,`Temporary password`),od(),Ys(4,`input`,16),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.password,a)||(r.password=a),wp(a)}),od(),Ys(5,`button`,17),Ug(`click`,function(){Ip(t);let a=jw();return wp(a.showPw=!a.showPw)}),Ys(6,`mat-icon`),dS(7),od()(),Ys(8,`mat-hint`),dS(9),od()(),Ys(10,`div`,18)(11,`button`,19),Ug(`click`,function(){Ip(t);let a=jw();return wp(a.generate())}),Ys(12,`mat-icon`),dS(13,`casino`),od(),dS(14,` Generate`),od(),Yo(15,Dn,4,0,`button`,20),od()(),Ys(16,`mat-slide-toggle`,6),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.mustChange,a)||(r.mustChange=a),wp(a)}),dS(17,`Must change password at first login`),od(),Ys(18,`p`,1),dS(19,`The password is stored only as a salted hash. Share it with the user over a secure channel.`),od()}if(e&2){let t=jw();zo(4),Lg(`type`,t.showPw?`text`:`password`),ab(`ngModel`,t.password),yI(),zo(),Wn$1(`aria-label`,t.showPw?`Hide`:`Show`),zo(2),rb(t.showPw?`visibility_off`:`visibility`),zo(2),ad(`Min `,t.minLen(),` chars, 3 of: a-z, A-Z, 0-9, symbol`),zo(6),Ko(t.showPw&&t.password?15:-1),zo(),ab(`ngModel`,t.mustChange),yI()}}function En(e,l){e&1&&(Ys(0,`p`,1),dS(1,`This user signs in with AWS SSO using this email (SSO must be enabled in Settings → Login).`),od())}function Nn(e,l){if(e&1&&(Ys(0,`mat-option`,22),dS(1),od()),e&2){let t=l.$implicit,n=jw(2);Lg(`value`,t.key),zo(),sb(``,t.key,` — `,t.value.cpu,` CPU · `,n.gb(t.value.mem_mb),` RAM · `,t.value.disk_gb,` GB`)}}function Bn(e,l){if(e&1){let t=Lw();Ys(0,`mat-form-field`)(1,`mat-label`),dS(2,`CPU cores`),od(),Ys(3,`input`,27),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw(2);return bS(r.f.cpu,a)||(r.f.cpu=a),wp(a)}),od()(),Ys(4,`mat-form-field`)(5,`mat-label`),dS(6,`RAM (MB)`),od(),Ys(7,`input`,28),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw(2);return bS(r.f.mem_mb,a)||(r.f.mem_mb=a),wp(a)}),od()(),Ys(8,`mat-form-field`)(9,`mat-label`),dS(10,`Disk (GB)`),od(),Ys(11,`input`,29),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw(2);return bS(r.f.disk_gb,a)||(r.f.disk_gb=a),wp(a)}),od()()}if(e&2){let t=jw(2);zo(3),ab(`ngModel`,t.f.cpu),yI(),zo(4),ab(`ngModel`,t.f.mem_mb),yI(),zo(4),ab(`ngModel`,t.f.disk_gb),yI()}}function Un(e,l){if(e&1){let t=Lw();Ys(0,`h3`),dS(1,`Resources`),od(),Ys(2,`div`,2)(3,`mat-form-field`)(4,`mat-label`),dS(5,`Plan`),od(),Ys(6,`mat-select`,6),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.plan,a)||(r.plan=a),wp(a)}),Mw(7,Nn,2,5,`mat-option`,22,Tn),wS(9,`keyvalue`),Ys(10,`mat-option`,23),dS(11,`custom…`),od()()(),Yo(12,Bn,12,3),od(),Ys(13,`h3`),dS(14,`Permissions`),od(),Ys(15,`div`,24)(16,`mat-slide-toggle`,6),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.f.internet,a)||(r.f.internet=a),wp(a)}),dS(17,`Internet access`),od(),Ys(18,`mat-slide-toggle`,6),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.f.sudo,a)||(r.f.sudo=a),wp(a)}),dS(19,`sudo inside container`),od(),Ys(20,`mat-slide-toggle`,6),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.f.shared_folder,a)||(r.f.shared_folder=a),wp(a)}),dS(21,`Shared folder (/shared)`),od()(),Ys(22,`div`,25)(23,`mat-form-field`)(24,`mat-label`),dS(25,`Access expires (optional)`),od(),Ys(26,`input`,26),gI(),cb(`ngModelChange`,function(a){Ip(t);let r=jw();return bS(r.expiry,a)||(r.expiry=a),wp(a)}),od()()()}if(e&2){let t=jw();zo(6),ab(`ngModel`,t.plan),yI(),zo(),Aw(CS(9,6,t.plans())),zo(5),Ko(t.plan===`custom`?12:-1),zo(4),ab(`ngModel`,t.f.internet),yI(),zo(2),ab(`ngModel`,t.f.sudo),yI(),zo(2),ab(`ngModel`,t.f.shared_folder),yI(),zo(6),ab(`ngModel`,t.expiry),yI()}}function An(e,l){e&1&&(jg(0,`mat-progress-bar`,30),Ys(1,`p`,1),dS(2,`Creating workspace…`),od())}var vt=class e{api=m(Qy);ref=m(G$1);gb=i;plans=ke({});saving=ke(!1);role=`user`;plan=`small`;expiry=``;usePassword=!0;password=``;showPw=!1;mustChange=!0;minLen=ke(12);clip=m(v);notify=m(pt);f={email:``,username:``,display_name:``,cpu:1,mem_mb:2048,disk_gb:10,internet:!0,sudo:!1,shared_folder:!1,notes:``};constructor(){this.api.settings().subscribe(l=>{this.plans.set(l.plans),this.plan=l.default_plan,this.f.internet=l.default_internet,this.minLen.set(l.password_min_length),this.usePassword=l.password_login_enabled||!l.sso_enabled})}generate(){this.password=c(Math.max(16,this.minLen())),this.showPw=!0}copy(){this.clip.copy(this.password),this.notify.ok(`Password copied`)}save(){let l={email:this.f.email.trim(),display_name:this.f.display_name,notes:this.f.notes,is_admin:this.role!==`user`,has_workspace:this.role!==`admin`};this.usePassword&&(l.password=this.password,l.must_change_password=this.mustChange),this.f.username&&(l.username=this.f.username.trim()),l.has_workspace&&(Object.assign(l,{internet:this.f.internet,sudo:this.f.sudo,shared_folder:this.f.shared_folder}),this.plan===`custom`?Object.assign(l,{plan:`custom`,cpu:+this.f.cpu,mem_mb:+this.f.mem_mb,disk_gb:+this.f.disk_gb}):l.plan=this.plan,this.expiry&&(l.expires_at=this.expiry+`T23:59:59`)),this.saving.set(!0),this.api.createUser(l).subscribe({next:t=>this.ref.close(t),error:()=>this.saving.set(!1)})}static ɵfac=function(t){return new(t||e)};static ɵcmp=Te({type:e,selectors:[[`ng-component`]],decls:47,vars:11,consts:[[`mat-dialog-title`,``],[1,`muted`],[1,`form-grid`],[`matInput`,``,`type`,`email`,`required`,``,`autofocus`,``,3,`ngModelChange`,`ngModel`],[`matInput`,``,`placeholder`,`auto from email`,`pattern`,`[a-z][a-z0-9-]{1,30}`,3,`ngModelChange`,`ngModel`],[`matInput`,``,3,`ngModelChange`,`ngModel`],[3,`ngModelChange`,`ngModel`],[`value`,`user`],[`value`,`admin`],[`value`,`both`],[1,`full`],[`matInput`,``,`rows`,`2`,3,`ngModelChange`,`ngModel`],[`align`,`end`],[`mat-button`,``,`mat-dialog-close`,``,3,`disabled`],[`mat-flat-button`,``,3,`click`,`disabled`],[1,`form-grid`,2,`margin-top`,`10px`],[`matInput`,``,`autocomplete`,`new-password`,`maxlength`,`256`,3,`ngModelChange`,`type`,`ngModel`],[`mat-icon-button`,``,`matSuffix`,``,`type`,`button`,3,`click`],[1,`row`],[`mat-stroked-button`,``,`type`,`button`,3,`click`],[`mat-button`,``,`type`,`button`],[`mat-button`,``,`type`,`button`,3,`click`],[3,`value`],[`value`,`custom`],[1,`toggles`],[1,`form-grid`,2,`margin-top`,`12px`],[`matInput`,``,`type`,`date`,3,`ngModelChange`,`ngModel`],[`matInput`,``,`type`,`number`,`step`,`0.25`,`min`,`0.25`,3,`ngModelChange`,`ngModel`],[`matInput`,``,`type`,`number`,`step`,`256`,`min`,`256`,3,`ngModelChange`,`ngModel`],[`matInput`,``,`type`,`number`,`min`,`1`,3,`ngModelChange`,`ngModel`],[`mode`,`indeterminate`]],template:function(t,n){t&1&&(Ys(0,`h2`,0),dS(1,`Add user`),od(),Ys(2,`mat-dialog-content`)(3,`p`,1),dS(4,`The user is approved immediately. Their Linux user, home folder, disk quota, container and nginx route are created automatically.`),od(),Ys(5,`div`,2)(6,`mat-form-field`)(7,`mat-label`),dS(8,`Email`),od(),Ys(9,`input`,3),gI(),cb(`ngModelChange`,function(r){return bS(n.f.email,r)||(n.f.email=r),r}),od()(),Ys(10,`mat-form-field`)(11,`mat-label`),dS(12,`Username (optional)`),od(),Ys(13,`input`,4),gI(),cb(`ngModelChange`,function(r){return bS(n.f.username,r)||(n.f.username=r),r}),od(),Ys(14,`mat-hint`),dS(15,`Linux user + /home/<username>`),od()(),Ys(16,`mat-form-field`)(17,`mat-label`),dS(18,`Display name`),od(),Ys(19,`input`,5),gI(),cb(`ngModelChange`,function(r){return bS(n.f.display_name,r)||(n.f.display_name=r),r}),od()(),Ys(20,`mat-form-field`)(21,`mat-label`),dS(22,`Role`),od(),Ys(23,`mat-select`,6),gI(),cb(`ngModelChange`,function(r){return bS(n.role,r)||(n.role=r),r}),Ys(24,`mat-option`,7),dS(25,`User (VS Code only)`),od(),Ys(26,`mat-option`,8),dS(27,`Admin (portal only)`),od(),Ys(28,`mat-option`,9),dS(29,`Admin + workspace`),od()()()(),Ys(30,`h3`),dS(31,`Login`),od(),Ys(32,`mat-slide-toggle`,6),gI(),cb(`ngModelChange`,function(r){return bS(n.usePassword,r)||(n.usePassword=r),r}),dS(33,`Password login (username / email + password)`),od(),Yo(34,In,20,7)(35,En,2,0,`p`,1),Yo(36,Un,27,8),Ys(37,`mat-form-field`,10)(38,`mat-label`),dS(39,`Notes`),od(),Ys(40,`textarea`,11),gI(),cb(`ngModelChange`,function(r){return bS(n.f.notes,r)||(n.f.notes=r),r}),od()(),Yo(41,An,3,0),od(),Ys(42,`mat-dialog-actions`,12)(43,`button`,13),dS(44,`Cancel`),od(),Ys(45,`button`,14),Ug(`click`,function(){return n.save()}),dS(46,`Create user`),od()()),t&2&&(zo(9),ab(`ngModel`,n.f.email),yI(),zo(4),ab(`ngModel`,n.f.username),yI(),zo(6),ab(`ngModel`,n.f.display_name),yI(),zo(4),ab(`ngModel`,n.role),yI(),zo(9),ab(`ngModel`,n.usePassword),yI(),zo(2),Ko(n.usePassword?34:35),zo(2),Ko(n.role!==`admin`?36:-1),zo(4),ab(`ngModel`,n.f.notes),yI(),zo(),Ko(n.saving()?41:-1),zo(2),Lg(`disabled`,n.saving()),zo(2),Lg(`disabled`,n.saving()||!n.f.email||n.usePassword&&!n.password))},dependencies:[Pt$1,Et,Ft,Lt$1,zt$2,cW,aW,QT,Xt$1,Qt$1,Ve,Be$1,vn,Pe,Be,Xr,Qr,Ce,ke$1,ie,j,L$1,Fn$1,He,an$1,In$1,ct$1,zt,Xt,$t,on$1,s8,i8,yC],styles:[`h3[_ngcontent-%COMP%]{font-size:14px;margin:8px 0}.toggles[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}`]})};var cn=e=>[`/`,e];function Pn(e,l){e&1&&(Ys(0,`th`,31),dS(1,`User`),od())}function Vn(e,l){if(e&1&&(Ys(0,`td`,32)(1,`a`,33)(2,`b`),dS(3),od()(),Ys(4,`div`,34),dS(5),od()()),e&2){let t=l.$implicit;zo(),Lg(`routerLink`,_S(3,cn,t.username)),zo(2),rb(t.username),zo(2),rb(t.email)}}function Rn(e,l){e&1&&(Ys(0,`th`,31),dS(1,`Status`),od())}function On(e,l){e&1&&(Ys(0,`span`,36),dS(1,`expired`),od())}function Gn(e,l){if(e&1&&(Ys(0,`td`,32)(1,`span`,35),dS(2),od(),Yo(3,On,2,0,`span`,36),od()),e&2){let t=l.$implicit;zo(),Qo(t.status),zo(),rb(t.status),zo(),Ko(t.expired?3:-1)}}function Ln(e,l){e&1&&(Ys(0,`th`,37),dS(1,`Role`),od())}function Wn(e,l){e&1&&(Ys(0,`span`,38),dS(1,`admin`),od())}function Fn(e,l){e&1&&(Ys(0,`span`,39),dS(1,`user`),od())}function Hn(e,l){if(e&1&&(Ys(0,`td`,32),Yo(1,Wn,2,0,`span`,38),Yo(2,Fn,2,0,`span`,39),od()),e&2){let t=l.$implicit;zo(),Ko(t.is_admin?1:-1),zo(),Ko(t.has_workspace?2:-1)}}function zn(e,l){e&1&&(Ys(0,`th`,31),dS(1,`Resources`),od())}function jn(e,l){if(e&1&&(Ys(0,`span`,35),dS(1),od(),Ys(2,`div`,34),dS(3),od()),e&2){let t=jw().$implicit,n=jw();ct(`custom`,t.plan===`custom`)(`none`,t.plan!==`custom`),zo(),rb(t.plan),zo(2),ib(``,t.cpu,` CPU · `,n.gb(t.mem_mb),` · `,t.disk_gb,` GB`)}}function qn(e,l){e&1&&(Ys(0,`span`,34),dS(1,`—`),od())}function Yn(e,l){if(e&1&&(Ys(0,`td`,32),Yo(1,jn,4,8)(2,qn,2,0,`span`,34),od()),e&2){let t=l.$implicit;zo(),Ko(t.has_workspace?1:2)}}function Qn(e,l){e&1&&(Ys(0,`th`,37),dS(1,`Usage`),od())}function Zn(e,l){if(e&1&&(Ys(0,`div`,40)(1,`span`),dS(2,`RAM`),od(),Ys(3,`div`),jg(4,`div`),od()(),Ys(5,`div`,40)(6,`span`),dS(7,`Disk`),od(),Ys(8,`div`),jg(9,`div`),od()()),e&2){let t=l,n=jw().$implicit,a=jw();zo(3),Qo(a.barClass(a.pct(t.mem_mb,n.mem_mb))),zo(),Qg(`width`,a.pct(t.mem_mb,n.mem_mb),`%`),zo(4),Qo(a.barClass(a.pct(t.disk_mb,n.disk_gb*1024))),zo(),Qg(`width`,a.pct(t.disk_mb,n.disk_gb*1024),`%`)}}function Kn(e,l){e&1&&(Ys(0,`span`,34),dS(1,`—`),od())}function Jn(e,l){if(e&1&&(Ys(0,`td`,32),Yo(1,Zn,10,8)(2,Kn,2,0,`span`,34),od()),e&2){let t,n=l.$implicit;zo(),Ko((t=n.usage)?1:2,t)}}function Xn(e,l){e&1&&(Ys(0,`th`,37),dS(1,`Workspace`),od())}function $n(e,l){e&1&&(Ys(0,`span`,34),dS(1,`none`),od())}function ta(e,l){e&1&&(Ys(0,`span`,39),dS(1,`not created`),od())}function ea(e,l){e&1&&(Ys(0,`span`,41),dS(1,`disk full`),od())}function na(e,l){if(e&1&&(Ys(0,`span`,35),dS(1),od(),Yo(2,ea,2,0,`span`,41)),e&2){let t=jw().$implicit;Qo(t.usage?.running?`running`:`exited`),zo(),rb(t.usage?.running?`running`:`stopped`),zo(),Ko(t.over_quota?2:-1)}}function aa(e,l){if(e&1&&(Ys(0,`td`,32),Yo(1,$n,2,0,`span`,34)(2,ta,2,0,`span`,39)(3,na,3,4),od()),e&2){let t=l.$implicit;zo(),Ko(t.has_workspace?t.provisioned?3:2:1)}}function oa(e,l){e&1&&(Ys(0,`th`,31),dS(1,`Last login`),od())}function ia(e,l){if(e&1&&(Ys(0,`td`,42),dS(1),od()),e&2){let t=l.$implicit,n=jw();zo(),rb(n.ago(t.last_login))}}function ra(e,l){e&1&&jg(0,`th`,37)}function la(e,l){if(e&1){let t=Lw();Ys(0,`button`,3),Ug(`click`,function(){Ip(t);let a=jw().$implicit,r=jw();return wp(r.approve(a))}),dS(1,`Approve`),od()}}function sa(e,l){if(e&1){let t=Lw();Ys(0,`button`,47),Ug(`click`,function(){Ip(t);let a=jw().$implicit,r=jw();return wp(r.toggle(a))}),Ys(1,`mat-icon`),dS(2,`block`),od(),dS(3,` Disable`),od()}}function da(e,l){if(e&1){let t=Lw();Ys(0,`button`,47),Ug(`click`,function(){Ip(t);let a=jw().$implicit,r=jw();return wp(r.toggle(a))}),Ys(1,`mat-icon`),dS(2,`check_circle`),od(),dS(3,` Enable`),od()}}function ca(e,l){if(e&1){let t=Lw();Ys(0,`button`,47),Ug(`click`,function(){Ip(t);let a=jw().$implicit,r=jw();return wp(r.container(a,a.usage?.running?`stop`:`start`))}),Ys(1,`mat-icon`),dS(2),od(),dS(3),od()}if(e&2){let t=jw().$implicit;zo(2),rb(t.usage?.running?`stop`:`play_arrow`),zo(),ad(` `,t.usage?.running?`Stop`:`Start`,` workspace`)}}function ma(e,l){if(e&1){let t=Lw();Ys(0,`td`,32),Yo(1,la,2,0,`button`,43),Ys(2,`button`,44)(3,`mat-icon`),dS(4,`more_vert`),od()(),Ys(5,`mat-menu`,null,0)(7,`a`,45)(8,`mat-icon`),dS(9,`edit`),od(),dS(10,` Manage`),od(),Yo(11,sa,4,0,`button`,46),Yo(12,da,4,0,`button`,46),Yo(13,ca,4,2,`button`,46),Ys(14,`button`,47),Ug(`click`,function(){let a=Ip(t).$implicit,r=jw();return wp(r.logout(a))}),Ys(15,`mat-icon`),dS(16,`logout`),od(),dS(17,` Force logout`),od()()()}if(e&2){let t=l.$implicit,n=zw(6);zo(),Ko(t.status===`pending`?1:-1),zo(),Lg(`matMenuTriggerFor`,n),zo(5),Lg(`routerLink`,_S(6,cn,t.username)),zo(4),Ko(t.status===`active`?11:-1),zo(),Ko(t.status===`disabled`?12:-1),zo(),Ko(t.provisioned?13:-1)}}function ga(e,l){e&1&&jg(0,`tr`,48)}function ua(e,l){if(e&1&&jg(0,`tr`,49),e&2){let t=l.$implicit;ct(`dim`,t.status===`disabled`)}}function pa(e,l){if(e&1&&(Ys(0,`tr`,50)(1,`td`,51),dS(2,`No users found`),od()()),e&2){let t=jw();zo(),Wn$1(`colspan`,t.cols.length)}}var dn=class e{api=m(Qy);dialog=m(ve);notify=m(pt);router=m(ue);gb=i;pct=g$1;barClass=l;ago=s;cols=[`username`,`status`,`role`,`plan`,`usage`,`workspace`,`last_login`,`actions`];status=``;q=``;rows=ke([]);sort=ke({active:``,direction:``});sorted=MS(()=>{let{active:l,direction:t}=this.sort(),n=[...this.rows()];if(!l||!t)return n;let a=l;return n.sort((r,g)=>String(r[a]??``).localeCompare(String(g[a]??``))*(t===`asc`?1:-1))});constructor(){this.load()}load(){this.api.users(this.status||void 0,this.q||void 0).subscribe(l=>this.rows.set(l))}add(){this.dialog.open(vt,{width:`720px`,maxWidth:`95vw`}).afterClosed().subscribe(l=>{l&&(this.notify.ok(`${l.email} created (${l.username})`),this.router.navigate([`/`,l.username]))})}approve(l){this.api.approve(l.username).subscribe(()=>{this.notify.ok(`${l.email} approved`),this.load(),this.api.users(`pending`).subscribe()})}toggle(l){l.status===`active`?ba(this.dialog,{title:`Disable user?`,message:`${l.email} will be logged out and the workspace stopped.`,ok:`Disable`,danger:!0}).subscribe(t=>t&&this.api.disable(l.username).subscribe(()=>{this.notify.ok(`Disabled`),this.load()})):this.api.enable(l.username).subscribe(()=>{this.notify.ok(`Enabled`),this.load()})}container(l,t){this.api.container(l.username,t).subscribe(n=>{this.notify.ok(`Workspace ${n.container_status}`),this.load()})}logout(l){ba(this.dialog,{title:`Force logout?`,message:`End all sessions of ${l.email}.`,ok:`Logout`,checkbox:`Also disconnect open VS Code tabs (restarts the workspace)`,checked:!0}).subscribe(t=>t&&this.api.forceLogout(l.username,t.checked).subscribe(n=>this.notify.ok(`${n.sessions_ended} session(s) ended`)))}static ɵfac=function(t){return new(t||e)};static ɵcmp=Te({type:e,selectors:[[`ng-component`]],decls:54,vars:5,consts:[[`m`,`matMenu`],[1,`page`],[1,`page-head`],[`mat-flat-button`,``,3,`click`],[1,`row`,`filters`],[`hideSingleSelectionIndicator`,``,3,`ngModelChange`,`change`,`ngModel`],[`value`,``],[`value`,`active`],[`value`,`pending`],[`value`,`disabled`],[`subscriptSizing`,`dynamic`,1,`search`],[`matPrefix`,``],[`matInput`,``,`placeholder`,`Search email / username`,3,`ngModelChange`,`keyup.enter`,`ngModel`],[`mat-icon-button`,``,`matTooltip`,`Refresh`,3,`click`],[1,`table-wrap`],[`mat-table`,``,`matSort`,``,3,`matSortChange`,`dataSource`],[`matColumnDef`,`username`],[`mat-header-cell`,``,`mat-sort-header`,``,4,`matHeaderCellDef`],[`mat-cell`,``,4,`matCellDef`],[`matColumnDef`,`status`],[`matColumnDef`,`role`],[`mat-header-cell`,``,4,`matHeaderCellDef`],[`matColumnDef`,`plan`],[`matColumnDef`,`usage`],[`matColumnDef`,`workspace`],[`matColumnDef`,`last_login`],[`mat-cell`,``,`class`,`muted`,4,`matCellDef`],[`matColumnDef`,`actions`],[`mat-header-row`,``,4,`matHeaderRowDef`],[`mat-row`,``,3,`dim`,4,`matRowDef`,`matRowDefColumns`],[`class`,`mat-row`,4,`matNoDataRow`],[`mat-header-cell`,``,`mat-sort-header`,``],[`mat-cell`,``],[1,`ulink`,3,`routerLink`],[1,`muted`],[1,`chip`],[1,`chip`,`error`],[`mat-header-cell`,``],[1,`chip`,`admin`],[1,`chip`,`none`],[1,`use`],[`matTooltip`,`Disk limit exceeded`,1,`chip`,`error`],[`mat-cell`,``,1,`muted`],[`mat-flat-button`,``],[`mat-icon-button`,``,3,`matMenuTriggerFor`],[`mat-menu-item`,``,3,`routerLink`],[`mat-menu-item`,``],[`mat-menu-item`,``,3,`click`],[`mat-header-row`,``],[`mat-row`,``],[1,`mat-row`],[1,`empty`]],template:function(t,n){t&1&&(Ys(0,`div`,1)(1,`div`,2)(2,`h1`),dS(3,`Users`),od(),Ys(4,`button`,3),Ug(`click`,function(){return n.add()}),Ys(5,`mat-icon`),dS(6,`person_add`),od(),dS(7,` Add user`),od()(),Ys(8,`div`,4)(9,`mat-button-toggle-group`,5),gI(),cb(`ngModelChange`,function(r){return bS(n.status,r)||(n.status=r),r}),Ug(`change`,function(){return n.load()}),Ys(10,`mat-button-toggle`,6),dS(11,`All`),od(),Ys(12,`mat-button-toggle`,7),dS(13,`Active`),od(),Ys(14,`mat-button-toggle`,8),dS(15,`Pending`),od(),Ys(16,`mat-button-toggle`,9),dS(17,`Disabled`),od()(),Ys(18,`mat-form-field`,10)(19,`mat-icon`,11),dS(20,`search`),od(),Ys(21,`input`,12),gI(),cb(`ngModelChange`,function(r){return bS(n.q,r)||(n.q=r),r}),Ug(`keyup.enter`,function(){return n.load()}),od()(),Ys(22,`button`,13),Ug(`click`,function(){return n.load()}),Ys(23,`mat-icon`),dS(24,`refresh`),od()()(),Ys(25,`div`,14)(26,`table`,15),Ug(`matSortChange`,function(r){return n.sort.set(r)}),id(27,16),Rg(28,Pn,2,0,`th`,17)(29,Vn,6,5,`td`,18),sd(),id(30,19),Rg(31,Rn,2,0,`th`,17)(32,Gn,4,4,`td`,18),sd(),id(33,20),Rg(34,Ln,2,0,`th`,21)(35,Hn,3,2,`td`,18),sd(),id(36,22),Rg(37,zn,2,0,`th`,17)(38,Yn,3,1,`td`,18),sd(),id(39,23),Rg(40,Qn,2,0,`th`,21)(41,Jn,3,1,`td`,18),sd(),id(42,24),Rg(43,Xn,2,0,`th`,21)(44,aa,4,1,`td`,18),sd(),id(45,25),Rg(46,oa,2,0,`th`,17)(47,ia,2,1,`td`,26),sd(),id(48,27),Rg(49,ra,1,0,`th`,21)(50,ma,18,8,`td`,18),sd(),Rg(51,ga,1,0,`tr`,28)(52,ua,1,2,`tr`,29)(53,pa,3,1,`tr`,30),od()()()),t&2&&(zo(9),ab(`ngModel`,n.status),yI(),zo(12),ab(`ngModel`,n.q),yI(),zo(5),Lg(`dataSource`,n.sorted()),zo(25),Lg(`matHeaderRowDef`,n.cols),zo(),Lg(`matRowDefColumns`,n.cols))},dependencies:[Fn$1,He,In$1,on$1,Ut,Qt,It$1,Ht,Bt,Pt,At$1,Vt,zt$1,Lt,jt,Ut$1,Wt,on,Dt,an,s8,i8,cW,aW,QT,sn,It,yt,Xt$1,Qt$1,bn,Pe,Be,Ot,P,G,At,Vt$1,_t],styles:[`.filters[_ngcontent-%COMP%]{margin-bottom:14px}.search[_ngcontent-%COMP%]{width:280px}.ulink[_ngcontent-%COMP%]{color:#1d4ed8;text-decoration:none}.use[_ngcontent-%COMP%]{display:grid;grid-template-columns:34px 90px;align-items:center;gap:6px;font-size:11px;color:#6b7280;margin:2px 0}tr.dim[_ngcontent-%COMP%]{opacity:.55}td.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px 12px}`]})};export{dn as Users};
@@ -0,0 +1 @@
1
+ function i(n){return n==null?`-`:n>=1024?(n/1024).toFixed(1)+` GB`:Math.round(n)+` MB`}function g(n,u){return u>0?Math.min(100,Math.round(n/u*100)):0}function l(n){return n>=95?`bar bad`:n>=80?`bar warn`:`bar`}function s(n){if(!n)return`never`;let u=new Date(n.endsWith(`Z`)?n:n+`Z`).getTime(),r=Math.max(0,(Date.now()-u)/1e3);return r<60?`just now`:r<3600?Math.floor(r/60)+` min ago`:r<86400?Math.floor(r/3600)+` h ago`:Math.floor(r/86400)+` d ago`}function f(n){return n?new Date(n.endsWith(`Z`)?n:n+`Z`).toLocaleString():`-`}function c(n=16){let u=[`abcdefghjkmnpqrstuvwxyz`,`ABCDEFGHJKMNPQRSTUVWXYZ`,`23456789`,`-_.!@#%`],r=u.join(``),a=t=>{let o=/* @__PURE__ */ new Uint32Array(1);return crypto.getRandomValues(o),o[0]%t},e=u.map(t=>t[a(t.length)]);for(;e.length<n;)e.push(r[a(r.length)]);for(let t=e.length-1;t>0;t--){let o=a(t+1);[e[t],e[o]]=[e[o],e[t]]}return e.join(``)}export{l as a,i,f as n,s as o,g as r,c as t};
@@ -0,0 +1 @@
1
+ import{o as ba,s as ve}from"./chunk-0r_p7pcB.js";import{i,o as s}from"./chunk-D6j6hnz3.js";import"./chunk-DA6TldFU.js";import{$r as yC,Bn as ab,Br as sb,Gr as wS,Jn as cW,Kn as bS,Or as ob,Rr as rb,Rt as Lg,Sr as m,Vt as Lw,Wt as Mw,Yn as cb,Zn as dS,cn as Qy,ei as yI,h as on,i as In,jn as Ys,kr as od,kt as Ip,mn as Ug,n as Fn,or as gI,ot as Aw,pn as Te,qr as wp,ri as zo,ur as i8,ut as CS,vr as jw,y as pt,yr as ke,zn as aW,zr as s8}from"./main-LWBML7JF.js";import{c as Ve,d as Xt,o as Qr,r as Ce,s as Qt,u as Xr}from"./chunk-BoGqYCjO.js";var Z=(o,t)=>t.id;var ee=(o,t)=>t.key;function te(o,t){if(o&1&&(Ys(0,`mat-option`,10),dS(1),od()),o&2){let e=t.$implicit,r=jw(2);Lg(`value`,e.key),zo(),sb(``,e.key,` (`,e.value.cpu,` CPU · `,r.gb(e.value.mem_mb),` · `,e.value.disk_gb,` GB)`)}}function ie(o,t){if(o&1){let e=Lw();Ys(0,`div`,5)(1,`div`,7)(2,`mat-icon`),dS(3,`person`),od(),Ys(4,`div`)(5,`b`),dS(6),od(),Ys(7,`div`,3),dS(8),od()()(),Ys(9,`mat-form-field`,8)(10,`mat-label`),dS(11,`Plan`),od(),Ys(12,`mat-select`,9),gI(),cb(`ngModelChange`,function(s){let m=Ip(e).$implicit,x=jw();return bS(x.choice[m.id],s)||(x.choice[m.id]=s),wp(s)}),Mw(13,te,2,5,`mat-option`,10,ee),wS(15,`keyvalue`),od()(),Ys(16,`button`,11),Ug(`click`,function(){let s=Ip(e).$implicit,m=jw();return wp(m.approve(s))}),Ys(17,`mat-icon`),dS(18,`check`),od(),dS(19,` Approve`),od(),Ys(20,`button`,12),Ug(`click`,function(){let s=Ip(e).$implicit,m=jw();return wp(m.reject(s))}),Ys(21,`mat-icon`),dS(22,`close`),od(),dS(23,` Reject`),od()()}if(o&2){let e=t.$implicit,r=jw();zo(6),rb(e.display_name||e.username),zo(2),ob(``,e.email,` · requested `,r.ago(e.created_at)),zo(4),ab(`ngModel`,r.choice[e.id]),yI(),zo(),Aw(CS(15,6,r.plans())),zo(3),Lg(`disabled`,r.busy()===e.id),zo(4),Lg(`disabled`,r.busy()===e.id)}}function ne(o,t){o&1&&(Ys(0,`div`,6)(1,`mat-icon`),dS(2,`done_all`),od(),Ys(3,`p`),dS(4,`No pending requests.`),od()())}var Y=class o{api=m(Qy);notify=m(pt);dialog=m(ve);gb=i;ago=s;rows=ke([]);plans=ke({});busy=ke(null);choice={};defaultPlan=`small`;constructor(){this.api.settings().subscribe(t=>{this.plans.set(t.plans),this.defaultPlan=t.default_plan,this.load()})}load(){this.api.users(`pending`).subscribe(t=>{t.forEach(e=>this.choice[e.id]??=this.defaultPlan),this.rows.set(t)})}approve(t){this.busy.set(t.id),this.api.approve(t.username,this.choice[t.id]).subscribe({next:()=>{this.notify.ok(`${t.email} approved \u2013 workspace created`),this.busy.set(null),this.load()},error:()=>this.busy.set(null)})}reject(t){ba(this.dialog,{title:`Reject request?`,message:`${t.email} will be removed. They can request again by logging in.`,ok:`Reject`,danger:!0}).subscribe(e=>e&&this.api.reject(t.username).subscribe(()=>{this.notify.ok(`Rejected`),this.load()}))}static ɵfac=function(e){return new(e||o)};static ɵcmp=Te({type:o,selectors:[[`ng-component`]],decls:14,vars:1,consts:[[1,`page`],[1,`page-head`],[`mat-stroked-button`,``,3,`click`],[1,`muted`],[1,`grid`,`list`],[1,`card`,`item`],[1,`card`,`empty`],[1,`who`],[`subscriptSizing`,`dynamic`,1,`plan`],[3,`ngModelChange`,`ngModel`],[3,`value`],[`mat-flat-button`,``,3,`click`,`disabled`],[`mat-stroked-button`,``,3,`click`,`disabled`]],template:function(e,r){e&1&&(Ys(0,`div`,0)(1,`div`,1)(2,`h1`),dS(3,`Pending approval`),od(),Ys(4,`button`,2),Ug(`click`,function(){return r.load()}),Ys(5,`mat-icon`),dS(6,`refresh`),od(),dS(7,` Refresh`),od()(),Ys(8,`p`,3),dS(9,`These people signed in with AWS SSO but are not approved yet. Approving creates their workspace.`),od(),Ys(10,`div`,4),Mw(11,ie,24,8,`div`,5,Z,!1,ne,5,0,`div`,6),od()()),e&2&&(zo(11),Aw(r.rows()))},dependencies:[Fn,In,on,cW,aW,s8,i8,Xr,Qt,Ve,Qr,Ce,Xt,yC],styles:[`.list[_ngcontent-%COMP%]{grid-template-columns:1fr}.item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.who[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:240px}.plan[_ngcontent-%COMP%]{width:280px}`]})};export{Y as Pending};
@@ -0,0 +1,35 @@
1
+ import{St as Gn,Xn as ct,kn as Ye,pn as Te}from"./main-LWBML7JF.js";var g=(()=>{class n{labelPosition=`after`;static ɵfac=function(i){return new(i||n)};static ɵcmp=(function(){return Te({type:n,selectors:[[``,`mat-internal-form-field`,``]],hostAttrs:[1,`mdc-form-field`,`mat-internal-form-field`],hostVars:2,hostBindings:function(e,l){e&2&&ct(`mdc-form-field--align-end`,l.labelPosition===`before`)},inputs:{labelPosition:`labelPosition`},ngContentSelectors:[`*`],decls:1,vars:0,template:function(e,l){e&1&&(Gn(),Ye(0))},styles:[`.mat-internal-form-field {
2
+ -moz-osx-font-smoothing: grayscale;
3
+ -webkit-font-smoothing: antialiased;
4
+ display: inline-flex;
5
+ align-items: center;
6
+ vertical-align: middle;
7
+ }
8
+ .mat-internal-form-field > label, .mat-internal-form-field > .mat-internal-form-field-label {
9
+ margin-left: 0;
10
+ margin-right: auto;
11
+ padding-left: 4px;
12
+ padding-right: 0;
13
+ order: 0;
14
+ }
15
+ [dir=rtl] .mat-internal-form-field > label, [dir=rtl] .mat-internal-form-field > .mat-internal-form-field-label {
16
+ margin-left: auto;
17
+ margin-right: 0;
18
+ padding-left: 0;
19
+ padding-right: 4px;
20
+ }
21
+
22
+ .mdc-form-field--align-end > label, .mdc-form-field--align-end > .mat-internal-form-field-label {
23
+ margin-left: auto;
24
+ margin-right: 0;
25
+ padding-left: 0;
26
+ padding-right: 4px;
27
+ order: -1;
28
+ }
29
+ [dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label, [dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end .mat-internal-form-field-label {
30
+ margin-left: 0;
31
+ margin-right: auto;
32
+ padding-left: 4px;
33
+ padding-right: 0;
34
+ }
35
+ `],encapsulation:2})})()}return n})();export{g as t};
@@ -0,0 +1 @@
1
+ import{Jt as O,Sr as m,vt as F}from"./main-LWBML7JF.js";var s=class{_document;_textarea;constructor(e,o){this._document=o;let t=this._textarea=this._document.createElement(`textarea`),n=t.style;n.position=`fixed`,n.top=n.opacity=`0`,n.left=`-999em`,t.setAttribute(`aria-hidden`,`true`),t.value=e,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){let e=this._textarea,o=!1;try{if(e){let t=this._document.activeElement;e.select(),e.setSelectionRange(0,e.value.length),o=this._document.execCommand(`copy`),t&&t.focus()}}catch{}return o}destroy(){let e=this._textarea;e&&(e.remove(),this._textarea=void 0)}};var v=(()=>{class i{_document=m(O);copy(o){let t=this.beginCopy(o),n=t.copy();return t.destroy(),n}beginCopy(o){return new s(o,this._document)}static ɵfac=function(t){return new(t||i)};static ɵprov=F({token:i,factory:i.ɵfac})}return i})();export{v as t};
@@ -0,0 +1 @@
1
+ import{An as Yo,Ft as Ko,Jn as cW,Or as ob,Rr as rb,Sr as m,Vn as ad,Wt as Mw,Xn as ct,Zn as dS,b as Ut,cn as Qy,hr as jg,jn as Ys,kr as od,mn as Ug,on as Qg,ot as Aw,pn as Te,ri as zo,sn as Qo,ur as i8,vr as jw,yr as ke,zn as aW,zr as s8}from"./main-LWBML7JF.js";import{a as l,i,o as s,r as g}from"./chunk-D6j6hnz3.js";var N=(l,s)=>s.id;function R(l,s){if(l&1&&(Ys(0,`div`,17)(1,`span`,12),dS(2),od(),Ys(3,`span`),dS(4),od(),Ys(5,`span`,13),dS(6),od()()),l&2){let e=s.$implicit,o=jw(2);zo(),Qo(e.success?`none`:`error`),zo(),rb(e.action),zo(2),rb(e.target||`-`),zo(2),ob(`by `,e.actor,` · `,o.ago(e.ts))}}function q(l,s){l&1&&(Ys(0,`p`,13),dS(1,`No activity yet.`),od())}function A(l,s){if(l&1&&(Ys(0,`div`,3)(1,`a`,4)(2,`mat-icon`),dS(3,`group`),od(),Ys(4,`div`)(5,`b`),dS(6),od(),Ys(7,`span`),dS(8,`Users`),od()()(),Ys(9,`a`,5)(10,`mat-icon`),dS(11,`how_to_reg`),od(),Ys(12,`div`)(13,`b`),dS(14),od(),Ys(15,`span`),dS(16,`Pending approval`),od()()(),Ys(17,`div`,6)(18,`mat-icon`),dS(19,`terminal`),od(),Ys(20,`div`)(21,`b`),dS(22),od(),Ys(23,`span`),dS(24,`Running workspaces`),od()()(),Ys(25,`a`,7)(26,`mat-icon`),dS(27,`devices`),od(),Ys(28,`div`)(29,`b`),dS(30),od(),Ys(31,`span`),dS(32,`Active sessions`),od()()()(),Ys(33,`div`,8)(34,`div`,9)(35,`h3`),dS(36,`Server`),od(),Ys(37,`div`,10)(38,`span`),dS(39),od(),Ys(40,`b`),dS(41),od()(),Ys(42,`div`),jg(43,`div`),od(),Ys(44,`div`,10)(45,`span`),dS(46,`Memory`),od(),Ys(47,`b`),dS(48),od()(),Ys(49,`div`),jg(50,`div`),od(),Ys(51,`div`,10)(52,`span`),dS(53,`Disk (/home)`),od(),Ys(54,`b`),dS(55),od()(),Ys(56,`div`),jg(57,`div`),od(),Ys(58,`div`,11)(59,`span`,12),dS(60),od(),Ys(61,`span`,12),dS(62),od()()(),Ys(63,`div`,9)(64,`h3`),dS(65,`Allocated to workspaces`),od(),Ys(66,`div`,10)(67,`span`),dS(68,`CPU`),od(),Ys(69,`b`),dS(70),od()(),Ys(71,`div`),jg(72,`div`),od(),Ys(73,`div`,10)(74,`span`),dS(75,`Memory`),od(),Ys(76,`b`),dS(77),od()(),Ys(78,`div`),jg(79,`div`),od(),Ys(80,`div`,10)(81,`span`),dS(82,`Disk`),od(),Ys(83,`b`),dS(84),od()(),Ys(85,`div`),jg(86,`div`),od(),Ys(87,`p`,13),dS(88,`Over 100% is allowed (overcommit) – idle workspaces are stopped automatically.`),od()()(),Ys(89,`div`,9)(90,`div`,14)(91,`h3`,15),dS(92,`Recent activity`),od(),Ys(93,`a`,16),dS(94,`View all`),od()(),Mw(95,R,7,6,`div`,17,N,!1,q,2,0,`p`,13),od()),l&2){let e=s,o=jw();zo(6),rb(e.users.total),zo(3),ct(`attn`,e.users.pending>0),zo(5),rb(e.users.pending),zo(8),rb(e.workspaces_running),zo(8),rb(e.active_sessions),zo(9),ad(`CPU (`,e.host.cpu_count,` cores)`),zo(2),ad(``,e.host.cpu_pct,`%`),zo(),Qo(o.barClass(e.host.cpu_pct)),zo(),Qg(`width`,e.host.cpu_pct,`%`),zo(5),ob(``,o.gb(e.host.mem_used_mb),` / `,o.gb(e.host.mem_total_mb)),zo(),Qo(o.barClass(o.pct(e.host.mem_used_mb,e.host.mem_total_mb))),zo(),Qg(`width`,o.pct(e.host.mem_used_mb,e.host.mem_total_mb),`%`),zo(5),ob(``,e.host.disk_used_gb,` / `,e.host.disk_total_gb,` GB`),zo(),Qo(o.barClass(o.pct(e.host.disk_used_gb,e.host.disk_total_gb))),zo(),Qg(`width`,o.pct(e.host.disk_used_gb,e.host.disk_total_gb),`%`),zo(2),Qo(e.host.docker_ok?`active`:`error`),zo(),ad(`Docker `,e.host.docker_ok?`OK`:`down`),zo(),Qo(e.host.quota_enabled?`active`:`pending`),zo(),ad(`Disk quota `,e.host.quota_enabled?`enforced`:`monitor only`),zo(8),ob(``,e.allocated.cpu,` / `,e.host.cpu_count,` cores`),zo(),Qo(o.barClass(o.pct(e.allocated.cpu,e.host.cpu_count))),zo(),Qg(`width`,o.pct(e.allocated.cpu,e.host.cpu_count),`%`),zo(5),ob(``,o.gb(e.allocated.mem_mb),` / `,o.gb(e.host.mem_total_mb)),zo(),Qo(o.barClass(o.pct(e.allocated.mem_mb,e.host.mem_total_mb))),zo(),Qg(`width`,o.pct(e.allocated.mem_mb,e.host.mem_total_mb),`%`),zo(5),ob(``,e.allocated.disk_gb,` / `,e.host.disk_total_gb,` GB`),zo(),Qo(o.barClass(o.pct(e.allocated.disk_gb,e.host.disk_total_gb))),zo(),Qg(`width`,o.pct(e.allocated.disk_gb,e.host.disk_total_gb),`%`),zo(9),Aw(e.recent)}}var L=class l$1{api=m(Qy);s=ke(null);gb=i;pct=g;barClass=l;ago=s;timer=setInterval(()=>this.load(),3e4);constructor(){this.load()}load(){this.api.stats().subscribe(s=>this.s.set(s))}ngOnDestroy(){clearInterval(this.timer)}static ɵfac=function(e){return new(e||l$1)};static ɵcmp=Te({type:l$1,selectors:[[`ng-component`]],decls:9,vars:1,consts:[[1,`page`],[1,`page-head`],[`mat-stroked-button`,``,3,`click`],[1,`grid`,`kpis`],[`routerLink`,`/users`,1,`card`,`kpi`],[`routerLink`,`/pending`,1,`card`,`kpi`],[1,`card`,`kpi`],[`routerLink`,`/sessions`,1,`card`,`kpi`],[1,`grid`,`two`],[1,`card`],[1,`meter`],[1,`row`,`status`],[1,`chip`],[1,`muted`],[1,`row`],[1,`spacer`],[`mat-button`,``,`routerLink`,`/audit`],[1,`act`]],template:function(e,o){if(e&1&&(Ys(0,`div`,0)(1,`div`,1)(2,`h1`),dS(3,`Dashboard`),od(),Ys(4,`button`,2),Ug(`click`,function(){return o.load()}),Ys(5,`mat-icon`),dS(6,`refresh`),od(),dS(7,` Refresh`),od()(),Yo(8,A,98,49),od()),e&2){let x;zo(8),Ko((x=o.s())?8:-1,x)}},dependencies:[Ut,s8,i8,cW,aW],styles:[`.kpis[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-bottom:16px}.kpi[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;text-decoration:none;color:inherit}.kpi[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#3b82f6;font-size:30px;width:30px;height:30px}.kpi[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:26px;display:block}.kpi[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6b7280;font-size:13px}.kpi.attn[_ngcontent-%COMP%]{border-color:#f59e0b}.kpi.attn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#f59e0b}.two[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(340px,1fr));margin-bottom:16px}h3[_ngcontent-%COMP%]{margin:0 0 12px;font-size:15px}.meter[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin:12px 0 6px;font-size:13px}.status[_ngcontent-%COMP%]{margin-top:16px}.act[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #f1f5f9;font-size:13px;flex-wrap:wrap}`]})};export{L as Dashboard};
@@ -0,0 +1,27 @@
1
+ import{a as Ne,d as Xt,i as Ke,l as Vt,m as je,p as en}from"./chunk-BoGqYCjO.js";import{Ar as oe,Cn as Wn,Dn as Xs,Et as Hg,Fn as _3,Gt as Nt,Hn as ae,It as Kt,Nt as Ke$1,Pr as qe,Qn as db,Qt as P,Rn as _s,Sr as m,Xn as ct,Xr as xe,_ as x,a as Qt,at as Ar,bn as Wd,br as l3,cr as ge,g as se,ir as g,lr as hn,m as nn,mn as Ug,pn as Te,rt as $r,st as B,tr as fe,vt as F,xr as lt}from"./main-LWBML7JF.js";var Q=(()=>{class n{static ɵfac=function(t){return new(t||n)};static ɵcmp=Te({type:n,selectors:[[`ng-component`]],hostAttrs:[`cdk-text-field-style-loader`,``],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize {
2
+ resize: none;
3
+ }
4
+
5
+ textarea.cdk-textarea-autosize-measuring {
6
+ padding: 2px 0 !important;
7
+ box-sizing: content-box !important;
8
+ height: auto !important;
9
+ overflow: hidden !important;
10
+ }
11
+
12
+ textarea.cdk-textarea-autosize-measuring-firefox {
13
+ padding: 2px 0 !important;
14
+ box-sizing: content-box !important;
15
+ height: 0 !important;
16
+ }
17
+
18
+ @keyframes cdk-text-field-autofill-start { /*!*/ }
19
+ @keyframes cdk-text-field-autofill-end { /*!*/ }
20
+ .cdk-text-field-autofill-monitored:-webkit-autofill {
21
+ animation: cdk-text-field-autofill-start 0s 1ms;
22
+ }
23
+
24
+ .cdk-text-field-autofill-monitored:not(:-webkit-autofill) {
25
+ animation: cdk-text-field-autofill-end 0s 1ms;
26
+ }
27
+ `],encapsulation:2})}return n})();var ee={passive:!0};var $=(()=>{class n{_platform=m(ge);_ngZone=m(P);_renderer=m(qe).createRenderer(null,null);_styleLoader=m(Nt);_monitoredElements=/* @__PURE__ */ new Map;monitor(e){if(!this._platform.isBrowser)return hn;this._styleLoader.load(Q);let t=lt(e),i=this._monitoredElements.get(t);if(i)return i.subject;let r=new B,a=`cdk-text-field-autofilled`,o=d=>{d.animationName===`cdk-text-field-autofill-start`&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:d.target,isAutofilled:!0}))):d.animationName===`cdk-text-field-autofill-end`&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:d.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(t.classList.add(`cdk-text-field-autofill-monitored`),this._renderer.listen(t,`animationstart`,o,ee)));return this._monitoredElements.set(t,{subject:r,unlisten:l}),r}stopMonitoring(e){let t=lt(e),i=this._monitoredElements.get(t);i&&(i.unlisten(),i.subject.complete(),t.classList.remove(`cdk-text-field-autofill-monitored`),t.classList.remove(`cdk-text-field-autofilled`),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static ɵfac=function(t){return new(t||n)};static ɵprov=F({token:n,factory:n.ɵfac})}return n})();var W=(()=>{class n{static ɵfac=function(t){return new(t||n)};static ɵmod=fe({type:n});static ɵinj=ae({})}return n})();var Y=new g(`MAT_INPUT_VALUE_ACCESSOR`);var te=[`button`,`checkbox`,`file`,`hidden`,`image`,`radio`,`range`,`reset`,`submit`];var ie=new g(`MAT_INPUT_CONFIG`);var Be=(()=>{class n{_elementRef=m(oe);_platform=m(ge);ngControl=m(x,{optional:!0,self:!0});_autofillMonitor=m($);_ngZone=m(P);_formField=m(Ke,{optional:!0});_renderer=m(Ar);_uid=m(Wd).getId(`mat-input-`);_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=m(ie,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new B;controlType=`mat-input`;autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=_3(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(se.required)??!1}set required(e){this._required=_3(e)}_required;get type(){return this._type}set type(e){this._type=e||`text`,this._validateType(),!this._isTextarea&&l3().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type=`text`;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=_3(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=[`date`,`datetime`,`datetime-local`,`month`,`time`,`week`].filter(e=>l3().has(e));constructor(){let e=m(Qt,{optional:!0}),t=m(nn,{optional:!0}),i=m(en),r=m(Y,{optional:!0,self:!0}),a=m(Vt,{optional:!0,self:!0}),o=this._elementRef.nativeElement,l=o.nodeName.toLowerCase();r?Kt(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=o,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(o,`keyup`,this._iOSKeyupListener)}),this._errorStateTracker=new Ne(i,a||this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=l===`select`,this._isTextarea=l===`textarea`,this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=o.multiple?`mat-native-select-multiple`:`mat-native-select`),this._signalBasedValueAccessor&&_s(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type===`number`?(t.type=`text`,t.setSelectionRange(0,0),t.type=`number`):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute(`placeholder`,e):t.removeAttribute(`placeholder`)}}_getPlaceholder(){return this.placeholder||null}_validateType(){te.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute(`aria-describedby`)?.split(` `)||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute(`aria-describedby`,e.join(` `)):t.removeAttribute(`aria-describedby`)}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?`true`:null}static ɵfac=function(t){return new(t||n)};static ɵdir=xe({type:n,selectors:[[`input`,`matInput`,``],[`textarea`,`matInput`,``],[`select`,`matNativeControl`,``],[`input`,`matNativeControl`,``],[`textarea`,`matNativeControl`,``]],hostAttrs:[1,`mat-mdc-input-element`],hostVars:21,hostBindings:function(t,i){t&1&&Ug(`focus`,function(){return i._focusChanged(!0)})(`blur`,function(){return i._focusChanged(!1)})(`input`,function(){return i._onInput()}),t&2&&(Hg(`id`,i.id)(`disabled`,i.disabled&&!i.disabledInteractive)(`required`,i.required),Wn(`name`,i.name||null)(`readonly`,i._getReadonlyAttribute())(`aria-disabled`,i.disabled&&i.disabledInteractive?`true`:null)(`aria-invalid`,i.empty&&i.required?null:i.errorState)(`aria-required`,i.required)(`id`,i.id),ct(`mat-input-server`,i._isServer)(`mat-mdc-form-field-textarea-control`,i._isInFormField&&i._isTextarea)(`mat-mdc-form-field-input-control`,i._isInFormField)(`mat-mdc-input-disabled-interactive`,i.disabledInteractive)(`mdc-text-field__input`,i._isInFormField)(`mat-mdc-native-select-inline`,i._isInlineSelect()))},inputs:{disabled:`disabled`,id:`id`,placeholder:`placeholder`,name:`name`,required:`required`,type:`type`,errorStateMatcher:`errorStateMatcher`,userAriaDescribedBy:[0,`aria-describedby`,`userAriaDescribedBy`],value:`value`,readonly:`readonly`,disabledInteractive:[2,`disabledInteractive`,`disabledInteractive`,Ke$1]},exportAs:[`matInput`],features:[db([{provide:je,useExisting:n}]),Xs]})}return n})();var Pe=(()=>{class n{static ɵfac=function(t){return new(t||n)};static ɵmod=fe({type:n});static ɵinj=ae({imports:[Xt,Xt,W,$r]})}return n})();export{Pe as n,Be as t};