@c8y/ng1-modules 1018.266.0 → 1018.268.0

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 (48) hide show
  1. package/NOTICES +87 -130
  2. package/app-logs/app-logs.service.js +1 -1
  3. package/assetPropertyWidget/main.controller.js +1 -1
  4. package/cell-id-information-activator/cell-id-information-activator.config.js +1 -1
  5. package/core/core/services/alarms.js +1 -1
  6. package/core/core/services/application.js +1 -1
  7. package/core/core/services/base.js +1 -1
  8. package/core/core/services/dynamicGroups.js +1 -1
  9. package/core/core/services/groups.js +1 -1
  10. package/core/core/services/inventory.js +1 -1
  11. package/core/core/services/kpi.js +1 -1
  12. package/core/core/services/settings.js +1 -1
  13. package/core/core/services/tenant.js +1 -1
  14. package/core/core/services/user.js +1 -1
  15. package/core/core/services/util.js +1 -1
  16. package/core/ui/configurable-device-list-columns/configurable-columns.service.js +1 -1
  17. package/core/ui/configurable-device-list-columns/modal-columns-configure.component.js +1 -1
  18. package/core/ui/controllers/deviceList.js +1 -1
  19. package/core/ui/csvExporter/csvExporter.controller.js +1 -1
  20. package/core/ui/directives/alarmList.js +1 -1
  21. package/core/ui/directives/map2.js +1 -1
  22. package/core/ui/properties/lastDeviceMessage.computedProperty.js +1 -1
  23. package/device-protocol-actility/actility-device.provider.js +1 -1
  24. package/device-protocol-canbus/canbus-device.provider.js +1 -1
  25. package/device-protocol-canopen/canopen-device.provider.js +1 -1
  26. package/device-protocol-deviceDatabase4/device-type-protocol-base.provider.js +1 -1
  27. package/device-protocol-lora/lora-device.provider.js +1 -1
  28. package/device-protocol-lpwan/lpwan-device.provider.js +1 -1
  29. package/device-protocol-modbus/modbus-device.provider.js +1 -1
  30. package/device-protocol-opcua/opcua-device.provider.js +1 -1
  31. package/device-protocol-profibus/profibus-device.provider.js +1 -1
  32. package/device-protocol-sigfox/sigfox-device.provider.js +1 -1
  33. package/device-protocol-snmp/snmp-device.provider.js +1 -1
  34. package/deviceDatabase4/device-database.service.js +1 -1
  35. package/deviceSelector/controllers/deviceSelectorComboCtrl.js +1 -1
  36. package/devicemanagement-alarmList/controllers/alarmList.js +1 -1
  37. package/devicemanagement-eventList/controllers/eventList.js +1 -1
  38. package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +1 -1
  39. package/eventList/eventList.controller.js +1 -1
  40. package/groupsHierarchy/controllers/groupsListCtrl.js +1 -1
  41. package/kpi/controllers/pieChart.js +1 -1
  42. package/modbusWidget4/modbus-widget.service.js +1 -1
  43. package/package.json +1 -1
  44. package/remoteAccess/remoteAccess.service.js +1 -1
  45. package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +1 -1
  46. package/scada/mapping.directive.js +1 -1
  47. package/tenantStatistics/tenant-statistics.component.js +1 -1
  48. package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
package/NOTICES CHANGED
@@ -24923,7 +24923,7 @@ Repository: <https://github.com/angular/angular.git>
24923
24923
 
24924
24924
  ----------------------------------------
24925
24925
 
24926
- ### @babel/code-frame@v7.16.7
24926
+ ### @babel/code-frame@v7.18.6
24927
24927
 
24928
24928
  License: MIT
24929
24929
  By: The Babel Team
@@ -24954,7 +24954,7 @@ Repository: <https://github.com/babel/babel.git>
24954
24954
 
24955
24955
  ----------------------------------------
24956
24956
 
24957
- ### @babel/helper-validator-identifier@v7.16.7
24957
+ ### @babel/helper-validator-identifier@v7.19.1
24958
24958
 
24959
24959
  License: MIT
24960
24960
  By: The Babel Team
@@ -24985,7 +24985,7 @@ Repository: <https://github.com/babel/babel.git>
24985
24985
 
24986
24986
  ----------------------------------------
24987
24987
 
24988
- ### @babel/highlight@v7.16.10
24988
+ ### @babel/highlight@v7.18.6
24989
24989
 
24990
24990
  License: MIT
24991
24991
  By: The Babel Team
@@ -25016,7 +25016,7 @@ Repository: <https://github.com/babel/babel.git>
25016
25016
 
25017
25017
  ----------------------------------------
25018
25018
 
25019
- ### @babel/parser@v7.18.0
25019
+ ### @babel/parser@v7.21.3
25020
25020
 
25021
25021
  License: MIT
25022
25022
  By: The Babel Team
@@ -25235,14 +25235,14 @@ License: MIT
25235
25235
 
25236
25236
  ----------------------------------------
25237
25237
 
25238
- ### @typescript-eslint/types@v5.27.0
25238
+ ### @typescript-eslint/types@v5.55.0
25239
25239
 
25240
25240
  License: MIT
25241
25241
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25242
25242
 
25243
25243
  > MIT License
25244
25244
  >
25245
- > Copyright (c) 2019 TypeScript ESLint and other contributors
25245
+ > Copyright (c) 2019 typescript-eslint and other contributors
25246
25246
  >
25247
25247
  > Permission is hereby granted, free of charge, to any person obtaining a copy
25248
25248
  > of this software and associated documentation files (the "Software"), to deal
@@ -25264,7 +25264,7 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25264
25264
 
25265
25265
  ----------------------------------------
25266
25266
 
25267
- ### @typescript-eslint/typescript-estree@v5.27.0
25267
+ ### @typescript-eslint/typescript-estree@v5.55.0
25268
25268
 
25269
25269
  License: BSD-2-Clause
25270
25270
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
@@ -25279,11 +25279,11 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25279
25279
  > Redistribution and use in source and binary forms, with or without
25280
25280
  > modification, are permitted provided that the following conditions are met:
25281
25281
  >
25282
- > * Redistributions of source code must retain the above copyright
25283
- > notice, this list of conditions and the following disclaimer.
25284
- > * Redistributions in binary form must reproduce the above copyright
25285
- > notice, this list of conditions and the following disclaimer in the
25286
- > documentation and/or other materials provided with the distribution.
25282
+ > - Redistributions of source code must retain the above copyright
25283
+ > notice, this list of conditions and the following disclaimer.
25284
+ > - Redistributions in binary form must reproduce the above copyright
25285
+ > notice, this list of conditions and the following disclaimer in the
25286
+ > documentation and/or other materials provided with the distribution.
25287
25287
  >
25288
25288
  > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25289
25289
  > AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -25298,14 +25298,14 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25298
25298
 
25299
25299
  ----------------------------------------
25300
25300
 
25301
- ### @typescript-eslint/visitor-keys@v5.27.0
25301
+ ### @typescript-eslint/visitor-keys@v5.55.0
25302
25302
 
25303
25303
  License: MIT
25304
25304
  Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25305
25305
 
25306
25306
  > MIT License
25307
25307
  >
25308
- > Copyright (c) 2019 TypeScript ESLint and other contributors
25308
+ > Copyright (c) 2019 typescript-eslint and other contributors
25309
25309
  >
25310
25310
  > Permission is hereby granted, free of charge, to any person obtaining a copy
25311
25311
  > of this software and associated documentation files (the "Software"), to deal
@@ -25327,14 +25327,14 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
25327
25327
 
25328
25328
  ----------------------------------------
25329
25329
 
25330
- ### acorn@v8.7.0
25330
+ ### acorn@v8.8.1
25331
25331
 
25332
25332
  License: MIT
25333
25333
  Repository: <https://github.com/acornjs/acorn.git>
25334
25334
 
25335
25335
  > MIT License
25336
25336
  >
25337
- > Copyright (C) 2012-2020 by various contributors (see AUTHORS)
25337
+ > Copyright (C) 2012-2022 by various contributors (see AUTHORS)
25338
25338
  >
25339
25339
  > Permission is hereby granted, free of charge, to any person obtaining a copy
25340
25340
  > of this software and associated documentation files (the "Software"), to deal
@@ -26141,42 +26141,15 @@ By: Jon Schlinkert
26141
26141
 
26142
26142
  ----------------------------------------
26143
26143
 
26144
- ### debug@v4.3.4
26145
-
26146
- License: MIT
26147
- By: Josh Junon
26148
- Repository: <git://github.com/debug-js/debug.git>
26149
-
26150
- > (The MIT License)
26151
- >
26152
- > Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
26153
- > Copyright (c) 2018-2021 Josh Junon
26154
- >
26155
- > Permission is hereby granted, free of charge, to any person obtaining a copy of this software
26156
- > and associated documentation files (the 'Software'), to deal in the Software without restriction,
26157
- > including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
26158
- > and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
26159
- > subject to the following conditions:
26160
- >
26161
- > The above copyright notice and this permission notice shall be included in all copies or substantial
26162
- > portions of the Software.
26163
- >
26164
- > THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
26165
- > LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26166
- > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26167
- > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26168
- > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26169
-
26170
- ----------------------------------------
26171
-
26172
- ### defaults@v1.0.3
26144
+ ### defaults@v1.0.4
26173
26145
 
26174
26146
  License: MIT
26175
26147
  By: Elijah Insua
26176
- Repository: <git://github.com/tmpvar/defaults.git>
26148
+ Repository: <git://github.com/sindresorhus/node-defaults.git>
26177
26149
 
26178
26150
  > The MIT License (MIT)
26179
26151
  >
26152
+ > Copyright (c) 2022 Sindre Sorhus
26180
26153
  > Copyright (c) 2015 Elijah Insua
26181
26154
  >
26182
26155
  > Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -26199,7 +26172,7 @@ Repository: <git://github.com/tmpvar/defaults.git>
26199
26172
 
26200
26173
  ----------------------------------------
26201
26174
 
26202
- ### del@v6.0.0
26175
+ ### del@v6.1.1
26203
26176
 
26204
26177
  License: MIT
26205
26178
  By: Sindre Sorhus
@@ -26317,7 +26290,7 @@ Repository: <git://github.com/editorconfig/editorconfig-core-js.git>
26317
26290
 
26318
26291
  ----------------------------------------
26319
26292
 
26320
- ### editorconfig-to-prettier@v0.2.0
26293
+ ### editorconfig-to-prettier@v1.0.0
26321
26294
 
26322
26295
  License: ISC
26323
26296
  By: Joseph Frazier
