@rocketshow/designer 1.31.0 → 1.33.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 (339) hide show
  1. package/esm2022/lib/array-sort-pipe.mjs +30 -0
  2. package/esm2022/lib/designer.component.mjs +605 -0
  3. package/esm2022/lib/designer.module.mjs +183 -0
  4. package/esm2022/lib/designer.service.mjs +14 -0
  5. package/esm2022/lib/effect/effect-curve/effect-curve.component.mjs +569 -0
  6. package/esm2022/lib/effect/effect-pan-tilt/effect-pan-tilt.component.mjs +36 -0
  7. package/esm2022/lib/effect/effect.component.mjs +174 -0
  8. package/esm2022/lib/error-dialog/error-dialog.component.mjs +75 -0
  9. package/esm2022/lib/fixture/fixture-capability/fixture-capability-channel/fixture-capability-channel.component.mjs +222 -0
  10. package/esm2022/lib/fixture/fixture-capability/fixture-capability-color/fixture-capability-color.component.mjs +147 -0
  11. package/esm2022/lib/fixture/fixture-capability/fixture-capability-color-wheel/fixture-capability-color-wheel.component.mjs +213 -0
  12. package/esm2022/lib/fixture/fixture-capability/fixture-capability-dimmer/fixture-capability-dimmer.component.mjs +78 -0
  13. package/esm2022/lib/fixture/fixture-capability/fixture-capability-pan-tilt/fixture-capability-pan-tilt.component.mjs +119 -0
  14. package/esm2022/lib/fixture/fixture-capability/fixture-capability.component.mjs +169 -0
  15. package/esm2022/lib/fixture/fixture-channel/fixture-channel.component.mjs +160 -0
  16. package/esm2022/lib/fixture/fixture-settings/fixture-settings-position/fixture-settings-position.component.mjs +365 -0
  17. package/esm2022/lib/fixture/fixture-settings/fixture-settings-stage/fixture-settings-stage.component.mjs +151 -0
  18. package/esm2022/lib/fixture/fixture-settings/fixture-settings.component.mjs +46 -0
  19. package/esm2022/lib/fixture/fixture.component.mjs +138 -0
  20. package/esm2022/lib/fixture-pool/fixture-pool-create-from-file/fixture-pool-create-from-file.component.mjs +145 -0
  21. package/esm2022/lib/fixture-pool/fixture-pool.component.mjs +589 -0
  22. package/esm2022/lib/intro/intro.component.mjs +95 -0
  23. package/esm2022/lib/master-dimmer/master-dimmer.component.mjs +66 -0
  24. package/esm2022/lib/models/cached-fixture-capability.mjs +9 -0
  25. package/esm2022/lib/models/cached-fixture-channel.mjs +7 -0
  26. package/esm2022/lib/models/cached-fixture.mjs +6 -0
  27. package/esm2022/lib/models/color.mjs +8 -0
  28. package/esm2022/lib/models/composition.mjs +46 -0
  29. package/esm2022/lib/models/effect-curve-profile-channel.mjs +15 -0
  30. package/esm2022/lib/models/effect-curve.mjs +69 -0
  31. package/esm2022/lib/models/effect-pan-tilt.mjs +19 -0
  32. package/esm2022/lib/models/effect.mjs +12 -0
  33. package/esm2022/lib/models/fixture-capability-value.mjs +15 -0
  34. package/esm2022/lib/models/fixture-capability.mjs +84 -0
  35. package/esm2022/lib/models/fixture-channel-value.mjs +11 -0
  36. package/esm2022/lib/models/fixture-channel.mjs +24 -0
  37. package/esm2022/lib/models/fixture-mode.mjs +14 -0
  38. package/esm2022/lib/models/fixture-profile.mjs +70 -0
  39. package/esm2022/lib/models/fixture-wheel-slot.mjs +26 -0
  40. package/esm2022/lib/models/fixture-wheel.mjs +15 -0
  41. package/esm2022/lib/models/fixture.mjs +40 -0
  42. package/esm2022/lib/models/preset-region-scene.mjs +8 -0
  43. package/esm2022/lib/models/preset.mjs +56 -0
  44. package/esm2022/lib/models/project.mjs +68 -0
  45. package/esm2022/lib/models/scene-playback-region.mjs +11 -0
  46. package/esm2022/lib/models/scene.mjs +27 -0
  47. package/esm2022/lib/models/universe.mjs +11 -0
  48. package/esm2022/lib/preset/preset-settings/preset-settings.component.mjs +194 -0
  49. package/esm2022/lib/preset/preset.component.mjs +131 -0
  50. package/esm2022/lib/preview/models/color-changer-3d.mjs +167 -0
  51. package/esm2022/lib/preview/models/fixture-3d.mjs +150 -0
  52. package/esm2022/lib/preview/models/moving-head-3d.mjs +243 -0
  53. package/esm2022/lib/preview/preview.component.mjs +212 -0
  54. package/esm2022/lib/project/project-browser/project-browser.component.mjs +143 -0
  55. package/esm2022/lib/project/project-import/project-import.component.mjs +107 -0
  56. package/esm2022/lib/project/project-save/project-save.component.mjs +178 -0
  57. package/esm2022/lib/project/project-share/project-share.component.mjs +71 -0
  58. package/esm2022/lib/scene/scene-settings/scene-settings.component.mjs +146 -0
  59. package/esm2022/lib/scene/scene.component.mjs +110 -0
  60. package/esm2022/lib/services/animation.service.mjs +16 -0
  61. package/esm2022/lib/services/config.service.mjs +27 -0
  62. package/esm2022/lib/services/effect.service.mjs +14 -0
  63. package/esm2022/lib/services/error-dialog.service.mjs +39 -0
  64. package/esm2022/lib/services/fixture-pool.service.mjs +30 -0
  65. package/esm2022/lib/services/fixture.service.mjs +431 -0
  66. package/esm2022/lib/services/hotkey-target-exclude.service.mjs +24 -0
  67. package/esm2022/lib/services/intro.service.mjs +140 -0
  68. package/esm2022/lib/services/preset.service.mjs +400 -0
  69. package/esm2022/lib/services/preview-mesh.service.mjs +57 -0
  70. package/esm2022/lib/services/preview.service.mjs +496 -0
  71. package/esm2022/lib/services/project-load.service.mjs +149 -0
  72. package/esm2022/lib/services/project.service.mjs +97 -0
  73. package/esm2022/lib/services/scene.service.mjs +164 -0
  74. package/esm2022/lib/services/timeline.service.mjs +726 -0
  75. package/esm2022/lib/services/universe.service.mjs +23 -0
  76. package/esm2022/lib/services/user-ensure-login.service.mjs +38 -0
  77. package/esm2022/lib/services/user.service.mjs +89 -0
  78. package/esm2022/lib/services/uuid.service.mjs +23 -0
  79. package/esm2022/lib/services/warning-dialog.service.mjs +38 -0
  80. package/esm2022/lib/timeline/composition-settings/composition-settings.component.mjs +334 -0
  81. package/esm2022/lib/timeline/timeline-grid/timeline-grid.component.mjs +216 -0
  82. package/esm2022/lib/timeline/timeline.component.mjs +418 -0
  83. package/esm2022/lib/user/user-login/user-login.component.mjs +144 -0
  84. package/esm2022/lib/user/user-register/user-register.component.mjs +220 -0
  85. package/esm2022/lib/wait-dialog/wait-dialog.component.mjs +26 -0
  86. package/esm2022/lib/warning-dialog/warning-dialog.component.mjs +68 -0
  87. package/esm2022/public_api.mjs +7 -0
  88. package/esm2022/rocketshow-designer.mjs +5 -0
  89. package/fesm2022/rocketshow-designer.mjs +10626 -0
  90. package/fesm2022/rocketshow-designer.mjs.map +1 -0
  91. package/index.d.ts +5 -0
  92. package/lib/array-sort-pipe.d.ts +3 -0
  93. package/lib/designer.component.d.ts +15 -12
  94. package/lib/designer.module.d.ts +54 -0
  95. package/lib/designer.service.d.ts +3 -0
  96. package/lib/effect/effect-curve/effect-curve.component.d.ts +4 -1
  97. package/lib/effect/effect-pan-tilt/effect-pan-tilt.component.d.ts +3 -0
  98. package/lib/effect/effect.component.d.ts +3 -0
  99. package/lib/error-dialog/error-dialog.component.d.ts +3 -0
  100. package/lib/fixture/fixture-capability/fixture-capability-channel/fixture-capability-channel.component.d.ts +4 -1
  101. package/lib/fixture/fixture-capability/fixture-capability-color/fixture-capability-color.component.d.ts +3 -0
  102. package/lib/fixture/fixture-capability/fixture-capability-color-wheel/fixture-capability-color-wheel.component.d.ts +5 -2
  103. package/lib/fixture/fixture-capability/fixture-capability-dimmer/fixture-capability-dimmer.component.d.ts +3 -0
  104. package/lib/fixture/fixture-capability/fixture-capability-pan-tilt/fixture-capability-pan-tilt.component.d.ts +3 -0
  105. package/lib/fixture/fixture-capability/fixture-capability.component.d.ts +3 -0
  106. package/lib/fixture/fixture-channel/fixture-channel.component.d.ts +3 -0
  107. package/lib/fixture/fixture-settings/fixture-settings-position/fixture-settings-position.component.d.ts +3 -0
  108. package/lib/fixture/fixture-settings/fixture-settings-stage/fixture-settings-stage.component.d.ts +3 -0
  109. package/lib/fixture/fixture-settings/fixture-settings.component.d.ts +3 -0
  110. package/lib/fixture/fixture.component.d.ts +3 -0
  111. package/lib/fixture-pool/fixture-pool-create-from-file/fixture-pool-create-from-file.component.d.ts +3 -0
  112. package/lib/fixture-pool/fixture-pool.component.d.ts +3 -0
  113. package/lib/intro/intro.component.d.ts +3 -0
  114. package/lib/master-dimmer/master-dimmer.component.d.ts +3 -0
  115. package/lib/preset/preset-settings/preset-settings.component.d.ts +3 -0
  116. package/lib/preset/preset.component.d.ts +3 -0
  117. package/lib/preview/preview.component.d.ts +4 -4
  118. package/lib/project/project-browser/project-browser.component.d.ts +3 -0
  119. package/lib/project/project-import/project-import.component.d.ts +3 -0
  120. package/lib/project/project-save/project-save.component.d.ts +3 -0
  121. package/lib/project/project-share/project-share.component.d.ts +3 -0
  122. package/lib/scene/scene-settings/scene-settings.component.d.ts +3 -0
  123. package/lib/scene/scene.component.d.ts +3 -0
  124. package/lib/services/animation.service.d.ts +3 -0
  125. package/lib/services/config.service.d.ts +3 -0
  126. package/lib/services/effect.service.d.ts +3 -0
  127. package/lib/services/error-dialog.service.d.ts +3 -0
  128. package/lib/services/fixture-pool.service.d.ts +3 -0
  129. package/lib/services/fixture.service.d.ts +3 -0
  130. package/lib/services/hotkey-target-exclude.service.d.ts +3 -0
  131. package/lib/services/intro.service.d.ts +3 -0
  132. package/lib/services/preset.service.d.ts +3 -0
  133. package/lib/services/preview-mesh.service.d.ts +3 -0
  134. package/lib/services/preview.service.d.ts +4 -0
  135. package/lib/services/project-load.service.d.ts +3 -0
  136. package/lib/services/project.service.d.ts +3 -0
  137. package/lib/services/scene.service.d.ts +3 -0
  138. package/lib/services/timeline.service.d.ts +4 -1
  139. package/lib/services/universe.service.d.ts +3 -0
  140. package/lib/services/user-ensure-login.service.d.ts +3 -0
  141. package/lib/services/user.service.d.ts +3 -0
  142. package/lib/services/uuid.service.d.ts +3 -0
  143. package/lib/services/warning-dialog.service.d.ts +3 -0
  144. package/lib/timeline/composition-settings/composition-settings.component.d.ts +3 -0
  145. package/lib/timeline/timeline-grid/timeline-grid.component.d.ts +3 -0
  146. package/lib/timeline/timeline.component.d.ts +3 -0
  147. package/lib/user/user-login/user-login.component.d.ts +3 -0
  148. package/lib/user/user-register/user-register.component.d.ts +3 -0
  149. package/lib/wait-dialog/wait-dialog.component.d.ts +3 -0
  150. package/lib/warning-dialog/warning-dialog.component.d.ts +3 -0
  151. package/package.json +20 -22
  152. package/rocketshow-designer-1.33.0.tgz +0 -0
  153. package/bundles/rocketshow-designer.umd.js +0 -9947
  154. package/bundles/rocketshow-designer.umd.js.map +0 -1
  155. package/bundles/rocketshow-designer.umd.min.js +0 -17
  156. package/bundles/rocketshow-designer.umd.min.js.map +0 -1
  157. package/esm2015/lib/array-sort-pipe.js +0 -28
  158. package/esm2015/lib/designer.component.js +0 -411
  159. package/esm2015/lib/designer.module.js +0 -117
  160. package/esm2015/lib/designer.service.js +0 -16
  161. package/esm2015/lib/effect/effect-curve/effect-curve.component.js +0 -325
  162. package/esm2015/lib/effect/effect-pan-tilt/effect-pan-tilt.component.js +0 -30
  163. package/esm2015/lib/effect/effect.component.js +0 -73
  164. package/esm2015/lib/error-dialog/error-dialog.component.js +0 -42
  165. package/esm2015/lib/fixture/fixture-capability/fixture-capability-channel/fixture-capability-channel.component.js +0 -141
  166. package/esm2015/lib/fixture/fixture-capability/fixture-capability-color/fixture-capability-color.component.js +0 -128
  167. package/esm2015/lib/fixture/fixture-capability/fixture-capability-color-wheel/fixture-capability-color-wheel.component.js +0 -163
  168. package/esm2015/lib/fixture/fixture-capability/fixture-capability-dimmer/fixture-capability-dimmer.component.js +0 -60
  169. package/esm2015/lib/fixture/fixture-capability/fixture-capability-pan-tilt/fixture-capability-pan-tilt.component.js +0 -87
  170. package/esm2015/lib/fixture/fixture-capability/fixture-capability.component.js +0 -97
  171. package/esm2015/lib/fixture/fixture-channel/fixture-channel.component.js +0 -66
  172. package/esm2015/lib/fixture/fixture-settings/fixture-settings-position/fixture-settings-position.component.js +0 -200
  173. package/esm2015/lib/fixture/fixture-settings/fixture-settings-stage/fixture-settings-stage.component.js +0 -31
  174. package/esm2015/lib/fixture/fixture-settings/fixture-settings.component.js +0 -35
  175. package/esm2015/lib/fixture/fixture.component.js +0 -70
  176. package/esm2015/lib/fixture-pool/fixture-pool-create-from-file/fixture-pool-create-from-file.component.js +0 -128
  177. package/esm2015/lib/fixture-pool/fixture-pool.component.js +0 -331
  178. package/esm2015/lib/intro/intro.component.js +0 -25
  179. package/esm2015/lib/master-dimmer/master-dimmer.component.js +0 -41
  180. package/esm2015/lib/models/cached-fixture-capability.js +0 -9
  181. package/esm2015/lib/models/cached-fixture-channel.js +0 -7
  182. package/esm2015/lib/models/cached-fixture.js +0 -6
  183. package/esm2015/lib/models/color.js +0 -8
  184. package/esm2015/lib/models/composition.js +0 -46
  185. package/esm2015/lib/models/effect-curve-profile-channel.js +0 -15
  186. package/esm2015/lib/models/effect-curve.js +0 -69
  187. package/esm2015/lib/models/effect-pan-tilt.js +0 -19
  188. package/esm2015/lib/models/effect.js +0 -12
  189. package/esm2015/lib/models/fixture-capability-value.js +0 -15
  190. package/esm2015/lib/models/fixture-capability.js +0 -84
  191. package/esm2015/lib/models/fixture-channel-value.js +0 -11
  192. package/esm2015/lib/models/fixture-channel.js +0 -24
  193. package/esm2015/lib/models/fixture-mode.js +0 -14
  194. package/esm2015/lib/models/fixture-profile.js +0 -70
  195. package/esm2015/lib/models/fixture-wheel-slot.js +0 -26
  196. package/esm2015/lib/models/fixture-wheel.js +0 -15
  197. package/esm2015/lib/models/fixture.js +0 -40
  198. package/esm2015/lib/models/preset-region-scene.js +0 -8
  199. package/esm2015/lib/models/preset.js +0 -56
  200. package/esm2015/lib/models/project.js +0 -68
  201. package/esm2015/lib/models/scene-playback-region.js +0 -11
  202. package/esm2015/lib/models/scene.js +0 -27
  203. package/esm2015/lib/models/universe.js +0 -11
  204. package/esm2015/lib/preset/preset-settings/preset-settings.component.js +0 -66
  205. package/esm2015/lib/preset/preset.component.js +0 -85
  206. package/esm2015/lib/preview/models/color-changer-3d.js +0 -167
  207. package/esm2015/lib/preview/models/fixture-3d.js +0 -150
  208. package/esm2015/lib/preview/models/moving-head-3d.js +0 -233
  209. package/esm2015/lib/preview/preview.component.js +0 -242
  210. package/esm2015/lib/project/project-browser/project-browser.component.js +0 -73
  211. package/esm2015/lib/project/project-import/project-import.component.js +0 -89
  212. package/esm2015/lib/project/project-save/project-save.component.js +0 -105
  213. package/esm2015/lib/project/project-share/project-share.component.js +0 -43
  214. package/esm2015/lib/scene/scene-settings/scene-settings.component.js +0 -52
  215. package/esm2015/lib/scene/scene.component.js +0 -56
  216. package/esm2015/lib/services/animation.service.js +0 -17
  217. package/esm2015/lib/services/config.service.js +0 -28
  218. package/esm2015/lib/services/effect.service.js +0 -16
  219. package/esm2015/lib/services/error-dialog.service.js +0 -44
  220. package/esm2015/lib/services/fixture-pool.service.js +0 -34
  221. package/esm2015/lib/services/fixture.service.js +0 -443
  222. package/esm2015/lib/services/hotkey-target-exclude.service.js +0 -26
  223. package/esm2015/lib/services/intro.service.js +0 -144
  224. package/esm2015/lib/services/preset.service.js +0 -416
  225. package/esm2015/lib/services/preview-mesh.service.js +0 -58
  226. package/esm2015/lib/services/preview.service.js +0 -500
  227. package/esm2015/lib/services/project-load.service.js +0 -171
  228. package/esm2015/lib/services/project.service.js +0 -113
  229. package/esm2015/lib/services/scene.service.js +0 -174
  230. package/esm2015/lib/services/timeline.service.js +0 -738
  231. package/esm2015/lib/services/universe.service.js +0 -24
  232. package/esm2015/lib/services/user-ensure-login.service.js +0 -44
  233. package/esm2015/lib/services/user.service.js +0 -93
  234. package/esm2015/lib/services/uuid.service.js +0 -25
  235. package/esm2015/lib/services/warning-dialog.service.js +0 -43
  236. package/esm2015/lib/timeline/composition-settings/composition-settings.component.js +0 -197
  237. package/esm2015/lib/timeline/timeline-grid/timeline-grid.component.js +0 -55
  238. package/esm2015/lib/timeline/timeline.component.js +0 -239
  239. package/esm2015/lib/user/user-login/user-login.component.js +0 -64
  240. package/esm2015/lib/user/user-register/user-register.component.js +0 -89
  241. package/esm2015/lib/wait-dialog/wait-dialog.component.js +0 -16
  242. package/esm2015/lib/warning-dialog/warning-dialog.component.js +0 -42
  243. package/esm2015/public_api.js +0 -7
  244. package/esm2015/rocketshow-designer.js +0 -61
  245. package/esm5/lib/array-sort-pipe.js +0 -31
  246. package/esm5/lib/designer.component.js +0 -468
  247. package/esm5/lib/designer.module.js +0 -120
  248. package/esm5/lib/designer.service.js +0 -17
  249. package/esm5/lib/effect/effect-curve/effect-curve.component.js +0 -386
  250. package/esm5/lib/effect/effect-pan-tilt/effect-pan-tilt.component.js +0 -31
  251. package/esm5/lib/effect/effect.component.js +0 -75
  252. package/esm5/lib/error-dialog/error-dialog.component.js +0 -43
  253. package/esm5/lib/fixture/fixture-capability/fixture-capability-channel/fixture-capability-channel.component.js +0 -159
  254. package/esm5/lib/fixture/fixture-capability/fixture-capability-color/fixture-capability-color.component.js +0 -130
  255. package/esm5/lib/fixture/fixture-capability/fixture-capability-color-wheel/fixture-capability-color-wheel.component.js +0 -215
  256. package/esm5/lib/fixture/fixture-capability/fixture-capability-dimmer/fixture-capability-dimmer.component.js +0 -61
  257. package/esm5/lib/fixture/fixture-capability/fixture-capability-pan-tilt/fixture-capability-pan-tilt.component.js +0 -88
  258. package/esm5/lib/fixture/fixture-capability/fixture-capability.component.js +0 -130
  259. package/esm5/lib/fixture/fixture-channel/fixture-channel.component.js +0 -68
  260. package/esm5/lib/fixture/fixture-settings/fixture-settings-position/fixture-settings-position.component.js +0 -306
  261. package/esm5/lib/fixture/fixture-settings/fixture-settings-stage/fixture-settings-stage.component.js +0 -32
  262. package/esm5/lib/fixture/fixture-settings/fixture-settings.component.js +0 -36
  263. package/esm5/lib/fixture/fixture.component.js +0 -71
  264. package/esm5/lib/fixture-pool/fixture-pool-create-from-file/fixture-pool-create-from-file.component.js +0 -127
  265. package/esm5/lib/fixture-pool/fixture-pool.component.js +0 -430
  266. package/esm5/lib/intro/intro.component.js +0 -26
  267. package/esm5/lib/master-dimmer/master-dimmer.component.js +0 -42
  268. package/esm5/lib/models/cached-fixture-capability.js +0 -11
  269. package/esm5/lib/models/cached-fixture-channel.js +0 -9
  270. package/esm5/lib/models/cached-fixture.js +0 -8
  271. package/esm5/lib/models/color.js +0 -10
  272. package/esm5/lib/models/composition.js +0 -60
  273. package/esm5/lib/models/effect-curve-profile-channel.js +0 -29
  274. package/esm5/lib/models/effect-curve.js +0 -95
  275. package/esm5/lib/models/effect-pan-tilt.js +0 -24
  276. package/esm5/lib/models/effect.js +0 -14
  277. package/esm5/lib/models/fixture-capability-value.js +0 -17
  278. package/esm5/lib/models/fixture-capability.js +0 -86
  279. package/esm5/lib/models/fixture-channel-value.js +0 -13
  280. package/esm5/lib/models/fixture-channel.js +0 -38
  281. package/esm5/lib/models/fixture-mode.js +0 -16
  282. package/esm5/lib/models/fixture-profile.js +0 -114
  283. package/esm5/lib/models/fixture-wheel-slot.js +0 -28
  284. package/esm5/lib/models/fixture-wheel.js +0 -29
  285. package/esm5/lib/models/fixture.js +0 -42
  286. package/esm5/lib/models/preset-region-scene.js +0 -10
  287. package/esm5/lib/models/preset.js +0 -90
  288. package/esm5/lib/models/project.js +0 -122
  289. package/esm5/lib/models/scene-playback-region.js +0 -13
  290. package/esm5/lib/models/scene.js +0 -29
  291. package/esm5/lib/models/universe.js +0 -13
  292. package/esm5/lib/preset/preset-settings/preset-settings.component.js +0 -67
  293. package/esm5/lib/preset/preset.component.js +0 -86
  294. package/esm5/lib/preview/models/color-changer-3d.js +0 -194
  295. package/esm5/lib/preview/models/fixture-3d.js +0 -196
  296. package/esm5/lib/preview/models/moving-head-3d.js +0 -250
  297. package/esm5/lib/preview/preview.component.js +0 -280
  298. package/esm5/lib/project/project-browser/project-browser.component.js +0 -77
  299. package/esm5/lib/project/project-import/project-import.component.js +0 -88
  300. package/esm5/lib/project/project-save/project-save.component.js +0 -120
  301. package/esm5/lib/project/project-share/project-share.component.js +0 -44
  302. package/esm5/lib/scene/scene-settings/scene-settings.component.js +0 -53
  303. package/esm5/lib/scene/scene.component.js +0 -57
  304. package/esm5/lib/services/animation.service.js +0 -18
  305. package/esm5/lib/services/config.service.js +0 -29
  306. package/esm5/lib/services/effect.service.js +0 -17
  307. package/esm5/lib/services/error-dialog.service.js +0 -46
  308. package/esm5/lib/services/fixture-pool.service.js +0 -36
  309. package/esm5/lib/services/fixture.service.js +0 -643
  310. package/esm5/lib/services/hotkey-target-exclude.service.js +0 -27
  311. package/esm5/lib/services/intro.service.js +0 -145
  312. package/esm5/lib/services/preset.service.js +0 -637
  313. package/esm5/lib/services/preview-mesh.service.js +0 -61
  314. package/esm5/lib/services/preview.service.js +0 -754
  315. package/esm5/lib/services/project-load.service.js +0 -185
  316. package/esm5/lib/services/project.service.js +0 -127
  317. package/esm5/lib/services/scene.service.js +0 -251
  318. package/esm5/lib/services/timeline.service.js +0 -845
  319. package/esm5/lib/services/universe.service.js +0 -36
  320. package/esm5/lib/services/user-ensure-login.service.js +0 -45
  321. package/esm5/lib/services/user.service.js +0 -95
  322. package/esm5/lib/services/uuid.service.js +0 -26
  323. package/esm5/lib/services/warning-dialog.service.js +0 -45
  324. package/esm5/lib/timeline/composition-settings/composition-settings.component.js +0 -206
  325. package/esm5/lib/timeline/timeline-grid/timeline-grid.component.js +0 -56
  326. package/esm5/lib/timeline/timeline.component.js +0 -243
  327. package/esm5/lib/user/user-login/user-login.component.js +0 -66
  328. package/esm5/lib/user/user-register/user-register.component.js +0 -91
  329. package/esm5/lib/wait-dialog/wait-dialog.component.js +0 -18
  330. package/esm5/lib/warning-dialog/warning-dialog.component.js +0 -43
  331. package/esm5/public_api.js +0 -7
  332. package/esm5/rocketshow-designer.js +0 -61
  333. package/fesm2015/rocketshow-designer.js +0 -7945
  334. package/fesm2015/rocketshow-designer.js.map +0 -1
  335. package/fesm5/rocketshow-designer.js +0 -9690
  336. package/fesm5/rocketshow-designer.js.map +0 -1
  337. package/rocketshow-designer-1.31.0.tgz +0 -0
  338. package/rocketshow-designer.d.ts +0 -60
  339. package/rocketshow-designer.metadata.json +0 -1
