@crystaldesign/diva-web-planner-react 26.12.0-beta.6 → 26.12.0-beta.7

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 (250) hide show
  1. package/build/esm/{Planner2DGrid-90422c94.js → Planner2DGrid-351fcfa9.js} +1 -1
  2. package/build/esm/{Planner3DImage-2cad26f6.js → Planner3DImage-b26b30ee.js} +1 -1
  3. package/build/esm/{UnlockCard-85c42be2.js → UnlockCard-d9af992e.js} +1 -1
  4. package/build/esm/{index-78a79457.js → index-033066ec.js} +3 -3
  5. package/build/esm/{index-a3b46bc8.js → index-03978692.js} +1 -1
  6. package/build/esm/{index-8d55d873.js → index-04581a81.js} +1 -1
  7. package/build/esm/{index-1d8ae802.js → index-050e4114.js} +4 -4
  8. package/build/esm/{index-a79397f5.js → index-059777a7.js} +1 -1
  9. package/build/esm/{index-5952816a.js → index-05da5a3e.js} +1 -1
  10. package/build/esm/{index-afeda90a.js → index-05edd091.js} +1 -1
  11. package/build/esm/{index-7efaf646.js → index-06579426.js} +5 -5
  12. package/build/esm/{index-4382050d.js → index-07b2df3d.js} +1 -1
  13. package/build/esm/{index-98e1fe75.js → index-0c3fc35f.js} +1 -1
  14. package/build/esm/{index-d65c56ac.js → index-0c6d07c4.js} +1 -1
  15. package/build/esm/{index-b7576a79.js → index-0caf88ad.js} +1 -1
  16. package/build/esm/{index-b917ac5f.js → index-0e064b18.js} +1 -1
  17. package/build/esm/{index-ad05d6de.js → index-0e500e68.js} +1 -1
  18. package/build/esm/{index-6410dab4.js → index-0fbcbbd4.js} +3 -3
  19. package/build/esm/{index-16452413.js → index-10054b8b.js} +1 -1
  20. package/build/esm/{index-7e9862c4.js → index-12095822.js} +1 -1
  21. package/build/esm/{index-25473302.js → index-126bcb95.js} +1 -1
  22. package/build/esm/{index-44c25769.js → index-136e295b.js} +1 -1
  23. package/build/esm/{index-1b60201e.js → index-14e8654c.js} +66 -66
  24. package/build/esm/{index-655d7806.js → index-1536c574.js} +18 -18
  25. package/build/esm/{index-39805683.js → index-177d33fa.js} +2 -2
  26. package/build/esm/{index-56ca1b7c.js → index-17f08221.js} +1 -1
  27. package/build/esm/{index-40f556c2.js → index-18ecdcdc.js} +2 -2
  28. package/build/esm/{index-3dac3720.js → index-19259e88.js} +1 -1
  29. package/build/esm/{index-3075d288.js → index-1a334d36.js} +2 -2
  30. package/build/esm/{index-16358f14.js → index-1a537420.js} +68 -68
  31. package/build/esm/{index-aea584c9.js → index-1bf84d61.js} +1 -1
  32. package/build/esm/{index-1500b94b.js → index-1d7fc5fe.js} +1 -1
  33. package/build/esm/{index-83925247.js → index-2055b6f8.js} +1 -1
  34. package/build/esm/{index-6cf021c5.js → index-21570d15.js} +2 -2
  35. package/build/esm/{index-1222da5a.js → index-23becd91.js} +1 -1
  36. package/build/esm/{index-a27b505c.js → index-24a4d0c7.js} +1 -1
  37. package/build/esm/{index-97eca9c6.js → index-24b99557.js} +1 -1
  38. package/build/esm/{index-54723444.js → index-2648ae49.js} +2 -2
  39. package/build/esm/{index-170a180d.js → index-27d8f0ff.js} +3 -3
  40. package/build/esm/{index-a29f2027.js → index-28efc245.js} +1 -1
  41. package/build/esm/{index-88de2cfe.js → index-29d4ff31.js} +1 -1
  42. package/build/esm/{index-3a3f7711.js → index-2c5c77a1.js} +1 -1
  43. package/build/esm/{index-89e1a302.js → index-2cd1003e.js} +1 -1
  44. package/build/esm/{index-a900ba21.js → index-2f590bbc.js} +4 -4
  45. package/build/esm/{index-f5562719.js → index-2f91e6aa.js} +1 -1
  46. package/build/esm/{index-5c7b63a7.js → index-30f0d497.js} +1 -1
  47. package/build/esm/{index-80a8f35d.js → index-3248b8cf.js} +2 -2
  48. package/build/esm/{index-6f80fd80.js → index-32c52d75.js} +2 -2
  49. package/build/esm/{index-8f025413.js → index-32f548c5.js} +70 -70
  50. package/build/esm/{index-41fb0a25.js → index-343e11cc.js} +1 -1
  51. package/build/esm/{index-b453eceb.js → index-35e4b42d.js} +1 -1
  52. package/build/esm/{index-a7c2005a.js → index-379d3784.js} +3 -3
  53. package/build/esm/{index-3459024d.js → index-38380527.js} +1 -1
  54. package/build/esm/{index-90396534.js → index-3946a264.js} +1 -1
  55. package/build/esm/{index-dafbf948.js → index-3a3a828e.js} +1 -1
  56. package/build/esm/{index-dfa8cfd2.js → index-3b4351f1.js} +1 -1
  57. package/build/esm/{index-e311ed48.js → index-3c571d02.js} +1 -1
  58. package/build/esm/{index-5b5ddba6.js → index-3c942959.js} +1 -1
  59. package/build/esm/{index-5705a605.js → index-3d6c758f.js} +4 -4
  60. package/build/esm/{index-777ff4da.js → index-3f957758.js} +5 -5
  61. package/build/esm/{index-bc1b0bb4.js → index-426b5700.js} +1 -1
  62. package/build/esm/{index-9eaf7ac9.js → index-47ffb930.js} +3 -3
  63. package/build/esm/{index-8f6717c4.js → index-49408fbc.js} +3 -3
  64. package/build/esm/{index-71d1fdcd.js → index-4a9ef7d6.js} +3 -3
  65. package/build/esm/{index-29afa55d.js → index-4b2bb65f.js} +1 -1
  66. package/build/esm/{index-2cb2fbd6.js → index-4b46f068.js} +21 -21
  67. package/build/esm/{index-0d7c84a8.js → index-4b497e67.js} +17 -17
  68. package/build/esm/{index-0848ed84.js → index-4ba8e740.js} +2 -2
  69. package/build/esm/{index-ed1844f6.js → index-4bc6c7c8.js} +2 -2
  70. package/build/esm/{index-293afc69.js → index-4dbc631f.js} +2 -2
  71. package/build/esm/{index-75607df4.js → index-4fa3cd34.js} +18 -18
  72. package/build/esm/{index-97f6064f.js → index-5204f9c9.js} +1 -1
  73. package/build/esm/{index-4eed9572.js → index-53bb7867.js} +1 -1
  74. package/build/esm/{index-5212a5a1.js → index-5554f093.js} +100 -100
  75. package/build/esm/{index-7d8e97ec.js → index-55fd95c6.js} +1 -1
  76. package/build/esm/{index-798c9f36.js → index-57a756b9.js} +66 -66
  77. package/build/esm/{index-b3900c0a.js → index-594f0677.js} +1 -1
  78. package/build/esm/{index-0cf63083.js → index-59f98c3b.js} +90 -90
  79. package/build/esm/{index-dd74bc13.js → index-5b91aa9c.js} +1 -1
  80. package/build/esm/{index-5f08fd13.js → index-5c9a5c1b.js} +1 -1
  81. package/build/esm/{index-3a18ff19.js → index-5cac93f7.js} +1 -1
  82. package/build/esm/{index-d9371cef.js → index-5d120545.js} +20 -20
  83. package/build/esm/{index-9ff8c54e.js → index-5d68db07.js} +5 -5
  84. package/build/esm/{index-ce752a83.js → index-5db10e55.js} +1 -1
  85. package/build/esm/{index-94636f21.js → index-5de7b664.js} +70 -70
  86. package/build/esm/{index-acafbb10.js → index-5f4177fe.js} +1 -1
  87. package/build/esm/{index-d356173e.js → index-5fb0c25e.js} +1 -1
  88. package/build/esm/{index-3138e841.js → index-61506eba.js} +71 -71
  89. package/build/esm/{index-003bf7fa.js → index-65d5b702.js} +2 -2
  90. package/build/esm/{index-7adbc7e0.js → index-6637369d.js} +1 -1
  91. package/build/esm/{index-6e85525e.js → index-69f941a6.js} +65 -65
  92. package/build/esm/{index-17c36a75.js → index-6ac6ea5c.js} +6 -6
  93. package/build/esm/{index-862f784f.js → index-6c65351e.js} +5 -5
  94. package/build/esm/{index-0d159567.js → index-6eabd972.js} +1 -1
  95. package/build/esm/{index-02e34b14.js → index-6f2a6b72.js} +2 -2
  96. package/build/esm/{index-dbeca409.js → index-6f97cf56.js} +2 -2
  97. package/build/esm/{index-0cd9cfd2.js → index-6fb40eb1.js} +1 -1
  98. package/build/esm/{index-9c8f03d3.js → index-71844fbd.js} +25 -25
  99. package/build/esm/{index-52225ea2.js → index-7367d086.js} +8 -8
  100. package/build/esm/{index-5f76c38c.js → index-742c5a5f.js} +1 -1
  101. package/build/esm/{index-b8b4898e.js → index-74830dcb.js} +1 -1
  102. package/build/esm/{index-16e9a474.js → index-778acbe8.js} +3 -3
  103. package/build/esm/{index-64905bf3.js → index-7870babc.js} +68 -68
  104. package/build/esm/{index-ec3f1690.js → index-7926d7b1.js} +1 -1
  105. package/build/esm/{index-73edd8cb.js → index-7d1e358a.js} +1 -1
  106. package/build/esm/{index-f3d08df6.js → index-7e5e4b47.js} +2 -2
  107. package/build/esm/{index-07c98739.js → index-8134d051.js} +1 -1
  108. package/build/esm/{index-4c153c7f.js → index-822ea961.js} +1 -1
  109. package/build/esm/{index-42bfc84e.js → index-82351fdc.js} +3 -3
  110. package/build/esm/{index-15bbccf2.js → index-83d4043c.js} +2 -2
  111. package/build/esm/{index-c29dfa17.js → index-84f7fc4d.js} +1 -1
  112. package/build/esm/{index-ff887283.js → index-851351b5.js} +3 -3
  113. package/build/esm/{index-af965bf8.js → index-875e238c.js} +91 -91
  114. package/build/esm/{index-02974e4c.js → index-87bfd475.js} +2 -2
  115. package/build/esm/{index-f3be62b0.js → index-88424d74.js} +1 -1
  116. package/build/esm/{index-e11499bf.js → index-8888cd89.js} +7 -7
  117. package/build/esm/{index-4482dc49.js → index-8cf8a252.js} +2 -2
  118. package/build/esm/{index-5e8ad13e.js → index-8d01b515.js} +3 -3
  119. package/build/esm/{index-eba7fa77.js → index-901eafb1.js} +1 -1
  120. package/build/esm/{index-6c75fa05.js → index-94142e63.js} +1 -1
  121. package/build/esm/{index-69a88a91.js → index-973c2b6a.js} +1 -1
  122. package/build/esm/{index-2c2426cb.js → index-976b3ba2.js} +5 -5
  123. package/build/esm/{index-10dc1d30.js → index-97c284d4.js} +1 -1
  124. package/build/esm/{index-61fb9027.js → index-98e74088.js} +15 -15
  125. package/build/esm/{index-2ad4360f.js → index-9b35e467.js} +8 -8
  126. package/build/esm/{index-5f563829.js → index-9c18892b.js} +1 -1
  127. package/build/esm/{index-1ce72a05.js → index-9f5435d3.js} +18 -18
  128. package/build/esm/{index-fa10fe41.js → index-9f9a0bcc.js} +3 -3
  129. package/build/esm/{index-59163eeb.js → index-9fe8cae5.js} +1 -1
  130. package/build/esm/{index-82f26d47.js → index-a0f4955a.js} +1 -1
  131. package/build/esm/{index-0e0be162.js → index-a2f154e9.js} +1 -1
  132. package/build/esm/{index-ae40a7b4.js → index-a2f28c75.js} +13 -13
  133. package/build/esm/{index-043f23b3.js → index-a429113b.js} +1 -1
  134. package/build/esm/{index-36841c48.js → index-a4315fe5.js} +1 -1
  135. package/build/esm/{index-f151f65b.js → index-a7364e32.js} +2 -2
  136. package/build/esm/{index-b3e69632.js → index-a79b8412.js} +5 -5
  137. package/build/esm/{index-b1814c7d.js → index-ae03a27a.js} +2 -2
  138. package/build/esm/{index-225b862e.js → index-af628b89.js} +3 -3
  139. package/build/esm/{index-34a38286.js → index-af638b15.js} +90 -90
  140. package/build/esm/{index-a6a85e14.js → index-afde54a6.js} +3 -3
  141. package/build/esm/{index-67032952.js → index-b06519e5.js} +5 -5
  142. package/build/esm/{index-73cef0ab.js → index-b15d24db.js} +3 -3
  143. package/build/esm/{index-1d9f2d66.js → index-b1f8a298.js} +1 -1
  144. package/build/esm/{index-9138207e.js → index-b3697c70.js} +3 -3
  145. package/build/esm/{index-d6cdb84e.js → index-b3d99c77.js} +5 -5
  146. package/build/esm/{index-7bfcbdb1.js → index-b43536be.js} +73 -73
  147. package/build/esm/{index-6cb66c72.js → index-b4be6f5b.js} +5 -5
  148. package/build/esm/{index-b42c4d6f.js → index-b57b69c4.js} +1 -1
  149. package/build/esm/{index-39a2d398.js → index-b8ade8f8.js} +7 -7
  150. package/build/esm/{index-7df5f614.js → index-b8b117be.js} +5 -5
  151. package/build/esm/{index-cb590ab4.js → index-b91e9787.js} +1 -1
  152. package/build/esm/{index-10f3273f.js → index-ba872ddb.js} +1 -1
  153. package/build/esm/{index-07eeff5c.js → index-bb8d15c0.js} +1 -1
  154. package/build/esm/{index-fa662cfb.js → index-bc577e3d.js} +69 -69
  155. package/build/esm/{index-511187b2.js → index-bd113404.js} +18 -18
  156. package/build/esm/{index-15f821bf.js → index-bd21e855.js} +3 -3
  157. package/build/esm/{index-7c3178f4.js → index-be9ad08a.js} +8 -8
  158. package/build/esm/{index-119e9305.js → index-c012a2ed.js} +2 -2
  159. package/build/esm/{index-a89b9a3a.js → index-c0c42faf.js} +1 -1
  160. package/build/esm/{index-491b16af.js → index-c0e74dfc.js} +2 -2
  161. package/build/esm/{index-6ff43caf.js → index-c0e87c12.js} +1 -1
  162. package/build/esm/{index-0fed8ca1.js → index-c4562b96.js} +2 -2
  163. package/build/esm/{index-87475ea1.js → index-c57626ee.js} +2 -2
  164. package/build/esm/{index-e858267f.js → index-c67c50dd.js} +1 -1
  165. package/build/esm/{index-5052aa11.js → index-c6e407b2.js} +1 -1
  166. package/build/esm/{index-391b568f.js → index-c8b15464.js} +87 -87
  167. package/build/esm/{index-9c281263.js → index-c8c03a88.js} +1 -1
  168. package/build/esm/{index-8a296c87.js → index-c92d9bf7.js} +1 -1
  169. package/build/esm/{index-d2f59180.js → index-ca1f69ed.js} +5 -5
  170. package/build/esm/{index-6acf9e4b.js → index-ccdc4e56.js} +1 -1
  171. package/build/esm/{index-f37899a6.js → index-ce85df63.js} +4 -4
  172. package/build/esm/{index-32e26f42.js → index-ce99aa1c.js} +1 -1
  173. package/build/esm/{index-bb6264ed.js → index-d0037da3.js} +1 -1
  174. package/build/esm/{index-f7935a6a.js → index-d045bb0a.js} +1 -1
  175. package/build/esm/{index-8ca114fb.js → index-d39bf823.js} +244 -225
  176. package/build/esm/{index-3f5b550b.js → index-d3e8aa8e.js} +2 -2
  177. package/build/esm/{index-4daaee3e.js → index-d460bc49.js} +73 -73
  178. package/build/esm/{index-5f0a7772.js → index-d57986ba.js} +76 -76
  179. package/build/esm/{index-555b5a74.js → index-d6ee0346.js} +2 -2
  180. package/build/esm/{index-ccff7191.js → index-d840b1cd.js} +1 -1
  181. package/build/esm/{index-20c1a67a.js → index-d87fd518.js} +4 -4
  182. package/build/esm/{index-24ebdba0.js → index-d8c5f4ba.js} +3 -3
  183. package/build/esm/{index-5f92a3c6.js → index-d8e7cc63.js} +85 -85
  184. package/build/esm/{index-55efabbc.js → index-d9c69d53.js} +1 -1
  185. package/build/esm/{index-53224842.js → index-d9dbfde6.js} +67 -67
  186. package/build/esm/{index-94344b1e.js → index-dab3ccc0.js} +1 -1
  187. package/build/esm/{index-fd5a2399.js → index-db279c2b.js} +65 -65
  188. package/build/esm/{index-22781432.js → index-dc0f3f11.js} +22 -22
  189. package/build/esm/{index-7445bfb8.js → index-dd6c27d3.js} +1 -1
  190. package/build/esm/{index-f0ffaf38.js → index-dd782d92.js} +2 -2
  191. package/build/esm/{index-72a62e79.js → index-deb6e747.js} +101 -101
  192. package/build/esm/{index-5a6ed6b7.js → index-df912561.js} +84 -84
  193. package/build/esm/{index-328a7682.js → index-df9bbda3.js} +6 -6
  194. package/build/esm/{index-1d86704a.js → index-e03cbb08.js} +2 -2
  195. package/build/esm/{index-2ce18bbd.js → index-e0f6dc69.js} +2 -2
  196. package/build/esm/{index-1bfc980a.js → index-e25a17ce.js} +1 -1
  197. package/build/esm/{index-864b2dfa.js → index-e2c6bf52.js} +1 -1
  198. package/build/esm/{index-3ead2988.js → index-e6835143.js} +2 -2
  199. package/build/esm/{index-b5a49205.js → index-e73253fa.js} +1 -1
  200. package/build/esm/{index-13b84c1c.js → index-e7f088ed.js} +1 -1
  201. package/build/esm/{index-e98896c6.js → index-e881d9fe.js} +1 -1
  202. package/build/esm/{index-d2323c97.js → index-e8b36100.js} +1 -1
  203. package/build/esm/{index-bd3c9902.js → index-e97a73d6.js} +19 -19
  204. package/build/esm/{index-08dd90a8.js → index-ea17190c.js} +1 -1
  205. package/build/esm/{index-f732b1b1.js → index-ec7e3b86.js} +1 -1
  206. package/build/esm/{index-b3f2e09d.js → index-edc4af0f.js} +2 -2
  207. package/build/esm/{index-6f05eeed.js → index-f0f126df.js} +2 -2
  208. package/build/esm/{index-2c467ca7.js → index-f19be8aa.js} +5 -5
  209. package/build/esm/{index-64930e07.js → index-f1d1f133.js} +1 -1
  210. package/build/esm/{index-44ae7457.js → index-f3197b3d.js} +1 -1
  211. package/build/esm/{index-29bf1b1e.js → index-f374f2ac.js} +1 -1
  212. package/build/esm/{index-3b9db430.js → index-f3f0dc82.js} +1 -1
  213. package/build/esm/{index-c51aade0.js → index-f522e2b9.js} +1 -1
  214. package/build/esm/{index-e573a361.js → index-f7b64d0c.js} +1 -1
  215. package/build/esm/{index-2df12c01.js → index-f847f4ec.js} +2 -2
  216. package/build/esm/{index-cd81c5bd.js → index-f8fcb5e6.js} +1 -1
  217. package/build/esm/{index-3beb94e5.js → index-f9045289.js} +1 -1
  218. package/build/esm/{index-d3a45895.js → index-f9d40c13.js} +1 -1
  219. package/build/esm/{index-42248468.js → index-fa261e48.js} +1 -1
  220. package/build/esm/{index-39a54c88.js → index-fb76c76d.js} +89 -89
  221. package/build/esm/{index-9815dfa5.js → index-fbb7c0ba.js} +5 -5
  222. package/build/esm/{index-54b4b979.js → index-ff0688d9.js} +3 -3
  223. package/build/esm/{index-70623795.js → index-ffe66d65.js} +1 -1
  224. package/build/esm/index.js +1 -1
  225. package/build/esm/{index.module-170a54f7.js → index.module-180ea833.js} +1 -1
  226. package/build/esm/{index.module-a6aa2989.js → index.module-6675eef2.js} +1 -1
  227. package/build/esm/{index.module-bc29c89c.js → index.module-7623b421.js} +1 -1
  228. package/build/esm/{index.module-0df16fdf.js → index.module-848941a9.js} +1 -1
  229. package/build/esm/{index.module-41eda03f.js → index.module-af3af215.js} +1 -1
  230. package/build/esm/{index.module-37d5e912.js → index.module-b7197b99.js} +1 -1
  231. package/build/esm/{index.module-01841a55.js → index.module-d4d1d7a6.js} +1 -1
  232. package/build/esm/{index.module-ff883bdf.js → index.module-f70a8f3f.js} +1 -1
  233. package/build/esm/{useCustomDimensions-28a1d729.js → useCustomDimensions-aa2187f4.js} +1 -1
  234. package/build/esm/{ussIsSticky-0d9204a0.js → ussIsSticky-5aab23a1.js} +1 -1
  235. package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts +8 -0
  236. package/build/types/web-planner-react/src/model/DivaViewHandler.d.ts.map +1 -1
  237. package/build/umd/1110.diva-web-planner-react.umd.min.js +1 -1
  238. package/build/umd/1492.diva-web-planner-react.umd.min.js +1 -1
  239. package/build/umd/3596.diva-web-planner-react.umd.min.js +1 -1
  240. package/build/umd/3898.diva-web-planner-react.umd.min.js +1 -1
  241. package/build/umd/7118.diva-web-planner-react.umd.min.js +1 -1
  242. package/build/umd/8445.diva-web-planner-react.umd.min.js +1 -1
  243. package/build/umd/8616.diva-web-planner-react.umd.min.js +1 -1
  244. package/build/umd/8701.diva-web-planner-react.umd.min.js +1 -1
  245. package/build/umd/9054.diva-web-planner-react.umd.min.js +1 -1
  246. package/build/umd/9446.diva-web-planner-react.umd.min.js +1 -1
  247. package/build/umd/9715.diva-web-planner-react.umd.min.js +1 -1
  248. package/build/umd/diva-web-planner-react.umd.min.js +1 -1
  249. package/build/umd/report.html +1 -1
  250. package/package.json +10 -10
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 1492.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1492,7801,1897,3525,3090,9290,8938,8445,4580,4723,2352,4516,8616],{37801:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function BoxCopy(e){var t=e.rect,n=e.item,o=e.plannerUIProps,i=e.invertLeftRight;return(0,r.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),{x:"BoxCopyLeft"==n.type?-1:"BoxCopyRight"==n.type?1:0,y:"BoxCopyTop"==n.type?1:0,z:0})},style:{left:t.left+"%",top:100-t.top+"%"},className:l()(o.classes.buttonGeneral,o.classes.copy.BoxPlannerCopy.copyGlobal,"BoxCopyLeft"==n.type?i?o.classes.copy.BoxPlannerCopy.copyRight:o.classes.copy.BoxPlannerCopy.copyLeft:void 0,"BoxCopyTop"==n.type?o.classes.copy.BoxPlannerCopy.copyTop:void 0,"BoxCopyRight"==n.type?i?o.classes.copy.BoxPlannerCopy.copyLeft:o.classes.copy.BoxPlannerCopy.copyRight:void 0)})}))},67348:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function ElementCopy(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",top:n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?n.top+"%":n.top+"px"},className:l()(i.classes.copy.ElementCopy,i.classes.buttonGeneral)})}))},33525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function DistanceToGround(e){var t=e.item,n=e.plannerUIProps;return(0,r.jsx)("div",{style:{left:t.position.x+"%",top:100-t.position.y+"%"},id:"distanceToGround",className:l()(n.classes.dimension.distanceToGround),children:(0,r.jsx)("div",{children:t.dimensionVal+" cm"})})}))},53090:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVL(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVL.avl,a?i.classes.dockingPoint.AVL.avlSel:void 0)})}))},59290:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVR(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVR.avr,a?i.classes.dockingPoint.AVR.avrSel:void 0),children:n.posNr})}))},18938:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function DPACC(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,n.dockToElementId)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left+"px",top:"percentage"==n.position.interpretation?t.top+"%":t.top+"px"},className:l()(i.classes.buttonGeneral,"2D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccDocking:i.classes.dockingPoint.DPACC.dp2DAccNotDocking:void 0,"2D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccNotDockingSel:void 0,"3D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccDocking:i.classes.dockingPoint.DPACC.dp3DAccNotDocking:void 0,"3D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccNotDockingSel:void 0),children:n.posNr})}))},88445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(34988),l=n(65515),i=n.n(l),r=n(9420),s=n(87363),c=n(62227),a=n(47514),u=new c.FM(0,0);const d=(0,r.Pi)((function Outline(e){var t,n,l=e.item,r=e.plannerUIProps,d=(0,s.useState)(!1),p=(0,o.Z)(d,2),f=p[0],v=p[1],m=(0,s.useState)(l.position.x),h=(0,o.Z)(m,2),g=h[0],y=h[1],C=(0,s.useState)(l.position.y),x=(0,o.Z)(C,2),P=x[0],I=x[1],w=!1;return(0,a.jsx)("div",{onClick:function onClick(){var e;null===(e=l.clickFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId))},onMouseDown:function onMouseDown(e){w=!0,u=new c.FM(e.clientX,e.clientY)},onTouchStart:function onTouchStart(e){1==e.touches.length&&(w=!0,u=new c.FM(e.touches[0].clientX,e.touches[0].clientY))},onMouseMove:function onMouseMove(e){var t,n;w&&!f&&(v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId)));f&&(null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.clientX-u.x,e.clientY-u.y)),y(g+e.clientX-u.x),I(P+e.clientY-u.y),u.x=e.clientX,u.y=e.clientY);w=!1},onTouchMove:function onTouchMove(e){if(1==e.touches.length){var t,n;if(w&&!f)v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId));if(f)null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.touches[0].clientX-u.x,e.touches[0].clientY-u.y)),y(g+e.touches[0].clientX-u.x),I(P+e.touches[0].clientY-u.y),u.x=e.touches[0].clientX,u.y=e.touches[0].clientY;w=!1}},onMouseUp:function onMouseUp(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},onTouchEnd:function onTouchEnd(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},style:{left:g+"px",top:P+"px",width:(null==l||null===(t=l.size)||void 0===t?void 0:t.x)+"px",height:(null==l||null===(n=l.size)||void 0===n?void 0:n.y)+"px",transform:"rotate("+(null==l?void 0:l.rotOfElement)+"deg)"},className:i()(f?r.classes.outline.outline2D.draggableActive:void 0,"selected"==l.elemState?r.classes.outline.outline2D.draggable:void 0,"selectable"==l.elemState?r.classes.outline.outline2D.selectable:void 0)})}))},24580:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(75327)),s=n(47514);const c=(0,i.Pi)((function PosNr(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=e.hasTrash,a=(0,r.NP)(),u="percentage"==n.position.interpretation?t.top+"%":t.top+"px";return u=c&&t.top<4?"calc("+u+" + 35px + var(--globalSize) / 2)":"calc("+u+" + var(--globalSize) / 2)",null==n.posNr?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{ref:function ref(e){return o(e)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left,top:u,visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()(i.classes.buttonGeneral,i.classes.posNr.posNr,n.isDockedAccessoire?i.classes.posNr.posNrAcc:void 0,"selected"==n.elemState?i.classes.posNr.posNrSelected:void 0,"selectable"==n.elemState?i.classes.posNr.posNrSelectable:void 0,"unselectable"==n.elemState?i.classes.posNr.posNrUnSelectable:void 0,n.posNr.toString().length>1?i.classes.posNr.moreThanOneNr:void 0,n.onHover&&"unselectable"!=n.elemState?i.classes.posNr.posNrOnHover:void 0),children:[n.posNr,(0,s.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId))},style:{left:"0px",top:"0px",visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()("selectable"==n.elemState?i.classes.posNr.posNrSelectableArea:void 0)})]})}))},94723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotClock,i.classes.buttonGeneral),children:t.posNr})}))},72352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationCounterClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotCounterClock,i.classes.buttonGeneral),children:t.posNr})}))},54516:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function Trash(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps,s=n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",c=n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?"calc("+n.top+"% )":n.top+"px";return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:s,top:c},className:l()(i.classes.trash.trashClass,i.classes.buttonGeneral,"BOX"==t.plannerMode?i.classes.trash.boxplanner:void 0),id:"testDel",children:t.posNr})}))},40053:(e,t,n)=>{n.d(t,{Z:()=>useDockingPointPositioning});var o=n(62227),l=n(75327);function useDockingPointPositioning(e){var t,n,i,r,s=e.dpElement,c=e.item,a=(0,l._w)(),u=null==s?void 0:s.getBoundingClientRect(),d=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,p=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&c){var f=new o.FM(d,p),v=a.getViewConfig(),m=new o.FM(0,0);if("AVL"==(null==c?void 0:c.type)||"AVR"==(null==c?void 0:c.type)){if("2D"===c.plannerMode)switch(v.posDPIcon2D){case"CORNER":break;case"SIDE_TOP":"AVL"==(null==c?void 0:c.type)&&(m=new o.FM(-u.width,0),null!=c&&c.rotOfElement&&(m=o.FM.rotateOrigin(m,null==c?void 0:c.rotOfElement)),f=new o.FM(d+m.x,p+m.y,"pixel"))}}else"AccDP"==(null==c?void 0:c.type)&&"3D"==(null==c?void 0:c.plannerMode)?f.y=100-f.y:"BoxCopyLeft"==c.type||"BoxCopyRight"==(null==c?void 0:c.type)||null==c||c.type;d=f.x,p=f.y}return{width:null!==(i=null==u?void 0:u.width)&&void 0!==i?i:0,height:null!==(r=null==u?void 0:u.height)&&void 0!==r?r:0,top:p,left:d}}},85115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(34988),l=n(87363),i=n(18938),r=n(40053),s=n(47514);const c=function ItemsDPAccContainer(e){var t=e.item,n=e.plannerUIProps,c=(0,l.useState)(null),a=(0,o.Z)(c,2),u=a[0],d=a[1],p=(0,r.Z)({item:t,dpElement:u});return(0,s.jsx)(s.Fragment,{children:t&&(0,s.jsx)(i.default,{item:t,rect:p,onElement:d,plannerUIProps:n},null==t?void 0:t.key)})}},71492:(e,t,n)=>{n.r(t),n.d(t,{default:()=>M});var o=n(34988),l=n(9420),i=n(87363),r=n(53090),s=n(59290),c=n(88445),a=n(94723),u=n(72352),d=n(54516),p=n(40053),f=n(62227),v=n(75327);var m=n(85115),h=n(24580),g=n(37801),y=n(88683),C=n(69369),x=(0,y.getLogger)("Planner","CopyElementPositioning");var P=n(67348),I=n(33525),w=n(47514);const M=(0,l.Pi)((function ItemsContainer(e){for(var t=e.items,n=e.plannerUIProps,l=(0,v.NP)(),y=(0,i.useState)(null),M=(0,o.Z)(y,2),E=M[0],k=M[1],N=(0,i.useState)(null),D=(0,o.Z)(N,2),O=D[0],R=D[1],b=(0,i.useState)(null),S=(0,o.Z)(b,2),F=S[0],U=S[1],T=(0,i.useState)(null),A=(0,o.Z)(T,2),B=A[0],j=(A[1],(0,i.useState)(null)),_=(0,o.Z)(j,2),G=_[0],Z=(_[1],(0,i.useState)(null)),L=(0,o.Z)(Z,2),V=L[0],X=(L[1],(0,i.useState)(null)),z=(0,o.Z)(X,2),K=z[0],Y=z[1],H=(0,i.useState)(null),q=(0,o.Z)(H,2),W=q[0],J=q[1],Q=(0,i.useState)(null),$=(0,o.Z)(Q,2),ee=$[0],te=$[1],ne=(0,i.useState)(null),oe=(0,o.Z)(ne,2),le=(oe[0],oe[1]),ie=t.find((function(e){return"PosNr"==e.type})),re=t.find((function(e){return"AVL"==e.type})),se=t.find((function(e){return"AVR"==e.type})),ce=[],ae=[],ue=0;ue<t.length;ue++)"AccDP"==t[ue].type?ce.push(t[ue]):"DistanceFromGround"==t[ue].type&&ae.push(t[ue]);var de=t.find((function(e){return"Outline"==e.type})),pe=t.find((function(e){return"TrashIcon"==e.type})),fe=t.find((function(e){return"CopyElement"==e.type})),ve=t.find((function(e){return"RotateC"==e.type})),me=t.find((function(e){return"RotateCC"==e.type})),he=t.find((function(e){return"BoxCopyLeft"==e.type})),ge=t.find((function(e){return"BoxCopyTop"==e.type})),ye=t.find((function(e){return"BoxCopyRight"==e.type})),Ce=function usePosNrPositioning(e){var t,n,o,l,i=e.posNrElement,r=e.item,s=(0,v._w)(),c=null==i?void 0:i.getBoundingClientRect(),a=null!==(t=null==r?void 0:r.position.x)&&void 0!==t?t:0,u=null!==(n=null==r?void 0:r.position.y)&&void 0!==n?n:0;if(c){var d=new f.FM(a,u),p=s.getViewConfig(),m=new f.FM(0,0);switch(null==r?void 0:r.plannerMode){case"2D":switch(p.iconPosition2DGrid){case"BORDER":m=new f.FM(c.width,.1*-c.height),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel");break;case"OUTSIDE":var h=null!=r&&r.iconZoom?r.iconZoom:1;m=new f.FM(c.width+h,-c.height/2-(c.height/2.5-h)),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel")}a=d.x,u=d.y;break;case"3D":(a+=3)<1&&(a=1),(u=100-u-1)<1&&(u=1)}}return{width:null!==(o=null==c?void 0:c.width)&&void 0!==o?o:0,height:null!==(l=null==c?void 0:c.height)&&void 0!==l?l:0,top:u,left:a}}({item:ie,posNrElement:E}),xe=(0,p.Z)({item:re,dpElement:O}),Pe=(0,p.Z)({item:se,dpElement:F}),Ie=(0,p.Z)({item:he,dpElement:B}),we=(0,p.Z)({item:ge,dpElement:G}),Me=(0,p.Z)({item:ye,dpElement:V}),Ee=function useTrashPositioning(e){var t,n,o,l,i=e.trashElement,r=e.posNrRect,s=e.boxPlannerCopyLeftRect,c=e.boxPlannerCopyTopRect,a=e.boxPlannerCopyRightRect,u=e.trashItem,d=(0,v._w)(),p=null==i?void 0:i.getBoundingClientRect(),m=d.getViewConfig(),h=null!==(t=null==u?void 0:u.position.x)&&void 0!==t?t:0,g=null!==(n=null==u?void 0:u.position.y)&&void 0!==n?n:0,y="",C="",x=!1;if(p&&r){var P=new f.FM(0,0);switch(m.posTrashRotIcon){case"POSNUM_TOP":"2D"==(null==u?void 0:u.plannerMode)?(P=new f.FM(0,-r.height-p.height/2),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h=r.left+P.x,g=r.top+P.y):"3D"!=(null==u?void 0:u.plannerMode)&&"BOX"!=(null==u?void 0:u.plannerMode)||(m.enableElementCopy?(x=!0,y="calc("+r.left.toString()+"% - "+r.width/1.8+"px)",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"):(x=!0,y=r.left.toString()+"%",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"));break;case"TOP_RIGHT_BACK":if("2D"==(null==u?void 0:u.plannerMode)){var I=null!=u&&u.iconZoom?u.iconZoom:1;P=new f.FM(-p.width/2-(p.width/3+I),-p.height/2-(p.height/3.7-I)),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y,Math.sqrt(Math.pow(r.left-h,2)+Math.pow(r.top-g,2))<=r.width&&(P=new f.FM(r.width,0),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y)}else if("3D"==(null==u?void 0:u.plannerMode)||"BOX"==(null==u?void 0:u.plannerMode)){if(s||a||c){var w=!1;s&&(Math.sqrt(Math.pow(s.left-h,2)+Math.pow(s.top-g,2))<9&&(g+=5,w=!0),!w&&a&&Math.sqrt(Math.pow(a.left-h,2)+Math.pow(a.top-g,2))<9&&(g+=5,w=!0),!w&&c&&Math.sqrt(Math.pow(c.left-h,2)+Math.pow(c.top-g,2))<9&&(g+=5,w=!0))}(h-=1)>99&&(h=99),(g=100-g-2)<1&&(g=1)}}}return{width:null!==(o=null==p?void 0:p.width)&&void 0!==o?o:0,height:null!==(l=null==p?void 0:p.height)&&void 0!==l?l:0,top:g,left:h,doUseCalc:x,topCalc:x?C:void 0,leftCalc:x?y:void 0}}({trashItem:pe,posNrRect:Ce,boxPlannerCopyLeftRect:Ie,boxPlannerCopyTopRect:we,boxPlannerCopyRightRect:Me,trashElement:K}),ke=function useCopyElementPositioning(e){var t,n,o=e.copyElement,l=e.posNrRect,i=e.copyElementItem,r=(0,v._w)(),s=null==o?void 0:o.getBoundingClientRect(),c=r.getViewConfig(),a="",u="",d=!1;if(s&&l)switch(new f.FM(0,0),c.posTrashRotIcon){case"POSNUM_TOP":"3D"==(null==i?void 0:i.plannerMode)&&c.enableElementCopy&&(d=!0,a="calc("+l.left.toString()+"% + "+l.width/1.8+"px)",u="calc("+l.top+"% - "+(l.height+2)+"px)");break;case"TOP_RIGHT_BACK":x.error(new C.GE("Do implement copy Element for TOP_RIGHT_BACK Positioning",{code:"WC_0012"}))}return{width:null!==(t=null==s?void 0:s.width)&&void 0!==t?t:0,height:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:0,top:0,left:0,doUseCalc:d,topCalc:d?u:void 0,leftCalc:d?a:void 0}}({copyElementItem:fe,posNrRect:Ce,copyElement:W}),Ne=function useRotClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotItem,a=(0,v._w)(),u=null==i?void 0:i.getBoundingClientRect(),d=a.getViewConfig(),p=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,m=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&r&&s){var h=new f.FM(0,0);switch(d.posTrashRotIcon){case"POSNUM_TOP":p=(r.left+s.left)/2,m=(r.top+s.top)/2,h=new f.FM(-u.width,0),null!=c&&c.rotOfElement&&(h=f.FM.rotateOrigin(h,c.rotOfElement)),p+=h.x,m+=h.y;break;case"TOP_RIGHT_BACK":if(Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100){var g=new f.FM(0,-u.height-4);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(g=f.FM.rotateOrigin(g,c.rotOfElement)),p=(null==s?void 0:s.left)+g.x,m=(null==s?void 0:s.top)+g.y}else{var y=new f.FM(-u.width-4,0);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(y=f.FM.rotateOrigin(y,c.rotOfElement)),p=(null==s?void 0:s.left)+y.x,m=(null==s?void 0:s.top)+y.y}}}return{width:null!==(o=null==u?void 0:u.width)&&void 0!==o?o:0,height:null!==(l=null==u?void 0:u.height)&&void 0!==l?l:0,top:m,left:p}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotElement:ee}),De=function useRotCounterClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotClockRect,a=e.rotItem,u=(0,v._w)(),d=null==i?void 0:i.getBoundingClientRect(),p=u.getViewConfig(),m=null!==(t=null==a?void 0:a.position.x)&&void 0!==t?t:0,h=null!==(n=null==a?void 0:a.position.y)&&void 0!==n?n:0;if(d&&r&&s&&c){var g=new f.FM(0,0);switch(p.posTrashRotIcon){case"POSNUM_TOP":m=(r.left+s.left)/2,h=(r.top+s.top)/2,g=new f.FM(d.width,0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m+=g.x,h+=g.y;break;case"TOP_RIGHT_BACK":Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100?(g=new f.FM(0,-d.height-3),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y):(g=new f.FM(-d.width-3,-0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y)}}return{width:null!==(o=null==d?void 0:d.width)&&void 0!==o?o:0,height:null!==(l=null==d?void 0:d.height)&&void 0!==l?l:0,top:h,left:m}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotClockRect:Ne,rotElement:ee});return(0,w.jsxs)(w.Fragment,{children:[ie&&(0,w.jsx)(h.default,{item:ie,rect:Ce,onElement:k,plannerUIProps:n,hasTrash:!!pe}),de&&(0,w.jsx)(c.default,{item:de,plannerUIProps:n},de.key),re&&(0,w.jsx)(r.default,{item:re,rect:xe,onElement:R,plannerUIProps:n},null==re?void 0:re.key),se&&(0,w.jsx)(s.default,{item:se,rect:Pe,onElement:U,plannerUIProps:n},null==se?void 0:se.key),he&&ye&&(0,w.jsx)(g.default,{item:he,rect:Ie,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},he.key),ge&&(0,w.jsx)(g.default,{item:ge,rect:we,invertLeftRight:!1,plannerUIProps:n},ge.key),ye&&he&&(0,w.jsx)(g.default,{item:ye,rect:Me,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},ye.key),pe&&(0,w.jsx)(d.default,{item:pe,rect:Ee,onElement:Y,plannerUIProps:n}),fe&&(0,w.jsx)(P.default,{item:fe,rect:ke,onElement:J,plannerUIProps:n}),ve&&(0,w.jsx)(a.default,{item:ve,rect:Ne,onElement:te,plannerUIProps:n}),me&&(0,w.jsx)(u.default,{item:me,rect:De,onElement:le,plannerUIProps:n}),ce.map((function(e,t){return(0,w.jsx)(m.default,{item:e,plannerUIProps:n},e.key)})),l.productState.getDoShow3DDimensionLines()&&ae.map((function(e,t){return(0,w.jsx)(I.default,{item:e,plannerUIProps:n},e.key)}))]})}))}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[1492,7801,1897,3525,3090,9290,8938,8445,4580,4723,2352,4516,8616],{37801:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function BoxCopy(e){var t=e.rect,n=e.item,o=e.plannerUIProps,i=e.invertLeftRight;return(0,r.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),{x:"BoxCopyLeft"==n.type?-1:"BoxCopyRight"==n.type?1:0,y:"BoxCopyTop"==n.type?1:0,z:0})},style:{left:t.left+"%",top:100-t.top+"%"},className:l()(o.classes.buttonGeneral,o.classes.copy.BoxPlannerCopy.copyGlobal,"BoxCopyLeft"==n.type?i?o.classes.copy.BoxPlannerCopy.copyRight:o.classes.copy.BoxPlannerCopy.copyLeft:void 0,"BoxCopyTop"==n.type?o.classes.copy.BoxPlannerCopy.copyTop:void 0,"BoxCopyRight"==n.type?i?o.classes.copy.BoxPlannerCopy.copyLeft:o.classes.copy.BoxPlannerCopy.copyRight:void 0)})}))},67348:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function ElementCopy(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",top:n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?n.top+"%":n.top+"px"},className:l()(i.classes.copy.ElementCopy,i.classes.buttonGeneral)})}))},33525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function DistanceToGround(e){var t=e.item,n=e.plannerUIProps;return(0,r.jsx)("div",{style:{left:t.position.x+"%",top:100-t.position.y+"%"},id:"distanceToGround",className:l()(n.classes.dimension.distanceToGround),children:(0,r.jsx)("div",{children:t.dimensionVal+" cm"})})}))},53090:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVL(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVL.avl,a?i.classes.dockingPoint.AVL.avlSel:void 0)})}))},59290:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function AVR(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n),u=(n.rotOfElement?n.rotOfElement:0)+(n.iconRotDeg?n.iconRotDeg:0);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,void 0)},style:{left:t.left+"px",top:t.top+"px",transform:"rotate("+u+"deg)"},className:l()(i.classes.buttonGeneral,i.classes.dockingPoint.AVR.avr,a?i.classes.dockingPoint.AVR.avrSel:void 0),children:n.posNr})}))},18938:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=n(75327),s=(n(87363),n(47514));const c=(0,i.Pi)((function DPACC(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=(0,r._w)(),a=c.getDPUIISSelected(n);return(0,s.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;c.setDPUISelectionChanged(n,!a),null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId),n.dpId,!a,n.dockToElementId)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left+"px",top:"percentage"==n.position.interpretation?t.top+"%":t.top+"px"},className:l()(i.classes.buttonGeneral,"2D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccDocking:i.classes.dockingPoint.DPACC.dp2DAccNotDocking:void 0,"2D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp2DAccNotDockingSel:void 0,"3D"==n.plannerMode?"DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccDocking:i.classes.dockingPoint.DPACC.dp3DAccNotDocking:void 0,"3D"==n.plannerMode&&a&&"NOT_DOCKING"==n.dockingInfo?i.classes.dockingPoint.DPACC.dp3DAccNotDockingSel:void 0),children:n.posNr})}))},88445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(34988),l=n(65515),i=n.n(l),r=n(9420),s=n(87363),c=n(87998),a=n(47514),u=new c.FM(0,0);const d=(0,r.Pi)((function Outline(e){var t,n,l=e.item,r=e.plannerUIProps,d=(0,s.useState)(!1),p=(0,o.Z)(d,2),f=p[0],v=p[1],m=(0,s.useState)(l.position.x),h=(0,o.Z)(m,2),g=h[0],y=h[1],C=(0,s.useState)(l.position.y),x=(0,o.Z)(C,2),P=x[0],I=x[1],w=!1;return(0,a.jsx)("div",{onClick:function onClick(){var e;null===(e=l.clickFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId))},onMouseDown:function onMouseDown(e){w=!0,u=new c.FM(e.clientX,e.clientY)},onTouchStart:function onTouchStart(e){1==e.touches.length&&(w=!0,u=new c.FM(e.touches[0].clientX,e.touches[0].clientY))},onMouseMove:function onMouseMove(e){var t,n;w&&!f&&(v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId)));f&&(null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.clientX-u.x,e.clientY-u.y)),y(g+e.clientX-u.x),I(P+e.clientY-u.y),u.x=e.clientX,u.y=e.clientY);w=!1},onTouchMove:function onTouchMove(e){if(1==e.touches.length){var t,n;if(w&&!f)v(!0),null===(t=l.onDragStartFunction)||void 0===t||t.call(l,l.setId,Number(l.elementId));if(f)null===(n=l.onDragMoveFunction)||void 0===n||n.call(l,l.setId,Number(l.elementId),new c.FM(e.touches[0].clientX-u.x,e.touches[0].clientY-u.y)),y(g+e.touches[0].clientX-u.x),I(P+e.touches[0].clientY-u.y),u.x=e.touches[0].clientX,u.y=e.touches[0].clientY;w=!1}},onMouseUp:function onMouseUp(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},onTouchEnd:function onTouchEnd(){var e;f&&(v(!1),null===(e=l.onDragEndFunction)||void 0===e||e.call(l,l.setId,Number(l.elementId)));w=!1},style:{left:g+"px",top:P+"px",width:(null==l||null===(t=l.size)||void 0===t?void 0:t.x)+"px",height:(null==l||null===(n=l.size)||void 0===n?void 0:n.y)+"px",transform:"rotate("+(null==l?void 0:l.rotOfElement)+"deg)"},className:i()(f?r.classes.outline.outline2D.draggableActive:void 0,"selected"==l.elemState?r.classes.outline.outline2D.draggable:void 0,"selectable"==l.elemState?r.classes.outline.outline2D.selectable:void 0)})}))},24580:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(75327)),s=n(47514);const c=(0,i.Pi)((function PosNr(e){var t=e.rect,n=e.item,o=e.onElement,i=e.plannerUIProps,c=e.hasTrash,a=(0,r.NP)(),u="percentage"==n.position.interpretation?t.top+"%":t.top+"px";return u=c&&t.top<4?"calc("+u+" + 35px + var(--globalSize) / 2)":"calc("+u+" + var(--globalSize) / 2)",null==n.posNr?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)("div",{ref:function ref(e){return o(e)},style:{left:"percentage"==n.position.interpretation?t.left+"%":t.left,top:u,visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()(i.classes.buttonGeneral,i.classes.posNr.posNr,n.isDockedAccessoire?i.classes.posNr.posNrAcc:void 0,"selected"==n.elemState?i.classes.posNr.posNrSelected:void 0,"selectable"==n.elemState?i.classes.posNr.posNrSelectable:void 0,"unselectable"==n.elemState?i.classes.posNr.posNrUnSelectable:void 0,n.posNr.toString().length>1?i.classes.posNr.moreThanOneNr:void 0,n.onHover&&"unselectable"!=n.elemState?i.classes.posNr.posNrOnHover:void 0),children:[n.posNr,(0,s.jsx)("div",{onClick:function onClick(){var e;null===(e=n.clickFunction)||void 0===e||e.call(n,n.setId,Number(n.elementId))},style:{left:"0px",top:"0px",visibility:a.productState.isBoxPlanner?"hidden":"visible"},className:l()("selectable"==n.elemState?i.classes.posNr.posNrSelectableArea:void 0)})]})}))},94723:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotClock,i.classes.buttonGeneral),children:t.posNr})}))},72352:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function RotationCounterClockwise(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps;return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:n.left+"px",top:n.top+"px"},className:l()(i.classes.rotation.rotCounterClock,i.classes.buttonGeneral),children:t.posNr})}))},54516:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(65515),l=n.n(o),i=n(9420),r=(n(87363),n(47514));const s=(0,i.Pi)((function Trash(e){var t=e.item,n=e.rect,o=e.onElement,i=e.plannerUIProps,s=n.doUseCalc?n.leftCalc:"percentage"==t.position.interpretation?n.left+"%":n.left+"px",c=n.doUseCalc?n.topCalc:"percentage"==t.position.interpretation?"calc("+n.top+"% )":n.top+"px";return(0,r.jsx)("div",{ref:function ref(e){return o(e)},onClick:function onClick(){var e;null===(e=t.clickFunction)||void 0===e||e.call(t,t.setId,Number(t.elementId))},style:{left:s,top:c},className:l()(i.classes.trash.trashClass,i.classes.buttonGeneral,"BOX"==t.plannerMode?i.classes.trash.boxplanner:void 0),id:"testDel",children:t.posNr})}))},40053:(e,t,n)=>{n.d(t,{Z:()=>useDockingPointPositioning});var o=n(87998),l=n(75327);function useDockingPointPositioning(e){var t,n,i,r,s=e.dpElement,c=e.item,a=(0,l._w)(),u=null==s?void 0:s.getBoundingClientRect(),d=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,p=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&c){var f=new o.FM(d,p),v=a.getViewConfig(),m=new o.FM(0,0);if("AVL"==(null==c?void 0:c.type)||"AVR"==(null==c?void 0:c.type)){if("2D"===c.plannerMode)switch(v.posDPIcon2D){case"CORNER":break;case"SIDE_TOP":"AVL"==(null==c?void 0:c.type)&&(m=new o.FM(-u.width,0),null!=c&&c.rotOfElement&&(m=o.FM.rotateOrigin(m,null==c?void 0:c.rotOfElement)),f=new o.FM(d+m.x,p+m.y,"pixel"))}}else"AccDP"==(null==c?void 0:c.type)&&"3D"==(null==c?void 0:c.plannerMode)?f.y=100-f.y:"BoxCopyLeft"==c.type||"BoxCopyRight"==(null==c?void 0:c.type)||null==c||c.type;d=f.x,p=f.y}return{width:null!==(i=null==u?void 0:u.width)&&void 0!==i?i:0,height:null!==(r=null==u?void 0:u.height)&&void 0!==r?r:0,top:p,left:d}}},85115:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(34988),l=n(87363),i=n(18938),r=n(40053),s=n(47514);const c=function ItemsDPAccContainer(e){var t=e.item,n=e.plannerUIProps,c=(0,l.useState)(null),a=(0,o.Z)(c,2),u=a[0],d=a[1],p=(0,r.Z)({item:t,dpElement:u});return(0,s.jsx)(s.Fragment,{children:t&&(0,s.jsx)(i.default,{item:t,rect:p,onElement:d,plannerUIProps:n},null==t?void 0:t.key)})}},71492:(e,t,n)=>{n.r(t),n.d(t,{default:()=>M});var o=n(34988),l=n(9420),i=n(87363),r=n(53090),s=n(59290),c=n(88445),a=n(94723),u=n(72352),d=n(54516),p=n(40053),f=n(87998),v=n(75327);var m=n(85115),h=n(24580),g=n(37801),y=n(88683),C=n(69369),x=(0,y.getLogger)("Planner","CopyElementPositioning");var P=n(67348),I=n(33525),w=n(47514);const M=(0,l.Pi)((function ItemsContainer(e){for(var t=e.items,n=e.plannerUIProps,l=(0,v.NP)(),y=(0,i.useState)(null),M=(0,o.Z)(y,2),E=M[0],k=M[1],N=(0,i.useState)(null),D=(0,o.Z)(N,2),O=D[0],R=D[1],b=(0,i.useState)(null),S=(0,o.Z)(b,2),F=S[0],U=S[1],T=(0,i.useState)(null),A=(0,o.Z)(T,2),B=A[0],j=(A[1],(0,i.useState)(null)),_=(0,o.Z)(j,2),G=_[0],Z=(_[1],(0,i.useState)(null)),L=(0,o.Z)(Z,2),V=L[0],X=(L[1],(0,i.useState)(null)),z=(0,o.Z)(X,2),K=z[0],Y=z[1],H=(0,i.useState)(null),q=(0,o.Z)(H,2),W=q[0],J=q[1],Q=(0,i.useState)(null),$=(0,o.Z)(Q,2),ee=$[0],te=$[1],ne=(0,i.useState)(null),oe=(0,o.Z)(ne,2),le=(oe[0],oe[1]),ie=t.find((function(e){return"PosNr"==e.type})),re=t.find((function(e){return"AVL"==e.type})),se=t.find((function(e){return"AVR"==e.type})),ce=[],ae=[],ue=0;ue<t.length;ue++)"AccDP"==t[ue].type?ce.push(t[ue]):"DistanceFromGround"==t[ue].type&&ae.push(t[ue]);var de=t.find((function(e){return"Outline"==e.type})),pe=t.find((function(e){return"TrashIcon"==e.type})),fe=t.find((function(e){return"CopyElement"==e.type})),ve=t.find((function(e){return"RotateC"==e.type})),me=t.find((function(e){return"RotateCC"==e.type})),he=t.find((function(e){return"BoxCopyLeft"==e.type})),ge=t.find((function(e){return"BoxCopyTop"==e.type})),ye=t.find((function(e){return"BoxCopyRight"==e.type})),Ce=function usePosNrPositioning(e){var t,n,o,l,i=e.posNrElement,r=e.item,s=(0,v._w)(),c=null==i?void 0:i.getBoundingClientRect(),a=null!==(t=null==r?void 0:r.position.x)&&void 0!==t?t:0,u=null!==(n=null==r?void 0:r.position.y)&&void 0!==n?n:0;if(c){var d=new f.FM(a,u),p=s.getViewConfig(),m=new f.FM(0,0);switch(null==r?void 0:r.plannerMode){case"2D":switch(p.iconPosition2DGrid){case"BORDER":m=new f.FM(c.width,.1*-c.height),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel");break;case"OUTSIDE":var h=null!=r&&r.iconZoom?r.iconZoom:1;m=new f.FM(c.width+h,-c.height/2-(c.height/2.5-h)),null!=r&&r.rotOfElement&&(m=f.FM.rotateOrigin(m,null==r?void 0:r.rotOfElement)),d=new f.FM(a+m.x,u+m.y,"pixel")}a=d.x,u=d.y;break;case"3D":(a+=3)<1&&(a=1),(u=100-u-1)<1&&(u=1)}}return{width:null!==(o=null==c?void 0:c.width)&&void 0!==o?o:0,height:null!==(l=null==c?void 0:c.height)&&void 0!==l?l:0,top:u,left:a}}({item:ie,posNrElement:E}),xe=(0,p.Z)({item:re,dpElement:O}),Pe=(0,p.Z)({item:se,dpElement:F}),Ie=(0,p.Z)({item:he,dpElement:B}),we=(0,p.Z)({item:ge,dpElement:G}),Me=(0,p.Z)({item:ye,dpElement:V}),Ee=function useTrashPositioning(e){var t,n,o,l,i=e.trashElement,r=e.posNrRect,s=e.boxPlannerCopyLeftRect,c=e.boxPlannerCopyTopRect,a=e.boxPlannerCopyRightRect,u=e.trashItem,d=(0,v._w)(),p=null==i?void 0:i.getBoundingClientRect(),m=d.getViewConfig(),h=null!==(t=null==u?void 0:u.position.x)&&void 0!==t?t:0,g=null!==(n=null==u?void 0:u.position.y)&&void 0!==n?n:0,y="",C="",x=!1;if(p&&r){var P=new f.FM(0,0);switch(m.posTrashRotIcon){case"POSNUM_TOP":"2D"==(null==u?void 0:u.plannerMode)?(P=new f.FM(0,-r.height-p.height/2),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h=r.left+P.x,g=r.top+P.y):"3D"!=(null==u?void 0:u.plannerMode)&&"BOX"!=(null==u?void 0:u.plannerMode)||(m.enableElementCopy?(x=!0,y="calc("+r.left.toString()+"% - "+r.width/1.8+"px)",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"):(x=!0,y=r.left.toString()+"%",C=r.top<4?"calc("+r.top+"% + 30px - var(--globalSize) / 2":"calc("+r.top+"% - (var(--globalSize) + 5px) / 2"));break;case"TOP_RIGHT_BACK":if("2D"==(null==u?void 0:u.plannerMode)){var I=null!=u&&u.iconZoom?u.iconZoom:1;P=new f.FM(-p.width/2-(p.width/3+I),-p.height/2-(p.height/3.7-I)),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y,Math.sqrt(Math.pow(r.left-h,2)+Math.pow(r.top-g,2))<=r.width&&(P=new f.FM(r.width,0),null!=u&&u.rotOfElement&&(P=f.FM.rotateOrigin(P,u.rotOfElement)),h+=P.x,g+=P.y)}else if("3D"==(null==u?void 0:u.plannerMode)||"BOX"==(null==u?void 0:u.plannerMode)){if(s||a||c){var w=!1;s&&(Math.sqrt(Math.pow(s.left-h,2)+Math.pow(s.top-g,2))<9&&(g+=5,w=!0),!w&&a&&Math.sqrt(Math.pow(a.left-h,2)+Math.pow(a.top-g,2))<9&&(g+=5,w=!0),!w&&c&&Math.sqrt(Math.pow(c.left-h,2)+Math.pow(c.top-g,2))<9&&(g+=5,w=!0))}(h-=1)>99&&(h=99),(g=100-g-2)<1&&(g=1)}}}return{width:null!==(o=null==p?void 0:p.width)&&void 0!==o?o:0,height:null!==(l=null==p?void 0:p.height)&&void 0!==l?l:0,top:g,left:h,doUseCalc:x,topCalc:x?C:void 0,leftCalc:x?y:void 0}}({trashItem:pe,posNrRect:Ce,boxPlannerCopyLeftRect:Ie,boxPlannerCopyTopRect:we,boxPlannerCopyRightRect:Me,trashElement:K}),ke=function useCopyElementPositioning(e){var t,n,o=e.copyElement,l=e.posNrRect,i=e.copyElementItem,r=(0,v._w)(),s=null==o?void 0:o.getBoundingClientRect(),c=r.getViewConfig(),a="",u="",d=!1;if(s&&l)switch(new f.FM(0,0),c.posTrashRotIcon){case"POSNUM_TOP":"3D"==(null==i?void 0:i.plannerMode)&&c.enableElementCopy&&(d=!0,a="calc("+l.left.toString()+"% + "+l.width/1.8+"px)",u="calc("+l.top+"% - "+(l.height+2)+"px)");break;case"TOP_RIGHT_BACK":x.error(new C.GE("Do implement copy Element for TOP_RIGHT_BACK Positioning",{code:"WC_0012"}))}return{width:null!==(t=null==s?void 0:s.width)&&void 0!==t?t:0,height:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:0,top:0,left:0,doUseCalc:d,topCalc:d?u:void 0,leftCalc:d?a:void 0}}({copyElementItem:fe,posNrRect:Ce,copyElement:W}),Ne=function useRotClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotItem,a=(0,v._w)(),u=null==i?void 0:i.getBoundingClientRect(),d=a.getViewConfig(),p=null!==(t=null==c?void 0:c.position.x)&&void 0!==t?t:0,m=null!==(n=null==c?void 0:c.position.y)&&void 0!==n?n:0;if(u&&r&&s){var h=new f.FM(0,0);switch(d.posTrashRotIcon){case"POSNUM_TOP":p=(r.left+s.left)/2,m=(r.top+s.top)/2,h=new f.FM(-u.width,0),null!=c&&c.rotOfElement&&(h=f.FM.rotateOrigin(h,c.rotOfElement)),p+=h.x,m+=h.y;break;case"TOP_RIGHT_BACK":if(Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100){var g=new f.FM(0,-u.height-4);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(g=f.FM.rotateOrigin(g,c.rotOfElement)),p=(null==s?void 0:s.left)+g.x,m=(null==s?void 0:s.top)+g.y}else{var y=new f.FM(-u.width-4,0);null!=c&&c.rotOfElement&&0!=c.rotOfElement&&(y=f.FM.rotateOrigin(y,c.rotOfElement)),p=(null==s?void 0:s.left)+y.x,m=(null==s?void 0:s.top)+y.y}}}return{width:null!==(o=null==u?void 0:u.width)&&void 0!==o?o:0,height:null!==(l=null==u?void 0:u.height)&&void 0!==l?l:0,top:m,left:p}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotElement:ee}),De=function useRotCounterClockwisePositioning(e){var t,n,o,l,i=e.rotElement,r=e.posNrRect,s=e.trashRect,c=e.rotClockRect,a=e.rotItem,u=(0,v._w)(),d=null==i?void 0:i.getBoundingClientRect(),p=u.getViewConfig(),m=null!==(t=null==a?void 0:a.position.x)&&void 0!==t?t:0,h=null!==(n=null==a?void 0:a.position.y)&&void 0!==n?n:0;if(d&&r&&s&&c){var g=new f.FM(0,0);switch(p.posTrashRotIcon){case"POSNUM_TOP":m=(r.left+s.left)/2,h=(r.top+s.top)/2,g=new f.FM(d.width,0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m+=g.x,h+=g.y;break;case"TOP_RIGHT_BACK":Math.sqrt(Math.pow(r.left-s.left,2)+Math.pow(r.top-s.top,2))<=100?(g=new f.FM(0,-d.height-3),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y):(g=new f.FM(-d.width-3,-0),null!=a&&a.rotOfElement&&(g=f.FM.rotateOrigin(g,a.rotOfElement)),m=(null==c?void 0:c.left)+g.x,h=(null==c?void 0:c.top)+g.y)}}return{width:null!==(o=null==d?void 0:d.width)&&void 0!==o?o:0,height:null!==(l=null==d?void 0:d.height)&&void 0!==l?l:0,top:h,left:m}}({rotItem:ve,posNrRect:Ce,trashRect:Ee,rotClockRect:Ne,rotElement:ee});return(0,w.jsxs)(w.Fragment,{children:[ie&&(0,w.jsx)(h.default,{item:ie,rect:Ce,onElement:k,plannerUIProps:n,hasTrash:!!pe}),de&&(0,w.jsx)(c.default,{item:de,plannerUIProps:n},de.key),re&&(0,w.jsx)(r.default,{item:re,rect:xe,onElement:R,plannerUIProps:n},null==re?void 0:re.key),se&&(0,w.jsx)(s.default,{item:se,rect:Pe,onElement:U,plannerUIProps:n},null==se?void 0:se.key),he&&ye&&(0,w.jsx)(g.default,{item:he,rect:Ie,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},he.key),ge&&(0,w.jsx)(g.default,{item:ge,rect:we,invertLeftRight:!1,plannerUIProps:n},ge.key),ye&&he&&(0,w.jsx)(g.default,{item:ye,rect:Me,invertLeftRight:Me.left<Ie.left,plannerUIProps:n},ye.key),pe&&(0,w.jsx)(d.default,{item:pe,rect:Ee,onElement:Y,plannerUIProps:n}),fe&&(0,w.jsx)(P.default,{item:fe,rect:ke,onElement:J,plannerUIProps:n}),ve&&(0,w.jsx)(a.default,{item:ve,rect:Ne,onElement:te,plannerUIProps:n}),me&&(0,w.jsx)(u.default,{item:me,rect:De,onElement:le,plannerUIProps:n}),ce.map((function(e,t){return(0,w.jsx)(m.default,{item:e,plannerUIProps:n},e.key)})),l.productState.getDoShow3DDimensionLines()&&ae.map((function(e,t){return(0,w.jsx)(I.default,{item:e,plannerUIProps:n},e.key)}))]})}))}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 3596.diva-web-planner-react.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3596],{33596:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var r=i(84658),s=i(12952),n=i(13125),l=i(43860),a=i(80248),c=i(50747),o=i.n(c),d=i(69369),h=i(37609),u=i(35215),f=i(69821);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}var g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),v=function(){return(0,l.Z)((function ShelfPlanner(e,t){if((0,n.Z)(this,ShelfPlanner),(0,a.Z)(this,"article",void 0),(0,a.Z)(this,"grids",[]),(0,a.Z)(this,"isVisible",void 0),(0,a.Z)(this,"showOnRule",void 0),(0,a.Z)(this,"showAfterOPT",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"freeArticlesPossible",{}),(0,a.Z)(this,"freeArticlesPlanned",{}),(0,a.Z)(this,"gridAllowedOnCells",void 0),(0,a.Z)(this,"gridAllowedOntoArticles",void 0),(0,a.Z)(this,"takePlaceOnOtherGrids",void 0),(0,a.Z)(this,"disableCellsByElement",void 0),(0,a.Z)(this,"montageOptions",[]),(0,a.Z)(this,"shelfDebugStack",[]),(0,a.Z)(this,"shelfDebugSeq",0),(0,a.Z)(this,"restorePending",void 0),(0,a.Z)(this,"stashedAccessoires",{}),this.article=t,this.restorePending=!!t.shelfPlanData,this.disableCellsByElement=e.DisableCells,this.data=e,this.showAfterOPT=e.ShowAfterOPT,this.showOnRule=e.ShowOnRule?d.ZP.getRuleByFormula(e.ShowOnRule,t.catalogCodex,t.CatalogData.multiselectOptions):void 0,this.gridAllowedOnCells=e.GridAllowedOnCells,this.gridAllowedOntoArticles=e.GridAllowedOntoArticles,this.takePlaceOnOtherGrids=e.TakePlaceOnOtherGrids,this.initFreeArticles(),e.ShelfPlanner&&e.ShelfPlanner.length>0){for(var i=0;i<e.ShelfPlanner.length;i++)this.creatNewGrid(i),this.updateDisabledCells();this.montageOptions=(0,s.Z)(new Set(this.grids.reduce((function(e,t){return e=e.concat(t.montageOptionsList)}),[])))}}),[{key:"logShelfDebug",value:function logShelfDebug(e){this.shelfDebugStack.push(function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({seq:this.shelfDebugSeq++},e)),this.shelfDebugStack.length>500&&this.shelfDebugStack.splice(0,this.shelfDebugStack.length-500)}},{key:"initFreeArticles",value:function initFreeArticles(){if(this.data.ShelfPlanner)for(var e=0;e<this.data.ShelfPlanner.length;e++){var t=this.data.ShelfPlanner[e];if(t.initAccArr)for(var i=0;i<t.initAccArr.length;i++){var r=t.initAccArr[i];r.noPrice&&(void 0===this.freeArticlesPossible[r.Codex]&&(this.freeArticlesPossible[r.Codex]=0),this.freeArticlesPossible[r.Codex]+=r.Quantity)}}}},{key:"IsVisible",get:function get(){return this.isVisible}},{key:"RestorePending",get:function get(){return this.restorePending},set:function set(e){this.restorePending=e}},{key:"setIsVisible",value:(C=(0,r.Z)(o().mark((function _callee(e){return o().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(this.isVisible==e){t.next=13;break}if(this.logShelfDebug({phase:"visibility",action:e?"plannerShown":"plannerHidden",detail:e?void 0:"showOnRule/visibility turned false — all placed accessories are deleted"}),!e){t.next=11;break}if(this.isVisible=e,this.article.shelfPlanData){t.next=9;break}return t.next=7,this.onConfigChanged({});case 7:return t.next=9,this.initAccList();case 9:t.next=13;break;case 11:return t.next=13,this.deleteAllAcc();case 13:this.isVisible=e;case 14:case"end":return t.stop()}}),_callee,this)}))),function setIsVisible(e){return C.apply(this,arguments)})},{key:"onConfigChanged",value:(y=(0,r.Z)(o().mark((function _callee2(e){var t,i,r,s,n,l,a,c,d,h,u,f;return o().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:for(t=!1,i=[],r=0;r<this.grids.length;r++)i.push(this.grids[r].onConfigChanged());s=0;case 4:if(!(s<i.length)){o.next=13;break}if(i[s].length){o.next=7;break}return o.abrupt("continue",10);case 7:n=this.grids[s],i[s].includes("disableGridRule")&&this.logShelfDebug({phase:"configChanged",action:n.DisabledByRule?"gridDisabledByRule":"gridEnabledByRule",gridIndex:n.ShelfIndex,detail:n.ShowOnRule}),i[s].includes("heightGridRule")&&this.logShelfDebug({phase:"configChanged",action:"gridRecreated",gridIndex:n.ShelfIndex,detail:"HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted"});case 10:s++,o.next=4;break;case 13:l=0;case 14:if(!(l<i.length)){o.next=23;break}if(i[l].length){o.next=17;break}return o.abrupt("continue",20);case 17:return this.stashAccessoiresOfGrid(l),o.next=20,this.grids[l].deleteAllAccOfGrid();case 20:l++,o.next=14;break;case 23:a=0;case 24:if(!(a<i.length)){o.next=40;break}if(i[a].length){o.next=27;break}return o.abrupt("continue",37);case 27:if(i[a].includes("heightGridRule")&&(this.creatNewGrid(a),t=!0),c=this.grids[a],!i[a].includes("heightGridRule")&&!i[a].includes("disableGridRule")||c.DisabledByRule){o.next=37;break}if(!this.restorePending){o.next=32;break}return o.abrupt("continue",37);case 32:return o.next=34,this.placeStashedAccessoiresOfGrid(a);case 34:if(o.sent){o.next=37;break}return o.next=37,this.initAccList(a);case 37:a++,o.next=24;break;case 40:if(t||!Object.keys(e).length){o.next=51;break}d=this.activeGrids,h=0;case 43:if(!(h<d.length)){o.next=51;break}if(f=d[h],!(null!==(u=f.DisableCellsByMeasures)&&void 0!==u&&u.options.find((function(t){return Object.keys(e).includes("OPT"+t.opt)}))||f.disableCellsByRules)){o.next=48;break}return t=!0,o.abrupt("break",51);case 48:h++,o.next=43;break;case 51:t&&this.updateDisabledCells();case 52:case"end":return o.stop()}}),_callee2,this)}))),function onConfigChanged(e){return y.apply(this,arguments)})},{key:"creatNewGrid",value:function creatNewGrid(e){this.grids[e]=new u.Z(e,this.article,this.data),this.grids[e].onConfigChanged()}},{key:"stashAccessoiresOfGrid",value:function stashAccessoiresOfGrid(e){var t=this.collectAccessoiresToStash(this.grids[e]);t.length&&(this.stashedAccessoires[e]=t)}},{key:"collectAccessoiresToStash",value:function collectAccessoiresToStash(e){for(var t=[],i=0;i<e.Cells.length;i++){var r=e.Cells[i],s=r.Article;if(r.InUse===i&&s){for(var n={},l=s.shelfPlanner,a=0;a<(null!==(c=null==l?void 0:l.grids.length)&&void 0!==c?c:0);a++){var c,o=l.grids[a],d=l.collectAccessoiresToStash(o);d.length&&(n[o.ShelfIndex]=d)}t.push({articleCodex:s.articleCodex,cellIndex:i,noMove:r.NoMove,noDelete:r.NoDelete,quantity:s.quantity,variantValues:s.VariantValues,accessoires:n})}}return t}},{key:"placeStashedAccessoiresOfGrid",value:(x=(0,r.Z)(o().mark((function _callee3(e){var t;return o().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=(t=this.stashedAccessoires[e])&&t.length){i.next=3;break}return i.abrupt("return",0);case 3:return delete this.stashedAccessoires[e],i.next=6,this.placeStashedAccessoiresInGrid(e,t);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),_callee3,this)}))),function placeStashedAccessoiresOfGrid(e){return x.apply(this,arguments)})},{key:"placeStashedAccessoiresByGrid",value:(p=(0,r.Z)(o().mark((function _callee4(e){var t,i,r,s;return o().wrap((function _callee4$(n){for(;;)switch(n.prev=n.next){case 0:t=Object.keys(e),i=0;case 2:if(!(i<t.length)){n.next=14;break}return s=Number(t[i]),n.next=6,null===(r=this.getGridByIndex(s))||void 0===r?void 0:r.deleteAllAccOfGrid();case 6:return n.next=8,this.placeStashedAccessoiresInGrid(s,e[s]);case 8:if(n.sent){n.next=11;break}return n.next=11,this.initAccList(s);case 11:i++,n.next=2;break;case 14:case"end":return n.stop()}}),_callee4,this)}))),function placeStashedAccessoiresByGrid(e){return p.apply(this,arguments)})},{key:"placeStashedAccessoiresInGrid",value:(A=(0,r.Z)(o().mark((function _callee5(e,t){var i,r,s,n,l,a,c;return o().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(i=0,r=this.getGridByIndex(e)){o.next=4;break}return o.abrupt("return",i);case 4:s=0;case 5:if(!(s<t.length)){o.next=28;break}return n=t[s],r.ActAccessoire=n.articleCodex,o.next=10,h.Z.addAccessorieOnShelfPlanner(this.article.set,e,n.cellIndex,this.article.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 10:if(l=o.sent,r.ActAccessoire=void 0,a=!1===l||void 0===l.index?void 0:l,c=null==a?void 0:a.accessoire,a&&c){o.next=17;break}return g.error(new d.GE("shelfaccessoire of a switched off grid does not fit anymore and gets dropped",{code:"WC_0015",custom:{stashed:n,gridName:r.GridName,result:l,parentPosNr:this.article.posNr,parentArticleCodex:this.article.articleCodex,parentBasketId:this.article.basketId}})),o.abrupt("continue",25);case 17:if(c.quantity=n.quantity,i++,!Object.keys(n.variantValues).length){o.next=22;break}return o.next=22,f.Z.updateCfgValues(c,n.variantValues,{});case 22:if(!c.shelfPlanner){o.next=25;break}return o.next=25,c.shelfPlanner.placeStashedAccessoiresByGrid(n.accessoires);case 25:s++,o.next=5;break;case 28:return o.abrupt("return",i);case 29:case"end":return o.stop()}}),_callee5,this)}))),function placeStashedAccessoiresInGrid(e,t){return A.apply(this,arguments)})},{key:"initAccList",value:(k=(0,r.Z)(o().mark((function _callee6(e){var t,i,r,s,n,l,a,c,d,u,f,g;return o().wrap((function _callee6$(o){for(;;)switch(o.prev=o.next){case 0:t=this.activeGrids,i=0;case 2:if(!(i<t.length)){o.next=37;break}if(r=t[i],void 0===e||r.ShelfIndex===e){o.next=6;break}return o.abrupt("continue",34);case 6:if(r.InitAccArr){o.next=8;break}return o.abrupt("continue",34);case 8:s=0;case 9:if(!(s<r.InitAccArr.length)){o.next=34;break}n=r.InitAccArr[s],l=0;case 12:if(!(l<n.initRH.length)){o.next=31;break}return r.ActAccessoire=n.Codex,this.logShelfDebug({phase:"initAccessories",action:"initAccessoryRequested",gridIndex:r.ShelfIndex,cellIndex:n.initRH[l],articleCodex:n.Codex,detail:"from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed"}),o.next=17,h.Z.addAccessorieOnShelfPlanner(this.article.set,r.ShelfIndex,n.initRH[l],r.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 17:if(!n.replaceFromParent){o.next=27;break}if(!(c=this.getShelfParentShelfId())||null===(a=this.article.accessoireParentArticle)||void 0===a||!a.shelfPlanner){o.next=27;break}if(!((d=this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(c,n.Codex))&&d.length>0)){o.next=27;break}if(f=d[0],void 0===(g=null===(u=f.shelfPlanner)||void 0===u?void 0:u.getRHOnParentArticle())||void 0===f.relatedToShelfGrid){o.next=27;break}return o.next=27,h.Z.deleteAccessorieOnShelfPlanner(this.article.set,f.relatedToShelfGrid,g,this.article.accessoireParentArticle.basketId);case 27:r.ActAccessoire=void 0;case 28:l++,o.next=12;break;case 31:s++,o.next=9;break;case 34:i++,o.next=2;break;case 37:case"end":return o.stop()}}),_callee6,this)}))),function initAccList(e){return k.apply(this,arguments)})},{key:"getAccessorireByCodex",value:function getAccessorireByCodex(e,t){var i=this.grids.find((function(t){return t.ShelfId==e})),r=[];if(i)for(var s in i.Accessoires)i.Accessoires[s].articleCodex==t&&r.push(i.Accessoires[s]);return r}},{key:"triggerVisibility",value:(b=(0,r.Z)(o().mark((function _callee7(e){var t,i,r,s,n,l,a;return o().wrap((function _callee7$(c){for(;;)switch(c.prev=c.next){case 0:t=[],i=[],r=0;case 3:if(!(r<this.grids.length)){c.next=13;break}if((s=this.grids[r]).VisitOption){c.next=7;break}return c.abrupt("continue",10);case 7:if(!i.includes(s.VisitOption)&&!t.includes(s.VisitOption)){c.next=9;break}return c.abrupt("continue",10);case 9:e&&(s.gridGroup==e||s.alternativeGridGroups.includes(e))?(i.push(s.VisitOption),t.includes(s.VisitOption)&&t.splice(t.indexOf(s.VisitOption),1)):t.push(s.VisitOption);case 10:r++,c.next=3;break;case 13:n=0;case 14:if(!(n<[].concat(i,t).length)){c.next=23;break}if(l=[].concat(i,t)[n],!(a=this.article.getArticleOptionState((this.article.CatalogData.isIDMFormat?"":"OPT")+l))){c.next=20;break}return c.next=20,f.Z.updateOption(this.article,a.optionCodex,i.includes(l)?"OPVMIT":"OPVOHNE");case 20:n++,c.next=14;break;case 23:case"end":return c.stop()}}),_callee7,this)}))),function triggerVisibility(e){return b.apply(this,arguments)})},{key:"deleteAllAcc",value:(v=(0,r.Z)(o().mark((function _callee8(){var e;return o().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:this.article.shelfPlanData=void 0,this.restorePending=!1,e=0;case 3:if(!(e<this.grids.length)){t.next=9;break}return t.next=6,this.grids[e].deleteAllAccOfGrid();case 6:e++,t.next=3;break;case 9:case"end":return t.stop()}}),_callee8,this)}))),function deleteAllAcc(){return v.apply(this,arguments)})},{key:"GridAllowedOnCells",get:function get(){return this.gridAllowedOnCells}},{key:"GridAllowedOntoArticles",get:function get(){return this.gridAllowedOntoArticles}},{key:"TakePlaceOnOtherGrids",get:function get(){return this.takePlaceOnOtherGrids}},{key:"tryFitOnShelfOfGrid",value:function tryFitOnShelfOfGrid(e,t,i){var r=i.shelfHeight,s=this.grids[e];if(!r||isNaN(r))return alert("Der artikel: "+i.name+" hat keine RH hinterlegt! Der Metatag 'HEIGHTGRIDUSED' ist: "+i.shelfHeight),!1;var n=!1,l=this.doesTakePlaceOnOtherGrids(i)?this.activeGrids:[s];if(s.checkAccessoireInGridRules(i))return{type:"notAllowedByMaxQuantityReached",size:r};for(var a=0;a<l.length;a++)if(!1===(n=l[a].tryFitOnShelf(i,t,i.shelfPlanner))||"doesNotFit"===n.type||n.type.startsWith("notAllowed")||void 0===n.index)return n;return n}},{key:"getFreeSpacesOfAccessoireOfGrids",value:function getFreeSpacesOfAccessoireOfGrids(e,t){for(var i=this.grids,r={},s=0;s<i.length;s++){var n=i[s];n.DisabledByRule||(r[n.GridName]={freeCells:n.getFreeSpacesOfAccessoire(t),idx:s})}return r}},{key:"getPlannedSpacesOfGrids",value:function getPlannedSpacesOfGrids(){for(var e=this.grids,t={},i=0;i<e.length;i++){var r=e[i];r.DisabledByRule||(t[r.GridName]={accessories:r.getPlannedSpaces(),idx:i})}return t}},{key:"deleteAccessoireOfCellInGrid",value:(c=(0,r.Z)(o().mark((function _callee9(e,t){var i,r,s,n,l,a;return o().wrap((function _callee9$(c){for(;;)switch(c.prev=c.next){case 0:if(i=this.grids[e],r=i.Cells[t].InUse,(n=i.Cells.find((function(e){return e.OnBoard==r})))?(s=n.InUse,n.Article):(s=t,l=i.Cells[t].Article),!l){c.next=8;break}return this.checkForNewFreeAccessoire(l,e),c.next=8,this.handleDeleteTakePlaceOnOtherGrids(e,s,l);case 8:return c.next=10,i.deleteAccessoireInCells(s);case 10:return(a=c.sent)&&this.logShelfDebug({phase:"placement",action:"accessoryDeleted",gridIndex:e,cellIndex:s,articleCodex:a.articleCodex,articleName:a.name}),c.abrupt("return",a);case 13:case"end":return c.stop()}}),_callee9,this)}))),function deleteAccessoireOfCellInGrid(e,t){return c.apply(this,arguments)})},{key:"checkForNewFreeAccessoire",value:function checkForNewFreeAccessoire(e,t){if(void 0!==this.freeArticlesPossible[e.articleCodex]&&e.noPrice){this.freeArticlesPlanned[e.articleCodex]-=e.quantity;var i=this.grids[t];for(var r in i.Accessoires)i.Accessoires[r].articleCodex!=e.articleCodex||i.Accessoires[r].noPrice||(i.Accessoires[r].noPrice=!0,this.freeArticlesPlanned[i.Accessoires[r].articleCodex]+=e.quantity)}}},{key:"handleDeleteTakePlaceOnOtherGrids",value:(i=(0,r.Z)(o().mark((function _callee10(e,t,i){var r,s,n,l,a,c,d;return o().wrap((function _callee10$(o){for(;;)switch(o.prev=o.next){case 0:if(i.shelfHeight){o.next=2;break}return o.abrupt("return");case 2:if(i.shelfHeightAbove)for(r=0;r<i.shelfHeightAbove;r++)(null==(n=this.grids[e].Cells[t+i.shelfHeight+r])||null===(s=n.Article)||void 0===s?void 0:s.basketId)===i.basketId&&n.ClearInUse();if(i.shelfHeightBelow)for(l=0;l<i.shelfHeightBelow;l++)(null==(c=this.grids[e].Cells[t-(l+1)])||null===(a=c.Article)||void 0===a?void 0:a.basketId)===i.basketId&&c.ClearInUse();if(!this.doesTakePlaceOnOtherGrids(i)){o.next=14;break}d=0;case 6:if(!(d<this.grids.length)){o.next=14;break}if(d!==e){o.next=9;break}return o.abrupt("continue",11);case 9:return o.next=11,this.grids[d].deleteAccessoireInCells(t);case 11:d++,o.next=6;break;case 14:case"end":return o.stop()}}),_callee10,this)}))),function handleDeleteTakePlaceOnOtherGrids(e,t,r){return i.apply(this,arguments)})},{key:"addAccessoireInCellInGrid",value:(t=(0,r.Z)(o().mark((function _callee11(e,t,i,r,s){var n,l,a;return o().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:n=this.doesTakePlaceOnOtherGrids(e)?this.activeGrids:[this.grids[t]],l=0;case 2:if(!(l<n.length)){c.next=13;break}if(!(a=n[l]).DisabledByRule){c.next=7;break}return this.logShelfDebug({phase:"placement",action:"placementSkippedGridDisabled",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex}),c.abrupt("continue",10);case 7:return this.logShelfDebug({phase:"placement",action:"accessoryPlaced",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex,articleName:e.name,detail:r+(a.ShelfIndex!==t?" (placeholder via TakePlaceOnOtherGrids)":"")}),c.next=10,n[l].addAccessoireInCells(i,e,r,a.ShelfIndex!==t||(null==s?void 0:s.noMove),a.ShelfIndex!==t||(null==s?void 0:s.noDelete),a.ShelfIndex!==t||void 0);case 10:l++,c.next=2;break;case 13:this.checkForFreeAccessoire(e);case 14:case"end":return c.stop()}}),_callee11,this)}))),function addAccessoireInCellInGrid(e,i,r,s,n){return t.apply(this,arguments)})},{key:"checkForFreeAccessoire",value:function checkForFreeAccessoire(e){void 0!==this.freeArticlesPossible[e.articleCodex]&&(void 0===this.freeArticlesPlanned[e.articleCodex]||this.freeArticlesPossible[e.articleCodex]>this.freeArticlesPlanned[e.articleCodex])&&(e.noPrice=!0,void 0===this.freeArticlesPlanned[e.articleCodex]&&(this.freeArticlesPlanned[e.articleCodex]=0),this.freeArticlesPlanned[e.articleCodex]+=e.quantity)}},{key:"doesTakePlaceOnOtherGrids",value:function doesTakePlaceOnOtherGrids(e){var t,i=null===(t=e.shelfPlanner)||void 0===t?void 0:t.takePlaceOnOtherGrids;if(i)for(var r=0;r<i.length;r++)if(i[r].onParent==this.article.articleCodex)return!0;return!1}},{key:"accessoires",get:function get(){for(var e={},t=this.activeGrids,i=0;i<t.length;i++)for(var r in t[i].Accessoires)e[r]=t[i].Accessoires[r];return Object.keys(e).length>0?e:void 0}},{key:"DisableCellsByElement",get:function get(){return this.disableCellsByElement}},{key:"getActAccessoireOfGrid",value:function getActAccessoireOfGrid(e){return this.grids[e].ActAccessoire}},{key:"setActAccessoireOfGrid",value:function setActAccessoireOfGrid(e,t){for(var i=!1,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s];t&&n.getArticleRelationsById(e).includes(t)?n.ActAccessoire!==t&&(n.ActAccessoire=t,i=!0):n.ActAccessoire=void 0}return i}},{key:"generateShelfPlandata",value:function generateShelfPlandata(){for(var e,t=[],i=this.grids.filter((function(e){return!e.DisabledByRule||e.Cells.some((function(e){return e.InUse===e.Index&&e.Article}))})),r=0;r<i.length;r++){for(var s=[],n=i[r],l=0;l<n.Cells.length;l++){var a,c,o=n.Cells[l];if(s.push({inUse:o.InUse,noDelete:o.NoDelete,noMove:o.NoMove,onBoard:o.OnBoard}),n.ShelfIndex!=r&&(s[l].gridIndex=n.ShelfIndex),o.InUse==l)s[l].usedArticleData={Codex:null===(a=o.Article)||void 0===a?void 0:a.articleCodex,BasketID:null===(c=o.Article)||void 0===c?void 0:c.basketId}}t.push(s)}return{ShelfPlanner2:t,DoorPlannerData:null===(e=this.article.doorPlanner)||void 0===e?void 0:e.getMovedData(this.article.basketId)}}},{key:"getShelfPlannerAccessoires3DValues",value:function getShelfPlannerAccessoires3DValues(e){for(var t=this.activeGrids,i=0;i<t.length;i++)for(var r=t[i],s=0;s<r.Cells.length;s++){var n=r.Cells[s];if(n.InUse==s&&n.Article&&n.Article.model3DName&&!n.OnlyPlaceHolder){var l,a=n.Index;"vertikal"==r.Direction&&1!=this.article.CatalogData.useShelfPlannerRTV&&(a=r.Cells.length-1-n.Index),e.push({basketId:null===(l=n.Article)||void 0===l?void 0:l.basketId,gridId:r.ShelfIndex,gridName:r.GridName,model:n.Article.model3DName,parentBasketId:this.article.basketId,parentElementId:this.getShelfElementId(),rh:a}),n.Article.shelfPlanner&&(e=e.concat(n.Article.shelfPlanner.getShelfPlannerAccessoires3DValues([])))}}return e}},{key:"getShelfElementId",value:function getShelfElementId(){var e;if(null!==(e=this.article.accessoireParentArticle)&&void 0!==e&&e.shelfPlanner&&void 0!==this.article.relatedToShelfGrid&&this.grids.length>0){var t=this.getRHOnParentArticle();return this.article.accessoireParentArticle.shelfPlanner.getShelfElementId()+"."+this.article.relatedToShelfGrid+"."+t}return this.article.elementId.toString()}},{key:"getRHOnParentArticle",value:function getRHOnParentArticle(){var e,t=this;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid].Cells.find((function(e){var i;return(null===(i=e.Article)||void 0===i?void 0:i.basketId)==t.article.basketId})))||void 0===e?void 0:e.InUse}},{key:"getShelfPlannerItems",value:function getShelfPlannerItems(e){for(var t=[],i=this.article.CatalogData,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s].getArticleRelationsById(e);if(null!=n&&n.length)for(var l=function _loop(){var e=n[a];if(i.checkIfArticleCodexExists(e)){var r=i.getCatalogArticleByArticleCodex(e);if(!r||t.find((function(e){return e.articleCodex===r.articleCodex})))return 1;t.push({articleCodex:r.articleCodex,configStepKeys:[],image:r.image?i.getCatImageURL(r.image,""):void 0,name:r.name,longDescription:r.longDescription,price:i.dontShowBasePrice?0:Number(r.articlePrice),width:r.width,height:r.height,depth:r.depth,cellSize:r.shelfHeight,metaData:r.metaDataView,accessoireFamily:r.accessoireFamily,contentItemId:r.contentItemId,groupContentItemId:r.groupContentItemId,partlistcodexes:r.possiblePartlistCodexes})}},a=0;a<n.length;a++)l()}return{accessoires:t,grids:r}}},{key:"getShelfParentShelfId",value:function getShelfParentShelfId(){var e;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid])||void 0===e?void 0:e.ShelfId}},{key:"updateOnDockingChanged",value:function updateOnDockingChanged(e){("AVL"==e&&"RH_OVER_AVL"==this.disableCellsByElement||"AVR"==e&&"RH_OVER_AVR"==this.disableCellsByElement)&&this.updateDisabledCells()}},{key:"updateDisabledCells",value:function updateDisabledCells(){this.updateDisabledCellsOnDockedElements(),this.checkOnDockedHeight()}},{key:"updateDisabledCellsOnDockedElements",value:function updateDisabledCellsOnDockedElements(){var e,t=this.activeGrids,i=this.article.dockedOnAV("L"),r=this.article.dockedOnAV("R");if("RH_OVER_AVR"==this.disableCellsByElement&&i)null===(e=i.shelfPlanner)||void 0===e||e.disableCellsByDockedShelfs(t[0].getCellCount("AVL"));else if("RH_OVER_AVL"==this.disableCellsByElement&&r){var s;null===(s=r.shelfPlanner)||void 0===s||s.disableCellsByDockedShelfs(t[0].getCellCount("AVR"))}}},{key:"checkOnDockedHeight",value:function checkOnDockedHeight(){var e=this.article.dockedOnAV("R"),t=this.article.dockedOnAV("L");null!=e&&e.shelfPlanner&&e.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVR"==this.disableCellsByElement?this.disableCellsByDockedShelfs(e.shelfPlanner.activeGrids[0].getCellCount("AVL")):null!=t&&t.shelfPlanner&&t.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVL"==this.disableCellsByElement?this.disableCellsByDockedShelfs(t.shelfPlanner.activeGrids[0].getCellCount("AVR")):this.disableCellsByDockedShelfs()}},{key:"disableCellsByDockedShelfs",value:(e=(0,r.Z)(o().mark((function _callee12(e){var t,i,r,s=this;return o().wrap((function _callee12$(n){for(;;)switch(n.prev=n.next){case 0:t=this.activeGrids,i=o().mark((function _loop2(){var i,n,l,a,c,d,u,f,g,v;return o().wrap((function _loop2$(o){for(;;)switch(o.prev=o.next){case 0:for(i=t[r],n=i.getCellCount(),l=i.getDisabledCellsByRule(),c=a=null==e||e>n?n:e;c<i.Cells.length;c++)l.push(c);d=l.filter((function(e){return i.Cells[e]&&!i.Cells[e].IsDisabled})),u=i.Cells.filter((function(e,t){return e.IsDisabled&&!l.includes(t)})).length,(d.length||u)&&s.logShelfDebug({phase:"docking",action:"disabledCellsUpdated",gridIndex:i.ShelfIndex,detail:"newlyDisabled=[".concat(d.slice(0,30).join(","),"] reEnabled=").concat(u," ")+"(sources: DisableCellsByRules/measures=".concat(i.getDisabledCellsByRule().length,", beyond cellCount/docking cap=").concat(i.Cells.length-a,"); ")+"an occupied cell that gets disabled deletes its accessory"}),f=0;case 9:if(!(f<l.length)){o.next=18;break}if((g=i.Cells[l[f]]).InUse!=l[f]){o.next=14;break}return o.next=14,h.Z.deleteAccessorieOnShelfPlanner(s.article.set,i.ShelfIndex,g.InUse,i.basketId);case 14:g.IsDisabled=!0;case 15:f++,o.next=9;break;case 18:v=0;case 19:if(!(v<i.Cells.length)){o.next=26;break}if(!l.includes(v)){o.next=22;break}return o.abrupt("continue",23);case 22:i.Cells[v].IsDisabled=!1;case 23:v++,o.next=19;break;case 26:case"end":return o.stop()}}),_loop2)})),r=0;case 3:if(!(r<t.length)){n.next=8;break}return n.delegateYield(i(),"t0",5);case 5:r++,n.next=3;break;case 8:case"end":return n.stop()}}),_callee12,this)}))),function disableCellsByDockedShelfs(t){return e.apply(this,arguments)})},{key:"getGridByGridName",value:function getGridByGridName(e){return this.grids.find((function(t){return t.GridName==e}))}},{key:"getGridByIndex",value:function getGridByIndex(e){return this.grids.find((function(t){return t.ShelfIndex==e}))}},{key:"GridsOrGroupById",value:function GridsOrGroupById(e){return this.activeGrids.filter((function(t){return t.ShelfId==e||t.group==e||t.alternativeGridGroups.includes(e)}))}},{key:"getSelectedAccessoireById",value:function getSelectedAccessoireById(e){var t;return null===(t=this.GridsOrGroupById(e).find((function(t){if(t.ActAccessoire&&t.getArticleRelationsById(e).includes(t.ActAccessoire))return t})))||void 0===t?void 0:t.ActAccessoire}},{key:"getCellIndexOfBasketId",value:function getCellIndexOfBasketId(e,t){var i;return null===(i=this.getGridByIndex(e))||void 0===i?void 0:i.getIndexOfBasketId(t)}},{key:"allGrids",get:function get(){return this.grids}},{key:"activeGrids",get:function get(){return this.grids.filter((function(e){return!e.DisabledByRule}))}},{key:"allMontageOptions",get:function get(){return this.montageOptions}},{key:"getRelatedToGridIdByArticleCodex",value:function getRelatedToGridIdByArticleCodex(e,t){var i=this.grids[t].getGridIdByArticleCodex(e);if(i)return i;for(var r=0;r<this.grids.length;r++){var s=this.grids[r].getGridIdByArticleCodex(e);if(s)return s}}}]);var e,t,i,c,v,b,k,A,p,x,y,C}()}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[3596],{33596:(e,t,i)=>{i.r(t),i.d(t,{default:()=>v});var r=i(84658),s=i(12952),n=i(13125),l=i(43860),a=i(80248),c=i(50747),o=i.n(c),d=i(69369),h=i(37609),u=i(35215),f=i(69821);function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}var g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),v=function(){return(0,l.Z)((function ShelfPlanner(e,t){if((0,n.Z)(this,ShelfPlanner),(0,a.Z)(this,"article",void 0),(0,a.Z)(this,"grids",[]),(0,a.Z)(this,"isVisible",void 0),(0,a.Z)(this,"showOnRule",void 0),(0,a.Z)(this,"showAfterOPT",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"freeArticlesPossible",{}),(0,a.Z)(this,"freeArticlesPlanned",{}),(0,a.Z)(this,"gridAllowedOnCells",void 0),(0,a.Z)(this,"gridAllowedOntoArticles",void 0),(0,a.Z)(this,"takePlaceOnOtherGrids",void 0),(0,a.Z)(this,"disableCellsByElement",void 0),(0,a.Z)(this,"montageOptions",[]),(0,a.Z)(this,"restorePending",void 0),(0,a.Z)(this,"stashedAccessoires",{}),(0,a.Z)(this,"shelfDebugStack",[]),(0,a.Z)(this,"shelfDebugSeq",0),this.article=t,this.restorePending=!!t.shelfPlanData,this.disableCellsByElement=e.DisableCells,this.data=e,this.showAfterOPT=e.ShowAfterOPT,this.showOnRule=e.ShowOnRule?d.ZP.getRuleByFormula(e.ShowOnRule,t.catalogCodex,t.CatalogData.multiselectOptions):void 0,this.gridAllowedOnCells=e.GridAllowedOnCells,this.gridAllowedOntoArticles=e.GridAllowedOntoArticles,this.takePlaceOnOtherGrids=e.TakePlaceOnOtherGrids,this.initFreeArticles(),e.ShelfPlanner&&e.ShelfPlanner.length>0){for(var i=0;i<e.ShelfPlanner.length;i++)this.creatNewGrid(i),this.updateDisabledCells();this.montageOptions=(0,s.Z)(new Set(this.grids.reduce((function(e,t){return e=e.concat(t.montageOptionsList)}),[])))}}),[{key:"logShelfDebug",value:function logShelfDebug(e){this.shelfDebugStack.push(function _objectSpread(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(i),!0).forEach((function(t){(0,a.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({seq:this.shelfDebugSeq++},e)),this.shelfDebugStack.length>500&&this.shelfDebugStack.splice(0,this.shelfDebugStack.length-500)}},{key:"initFreeArticles",value:function initFreeArticles(){if(this.data.ShelfPlanner)for(var e=0;e<this.data.ShelfPlanner.length;e++){var t=this.data.ShelfPlanner[e];if(t.initAccArr)for(var i=0;i<t.initAccArr.length;i++){var r=t.initAccArr[i];r.noPrice&&(void 0===this.freeArticlesPossible[r.Codex]&&(this.freeArticlesPossible[r.Codex]=0),this.freeArticlesPossible[r.Codex]+=r.Quantity)}}}},{key:"IsVisible",get:function get(){return this.isVisible}},{key:"RestorePending",get:function get(){return this.restorePending},set:function set(e){this.restorePending=e}},{key:"setIsVisible",value:(C=(0,r.Z)(o().mark((function _callee(e){return o().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(this.isVisible==e){t.next=13;break}if(this.logShelfDebug({phase:"visibility",action:e?"plannerShown":"plannerHidden",detail:e?void 0:"showOnRule/visibility turned false — all placed accessories are deleted"}),!e){t.next=11;break}if(this.isVisible=e,this.article.shelfPlanData){t.next=9;break}return t.next=7,this.onConfigChanged({});case 7:return t.next=9,this.initAccList();case 9:t.next=13;break;case 11:return t.next=13,this.deleteAllAcc();case 13:this.isVisible=e;case 14:case"end":return t.stop()}}),_callee,this)}))),function setIsVisible(e){return C.apply(this,arguments)})},{key:"onConfigChanged",value:(y=(0,r.Z)(o().mark((function _callee2(e){var t,i,r,s,n,l,a,c,d,h,u,f;return o().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:for(t=!1,i=[],r=0;r<this.grids.length;r++)i.push(this.grids[r].onConfigChanged());s=0;case 4:if(!(s<i.length)){o.next=13;break}if(i[s].length){o.next=7;break}return o.abrupt("continue",10);case 7:n=this.grids[s],i[s].includes("disableGridRule")&&this.logShelfDebug({phase:"configChanged",action:n.DisabledByRule?"gridDisabledByRule":"gridEnabledByRule",gridIndex:n.ShelfIndex,detail:n.ShowOnRule}),i[s].includes("heightGridRule")&&this.logShelfDebug({phase:"configChanged",action:"gridRecreated",gridIndex:n.ShelfIndex,detail:"HeightGridCellCountOnRule match changed — grid rebuilt (cell count / placeable accessories can change), its accessories are deleted"});case 10:s++,o.next=4;break;case 13:l=0;case 14:if(!(l<i.length)){o.next=23;break}if(i[l].length){o.next=17;break}return o.abrupt("continue",20);case 17:return this.stashAccessoiresOfGrid(l),o.next=20,this.grids[l].deleteAllAccOfGrid();case 20:l++,o.next=14;break;case 23:a=0;case 24:if(!(a<i.length)){o.next=40;break}if(i[a].length){o.next=27;break}return o.abrupt("continue",37);case 27:if(i[a].includes("heightGridRule")&&(this.creatNewGrid(a),t=!0),c=this.grids[a],!i[a].includes("heightGridRule")&&!i[a].includes("disableGridRule")||c.DisabledByRule){o.next=37;break}if(!this.restorePending){o.next=32;break}return o.abrupt("continue",37);case 32:return o.next=34,this.placeStashedAccessoiresOfGrid(a);case 34:if(o.sent){o.next=37;break}return o.next=37,this.initAccList(a);case 37:a++,o.next=24;break;case 40:if(t||!Object.keys(e).length){o.next=51;break}d=this.activeGrids,h=0;case 43:if(!(h<d.length)){o.next=51;break}if(f=d[h],!(null!==(u=f.DisableCellsByMeasures)&&void 0!==u&&u.options.find((function(t){return Object.keys(e).includes("OPT"+t.opt)}))||f.disableCellsByRules)){o.next=48;break}return t=!0,o.abrupt("break",51);case 48:h++,o.next=43;break;case 51:t&&this.updateDisabledCells();case 52:case"end":return o.stop()}}),_callee2,this)}))),function onConfigChanged(e){return y.apply(this,arguments)})},{key:"creatNewGrid",value:function creatNewGrid(e){this.grids[e]=new u.Z(e,this.article,this.data),this.grids[e].onConfigChanged()}},{key:"stashAccessoiresOfGrid",value:function stashAccessoiresOfGrid(e){var t=this.collectAccessoiresToStash(this.grids[e]);t.length&&(this.stashedAccessoires[e]=t)}},{key:"collectAccessoiresToStash",value:function collectAccessoiresToStash(e){for(var t=[],i=0;i<e.Cells.length;i++){var r=e.Cells[i],s=r.Article;if(r.InUse===i&&s){for(var n={},l=s.shelfPlanner,a=0;a<(null!==(c=null==l?void 0:l.grids.length)&&void 0!==c?c:0);a++){var c,o=l.grids[a],d=l.collectAccessoiresToStash(o);d.length&&(n[o.ShelfIndex]=d)}t.push({articleCodex:s.articleCodex,cellIndex:i,noMove:r.NoMove,noDelete:r.NoDelete,quantity:s.quantity,variantValues:s.VariantValues,accessoires:n})}}return t}},{key:"placeStashedAccessoiresOfGrid",value:(x=(0,r.Z)(o().mark((function _callee3(e){var t;return o().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(null!=(t=this.stashedAccessoires[e])&&t.length){i.next=3;break}return i.abrupt("return",0);case 3:return delete this.stashedAccessoires[e],i.next=6,this.placeStashedAccessoiresInGrid(e,t);case 6:return i.abrupt("return",i.sent);case 7:case"end":return i.stop()}}),_callee3,this)}))),function placeStashedAccessoiresOfGrid(e){return x.apply(this,arguments)})},{key:"placeStashedAccessoiresByGrid",value:(p=(0,r.Z)(o().mark((function _callee4(e){var t,i,r,s;return o().wrap((function _callee4$(n){for(;;)switch(n.prev=n.next){case 0:t=Object.keys(e),i=0;case 2:if(!(i<t.length)){n.next=14;break}return s=Number(t[i]),n.next=6,null===(r=this.getGridByIndex(s))||void 0===r?void 0:r.deleteAllAccOfGrid();case 6:return n.next=8,this.placeStashedAccessoiresInGrid(s,e[s]);case 8:if(n.sent){n.next=11;break}return n.next=11,this.initAccList(s);case 11:i++,n.next=2;break;case 14:case"end":return n.stop()}}),_callee4,this)}))),function placeStashedAccessoiresByGrid(e){return p.apply(this,arguments)})},{key:"placeStashedAccessoiresInGrid",value:(A=(0,r.Z)(o().mark((function _callee5(e,t){var i,r,s,n,l,a,c;return o().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(i=0,r=this.getGridByIndex(e)){o.next=4;break}return o.abrupt("return",i);case 4:s=0;case 5:if(!(s<t.length)){o.next=28;break}return n=t[s],r.ActAccessoire=n.articleCodex,o.next=10,h.Z.addAccessorieOnShelfPlanner(this.article.set,e,n.cellIndex,this.article.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 10:if(l=o.sent,r.ActAccessoire=void 0,a=!1===l||void 0===l.index?void 0:l,c=null==a?void 0:a.accessoire,a&&c){o.next=17;break}return g.error(new d.GE("shelfaccessoire of a switched off grid does not fit anymore and gets dropped",{code:"WC_0015",custom:{stashed:n,gridName:r.GridName,result:l,parentPosNr:this.article.posNr,parentArticleCodex:this.article.articleCodex,parentBasketId:this.article.basketId}})),o.abrupt("continue",25);case 17:if(c.quantity=n.quantity,i++,!Object.keys(n.variantValues).length){o.next=22;break}return o.next=22,f.Z.updateCfgValues(c,n.variantValues,{});case 22:if(!c.shelfPlanner){o.next=25;break}return o.next=25,c.shelfPlanner.placeStashedAccessoiresByGrid(n.accessoires);case 25:s++,o.next=5;break;case 28:return o.abrupt("return",i);case 29:case"end":return o.stop()}}),_callee5,this)}))),function placeStashedAccessoiresInGrid(e,t){return A.apply(this,arguments)})},{key:"initAccList",value:(k=(0,r.Z)(o().mark((function _callee6(e){var t,i,r,s,n,l,a,c,d,u,f,g;return o().wrap((function _callee6$(o){for(;;)switch(o.prev=o.next){case 0:t=this.activeGrids,i=0;case 2:if(!(i<t.length)){o.next=37;break}if(r=t[i],void 0===e||r.ShelfIndex===e){o.next=6;break}return o.abrupt("continue",34);case 6:if(r.InitAccArr){o.next=8;break}return o.abrupt("continue",34);case 8:s=0;case 9:if(!(s<r.InitAccArr.length)){o.next=34;break}n=r.InitAccArr[s],l=0;case 12:if(!(l<n.initRH.length)){o.next=31;break}return r.ActAccessoire=n.Codex,this.logShelfDebug({phase:"initAccessories",action:"initAccessoryRequested",gridIndex:r.ShelfIndex,cellIndex:n.initRH[l],articleCodex:n.Codex,detail:"from InitAccArr — a missing matching accessoryPlaced entry right after means the init placement failed"}),o.next=17,h.Z.addAccessorieOnShelfPlanner(this.article.set,r.ShelfIndex,n.initRH[l],r.basketId,{noMove:n.noMove,noDelete:n.noDelete,byInit:!0});case 17:if(!n.replaceFromParent){o.next=27;break}if(!(c=this.getShelfParentShelfId())||null===(a=this.article.accessoireParentArticle)||void 0===a||!a.shelfPlanner){o.next=27;break}if(!((d=this.article.accessoireParentArticle.shelfPlanner.getAccessorireByCodex(c,n.Codex))&&d.length>0)){o.next=27;break}if(f=d[0],void 0===(g=null===(u=f.shelfPlanner)||void 0===u?void 0:u.getRHOnParentArticle())||void 0===f.relatedToShelfGrid){o.next=27;break}return o.next=27,h.Z.deleteAccessorieOnShelfPlanner(this.article.set,f.relatedToShelfGrid,g,this.article.accessoireParentArticle.basketId);case 27:r.ActAccessoire=void 0;case 28:l++,o.next=12;break;case 31:s++,o.next=9;break;case 34:i++,o.next=2;break;case 37:case"end":return o.stop()}}),_callee6,this)}))),function initAccList(e){return k.apply(this,arguments)})},{key:"getAccessorireByCodex",value:function getAccessorireByCodex(e,t){var i=this.grids.find((function(t){return t.ShelfId==e})),r=[];if(i)for(var s in i.Accessoires)i.Accessoires[s].articleCodex==t&&r.push(i.Accessoires[s]);return r}},{key:"triggerVisibility",value:(b=(0,r.Z)(o().mark((function _callee7(e){var t,i,r,s,n,l,a;return o().wrap((function _callee7$(c){for(;;)switch(c.prev=c.next){case 0:t=[],i=[],r=0;case 3:if(!(r<this.grids.length)){c.next=13;break}if((s=this.grids[r]).VisitOption){c.next=7;break}return c.abrupt("continue",10);case 7:if(!i.includes(s.VisitOption)&&!t.includes(s.VisitOption)){c.next=9;break}return c.abrupt("continue",10);case 9:e&&(s.gridGroup==e||s.alternativeGridGroups.includes(e))?(i.push(s.VisitOption),t.includes(s.VisitOption)&&t.splice(t.indexOf(s.VisitOption),1)):t.push(s.VisitOption);case 10:r++,c.next=3;break;case 13:n=0;case 14:if(!(n<[].concat(i,t).length)){c.next=23;break}if(l=[].concat(i,t)[n],!(a=this.article.getArticleOptionState((this.article.CatalogData.isIDMFormat?"":"OPT")+l))){c.next=20;break}return c.next=20,f.Z.updateOption(this.article,a.optionCodex,i.includes(l)?"OPVMIT":"OPVOHNE");case 20:n++,c.next=14;break;case 23:case"end":return c.stop()}}),_callee7,this)}))),function triggerVisibility(e){return b.apply(this,arguments)})},{key:"deleteAllAcc",value:(v=(0,r.Z)(o().mark((function _callee8(){var e;return o().wrap((function _callee8$(t){for(;;)switch(t.prev=t.next){case 0:this.article.shelfPlanData=void 0,this.restorePending=!1,e=0;case 3:if(!(e<this.grids.length)){t.next=9;break}return t.next=6,this.grids[e].deleteAllAccOfGrid();case 6:e++,t.next=3;break;case 9:case"end":return t.stop()}}),_callee8,this)}))),function deleteAllAcc(){return v.apply(this,arguments)})},{key:"GridAllowedOnCells",get:function get(){return this.gridAllowedOnCells}},{key:"GridAllowedOntoArticles",get:function get(){return this.gridAllowedOntoArticles}},{key:"TakePlaceOnOtherGrids",get:function get(){return this.takePlaceOnOtherGrids}},{key:"tryFitOnShelfOfGrid",value:function tryFitOnShelfOfGrid(e,t,i){var r=i.shelfHeight,s=this.grids[e];if(!r||isNaN(r))return alert("Der artikel: "+i.name+" hat keine RH hinterlegt! Der Metatag 'HEIGHTGRIDUSED' ist: "+i.shelfHeight),!1;var n=!1,l=this.doesTakePlaceOnOtherGrids(i)?this.activeGrids:[s];if(s.checkAccessoireInGridRules(i))return{type:"notAllowedByMaxQuantityReached",size:r};for(var a=0;a<l.length;a++)if(!1===(n=l[a].tryFitOnShelf(i,t,i.shelfPlanner))||"doesNotFit"===n.type||n.type.startsWith("notAllowed")||void 0===n.index)return n;return n}},{key:"getFreeSpacesOfAccessoireOfGrids",value:function getFreeSpacesOfAccessoireOfGrids(e,t){for(var i=this.grids,r={},s=0;s<i.length;s++){var n=i[s];n.DisabledByRule||(r[n.GridName]={freeCells:n.getFreeSpacesOfAccessoire(t),idx:s})}return r}},{key:"getPlannedSpacesOfGrids",value:function getPlannedSpacesOfGrids(){for(var e=this.grids,t={},i=0;i<e.length;i++){var r=e[i];r.DisabledByRule||(t[r.GridName]={accessories:r.getPlannedSpaces(),idx:i})}return t}},{key:"deleteAccessoireOfCellInGrid",value:(c=(0,r.Z)(o().mark((function _callee9(e,t){var i,r,s,n,l,a;return o().wrap((function _callee9$(c){for(;;)switch(c.prev=c.next){case 0:if(i=this.grids[e],r=i.Cells[t].InUse,(n=i.Cells.find((function(e){return e.OnBoard==r})))?(s=n.InUse,n.Article):(s=t,l=i.Cells[t].Article),!l){c.next=8;break}return this.checkForNewFreeAccessoire(l,e),c.next=8,this.handleDeleteTakePlaceOnOtherGrids(e,s,l);case 8:return c.next=10,i.deleteAccessoireInCells(s);case 10:return(a=c.sent)&&this.logShelfDebug({phase:"placement",action:"accessoryDeleted",gridIndex:e,cellIndex:s,articleCodex:a.articleCodex,articleName:a.name}),c.abrupt("return",a);case 13:case"end":return c.stop()}}),_callee9,this)}))),function deleteAccessoireOfCellInGrid(e,t){return c.apply(this,arguments)})},{key:"checkForNewFreeAccessoire",value:function checkForNewFreeAccessoire(e,t){if(void 0!==this.freeArticlesPossible[e.articleCodex]&&e.noPrice){this.freeArticlesPlanned[e.articleCodex]-=e.quantity;var i=this.grids[t];for(var r in i.Accessoires)i.Accessoires[r].articleCodex!=e.articleCodex||i.Accessoires[r].noPrice||(i.Accessoires[r].noPrice=!0,this.freeArticlesPlanned[i.Accessoires[r].articleCodex]+=e.quantity)}}},{key:"handleDeleteTakePlaceOnOtherGrids",value:(i=(0,r.Z)(o().mark((function _callee10(e,t,i){var r,s,n,l,a,c,d;return o().wrap((function _callee10$(o){for(;;)switch(o.prev=o.next){case 0:if(i.shelfHeight){o.next=2;break}return o.abrupt("return");case 2:if(i.shelfHeightAbove)for(r=0;r<i.shelfHeightAbove;r++)(null==(n=this.grids[e].Cells[t+i.shelfHeight+r])||null===(s=n.Article)||void 0===s?void 0:s.basketId)===i.basketId&&n.ClearInUse();if(i.shelfHeightBelow)for(l=0;l<i.shelfHeightBelow;l++)(null==(c=this.grids[e].Cells[t-(l+1)])||null===(a=c.Article)||void 0===a?void 0:a.basketId)===i.basketId&&c.ClearInUse();if(!this.doesTakePlaceOnOtherGrids(i)){o.next=14;break}d=0;case 6:if(!(d<this.grids.length)){o.next=14;break}if(d!==e){o.next=9;break}return o.abrupt("continue",11);case 9:return o.next=11,this.grids[d].deleteAccessoireInCells(t);case 11:d++,o.next=6;break;case 14:case"end":return o.stop()}}),_callee10,this)}))),function handleDeleteTakePlaceOnOtherGrids(e,t,r){return i.apply(this,arguments)})},{key:"addAccessoireInCellInGrid",value:(t=(0,r.Z)(o().mark((function _callee11(e,t,i,r,s){var n,l,a;return o().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:n=this.doesTakePlaceOnOtherGrids(e)?this.activeGrids:[this.grids[t]],l=0;case 2:if(!(l<n.length)){c.next=13;break}if(!(a=n[l]).DisabledByRule){c.next=7;break}return this.logShelfDebug({phase:"placement",action:"placementSkippedGridDisabled",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex}),c.abrupt("continue",10);case 7:return this.logShelfDebug({phase:"placement",action:"accessoryPlaced",gridIndex:a.ShelfIndex,cellIndex:i,articleCodex:e.articleCodex,articleName:e.name,detail:r+(a.ShelfIndex!==t?" (placeholder via TakePlaceOnOtherGrids)":"")}),c.next=10,n[l].addAccessoireInCells(i,e,r,a.ShelfIndex!==t||(null==s?void 0:s.noMove),a.ShelfIndex!==t||(null==s?void 0:s.noDelete),a.ShelfIndex!==t||void 0);case 10:l++,c.next=2;break;case 13:this.checkForFreeAccessoire(e);case 14:case"end":return c.stop()}}),_callee11,this)}))),function addAccessoireInCellInGrid(e,i,r,s,n){return t.apply(this,arguments)})},{key:"checkForFreeAccessoire",value:function checkForFreeAccessoire(e){void 0!==this.freeArticlesPossible[e.articleCodex]&&(void 0===this.freeArticlesPlanned[e.articleCodex]||this.freeArticlesPossible[e.articleCodex]>this.freeArticlesPlanned[e.articleCodex])&&(e.noPrice=!0,void 0===this.freeArticlesPlanned[e.articleCodex]&&(this.freeArticlesPlanned[e.articleCodex]=0),this.freeArticlesPlanned[e.articleCodex]+=e.quantity)}},{key:"doesTakePlaceOnOtherGrids",value:function doesTakePlaceOnOtherGrids(e){var t,i=null===(t=e.shelfPlanner)||void 0===t?void 0:t.takePlaceOnOtherGrids;if(i)for(var r=0;r<i.length;r++)if(i[r].onParent==this.article.articleCodex)return!0;return!1}},{key:"accessoires",get:function get(){for(var e={},t=this.activeGrids,i=0;i<t.length;i++)for(var r in t[i].Accessoires)e[r]=t[i].Accessoires[r];return Object.keys(e).length>0?e:void 0}},{key:"DisableCellsByElement",get:function get(){return this.disableCellsByElement}},{key:"getActAccessoireOfGrid",value:function getActAccessoireOfGrid(e){return this.grids[e].ActAccessoire}},{key:"setActAccessoireOfGrid",value:function setActAccessoireOfGrid(e,t){for(var i=!1,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s];t&&n.getArticleRelationsById(e).includes(t)?n.ActAccessoire!==t&&(n.ActAccessoire=t,i=!0):n.ActAccessoire=void 0}return i}},{key:"generateShelfPlandata",value:function generateShelfPlandata(){for(var e,t=[],i=this.grids.filter((function(e){return!e.DisabledByRule||e.Cells.some((function(e){return e.InUse===e.Index&&e.Article}))})),r=0;r<i.length;r++){for(var s=[],n=i[r],l=0;l<n.Cells.length;l++){var a,c,o=n.Cells[l];if(s.push({inUse:o.InUse,noDelete:o.NoDelete,noMove:o.NoMove,onBoard:o.OnBoard}),n.ShelfIndex!=r&&(s[l].gridIndex=n.ShelfIndex),o.InUse==l)s[l].usedArticleData={Codex:null===(a=o.Article)||void 0===a?void 0:a.articleCodex,BasketID:null===(c=o.Article)||void 0===c?void 0:c.basketId}}t.push(s)}return{ShelfPlanner2:t,DoorPlannerData:null===(e=this.article.doorPlanner)||void 0===e?void 0:e.getMovedData(this.article.basketId)}}},{key:"getShelfPlannerAccessoires3DValues",value:function getShelfPlannerAccessoires3DValues(e){for(var t=this.activeGrids,i=0;i<t.length;i++)for(var r=t[i],s=0;s<r.Cells.length;s++){var n=r.Cells[s];if(n.InUse==s&&n.Article&&n.Article.model3DName&&!n.OnlyPlaceHolder){var l,a=n.Index;"vertikal"==r.Direction&&1!=this.article.CatalogData.useShelfPlannerRTV&&(a=r.Cells.length-1-n.Index),e.push({basketId:null===(l=n.Article)||void 0===l?void 0:l.basketId,gridId:r.ShelfIndex,gridName:r.GridName,model:n.Article.model3DName,parentBasketId:this.article.basketId,parentElementId:this.getShelfElementId(),rh:a}),n.Article.shelfPlanner&&(e=e.concat(n.Article.shelfPlanner.getShelfPlannerAccessoires3DValues([])))}}return e}},{key:"getShelfElementId",value:function getShelfElementId(){var e;if(null!==(e=this.article.accessoireParentArticle)&&void 0!==e&&e.shelfPlanner&&void 0!==this.article.relatedToShelfGrid&&this.grids.length>0){var t=this.getRHOnParentArticle();return this.article.accessoireParentArticle.shelfPlanner.getShelfElementId()+"."+this.article.relatedToShelfGrid+"."+t}return this.article.elementId.toString()}},{key:"getRHOnParentArticle",value:function getRHOnParentArticle(){var e,t=this;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid].Cells.find((function(e){var i;return(null===(i=e.Article)||void 0===i?void 0:i.basketId)==t.article.basketId})))||void 0===e?void 0:e.InUse}},{key:"getShelfPlannerItems",value:function getShelfPlannerItems(e){for(var t=[],i=this.article.CatalogData,r=this.GridsOrGroupById(e),s=0;s<r.length;s++){var n=r[s].getArticleRelationsById(e);if(null!=n&&n.length)for(var l=function _loop(){var e=n[a];if(i.checkIfArticleCodexExists(e)){var r=i.getCatalogArticleByArticleCodex(e);if(!r||t.find((function(e){return e.articleCodex===r.articleCodex})))return 1;t.push({articleCodex:r.articleCodex,configStepKeys:[],image:r.image?i.getCatImageURL(r.image,""):void 0,name:r.name,longDescription:r.longDescription,price:i.dontShowBasePrice?0:Number(r.articlePrice),width:r.width,height:r.height,depth:r.depth,cellSize:r.shelfHeight,metaData:r.metaDataView,accessoireFamily:r.accessoireFamily,contentItemId:r.contentItemId,groupContentItemId:r.groupContentItemId,partlistcodexes:r.possiblePartlistCodexes})}},a=0;a<n.length;a++)l()}return{accessoires:t,grids:r}}},{key:"getShelfParentShelfId",value:function getShelfParentShelfId(){var e;if(void 0!==this.article.relatedToShelfGrid)return null===(e=this.article.accessoireParentArticle)||void 0===e||null===(e=e.shelfPlanner)||void 0===e||null===(e=e.grids[this.article.relatedToShelfGrid])||void 0===e?void 0:e.ShelfId}},{key:"updateOnDockingChanged",value:function updateOnDockingChanged(e){("AVL"==e&&"RH_OVER_AVL"==this.disableCellsByElement||"AVR"==e&&"RH_OVER_AVR"==this.disableCellsByElement)&&this.updateDisabledCells()}},{key:"updateDisabledCells",value:function updateDisabledCells(){this.updateDisabledCellsOnDockedElements(),this.checkOnDockedHeight()}},{key:"updateDisabledCellsOnDockedElements",value:function updateDisabledCellsOnDockedElements(){var e,t=this.activeGrids,i=this.article.dockedOnAV("L"),r=this.article.dockedOnAV("R");if("RH_OVER_AVR"==this.disableCellsByElement&&i)null===(e=i.shelfPlanner)||void 0===e||e.disableCellsByDockedShelfs(t[0].getCellCount("AVL"));else if("RH_OVER_AVL"==this.disableCellsByElement&&r){var s;null===(s=r.shelfPlanner)||void 0===s||s.disableCellsByDockedShelfs(t[0].getCellCount("AVR"))}}},{key:"checkOnDockedHeight",value:function checkOnDockedHeight(){var e=this.article.dockedOnAV("R"),t=this.article.dockedOnAV("L");null!=e&&e.shelfPlanner&&e.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVR"==this.disableCellsByElement?this.disableCellsByDockedShelfs(e.shelfPlanner.activeGrids[0].getCellCount("AVL")):null!=t&&t.shelfPlanner&&t.shelfPlanner.activeGrids.length>0&&"RH_OVER_AVL"==this.disableCellsByElement?this.disableCellsByDockedShelfs(t.shelfPlanner.activeGrids[0].getCellCount("AVR")):this.disableCellsByDockedShelfs()}},{key:"disableCellsByDockedShelfs",value:(e=(0,r.Z)(o().mark((function _callee12(e){var t,i,r,s=this;return o().wrap((function _callee12$(n){for(;;)switch(n.prev=n.next){case 0:t=this.activeGrids,i=o().mark((function _loop2(){var i,n,l,a,c,d,u,f,g,v;return o().wrap((function _loop2$(o){for(;;)switch(o.prev=o.next){case 0:for(i=t[r],n=i.getCellCount(),l=i.getDisabledCellsByRule(),c=a=null==e||e>n?n:e;c<i.Cells.length;c++)l.push(c);d=l.filter((function(e){return i.Cells[e]&&!i.Cells[e].IsDisabled})),u=i.Cells.filter((function(e,t){return e.IsDisabled&&!l.includes(t)})).length,(d.length||u)&&s.logShelfDebug({phase:"docking",action:"disabledCellsUpdated",gridIndex:i.ShelfIndex,detail:"newlyDisabled=[".concat(d.slice(0,30).join(","),"] reEnabled=").concat(u," ")+"(sources: DisableCellsByRules/measures=".concat(i.getDisabledCellsByRule().length,", beyond cellCount/docking cap=").concat(i.Cells.length-a,"); ")+"an occupied cell that gets disabled deletes its accessory"}),f=0;case 9:if(!(f<l.length)){o.next=18;break}if((g=i.Cells[l[f]]).InUse!=l[f]){o.next=14;break}return o.next=14,h.Z.deleteAccessorieOnShelfPlanner(s.article.set,i.ShelfIndex,g.InUse,i.basketId);case 14:g.IsDisabled=!0;case 15:f++,o.next=9;break;case 18:v=0;case 19:if(!(v<i.Cells.length)){o.next=26;break}if(!l.includes(v)){o.next=22;break}return o.abrupt("continue",23);case 22:i.Cells[v].IsDisabled=!1;case 23:v++,o.next=19;break;case 26:case"end":return o.stop()}}),_loop2)})),r=0;case 3:if(!(r<t.length)){n.next=8;break}return n.delegateYield(i(),"t0",5);case 5:r++,n.next=3;break;case 8:case"end":return n.stop()}}),_callee12,this)}))),function disableCellsByDockedShelfs(t){return e.apply(this,arguments)})},{key:"getGridByGridName",value:function getGridByGridName(e){return this.grids.find((function(t){return t.GridName==e}))}},{key:"getGridByIndex",value:function getGridByIndex(e){return this.grids.find((function(t){return t.ShelfIndex==e}))}},{key:"GridsOrGroupById",value:function GridsOrGroupById(e){return this.activeGrids.filter((function(t){return t.ShelfId==e||t.group==e||t.alternativeGridGroups.includes(e)}))}},{key:"getSelectedAccessoireById",value:function getSelectedAccessoireById(e){var t;return null===(t=this.GridsOrGroupById(e).find((function(t){if(t.ActAccessoire&&t.getArticleRelationsById(e).includes(t.ActAccessoire))return t})))||void 0===t?void 0:t.ActAccessoire}},{key:"getCellIndexOfBasketId",value:function getCellIndexOfBasketId(e,t){var i;return null===(i=this.getGridByIndex(e))||void 0===i?void 0:i.getIndexOfBasketId(t)}},{key:"allGrids",get:function get(){return this.grids}},{key:"activeGrids",get:function get(){return this.grids.filter((function(e){return!e.DisabledByRule}))}},{key:"allMontageOptions",get:function get(){return this.montageOptions}},{key:"getRelatedToGridIdByArticleCodex",value:function getRelatedToGridIdByArticleCodex(e,t){var i=this.grids[t].getGridIdByArticleCodex(e);if(i)return i;for(var r=0;r<this.grids.length;r++){var s=this.grids[r].getGridIdByArticleCodex(e);if(s)return s}}}]);var e,t,i,c,v,b,k,A,p,x,y,C}()}}]);