@@ -26637,7 +26610,7 @@ By: Toru Nagashima
26637
26610
 
26638
26611
  ----------------------------------------
26639
26612
 
26640
- ### espree@v9.3.1
26613
+ ### espree@v9.4.1
26641
26614
 
26642
26615
  License: BSD-2-Clause
26643
26616
  By: Nicholas C. Zakas
@@ -26745,7 +26718,7 @@ Repository: <https://github.com/justmoon/node-extend.git>
26745
26718
 
26746
26719
  ----------------------------------------
26747
26720
 
26748
- ### fast-glob@v3.2.11
26721
+ ### fast-glob@v3.2.12
26749
26722
 
26750
26723
  License: MIT
26751
26724
  By: Denis Malinochkin
@@ -26804,7 +26777,7 @@ Repository: <git://github.com/epoberezkin/fast-json-stable-stringify.git>
26804
26777
 
26805
26778
  ----------------------------------------
26806
26779
 
26807
- ### fastq@v1.13.0
26780
+ ### fastq@v1.14.0
26808
26781
 
26809
26782
  License: ISC
26810
26783
  By: Matteo Collina
@@ -26978,7 +26951,7 @@ By: Roy Riojas
26978
26951
 
26979
26952
  ----------------------------------------
26980
26953
 
26981
- ### flatted@v3.2.5
26954
+ ### flatted@v3.2.7
26982
26955
 
26983
26956
  License: ISC
26984
26957
  By: Andrea Giammarchi
@@ -27153,7 +27126,7 @@ By: Sindre Sorhus
27153
27126
 
27154
27127
  ----------------------------------------
27155
27128
 
27156
- ### glob@v7.2.0
27129
+ ### glob@v7.2.3
27157
27130
 
27158
27131
  License: ISC
27159
27132
  By: Isaac Z. Schlueter
@@ -27223,14 +27196,14 @@ By: Sindre Sorhus
27223
27196
 
27224
27197
  ----------------------------------------
27225
27198
 
27226
- ### graceful-fs@v4.2.9
27199
+ ### graceful-fs@v4.2.10
27227
27200
 
27228
27201
  License: ISC
27229
27202
  Repository: <https://github.com/isaacs/node-graceful-fs>
27230
27203
 
27231
27204
  > The ISC License
27232
27205
  >
27233
- > Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors
27206
+ > Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
27234
27207
  >
27235
27208
  > Permission to use, copy, modify, and/or distribute this software for any
27236
27209
  > purpose with or without fee is hereby granted, provided that the above
@@ -27383,36 +27356,6 @@ By: Titus Wormer
27383
27356
 
27384
27357
  ----------------------------------------
27385
27358
 
27386
- ### html-void-elements@v2.0.1
27387
-
27388
- License: MIT
27389
- By: Titus Wormer
27390
-
27391
- > (The MIT License)
27392
- >
27393
- > Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com>
27394
- >
27395
- > Permission is hereby granted, free of charge, to any person obtaining
27396
- > a copy of this software and associated documentation files (the
27397
- > 'Software'), to deal in the Software without restriction, including
27398
- > without limitation the rights to use, copy, modify, merge, publish,
27399
- > distribute, sublicense, and/or sell copies of the Software, and to
27400
- > permit persons to whom the Software is furnished to do so, subject to
27401
- > the following conditions:
27402
- >
27403
- > The above copyright notice and this permission notice shall be
27404
- > included in all copies or substantial portions of the Software.
27405
- >
27406
- > THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
27407
- > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27408
- > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27409
- > IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
27410
- > CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27411
- > TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27412
- > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27413
-
27414
- ----------------------------------------
27415
-
27416
27359
  ### human-signals@v3.0.1
27417
27360
 
27418
27361
  License: Apache-2.0
@@ -27652,6 +27595,36 @@ Repository: <git@github.com:kaelzhang/node-ignore.git>
27652
27595
 
27653
27596
  ----------------------------------------
27654
27597
 
27598
+ ### ignore@v5.2.4
27599
+
27600
+ License: MIT
27601
+ By: kael
27602
+ Repository: <git@github.com:kaelzhang/node-ignore.git>
27603
+
27604
+ > Copyright (c) 2013 Kael Zhang <i@kael.me>, contributors
27605
+ > http://kael.me/
27606
+ >
27607
+ > Permission is hereby granted, free of charge, to any person obtaining
27608
+ > a copy of this software and associated documentation files (the
27609
+ > "Software"), to deal in the Software without restriction, including
27610
+ > without limitation the rights to use, copy, modify, merge, publish,
27611
+ > distribute, sublicense, and/or sell copies of the Software, and to
27612
+ > permit persons to whom the Software is furnished to do so, subject to
27613
+ > the following conditions:
27614
+ >
27615
+ > The above copyright notice and this permission notice shall be
27616
+ > included in all copies or substantial portions of the Software.
27617
+ >
27618
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27619
+ > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27620
+ > MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27621
+ > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27622
+ > LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27623
+ > OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27624
+ > WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27625
+
27626
+ ----------------------------------------
27627
+
27655
27628
  ### import-fresh@v3.3.0
27656
27629
 
27657
27630
  License: MIT
@@ -27883,7 +27856,7 @@ Repository: <git://github.com/feross/is-buffer.git>
27883
27856
 
27884
27857
  ----------------------------------------
27885
27858
 
27886
- ### is-core-module@v2.8.1
27859
+ ### is-core-module@v2.11.0
27887
27860
 
27888
27861
  License: MIT
27889
27862
  By: Jordan Harband
@@ -28228,7 +28201,7 @@ Repository: <git+https://github.com/isaacs/isexe.git>
28228
28201
 
28229
28202
  ----------------------------------------
28230
28203
 
28231
- ### jest-docblock@v27.5.1
28204
+ ### jest-docblock@v28.1.1
28232
28205
 
28233
28206
  License: MIT
28234
28207
  Repository: <https://github.com/facebook/jest.git>
@@ -28319,7 +28292,7 @@ By: Kat Marchán
28319
28292
 
28320
28293
  ----------------------------------------
28321
28294
 
28322
- ### json5@v2.2.1
28295
+ ### json5@v2.2.2
28323
28296
 
28324
28297
  License: MIT
28325
28298
  By: Aseem Kishore
@@ -28801,34 +28774,6 @@ Repository: <git://github.com/substack/minimist.git>
28801
28774
 
28802
28775
  ----------------------------------------
28803
28776
 
28804
- ### ms@v2.1.2
28805
-
28806
- License: MIT
28807
-
28808
- > The MIT License (MIT)
28809
- >
28810
- > Copyright (c) 2016 Zeit, Inc.
28811
- >
28812
- > Permission is hereby granted, free of charge, to any person obtaining a copy
28813
- > of this software and associated documentation files (the "Software"), to deal
28814
- > in the Software without restriction, including without limitation the rights
28815
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
28816
- > copies of the Software, and to permit persons to whom the Software is
28817
- > furnished to do so, subject to the following conditions:
28818
- >
28819
- > The above copyright notice and this permission notice shall be included in all
28820
- > copies or substantial portions of the Software.
28821
- >
28822
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28823
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28824
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28825
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28826
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28827
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28828
- > SOFTWARE.
28829
-
28830
- ----------------------------------------
28831
-
28832
28777
  ### n-readlines@v1.0.1
28833
28778
 
28834
28779
  License: MIT
@@ -29611,7 +29556,7 @@ By: Jon Schlinkert
29611
29556
 
29612
29557
  ----------------------------------------
29613
29558
 
29614
- ### resolve@v1.22.0
29559
+ ### resolve@v1.22.1
29615
29560
 
29616
29561
  License: MIT
29617
29562
  By: James Halliday
@@ -29820,6 +29765,30 @@ Repository: <https://github.com/npm/node-semver.git>
29820
29765
 
29821
29766
  ----------------------------------------
29822
29767
 
29768
+ ### semver@v7.3.8
29769
+
29770
+ License: ISC
29771
+ By: GitHub Inc.
29772
+ Repository: <https://github.com/npm/node-semver.git>
29773
+
29774
+ > The ISC License
29775
+ >
29776
+ > Copyright (c) Isaac Z. Schlueter and Contributors
29777
+ >
29778
+ > Permission to use, copy, modify, and/or distribute this software for any
29779
+ > purpose with or without fee is hereby granted, provided that the above
29780
+ > copyright notice and this permission notice appear in all copies.
29781
+ >
29782
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
29783
+ > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
29784
+ > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
29785
+ > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
29786
+ > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
29787
+ > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
29788
+ > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29789
+
29790
+ ----------------------------------------
29791
+
29823
29792
  ### semver-compare@v1.0.0
29824
29793
 
29825
29794
  License: MIT
@@ -30251,7 +30220,7 @@ Repository: <https://github.com/ajafff/tsutils>
30251
30220
 
30252
30221
  ----------------------------------------
30253
30222
 
30254
- ### typescript@v4.7.2
30223
+ ### typescript@v5.0.2
30255
30224
 
30256
30225
  License: Apache-2.0
30257
30226
  By: Microsoft Corp.
@@ -30900,18 +30869,6 @@ By: Ika
30900
30869
 
30901
30870
  -----
30902
30871
 
30903
- The following software may be included in this product: prettier. A copy of the source code may be downloaded from https://github.com/prettier/prettier.git. This software contains the following license and notice below:
30904
-
30905
- Copyright © James Long and contributors
30906
-
30907
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
30908
-
30909
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
30910
-
30911
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30912
-
30913
- -----
30914
-
30915
30872
  The following software may be included in this product: prettier-plugin-organize-attributes. A copy of the source code may be downloaded from https://github.com/NiklasPor/prettier-plugin-organize-attributes. This software contains the following license and notice below:
30916
30873
 
30917
30874
  The MIT License (MIT)