@@ -1,17 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@ngx-translate/core"),require("ngx-bootstrap/modal"),require("ngx-toastr"),require("rxjs/operators"),require("split.js"),require("three"),require("three/examples/js/libs/stats.min"),require("three/examples/jsm/controls/OrbitControls"),require("@angular/common/http"),require("rxjs"),require("@angular/router"),require("three/examples/jsm/loaders/GLTFLoader"),require("wavesurfer.js"),require("wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js"),require("wavesurfer.js/dist/plugin/wavesurfer.regions.min.js"),require("wavesurfer.js/dist/plugin/wavesurfer.timeline.min.js"),require("web-audio-beat-detector"),require("@angular/forms"),require("@angular/platform-browser"),require("@angular/platform-browser/animations"),require("ngx-bootstrap-slider"),require("ngx-bootstrap/accordion"),require("ngx-bootstrap/popover"),require("ngx-bootstrap/typeahead"),require("ngx-dropzone-wrapper"),require("ngx-sortablejs")):"function"==typeof define&&define.amd?define("@rocketshow/designer",["exports","@angular/core","@ngx-translate/core","ngx-bootstrap/modal","ngx-toastr","rxjs/operators","split.js","three","three/examples/js/libs/stats.min","three/examples/jsm/controls/OrbitControls","@angular/common/http","rxjs","@angular/router","three/examples/jsm/loaders/GLTFLoader","wavesurfer.js","wavesurfer.js/dist/plugin/wavesurfer.cursor.min.js","wavesurfer.js/dist/plugin/wavesurfer.regions.min.js","wavesurfer.js/dist/plugin/wavesurfer.timeline.min.js","web-audio-beat-detector","@angular/forms","@angular/platform-browser","@angular/platform-browser/animations","ngx-bootstrap-slider","ngx-bootstrap/accordion","ngx-bootstrap/popover","ngx-bootstrap/typeahead","ngx-dropzone-wrapper","ngx-sortablejs"],t):t(((e=e||self).rocketshow=e.rocketshow||{},e.rocketshow.designer={}),e.ng.core,e.core$1,e.modal,e.ngxToastr,e.rxjs.operators,e.Split,e.three,e.STATS,e.OrbitControls,e.ng.common.http,e.rxjs,e.ng.router,e.GLTFLoader,e.WaveSurfer,e.CursorPlugin,e.RegionsPlugin,e.TimeLinePlugin,e.webAudioBeatDetector,e.ng.forms,e.ng.platformBrowser,e.ng.platformBrowser.animations,e.ngxBootstrapSlider,e.accordion,e.popover,e.typeahead,e.ngxDropzoneWrapper,e.ngxSortablejs)}(this,(function(e,t,i,n,r,o,s,a,l,c,d,p,h,u,f,v,g,m,y,b,x,S,w,C,j,M,P,k){"use strict";s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s,l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,f=f&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f,v=v&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v,g=g&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g,m=m&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m;
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var I=function(e,t){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function R(e,t){function i(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var F=function(){return(F=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function T(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}function O(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function L(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function V(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function B(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(V(arguments[t]));return e}var N,U,D=function(){function e(){}return e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}();!function(e){e.NoFunction="NoFunction",e.ShutterStrobe="ShutterStrobe",e.StrobeSpeed="StrobeSpeed",e.StrobeDuration="StrobeDuration",e.Intensity="Intensity",e.ColorIntensity="ColorIntensity",e.ColorPreset="ColorPreset",e.ColorTemperature="ColorTemperature",e.Pan="Pan",e.PanContinuous="PanContinuous",e.Tilt="Tilt",e.TiltContinuous="TiltContinuous",e.PanTiltSpeed="PanTiltSpeed",e.WheelSlot="WheelSlot",e.WheelShake="WheelShake",e.WheelSlotRotation="WheelSlotRotation",e.WheelRotation="WheelRotation",e.EffectSpeed="EffectSpeed",e.EffectDuration="EffectDuration",e.EffectParameter="EffectParameter",e.SoundSensitivity="SoundSensitivity",e.Focus="Focus",e.Zoom="Zoom",e.Iris="Iris",e.IrisEffect="IrisEffect",e.Frost="Frost",e.FrostEffect="FrostEffect",e.Prism="Prism",e.PrismRotation="PrismRotation",e.BladeInsertion="BladeInsertion",e.BladeRotation="BladeRotation",e.BladeSystemRotation="BladeSystemRotation",e.Fog="Fog",e.FogOutput="FogOutput",e.FogType="FogType",e.BeamAngle="BeamAngle",e.Rotation="Rotation",e.Speed="Speed",e.Time="Time",e.Maintenance="Maintenance",e.Generic="Generic",e.Effect="Effect",e.BeamPosition="BeamPosition"}(N||(N={})),function(e){e.Red="Red",e.Green="Green",e.Blue="Blue",e.Cyan="Cyan",e.Magenta="Magenta",e.Yellow="Yellow",e.Amber="Amber",e.White="White",e["Warm White"]="Warm White",e["Cold White"]="Cold White",e.UV="UV",e.Lime="Lime",e.Indigo="Indigo"}(U||(U={}));var E,H=function(e){this.dmxRange=[],e&&(this.type=N[e.type],this.angleStart=e.angleStart,this.angleEnd=e.angleEnd,this.color=e.color,e.dmxRange&&(this.dmxRange=e.dmxRange),this.wheel=e.wheel,this.slotNumber=e.slotNumber,this.brightness=e.brightness,this.brightnessStart=e.brightnessStart,this.brightnessEnd=e.brightnessEnd,this.comment=e.comment)},W=function(e){var t,i;if(this.fineChannelAliases=[],this.capabilities=[],e)if(e.fineChannelAliases&&(this.fineChannelAliases=e.fineChannelAliases),this.defaultValue=e.defaultValue,this.dmxValueResolution=e.dmxValueResolution,e.capability)this.capability=new H(e.capability);else if(e.capabilities)try{for(var n=L(e.capabilities),r=n.next();!r.done;r=n.next()){var o=r.value;this.capabilities.push(new H(o))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},A=function(e){this.channels=[],e&&(this.name=e.name,this.shortName=e.shortName,e.channels&&(this.channels=e.channels))};!function(e){e.Open="Open",e.Closed="Closed",e.Color="Color",e.Gobo="Gobo",e.Prism="Prism",e.Iris="Iris",e.Frost="Frost",e.AnimationGoboStart="AnimationGoboStart",e.AnimationGoboEnd="AnimationGoboEnd"}(E||(E={}));var z,G=function(e){this.colors=[],e&&(this.type=E[e.type],this.name=e.name,e.colors&&(this.colors=e.colors))},$=function(e){var t,i;if(this.slots=[],e&&e.slots)try{for(var n=L(e.slots),r=n.next();!r.done;r=n.next()){var o=r.value;this.slots.push(new G(o))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}};!function(e){e.Blinder="Blinder",e["Color Changer"]="Color Changer",e.Dimmer="Dimmer",e.Effect="Effect",e.Fan="Fan",e.Flower="Flower",e.Hazer="Hazer",e.Laser="Laser",e.Matrix="Matrix",e["Moving Head"]="Moving Head",e["Pixel Bar"]="Pixel Bar",e.Scanner="Scanner",e.Smoke="Smoke",e.Stand="Stand",e.Strobe="Strobe",e.Other="Other",e["Barrel Scanner"]="Barrel Scanner"}(z||(z={}));var _,Z=function(e){var t,i,n,r,o,s,a,l;if(this.createdFromFile=!1,this.categories=[],this.availableChannels={},this.wheels={},this.modes=[],e){if(this.uuid=e.uuid,this.name=e.name,this.manufacturerName=e.manufacturerName,this.manufacturerShortName=e.manufacturerShortName,e.categories)try{for(var c=L(e.categories),d=c.next();!d.done;d=c.next()){var p=d.value;this.categories.push(z[p])}}catch(e){t={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}else e.mainCategory&&this.categories.push(z[e.mainCategory]);if(e.wheels)try{for(var h=L(Object.keys(e.wheels)),u=h.next();!u.done;u=h.next()){var f=u.value,v=new $(e.wheels[f]);this.wheels[f]=v}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}if(e.modes)try{for(var g=L(e.modes),m=g.next();!m.done;m=g.next()){var y=m.value;this.modes.push(new A(y))}}catch(e){o={error:e}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(o)throw o.error}}if(e.availableChannels)try{for(var b=L(Object.keys(e.availableChannels)),x=b.next();!x.done;x=b.next()){f=x.value;var S=new W(e.availableChannels[f]);this.availableChannels[f]=S}}catch(e){a={error:e}}finally{try{x&&!x.done&&(l=b.return)&&l.call(b)}finally{if(a)throw a.error}}e.createdFromFile&&(this.createdFromFile=e.createdFromFile)}},X=function(){this.channels=[]},q=function(){this.wheelSlots=[],this.wheelIsColor=!1},Y=function(){this.capabilities=[]},K=function(e,t,i){this.red=e,this.green=t,this.blue=i};!function(e){e.topFront="topFront",e.topBack="topBack",e.bottomFront="bottomFront",e.bottomBack="bottomBack",e.manual="manual"}(_||(_={}));var J=function(e){this.dmxFirstChannel=5,this.positioning=_.topFront,this.positionX=0,this.positionY=0,this.positionZ=0,this.rotationX=0,this.rotationY=0,this.rotationZ=0,e&&(this.uuid=e.uuid,this.profileUuid=e.profileUuid,this.name=e.name,this.dmxUniverseUuid=e.dmxUniverseUuid,this.dmxFirstChannel=e.dmxFirstChannel,this.modeShortName=e.modeShortName,this.positioning=e.positioning,this.positionX=e.positionX,this.positionY=e.positionY,this.positionZ=e.positionZ,this.rotationX=e.rotationX,this.rotationY=e.rotationY,this.rotationZ=e.rotationZ)},Q=function(e){e&&(this.sceneUuid=e.sceneUuid,this.startMillis=e.startMillis,this.endMillis=e.endMillis)},ee=function(e){var t,i;if(this.syncType="audio",this.audioFileInLibrary=!1,this.beatsPerMinute=120,this.timeSignatureUpper=4,this.timeSignatureLower=4,this.snapToGrid=!0,this.tempoGuessed=!1,this.gridType="musical",this.gridOffsetMillis=0,this.gridResolution=1,this.durationMillis=0,this.scenePlaybackRegions=[],e&&(this.uuid=e.uuid,this.name=e.name,this.syncType=e.syncType,this.audioFileName=e.audioFileName,this.audioFileInLibrary=e.audioFileInLibrary,this.beatsPerMinute=e.beatsPerMinute,this.timeSignatureUpper=e.timeSignatureUpper,this.timeSignatureLower=e.timeSignatureLower,this.snapToGrid=e.snapToGrid,this.tempoGuessed=!0,this.gridType=e.gridType,this.gridOffsetMillis=e.gridOffsetMillis,this.gridResolution=e.gridResolution,this.durationMillis=e.durationMillis,e.scenePlaybackRegions))try{for(var n=L(e.scenePlaybackRegions),r=n.next();!r.done;r=n.next()){var o=r.value;this.scenePlaybackRegions.push(new Q(o))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},te=function(e,t){this.visible=!0,this.type=e,t&&(this.uuid=t.uuid,this.visible=t.visible)},ie=function(e){var t,i;if(this.channels=[],e&&(this.profileUuid=e.profileUuid,e.channels))try{for(var n=L(Object.keys(e.channels)),r=n.next();!r.done;r=n.next()){var o=r.value;this.channels.push(o)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},ne=function(e){function t(t){var i,n,r,o,s=e.call(this,"curve",t)||this;if(s.curveType="sine",s.capabilities=[],s.channels=[],s.lengthMillis=2500,s.phaseMillis=0,s.amplitude=1,s.position=.5,s.phasingMillis=0,!t)return s;if(t.capabilities)try{for(var a=L(t.capabilities),l=a.next();!l.done;l=a.next()){var c=l.value;s.capabilities.push(new H(c))}}catch(e){i={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}if(t.channels)try{for(var d=L(t.channels),p=d.next();!p.done;p=d.next()){var h=p.value;s.channels.push(new ie(h))}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return s.lengthMillis=t.lengthMillis,s.phaseMillis=t.phaseMillis,s.amplitude=t.amplitude,s.position=t.position,s.phasingMillis=t.phasingMillis,s.curveType=t.curveType,s}return R(t,e),t.prototype.getValueAtMillis=function(e,t){var i=0;t&&(i=t);var n=this.phaseMillis+i*this.phasingMillis,r=0;switch(this.curveType){case"sine":r=this.position+this.amplitude/2*Math.sin(2*Math.PI*(e-n)/this.lengthMillis)/2;break;case"square":r=-1===Math.sign(Math.sin(2*Math.PI*(e-n)/this.lengthMillis)/2)?this.position+this.amplitude/2:this.position-this.amplitude/2}return Math.max(Math.min(r,1),0)},t}(te),re=function(e){function t(t){var i=e.call(this,"pan-tilt",t)||this;return i.phasingMillis=0,i}return R(t,e),t.prototype.getValueAtMillis=function(e,t){return t&&t,0},t}(te),oe=function(e){e&&(this.type=N[e.type],this.profileUuid=e.profileUuid,this.valuePercentage=e.valuePercentage,this.color=U[e.color],this.wheel=e.wheel,this.slotNumber=e.slotNumber)},se=function(e){e&&(this.channelName=e.channelName,this.profileUuid=e.profileUuid,this.value=e.value)},ae=function(e){var t,i,n,r,o,s;if(this.fixtureUuids=[],this.fixtureChannelValues=[],this.fixtureCapabilityValues=[],this.effects=[],this.fadeInMillis=0,this.fadeOutMillis=0,this.fadeInPre=!1,this.fadeOutPost=!1,e){if(this.uuid=e.uuid,this.name=e.name,this.fixtureUuids=e.fixtureUuids,e.fixtureChannelValues)try{for(var a=L(e.fixtureChannelValues),l=a.next();!l.done;l=a.next()){var c=l.value;this.fixtureChannelValues.push(new se(c))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}if(e.fixtureCapabilityValues)try{for(var d=L(e.fixtureCapabilityValues),p=d.next();!p.done;p=d.next()){var h=p.value;this.fixtureCapabilityValues.push(new oe(h))}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}if(e.effects)try{for(var u=L(e.effects),f=u.next();!f.done;f=u.next()){var v=f.value;switch(v.type){case"curve":this.effects.push(new ne(v));break;case"pan-tilt":this.effects.push(new re(v))}}}catch(e){o={error:e}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}this.startMillis=e.startMillis,this.endMillis=e.endMillis,this.fadeInMillis=e.fadeInMillis,this.fadeOutMillis=e.fadeOutMillis,this.fadeInPre=e.fadeInPre,this.fadeOutPost=e.fadeOutPost}},le=function(e){this.color="#fff",this.presetUuids=[],this.fadeInMillis=0,this.fadeOutMillis=0,this.fadeInPre=!1,this.fadeOutPost=!1,e&&(this.uuid=e.uuid,this.name=e.name,this.color=e.color,e.presetUuids&&(this.presetUuids=e.presetUuids),this.fadeInMillis=e.fadeInMillis,this.fadeOutMillis=e.fadeOutMillis,this.fadeInPre=e.fadeInPre,this.fadeOutPost=e.fadeOutPost)},ce=function(e){var t,i,n,r,o,s,a,l,c,d;if(this.stageWidthCm=600,this.stageHeightCm=350,this.stageDepthCm=600,this.stageFloorHeightCm=30,this.stageCeilingHeightCm=5,this.stagePillarWidthCm=20,this.masterDimmerValue=1,this.selectedSceneUuids=[],this.previewPreset=!0,this.compositions=[],this.fixtureProfiles=[],this.fixtures=[],this.scenes=[],this.presets=[],e){if(this.id=e.id,this.uuid=e.uuid,this.name=e.name,this.shareToken=e.shareToken,this.stageWidthCm=e.stageWidthCm,this.stageHeightCm=e.stageHeightCm,this.stageDepthCm=e.stageDepthCm,this.stageFloorHeightCm=e.stageFloorHeightCm,this.stageCeilingHeightCm=e.stageCeilingHeightCm,this.stagePillarWidthCm=e.stagePillarWidthCm,this.masterDimmerValue=e.masterDimmerValue,this.selectedPresetUuid=e.selectedPresetUuid,this.selectedSceneUuids=e.selectedSceneUuids,this.previewPreset=e.previewPreset,this.selectedCompositionUuid=e.selectedCompositionUuid,e.compositions)try{for(var p=L(e.compositions),h=p.next();!h.done;h=p.next()){var u=h.value;this.compositions.push(new ee(u))}}catch(e){t={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(t)throw t.error}}if(e.fixtureProfiles)try{for(var f=L(e.fixtureProfiles),v=f.next();!v.done;v=f.next()){var g=v.value;this.fixtureProfiles.push(new Z(g))}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}if(e.fixtures)try{for(var m=L(e.fixtures),y=m.next();!y.done;y=m.next()){var b=y.value;this.fixtures.push(new J(b))}}catch(e){o={error:e}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}if(e.scenes)try{for(var x=L(e.scenes),S=x.next();!S.done;S=x.next()){var w=S.value;this.scenes.push(new le(w))}}catch(e){a={error:e}}finally{try{S&&!S.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}if(e.presets)try{for(var C=L(e.presets),j=C.next();!j.done;j=C.next()){var M=j.value;this.presets.push(new ae(M))}}catch(e){c={error:e}}finally{try{j&&!j.done&&(d=C.return)&&d.call(C)}finally{if(c)throw c.error}}}},de=function(){function e(e){this.http=e,this.loadFromLocalStorage()}return e.prototype.loadFromLocalStorage=function(){this.token=localStorage.getItem("token"),this.tokenExpiration=void 0,localStorage.getItem("tokenExpiration")&&(this.tokenExpiration=new Date(Date.parse(localStorage.getItem("tokenExpiration")))),this.username=localStorage.getItem("username")},e.prototype.register=function(e,t,i){return this.http.post("register?email="+e+"&username="+t+"&password="+i,null)},e.prototype.login=function(e,t){var i=this;return this.http.post("login?email="+e+"&password="+t,null).pipe(o.map((function(e){i.token=e.token,i.username=e.username,i.tokenExpiration=new Date,i.tokenExpiration.setDate(i.tokenExpiration.getDate()+30),localStorage.setItem("token",i.token),localStorage.setItem("tokenExpiration",JSON.stringify(i.tokenExpiration)),localStorage.setItem("username",i.username),i.loadFromLocalStorage()})))},e.prototype.logout=function(){localStorage.removeItem("token"),localStorage.removeItem("tokenExpiration"),localStorage.removeItem("username"),this.loadFromLocalStorage()},e.prototype.isLoggedIn=function(){return!!this.token&&(!(new Date>this.tokenExpiration)||(this.logout(),!1))},e.prototype.getHeaders=function(){if(!this.isLoggedIn())return null;var e=new d.HttpHeaders;return e=e.append("Authorization",this.token)},e.prototype.setAutoLoadProject=function(e){localStorage.setItem("projectName",e.name),e.id?localStorage.setItem("projectId",e.id.toString()):localStorage.removeItem("projectId")},e.prototype.getAutoLoadProjectId=function(){return localStorage.getItem("projectId")?Number.parseInt(localStorage.getItem("projectId")):null},e.prototype.getAutoLoadProjectName=function(){return localStorage.getItem("projectName")},e.ctorParameters=function(){return[{type:d.HttpClient}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(d.HttpClient))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[d.HttpClient])],e)}(),pe=function(){function e(){}return e.prototype.getUuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),he=function(){function e(e,t,i,n,r,o,s){this.uuidService=e,this.http=t,this.userService=i,this.router=n,this.activatedRoute=r,this.translateService=o,this.toastrService=s,this.project=new ce,this.project.uuid=this.uuidService.getUuid(),this.project.name="New Project"}return e.prototype.saveApi=function(e){var t=this;return this.http.post("project",JSON.stringify(e),{headers:this.userService.getHeaders()}).pipe(o.map((function(i){if(i){e.id=i.id,i.shareToken&&(e.shareToken=i.shareToken);var n={id:e.id,token:e.shareToken};t.router.navigate([],{relativeTo:t.activatedRoute,queryParams:n,queryParamsHandling:"merge"})}return null})))},e.prototype.save=function(e){var t=this;this.saveApi(e).subscribe((function(){var i="designer.project.save-success",n="designer.project.save-success-title";t.translateService.get([i,n]).subscribe((function(e){t.toastrService.success(e[i],e[n])})),t.userService.setAutoLoadProject(e)}),(function(e){var i="designer.project.save-error",n="designer.project.save-error-title",r=e&&e.error?e.error.error:"unknown";t.translateService.get([i,n]).subscribe((function(e){t.toastrService.error(e[i]+" ("+r+")",e[n])}))}))},e.prototype.getAllProjects=function(){return this.http.get("projects",{headers:this.userService.getHeaders()}).pipe(o.map((function(e){var t,i,n=[];try{for(var r=L(e),o=r.next();!o.done;o=r.next()){var s=o.value,a=new ce(s);n.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return n})))},e.prototype.deleteProject=function(e){return this.http.delete("project?id="+e.id+"&name="+e.name,{headers:this.userService.getHeaders()})},e.prototype.getProject=function(e,t,i){return this.http.get("project?id="+e+"&name="+t+"&token="+i,{headers:this.userService.getHeaders()}).pipe(o.map((function(t){var i=new ce(t);return i.id=e,i})))},e.ctorParameters=function(){return[{type:pe},{type:d.HttpClient},{type:de},{type:h.Router},{type:h.ActivatedRoute},{type:i.TranslateService},{type:r.ToastrService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(pe),t.ɵɵinject(d.HttpClient),t.ɵɵinject(de),t.ɵɵinject(h.Router),t.ɵɵinject(h.ActivatedRoute),t.ɵɵinject(i.TranslateService),t.ɵɵinject(r.ToastrService))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[pe,d.HttpClient,de,h.Router,h.ActivatedRoute,i.TranslateService,r.ToastrService])],e)}(),ue=function(){function e(e,t,i,n,r){this.http=e,this.projectService=t,this.translateService=i,this.toastrService=n,this.uuidService=r,this.cachedFixtures=[],this.settingsSelection=!1,this.selectedSettingsFixtures=[]}return e.prototype.getFixtureByUuid=function(e){var t,i;try{for(var n=L(this.projectService.project.fixtures),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.getCachedFixtureByUuid=function(e){var t,i;try{for(var n=L(this.cachedFixtures),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.fixture.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.getSearchProfiles=function(){return this.http.get("fixtures").pipe(o.map((function(e){var t,i,n=[];try{for(var r=L(e),o=r.next();!o.done;o=r.next()){var s=o.value;n.push(new Z(s))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return n})))},e.prototype.getProfileByUuid=function(e){var t,i;try{for(var n=L(this.projectService.project.fixtureProfiles),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.loadProfileByUuid=function(e){var t=this;return this.getProfileByUuid(e)?p.of(void 0):p.forkJoin([this.http.get("fixtures?uuid="+encodeURI(e)),this.http.get("fixture?uuid="+encodeURI(e))]).pipe(o.map((function(e){var i=F(F({},e[0][0]),e[1]),n=new Z(i);t.projectService.project.fixtureProfiles.push(n)})))},e.prototype.getRotationAngleDeg=function(e){return e.endsWith("deg")?Number.parseInt(e.replace("deg","")):e.endsWith("%")?Number.parseInt(e.replace("%",""))/100*360:void 0},e.prototype.getWheelSlotColors=function(e,t){var i,n,r=[],o=this.getWheelSlots(e,t);try{for(var s=L(o),a=s.next();!a.done;a=s.next()){var l=a.value;l.colors&&l.colors.length>0&&(r=r.concat(l.colors))}}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return r},e.prototype.getMixedWheelSlotColor=function(e,t){var i,n,r=this.getWheelSlotColors(e,t),o=[];if(0!==r.length){try{for(var s=L(r),a=s.next();!a.done;a=s.next()){var l=a.value;o.push(this.hexToRgb(l))}}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return this.mixColors(o)}},e.prototype.componentToHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},e.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},e.prototype.hexToRgb=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new K(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):null},e.prototype.mixColors=function(e){var t,i,n=0,r=0,o=0;try{for(var s=L(e),a=s.next();!a.done;a=s.next()){var l=a.value;n+=l.red,r+=l.green,o+=l.blue}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(t)throw t.error}}return n/=e.length,r/=e.length,o/=e.length,new K(n,r,o)},e.prototype.wheelHasSlotType=function(e,t){var i,n;try{for(var r=L(e.slots),o=r.next();!o.done;o=r.next()){if(o.value.type===t)return!0}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return!1},e.prototype.getWheelByName=function(e,t){for(var i in e.wheels)if(i===t)return e.wheels[i]},e.prototype.getWheelSlots=function(e,t){var i=[];if(!e)return i;if(t-Math.floor(t)>0){var n=Math.floor(t);i.push(e.slots[n-1]),n>=0&&n<e.slots.length&&i.push(e.slots[n])}else i.push(e.slots[t-1]);return i},e.prototype.getModeByFixture=function(e,t){var i,n;try{for(var r=L(e.modes),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.shortName){if(s.shortName===t.modeShortName)return s}else if(s.name===t.modeShortName)return s}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.getFixtureCapability=function(e,t,i){var n=new q;return n.capability=e,e.slotNumber&&("string"==typeof e.wheel?n.wheelName=e.wheel:Array.isArray(e.wheel)?n.wheelName=e.wheel[0]:n.wheelName=t,n.wheel=this.getWheelByName(i,n.wheelName),n.wheelSlots=this.getWheelSlots(n.wheel,e.slotNumber),n.wheelIsColor=this.wheelHasSlotType(n.wheel,E.Color)),n.capability.dmxRange&&2===n.capability.dmxRange.length&&(n.centerValue=Math.floor((n.capability.dmxRange[0]+n.capability.dmxRange[1])/2)),n},e.prototype.getCapabilitiesByChannel=function(e,t,i){var n,r,o=[];if(e.capability)o.push(this.getFixtureCapability(e.capability,t,i));else if(e.capabilities)try{for(var s=L(e.capabilities),a=s.next();!a.done;a=s.next()){var l=a.value;o.push(this.getFixtureCapability(l,t,i))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o},e.prototype.getMaxValueByChannel=function(e){return Math.pow(256,1+e.fineChannelAliases.length)-1},e.prototype.getDefaultValueByChannel=function(e){if(e.defaultValue){if(isNaN(e.defaultValue)&&e.defaultValue.endsWith("%")){var t=Number.parseInt(e.defaultValue.replace("%",""));return this.getMaxValueByChannel(e)/100*t}return Number.parseInt(e.defaultValue)}},e.prototype.getColorWheelByChannel=function(e,t){var i,n;try{for(var r=L(e.capabilities),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.wheelIsColor)return s.wheel}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.getChannelByName=function(e,t){var i,n;try{for(var r=L(e.channels),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.name&&s.name===t||s.channel&&s.channel.fineChannelAliases.indexOf(t)>-1)return s}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.getCachedChannels=function(e,t){var i,n,r,o,s=[];if(!t)return s;try{for(var a=L(Object.keys(e.availableChannels)),l=a.next();!l.done;l=a.next()){var c=l.value,d=e.availableChannels[c];try{for(var p=(r=void 0,L(t.channels)),h=p.next();!h.done;h=p.next()){var u=h.value;if("string"==typeof u){if(u===c){var f=new Y;f.channel=d,f.name=c,f.capabilities=this.getCapabilitiesByChannel(f.channel,c,e);var v=this.getDefaultValueByChannel(f.channel);v&&(f.defaultValue=v),f.maxValue=this.getMaxValueByChannel(f.channel),f.colorWheel=this.getColorWheelByChannel(f,e),s.push(f)}}else s.push(new Y)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s},e.prototype.updateCachedFixtures=function(){var e,t;this.cachedFixtures=[];try{for(var i=L(this.projectService.project.fixtures),n=i.next();!n.done;n=i.next()){var r=n.value,o=new X;o.fixture=r,o.profile=this.getProfileByUuid(r.profileUuid),o.mode=this.getModeByFixture(o.profile,r),o.channels=this.getCachedChannels(o.profile,o.mode),this.cachedFixtures.push(o)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.capabilitiesMatch=function(e,t,i,n,r,o,s,a){return!(e!==t||i&&i!==n||r&&r!==o||s&&s!==a)},e.prototype.settingsFixtureIsSelected=function(e){var t,i;try{for(var n=L(this.selectedSettingsFixtures),r=n.next();!r.done;r=n.next()){if(r.value===e)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.switchSettingsFixtureSelection=function(e){this.settingsFixtureIsSelected(e)?this.selectedSettingsFixtures.splice(this.selectedSettingsFixtures.indexOf(e),1):this.selectedSettingsFixtures.push(e)},e.prototype.getFixtureIconClass=function(e){return e?0===e.categories.length?"":e.categories[0]?e.categories[0].replace(" ","-").toLocaleLowerCase():"":""},e.prototype.updateProfiles=function(){return this.http.post("update-profiles",null)},e.prototype.getNextFreeDmxChannel=function(e,t){for(var i,n,r=0,o=0;o<512;o++){var s=0;try{for(var a=(i=void 0,L(e)),l=a.next();!l.done;l=a.next()){var c=l.value,d=this.getModeByFixture(this.getProfileByUuid(c.profileUuid),c);o>=c.dmxFirstChannel&&o<c.dmxFirstChannel+d.channels.length&&d.channels.length>s&&(s=d.channels.length-(o-c.dmxFirstChannel))}}catch(e){i={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}if(s>0?(o+=s-1,r=0):r++,r===t)return o-r+1}return-1},e.prototype.addFixture=function(e,t){var i,n,r,o=this,s=new J;s.uuid=this.uuidService.getUuid(),s.profileUuid=e.uuid,s.name=e.name,e.modes&&e.modes.length>0&&(s.modeShortName=e.modes[0].shortName);try{for(var a=L(t),l=a.next();!l.done;l=a.next()){var c=l.value;if(this.getProfileByUuid(c.profileUuid)===e){r=c.modeShortName;break}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}s.modeShortName=r||(e.modes[0].shortName||e.modes[0].name);var d=this.getModeByFixture(this.getProfileByUuid(s.profileUuid),s),p=this.getNextFreeDmxChannel(t,d.channels.length);if(p>=0)return s.dmxFirstChannel=p,t.push(s),s;var h="designer.fixture-pool.no-free-space",u="designer.fixture-pool.no-free-space-title";this.translateService.get([h,u]).subscribe((function(e){o.toastrService.error(e[h],e[u])}))},e.ctorParameters=function(){return[{type:d.HttpClient},{type:he},{type:i.TranslateService},{type:r.ToastrService},{type:pe}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(d.HttpClient),t.ɵɵinject(he),t.ɵɵinject(i.TranslateService),t.ɵɵinject(r.ToastrService),t.ɵɵinject(pe))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[d.HttpClient,he,i.TranslateService,r.ToastrService,pe])],e)}(),fe=function(){function e(){this.loader=new u.GLTFLoader,this.cachedMeshes=new Map,this.cachedObservables=new Map}return e.prototype.loadScene=function(e){var t=this;return new p.Observable((function(i){t.loader.load("./assets/designer/models/"+e+".gltf",(function(e){e.scene.children[0].position.set(0,0,0),i.next(e.scene),i.complete()}),(function(e){}),(function(e){i.error(e)}))}))},e.prototype.loadMesh=function(e){var t=this,i=this.loadScene(e).pipe(o.map((function(i){var n=i.children[0];return n.position.set(0,0,0),t.cachedMeshes.set(e,n),t.cachedObservables.delete(e),n.clone()})));return this.cachedObservables.set(e,i),i},e.prototype.getMesh=function(e){return this.cachedMeshes.get(e)?p.of(this.cachedMeshes.get(e).clone()):this.cachedObservables.get(e)||this.loadMesh(e)},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),ve=function(e,t,i){this.preset=e,this.region=t,this.scene=i},ge=function(){function e(){this.timeMillis=0}return e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),me=function(){function e(){this.enableMediaLibrary=!1,this.loginAvailable=!1,this.shareAvailable=!1,this.menuHeightPx=0,this.languageSwitch=!1,this.newProjectTemplate=!1,this.livePreview=!1,this.localProfiles=!1,this.intro=!1,this.uniqueProjectNames=!1,this.menuHeightChanged=new p.Subject}return e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),ye=function(){function e(){}return e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),be=function(){function e(e,t,i,n,r,o,s){this.effectService=e,this.uuidService=t,this.projectService=i,this.fixtureService=n,this.configService=r,this.http=o,this.animationService=s,this.previewSelectionChanged=new p.Subject,this.fixtureSelectionChanged=new p.Subject,this.fixtureSelectionSettingsChanged=new p.Subject,this.fixtureColorChanged=new p.Subject,this.liveChangePending=!1}return e.prototype.getPresetByUuid=function(e){var t,i;try{for(var n=L(this.projectService.project.presets),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.prototype.fixtureIsSelected=function(e,t){var i,n;if(!t){if(!this.selectedPreset)return!1;t=this.selectedPreset}try{for(var r=L(t.fixtureUuids),o=r.next();!o.done;o=r.next()){if(o.value===e.uuid)return!0}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return!1},e.prototype.switchFixtureSelection=function(e){var t,i;if(this.selectedPreset)if(this.fixtureIsSelected(e))for(var n=this.selectedPreset.fixtureUuids.length-1;n>=0;n--){(s=this.fixtureService.getFixtureByUuid(this.selectedPreset.fixtureUuids[n])).dmxFirstChannel===e.dmxFirstChannel&&this.selectedPreset.fixtureUuids.splice(n,1)}else try{for(var r=L(this.projectService.project.fixtures),o=r.next();!o.done;o=r.next()){var s;(s=o.value).dmxFirstChannel===e.dmxFirstChannel&&this.selectedPreset.fixtureUuids.push(s.uuid)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},e.prototype.selectAllFixtures=function(){var e,t;if(this.selectedPreset)try{for(var i=L(this.projectService.project.fixtures),n=i.next();!n.done;n=i.next()){var r=n.value;this.fixtureIsSelected(r)||this.selectedPreset.fixtureUuids.push(r.uuid)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.selectNoFixtures=function(){this.selectedPreset&&(this.selectedPreset.fixtureUuids=[])},e.prototype.removeDeletedFixtures=function(){var e,t;try{for(var i=L(this.projectService.project.presets),n=i.next();!n.done;n=i.next())for(var r=n.value,o=r.fixtureUuids.length-1;o>=0;o--){this.fixtureService.getFixtureByUuid(r.fixtureUuids[o])||r.fixtureUuids.splice(o,1)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.updateFixtureSelection=function(){var e,t,i,n;try{for(var r=L(this.projectService.project.presets),o=r.next();!o.done;o=r.next())for(var s=o.value,a=s.fixtureUuids.length-1;a>=0;a--){var l=this.fixtureService.getFixtureByUuid(s.fixtureUuids[a]);try{for(var c=(i=void 0,L(this.projectService.project.fixtures)),d=c.next();!d.done;d=c.next()){var p=d.value;p.dmxFirstChannel!==l.dmxFirstChannel||this.fixtureIsSelected(p,s)||s.fixtureUuids.push(p.uuid)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},e.prototype.deleteCapabilityValue=function(e,t,i,n,r){for(var o=0;o<e.fixtureCapabilityValues.length;o++)if(this.fixtureService.capabilitiesMatch(e.fixtureCapabilityValues[o].type,t,e.fixtureCapabilityValues[o].color,i,e.fixtureCapabilityValues[o].wheel,n,e.fixtureCapabilityValues[o].profileUuid,r))return void e.fixtureCapabilityValues.splice(o,1)},e.prototype.setCapabilityValue=function(e,t,i,n,r,o,s){this.deleteCapabilityValue(e,t,r,o,s);var a=new oe;a.type=t,a.color=r,a.wheel=o,a.valuePercentage=i,a.slotNumber=n,a.profileUuid=s,e.fixtureCapabilityValues.push(a)},e.prototype.getCapabilityValue=function(e,t,i,n,r){var o,s;try{for(var a=L(e.fixtureCapabilityValues),l=a.next();!l.done;l=a.next()){var c=l.value;if(this.fixtureService.capabilitiesMatch(c.type,t,c.color,i,c.wheel,n,c.profileUuid,r))return c}}catch(e){o={error:e}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}},e.prototype.deleteChannelValue=function(e,t){for(var i=0;i<this.selectedPreset.fixtureChannelValues.length;i++)if(this.selectedPreset.fixtureChannelValues[i].channelName===e&&this.selectedPreset.fixtureChannelValues[i].profileUuid===t)return void this.selectedPreset.fixtureChannelValues.splice(i,1)},e.prototype.setChannelValue=function(e,t,i){this.deleteChannelValue(e,t);var n=new se;n.channelName=e,n.profileUuid=t,n.value=i,this.selectedPreset.fixtureChannelValues.push(n)},e.prototype.getChannelValue=function(e,t){var i,n;try{for(var r=L(this.selectedPreset.fixtureChannelValues),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.channelName===e&&s.profileUuid===t)return s.value}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.getApproximatedColorWheelCapability=function(e,t){var i,n,r,o,s,a,l,c=Number.MAX_VALUE;if((l=this.getCapabilityValue(e,N.ColorIntensity,U.Red))&&(r=255*l.valuePercentage),(l=this.getCapabilityValue(e,N.ColorIntensity,U.Green))&&(o=255*l.valuePercentage),(l=this.getCapabilityValue(e,N.ColorIntensity,U.Blue))&&(s=255*l.valuePercentage),void 0!==r&&void 0!==o&&void 0!==s)try{for(var d=L(t.capabilities),p=d.next();!p.done;p=d.next()){var h=p.value;if(h.capability.slotNumber){var u=this.fixtureService.getMixedWheelSlotColor(h.wheel,h.capability.slotNumber);if(u){var f=Math.abs(u.red-r)+Math.abs(u.green-o)+Math.abs(u.blue-s);f<c&&(c=f,a=h)}}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}return a},e.prototype.hasCapabilityType=function(e){var t,i,n,r,o,s;try{for(var a=L(this.selectedPreset.fixtureUuids),l=a.next();!l.done;l=a.next()){var c=l.value,d=this.fixtureService.getCachedFixtureByUuid(c);try{for(var p=(n=void 0,L(d.channels)),h=p.next();!h.done;h=p.next()){var u=h.value;if(u.channel)try{for(var f=(o=void 0,L(u.capabilities)),v=f.next();!v.done;v=f.next()){if(v.value.capability.type===e)return!0}}catch(e){o={error:e}}finally{try{v&&!v.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}return!1},e.prototype.hasCapabilityDimmer=function(){return this.hasCapabilityType(N.Intensity)},e.prototype.hasCapabilityColor=function(){return!!this.hasCapabilityType(N.ColorIntensity)},e.prototype.hasCapabilityColorOrColorWheel=function(){var e,t,i,n;if(this.hasCapabilityColor())return!0;try{for(var r=L(this.selectedPreset.fixtureUuids),o=r.next();!o.done;o=r.next()){var s=o.value,a=this.fixtureService.getCachedFixtureByUuid(s);try{for(var l=(i=void 0,L(a.channels)),c=l.next();!c.done;c=l.next()){if(c.value.colorWheel)return!0}}catch(e){i={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return!1},e.prototype.hasCapabilityPanTilt=function(){var e=!1,t=!1;return this.hasCapabilityType(N.Pan)&&(e=!0),this.hasCapabilityType(N.Tilt)&&(t=!0),!(!e||!t)},e.prototype.selectPreset=function(e){this.effectService.selectedEffect=void 0,this.selectedPreset=this.projectService.project.presets[e],this.projectService.project.selectedPresetUuid=this.projectService.project.presets[e].uuid,this.autoOpenFirstEffect(),this.previewSelectionChanged.next(),this.previewLive()},e.prototype.autoOpenFirstEffect=function(){this.selectedPreset&&1===this.selectedPreset.effects.length&&(this.effectService.selectedEffect=this.selectedPreset.effects[0])},e.prototype.addPreset=function(e){var t=new ae;t.uuid=this.uuidService.getUuid(),t.name=e||"New Preset";for(var i=0,n=0;n<this.projectService.project.presets.length;n++)if(this.selectedPreset===this.projectService.project.presets[n]){i=n;break}this.projectService.project.presets.splice(i,0,t),this.selectPreset(i)},e.prototype.getSelectedProfiles=function(){var e,t,i=[];if(!this.selectedPreset)return i;try{for(var n=L(this.selectedPreset.fixtureUuids),r=n.next();!r.done;r=n.next()){var o=r.value,s=this.fixtureService.getFixtureByUuid(o),a=this.fixtureService.getProfileByUuid(s.profileUuid);i.indexOf(a)<0&&i.push(a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return i},e.prototype.getSelectedProfileChannels=function(e){var t,i,n,r,o=this,s=new Map,a=new Map;try{for(var l=L(e),c=l.next();!c.done;c=l.next()){var d=c.value,p=[];try{for(var h=(n=void 0,L(this.selectedPreset.fixtureUuids)),u=h.next();!u.done;u=h.next()){var f=u.value,v=this.fixtureService.getCachedFixtureByUuid(f);p.indexOf(v.mode)<0&&p.push(v.mode)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}a.set(d,p)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}return a.forEach((function(e,t){var i,n,r,a,l=[];try{for(var c=L(e),d=c.next();!d.done;d=c.next()){var p=d.value,h=o.fixtureService.getCachedChannels(t,p),u=function(e){e.channel&&!l.find((function(t){return t.name===e.name}))&&l.push(e)};try{for(var f=(r=void 0,L(h)),v=f.next();!v.done;v=f.next()){u(v.value)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}s.set(t,l)})),s},e.prototype.previewLive=function(e,t){var i=this;if(void 0===e&&(e=""),this.configService.livePreview)if(!this.livePreviewTimer||e){var n=t;void 0===n&&(n=Math.round(this.animationService.timeMillis)),this.http.post("preview?positionMillis="+n+"&compositionName="+e,JSON.stringify(this.projectService.project)).subscribe(),this.liveChangePending=!1,e||(this.livePreviewTimer=setTimeout((function(){i.livePreviewTimer=void 0,i.liveChangePending&&i.http.post("preview?positionMillis="+n+"&compositionName="+e,JSON.stringify(i.projectService.project)).subscribe()}),50))}else this.liveChangePending=!0},e.prototype.stopPreviewPlay=function(){this.configService.livePreview&&this.http.post("stop-preview-play",null).subscribe()},e.ctorParameters=function(){return[{type:ye},{type:pe},{type:he},{type:ue},{type:me},{type:d.HttpClient},{type:ge}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(ye),t.ɵɵinject(pe),t.ɵɵinject(he),t.ɵɵinject(ue),t.ɵɵinject(me),t.ɵɵinject(d.HttpClient),t.ɵɵinject(ge))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[ye,pe,he,ue,me,d.HttpClient,ge])],e)}(),xe=function(){function e(e,t,i,n){this.uuidService=e,this.effectService=t,this.presetService=i,this.projectService=n,this.selectedScenes=[],this.sceneColors=["#945fda","#61da5f","#5fc3da","#dad65f","#da5f5f","#246db7"],this.multipleSelection=!1,this.sceneDeleted=new p.Subject,this.sceneSelected=new p.Subject}return e.prototype.sceneIsSelected=function(e){var t,i;try{for(var n=L(this.selectedScenes),r=n.next();!r.done;r=n.next()){if(r.value.uuid===e.uuid)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.presetIsSelected=function(e){var t,i;if(!this.selectedScenes||1!==this.selectedScenes.length)return!1;try{for(var n=L(this.selectedScenes[0].presetUuids),r=n.next();!r.done;r=n.next()){var o=r.value;if(e.uuid===o)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.switchSceneSelection=function(e){if(this.sceneIsSelected(e)){for(var t=0;t<this.selectedScenes.length;t++)if(this.selectedScenes[t].uuid===e.uuid)return void this.selectedScenes.splice(t,1)}else this.selectedScenes.push(e);this.sceneSelected.next()},e.prototype.selectPresetFromSelectedScene=function(){var e,t,i,n,r;try{for(var o=L(this.selectedScenes),s=o.next();!s.done;s=o.next()){var a=s.value;try{for(var l=(i=void 0,L(a.presetUuids)),c=l.next();!c.done;c=l.next()){var d=c.value;if(r=d,d===this.presetService.selectedPreset.uuid)return}}catch(e){i={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}if(r)for(var p=0;p<this.projectService.project.presets.length;p++)if(this.projectService.project.presets[p].uuid===r){this.presetService.selectPreset(p);break}},e.prototype.selectScene=function(e){var t,i;this.effectService.selectedEffect=void 0,e>=this.projectService.project.scenes.length?this.selectedScenes=[]:this.multipleSelection?this.switchSceneSelection(this.projectService.project.scenes[e]):(this.selectedScenes=[],this.selectedScenes.push(this.projectService.project.scenes[e])),this.selectPresetFromSelectedScene(),this.projectService.project.previewPreset=!1,this.projectService.project.selectedSceneUuids=[];try{for(var n=L(this.selectedScenes),r=n.next();!r.done;r=n.next()){var o=r.value;this.projectService.project.selectedSceneUuids.push(o.uuid)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.presetService.previewSelectionChanged.next(),this.presetService.previewLive(),this.sceneSelected.next()},e.prototype.addScene=function(e){var t=new le;t.uuid=this.uuidService.getUuid(),t.name=e||"New Scene",this.projectService.project.scenes.length<this.sceneColors.length?t.color=this.sceneColors[this.projectService.project.scenes.length]:t.color="#"+Math.random().toString(16).slice(2,8).toUpperCase();for(var i=0,n=0;n<this.projectService.project.scenes.length;n++)if(this.sceneIsSelected(this.projectService.project.scenes[n])){i=n;break}this.projectService.project.scenes.splice(i,0,t),this.selectScene(i)},e.prototype.removeScene=function(e){var t,i;try{for(var n=L(this.projectService.project.compositions),r=n.next();!r.done;r=n.next())for(var o=r.value,s=o.scenePlaybackRegions.length-1;s>=0;s--){o.scenePlaybackRegions[s].sceneUuid===e.uuid&&o.scenePlaybackRegions.splice(s,1)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.projectService.project.scenes.splice(this.projectService.project.scenes.indexOf(e),1),this.projectService.project.scenes.length>0&&this.selectScene(0),this.sceneDeleted.next()},e.prototype.getSceneByUuid=function(e){var t,i;try{for(var n=L(this.projectService.project.scenes),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.ctorParameters=function(){return[{type:pe},{type:ye},{type:be},{type:he}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(pe),t.ɵɵinject(ye),t.ɵɵinject(be),t.ɵɵinject(he))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[pe,ye,be,he])],e)}(),Se=function(){function e(e,t,i,n,r){var o=this;this.sceneService=e,this.presetService=t,this.projectService=i,this.http=n,this.configService=r,this.playState="paused",this.zoom=0,this.timelineClicking=!1,this.intensity=.2,this.intensitySelectedScene=.4,this.intensityHighlighted=.8,this.waveSurferReady=new p.Subject,this.detectChanges=new p.Subject,this.externalCompositionsAvailable=!1,this.loadingAudioFile=!1,this.presetService.previewSelectionChanged.subscribe((function(){o.selectedPlaybackRegion=void 0,o.updateRegionSelection()})),this.sceneService.sceneDeleted.subscribe((function(){o.redrawAllRegions()})),this.sceneService.sceneSelected.subscribe((function(){o.redrawAllRegions()}))}return e.prototype.redrawAllRegions=function(){var e,t;if(this.waveSurfer)try{for(var i=L(Object.keys(this.waveSurfer.regions.list)),n=i.next();!n.done;n=i.next()){var r=n.value;this.waveSurfer.regions.list[r].remove()}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.drawAllRegions()},e.prototype.pad=function(e,t){e||(e=0);for(var i=e.toString();i.length<t;)i="0"+i;return i},e.prototype.msToTime=function(e,t){void 0===t&&(t=!0);var i=Math.round(e%1e3),n=Math.floor(e%36e4%6e4/1e3),r=Math.floor(e%36e5/6e4);return t?this.pad(r,2)+":"+this.pad(n,2)+"."+this.pad(i,3):this.pad(r,2)+":"+this.pad(n,2)},e.prototype.updateCurrentTime=function(){var e=this;if(this.waveSurfer&&(this.currentTime=this.msToTime(1e3*this.waveSurfer.getCurrentTime()),this.waveSurfer.timeline.drawer)){var t,i=this.waveSurfer.backend.getDuration(),n=this.waveSurfer.params.fillParent&&!this.waveSurfer.params.scrollParent?this.waveSurfer.timeline.drawer.getWidth():this.waveSurfer.timeline.drawer.wrapper.scrollWidth*this.waveSurfer.params.pixelRatio;t=n/i*this.waveSurfer.getCurrentTime()-2,this.waveSurfer.timeline.render(),this.waveSurfer.timeline.canvases.forEach((function(i,n){var r=n*e.waveSurfer.timeline.maxCanvasWidth,o=i.getContext("2d");o.fillStyle="#fd7e14",o.beginPath(),o.moveTo(t-12-r,20),o.lineTo(t+12-r,20),o.lineTo(t-r,45),o.fill()}))}},e.prototype.startTimeUpdater=function(){var e=this;this.stopTimeUpdater();var t=p.timer(0,40);this.timeUpdateSubscription=t.subscribe((function(){e.updateCurrentTime()}))},e.prototype.stopTimeUpdater=function(){this.timeUpdateSubscription&&this.timeUpdateSubscription.unsubscribe()},e.prototype.formatTimeCallback=function(e,t){return"musical"===this.selectedComposition.gridType?Math.round(e/this.selectedComposition.timeSignatureUpper/(60/this.selectedComposition.beatsPerMinute)):parseInt(e/60,10)+":"+((e=parseInt(e%60,10))<10?"0"+e:e)},e.prototype.timeInterval=function(e){if("musical"===this.selectedComposition.gridType){var t=60/this.selectedComposition.beatsPerMinute/this.selectedComposition.gridResolution;return e<40?4*t:e<80?2*t:t}return e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e)},e.prototype.primaryLabelInterval=function(e){return"musical"===this.selectedComposition.gridType?this.selectedComposition.timeSignatureUpper*this.selectedComposition.gridResolution:e>=25?10:5*e>=25?6:4},e.prototype.secondaryLabelInterval=function(e){return"musical"===this.selectedComposition.gridType?0:e>=25?5:2},e.prototype.seeekWithTimeline=function(e){var t,i=this,n=e.targetTouches?e.targetTouches[0].clientX:e.clientX,r=this.waveSurfer.timeline.wrapper.getBoundingClientRect(),o=this.waveSurfer.timeline.drawer.width,s=this.waveSurfer.timeline.drawer.getWidth();!this.waveSurfer.timeline.drawer.params.fillParent&&o<s?(t=(this.waveSurfer.timeline.drawer.params.rtl?r.right-n:n-r.left)*(this.waveSurfer.timeline.drawer.params.pixelRatio/o)||0)>1&&(t=1):t=((this.waveSurfer.timeline.drawer.params.rtl?r.right-n:n-r.left)+this.waveSurfer.timeline.wrapper.scrollLeft)/this.waveSurfer.timeline.wrapper.scrollWidth||0,t=Math.max(t,0),setTimeout((function(){i.waveSurfer.seekTo(t),i.detectChanges.next(),i.presetService.previewLive(i.selectedComposition.name,Math.round(1e3*i.waveSurfer.getCurrentTime()))}),0)},e.prototype.applyZoom=function(e){var t=this;e<0||e>200||(this.zoom=e,this.waveSurfer&&setTimeout((function(){t.waveSurfer.zoom(t.zoom),t.updateCurrentTime()}),0))},e.prototype.isWaveSurferReady=function(){return!!this.waveSurfer&&!!this.waveSurfer.isReady},e.prototype.addRegion=function(e){if(this.isWaveSurferReady()&&this.sceneService.selectedScenes&&1===this.sceneService.selectedScenes.length&&this.selectedComposition){var t=new Q;t.sceneUuid=this.sceneService.selectedScenes[0].uuid,e?(t.startMillis=1e3*e.start,t.endMillis=1e3*e.end):(t.startMillis=1e3*this.waveSurfer.getDuration()/3,t.endMillis=1e3*this.waveSurfer.getDuration()/3*2),this.selectedComposition.scenePlaybackRegions.push(t),this.selectedPlaybackRegion=t,e?(e.color="rgba("+this.hexToRgb(this.sceneService.selectedScenes[0].color).r+", "+this.hexToRgb(this.sceneService.selectedScenes[0].color).g+", "+this.hexToRgb(this.sceneService.selectedScenes[0].color).b+", "+this.intensityHighlighted+")",e.attributes.selectable=!0,this.connectRegion(e,this.sceneService.selectedScenes[0],t),this.updateRegionSelection()):this.drawRegion(t,this.sceneService.selectedScenes[0]),this.presetService.previewLive()}},e.prototype.getSnapToGridInterval=function(){if(this.selectedComposition.snapToGrid)return 60/this.selectedComposition.beatsPerMinute/this.selectedComposition.gridResolution},e.prototype.getSnapToGridOffset=function(){return this.selectedComposition.gridOffsetMillis/1e3},e.prototype.deleteSelectedComposition=function(){this.projectService.project.compositions.splice(this.selectedCompositionIndex,1),this.selectedComposition=void 0,this.selectedCompositionIndex=void 0,this.destroyWaveSurfer(),this.projectService.project.compositions.length>0&&this.selectCompositionIndex(0)},e.prototype.destroyWaveSurfer=function(){this.duration=void 0,this.loadingAudioFile=!1,this.waveSurfer&&(this.waveSurfer.destroy(),this.waveSurfer=void 0)},e.prototype.createWaveSurfer=function(){var e=this;this.destroyWaveSurfer(),this.selectedComposition.audioFileName&&(this.loadingAudioFile=!0,setTimeout((function(){var t;e.waveSurfer=f.create({container:"#waveform",waveColor:"white",progressColor:"white",height:1,interact:!1,plugins:[v.create({opacity:1,color:"#fd7e14",hideOnBlur:!1}),g.create({dragSelection:{slop:5},color:"#fff",snapToGridInterval:e.getSnapToGridInterval(),snapToGridOffset:e.getSnapToGridOffset()}),m.create({container:"#waveform-timeline",primaryFontColor:"#fff",secondaryFontColor:"#fff",offset:e.getSnapToGridOffset(),formatTimeCallback:e.formatTimeCallback.bind(e),timeInterval:e.timeInterval.bind(e),primaryLabelInterval:e.primaryLabelInterval.bind(e),secondaryLabelInterval:e.secondaryLabelInterval.bind(e)})]}),t=e.configService.enableMediaLibrary?"file/get?name="+e.selectedComposition.audioFileName+"&type=AUDIO":"composition-files/?file="+e.selectedComposition.uuid+"."+e.selectedComposition.audioFileName.substr(e.selectedComposition.audioFileName.lastIndexOf(".")+1),e.waveSurfer.load(e.configService.restUrl+t),e.waveSurfer.on("ready",(function(){setTimeout((function(){e.selectedComposition.tempoGuessed?e.loadingAudioFile=!1:(e.selectedComposition.tempoGuessed=!0,y.guess(e.waveSurfer.backend.buffer).then((function(t){var i=t.bpm,n=t.offset;e.selectedComposition.beatsPerMinute=i,e.selectedComposition.gridOffsetMillis=1e3*n,e.loadingAudioFile=!1})).catch((function(t){console.error("Could not detect the BPM from the audio file",t),e.loadingAudioFile=!1}))),e.duration=e.msToTime(1e3*e.waveSurfer.getDuration()),e.drawAllRegions(),e.waveSurfer.timeline.wrapper.addEventListener("scroll",(function(){e.waveSurfer.drawer.wrapper.scrollLeft=e.waveSurfer.timeline.wrapper.scrollLeft,e.waveSurfer.timeline.wrapper.scrollLeft=e.waveSurfer.drawer.wrapper.scrollLeft})),e.waveSurfer.timeline.wrapper.addEventListener("mouseenter",(function(){e.waveSurfer.cursor.showCursor()})),e.waveSurfer.timeline.wrapper.addEventListener("mouseleave",(function(){e.waveSurfer.cursor.hideCursor()})),e.waveSurfer.timeline.wrapper.addEventListener("mousemove",(function(t){var i=e.waveSurfer.container.getBoundingClientRect(),n=t.clientX-i.left;e.waveSurfer.cursor.updateCursorPosition(n,0)})),e.waveSurfer.cursor.hideCursor(),e.waveSurfer.timeline.wrapper.addEventListener("mousedown",(function(t){e.timelineClicking=!0,e.seeekWithTimeline(t)})),e.waveSurfer.timeline.wrapper.addEventListener("mousemove",(function(t){e.timelineClicking&&e.seeekWithTimeline(t)})),e.waveSurfer.timeline.wrapper.addEventListener("mouseup",(function(t){e.timelineClicking=!1})),e.updateCurrentTime(),e.detectChanges.next(),e.waveSurferReady.next()}),0)})),e.waveSurfer.on("error",(function(t){e.deleteSelectedComposition()})),e.waveSurfer.on("seek",(function(){e.updateCurrentTime()})),e.waveSurfer.on("play",(function(){e.startTimeUpdater()})),e.waveSurfer.on("pause",(function(){e.stopTimeUpdater()})),e.waveSurfer.on("region-created",(function(t){e.sceneService.selectedScenes&&1===e.sceneService.selectedScenes.length?t.data.handled||e.addRegion(t):t.data.handled||t.remove()})),e.waveSurfer.on("region-updated",(function(t){e.detectChanges.next(),e.presetService.previewLive()}))}),0))},e.prototype.hexToRgb=function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},e.prototype.updateRegionSelection=function(){var e,t;if(this.waveSurfer)try{for(var i=L(Object.keys(this.waveSurfer.regions.list)),n=i.next();!n.done;n=i.next()){var r=n.value,o=this.waveSurfer.regions.list[r];if(o.scene){var s=this.intensity;o.drag=!1,o.resize=!1,o.attributes.selectable=!1,this.sceneService.sceneIsSelected(o.scene)&&(s=this.intensitySelectedScene,o.drag=!0,o.resize=!0,o.attributes.selectable=!0),o.attributes.selected=!1,this.selectedPlaybackRegion&&this.selectedPlaybackRegion===o.scenePlaybackRegion&&(s=this.intensityHighlighted,o.attributes.selected=!0),o.color="rgba("+this.hexToRgb(o.scene.color).r+", "+this.hexToRgb(o.scene.color).g+", "+this.hexToRgb(o.scene.color).b+", "+s+")",o.updateRender()}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.updateSelectedRegion=function(){var e,t;if(this.waveSurfer&&this.selectedPlaybackRegion)try{for(var i=L(Object.keys(this.waveSurfer.regions.list)),n=i.next();!n.done;n=i.next()){var r=n.value,o=this.waveSurfer.regions.list[r];if(this.selectedPlaybackRegion===o.scenePlaybackRegion){o.start=this.selectedPlaybackRegion.startMillis/1e3,o.end=this.selectedPlaybackRegion.endMillis/1e3,o.updateRender();break}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.setSelectedRegion=function(e){this.selectedPlaybackRegion&&this.selectedPlaybackRegion===e||(e&&(this.selectedPlaybackRegion=e),this.updateRegionSelection())},e.prototype.getRegionSnapToGridValue=function(e){var t=this.getSnapToGridOffset()||0,i=this.getSnapToGridInterval()||0;return Math.round((e-t)/i)*i+t},e.prototype.connectRegion=function(e,t,i,n){var r=this;e.scenePlaybackRegion=i,e.scene=t,e.preset=n,e.on("click",(function(e){r.sceneService.sceneIsSelected(t)&&r.setSelectedRegion(i)})),e.on("update",(function(){r.setSelectedRegion(i),r.selectedComposition.snapToGrid&&(e.start=r.getRegionSnapToGridValue(e.start),e.end=r.getRegionSnapToGridValue(e.end)),i.startMillis=1e3*e.start,i.endMillis=1e3*e.end}))},e.prototype.drawRegion=function(e,t){if(this.isWaveSurferReady()){var i=this.waveSurfer.addRegion({start:e.startMillis/1e3,end:e.endMillis/1e3,color:"#fff",data:{handled:!0}});this.connectRegion(i,t,e),this.updateRegionSelection()}},e.prototype.removeRegion=function(){var e,t;if(this.selectedPlaybackRegion&&1===this.sceneService.selectedScenes.length){for(var i=0;i<this.selectedComposition.scenePlaybackRegions.length;i++)if(this.selectedComposition.scenePlaybackRegions[i]===this.selectedPlaybackRegion){try{for(var n=(e=void 0,L(Object.keys(this.waveSurfer.regions.list))),r=n.next();!r.done;r=n.next()){var o=r.value,s=this.waveSurfer.regions.list[o];s.scenePlaybackRegion===this.selectedPlaybackRegion&&s.remove()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return this.selectedPlaybackRegion=void 0,void this.selectedComposition.scenePlaybackRegions.splice(i,1)}this.presetService.previewLive()}},e.prototype.getPresetsInTime=function(e){for(var t,i,n,r,o=[],s=this.projectService.project.scenes.length-1;s>=0;s--){var a=this.projectService.project.scenes[s];try{for(var l=(t=void 0,L(this.selectedComposition.scenePlaybackRegions)),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.sceneUuid===a.uuid)for(var p=this.projectService.project.presets.length-1;p>=0;p--)try{for(var h=(n=void 0,L(a.presetUuids)),u=h.next();!u.done;u=h.next()){var f=u.value;if(f===this.projectService.project.presets[p].uuid){var v=this.presetService.getPresetByUuid(f);if(v){var g=void 0===v.startMillis?d.startMillis:d.startMillis+v.startMillis,m=void 0===v.endMillis?d.endMillis:d.startMillis+v.endMillis;g-=v.fadeInPre?v.fadeInMillis:0,m+=v.fadeOutPost?v.fadeOutMillis:0,g<=e&&m>=e&&o.push(new ve(v,d,a))}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}}return o},e.prototype.drawAllRegions=function(){var e,t,i,n;if(this.selectedComposition){for(var r=this.projectService.project.scenes.length-1;r>=0;r--){var o=this.projectService.project.scenes[r];if(!this.sceneService.sceneIsSelected(o))try{for(var s=(e=void 0,L(this.selectedComposition.scenePlaybackRegions)),a=s.next();!a.done;a=s.next()){(d=a.value).sceneUuid===o.uuid&&this.drawRegion(d,o)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}for(r=this.projectService.project.scenes.length-1;r>=0;r--){o=this.projectService.project.scenes[r];if(this.sceneService.sceneIsSelected(o))try{for(var l=(i=void 0,L(this.selectedComposition.scenePlaybackRegions)),c=l.next();!c.done;c=l.next()){var d;(d=c.value).sceneUuid===o.uuid&&this.drawRegion(d,o)}}catch(e){i={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}},e.prototype.updateGrid=function(){this.waveSurferReady&&(this.waveSurfer.timeline.params.offset=this.getSnapToGridOffset(),this.waveSurfer.regions.params.snapToGridInterval=this.getSnapToGridInterval(),this.waveSurfer.regions.params.snapToGridOffset=this.getSnapToGridOffset()),this.updateCurrentTime()},e.prototype.getExternalCompositionNames=function(){return this.http.get("composition/list").pipe(o.map((function(e){var t,i,n=[];try{for(var r=L(e),o=r.next();!o.done;o=r.next()){var s=o.value;n.push(s.name)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return n})))},e.prototype.selectCompositionIndex=function(e){this.selectedComposition=this.projectService.project.compositions[e],this.selectedCompositionIndex=e,this.projectService.project.selectedCompositionUuid=this.selectedComposition.uuid,this.createWaveSurfer(),this.waveSurferReady.next(),this.applyZoom(0)},e.ctorParameters=function(){return[{type:xe},{type:be},{type:he},{type:d.HttpClient},{type:me}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(xe),t.ɵɵinject(be),t.ɵɵinject(he),t.ɵɵinject(d.HttpClient),t.ɵɵinject(me))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[xe,be,he,d.HttpClient,me])],e)}(),we=function(){function e(){this.universes=[]}return e.prototype.getUniverseByUuid=function(e){var t,i;try{for(var n=L(this.universes),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.uuid===e)return o}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),Ce=function(){function e(e,t,i,n,r,o){this.presetService=e,this.fixtureService=t,this.sceneService=i,this.timelineService=n,this.universeService=r,this.projectService=o,this.doUpdateFixtureSetup=new p.Subject,this.stageMeshes=[],this.stageMaterial=new a.MeshStandardMaterial({color:855309})}return e.prototype.getAlreadyCalculatedFixture=function(e,t){for(var i=0;i<t;i++){var n=e[i];if(n.fixture.dmxUniverseUuid===e[t].fixture.dmxUniverseUuid&&n.fixture.dmxFirstChannel===e[t].fixture.dmxFirstChannel)return n}},e.prototype.getPresets=function(e){var t,i,n,r,o=[];if("playing"===this.timelineService.playState)o=this.timelineService.getPresetsInTime(e);else if(this.projectService.project.previewPreset)this.presetService.selectedPreset&&o.push(new ve(this.presetService.selectedPreset,void 0,void 0));else for(var s=this.projectService.project.scenes.length-1;s>=0;s--)try{for(var a=(t=void 0,L(this.sceneService.selectedScenes)),l=a.next();!l.done;l=a.next()){var c=l.value;if(c.uuid===this.projectService.project.scenes[s].uuid)for(var d=this.projectService.project.presets.length-1;d>=0;d--)try{for(var p=(n=void 0,L(c.presetUuids)),h=p.next();!h.done;h=p.next()){if(h.value===this.projectService.project.presets[d].uuid){o.push(new ve(this.projectService.project.presets[d],void 0,c));break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}return o},e.prototype.mixChannelValue=function(e,t,i,n){var r,o;void 0===n&&(n=0);var s=t.value,a=n;if(i<1){try{for(var l=L(e),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.channelName===t.channelName&&d.profileUuid===t.profileUuid){a=d.value;break}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}s=a*(1-i)+s*i}for(var p=0;p<e.length;p++)if(e[p].channelName===t.channelName&&e[p].profileUuid===t.profileUuid){e.splice(p,1);break}var h=new se;h.channelName=t.channelName,h.profileUuid=t.profileUuid,h.value=s,e.push(h)},e.prototype.getFixtureIndex=function(e,t){var i,n,r,o,s=0,a=[];try{for(var l=L(this.projectService.project.fixtures),c=l.next();!c.done;c=l.next()){var d=c.value;try{for(var p=(r=void 0,L(e.fixtureUuids)),h=p.next();!h.done;h=p.next()){if(h.value===d.uuid){if(d.uuid===t)return s;a.includes(d.dmxFirstChannel)||(a.push(d.dmxFirstChannel),s++);break}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}},e.prototype.getPresetIntensity=function(e,t){var i=1,n=1,r=1;if(e.region&&e.scene){var o=e.scene.fadeInPre?e.region.startMillis-e.scene.fadeInMillis:e.region.startMillis,s=e.scene.fadeOutPost?e.region.endMillis+e.scene.fadeOutMillis:e.region.endMillis;t>s-e.scene.fadeOutMillis&&t<s?i=(s-t)/e.scene.fadeOutMillis:t<o+e.scene.fadeInMillis&&t>o&&(i=(t-o)/e.scene.fadeInMillis)}if(e.region&&e.preset){var a=void 0===e.preset.startMillis?e.region.startMillis:e.region.startMillis+e.preset.startMillis,l=void 0===e.preset.endMillis?e.region.endMillis:e.region.startMillis+e.preset.endMillis;a-=e.preset.fadeInPre?e.preset.fadeInMillis:0,t>(l+=e.preset.fadeOutPost?e.preset.fadeOutMillis:0)-e.preset.fadeOutMillis&&t<l?n=(l-t)/e.preset.fadeOutMillis:t<a+e.preset.fadeInMillis&&t>a&&(n=(t-a)/e.preset.fadeInMillis),r=i*n}return r},e.prototype.mixCapabilityValues=function(e,t,i,n){var r,o,s,a,l,c,d=!1;try{for(var p=L(e.preset.fixtureCapabilityValues),h=p.next();!h.done;h=p.next()){var u=h.value;try{for(var f=(s=void 0,L(t.channels)),v=f.next();!v.done;v=f.next()){var g=v.value;if(g.channel)try{for(var m=(l=void 0,L(g.capabilities)),y=m.next();!y.done;y=m.next()){var b=y.value;if(this.fixtureService.capabilitiesMatch(u.type,b.capability.type,u.color,b.capability.color,u.wheel,b.wheelName,u.profileUuid,t.profile.uuid))if((u.type===N.Intensity||u.type===N.ColorIntensity)&&u.valuePercentage>=0){var x=u.valuePercentage;if(1===g.capabilities.length)(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=g.maxValue*x,this.mixChannelValue(i,w,n,0),u.type===N.ColorIntensity&&(d=!0);else if("off"===b.capability.brightness&&0===x)(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=b.centerValue,this.mixChannelValue(i,w,n,0),u.type===N.ColorIntensity&&(d=!0);else if(("dark"===b.capability.brightnessStart||"off"===b.capability.brightnessStart)&&"bright"===b.capability.brightnessEnd){var S=(b.capability.dmxRange[1]-b.capability.dmxRange[0])*x+b.capability.dmxRange[0];(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=S,this.mixChannelValue(i,w,n,0),u.type===N.ColorIntensity&&(d=!0)}}else if((u.type===N.Pan||u.type===N.Tilt)&&u.valuePercentage>=0){(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=g.maxValue*u.valuePercentage,this.mixChannelValue(i,w,1)}else if(u.type===N.WheelSlot&&b.capability.slotNumber===u.slotNumber){(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=b.centerValue,this.mixChannelValue(i,w,1),b.wheelIsColor&&(d=!0)}}}catch(e){l={error:e}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}if(!d&&g.colorWheel){var w,C=this.presetService.getApproximatedColorWheelCapability(e.preset,g);if(C)(w=new se).channelName=g.name,w.profileUuid=t.profile.uuid,w.value=C.centerValue,this.mixChannelValue(i,w,1)}}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(s)throw s.error}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}},e.prototype.mixChannelValues=function(e,t,i,n){var r,o,s,a;try{for(var l=L(t.channels),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.channel)try{for(var p=(s=void 0,L(e.preset.fixtureChannelValues)),h=p.next();!h.done;h=p.next()){var u=h.value;t.profile.uuid===u.profileUuid&&d.name===u.channelName&&this.mixChannelValue(i,u,n)}}catch(e){s={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}},e.prototype.mixEffects=function(e,t,i,n,r,o){var s,a,l,c,d,p,h,u,f,v,g,m,y,b;try{for(var x=L(i.preset.effects),S=x.next();!S.done;S=x.next()){var w=S.value;if(w.visible&&w instanceof ne){var C=w;try{for(var j=(l=void 0,L(C.capabilities)),M=j.next();!M.done;M=j.next()){var P=M.value;try{for(var k=(d=void 0,L(n.channels)),I=k.next();!I.done;I=k.next()){var R=I.value;try{for(var F=(h=void 0,L(R.capabilities)),T=F.next();!T.done;T=F.next()){var O=T.value;if(this.fixtureService.capabilitiesMatch(P.type,O.capability.type,P.color,O.capability.color,null,null,null,null))(A=new se).channelName=R.name,A.profileUuid=n.profile.uuid,A.value=R.maxValue*C.getValueAtMillis(e,t),this.mixChannelValue(r,A,o)}}catch(e){h={error:e}}finally{try{T&&!T.done&&(u=F.return)&&u.call(F)}finally{if(h)throw h.error}}}}catch(e){d={error:e}}finally{try{I&&!I.done&&(p=k.return)&&p.call(k)}finally{if(d)throw d.error}}}}catch(e){l={error:e}}finally{try{M&&!M.done&&(c=j.return)&&c.call(j)}finally{if(l)throw l.error}}try{for(var V=(f=void 0,L(C.channels)),B=V.next();!B.done;B=V.next()){var N=B.value;if(N.profileUuid===n.profile.uuid){try{for(var U=(g=void 0,L(N.channels)),D=U.next();!D.done;D=U.next()){var E=D.value;try{for(var H=(y=void 0,L(n.channels)),W=H.next();!W.done;W=H.next()){var A;if((R=W.value).name===E)(A=new se).channelName=R.name,A.profileUuid=n.profile.uuid,A.value=R.maxValue*C.getValueAtMillis(e,t),this.mixChannelValue(r,A,o)}}catch(e){y={error:e}}finally{try{W&&!W.done&&(b=H.return)&&b.call(H)}finally{if(y)throw y.error}}}}catch(e){g={error:e}}finally{try{D&&!D.done&&(m=U.return)&&m.call(U)}finally{if(g)throw g.error}}break}}}catch(e){f={error:e}}finally{try{B&&!B.done&&(v=V.return)&&v.call(V)}finally{if(f)throw f.error}}}}}catch(e){s={error:e}}finally{try{S&&!S.done&&(a=x.return)&&a.call(x)}finally{if(s)throw s.error}}},e.prototype.getChannelValues=function(e,t){for(var i,n,r,o,s=new Map,a=0;a<this.fixtureService.cachedFixtures.length;a++){var l=this.fixtureService.cachedFixtures[a],c=[],d=this.getAlreadyCalculatedFixture(this.fixtureService.cachedFixtures,a);if(d)c=Object.assign([],s.get(d));else{try{for(var p=(i=void 0,L(l.channels)),h=p.next();!h.done;h=p.next()){var u=h.value;if(u.channel&&u.channel.defaultValue){var f=new se;f.channelName=u.name,f.profileUuid=l.profile.uuid,f.value=u.defaultValue,this.mixChannelValue(c,f,1)}}}catch(e){i={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(i)throw i.error}}try{for(var v=(r=void 0,L(t)),g=v.next();!g.done;g=v.next()){var m=g.value,y=this.getFixtureIndex(m.preset,l.fixture.uuid);if(y>=0){var b=this.getPresetIntensity(m,e);this.mixCapabilityValues(m,l,c,b),this.mixChannelValues(m,l,c,b),this.mixEffects(e,y,m,l,c,b)}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(r)throw r.error}}}s.set(l,c)}return s},e.prototype.setUniverseValues=function(e,t){},e.prototype.fixtureIsSelected=function(e,t){var i,n,r,o;try{for(var s=L(t),a=s.next();!a.done;a=s.next()){var l=a.value;try{for(var c=(r=void 0,L(l.preset.fixtureUuids)),d=c.next();!d.done;d=c.next()){if(d.value===e)return!0}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}}}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return!1},e.prototype.updateFixtureSetup=function(){this.doUpdateFixtureSetup.next()},e.prototype.updateStage=function(){var e,t;if(this.scene){var i,n;try{for(var r=L(this.stageMeshes),o=r.next();!o.done;o=r.next()){var s=o.value;this.scene.remove(s),s.geometry.dispose()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.stageMeshes=[],i=new a.BoxBufferGeometry(this.projectService.project.stageWidthCm,this.projectService.project.stageFloorHeightCm,this.projectService.project.stageDepthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(0,this.projectService.project.stageFloorHeightCm/2,0),this.scene.add(n),this.stageMeshes.push(n),i=new a.BoxBufferGeometry(this.projectService.project.stagePillarWidthCm,this.projectService.project.stageHeightCm,this.projectService.project.stagePillarWidthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(-this.projectService.project.stageWidthCm/2+this.projectService.project.stagePillarWidthCm/2,this.projectService.project.stageHeightCm/2+this.projectService.project.stageFloorHeightCm,this.projectService.project.stageDepthCm/2-this.projectService.project.stagePillarWidthCm/2),this.scene.add(n),this.stageMeshes.push(n),i=new a.BoxBufferGeometry(this.projectService.project.stagePillarWidthCm,this.projectService.project.stageHeightCm,this.projectService.project.stagePillarWidthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(this.projectService.project.stageWidthCm/2-this.projectService.project.stagePillarWidthCm/2,this.projectService.project.stageHeightCm/2+this.projectService.project.stageFloorHeightCm,this.projectService.project.stageDepthCm/2-this.projectService.project.stagePillarWidthCm/2),this.scene.add(n),this.stageMeshes.push(n),i=new a.BoxBufferGeometry(this.projectService.project.stagePillarWidthCm,this.projectService.project.stageHeightCm,this.projectService.project.stagePillarWidthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(-this.projectService.project.stageWidthCm/2+this.projectService.project.stagePillarWidthCm/2,this.projectService.project.stageHeightCm/2+this.projectService.project.stageFloorHeightCm,-this.projectService.project.stageDepthCm/2+this.projectService.project.stagePillarWidthCm/2),this.scene.add(n),this.stageMeshes.push(n),i=new a.BoxBufferGeometry(this.projectService.project.stagePillarWidthCm,this.projectService.project.stageHeightCm,this.projectService.project.stagePillarWidthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(this.projectService.project.stageWidthCm/2-this.projectService.project.stagePillarWidthCm/2,this.projectService.project.stageHeightCm/2+this.projectService.project.stageFloorHeightCm,-this.projectService.project.stageDepthCm/2+this.projectService.project.stagePillarWidthCm/2),this.scene.add(n),this.stageMeshes.push(n),i=new a.BoxBufferGeometry(this.projectService.project.stageWidthCm,this.projectService.project.stageCeilingHeightCm,this.projectService.project.stageDepthCm),(n=new a.Mesh(i.clone(),this.stageMaterial)).receiveShadow=!1,n.castShadow=!1,n.position.set(0,this.projectService.project.stageHeightCm+this.projectService.project.stageCeilingHeightCm/2+this.projectService.project.stageFloorHeightCm,0),this.scene.add(n),this.stageMeshes.push(n)}},e.ctorParameters=function(){return[{type:be},{type:ue},{type:xe},{type:Se},{type:we},{type:he}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(be),t.ɵɵinject(ue),t.ɵɵinject(xe),t.ɵɵinject(Se),t.ɵɵinject(we),t.ɵɵinject(he))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[be,ue,xe,Se,we,he])],e)}(),je=function(){function e(e,t,i){var n,r,o,s;this.fixtureService=e,this.fixtureHasDimmer=!1,this.fixtureHasColorWheel=!1,this.fixtureHasColor=!1,this.dimmer=0,this.isSelected=!1,this.isLoaded=!1,this.fixture=t,this.scene=i,this.selectedMaterial=new a.MeshLambertMaterial({color:16711935,emissive:16711935});try{for(var l=L(this.fixture.channels),c=l.next();!c.done;c=l.next()){var d=c.value;if(d.channel){try{for(var p=(o=void 0,L(d.capabilities)),h=p.next();!h.done;h=p.next()){switch(h.value.capability.type){case N.Intensity:this.fixtureHasDimmer=!0;break;case N.ColorIntensity:this.fixtureHasColor=!0}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}d.colorWheel&&(this.fixtureHasColorWheel=!0)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}return e.prototype.getCapabilityInValue=function(e,t){var i,n;try{for(var r=L(e.capabilities),o=r.next();!o.done;o=r.next()){var s=o.value;if(0===s.capability.dmxRange.length||t>=s.capability.dmxRange[0]&&t<=s.capability.dmxRange[1])return s}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.updatePreview=function(e,t){var i,n;this.fixtureHasDimmer?this.dimmer=0:this.dimmer=1,this.colorRed=255,this.colorGreen=255,this.colorBlue=255,!this.fixtureHasColorWheel&&this.fixtureHasColor&&(this.colorRed=0,this.colorGreen=0,this.colorBlue=0);try{for(var r=L(e),o=r.next();!o.done;o=r.next()){var s=o.value,a=this.fixtureService.getChannelByName(this.fixture,s.channelName),l=this.getCapabilityInValue(a,s.value);if(l)switch(l.capability.type){case N.Intensity:var c=void 0;c=l.capability.dmxRange.length>0?(s.value-l.capability.dmxRange[0])/(l.capability.dmxRange[1]-l.capability.dmxRange[0]):s.value/a.maxValue,this.dimmer=c*t;break;case N.ColorIntensity:c=255*s.value/a.maxValue;switch(l.capability.color){case U.Red:this.colorRed=Math.round(c);break;case U.Green:this.colorGreen=Math.round(c);break;case U.Blue:this.colorBlue=Math.round(c)}break;case N.WheelSlot:var d=this.fixtureService.getMixedWheelSlotColor(l.wheel,l.capability.slotNumber);d&&(this.colorRed=Math.round(d.red),this.colorGreen=Math.round(d.green),this.colorBlue=Math.round(d.blue))}}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}},e.prototype.updatePosition=function(e){switch(this.fixture.fixture.positioning){case _.topFront:e.rotation.x=a.Math.degToRad(0),e.position.set(this.fixture.fixture.positionX,this.fixture.fixture.positionY-13,this.fixture.fixture.positionZ);break;case _.bottomFront:e.rotation.x=a.Math.degToRad(180),e.position.set(this.fixture.fixture.positionX,this.fixture.fixture.positionY+13,this.fixture.fixture.positionZ);break;case _.topBack:e.rotation.x=a.Math.degToRad(0),e.position.set(this.fixture.fixture.positionX,this.fixture.fixture.positionY-13,this.fixture.fixture.positionZ);break;case _.bottomBack:e.rotation.x=a.Math.degToRad(180),e.position.set(this.fixture.fixture.positionX,this.fixture.fixture.positionY+13,this.fixture.fixture.positionZ);break;case _.manual:e.position.set(this.fixture.fixture.positionX,this.fixture.fixture.positionY,this.fixture.fixture.positionZ),e.rotation.x=a.Math.degToRad(this.fixture.fixture.rotationX),e.rotation.y=a.Math.degToRad(this.fixture.fixture.rotationY),e.rotation.z=a.Math.degToRad(this.fixture.fixture.rotationZ)}},e.prototype.destroy=function(){this.selectedMaterial.dispose()},e}(),Me=function(e){function t(t,i,n,r){var s=e.call(this,t,n,r)||this;return s.pointLightMaxIntensity=2,s.spotLightMaxIntensity=5,s.objectGroup=new a.Object3D,s.spotlightGroup=new a.Object3D,p.forkJoin([i.getMesh("color-changer")]).pipe(o.map((function(e){var t=V(e,1)[0];s.mesh=t,s.createObjects()}))).subscribe(),s}return R(t,e),t.prototype.atmosphereMat=function(){var e=["varying vec3\tvVertexWorldPosition;","varying vec3\tvVertexNormal;","void main(){","\tvVertexNormal = normalize(normalMatrix * normal);","\tvVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;","\t// set gl_Position","\tgl_Position\t= projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),t=["uniform vec3\tglowColor;","uniform float\tcoeficient;","uniform float\tpower;","uniform float\topacity;","varying vec3\tvVertexNormal;","varying vec3\tvVertexWorldPosition;","void main(){","\tvec3 worldCameraToVertex= vVertexWorldPosition - cameraPosition;","\tvec3 viewCameraToVertex\t= (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;","\tviewCameraToVertex\t= normalize(viewCameraToVertex);","\tfloat intensity\t\t= pow(coeficient + dot(vVertexNormal, viewCameraToVertex), power);","\tgl_FragColor\t\t= vec4(glowColor, intensity * opacity);","}"].join("\n");return new a.ShaderMaterial({uniforms:{coeficient:{type:"f",value:.3},power:{type:"f",value:1.3},opacity:{type:"f",value:1},glowColor:{type:"c",value:new a.Color("white")}},vertexShader:e,fragmentShader:t,transparent:!0,depthWrite:!1})},t.prototype.createSpotLightBeam=function(){this.spotLightBeam&&this.spotlightGroup.remove(this.spotLightBeam);var e=new a.CylinderGeometry(.8,16.8,100,64,20,!1);e.applyMatrix((new a.Matrix4).makeTranslation(0,-e.parameters.height/2,0)),e.applyMatrix((new a.Matrix4).makeRotationX(-Math.PI/2)),this.atmosphereMaterial=this.atmosphereMat(),this.spotLightBeam=new a.Mesh(e,this.atmosphereMaterial),this.spotLightBeam.position.set(0,-.02,0),this.spotlightGroup.add(this.spotLightBeam),this.spotLightBeam.rotation.x=Math.PI/2},t.prototype.createObjects=function(){this.material=new a.MeshLambertMaterial({color:855309,emissive:855309}),this.mesh.material=this.material,this.spotLight=new a.SpotLight(16777215,1),this.spotLight.angle=.244,this.spotLight.penumbra=.5,this.spotLight.decay=2,this.spotLight.distance=6e4,this.spotLight.castShadow=!1,this.spotLight.intensity=10,this.spotLightHelper=new a.SpotLightHelper(this.spotLight);var e=new a.Object3D;this.spotLight.target=e,this.spotlightGroup.add(this.spotLight),this.spotlightGroup.add(e),this.spotLight.position.set(0,-1.4,0),e.position.set(0,-10,0),this.pointLight=new a.PointLight(16777215,2,1e3),this.spotlightGroup.add(this.pointLight),this.pointLight.position.set(0,-1.4,0),this.createSpotLightBeam(),this.objectGroup.add(this.spotlightGroup),this.objectGroup.add(this.mesh),this.objectGroup.scale.multiplyScalar(9),this.scene.add(this.objectGroup),this.isLoaded=!0},t.prototype.getObject=function(){return this.objectGroup},t.prototype.updatePreview=function(t,i){var n,r,o,s;if(e.prototype.updatePreview.call(this,t,i),this.isLoaded){if(this.updatePosition(this.objectGroup),this.lastSelected!==this.isSelected){if(this.isSelected)try{for(var l=L(this.mesh.children),c=l.next();!c.done;c=l.next()){c.value.material=this.selectedMaterial}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}else try{for(var d=L(this.mesh.children),p=d.next();!p.done;p=d.next()){p.value.material=this.material}}catch(e){o={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}this.lastSelected=this.isSelected}this.spotLightHelper.update();var h=new a.Color("rgb("+this.colorRed+", "+this.colorGreen+", "+this.colorBlue+")");this.pointLight.color=h,this.spotLight.color=h,this.spotLightBeam.material.uniforms.glowColor.value=h;var u=Math.max(this.colorRed,this.colorGreen,this.colorBlue);this.spotLightBeam.material.uniforms.opacity.value=.5*Math.min(u,this.dimmer),this.spotLight.intensity=this.spotLightMaxIntensity*this.dimmer,this.pointLight.intensity=this.pointLightMaxIntensity*this.dimmer}},t.prototype.destroy=function(){this.scene.remove(this.objectGroup),this.material.dispose(),this.atmosphereMaterial.dispose()},t}(je),Pe=function(e){function t(t,i,n,r){var s=e.call(this,t,n,r)||this;return s.pointLightMaxIntensity=2,s.spotLightLightMaxIntensity=10,s.headGroup=new a.Object3D,s.spotlightGroup=new a.Object3D,s.armGroup=new a.Object3D,s.objectGroup=new a.Object3D,p.forkJoin([i.getMesh("moving_head_socket"),i.getMesh("moving_head_arm"),i.getMesh("moving_head_head")]).pipe(o.map((function(e){var t=V(e,3),i=t[0],n=t[1],r=t[2];s.socket=i,s.arm=n,s.head=r,s.createObjects()}))).subscribe(),s}return R(t,e),t.prototype.atmosphereMat=function(){var e=["varying vec3\tvVertexWorldPosition;","varying vec3\tvVertexNormal;","void main(){","\tvVertexNormal = normalize(normalMatrix * normal);","\tvVertexWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;","\t// set gl_Position","\tgl_Position\t= projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),t=["uniform vec3\tglowColor;","uniform float\tcoeficient;","uniform float\tpower;","uniform float\topacity;","varying vec3\tvVertexNormal;","varying vec3\tvVertexWorldPosition;","void main(){","\tvec3 worldCameraToVertex= vVertexWorldPosition - cameraPosition;","\tvec3 viewCameraToVertex\t= (viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;","\tviewCameraToVertex\t= normalize(viewCameraToVertex);","\tfloat intensity\t\t= pow(coeficient + dot(vVertexNormal, viewCameraToVertex), power);","\tgl_FragColor\t\t= vec4(glowColor, intensity * opacity);","}"].join("\n");return new a.ShaderMaterial({uniforms:{coeficient:{type:"f",value:.3},power:{type:"f",value:1.3},opacity:{type:"f",value:1},glowColor:{type:"c",value:new a.Color("white")}},vertexShader:e,fragmentShader:t,transparent:!0,depthWrite:!1})},t.prototype.createSpotLightBeam=function(){this.spotLightBeam&&this.spotlightGroup.remove(this.spotLightBeam);var e=new a.CylinderGeometry(.1,16.8,100,64,20,!1);e.applyMatrix((new a.Matrix4).makeTranslation(0,-e.parameters.height/2,0)),e.applyMatrix((new a.Matrix4).makeRotationX(-Math.PI/2)),this.atmosphereMaterial=this.atmosphereMat(),this.spotLightBeam=new a.Mesh(e,this.atmosphereMaterial),this.spotLightBeam.position.set(0,-.02,0),this.spotlightGroup.add(this.spotLightBeam),this.spotLightBeam.rotation.x=Math.PI/2},t.prototype.createObjects=function(){this.material=new a.MeshLambertMaterial({color:855309,emissive:855309}),this.socket.material=this.material,this.arm.material=this.material,this.head.material=this.material,this.head.scale.multiplyScalar(.9),this.head.position.set(-.1,0,0);var e=new a.Object3D;e.add(this.head),this.headGroup.add(e),this.spotLight=new a.SpotLight(16777215,1),this.spotLight.angle=.244,this.spotLight.penumbra=.5,this.spotLight.decay=2,this.spotLight.distance=6e4,this.spotLight.castShadow=!1,this.spotLight.intensity=10,this.spotLightHelper=new a.SpotLightHelper(this.spotLight);var t=new a.Object3D;this.spotLight.target=t,this.spotlightGroup.add(this.spotLight),this.spotlightGroup.add(t),this.spotLight.position.set(0,-1.4,0),t.position.set(0,-10,0),this.pointLight=new a.PointLight(16777215,2,1e3),this.spotlightGroup.add(this.pointLight),this.pointLight.position.set(0,-1.4,0),this.createSpotLightBeam(),this.headGroup.add(this.spotlightGroup),this.armGroup.add(this.headGroup),this.headGroup.position.set(0,-.6,0),this.armGroup.add(this.arm),this.objectGroup.add(this.armGroup),this.objectGroup.add(this.socket),this.socket.position.set(0,1.2,0),this.objectGroup.scale.multiplyScalar(9),this.scene.add(this.objectGroup),this.isLoaded=!0},t.prototype.getObject=function(){return this.objectGroup},t.prototype.updatePreview=function(t,i){var n,r;if(e.prototype.updatePreview.call(this,t,i),this.isLoaded){var o=0,s=255,l=0,c=255;this.pan=0,this.tilt=0;try{for(var d=L(t),p=d.next();!p.done;p=d.next()){var h=p.value,u=this.fixtureService.getChannelByName(this.fixture,h.channelName),f=this.getCapabilityInValue(u,h.value);if(f)switch(f.capability.type){case N.Pan:o=this.fixtureService.getRotationAngleDeg(f.capability.angleStart)||0,s=this.fixtureService.getRotationAngleDeg(f.capability.angleEnd)||540,this.pan=h.value/u.maxValue;break;case N.Tilt:l=this.fixtureService.getRotationAngleDeg(f.capability.angleStart)||0,c=this.fixtureService.getRotationAngleDeg(f.capability.angleEnd)||2700,this.tilt=h.value/u.maxValue}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}this.updatePosition(this.objectGroup),this.armGroup.rotation.y=a.Math.degToRad(s*this.pan+o)-a.Math.degToRad(s/2),this.headGroup.rotation.x=a.Math.degToRad(c*this.tilt+l)-a.Math.degToRad(c/2);14!==this.lastBeamAngleDegrees&&(this.spotLight.angle=a.Math.degToRad(14),this.createSpotLightBeam(),this.lastBeamAngleDegrees=14),this.lastSelected!==this.isSelected&&(this.isSelected?(this.socket.material=this.selectedMaterial,this.arm.material=this.selectedMaterial,this.head.material=this.selectedMaterial):(this.socket.material=this.material,this.arm.material=this.material,this.head.material=this.material),this.lastSelected=this.isSelected),this.spotLightHelper.update();var v=new a.Color("rgb("+this.colorRed+", "+this.colorGreen+", "+this.colorBlue+")");this.pointLight.color=v,this.spotLight.color=v,this.spotLightBeam.material.uniforms.glowColor.value=v;var g=Math.max(this.colorRed,this.colorGreen,this.colorBlue);this.spotLightBeam.material.uniforms.opacity.value=Math.min(g,this.dimmer),this.spotLight.intensity=this.spotLightLightMaxIntensity*this.dimmer,this.pointLight.intensity=this.pointLightMaxIntensity*this.dimmer}},t.prototype.destroy=function(){this.scene.remove(this.objectGroup),this.material.dispose(),this.atmosphereMaterial.dispose()},t}(je),ke=function(){function e(e,t,i,n,r,o){var s=this;this.fixtureService=e,this.previewMeshService=t,this.animationService=i,this.previewService=n,this.timelineService=r,this.projectService=o,this.stats=l(),this.fixtures3d=[],this.previewService.doUpdateFixtureSetup.subscribe((function(){s.syncFixtures()}))}return e.prototype.syncFixtures=function(){var e,t,i,n;try{for(var r=L(this.fixtures3d),o=r.next();!o.done;o=r.next()){o.value.destroy()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.fixtures3d=[];try{for(var s=L(this.fixtureService.cachedFixtures),a=s.next();!a.done;a=s.next()){var l=a.value;switch(l.profile.categories[0]){case z["Moving Head"]:this.fixtures3d.push(new Pe(this.fixtureService,this.previewMeshService,l,this.scene));break;case z["Color Changer"]:case z.Blinder:this.fixtures3d.push(new Me(this.fixtureService,this.previewMeshService,l,this.scene))}}}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}},Object.defineProperty(e.prototype,"canvas",{get:function(){return this.canvasRef.nativeElement},enumerable:!0,configurable:!0}),e.prototype.render=function(){this.renderer.render(this.scene,this.camera)},e.prototype.updateStagePosition=function(e,t,i,n,r,o,s){var a=0,l=1;this.projectService.project.fixtures.forEach((function(t,i){t.positioning===e&&a++})),this.projectService.project.fixtures.forEach((function(c,d){c.positioning===e&&(c.positionX=t+(i-t)/(a+1)*l,c.positionY=n+(r-n)/(a+1)*l,c.positionZ=o+(s-o)/(a+1)*l,l++)}))},e.prototype.animate=function(e){var t,i;this.stats.begin(),"playing"===this.timelineService.playState&&(e=1e3*this.timelineService.waveSurfer.getCurrentTime()),this.animationService.timeMillis=e,this.controls&&this.controls.update(),this.updateStagePosition(_.topFront,-this.projectService.project.stageWidthCm/2,this.projectService.project.stageWidthCm/2,this.projectService.project.stageHeightCm+this.projectService.project.stageFloorHeightCm,this.projectService.project.stageHeightCm+this.projectService.project.stageFloorHeightCm,this.projectService.project.stageDepthCm/2-70,this.projectService.project.stageDepthCm/2-70),this.updateStagePosition(_.bottomFront,-this.projectService.project.stageWidthCm/2,this.projectService.project.stageWidthCm/2,this.projectService.project.stageFloorHeightCm,this.projectService.project.stageFloorHeightCm,this.projectService.project.stageDepthCm/2-70,this.projectService.project.stageDepthCm/2-70),this.updateStagePosition(_.topBack,-this.projectService.project.stageWidthCm/2,this.projectService.project.stageWidthCm/2,this.projectService.project.stageHeightCm+this.projectService.project.stageFloorHeightCm,this.projectService.project.stageHeightCm+this.projectService.project.stageFloorHeightCm,-this.projectService.project.stageDepthCm/2+70,-this.projectService.project.stageDepthCm/2+70),this.updateStagePosition(_.bottomBack,-this.projectService.project.stageWidthCm/2,this.projectService.project.stageWidthCm/2,this.projectService.project.stageFloorHeightCm,this.projectService.project.stageFloorHeightCm,-this.projectService.project.stageDepthCm/2+70,-this.projectService.project.stageDepthCm/2+70);var n=this.previewService.getPresets(e),r=this.previewService.getChannelValues(e,n);try{for(var o=L(this.fixtures3d),s=o.next();!s.done;s=o.next()){var a=s.value;a.updatePreview(r.get(a.fixture)||[],this.projectService.project.masterDimmerValue),this.fixtureService.settingsSelection?a.isSelected=this.fixtureService.settingsFixtureIsSelected(a.fixture.fixture):a.isSelected=this.previewService.fixtureIsSelected(a.fixture.fixture.uuid,n)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}this.previewService.setUniverseValues(r,this.projectService.project.masterDimmerValue),this.render(),this.stats.end(),requestAnimationFrame(this.animate.bind(this))},e.prototype.getAspectRatio=function(){return 0===this.canvas.clientHeight?0:this.canvas.clientWidth/this.canvas.clientHeight},e.prototype.onResize=function(){this.camera.aspect=this.getAspectRatio(),this.camera.updateProjectionMatrix(),this.renderer.setSize(this.canvas.clientWidth,this.canvas.clientHeight)},e.prototype.setupRenderer=function(){this.renderer=new a.WebGLRenderer({antialias:!0}),this.canvas.appendChild(this.renderer.domElement),this.renderer.setPixelRatio(devicePixelRatio),this.renderer.setSize(this.canvas.clientWidth,this.canvas.clientHeight),this.renderer.shadowMap.enabled=!1,this.renderer.gammaInput=!0,this.renderer.gammaOutput=!0},e.prototype.setupCamera=function(){this.camera=new a.PerspectiveCamera(35,window.innerWidth/window.innerHeight,1,1e4),this.camera.position.set(-600,80,700)},e.prototype.setupControls=function(){this.controls=new c.OrbitControls(this.camera,this.renderer.domElement),this.controls.enableKeys=!1,this.controls.rotateSpeed=.05,this.controls.zoomSpeed=1.2,this.controls.enableDamping=!0,this.controls.dampingFactor=.25,this.controls.screenSpacePanning=!1,this.controls.minDistance=700,this.controls.maxDistance=2e3,this.controls.maxPolarAngle=Math.PI/2,this.controls.target=new a.Vector3(0,200,0)},e.prototype.setupFloor=function(){var e=new a.BoxGeometry(4e3,1,4e3),t=new a.MeshStandardMaterial({color:855309}),i=new a.Mesh(e.clone(),t);i.receiveShadow=!1,i.castShadow=!1,i.position.set(0,-.5,0),this.scene.add(i)},e.prototype.setupStats=function(){this.stats.domElement.style.position="absolute",this.stats.domElement.style.left="0px",this.canvas.appendChild(this.stats.domElement)},e.prototype.setupScene=function(){this.scene=new a.Scene,this.previewService.scene=this.scene;var e=new a.AmbientLight(16777215,.8);this.scene.add(e),this.setupFloor(),this.previewService.updateStage();var t=[];t[0]=new a.PointLight(16777215,.5,0),t[1]=new a.PointLight(16777215,.5,0),t[2]=new a.PointLight(16777215,.5,0),t[0].position.set(0,2e3,0),t[1].position.set(1e3,2e3,1e3),t[2].position.set(-1e3,-2e3,-1e3),this.scene.add(t[0]),this.scene.add(t[1]),this.scene.add(t[2]),this.setupStats()},e.prototype.ngAfterViewInit=function(){this.setupRenderer(),this.setupCamera(),this.setupControls(),this.setupScene(),this.onResize(),this.animate(null)},e.ctorParameters=function(){return[{type:ue},{type:fe},{type:ge},{type:Ce},{type:Se},{type:he}]},T([t.ViewChild("canvas"),O("design:type",t.ElementRef)],e.prototype,"canvasRef",void 0),T([t.HostListener("window:resize"),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",void 0)],e.prototype,"onResize",null),e=T([t.Component({selector:"lib-app-preview",template:'<div class="h-100" #canvas style="overflow: hidden"></div>\n',styles:[""]}),O("design:paramtypes",[ue,fe,ge,Ce,Se,he])],e)}(),Ie=function(){function e(){}return e.prototype.ngOnInit=function(){},e=T([t.Component({selector:"lib-wait-dialog",template:'<div class="card-modal">\n <div class="card">\n <div class="card-body">\n <p class="card-text">{{ \'designer.misc.please-wait\' | translate }}</p>\n <div class="progress">\n <div\n class="progress-bar progress-bar-striped progress-bar-animated"\n role="progressbar"\n style="width: 100%"\n aria-valuenow="10"\n aria-valuemin="0"\n aria-valuemax="100"\n ></div>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[])],e)}(),Re=function(){function e(e,t,i,n,r,o,s,a,l,c){this.projectService=e,this.previewService=t,this.fixtureService=i,this.presetService=n,this.sceneService=r,this.modalService=o,this.uuidService=s,this.timelineService=a,this.router=l,this.activatedRoute=c}return e.prototype.afterLoad=function(){this.fixtureService.updateCachedFixtures(),this.presetService.removeDeletedFixtures(),this.previewService.updateFixtureSetup(),this.presetService.fixtureSelectionChanged.next(),this.presetService.autoOpenFirstEffect(),this.previewService.updateStage(),this.presetService.previewLive(),this.sceneService.selectPresetFromSelectedScene()},e.prototype.selectScenesPresetComposition=function(){var e,t;if(this.presetService.selectedPreset=this.presetService.getPresetByUuid(this.projectService.project.selectedPresetUuid),this.sceneService.selectedScenes=[],this.projectService.project.selectedSceneUuids)try{for(var i=L(this.projectService.project.selectedSceneUuids),n=i.next();!n.done;n=i.next()){var r=n.value;this.sceneService.selectedScenes.push(this.sceneService.getSceneByUuid(r))}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.timelineService.selectedComposition=void 0,this.timelineService.selectedCompositionIndex=void 0,this.timelineService.destroyWaveSurfer();for(var o=0;o<this.projectService.project.compositions.length;o++)if(this.projectService.project.compositions[o].uuid===this.projectService.project.selectedCompositionUuid){this.timelineService.selectCompositionIndex(o);break}},e.prototype.load=function(e,t,i){var n=this,r=this.modalService.show(Ie,{keyboard:!1,ignoreBackdropClick:!0});return this.projectService.getProject(e,t,i).pipe(o.map((function(t){n.projectService.project=t,n.selectScenesPresetComposition(),n.afterLoad();var i={id:e,token:t.shareToken};n.router.navigate([],{relativeTo:n.activatedRoute,queryParams:i,queryParamsHandling:"merge"})})),o.finalize((function(){setTimeout((function(){r.hide()}),250),setTimeout((function(){r.hide()}),500),setTimeout((function(){r.hide()}),1500)})))},e.prototype.new=function(){var e=new ce;e.uuid=this.uuidService.getUuid(),this.projectService.project=e,this.projectService.project.shareToken=this.uuidService.getUuid();var t=new ae;t.uuid=this.uuidService.getUuid(),t.name="New Preset",this.projectService.project.presets.push(t),this.presetService.selectPreset(0),this.sceneService.addScene(),this.projectService.project.scenes[0].presetUuids.push(t.uuid),this.projectService.project.previewPreset=!0,this.sceneService.selectedScenes=[this.projectService.project.scenes[0]],this.presetService.selectedPreset=this.projectService.project.presets[0],this.timelineService.selectedComposition=void 0,this.timelineService.selectedCompositionIndex=void 0,this.timelineService.destroyWaveSurfer(),this.afterLoad();this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{id:"",token:""},queryParamsHandling:"merge"})},e.prototype.template=function(){var e=this;this.load(1,null).subscribe((function(){e.projectService.project.id=void 0}))},e.prototype.import=function(e){var t=new ce(JSON.parse(e));t.id=void 0,this.projectService.project=t,this.selectScenesPresetComposition(),this.afterLoad()},e.ctorParameters=function(){return[{type:he},{type:Ce},{type:ue},{type:be},{type:xe},{type:n.BsModalService},{type:pe},{type:Se},{type:h.Router},{type:h.ActivatedRoute}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(he),t.ɵɵinject(Ce),t.ɵɵinject(ue),t.ɵɵinject(be),t.ɵɵinject(xe),t.ɵɵinject(n.BsModalService),t.ɵɵinject(pe),t.ɵɵinject(Se),t.ɵɵinject(h.Router),t.ɵɵinject(h.ActivatedRoute))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[he,Ce,ue,be,xe,n.BsModalService,pe,Se,h.Router,h.ActivatedRoute])],e)}(),Fe=function(){function e(e){this.bsModalRef=e}return e.prototype.ngOnInit=function(){this.onClose=new p.Subject},e.prototype.ok=function(){this.onClose.next(1),this.bsModalRef.hide()},e.prototype.cancel=function(){this.onClose.next(2),this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-app-warning-dialog",template:'<div class="card-modal">\n <div class="card">\n <div class="card-header">\n {{ \'designer.misc.warning\' | translate }}\n </div>\n\n <div class="card-body">\n <div class="row">\n <div class="col-auto">\n <h2 class="mb-0">\n <i class="fa fa-exclamation-triangle text-primary" aria-hidden="true"></i>\n </h2>\n </div>\n <div class="col pl-0">\n <p class="mb-0">{{ message }}</p>\n </div>\n </div>\n </div>\n\n <div class="card-footer">\n <div class="d-flex float-right">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button type="button" class="btn btn-primary" (click)="ok(); (false)">\n {{ \'designer.misc.ok\' | translate }}\n </button>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef])],e)}(),Te=function(){function e(e,t){this.modalService=e,this.translateService=t}return e.prototype.show=function(e){var t=this;return this.translateService.get(e).pipe(o.map((function(e){return e})),o.mergeMap((function(e){var i=t.modalService.show(Fe,{keyboard:!1,ignoreBackdropClick:!0});return i.content.message=e,i.content.onClose.pipe(o.map((function(e){return 1===e})))})))},e.ctorParameters=function(){return[{type:n.BsModalService},{type:i.TranslateService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.BsModalService),t.ɵɵinject(i.TranslateService))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[n.BsModalService,i.TranslateService])],e)}(),Oe=function(){function e(e,t,i,n,r,o){this.bsModalRef=e,this.projectService=t,this.projectLoadService=i,this.userService=n,this.warningDialogService=r,this.configService=o,this.projects=[],this.loading=!0,this.loadProjects()}return e.prototype.loadProjects=function(){var e=this;this.projectService.getAllProjects().subscribe((function(t){e.projects=t,e.loading=!1}))},e.prototype.ngOnInit=function(){},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.openProject=function(e){var t=this;this.bsModalRef.hide(),this.projectLoadService.load(e.id,e.name).subscribe((function(){t.userService.setAutoLoadProject(e)}))},e.prototype.deleteProject=function(e){var t=this;this.warningDialogService.show("designer.project.delete-warning").pipe(o.map((function(i){i&&t.projectService.deleteProject(e).subscribe((function(e){t.loadProjects()}))}))).subscribe()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:he},{type:Re},{type:de},{type:Te},{type:me}]},e=T([t.Component({selector:"lib-project-browser",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.project.browser-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="cancel(); (false)">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body p-0">\n <div *ngIf="loading" class="m-2 d-flex w-100">\n <p class="w-100" style="text-align: center"><i class="fa fa-spinner fa-pulse fa-fw"></i></p>\n </div>\n <div *ngIf="projects.length == 0 && !loading" class="m-2 d-flex w-100">\n <p class="w-100" style="text-align: center">\n {{ \'designer.project.browser-empty\' | translate }}\n </p>\n </div>\n <div *ngIf="!loading" class="list-group list-group-flush" style="max-height: 500px; overflow-y: scroll">\n <div class="list-group-item" *ngFor="let project of projects | sort: \'name\'">\n <div class="row">\n <div class="col-auto my-auto flex-grow">\n <a href="#" (click)="openProject(project); (false)">\n <p class="mb-0 w-100">{{ project.name }}</p>\n </a>\n </div>\n <div class="my-auto">\n <div class="col-auto my-auto pl-0 text-danger float-right" style="cursor: pointer" (click)="deleteProject(project); (false)">\n <i class="fa fa-trash-o" aria-hidden="true"></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button (click)="cancel(); (false)" type="button" class="btn btn-primary">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,he,Re,de,Te,me])],e)}(),Le=function(){function e(e,t,i,n){this.bsModalRef=e,this.translateService=t,this.toastrService=i,this.projectLoadService=n}return e.prototype.ngOnInit=function(){var e=this;this.dropzoneConfig={url:"dummy",addRemoveLinks:!1,maxFilesize:10,acceptedFiles:".rsd",timeout:0,accept:function(t,i){var n=new FileReader;n.addEventListener("loadend",(function(t){e.projectLoadService.import(t.target.result),i("noerr"),e.bsModalRef.hide()})),n.readAsText(t)},previewTemplate:'\n <div style="display: none;">\n \x3c!-- No preview --\x3e\n </div>\n '},this.translateService.get("designer.misc.dropzone-message").pipe(o.map((function(t){e.uploadMessage='<h3 class="mb-0"><i class="fa fa-cloud-upload"></i></h3>'+t}))).subscribe()},e.prototype.onUploadError=function(e){var t=this;if("noerr"!==e[1]){var i="designer.misc.toast-upload-error",n="designer.misc.toast-upload-error-title";this.translateService.get([i,n]).subscribe((function(r){t.toastrService.error(r[i]+e[1],r[n],{timeOut:0,extendedTimeOut:0,enableHtml:!0})}))}},e.prototype.ok=function(){this.bsModalRef.hide()},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:i.TranslateService},{type:r.ToastrService},{type:Re}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-project-import",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.project.import-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n \x3c!-- Dropzone --\x3e\n <dropzone [config]="dropzoneConfig" [useDropzoneClass]="\'false\'" [message]="uploadMessage" (error)="onUploadError($event)"></dropzone>\n</div>\n<div class="modal-footer">\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,i.TranslateService,r.ToastrService,Re])],e)}(),Ve=function(){function e(e,t,i,n){this.bsModalRef=e,this.projectService=t,this.warningDialogService=i,this.configService=n,this.projects=[],this.loading=!0,this.loadProjects(),this.projectService.project.name?this.projectName=this.projectService.project.name:this.projectName="New Project"}return e.prototype.ngOnInit=function(){},e.prototype.loadProjects=function(){var e=this;this.projectService.getAllProjects().subscribe((function(t){e.projects=t,e.loading=!1}))},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.selectProject=function(e){this.projectService.project.name=e.name},e.prototype.existingProject=function(e,t){var i,n;try{for(var r=L(this.projects),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.name===t&&s.uuid!==e)return!0}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return!1},e.prototype.doSave=function(){this.projectService.project.name=this.projectName,this.projectService.save(this.projectService.project),this.bsModalRef.hide()},e.prototype.saveProject=function(){var e=this;this.existingProject(this.projectService.project.uuid,this.projectName)&&this.configService.uniqueProjectNames?this.warningDialogService.show("designer.project.overwrite-warning").pipe(o.map((function(t){t&&e.doSave()}))).subscribe():this.doSave()},e.prototype.deleteProject=function(e){var t=this;this.warningDialogService.show("designer.project.delete-warning").pipe(o.map((function(i){i&&t.projectService.deleteProject(e).subscribe((function(e){t.loadProjects()}))}))).subscribe()},e.prototype.handleKeyboardEvent=function(e){this.saveProject()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:he},{type:Te},{type:me}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-project-save",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.project.save-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="cancel(); (false)">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body p-0">\n \x3c!-- The name of the current project --\x3e\n <div class="form-group row p-3 mb-0">\n <label class="col-lg-4 col-form-label">{{ \'designer.project.name\' | translate }}</label>\n <div class="col-lg-8">\n <input type="text" class="form-control" [ngModel]="projectName" (ngModelChange)="projectName = $event" />\n </div>\n </div>\n\n \x3c!-- List existing projects --\x3e\n <div *ngIf="loading" class="m-2 d-flex w-100">\n <p class="w-100" style="text-align: center"><i class="fa fa-spinner fa-pulse fa-fw"></i></p>\n </div>\n <div *ngIf="!loading" class="list-group list-group-flush" style="max-height: 500px; overflow-y: scroll">\n <div class="list-group-item" *ngFor="let project of projects | sort: \'name\'">\n <div class="row">\n <div class="col-auto my-auto flex-grow">\n <a href="#" (click)="selectProject(project); (false)">\n <p class="mb-0 w-100">{{ project.name }}</p>\n </a>\n </div>\n <div class="my-auto">\n <div class="col-auto my-auto pl-0 text-danger float-right" style="cursor: pointer" (click)="deleteProject(project); (false)">\n <i class="fa fa-trash-o" aria-hidden="true"></i>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button [disabled]="loading || !projectName" (click)="saveProject(); (false)" type="button" class="btn btn-primary">\n {{ \'designer.misc.ok\' | translate }}\n </button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,he,Te,me])],e)}(),Be=function(){function e(e,t){this.bsModalRef=e,this.projectService=t}return e.prototype.ngOnInit=function(){this.shareLink=window.location.host+"/designer?id="+this.projectService.project.id+"&token="+this.projectService.project.shareToken},e.prototype.ok=function(){this.bsModalRef.hide()},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:he}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-project-share",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.project.share-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.project.share-link\' | translate }}</label>\n <div class="col-lg-8 d-flex">\n <input type="text" class="form-control" [ngModel]="shareLink" readonly />\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,he])],e)}(),Ne=function(){function e(e){this.bsModalRef=e}return e.prototype.ngOnInit=function(){this.onClose=new p.Subject},e.prototype.ok=function(){this.onClose.next(1),this.bsModalRef.hide()},e.prototype.cancel=function(){this.onClose.next(2),this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-error-dialog",template:'<div class="card-modal">\n <div class="card">\n <div class="card-header">\n {{ \'designer.misc.error\' | translate }}\n </div>\n\n <div class="card-body">\n <div class="row">\n <div class="col-auto">\n <h2 class="mb-0">\n <i class="fa fa-exclamation-circle text-danger" aria-hidden="true"></i>\n </h2>\n </div>\n <div class="col pl-0">\n <p class="mb-0">{{ message }}</p>\n <p *ngIf="details" class="mt-1 mb-0">({{ details }})</p>\n </div>\n </div>\n </div>\n\n <div class="card-footer">\n <div class="d-flex float-right">\n <button type="button" class="btn btn-primary" (click)="ok(); (false)">\n {{ \'designer.misc.ok\' | translate }}\n </button>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef])],e)}(),Ue=function(){function e(e,t){this.modalService=e,this.translateService=t}return e.prototype.show=function(e,t){var i=this;return this.translateService.get(e).pipe(o.map((function(e){return e})),o.mergeMap((function(e){var n=i.modalService.show(Ne,{keyboard:!0,ignoreBackdropClick:!1});return n.content.message=e,n.content.details=t,n.content.onClose.pipe(o.map((function(e){return 1===e})))})))},e.ctorParameters=function(){return[{type:n.BsModalService},{type:i.TranslateService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.BsModalService),t.ɵɵinject(i.TranslateService))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[n.BsModalService,i.TranslateService])],e)}(),De=function(){function e(e,t,i,n,r){this.bsModalRef=e,this.translateService=t,this.toastrService=i,this.fixtureService=n,this.projectService=r,this.onClose=new p.Subject}return e.prototype.ngOnInit=function(){var e=this;this.dropzoneConfig={url:"dummy",addRemoveLinks:!1,maxFilesize:10,acceptedFiles:".json",timeout:0,accept:function(t,i){var n=new FileReader;n.addEventListener("loadend",(function(t){var n=t.target.result,r=JSON.parse(n);if(r.$schema.match("https://raw.githubusercontent.com/OpenLightingProject/open-fixture-library/schema-(.*)/schemas/fixture.json")){var o=r.manufacturerKey,s=o,a=o+"/"+r.fixtureKey,l=new Z(r);l.manufacturerShortName=o,l.manufacturerName=s,l.uuid=a,l.createdFromFile=!0,e.fixtureService.getProfileByUuid(a)||e.projectService.project.fixtureProfiles.push(l),e.onClose.next(l),e.bsModalRef.hide()}else{var c="designer.fixture-pool.invalid-fixture-profile-file",d="designer.misc.toast-upload-error-title";e.translateService.get([c,d]).subscribe((function(t){e.toastrService.error(t[c],t[d],{timeOut:0,extendedTimeOut:0,enableHtml:!0})}))}i("noerr")})),n.readAsText(t)},previewTemplate:'\n <div style="display: none;">\n \x3c!-- No preview --\x3e\n </div>\n '},this.translateService.get("designer.misc.dropzone-message").pipe(o.map((function(t){e.uploadMessage='<h3 class="mb-0"><i class="fa fa-cloud-upload"></i></h3>'+t}))).subscribe()},e.prototype.onUploadError=function(e){var t=this;if("noerr"!==e[1]){var i="designer.misc.toast-upload-error",n="designer.misc.toast-upload-error-title";this.translateService.get([i,n]).subscribe((function(r){t.toastrService.error(r[i]+e[1],r[n],{timeOut:0,extendedTimeOut:0,enableHtml:!0})}))}},e.prototype.ok=function(){this.onClose.next(void 0),this.bsModalRef.hide()},e.prototype.cancel=function(){this.onClose.next(void 0),this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:i.TranslateService},{type:r.ToastrService},{type:ue},{type:he}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-fixture-pool-create-from-file",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.fixture-pool.create-fixture-from-profile-file-dialog-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n \x3c!-- Dropzone --\x3e\n <dropzone [config]="dropzoneConfig" [useDropzoneClass]="\'false\'" [message]="uploadMessage" (error)="onUploadError($event)"></dropzone>\n</div>\n<div class="modal-footer">\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,i.TranslateService,r.ToastrService,ue,he])],e)}(),Ee=function(){function e(e,t,i,n,r,o,s,a,l,c){this.bsModalRef=e,this.fixtureService=t,this.uuidService=i,this.projectService=n,this.previewService=r,this.translateService=o,this.toastrService=s,this.presetService=a,this.configService=l,this.modalService=c,this.loadingProfiles=!1,this.dmxChannels=[],this.showChannelNumbers=!1,this.onClose=new p.Subject,this.fixturePool=B(this.projectService.project.fixtures),this.fixturePool.length>0&&this.selectFixture(this.fixturePool[0])}return e.prototype.ngOnInit=function(){for(var e=0;e<512;e++)this.dmxChannels.push(0);this.loadProfiles()},e.prototype.loadProfiles=function(){var e=this;this.loadingProfiles=!0,this.fixtureService.getSearchProfiles().subscribe((function(t){e.profiles=t,e.filterProfiles(),e.loadingProfiles=!1}))},e.prototype.selectFixture=function(e){this.selectedFixtureProfile=void 0,e&&(this.selectedFixtureProfile=this.fixtureService.getProfileByUuid(e.profileUuid)),this.selectedFixture=e},e.prototype.filterProfiles=function(){var e,t,i,n;if(this.searchExpression&&this.profiles){this.filteredProfiles=[];var r=this.searchExpression.split(" ");try{for(var o=L(this.profiles),s=o.next();!s.done;s=o.next()){var a=s.value,l=0;try{for(var c=(i=void 0,L(r)),d=c.next();!d.done;d=c.next()){var p=d.value;-1===a.uuid.toLowerCase().indexOf(p.toLowerCase())&&-1===a.name.toLowerCase().indexOf(p.toLowerCase())&&-1===a.manufacturerName.toLowerCase().indexOf(p.toLowerCase())||l++}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}l===r.length&&this.filteredProfiles.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}else this.filteredProfiles=this.profiles},e.prototype.addFixture=function(e){var t=this;this.fixtureService.loadProfileByUuid(e.uuid).subscribe((function(){var i=t.fixtureService.getProfileByUuid(e.uuid),n=t.fixtureService.addFixture(i,t.fixturePool);t.selectFixture(n)}))},e.prototype.addCopy=function(e){var t=new J;t.uuid=this.uuidService.getUuid(),t.profileUuid=e.profileUuid,t.name=e.name,t.modeShortName=e.modeShortName,t.dmxFirstChannel=e.dmxFirstChannel,t.dmxUniverseUuid=e.dmxUniverseUuid,this.fixturePool.push(t),this.selectFixture(t)},e.prototype.removeFixture=function(e){for(var t,i,n=0;n<this.fixturePool.length;n++)if(this.fixturePool[n].uuid===e.uuid){this.selectedFixture===this.fixturePool[n]&&this.selectFixture(void 0),this.fixturePool.splice(n,1);break}!this.selectedFixture&&this.fixturePool&&this.fixturePool.length>0&&this.selectFixture(this.selectedFixture=this.fixturePool[0]);for(n=0;n<this.projectService.project.fixtureProfiles.length;n++){var r=!1;try{for(var o=(t=void 0,L(this.fixturePool)),s=o.next();!s.done;s=o.next()){if(s.value.profileUuid===this.projectService.project.fixtureProfiles[n].uuid){r=!0;break}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}r||this.projectService.project.fixtureProfiles.splice(n,1)}},e.prototype.channelOccupied=function(e){var t,i;try{for(var n=L(this.fixturePool),r=n.next();!r.done;r=n.next()){var o=r.value,s=this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(o.profileUuid),o);if(e>=o.dmxFirstChannel&&e<o.dmxFirstChannel+s.channels.length)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.channelOccupiedStart=function(e){var t,i;try{for(var n=L(this.fixturePool),r=n.next();!r.done;r=n.next()){if(e===r.value.dmxFirstChannel)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.channelOccupiedEnd=function(e){var t,i;try{for(var n=L(this.fixturePool),r=n.next();!r.done;r=n.next()){var o=r.value,s=this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(o.profileUuid),o);if(e===o.dmxFirstChannel+s.channels.length-1)return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.channelOverlapped=function(e){var t,i,n;try{for(var r=L(this.fixturePool),o=r.next();!o.done;o=r.next()){var s=o.value,a=this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(s.profileUuid),s);if(e>=s.dmxFirstChannel&&e<s.dmxFirstChannel+a.channels.length)if(n){if(n.dmxFirstChannel!==s.dmxFirstChannel||n.modeShortName!==s.modeShortName)return!0}else n=s}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return!1},e.prototype.channelMouseDown=function(e){var t,i,n,r=e.target.dataset.index;try{for(var o=L(this.fixturePool),s=o.next();!s.done;s=o.next()){var a=s.value,l=this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(a.profileUuid),a);if(r>=a.dmxFirstChannel&&r<=a.dmxFirstChannel+l.channels.length-1){if(this.selectedFixture===a){n=a;break}n||(n=a)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}n&&(n!==this.selectedFixture&&this.selectFixture(n),this.channelDragFixture=n,this.channelDragOffset=r-n.dmxFirstChannel)},e.prototype.channelSelected=function(e){if(!this.selectedFixture)return!1;if(e>=this.selectedFixture.dmxFirstChannel){var t=this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(this.selectedFixture.profileUuid),this.selectedFixture);if(e<this.selectedFixture.dmxFirstChannel+t.channels.length)return!0}return!1},e.prototype.mouseUp=function(e){this.channelDragFixture=void 0,this.channelDragOffset=void 0},e.prototype.channelMouseOver=function(e){var t=e.target.dataset.index;this.channelDragFixture&&t-this.channelDragOffset>=0&&t-this.channelDragOffset+this.fixtureService.getModeByFixture(this.fixtureService.getProfileByUuid(this.channelDragFixture.profileUuid),this.channelDragFixture).channels.length-1<=511&&(this.channelDragFixture.dmxFirstChannel=t-this.channelDragOffset)},e.prototype.ok=function(){for(var e=this,t=function(t){if(i.channelOverlapped(t)){var n="designer.fixture-pool.channel-occupied",r="designer.fixture-pool.channel-occupied-title";return i.translateService.get([n,r]).subscribe((function(t){e.toastrService.error(t[n],t[r])})),{value:void 0}}},i=this,n=0;n<this.dmxChannels.length;n++){var r=t(n);if("object"==typeof r)return r.value}this.projectService.project.fixtures=this.fixturePool,this.fixtureService.updateCachedFixtures(),this.presetService.removeDeletedFixtures(),this.previewService.updateFixtureSetup(),this.presetService.updateFixtureSelection(),this.presetService.fixtureSelectionChanged.next(),this.presetService.previewLive(),this.onClose.next(1),this.bsModalRef.hide()},e.prototype.cancel=function(){this.onClose.next(2),this.bsModalRef.hide()},e.prototype.updateProfiles=function(){var e=this;this.updatingProfiles=!0,this.fixtureService.updateProfiles().pipe(o.finalize((function(){e.updatingProfiles=!1})),o.catchError((function(){var t="designer.fixture-pool.profiles-update-error",i="designer.fixture-pool.profiles-update-error-title";e.translateService.get([t,i]).subscribe((function(n){e.toastrService.error(n[t],n[i])}))}))).subscribe((function(){e.loadProfiles();var t="designer.fixture-pool.profiles-updated",i="designer.fixture-pool.profiles-updated-title";e.translateService.get([t,i]).subscribe((function(n){e.toastrService.success(n[t],n[i])}))}))},e.prototype.createFixtureFromProfileFile=function(){var e=this;this.modalService.show(De,{keyboard:!0,ignoreBackdropClick:!1}).content.onClose.subscribe((function(t){var i=e.fixtureService.addFixture(t,e.fixturePool);e.selectFixture(i)}))},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:ue},{type:pe},{type:he},{type:Ce},{type:i.TranslateService},{type:r.ToastrService},{type:be},{type:me},{type:n.BsModalService}]},T([t.HostListener("window:mouseup",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"mouseUp",null),T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-app-fixture-pool",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.fixture-pool.title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="cancel(); (false)">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="row">\n <div class="col-6">\n \x3c!-- Search for profiles --\x3e\n <input\n type="text"\n class="form-control input-block mb-3"\n id="searchSet"\n placeholder="{{ \'designer.fixture-pool.search-profiles\' | translate }}"\n (input)="searchExpression = $event.target.value; filterProfiles()"\n />\n\n \x3c!-- Profiles --\x3e\n <div class="card border-secondary w-100" style="height: 200px">\n <div class="card-body p-0 w-100">\n <div class="list-group list-group-flush w-100">\n <a *ngIf="loadingProfiles" class="list-group-item flex-column align-items-start d-flex">\n <p class="mb-0 mx-auto">\n <i class="fa fa-spinner fa-pulse fa-fw"></i>\n </p>\n </a>\n\n <div class="list-group-item" *ngFor="let profile of filteredProfiles | sort: \'uuid\'">\n <div class="row">\n <div class="col-10 col-auto my-auto pl-2">\n <p class="mb-0">\n <span class="icon-{{ fixtureService.getFixtureIconClass(profile) }} mr-1"></span> {{ profile.manufacturerName }} -\n {{ profile.name }}\n </p>\n </div>\n <div class="col-2 my-auto">\n <a class="btn btn-primary btn-sm float-right" href="#" role="button" (click)="addFixture(profile); (false)">\n <i class="fa fa-plus" aria-hidden="true"></i>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div>\n <p class="d-inline-block mb-0 mt-2">\n Powered by the <a href="https://open-fixture-library.org/" target="_blank">Open Fixture Library</a>\n </p>\n <a\n class="mt-2 btn btn-secondary btn-sm float-right"\n href="https://open-fixture-library.org/fixture-editor"\n target="_blank"\n role="button"\n >\n <i class="fa fa-file-o" aria-hidden="true"></i> {{ \'designer.fixture-pool.add-profile\' | translate }}\n </a>\n <button\n *ngIf="configService.localProfiles"\n type="button"\n class="mr-2 mt-2 btn btn-secondary btn-sm float-right"\n (click)="updateProfiles(); (false)"\n [disabled]="updatingProfiles"\n role="button"\n >\n <i *ngIf="updatingProfiles" class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></i>\n <i *ngIf="!updatingProfiles" class="fa fa-download fa-fw" aria-hidden="true"></i>\n {{ \'designer.fixture-pool.update-profiles\' | translate }}\n </button>\n </div>\n </div>\n <div class="col-6">\n <div class="row">\n \x3c!-- Add fixture from local profile --\x3e\n <div class="col-6">\n <button type="button" class="btn btn-secondary" (click)="createFixtureFromProfileFile()" role="button">\n <i class="fa fa-plus" aria-hidden="true"></i> {{ \'designer.fixture-pool.create-fixture-from-profile-file\' | translate }}\n </button>\n </div>\n\n \x3c!-- Universe --\x3e\n <div class="col-6">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.fixture-pool.universe\' | translate }}</label>\n <div class="col-lg-8">\n <select class="custom-select">\n <option>Universe 1</option>\n </select>\n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Fixtures --\x3e\n <div class="card border-secondary" style="height: 235px">\n <div class="card-body p-0">\n <div class="list-group list-group-flush" [sortablejs]="fixturePool">\n <div\n class="list-group-item"\n *ngFor="let fixture of fixturePool"\n [class.active]="fixture == selectedFixture"\n (click)="selectFixture(fixture)"\n style="cursor: pointer"\n >\n <div class="row">\n <div class="col-auto list-sort-handle my-auto" style="cursor: move; cursor: -webkit-grabbing">\n <i class="fa fa-bars" aria-hidden="true"></i>\n </div>\n <div class="col-auto flex-grow pl-0 my-auto">\n <p class="mb-0">\n <span class="icon-{{ fixtureService.getFixtureIconClass(fixtureService.getProfileByUuid(fixture.profileUuid)) }} mr-1">\n </span\n >{{ fixture.name }}\n </p>\n </div>\n <div class="col-auto my-auto">\n <a class="btn btn-primary btn-sm float-right" href="#" role="button" (click)="removeFixture(fixture); (false)">\n <i class="fa fa-minus" aria-hidden="true"></i>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="row mt-3">\n <div class="col">\n \x3c!-- Tab navigation --\x3e\n <ul class="nav nav-tabs mb-4" id="myTab" role="tablist">\n <li class="nav-item">\n <a class="nav-link active" id="sets-tab" data-toggle="tab" href="#dmx" role="tab">\n <i class="icon-ola" aria-hidden="true"></i> {{ \'designer.fixture-pool.dmx\' | translate }}\n </a>\n </li>\n <li class="nav-item">\n <a class="nav-link" id="compositions-tab" data-toggle="tab" href="#settings" role="tab">\n <i class="fa fa-cog" aria-hidden="true"></i> {{ \'designer.fixture-pool.settings\' | translate }}\n </a>\n </li>\n </ul>\n\n \x3c!-- Tab content --\x3e\n <div class="tab-content" id="myTabContent">\n \x3c!-- DMX universe overview--\x3e\n <div class="tab-pane show active" id="dmx" role="tabpanel">\n \x3c!-- Show all channel numbers --\x3e\n \x3c!-- <div class="form-group row">\n <div class="col-auto flex-grow"></div>\n <div class="col-lg-3 d-flex">\n <div class="form-check my-auto ml-auto">\n <input type="checkbox" class="form-check-input" id="showChannelNumbers" [ngModel]="showChannelNumbers"\n (ngModelChange)="showChannelNumbers = $event">\n <label class="form-check-label" for="showChannelNumbers">Show channels</label>\n </div>\n </div>\n </div> --\x3e\n\n \x3c!-- List of DMX channels --\x3e\n <div>\n <div\n *ngFor="let channel of dmxChannels; let i = index"\n class="dmx-channel"\n [class.dmx-channel-occupied]="channelOccupied(i)"\n [class.dmx-channel-occupied-start]="channelOccupiedStart(i)"\n [class.dmx-channel-occupied-end]="channelOccupiedEnd(i)"\n [class.dmx-channel-selected]="channelSelected(i)"\n [class.dmx-channel-overlapped]="channelOverlapped(i)"\n (mousedown)="channelMouseDown($event)"\n (mouseover)="channelMouseOver($event)"\n [attr.data-index]="i"\n popover="{{ i + 1 }}"\n placement="top"\n triggers="mouseenter:mouseleave"\n >\n <div class="d-flex w-100 dmx-channel-text" [attr.data-index]="i" [class.dmx-channel-text-visible]="showChannelNumbers">\n <div class="m-auto" style="font-size: 11px" [attr.data-index]="i"><small [attr.data-index]="i">&nbsp;</small></div>\n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Fixture settings --\x3e\n <div class="tab-pane" id="settings" role="tabpanel">\n <div *ngIf="selectedFixture && selectedFixtureProfile">\n <div class="form-group row">\n <label class="col-lg-3 col-form-label" for="fixtureName">{{ \'designer.fixture-pool.fixture-name\' | translate }}</label>\n <div class="col-lg-9">\n <input type="text" class="form-control" [(ngModel)]="selectedFixture.name" maxlength="200" id="fixtureName" />\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-3 col-form-label">{{ \'designer.fixture-pool.mode\' | translate }}</label>\n <div class="col-lg-9">\n <select\n class="custom-select"\n [ngModel]="selectedFixture.modeShortName"\n (ngModelChange)="selectedFixture.modeShortName = $event"\n >\n <option *ngFor="let mode of selectedFixtureProfile.modes" [ngValue]="mode.shortName || mode.name">\n {{ mode.name }}\n - {{ mode.channels.length }}\n {{ \'designer.fixture-pool.channels\' | translate }}\n </option>\n </select>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-3 col-form-label">{{ \'designer.fixture-pool.first-channel\' | translate }}</label>\n <div class="col-lg-9">\n <select\n class="custom-select"\n [ngModel]="selectedFixture.dmxFirstChannel"\n (ngModelChange)="selectedFixture.dmxFirstChannel = $event"\n >\n <option *ngFor="let channel of dmxChannels; let i = index" [ngValue]="i">\n {{ i + 1 }}\n </option>\n </select>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-3 col-form-label"></label>\n <div class="col-lg-9">\n <button type="button" class="btn btn-primary" (click)="addCopy(selectedFixture)">\n {{ \'designer.fixture.add-copy\' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[".list-group-item{padding:.3rem 1.25rem}.dmx-channel{display:flex;float:left;width:28px;border:1px solid #fff;margin-left:-1px;margin-bottom:-1px;padding-bottom:2px}.dmx-channel-occupied{background-color:#63462e;border-left:none;border-right:none;cursor:move}.dmx-channel-occupied-start{border-left:1px solid #fff;border-top-left-radius:8px;border-bottom-left-radius:8px}.dmx-channel-occupied-end{border-right:1px solid #fff;border-top-right-radius:8px;border-bottom-right-radius:8px}.dmx-channel-selected{background-color:#fd7e14}.dmx-channel-overlapped{background-color:red;border:1px solid red;cursor:move}.card{overflow:auto}"]}),O("design:paramtypes",[n.BsModalRef,ue,pe,he,Ce,i.TranslateService,r.ToastrService,be,me,n.BsModalService])],e)}(),He=function(){function e(e){this.modalService=e,this.fixturePoolOpened=!1}return e.prototype.open=function(){var e=this;this.fixturePoolOpened||(this.fixturePoolOpened=!0,this.modalService.show(Ee,{keyboard:!1,ignoreBackdropClick:!0,class:"modal-full"}).content.onClose.subscribe((function(t){e.fixturePoolOpened=!1})))},e.ctorParameters=function(){return[{type:n.BsModalService}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(n.BsModalService))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[n.BsModalService])],e)}(),We=function(){function e(){}return e.prototype.exclude=function(e){return!!e.target&&"INPUT"===e.target.nodeName},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[])],e)}(),Ae=function(){function e(e){this.configService=e,this.showIntro=!1,this.activeStep="start",this.positionTopPercentage=50,this.positionLeftPercentage=50,this.stylePosition="top: calc(50% - 150px); left: calc(50% - 200px);",this.stepChanged=new p.Subject}return e.prototype.refresh=function(){this.configService.intro&&(localStorage.getItem("showIntro")?this.showIntro="true"===localStorage.getItem("showIntro"):this.showIntro=!0)},e.prototype.setShowIntro=function(e){this.showIntro=e,e?localStorage.setItem("showIntro","true"):localStorage.setItem("showIntro","false"),this.stepChanged.next()},e.prototype.reset=function(){this.activeStep="start",this.setShowIntro(!0),this.stepChanged.next()},e.prototype.showStep=function(e){return!!this.showIntro&&this.activeStep===e},e.prototype.next=function(){switch(this.activeStep){case"start":this.activeStep="preview",this.positionTopPercentage=60,this.positionLeftPercentage=40;break;case"preview":this.activeStep="fixtures",this.positionTopPercentage=40,this.positionLeftPercentage=30;break;case"fixtures":this.activeStep="presets",this.positionTopPercentage=30,this.positionLeftPercentage=50;break;case"presets":this.activeStep="capabilities",this.positionTopPercentage=50,this.positionLeftPercentage=60;break;case"capabilities":this.activeStep="scenes",this.positionTopPercentage=50,this.positionLeftPercentage=40;break;case"scenes":this.activeStep="timeline",this.positionTopPercentage=40,this.positionLeftPercentage=50;break;case"timeline":this.activeStep="finish",this.positionTopPercentage=50,this.positionLeftPercentage=50}this.stepChanged.next()},e.prototype.back=function(){switch(this.activeStep){case"preview":this.activeStep="start",this.positionTopPercentage=50,this.positionLeftPercentage=50;break;case"fixtures":this.activeStep="preview",this.positionTopPercentage=60,this.positionLeftPercentage=40;break;case"presets":this.activeStep="fixtures",this.positionTopPercentage=30,this.positionLeftPercentage=50;break;case"capabilities":this.activeStep="presets",this.positionTopPercentage=40,this.positionLeftPercentage=30;break;case"scenes":this.activeStep="capabilities",this.positionTopPercentage=50,this.positionLeftPercentage=60;break;case"timeline":this.activeStep="scenes",this.positionTopPercentage=50,this.positionLeftPercentage=40;break;case"finish":this.activeStep="timeline",this.positionTopPercentage=40,this.positionLeftPercentage=50}this.stepChanged.next()},e.ctorParameters=function(){return[{type:me}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(me))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[me])],e)}(),ze=function(){function e(e,t){this.bsModalRef=e,this.userService=t,this.error="",this.loggingIn=!1,this.email="",this.password=""}return e.prototype.ngOnInit=function(){},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.login=function(){var e=this;if(this.loggingIn=!0,this.error="",!this.email||!this.password)return this.error="fill-all-fields",void(this.loggingIn=!1);this.userService.login(this.email,this.password).subscribe((function(){e.bsModalRef.hide(),e.subject&&e.subject.next()}),(function(t){t.error&&t.error.error?e.error=t.error.error:e.error="internal",e.loggingIn=!1}))},e.prototype.handleKeyboardEvent=function(e){this.login()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:de}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-user-login",template:'<form (ngSubmit)="login()">\n <div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.user.login-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="cancel(); (false)">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">\n <div class="form-group row">\n <label for="email" class="col-sm-4 col-form-label">{{ \'designer.user.email\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-envelope-o" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="loggingIn"\n name="email"\n [(ngModel)]="email"\n type="email"\n class="form-control"\n id="email"\n placeholder="email@example.com"\n />\n </div>\n </div>\n </div>\n <div class="form-group row">\n <label for="password" class="col-sm-4 col-form-label">{{ \'designer.user.password\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-lock" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="loggingIn"\n name="password"\n [(ngModel)]="password"\n type="password"\n class="form-control"\n id="password"\n placeholder="{{ \'designer.user.password\' | translate }}"\n />\n </div>\n </div>\n </div>\n <div *ngIf="error" class="alert alert-primary" role="alert">\n {{ \'designer.user.error.\' + error | translate }}\n </div>\n </div>\n <div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button [disabled]="loggingIn" type="submit" class="btn btn-primary">\n <i *ngIf="loggingIn" class="fa fa-spinner fa-pulse fa-fw"></i> {{ \'designer.user.login\' | translate }}\n </button>\n </div>\n</form>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,de])],e)}(),Ge=function(){function e(e,t,i){this.bsModalRef=e,this.modalService=t,this.userService=i,this.error="",this.registering=!1,this.username="",this.email="",this.password="",this.passwordRepeat=""}return e.prototype.ngOnInit=function(){},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.login=function(){this.bsModalRef.hide(),this.modalService.show(ze,{keyboard:!0,ignoreBackdropClick:!1,initialState:{subject:this.subject}})},e.prototype.emailIsValid=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},e.prototype.register=function(){var e=this;return this.registering=!0,this.error="",this.username&&this.email&&this.password&&this.passwordRepeat?this.emailIsValid(this.email)?this.password!==this.passwordRepeat?(this.error="password-mismatch",void(this.registering=!1)):void this.userService.register(this.email,this.username,this.password).subscribe((function(){e.userService.login(e.email,e.password).subscribe((function(){e.registering=!1,e.bsModalRef.hide()}))}),(function(t){t.error&&t.error.error?e.error=t.error.error:e.error="internal",e.registering=!1})):(this.error="email-valid",void(this.registering=!1)):(this.error="fill-all-fields",void(this.registering=!1))},e.prototype.handleKeyboardEvent=function(e){this.register()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:n.BsModalService},{type:de}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-user-register",template:'<form (ngSubmit)="register()">\n <div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.user.register-title\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="cancel(); (false)">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">\n <div *ngIf="subject" class="alert alert-success" role="alert">\n {{ \'designer.user.login-required\' | translate }}\n </div>\n <div class="form-group row">\n <label for="username" class="col-sm-4 col-form-label">{{ \'designer.user.username\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-user" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="registering"\n name="username"\n [(ngModel)]="username"\n type="text"\n class="form-control"\n id="username"\n placeholder="The Cool Guy"\n />\n </div>\n </div>\n </div>\n <div class="form-group row">\n <label for="email" class="col-sm-4 col-form-label">{{ \'designer.user.email\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-envelope-o" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="registering"\n name="email"\n [(ngModel)]="email"\n type="email"\n class="form-control"\n id="email"\n placeholder="email@example.com"\n />\n </div>\n </div>\n </div>\n <div class="form-group row">\n <label for="password" class="col-sm-4 col-form-label">{{ \'designer.user.password\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-lock" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="registering"\n name="password"\n [(ngModel)]="password"\n type="password"\n class="form-control"\n id="password"\n placeholder="{{ \'designer.user.password\' | translate }}"\n />\n </div>\n </div>\n </div>\n <div class="form-group row">\n <label for="passwordRepeat" class="col-sm-4 col-form-label">{{ \'designer.user.password-repeat\' | translate }}</label>\n <div class="col-sm-8">\n <div class="input-group">\n <div class="input-group-prepend">\n <div class="input-group-text"><i class="fa fa-fw fa-lock" aria-hidden="true"></i></div>\n </div>\n <input\n required\n [disabled]="registering"\n name="passwordRepeat"\n [(ngModel)]="passwordRepeat"\n type="password"\n class="form-control"\n id="passwordRepeat"\n placeholder="{{ \'designer.user.password\' | translate }}"\n />\n </div>\n </div>\n </div>\n <div *ngIf="error" class="alert alert-primary" role="alert">\n {{ \'designer.user.error.\' + error | translate }}\n </div>\n <a href="#" (click)="login(); (false)">\n <p class="mt-3 mb-0" style="text-align: center">{{ \'designer.user.already-have-account\' | translate }}</p>\n </a>\n </div>\n <div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button [disabled]="registering" type="submit" class="btn btn-primary">\n <i *ngIf="registering" class="fa fa-spinner fa-pulse fa-fw"> </i>{{ \'designer.user.register\' | translate }}\n </button>\n </div>\n</form>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,n.BsModalService,de])],e)}(),$e=function(){function e(e,t,i){this.userService=e,this.modalService=t,this.configService=i}return e.prototype.login=function(){if(this.userService.isLoggedIn())return p.of(null);if(!this.configService.loginAvailable)return p.of(null);var e=new p.Subject;return this.modalService.show(Ge,{keyboard:!0,ignoreBackdropClick:!1,initialState:{subject:e}}),e},e.ctorParameters=function(){return[{type:de},{type:n.BsModalService},{type:me}]},e.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(de),t.ɵɵinject(n.BsModalService),t.ɵɵinject(me))},token:e,providedIn:"root"}),e=T([t.Injectable({providedIn:"root"}),O("design:paramtypes",[de,n.BsModalService,me])],e)}(),_e=function(){function e(e,t,i,n,r,o,s,a){this.bsModalRef=e,this.timelineService=t,this.configService=i,this.translateService=n,this.http=r,this.warningDialogService=o,this.toastrService=s,this.projectService=a,this.existingCompositionNames=[],this.onClose=new p.Subject,this.existingFiles=[],this.filteredExistingFiles=[],this.uploading=!1}return e.prototype.ngOnInit=function(){var e=this,t=this.projectService.project.id?this.projectService.project.id:"";this.dropzoneConfig={url:this.configService.restUrl+"file/upload?compositionUuid="+this.composition.uuid+"&projectId="+t,addRemoveLinks:!1,maxFilesize:100,acceptedFiles:"audio/*",timeout:0,parallelUploads:1,previewTemplate:'\n <div class="dz-preview dz-file-preview">\n \x3c!-- The attachment details --\x3e\n <div class="dz-details" style="text-align: left">\n <i class="fa fa-file-o"></i> <span data-dz-name></span> <small>\n <span class="label label-default file-size" data-dz-size></span></small>\n </div>\n\n \x3c!--div class="mt-5">\n <span data-dz-errormessage></span>\n </div--\x3e\n\n <div class="progress mt-4 mb-1" style="height: 10px">\n <div class="progress-bar progress-bar-striped progress-bar-animated"\n role="progressbar" style="width:0%;" data-dz-uploadprogress>\n </div>\n </div>\n </div>\n '},this.translateService.get("designer.misc.dropzone-message").pipe(o.map((function(t){e.uploadMessage='<h3 class="mb-0"><i class="fa fa-cloud-upload"></i></h3>'+t}))).subscribe(),this.loadFiles(),this.timelineService.externalCompositionsAvailable&&this.timelineService.getExternalCompositionNames().subscribe((function(t){e.existingCompositionNames=t}))},e.prototype.ok=function(){this.onClose.next(1),this.bsModalRef.hide()},e.prototype.cancel=function(){this.onClose.next(2),this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.prototype.getNameFromFile=function(e){return e.name},e.prototype.loadFiles=function(){var e=this;this.configService.enableMediaLibrary&&this.http.get("file/list").pipe(o.map((function(t){var i,n;e.existingFiles=[];try{for(var r=L(t),o=r.next();!o.done;o=r.next()){var s=o.value;s.audioFile&&e.existingFiles.push(e.getNameFromFile(s.audioFile))}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}e.filterExistingFiles()}))).subscribe()},e.prototype.onUploadError=function(e){var t=this,i="designer.misc.toast-upload-error",n="designer.misc.toast-upload-error-title";this.translateService.get([i,n]).subscribe((function(r){t.toastrService.error(r[i]+e[1],r[n],{timeOut:0,extendedTimeOut:0,enableHtml:!0}),e[0].previewElement.hidden=!0}))},e.prototype.onUploadSuccess=function(e){this.loadFiles(),this.composition.tempoGuessed=!1,e[0].previewElement.hidden=!0,this.composition.audioFileName=e[0].name,this.configService.enableMediaLibrary&&(this.composition.audioFileInLibrary=!0)},e.prototype.onQueueComplete=function(e){this.uploading=!1},e.prototype.onAddedFile=function(e){this.uploading=!0},e.prototype.filterExistingFiles=function(e){var t,i;if(e){this.filteredExistingFiles=[];try{for(var n=L(this.existingFiles),r=n.next();!r.done;r=n.next()){var o=r.value;-1!==o.toLowerCase().indexOf(e.toLowerCase())&&this.filteredExistingFiles.push(o)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}}else this.filteredExistingFiles=this.existingFiles},e.prototype.selectExistingFile=function(e){this.composition.audioFileName=e,this.composition.audioFileInLibrary=!0},e.prototype.deleteFile=function(e){var t=this;this.warningDialogService.show("designer.timeline.warning-delete-file").pipe(o.map((function(i){i&&t.http.post("file/delete?name="+e+"&type=AUDIO",void 0).pipe(o.map((function(e){t.loadFiles()}))).subscribe()}))).subscribe()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:Se},{type:me},{type:i.TranslateService},{type:d.HttpClient},{type:Te},{type:r.ToastrService},{type:he}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-app-composition-settings",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ composition.name }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.composition-name\' | translate }}</label>\n <div class="col-lg-8 d-flex">\n <input\n type="text"\n class="form-control"\n [ngModel]="composition.name"\n (ngModelChange)="composition.name = $event"\n [typeahead]="existingCompositionNames"\n />\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.composition-sync-type\' | translate }}</label>\n <div class="col-lg-8 d-flex">\n <select class="custom-select" [ngModel]="composition.syncType" (ngModelChange)="composition.syncType = $event">\n \x3c!-- TODO --\x3e\n \x3c!-- <option value="none">{{ \'designer.timeline.composition-sync-type-none\' | translate }}</option> --\x3e\n <option value="audio">{{ \'designer.timeline.composition-sync-type-audio\' | translate }}</option>\n </select>\n </div>\n </div>\n\n <div *ngIf="composition.syncType == \'audio\'" class="row">\n <div class="px-3 w-100">\n \x3c!-- Selected file --\x3e\n <div class="card border-secondary mb-3">\n <div class="card-body">\n \x3c!-- No file selected --\x3e\n <div *ngIf="!composition.audioFileName">\n {{ \'designer.timeline.composition-no-file-selected\' | translate }}\n </div>\n\n \x3c!-- A file is selected --\x3e\n <div *ngIf="composition.audioFileName">\n {{ composition.audioFileName }}\n </div>\n </div>\n </div>\n\n \x3c!-- Choose file --\x3e\n <ul *ngIf="configService.enableMediaLibrary" class="nav nav-tabs mb-3" id="myTab" role="tablist">\n <li class="nav-item">\n <a class="nav-link active" id="upload-tab" data-toggle="tab" href="#upload" role="tab">\n <i class="fa fa-upload" aria-hidden="true"></i>\n {{ \'designer.timeline.composition-file-upload\' | translate }}\n </a>\n </li>\n <li class="nav-item">\n <a class="nav-link" id="media-library-tab" data-toggle="tab" href="#media-library" role="tab">\n <i class="fa fa-folder-o" aria-hidden="true"></i>\n {{ \'designer.timeline.composition-file-library\' | translate }}\n </a>\n </li>\n </ul>\n\n <div class="tab-content" id="myTabContent">\n \x3c!-- Upload --\x3e\n <div class="tab-pane fade show active" id="upload" role="tabpanel">\n \x3c!-- Dropzone --\x3e\n <dropzone\n [config]="dropzoneConfig"\n [useDropzoneClass]="\'false\'"\n [message]="uploadMessage"\n (error)="onUploadError($event)"\n (success)="onUploadSuccess($event)"\n (queuecomplete)="onQueueComplete($event)"\n (addedfile)="onAddedFile($event)"\n ></dropzone>\n </div>\n\n \x3c!-- Media library --\x3e\n <div class="tab-pane fade" id="media-library" role="tabpanel">\n <input\n type="text"\n class="form-control input-block mb-3"\n id="searchFileList"\n placeholder="{{ \'designer.misc.search\' | translate }}"\n (input)="filterExistingFiles($event.target.value)"\n />\n\n <div class="card border-secondary" style="height: 200px; overflow-y: scroll">\n <div class="card-body p-0">\n <div class="list-group list-group-flush">\n <a\n *ngFor="let existingFile of filteredExistingFiles | sort: \'name\'"\n class="list-group-item"\n [class.active]="composition.audioFileName == existingFile"\n href="#"\n (click)="selectExistingFile(existingFile); (false)"\n >\n <div class="row">\n <div class="col-auto my-auto flex-grow text-break-word">\n {{ existingFile }}\n </div>\n\n <div class="col-auto my-auto pl-0 text-danger float-right" (click)="deleteFile(existingFile); (false)">\n <i class="fa fa-trash-o" aria-hidden="true"></i>\n </div>\n </div>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button [disabled]="uploading" type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,Se,me,i.TranslateService,d.HttpClient,Te,r.ToastrService,he])],e)}(),Ze=function(){function e(e,t){this.bsModalRef=e,this.timelineService=t,this.gridType=t.selectedComposition.gridType,this.beatsPerMinute=t.selectedComposition.beatsPerMinute,this.timeSignatureUpper=t.selectedComposition.timeSignatureUpper,this.timeSignatureLower=t.selectedComposition.timeSignatureLower,this.snapToGrid=t.selectedComposition.snapToGrid,this.gridOffsetMillis=t.selectedComposition.gridOffsetMillis,this.gridResolution=t.selectedComposition.gridResolution}return e.prototype.ngOnInit=function(){},e.prototype.ok=function(){this.timelineService.selectedComposition.gridType=this.gridType,this.timelineService.selectedComposition.beatsPerMinute=this.beatsPerMinute,this.timelineService.selectedComposition.timeSignatureUpper=this.timeSignatureUpper,this.timelineService.selectedComposition.timeSignatureLower=this.timeSignatureLower,this.timelineService.selectedComposition.snapToGrid=this.snapToGrid,this.timelineService.selectedComposition.gridOffsetMillis=this.gridOffsetMillis,this.timelineService.selectedComposition.gridResolution=this.gridResolution,this.timelineService.updateGrid(),this.bsModalRef.hide()},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef},{type:Se}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-app-timeline-grid",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ \'designer.timeline.grid\' | translate }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.grid-type\' | translate }}</label>\n <div class="col-lg-8">\n <select class="custom-select" [ngModel]="gridType" (ngModelChange)="gridType = $event">\n <option value="time">{{ \'designer.timeline.grid-type-time-based\' | translate }}</option>\n <option value="musical">{{ \'designer.timeline.grid-type-musical\' | translate }}</option>\n </select>\n </div>\n </div>\n\n <div *ngIf="gridType == \'musical\'" class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.beats-per-minute\' | translate }}</label>\n <div class="col-lg-8">\n <input type="text" class="form-control" [ngModel]="beatsPerMinute" (ngModelChange)="beatsPerMinute = $event" />\n </div>\n </div>\n\n <div *ngIf="gridType == \'musical\'" class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.time-signature\' | translate }}</label>\n <div class="col-lg-8">\n <input\n type="text"\n class="form-control"\n [ngModel]="timeSignatureUpper"\n (ngModelChange)="timeSignatureUpper = $event"\n style="float: left; width: 40px"\n />\n <div class="d-flex px-2 h-100" style="float: left">\n <div class="m-auto">/</div>\n </div>\n <input\n type="text"\n class="form-control"\n [ngModel]="timeSignatureLower"\n (ngModelChange)="timeSignatureLower = $event"\n style="width: 40px"\n />\n </div>\n </div>\n\n <div *ngIf="gridType == \'musical\'" class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.grid-resolution\' | translate }}</label>\n <div class="col-lg-8">\n <select class="custom-select" [ngModel]="gridResolution" (ngModelChange)="gridResolution = $event">\n <option value="1">1/1</option>\n <option value="2">1/2</option>\n <option value="4">1/4</option>\n <option value="8">1/8</option>\n <option value="16">1/16</option>\n <option value="32">1/32</option>\n <option value="64">1/64</option>\n </select>\n </div>\n </div>\n\n <div *ngIf="gridType == \'musical\'" class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.timeline.grid-offset\' | translate }}</label>\n <div class="col-lg-8">\n <input type="text" class="form-control" [ngModel]="gridOffsetMillis" (ngModelChange)="gridOffsetMillis = $event" />\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label"></label>\n <div class="col-lg-8">\n <div class="form-check">\n <input type="checkbox" [ngModel]="snapToGrid" (ngModelChange)="snapToGrid = $event" class="form-check-input" id="snapToGrid" />\n\n <label class="form-check-label" for="snapToGrid">\n {{ \'designer.timeline.snap-to-grid\' | translate }}\n </label>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef,Se])],e)}(),Xe=function(){function e(e,t,i,n,r,o,s,a,l,c,d){var p=this;this.timelineService=e,this.changeDetectorRef=t,this.modalService=i,this.uuidService=n,this.projectService=r,this.hotkeyTargetExcludeService=o,this.warningDialogService=s,this.http=a,this.configService=l,this.presetService=c,this.introService=d,this.timelineService.waveSurferReady.subscribe((function(){p.onResize()})),this.timelineService.detectChanges.subscribe((function(){p.changeDetectorRef.detectChanges()}))}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){},e.prototype.onResize=function(){if(this.waveElement){this.waveElement.nativeElement.style.display="none";var e=this.waveWrapper.nativeElement.clientHeight;this.waveElement.nativeElement.style.display="block";var t=this.waveWrapper.nativeElement.clientWidth;this.lastHeight&&this.lastHeight===e&&this.lastWidth&&this.lastWidth===t||(this.timelineService.waveSurfer&&this.timelineService.waveSurfer.setHeight(e),this.lastHeight=e,this.lastWidth=t)}},e.prototype.play=function(){this.timelineService.playState="playing",this.presetService.previewLive(this.timelineService.selectedComposition.name,Math.round(1e3*this.timelineService.waveSurfer.getCurrentTime())),this.timelineService.waveSurfer.play()},e.prototype.pause=function(){this.timelineService.playState="paused",this.presetService.stopPreviewPlay(),this.timelineService.waveSurfer.pause()},e.prototype.rewind=function(){this.timelineService.playState="paused",this.pause(),this.timelineService.waveSurfer.seekTo(0)},e.prototype.addRegion=function(e){this.timelineService.addRegion(e)},e.prototype.removeRegion=function(){this.timelineService.removeRegion()},e.prototype.openGridSettings=function(){this.modalService.show(Ze,{keyboard:!0,ignoreBackdropClick:!1,class:""})},e.prototype.afterDeleteFile=function(){this.timelineService.deleteSelectedComposition()},e.prototype.removeComposition=function(){var e=this;this.warningDialogService.show("designer.timeline.warning-delete-composition").pipe(o.map((function(t){t&&(e.configService.enableMediaLibrary?e.afterDeleteFile():e.http.post("file/delete?compositionUuid="+e.timelineService.selectedComposition.uuid,void 0).pipe(o.map((function(t){e.afterDeleteFile()}))).subscribe())}))).subscribe()},e.prototype.openCompositionSettings=function(e,t){var i=this,n=t||JSON.parse(JSON.stringify(this.projectService.project.compositions[e]));this.modalService.show(_e,{keyboard:!1,ignoreBackdropClick:!0,class:"",initialState:{composition:n}}).content.onClose.subscribe((function(r){1===r&&(t?(i.projectService.project.compositions.push(n),i.timelineService.selectedCompositionIndex=i.projectService.project.compositions.length-1,i.timelineService.externalCompositionsAvailable):i.projectService.project.compositions[e]=n,i.selectComposition(i.timelineService.selectedCompositionIndex))}))},e.prototype.compositionSettings=function(){this.openCompositionSettings(this.timelineService.selectedCompositionIndex)},e.prototype.addComposition=function(){var e=new ee;e.uuid=this.uuidService.getUuid(),e.name="New Composition",this.openCompositionSettings(void 0,e)},e.prototype.selectComposition=function(e){this.timelineService.selectCompositionIndex(e)},e.prototype.handleKeyboardEvent=function(e){this.hotkeyTargetExcludeService.exclude(e)||this.timelineService.selectedComposition&&" "===e.key&&("paused"===this.timelineService.playState?this.play():this.pause(),e.stopPropagation(),e.preventDefault())},e.prototype.setRegionStartMillis=function(e){this.timelineService.selectedPlaybackRegion&&(isNaN(e)||e<0||(this.timelineService.selectedPlaybackRegion.startMillis=+e,this.timelineService.updateSelectedRegion()))},e.prototype.setRegionEndMillis=function(e){this.timelineService.selectedPlaybackRegion&&(isNaN(e)||e<0||(this.timelineService.selectedPlaybackRegion.endMillis=+e,this.timelineService.updateSelectedRegion()))},e.ctorParameters=function(){return[{type:Se},{type:t.ChangeDetectorRef},{type:n.BsModalService},{type:pe},{type:he},{type:We},{type:Te},{type:d.HttpClient},{type:me},{type:be},{type:Ae}]},T([t.ViewChild("waveWrapper"),O("design:type",t.ElementRef)],e.prototype,"waveWrapper",void 0),T([t.ViewChild("waveElement"),O("design:type",t.ElementRef)],e.prototype,"waveElement",void 0),T([t.HostListener("window:resize"),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",void 0)],e.prototype,"onResize",null),T([t.HostListener("document:keydown",["$event"]),O("design:type",Function),O("design:paramtypes",[KeyboardEvent]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-app-timeline",template:'<div class="card border-secondary h-100" [class.card-intro-active]="introService.showStep(\'timeline\')">\n <div class="card-body h-100 d-flex" style="flex-flow: column; overflow: unset">\n <div class="d-flex pb-3">\n <div class="btn-group mr-3 my-auto" role="group" style="float: left">\n <a href="#" class="btn btn-primary m-0 p-1 mr-3" (click)="addComposition(); (false)"\n ><i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i\n ></a>\n\n <select\n *ngIf="projectService.project.compositions.length > 0"\n class="mr-3"\n [ngModel]="timelineService.selectedCompositionIndex"\n (ngModelChange)="selectComposition($event)"\n style="width: 150px; height: 30px"\n >\n <option *ngFor="let composition of projectService.project.compositions; let i = index" [value]="i">\n {{ composition.name }}\n </option>\n </select>\n\n <div *ngIf="timelineService.selectedComposition" class="d-flex">\n <a href="#" class="btn btn-primary m-0 p-1" (click)="rewind(); (false)"\n ><i class="fa fa-step-backward fa-fw" aria-hidden="true"></i\n ></a>\n <a *ngIf="timelineService.playState == \'paused\'" href="#" class="btn btn-primary m-0 p-1" (click)="play(); (false)"\n ><i class="fa fa-play fa-fw" aria-hidden="true"></i\n ></a>\n <a *ngIf="timelineService.playState == \'playing\'" href="#" class="btn btn-primary m-0 p-1" (click)="pause(); (false)"\n ><i class="fa fa-pause fa-fw" aria-hidden="true"></i\n ></a>\n </div>\n </div>\n\n <div *ngIf="timelineService.selectedComposition" class="d-flex w-100">\n <div *ngIf="timelineService.duration" class="my-auto mr-3">\n <span style="width: 78px; text-align: left; display: inline-block; margin-left: 5px">{{ timelineService.currentTime }}</span>\n <span style="display: inline-block"></span>- {{ timelineService.duration }}\n </div>\n\n <div class="my-auto mr-3 ml-auto" style="float: left">\n <i (click)="timelineService.applyZoom(timelineService.zoom - 20)" class="fa fa-search-minus mr-3" aria-hidden="true"></i>\n <mv-slider\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="timelineService.zoom"\n [min]="0"\n [max]="200"\n [step]="20"\n (change)="timelineService.applyZoom($event.newValue)"\n ></mv-slider>\n <i (click)="timelineService.applyZoom(timelineService.zoom + 20)" class="fa fa-search-plus ml-3" aria-hidden="true"></i>\n </div>\n\n <div class="my-auto mr-3">\n <input\n type="text"\n [ngModel]="timelineService.selectedPlaybackRegion?.startMillis"\n (ngModelChange)="setRegionStartMillis($event)"\n />\n - <input type="text" [ngModel]="timelineService.selectedPlaybackRegion?.endMillis" (ngModelChange)="setRegionEndMillis($event)" />\n </div>\n\n <a\n href="#"\n class="btn btn-secondary m-0 py-1 mr-3"\n (click)="openGridSettings(); (false)"\n popover="{{ \'designer.timeline.grid\' | translate }}"\n container="body"\n placement="top"\n triggers="mouseenter:mouseleave"\n ><i class="fa fa-th" aria-hidden="true"></i\n ></a>\n\n <a\n href="#"\n class="btn btn-secondary m-0 py-1 mr-3"\n (click)="removeRegion(); (false)"\n popover="{{ \'designer.timeline.remove-region\' | translate }}"\n container="body"\n placement="top"\n triggers="mouseenter:mouseleave"\n ><i class="fa fa-minus-circle" aria-hidden="true"></i\n ></a>\n\n <a\n href="#"\n class="btn btn-secondary m-0 py-1 mr-3"\n (click)="addRegion(); (false)"\n popover="{{ \'designer.timeline.add-region\' | translate }}"\n container="body"\n placement="top"\n triggers="mouseenter:mouseleave"\n ><i class="fa fa-plus-circle" aria-hidden="true"></i\n ></a>\n\n <a\n href="#"\n class="btn btn-secondary m-0 py-1 mr-3"\n (click)="removeComposition(); (false)"\n popover="{{ \'designer.timeline.remove-composition\' | translate }}"\n container="body"\n placement="top"\n triggers="mouseenter:mouseleave"\n ><i class="fa fa-trash-o" aria-hidden="true"></i\n ></a>\n\n <a\n href="#"\n class="btn btn-secondary m-0 py-1"\n (click)="compositionSettings(); (false)"\n popover="{{ \'designer.timeline.composition-settings\' | translate }}"\n container="body"\n placement="left"\n triggers="mouseenter:mouseleave"\n ><i class="fa fa-cog" aria-hidden="true"></i\n ></a>\n </div>\n </div>\n\n <div *ngIf="timelineService.loadingAudioFile" class="w-100 d-flex">\n <i class="fa fa-circle-o-notch fa-spin m-auto" style="margin-top: -30px"></i>\n </div>\n\n <div *ngIf="timelineService.selectedComposition">\n <div id="waveform-timeline"></div>\n </div>\n <div *ngIf="timelineService.selectedComposition" #waveWrapper class="h-100" style="flex: 2; position: relative">\n <div #waveElement id="waveform"></div>\n </div>\n\n <div *ngIf="projectService.project.compositions.length == 0" class="w-100 d-flex">\n <a href="#" class="m-auto" (click)="addComposition(); (false)"\n ><i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i> {{ \'designer.timeline.no-compositions\' | translate }}</a\n >\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[Se,t.ChangeDetectorRef,n.BsModalService,pe,he,We,Te,d.HttpClient,me,be,Ae])],e)}(),qe=function(){function e(e,t,i,n,r,o,s,a,l,c,d,p,h,u,f){var v=this;this.translateService=e,this.projectService=t,this.configService=i,this.fixturePoolService=n,this.hotkeyTargetExcludeService=r,this.modalService=o,this.userService=s,this.userEnsureLoginService=a,this.toastrService=l,this.projectLoadService=c,this.warningDialogService=d,this.errorDialogService=p,this.fixtureService=h,this.timelineService=u,this.introService=f,this.designerMenuSizePx=20,this.splitGutterSizePx=13,this.totalMenuHeightPx=0,this.currentTab="properties",this.configService.menuHeightChanged.subscribe((function(){v.calcTotalMenuHeight()}))}return Object.defineProperty(e.prototype,"menuHeightPx",{set:function(e){this.configService.menuHeightPx=e,this.configService.menuHeightChanged.next()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"externalCompositionsAvailable",{set:function(e){this.timelineService.externalCompositionsAvailable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restUrl",{set:function(e){this.configService.restUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableMediaLibrary",{set:function(e){this.configService.enableMediaLibrary=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loginAvailable",{set:function(e){this.configService.loginAvailable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shareAvailable",{set:function(e){this.configService.shareAvailable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageSwitch",{set:function(e){this.configService.languageSwitch=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newProjectTemplate",{set:function(e){this.configService.newProjectTemplate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"livePreview",{set:function(e){this.configService.livePreview=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localProfiles",{set:function(e){this.configService.localProfiles=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intro",{set:function(e){this.configService.intro=e,this.introService.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uniqueProjectNames",{set:function(e){this.configService.uniqueProjectNames=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;localStorage.getItem("language")?this.translateService.use(localStorage.getItem("language")):this.translateService.use("en"),this.calcTotalMenuHeight();var t=new URLSearchParams(window.location.search),i=t.get("id"),n=t.get("name"),r=t.get("token");i?(r||(r=""),this.projectLoadService.load(Number.parseInt(i),n,r).subscribe((function(){}),(function(t){var i=t&&t.error?t.error.error:"unknown",n="";"no-permission"===i?(n="designer.project.open-no-permission-error",i=void 0):n="designer.project.open-error",e.errorDialogService.show(n,i).subscribe((function(){e.projectLoadService.new()}))}))):this.userService.isLoggedIn()&&(this.userService.getAutoLoadProjectId()||this.userService.getAutoLoadProjectName())?this.projectLoadService.load(this.userService.getAutoLoadProjectId(),this.userService.getAutoLoadProjectName()).subscribe((function(){}),(function(t){var i=t&&t.error?t.error.error:"unknown";e.errorDialogService.show("designer.project.open-error",i).subscribe((function(){e.projectLoadService.new()}))})):this.configService.newProjectTemplate?this.projectLoadService.template():this.projectLoadService.new()},e.prototype.calcTotalMenuHeight=function(){this.totalMenuHeightPx=this.designerMenuSizePx+this.splitGutterSizePx+this.configService.menuHeightPx},e.prototype.onResize=function(){this.previewComponent&&this.previewComponent.onResize(),this.timelineComponent&&this.timelineComponent.onResize()},e.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){s(["#row1","#row2","#row3"],{sizes:[42,38,20],direction:"vertical",cursor:"row-resize",snapOffset:0,gutterSize:e.splitGutterSizePx,onDrag:e.onResize.bind(e)}),s(["#scenes","#presets","#preview"],{sizes:[15,15,70],snapOffset:0,gutterSize:e.splitGutterSizePx,onDrag:e.onResize.bind(e)}),s(["#capabilities","#fixtures","#masterDimmer"],{sizes:[74,18,8],snapOffset:0,gutterSize:e.splitGutterSizePx,onDrag:e.onResize.bind(e),minSize:50}),e.onResize()}))},e.prototype.openTab=function(e){this.fixtureService.settingsSelection="settings"===e,this.currentTab=e},e.prototype.openFixturePool=function(){this.fixturePoolService.open()},e.prototype.projectNew=function(){var e=this;this.warningDialogService.show("designer.misc.warning-proceed-unsaved").pipe(o.map((function(t){t&&e.projectLoadService.new()}))).subscribe()},e.prototype.projectOpen=function(){var e=this;this.warningDialogService.show("designer.misc.warning-proceed-unsaved").pipe(o.map((function(t){t&&e.userEnsureLoginService.login().subscribe((function(){e.modalService.show(Oe,{keyboard:!0,ignoreBackdropClick:!1})}))}))).subscribe()},e.prototype.projectSave=function(){var e=this;this.projectService.project.name?this.projectService.save(this.projectService.project):this.userEnsureLoginService.login().subscribe((function(){e.modalService.show(Ve,{keyboard:!0,ignoreBackdropClick:!1})}))},e.prototype.projectSaveAs=function(){var e=this;this.userEnsureLoginService.login().subscribe((function(){e.modalService.show(Ve,{keyboard:!0,ignoreBackdropClick:!1})}))},e.prototype.userRegister=function(){this.modalService.show(Ge,{keyboard:!0,ignoreBackdropClick:!1})},e.prototype.projectImport=function(){var e=this;this.warningDialogService.show("designer.misc.warning-proceed-unsaved").pipe(o.map((function(t){t&&e.modalService.show(Le,{keyboard:!0,ignoreBackdropClick:!1})}))).subscribe()},e.prototype.projectExport=function(){var e=JSON.stringify(this.projectService.project,null,2),t=document.createElement("a");t.setAttribute("href","data:text/json;charset=UTF-8,"+encodeURIComponent(e)),t.setAttribute("download",this.projectService.project.name+".rsd"),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)},e.prototype.projectShare=function(){this.projectService.project.id?this.modalService.show(Be,{keyboard:!0,ignoreBackdropClick:!0}):this.errorDialogService.show("designer.project.share-no-save").subscribe()},e.prototype.handleKeyboardEvent=function(e){this.hotkeyTargetExcludeService.exclude(e)||("p"===e.key&&(this.openFixturePool(),e.stopPropagation(),e.preventDefault()),(e.ctrlKey||e.metaKey)&&"n"===e.key&&(this.projectNew(),e.stopPropagation(),e.preventDefault()),(e.ctrlKey||e.metaKey)&&"s"===e.key&&(this.projectSave(),e.stopPropagation(),e.preventDefault()),(e.ctrlKey||e.metaKey)&&"o"===e.key&&(this.projectOpen(),e.stopPropagation(),e.preventDefault()))},e.prototype.switchLanguage=function(e){this.translateService.use(e),localStorage.setItem("language",e)},e.ctorParameters=function(){return[{type:i.TranslateService},{type:he},{type:me},{type:He},{type:We},{type:n.BsModalService},{type:de},{type:$e},{type:r.ToastrService},{type:Re},{type:Te},{type:Ue},{type:ue},{type:Se},{type:Ae}]},T([t.Input(),O("design:type",Number),O("design:paramtypes",[Number])],e.prototype,"menuHeightPx",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"externalCompositionsAvailable",null),T([t.Input(),O("design:type",String),O("design:paramtypes",[String])],e.prototype,"restUrl",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"enableMediaLibrary",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"loginAvailable",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"shareAvailable",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"languageSwitch",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"newProjectTemplate",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"livePreview",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"localProfiles",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"intro",null),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"uniqueProjectNames",null),T([t.ViewChild(ke),O("design:type",ke)],e.prototype,"previewComponent",void 0),T([t.ViewChild(Xe),O("design:type",Xe)],e.prototype,"timelineComponent",void 0),T([t.HostListener("document:keydown",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-designer",template:'\x3c!-- Wrap the whole component inside a div to encapsulate the CSS --\x3e\n\n\x3c!-- 100 % height minus the menu bar above and the gutter size of 13 px --\x3e\n\x3c!-- <div style="height: calc(100% - 33px)"> --\x3e\n<div id="designer" [ngStyle]="{ height: \'calc(100% - \' + totalMenuHeightPx + \'px)\' }">\n \x3c!-- Navigation --\x3e\n <nav\n class="navbar navbar-expand-lg navbar-light bg-light border-secondary"\n style="border-bottom: 1px solid #444; height: 20px; z-index: 9999"\n >\n \x3c!-- Menu buttons --\x3e\n <ul class="navbar-nav mr-auto">\n <li class="nav-item dropdown">\n <a class="nav-link dropdown-toggle" href="#" id="fileDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n {{ \'designer.navigation.project\' | translate }}\n </a>\n <div class="dropdown-menu" aria-labelledby="fileDropdown">\n <a class="dropdown-item d-none d-md-block" href="#" (click)="projectNew(); (false)"\n ><i class="fa fa-fw fa-file-o" aria-hidden="true"></i> {{ \'designer.navigation.project-new\' | translate }}</a\n >\n <a class="dropdown-item" href="#" (click)="projectOpen(); (false)"\n ><i class="fa fa-fw fa-folder-open-o" aria-hidden="true"></i> {{ \'designer.navigation.project-open\' | translate }}</a\n >\n <a class="dropdown-item d-none d-md-block" href="#" (click)="projectSave(); (false)"\n ><i class="fa fa-fw fa-floppy-o" aria-hidden="true"></i> {{ \'designer.navigation.project-save\' | translate }}</a\n >\n <a class="dropdown-item d-none d-md-block" href="#" (click)="projectSaveAs(); (false)"\n ><i class="fa fa-fw fa-floppy-o" aria-hidden="true"></i> {{ \'designer.navigation.project-save-as\' | translate }}</a\n >\n <a class="dropdown-item d-none d-md-block" href="#" (click)="projectImport(); (false)"\n ><i class="fa fa-fw fa-download" aria-hidden="true"></i> {{ \'designer.navigation.project-import\' | translate }}</a\n >\n <a class="dropdown-item d-none d-md-block" href="#" (click)="projectExport(); (false)"\n ><i class="fa fa-fw fa-external-link" aria-hidden="true"></i> {{ \'designer.navigation.project-export\' | translate }}</a\n >\n </div>\n </li>\n <li class="nav-item dropdown d-none d-md-block">\n <a\n class="nav-link dropdown-toggle"\n href="#"\n id="settingsDropdown"\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n >\n {{ \'designer.navigation.settings\' | translate }}\n </a>\n <div class="dropdown-menu" aria-labelledby="settingsDropdown">\n <a class="dropdown-item" href="#" (click)="openFixturePool(); (false)">{{ \'designer.navigation.fixture-pool\' | translate }}</a>\n \x3c!-- <a class="dropdown-item" href="#">{{ \'designer.navigation.stage\' | translate }}</a> --\x3e\n </div>\n </li>\n <li class="nav-item dropdown d-none d-md-block">\n <a\n class="nav-link dropdown-toggle"\n href="#"\n id="settingsDropdown"\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n >\n {{ \'designer.navigation.help\' | translate }}\n </a>\n <div class="dropdown-menu" aria-labelledby="settingsDropdown">\n <a class="dropdown-item" href="#" (click)="introService.reset(); (false)">{{ \'designer.navigation.reset-intro\' | translate }}</a>\n <a class="dropdown-item" href="https://rocketshow.net/support/" target="_blank">{{\n \'designer.navigation.support\' | translate\n }}</a>\n </div>\n </li>\n </ul>\n\n <ul class="navbar-nav">\n <li *ngIf="configService.shareAvailable" class="nav-item d-none d-md-flex" data-toggle="collapse">\n <a class="nav-link text-primary" (click)="projectShare(); (false)" routerLinkActive="active"\n ><i class="fa fa-share-alt" aria-hidden="true"></i> {{ \'designer.navigation.project-share\' | translate }}</a\n >\n </li>\n\n <li *ngIf="configService.languageSwitch" class="nav-item dropdown">\n <a class="nav-link dropdown-toggle" href="#" id="settingsDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"\n ><i class="fa fa-globe" aria-hidden="true"></i>\n {{ \'designer.misc.language\' | translate }}\n </a>\n <div class="dropdown-menu dropdown-menu-right" aria-labelledby="settingsDropdown">\n <a class="dropdown-item" href="#" (click)="switchLanguage(\'en\'); (false)" target="_blank">English</a>\n <a class="dropdown-item" href="#" (click)="switchLanguage(\'de\'); (false)" target="_blank">Deutsch</a>\n </div>\n </li>\n\n <li *ngIf="configService.loginAvailable && !userService.isLoggedIn()" class="nav-item" data-toggle="collapse">\n <a class="nav-link" (click)="userRegister(); (false)" routerLinkActive="active"\n ><i class="fa fa-user" aria-hidden="true"></i> {{ \'designer.navigation.login\' | translate }}</a\n >\n </li>\n\n <li *ngIf="configService.loginAvailable && userService.isLoggedIn()" class="nav-item dropdown">\n <a class="nav-link dropdown-toggle" href="#" id="settingsDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"\n ><i class="fa fa-user" aria-hidden="true"></i>\n {{ userService.username }}\n </a>\n <div class="dropdown-menu dropdown-menu-right" aria-labelledby="settingsDropdown">\n <a class="dropdown-item" href="#" (click)="userService.logout(); (false)" target="_blank"\n ><i class="fa fa-sign-out" aria-hidden="true"></i> {{ \'designer.navigation.logout\' | translate }}</a\n >\n </div>\n </li>\n </ul>\n </nav>\n\n \x3c!-- The main content for larger screens --\x3e\n <div class="h-100 d-none d-md-block">\n <div id="row1" class="split split-vertical clearfix pt-3 pl-3">\n \x3c!-- Scenes --\x3e\n <div id="scenes" class="split split-horizontal h-100">\n <lib-app-scene></lib-app-scene>\n </div>\n\n \x3c!-- Presets --\x3e\n <div id="presets" class="split split-horizontal h-100">\n <lib-app-preset></lib-app-preset>\n </div>\n\n \x3c!-- 3D preview --\x3e\n <div id="preview" class="split split-horizontal h-100 pr-3">\n <div class="card border-secondary h-100" [class.card-intro-active]="introService.showStep(\'preview\')">\n <div class="card-body p-0 h-100">\n <lib-app-preview class="h-100"></lib-app-preview>\n </div>\n </div>\n </div>\n </div>\n\n <div id="row2" class="split split-vertical clearfix px-3 d-flex" style="flex-direction: row">\n \x3c!-- Menu for the capabilities, channels, effects and settings --\x3e\n <div class="col col-auto p-0" style="margin-right: -1px">\n <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">\n <a\n class="nav-link px-3 active"\n (click)="openTab(\'capabilities\')"\n id="v-pills-capabilities-tab"\n popover="{{ \'designer.misc.capabilities\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-capabilities"\n role="tab"\n aria-controls="v-pills-capabilities"\n aria-selected="true"\n >\n <i class="fa fa-bolt fa-fw" aria-hidden="true"></i>\n </a>\n <a\n class="nav-link px-3"\n (click)="openTab(\'channels\')"\n id="v-pills-channels-tab"\n popover="{{ \'designer.misc.channels\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-channels"\n role="tab"\n aria-controls="v-pills-channels"\n aria-selected="false"\n >\n <i class="fa fa-sliders fa-fw" aria-hidden="true"></i>\n </a>\n <a\n class="nav-link px-3"\n (click)="openTab(\'effects\')"\n id="v-pills-effects-tab"\n popover="{{ \'designer.misc.effects\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-effects"\n role="tab"\n aria-controls="v-pills-effects"\n aria-selected="false"\n >\n <i class="fa fa-magic fa-fw" aria-hidden="true"></i>\n </a>\n <a\n class="nav-link px-3"\n (click)="openTab(\'settings\')"\n id="v-pills-settings-tab"\n popover="{{ \'designer.misc.settings\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-settings"\n role="tab"\n aria-controls="v-pills-settings"\n aria-selected="false"\n style="border-top: 1px solid #444"\n >\n <i class="fa fa-cog fa-fw" aria-hidden="true"></i>\n </a>\n </div>\n </div>\n\n <div id="capabilities" class="split split-horizontal h-100" style="padding-left: 1rem">\n <div class="row h-100">\n \x3c!-- Content for the capabilities, channels, effects and settings --\x3e\n <div class="col pl-0 h-100">\n <div class="tab-content h-100" id="v-pills-tabContent">\n <div class="tab-pane h-100 show active" id="v-pills-capabilities" role="tabpanel">\n <lib-app-fixture-capability></lib-app-fixture-capability>\n </div>\n <div class="tab-pane h-100 show" id="v-pills-channels" role="tabpanel">\n <lib-app-fixture-channel></lib-app-fixture-channel>\n </div>\n <div class="tab-pane h-100" id="v-pills-effects" role="tabpanel" aria-labelledby="v-pills-profile-tab">\n <lib-app-effect></lib-app-effect>\n </div>\n <div class="tab-pane h-100" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-home-tab">\n <lib-app-fixture-settings></lib-app-fixture-settings>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n \x3c!-- Fixtures --\x3e\n <div id="fixtures" class="split split-horizontal h-100">\n <lib-app-fixture></lib-app-fixture>\n </div>\n\n \x3c!-- Master dimmer --\x3e\n <div id="masterDimmer" class="split split-horizontal h-100">\n <lib-app-master-dimmer></lib-app-master-dimmer>\n </div>\n </div>\n\n \x3c!-- Timeline --\x3e\n <div id="row3" class="split split-vertical clearfix px-3 pb-3" style="padding-bottom: 20px">\n <lib-app-timeline></lib-app-timeline>\n </div>\n </div>\n\n \x3c!-- The components for small screens --\x3e\n <div class="d-md-none p-3">\n <div>\n <lib-app-master-dimmer></lib-app-master-dimmer>\n </div>\n\n <div class="mt-3">\n <lib-app-scene></lib-app-scene>\n </div>\n </div>\n</div>\n\n<lib-app-intro class="d-none d-md-flex"></lib-app-intro>\n',encapsulation:t.ViewEncapsulation.None,styles:['@charset "UTF-8";.modal-full{max-width:unset!important;margin:1.75rem!important}.modal{z-index:10001}#designer .nav-link{cursor:pointer}#designer .dropdown-menu{z-index:100000}#designer .row{flex-wrap:unset}#designer .navbar-nav{flex-direction:row!important}#designer .navbar-expand-lg{flex-flow:row nowrap!important;justify-content:flex-start!important}#designer .navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem!important;padding-left:.5rem!important}#designer .list-group-item.active{color:#fff!important;background-color:#fd7e14!important;border-color:#fd7e14!important}#designer :focus{outline:0}#designer select{font-size:.8rem;cursor:pointer}#designer input{font-size:.7rem;background-color:transparent;color:#fff;border:1px solid}#designer input,#designer select{border-color:#dee2e6}#designer .list-group-item{padding:.3rem 1.25rem;border-left:none;border-right:none}#designer .nav-pills .nav-link.active,#designer .nav-pills .show>.nav-link{background-color:#444}#designer .nav a,#designer .panel-title .btn-link{color:#fff!important}#designer .accordion-toggle .btn,#designer .accordion-toggle button{padding:0}#designer .card-body{overflow:auto;padding:.8rem}#designer .card-header{margin-bottom:0;padding:.4rem}#designer .panel-body{background-color:#303030}#designer .list-group-item.active-light{background-color:#906542;border-color:#906542}#designer .inactive-list-item{opacity:.3}#designer span.bigcheck-target{font-family:FontAwesome}#designer input[type=checkbox].bigcheck{position:relative;left:-999em}#designer input[type=checkbox].bigcheck+span.bigcheck-target:after{content:""}#designer input[type=checkbox].bigcheck:checked+span.bigcheck-target:after{content:""}#designer .gutter.gutter-horizontal{cursor:ew-resize}#designer .gutter.gutter-vertical{cursor:ns-resize}#designer .gutter.gutter-horizontal,#designer .split-horizontal{float:left}#designer .gutter.gutter-horizontal,#designer .split-vertical{height:100%}#designer .split{overflow-y:hidden;overflow-x:hidden}#designer .panel{background-color:transparent}#designer .slider{cursor:pointer}#designer .slider-horizontal .slider-track{height:2px!important;margin-top:-2px!important}#designer .slider-vertical .slider-track{width:2px!important;margin-left:4px!important}#designer .slider-selection,#designer .slider-track,#designer .slider-track-high,#designer .slider-track-low{background-color:#fff!important;border-radius:0!important;background-image:none!important;box-shadow:none!important}#designer .slider-handle{width:13px!important;height:13px!important;background-color:#fff!important;background-image:none!important;border:1px solid #303030}#designer .slider-vertical .slider-handle{margin-left:4px!important}#designer .slider-horizontal .slider-handle{margin-top:2px!important}#designer .slider-input{width:35px;margin-left:8px;text-align:center}#designer .slider-input-readonly{width:35px;margin-left:8px;text-align:center;color:#a9a9a9;border-color:gray}#designer .capability-container{padding:0;height:0}#designer accordion-group>div{border:none!important}#designer .popover{background-color:#fff}#designer .popover-body{color:#000}#designer .bs-popover-auto[x-placement^=right] .arrow::after,#designer .bs-popover-right .arrow::after{border-right-color:#fff}#designer .bs-popover-auto[x-placement^=left] .arrow::after,#designer .bs-popover-left .arrow::after{border-left-color:#fff}#designer .bs-popover-auto[x-placement^=bottom] .arrow::after,#designer .bs-popover-bottom .arrow::after{border-bottom-color:#fff}#designer .bs-popover-auto[x-placement^=top] .arrow::after,#designer .bs-popover-top .arrow::after{border-top-color:#fff}#designer .iro__slider,#designer .iro__wheel{cursor:pointer}#designer .pan-tilt-grid path{fill:none;stroke:#fff;stroke-width:10px}#designer .pan-tilt-grid circle{fill:#4682b4;stroke:#fff;stroke-width:3px}#designer .capability{overflow:visible}#designer .capability-deactivated{opacity:.4}#designer .wavesurfer-region{z-index:5!important}#designer .wavesurfer-region[data-region-selected=true]{z-index:6!important}#designer .wavesurfer-region[data-region-preset=true]{height:50%!important;top:50%!important}#designer .wavesurfer-region[data-region-name]:after{content:attr(data-region-name);margin-left:20px}#designer .wavesurfer-handle{width:10px!important;max-width:10px!important;border:1px solid #ddd;background:rgba(0,0,0,.1);box-sizing:border-box;opacity:0;cursor:unset!important}#designer .wavesurfer-handle-end{margin-left:-10px}#designer .wavesurfer-region[data-region-selectable=true] .wavesurfer-handle{opacity:1;cursor:col-resize!important}#designer .wavesurfer-handle:after,#designer .wavesurfer-handle:before{content:"";display:block;position:absolute;z-index:1;border-top:1px solid #fff;border-bottom:1px solid #fff;height:4px;left:5%;right:5%;top:50%;transform:translateY(-50%)}#designer .wavesurfer-handle:before{margin-top:-3px}#designer timeline{overflow:scroll!important;overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;cursor:s-resize}#designer timeline::-webkit-scrollbar{height:0!important}#designer cursor{top:-20px!important}#designer wave{border-right-color:#fd7e14!important;cursor:col-resize}']}),O("design:paramtypes",[i.TranslateService,he,me,He,We,n.BsModalService,de,$e,r.ToastrService,Re,Te,Ue,ue,Se,Ae])],e)}(),Ye=function(){function e(){}return e.prototype.transform=function(e,t){if(Array.isArray(e))return e.sort((function(e,i){return e[t]<i[t]?-1:e[t]>i[t]?1:0})),e},e=T([t.Pipe({name:"sort"})],e)}(),Ke=function(){function e(e,t,i,n){var r=this;this.presetService=e,this.animationService=t,this.fixtureService=i,this.translate=n,this.lengthMillisMin=20,this.lengthMillisMax=8e3,this.amplitudeMin=0,this.amplitudeMax=4,this.percentageMin=0,this.percentageMax=1,this.phaseMillisMin=-1e3,this.phaseMillisMax=1e3,this.phasingMillisMin=0,this.phasingMillisMax=1e3,this.availableCapabilities=[],this.availableChannels=new Map,this.availableProfiles=[],this.selectedProfiles=[],this.presetService.fixtureSelectionChanged.subscribe((function(){r.updateCapabilitiesAndChannels()})),this.updateCapabilitiesAndChannels()}return Object.defineProperty(e.prototype,"isSelected",{set:function(e){var t=this;e?this.gridUpdateSubscription||(this.gridUpdateSubscription=p.timer(0,15).subscribe((function(){t.redraw()}))):this.gridUpdateSubscription&&(this.gridUpdateSubscription.unsubscribe(),this.gridUpdateSubscription=void 0)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.curveGrid.nativeElement;this.ctx=e.getContext("2d"),this.maxWidth=e.width,this.maxHeight=e.height,this.redraw()},e.prototype.drawCurrentValue=function(e,t,i,n,r){var o=1-this.curve.getValueAtMillis(e),s=this.maxWidth*(e%n)/n,a=r*o+i;this.ctx.beginPath(),this.ctx.arc(s,a,t,0,2*Math.PI,!1),this.ctx.fillStyle="#fff",this.ctx.fill(),this.ctx.lineWidth=1,this.ctx.strokeStyle="#000",this.ctx.stroke()},e.prototype.getPhasingCount=function(){var e,t,i=0,n=[];try{for(var r=L(this.presetService.selectedPreset.fixtureUuids),o=r.next();!o.done;o=r.next()){var s=o.value,a=this.fixtureService.getFixtureByUuid(s);n.includes(a.dmxFirstChannel)||(i++,n.push(a.dmxFirstChannel))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i},e.prototype.redraw=function(){this.ctx.clearRect(0,0,this.maxWidth,this.maxHeight),this.ctx.fillStyle="#fff",this.ctx.strokeStyle="#fff";var e,t;this.ctx.lineWidth=3;var i=50;length<500&&(i=5);for(var n=this.curve.lengthMillis*Math.max(Math.round(4-this.curve.lengthMillis/1e3),1),r=this.maxHeight-6,o=2*-i;o<n+2*i;o+=i){var s=1-this.curve.getValueAtMillis(o),a=this.maxWidth*o/n,l=r*s+3;t&&(this.ctx.beginPath(),this.ctx.moveTo(e,t),this.ctx.lineTo(a,l),this.ctx.stroke()),e=a,t=l}this.drawCurrentValue(this.animationService.timeMillis%n,5,3,n,r);var c=0;this.curve.phasingMillis>0&&this.presetService.selectedPreset&&(c=this.getPhasingCount());for(o=1;o<c;o++)this.drawCurrentValue((this.animationService.timeMillis-o*this.curve.phasingMillis)%n,3,3,n,r)},e.prototype.calculateChannelCapabilities=function(){this.availableChannels=this.presetService.getSelectedProfileChannels(this.selectedProfiles)},e.prototype.changeProfileSelection=function(e,t){this.selectedProfiles.indexOf(t)>=0?this.selectedProfiles.splice(this.selectedProfiles.indexOf(t),1):this.selectedProfiles.push(t),this.calculateChannelCapabilities()},e.prototype.updateCapabilitiesAndChannels=function(){var e;(this.availableCapabilities=[],this.presetService.hasCapabilityDimmer())&&((e=new H).type=N.Intensity,this.availableCapabilities.push(e));this.presetService.hasCapabilityColor()&&((e=new H).type=N.ColorIntensity,e.color=U.Red,this.availableCapabilities.push(e),(e=new H).type=N.ColorIntensity,e.color=U.Green,this.availableCapabilities.push(e),(e=new H).type=N.ColorIntensity,e.color=U.Blue,this.availableCapabilities.push(e));this.presetService.hasCapabilityPanTilt()&&((e=new H).type=N.Pan,this.availableCapabilities.push(e),(e=new H).type=N.Tilt,this.availableCapabilities.push(e));this.availableProfiles=this.presetService.getSelectedProfiles(),this.selectedProfiles=B(this.availableProfiles),this.calculateChannelCapabilities()},e.prototype.getCapabilityName=function(e){return this.translate.get(["designer.fixtureCapabilityType."+e.type,"designer.fixtureCapabilityColor."+e.color]).pipe(o.map((function(t){var i="";return i+=t["designer.fixtureCapabilityType."+e.type],e.color?i+=", "+t["designer.fixtureCapabilityColor."+e.color]:i})))},e.prototype.capabilityChecked=function(e){var t,i;try{for(var n=L(this.curve.capabilities),r=n.next();!r.done;r=n.next()){var o=r.value;if(this.fixtureService.capabilitiesMatch(o.type,e.type,o.color,e.color,null,null,null,null))return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.toggleCapability=function(e,t){if(e.currentTarget.checked)this.curve.capabilities.push(t);else for(var i=0;i<this.curve.capabilities.length;i++){var n=this.curve.capabilities[i];this.fixtureService.capabilitiesMatch(n.type,t.type,n.color,t.color,null,null,null,null)&&this.curve.capabilities.splice(i,1)}this.presetService.previewLive()},e.prototype.getChannelName=function(e,t){return this.availableProfiles.length>1?e+" - "+t:t},e.prototype.channelChecked=function(e,t){var i,n;try{for(var r=L(this.curve.channels),o=r.next();!o.done;o=r.next()){var s=o.value;if(s.profileUuid===e.uuid){if(s.channels.includes(t.name))return!0;break}}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return!1},e.prototype.toggleChannel=function(e,t,i){var n,r,o,s,a=!1;try{for(var l=L(this.curve.channels),c=l.next();!c.done;c=l.next()){if((h=c.value).profileUuid===t.uuid){a=!0;break}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}a||((h=new ie).profileUuid=t.uuid,this.curve.channels.push(h));try{for(var d=L(this.curve.channels),p=d.next();!p.done;p=d.next()){var h;if((h=p.value).profileUuid===t.uuid){var u=h.channels.indexOf(i.name);u>=0?h.channels.splice(u,1):h.channels.push(i.name);break}}}catch(e){o={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}this.presetService.previewLive()},e.prototype.setLengthMillis=function(e){!isNaN(e)&&e>=this.lengthMillisMin&&e<=this.lengthMillisMax&&(this.curve.lengthMillis=+e,this.presetService.previewLive())},e.prototype.setAmplitude=function(e){!isNaN(e)&&e>=this.amplitudeMin&&e<=this.amplitudeMax&&(this.curve.amplitude=+e,this.presetService.previewLive())},e.prototype.setPosition=function(e){!isNaN(e)&&e>=this.percentageMin&&e<=this.percentageMax&&(this.curve.position=+e,this.presetService.previewLive())},e.prototype.setPhaseMillis=function(e){!isNaN(e)&&e>=this.phaseMillisMin&&e<=this.phaseMillisMax&&(this.curve.phaseMillis=+e,this.presetService.previewLive())},e.prototype.setPhasingMillis=function(e){!isNaN(e)&&e>=this.phasingMillisMin&&e<=this.phasingMillisMax&&(this.curve.phasingMillis=+e,this.presetService.previewLive())},e.ctorParameters=function(){return[{type:be},{type:ge},{type:ue},{type:i.TranslateService}]},T([t.Input(),O("design:type",ne)],e.prototype,"curve",void 0),T([t.Input(),O("design:type",Boolean),O("design:paramtypes",[Boolean])],e.prototype,"isSelected",null),T([t.ViewChild("curveGrid",{static:!0}),O("design:type",t.ElementRef)],e.prototype,"curveGrid",void 0),e=T([t.Component({selector:"lib-app-effect-curve",template:'<div class="mr-3" style="float: left">\n <div class="mb-2">\n <select\n [ngModel]="curve.curveType"\n (ngModelChange)="curve.curveType = $event; presetService.previewLive()"\n style="width: 200px; height: 20px"\n >\n <option [value]="\'sine\'">\n {{ \'designer.effect.curve-sine\' | translate }}\n </option>\n <option [value]="\'square\'">\n {{ \'designer.effect.curve-square\' | translate }}\n </option>\n \x3c!-- <option [value]="\'triangle\'">\n {{ \'designer.effect.curve-triangle\' | translate }}</option>\n <option [value]="\'sawtooth\'">\n {{ \'designer.effect.curve-sawtooth\' | translate }}</option>\n <option [value]="\'reverse-sawtooth\'">\n {{ \'designer.effect.curve-reverse-sawtooth\' | translate }}</option> --\x3e\n </select>\n </div>\n <div>\n <canvas #curveGrid class="curve-grid" width="200" height="100" viewBox="150 -75 4850 5150" preserveAspectRatio="none"></canvas>\n </div>\n</div>\n\n<div class="mr-4" style="float: left">\n <div class="d-flex">\n <div class="my-auto" style="width: 100px; float: left">\n {{ \'designer.effect.curve-length\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n (change)="redraw(); presetService.previewLive()"\n [(value)]="curve.lengthMillis"\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="0"\n [min]="lengthMillisMin"\n [max]="lengthMillisMax"\n [step]="1"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input type="text" class="slider-input" [ngModel]="curve.lengthMillis" (ngModelChange)="setLengthMillis($event); redraw()" />\n </div>\n <div class="my-auto ml-1">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 100px; float: left">\n {{ \'designer.effect.curve-amplitude\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n (change)="redraw(); presetService.previewLive()"\n [(value)]="curve.amplitude"\n style="width: 80px"\n [tooltip]="\'hide\'"\n [min]="amplitudeMin"\n [max]="amplitudeMax"\n [step]="0.01"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input type="text" class="slider-input" [ngModel]="curve.amplitude" (ngModelChange)="setAmplitude($event); redraw()" />\n </div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 100px; float: left">\n {{ \'designer.effect.curve-position\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n (change)="redraw(); presetService.previewLive()"\n [(value)]="curve.position"\n style="width: 80px; height: 18px"\n [tooltip]="\'hide\'"\n [min]="percentageMin"\n [max]="percentageMax"\n [step]="0.01"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input type="text" class="slider-input" [ngModel]="curve.position" (ngModelChange)="setPosition($event); redraw()" />\n </div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 100px; float: left">\n {{ \'designer.effect.curve-phase\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n (change)="redraw(); presetService.previewLive()"\n [(value)]="curve.phaseMillis"\n style="width: 80px; height: 18px"\n [tooltip]="\'hide\'"\n [min]="phaseMillisMin"\n [max]="phaseMillisMax"\n [step]="1"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input type="text" class="slider-input" [ngModel]="curve.phaseMillis" (ngModelChange)="setPhaseMillis($event); redraw()" />\n </div>\n <div class="my-auto ml-1">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 100px; float: left">\n {{ \'designer.effect.curve-chase\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n (change)="redraw(); presetService.previewLive()"\n [(value)]="curve.phasingMillis"\n style="width: 80px; height: 18px"\n [tooltip]="\'hide\'"\n [min]="phasingMillisMin"\n [max]="phasingMillisMax"\n [step]="1"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input type="text" class="slider-input" [ngModel]="curve.phasingMillis" (ngModelChange)="setPhasingMillis($event); redraw()" />\n </div>\n <div class="my-auto ml-1">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n</div>\n\n\x3c!-- Menu for the capabilities and channels--\x3e\n<div class="col col-auto p-0" style="margin-right: 1px; width: 50px; float: left">\n <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">\n <a\n class="nav-link px-3 active"\n id="v-pills-effect-capabilities-tab"\n popover="{{ \'designer.misc.capabilities\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-effect-capabilities-{{ curve?.uuid }}"\n role="tab"\n aria-controls="v-pills-capabilities"\n aria-selected="true"\n >\n <i class="fa fa-bolt fa-fw" aria-hidden="true"></i>\n </a>\n <a\n class="nav-link px-3"\n id="v-pills-effect-channels-tab"\n popover="{{ \'designer.misc.channels\' | translate }}"\n container="body"\n placement="right"\n triggers="mouseenter:mouseleave"\n data-toggle="pill"\n href="#v-pills-effect-channels-{{ curve?.uuid }}"\n role="tab"\n aria-controls="v-pills-channels"\n aria-selected="false"\n >\n <i class="fa fa-sliders fa-fw" aria-hidden="true"></i>\n </a>\n </div>\n</div>\n\n<div class="h-100" class="applying-to">\n <div class="tab-content h-100" id="v-pills-tabContent">\n <div class="tab-pane h-100 show active" id="v-pills-effect-capabilities-{{ curve?.uuid }}" role="tabpanel">\n \x3c!-- Capabilities--\x3e\n <div *ngFor="let capability of availableCapabilities; let i = index" class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capability_{{ curve?.uuid + \'_\' + i }}"\n [ngModel]="capabilityChecked(capability)"\n (change)="toggleCapability($event, capability)"\n />\n <label class="form-check-label" for="capability_{{ curve?.uuid + \'_\' + i }}">{{ getCapabilityName(capability) | async }}</label>\n </div>\n </div>\n <div class="tab-pane h-100 show" id="v-pills-effect-channels-{{ curve?.uuid }}" role="tabpanel">\n \x3c!-- channels --\x3e\n\n \x3c!-- profile selection --\x3e\n <div *ngIf="availableProfiles.length > 1">\n <div *ngFor="let profile of availableProfiles; let i = index" class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="channel_profile_{{ curve?.uuid }}_{{ profile.uuid }}"\n [ngModel]="selectedProfiles.indexOf(profile) >= 0"\n (change)="changeProfileSelection($event, profile)"\n />\n <label class="form-check-label" for="channel_profile_{{ curve?.uuid }}_{{ profile.uuid }}">{{ profile.name }}</label>\n </div>\n\n <hr class="my-1" style="border-color: white" />\n </div>\n\n \x3c!-- channels --\x3e\n <ng-container *ngFor="let entry of availableChannels | keyvalue; let i = index">\n <div *ngFor="let channel of entry.value; let j = index" class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="channel_{{ curve?.uuid }}_{{ i }}_{{ j }}"\n [ngModel]="channelChecked(entry.key, channel)"\n (change)="toggleChannel($event, entry.key, channel)"\n />\n <label class="form-check-label" for="channel_{{ curve?.uuid }}_{{ i }}_{{ j }}">{{\n getChannelName(entry.key.name, channel.name)\n }}</label>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n',styles:[".curve-grid{background-color:#000;border:1px solid #fff}.applying-to{overflow-y:scroll;height:130px!important;background-color:#222;border:1px solid #fff;padding:.5rem}.applying-to .form-check:last-child{margin-bottom:.5rem}"]}),O("design:paramtypes",[be,ge,ue,i.TranslateService])],e)}(),Je=function(){function e(){this.points=[[0,500],[500,0],[1e3,500],[500,1e3]],this.dragged=null,this.selected=this.points[0]}return e.prototype.redraw=function(){},e.prototype.ngOnInit=function(){},T([t.ViewChild("panTiltGrid"),O("design:type",t.ElementRef)],e.prototype,"panTiltGrid",void 0),e=T([t.Component({selector:"lib-app-effect-pan-tilt",template:'<svg #panTiltGrid class="pan-tilt-grid" width="150" height="150" viewBox="-100 -100 1200 1200" style="border: 1px solid white"></svg>\n',styles:[""]}),O("design:paramtypes",[])],e)}(),Qe=function(){function e(e,t,i,n){this.uuidService=e,this.presetService=t,this.effectService=i,this.warningDialogService=n}return e.prototype.ngOnInit=function(){},e.prototype.addEffect=function(e){this.effectService.selectedEffect=e,this.presetService.selectedPreset&&this.presetService.selectedPreset.effects.push(e)},e.prototype.addCurveEffect=function(){var e=new ne;e.uuid=this.uuidService.getUuid(),this.addEffect(e),this.presetService.previewLive()},e.prototype.addPanTiltEffect=function(){this.addEffect(new re)},e.prototype.openEffect=function(e,t){t?this.effectService.selectedEffect=e:this.effectService.selectedEffect===e&&(this.effectService.selectedEffect=void 0)},e.prototype.deleteEffect=function(e){var t=this;this.warningDialogService.show("designer.effect.delete-warning").pipe(o.map((function(i){i&&(t.presetService.selectedPreset.effects.splice(t.presetService.selectedPreset.effects.indexOf(e),1),t.presetService.previewLive())}))).subscribe()},e.ctorParameters=function(){return[{type:pe},{type:be},{type:ye},{type:Te}]},e=T([t.Component({selector:"lib-app-effect",template:'<div class="card border-secondary panel h-100">\n <div class="card-body capability-container" *ngIf="presetService.selectedPreset">\n <div class="m-3">\n <accordion [closeOthers]="true">\n <accordion-group\n *ngFor="let item of presetService.selectedPreset.effects; let i = index"\n [isOpen]="effectService.selectedEffect == item"\n (isOpenChange)="openEffect(item, $event)"\n style="margin-top: 1px"\n >\n <button class="btn btn-link btn-block clearfix" accordion-heading>\n <div class="pull-left float-left d-flex w-100">\n <i *ngIf="item.type == \'curve\'" class="fa fa-area-chart fa-fw my-auto" aria-hidden="true"></i>\n <i *ngIf="item.type == \'pan-tilt\'" class="fa fa-arrows-alt fa-fw my-auto" aria-hidden="true"></i>\n <span class="ml-2">{{ \'designer.effect.type-\' + item.type | translate }}</span>\n <div class="ml-auto mr-2">\n <i\n (click)="item.visible = !item.visible; presetService.previewLive(); $event.stopPropagation()"\n class="fa fa-eye fa-fw"\n [class.text-primary]="item.visible"\n aria-hidden="true"\n ></i>\n </div>\n <div class="mr-2">\n <i (click)="this.deleteEffect(item); $event.stopPropagation()" class="fa fa-trash fa-fw" aria-hidden="true"></i>\n </div>\n <div class="mr-2">\n <i *ngIf="item == effectService.selectedEffect" class="fa fa-caret-down fa-fw" aria-hidden="true"></i>\n <i *ngIf="item != effectService.selectedEffect" class="fa fa-caret-right fa-fw" aria-hidden="true"></i>\n </div>\n </div>\n </button>\n\n <div *ngIf="item.type == \'curve\'" style="min-width: 670px">\n <lib-app-effect-curve [curve]="item" [isSelected]="item == effectService.selectedEffect"></lib-app-effect-curve>\n </div>\n\n <div *ngIf="item.type == \'pan-tilt\'" style="min-width: 500px">\n <lib-app-effect-pan-tilt></lib-app-effect-pan-tilt>\n </div>\n </accordion-group>\n </accordion>\n\n <div class="d-flex mx-auto mt-3">\n <div class="dropdown d-flex">\n <a\n class="btn btn-secondary dropdown-toggle"\n href="#"\n role="button"\n id="dropdownMenuLink"\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n >\n <i class="fa fa-plus" aria-hidden="true"></i> {{ \'designer.effect.add-new\' | translate }}\n </a>\n\n <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">\n <a class="dropdown-item" href="#" (click)="addCurveEffect(); (false)">\n <i class="fa fa-area-chart fa-fw" aria-hidden="true"></i> {{ \'designer.effect.curve\' | translate }}</a\n >\n \x3c!-- <a class="dropdown-item" href="#" (click)="addPanTiltEffect()">\n <i class="fa fa-arrows-alt fa-fw" aria-hidden="true"></i> Pan/Tilt</a> --\x3e\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[pe,be,ye,Te])],e)}(),et=function(){function e(e){this.presetService=e,this.rangeMin=0,this.rangeMax=0,this.defaultValue=0,this.value=0,this.templateValue=0}return Object.defineProperty(e.prototype,"channel",{set:function(e){this._channel=e,this.updateChannel()},enumerable:!0,configurable:!0}),e.prototype.updateChannel=function(){var e,t;if(this.selectedCapability=this._channel.capabilities[0],this.value=this.presetService.getChannelValue(this._channel.name,this.profile.uuid),this.calculateTemplateValue(),this.value>=0)try{for(var i=L(this._channel.capabilities),n=i.next();!n.done;n=i.next()){var r=n.value;if(r.capability.dmxRange.length>0&&r.centerValue===this.value){this.selectedCapability=r;break}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.rangeMin=this.getRangeMin(),this.rangeMax=this.getRangeMax(),this.defaultValue=this.getDefaultValue()},e.prototype.capabilityHasRange=function(){return!(!this._channel.capabilities||1!==this._channel.capabilities.length)||!(!this.selectedCapability||!this.selectedCapability.capability.angleStart)},e.prototype.getRangeMin=function(){return this.selectedCapability.capability.dmxRange.length>0?this.selectedCapability.capability.dmxRange[0]:0},e.prototype.getRangeMax=function(){return this.selectedCapability.capability.dmxRange.length>0?this.selectedCapability.capability.dmxRange[1]:this._channel.maxValue},e.prototype.ngOnInit=function(){},e.prototype.setValue=function(e,t){var i=this;void 0===t&&(t=!1),isNaN(e)||!t&&(e<this.getRangeMin()||e>this.getRangeMax())||(this.value=e,this.calculateTemplateValue(),this.presetService.setChannelValue(this._channel.name,this.profile.uuid,e),this.sliderValue&&(this.valueSetTimer||(this.valueSetTimer=setTimeout((function(){i.sliderValue.nativeElement.value=i.value,i.valueSetTimer=void 0}),30))),this.presetService.previewLive())},e.prototype.calculateTemplateValue=function(){this.templateValue=this.value?this.value:this.getDefaultValue()},e.prototype.getDefaultValue=function(){return this._channel.defaultValue?this._channel.defaultValue:0},e.prototype.changeActive=function(e){e?this.setValue(this.getDefaultValue(),!0):(this.presetService.deleteChannelValue(this._channel.name,this.profile.uuid),this.selectedCapability=this._channel.capabilities[0],this.value=void 0,this.calculateTemplateValue()),this.presetService.previewLive()},e.prototype.capabilitySelected=function(){this.capabilityHasRange?this.setValue(this.selectedCapability.capability.dmxRange[0],!0):this.setValue(this.selectedCapability.centerValue,!0)},e.ctorParameters=function(){return[{type:be}]},T([t.ViewChild("sliderValue",{static:!1}),O("design:type",t.ElementRef)],e.prototype,"sliderValue",void 0),T([t.Input(),O("design:type",Z)],e.prototype,"profile",void 0),T([t.Input(),O("design:type",Y),O("design:paramtypes",[Y])],e.prototype,"channel",null),T([t.Input(),O("design:type",Number)],e.prototype,"capabilityIndex",void 0),e=T([t.Component({selector:"lib-app-fixture-capability-channel",template:'<div class="card border-secondary h-100" [class.capability-deactivated]="value == undefined" style="min-height: 200px">\n <div class="card-header">\n <div class="my-auto">\n <div class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityGeneric{{ capabilityIndex }}Active"\n [ngModel]="value != undefined"\n (ngModelChange)="changeActive($event)"\n />\n <label class="form-check-label" for="capabilityGeneric{{ capabilityIndex }}Active">\n {{ _channel?.name }}\n </label>\n </div>\n </div>\n </div>\n\n <div class="card-body h-100 d-flex" style="flex-direction: column; overflow: hidden">\n <div class="row h-100">\n \x3c!-- display all options, if there is more than one --\x3e\n <div *ngIf="_channel.capabilities?.length > 1" class="col mr-3" style="overflow-y: auto">\n <div *ngFor="let capability of _channel.capabilities; let i = index" class="form-check">\n <input\n [(ngModel)]="selectedCapability"\n (change)="capabilitySelected()"\n class="form-check-input"\n type="radio"\n name="capabilityGeneric{{ capabilityIndex }}Option"\n id="capabilityGeneric{{ capabilityIndex }}Option{{ i }}"\n [value]="capability"\n />\n <label style="max-width: 200px" class="form-check-label" for="capabilityGeneric{{ capabilityIndex }}Option{{ i }}">\n {{ \'designer.fixtureCapabilityType.\' + capability.capability.type | translate\n }}<small><span *ngIf="capability.capability.comment"> - </span> {{ capability.capability.comment }}</small>\n </label>\n </div>\n </div>\n\n \x3c!-- display a slider to select the value for the currently selected capability, if it has a range --\x3e\n <div\n *ngIf="capabilityHasRange()"\n class="col col-auto d-flex mx-auto"\n [class.pl-0]="_channel.capabilities?.length > 1"\n style="flex-direction: column"\n >\n <div class="mb-4 w-100 d-flex">\n <input\n #sliderValue\n class="mx-auto"\n type="text"\n [ngModel]="templateValue"\n (ngModelChange)="setValue($event)"\n style="width: 45px; height: 20px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n\n <div class="h-100 w-100 d-flex">\n <mv-slider\n #slider\n class="mx-auto"\n [value]="templateValue"\n (change)="setValue($event.newValue)"\n [orientation]="\'vertical\'"\n [reversed]="true"\n style="height: 100%"\n [tooltip]="\'hide\'"\n [min]="rangeMin"\n [max]="rangeMax"\n [step]="1"\n ></mv-slider>\n </div>\n </div>\n </div>\n </div>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),O("design:paramtypes",[be])],e)}(),tt=function(){function e(e,t,i){this.presetService=e,this.changeDetectorRef=t,this.fixtureService=i,this.showContainer=!1}return Object.defineProperty(e.prototype,"profile",{set:function(e){this._fixtureProfile=e,this.update()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"channel",{set:function(e){this._channel=e,this.update()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.colorChangeSubscription=this.presetService.fixtureColorChanged.subscribe((function(){e.changeDetectorRef.detectChanges()}))},e.prototype.ngOnDestroy=function(){this.colorChangeSubscription.unsubscribe()},e.prototype.update=function(){var e,t,i,n;if(this._fixtureProfile&&this._channel){this.wheelName=void 0,this.slotCapabilities=[];try{for(var r=L(this._channel.capabilities),o=r.next();!o.done;o=r.next()){if((l=o.value).wheel){this.wheelName=l.wheelName;break}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.wheelName||(this.wheelName=this._channel.name),this.wheel=this.fixtureService.getWheelByName(this._fixtureProfile,this.wheelName);try{for(var s=L(this._channel.capabilities),a=s.next();!a.done;a=s.next()){var l;(l=a.value).capability.type===N.WheelSlot&&this.slotCapabilities.push(l)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}}this.changeDetectorRef.detectChanges()},e.prototype.getCapabilityColorStyle=function(e){var t,i,n,r,o="background-color",s="black",a=[];if(e.wheelSlots)try{for(var l=L(e.wheelSlots),c=l.next();!c.done;c=l.next()){var d=c.value;d.colors.length>0&&(a=a.concat(d.colors))}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}if(a.length>1){var p=void 0;try{for(var h=L(a),u=h.next();!u.done;u=h.next()){var f=u.value;p?p+=", ":p="",p+=f}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}o="background-image",s="linear-gradient(to bottom right, "+p+")"}else s=1===a.length?a[0]:"#fff";var v={};return v[o]=s,v},e.prototype.getCurrentSlotNumber=function(){var e=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.WheelSlot,void 0,this.wheelName,this._fixtureProfile.uuid);if(e)return e.slotNumber},e.prototype.slotCapabilityIsSelected=function(e){var t=this.getCurrentSlotNumber();if(t>=0)return t===e;var i=this.presetService.getApproximatedColorWheelCapability(this.presetService.selectedPreset,this._channel);return!!i&&e===i.capability.slotNumber},e.prototype.changeActive=function(e){e?this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.WheelSlot,void 0,1,void 0,this.wheelName,this._fixtureProfile.uuid):this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.WheelSlot,void 0,this.wheelName,this._fixtureProfile.uuid),this.presetService.previewLive()},e.prototype.selectSlotNumber=function(e){this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.WheelSlot,void 0,e,void 0,this.wheelName,this._fixtureProfile.uuid),this.presetService.previewLive()},e.ctorParameters=function(){return[{type:be},{type:t.ChangeDetectorRef},{type:ue}]},T([t.Input(),O("design:type",Z),O("design:paramtypes",[Z])],e.prototype,"profile",null),T([t.Input(),O("design:type",Y),O("design:paramtypes",[Y])],e.prototype,"channel",null),T([t.Input(),O("design:type",Number)],e.prototype,"wheelIndex",void 0),T([t.Input(),O("design:type",Object)],e.prototype,"showContainer",void 0),e=T([t.Component({selector:"lib-app-fixture-capability-color-wheel",template:'<div class="card border-secondary h-100" [class.capability-deactivated]="getCurrentSlotNumber() == undefined" style="min-height: 200px">\n <div class="card-header">\n <div class="my-auto">\n <div class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityColorWheel{{ wheelIndex }}Active"\n [ngModel]="getCurrentSlotNumber() != undefined"\n (ngModelChange)="changeActive($event)"\n />\n <label class="form-check-label" for="capabilityColorWheel{{ wheelIndex }}Active">\n {{ \'designer.fixture.capability-color\' | translate }}\n </label>\n </div>\n </div>\n </div>\n\n <div class="card-body h-100">\n <div *ngIf="showContainer">{{ _fixtureProfile.name }} - {{ _channel.name }}</div>\n\n <div *ngIf="wheel" class="d-flex" style="max-width: 240px; flex-wrap: wrap">\n <div\n *ngFor="let slot of slotCapabilities; let i = index"\n (click)="selectSlotNumber(slot.capability.slotNumber)"\n class="m-1 color"\n [class.color-selected]="slotCapabilityIsSelected(slot.capability.slotNumber)"\n [ngStyle]="getCapabilityColorStyle(slot)"\n >\n <div\n *ngIf="slotCapabilityIsSelected(slot.capability.slotNumber)"\n (click)="selectSlotNumber(slot.capability.slotNumber)"\n class="color-selected-inner"\n ></div>\n </div>\n </div>\n </div>\n</div>\n',styles:[".color{box-sizing:border-box;width:50px;height:50px;border:1px solid #ced4da;cursor:pointer}.color-selected{border-width:3px;border-color:#fff}.color-selected-inner{border:1px solid #000;height:100%;width:100%}"]}),O("design:paramtypes",[be,t.ChangeDetectorRef,ue])],e)}(),it=function(){function e(e,t,i){var n=this;this.presetService=e,this.fixtureService=t,this.changeDetectorRef=i,this.color="#ffffff",this.active=!1,this.colorPickerMounted=!1,this.updatingColor=!1,this.updateSubscription=this.presetService.previewSelectionChanged.subscribe((function(){n.update(),n.changeDetectorRef.detectChanges()})),this.update()}return e.prototype.update=function(){var e,t,i,n;(n=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Red))&&(e=255*n.valuePercentage),(n=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Green))&&(t=255*n.valuePercentage),(n=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Blue))&&(i=255*n.valuePercentage),void 0!==e&&void 0!==t&&void 0!==i?this.active=!0:(this.active=!1,e=255,t=255,i=255),this.color=this.fixtureService.rgbToHex(e,t,i),this.setPickerColor(e,t,i)},e.prototype.setPickerColor=function(e,t,i){this.updatingColor=!0,this.colorPicker&&(this.colorPicker.color.rgb={r:e,g:t,b:i}),this.updatingColor=!1},e.prototype.ngOnDestroy=function(){this.updateSubscription.unsubscribe()},e.prototype.ngOnInit=function(){this.colorPicker=new iro.ColorPicker("#color-picker-container",{width:180,color:this.color,borderWidth:1,borderColor:"#ffffff",sliderMargin:20}),this.colorPicker.on("color:change",this.changeColor.bind(this)),this.colorPicker.on("input:start",this.mount.bind(this))},e.prototype.mount=function(){this.colorPickerMounted=!0},e.prototype.updateFixtureColor=function(e){this.presetService.selectedPreset&&(e?(this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,e.rgb.r/255,void 0,U.Red),this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,e.rgb.g/255,void 0,U.Green),this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,e.rgb.b/255,void 0,U.Blue)):(this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Red),this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Green),this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.ColorIntensity,U.Blue)),this.changeDetectorRef.detectChanges(),this.presetService.fixtureColorChanged.next(),this.presetService.previewLive())},e.prototype.changeActive=function(e){this.active=e,e?this.updateFixtureColor(this.colorPicker.color):(this.updateFixtureColor(void 0),this.setPickerColor(255,255,255),this.color="#ffffff"),this.presetService.previewLive()},e.prototype.changeColor=function(e){this.colorPickerMounted&&!this.updatingColor&&(this.active=!0,this.color=e.hexString,this.updateFixtureColor(e))},e.ctorParameters=function(){return[{type:be},{type:ue},{type:t.ChangeDetectorRef}]},e=T([t.Component({selector:"lib-app-fixture-capability-color",template:'<div class="card border-secondary h-100" [class.capability-deactivated]="!active">\n <div class="card-header">\n <div class="my-auto" style="float: left">\n <div class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityColorActive"\n [ngModel]="active"\n (ngModelChange)="changeActive($event)"\n />\n <label class="form-check-label" for="capabilityColorActive">{{ \'designer.fixture.capability-color\' | translate }}</label>\n </div>\n </div>\n <div class="pull-right">\n <input type="text" [(ngModel)]="color" style="width: 58px; text-align: center; font-size: 12px; font-family: monospace" />\n </div>\n </div>\n\n <div class="card-body h-100">\n <div id="color-picker-container"></div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[be,ue,t.ChangeDetectorRef])],e)}(),nt=function(){function e(e,t){this.presetService=e,this.changeDetectorRef=t}return e.prototype.ngOnInit=function(){},e.prototype.getValue=function(){var e=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.Intensity);if(e)return e.valuePercentage},e.prototype.getValueText=function(){var e=this.getValue();if(e>=0)return Math.round(100*e*100)/100},e.prototype.setValue=function(e){isNaN(e)||e<0||e>1||(this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.Intensity,e),this.changeDetectorRef.detectChanges(),this.presetService.previewLive())},e.prototype.changeActive=function(e){e?this.setValue(1):(this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.Intensity),this.changeDetectorRef.detectChanges()),this.presetService.previewLive()},e.ctorParameters=function(){return[{type:be},{type:t.ChangeDetectorRef}]},e=T([t.Component({selector:"lib-app-fixture-capability-dimmer",template:'<div class="card border-secondary h-100" [class.capability-deactivated]="getValue() == undefined" style="min-height: 200px">\n <div class="card-header">\n <div class="my-auto">\n <div class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityDimmerActive"\n [ngModel]="getValue() != undefined"\n (ngModelChange)="changeActive($event)"\n />\n <label class="form-check-label" for="capabilityDimmerActive">\n <i class="icon-dimmer"></i>\n </label>\n </div>\n </div>\n </div>\n\n <div class="card-body h-100 d-flex" style="flex-direction: column">\n <div class="mb-4 w-100 d-flex">\n <input\n class="mx-auto"\n type="text"\n [ngModel]="getValueText() >= 0 ? getValueText() : 0"\n (ngModelChange)="setValue($event / 100)"\n style="width: 42px; height: 20px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n\n <div class="h-100 w-100 d-flex">\n <mv-slider\n class="mx-auto"\n [value]="getValue() >= 0 ? getValue() : 0"\n (change)="setValue($event.newValue)"\n [orientation]="\'vertical\'"\n [reversed]="true"\n style="height: 100%"\n [tooltip]="\'hide\'"\n [min]="0"\n [max]="1"\n [step]="0.001"\n ></mv-slider>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[be,t.ChangeDetectorRef])],e)}(),rt=function(){function e(e,t){this.presetService=e,this.changeDetectorRef=t}return e.prototype.ngOnInit=function(){},e.prototype.getValuePan=function(){var e=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.Pan);if(e)return e.valuePercentage},e.prototype.getValueTextPan=function(){var e=this.getValuePan();if(e>=0)return Math.round(100*e*100)/100},e.prototype.setValuePan=function(e){isNaN(e)||e<0||e>1||(this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.Pan,e),this.changeDetectorRef.detectChanges(),this.presetService.previewLive())},e.prototype.getValueTilt=function(){var e=this.presetService.getCapabilityValue(this.presetService.selectedPreset,N.Tilt);if(e)return e.valuePercentage},e.prototype.getValueTextTilt=function(){var e=this.getValueTilt();if(e>=0)return Math.round(100*e*100)/100},e.prototype.setValueTilt=function(e){isNaN(e)||e<0||e>1||(this.presetService.setCapabilityValue(this.presetService.selectedPreset,N.Tilt,e),this.changeDetectorRef.detectChanges(),this.presetService.previewLive())},e.prototype.changeActive=function(e){e?(this.setValuePan(.5),this.setValueTilt(.5)):(this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.Pan),this.presetService.deleteCapabilityValue(this.presetService.selectedPreset,N.Tilt),this.changeDetectorRef.detectChanges()),this.presetService.previewLive()},e.ctorParameters=function(){return[{type:be},{type:t.ChangeDetectorRef}]},e=T([t.Component({selector:"lib-app-fixture-capability-pan-tilt",template:'<div class="card border-secondary h-100" [class.capability-deactivated]="getValuePan() == undefined && getValueTilt() == undefined">\n <div class="card-header">\n <div class="my-auto">\n <div class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityColorWheelActive"\n [ngModel]="getValuePan() != undefined || getValueTilt() != undefined"\n (ngModelChange)="changeActive($event)"\n />\n <label class="form-check-label" for="capabilityColorWheelActive">{{ \'designer.fixture.capability-pan-tilt\' | translate }}</label>\n </div>\n </div>\n </div>\n\n <div class="card-body h-100 d-flex" style="flex-direction: row">\n <div class="d-flex h-100 mr-3" style="flex-direction: column">\n <div class="mb-4 w-100 d-flex">\n <input\n class="mx-auto"\n type="text"\n [ngModel]="getValueTextPan() >= 0 ? getValueTextPan() : 0"\n (ngModelChange)="setValuePan($event / 100)"\n style="width: 42px; height: 20px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n\n <div class="h-100 w-100 d-flex">\n <mv-slider\n class="mx-auto"\n [value]="getValuePan() >= 0 ? getValuePan() : 0"\n (change)="setValuePan($event.newValue)"\n [orientation]="\'vertical\'"\n [reversed]="true"\n style="height: 100%"\n [tooltip]="\'hide\'"\n [min]="0"\n [max]="1"\n [step]="0.001"\n ></mv-slider>\n </div>\n </div>\n\n <div class="d-flex h-100" style="flex-direction: column">\n <div class="mb-4 w-100 d-flex">\n <input\n class="mx-auto"\n type="text"\n [ngModel]="getValueTextTilt() >= 0 ? getValueTextTilt() : 0"\n (ngModelChange)="setValueTilt($event / 100)"\n style="width: 42px; height: 20px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n\n <div class="h-100 w-100 d-flex">\n <mv-slider\n class="mx-auto"\n [value]="getValueTilt() >= 0 ? getValueTilt() : 0"\n (change)="setValueTilt($event.newValue)"\n [orientation]="\'vertical\'"\n [reversed]="true"\n style="height: 100%"\n [tooltip]="\'hide\'"\n [min]="0"\n [max]="1"\n [step]="0.001"\n ></mv-slider>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[be,t.ChangeDetectorRef])],e)}(),ot=function(){function e(e,t,i,n,r){var o=this;this.presetService=e,this.fixtureService=t,this.changeDetectorRef=i,this.projectService=n,this.introService=r,this.colorWheelChannels=new Map,this.fixtureSelectionChangedSubscription=this.presetService.fixtureSelectionChanged.subscribe((function(){o.update()})),this.previewSelectionChangedSubscription=this.presetService.previewSelectionChanged.subscribe((function(){o.update()})),this.introService.stepChanged.subscribe((function(){o.changeDetectorRef.detectChanges()}))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.fixtureSelectionChangedSubscription.unsubscribe(),this.previewSelectionChangedSubscription.unsubscribe()},e.prototype.wheelInList=function(e,t,i){return e.forEach((function(e,n){if(n.uuid===t.uuid&&e.name===i.name)return!0})),!1},e.prototype.updateColorWheels=function(){var e,t,i,n,r,o;if(this.colorWheelChannels=new Map,this.presetService.selectedPreset)try{for(var s=L(this.presetService.selectedPreset.fixtureUuids),a=s.next();!a.done;a=s.next()){var l=a.value,c=this.fixtureService.getCachedFixtureByUuid(l);try{for(var d=(i=void 0,L(c.channels)),p=d.next();!p.done;p=d.next()){var h=p.value;try{for(var u=(r=void 0,L(h.capabilities)),f=u.next();!f.done;f=u.next()){var v=f.value;v.wheel&&v.wheelSlots&&v.wheelSlots.length>0&&(this.fixtureService.wheelHasSlotType(v.wheel,E.Color)?this.wheelInList(this.colorWheelChannels,c.profile,h)||this.colorWheelChannels.set(c.profile,h):this.fixtureService.wheelHasSlotType(v.wheel,E.Gobo))}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},e.prototype.update=function(){this.updateColorWheels(),this.changeDetectorRef.detectChanges()},e.prototype.isChrome=function(){return-1!==navigator.appVersion.indexOf("Chrome/")},e.ctorParameters=function(){return[{type:be},{type:ue},{type:t.ChangeDetectorRef},{type:he},{type:Ae}]},e=T([t.Component({selector:"lib-app-fixture-capability",template:'<div class="card border-secondary panel h-100" [class.card-intro-active]="introService.showStep(\'capabilities\')">\n <div class="card-body capability-container d-flex h-100" style="overflow-y: hidden">\n \x3c!-- h-100 needs to be applied in chrome to avoid performance issues with many layouts (reflows)\n during sliding. But the class must not be applied e.g. in Safari, because the bottom margin is not correct\n anymore afterwards. --\x3e\n <div *ngIf="presetService.selectedPreset" class="row m-0 pl-3" [class.h-100]="isChrome()">\n \x3c!-- Dimmer --\x3e\n \x3c!-- the height attribute is required to avoid performance issues with many layouts (reflows)\n in Chrome during sliding --\x3e\n <div *ngIf="presetService.hasCapabilityDimmer()" class="col col-auto p-0 my-3 mr-3" style="height: calc(100% - 2rem)">\n <lib-app-fixture-capability-dimmer></lib-app-fixture-capability-dimmer>\n </div>\n\n \x3c!-- Color --\x3e\n \x3c!-- Also show for color wheel fixtures to approx. the color --\x3e\n <div *ngIf="presetService.hasCapabilityColorOrColorWheel()" class="col col-auto p-0 my-3 mr-3" style="height: calc(100% - 2rem)">\n <lib-app-fixture-capability-color></lib-app-fixture-capability-color>\n </div>\n\n \x3c!-- Color wheels --\x3e\n <div\n *ngFor="let entry of colorWheelChannels | keyvalue; let i = index"\n class="col col-auto p-0 my-3 mr-3"\n style="height: calc(100% - 2rem)"\n >\n <lib-app-fixture-capability-color-wheel\n [profile]="entry.key"\n [channel]="entry.value"\n [wheelIndex]="i"\n [showContainer]="colorWheelChannels.size > 1"\n ></lib-app-fixture-capability-color-wheel>\n </div>\n\n \x3c!-- Pan/Tilt --\x3e\n <div *ngIf="presetService.hasCapabilityPanTilt()" class="col col-auto p-0 my-3 mr-3" style="height: calc(100% - 2rem)">\n <lib-app-fixture-capability-pan-tilt></lib-app-fixture-capability-pan-tilt>\n </div>\n\n \x3c!-- Fix spacing at the end --\x3e\n <div class="col col-auto p-0 my-3 mr-3">&nbsp;</div>\n </div>\n\n <div *ngIf="projectService.project.fixtures.length == 0" class="m-auto">\n <p class="m-auto" style="color: #717171">{{ \'designer.fixture.no-fixtures\' | translate }}</p>\n </div>\n\n <div\n *ngIf="\n projectService.project.fixtures.length > 0 && presetService.selectedPreset && presetService.selectedPreset.fixtureUuids.length == 0\n "\n class="m-auto"\n >\n <p class="m-auto" style="color: #717171">{{ \'designer.fixture.no-fixtures-selected\' | translate }}</p>\n </div>\n </div>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),O("design:paramtypes",[be,ue,t.ChangeDetectorRef,he,Ae])],e)}(),st=function(){function e(e,t,i){var n=this;this.presetService=e,this.changeDetectorRef=t,this.projectService=i,this.channelCapabilities=new Map,this.profiles=[],this.selectedProfiles=[],this.fixtureSelectionChangedSubscription=this.presetService.fixtureSelectionChanged.subscribe((function(){n.calculateProfiles()})),this.previewSelectionChangedSubscription=this.presetService.previewSelectionChanged.subscribe((function(){n.calculateProfiles()}))}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.fixtureSelectionChangedSubscription.unsubscribe(),this.previewSelectionChangedSubscription.unsubscribe()},e.prototype.calculateChannelCapabilities=function(){this.channelCapabilities=this.presetService.getSelectedProfileChannels(this.selectedProfiles),this.changeDetectorRef.detectChanges()},e.prototype.calculateProfiles=function(){this.profiles=this.presetService.getSelectedProfiles(),this.selectedProfiles=B(this.profiles),this.calculateChannelCapabilities()},e.prototype.changeProfileSelection=function(e,t){this.selectedProfiles.indexOf(t)>=0?this.selectedProfiles.splice(this.selectedProfiles.indexOf(t),1):this.selectedProfiles.push(t),this.calculateChannelCapabilities()},e.prototype.isChrome=function(){return-1!==navigator.appVersion.indexOf("Chrome/")},e.ctorParameters=function(){return[{type:be},{type:t.ChangeDetectorRef},{type:he}]},e=T([t.Component({selector:"lib-app-fixture-channel",template:'<div class="card border-secondary panel h-100">\n <div class="card-body capability-container d-flex h-100" style="overflow-y: hidden">\n \x3c!-- h-100 needs to be applied in chrome to avoid performance issues with many layouts (reflows)\n during sliding. But the class must not be applied e.g. in Safari, because the bottom margin is not correct\n anymore afterwards. --\x3e\n <div *ngIf="presetService.selectedPreset" class="row m-0 pl-3" [class.h-100]="isChrome()">\n \x3c!-- profile selection --\x3e\n <div\n *ngIf="profiles.length > 1"\n class="col col-auto p-3 my-3 mr-3"\n style="height: calc(100% - 2rem); border: solid 1px #444; border-right: none"\n >\n <div *ngFor="let profile of profiles; let i = index" class="form-check">\n <input\n type="checkbox"\n class="form-check-input"\n id="capabilityFilter{{ i }}"\n [ngModel]="selectedProfiles.indexOf(profile) >= 0"\n (ngModelChange)="changeProfileSelection($event, profile)"\n />\n <label class="form-check-label" for="capabilityFilter{{ i }}">\n {{ profile.name }}\n </label>\n </div>\n </div>\n\n \x3c!-- all channel capabilities --\x3e\n <ng-container *ngFor="let entry of channelCapabilities | keyvalue; let i = index">\n <div *ngFor="let capability of entry.value; let j = index" class="col col-auto p-0 my-3 mr-3" style="height: calc(100% - 2rem)">\n <lib-app-fixture-capability-channel [profile]="entry.key" [channel]="capability" [capabilityIndex]="i * 10000 + j">\n </lib-app-fixture-capability-channel>\n </div>\n </ng-container>\n\n \x3c!-- fix spacing at the end --\x3e\n <div class="col col-auto p-0 my-3 mr-3">&nbsp;</div>\n </div>\n\n <div *ngIf="projectService.project.fixtures.length == 0" class="m-auto">\n <p class="m-auto" style="color: #717171">{{ \'designer.fixture.no-fixtures\' | translate }}</p>\n </div>\n\n <div\n *ngIf="\n projectService.project.fixtures.length > 0 && presetService.selectedPreset && presetService.selectedPreset.fixtureUuids.length == 0\n "\n class="m-auto"\n >\n <p class="m-auto" style="color: #717171">{{ \'designer.fixture.no-fixtures-selected\' | translate }}</p>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[be,t.ChangeDetectorRef,he])],e)}(),at=function(){function e(e,t){var i=this;this.fixtureService=e,this.presetService=t,this.selectUndefinedOptionValue=void 0,this.selectedPositioning=void 0,this.positionX=0,this.positionY=0,this.positionZ=0,this.positionXMin=-400,this.positionXMax=400,this.positionYMin=0,this.positionYMax=400,this.positionZMin=-400,this.positionZMax=400,this.rotationX=0,this.rotationY=0,this.rotationZ=0,this.rotationMin=0,this.rotationMax=360,t.fixtureSelectionSettingsChanged.subscribe((function(){i.updateSelection()}))}return e.prototype.ngOnInit=function(){},e.prototype.updateSelection=function(){var e,t,i,n,r,o,s,a,l,c,d,p,h,u;this.selectedPositioning=void 0,this.positionX=void 0,this.positionY=void 0,this.positionZ=void 0,this.rotationX=void 0,this.rotationY=void 0,this.rotationZ=void 0;try{for(var f=L(this.fixtureService.selectedSettingsFixtures),v=f.next();!v.done;v=f.next()){var g=v.value;if(this.selectedPositioning){if(this.selectedPositioning!==g.positioning){this.selectedPositioning=void 0;break}}else this.selectedPositioning=g.positioning}}catch(t){e={error:t}}finally{try{v&&!v.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=L(this.fixtureService.selectedSettingsFixtures),y=m.next();!y.done;y=m.next()){g=y.value;if(this.positionX){if(this.positionX!==g.positionX){this.positionX=void 0;break}}else this.positionX=g.positionX}}catch(e){i={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(i)throw i.error}}try{for(var b=L(this.fixtureService.selectedSettingsFixtures),x=b.next();!x.done;x=b.next()){g=x.value;if(this.positionY){if(this.positionY!==g.positionY){this.positionY=void 0;break}}else this.positionY=g.positionY}}catch(e){r={error:e}}finally{try{x&&!x.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}try{for(var S=L(this.fixtureService.selectedSettingsFixtures),w=S.next();!w.done;w=S.next()){g=w.value;if(this.positionZ){if(this.positionZ!==g.positionZ){this.positionZ=void 0;break}}else this.positionZ=g.positionZ}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=S.return)&&a.call(S)}finally{if(s)throw s.error}}try{for(var C=L(this.fixtureService.selectedSettingsFixtures),j=C.next();!j.done;j=C.next()){g=j.value;if(this.rotationX){if(this.rotationX!==g.rotationX){this.rotationX=void 0;break}}else this.rotationX=g.rotationX}}catch(e){l={error:e}}finally{try{j&&!j.done&&(c=C.return)&&c.call(C)}finally{if(l)throw l.error}}try{for(var M=L(this.fixtureService.selectedSettingsFixtures),P=M.next();!P.done;P=M.next()){g=P.value;if(this.rotationY){if(this.rotationY!==g.rotationY){this.rotationY=void 0;break}}else this.rotationY=g.rotationY}}catch(e){d={error:e}}finally{try{P&&!P.done&&(p=M.return)&&p.call(M)}finally{if(d)throw d.error}}try{for(var k=L(this.fixtureService.selectedSettingsFixtures),I=k.next();!I.done;I=k.next()){g=I.value;if(this.rotationZ){if(this.rotationZ!==g.rotationZ){this.rotationZ=void 0;break}}else this.rotationZ=g.rotationZ}}catch(e){h={error:e}}finally{try{I&&!I.done&&(u=k.return)&&u.call(k)}finally{if(h)throw h.error}}},e.prototype.changePosition=function(e){var t,i,n=_[e];try{for(var r=L(this.fixtureService.selectedSettingsFixtures),o=r.next();!o.done;o=r.next()){o.value.positioning=n}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}},e.prototype.changePositionManual=function(e,t){var i,n;if(!isNaN(t)){"x"===e?t>=this.positionXMin&&t<=this.positionXMax&&(this.positionX=+t):"y"===e?t>=this.positionYMin&&t<=this.positionYMax&&(this.positionY=+t):"z"===e&&t>=this.positionZMin&&t<=this.positionZMax&&(this.positionZ=+t);try{for(var r=L(this.fixtureService.selectedSettingsFixtures),o=r.next();!o.done;o=r.next()){var s=o.value;"x"===e?t>=this.positionXMin&&t<=this.positionXMax&&(s.positionX=+t):"y"===e?t>=this.positionYMin&&t<=this.positionYMax&&(s.positionY=+t):"z"===e&&t>=this.positionZMin&&t<=this.positionZMax&&(s.positionZ=+t)}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}},e.prototype.changeRotationManual=function(e,t){var i,n;if(!(isNaN(t)||t<this.rotationMin||t>this.rotationMax)){"x"===e?this.rotationX=+t:"y"===e?this.rotationY=+t:"z"===e&&(this.rotationZ=+t);try{for(var r=L(this.fixtureService.selectedSettingsFixtures),o=r.next();!o.done;o=r.next()){var s=o.value;"x"===e?s.rotationX=+t:"y"===e?s.rotationY=+t:"z"===e&&(s.rotationZ=+t)}}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}},e.ctorParameters=function(){return[{type:ue},{type:be}]},e=T([t.Component({selector:"lib-app-fixture-settings-position",template:'<div class="card border-secondary h-100">\n <div class="card-header">\n {{ \'designer.fixture.setting-position-title\' | translate }}\n </div>\n\n <div *ngIf="fixtureService.selectedSettingsFixtures.length > 0" class="card-body h-100">\n <div>\n <select class="mb-2" style="width: 140px" [(ngModel)]="selectedPositioning" (change)="changePosition($event.target.value)">\n <option [ngValue]="selectUndefinedOptionValue"></option>\n <option value="topFront">{{ \'designer.fixture.setting-position-front-top\' | translate }}</option>\n <option value="bottomFront">{{ \'designer.fixture.setting-position-front-bottom\' | translate }}</option>\n <option value="topBack">{{ \'designer.fixture.setting-position-back-top\' | translate }}</option>\n <option value="bottomBack">{{ \'designer.fixture.setting-position-back-bottom\' | translate }}</option>\n <option value="manual">{{ \'designer.fixture.setting-position-manual\' | translate }}</option>\n </select>\n </div>\n\n <div *ngIf="selectedPositioning == \'manual\'">\n <div>{{ \'designer.fixture.setting-position\' | translate }}</div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">X</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="positionX ? positionX : (positionXMax + positionXMin) / 2"\n [min]="positionXMin"\n [max]="positionXMax"\n [step]="1"\n (change)="changePositionManual(\'x\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="positionX" (ngModelChange)="changePositionManual(\'x\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">Y</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px; height: 18px"\n [tooltip]="\'hide\'"\n [value]="positionZ ? positionZ : (positionZMax + positionZMin) / 2"\n [min]="positionZMin"\n [max]="positionZMax"\n [step]="1"\n (change)="changePositionManual(\'z\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="positionZ" (ngModelChange)="changePositionManual(\'z\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">Z</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="positionY ? positionY : (positionYMax + positionYMin) / 2"\n [min]="positionYMin"\n [max]="positionYMax"\n [step]="1"\n (change)="changePositionManual(\'y\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="positionY" (ngModelChange)="changePositionManual(\'y\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n\n <div class="mt-2">{{ \'designer.fixture.setting-rotation\' | translate }}</div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">X</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="rotationX ? rotationX : (rotationMin + rotationMax) / 2"\n [min]="rotationMin"\n [max]="rotationMax"\n [step]="1"\n (change)="changeRotationManual(\'x\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="rotationX" (ngModelChange)="changeRotationManual(\'x\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">Y</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px; height: 18px"\n [tooltip]="\'hide\'"\n [value]="rotationZ ? rotationZ : (rotationMin + rotationMax) / 2"\n [min]="rotationMin"\n [max]="rotationMax"\n [step]="1"\n (change)="changeRotationManual(\'z\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="rotationZ" (ngModelChange)="changeRotationManual(\'z\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n <div class="d-flex">\n <div class="my-auto" style="width: 20px; float: left">Z</div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 80px"\n [tooltip]="\'hide\'"\n [value]="rotationY ? rotationY : (rotationMin + rotationMax) / 2"\n [min]="rotationMin"\n [max]="rotationMax"\n [step]="1"\n (change)="changeRotationManual(\'y\', $event.newValue)"\n ></mv-slider>\n </div>\n <div class="my-auto">\n <input [ngModel]="rotationY" (ngModelChange)="changeRotationManual(\'y\', $event)" type="text" class="slider-input" />\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf="fixtureService.selectedSettingsFixtures.length == 0" class="card-body h-100 d-flex">\n <p class="m-auto" style="color: #717171">{{ \'designer.fixture.no-fixtures-settings-selected\' | translate }}</p>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[ue,be])],e)}(),lt=function(){function e(e,t,i){this.projectService=e,this.previewService=t,this.changeDetectorRef=i}return e.prototype.ngOnInit=function(){},e.prototype.update=function(){this.previewService.updateStage(),this.changeDetectorRef.detectChanges()},e.ctorParameters=function(){return[{type:he},{type:Ce},{type:t.ChangeDetectorRef}]},e=T([t.Component({selector:"lib-app-fixture-settings-stage",template:'<div class="card border-secondary h-100">\n <div class="card-header">\n {{ \'designer.fixture.setting-stage\' | translate }}\n </div>\n\n <div class="card-body h-100">\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-width\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stageWidthCm"\n [min]="100"\n [max]="2000"\n [step]="5"\n (change)="projectService.project.stageWidthCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stageWidthCm"\n (ngModelChange)="projectService.project.stageWidthCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-height\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stageHeightCm"\n [min]="100"\n [max]="2000"\n [step]="5"\n (change)="projectService.project.stageHeightCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stageHeightCm"\n (ngModelChange)="projectService.project.stageHeightCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-depth\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stageDepthCm"\n [min]="100"\n [max]="2000"\n [step]="5"\n (change)="projectService.project.stageDepthCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stageDepthCm"\n (ngModelChange)="projectService.project.stageDepthCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-floor-height\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stageFloorHeightCm"\n [min]="1"\n [max]="1000"\n [step]="5"\n (change)="projectService.project.stageFloorHeightCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stageFloorHeightCm"\n (ngModelChange)="projectService.project.stageFloorHeightCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-ceiling-height\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stageCeilingHeightCm"\n [min]="1"\n [max]="1000"\n [step]="5"\n (change)="projectService.project.stageCeilingHeightCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stageCeilingHeightCm"\n (ngModelChange)="projectService.project.stageCeilingHeightCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n\n <div class="d-flex">\n <div class="my-auto" style="width: 120px; float: left">\n {{ \'designer.fixture.setting-stage-pillar-width\' | translate }}\n </div>\n <div class="my-auto" style="float: left">\n <mv-slider\n style="width: 140px"\n [tooltip]="\'hide\'"\n [value]="projectService.project.stagePillarWidthCm"\n [min]="1"\n [max]="200"\n [step]="5"\n (change)="projectService.project.stagePillarWidthCm = $event.newValue; update()"\n >\n </mv-slider>\n </div>\n <div class="my-auto">\n <input\n type="text"\n [ngModel]="projectService.project.stagePillarWidthCm"\n (ngModelChange)="projectService.project.stagePillarWidthCm = $event; update()"\n class="slider-input-readonly"\n readonly\n />\n </div>\n <div class="my-auto ml-1" style="color: darkgray">cm</div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[he,Ce,t.ChangeDetectorRef])],e)}(),ct=function(){function e(e,t){this.fixtureService=e,this.presetService=t,this.dmxChannels=[];for(var i=0;i<512;i++)this.dmxChannels.push(0)}return e.prototype.ngOnInit=function(){},e.prototype.isChrome=function(){return-1!==navigator.appVersion.indexOf("Chrome/")},e.ctorParameters=function(){return[{type:ue},{type:be}]},e=T([t.Component({selector:"lib-app-fixture-settings",template:'<div class="card border-secondary panel h-100">\n <div class="card-body capability-container d-flex h-100" style="overflow-y: hidden">\n \x3c!-- h-100 needs to be applied in chrome to avoid performance issues with many layouts (reflows)\n during sliding. But the class must not be applied e.g. in Safari, because the bottom margin is not correct\n anymore afterwards. --\x3e\n <div class="row m-0 pl-3" [class.h-100]="isChrome()">\n \x3c!-- Position --\x3e\n <div class="col col-auto p-0 my-3 mr-3">\n <lib-app-fixture-settings-position></lib-app-fixture-settings-position>\n </div>\n\n \x3c!-- Stage --\x3e\n <div class="col col-auto p-0 my-3 mr-3">\n <lib-app-fixture-settings-stage></lib-app-fixture-settings-stage>\n </div>\n\n \x3c!-- Fix spacing at the end --\x3e\n <div class="col col-auto p-0 my-3 mr-3">&nbsp;</div>\n </div>\n </div>\n</div>\n',styles:[".dmx-channel{display:flex;float:left;width:28px;border:1px solid #fff;margin-left:-1px;margin-bottom:-1px}.dmx-channel-occupied{background-color:#fd7e14;border-left:none;border-right:none;cursor:move}.dmx-channel-occupied-start{border-left:1px solid #fff}.dmx-channel-occupied-end{border-right:1px solid #fff}"]}),O("design:paramtypes",[ue,be])],e)}(),dt=function(){function e(e,t,i,n,r){this.projectService=e,this.presetService=t,this.fixturePoolService=i,this.fixtureService=n,this.introService=r}return e.prototype.ngOnInit=function(){},e.prototype.fixtureIsSelected=function(e){return this.fixtureService.settingsSelection?this.fixtureService.settingsFixtureIsSelected(e):this.presetService.fixtureIsSelected(e)},e.prototype.selectFixture=function(e,t){this.fixtureService.settingsSelection?(this.fixtureService.switchSettingsFixtureSelection(t),this.presetService.fixtureSelectionSettingsChanged.next()):(this.presetService.switchFixtureSelection(t),this.presetService.fixtureSelectionChanged.next(),this.presetService.previewLive())},e.prototype.selectAll=function(){this.presetService.selectAllFixtures(),this.presetService.fixtureSelectionChanged.next()},e.prototype.selectNone=function(){this.presetService.selectNoFixtures(),this.presetService.fixtureSelectionChanged.next()},e.prototype.openFixturePool=function(){this.fixturePoolService.open()},e.ctorParameters=function(){return[{type:he},{type:be},{type:He},{type:ue},{type:Ae}]},e=T([t.Component({selector:"lib-app-fixture",template:'<div class="card border-secondary h-100 panel" [class.card-intro-active]="introService.showStep(\'fixtures\')">\n <div class="card-header d-flex">\n <div>Fixtures</div>\n <div class="ml-auto">\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="selectNone(); (false)"\n ><i class="fa fa-square-o fa-fw" aria-hidden="true"></i\n ></a>\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="selectAll(); (false)"\n ><i class="fa fa-check-square-o fa-fw" aria-hidden="true"></i\n ></a>\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="openFixturePool(); (false)"\n ><i class="fa fa-cog fa-fw" aria-hidden="true"></i\n ></a>\n </div>\n </div>\n\n <div class="card-body h-100 p-0">\n \x3c!-- List of fixtures --\x3e\n <div *ngIf="presetService.selectedPreset" class="list-group" [sortablejs]="projectService.project.fixtures">\n <div\n class="list-group-item"\n *ngFor="let item of projectService.project.fixtures"\n [class.inactive-list-item]="!fixtureIsSelected(item)"\n >\n <div class="row d-flex" (click)="selectFixture($event, item)" style="cursor: pointer">\n <div class="col-auto list-sort-handle my-auto" style="cursor: move; cursor: -webkit-grabbing">\n <i class="fa fa-bars" aria-hidden="true"></i>\n </div>\n <div class="form-check">\n <input type="checkbox" class="form-check-input" id="active" [ngModel]="fixtureIsSelected(item)" />\n </div>\n <div>\n <span class="icon-{{ fixtureService.getFixtureIconClass(fixtureService.getProfileByUuid(item.profileUuid)) }} mr-1"></span>\n {{ item.name }}\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf="projectService.project.fixtures.length == 0" class="w-100 h-100 d-flex p-3 text-center">\n <a href="#" class="m-auto" (click)="openFixturePool(); (false)"\n ><i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i> {{ \'designer.fixture.no-fixtures\' | translate }}</a\n >\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[he,be,He,ue,Ae])],e)}(),pt=function(){function e(e){this.introService=e}return e.prototype.ngOnInit=function(){},e.prototype.close=function(){this.introService.setShowIntro(!1)},e.ctorParameters=function(){return[{type:Ae}]},e=T([t.Component({selector:"lib-app-intro",template:'<div\n *ngIf="introService.showIntro"\n class="card border-secondary h-100 panel card-intro-active"\n [ngStyle]="{\n top: \'calc(\' + introService.positionTopPercentage + \'% - 150px)\',\n left: \'calc(\' + introService.positionLeftPercentage + \'% - 200px)\'\n }"\n>\n <div class="card-header d-flex">\n <div>\n <i class="fa fa-info-circle mr-1" aria-hidden="true"></i>\n {{ \'designer.intro.title-\' + introService.activeStep | translate }}\n </div>\n <div class="ml-auto">\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="close(); (false)"><i class="fa fa-times" aria-hidden="true"></i></a>\n </div>\n </div>\n\n <div class="card-body h-100">\n <p>{{ \'designer.intro.step-\' + introService.activeStep | translate }}</p>\n </div>\n\n <div class="card-footer">\n <button *ngIf="introService.activeStep != \'start\'" type="button" class="btn btn-secondary" (click)="introService.back()">\n <i class="fa fa-chevron-left" aria-hidden="true"></i> {{ \'designer.intro.back\' | translate }}\n </button>\n <button *ngIf="introService.activeStep != \'finish\'" type="button" class="btn btn-secondary pull-right" (click)="introService.next()">\n {{ \'designer.intro.next\' | translate }} <i class="fa fa-chevron-right" aria-hidden="true"></i>\n </button>\n <button *ngIf="introService.activeStep == \'finish\'" type="button" class="btn btn-secondary pull-right" (click)="close()">\n {{ \'designer.intro.close\' | translate }}\n </button>\n </div>\n</div>\n',styles:[".card{position:absolute;width:400px;height:350px!important;z-index:999999}"]}),O("design:paramtypes",[Ae])],e)}(),ht=function(){function e(e,t,i){this.projectService=e,this.changeDetectorRef=t,this.presetService=i}return e.prototype.ngOnInit=function(){},e.prototype.setValue=function(e){isNaN(e)||e<0||e>1||(this.projectService.project.masterDimmerValue=e,this.changeDetectorRef.detectChanges(),this.presetService.previewLive())},e.prototype.getValue=function(){return Math.round(100*this.projectService.project.masterDimmerValue*100)/100},e.ctorParameters=function(){return[{type:he},{type:t.ChangeDetectorRef},{type:be}]},e=T([t.Component({selector:"lib-app-master-dimmer",template:'<div class="card border-secondary h-100">\n \x3c!-- For larger screens vertically --\x3e\n <div class="d-none d-md-flex card-body h-100" style="flex-direction: column">\n <div class="mb-3 w-100 d-flex">\n <i class="icon-dimmer m-auto" style="font-size: 2em"></i>\n </div>\n\n <div class="mb-4 w-100 d-flex">\n <input\n class="mx-auto"\n type="text"\n [ngModel]="getValue()"\n (ngModelChange)="setValue($event / 100)"\n style="width: 42px; height: 23px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n\n <div class="h-100 w-100 d-flex">\n <mv-slider\n class="mx-auto"\n [value]="projectService?.project?.masterDimmerValue"\n (change)="setValue($event.newValue)"\n [orientation]="\'vertical\'"\n [reversed]="true"\n style="height: 100%"\n [tooltip]="\'hide\'"\n [min]="0"\n [max]="1"\n [step]="0.001"\n ></mv-slider>\n </div>\n </div>\n\n \x3c!-- For smaller screens horizontally --\x3e\n <div class="d-flex d-md-none card-body h-100">\n <div class="mb-3 d-flex my-auto">\n <i class="icon-dimmer m-auto" style="font-size: 2em"></i>\n </div>\n\n <div class="h-100 w-100 d-flex my-auto mx-3">\n <mv-slider\n class="mx-auto"\n [value]="projectService?.project?.masterDimmerValue"\n (change)="setValue($event.newValue)"\n [orientation]="\'horizontal\'"\n style="width: 100%"\n [tooltip]="\'hide\'"\n [min]="0"\n [max]="1"\n [step]="0.001"\n ></mv-slider>\n </div>\n\n <div class="mb-4 d-flex my-auto">\n <input\n class="mx-auto"\n type="text"\n [ngModel]="getValue()"\n (ngModelChange)="setValue($event / 100)"\n style="width: 42px; height: 23px; text-align: center; font-size: 12px; font-family: monospace"\n />\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[he,t.ChangeDetectorRef,be])],e)}(),ut=function(){function e(e){this.bsModalRef=e}return e.prototype.ngOnInit=function(){this.name=this.preset.name,this.startMillis=this.preset.startMillis,this.endMillis=this.preset.endMillis,this.fadeInMillis=this.preset.fadeInMillis,this.fadeOutMillis=this.preset.fadeOutMillis,this.fadeInPre=this.preset.fadeInPre,this.fadeOutPost=this.preset.fadeOutPost},e.prototype.ok=function(){this.preset.name=this.name,void 0===this.startMillis||null===this.startMillis||""===this.startMillis?this.preset.startMillis=void 0:!isNaN(this.startMillis)&&this.startMillis>=0&&(this.preset.startMillis=+this.startMillis),void 0===this.endMillis||null===this.endMillis||""===this.endMillis?this.preset.endMillis=void 0:!isNaN(this.endMillis)&&this.endMillis>=0&&(this.preset.endMillis=+this.endMillis),!isNaN(this.fadeInMillis)&&this.fadeInMillis>=0&&(this.preset.fadeInMillis=+this.fadeInMillis),!isNaN(this.fadeOutMillis)&&this.fadeOutMillis>=0&&(this.preset.fadeOutMillis=+this.fadeOutMillis),this.preset.fadeInPre=this.fadeInPre,this.preset.fadeOutPost=this.fadeOutPost,this.bsModalRef.hide()},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-preset-settings",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ name }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-name\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="name" (ngModelChange)="name = $event" />\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-start\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="startMillis" (ngModelChange)="startMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-end\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="endMillis" (ngModelChange)="endMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-fade-in\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="fadeInMillis" (ngModelChange)="fadeInMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label"></label>\n <div class="col-lg-8 d-flex">\n <div class="form-check my-auto">\n <input type="checkbox" [ngModel]="fadeInPre" (ngModelChange)="fadeInPre = $event" class="form-check-input" id="fadeInPre" />\n\n <label class="form-check-label" for="fadeInPre">\n {{ \'designer.preset.settings-fade-in-pre\' | translate }}\n </label>\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-fade-out\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="fadeOutMillis" (ngModelChange)="fadeOutMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label"></label>\n <div class="col-lg-8 d-flex">\n <div class="form-check my-auto">\n <input type="checkbox" [ngModel]="fadeOutPost" (ngModelChange)="fadeOutPost = $event" class="form-check-input" id="fadeOutPost" />\n\n <label class="form-check-label" for="fadeOutPost">\n {{ \'designer.preset.settings-fade-out-post\' | translate }}\n </label>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef])],e)}(),ft=function(){function e(e,t,i,n,r){this.presetService=e,this.sceneService=t,this.projectService=i,this.introService=n,this.modalService=r}return e.prototype.ngOnInit=function(){},e.prototype.selectPreset=function(e){this.projectService.project.previewPreset=!0,this.presetService.selectPreset(e)},e.prototype.enableCheckbox=function(){return this.sceneService.selectedScenes&&1===this.sceneService.selectedScenes.length},e.prototype.activatePreset=function(e,t){if(this.sceneService.selectedScenes&&1===this.sceneService.selectedScenes.length){var i=this.projectService.project.presets[t].uuid;if(e)this.sceneService.selectedScenes[0].presetUuids.push(i);else for(var n=0;n<this.sceneService.selectedScenes[0].presetUuids.length;n++)if(this.sceneService.selectedScenes[0].presetUuids[n]===i)return void this.sceneService.selectedScenes[0].presetUuids.splice(n,1)}},e.prototype.addPreset=function(){this.presetService.addPreset(),this.sceneService.selectedScenes&&1===this.sceneService.selectedScenes.length&&this.sceneService.selectedScenes[0].presetUuids.push(this.presetService.selectedPreset.uuid)},e.prototype.removePreset=function(){this.presetService.selectedPreset&&(this.projectService.project.presets.splice(this.projectService.project.presets.indexOf(this.presetService.selectedPreset),1),this.presetService.selectPreset(0))},e.prototype.openSettings=function(e){this.modalService.show(ut,{keyboard:!0,ignoreBackdropClick:!1,class:"",initialState:{preset:e}})},e.ctorParameters=function(){return[{type:be},{type:xe},{type:he},{type:Ae},{type:n.BsModalService}]},e=T([t.Component({selector:"lib-app-preset",template:'<div\n class="card border-secondary h-100 panel card-intro-preset card-intro-active"\n [class.card-intro-active]="introService.showStep(\'presets\')"\n>\n <div class="card-header d-flex">\n <div>\n {{ \'designer.preset.title\' | translate }}\n </div>\n <div class="ml-auto">\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="removePreset(); (false)"\n ><i class="fa fa-minus-circle fa-fw" aria-hidden="true"></i\n ></a>\n <a href="#" class="btn btn-secondary m-0, p-0" (click)="addPreset(); (false)"\n ><i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i\n ></a>\n </div>\n </div>\n\n <div class="card-body h-100 p-0">\n \x3c!-- List of presets --\x3e\n <div class="list-group" [sortablejs]="projectService.project.presets">\n <div\n class="list-group-item"\n *ngFor="let item of projectService.project.presets; let i = index"\n (click)="selectPreset(i)"\n [class.active-light]="!projectService.project.previewPreset && item == presetService.selectedPreset"\n [class.active]="projectService.project.previewPreset && item == presetService.selectedPreset"\n [class.inactive-list-item]="!sceneService.presetIsSelected(item)"\n >\n <div class="row d-flex" style="cursor: pointer">\n <div class="col-auto list-sort-handle my-auto" style="cursor: move; cursor: -webkit-grabbing">\n <i class="fa fa-bars" aria-hidden="true"></i>\n </div>\n <div class="form-check">\n <input\n type="checkbox"\n [disabled]="!enableCheckbox()"\n class="form-check-input"\n id="active"\n [ngModel]="sceneService.presetIsSelected(item)"\n (ngModelChange)="activatePreset($event, i)"\n (click)="$event.stopPropagation()"\n />\n </div>\n <div>\n {{ item.name }}\n </div>\n <div class="my-auto ml-auto mr-2 d-flex">\n <button type="button" class="btn btn-secondary btn-sm py-0 px-1" (click)="openSettings(item); (false)">...</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[be,xe,he,Ae,n.BsModalService])],e)}(),vt=function(){function e(e){this.bsModalRef=e}return e.prototype.ngOnInit=function(){this.name=this.scene.name,this.fadeInMillis=this.scene.fadeInMillis,this.fadeOutMillis=this.scene.fadeOutMillis,this.fadeInPre=this.scene.fadeInPre,this.fadeOutPost=this.scene.fadeOutPost},e.prototype.ok=function(){this.scene.name=this.name,!isNaN(this.fadeInMillis)&&this.fadeInMillis>=0&&(this.scene.fadeInMillis=+this.fadeInMillis),!isNaN(this.fadeOutMillis)&&this.fadeOutMillis>=0&&(this.scene.fadeOutMillis=+this.fadeOutMillis),this.scene.fadeInPre=this.fadeInPre,this.scene.fadeOutPost=this.fadeOutPost,this.bsModalRef.hide()},e.prototype.cancel=function(){this.bsModalRef.hide()},e.prototype.handleKeyboardEvent=function(e){this.ok()},e.ctorParameters=function(){return[{type:n.BsModalRef}]},T([t.HostListener("document:keydown.enter",["$event"]),O("design:type",Function),O("design:paramtypes",[Object]),O("design:returntype",void 0)],e.prototype,"handleKeyboardEvent",null),e=T([t.Component({selector:"lib-scene-settings",template:'<div class="modal-header">\n <h4 class="modal-title pull-left">{{ name }}</h4>\n <button type="button" class="close pull-right" aria-label="Close" (click)="bsModalRef.hide()">\n <span aria-hidden="true">&times;</span>\n </button>\n</div>\n<div class="modal-body">\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.preset.settings-name\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="name" (ngModelChange)="name = $event" />\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.scene.settings-fade-in\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="fadeInMillis" (ngModelChange)="fadeInMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label"></label>\n <div class="col-lg-8 d-flex">\n <div class="form-check my-auto">\n <input type="checkbox" [ngModel]="fadeInPre" (ngModelChange)="fadeInPre = $event" class="form-check-input" id="fadeInPre" />\n\n <label class="form-check-label" for="fadeInPre">\n {{ \'designer.scene.settings-fade-in-pre\' | translate }}\n </label>\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label">{{ \'designer.scene.settings-fade-out\' | translate }}</label>\n <div class="col-lg-7">\n <input type="text" class="form-control" [ngModel]="fadeOutMillis" (ngModelChange)="fadeOutMillis = $event" />\n </div>\n <div class="col-lg-1 d-flex p-0">\n <div class="my-auto">\n {{ \'designer.misc.ms\' | translate }}\n </div>\n </div>\n </div>\n\n <div class="form-group row">\n <label class="col-lg-4 col-form-label"></label>\n <div class="col-lg-8 d-flex">\n <div class="form-check my-auto">\n <input type="checkbox" [ngModel]="fadeOutPost" (ngModelChange)="fadeOutPost = $event" class="form-check-input" id="fadeOutPost" />\n\n <label class="form-check-label" for="fadeOutPost">\n {{ \'designer.scene.settings-fade-out-post\' | translate }}\n </label>\n </div>\n </div>\n </div>\n</div>\n<div class="modal-footer">\n <a class="mr-3 my-auto" href="#" role="button" (click)="cancel(); (false)">\n {{ \'designer.misc.cancel\' | translate }}\n </a>\n <button type="button" class="btn btn-primary" (click)="ok()">{{ \'designer.misc.ok\' | translate }}</button>\n</div>\n',styles:[""]}),O("design:paramtypes",[n.BsModalRef])],e)}(),gt=function(){function e(e,t,i,n,r){this.sceneService=e,this.presetService=t,this.projectService=i,this.modalService=n,this.introService=r}return e.prototype.ngOnInit=function(){},e.prototype.selectScene=function(e,t){this.sceneService.selectScene(t)},e.prototype.removeScene=function(){0!==this.sceneService.selectedScenes.length&&this.sceneService.removeScene(this.sceneService.selectedScenes[0])},e.prototype.openSettings=function(e){this.modalService.show(vt,{keyboard:!0,ignoreBackdropClick:!1,class:"",initialState:{scene:e}})},e.ctorParameters=function(){return[{type:xe},{type:be},{type:he},{type:n.BsModalService},{type:Ae}]},e=T([t.Component({selector:"lib-app-scene",template:'<div class="card border-secondary panel h-100" [class.card-intro-active]="introService.showStep(\'scenes\')">\n <div class="card-header d-flex">\n <div>\n {{ \'designer.scene.title\' | translate }}\n </div>\n <div class="ml-auto">\n <a\n href="#"\n class="d-none d-md-inline-block btn btn-secondary m-0 p-0"\n [class.text-primary]="sceneService.multipleSelection == true"\n (click)="sceneService.multipleSelection = !sceneService.multipleSelection; (false)"\n ><i class="fa fa-object-group fa-fw" aria-hidden="true"></i\n ></a>\n <a href="#" class="d-none d-md-inline-block btn btn-secondary m-0 p-0" (click)="removeScene(); (false)"\n ><i class="fa fa-minus-circle fa-fw" aria-hidden="true"></i\n ></a>\n <a href="#" class="d-none d-md-inline-block btn btn-secondary m-0 p-0" (click)="sceneService.addScene(); (false)"\n ><i class="fa fa-plus-circle fa-fw" aria-hidden="true"></i\n ></a>\n </div>\n </div>\n <div class="card-body border-secondary p-0">\n \x3c!-- List of scenes --\x3e\n <div class="list-group" [sortablejs]="projectService.project.scenes">\n <div\n *ngFor="let scene of projectService.project.scenes; let i = index"\n class="list-group-item"\n [class.active-light]="projectService.project.previewPreset && sceneService.sceneIsSelected(scene)"\n [class.active]="!projectService.project.previewPreset && sceneService.sceneIsSelected(scene)"\n >\n <div class="row d-flex" (click)="selectScene($event, i)" style="cursor: pointer">\n <div class="d-none d-md-block col-auto list-sort-handle my-auto" style="cursor: move; cursor: -webkit-grabbing">\n <i class="fa fa-bars" aria-hidden="true"></i>\n </div>\n <div class="my-auto">\n {{ scene.name }}\n </div>\n <div class="my-auto ml-auto mr-2 d-flex">\n <svg class="my-auto" height="20" width="20">\n <circle cx="10" cy="10" r="9" stroke="white" stroke-width="1" [attr.fill]="scene.color" />\n </svg>\n </div>\n <div class="d-none d-md-flex my-auto mr-2">\n <button type="button" class="btn btn-secondary btn-sm py-0 px-1" (click)="openSettings(scene); (false)">...</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n',styles:[""]}),O("design:paramtypes",[xe,be,he,n.BsModalService,Ae])],e)}(),mt=function(){function e(){}return e=T([t.NgModule({declarations:[qe,Fe,ke,Ke,Je,gt,Xe,it,dt,at,ot,ct,Qe,Ee,ft,ht,nt,Ze,_e,Ye,rt,et,st,tt,ze,Ge,Oe,Ie,Le,Be,Ne,lt,pt,ut,vt,Ve,De],imports:[h.RouterModule.forRoot([]),x.BrowserModule,S.BrowserAnimationsModule,d.HttpClientModule,b.FormsModule,w.NgxBootstrapSliderModule,i.TranslateModule,C.AccordionModule,j.PopoverModule,M.TypeaheadModule,k.SortablejsModule,P.DropzoneModule,r.ToastrModule.forRoot({newestOnTop:!0})],exports:[qe]})],e)}();e.DesignerComponent=qe,e.DesignerModule=mt,e.DesignerService=D,e.ɵa=ke,e.ɵb=ue,e.ɵba=it,e.ɵbb=dt,e.ɵbc=at,e.ɵbd=ot,e.ɵbe=ct,e.ɵbf=Qe,e.ɵbg=Ee,e.ɵbh=ft,e.ɵbi=ht,e.ɵbj=nt,e.ɵbk=Ze,e.ɵbl=_e,e.ɵbm=Ye,e.ɵbn=rt,e.ɵbo=et,e.ɵbp=st,e.ɵbq=tt,e.ɵbr=ze,e.ɵbs=Ge,e.ɵbt=Oe,e.ɵbu=Ie,e.ɵbv=Le,e.ɵbw=Be,e.ɵbx=Ne,e.ɵby=lt,e.ɵbz=pt,e.ɵc=he,e.ɵca=ut,e.ɵcb=vt,e.ɵcc=Ve,e.ɵcd=De,e.ɵd=pe,e.ɵe=de,e.ɵf=fe,e.ɵg=ge,e.ɵh=Ce,e.ɵi=be,e.ɵj=ye,e.ɵk=me,e.ɵl=xe,e.ɵm=Se,e.ɵn=we,e.ɵo=Xe,e.ɵp=We,e.ɵq=Te,e.ɵr=Ae,e.ɵs=He,e.ɵt=$e,e.ɵu=Re,e.ɵv=Ue,e.ɵw=Fe,e.ɵx=Ke,e.ɵy=Je,e.ɵz=gt,Object.defineProperty(e,"__esModule",{value:!0})}));
17
- //# sourceMappingURL=rocketshow-designer.umd.min.js.map