{"version":3,"sources":["webpack:///./src/core/services/configurations-service.ts","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./src/core/utils/axios-instance.ts","webpack:///./client-generator/generated-clients/configurations.ts","webpack:///./src/core/services/plants.ts","webpack:///./node_modules/core-js/modules/es.array.find-index.js","webpack:///./node_modules/core-js/internals/string-trim-forced.js","webpack:///./src/core/services/naming.service.ts"],"names":["configurationsClient","$","$trim","trim","forcedStringTrimMethod","target","proto","forced","this","a","defaults","timeout","interceptors","request","use","config","getToken","token","headers","Authorization","response","error","addError","JSON","stringify","toJSON","status","emit","Promise","reject","push","name","PlantEntityType","Client","baseUrl","instance","jsonParseReviver","undefined","create","planttype","cancelToken","url_","Error","replace","encodeURIComponent","options_","method","url","catch","_error","isAxiosError","then","_response","processCountriesAutocomplete","_headers","k","hasOwnProperty","_responseText","data","result200","resultData200","Array","isArray","item","Country","fromJS","throwException","resolve","processDefaultRoomsList","DefaultRoomDTO","processDefaultSettings","DeskToolClientSettingsDTO","plantdesktopid","etype","processFlattenedEntities","PlantFlatEntityDTO","property","_data","code","timeZoneId","extendedName","result","init","type","count","icon","label","uiSettings","plantRefreshInterval","azureAdb2CClientId","azureAdb2CAuthority","azureAdb2CKnownAuthority","azureAdb2CFullAccessScope","instrumentationKey","profileUrl","entrancePlantEnabled","PlantType","RoomObjectType","RoomType","id","roomType","objectType","currentName","plantEntityType","ApiException","message","isApiException","obj","prototype","Object","call","$type","plantsClient","$findIndex","findIndex","addToUnscopables","FIND_INDEX","SKIPS_HOLES","callbackfn","arguments","length","fails","whitespaces","non","module","exports","METHOD_NAME","NamingService","plantId","eType","flattenedEntities","initialEntities","additionalEntitiesInternal","v","initialEntitiesInternal","newName","initialEntitiesWantedIdx","e","toLowerCase","additionalEntitiesWantedIdx","additionalEntities","every","list","objectToValidate","oType","sameNameOccurrences","objects","innerObject","isInvalid","loopingPlant","filter","opts","modifier","baseName","initEntityNameOrThrow","isValidEntityTypeName","ROOM_OBJECT","metadata","room","roomObjectType","initRoomObjectName","ROOM","initRoomName","SCENE","initSceneName","GROUP","initGroupName","PLANT","plantSourceName","initPlantName","errMsg","console","sourceName","$t","Shutter","Light","objType","global","t"],"mappings":"iNAAA,4BAGMA,EAAuB,IAAI,OAAO,GAAI,QAE7B,U,oCCJf,IAAIC,EAAI,EAAQ,QACZC,EAAQ,EAAQ,QAA4BC,KAC5CC,EAAyB,EAAQ,QAIrCH,EAAE,CAAEI,OAAQ,SAAUC,OAAO,EAAMC,OAAQH,EAAuB,SAAW,CAC3ED,KAAM,WACJ,OAAOD,EAAMM,U,mKCNjB,EAAAC,EAAMC,SAASC,QAAU,IAOzB,EAAAF,EAAMG,aAAaC,QAAQC,IAA3B,yDAA+B,WAAOC,GAAP,uGACT,aAAYC,WADH,cACvBC,EADuB,OAElBF,EAAOG,QAAQC,cAAtBF,EAAO,iBAAyCA,GAChB,GAHP,kBAItBF,GAJsB,2CAA/B,uDAOA,EAAAN,EAAMG,aAAaQ,SAASN,KAC1B,SAACM,GACC,OAAOA,KAET,SAACC,GAEC,GADA,OAAaC,SAASC,KAAKC,UAAUH,EAAMI,WACb,MAA1BJ,EAAMD,SAASM,OACjB,OAAQC,KAAK,YACR,IAA8B,MAA1BN,EAAMD,SAASM,OAIxB,OAAOE,QAAQC,OAAOR,GAFtB,OAAOS,KAAK,CAAEC,KAAM,8BAOX,SAAf,G,sLC0bYC,E,yGAjdCC,EAAb,WAKI,WAAYC,EAAkBC,GAAwB,uBAF5C,KAAAC,sBAAmEC,EAGzE7B,KAAK2B,SAAWA,GAAsB,EAAA1B,EAAM6B,SAC5C9B,KAAK0B,aAAsBG,IAAZH,GAAqC,OAAZA,EAAmBA,EAAU,GAP7E,4DAiBI,SAAsBK,EAAuBC,GAAqC,WAC1EC,EAAOjC,KAAK0B,QAAU,sCAC1B,QAAkBG,IAAdE,GAAyC,OAAdA,EAC3B,MAAM,IAAIG,MAAM,8CACpBD,EAAOA,EAAKE,QAAQ,cAAeC,mBAAmB,GAAKL,IA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B,OAAOtK,KAAKqK,GAAG,+BACjB,KAAK,QAAeE,MAClB,OAAOvK,KAAKqK,GAAG,6BACjB,QACE,MAAO,MAxNf,2BA4NU,WACN,OAAOrK,KAAKqK,GAAL,uBA7NX,0BAgOU,SAAoBzE,GAC1B,OAAO5F,KAAKqK,GAAL,sBAAuB,QAASzE,OAjO3C,gCAoOU,SACN0D,EACAkB,GAEA,MAAO,UAAGlB,EAAK/H,KAAR,KAAkBvB,KAAKqK,GAAL,sBAAuB,QAAeG,SAxOnE,KACiB,EAAAH,GAAK,OAAKI,OAAOC,EAQjB,EAAA5C,wBAAgD,GAChD,EAAAF,2BAAmD","file":"js/page-assign-room-object~page-assign-thermo-room-object~page-entranceplant-dashboard~page-entrancepla~a4c4d477.920e58c1.js","sourcesContent":["import { Client } from '@/../client-generator/generated-clients/configurations';\nimport axiosInstance from '../utils/axios-instance';\n\nconst configurationsClient = new Client('', axiosInstance);\n\nexport default configurationsClient;\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","import axios from 'axios';\nimport router from '../../core/router/index';\n\naxios.defaults.timeout = 30000;\n\nimport authService from '../services/auth.service';\nimport emitter from '@/core/config/emitter';\nimport { MANAGE_ELIOT_PARSE_EXCEPTION } from './emitter-events';\nimport globalErrors from './global-errors';\n\naxios.interceptors.request.use(async (config) => {\n const token = await authService.getToken();\n if (token) config.headers.Authorization = `Bearer ${token}`;\n else config.headers.Authorization = '';\n return config;\n});\n\naxios.interceptors.response.use(\n (response) => {\n return response;\n },\n (error) => {\n globalErrors.addError(JSON.stringify(error.toJSON()));\n if (error.response.status === 412) {\n emitter.emit(MANAGE_ELIOT_PARSE_EXCEPTION);\n } else if (error.response.status === 477) {\n // user is not in allowed list\n router.push({ name: 'page-user-not-allowed' });\n } else {\n return Promise.reject(error);\n }\n }\n);\n\nexport default axios;\n","/* tslint:disable */\n/* eslint-disable */\n//----------------------\n// \n// Generated using the NSwag toolchain v13.13.2.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org)\n// \n//----------------------\n// ReSharper disable InconsistentNaming\n\nimport axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelToken } from 'axios';\n\nexport class Client {\n private instance: AxiosInstance;\n private baseUrl: string;\n protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;\n\n constructor(baseUrl?: string, instance?: AxiosInstance) {\n this.instance = instance ? instance : axios.create();\n this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : \"\";\n }\n\n /**\n * Get countries autocomplete (Auth)\n * @param planttype 0 = AUTOMATION_PLANT\n \n 1 = ENTRANCE_PLANT\n * @return List of countries\n */\n countriesAutocomplete(planttype: PlantType , cancelToken?: CancelToken | undefined): Promise {\n let url_ = this.baseUrl + \"/countries-autocomplete/{planttype}\";\n if (planttype === undefined || planttype === null)\n throw new Error(\"The parameter 'planttype' must be defined.\");\n url_ = url_.replace(\"{planttype}\", encodeURIComponent(\"\" + planttype));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_ = {\n method: \"GET\",\n url: url_,\n headers: {\n \"Accept\": \"text/plain\"\n },\n cancelToken\n };\n\n return this.instance.request(options_).catch((_error: any) => {\n if (isAxiosError(_error) && _error.response) {\n return _error.response;\n } else {\n throw _error;\n }\n }).then((_response: AxiosResponse) => {\n return this.processCountriesAutocomplete(_response);\n });\n }\n\n protected processCountriesAutocomplete(response: AxiosResponse): Promise {\n const status = response.status;\n let _headers: any = {};\n if (response.headers && typeof response.headers === \"object\") {\n for (let k in response.headers) {\n if (response.headers.hasOwnProperty(k)) {\n _headers[k] = response.headers[k];\n }\n }\n }\n if (status === 200) {\n const _responseText = response.data;\n let result200: any = null;\n let resultData200 = _responseText;\n if (Array.isArray(resultData200)) {\n result200 = [] as any;\n for (let item of resultData200)\n result200!.push(Country.fromJS(item));\n }\n else {\n result200 = null;\n }\n return result200;\n } else if (status === 500) {\n const _responseText = response.data;\n return throwException(\"Generic error\", status, _responseText, _headers);\n } else if (status === 401) {\n const _responseText = response.data;\n return throwException(\"Unauthorized\", status, _responseText, _headers);\n } else if (status === 403) {\n const _responseText = response.data;\n return throwException(\"Forbidden\", status, _responseText, _headers);\n } else if (status !== 200 && status !== 204) {\n const _responseText = response.data;\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n }\n return Promise.resolve(null);\n }\n\n /**\n * Get default rooms list with default values (Auth)\n * @return List of default rooms with values\n */\n defaultRoomsList( cancelToken?: CancelToken | undefined): Promise {\n let url_ = this.baseUrl + \"/default-rooms-list\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_ = {\n method: \"GET\",\n url: url_,\n headers: {\n \"Accept\": \"text/plain\"\n },\n cancelToken\n };\n\n return this.instance.request(options_).catch((_error: any) => {\n if (isAxiosError(_error) && _error.response) {\n return _error.response;\n } else {\n throw _error;\n }\n }).then((_response: AxiosResponse) => {\n return this.processDefaultRoomsList(_response);\n });\n }\n\n protected processDefaultRoomsList(response: AxiosResponse): Promise {\n const status = response.status;\n let _headers: any = {};\n if (response.headers && typeof response.headers === \"object\") {\n for (let k in response.headers) {\n if (response.headers.hasOwnProperty(k)) {\n _headers[k] = response.headers[k];\n }\n }\n }\n if (status === 200) {\n const _responseText = response.data;\n let result200: any = null;\n let resultData200 = _responseText;\n if (Array.isArray(resultData200)) {\n result200 = [] as any;\n for (let item of resultData200)\n result200!.push(DefaultRoomDTO.fromJS(item));\n }\n else {\n result200 = null;\n }\n return result200;\n } else if (status === 500) {\n const _responseText = response.data;\n return throwException(\"Generic error\", status, _responseText, _headers);\n } else if (status === 401) {\n const _responseText = response.data;\n return throwException(\"Unauthorized\", status, _responseText, _headers);\n } else if (status === 403) {\n const _responseText = response.data;\n return throwException(\"Forbidden\", status, _responseText, _headers);\n } else if (status !== 200 && status !== 204) {\n const _responseText = response.data;\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n }\n return Promise.resolve(null);\n }\n\n /**\n * Get default settings for DeksTool client\n * @return A JSON object containing the defaults for the desktool client\n */\n defaultSettings( cancelToken?: CancelToken | undefined): Promise {\n let url_ = this.baseUrl + \"/desktool-client/default-settings\";\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_ = {\n method: \"GET\",\n url: url_,\n headers: {\n \"Accept\": \"text/plain\"\n },\n cancelToken\n };\n\n return this.instance.request(options_).catch((_error: any) => {\n if (isAxiosError(_error) && _error.response) {\n return _error.response;\n } else {\n throw _error;\n }\n }).then((_response: AxiosResponse) => {\n return this.processDefaultSettings(_response);\n });\n }\n\n protected processDefaultSettings(response: AxiosResponse): Promise {\n const status = response.status;\n let _headers: any = {};\n if (response.headers && typeof response.headers === \"object\") {\n for (let k in response.headers) {\n if (response.headers.hasOwnProperty(k)) {\n _headers[k] = response.headers[k];\n }\n }\n }\n if (status === 200) {\n const _responseText = response.data;\n let result200: any = null;\n let resultData200 = _responseText;\n result200 = DeskToolClientSettingsDTO.fromJS(resultData200);\n return result200;\n } else if (status === 500) {\n const _responseText = response.data;\n return throwException(\"Generic error\", status, _responseText, _headers);\n } else if (status !== 200 && status !== 204) {\n const _responseText = response.data;\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n }\n return Promise.resolve(null);\n }\n\n /**\n * Returns a flat list of all the entities of the given type across all the plant.\n Use 0 as plantdesktopid when id is not available (Auth)\n * @param plantdesktopid PlantId\n * @param etype PlantEntityType\n \n 0 = ROOM\n \n 1 = SCENE\n \n 2 = GROUP\n \n 3 = ROOM_OBJECT\n \n 4 = PLANT\n * @return Plant Entities Flattened List\n */\n flattenedEntities(plantdesktopid: number, etype: PlantEntityType , cancelToken?: CancelToken | undefined): Promise {\n let url_ = this.baseUrl + \"/plant/{plantdesktopid}/flattened-entities/{etype}\";\n if (plantdesktopid === undefined || plantdesktopid === null)\n throw new Error(\"The parameter 'plantdesktopid' must be defined.\");\n url_ = url_.replace(\"{plantdesktopid}\", encodeURIComponent(\"\" + plantdesktopid));\n if (etype === undefined || etype === null)\n throw new Error(\"The parameter 'etype' must be defined.\");\n url_ = url_.replace(\"{etype}\", encodeURIComponent(\"\" + etype));\n url_ = url_.replace(/[?&]$/, \"\");\n\n let options_ = {\n method: \"GET\",\n url: url_,\n headers: {\n \"Accept\": \"text/plain\"\n },\n cancelToken\n };\n\n return this.instance.request(options_).catch((_error: any) => {\n if (isAxiosError(_error) && _error.response) {\n return _error.response;\n } else {\n throw _error;\n }\n }).then((_response: AxiosResponse) => {\n return this.processFlattenedEntities(_response);\n });\n }\n\n protected processFlattenedEntities(response: AxiosResponse): Promise {\n const status = response.status;\n let _headers: any = {};\n if (response.headers && typeof response.headers === \"object\") {\n for (let k in response.headers) {\n if (response.headers.hasOwnProperty(k)) {\n _headers[k] = response.headers[k];\n }\n }\n }\n if (status === 200) {\n const _responseText = response.data;\n let result200: any = null;\n let resultData200 = _responseText;\n if (Array.isArray(resultData200)) {\n result200 = [] as any;\n for (let item of resultData200)\n result200!.push(PlantFlatEntityDTO.fromJS(item));\n }\n else {\n result200 = null;\n }\n return result200;\n } else if (status === 401) {\n const _responseText = response.data;\n return throwException(\"Unauthorized\", status, _responseText, _headers);\n } else if (status === 403) {\n const _responseText = response.data;\n return throwException(\"Forbidden\", status, _responseText, _headers);\n } else if (status === 404) {\n const _responseText = response.data;\n return throwException(\"Plant doesn\\'t exist or not owned\", status, _responseText, _headers);\n } else if (status === 412) {\n const _responseText = response.data;\n return throwException(\"Eliot parse exception\", status, _responseText, _headers);\n } else if (status === 503) {\n const _responseText = response.data;\n return throwException(\"Eliot API not working\", status, _responseText, _headers);\n } else if (status === 500) {\n const _responseText = response.data;\n return throwException(\"A generic error occurred\", status, _responseText, _headers);\n } else if (status !== 200 && status !== 204) {\n const _responseText = response.data;\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\n }\n return Promise.resolve(null);\n }\n}\n\nexport class Country implements ICountry {\n code?: string | undefined;\n name?: string | undefined;\n timeZoneId?: string | undefined;\n extendedName?: string | undefined;\n\n constructor(data?: ICountry) {\n if (data) {\n for (var property in data) {\n if (data.hasOwnProperty(property))\n (this)[property] = (data)[property];\n }\n }\n }\n\n init(_data?: any) {\n if (_data) {\n this.code = _data[\"code\"];\n this.name = _data[\"name\"];\n this.timeZoneId = _data[\"timeZoneId\"];\n this.extendedName = _data[\"extendedName\"];\n }\n }\n\n static fromJS(data: any): Country {\n data = typeof data === 'object' ? data : {};\n let result = new Country();\n result.init(data);\n return result;\n }\n\n toJSON(data?: any) {\n data = typeof data === 'object' ? data : {};\n data[\"code\"] = this.code;\n data[\"name\"] = this.name;\n data[\"timeZoneId\"] = this.timeZoneId;\n data[\"extendedName\"] = this.extendedName;\n return data; \n }\n}\n\nexport interface ICountry {\n code?: string | undefined;\n name?: string | undefined;\n timeZoneId?: string | undefined;\n extendedName?: string | undefined;\n}\n\nexport class DefaultRoomDTO implements IDefaultRoomDTO {\n type?: RoomType;\n count?: number;\n icon?: string | undefined;\n label?: string | undefined;\n\n constructor(data?: IDefaultRoomDTO) {\n if (data) {\n for (var property in data) {\n if (data.hasOwnProperty(property))\n (this)[property] = (data)[property];\n }\n }\n }\n\n init(_data?: any) {\n if (_data) {\n this.type = _data[\"type\"];\n this.count = _data[\"count\"];\n this.icon = _data[\"icon\"];\n this.label = _data[\"label\"];\n }\n }\n\n static fromJS(data: any): DefaultRoomDTO {\n data = typeof data === 'object' ? data : {};\n let result = new DefaultRoomDTO();\n result.init(data);\n return result;\n }\n\n toJSON(data?: any) {\n data = typeof data === 'object' ? data : {};\n data[\"type\"] = this.type;\n data[\"count\"] = this.count;\n data[\"icon\"] = this.icon;\n data[\"label\"] = this.label;\n return data; \n }\n}\n\nexport interface IDefaultRoomDTO {\n type?: RoomType;\n count?: number;\n icon?: string | undefined;\n label?: string | undefined;\n}\n\nexport class DeskToolClientSettingsDTO implements IDeskToolClientSettingsDTO {\n uiSettings?: any | undefined;\n plantRefreshInterval?: number;\n azureAdb2CClientId?: string | undefined;\n azureAdb2CAuthority?: string | undefined;\n azureAdb2CKnownAuthority?: string | undefined;\n azureAdb2CFullAccessScope?: string | undefined;\n instrumentationKey?: string | undefined;\n profileUrl?: string | undefined;\n entrancePlantEnabled?: boolean;\n\n constructor(data?: IDeskToolClientSettingsDTO) {\n if (data) {\n for (var property in data) {\n if (data.hasOwnProperty(property))\n (this)[property] = (data)[property];\n }\n }\n }\n\n init(_data?: any) {\n if (_data) {\n this.uiSettings = _data[\"uiSettings\"];\n this.plantRefreshInterval = _data[\"plantRefreshInterval\"];\n this.azureAdb2CClientId = _data[\"azureAdb2CClientId\"];\n this.azureAdb2CAuthority = _data[\"azureAdb2CAuthority\"];\n this.azureAdb2CKnownAuthority = _data[\"azureAdb2CKnownAuthority\"];\n this.azureAdb2CFullAccessScope = _data[\"azureAdb2CFullAccessScope\"];\n this.instrumentationKey = _data[\"instrumentationKey\"];\n this.profileUrl = _data[\"profileUrl\"];\n this.entrancePlantEnabled = _data[\"entrancePlantEnabled\"];\n }\n }\n\n static fromJS(data: any): DeskToolClientSettingsDTO {\n data = typeof data === 'object' ? data : {};\n let result = new DeskToolClientSettingsDTO();\n result.init(data);\n return result;\n }\n\n toJSON(data?: any) {\n data = typeof data === 'object' ? data : {};\n data[\"uiSettings\"] = this.uiSettings;\n data[\"plantRefreshInterval\"] = this.plantRefreshInterval;\n data[\"azureAdb2CClientId\"] = this.azureAdb2CClientId;\n data[\"azureAdb2CAuthority\"] = this.azureAdb2CAuthority;\n data[\"azureAdb2CKnownAuthority\"] = this.azureAdb2CKnownAuthority;\n data[\"azureAdb2CFullAccessScope\"] = this.azureAdb2CFullAccessScope;\n data[\"instrumentationKey\"] = this.instrumentationKey;\n data[\"profileUrl\"] = this.profileUrl;\n data[\"entrancePlantEnabled\"] = this.entrancePlantEnabled;\n return data; \n }\n}\n\nexport interface IDeskToolClientSettingsDTO {\n uiSettings?: any | undefined;\n plantRefreshInterval?: number;\n azureAdb2CClientId?: string | undefined;\n azureAdb2CAuthority?: string | undefined;\n azureAdb2CKnownAuthority?: string | undefined;\n azureAdb2CFullAccessScope?: string | undefined;\n instrumentationKey?: string | undefined;\n profileUrl?: string | undefined;\n entrancePlantEnabled?: boolean;\n}\n\n/** 0 = ROOM 1 = SCENE 2 = GROUP 3 = ROOM_OBJECT 4 = PLANT */\nexport enum PlantEntityType {\n ROOM = 0,\n SCENE = 1,\n GROUP = 2,\n ROOM_OBJECT = 3,\n PLANT = 4,\n}\n\nexport class PlantFlatEntityDTO implements IPlantFlatEntityDTO {\n id?: string | undefined;\n roomType?: RoomType;\n objectType?: RoomObjectType;\n currentName?: string | undefined;\n plantEntityType?: PlantEntityType;\n\n constructor(data?: IPlantFlatEntityDTO) {\n if (data) {\n for (var property in data) {\n if (data.hasOwnProperty(property))\n (this)[property] = (data)[property];\n }\n }\n }\n\n init(_data?: any) {\n if (_data) {\n this.id = _data[\"id\"];\n this.roomType = _data[\"roomType\"];\n this.objectType = _data[\"objectType\"];\n this.currentName = _data[\"currentName\"];\n this.plantEntityType = _data[\"plantEntityType\"];\n }\n }\n\n static fromJS(data: any): PlantFlatEntityDTO {\n data = typeof data === 'object' ? data : {};\n let result = new PlantFlatEntityDTO();\n result.init(data);\n return result;\n }\n\n toJSON(data?: any) {\n data = typeof data === 'object' ? data : {};\n data[\"id\"] = this.id;\n data[\"roomType\"] = this.roomType;\n data[\"objectType\"] = this.objectType;\n data[\"currentName\"] = this.currentName;\n data[\"plantEntityType\"] = this.plantEntityType;\n return data; \n }\n}\n\nexport interface IPlantFlatEntityDTO {\n id?: string | undefined;\n roomType?: RoomType;\n objectType?: RoomObjectType;\n currentName?: string | undefined;\n plantEntityType?: PlantEntityType;\n}\n\n/** 0 = AUTOMATION_PLANT 1 = ENTRANCE_PLANT */\nexport enum PlantType {\n AUTOMATION_PLANT = 0,\n ENTRANCE_PLANT = 1,\n}\n\n/** 0 = Light 1 = Shutter 2 = Socket 3 = Lock 4 = Thermostat 5 = Fancoil 6 = TowelWarmer 7 = WirelessCommand 8 = Blind 9 = Player 10 = Xmeter 11 = Alarm 12 = ColoredLight 13 = ScheduledScenarioPlus 14 = None 15 = Contact 16 = AlarmSensor 17 = Thermostat99zones 18 = DimmerDmx 19 = DimmerDali 20 = Actuactor 21 = CentralLoadControl 22 = ActuactorLoadControl 23 = VdeLock 24 = StaircaseLight 25 = FloorCall 26 = Unknown */\nexport enum RoomObjectType {\n Light = 0,\n Shutter = 1,\n Socket = 2,\n Lock = 3,\n Thermostat = 4,\n Fancoil = 5,\n TowelWarmer = 6,\n WirelessCommand = 7,\n Blind = 8,\n Player = 9,\n Xmeter = 10,\n Alarm = 11,\n ColoredLight = 12,\n ScheduledScenarioPlus = 13,\n None = 14,\n Contact = 15,\n AlarmSensor = 16,\n Thermostat99zones = 17,\n DimmerDmx = 18,\n DimmerDali = 19,\n Actuactor = 20,\n CentralLoadControl = 21,\n ActuactorLoadControl = 22,\n VdeLock = 23,\n StaircaseLight = 24,\n FloorCall = 25,\n Unknown = 26,\n}\n\n/** 0 = Livingroom 1 = Bathroom 2 = Kitchen 3 = Bedroom 4 = Dining_room 5 = Toilets 6 = Lobby 7 = Corridor 8 = Garage 9 = Outdoor 10 = Home_office 11 = Stairs 12 = Electrical_cabinet 13 = Custom 14 = Unknown */\nexport enum RoomType {\n Livingroom = 0,\n Bathroom = 1,\n Kitchen = 2,\n Bedroom = 3,\n Dining_room = 4,\n Toilets = 5,\n Lobby = 6,\n Corridor = 7,\n Garage = 8,\n Outdoor = 9,\n Home_office = 10,\n Stairs = 11,\n Electrical_cabinet = 12,\n Custom = 13,\n Unknown = 14,\n}\n\nexport class ApiException extends Error {\n message: string;\n status: number;\n response: string;\n headers: { [key: string]: any; };\n result: any;\n\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\n super();\n\n this.message = message;\n this.status = status;\n this.response = response;\n this.headers = headers;\n this.result = result;\n }\n\n protected isApiException = true;\n\n static isApiException(obj: any): obj is ApiException {\n return obj.isApiException === true;\n }\n}\n\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\n if (result !== null && result !== undefined)\n throw result;\n else\n throw new ApiException(message, status, response, headers, null);\n}\n\nfunction isAxiosError(obj: any | undefined): obj is AxiosError {\n return obj && obj.isAxiosError === true;\n}","import {\n Client,\n ActuatorSettings,\n CommandSettings,\n GeneralCommandsAndGroupsAction,\n DefaultObjectAction,\n ObjectAction,\n WaitTimeAction,\n Action,\n Trigger,\n Condition,\n ObjectTrigger,\n ButtonTrigger,\n DateAndTimeTrigger,\n TimeCondition,\n ObjectCondition,\n ExtDevice,\n ColoredLightExtDevice,\n XmeterExtDevice,\n PlayerExtDevice,\n} from '@/../client-generator/generated-clients/plants';\nimport axiosInstance from '../utils/axios-instance';\n\nCondition.prototype.init \n= Trigger.prototype.init \n= Action.prototype.init \n= ActuatorSettings.prototype.init \n= CommandSettings.prototype.init \n= GeneralCommandsAndGroupsAction.prototype.init \n= DefaultObjectAction.prototype.init \n= ObjectAction.prototype.init \n= WaitTimeAction.prototype.init \n= ObjectTrigger.prototype.init \n= ButtonTrigger.prototype.init \n= DateAndTimeTrigger.prototype.init \n= TimeCondition.prototype.init \n= ObjectCondition.prototype.init\n= ExtDevice.prototype.init\n= ColoredLightExtDevice.prototype.init\n= XmeterExtDevice.prototype.init\n= PlayerExtDevice.prototype.init = function (\n data?: any\n) {\n if (data) {\n for (var property in data) {\n if (Object.prototype.hasOwnProperty.call(data, property))\n (this)[property] = (data)[property];\n }\n }\n};\n\nCondition.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.Condition, ProtocolManager`,\n ...this,\n };\n};\nTrigger.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.Trigger, ProtocolManager`,\n ...this,\n };\n};\nAction.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.Action, ProtocolManager`,\n ...this,\n };\n};\nActuatorSettings.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ActuatorSettings, ProtocolManager`,\n ...this,\n };\n};\nCommandSettings.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.CommandSettings, ProtocolManager`,\n ...this,\n };\n};\nGeneralCommandsAndGroupsAction.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.GeneralCommandsAndGroupsAction, ProtocolManager`,\n ...this,\n };\n};\nDefaultObjectAction.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.DefaultObjectAction, ProtocolManager`,\n ...this,\n };\n};\nObjectAction.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ObjectAction, ProtocolManager`,\n ...this,\n };\n};\nWaitTimeAction.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.WaitTimeAction, ProtocolManager`,\n ...this,\n };\n};\nObjectTrigger.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ObjectTrigger, ProtocolManager`,\n ...this,\n };\n};\nButtonTrigger.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ButtonTrigger, ProtocolManager`,\n ...this,\n };\n};\nDateAndTimeTrigger.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.DateAndTimeTrigger, ProtocolManager`,\n ...this,\n };\n};\nTimeCondition.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.TimeCondition, ProtocolManager`,\n ...this,\n };\n};\nObjectCondition.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ObjectCondition, ProtocolManager`,\n ...this,\n };\n};\nExtDevice.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ExtDevice, ProtocolManager`,\n ...this,\n };\n};\nColoredLightExtDevice.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.ColoredLightExtDevice, ProtocolManager`,\n ...this,\n };\n};\nXmeterExtDevice.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.XmeterExtDevice, ProtocolManager`,\n ...this,\n };\n};\nPlayerExtDevice.prototype.toJSON = function (data?: any) {\n return {\n $type: `ProtocolManager.Model.PlayerExtDevice, ProtocolManager`,\n ...this,\n };\n};\n\nconst plantsClient = new Client('', axiosInstance);\n\nexport default plantsClient;\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","import i18n from '../translations/i18n';\nimport { isValidEnum, ObjectTypes } from '../utils/utils';\nimport configurationsClient from './configurations-service';\nimport {\n PlantEntityType,\n PlantFlatEntityDTO,\n} from '@/../client-generator/generated-clients/configurations';\nimport {\n RoomDTO,\n RoomType,\n RoomObjectType,\n AddRoomObjectDTO,\n IRoomObject,\n PlantListDTO,\n} from '@/../client-generator/generated-clients/plants';\n\nexport interface IValidableObjectType extends AddRoomObjectDTO {\n idx?: number;\n isInvalid?: boolean;\n invalidReason?: string;\n}\n\nexport interface RoomObjectsTypes {\n id: string;\n objects: Array;\n type: RoomObjectType;\n busy?: boolean;\n}\n\nexport type ValidablePlant = Partial & {\n isInvalid?: boolean;\n invalidReason?: string;\n};\n\nexport interface ISuggestValidObjectNameOpts {\n plantId: number;\n eType: PlantEntityType;\n\n /**\n * Additional data required in certain scenarios\n * in order to be able to suggest the next valid name\n */\n metadata?: {\n /**\n * In case we are suggesting the name for a\n * room object, we need the Room\n */\n room?: RoomDTO;\n\n /**\n * In case we are suggesting the name for a\n * room object or a group, we need the RoomObjectType\n */\n roomObjectType?: RoomObjectType;\n\n /**\n * In case we are suggesting the name for\n * a room, we need the RoomType\n */\n roomType?: RoomType;\n\n /**\n * In case we are suggesting the name for\n * a cloned plant, we always start with a\n * source name\n */\n plantSourceName?: string;\n };\n}\n\nexport class NamingService {\n private static $t = i18n.global.t;\n\n /**\n * Used to cache requests. This turns out to be\n * very useful when subsequent entities of the same\n * type must be validated. Without this, the validation\n * method would call the API for each validation.\n */\n private static initialEntitiesInternal: PlantFlatEntityDTO[] = [];\n private static additionalEntitiesInternal: PlantFlatEntityDTO[] = [];\n\n static async prefetchFlatEntities(\n plantId: number,\n eType: PlantEntityType\n ): Promise {\n this.initialEntities = await configurationsClient.flattenedEntities(\n plantId,\n eType\n );\n return Promise.resolve(!!this.initialEntities);\n }\n\n static set additionalEntities(v: PlantFlatEntityDTO[]) {\n this.additionalEntitiesInternal = v;\n }\n\n static get additionalEntities(): PlantFlatEntityDTO[] {\n return this.additionalEntitiesInternal;\n }\n\n static set initialEntities(v: PlantFlatEntityDTO[]) {\n this.initialEntitiesInternal = v;\n }\n\n static get initialEntities(): PlantFlatEntityDTO[] {\n return this.initialEntitiesInternal;\n }\n\n static flushCache(): void {\n this.initialEntitiesInternal = [];\n this.additionalEntitiesInternal = [];\n }\n\n /**\n * Convenience method to update a cached name without\n * flushing and reloading the cache again\n *\n * @param currentName the entity name you want edit\n * @param newName the new entity name\n */\n static forcefullyRenameFirstEntityWithinCachedOnes(\n currentName: string,\n newName: string\n ): void {\n const initialEntitiesWantedIdx = this.initialEntities.findIndex(\n (e) =>\n e.currentName?.trim().toLowerCase() === currentName.trim().toLowerCase()\n );\n if (initialEntitiesWantedIdx !== -1)\n this.initialEntities[initialEntitiesWantedIdx].currentName = newName;\n\n const additionalEntitiesWantedIdx = this.additionalEntities.findIndex(\n (e) =>\n e.currentName?.trim().toLowerCase() === currentName.trim().toLowerCase()\n );\n if (additionalEntitiesWantedIdx !== -1)\n this.additionalEntities[\n additionalEntitiesWantedIdx\n ].currentName = newName;\n }\n\n static isValidEntityTypeName(name?: string): boolean {\n if (!name || !name.trim()) return false;\n return (\n this.initialEntities.every(\n (e) =>\n e.currentName?.toLowerCase().trim() !== name?.toLowerCase().trim()\n ) &&\n this.additionalEntities.every(\n (e) =>\n e.currentName?.toLowerCase().trim() !== name?.toLowerCase().trim()\n )\n );\n }\n\n static async validateRoomObjectAgainstList(\n list: RoomObjectsTypes[],\n objectToValidate: IRoomObject\n ): Promise {\n for (const oType of list) {\n let sameNameOccurrences = 0;\n for (const innerObject of oType.objects) {\n if (\n innerObject.name?.toLowerCase().trim() ===\n objectToValidate.name?.toLowerCase().trim()\n ) {\n sameNameOccurrences++;\n innerObject.isInvalid = sameNameOccurrences > 1;\n } else {\n innerObject.isInvalid = false;\n }\n }\n }\n return Promise.resolve(list);\n }\n\n static validatePlantAgainstList(list: ValidablePlant[]): ValidablePlant[] {\n for (const loopingPlant of list) {\n loopingPlant.isInvalid =\n list.filter(\n (e) =>\n e.name?.toLowerCase().trim() ===\n loopingPlant.name?.toLowerCase().trim()\n ).length > 1;\n }\n return list;\n }\n\n /**\n * Suggests the next valid name for an entity according to the\n * configuration of the options provided:\n *\n * The minimum required options are the plantId and the PlantEntityType.\n * Other than those, there are specific combinations to use in order to\n * suggest the name for each entity type. These combinations are provided\n * to the \"metadata\" property of the configuration object:\n *\n * - Scene: no metadata required\n * - Room: metadata.roomType must be valorized\n * - Group: metadata.roomObjectType must be valorized\n * - RoomObject: metadata.room, metadata.roomType,\n * metadata.roomObjectType must be valorized\n *\n * @param opts\n * @returns Promise the next valid name that can be used\n */\n static async suggestNextValidEntityName(\n opts: ISuggestValidObjectNameOpts\n ): Promise {\n let modifier = 0;\n let baseName: string = this.initEntityNameOrThrow(opts);\n let name = '';\n\n do {\n modifier++;\n name =\n modifier === 1 ? baseName.trim() : baseName.trim() + ` ${modifier}`;\n } while (!this.isValidEntityTypeName(name));\n\n return Promise.resolve(name);\n }\n\n private static initEntityNameOrThrow(\n opts: ISuggestValidObjectNameOpts\n ): string {\n // RoomObject name suggestion\n if (\n opts.eType === PlantEntityType.ROOM_OBJECT &&\n !!opts.metadata?.room &&\n isValidEnum(opts.metadata?.roomType) &&\n isValidEnum(opts.metadata?.roomObjectType)\n ) {\n return this.initRoomObjectName(\n opts.metadata.room,\n opts.metadata?.roomObjectType as number\n );\n }\n\n // Room name suggestion\n if (\n opts.eType === PlantEntityType.ROOM &&\n isValidEnum(opts.metadata?.roomType)\n ) {\n return this.initRoomName(opts.metadata?.roomType as number);\n }\n\n // Scene name suggestion\n if (opts.eType === PlantEntityType.SCENE) {\n return this.initSceneName();\n }\n\n // Group name suggestion\n if (\n opts.eType === PlantEntityType.GROUP &&\n isValidEnum(opts.metadata?.roomObjectType)\n ) {\n return this.initGroupName(opts.metadata?.roomObjectType as number);\n }\n\n // Plant name suggestion\n if (opts.eType === PlantEntityType.PLANT) {\n if (!opts.metadata?.plantSourceName)\n throw new Error(\n 'PlantSourceName is required to suggest the next plant name'\n );\n return this.initPlantName(opts.metadata?.plantSourceName!);\n }\n\n const errMsg = `[X](${NamingService.name}): Could not infer the entity name to generate. Check your opts combination.`;\n // this log is for convenience since Vue messes up the messages of the errors in console.\n console.error(errMsg);\n throw new Error(errMsg);\n }\n\n private static initPlantName(sourceName: string): string {\n return `${sourceName.trim()} ${this.$t('AppResource.Copy').toLowerCase()}`;\n }\n\n private static initGroupName(roomObjectType: RoomObjectType): string {\n switch (roomObjectType) {\n case RoomObjectType.Shutter:\n return this.$t('AppResource.GroupOfShutters');\n case RoomObjectType.Light:\n return this.$t('AppResource.GroupOfLights');\n default:\n return '';\n }\n }\n\n private static initSceneName(): string {\n return this.$t(`AppResource.Scene`);\n }\n\n private static initRoomName(roomType: RoomType): string {\n return this.$t(`AppResource.${RoomType[roomType]}`);\n }\n\n private static initRoomObjectName(\n room: RoomDTO,\n objType: RoomObjectType\n ): string {\n return `${room.name} ` + this.$t(`AppResource.${RoomObjectType[objType]}`);\n }\n}\n"],"sourceRoot":""}