p3x-redis-ui-material
Version:
💿 The p3x-redis-ui-material web interface that connects to the p3x-redis-ui-server via http and socket.io
1 lines • 35.5 kB
JavaScript
"use strict";(self.webpackChunkp3x_redis_ui_material=self.webpackChunkp3x_redis_ui_material||[]).push([[619],{14861(e,t,n){n.d(t,{kZ:()=>A,s3:()=>W,NL:()=>R,Dc:()=>X,xn:()=>O,Sz:()=>K,a$:()=>S,aI:()=>F,Hy:()=>z,XW:()=>w});var s=n(46213),i=n(89166),a=n(30372),r=n(15376),o=n(87661),d=n(99640),l=n(39419),c=n(50260),h=n(95213),p=(n(71872),n(3677)),u=n(40528),_=n(77137),g=n(99258),f=n(8726),x=n(91660);var v=n(20610);function y(e,t){return(0,v.N)(function(e,t,n,s,i){return function(a,r){var o=n,d=t,l=0;a.subscribe((0,x._)(r,(function(t){var n=l++;d=o?e(d,t,n):(o=!0,t),s&&r.next(d)}),i&&function(){o&&r.next(d),r.complete()}))}}(e,t,arguments.length>=2,!1,!0))}var m=n(66510),D=n(85698),b=n(51218),N=n(24698),E=n(11228),C=n(94021),I=n(39545),k=n(19820),M=n(76e3);class T{dataNodes;expansionModel=new s.C(!0);trackBy;getLevel;isExpandable;getChildren;toggle(e){this.expansionModel.toggle(this._trackByValue(e))}expand(e){this.expansionModel.select(this._trackByValue(e))}collapse(e){this.expansionModel.deselect(this._trackByValue(e))}isExpanded(e){return this.expansionModel.isSelected(this._trackByValue(e))}toggleDescendants(e){this.expansionModel.isSelected(this._trackByValue(e))?this.collapseDescendants(e):this.expandDescendants(e)}collapseAll(){this.expansionModel.clear()}expandDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.select(...t.map((e=>this._trackByValue(e))))}collapseDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.deselect(...t.map((e=>this._trackByValue(e))))}_trackByValue(e){return this.trackBy?this.trackBy(e):e}}class w extends T{getLevel;isExpandable;options;constructor(e,t,n){super(),this.getLevel=e,this.isExpandable=t,this.options=n,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(e){const t=[];for(let n=this.dataNodes.indexOf(e)+1;n<this.dataNodes.length&&this.getLevel(e)<this.getLevel(this.dataNodes[n]);n++)t.push(this.dataNodes[n]);return t}expandAll(){this.expansionModel.select(...this.dataNodes.map((e=>this._trackByValue(e))))}}const A=new N.nKC("CDK_TREE_NODE_OUTLET_NODE");class S{viewContainer=(0,N.WQX)(b.c1b);_node=(0,N.WQX)(A,{optional:!0});constructor(){}static ɵfac=function(e){return new(e||S)};static ɵdir=b.FsC({type:S,selectors:[["","cdkTreeNodeOutlet",""]]})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(S,[{type:b.WLR,args:[{selector:"[cdkTreeNodeOutlet]"}]}],(()=>[]),null);class L{$implicit;level;index;count;constructor(e){this.$implicit=e}}class K{template=(0,N.WQX)(b.C4Q);when;constructor(){}static ɵfac=function(e){return new(e||K)};static ɵdir=b.FsC({type:K,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]}})}function B(){return Error("Could not find a tree control, levelAccessor, or childrenAccessor for the tree.")}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(K,[{type:b.WLR,args:[{selector:"[cdkTreeNodeDef]",inputs:[{name:"when",alias:"cdkTreeNodeDefWhen"}]}]}],(()=>[]),null);class R{_differs=(0,N.WQX)(E._q3);_changeDetectorRef=(0,N.WQX)(E.gRc);_elementRef=(0,N.WQX)(b.aKT);_dir=(0,N.WQX)(I.dS);_onDestroy=new a.B;_dataDiffer;_defaultNodeDef=null;_dataSubscription;_levels=new Map;_parents=new Map;_ariaSets=new Map;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}_dataSource;treeControl;levelAccessor;childrenAccessor;trackBy;expansionKey;_nodeOutlet;_nodeDefs;viewChange=new r.t({start:0,end:Number.MAX_VALUE});_expansionModel;_flattenedNodes=new r.t([]);_nodeType=new r.t(null);_nodes=new r.t(new Map);_keyManagerNodes=new r.t([]);_keyManagerFactory=(0,N.WQX)(C.Z);_keyManager;_viewInit=!1;constructor(){}ngAfterContentInit(){this._initializeKeyManager()}ngAfterContentChecked(){this._updateDefaultNodeDefinition(),this._subscribeToDataChanges()}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this._nodes.complete(),this._keyManagerNodes.complete(),this._nodeType.complete(),this._flattenedNodes.complete(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription?.unsubscribe(),this._dataSubscription=void 0,this._keyManager?.destroy()}ngOnInit(){this._checkTreeControlUsage(),this._initializeDataDiffer()}ngAfterViewInit(){this._viewInit=!0}_updateDefaultNodeDefinition(){const e=this._nodeDefs.filter((e=>!e.when));if(e.length>1&&("undefined"==typeof ngDevMode||ngDevMode))throw Error("There can only be one default row without a when predicate function.");this._defaultNodeDef=e[0]}_setNodeTypeIfUnset(e){const t=this._nodeType.value;null===t?this._nodeType.next(e):"undefined"!=typeof ngDevMode&&!ngDevMode||t===e||console.warn(`Tree is using conflicting node types which can cause unexpected behavior. Please use tree nodes of the same type (e.g. only flat or only nested). Current node type: "${t}", new node type "${e}".`)}_switchDataSource(e){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription?.unsubscribe(),this._dataSubscription=void 0,e||this._nodeOutlet.viewContainer.clear(),this._dataSource=e,this._nodeDefs&&this._subscribeToDataChanges()}_getExpansionModel(){return this.treeControl?this.treeControl.expansionModel:(this._expansionModel??=new s.C(!0),this._expansionModel)}_subscribeToDataChanges(){if(this._dataSubscription)return;let e;if((0,k.y)(this._dataSource)?e=this._dataSource.connect(this):(0,i.A)(this._dataSource)?e=this._dataSource:Array.isArray(this._dataSource)&&(e=(0,o.of)(this._dataSource)),e)this._dataSubscription=this._getRenderData(e).pipe((0,p.Q)(this._onDestroy)).subscribe((e=>{this._renderDataChanges(e)}));else if("undefined"==typeof ngDevMode||ngDevMode)throw Error("A valid data source must be provided.")}_getRenderData(e){const t=this._getExpansionModel();return(0,d.z)([e,this._nodeType,t.changed.pipe((0,u.Z)(null),(0,_.M)((e=>{this._emitExpansionChanges(e)})))]).pipe((0,g.n)((([e,t])=>null===t?(0,o.of)({renderNodes:e,flattenedNodes:null,nodeType:t}):this._computeRenderingData(e,t).pipe((0,f.T)((e=>({...e,nodeType:t})))))))}_renderDataChanges(e){null!==e.nodeType?(this._updateCachedData(e.flattenedNodes),this.renderNodeChanges(e.renderNodes),this._updateKeyManagerItems(e.flattenedNodes)):this.renderNodeChanges(e.renderNodes)}_emitExpansionChanges(e){if(!e)return;const t=this._nodes.value;for(const n of e.added){const e=t.get(n);e?._emitExpansionState(!0)}for(const n of e.removed){const e=t.get(n);e?._emitExpansionState(!1)}}_initializeKeyManager(){const e=(0,d.z)([this._keyManagerNodes,this._nodes]).pipe((0,f.T)((([e,t])=>e.reduce(((e,n)=>{const s=t.get(this._getExpansionKey(n));return s&&e.push(s),e}),[])))),t={trackBy:e=>this._getExpansionKey(e.data),skipPredicate:e=>!!e.isDisabled,typeAheadDebounceInterval:!0,horizontalOrientation:this._dir.value};this._keyManager=this._keyManagerFactory(e,t)}_initializeDataDiffer(){const e=this.trackBy??((e,t)=>this._getExpansionKey(t));this._dataDiffer=this._differs.find([]).create(e)}_checkTreeControlUsage(){if("undefined"==typeof ngDevMode||ngDevMode){let e=0;if(this.treeControl&&e++,this.levelAccessor&&e++,this.childrenAccessor&&e++,!e)throw B();if(e>1)throw Error("More than one of tree control, levelAccessor, or childrenAccessor were provided.")}}renderNodeChanges(e,t=this._dataDiffer,n=this._nodeOutlet.viewContainer,s){const i=t.diff(e);(i||this._viewInit)&&(i?.forEachOperation(((t,i,a)=>{if(null==t.previousIndex)this.insertNode(e[a],a,n,s);else if(null==a)n.remove(i);else{const e=n.get(i);n.move(e,a)}})),i?.forEachIdentityChange((e=>{const t=e.item;if(null!=e.currentIndex){n.get(e.currentIndex).context.$implicit=t}})),s?this._changeDetectorRef.markForCheck():this._changeDetectorRef.detectChanges())}_getNodeDef(e,t){if(1===this._nodeDefs.length)return this._nodeDefs.first;const n=this._nodeDefs.find((n=>n.when&&n.when(t,e)))||this._defaultNodeDef;if(!n&&("undefined"==typeof ngDevMode||ngDevMode))throw Error("Could not find a matching node definition for the provided node data.");return n}insertNode(e,t,n,s){const i=this._getLevelAccessor(),a=this._getNodeDef(e,t),r=this._getExpansionKey(e),o=new L(e);o.index=t,s??=this._parents.get(r)??void 0,i?o.level=i(e):void 0!==s&&this._levels.has(this._getExpansionKey(s))?o.level=this._levels.get(this._getExpansionKey(s))+1:o.level=0,this._levels.set(r,o.level);(n||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,o,t),O.mostRecentTreeNode&&(O.mostRecentTreeNode.data=e)}isExpanded(e){return!(!this.treeControl?.isExpanded(e)&&!this._expansionModel?.isSelected(this._getExpansionKey(e)))}toggle(e){this.treeControl?this.treeControl.toggle(e):this._expansionModel&&this._expansionModel.toggle(this._getExpansionKey(e))}expand(e){this.treeControl?this.treeControl.expand(e):this._expansionModel&&this._expansionModel.select(this._getExpansionKey(e))}collapse(e){this.treeControl?this.treeControl.collapse(e):this._expansionModel&&this._expansionModel.deselect(this._getExpansionKey(e))}toggleDescendants(e){this.treeControl?this.treeControl.toggleDescendants(e):this._expansionModel&&(this.isExpanded(e)?this.collapseDescendants(e):this.expandDescendants(e))}expandDescendants(e){if(this.treeControl)this.treeControl.expandDescendants(e);else if(this._expansionModel){const t=this._expansionModel;t.select(this._getExpansionKey(e)),this._getDescendants(e).pipe((0,h.s)(1),(0,p.Q)(this._onDestroy)).subscribe((e=>{t.select(...e.map((e=>this._getExpansionKey(e))))}))}}collapseDescendants(e){if(this.treeControl)this.treeControl.collapseDescendants(e);else if(this._expansionModel){const t=this._expansionModel;t.deselect(this._getExpansionKey(e)),this._getDescendants(e).pipe((0,h.s)(1),(0,p.Q)(this._onDestroy)).subscribe((e=>{t.deselect(...e.map((e=>this._getExpansionKey(e))))}))}}expandAll(){this.treeControl?this.treeControl.expandAll():this._expansionModel&&this._forEachExpansionKey((e=>this._expansionModel?.select(...e)))}collapseAll(){this.treeControl?this.treeControl.collapseAll():this._expansionModel&&this._forEachExpansionKey((e=>this._expansionModel?.deselect(...e)))}_getLevelAccessor(){return this.treeControl?.getLevel?.bind(this.treeControl)??this.levelAccessor}_getChildrenAccessor(){return this.treeControl?.getChildren?.bind(this.treeControl)??this.childrenAccessor}_getDirectChildren(e){const t=this._getLevelAccessor(),n=this._expansionModel??this.treeControl?.expansionModel;if(!n)return(0,o.of)([]);const s=this._getExpansionKey(e),i=n.changed.pipe((0,g.n)((e=>e.added.includes(s)?(0,o.of)(!0):e.removed.includes(s)?(0,o.of)(!1):l.w)),(0,u.Z)(this.isExpanded(e)));if(t)return(0,d.z)([i,this._flattenedNodes]).pipe((0,f.T)((([n,s])=>n?this._findChildrenByLevel(t,s,e,1):[])));const a=this._getChildrenAccessor();if(a)return(0,M.x)(a(e)??[]);throw B()}_findChildrenByLevel(e,t,n,s){const i=this._getExpansionKey(n),a=t.findIndex((e=>this._getExpansionKey(e)===i)),r=e(n),o=r+s,d=[];for(let n=a+1;n<t.length;n++){const s=e(t[n]);if(s<=r)break;s<=o&&d.push(t[n])}return d}_registerNode(e){this._nodes.value.set(this._getExpansionKey(e.data),e),this._nodes.next(this._nodes.value)}_unregisterNode(e){this._nodes.value.delete(this._getExpansionKey(e.data)),this._nodes.next(this._nodes.value)}_getLevel(e){return this._levels.get(this._getExpansionKey(e))}_getSetSize(e){return this._getAriaSet(e).length}_getPositionInSet(e){const t=this._getAriaSet(e),n=this._getExpansionKey(e);return t.findIndex((e=>this._getExpansionKey(e)===n))+1}_getNodeParent(e){const t=this._parents.get(this._getExpansionKey(e.data));return t&&this._nodes.value.get(this._getExpansionKey(t))}_getNodeChildren(e){return this._getDirectChildren(e.data).pipe((0,f.T)((e=>e.reduce(((e,t)=>{const n=this._nodes.value.get(this._getExpansionKey(t));return n&&e.push(n),e}),[]))))}_sendKeydownToKeyManager(e){if(e.target===this._elementRef.nativeElement)this._keyManager.onKeydown(e);else{const t=this._nodes.getValue();for(const[,n]of t)if(e.target===n._elementRef.nativeElement){this._keyManager.onKeydown(e);break}}}_getDescendants(e){if(this.treeControl)return(0,o.of)(this.treeControl.getDescendants(e));if(this.levelAccessor){const t=this._findChildrenByLevel(this.levelAccessor,this._flattenedNodes.value,e,1/0);return(0,o.of)(t)}if(this.childrenAccessor)return this._getAllChildrenRecursively(e).pipe(y(((e,t)=>(e.push(...t),e)),[]));throw B()}_getAllChildrenRecursively(e){return this.childrenAccessor?(0,M.x)(this.childrenAccessor(e)).pipe((0,h.s)(1),(0,g.n)((t=>{for(const n of t)this._parents.set(this._getExpansionKey(n),e);return(0,o.of)(...t).pipe((0,m.H)((e=>(0,c.x)((0,o.of)([e]),this._getAllChildrenRecursively(e)))))}))):(0,o.of)([])}_getExpansionKey(e){return this.expansionKey?.(e)??e}_getAriaSet(e){const t=this._getExpansionKey(e),n=this._parents.get(t),s=n?this._getExpansionKey(n):null;return this._ariaSets.get(s)??[e]}_findParentForNode(e,t,n){if(!n.length)return null;const s=this._levels.get(this._getExpansionKey(e))??0;for(let e=t-1;e>=0;e--){const t=n[e];if((this._levels.get(this._getExpansionKey(t))??0)<s)return t}return null}_flattenNestedNodesWithExpansion(e,t=0){const n=this._getChildrenAccessor();return n?(0,o.of)(...e).pipe((0,m.H)((e=>{const s=this._getExpansionKey(e);this._parents.has(s)||this._parents.set(s,null),this._levels.set(s,t);const i=(0,M.x)(n(e));return(0,c.x)((0,o.of)([e]),i.pipe((0,h.s)(1),(0,_.M)((n=>{this._ariaSets.set(s,[...n??[]]);for(const s of n??[]){const n=this._getExpansionKey(s);this._parents.set(n,e),this._levels.set(n,t+1)}})),(0,g.n)((n=>n?this._flattenNestedNodesWithExpansion(n,t+1).pipe((0,f.T)((t=>this.isExpanded(e)?t:[]))):(0,o.of)([])))))})),y(((e,t)=>(e.push(...t),e)),[])):(0,o.of)([...e])}_computeRenderingData(e,t){if(this.childrenAccessor&&"flat"===t)return this._clearPreviousCache(),this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe((0,f.T)((e=>({renderNodes:e,flattenedNodes:e}))));if(this.levelAccessor&&"nested"===t){const t=this.levelAccessor;return(0,o.of)(e.filter((e=>0===t(e)))).pipe((0,f.T)((t=>({renderNodes:t,flattenedNodes:e}))),(0,_.M)((({flattenedNodes:e})=>{this._calculateParents(e)})))}return"flat"===t?(0,o.of)({renderNodes:e,flattenedNodes:e}).pipe((0,_.M)((({flattenedNodes:e})=>{this._calculateParents(e)}))):(this._clearPreviousCache(),this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe((0,f.T)((t=>({renderNodes:e,flattenedNodes:t})))))}_updateCachedData(e){this._flattenedNodes.next(e)}_updateKeyManagerItems(e){this._keyManagerNodes.next(e)}_calculateParents(e){const t=this._getLevelAccessor();if(t){this._clearPreviousCache();for(let n=0;n<e.length;n++){const s=e[n],i=this._getExpansionKey(s);this._levels.set(i,t(s));const a=this._findParentForNode(s,n,e);this._parents.set(i,a);const r=a?this._getExpansionKey(a):null,o=this._ariaSets.get(r)??[];o.splice(n,0,s),this._ariaSets.set(r,o)}}}_forEachExpansionKey(e){const t=[],n=[];this._nodes.value.forEach((e=>{t.push(this._getExpansionKey(e.data)),n.push(this._getDescendants(e.data))})),n.length>0?(0,d.z)(n).pipe((0,h.s)(1),(0,p.Q)(this._onDestroy)).subscribe((n=>{n.forEach((e=>e.forEach((e=>t.push(this._getExpansionKey(e)))))),e(t)})):e(t)}_clearPreviousCache(){this._parents.clear(),this._levels.clear(),this._ariaSets.clear()}static ɵfac=function(e){return new(e||R)};static ɵcmp=b.VBU({type:R,selectors:[["cdk-tree"]],contentQueries:function(e,t,n){if(1&e&&b.wni(n,K,5),2&e){let e;b.mGM(e=b.lsd())&&(t._nodeDefs=e)}},viewQuery:function(e,t){if(1&e&&b.GBs(S,7),2&e){let e;b.mGM(e=b.lsd())&&(t._nodeOutlet=e.first)}},hostAttrs:["role","tree",1,"cdk-tree"],hostBindings:function(e,t){1&e&&b.bIt("keydown",(function(e){return t._sendKeydownToKeyManager(e)}))},inputs:{dataSource:"dataSource",treeControl:"treeControl",levelAccessor:"levelAccessor",childrenAccessor:"childrenAccessor",trackBy:"trackBy",expansionKey:"expansionKey"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(e,t){1&e&&b.eu8(0,0)},dependencies:[S],encapsulation:2})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(R,[{type:b.uAl,args:[{selector:"cdk-tree",exportAs:"cdkTree",template:"<ng-container cdkTreeNodeOutlet></ng-container>",host:{class:"cdk-tree",role:"tree","(keydown)":"_sendKeydownToKeyManager($event)"},encapsulation:b.gXe.None,changeDetection:b.Ngq.Default,imports:[S]}]}],(()=>[]),{dataSource:[{type:b.pde}],treeControl:[{type:b.pde}],levelAccessor:[{type:b.pde}],childrenAccessor:[{type:b.pde}],trackBy:[{type:b.pde}],expansionKey:[{type:b.pde}],_nodeOutlet:[{type:E.Uct,args:[S,{static:!0}]}],_nodeDefs:[{type:E.F8v,args:[K,{descendants:!0}]}]});class O{_elementRef=(0,N.WQX)(b.aKT);_tree=(0,N.WQX)(R);_tabindex=-1;_type="flat";get role(){return"treeitem"}set role(e){}get isExpandable(){return this._isExpandable()}set isExpandable(e){this._inputIsExpandable=e,this.data&&!this._isExpandable||!this._inputIsExpandable||(this._inputIsExpanded?this.expand():!1===this._inputIsExpanded&&this.collapse())}get isExpanded(){return this._tree.isExpanded(this._data)}set isExpanded(e){this._inputIsExpanded=e,e?this.expand():this.collapse()}isDisabled=!1;typeaheadLabel=null;getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}activation=new N.bkB;expandedChange=new N.bkB;static mostRecentTreeNode=null;_destroyed=new a.B;_dataChanges=new a.B;_inputIsExpandable=!1;_inputIsExpanded=void 0;_shouldFocus=!0;_parentNodeAriaLevel;get data(){return this._data}set data(e){e!==this._data&&(this._data=e,this._dataChanges.next())}_data;get isLeafNode(){return void 0!==this._tree.treeControl?.isExpandable&&!this._tree.treeControl.isExpandable(this._data)||void 0===this._tree.treeControl?.isExpandable&&0===this._tree.treeControl?.getDescendants(this._data).length}get level(){return this._tree._getLevel(this._data)??this._parentNodeAriaLevel}_isExpandable(){return this._tree.treeControl?!this.isLeafNode:this._inputIsExpandable}_getAriaExpanded(){return this._isExpandable()?String(this.isExpanded):null}_getSetSize(){return this._tree._getSetSize(this._data)}_getPositionInSet(){return this._tree._getPositionInSet(this._data)}_changeDetectorRef=(0,N.WQX)(E.gRc);constructor(){O.mostRecentTreeNode=this}ngOnInit(){this._parentNodeAriaLevel=function(e){let t=e.parentElement;for(;t&&!P(t);)t=t.parentElement;if(t)return t.classList.contains("cdk-nested-tree-node")?(0,E.Udg)(t.getAttribute("aria-level")):0;if("undefined"==typeof ngDevMode||ngDevMode)throw Error("Incorrect tree structure containing detached node.");return-1}(this._elementRef.nativeElement),this._tree._getExpansionModel().changed.pipe((0,f.T)((()=>this.isExpanded)),(0,D.F)(),(0,p.Q)(this._destroyed)).pipe((0,p.Q)(this._destroyed)).subscribe((()=>this._changeDetectorRef.markForCheck())),this._tree._setNodeTypeIfUnset(this._type),this._tree._registerNode(this)}ngOnDestroy(){O.mostRecentTreeNode===this&&(O.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}getParent(){return this._tree._getNodeParent(this)??null}getChildren(){return this._tree._getNodeChildren(this)}focus(){this._tabindex=0,this._shouldFocus&&this._elementRef.nativeElement.focus(),this._changeDetectorRef.markForCheck()}unfocus(){this._tabindex=-1,this._changeDetectorRef.markForCheck()}activate(){this.isDisabled||this.activation.next(this._data)}collapse(){this.isExpandable&&this._tree.collapse(this._data)}expand(){this.isExpandable&&this._tree.expand(this._data)}makeFocusable(){this._tabindex=0,this._changeDetectorRef.markForCheck()}_focusItem(){this.isDisabled||this._tree._keyManager.focusItem(this)}_setActiveItem(){this.isDisabled||(this._shouldFocus=!1,this._tree._keyManager.focusItem(this),this._shouldFocus=!0)}_emitExpansionState(e){this.expandedChange.emit(e)}static ɵfac=function(e){return new(e||O)};static ɵdir=b.FsC({type:O,selectors:[["cdk-tree-node"]],hostAttrs:["role","treeitem",1,"cdk-tree-node"],hostVars:5,hostBindings:function(e,t){1&e&&b.bIt("click",(function(){return t._setActiveItem()}))("focus",(function(){return t._focusItem()})),2&e&&(b.Avn("tabIndex",t._tabindex),b.BMQ("aria-expanded",t._getAriaExpanded())("aria-level",t.level+1)("aria-posinset",t._getPositionInSet())("aria-setsize",t._getSetSize()))},inputs:{role:"role",isExpandable:[2,"isExpandable","isExpandable",E.L39],isExpanded:"isExpanded",isDisabled:[2,"isDisabled","isDisabled",E.L39],typeaheadLabel:[0,"cdkTreeNodeTypeaheadLabel","typeaheadLabel"]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["cdkTreeNode"]})}function P(e){const t=e.classList;return!(!t?.contains("cdk-nested-tree-node")&&!t?.contains("cdk-tree"))}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(O,[{type:b.WLR,args:[{selector:"cdk-tree-node",exportAs:"cdkTreeNode",host:{class:"cdk-tree-node","[attr.aria-expanded]":"_getAriaExpanded()","[attr.aria-level]":"level + 1","[attr.aria-posinset]":"_getPositionInSet()","[attr.aria-setsize]":"_getSetSize()","[tabindex]":"_tabindex",role:"treeitem","(click)":"_setActiveItem()","(focus)":"_focusItem()"}}]}],(()=>[]),{role:[{type:b.pde}],isExpandable:[{type:b.pde,args:[{transform:E.L39}]}],isExpanded:[{type:b.pde}],isDisabled:[{type:b.pde,args:[{transform:E.L39}]}],typeaheadLabel:[{type:b.pde,args:["cdkTreeNodeTypeaheadLabel"]}],activation:[{type:b.k7i}],expandedChange:[{type:b.k7i}]});class W extends O{_type="nested";_differs=(0,N.WQX)(E._q3);_dataDiffer;_children;nodeOutlet;constructor(){super()}ngAfterContentInit(){this._dataDiffer=this._differs.find([]).create(this._tree.trackBy),this._tree._getDirectChildren(this.data).pipe((0,p.Q)(this._destroyed)).subscribe((e=>this.updateChildrenNodes(e))),this.nodeOutlet.changes.pipe((0,p.Q)(this._destroyed)).subscribe((()=>this.updateChildrenNodes()))}ngOnDestroy(){this._clear(),super.ngOnDestroy()}updateChildrenNodes(e){const t=this._getNodeOutlet();if(e&&(this._children=e),t&&this._children){const e=t.viewContainer;this._tree.renderNodeChanges(this._children,this._dataDiffer,e,this._data)}else this._dataDiffer.diff([])}_clear(){const e=this._getNodeOutlet();e&&(e.viewContainer.clear(),this._dataDiffer.diff([]))}_getNodeOutlet(){const e=this.nodeOutlet;return e&&e.find((e=>!e._node||e._node===this))}static ɵfac=function(e){return new(e||W)};static ɵdir=b.FsC({type:W,selectors:[["cdk-nested-tree-node"]],contentQueries:function(e,t,n){if(1&e&&b.wni(n,S,5),2&e){let e;b.mGM(e=b.lsd())&&(t.nodeOutlet=e)}},hostAttrs:[1,"cdk-nested-tree-node"],exportAs:["cdkNestedTreeNode"],features:[b.Jv_([{provide:O,useExisting:W},{provide:A,useExisting:W}]),b.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(W,[{type:b.WLR,args:[{selector:"cdk-nested-tree-node",exportAs:"cdkNestedTreeNode",providers:[{provide:O,useExisting:W},{provide:A,useExisting:W}],host:{class:"cdk-nested-tree-node"}}]}],(()=>[]),{nodeOutlet:[{type:E.F8v,args:[S,{descendants:!0}]}]});const Q=/([A-Za-z%]+)$/;class F{_treeNode=(0,N.WQX)(O);_tree=(0,N.WQX)(R);_element=(0,N.WQX)(b.aKT);_dir=(0,N.WQX)(I.dS,{optional:!0});_currentPadding=null;_destroyed=new a.B;indentUnits="px";get level(){return this._level}set level(e){this._setLevelInput(e)}_level;get indent(){return this._indent}set indent(e){this._setIndentInput(e)}_indent=40;constructor(){this._setPadding(),this._dir?.change.pipe((0,p.Q)(this._destroyed)).subscribe((()=>this._setPadding(!0))),this._treeNode._dataChanges.subscribe((()=>this._setPadding()))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){const e=(this._treeNode.data&&this._tree._getLevel(this._treeNode.data))??null,t=null==this._level?e:this._level;return"number"==typeof t?`${t*this._indent}${this.indentUnits}`:null}_setPadding(e=!1){const t=this._paddingIndent();if(t!==this._currentPadding||e){const e=this._element.nativeElement,n=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",s="paddingLeft"===n?"paddingRight":"paddingLeft";e.style[n]=t||"",e.style[s]="",this._currentPadding=t}}_setLevelInput(e){this._level=isNaN(e)?null:e,this._setPadding()}_setIndentInput(e){let t=e,n="px";if("string"==typeof e){const s=e.split(Q);t=s[0],n=s[1]||n}this.indentUnits=n,this._indent=(0,E.Udg)(t),this._setPadding()}static ɵfac=function(e){return new(e||F)};static ɵdir=b.FsC({type:F,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:[2,"cdkTreeNodePadding","level",E.Udg],indent:[0,"cdkTreeNodePaddingIndent","indent"]}})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(F,[{type:b.WLR,args:[{selector:"[cdkTreeNodePadding]"}]}],(()=>[]),{level:[{type:b.pde,args:[{alias:"cdkTreeNodePadding",transform:E.Udg}]}],indent:[{type:b.pde,args:["cdkTreeNodePaddingIndent"]}]});class z{_tree=(0,N.WQX)(R);_treeNode=(0,N.WQX)(O);recursive=!1;constructor(){}_toggle(){this.recursive?this._tree.toggleDescendants(this._treeNode.data):this._tree.toggle(this._treeNode.data),this._tree._keyManager.focusItem(this._treeNode)}static ɵfac=function(e){return new(e||z)};static ɵdir=b.FsC({type:z,selectors:[["","cdkTreeNodeToggle",""]],hostAttrs:["tabindex","-1"],hostBindings:function(e,t){1&e&&b.bIt("click",(function(e){return t._toggle(),e.stopPropagation()}))("keydown.Enter",(function(e){return t._toggle(),e.preventDefault()}))("keydown.Space",(function(e){return t._toggle(),e.preventDefault()}))},inputs:{recursive:[2,"cdkTreeNodeToggleRecursive","recursive",E.L39]}})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(z,[{type:b.WLR,args:[{selector:"[cdkTreeNodeToggle]",host:{"(click)":"_toggle(); $event.stopPropagation();","(keydown.Enter)":"_toggle(); $event.preventDefault();","(keydown.Space)":"_toggle(); $event.preventDefault();",tabindex:"-1"}}]}],(()=>[]),{recursive:[{type:b.pde,args:[{alias:"cdkTreeNodeToggleRecursive",transform:E.L39}]}]});const U=[W,K,F,z,R,O,S];class X{static ɵfac=function(e){return new(e||X)};static ɵmod=b.$C({type:X});static ɵinj=N.G2t({})}("undefined"==typeof ngDevMode||ngDevMode)&&b.cDI(X,[{type:b.UQu,args:[{imports:U,exports:U}]}],null,null)},20619(e,t,n){n.d(t,{d6:()=>u,jH:()=>D,lQ:()=>v,pO:()=>y,yF:()=>f,yI:()=>_,yj:()=>b,zw:()=>N});var s=n(14861),i=n(51218),a=n(24698),r=n(11228),o=n(42864),d=n(19820),l=n(15376),c=n(31430),h=n(8726),p=n(95213);class u extends s.xn{get tabIndexInputBinding(){return this._tabIndexInputBinding}set tabIndexInputBinding(e){this._tabIndexInputBinding=e}_tabIndexInputBinding;defaultTabIndex=0;_getTabindexAttribute(){return this._tree._keyManager._isNoopTreeKeyManager?this.tabIndexInputBinding:this._tabindex}get disabled(){return this.isDisabled}set disabled(e){this.isDisabled=e}constructor(){super();const e=(0,a.WQX)(new r.ES_("tabindex"),{optional:!0});this.tabIndexInputBinding=Number(e)||this.defaultTabIndex}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}static ɵfac=function(e){return new(e||u)};static ɵdir=i.FsC({type:u,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:5,hostBindings:function(e,t){1&e&&i.bIt("click",(function(){return t._focusItem()})),2&e&&(i.Avn("tabIndex",t._getTabindexAttribute()),i.BMQ("aria-expanded",t._getAriaExpanded())("aria-level",t.level+1)("aria-posinset",t._getPositionInSet())("aria-setsize",t._getSetSize()))},inputs:{tabIndexInputBinding:[2,"tabIndex","tabIndexInputBinding",e=>null==e?0:(0,r.Udg)(e)],disabled:[2,"disabled","disabled",r.L39]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["matTreeNode"],features:[i.Jv_([{provide:s.xn,useExisting:u}]),i.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(u,[{type:i.WLR,args:[{selector:"mat-tree-node",exportAs:"matTreeNode",outputs:["activation","expandedChange"],providers:[{provide:s.xn,useExisting:u}],host:{class:"mat-tree-node","[attr.aria-expanded]":"_getAriaExpanded()","[attr.aria-level]":"level + 1","[attr.aria-posinset]":"_getPositionInSet()","[attr.aria-setsize]":"_getSetSize()","(click)":"_focusItem()","[tabindex]":"_getTabindexAttribute()"}}]}],(()=>[]),{tabIndexInputBinding:[{type:i.pde,args:[{transform:e=>null==e?0:(0,r.Udg)(e),alias:"tabIndex"}]}],disabled:[{type:i.pde,args:[{transform:r.L39}]}]});class _ extends s.Sz{data;static ɵfac=(()=>{let e;return function(t){return(e||(e=i.xGo(_)))(t||_)}})();static ɵdir=i.FsC({type:_,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},features:[i.Jv_([{provide:s.Sz,useExisting:_}]),i.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(_,[{type:i.WLR,args:[{selector:"[matTreeNodeDef]",inputs:[{name:"when",alias:"matTreeNodeDefWhen"}],providers:[{provide:s.Sz,useExisting:_}]}]}],null,{data:[{type:i.pde,args:["matTreeNode"]}]});class g extends s.s3{node;get disabled(){return this.isDisabled}set disabled(e){this.isDisabled=e}get tabIndex(){return this.isDisabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=e}_tabIndex;ngOnInit(){super.ngOnInit()}ngAfterContentInit(){super.ngAfterContentInit()}ngOnDestroy(){super.ngOnDestroy()}static ɵfac=(()=>{let e;return function(t){return(e||(e=i.xGo(g)))(t||g)}})();static ɵdir=i.FsC({type:g,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],inputs:{node:[0,"matNestedTreeNode","node"],disabled:[2,"disabled","disabled",r.L39],tabIndex:[2,"tabIndex","tabIndex",e=>null==e?0:(0,r.Udg)(e)]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["matNestedTreeNode"],features:[i.Jv_([{provide:s.s3,useExisting:g},{provide:s.xn,useExisting:g},{provide:s.kZ,useExisting:g}]),i.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(g,[{type:i.WLR,args:[{selector:"mat-nested-tree-node",exportAs:"matNestedTreeNode",outputs:["activation","expandedChange"],providers:[{provide:s.s3,useExisting:g},{provide:s.xn,useExisting:g},{provide:s.kZ,useExisting:g}],host:{class:"mat-nested-tree-node"}}]}],null,{node:[{type:i.pde,args:["matNestedTreeNode"]}],disabled:[{type:i.pde,args:[{transform:r.L39}]}],tabIndex:[{type:i.pde,args:[{transform:e=>null==e?0:(0,r.Udg)(e)}]}]});class f extends s.aI{get level(){return this._level}set level(e){this._setLevelInput(e)}get indent(){return this._indent}set indent(e){this._setIndentInput(e)}static ɵfac=(()=>{let e;return function(t){return(e||(e=i.xGo(f)))(t||f)}})();static ɵdir=i.FsC({type:f,selectors:[["","matTreeNodePadding",""]],inputs:{level:[2,"matTreeNodePadding","level",r.Udg],indent:[0,"matTreeNodePaddingIndent","indent"]},features:[i.Jv_([{provide:s.aI,useExisting:f}]),i.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(f,[{type:i.WLR,args:[{selector:"[matTreeNodePadding]",providers:[{provide:s.aI,useExisting:f}]}]}],null,{level:[{type:i.pde,args:[{alias:"matTreeNodePadding",transform:r.Udg}]}],indent:[{type:i.pde,args:["matTreeNodePaddingIndent"]}]});class x{viewContainer=(0,a.WQX)(i.c1b);_node=(0,a.WQX)(s.kZ,{optional:!0});static ɵfac=function(e){return new(e||x)};static ɵdir=i.FsC({type:x,selectors:[["","matTreeNodeOutlet",""]],features:[i.Jv_([{provide:s.a$,useExisting:x}])]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(x,[{type:i.WLR,args:[{selector:"[matTreeNodeOutlet]",providers:[{provide:s.a$,useExisting:x}]}]}],null,null);class v extends s.NL{_nodeOutlet=void 0;static ɵfac=(()=>{let e;return function(t){return(e||(e=i.xGo(v)))(t||v)}})();static ɵcmp=i.VBU({type:v,selectors:[["mat-tree"]],viewQuery:function(e,t){if(1&e&&i.GBs(x,7),2&e){let e;i.mGM(e=i.lsd())&&(t._nodeOutlet=e.first)}},hostAttrs:[1,"mat-tree"],exportAs:["matTree"],features:[i.Jv_([{provide:s.NL,useExisting:v}]),i.Vt3],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(e,t){1&e&&i.eu8(0,0)},dependencies:[x],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color, var(--mat-sys-surface))}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color, var(--mat-sys-on-surface));font-family:var(--mat-tree-node-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-tree-node-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-tree-node-text-weight, var(--mat-sys-body-large-weight))}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height, 48px)}.mat-nested-tree-node{border-bottom-width:0}\n"],encapsulation:2})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(v,[{type:i.uAl,args:[{selector:"mat-tree",exportAs:"matTree",template:"<ng-container matTreeNodeOutlet></ng-container>",host:{class:"mat-tree"},encapsulation:i.gXe.None,changeDetection:i.Ngq.Default,providers:[{provide:s.NL,useExisting:v}],imports:[x],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color, var(--mat-sys-surface))}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color, var(--mat-sys-on-surface));font-family:var(--mat-tree-node-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-tree-node-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-tree-node-text-weight, var(--mat-sys-body-large-weight))}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height, 48px)}.mat-nested-tree-node{border-bottom-width:0}\n"]}]}],null,{_nodeOutlet:[{type:r.Uct,args:[x,{static:!0}]}]});class y extends s.Hy{static ɵfac=(()=>{let e;return function(t){return(e||(e=i.xGo(y)))(t||y)}})();static ɵdir=i.FsC({type:y,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:[0,"matTreeNodeToggleRecursive","recursive"]},features:[i.Jv_([{provide:s.Hy,useExisting:y}]),i.Vt3]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(y,[{type:i.WLR,args:[{selector:"[matTreeNodeToggle]",providers:[{provide:s.Hy,useExisting:y}],inputs:[{name:"recursive",alias:"matTreeNodeToggleRecursive"}]}]}],null,null);const m=[g,_,f,y,v,u,x];class D{static ɵfac=function(e){return new(e||D)};static ɵmod=i.$C({type:D});static ɵinj=a.G2t({imports:[s.Dc,o.jI]})}("undefined"==typeof ngDevMode||ngDevMode)&&i.cDI(D,[{type:i.UQu,args:[{imports:[s.Dc,...m],exports:[o.jI,m]}]}],null,null);class b{transformFunction;getLevel;isExpandable;getChildren;constructor(e,t,n,s){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=s}_flattenNode(e,t,n,s){const i=this.transformFunction(e,t);if(n.push(i),this.isExpandable(i)){const i=this.getChildren(e);i&&(Array.isArray(i)?this._flattenChildren(i,t,n,s):i.pipe((0,p.s)(1)).subscribe((e=>{this._flattenChildren(e,t,n,s)})))}return n}_flattenChildren(e,t,n,s){e.forEach(((i,a)=>{let r=s.slice();r.push(a!=e.length-1),this._flattenNode(i,t+1,n,r)}))}flattenNodes(e){let t=[];return e.forEach((e=>this._flattenNode(e,0,t,[]))),t}expandFlattenedNodes(e,t){let n=[],s=[];return s[0]=!0,e.forEach((e=>{let i=!0;for(let t=0;t<=this.getLevel(e);t++)i=i&&s[t];i&&n.push(e),this.isExpandable(e)&&(s[this.getLevel(e)+1]=t.isExpanded(e))})),n}}class N extends d.q{_treeControl;_treeFlattener;_flattenedData=new l.t([]);_expandedData=new l.t([]);get data(){return this._data.value}set data(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}_data=new l.t([]);constructor(e,t,n){super(),this._treeControl=e,this._treeFlattener=t,n&&(this.data=n)}connect(e){return(0,c.h)(e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe((0,h.T)((()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value))))}disconnect(){}}}}]);