dPorts=function(n,l){for(var e=n+1;e<=16;e++)if(e%l==0)return!0;return!1},n.prototype.getAssignedByText=function(n,l){if(!n)return l.UNASSIGNED;switch(n){case _C.external:return l.EXTERNAL;case _C.vc:return l.VC_ASSIGNED;case _C.host:return l.ESX_ASSIGNED;default:return""}},n.prototype.buildDesiredNodesList=function(n,l){for(var e=[],t=n+1;t<=16;t++)this.hasValidPorts(l,t)&&e.push(t);return e},n.prototype.buildDesiredPortsList=function(n,l){for(var e=[],t=n+1;t<=16;t++)t%l==0&&e.push(t);return e},n}(),gC=function(){function n(){}return n.POWERED_ON="poweredOn",n.POWERED_OFF="poweredOff",n.SUSPENDED="suspended",n}(),fC=function(){function n(l,e){this.vmConfigContext=l,this.workflow=e,this.currentNodes=[],this.currentPorts=[],this.service=new hC,this.vmHardwareUtilService=new sC(new aC),this._op=n.NO_OPERATION,this._desiredNodes=1,this._desiredNodesList=[1],this._desiredPorts=1,this._desiredPortsList=[1],this.onInit()}return n.prototype.getWwnText=function(n){var l=this.vmConfigContext.npivNodeWorldWideNameHexStrings,e=this.vmConfigContext.npivPortWorldWideNameHexStrings;return cC.UpdateMode!==this.workflow&&(l=[],e=[]),this.service.getWwnText(l,n.ASSIGNED_NODE,n.ASSIGNED_NODES,e,n.ASSIGNED_PORT,n.ASSIGNED_PORTS)},Object.defineProperty(n.prototype,"config",{get:function(){return this.vmConfigContext.config},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"capability",{get:function(){return this.vmConfigContext?this.vmConfigContext.environment.configOption.capabilities:{}},enumerable:!0,configurable:!0}),n.prototype.onInit=function(){cC.UpdateMode===this.workflow?(this.config.npivNodeWorldWideName&&(this.currentNodes=this.config.npivNodeWorldWideName),this.config.npivPortWorldWideName&&(this.currentPorts=this.config.npivPortWorldWideName),this._desiredNodesList=this.make_nodesList(),this.desiredNodes=this._desiredNodesList[0],this.updatePortsList(),this.desiredPorts=this._desiredPortsList[0]):(this._op=this.config.npivWwnOp===n.OPERATION_GENERATE?n.OPERATION_GENERATE_ALIAS:this.config.npivWwnOp===n.OPERATION_REMOVE?n.OPERATION_REMOVE_ALIAS:n.NO_OPERATION,this._desiredNodesList=this.make_nodesList(),this._desiredNodes=this.config.npivDesiredNodeWwns?this.config.npivDesiredNodeWwns:this._desiredNodesList[0],this.updatePortsList(),this._desiredPorts=this.config.npivDesiredPortWwns?this.config.npivDesiredPortWwns:this._desiredPortsList[0])},Object.defineProperty(n.prototype,"disabled",{get:function(){return this.config.npivTemporaryDisabled},set:function(n){n!==this.config.npivTemporaryDisabled&&(this.config.npivTemporaryDisabled=n)},enumerable:!0,configurable:!0}),n.prototype.isEditDisableNpivDisabled=function(){return!(!this.missingPrivileges()&&!this.isEditingLifeVm()&&this.capability.vmNpivWwnDisableSupported)},Object.defineProperty(n.prototype,"op",{get:function(){return this._op},set:function(l){this._op=l,l===n.OPERATION_GENERATE_ALIAS&&this.add(),l===n.OPERATION_REMOVE_ALIAS&&this.del(),l===n.NO_OPERATION&&this.nop()},enumerable:!0,configurable:!0}),n.prototype.add=function(){this.config.npivWwnOp=n.OPERATION_GENERATE,this.config.npivDesiredNodeWwns=this._desiredNodes,this.config.npivDesiredPortWwns=this._desiredPorts},n.prototype.del=function(){this.config.npivWwnOp=n.OPERATION_REMOVE},n.prototype.nop=function(){this.config.npivWwnOp=null},n.prototype.isEditNpivOpsDisabled=function(){return!(!this.missingPrivileges()&&!this.isEditingLifeVm()&&this.capability.vmNpivWwnUpdateSupported)},n.prototype.isAddingVisible=function(){var n=0===this.nodesList().length,l=0===this.portsList().length;return!n&&!l},Object.defineProperty(n.prototype,"desiredNodes",{get:function(){return this._desiredNodes},set:function(l){this._desiredNodes=l,this.op===n.OPERATION_GENERATE_ALIAS&&(this.config.npivDesiredNodeWwns=this._desiredNodes),this.updatePortsList(),this.op===n.OPERATION_GENERATE_ALIAS&&this.updateDesiredPortValue()},enumerable:!0,configurable:!0}),n.prototype.updateDesiredPortValue=function(){this._desiredPortsList&&0!==this._desiredPortsList.length&&(this._desiredPortsList.indexOf(this.desiredPorts)>=0||(this.desiredPorts=this._desiredPortsList[0]))},n.prototype.nodesList=function(){return this._desiredNodesList},n.prototype.make_nodesList=function(){return this.service.buildDesiredNodesList(this.currentNodes.length,this.currentPorts.length)},n.prototype.updatePortsList=function(){this._desiredPortsList=this.service.buildDesiredPortsList(this.currentPorts.length,this._desiredNodes)},Object.defineProperty(n.prototype,"desiredPorts",{get:function(){return this._desiredPorts},set:function(l){this._desiredPorts=l,this.op===n.OPERATION_GENERATE_ALIAS&&(this.config.npivDesiredPortWwns=this._desiredPorts)},enumerable:!0,configurable:!0}),n.prototype.portsList=function(){return this._desiredPortsList},n.prototype.isSelectMoreDisabled=function(){return this.op===n.OPERATION_GENERATE_ALIAS?null:"disabled"},n.prototype.getAssignedByText=function(n){return this.service.getAssignedByText(this.config.npivWorldWideNameType,n)},n.prototype.hasPrivileges=function(){return this.workflow===cC.CreateMode||this.vmHardwareUtilService.hasEditConfigSettingsPrivilegesCtx(this.vmConfigContext)},n.prototype.missingPrivileges=function(){return!this.hasPrivileges()},n.prototype.isEditingLifeVm=function(){return this.wo