@@ -1 +1 @@
1
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable})),n.forEach(function(t){_defineProperty(e,t,o[t])})}return e}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);var n=o.call(t,e||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(c,i,u,n,r,a){var l="application/applications",s="application/vnd.com.nsn.cumulocity.applicationLogs+json;charset=UTF-8;ver=0.9";return{downloadAndSaveAs:function(t,o,n,r){return e(t,o,n,r).then(function(t){var e=t.logs;_.isEmpty(e)?a.info(g(n,r)):function(t,e){var o="".concat(t,".log"),n=new Blob([e],{type:"text/plain"});window.saveAs(n,o)}(o,e)})},shouldShowLogsTab:function(t){var e="c8y_Application_".concat(t),o=new Date;return n.list({type:e,nocache:o.getTime()}).then(function(t){var e;if(_.isEqual(_.get(t,"length"),1)){var o=_.head(t),n=_.get(o,"c8y_SupportedLogs"),r=_.get(o,"c8y_Status.instances");e=_.some(n,function(t){return"syslog"===t})&&!_.isEmpty(r)}return e})},getAllLogs:e,getLogs:m,formatDateChosenByUser:function(t){var e=moment(t).format("YYYY-MM-DDTHH:mm:ss.SSS");return moment("".concat(e,"Z")).toISOString()},getWarningMessageForMissingLogs:g};function e(n,r,e,a){var i=[];return m(n,r,{dateFrom:e,dateTo:a}).then(function t(e){var o=f(e.dateTo);return i.push(e.logs),moment(o).isValid()&&e.truncated&&e.dateFrom!==e.dateTo?m(n,r,{dateFrom:o,dateTo:a}).then(t):c.resolve(i)}).then(function(t){return function(t,e,o){var n=o.join("");return{dateFrom:t,dateTo:e,logs:n}}(e,a,t)})}function m(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=3<arguments.length?arguments[3]:void 0,r=u.url("".concat(l,"/").concat(t,"/logs/").concat(e)),a=_objectSpread({headers:{Accept:s},params:o},n);return o.dateFrom&&(o.dateFrom=f(o.dateFrom)),o.dateTo&&(o.dateTo=f(o.dateTo)),i.get(r,a).then(u.getResData)}function f(t){return moment(t).format(u.dateFullFormatWithMs)}function g(t,e){var o;return!t&&e&&(o=r.getString("No logs available before {{dateTo | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateTo:e})),t&&e&&(o=r.getString("No logs available in time range {{dateFrom | absoluteDateTimeFormat:'LL, LTS':'+0000'}} - {{dateTo | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateFrom:t,dateTo:e})),t&&!e&&(o=r.getString("No logs available after {{dateFrom | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateFrom:t})),t||e||(o=r.getString("No logs available.")),o}}t.$inject=["$q","$http","c8yBase","c8yInventory","gettextCatalog","c8yAlert"],angular.module("c8y.appLogs").factory("c8yApplicationLogs",t)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(o),!0).forEach(function(t){_defineProperty(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);var r=o.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(c,i,u,r,n,a){var s="application/applications",l="application/vnd.com.nsn.cumulocity.applicationLogs+json;charset=UTF-8;ver=0.9";return{downloadAndSaveAs:function(t,o,r,n){return e(t,o,r,n).then(function(t){var e=t.logs;_.isEmpty(e)?a.info(p(r,n)):function(t,e){var o="".concat(t,".log"),r=new Blob([e],{type:"text/plain"});window.saveAs(r,o)}(o,e)})},shouldShowLogsTab:function(t){var e="c8y_Application_".concat(t),o=new Date;return r.list({type:e,nocache:o.getTime()}).then(function(t){var e;if(_.isEqual(_.get(t,"length"),1)){var o=_.head(t),r=_.get(o,"c8y_SupportedLogs"),n=_.get(o,"c8y_Status.instances");e=_.some(r,function(t){return"syslog"===t})&&!_.isEmpty(n)}return e})},getAllLogs:e,getLogs:f,formatDateChosenByUser:function(t){var e=moment(t).format("YYYY-MM-DDTHH:mm:ss.SSS");return moment("".concat(e,"Z")).toISOString()},getWarningMessageForMissingLogs:p};function e(r,n,e,a){var i=[];return f(r,n,{dateFrom:e,dateTo:a}).then(function t(e){var o=m(e.dateTo);return i.push(e.logs),moment(o).isValid()&&e.truncated&&e.dateFrom!==e.dateTo?f(r,n,{dateFrom:o,dateTo:a}).then(t):c.resolve(i)}).then(function(t){return function(t,e,o){var r=o.join("");return{dateFrom:t,dateTo:e,logs:r}}(e,a,t)})}function f(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=3<arguments.length?arguments[3]:void 0,n=u.url("".concat(s,"/").concat(t,"/logs/").concat(e)),a=_objectSpread({headers:{Accept:l},params:o},r);return o.dateFrom&&(o.dateFrom=m(o.dateFrom)),o.dateTo&&(o.dateTo=m(o.dateTo)),i.get(n,a).then(u.getResData)}function m(t){return moment(t).format(u.dateFullFormatWithMs)}function p(t,e){var o;return!t&&e&&(o=n.getString("No logs available before {{dateTo | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateTo:e})),t&&e&&(o=n.getString("No logs available in time range {{dateFrom | absoluteDateTimeFormat:'LL, LTS':'+0000'}} - {{dateTo | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateFrom:t,dateTo:e})),t&&!e&&(o=n.getString("No logs available after {{dateFrom | absoluteDateTimeFormat:'LL, LTS':'+0000'}}.",{dateFrom:t})),t||e||(o=n.getString("No logs available.")),o}}t.$inject=["$q","$http","c8yBase","c8yInventory","gettextCatalog","c8yAlert"],angular.module("c8y.appLogs").factory("c8yApplicationLogs",t)}();
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?Object(arguments[e]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),n.forEach(function(e){_defineProperty(t,e,r[e])})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);var n=r.call(e,t||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(n,e,t,r,o,i,a,c,u,l){var f=_.memoize(function(){return e.all({configProperties:function(){var e=P("properties",[]);return _.filter(e,"__active").map(function(e){return angular.copy(e)})}(),discoveredProperties:function(){if(P("allowDisplayAndEditKnownProperties",!1))return o.list().then(function(e){return _.filter(e,p)}).then(function(e){return _.filter(e,h)});return[]}()}).then(function(e){var t=e.configProperties,r=e.discoveredProperties;return _(t).concat(r).uniqBy(function(e){return"".concat(_.get(e,"id"),"_").concat(_.get(e,"config._id"))}).reject(j).value()})});function s(){f.cache.clear(),n.$emit("stopRealtime"),function(){var e=n.child.config.device.id;return r.detailRealtime(e,n,void 0,{withChildren:!0}).then(function(e){n.managedObject=e})}().then(y).then(d).then(m)}function y(){return f().then(function(e){i.attach(n.managedObject,e)})}function d(){return f().then(function(e){return o.getSchema(e)}).then(function(e){n.schema=e})}function p(e){return 1===e.keyPath.length}function h(e){return _.has(n.managedObject,e.keyPath[0])}function m(){b(!0)}function b(t){return e.all({properties:f(),options:function(e){var t={};e&&(t.readonly=e,t.feedback=!1,t.disableSuccessState=!0,t.disableErrorState=!0);return t}(t)}).then(function(e){var t=e.properties,r=e.options;return o.getForm(t,r)}).then(function(e){n.form=e,n.editable=!t})}function g(e){!function(e){_.forEach(e,function(e){var t=_slicedToArray(e.keyPath,1),r=t[0];_.isUndefined(n.managedObject[r])&&(n.managedObject[r]=null)})}(e),f.cache.clear(),d().then(function(){return b(!1)})}function v(){t.getContext().id===n.child.config.device.id&&c.changeTitle({title:_.get(n,"managedObject.name")||""},{skipTitleTranslation:!0})}function P(e,t){return _.get(n.child.config.options,e,t)}function j(e){var t=P("hiddenPropertiesKeyPaths",[]);return!!_.includes(t,e.keyPath[0])}n.$watch("child.config.options",s),_.assign(n,{startEdit:function(){n.managedObject=_.cloneDeep(n.managedObject),y(),b(!1)},canAddProperties:function(){return P("allowDisplayAndEditKnownProperties",!1)},addProperties:function(){var e={includeTree:!1,includeTreeChildren:!1,showComputed:!1,showRootPropertiesOnly:!0,managedObject:n.managedObject,hideExistingInMO:!0};return l.openSelector(e).then(g)},save:function(){return f().then(function(e){return _.reject(e,{computed:!0})}).then(function(e){return _objectSpread({id:n.managedObject.id},_.pick(n.managedObject,_.map(e,"keyPath[0]")))}).then(r.save).then(v).then(function(){return a.success(u("Changes saved."))}).then(s)},cancelEdit:function(){s()}})}e.$inject=["$scope","$q","c8yUiUtil","c8yInventory","c8yPropertiesLibrary","c8yComputedProperties","c8yAlert","c8yTitle","gettext","SchemaPropertiesSvc"],angular.module("c8y.parts.assetPropertyWidget").controller("assetPropertyWidgetCtrl",e)}();
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);var n=r.call(e,t||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,a=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(n,e,t,r,o,i,c,a,u,l){var f=_.memoize(function(){return e.all({configProperties:function(){var e=P("properties",[]);return _.filter(e,"__active").map(function(e){return angular.copy(e)})}(),discoveredProperties:function(){if(P("allowDisplayAndEditKnownProperties",!1))return o.list().then(function(e){return _.filter(e,d)}).then(function(e){return _.filter(e,b)});return[]}()}).then(function(e){var t=e.configProperties,r=e.discoveredProperties;return _(t).concat(r).uniqBy(function(e){return"".concat(_.get(e,"id"),"_").concat(_.get(e,"config._id"))}).reject(j).value()})});function s(){f.cache.clear(),n.$emit("stopRealtime"),function(){var e=n.child.config.device.id;return r.detailRealtime(e,n,void 0,{withChildren:!0}).then(function(e){n.managedObject=e})}().then(y).then(p).then(h)}function y(){return f().then(function(e){i.attach(n.managedObject,e)})}function p(){return f().then(function(e){return o.getSchema(e)}).then(function(e){n.schema=e})}function d(e){return 1===e.keyPath.length}function b(e){return _.has(n.managedObject,e.keyPath[0])}function h(){m(!0)}function m(t){return e.all({properties:f(),options:function(e){var t={};e&&(t.readonly=e,t.feedback=!1,t.disableSuccessState=!0,t.disableErrorState=!0);return t}(t)}).then(function(e){var t=e.properties,r=e.options;return o.getForm(t,r)}).then(function(e){n.form=e,n.editable=!t})}function g(e){!function(e){_.forEach(e,function(e){var t=_slicedToArray(e.keyPath,1),r=t[0];_.isUndefined(n.managedObject[r])&&(n.managedObject[r]=null)})}(e),f.cache.clear(),p().then(function(){return m(!1)})}function v(){t.getContext().id===n.child.config.device.id&&a.changeTitle({title:_.get(n,"managedObject.name")||""},{skipTitleTranslation:!0})}function P(e,t){return _.get(n.child.config.options,e,t)}function j(e){var t=P("hiddenPropertiesKeyPaths",[]);return!!_.includes(t,e.keyPath[0])}n.$watch("child.config.options",s),_.assign(n,{startEdit:function(){n.managedObject=_.cloneDeep(n.managedObject),y(),m(!1)},canAddProperties:function(){return P("allowDisplayAndEditKnownProperties",!1)},addProperties:function(){var e={includeTree:!1,includeTreeChildren:!1,showComputed:!1,showRootPropertiesOnly:!0,managedObject:n.managedObject,hideExistingInMO:!0};return l.openSelector(e).then(g)},save:function(){return f().then(function(e){return _.reject(e,{computed:!0})}).then(function(e){return _objectSpread({id:n.managedObject.id},_.pick(n.managedObject,_.map(e,"keyPath[0]")))}).then(r.save).then(v).then(function(){return c.success(u("Changes saved."))}).then(s)},cancelEdit:function(){s()}})}e.$inject=["$scope","$q","c8yUiUtil","c8yInventory","c8yPropertiesLibrary","c8yComputedProperties","c8yAlert","c8yTitle","gettext","SchemaPropertiesSvc"],angular.module("c8y.parts.assetPropertyWidget").controller("assetPropertyWidgetCtrl",e)}();
@@ -1 +1 @@
1
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable})),r.forEach(function(t){_defineProperty(e,t,o[t])})}return e}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);var r=o.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(t,e){var o={path:"/device/:deviceId/*",actionBar:!0};t.addUrlAction(_objectSpread({},o,{text:e("Activate Cell ID information"),showIf:["$q","$routeParams","cellIdInformationActivator",function(t,e,o){return t.all({shown:o.shouldShowActivator(),activated:o.isActivatedFor(e.deviceId)}).then(function(t){var e=t.shown,o=t.activated;return e&&!o})}],action:["$routeParams","cellIdInformationActivator",function(t,e){e.activate(t.deviceId)}]})),t.addUrlAction(_objectSpread({},o,{text:e("Deactivate Cell ID information"),showIf:["$q","$routeParams","cellIdInformationActivator",function(t,e,o){return t.all({shown:o.shouldShowActivator(),activated:o.isActivatedFor(e.deviceId)}).then(function(t){var e=t.shown,o=t.activated;return e&&o})}],action:["$routeParams","cellIdInformationActivator",function(t,e){e.deactivate(t.deviceId)}]}))}t.$inject=["c8yActionsProvider","gettext"],angular.module("c8y.cellIdInformationActivator").config(t)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);var o=r.call(t,e||"default");if("object"!==_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(t,e){var r={path:"/device/:deviceId/*",actionBar:!0};t.addUrlAction(_objectSpread(_objectSpread({},r),{},{text:e("Activate Cell ID information"),showIf:["$q","$routeParams","cellIdInformationActivator",function(t,e,r){return t.all({shown:r.shouldShowActivator(),activated:r.isActivatedFor(e.deviceId)}).then(function(t){var e=t.shown,r=t.activated;return e&&!r})}],action:["$routeParams","cellIdInformationActivator",function(t,e){e.activate(t.deviceId)}]})),t.addUrlAction(_objectSpread(_objectSpread({},r),{},{text:e("Deactivate Cell ID information"),showIf:["$q","$routeParams","cellIdInformationActivator",function(t,e,r){return t.all({shown:r.shouldShowActivator(),activated:r.isActivatedFor(e.deviceId)}).then(function(t){var e=t.shown,r=t.activated;return e&&r})}],action:["$routeParams","cellIdInformationActivator",function(t,e){e.deactivate(t.deviceId)}]}))}t.$inject=["c8yActionsProvider","gettext"],angular.module("c8y.cellIdInformationActivator").config(t)}();
@@ -1 +1 @@
1
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);var n=r.call(t,e||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(o,a,u,i,n,t,e,c){var s=a.cleanFields,f="alarm/alarms",l="".concat(f,"/reports"),m={headers:a.contentHeaders("alarm")},r={WARNING:e("WARNING"),MINOR:e("MINOR"),MAJOR:e("MAJOR"),CRITICAL:e("CRITICAL")},y=[r.CRITICAL,r.MAJOR,r.MINOR,r.WARNING],p=_.keys(r),v={ACTIVE:e("ACTIVE"),ACKNOWLEDGED:e("ACKNOWLEDGED"),CLEARED:e("CLEARED")},g=_.keys(v),h=["id"],d=["id","self","creationTime","type","time","count","history","firstOccurence","firstOccurrenceTime"],E={},b="status",C={type:e("Type"),text:e("Text")};function A(t){var e=t.id||t;return a.url("".concat(f,"/").concat(e))}function D(t){var e=a.url(f),r=a.timeOrderFilter(a.pageSizeNoTotalFilter(t)),n={params:r},i=a.cleanListCallback("alarms",D,r);return o.get(e,n).then(i)}function O(t){var e=a.url(f),r=s(t,h);return o.post(e,r,m)}function w(t){var e=A(t),r=s(t,d);return o.put(e,r,m)}function N(e,t){return t?r(t):n.list({source:e.id,pageSize:1e3}).then(r);function r(t){var n="--";return e.status!==v.ACKNOWLEDGED||_.isEmpty(t)||(n=_.last(t).user),t.forEach(function(t){var e=t.changes||[],r=!1;if(e.forEach(function(t){if(t.attribute===b&&t.newValue===v.ACKNOWLEDGED)return!(r=!0)}),r)return n=t.user||n,!1}),n}}function T(t,e){function r(t){var e=t||[],n=e.length?e[e.length-1].creationTime:void 0;return e.forEach(function(e){var t=e.changes||[],r=!1;if(t.forEach(function(t){if(t.attribute===b&&t.newValue===v.ACKNOWLEDGED)return n=e.creationTime,!(r=!0)}),r)return!1}),n}return e?r(e):n.list({source:t.id,pageSize:1e3}).then(r)}function L(t,e){var r=R(t,e);return r.humanize?r.humanize():r.then(function(t){return t.humanize?t.humanize():""})}function R(u,t){function e(t){var e=t||[],r=u.creationTime,n=e.length?e[e.length-1].creationTime:void 0,i="";if(_.forEach(e,function(e){var t=e.changes||[],r=!1;if(t.forEach(function(t){if(t.attribute===b&&t.newValue===v.CLEARED)return n=e.creationTime,!(r=!0)}),r)return!1}),r&&n){var o=moment(r),a=moment(n);i=moment.duration(o.diff(a))}return i}return t?e(t):n.list({source:u.id,pageSize:1e3}).then(e)}function S(t,e){var r=[l,t];return e.id&&r.push(e.id),a.url(r.join("/"))}function I(t){var r=_.memoize(t,function(t,e){return[t.id,t.status,t.count,e&&e.length].join(":")});return function(t,e){return r(t,e)}}function j(t,e){var r=i.when(N(t,e)),n=i.when(T(t,e));return i.all([r,n]).then(function(t){return c.getString("ACKNOWLEDGED`alarm` by: {{ackBy}} {{ackTimeFromNow}}",{ackBy:t[0],ackTimeFromNow:moment(t[1]).fromNow()})})}function k(t,e){return i.when(L(t,e)).then(function(t){return c.getString("CLEARED`alarm`: was active for {{alarmDuration}}",{alarmDuration:t})})}function P(t){return i.when(c.getString("ACTIVE`alarm`: triggered {{alarmTimeFromNow}}",{alarmTimeFromNow:moment(t.time).fromNow()}))}E[r.WARNING]="circle",E[r.MINOR]="high-priority",E[r.MAJOR]="warning",E[r.CRITICAL]="exclamation-circle",E[v.CLEARED]="c8y-alert-idle",E[v.ACKNOWLEDGED]="bell-slash",E[v.ACTIVE]="bell";var K={list:D,listByStatus:function(t,e){var r=_.compact(_.map(t,function(t,e){return t?e:void 0})),n=_.map(r,function(t){return D(_objectSpread({},e,{status:t}))});return i.all(n).then(a.combineLists)},listByDevices:function(t,e){return i.all(_.map(t,function(t){return e.source=t,D(e)})).then(a.combineLists)},getSeverityCount:function(t,e){return _.filter(t,{severity:e}).length},detail:function(t){var e=A(t);return o.get(e)},update:w,updateBulk:function(t,e){var r=a.url(f);return o.put(r,e,{params:t})},create:O,save:function(t){return t.id?w(t):O(t)},acknowledgedBy:I(N),ackTime:I(T),alarmDuration:I(L),alarmDurationDiff:I(R),severity:r,severityList:p,getHighestSeverityFromAlarmsStatus:function(e){var t=_.map(y,function(t){return{severity:t,count:_.get(e,_.toLower(t),0)}}),r=_.find(t,function(t){return 0<t.count});return _.get(r,"severity",null)},status:v,statusList:g,statusText:I(function(t,e){var r;switch((t.status||"").toUpperCase()){case v.ACKNOWLEDGED:r=j;break;case v.CLEARED:r=k;break;case v.ACTIVE:r=P}return r&&r(t,e)}),icon:function(t){var e=(_.isObjectLike(t)?t.severity:t).toUpperCase();return E[e]},reports:{downtimeDuration:function(t){var e=a.timeOrderFilter(t),r=S("downtimeDuration",e),n={params:e};return o.get(r,n)},downtimeDurationAggregation:function(t){var e=a.timeOrderFilter(t),r=S("downtimeDuration/aggregation",e),n={params:e};return o.get(r,n)}},getDisplayCount:function(t){var e=a.url("".concat(f,"/count")),r={params:t};return o.get(e,r).then(a.getResData).then(function(t){return 99<t?"99+":t})},createCounter:function(t){var e=_.get(t,"source"),r="/alarms/".concat(e||"*"),n=new u.Counter(D,r);if(t){var i=[u.defaultPropertyMaps.date,u.defaultPropertyMaps.source];if(t.type){var o=t.type;i.push([function(t){return o===t.type}])}delete t.type,n.filter(t,i)}return n}};return t.enhanceWithKeysUtil({target:K,reservedKeys:["history","id","severity","self","source","creationTime","time","text","firstOccurrence","count","firstOccurrenceTime","status"],standardKeys:C})}t.$inject=["$http","c8yBase","c8yCounter","$q","c8yAudits","c8yUtil","gettext","gettextCatalog"],angular.module("c8y.core").factory("c8yAlarms",t)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);var n=r.call(t,e||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(o,a,u,i,n,t,e,c){var s=a.cleanFields,f="alarm/alarms",l="".concat(f,"/reports"),m={headers:a.contentHeaders("alarm")},r={WARNING:e("WARNING"),MINOR:e("MINOR"),MAJOR:e("MAJOR"),CRITICAL:e("CRITICAL")},y=[r.CRITICAL,r.MAJOR,r.MINOR,r.WARNING],p=_.keys(r),g={ACTIVE:e("ACTIVE"),ACKNOWLEDGED:e("ACKNOWLEDGED"),CLEARED:e("CLEARED")},v=_.keys(g),d=["id"],h=["id","self","creationTime","type","time","count","history","firstOccurence","firstOccurrenceTime"],b={},E="status",O={type:e("Type"),text:e("Text")};function D(t){var e=t.id||t;return a.url("".concat(f,"/").concat(e))}function C(t){var e=a.url(f),r=a.timeOrderFilter(a.pageSizeNoTotalFilter(t)),n={params:r},i=a.cleanListCallback("alarms",C,r);return o.get(e,n).then(i)}function w(t){var e=a.url(f),r=s(t,d);return o.post(e,r,m)}function A(t){var e=D(t),r=s(t,h);return o.put(e,r,m)}function N(e,t){return t?r(t):n.list({source:e.id,pageSize:1e3}).then(r);function r(t){var n="--";return e.status!==g.ACKNOWLEDGED||_.isEmpty(t)||(n=_.last(t).user),t.forEach(function(t){var e=t.changes||[],r=!1;if(e.forEach(function(t){if(t.attribute===E&&t.newValue===g.ACKNOWLEDGED)return!(r=!0)}),r)return n=t.user||n,!1}),n}}function T(t,e){function r(t){var e=t||[],n=e.length?e[e.length-1].creationTime:void 0;return e.forEach(function(e){var t=e.changes||[],r=!1;if(t.forEach(function(t){if(t.attribute===E&&t.newValue===g.ACKNOWLEDGED)return n=e.creationTime,!(r=!0)}),r)return!1}),n}return e?r(e):n.list({source:t.id,pageSize:1e3}).then(r)}function L(t,e){var r=S(t,e);return r.humanize?r.humanize():r.then(function(t){return t.humanize?t.humanize():""})}function S(u,t){function e(t){var e=t||[],r=u.creationTime,n=e.length?e[e.length-1].creationTime:void 0,i="";if(_.forEach(e,function(e){var t=e.changes||[],r=!1;if(t.forEach(function(t){if(t.attribute===E&&t.newValue===g.CLEARED)return n=e.creationTime,!(r=!0)}),r)return!1}),r&&n){var o=moment(r),a=moment(n);i=moment.duration(o.diff(a))}return i}return t?e(t):n.list({source:u.id,pageSize:1e3}).then(e)}function R(t,e){var r=[l,t];return e.id&&r.push(e.id),a.url(r.join("/"))}function j(t){var r=_.memoize(t,function(t,e){return[t.id,t.status,t.count,e&&e.length].join(":")});return function(t,e){return r(t,e)}}function I(t,e){var r=i.when(N(t,e)),n=i.when(T(t,e));return i.all([r,n]).then(function(t){return c.getString("ACKNOWLEDGED`alarm` by: {{ackBy}} {{ackTimeFromNow}}",{ackBy:t[0],ackTimeFromNow:moment(t[1]).fromNow()})})}function P(t,e){return i.when(L(t,e)).then(function(t){return c.getString("CLEARED`alarm`: was active for {{alarmDuration}}",{alarmDuration:t})})}function K(t){return i.when(c.getString("ACTIVE`alarm`: triggered {{alarmTimeFromNow}}",{alarmTimeFromNow:moment(t.time).fromNow()}))}b[r.WARNING]="circle",b[r.MINOR]="high-priority",b[r.MAJOR]="warning",b[r.CRITICAL]="exclamation-circle",b[g.CLEARED]="c8y-alert-idle",b[g.ACKNOWLEDGED]="bell-slash",b[g.ACTIVE]="bell";var k={list:C,listByStatus:function(t,e){var r=_.compact(_.map(t,function(t,e){return t?e:void 0})),n=_.map(r,function(t){return C(_objectSpread(_objectSpread({},e),{},{status:t}))});return i.all(n).then(a.combineLists)},listByDevices:function(t,e){return i.all(_.map(t,function(t){return e.source=t,C(e)})).then(a.combineLists)},getSeverityCount:function(t,e){return _.filter(t,{severity:e}).length},detail:function(t){var e=D(t);return o.get(e)},update:A,updateBulk:function(t,e){var r=a.url(f);return o.put(r,e,{params:t})},create:w,save:function(t){return t.id?A(t):w(t)},acknowledgedBy:j(N),ackTime:j(T),alarmDuration:j(L),alarmDurationDiff:j(S),severity:r,severityList:p,getHighestSeverityFromAlarmsStatus:function(e){var t=_.map(y,function(t){return{severity:t,count:_.get(e,_.toLower(t),0)}}),r=_.find(t,function(t){return 0<t.count});return _.get(r,"severity",null)},status:g,statusList:v,statusText:j(function(t,e){var r;switch((t.status||"").toUpperCase()){case g.ACKNOWLEDGED:r=I;break;case g.CLEARED:r=P;break;case g.ACTIVE:r=K}return r&&r(t,e)}),icon:function(t){var e=(_.isObjectLike(t)?t.severity:t).toUpperCase();return b[e]},reports:{downtimeDuration:function(t){var e=a.timeOrderFilter(t),r=R("downtimeDuration",e),n={params:e};return o.get(r,n)},downtimeDurationAggregation:function(t){var e=a.timeOrderFilter(t),r=R("downtimeDuration/aggregation",e),n={params:e};return o.get(r,n)}},getDisplayCount:function(t){var e=a.url("".concat(f,"/count")),r={params:t};return o.get(e,r).then(a.getResData).then(function(t){return 99<t?"99+":t})},createCounter:function(t){var e=_.get(t,"source"),r="/alarms/".concat(e||"*"),n=new u.Counter(C,r);if(t){var i=[u.defaultPropertyMaps.date,u.defaultPropertyMaps.source];if(t.type){var o=t.type;i.push([function(t){return o===t.type}])}delete t.type,n.filter(t,i)}return n}};return t.enhanceWithKeysUtil({target:k,reservedKeys:["history","id","severity","self","source","creationTime","time","text","firstOccurrence","count","firstOccurrenceTime","status"],standardKeys:O})}t.$inject=["$http","c8yBase","c8yCounter","$q","c8yAudits","c8yUtil","gettext","gettextCatalog"],angular.module("c8y.core").factory("c8yAlarms",t)}();
@@ -1 +1 @@
1
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _objectSpread(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.forEach(function(t){_defineProperty(n,t,e[t])})}return n}function _defineProperty(t,n,e){return(n=_toPropertyKey(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"===_typeof(n)?n:String(n)}function _toPrimitive(t,n){if("object"!==_typeof(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return("string"===n?String:Number)(t);var r=e.call(t,n||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(c,u,e,p,o,t,l,s,n,f,r,g,h,d,i,m){var v,a=i("humanizeAppName"),y="application/",S="".concat(y,"applications"),b={headers:f.contentHeaders("application",!0)},E=this,A={HOSTED:"cloud",EXTERNAL:"external-link",SMARTAPP:"puzzle-piece",MICROSERVICE:"microchip",APAMA_CEP_RULE:"file-code-o"},P=["HOSTED","EXTERNAL"],x=["HOSTED","EXTERNAL"],D={HOSTED:d("Hosted application"),EXTERNAL:d("External application"),MICROSERVICE:d("Microservice"),APAMA_CEP_RULE:d("Apama CEP rule")},O=f.createEnum([{name:"UP",label:d("Up"),value:"Up",icon:"check-circle text-success"},{name:"DOWN",label:d("Down"),value:"Down",icon:"warning status critical"},{name:"UNHEALTHY",label:d("Unhealthy"),value:"Unhealth",icon:"exclamation-circle status major"},{name:"UNHEALTHY",label:d("Unhealthy"),value:"Unhealthy",icon:"exclamation-circle status major"}]),C=1e3,w=10;try{v=n.get("gettextCatalog")}catch(t){v={getString:_.identity}}function R(c,o){return r.current().then(function(t){var n=t.tenant,e=f.pageSizeFilter(o),r={params:e},i="".concat(f.url(c),"/").concat(n),a=f.cleanListCallback("applications",angular.bind(E,R,c),e);return u.get(i,r).then(a).then(rt).then(L)})}function j(t){var n=t.desired,e=t.active;return{active:e,unhealthy:function(t,n){return _.isNumber(n)?t-n:t}(n,e),desired:n}}function M(c,o){return r.current().then(function(t){var n=c||t,e=f.pageSizeFilter(o),r={params:_.defaults(e,{noPaging:!0,dropOverwrittenApps:!0})},i=f.url("".concat(y,"applicationsByUser/").concat(encodeURIComponent(n.id))),a=f.cleanListCallback("applications",angular.bind(E,M,n),e);return u.get(i,r).then(a).then(rt).then(L)})}function L(t){var n=_.sortBy(t,[function(t){return a(t)}]);return _.assign(n,_.pick(t,["statistics","paging"])),n}function T(t){return R("".concat(y,"applicationsByTenant"),t)}function U(t){var n=f.url("".concat(S,"/").concat(t.contextPath,"/manifest")),e={params:f.pageSizeNoTotalFilter()};return u.get(n,e).then(function(t){return _.map(t.data.imports,k)})}function N(t){var n=N.cache,e=t.id||t,r=f.url("".concat(S,"/").concat(e,"/binaries/plugins")),i={params:f.pageSizeNoTotalFilter()};function a(){delete n[e]}return n[e]||(n[e]=l(_.noop,2e3).then(function(){return u.get(r,i).then(f.getResData).finally(a)})),n[e]}function k(t){return{id:t.id,contextPath:t.rootContextPath,directoryName:t.directoryName,manifest:t}}function I(t){var n=t.id||t;return f.url("".concat(S,"/").concat(n))}function B(t){var n=I(t);return u.get(n)}function F(n,t){var e=I(n),r=function(t){var n=_.cloneDeep(t);return delete n.type,n}(n),i=_.defaults(t||{},b),a=u.put(e,r,i).finally(function(){o.localStorage.setItem("refresh",n.contextPath)});return a.then(function(t){c.$emit("c8yApplication:update",{app:n,res:t})}),a}function H(n,t){var e=f.url(S),r=_.defaults(t||{},b),i=u.post(e,n,r);return i.then(function(t){return c.$emit("c8yApplication:create",{app:n,res:t})}).catch(function(){s.error("Could not emit c8yApplication:create for:",{app:n})}),i}function $(t,n){return t.id?F(t,n):H(t,n)}function z(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=2<arguments.length?arguments[2]:void 0,n=3<arguments.length?arguments[3]:void 0,c=w,o=n||p.defer(),u=t||0,e=0===u?"":"-".concat(u);return $(function(t,n){var e=function(t){return"".concat(t).concat(n)};return _objectSpread({},t,{name:e(t.name),key:e(t.key),contextPath:e(t.contextPath)})}(i,e),_objectSpread({silentError:!0},a)).then(function(t){o.resolve(f.getResData(t))},function(t){if(409===t.status&&u<c)z(i,a,u+1,o);else{var n=_.get(t,"data.message")||_.get(t,"data.details.exceptionMessage"),e=n?v.getString(n):d("Could not create application."),r=t.data;o.reject({errorMessage:e,errorDetails:r})}}),o.promise}function q(r){var t=B(r).then(f.getResData);return p.all({appDetails:t,appPlugins:t.then(N).then(K),appManifest:t.then(J),appIndex:t.then(W)}).then(function(t){t.appDetails;var n=t.appPlugins,e=t.appManifest,r=t.appIndex,i=function(n,t){return _(t.imports).map(function(t){return _.find(n,{pluginName:t})}).compact().concat(n).uniq().value()}(n,e);return p.all({newAppManifest:function(t,n){var e=_.cloneDeep(n);return e.imports=_.map(t,"pluginName"),e}(i,e),newAppIndex:function(t,n,e){var r=e;return r=function(t,n,e){var r=e,i=_(n).map(function(t){var n=_.get(t,"pluginPackage.css",[]);return!!(n=n.length?n:_.get(t,"pluginPackage.less",[])).length&&"".concat(t.pluginName,"/style.css")}).filter(_.identity).value(),a=_.flattenDeep(["\x3c!--MODULES_CSS--\x3e",_.map(i.slice(0,1),function(t){return'<link rel="stylesheet" href="'.concat(t,'"></link>')}),"\x3c!--/MODULES_CSS--\x3e"]).join("\n"),c=_.flattenDeep(["\x3c!--MODULES_CSS_DEFER--\x3e","<script>",["[",'"'.concat(i.slice(1).join('", "'),'"'),"].forEach(function(f){loadCSS(f)})"].join(""),"<\/script>","\x3c!--/MODULES_CSS_DEFER--\x3e"]).join("\n");return r=(r=r.replace(new RegExp("\x3c!--MODULES_CSS--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_CSS--\x3e","gm"),a)).replace(new RegExp("\x3c!--MODULES_CSS_DEFER--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_CSS_DEFER--\x3e","gm"),c)}(0,n,r),r=function(t,n,e){var r=_.flattenDeep(["\x3c!--MODULES_JS--\x3e",_(n).map(function(t){var n=_.get(t,"pluginPackage.js",[]);return!!n.length&&"".concat(t.pluginName,"/main.js")}).filter(_.identity).map(function(t){return'<script defer src="'.concat(t,'"><\/script>')}).value(),"\x3c!--/MODULES_JS--\x3e"]).join("\n");return e.replace(new RegExp("\x3c!--MODULES_JS--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_JS--\x3e","gm"),r)}(0,n,r),r=function(t,n,e){var r=['C8Y_NG_MODULES=["',_.uniq(_.flattenDeep(_.map(n,function(t){return _.get(t,"pluginPackage.ngModules",[])}))).join('","'),'"];'].join("");return e.replace(new RegExp("C8Y_NG_MODULES=\\[(.|\\n|\\r)*?\\];","gm"),r)}(0,n,r)}(0,i,r)})}).then(function(t){var n=t.newAppManifest,e=t.newAppIndex;return Y(r,[{path:"cumulocity.json",file:new Blob([JSON.stringify(n)],{type:"application/json"})},{path:"index.html",file:new Blob([e],{type:"text/html"})}])})}function K(t){var n=[],e=_.sortBy(t,function(t){return-1*_.get(t,"pluginPackage.priority",0)});return _.forEach(e,function(t){!function e(t,r,i){var n=V(r,_.get(t,"pluginPackage.contextPath"));if(n)return;var a=_.get(t,"pluginPackage.imports",[]);_.forEach(a,function(t){var n=V(i,t);n?e(n,r,i):s.error("Plugin with context path ".concat(t," is missing."))});r.push(t)}(t,n,e)}),n}function V(t,n){var e=function(t){var n=t;(function(t){return/^core\//.test(t)||/^administration\//.test(t)||/^devicemanagement\//.test(t)||/^cockpit\//.test(t)||/^platformadmin\//.test(t)||/^fieldbus4\//.test(t)||/^fieldbus3\//.test(t)||/^fieldbus2\//.test(t)||/^fieldbus\//.test(t)||/^demoboard\//.test(t)||/^vendme_plugins\//.test(t)})(n)&&(n=n.replace(/\//g,"_"));return n}(n);return _.find(t,function(t){return t&&t.pluginPackage&&t.pluginPackage.contextPath===e})}function J(t){var n="".concat(X(t),"/cumulocity.json");return u.get(n).then(f.getResData)}function W(t){var n="".concat(X(t),"/index.html");return u.get(n).then(f.getResData)}function X(t){return f.url("apps/".concat(t.contextPath))}function Y(t,n){var e="".concat(I(t),"/binaries/files"),r=new FormData;return _.forEach(n,function(t){r.append(t.path,new File([t.file],t.path))}),u.post(e,r,{transformRequest:_.identity,headers:{"Content-Type":void 0}})}function G(){var t=o.location.pathname.match(/\/apps\/(public\/){0,1}(.+?)(\/|\?|#|$)/);return t&&t[2]}function Q(){var t=o.location.pathname.match(/\/apps\/(public\/([^/]+)|([^/]+))/);return t&&-1!==t[1].indexOf("public")}function Z(){var e=G(),r=!!Q();function n(t){var n="MARKET"===t.availability;return t.contextPath===e&&(!r||n)}return M(null,{dropOverwrittenApps:!1}).then(function(t){return _.find(t,n)})}function tt(n){return g.list({type:"c8y_SmartAppApplication"}).then(function(t){return _.find(t,{appId:n.id})||null})}function nt(t){var n;return(t?p.resolve(t):Z()).then(function(t){return n=t}).then(tt).then(function(t){return n.config=t,n})}function et(t){return _(t).uniq("id").filter(function(t){var n=t.manifest,e=!1;return n&&(e=n.noAppSwitcher),!e&&_.includes(["HOSTED","EXTERNAL"],t.type)}).value()}function rt(t){var n=_.reject(t,function(t){return"management"===t.name&&"management"===t.owner.tenant.id});return _.assign(n,_.pick(t,_.filter(_.keys(t),function(t){return _.isNaN(_.toNumber(t))}))),n}function it(t,n){var e=_.isString(n)?function(n){return function(t){return t.name===n||t.contextPath===n||t.key===n}}(n):n;return _.some(t,e)}function at(t){return"HOSTED"===t.type}function ct(){if(ct.cache)return ct.cache;function n(t){return{url:t,noAppKey:!0}}return u(n([f.url(S),(Q()?"public/":"")+G(),"manifest"].join("/"))).then(function(t){return u(n([f.url(S),t.data.application.id].join("/")))}).then(f.getResData).then(function(t){return ct.cache=p.when(t)})}return N.cache={},f.getFlag("test")&&(ct.cache=p.when({name:"app",manifest:{}})),{list:T,listByUser:M,listByTenant:T,listByOwner:function(t){return R("".concat(y,"applicationsByOwner"),t)},listPlugins:function(){var t=f.url("".concat(y,"plugins")),n={params:{pageSize:C}};return u.get(t,n).then(function(t){return _.uniqBy(t.data.plugins,"id")})},listPluginsByTenant:function(){return T().then(function(t){var n=_.uniqBy(t,"id"),e=[];return _.forEach(n,function(t){at(t)&&e.push(U(t))}),p.all(e).then(_.flattenDeep).then(function(t){return _.uniqBy(t,"id")})})},listPluginsByApplication:U,listPluginsByPaasApp:N,listByVisibleLinks:function(){return M().then(et).then(function(t){return p.when(t)})},listApplications:function t(n){var e=f.url("".concat(S)),r={params:f.pageSizeFilter(n)},i=f.cleanListCallback("applications",t,n);return u.get(e,r).then(i).then(L)},getApplicationMO:function(t){var n="c8y_Application_".concat(t);return g.list({type:n}).then(function(t){return _.head(t)})},getApplicationMOs:function(t){var n=t||{},e=n.tenantId,r=n.filters,i=void 0===r?{}:r,a={type:"c8y_Application_*"};return e&&(a=m.addAndFilter(a,{__has:"c8y_Subscriptions.".concat(e)})),g.listQuery(a,i,!0)},getInstanceCounts:j,getSubscriptionsList:function(t){var n=_.get(t,"c8y_Subscriptions");return _.reduce(n,function(t,n,e){var r=_.get(n,"details"),i=_.get(n,"status"),a=j(r);return t.concat(_objectSpread({},a,{tenantName:e,status:i}))},[])},getApplicationStatusForTenant:function(t,n){return _.get(t,["c8y_Subscriptions",n])},status:O,isAvailable:function(n){return M().then(function(t){return it(t,n)})},areAllAvailable:function(t){return M().then(function(n){return _.every(t,function(t){return it(n,t)})})},isAnyAvailable:function(t){return M().then(function(n){return _.some(t,function(t){return it(n,t)})})},detail:B,update:F,create:H,remove:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=I(e),r=nt(_.isObjectLike(e)?e:{id:e}).then(function(t){return!_.get(t,"config.id")||g.remove(t.config)}),i=u.delete(n,{params:t}),a=p.all({cfg:r,res:i});return a.then(function(t){var n=t.res;c.$emit("c8yApplication:delete",{app:e,res:n})}),a},save:$,trySave:z,clone:function(t,n){var e="".concat(I(t),"/clone");return u.post(e).then(f.getResData).then(function(t){return _.isObjectLike(n)?(_.assign(t,n),z(t).then(f.getResData)):t})},getHref:function(t){return at(t)?function(t){var n=e.port();return n=80===n||443===n?"":":".concat(n),"".concat(e.protocol(),"://").concat(e.host()).concat(n,"/apps/").concat(t.public?"public/":"").concat(t.contextPath)}(t):t.externalUrl},isHosted:function(t){return"HOSTED"===t.type},isApamaCepRule:function(t){return"APAMA_CEP_RULE"===_.get(t,"type")},isMicroserviceWithManifest:function(n){return g.list({type:"c8y_microservice_manifest_".concat(n.id)}).then(function(t){return"MICROSERVICE"===n.type&&0<t.length})},canOpenInBrowser:function(t){return(_.isObjectLike(t)?p.resolve(t):B(t).then(f.getResData)).then(function(t){var n=!t.name.match(/feature-/),e=_.includes(P,t.type);return n&&e})},canAddPlugin:function(t){return console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications."),(_.isObjectLike(t)?p.resolve(t):B(t).then(function(t){return t.data})).then(function(t){return!_.isEmpty(t.manifest)&&_.includes(x,_.get(t,"type"))})},icon:function(t){var n=_.isString(t)?t:t.type;return t.manifest&&"MICROSERVICE"!==n&&(n="SMARTAPP"),A[n]},typeLabel:function(t){var n=_.isString(t)?t:t.type;return D[n]},getCurrent:Z,getConfig:nt,pollRefreshMessages:function(){t(function(){!function(t){o.localStorage.getItem("refresh")===G()&&(o.localStorage.setItem("refresh",void 0),t||o.location.reload())}()},1e3,0,!1)},getCurrentContextPath:G,updateManifest:function(t,e){return B(t).then(function(t){var n=t.data;return n.manifest=e,n}).then(F)},listArchives:function(t,n){var e="".concat(I(t),"/binaries"),r={params:f.pageSizeNoTotalFilter(n),silentError:!0};return u.get(e,r).then(f.getResData)},uploadArchive:function(t,n){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r={url:"".concat(I(t),"/binaries"),method:"POST",headers:{Content:"multipart/form-data",Accept:"application/json"},file:n,fileName:function(t){return t.replace(/\s+/g,"_")}(n.name)};return _.assign(r,e),h.upload(r)},deleteArchive:function(t,n){var e=n.id||n,r=[I(t),"binaries",e].join("/");return u.delete(r)},setActiveArchive:function(t,n){return $({id:t.id,activeVersionId:n.id})},addPaasAppPlugin:function(t,n){console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications.");var e=function(t){var n=t.name.split(".");return n.pop(),n.join(".")}(n),r="".concat(I(t),"/binaries/plugins/").concat(e),i=h.upload({url:r,method:"POST",headers:{Content:"multipart/form-data",Accept:"application/json"},file:n}),a=i.then(_.partial(q,t));return a.progress=i.progress,a},removePaasAppPlugin:function(t,n){console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications.");var e=n.pluginName||n,r="".concat(I(t),"/binaries/plugins/").concat(e);return u.delete(r).then(_.partial(q,t))},uploadPaasAppFiles:Y,getPaasAppManifest:J,refreshPaasApp:q,refreshHostedApp:function(t){var n="".concat(I(t),"/refresh");return u.post(n)},isPaasApp:function(t){return J(t).then(function(t){return t._webpaas},function(){return!1})},parseAppName:function(t){var n=t&&t.toLowerCase();return"devicemanagement"===n?"Device management":"digital-twin-manager"===n?"Digital twin manager":t||"Cumulocity"},currentAppCached:ct,sortApps:L,isAppOnTheList:it}}t.$inject=["$rootScope","$http","$location","$q","$window","$interval","$timeout","$log","$injector","c8yBase","c8yUser","c8yInventory","$upload","gettext","$filter","c8yQueriesUtil"],angular.module("c8y.core").factory("c8yApplication",t)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);var r=n.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(c,u,n,p,o,t,s,l,e,f,r,g,d,h,i,m){var v,a=i("humanizeAppName"),y="application/",S="".concat(y,"applications"),b={headers:f.contentHeaders("application",!0)},E=this,A={HOSTED:"cloud",EXTERNAL:"external-link",SMARTAPP:"puzzle-piece",MICROSERVICE:"microchip",APAMA_CEP_RULE:"file-code-o"},P=["HOSTED","EXTERNAL"],x=["HOSTED","EXTERNAL"],O={HOSTED:h("Hosted application"),EXTERNAL:h("External application"),MICROSERVICE:h("Microservice"),APAMA_CEP_RULE:h("Apama CEP rule")},D=f.createEnum([{name:"UP",label:h("Up"),value:"Up",icon:"check-circle text-success"},{name:"DOWN",label:h("Down"),value:"Down",icon:"warning status critical"},{name:"UNHEALTHY",label:h("Unhealthy"),value:"Unhealth",icon:"exclamation-circle status major"},{name:"UNHEALTHY",label:h("Unhealthy"),value:"Unhealthy",icon:"exclamation-circle status major"}]),w=1e3,j=10;try{v=e.get("gettextCatalog")}catch(t){v={getString:_.identity}}function C(c,o){return r.current().then(function(t){var e=t.tenant,n=f.pageSizeFilter(o),r={params:n},i="".concat(f.url(c),"/").concat(e),a=f.cleanListCallback("applications",angular.bind(E,C,c),n);return u.get(i,r).then(a).then(rt).then(L)})}function R(t){var e=t.desired,n=t.active;return{active:n,unhealthy:function(t,e){return _.isNumber(e)?t-e:t}(e,n),desired:e}}function M(c,o){return r.current().then(function(t){var e=c||t,n=f.pageSizeFilter(o),r={params:_.defaults(n,{noPaging:!0,dropOverwrittenApps:!0})},i=f.url("".concat(y,"applicationsByUser/").concat(encodeURIComponent(e.id))),a=f.cleanListCallback("applications",angular.bind(E,M,e),n);return u.get(i,r).then(a).then(rt).then(L)})}function L(t){var e=_.sortBy(t,[function(t){return a(t)}]);return _.assign(e,_.pick(t,["statistics","paging"])),e}function T(t){return C("".concat(y,"applicationsByTenant"),t)}function U(t){var e=f.url("".concat(S,"/").concat(t.contextPath,"/manifest")),n={params:f.pageSizeNoTotalFilter()};return u.get(e,n).then(function(t){return _.map(t.data.imports,k)})}function N(t){var e=N.cache,n=t.id||t,r=f.url("".concat(S,"/").concat(n,"/binaries/plugins")),i={params:f.pageSizeNoTotalFilter()};function a(){delete e[n]}return e[n]||(e[n]=s(_.noop,2e3).then(function(){return u.get(r,i).then(f.getResData).finally(a)})),e[n]}function k(t){return{id:t.id,contextPath:t.rootContextPath,directoryName:t.directoryName,manifest:t}}function I(t){var e=t.id||t;return f.url("".concat(S,"/").concat(e))}function B(t){var e=I(t);return u.get(e)}function F(e,t){var n=I(e),r=function(t){var e=_.cloneDeep(t);return delete e.type,e}(e),i=_.defaults(t||{},b),a=u.put(n,r,i).finally(function(){o.localStorage.setItem("refresh",e.contextPath)});return a.then(function(t){c.$emit("c8yApplication:update",{app:e,res:t})}),a}function H(e,t){var n=f.url(S),r=_.defaults(t||{},b),i=u.post(n,e,r);return i.then(function(t){return c.$emit("c8yApplication:create",{app:e,res:t})}).catch(function(){l.error("Could not emit c8yApplication:create for:",{app:e})}),i}function $(t,e){return t.id?F(t,e):H(t,e)}function z(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=2<arguments.length?arguments[2]:void 0,e=3<arguments.length?arguments[3]:void 0,c=j,o=e||p.defer(),u=t||0,n=0===u?"":"-".concat(u);return $(function(t,e){var n=function(t){return"".concat(t).concat(e)};return _objectSpread(_objectSpread({},t),{},{name:n(t.name),key:n(t.key),contextPath:n(t.contextPath)})}(i,n),_objectSpread({silentError:!0},a)).then(function(t){o.resolve(f.getResData(t))},function(t){if(409===t.status&&u<c)z(i,a,u+1,o);else{var e=_.get(t,"data.message")||_.get(t,"data.details.exceptionMessage"),n=e?v.getString(e):h("Could not create application."),r=t.data;o.reject({errorMessage:n,errorDetails:r})}}),o.promise}function K(r){var t=B(r).then(f.getResData);return p.all({appDetails:t,appPlugins:t.then(N).then(q),appManifest:t.then(J),appIndex:t.then(W)}).then(function(t){t.appDetails;var e=t.appPlugins,n=t.appManifest,r=t.appIndex,i=function(e,t){return _(t.imports).map(function(t){return _.find(e,{pluginName:t})}).compact().concat(e).uniq().value()}(e,n);return p.all({newAppManifest:function(t,e){var n=_.cloneDeep(e);return n.imports=_.map(t,"pluginName"),n}(i,n),newAppIndex:function(t,e,n){var r=n;return r=function(t,e,n){var r=n,i=_(e).map(function(t){var e=_.get(t,"pluginPackage.css",[]);return!!(e=e.length?e:_.get(t,"pluginPackage.less",[])).length&&"".concat(t.pluginName,"/style.css")}).filter(_.identity).value(),a=_.flattenDeep(["\x3c!--MODULES_CSS--\x3e",_.map(i.slice(0,1),function(t){return'<link rel="stylesheet" href="'.concat(t,'"></link>')}),"\x3c!--/MODULES_CSS--\x3e"]).join("\n"),c=_.flattenDeep(["\x3c!--MODULES_CSS_DEFER--\x3e","<script>",["[",'"'.concat(i.slice(1).join('", "'),'"'),"].forEach(function(f){loadCSS(f)})"].join(""),"<\/script>","\x3c!--/MODULES_CSS_DEFER--\x3e"]).join("\n");return r=(r=r.replace(new RegExp("\x3c!--MODULES_CSS--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_CSS--\x3e","gm"),a)).replace(new RegExp("\x3c!--MODULES_CSS_DEFER--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_CSS_DEFER--\x3e","gm"),c)}(0,e,r),r=function(t,e,n){var r=_.flattenDeep(["\x3c!--MODULES_JS--\x3e",_(e).map(function(t){var e=_.get(t,"pluginPackage.js",[]);return!!e.length&&"".concat(t.pluginName,"/main.js")}).filter(_.identity).map(function(t){return'<script defer src="'.concat(t,'"><\/script>')}).value(),"\x3c!--/MODULES_JS--\x3e"]).join("\n");return n.replace(new RegExp("\x3c!--MODULES_JS--\x3e(.|\\n|\\r)*\x3c!--\\/MODULES_JS--\x3e","gm"),r)}(0,e,r),r=function(t,e,n){var r=['C8Y_NG_MODULES=["',_.uniq(_.flattenDeep(_.map(e,function(t){return _.get(t,"pluginPackage.ngModules",[])}))).join('","'),'"];'].join("");return n.replace(new RegExp("C8Y_NG_MODULES=\\[(.|\\n|\\r)*?\\];","gm"),r)}(0,e,r)}(0,i,r)})}).then(function(t){var e=t.newAppManifest,n=t.newAppIndex;return Y(r,[{path:"cumulocity.json",file:new Blob([JSON.stringify(e)],{type:"application/json"})},{path:"index.html",file:new Blob([n],{type:"text/html"})}])})}function q(t){var e=[],n=_.sortBy(t,function(t){return-1*_.get(t,"pluginPackage.priority",0)});return _.forEach(n,function(t){!function n(t,r,i){var e=V(r,_.get(t,"pluginPackage.contextPath"));if(e)return;var a=_.get(t,"pluginPackage.imports",[]);_.forEach(a,function(t){var e=V(i,t);e?n(e,r,i):l.error("Plugin with context path ".concat(t," is missing."))});r.push(t)}(t,e,n)}),e}function V(t,e){var n=function(t){var e=t;(function(t){return/^core\//.test(t)||/^administration\//.test(t)||/^devicemanagement\//.test(t)||/^cockpit\//.test(t)||/^platformadmin\//.test(t)||/^fieldbus4\//.test(t)||/^fieldbus3\//.test(t)||/^fieldbus2\//.test(t)||/^fieldbus\//.test(t)||/^demoboard\//.test(t)||/^vendme_plugins\//.test(t)})(e)&&(e=e.replace(/\//g,"_"));return e}(e);return _.find(t,function(t){return t&&t.pluginPackage&&t.pluginPackage.contextPath===n})}function J(t){var e="".concat(X(t),"/cumulocity.json");return u.get(e).then(f.getResData)}function W(t){var e="".concat(X(t),"/index.html");return u.get(e).then(f.getResData)}function X(t){return f.url("apps/".concat(t.contextPath))}function Y(t,e){var n="".concat(I(t),"/binaries/files"),r=new FormData;return _.forEach(e,function(t){r.append(t.path,new File([t.file],t.path))}),u.post(n,r,{transformRequest:_.identity,headers:{"Content-Type":void 0}})}function G(){var t=o.location.pathname.match(/\/apps\/(public\/){0,1}(.+?)(\/|\?|#|$)/);return t&&t[2]}function Q(){var t=o.location.pathname.match(/\/apps\/(public\/([^/]+)|([^/]+))/);return t&&-1!==t[1].indexOf("public")}function Z(){var n=G(),r=!!Q();function e(t){var e="MARKET"===t.availability;return t.contextPath===n&&(!r||e)}return M(null,{dropOverwrittenApps:!1}).then(function(t){return _.find(t,e)})}function tt(e){return g.list({type:"c8y_SmartAppApplication"}).then(function(t){return _.find(t,{appId:e.id})||null})}function et(t){var e;return(t?p.resolve(t):Z()).then(function(t){return e=t}).then(tt).then(function(t){return e.config=t,e})}function nt(t){return _(t).uniq("id").filter(function(t){var e=t.manifest,n=!1;return e&&(n=e.noAppSwitcher),!n&&_.includes(["HOSTED","EXTERNAL"],t.type)}).value()}function rt(t){var e=_.reject(t,function(t){return"management"===t.name&&"management"===t.owner.tenant.id});return _.assign(e,_.pick(t,_.filter(_.keys(t),function(t){return _.isNaN(_.toNumber(t))}))),e}function it(t,e){var n=_.isString(e)?function(e){return function(t){return t.name===e||t.contextPath===e||t.key===e}}(e):e;return _.some(t,n)}function at(t){return"HOSTED"===t.type}function ct(){if(ct.cache)return ct.cache;function e(t){return{url:t,noAppKey:!0}}return u(e([f.url(S),(Q()?"public/":"")+G(),"manifest"].join("/"))).then(function(t){return u(e([f.url(S),t.data.application.id].join("/")))}).then(f.getResData).then(function(t){return ct.cache=p.when(t)})}return N.cache={},f.getFlag("test")&&(ct.cache=p.when({name:"app",manifest:{}})),{list:T,listByUser:M,listByTenant:T,listByOwner:function(t){return C("".concat(y,"applicationsByOwner"),t)},listPlugins:function(){var t=f.url("".concat(y,"plugins")),e={params:{pageSize:w}};return u.get(t,e).then(function(t){return _.uniqBy(t.data.plugins,"id")})},listPluginsByTenant:function(){return T().then(function(t){var e=_.uniqBy(t,"id"),n=[];return _.forEach(e,function(t){at(t)&&n.push(U(t))}),p.all(n).then(_.flattenDeep).then(function(t){return _.uniqBy(t,"id")})})},listPluginsByApplication:U,listPluginsByPaasApp:N,listByVisibleLinks:function(){return M().then(nt).then(function(t){return p.when(t)})},listApplications:function t(e){var n=f.url("".concat(S)),r={params:f.pageSizeFilter(e)},i=f.cleanListCallback("applications",t,e);return u.get(n,r).then(i).then(L)},getApplicationMO:function(t){var e="c8y_Application_".concat(t);return g.list({type:e}).then(function(t){return _.head(t)})},getApplicationMOs:function(t){var e=t||{},n=e.tenantId,r=e.filters,i=void 0===r?{}:r,a={type:"c8y_Application_*"};return n&&(a=m.addAndFilter(a,{__has:"c8y_Subscriptions.".concat(n)})),g.listQuery(a,i,!0)},getInstanceCounts:R,getSubscriptionsList:function(t){var e=_.get(t,"c8y_Subscriptions");return _.reduce(e,function(t,e,n){var r=_.get(e,"details"),i=_.get(e,"status"),a=R(r);return t.concat(_objectSpread(_objectSpread({},a),{},{tenantName:n,status:i}))},[])},getApplicationStatusForTenant:function(t,e){return _.get(t,["c8y_Subscriptions",e])},status:D,isAvailable:function(e){return M().then(function(t){return it(t,e)})},areAllAvailable:function(t){return M().then(function(e){return _.every(t,function(t){return it(e,t)})})},isAnyAvailable:function(t){return M().then(function(e){return _.some(t,function(t){return it(e,t)})})},detail:B,update:F,create:H,remove:function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=I(n),r=et(_.isObjectLike(n)?n:{id:n}).then(function(t){return!_.get(t,"config.id")||g.remove(t.config)}),i=u.delete(e,{params:t}),a=p.all({cfg:r,res:i});return a.then(function(t){var e=t.res;c.$emit("c8yApplication:delete",{app:n,res:e})}),a},save:$,trySave:z,clone:function(t,e){var n="".concat(I(t),"/clone");return u.post(n).then(f.getResData).then(function(t){return _.isObjectLike(e)?(_.assign(t,e),z(t).then(f.getResData)):t})},getHref:function(t){return at(t)?function(t){var e=n.port();return e=80===e||443===e?"":":".concat(e),"".concat(n.protocol(),"://").concat(n.host()).concat(e,"/apps/").concat(t.public?"public/":"").concat(t.contextPath)}(t):t.externalUrl},isHosted:function(t){return"HOSTED"===t.type},isApamaCepRule:function(t){return"APAMA_CEP_RULE"===_.get(t,"type")},isMicroserviceWithManifest:function(e){return g.list({type:"c8y_microservice_manifest_".concat(e.id)}).then(function(t){return"MICROSERVICE"===e.type&&0<t.length})},canOpenInBrowser:function(t){return(_.isObjectLike(t)?p.resolve(t):B(t).then(f.getResData)).then(function(t){var e=!t.name.match(/feature-/),n=_.includes(P,t.type);return e&&n})},canAddPlugin:function(t){return console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications."),(_.isObjectLike(t)?p.resolve(t):B(t).then(function(t){return t.data})).then(function(t){return!_.isEmpty(t.manifest)&&_.includes(x,_.get(t,"type"))})},icon:function(t){var e=_.isString(t)?t:t.type;return t.manifest&&"MICROSERVICE"!==e&&(e="SMARTAPP"),A[e]},typeLabel:function(t){var e=_.isString(t)?t:t.type;return O[e]},getCurrent:Z,getConfig:et,pollRefreshMessages:function(){t(function(){!function(t){o.localStorage.getItem("refresh")===G()&&(o.localStorage.setItem("refresh",void 0),t||o.location.reload())}()},1e3,0,!1)},getCurrentContextPath:G,updateManifest:function(t,n){return B(t).then(function(t){var e=t.data;return e.manifest=n,e}).then(F)},listArchives:function(t,e){var n="".concat(I(t),"/binaries"),r={params:f.pageSizeNoTotalFilter(e),silentError:!0};return u.get(n,r).then(f.getResData)},uploadArchive:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r={url:"".concat(I(t),"/binaries"),method:"POST",headers:{Content:"multipart/form-data",Accept:"application/json"},file:e,fileName:function(t){return t.replace(/\s+/g,"_")}(e.name)};return _.assign(r,n),d.upload(r)},deleteArchive:function(t,e){var n=e.id||e,r=[I(t),"binaries",n].join("/");return u.delete(r)},setActiveArchive:function(t,e){return $({id:t.id,activeVersionId:e.id})},addPaasAppPlugin:function(t,e){console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications.");var n=function(t){var e=t.name.split(".");return e.pop(),e.join(".")}(e),r="".concat(I(t),"/binaries/plugins/").concat(n),i=d.upload({url:r,method:"POST",headers:{Content:"multipart/form-data",Accept:"application/json"},file:e}),a=i.then(_.partial(K,t));return a.progress=i.progress,a},removePaasAppPlugin:function(t,e){console.warning("This method is now deprecated. Consider using Web SDK to customize and extend applications.");var n=e.pluginName||e,r="".concat(I(t),"/binaries/plugins/").concat(n);return u.delete(r).then(_.partial(K,t))},uploadPaasAppFiles:Y,getPaasAppManifest:J,refreshPaasApp:K,refreshHostedApp:function(t){var e="".concat(I(t),"/refresh");return u.post(e)},isPaasApp:function(t){return J(t).then(function(t){return t._webpaas},function(){return!1})},parseAppName:function(t){var e=t&&t.toLowerCase();return"devicemanagement"===e?"Device management":"digital-twin-manager"===e?"Digital twin manager":t||"Cumulocity"},currentAppCached:ct,sortApps:L,isAppOnTheList:it}}t.$inject=["$rootScope","$http","$location","$q","$window","$interval","$timeout","$log","$injector","c8yBase","c8yUser","c8yInventory","$upload","gettext","$filter","c8yQueriesUtil"],angular.module("c8y.core").factory("c8yApplication",t)}();