@crystaldesign/diva-web-planner-react 25.10.0-beta.3 → 25.10.0-beta.31
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.
- package/build/esm/{ArticleProperties-be20985e.js → ArticleProperties-b1a3bb3c.js} +1 -1
- package/build/esm/{CatalogProperties-4d82e8fa.js → CatalogProperties-069aa0c3.js} +1 -1
- package/build/esm/{DecisionVizualizer-2e563b9b.js → DecisionVizualizer-d0e0645d.js} +1 -1
- package/build/esm/{OptionProperties-4e0a1bff.js → OptionProperties-9d913f4d.js} +1 -1
- package/build/esm/{OptionValueProperties-9b7236e2.js → OptionValueProperties-0494fa02.js} +1 -1
- package/build/esm/{Planner2DGrid-ea59bcee.js → Planner2DGrid-6b0104e4.js} +1 -1
- package/build/esm/{Planner3DImage-73f9a359.js → Planner3DImage-0be117bb.js} +5 -5
- package/build/esm/{index-086337a6.js → index-0160d2de.js} +108 -109
- package/build/esm/{index-60eea47e.js → index-048cdfc6.js} +3 -3
- package/build/esm/{index-f5874a69.js → index-04ab9c07.js} +2 -2
- package/build/esm/{index-5d00b9c7.js → index-060dc625.js} +4 -4
- package/build/esm/{index-8a790803.js → index-07024069.js} +2 -2
- package/build/esm/{index-4ff0c300.js → index-071b5fd4.js} +1 -1
- package/build/esm/{index-959154bc.js → index-09435081.js} +2 -2
- package/build/esm/{index-032c96a0.js → index-0974335c.js} +2 -2
- package/build/esm/{index-107a78ba.js → index-0b6831d9.js} +1 -1
- package/build/esm/{index-fa075173.js → index-0c6e3a7c.js} +1 -1
- package/build/esm/{index-73d7cd53.js → index-0ce8bf83.js} +1 -1
- package/build/esm/{index-c44a3054.js → index-0f9ee373.js} +40 -40
- package/build/esm/{index-5a4ea475.js → index-1039226b.js} +2 -2
- package/build/esm/{index-d73ed261.js → index-1240cf6a.js} +5 -5
- package/build/esm/{index-8baa3e99.js → index-124e233b.js} +51 -52
- package/build/esm/{index-bb0c276e.js → index-129e5745.js} +1 -1
- package/build/esm/{index-ab345348.js → index-14124990.js} +5 -5
- package/build/esm/{index-393d287a.js → index-155b5bcb.js} +1 -1
- package/build/esm/{index-4407bd50.js → index-17aab8e1.js} +6 -6
- package/build/esm/{index-b0a69906.js → index-180b57e0.js} +5 -5
- package/build/esm/{index-184e2ed0.js → index-1857342a.js} +1 -1
- package/build/esm/{index-c5ef9e25.js → index-188f51d5.js} +2 -2
- package/build/esm/{index-666579da.js → index-18f4d217.js} +1 -1
- package/build/esm/{index-616b07ad.js → index-18fe81bd.js} +1 -1
- package/build/esm/{index-e64f9c56.js → index-1a0603ab.js} +2 -2
- package/build/esm/{index-682d9e4e.js → index-1a72b1b6.js} +50 -51
- package/build/esm/{index-36f258aa.js → index-1af374d0.js} +1 -1
- package/build/esm/{index-b639b3e1.js → index-1be4aa5b.js} +21 -21
- package/build/esm/{index-065cad49.js → index-1f0d47af.js} +5 -5
- package/build/esm/{index-be2040a5.js → index-1fbbe256.js} +2 -2
- package/build/esm/{index-d4881d91.js → index-2086e9b9.js} +2 -2
- package/build/esm/{index-5128e63c.js → index-23836d7c.js} +1 -1
- package/build/esm/{index-0df6fa41.js → index-240dd9e7.js} +1 -1
- package/build/esm/{index-3583a4ae.js → index-24e696e3.js} +1 -1
- package/build/esm/{index-3734c2b1.js → index-257cf3e8.js} +87 -88
- package/build/esm/{index-44f285fa.js → index-2596d3f4.js} +54 -55
- package/build/esm/{index-9d660606.js → index-25b70f5b.js} +1 -1
- package/build/esm/{index-d3481b03.js → index-26164ccd.js} +4 -4
- package/build/esm/{index-0256485d.js → index-27744272.js} +50 -51
- package/build/esm/index-2b87b8a1.js +94 -0
- package/build/esm/{index-79725c40.js → index-2c954057.js} +288 -289
- package/build/esm/{index-00153d0f.js → index-2cd32e51.js} +1 -1
- package/build/esm/{index-e909f8d4.js → index-2d0adde5.js} +21 -21
- package/build/esm/{index-5b0b7971.js → index-30f119f9.js} +1 -1
- package/build/esm/{index-6cea60fa.js → index-317a13a0.js} +7 -7
- package/build/esm/{index-f3c7460a.js → index-319d46a0.js} +49 -50
- package/build/esm/{index-0bb40791.js → index-31a4eb20.js} +1 -1
- package/build/esm/{index-ff27afd9.js → index-34464f59.js} +1 -1
- package/build/esm/{index-eb9f52a8.js → index-3612978f.js} +1 -1
- package/build/esm/{index-ec46ed35.js → index-362a839b.js} +2 -2
- package/build/esm/{index-492cdc20.js → index-372db816.js} +1 -1
- package/build/esm/{index-08e152c6.js → index-38cd738b.js} +6 -6
- package/build/esm/{index-bdd3aa86.js → index-3988effa.js} +1 -1
- package/build/esm/{index-39b9e204.js → index-3aa71fa6.js} +1 -1
- package/build/esm/{index-013d5b78.js → index-3c0c4ceb.js} +1 -1
- package/build/esm/{index-1f35920e.js → index-3de316e0.js} +1 -1
- package/build/esm/{index-ab8540b6.js → index-3e37a997.js} +7 -7
- package/build/esm/{index-e82e4924.js → index-3f5dd8e4.js} +2 -2
- package/build/esm/{index-7121324b.js → index-4007a01c.js} +1 -1
- package/build/esm/{index-f919c60f.js → index-4117b0e1.js} +70 -71
- package/build/esm/{index-dd998ca1.js → index-4299936b.js} +3 -3
- package/build/esm/{index-91b5ce7c.js → index-42bf11ac.js} +1 -1
- package/build/esm/{index-300a4a9a.js → index-43631df1.js} +1 -1
- package/build/esm/{index-f2c3aea1.js → index-437fd8bb.js} +52 -53
- package/build/esm/{index-5aa3d782.js → index-4415f514.js} +1 -1
- package/build/esm/{index-96a72052.js → index-4457a5a1.js} +1 -1
- package/build/esm/{index-a1b45d61.js → index-45476604.js} +1 -1
- package/build/esm/{index-279f48eb.js → index-45490c6c.js} +1 -1
- package/build/esm/{index-e6082a33.js → index-46c09c4a.js} +1 -1
- package/build/esm/{index-f3a20e37.js → index-49134e8e.js} +1 -1
- package/build/esm/{index-fe88de66.js → index-4c15f9d4.js} +3 -3
- package/build/esm/{index-f5862c1d.js → index-4c37eb7b.js} +74 -75
- package/build/esm/{index-69542536.js → index-4cc7fa7f.js} +5 -5
- package/build/esm/{index-3ae6b25b.js → index-4d4ef4d5.js} +1 -1
- package/build/esm/{index-e15fe408.js → index-4e3c3679.js} +1 -1
- package/build/esm/{index-205a5966.js → index-5283e4aa.js} +2 -2
- package/build/esm/{index-cbe90870.js → index-53279ace.js} +1 -1
- package/build/esm/{index-cdca5ecb.js → index-546ea14b.js} +1 -1
- package/build/esm/{index-709b09f2.js → index-5770b2a7.js} +4 -4
- package/build/esm/{index-30eaef9e.js → index-5963773c.js} +2 -2
- package/build/esm/{index-84a4845a.js → index-59f6ef3a.js} +2 -2
- package/build/esm/{index-08164ad3.js → index-5c1fb773.js} +2 -2
- package/build/esm/{index-f5d357e5.js → index-5d08913b.js} +3 -3
- package/build/esm/{index-99e759eb.js → index-5d7fcbb7.js} +1 -1
- package/build/esm/{index-9b2185e7.js → index-5da382c5.js} +1 -1
- package/build/esm/{index-b893a2f1.js → index-5f5161c2.js} +4 -4
- package/build/esm/{index-06b0fb36.js → index-60b2e96e.js} +6 -6
- package/build/esm/{index-b3591f5e.js → index-61e15846.js} +3 -3
- package/build/esm/{index-33232b2e.js → index-620e93b3.js} +7 -7
- package/build/esm/{index-4b102cba.js → index-63c609bd.js} +1 -1
- package/build/esm/{index-d7975b82.js → index-644fb9ae.js} +1 -1
- package/build/esm/{index-7c4c5110.js → index-66bf0abe.js} +1 -1
- package/build/esm/{index-57ddb5c9.js → index-672d759d.js} +1 -1
- package/build/esm/{index-5b29e68d.js → index-6836f333.js} +2 -2
- package/build/esm/{index-809d5511.js → index-6a99fc80.js} +1 -1
- package/build/esm/{index-7a79e27e.js → index-6bc4285e.js} +2 -2
- package/build/esm/{index-46bc2619.js → index-6eeb8933.js} +4 -4
- package/build/esm/{index-e9e860b7.js → index-70004e53.js} +20 -20
- package/build/esm/{index-fab253dd.js → index-705e17ea.js} +86 -87
- package/build/esm/{index-b1056923.js → index-715d013a.js} +1 -1
- package/build/esm/{index-974c4a64.js → index-72e819bf.js} +1 -1
- package/build/esm/{index-c19da53f.js → index-7504548d.js} +2 -2
- package/build/esm/{index-313ccbea.js → index-76b1ef1f.js} +1 -1
- package/build/esm/{index-2dad2a6b.js → index-76f82209.js} +1 -1
- package/build/esm/{index-5e9ba86b.js → index-77eba4f9.js} +3 -3
- package/build/esm/{index-1549e29c.js → index-7952c569.js} +4 -4
- package/build/esm/{index-4b64a929.js → index-7a5348be.js} +1 -1
- package/build/esm/{index-9c41603b.js → index-7a6e9fea.js} +1 -1
- package/build/esm/{index-ceb04b65.js → index-7a7d3d30.js} +1 -1
- package/build/esm/{index-2d6a32c7.js → index-7ab690a0.js} +9 -9
- package/build/esm/{index-c01809c6.js → index-7b0a2dec.js} +1 -1
- package/build/esm/{index-2d0cf19a.js → index-7c6299f0.js} +2 -2
- package/build/esm/{index-437239cd.js → index-7c77e5f8.js} +2 -2
- package/build/esm/{index-74789bb3.js → index-7d2764b9.js} +17 -17
- package/build/esm/{index-33122276.js → index-7dfd0ad1.js} +1 -1
- package/build/esm/{index-5c9f9838.js → index-7fd72d1a.js} +3 -3
- package/build/esm/{index-fd7ae0c0.js → index-7ff0d7f3.js} +4 -4
- package/build/esm/{index-b3d9c3aa.js → index-823a581e.js} +8 -8
- package/build/esm/{index-54cd43ac.js → index-8285b4fd.js} +6 -6
- package/build/esm/{index-1bdb1c03.js → index-82d01d94.js} +2 -2
- package/build/esm/{index-4a24a48f.js → index-830c921c.js} +5 -5
- package/build/esm/{index-bc0f4e88.js → index-832a3c56.js} +58 -59
- package/build/esm/{index-a6fe6e89.js → index-8391ace8.js} +20 -20
- package/build/esm/{index-83323ca5.js → index-8468e15d.js} +2 -2
- package/build/esm/{index-1a40d72a.js → index-8554ead6.js} +2 -2
- package/build/esm/{index-433a4cef.js → index-85c0eea8.js} +1 -1
- package/build/esm/{index-98008d71.js → index-870852db.js} +3 -3
- package/build/esm/{index-b6c3410d.js → index-887a5273.js} +1 -1
- package/build/esm/{index-d5fe44f5.js → index-887ab597.js} +3 -3
- package/build/esm/{index-0ae5d6e1.js → index-891d9f8e.js} +1 -1
- package/build/esm/{index-f201c878.js → index-89e65689.js} +2 -2
- package/build/esm/{index-e6bfd7cf.js → index-8b8f5a24.js} +2 -2
- package/build/esm/{index-14277f61.js → index-8c6cd13c.js} +2 -2
- package/build/esm/{index-7b7ca683.js → index-8fe868f3.js} +110 -111
- package/build/esm/{index-608d0589.js → index-903a6c7e.js} +7 -7
- package/build/esm/{index-a5bef90f.js → index-91d88d64.js} +6 -6
- package/build/esm/{index-18637ce3.js → index-94b78246.js} +1 -1
- package/build/esm/{index-c7c1e2f9.js → index-96981485.js} +5 -5
- package/build/esm/{index-77e440a4.js → index-97210ccf.js} +3 -3
- package/build/esm/{index-22351c8a.js → index-985d2d0f.js} +1 -1
- package/build/esm/{index-66299dc0.js → index-98ad5edc.js} +1 -1
- package/build/esm/{index-f539616c.js → index-98b6459d.js} +3 -3
- package/build/esm/{index-4721b43d.js → index-99b07142.js} +4 -4
- package/build/esm/{index-40e9021f.js → index-9a09f812.js} +1 -1
- package/build/esm/{index-ba641eda.js → index-9a29a342.js} +1 -1
- package/build/esm/{index-0ef66bcf.js → index-9ed4c59c.js} +1 -1
- package/build/esm/{index-6da5c248.js → index-9ee845a6.js} +2 -2
- package/build/esm/{index-b86c7c8c.js → index-9fa7ddc0.js} +1 -1
- package/build/esm/{index-862f172b.js → index-9faf91f3.js} +1 -1
- package/build/esm/{index-ef743366.js → index-9fcedd3a.js} +1 -1
- package/build/esm/{index-33a4cf02.js → index-a1325e72.js} +1 -1
- package/build/esm/{index-8129fe70.js → index-a135a37b.js} +1 -1
- package/build/esm/{index-85af90cb.js → index-a1ef760b.js} +1 -1
- package/build/esm/{index-0e6346a7.js → index-a254e8c9.js} +1 -1
- package/build/esm/{index-615fbfa8.js → index-a26f53b6.js} +1 -1
- package/build/esm/{index-b4871db9.js → index-a331e063.js} +1 -1
- package/build/esm/{index-9239d154.js → index-a578a226.js} +1 -1
- package/build/esm/{index-0ce75e60.js → index-a5c6f637.js} +1 -1
- package/build/esm/{index-02223771.js → index-a5fb83a4.js} +1 -1
- package/build/esm/{index-9b7c7454.js → index-a75c2535.js} +5 -5
- package/build/esm/{index-aaadb692.js → index-a7c1d508.js} +1 -1
- package/build/esm/{index-de52aa04.js → index-a8007924.js} +20 -20
- package/build/esm/{index-36927c47.js → index-a851e097.js} +6 -6
- package/build/esm/{index-78a01798.js → index-a8bf2409.js} +1 -1
- package/build/esm/{index-8627787a.js → index-a9b0c267.js} +4 -4
- package/build/esm/{index-758ed617.js → index-abbdf3b8.js} +33 -28
- package/build/esm/{index-9f3738c6.js → index-ad4ff4b8.js} +5 -5
- package/build/esm/{index-531b11c9.js → index-ada41bdd.js} +1 -1
- package/build/esm/{index-0b7b9bd7.js → index-b218567f.js} +1 -1
- package/build/esm/{index-2ba22fec.js → index-b2507e51.js} +2 -2
- package/build/esm/{index-87528dd1.js → index-b48d9078.js} +1 -1
- package/build/esm/{index-26328176.js → index-b53b8dde.js} +4 -4
- package/build/esm/{index-7d2c9a18.js → index-b6095dfa.js} +1 -1
- package/build/esm/{index-c90d18d7.js → index-b7cd412f.js} +3 -3
- package/build/esm/{index-8176f179.js → index-b87915ef.js} +1 -1
- package/build/esm/{index-ac0491aa.js → index-b9788591.js} +1 -1
- package/build/esm/{index-2ee0e25c.js → index-ba01b684.js} +1 -1
- package/build/esm/{index-dd91e7c8.js → index-ba97d459.js} +1 -1
- package/build/esm/{index-8a83b773.js → index-bafde682.js} +3 -3
- package/build/esm/{index-acabeacd.js → index-bb94b823.js} +1 -1
- package/build/esm/{index-93146066.js → index-bd0bf716.js} +49 -50
- package/build/esm/{index-a982d6c4.js → index-bd46dad7.js} +1 -1
- package/build/esm/{index-49ee67ea.js → index-be4a7425.js} +1 -1
- package/build/esm/{index-a2c6aca5.js → index-bf22be78.js} +1 -1
- package/build/esm/{index-b567d089.js → index-c004810b.js} +1 -1
- package/build/esm/{index-8faedca2.js → index-c0cf0496.js} +55 -56
- package/build/esm/{index-8e0dd196.js → index-c226bf93.js} +70 -71
- package/build/esm/{index-41fad44c.js → index-c37b5214.js} +2 -2
- package/build/esm/{index-66df93db.js → index-c6bddad0.js} +1 -1
- package/build/esm/{index-c28f70b8.js → index-c704e2f0.js} +1 -1
- package/build/esm/{index-d356b72a.js → index-c7e7873d.js} +1 -1
- package/build/esm/{index-31b212ef.js → index-c884ba25.js} +15 -15
- package/build/esm/{index-9906ef84.js → index-c9417a33.js} +4 -4
- package/build/esm/{index-146a3920.js → index-c9bdad8a.js} +1 -1
- package/build/esm/{index-69ede7c8.js → index-cafd63bd.js} +1 -1
- package/build/esm/{index-d40d6dc8.js → index-cc2ec2e9.js} +3 -3
- package/build/esm/{index-9dcc2778.js → index-cc6aa25a.js} +1 -1
- package/build/esm/{index-cf6f89ba.js → index-ceeeaa7f.js} +2 -2
- package/build/esm/{index-d36b2945.js → index-d0eb6456.js} +1 -1
- package/build/esm/{index-3e514f7d.js → index-d187fe25.js} +4 -4
- package/build/esm/{index-94dc39a3.js → index-d1baafec.js} +2 -2
- package/build/esm/{index-95523b25.js → index-d31641c9.js} +57 -58
- package/build/esm/{index-b4f087ed.js → index-d45d1cb4.js} +6 -6
- package/build/esm/{index-6739b9da.js → index-d7185fc9.js} +19 -19
- package/build/esm/{index-0c2a5649.js → index-d7451737.js} +5 -5
- package/build/esm/{index-4dd72138.js → index-d7b194c0.js} +1 -1
- package/build/esm/{index-057104c0.js → index-d7f64973.js} +1 -1
- package/build/esm/{index-5dd6f404.js → index-d94f0219.js} +1 -1
- package/build/esm/{index-4df6bb09.js → index-da0ec66e.js} +2 -2
- package/build/esm/{index-97f1a5b6.js → index-da69a317.js} +2 -2
- package/build/esm/{index-e35cdcca.js → index-dabce281.js} +1 -1
- package/build/esm/{index-83570e1c.js → index-dd22fced.js} +1 -1
- package/build/esm/{index-143d6adc.js → index-df6845e4.js} +3 -3
- package/build/esm/{index-e3e334c1.js → index-dff65ff6.js} +1 -1
- package/build/esm/{index-a087aae4.js → index-e16313bf.js} +1 -1
- package/build/esm/{index-1805ea38.js → index-e1b9e073.js} +1 -1
- package/build/esm/{index-46cb52ef.js → index-e1df40d6.js} +50 -51
- package/build/esm/{index-84124130.js → index-e54b7e46.js} +1 -1
- package/build/esm/{index-91b9a83b.js → index-e5b120a6.js} +1 -1
- package/build/esm/{index-00fce866.js → index-e707dff2.js} +1 -1
- package/build/esm/{index-5e6402d3.js → index-ea4e5cb7.js} +3 -3
- package/build/esm/{index-0831f6e7.js → index-ea5844b0.js} +1 -1
- package/build/esm/{index-f4d75088.js → index-ea85aebd.js} +2 -2
- package/build/esm/{index-b59d567b.js → index-eb305be8.js} +70 -71
- package/build/esm/{index-d3fbfe6c.js → index-edca7382.js} +1 -1
- package/build/esm/{index-ef3937c8.js → index-eec8f00c.js} +20 -17
- package/build/esm/{index-63e42208.js → index-ef38a855.js} +1 -1
- package/build/esm/{index-e25cb171.js → index-f04c64e4.js} +41 -41
- package/build/esm/{index-8dfe3f2c.js → index-f4562e82.js} +3 -3
- package/build/esm/{index-ee673c31.js → index-f46b6bab.js} +52 -53
- package/build/esm/{index-da4c953c.js → index-f4d5d72a.js} +66 -67
- package/build/esm/{index-58e50aa7.js → index-f6e40593.js} +9 -9
- package/build/esm/{index-f44c8763.js → index-f76bd1dc.js} +9 -9
- package/build/esm/{index-008c384d.js → index-fbd589c4.js} +5 -5
- package/build/esm/{index-1ece6719.js → index-fd4b7a7b.js} +9 -9
- package/build/esm/{index-5b6c75e7.js → index-fd609824.js} +4 -4
- package/build/esm/{index-df265971.js → index-ff5ccc9a.js} +2 -2
- package/build/esm/{index-8622f153.js → index-ff782eb8.js} +18 -18
- package/build/esm/{index-86285267.js → index-fffecd2d.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.module-54135fe0.js → index.module-179cda81.js} +1 -1
- package/build/esm/{index.module-a6ce0db5.js → index.module-254fbd26.js} +1 -1
- package/build/esm/{index.module-f2459390.js → index.module-32f01748.js} +1 -1
- package/build/esm/{index.module-4c59c2bb.js → index.module-3409e376.js} +1 -1
- package/build/esm/{index.module-c40497fc.js → index.module-4d79407f.js} +1 -1
- package/build/esm/{index.module-4fba5d69.js → index.module-56094263.js} +1 -1
- package/build/esm/{index.module-3498c21e.js → index.module-93a430cc.js} +1 -1
- package/build/esm/{index.module-89effb9e.js → index.module-9693557e.js} +1 -1
- package/build/esm/{index.module-6f5ca33d.js → index.module-a2dedf49.js} +1 -1
- package/build/esm/{index.module-cf233542.js → index.module-cabbbaeb.js} +1 -1
- package/build/esm/{index.module-4a74d59b.js → index.module-e3bc885f.js} +1 -1
- package/build/esm/{index.module-feb04f8d.js → index.module-f32856fd.js} +1 -1
- package/build/esm/{react-json-viewer-3d8a1547.js → react-json-viewer-2e875e41.js} +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Save/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/GlobalElements/Checkout/Share/ShareViaSocialMedias/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Product/Product/catalog/Components/CatalogMakeup/LayoutSelection/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ComponentMap/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/Default/Default/index.d.ts +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/Default/Default/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/Default/Slider/index.d.ts +0 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/Default/Slider/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/ItemPalette/Options/GalleryText/index.d.ts.map +1 -1
- package/build/types/web-planner-react/src/components/Settings/SettingsScroller/SettingsItem/useGridVariables.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Palette/PaletteViewHandler.d.ts +4 -4
- package/build/types/web-planner-react/src/model/Palette/PaletteViewHandler.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Palette/Steps/ConfigStep/ConfigItems.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Palette/Steps/PlannerStep/PlannerItems.d.ts +2 -2
- package/build/types/web-planner-react/src/model/Palette/Steps/PlannerStep/PlannerItems.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Planner3DImageUI.d.ts +3 -3
- package/build/types/web-planner-react/src/model/Planner/Planner3DImageUI.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/ViewPlannerHandler.d.ts +6 -6
- package/build/types/web-planner-react/src/model/Planner/ViewPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlanner2DGrid.d.ts +3 -3
- package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlanner2DGrid.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlanner3DImage.d.ts +3 -3
- package/build/types/web-planner-react/src/model/Planner/Viewer/Interface/IViewPlanner3DImage.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner2DGrid.d.ts +4 -4
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner2DGrid.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner3DGrid.d.ts +4 -4
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner3DGrid.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner3DImage.d.ts +4 -4
- package/build/types/web-planner-react/src/model/Planner/Viewer/Planner3DImage.d.ts.map +1 -1
- package/build/types/web-planner-react/src/model/plannerHelper.d.ts +2 -2
- package/build/types/web-planner-react/src/model/plannerHelper.d.ts.map +1 -1
- package/build/umd/1386.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/1386.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/163.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/2032.diva-web-planner-react.umd.min.js +2 -0
- package/build/umd/2032.diva-web-planner-react.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/227.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3337.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3538.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3721.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/3812.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4144.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4472.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4585.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/4903.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/5583.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6108.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/6345.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/7069.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8118.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/8757.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9556.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/9874.diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/diva-web-planner-react.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +8 -8
- package/build/esm/index-7a566bf1.js +0 -95
- package/build/umd/7627.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/7627.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8425.diva-web-planner-react.umd.min.js +0 -2
- package/build/umd/8425.diva-web-planner-react.umd.min.js.LICENSE.txt +0 -1
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 227.diva-web-planner-react.umd.min.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[227],{60227:(t,o,i)=>{i.r(o),i.d(o,{default:()=>B});var l=i(84658),r=i(13125),a=i(43860),h=i(80248),c=i(50747),u=i.n(c),d=i(8108),m=i(12952),g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),E=function(){return(0,a.Z)((function BoxPlannerPartlistHelper(t,o,i,l,a,c,u){(0,r.Z)(this,BoxPlannerPartlistHelper),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"getOptionVal",void 0),(0,h.Z)(this,"setOptionValue",void 0),(0,h.Z)(this,"getElementHasBottomPlate",void 0),(0,h.Z)(this,"getElementIsCornerElement",void 0),(0,h.Z)(this,"getCornerType",void 0),(0,h.Z)(this,"getElementHasTopPlate",void 0),(0,h.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=i,this.setOptionValue=o,this.getElementIsCornerElement=l,this.getCornerType=a,this.getElementHasTopPlate=c,this.getElementIsGarderobeElement=u}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasBottomPlate(t,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(r,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasBottomPlate(h,i)&&l++,this.getElementHasBottomPlate(c,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasBottomPlate(m,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getGroundPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasTopPlate(t,o,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(r,o,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasTopPlate(h,o,i)&&l++,this.getElementHasTopPlate(c,o,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getTopPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getElementHeight",value:function getElementHeight(t,o){var i=this.getOptionVal(t.getElementId(),"OPTHOEHE",o);return"OPVH_6"==i?"6":"OPVH_11"==i?"11":"OPVH_18"==i?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,o){var i=this.getOptionVal(t.getElementId(),"OPTTIEFE",o);return"OPVTIEFE_18"==i?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,o){var i=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",o);return"OPVCHROM"==i?"CHROM":"OPVSCHWARZ_MATT"==i?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,o){for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(i[l],t,o),this.correctRahmenVerticalLeftBack(i[l],t,o),this.correctRahmenVerticalRightFront(i[l],t,o),this.correctRahmenVerticalRightBack(i[l],t,o),g.debug("---------Correct Senkrechte Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_V",o)),g.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_H",o)),g.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_V",o)),g.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_H",o))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(i[l],t,o),this.correctRahmenDepthLeftTop(i[l],t,o),this.correctRahmenDepthRightBottom(i[l],t,o),this.correctRahmenDepthRightTop(i[l],t,o),g.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Tiefen Rahmen links unten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_U",o)),g.debug("Tiefen Rahmen links oben: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_O",o)),g.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_U",o)),g.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_O",o)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId()))&&!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(this.getElementHasTopPlate(t,o,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(l){var r=o.getRightElements(t.getElementId());if(r.length>0){var a=r[0];if(!this.getElementHasBottomPlate(t,i)||this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(!this.getElementHasBottomPlate(a,i)||this.getElementIsCornerElement(a,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i)}}else if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":l?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightBottom not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(!this.getElementHasTopPlate(t,o,i)||this.getElementIsCornerElement(t,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}if(!r)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];if(!this.getElementHasTopPlate(h,o,i)||this.getElementIsCornerElement(h,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i);break;case"BLACK":r?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightTop not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l&&!(l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(0==a.length)return;if(a.length>0){var h=a[0];if(o.getPlannerHasActiveBackside()){var c=o.getOppositeElement(t.getElementId());if(!c)return;var u=o.getOppositeElement(h.getElementId());if(!u)return;this.getElementIsGarderobeElement(h,i)||this.getElementIsGarderobeElement(c,i)||this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"calculateKnots",value:function calculateKnots(t,o){if(this.constructionRules.hasKNOTS)for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.correctKnotLeftTopFront(i[l],t,o),this.correctKnotLeftTopBack(i[l],t,o),this.correctKnotLeftBottomFront(i[l],t,o),this.correctKnotLeftBottomBack(i[l],t,o),this.correctKnotRightTopFront(i[l],t,o),this.correctKnotRightTopBack(i[l],t,o),this.correctKnotRightBottomFront(i[l],t,o),this.correctKnotRightBottomBack(i[l],t,o),this.correctKnotRightMiddleBack(i[l],t,o),this.correctKnotLeftMiddleBack(i[l],t,o),g.debug("---------Correct Knots for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Links oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTF",o)),g.debug("Links oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTB",o)),g.debug("Links unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBF",o)),g.debug("Links unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBB",o)),g.debug("Rechts oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTF",o)),g.debug("Rechts oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTB",o)),g.debug("Rechts unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBF",o)),g.debug("Links mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LMB",o)),g.debug("Rechts mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RMB",o)),g.debug("Rechts unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBB",o))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&(l||(o.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i))){var r=o.getLeftElements(t.getElementId());if(r.length>0){var a=r[0];if(this.getElementIsCornerElement(a,i))return;var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(l||(o.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,o,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i)){var r=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var a=o.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else if(!a&&r){var u=o.getLeftElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(a&&r){var E=o.getLeftElements(t.getElementId())[0],I=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(E,o,i)?this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasBottomPlate(t,i)?this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsCornerElement(a,i))return;switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":var h=o.getRightElements(t.getElementId())[0];this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasTopPlate(t,o,i)?this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var h=o.getElementHasRightElement(t.getElementId());if(a||h){if(h&&!a){var c=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(!h&&a){var u=o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(h&&a){var m=o.getLeftElements(t.getElementId())[0],E=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(m,o,i)?this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)&&!o.getCellsInGridByElementId(t.getElementId()).backside)if(o.getElementHasRightElement(t.getElementId()))if(o.getPlannerHasActiveBackside()){var l=o.getOppositeElement(t.getElementId());if(!l)return;var r=o.getRightElements(t.getElementId());if(0==r.length)return;var a=r[0],h=o.getOppositeElement(a.getElementId());if(!h)return;this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(l,i)?this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else{var c=o.getRightElements(t.getElementId());if(0==c.length)return;var u=c[0];this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else g.error(new d.GE("BoxPlannerError - function correctKnotRightMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(r){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsGarderobeElement(a,i))return}if(r)if(o.getPlannerHasActiveBackside()){var h=o.getLeftElements(t.getElementId());if(0==h.length)return;var c=h[0],u=o.getOppositeElement(t.getElementId());if(!u)return;var m=o.getOppositeElement(null==c?void 0:c.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);else if(o.getPlannerHasActiveBackside()){var E=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(o.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasBottomPlate(t,i)){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&!this.getElementHasBottomPlate(E,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),p=void 0;I.length>0&&(p=I[0]),p&&!this.getElementIsCornerElement(p,i)&&(this.getElementHasBottomPlate(p,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":var O=o.getRightElements(t.getElementId())[0];if(O&&this.getElementIsCornerElement(O,i))if(o.getElementHasRightElement(O.getElementId())){var R=o.getRightElements(O.getElementId())[0];this.getElementHasBottomPlate(R,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else O&&this.getElementHasBottomPlate(O,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,o,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasTopPlate(t,o,i)){if(r){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&(this.getElementHasTopPlate(E,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),p=void 0;I.length>0&&(p=I[0]),p&&!this.getElementIsCornerElement(p,i)&&(this.getElementHasTopPlate(p,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i)){var O=o.getElementHasLeftElement(t.getElementId()),R=o.getElementHasRightElement(t.getElementId());if(O||R){if(R&&!O){var k=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(k,i))if(o.getElementHasRightElement(k.getElementId())){var P=o.getRightElements(k.getElementId())[0];this.getElementHasTopPlate(P,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(k,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!R&&O){o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(R&&O){var T=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(T,i))if(o.getElementHasRightElement(T.getElementId())){var V=o.getRightElements(T.getElementId())[0];this.getElementHasTopPlate(V,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(T,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,o,i)){case 0:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);break;case 3:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else if(this.getElementHasBottomPlate(t,i)){if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i))}}else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&!this.getElementIsCornerElement(u,i)&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":var m=o.getRightElements(t.getElementId())[0];if(this.getElementIsCornerElement(m,i)){var E=o.getRightElements(m.getElementId())[0];this.getElementHasBottomPlate(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.getElementHasBottomPlate(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())if(r)switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else if(this.getElementHasTopPlate(t,o,i)){if(r){var a=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];this.getElementIsCornerElement(a,i)||this.getElementHasTopPlate(a,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(r){var h=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];h&&!this.getElementIsCornerElement(h,i)&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var c=o.getElementHasLeftElement(t.getElementId()),u=o.getElementHasRightElement(t.getElementId());if(c||u){if(u&&!c){var d=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(d,i))if(o.getElementHasRightElement(d.getElementId())){var m=o.getRightElements(d.getElementId())[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(d,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!u&&c)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(u&&c){var g=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(g,i))if(o.getElementHasRightElement(g.getElementId())){var E=o.getRightElements(g.getElementId())[0];this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(g,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}])}(),I=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),p=function(){return(0,a.Z)((function ConstructionRulesHandler(t,o,i){var l=this;(0,r.Z)(this,ConstructionRulesHandler),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"checkArticleHasOption",void 0),(0,h.Z)(this,"updateCfgValuesByPlanner",void 0),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"constructionRulesLoaded",void 0),(0,h.Z)(this,"hideOptionsForConstruction",void 0),(0,h.Z)(this,"partlistHelper",void 0),(0,h.Z)(this,"getOptionVal",(function(t,o,i){if(i.has(t)&&i.get(t).has(o)){var r=i.get(t).get(o);return null!=r?r:""}var a=l.getValueOfOptionOfArticle(t,o);return null!=a?a:""})),(0,h.Z)(this,"hasOptionValue",(function(t,o,i){return!(!i.has(t)||!i.get(t).has(o))||!!l.getValueOfOptionOfArticle(t,o)})),(0,h.Z)(this,"setOptionValue",(function(t,o,i,r){var a;if(r.has(t)||r.set(t,new Map),null===(a=r.get(t))||void 0===a||a.set(o,i),l.hideOptionsForConstruction.has(t)){var h=l.hideOptionsForConstruction.get(t).indexOf(o);h>=0&&l.hideOptionsForConstruction.get(t).splice(h,1)}})),(0,h.Z)(this,"getElementHasBottomPlate",(function(t,o){if(l.constructionRules.knotInfo.elementsWithGroundPlate)for(var i=0;i<l.constructionRules.knotInfo.elementsWithGroundPlate.length;i++){var r=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPT,a=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPVs,h=l.getOptionVal(t.getElementId(),r,o);return l.arrayContainsValue(a,h)}return!1})),(0,h.Z)(this,"getElementIsCornerElement",(function(t,o){return l.constructionRules.hasCORNER&&l.arrayContainsValue(l.constructionRules.knotInfo.cornerElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.cornerElements.onOPT,o))})),(0,h.Z)(this,"getElementIsGarderobeElement",(function(t,o){return l.constructionRules.hasGARDEROBE&&l.arrayContainsValue(l.constructionRules.knotInfo.garderobeElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.garderobeElements.onOPT,o))})),(0,h.Z)(this,"getCornerType",(function(t,o){return"OPVECK_I"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"INSIDE":"OPVECK_A"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"OUTSIDE":"NOCORNER"})),(0,h.Z)(this,"getElementHasTopPlate",(function(t,o,i){if(o.getElementHasTopElement(t.getElementId())){for(var r=o.getTopElements(t.getElementId()),a=!1,h=0;h<r.length;h++)l.getElementHasBottomPlate(r[h],i)&&(a=!0);return a}return!0})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=o,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=i,this.partlistHelper=new E(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,o){if(Array.isArray(t)){for(var i=0;i<t.length;i++)if(t[i]==o)return!0;return!1}var l=t.split(";");for(i=0;i<l.length;i++)if(l[i]==o)return!0;return!1}},{key:"evalRule",value:function evalRule(t,o,i){for(var l=!0,r=o.split("&"),a=0;a<r.length;a++){var h=r[a].split("=")[0],c=r[a].split("=")[1],u=this.getOptionVal(t,h,i);u&&u!=c&&(l=!1)}return l}},{key:"setOptionDoShow",value:function setOptionDoShow(t,o,i){var l=this.constructionRules.optionsVisibilityInfo[o];if(l){var r;if(null!=l.doShow)i.has(t)||i.set(t,new Map),null===(r=i.get(t))||void 0===r||r.set(o,l.doShow);if(this.hideOptionsForConstruction.has(t)){var a,h=this.hideOptionsForConstruction.get(t).indexOf(o);if(h>=0)null===(a=this.hideOptionsForConstruction.get(t))||void 0===a||a.splice(h,1)}}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,o,i){var l,r,a=this.constructionRules.optionsVisibilityInfo[o];a&&(i.has(t)||i.set(t,new Map),null===(l=i.get(t))||void 0===l||l.set(o,null==a?void 0:a.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(r=this.hideOptionsForConstruction.get(t))||void 0===r||r.push(o))}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,o){for(var i=[],l=0;l<this.constructionRules.optionBasedConstructionRules.length;l++){var r=this.constructionRules.optionBasedConstructionRules[l];this.getOptionVal(t,r.masterOptionName,o)==r.masterOptionValue&&i.push(r)}return i}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,o,i,l){for(var r=[],a=void 0,h=0;h<this.constructionRules.optionsInfluenceRulesOfAllElements.length;h++){var c=this.constructionRules.optionsInfluenceRulesOfAllElements[h];for(var u in i)u==c.onOPT&&this.arrayContainsValue(c.onOPVs,i[u])&&r.push({opt:c.influenceOPT,opv:c.forceOPV,unvalidOPVs:c.unvalidOPVs,warning:c.warning,doShowWarning:!1})}for(var d=t.getAllElementIdsInGrid(),m=0;m<d.length;m++){var g;if(this.hideOptionsForConstruction.has(d[m])&&this.hideOptionsForConstruction.get(d[m]).length>0){for(;this.hideOptionsForConstruction.get(d[m]).length>0;){var E=this.hideOptionsForConstruction.get(d[m])[0];this.setOptionDoShow(d[m],E,o)}this.hideOptionsForConstruction.delete(d[m])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTDMOD",o):this.setOptionDoHide(d[m],"OPTDMOD",o));var I=t.getColumnCount();I>1?this.setOptionDoShow(d[m],"OPTMULTICOL",o):this.setOptionDoHide(d[m],"OPTMULTICOL",o),this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o),this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o);var p=t.getCellsInGridByElementId(d[m]);if(p.backside)this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVJA",o);else{if(this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVNEIN",o),p.startColIndex>0){var O=t.getPlannerElementAtGridPos(p.startColIndex-1,0,!1);if(O){var R=this.getOptionVal(O.getElementId(),"OPTELEMENT",o);"OPVECK_I"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_I",o):"OPVECK_A"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o)}}if(p.endColIndex<I-1){var k=t.getPlannerElementAtGridPos(p.endColIndex+1,0,!1);if(k){var P=this.getOptionVal(k.getElementId(),"OPTELEMENT",o);"OPVECK_I"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_I",o):"OPVECK_A"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o)}}}if(this.constructionRules.avoidOptionLastCol){var T=this.getOptionVal(d[m],this.constructionRules.avoidOptionLastCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,T)&&p.endColIndex==I-1&&this.setOptionValue(d[m],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,o)}if(this.constructionRules.avoidOptionFirstCol){var V=this.getOptionVal(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,V)&&0==p.startColIndex&&this.setOptionValue(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,o)}var v=this.hasOptionValue(d[m],"OPTWW",o);if(t.getElementIsFirstInGrid(d[m])?(this.setOptionDoShow(d[m],"OPTWERKZEUGKASTEN",o),v&&(t.getSizeOfWholeSet(!0).y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTWW",o):this.setOptionDoHide(d[m],"OPTWW",o))):(this.setOptionDoHide(d[m],"OPTWERKZEUGKASTEN",o),v&&this.setOptionDoHide(d[m],"OPTWW",o)),o.has(d[m])||o.set(d[m],new Map),null===(g=o.get(d[m]))||void 0===g||g.set("DEBUG",t.getElementById(d[m]).getPosNr()+""),r.length>0)for(var C=0;C<r.length;C++){var B=this.getOptionVal(d[m],r[C].opt,o),_=!1;if(r[C].unvalidOPVs&&0!=r[C].unvalidOPVs.length){for(var x=r[C].unvalidOPVs.split(";"),G=0;G<x.length;G++)if(x[G]==B){_=!0;break}}else _=!0;_&&(B!=r[C].opv&&(this.setOptionValue(d[m],r[C].opt,r[C].opv,o),r[C].doShowWarning||(r[C].doShowWarning=!0,a=r[C].warning)))}if(i)for(var u in i)if(""!=u&&i[u]&&""!=i[u])for(h=0;h<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;h++){c=this.constructionRules.optionsInfluenceRulesOfSingleElement[h];var b=!1;if(c.dir&&l&&l.length>0){if("TOP"==c.dir&&t.getElementHasBottomElement(d[m]))for(var H=t.getBottomElements(d[m]),y=0;y<H.length;y++)l.indexOf(H[y].getElementId())>=0&&(b=!0);if("DOWN"==c.dir&&t.getElementHasTopElement(d[m]))for(var L=t.getTopElements(d[m]),D=0;D<L.length;D++)l.indexOf(L[D].getElementId())>=0&&(b=!0);if("LEFT_RIGHT"==c.dir){if(t.getElementHasLeftElement(d[m]))for(var A=t.getLeftElements(d[m]),w=0;w<A.length;w++)l.indexOf(A[w].getElementId())>=0&&(b=!0);if(t.getElementHasRightElement(d[m]))for(var S=t.getRightElements(d[m]),N=0;N<S.length;N++)l.indexOf(S[N].getElementId())>=0&&(b=!0)}if("COL"==c.dir){var M=t.getCellsInGridByElementId(d[m]);t.getAllElementsInColumn(M.startColIndex,M.backside).forEach((function(t){return l.indexOf(t.ElementId)>=0?b=!0:void 0}))}if("BACK"==c.dir&&t.getPlannerHasActiveBackside()){var W=t.getOppositeElement(d[m]);W&&l.indexOf(W.getElementId())>=0&&(b=!0)}}else b=!0;if(b){B=this.getOptionVal(d[m],c.influenceOPT,o);u==c.onOPT&&B&&""!=B&&this.arrayContainsValue(c.unvalidOPVs,B)&&this.arrayContainsValue(c.onOPVs,i[u])&&(this.setOptionValue(d[m],c.influenceOPT,c.defaultOpv,o),c.warning&&(a=c.warning))}}var K=this.getCurOptionBasedConstructionRules(d[m],o);if(K)for(var Z=0;Z<K.length;Z++)if(K[Z].defaultOptions)for(var z=0;z<K[Z].defaultOptions.length;z++){var U=K[Z].defaultOptions[z];if(!U.rule||""==U.rule||this.evalRule(d[m],U.rule,o))for(var X=0;X<U.options.length;X++)"doShow"==U.value?this.setOptionDoShow(d[m],U.options[X],o):"doHide"==U.value&&this.setOptionDoHide(d[m],U.options[X],o),U.opv&&this.setOptionValue(d[m],U.options[X],U.opv,o)}this.setOptionValue(d[m],"OPTFAF_L_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_L_H","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_H","OPVOHNE_FAF",o)}return a}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,o,i,l){if(null!=l&&1==l.length){var r=l[0];if(null!=i)for(var a in i){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,a)){var h=t.getCellsInGridByElementId(r).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=h)for(var c=0;c<h.length;c++)this.setOptionValue(h[c].ElementId,a,i[a],o)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,a)){var u=t.getCellsInGridByElementId(r),d=t.getAllElementsInColumn(u.startColIndex,u.backside);if(null!=d){if(t.getPlannerHasActiveBackside()){var m,g=t.getAllElementsInColumn(u.startColIndex,!u.backside);g&&(d=null===(m=d)||void 0===m?void 0:m.concat(g))}for(c=0;c<d.length;c++)this.setOptionValue(d[c].ElementId,a,i[a],o)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,a)){var E=t.getCellsInGridByElementId(r),I=t.getAllElementsInRow(E.startRowIndex,E.backside);if(I&&t.getPlannerHasActiveBackside()){var p=t.getAllElementsInRow(E.startRowIndex,!E.backside);p&&(I=I.concat(p))}for(c=0;c<I.length;c++)this.setOptionValue(I[c].ElementId,a,i[a],o)}}var O=t.getCellsInGridByElementId(r),R=t.getAllElementsInRow(O.startRowIndex,O.backside);for(c=0;c<R.length;c++)if(R[c].getElementId()!=r)for(var k=0;k<this.constructionRules.forceSameOptionInRow.length;k++){var P=this.getOptionVal(R[c].getElementId(),this.constructionRules.forceSameOptionInRow[k],o);this.setOptionValue(r,this.constructionRules.forceSameOptionInRow[k],P,o);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(i.OPTCurrentElem)>=0;this.setOptionDoHide(o,i.OPTNeighborElem,l),r||this.setOptionDoShow(t,i.OPTCurrentElem,l)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem],a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem];r&&a&&this.getOptionVal(t,i.OPTCurrentElem,l)==r.doShow&&this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow&&this.setOptionDoHide(t,i.OPTCurrentElem,l)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,o,i,l){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem];if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem],h=r.doShow==this.getOptionVal(t,i.OPTCurrentElem,l),c=this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow;h&&c&&(this.setOptionDoHide(t,i.OPTCurrentElem,l),this.setOptionDoHide(o,i.OPTNeighborElem,l))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,o,i,l,r){var a=i.getPlannerElementAtGridPos(t,o,r);if(this.constructionRules.defaultConstructionRules.TOP){var h=void 0;if(i.getElementHasTopElement(a.ElementId)){h=i.getPlannerElementAtGridPos(t,o+1,r);for(var c=0;c<this.constructionRules.defaultConstructionRules.TOP.length;c++){var u=this.constructionRules.defaultConstructionRules.TOP[c];"SHOW_HIDE"==u.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,h.ElementId,u,l):"HIDE_HIDE"==u.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,h.ElementId,u,l)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var m=void 0;if(r?i.getElementHasLeftElement(a.ElementId):i.getElementHasRightElement(a.ElementId)){m=r?i.getPlannerElementAtGridPos(t-1,o,r):i.getPlannerElementAtGridPos(t+1,o,r);for(c=0;c<this.constructionRules.defaultConstructionRules.RIGHT.length;c++){var g=this.constructionRules.defaultConstructionRules.RIGHT[c];"SHOW_HIDE"==g.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,m.ElementId,g,l):"HIDE_HIDE"==g.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,m.ElementId,g,l)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var E=void 0;if(o>0){E=i.getPlannerElementAtGridPos(t,o-1,r);for(c=0;c<this.constructionRules.defaultConstructionRules.DOWN.length;c++){var p=this.constructionRules.defaultConstructionRules.DOWN[c];"SHOW_HIDE"==p.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,E.ElementId,p,l):"HIDE_HIDE"==p.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,E.ElementId,p,l)}}}var O=r?i.getLeftElements(a.ElementId):i.getRightElements(a.ElementId),R=r?i.getRightElements(a.ElementId):i.getLeftElements(a.ElementId),k=i.getTopElements(a.ElementId),P=i.getBottomElements(a.ElementId),T=r?i.getTopLeftElement(a.ElementId):i.getTopRightElement(a.ElementId);O.length>0?O.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_RECHTS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(O[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_RECHTS",l),R.length>0?R.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_LINKS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(R[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_LINKS",l),k.length>0?k.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_OBEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(k[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN",l),T?this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(T.ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",l),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(P.length>0?P.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_UNTEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(P[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_UNTEN",l))}},{key:"correctBack",value:function correctBack(t,o,i){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var l=void 0;if(l=t.getOppositeElement(i),this.constructionRules.defaultConstructionRules.BACK)for(var r=0;r<this.constructionRules.defaultConstructionRules.BACK.length;r++){var a,h,c=this.constructionRules.defaultConstructionRules.BACK[r],u=!1;if(c.hideOnElemAndOppositeOPT&&c.hideOnElemAndOppositeOPV)this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(i,c.hideOnElemAndOppositeOPT,o))&&this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(null===(a=l)||void 0===a?void 0:a.getElementId(),c.hideOnElemAndOppositeOPT,o))&&(u=!0);if(u)this.setOptionDoHide(i,c.OPTCurrentElem,o),this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o);else if("FORCE_HIDE"==c.OPTValueRule&&this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o),"SHOW_HIDE"==c.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(h=l)||void 0===h?void 0:h.getElementId(),i,c,o);else"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(l.ElementId,i,c,o)}this.getElementHasBottomPlate(l,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_U_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.getElementHasTopPlate(l,t,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_O_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}else this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}},{key:"correctBottom",value:function correctBottom(t,o,i){var l="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var r=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,i),a=0;a<r.length;a++){var h=r[a];if(0==a){if(null==(l=this.getOptionVal(h.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,o)))return;i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeftBack,l,o))}i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRightBack,l,o))}}},{key:"getValidLadder",value:function getValidLadder(t,o,i){for(var l=o.getAllElementsInColumn(t,!1),r=0;r<this.constructionRules.correctLadder.validLadder.length;r++){var a=this.constructionRules.correctLadder.validLadder[r];if(l.length==a.colCount){for(var h=!0,c=0;c<l.length;c++){var u=l[c];if(this.getOptionVal(u.ElementId,a.heightOption,i)!=a.heightPerRow[c]&&(h=!1),!h)break}if(h)return a}}}},{key:"correctOptionsInfluencedByDimensions",value:function correctOptionsInfluencedByDimensions(t,o){var i=this;if(this.constructionRules.optionsInfluencedByDimensions){var l=t.getSizeOfWholeSet(!1),r=t.getAllElementsInFrontGrid();this.constructionRules.optionsInfluencedByDimensions.forEach((function(t){var a=!1;"height"==t.dimension.toLower()&&l.y>=t.dimensionLimit&&(a=!0),"width"==t.dimension.toLower()&&l.x>=t.dimensionLimit&&(a=!0),"depth"==t.dimension.toLower()&&l.z>=t.dimensionLimit&&(a=!0),r.forEach((function(l){a?"doshow"==t.higherLimit.toLower()?i.setOptionDoShow(l.ElementId,t.option,o):"dohide"==t.higherLimit.toLower()&&i.setOptionDoHide(l.ElementId,t.option,o):"doshow"==t.lowerLimit.toLower()?i.setOptionDoShow(l.ElementId,t.option,o):"dohide"==t.lowerLimit.toLower()&&i.setOptionDoHide(l.ElementId,t.option,o)}))}))}}},{key:"correctLadder",value:function correctLadder(t,o){if(this.constructionRules.correctLadder){for(var i=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),l=0;l<i.length;l++){var r=t.getRowCount(l,!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(r))for(var a=t.getAllElementsInColumn(l,!1),h=0;h<a.length;h++)this.setOptionValue(a[h].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o);if(r<t.getSizeOfHighesRow(!1)){var c,u=null===(c=t.getPlannerElementAtGridPos(l,r-1,!1))||void 0===c?void 0:c.getElementId();u&&this.getOptionVal(u,this.constructionRules.correctLadder.optHeight,o)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(u,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o)}}for(l=0;l<i.length;l++){var d=i[l],m=this.getValidLadder(l,t,o);0==l&&this.setOptionValue(d.ElementId,this.constructionRules.correctLadder.optLadderLeft,m.optLadder,o);var g=m;if(t.getElementHasRightElement(d.getElementId())){var E=this.getValidLadder(l+1,t,o);E.colCount>m.colCount&&(g=E)}this.setOptionValue(d.getElementId(),this.constructionRules.correctLadder.optLadderRight,g.optLadder,o)}var I=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(I)>=0){var p=t.getAllElementsInRow(I-1,!1);for(l=0;l<p.length;l++){var O=p[l];this.setOptionDoShow(O.getElementId(),this.constructionRules.correctLadder.optHasHeight,o)}}}}},{key:"correctCoverPlate",value:function correctCoverPlate(t,o){var i=this;this.constructionRules.coverPlateRule&&(this.constructionRules.coverPlateRule.onHighestElementsOnly||t.getHighestElementsPerSeries().forEach((function(t){var l=0;t.forEach((function(t){var o;return l+=null!==(o=t.Width)&&void 0!==o?o:0}));var r=i.constructionRules.seriesWidthToPlateOpv.find((function(t){return t.limit>l}));i.setOptionValue(t[0].ElementId,i.constructionRules.optABD,r,o)})))}},{key:"correctSeries",value:function correctSeries(t,o){for(var i=!1,l=t.getAllElementIdsInGrid(),r=!1,a=!1,h=0;h<l.length;h++){var c=l[h];this.getElementIsCornerElement(t.getElementById(c),o)&&(r=!0),this.checkArticleHasOption(c,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(c,"OPTBR_ABDECKPLATTE",o);var u=this.getOptionVal(c,"OPTABDECKPLATTE",o);this.checkArticleHasOption(c,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==u&&(i=!0),"OPVBR_18"==this.getOptionVal(c,"OPTBR",o)&&(a=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var d=t.getSizeOfHighesRow(!1),m=[],g=[],E=[],I=0,p=0,O=t.getAllElementsInColumn(p,!1);O.length>0;){if(O.length==d){var R=O[d-1];E.push(R),"OPVBR_75"==(u=this.getOptionVal(R.ElementId,"OPTBR",o))?I+=75:"OPVBR_18"==u?I+=18.75:"OPVBR_37"==u&&(I+=37.5),this.setOptionDoHide(R.ElementId,"OPTOBEN",o)}else E.length>0&&(m.push(E),g.push(I)),E=[],I=0;p++,O=t.getAllElementsInColumn(p,!1)}for(E.length>0&&(m.push(E),g.push(I)),h=0;h<m.length;h++){var k=m[h][0],P="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(g[h]-40.4)<3?P="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(g[h]-77.8)<3?P="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(g[h]-115.3)<3?P="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(g[h]-152.8)<3?P="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(g[h]-190.3)<3?P="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(g[h]-227.8)<3&&(P="OPVABDECKPLATTE_227"),""==P||r)for(var T=t.getAllElementsInGridSortedbyGridPos(),V=0;V<T.length;V++)this.checkArticleHasOption(T[V].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(T[V].getElementId(),"OPTABD_HIDE",o);else for(var v=t.getAllElementsInGridSortedbyGridPos(),C=0;C<v.length;C++)this.checkArticleHasOption(v[C].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(v[C].getElementId(),"OPTABD_HIDE",o);if(""==P||!i||r||a)for(var B=0;B<m[h].length;B++)this.setOptionDoShow(m[h][B].ElementId,"OPTOBEN",o);else this.setOptionValue(k.ElementId,"OPTBR_ABDECKPLATTE",P,o)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,o,i,l){if(0!=o.getCellsInGridByElementId(t).cells.length)for(var r=this.getCurOptionBasedConstructionRules(t,i),a=0;a<r.length;a++){if(r[a].forceOptions)for(var h=0;h<r[a].forceOptions.length;h++){var c=r[a].forceOptions[h];if(!c.rule||""==c.rule||this.evalRule(t,c.rule,i))for(var u=c.options,d=c.value,m=0;m<u.length;m++){var g=u[m],E=this.constructionRules.optionsVisibilityInfo[g];if(E.complementDir){var I=E.complementDir;l&&("LEFT"==I?I="RIGHT":"RIGHT"==I&&(I="LEFT"));var p=o.getNeighborElements(t,I);if(p.length>0)for(var O=0;O<p.length;O++){for(var R=p[O],k=this.getCurOptionBasedConstructionRules(R.ElementId,i),P=E.complementOPT,T=!1,V=0;V<k.length;V++)if(k[V].forceOptions)for(var v=0;v<k[V].forceOptions.length;v++){var C=k[V].forceOptions[v];if((!C.rule||""==C.rule||this.evalRule(R.ElementId,C.rule,i))&&(this.arrayContainsValue(C.options,P)&&(T=!0,"doShow"==d&&"doShow"==C.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",i)&&"OPVFUELLUNG"==this.getOptionVal(R.ElementId,"OPTELEMENT",i)?(this.setOptionDoHide(R.ElementId,P,i),this.setOptionDoHide(R.ElementId,P,i)):this.setOptionDoShow(R.ElementId,P,i)),"doHide"==d&&"doHide"==C.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doShow"==d&&"doHide"==C.value||"doHide"==d&&"doShow"==C.value))){var B=!0;c.prio&&C.prio?B=c.prio<=C.prio:c.prio?B=!0:C.prio&&(B=!1),B?"doHide"==d?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doHide"==C.value?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==C.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoShow(R.ElementId,P,i))}}T||("doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doHide"==d&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)))}else"doShow"==d&&this.setOptionDoShow(t,g,i),"doHide"==d&&this.setOptionDoHide(t,g,i)}}}if(r[a].changeOptions)for(var _=0;_<r[a].changeOptions.length;_++){for(var x=!0,G=r[a].changeOptions[_].rule.split("&"),b=0;b<G.length;b++)if(G[b].indexOf("!=")>0){var H=G[b].split("!=")[0],y=G[b].split("!=")[1];this.getOptionVal(t,H,i)==y&&(x=!1)}else{H=G[b].split("=")[0],y=G[b].split("=")[1];this.getOptionVal(t,H,i)!=y&&(x=!1)}x&&(r[a].changeOptions[_].doShow&&this.setOptionDoShow(t,r[a].changeOptions[_].doShow,i),r[a].changeOptions[_].doHide&&this.setOptionDoHide(t,r[a].changeOptions[_].doHide,i),r[a].changeOptions[_].opt&&r[a].changeOptions[_].opv&&this.setOptionValue(t,r[a].changeOptions[_].opt,r[a].changeOptions[_].opv,i))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,o,i){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var l=0;l<this.constructionRules.correctNeighborOPT.length;l++){var r=o.getCellsInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,"OPVOHNE",i),0==r.cells.length)return;var a=o.getNeighborElements(t,this.constructionRules.correctNeighborOPT[l].dir);if(a.length>0){var h=this.getOptionVal(a[0].ElementId,this.constructionRules.correctNeighborOPT[l].neighborOPT,i);""!=h&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,h,i)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,o){var i=t.getAllElementsInGridSortedbyGridPos();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var l=!0,r=0;r<this.constructionRules.correctRetailArticleNumberByRule.length;r++){var a=this.constructionRules.correctRetailArticleNumberByRule[r];if("global"==a.range){for(var h=0;h<i.length&&l;h++){this.evalRule(i[h].getElementId(),a.rule,o)||(l=!1)}if(l)return{doChange:!0,retailArticleRules:a.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,l.Z)(u().mark((function _callee(t,o,i,l){var r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){u.next=3;break}return I.error(new d.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),u.abrupt("return");case 3:if(r=(new Date).getTime(),a=void 0,I.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),h=new Map,l)for(c=t.getAllElementIdsInGrid(),o=void 0,i=void 0,m=0;m<c.length;m++)this.getElementIsCornerElement(t.getElementById(c[m]),h)&&this.setOptionValue(c[m],"OPTELEMENT","OPVOFFENES_FACH",h);for(a=this.setAllOptToDefault(t,h,o,i),this.doCorrectAffectedElementsByOption(t,h,o,i),this.correctBottom(t,h,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,h,!0),this.correctSeries(t,h),this.correctCoverPlate(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!1);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!0);for(m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h);for(this.correctLadder(t,h),this.correctOptionsInfluencedByDimensions(t,h),this.partlistHelper.calculateKnots(t,h),this.partlistHelper.calculateRahmen(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctBack(t,h,t.getPlannerElementAtGridPos(m,g,!1).getElementId());return E=this.doChangeRetailArticleNumbers(t,h),u.next=27,this.updateCfgValuesByPlanner(h,void 0,this.constructionRules.partlistRules.bundleRules,E);case 27:return I.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-r)),I.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-r)),u.abrupt("return",a);case 30:case"end":return u.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(o,i,l,r){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,o){if(this.hideOptionsForConstruction.has(t)){var i=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(o,(0,m.Z)(i))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}},{key:"getForceWholePlanningSameHeight",value:function getForceWholePlanningSameHeight(){return this.constructionRules.forceWholePlanningSameHeight}}]);var t}(),O=i(64357),R=i(17562);function _createForOfIteratorHelper(t,o){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,o){if(t){if("string"==typeof t)return _arrayLikeToArray(t,o);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,o):void 0}}(t))||o&&t&&"number"==typeof t.length){i&&(t=i);var l=0,r=function F(){};return{s:r,n:function n(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function e(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,h=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return h=t.done,t},e:function e(t){c=!0,a=t},f:function f(){try{h||null==i.return||i.return()}finally{if(c)throw a}}}}function _arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,l=Array(o);i<o;i++)l[i]=t[i];return l}var k=d.ZP.initLog("Planner","BOX-PLANNER_GRID"),P=function(){return(0,a.Z)((function BoxPlannerGrid(t,o){(0,r.Z)(this,BoxPlannerGrid),(0,h.Z)(this,"plannerElements",void 0),(0,h.Z)(this,"frontGrid",void 0),(0,h.Z)(this,"backGrid",void 0),(0,h.Z)(this,"hasActiveBackside",void 0),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"gridSetupParams",void 0),this.plannerElements=new Map,this.frontGrid=new Array,this.backGrid=new Array,this.gridSetupParams=t,this.getValueOfOptionOfArticle=o,this.hasActiveBackside=!1}),[{key:"createNewCells",value:function createNewCells(t,o,i,l){if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[{plannerElementId:t.ElementId,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),index:new O.FM(o,i)}],startColIndex:o,endColIndex:o,startRowIndex:i,endRowIndex:i,backside:l,colCount:1,rowCount:1};this.gridSetupParams.forceFixCellRasterSize||k.error(new d.GE("Box planner with params forceSingleCellPerElement is false and forceFixCellRasterSize is false are not allowed"));for(var r=Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),a=Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth),h=[],c=0;c<r;c++)for(var u=0;u<a;u++){var m={plannerElementId:t.ElementId,width:this.gridSetupParams.fixCellRasterWidth,height:this.gridSetupParams.fixCellRasterHeight,index:new O.FM(o+c,i+u)};h.push(m)}return{cells:h,startColIndex:o,endColIndex:o+r-1,startRowIndex:i,endRowIndex:i+a-1,backside:l,colCount:r,rowCount:a}}},{key:"createEmptyCells",value:function createEmptyCells(t,o,i,l,r,a){for(var h=[],c=t;c<=i;c++)for(var u=o;u<=l;u++){var d={plannerElementId:-1,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:r,height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:a,index:new O.FM(c,u)};h.push(d)}return h}},{key:"getCellCount",value:function getCellCount(t){return this.gridSetupParams.forceSingleCellPerElement?{colCount:1,rowCount:1}:{colCount:Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),rowCount:Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth)}}},{key:"getAllUsedCellsInGrid",value:function getAllUsedCellsInGrid(t){for(var o=new Array,i=t?this.backGrid:this.frontGrid,l=0;l<i.length;l++)for(var r=0;r<i[l].length;r++)null!=i[l][r]&&o.push(i[l][r]);return o}},{key:"getGridColumnWidth",value:function getGridColumnWidth(t){for(var o=0;o<this.frontGrid[t].length;o++)if(this.frontGrid[t][o])return this.frontGrid[t][o].width;return 0}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var o=0,i=!1;if(this.frontGrid.length>t)for(var l=this.frontGrid[t],r=l.length;r>=0;r--)!i&&l[r]&&(i=!0),i&&(o+=null==l[r]?0:l[r].height);return o}},{key:"deleteElementByIdFromGrid",value:function deleteElementByIdFromGrid(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.endRowIndex-o.startRowIndex+1,r=!1,a=o.startColIndex,h=o.startColIndex-o.endColIndex+1;this.getRowCount(o.startColIndex,o.backside)==l&&(r=!0);var c=this.getAllUsedCellsInGrid(o.backside);i=new Array;for(var u=0;u<c.length;u++){var d=c[u];d.plannerElementId!=t&&(r&&d.index.x>a&&(d.index.x-=h),i[d.index.x]||(i[d.index.x]=[]),i[d.index.x][d.index.y]=d)}o.backside?this.backGrid=i:this.frontGrid=i}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,o,i){var l=i?this.backGrid:this.frontGrid;if(l[t]&&l[t][o]){var r=l[t][o];if(null==r)return;return this.plannerElements.get(r.plannerElementId)}}},{key:"getCellsInGridByElementId",value:function getCellsInGridByElementId(t){for(var o=void 0,i=!1,l=0;l<this.frontGrid.length;l++)for(var r=0;r<this.frontGrid[l].length;r++){var a=this.frontGrid[l][r];a&&a.plannerElementId==t&&(o=a,i=!1)}if(null==o)for(l=0;l<this.backGrid.length;l++)for(r=0;r<this.backGrid[l].length;r++){var h=this.backGrid[l][r];h&&h.plannerElementId==t&&(o=h,i=!0)}if(null==o)return{cells:[],backside:!1,startColIndex:-1,endColIndex:-1,startRowIndex:-1,endRowIndex:-1,colCount:0,rowCount:0};if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[o],backside:i,startColIndex:o.index.x,endColIndex:o.index.x,startRowIndex:o.index.y,endRowIndex:o.index.y,colCount:1,rowCount:1};var c=i?this.backGrid:this.frontGrid,u=[o],d=1/0,m=-1/0,g=1/0,E=-1/0;for(l=o.index.x;l<c.length;l++)for(r=o.index.y+1;r<c.length;r++){var I=c[l][r];if(!I||I.plannerElementId!=t)break;l<d&&(d=l),l>m&&(m=l),r<g&&(g=r),r>m&&(E=r),u.push(I)}return{cells:u,backside:i,startColIndex:d,endColIndex:m,startRowIndex:g,endRowIndex:E,colCount:m-d+1,rowCount:E-g+1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){return Array.from(this.plannerElements.keys())}},{key:"_getAllElementsInGrid",value:function _getAllElementsInGrid(t){for(var o=[],i=[],l=0;l<t.length;l++)for(var r=0;r<t[l].length;r++){var a=t[l][r];null!=a&&(-1==o.indexOf(a.plannerElementId)&&(o.push(a.plannerElementId),i.push(this.plannerElements.get(a.plannerElementId))))}return i}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){return this._getAllElementsInGrid(this.frontGrid)}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){return this._getAllElementsInGrid(this.backGrid)}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){return this._getAllElementsInGrid(this.backGrid).map((function(t){return t.ElementId}))}},{key:"getAllElementsInGridSortedbyElementId",value:function getAllElementsInGridSortedbyElementId(){return Array.from(this.plannerElements.values())}},{key:"getAllElementsInGridSortedbyGridPos",value:function getAllElementsInGridSortedbyGridPos(){for(var t=[],o=[],i=0;i<this.frontGrid.length;i++)for(var l=0;l<this.frontGrid[i].length;l++){var r=this.frontGrid[i][l];if(r&&-1==o.indexOf(r.plannerElementId)){var a=this.getElementById(r.plannerElementId);o.push(r.plannerElementId),t.push(a)}}for(i=0;i<this.backGrid.length;i++)for(l=0;l<this.backGrid[i].length;l++){var h=this.backGrid[i][l];if(h&&-1==o.indexOf(h.plannerElementId)){var c=this.getElementById(h.plannerElementId);o.push(h.plannerElementId),t.push(c)}}return t}},{key:"getElementById",value:function getElementById(t){return this.plannerElements.get(t)}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var o=this.getCellsInGridByElementId(t);return 0!=o.cells.length&&(0==o.cells[0].index.x&&0==o.cells[0].index.y&&!o.backside)}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,o){var i=o?this.backGrid:this.frontGrid;return this.getCellsInGridByElementId(t).endColIndex+1==i.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.startColIndex;l<=o.endColIndex;l++)if(i[l].length>o.endRowIndex+1&&i[l][o.endRowIndex+1])return!0;return!1}},{key:"getTopElements",value:function getTopElements(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[],a=o.startColIndex;a<=o.endColIndex;a++)if(i[a].length>o.endRowIndex+1&&i[a][o.endRowIndex+1]){var h=i[a][o.endRowIndex+1];if(!h)continue;-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getTopRightElement",value:function getTopRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.endRowIndex+1&&i[o.endColIndex+1][o.endRowIndex+1]){var l=i[o.endColIndex+1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(o.startColIndex>0&&i[o.startColIndex-1].length>0&&i[o.startColIndex-1][o.endRowIndex+1]){var l=i[o.startColIndex-1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getCellsInGridByElementId(t).startRowIndex-1>=0}},{key:"getBottomElements",value:function getBottomElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startRowIndex-1>=0)for(var a=o.startColIndex;a<=o.endColIndex;a++){var h=i[a][o.startRowIndex-1];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.startRowIndex&&i[o.endColIndex+1][o.startRowIndex])return!0;return!1}},{key:"getRightElements",value:function getRightElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>o.endColIndex+1)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.endColIndex+1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;return!!(o.startColIndex>0&&i[o.startColIndex-1][o.startRowIndex])}},{key:"getLeftElements",value:function getLeftElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startColIndex-1>=0)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.startColIndex-1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,o){var i=o?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>t)for(var a=0;a<i[t].length;a++){var h=i[t][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getColumnCount",value:function getColumnCount(){return this.frontGrid.length}},{key:"getRowCount",value:function getRowCount(t,o){return o?this.backGrid[t].length:this.frontGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,o){for(var i=o?this.backGrid:this.frontGrid,l=[],r=[],a=0;a<i.length;a++)if(i[a].length>t){var h=i[a][t];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var o=t?this.backGrid:this.frontGrid,i=0,l=0;l<o.length;l++)for(var r=o[l].length;r>=0;r--){if(o[l][r]){i<r&&(i=r);break}}return i+1}},{key:"getNeighborElements",value:function getNeighborElements(t,o){var i=this.getCellsInGridByElementId(t),l=i.backside?this.backGrid:this.frontGrid,r=[],a=[];switch(o){case"TOP":for(var h=i.startColIndex;h<=i.endColIndex;h++){var c=h,u=i.endRowIndex+1;if(l[c].length>u){var d=l[c][u];d&&-1==a.indexOf(d.plannerElementId)&&(a.push(d.plannerElementId),r.push(this.plannerElements.get(d.plannerElementId)))}}break;case"DOWN":for(h=i.startColIndex;h<=i.endColIndex;h++){var m=h,g=i.startRowIndex-1;if(g>=0){var E=l[m][g];E&&-1==a.indexOf(E.plannerElementId)&&(a.push(E.plannerElementId),r.push(this.plannerElements.get(E.plannerElementId)))}}break;case"LEFT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var I=i.startColIndex-1,p=h;if(I>=0){var O=l[I][p];O&&-1==a.indexOf(O.plannerElementId)&&(a.push(O.plannerElementId),r.push(this.plannerElements.get(O.plannerElementId)))}}break;case"RIGHT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var R=i.startColIndex+1,k=h;if(l.length>R){var P=l[R][k];P&&-1==a.indexOf(P.plannerElementId)&&(a.push(P.plannerElementId),r.push(this.plannerElements.get(P.plannerElementId)))}}break;case"BACK":if(this.hasActiveBackside){var T=this.getPlannerElementAtGridPos(i.startColIndex,i.startRowIndex,!0);null!=T&&(r=[T])}}return r}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var o=this.getCellsInGridByElementId(t);return o.backside?this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!1):this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!0)}}},{key:"getOppositeElements",value:function getOppositeElements(t){var o=[];if(this.hasActiveBackside)for(var i=0;i<t.length;i++){var l=this.getOppositeElement(t[i]);null!=l&&o.push(l)}return o}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(t){for(var o=0,i=0,l=0,r=[],a=0;a<this.frontGrid.length;a++){for(var h=0,c=0;c<this.frontGrid[a].length;c++){var u=this.frontGrid[a][c];u&&-1==r.indexOf(u.plannerElementId)&&(h+=this.plannerElements.get(u.plannerElementId).getHeight(),0==a&&0==c&&(i=this.plannerElements.get(u.plannerElementId).getDepth()))}h>l&&(l=h);var d=this.getGridColumnWidth(a);t&&a>0&&(77.9==d?d=75:40.4==d?d=37.5:21.7==d&&(d=18.75)),o+=d}return this.hasActiveBackside&&(i*=2),new O.P(o,l,i)}},{key:"getHighestElementsPerSeries",value:function getHighestElementsPerSeries(){if(this.hasActiveBackside)throw new Error("this function is doesnt implement the backside logic (yet)");for(var t=[],o=-1,i=0;i<this.getColumnCount();i++){var l=this.getRowCount(i,!1);l==o&&t[t.length].push(this.getPlannerElementAtGridPos(i,l-1,!1)),o=l}return t}},{key:"getAllElementsInSameRowByElementId",value:function getAllElementsInSameRowByElementId(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInRow(o.startRowIndex,!1);return this.hasActiveBackside&&(i=i.concat(this.getAllElementsInRow(o.startRowIndex,!0))),{elementIds:i.map((function(t){return t.ElementId})),plannerElements:i,backside:o.backside}}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var o=this.getCellsInGridByElementId(t);if(0==o.startRowIndex)return{elements:[],backside:!1};for(var i=o.backside?this.backGrid:this.frontGrid,l=[],r=o.startColIndex;r<=o.endColIndex;r++)for(var a=o.startRowIndex--;a>=0;a--){var h=i[r][a];h&&-1==l.indexOf(h.plannerElementId)&&l.push(h.plannerElementId)}return{elements:l,backside:o.backside}}},{key:"getAllElementsInSameCol",value:function getAllElementsInSameCol(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInColumn(o.startColIndex,o.backside);return null==i&&(i=[]),{elements:i.map((function(t){return t.ElementId})),backside:o.backside}}},{key:"prepareGridForColCopy",value:function prepareGridForColCopy(t,o){if("AVO"!=o){var i=this.getCellsInGridByElementId(t),l=(this.plannerElements.get(t),0);"AVR"==o?l=i.endColIndex+1:"AVL"==o&&(l=i.startColIndex);var r=i.endColIndex-i.startColIndex+1,a=this.getAllUsedCellsInGrid(!1);this.frontGrid=new Array;for(var h=0;h<a.length;h++){var c=a[h];c.index.x>=l&&(c.index.x+=r),this.frontGrid[c.index.x]||(this.frontGrid[c.index.x]=[]),this.frontGrid[c.index.x][c.index.y]=c}for(h=l;h<l+r;h++)this.frontGrid[h]||(this.frontGrid[h]=[]);if(this.hasActiveBackside){var u=this.getAllUsedCellsInGrid(!0);this.backGrid=new Array;for(h=0;h<u.length;h++){var d=u[h];d.index.x>=l&&(d.index.x+=r),this.backGrid[d.index.x]||(this.backGrid[d.index.x]=[]),this.backGrid[d.index.x][d.index.y]=d}for(h=l;h<l+r;h++)this.backGrid[h]||(this.backGrid[h]=[])}}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backGrid=new Array,this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,o,i,l){for(var r=l?this.backGrid:this.frontGrid,a=this.createNewCells(t,o,i,l),h=0;h<a.cells.length;h++){var c=a.cells[h];r[c.index.x]||(r[c.index.x]=[]),r[c.index.x][c.index.y]=c}this.plannerElements.set(t.getElementId(),t),l&&(this.hasActiveBackside=!0)}},{key:"addElementAsCopy",value:function addElementAsCopy(t,o,i){var l=this.getCellsInGridByElementId(t),r=-1,a=-1,h="BACKSIDE"==i?!l.backside:l.backside,c=this.getCellCount(o);switch(i){case"AVR":r=l.endColIndex+1,a=l.startRowIndex;break;case"AVL":r=l.startColIndex-c.colCount,a=l.startRowIndex;break;case"AVO":r=l.startColIndex,a=l.endRowIndex+1;break;case"BACKSIDE":r=l.startColIndex,a=l.startRowIndex}for(var u=this.createNewCells(o,r,a,h),d=h?this.backGrid:this.frontGrid,m=0;m<u.cells.length;m++)d[u.cells[m].index.x]||(d[u.cells[m].index.x]=[]),d[u.cells[m].index.x][u.cells[m].index.y]=u.cells[m];this.plannerElements.set(o.getElementId(),o)}},{key:"deleteElement",value:function deleteElement(t,o){this.plannerElements.has(t)||k.error(new d.GE("Try to delete an elementId that does not exist"));this.getCellsInGridByElementId(t);R.Z.removeDockingPointRelations(this.plannerElements.get(t)),this.deleteElementByIdFromGrid(t),this.plannerElements.delete(t),this.hasActiveBackside}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){var i=t.value;R.Z.removeDockingPointRelations(i)}}catch(t){o.e(t)}finally{o.f()}for(var l=1,r=[],a=0;a<this.frontGrid.length;a++)for(var h=0;h<this.frontGrid[a].length;h++){var c=this.frontGrid[a][h];if(-1==r.indexOf(c.plannerElementId)){var u=this.plannerElements.get(c.plannerElementId);r.push(c.plannerElementId);for(var m=this.getNeighborElements(c.plannerElementId,"TOP"),g=this.getNeighborElements(c.plannerElementId,"RIGHT"),E=0;E<m.length;E++)R.Z.tryDockElement(u,"AVO",[m[E]]);for(E=0;E<g.length;E++)R.Z.tryDockElement(u,"AVR",[g[E]]);u.PosNr=l,l++}}for(a=0;a<this.backGrid.length;a++)for(h=0;h<this.backGrid[a].length;h++){var I=this.backGrid[a][h];if(-1==r.indexOf(I.plannerElementId)){var p=this.plannerElements.get(I.plannerElementId);r.push(I.plannerElementId);var O=this.frontGrid[a][h],P=this.plannerElements.get(O.plannerElementId);if(P){var T=null==P?void 0:P.getDockingPointById("AVO_AVO_2_IL");T?p&&R.Z.tryDockElementToDP(p,P,T):k.error(new d.GE("Error Loading DockingPoint AVO_2 for plannerElement"))}var V=this.getNeighborElements(I.plannerElementId,"TOP"),v=this.getNeighborElements(I.plannerElementId,"RIGHT");for(E=0;E<V.length;E++)R.Z.tryDockElement(p,"AVO",[V[E]]);for(E=0;E<v.length;E++)R.Z.tryDockElement(p,"AVL",[v[E]]);p.PosNr=l,l++}}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){t.value.destroy()}}catch(t){o.e(t)}finally{o.f()}this.plannerElements.clear(),this.frontGrid=new Array,this.hasActiveBackside&&(this.hasActiveBackside=!1,this.backGrid=new Array)}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;var t,o=this.getAllElementsInBackGrid(),i=_createForOfIteratorHelper(o.values());try{for(i.s();!(t=i.n()).done;){var l=t.value;this.plannerElements.delete(l.ElementId),l.destroy()}}catch(t){i.e(t)}finally{i.f()}o=[],this.backGrid=new Array}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getForceSingleCellPerElement",value:function getForceSingleCellPerElement(){return this.gridSetupParams.forceSingleCellPerElement}},{key:"getBoundingBox",value:function getBoundingBox(){var t,o=0,i=0,l=0,r=0,a=0,h=this.plannerElements.get(this.frontGrid[0][0].plannerElementId).getDepth(),c=0;t="RIGHT";for(var u=[],d=0;d<this.frontGrid.length;d++){var m=this.frontGrid[d][0];if(!m)break;if(-1==u.indexOf(m.plannerElementId)){u.push(m.plannerElementId);var g=this.plannerElements.get(m.plannerElementId);if(!g)continue;var E=this.getValueOfOptionOfArticle(m.plannerElementId,"OPTELEMENT");"RIGHT"==t?r+=g.getWidth():"FRONT"==t?h+=g.getWidth():"LEFT"==t?r-=g.getWidth():"BACK"==t&&(h-=g.getWidth()),"OPVECK_I"==E?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==E&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),r<i&&(i=r),r>l&&(l=r),h<a&&(a=h),h>c&&(c=h);var I=this.getGridColumnHeight(d);o=o<I?I:o}}var p=c-a,O=l-i;return this.hasActiveBackside&&(p=2*h),{width:Math.round(1e3*O)/1e3,height:Math.round(1e3*o)/1e3,depth:Math.round(1e3*p)/1e3}}},{key:"getFreeMoveLocation",value:function getFreeMoveLocation(t){var o=this.getElementById(t);if(!o)return[];var i=this.getCellsInGridByElementId(t);if(0===i.cells.length)return[];var l,r=[],a=function isEmptyCell(t,o){var i;return void 0===(null===(i=h[t])||void 0===i?void 0:i[o])},h=i.backside?this.backGrid:this.frontGrid,c=_createForOfIteratorHelper(this.plannerElements.keys());try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u!=t){var d=this.getElementById(u);if(this.gridSetupParams.forceSingleCellPerElement){if(!this.getElementHasTopElement(u)&&d.getWidth()==o.getWidth()){var m=this.getCellsInGridByElementId(u),g=this.getAllElementsInRow(m.endRowIndex+1,m.backside);if(g.length>0&&g[0].getHeight()!=o.getHeight())continue;var E=this.createLocationInformation(o,i.backside,this.createEmptyCells(m.startColIndex,m.endRowIndex+1,m.startColIndex,m.endRowIndex+1,o.getWidth(),o.getHeight()),m.startColIndex,m.endRowIndex+1,1,1);r.push(E)}}else for(var I=this.getCellsInGridByElementId(u),p=-1,O=-1,R=I.endRowIndex+1,k=I.startColIndex;k<=I.startColIndex+I.colCount-1;k++){var P=!1;if(a(k,R)){if(-1==p?(p=k,O=k):O=k,k==I.startColIndex+I.colCount-1)if(i.colCount<=O-p+1)P=!0;else{P=!0;for(var T=0;T<i.colCount;T++)if(a(p+T,I.endRowIndex)){P=!1;break}}}else i.colCount<=O-p+1&&(P=!0);if(P){var V=this.createLocationInformation(o,i.backside,this.createEmptyCells(p,I.endRowIndex+1,p+i.colCount-1,I.endRowIndex+i.rowCount-1,o.getWidth(),o.getHeight()),p,I.endRowIndex+1,i.colCount,i.rowCount);r.push(V)}}}}}catch(t){c.e(t)}finally{c.f()}var v=this.createLocationInformation(o,i.backside,this.createEmptyCells(-i.colCount,0,-1,i.rowCount-1,o.getWidth(),o.getHeight()),-i.colCount,0,i.colCount,i.rowCount);r.push(v);var C=this.createLocationInformation(o,i.backside,this.createEmptyCells(this.getColumnCount(),0,this.getColumnCount()+i.colCount-1,i.rowCount-1,o.getWidth(),o.getHeight()),this.getColumnCount(),0,i.colCount,i.rowCount);return r.push(C),r}},{key:"getFreePlanningLocation",value:function getFreePlanningLocation(t,o){var i=this.getElementById(t);if(i){var l=this.getCellsInGridByElementId(t);if(0!==l.cells.length){var r=l.backside?this.backGrid:this.frontGrid,a=l.startColIndex,h=l.endColIndex,c=l.startRowIndex,u=l.endRowIndex,d=-1,m=-1,g=-1,E=-1,I=[],p=function isValidCell(t,o){var i;return void 0===(null===(i=r[t])||void 0===i?void 0:i[o])};switch(o){case"LEFT":for(var O=a-1,R=!1,k=c;k<=u;k++)if(p(O,k)){m=k,R=!0;break}if(!R)return;R=!1;for(var P=a-1;P>=a-l.colCount&&(p(P,m)&&(0==m||!p(P,m-1)));P--)R=!0,d=P;if(!R)return;g=a-1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"TOP":for(var T=u+1,V=!1,v=h;v>=a;v--)p(v,T)&&(d=v,V=!0);if(!V)return;m=T,g=h,E=T+l.rowCount-1,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"RIGHT":for(var C=h+1,B=!1,_=c;_<=u;_++)if(p(C,_)){m=_,B=!0;break}if(!B)return;B=!1;for(var x=h+1;x<=h+l.colCount&&(p(x,m)&&(0==m||!p(x,m-1)));x++)g=x,B=!0;if(!B)return;d=h+1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;default:return}return this.createLocationInformation(i,l.backside,I,d,m,g-d+1,E-m+1)}}}},{key:"createLocationInformation",value:function createLocationInformation(t,o,i,l,r,a,h){var c=o?this.backGrid:this.frontGrid,u={cells:i,widthPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),heightPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depthPerCell:t.getDepth(),width:this.gridSetupParams.forceFixCellRasterSize?a*this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?h*this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depth:t.getDepth(),startIndexWorldPos:new O.FM(0,0)};if(this.gridSetupParams.forceFixCellRasterSize)u.startIndexWorldPos=new O.FM(l*this.gridSetupParams.fixCellRasterWidth,r*this.gridSetupParams.fixCellRasterHeight);else{for(var d=0,m=0;m<l;m++)d+=c[m][0].width;l<0&&(d=-t.getWidth());var g=0;for(m=0;m<r;m++)g+=c[l][m].height;u.startIndexWorldPos=new O.FM(d,g)}return u}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){for(var t=this.getAllElementsInGridSortedbyGridPos(),o={boxPlannerInteractionInformationPerElement:new Map},i=0;i<t.length;i++){var l=t[i],r=this.getCellsInGridByElementId(l.getElementId()),a=this.createLocationInformation(l,r.backside,r.cells,r.startColIndex,r.startRowIndex,r.colCount,r.rowCount),h=this.getFreePlanningLocation(l.getElementId(),"LEFT"),c=this.getFreePlanningLocation(l.getElementId(),"RIGHT"),u=this.getFreePlanningLocation(l.getElementId(),"TOP"),d=this.getElementHasTopElement(l.getElementId()),m=[];!d&&t.length>1&&(m=this.getFreeMoveLocation(l.getElementId()));var g={location:a,isDeletable:!d&&t.length>1,availablePlanningLocations:{availableBoxPlannerCellsLeft:h,availableBoxPlannerCellsTop:u,availableBoxPlannerCellsRight:c},availableMovingLocations:m};o.boxPlannerInteractionInformationPerElement.set(l.getElementId(),g)}return o}},{key:"getGeneralPlanningState",value:function getGeneralPlanningState(t){for(var o=[],i=void 0,l=Array.from(this.plannerElements.values()).map((function(t){return{basketId:t.getBasketId(),elementId:t.getElementId(),articleCodex:t.getArticleCodex(),size:{width:t.getWidth(),height:t.getHeight(),depth:t.getDepth()},area:{fromX:void 0,toX:void 0,fromY:void 0,toY:void 0}}})),r=0;r<this.frontGrid.length;r++){o.push([]);for(var a=this.frontGrid[r],h=function _loop(){var t=a[c];if(t){var i=l.find((function(o){return o.elementId===t.plannerElementId}));i&&((void 0===i.area.fromX||i.area.fromX>t.index.x)&&(i.area.fromX=t.index.x),(void 0===i.area.toX||i.area.toX<t.index.x)&&(i.area.toX=t.index.x),(void 0===i.area.fromY||i.area.fromY>t.index.y)&&(i.area.fromY=t.index.y),(void 0===i.area.toY||i.area.toY<t.index.y)&&(i.area.toY=t.index.y)),o[r].push({index:t.index,plannedElement:i})}},c=0;c<a.length;c++)h()}var u=Math.max.apply(Math,(0,m.Z)(o.map((function(t){return t.length}))));o.forEach((function(t){for(;t.length<u;){var o,i=t[t.length-1],l=i?i.index.y+1:0;t.push({index:new O.FM((null===(o=t[0])||void 0===o?void 0:o.index.x)||0,l),plannedElement:void 0})}}));var d=t?l.find((function(o){return o.elementId===t})):void 0;if(d){var g=this.getFreePlanningLocation(d.elementId,"LEFT"),E=this.getFreePlanningLocation(d.elementId,"RIGHT"),I=this.getFreePlanningLocation(d.elementId,"TOP"),p=[];g&&this.addFreeCellsToMatrix(o,g.cells,p),E&&this.addFreeCellsToMatrix(o,E.cells,p),I&&this.addFreeCellsToMatrix(o,I.cells,p),i={articleCodex:d.articleCodex,size:d.size,gridSpace:{rows:d.area.toY-d.area.fromY+1,colums:d.area.toX-d.area.fromX+1},rules:p,elementId:t}}return{grids:[{index:0,rowSizes:this.getRowSizes(o,i),columnSizes:this.getColumnSizes(o,i),matrix:o}],selectedElement:i}}},{key:"getRowSizes",value:function getRowSizes(t,o){if(this.getForceSingleCellPerElement()){for(var i=t[0].length,l=Array(i).fill(-1),r=function _loop2(i){var r,a=null===(r=t.find((function(t){return t[i].plannedElement})))||void 0===r?void 0:r[i];if(null!=a&&a.plannedElement?l[i]=a.plannedElement.size.height:o&&(l[i]=o.size.height),!l.includes(-1))return 1},a=0;a<i&&!r(a);a++);if(l.includes(-1))throw new Error("Column sizes are not set");return l}return 15}},{key:"getColumnSizes",value:function getColumnSizes(t,o){if(this.getForceSingleCellPerElement()){for(var i=t.length,l=Array(i).fill(-1),r=0;r<i;r++){var a=t[r].find((function(t){return t.plannedElement}));if(null!=a&&a.plannedElement?l[r]=a.plannedElement.size.width:o&&(l[r]=o.size.width),!l.includes(-1))break}if(l.includes(-1))throw new Error("Row sizes are not set");return l}return 15}},{key:"addFreeCellsToMatrix",value:function addFreeCellsToMatrix(t,o,i){o.forEach((function(o){var i=o.index.x,l=o.index.y,r=t.find((function(t){return t.find((function(t){return t.index.x===i}))}));if(!r){for(var a=[],h=0;h<t[0].length;h++)a.push({index:new O.FM(i,h),plannedElement:void 0});t[0][0].index.x>i?t.unshift(a):t.push(a)}var c=t.find((function(t){return t.find((function(t){return t.index.y===l}))}));c||t.map((function(t){var o;return t.push({index:new O.FM((null===(o=t[0])||void 0===o?void 0:o.index.x)||0,l),plannedElement:void 0})}))})),i.push({type:"FixedPositon",grids:[{gridIndex:0,places:[{lowestX:Math.min.apply(Math,(0,m.Z)(o.map((function(t){return t.index.x})))),lowestY:Math.min.apply(Math,(0,m.Z)(o.map((function(t){return t.index.y}))))}]}]})}}])}(),T=i(2209),V=i(57312),v=i(58178),C=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),B=function(){function DivaBoxPlanner(t,o){(0,r.Z)(this,DivaBoxPlanner),(0,h.Z)(this,"set",void 0),(0,h.Z)(this,"plannerID",void 0),(0,h.Z)(this,"constructionRulesHandler",void 0),(0,h.Z)(this,"boxPlannerGrid",void 0),(0,h.Z)(this,"nextElementId",1),this.set=t,this.plannerID=o,this.constructionRulesHandler=new p(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner);this.boxPlannerGrid=new P({hasMaxGridRasterHeight:!1,hasMaxGridRasterWidth:!1,forceSingleCellPerElement:!0,forceFixCellRasterSize:!1},this.set.getValueOfOptionOfArticle)}return(0,a.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(g=(0,l.Z)(u().mark((function _callee(t){var o,i,l,r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null==(o=JSON.parse(d.ZP.decodeBase64(t))).v||2!=o.v){u.next=26;break}if(o.set&&o.set.elements&&0!=o.set.elements.length){u.next=4;break}return u.abrupt("return");case 4:i=o.set.elements,l=0;case 6:if(!(l<i.length)){u.next=21;break}return r=i[l],a=parseInt(r.elementID),h=new V.Z(this.set.getSetId(),r.basketID,a,DivaBoxPlanner.plannerType),this.nextElementId<a+1&&(this.nextElementId=a+1),this.set.setElementId(r.basketID,h.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(h.ElementId)),(c=this.set.getPlannerData(h.ElementId))&&h.updatePlannerData(c),u.next=17,T.Z.loadSVG(h,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(h,r.boxPlannerInfo.gridPosCol,r.boxPlannerInfo.gridPosRow,r.boxPlannerInfo.isOnBackside);case 18:l++,u.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:u.next=42;break;case 26:m=1,l=0;case 28:if(!(l<o.Elements.length)){u.next=38;break}return g=o.Elements[l],(a=parseInt(g.ID))>m&&(m=a),E={boxElementID:g.ID,boxCol:g.col,boxRow:g.row,boxUpdateWholePlanning:!1},u.next=35,this.addPlannerElement(g.BasketID,E);case 35:l++,u.next=28;break;case 38:return this.nextElementId=m+1,this.boxPlannerGrid.updateWorldPosOfElements(),u.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return u.abrupt("return",o);case 43:case"end":return u.stop()}}),_callee,this)}))),function initPlanner(t){return g.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=this.boxPlannerGrid.getElementById(o[i]);if(l){for(var r=this.boxPlannerGrid.getCellsInGridByElementId(o[i]),a=l.getDockingDockingPoints(),h=[],c=0;c<a.length;c++){var u,d={id:a[c].DpId,onID:a[c].OnElementId,onDPID:null===(u=a[c].OnDP)||void 0===u?void 0:u.DpId};h.push(d)}var m={elementID:l.getElementId(),basketID:this.set.getBasketId(l.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(l.getElementId()),posNr:l.PosNr,x:l.WorldPosCenter.x,y:l.WorldPosCenter.y,z:l.WorldPosCenter.z,rot:l.RotDeg,width:l.Width?l.Width:-1,height:l.Height?l.Height:-1,depth:l.Depth?l.Depth:-1,DP:h,boxPlannerInfo:{gridPosCol:r.startColIndex,gridPosRow:r.startRowIndex,isOnBackside:r.backside}};t.push(m)}}var g=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:g.width,height:g.height,depth:g.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(m=(0,l.Z)(u().mark((function _callee2(t,o){var i,l;return u().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(null!=o&&null!=o.boxElementID&&null!=o.boxCol&&null!=o.boxRow){r.next=2;break}return r.abrupt("return");case 2:return i=new V.Z(this.set.getSetId(),t,o.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(o.boxElementID)?this.nextElementId:o.boxElementID+1,this.set.setElementId(t,i.ElementId),l=this.set.getPlannerData(i.ElementId),i.updatePlannerData(l),r.next=9,T.Z.loadSVG(i,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(i.ElementId)),this.boxPlannerGrid.addElementAtGridPos(i,o.boxCol,o.boxRow,null!=o.backside&&o.backside),!o.boxUpdateWholePlanning){r.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),r.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return r.stop()}}),_callee2,this)}))),function addPlannerElement(t,o){return m.apply(this,arguments)})},{key:"extendPlanner",value:(c=(0,l.Z)(u().mark((function _callee3(t,o){return u().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,o){return c.apply(this,arguments)})},{key:"copyPlannerElement",value:(i=(0,l.Z)(u().mark((function _callee4(t,o){var i,l,r,a,h,c,d,m=this;return u().wrap((function _callee4$(u){for(;;)switch(u.prev=u.next){case 0:if(i=!1,o){u.next=3;break}return u.abrupt("return");case 3:"STD"==o.copyType&&(o.targetElements=[]),l=[],r=this,a="AVR","BoxPlanner_backside"==o.copyType?a="BACKSIDE":"STD"!=o.copyType&&"BoxPlanner_COL"!=o.copyType||("AVR"==o.dpType?a="AVR":"AVO"==o.dpType?a="AVO":"AVL"==o.dpType&&(a="AVL")),t.forEach((function(t,r){var h;i||(!o||"AVL"!=o.dpType&&"AVR"!=o.dpType?o&&o.copyType&&"BoxPlanner_backside"==o.copyType&&(m.boxPlannerGrid.getPlannerHasActiveBackside()||m.boxPlannerGrid.prepareGridForBackSideCopy()):m.boxPlannerGrid.prepareGridForColCopy(r,o.dpType)),i=!0;var c=new V.Z(m.set.getSetId(),t,m.nextElementId,DivaBoxPlanner.plannerType);m.nextElementId++,m.set.setElementId(t,c.ElementId);var u=m.set.getPlannerData(c.ElementId);c.updatePlannerData(u),m.boxPlannerGrid.addElementAsCopy(r,c,a),m.constructionRulesHandler.onElementCopy(r,c.getElementId()),l.push(c),"STD"==o.copyType&&(null===(h=o.targetElements)||void 0===h||h.push(c.getElementId()))})),h=0;case 10:if(!(h<l.length)){u.next=17;break}return u.next=13,T.Z.loadSVG(l[h],this.set);case 13:if("AVO"==a&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&this.boxPlannerGrid.getCellsInGridByElementId(l[h].ElementId).endRowIndex+1==r.constructionRulesHandler.getMaxElemCountPerColumn())for(c=l[h].getFreeDockingPointsByType("AVO"),d=0;d<c.length;d++)c[d].disableDP(!0);case 14:h++,u.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,o.changedOPT,o.targetElements);case 20:case"end":return u.stop()}}),_callee4,this)}))),function copyPlannerElement(t,o){return i.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){C.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByDeletion",value:function getPlannerElementsInfluencedByDeletion(t,o){if(this.constructionRulesHandler.getForceWholePlanningSameHeight())return 0==this.boxPlannerGrid.getCellsInGridByElementId(t).startRowIndex?[]:this.boxPlannerGrid.getAllElementsInSameRowByElementId(t).elementIds.filter((function(o){return o!=t}));if(this.boxPlannerGrid.getPlannerHasActiveBackside()){if("BoxPlanner_backside"==o)return this.boxPlannerGrid.getAllElementsInBackGrid().map((function(t){return t.ElementId})).filter((function(o){return o!=t}));var i=this.boxPlannerGrid.getOppositeElement(t);if(i)return[i.getElementId()]}return[]}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,o){var i=[];if(o&&"NO"==(null==o?void 0:o.dpType)&&"BoxPlanner_backside"==o.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(o&&"BoxPlanner_COL"==o.copyType){for(var l=this.boxPlannerGrid.getCellsInGridByElementId(t),r=this.boxPlannerGrid.getAllElementsInColumn(l.startColIndex,l.backside),a=0;a<r.length;a++)i.push(r[a].getElementId());return i}if(i.push(t),o){switch(o.dpType){case"AVL":case"AVR":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var h=this.boxPlannerGrid.getAllElementsInSameCol(t);i=h.elements,h.backside}else{var c=this.boxPlannerGrid.getAllElementsDown(t);i=i.concat(c.elements),c.backside}break;case"AVO":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var u=this.boxPlannerGrid.getAllElementsInSameRowByElementId(t);i=u.elementIds,u.backside}}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(i=i.concat(this.boxPlannerGrid.getOppositeElements(i).map((function(t){return t.ElementId}))))}return Array.from(new Set(i))}},{key:"deletePlannerElement",value:(o=(0,l.Z)(u().mark((function _callee5(t,o,i){var l,r,a,h;return u().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(l=this.boxPlannerGrid.getCellsInGridByElementId(t),r={row:l.startRowIndex,col:l.startColIndex,backside:!1},i&&"BoxPlanner_backside"==i?r={row:0,col:0,backside:!1}:l.startRowIndex>0?r.row--:(r.col=0==l.startColIndex?0:l.startColIndex-1,r.row=this.boxPlannerGrid.getRowCount(r.col,l.backside)-1),this.boxPlannerGrid.deleteElement(t,i),this.constructionRulesHandler.onElemDeleted(t),a=!0,i&&("BoxPlanner_backside"==i?(this.boxPlannerGrid.destroyBacksideModuleGrid(),a=!0):"STD_DONTUPDATE"==i&&(a=!1)),!a){o.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),o.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside)){o.next=13;break}return o.abrupt("return",{newElementToSelect:null===(h=this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside))||void 0===h?void 0:h.getElementId()});case 13:return o.abrupt("return",{});case 14:case"end":return o.stop()}}),_callee5,this)}))),function deletePlannerElement(t,i,l){return o.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos()}},{key:"getNeighborElements",value:function getNeighborElements(t,o){var i=this.boxPlannerGrid.getElementById(t);if(!i)return[];var l=null==i?void 0:i.getDockingDockingPointsByType(o);if(!l)return[];for(var r=[],a=0;a<(null==l?void 0:l.length);a++)null!=l[a]&&r.push(l[a].OnElementId);return r}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,o){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,o){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return C.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new v.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,o,i,l,r,a){return C.error(new d.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,l.Z)(u().mark((function _callee6(t,o){var i,l,r,a,h,c,d,m,g;return u().wrap((function _callee6$(u){for(;;)switch(u.prev=u.next){case 0:if(C.debug("BoxPlanner - configurationHasChanged "+t),!(t&&o&&o.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){u.next=18;break}if(!(o.length>1)){u.next=9;break}return u.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o,!0);case 5:if(!(i=u.sent)){u.next=8;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:i});case 8:case 46:case 47:return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[]});case 9:if(l=this.boxPlannerGrid.getCellsInGridByElementId(o[0]),r=o[0],l.startRowIndex>0&&(r=this.boxPlannerGrid.getPlannerElementAtGridPos(l.startColIndex,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(r)&&this.boxPlannerGrid.getElementHasRightElement(r)){u.next=18;break}return a="NO",this.boxPlannerGrid.getElementHasLeftElement(r)||(a="AVL"),this.boxPlannerGrid.getElementHasRightElement(r)||(a="AVR"),h=this.getPlannerElementsInfluencedByCopy(r,{dpType:a,copyType:"BoxPlanner_COL"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:h,copyDPType:a,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:o});case 18:if(!t||!t.OPTDMOD){u.next=33;break}u.t0=t.OPTDMOD,u.next="OPVD_EIN"===u.t0?22:"OPVD_AUS"===u.t0?26:31;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=25;break}return c=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:c,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 30:return u.abrupt("break",31);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=30;break}if(!((d=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=30;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:d.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t});case 31:case 37:u.next=47;break;case 33:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){u.next=39;break}if(!((m=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=37;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:m.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:o,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 39:return u.next=41,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o);case 41:if(!(g=u.sent)){u.next=46;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:g});case 48:case"end":return u.stop()}}),_callee6,this)}))),function updatePlanner(o,i){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,o,i,l){for(var r={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:i},a=this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos(),h=0;h<a.length;h++){var c=a[h],u=c.ElementId,m=this.set.getPlannerConfigData(u).config,g={ID:"E"+u,N:m.N,Model:m.Model,x:-c.WorldPosCenter.x,y:c.WorldPosCenter.y,z:c.WorldPosCenter.z,PosPivot:"Center",w:c.getRotDeg(),RotPivot:"Center",DP:c.getDockingPointJS3D(),MAT:m.MAT,CFG:m.CFG,H:""},E=(0,d.FB)(JSON.stringify(g));g.H=E,r.ELE.push(g)}E=(0,d.FB)(JSON.stringify(r));return r.H=E,{constructionSet:r}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){C.error(new d.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=o[i],r=this.boxPlannerGrid.getElementById(l);r&&(r.SetPosNr=t+r.PosNr-1,this.set.setPosNr(r.ElementId,r.getPosNr()))}return o.length}},{key:"clonePlanner",value:function clonePlanner(t,o,i){var l=new DivaBoxPlanner(t,o);return l.initPlanner(i),l}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){return this.boxPlannerGrid.getPlannerInteractionInformation()}},{key:"getGeneralPlanningState",value:function getGeneralPlanningState(t){return this.boxPlannerGrid.getGeneralPlanningState(t)}}]);var t,o,i,c,m,g}();(0,h.Z)(B,"plannerType","BOX")}}]);
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignDivaWebPlannerReact=self.webpackChunkCrystaldesignDivaWebPlannerReact||[]).push([[227],{60227:(t,o,i)=>{i.r(o),i.d(o,{default:()=>B});var l=i(84658),r=i(13125),a=i(43860),h=i(80248),c=i(50747),u=i.n(c),d=i(8108),m=i(12952),g=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),E=function(){return(0,a.Z)((function BoxPlannerPartlistHelper(t,o,i,l,a,c,u){(0,r.Z)(this,BoxPlannerPartlistHelper),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"getOptionVal",void 0),(0,h.Z)(this,"setOptionValue",void 0),(0,h.Z)(this,"getElementHasBottomPlate",void 0),(0,h.Z)(this,"getElementIsCornerElement",void 0),(0,h.Z)(this,"getCornerType",void 0),(0,h.Z)(this,"getElementHasTopPlate",void 0),(0,h.Z)(this,"getElementIsGarderobeElement",void 0),this.getOptionVal=t,this.getElementHasBottomPlate=i,this.setOptionValue=o,this.getElementIsCornerElement=l,this.getCornerType=a,this.getElementHasTopPlate=c,this.getElementIsGarderobeElement=u}),[{key:"setConstructionRules",value:function setConstructionRules(t){this.constructionRules=t}},{key:"getGroundPlatesNumOfRightNeighbors",value:function getGroundPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasBottomPlate(t,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasBottomPlate(r,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasBottomPlate(h,i)&&l++,this.getElementHasBottomPlate(c,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasBottomPlate(m,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getGroundPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getTopPlatesNumOfRightNeighbors",value:function getTopPlatesNumOfRightNeighbors(t,o,i){if(o.getForceSingleCellPerElement()){var l=0;if(this.getElementHasTopPlate(t,o,i)&&l++,o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());if(this.getElementHasTopPlate(r,o,i)&&l++,o.getElementHasRightElement(t.getElementId())){var a=o.getRightElements(t.getElementId());if(a.length>0){var h=a[0],c=o.getOppositeElement(h.getElementId());this.getElementHasTopPlate(h,o,i)&&l++,this.getElementHasTopPlate(c,o,i)&&l++}return l}return l}if(o.getElementHasRightElement(t.getElementId())){var u=o.getRightElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)&&l++}return l}return l}g.error(new d.GE("BoxPlannerError - function getTopPlatesNumOfRightNeighbors not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"getElementHeight",value:function getElementHeight(t,o){var i=this.getOptionVal(t.getElementId(),"OPTHOEHE",o);return"OPVH_6"==i?"6":"OPVH_11"==i?"11":"OPVH_18"==i?"18":"37"}},{key:"getElementDepth",value:function getElementDepth(t,o){var i=this.getOptionVal(t.getElementId(),"OPTTIEFE",o);return"OPVTIEFE_18"==i?"18":"37"}},{key:"getElementRahmenColor",value:function getElementRahmenColor(t,o){var i=this.getOptionVal(t.getElementId(),"OPTFARBE_RAHMEN",o);return"OPVCHROM"==i?"CHROM":"OPVSCHWARZ_MATT"==i?"BLACK":"CHROM"}},{key:"calculateRahmen",value:function calculateRahmen(t,o){for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.constructionRules.VarticalRahmenInfo&&(this.correctRahmenVerticalLeftFront(i[l],t,o),this.correctRahmenVerticalLeftBack(i[l],t,o),this.correctRahmenVerticalRightFront(i[l],t,o),this.correctRahmenVerticalRightBack(i[l],t,o),g.debug("---------Correct Senkrechte Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Senkrechter Rahmen links vorne: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_V",o)),g.debug("Senkrechter Rahmen links hinten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_H",o)),g.debug("Senkrechter Rahmen rechts vorne : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_V",o)),g.debug("Senkrechter Rahmen rechts hinten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_H",o))),this.constructionRules.DepthRahmenInfo&&(this.correctRahmenDepthLeftBottom(i[l],t,o),this.correctRahmenDepthLeftTop(i[l],t,o),this.correctRahmenDepthRightBottom(i[l],t,o),this.correctRahmenDepthRightTop(i[l],t,o),g.debug("---------Correct Tiefenverbinder Rahmen for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Tiefen Rahmen links unten: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_U",o)),g.debug("Tiefen Rahmen links oben: "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_L_O",o)),g.debug("Tiefen Rahmen rechts unten : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_U",o)),g.debug("Tiefen Rahmen rechts oben : "+this.getOptionVal(i[l].ElementId,"OPTRAHMEN_R_O",o)))}},{key:"correctRahmenDepthLeftBottom",value:function correctRahmenDepthLeftBottom(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId()))&&!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthLeftTop",value:function correctRahmenDepthLeftTop(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(this.getElementHasTopPlate(t,o,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_LeftTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}},{key:"correctRahmenDepthRightBottom",value:function correctRahmenDepthRightBottom(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId()))if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(l){var r=o.getRightElements(t.getElementId());if(r.length>0){var a=r[0];if(!this.getElementHasBottomPlate(t,i)||this.getElementIsCornerElement(t,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else if(!this.getElementHasBottomPlate(a,i)||this.getElementIsCornerElement(a,i))switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i)}}else if(this.getElementHasBottomPlate(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);else switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}break;case"BLACK":l?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightBottom,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightBottom not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenDepthRightTop",value:function correctRahmenDepthRightTop(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(!this.getElementHasTopPlate(t,o,i)||this.getElementIsCornerElement(t,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}if(!r)return void this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_chrom,i);var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];if(!this.getElementHasTopPlate(h,o,i)||this.getElementIsCornerElement(h,i)){switch(this.getElementDepth(t,i)){case"18":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_18_chrom,i);break;case"37":this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenBV_37_chrom,i)}return}}this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_chrom,i);break;case"BLACK":r?this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Middle_black,i):this.setOptionValue(t.getElementId(),this.constructionRules.DepthRahmenInfo.rahmenOPT_RightTop,this.constructionRules.DepthRahmenInfo.rahmenOPVs.rahmenTV_Border_black,i)}}else g.error(new d.GE("BoxPlannerError - function correctRahmenDepthRightTop not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalLeftFront",value:function correctRahmenVerticalLeftFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),!(o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalLeftBack",value:function correctRahmenVerticalLeftBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l&&!(l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId())))switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(o.getPlannerHasActiveBackside()){var r=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_LeftBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}},{key:"correctRahmenVerticalRightFront",value:function correctRahmenVerticalRightFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(a.length>0){var h=a[0];this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightFront,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctRahmenVerticalRightBack",value:function correctRahmenVerticalRightBack(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.noRahmen,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());switch(this.getElementHeight(t,i)){case"6":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH6,i);break;case"11":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH11,i);break;case"18":switch(this.getElementRahmenColor(t,i)){case"CHROM":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_black,i)}break;case"37":if(this.getElementIsGarderobeElement(t,i))this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i);else switch(this.getElementRahmenColor(t,i)){case"CHROM":if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId());if(0==a.length)return;if(a.length>0){var h=a[0];if(o.getPlannerHasActiveBackside()){var c=o.getOppositeElement(t.getElementId());if(!c)return;var u=o.getOppositeElement(h.getElementId());if(!u)return;this.getElementIsGarderobeElement(h,i)||this.getElementIsGarderobeElement(c,i)||this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH18_Garderobe,i):this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_chrom,i);break;case"BLACK":this.setOptionValue(t.getElementId(),this.constructionRules.VarticalRahmenInfo.rahmenOPT_RightBack,this.constructionRules.VarticalRahmenInfo.rahmenOPVs.rahmenH37_black,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctRahmenVerticalRightBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"calculateKnots",value:function calculateKnots(t,o){if(this.constructionRules.hasKNOTS)for(var i=t.getAllElementsInGridSortedbyGridPos(),l=0;l<i.length;l++)this.correctKnotLeftTopFront(i[l],t,o),this.correctKnotLeftTopBack(i[l],t,o),this.correctKnotLeftBottomFront(i[l],t,o),this.correctKnotLeftBottomBack(i[l],t,o),this.correctKnotRightTopFront(i[l],t,o),this.correctKnotRightTopBack(i[l],t,o),this.correctKnotRightBottomFront(i[l],t,o),this.correctKnotRightBottomBack(i[l],t,o),this.correctKnotRightMiddleBack(i[l],t,o),this.correctKnotLeftMiddleBack(i[l],t,o),g.debug("---------Correct Knots for element with ID: "+i[l].ElementId+"; posNr: "+i[l].PosNr+" ----------"),g.debug("Links oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTF",o)),g.debug("Links oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LTB",o)),g.debug("Links unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBF",o)),g.debug("Links unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LBB",o)),g.debug("Rechts oben vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTF",o)),g.debug("Rechts oben hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RTB",o)),g.debug("Rechts unten vorne : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBF",o)),g.debug("Links mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_LMB",o)),g.debug("Rechts mitte hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RMB",o)),g.debug("Rechts unten hinten : "+this.getOptionVal(i[l].ElementId,"OPTKNOTEN_RBB",o))}},{key:"correctKnotLeftBottomFront",value:function correctKnotLeftBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&(l||(o.getPlannerHasActiveBackside()&&this.getElementHasBottomPlate(t,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i))){var r=o.getLeftElements(t.getElementId());if(r.length>0){var a=r[0];if(this.getElementIsCornerElement(a,i))return;var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasBottomPlate(c,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopFront",value:function correctKnotLeftTopFront(t,o,i){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i),o.getForceSingleCellPerElement()){var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(l||(o.getPlannerHasActiveBackside()&&this.getElementHasTopPlate(t,o,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i),this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i)),this.getElementIsCornerElement(t,i)){var r=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var a=o.getElementHasRightElement(t.getElementId());if(r||a){if(a&&!r){var h=o.getRightElements(t.getElementId());if(h.length>0){var c=h[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else if(!a&&r){var u=o.getLeftElements(t.getElementId());if(u.length>0){var m=u[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3erer_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(a&&r){var E=o.getLeftElements(t.getElementId())[0],I=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(E,o,i)?this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.getElementHasTopPlate(I,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftBottomBack",value:function correctKnotLeftBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasBottomPlate(t,i)?this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasBottomPlate(r,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasBottomPlate(t,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsCornerElement(a,i))return;switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasBottomPlate(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":var h=o.getRightElements(t.getElementId())[0];this.getElementHasBottomPlate(a,i)?this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftTopBack",value:function correctKnotLeftTopBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(!l)if(o.getPlannerHasActiveBackside()&&!o.getCellsInGridByElementId(t.getElementId()).backside){var r=o.getOppositeElement(t.getElementId());r&&(this.getElementHasTopPlate(t,o,i)?this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.getElementHasTopPlate(r,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else o.getPlannerHasActiveBackside()||this.getElementHasTopPlate(t,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var a=o.getElementHasLeftElement(t.getElementId());if(l&&this.getElementIsCornerElement(o.getLeftElements(t.getElementId())[0],i))return;var h=o.getElementHasRightElement(t.getElementId());if(a||h){if(h&&!a){var c=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(c,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(!h&&a){var u=o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(h&&a){var m=o.getLeftElements(t.getElementId())[0],E=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.getElementHasTopPlate(m,o,i)?this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftTopBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightMiddleBack",value:function correctKnotRightMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)&&!o.getCellsInGridByElementId(t.getElementId()).backside)if(o.getElementHasRightElement(t.getElementId()))if(o.getPlannerHasActiveBackside()){var l=o.getOppositeElement(t.getElementId());if(!l)return;var r=o.getRightElements(t.getElementId());if(0==r.length)return;var a=r[0],h=o.getOppositeElement(a.getElementId());if(!h)return;this.getElementIsGarderobeElement(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(l,i)?this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.getElementIsGarderobeElement(a,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else{var c=o.getRightElements(t.getElementId());if(0==c.length)return;var u=c[0];this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else if(o.getPlannerHasActiveBackside()){var m=o.getOppositeElement(t.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else g.error(new d.GE("BoxPlannerError - function correctKnotRightMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotLeftMiddleBack",value:function correctKnotLeftMiddleBack(t,o,i){if(o.getForceSingleCellPerElement()){if(this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i),this.getElementIsGarderobeElement(t,i)){var l=o.getCellsInGridByElementId(t.getElementId()).backside;if(!l){var r=l?o.getElementHasRightElement(t.getElementId()):o.getElementHasLeftElement(t.getElementId());if(r){var a=o.getLeftElements(t.getElementId())[0];if(this.getElementIsGarderobeElement(a,i))return}if(r)if(o.getPlannerHasActiveBackside()){var h=o.getLeftElements(t.getElementId());if(0==h.length)return;var c=h[0],u=o.getOppositeElement(t.getElementId());if(!u)return;var m=o.getOppositeElement(null==c?void 0:c.getElementId());if(!m)return;this.getElementIsGarderobeElement(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.getElementIsGarderobeElement(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);else if(o.getPlannerHasActiveBackside()){var E=o.getOppositeElement(t.getElementId());this.getElementIsGarderobeElement(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_LeftMiddleBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotLeftMiddleBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomFront",value:function correctKnotRightBottomFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())){if(o.getPlannerHasActiveBackside())if(this.getElementHasBottomPlate(t,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasBottomPlate(t,i)){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&!this.getElementHasBottomPlate(E,i)&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),p=void 0;I.length>0&&(p=I[0]),p&&!this.getElementIsCornerElement(p,i)&&(this.getElementHasBottomPlate(p,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":var O=o.getRightElements(t.getElementId())[0];if(O&&this.getElementIsCornerElement(O,i))if(o.getElementHasRightElement(O.getElementId())){var R=o.getRightElements(O.getElementId())[0];this.getElementHasBottomPlate(R,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else O&&this.getElementHasBottomPlate(O,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopFront",value:function correctKnotRightTopFront(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(o.getPlannerHasActiveBackside())if(this.getElementHasTopPlate(t,o,i))if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&(this.getElementHasTopPlate(u,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);else if(this.getElementHasTopPlate(t,o,i)){if(r){var m=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),E=void 0;m.length>0&&(E=m[0]),E&&(this.getElementHasTopPlate(E,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i))}}else if(r){var I=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),p=void 0;I.length>0&&(p=I[0]),p&&!this.getElementIsCornerElement(p,i)&&(this.getElementHasTopPlate(p,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot1er,i);if(this.getElementIsCornerElement(t,i)){var O=o.getElementHasLeftElement(t.getElementId()),R=o.getElementHasRightElement(t.getElementId());if(O||R){if(R&&!O){var k=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(k,i))if(o.getElementHasRightElement(k.getElementId())){var P=o.getRightElements(k.getElementId())[0];this.getElementHasTopPlate(P,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(k,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!R&&O){o.getLeftElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(R&&O){var T=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":if(this.getElementIsCornerElement(T,i))if(o.getElementHasRightElement(T.getElementId())){var V=o.getRightElements(T.getElementId())[0];this.getElementHasTopPlate(V,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(T,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case"OUTSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopFront,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightTopFront not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightBottomBack",value:function correctKnotRightBottomBack(t,o,i){if(o.getForceSingleCellPerElement()){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getElementHasBottomElement(t.getElementId())&&!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())switch(this.getGroundPlatesNumOfRightNeighbors(t,o,i)){case 0:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:r?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);break;case 3:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:r&&this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else if(this.getElementHasBottomPlate(t,i)){if(r){var a=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),h=void 0;a.length>0&&(h=a[0]),h&&(this.getElementHasBottomPlate(h,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i))}}else if(r){var c=l?o.getLeftElements(t.getElementId()):o.getRightElements(t.getElementId()),u=void 0;c.length>0&&(u=c[0]),u&&!this.getElementIsCornerElement(u,i)&&(this.getElementHasBottomPlate(u,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i))switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":var m=o.getRightElements(t.getElementId())[0];if(this.getElementIsCornerElement(m,i)){var E=o.getRightElements(m.getElementId())[0];this.getElementHasBottomPlate(E,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.getElementHasBottomPlate(m,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightBottomBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else g.error(new d.GE("BoxPlannerError - function correctKnotRightBottomBack not supported for complex boxPlaner",{code:"WC_0012"}))}},{key:"correctKnotRightTopBack",value:function correctKnotRightTopBack(t,o,i){this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.noKnot,i);var l=o.getCellsInGridByElementId(t.getElementId()).backside,r=l?o.getElementHasLeftElement(t.getElementId()):o.getElementHasRightElement(t.getElementId());if(!o.getCellsInGridByElementId(t.getElementId()).backside){if(o.getPlannerHasActiveBackside())if(r)switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_2GT,i);break;case 3:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i);break;case 4:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_4GT,i)}else switch(this.getTopPlatesNumOfRightNeighbors(t,o,i)){case 0:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i);break;case 1:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i);break;case 2:this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else if(this.getElementHasTopPlate(t,o,i)){if(r){var a=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];this.getElementIsCornerElement(a,i)||this.getElementHasTopPlate(a,o,i)||this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i)}}else if(r){var h=l?o.getLeftElements(t.getElementId())[0]:o.getRightElements(t.getElementId())[0];h&&!this.getElementIsCornerElement(h,i)&&(this.getElementHasTopPlate(h,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_1GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_0GT,i))}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_0GT,i);if(this.getElementIsCornerElement(t,i)){var c=o.getElementHasLeftElement(t.getElementId()),u=o.getElementHasRightElement(t.getElementId());if(c||u){if(u&&!c){var d=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(d,i))if(o.getElementHasRightElement(d.getElementId())){var m=o.getRightElements(d.getElementId())[0];this.getElementHasTopPlate(m,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(d,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}else if(!u&&c)this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);else if(u&&c){var g=o.getRightElements(t.getElementId())[0];switch(this.getCornerType(t,i)){case"INSIDE":this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i);break;case"OUTSIDE":if(this.getElementIsCornerElement(g,i))if(o.getElementHasRightElement(g.getElementId())){var E=o.getRightElements(g.getElementId())[0];this.getElementHasTopPlate(E,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot4er_3GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i)}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i);else this.getElementHasTopPlate(g,o,i)?this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot3er_2GT,i):this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}else this.setOptionValue(t.getElementId(),this.constructionRules.knotInfo.knotOPT_RightTopBack,this.constructionRules.knotInfo.knotOPVs.knot2er_1GT,i)}}}}])}(),I=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),p=function(){return(0,a.Z)((function ConstructionRulesHandler(t,o,i){var l=this;(0,r.Z)(this,ConstructionRulesHandler),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"checkArticleHasOption",void 0),(0,h.Z)(this,"updateCfgValuesByPlanner",void 0),(0,h.Z)(this,"constructionRules",void 0),(0,h.Z)(this,"constructionRulesLoaded",void 0),(0,h.Z)(this,"hideOptionsForConstruction",void 0),(0,h.Z)(this,"partlistHelper",void 0),(0,h.Z)(this,"getOptionVal",(function(t,o,i){if(i.has(t)&&i.get(t).has(o)){var r=i.get(t).get(o);return null!=r?r:""}var a=l.getValueOfOptionOfArticle(t,o);return null!=a?a:""})),(0,h.Z)(this,"hasOptionValue",(function(t,o,i){return!(!i.has(t)||!i.get(t).has(o))||!!l.getValueOfOptionOfArticle(t,o)})),(0,h.Z)(this,"setOptionValue",(function(t,o,i,r){var a;if(r.has(t)||r.set(t,new Map),null===(a=r.get(t))||void 0===a||a.set(o,i),l.hideOptionsForConstruction.has(t)){var h=l.hideOptionsForConstruction.get(t).indexOf(o);h>=0&&l.hideOptionsForConstruction.get(t).splice(h,1)}})),(0,h.Z)(this,"getElementHasBottomPlate",(function(t,o){if(l.constructionRules.knotInfo.elementsWithGroundPlate)for(var i=0;i<l.constructionRules.knotInfo.elementsWithGroundPlate.length;i++){var r=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPT,a=l.constructionRules.knotInfo.elementsWithGroundPlate[i].onOPVs,h=l.getOptionVal(t.getElementId(),r,o);return l.arrayContainsValue(a,h)}return!1})),(0,h.Z)(this,"getElementIsCornerElement",(function(t,o){return l.constructionRules.hasCORNER&&l.arrayContainsValue(l.constructionRules.knotInfo.cornerElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.cornerElements.onOPT,o))})),(0,h.Z)(this,"getElementIsGarderobeElement",(function(t,o){return l.constructionRules.hasGARDEROBE&&l.arrayContainsValue(l.constructionRules.knotInfo.garderobeElements.onOPVs,l.getOptionVal(t.getElementId(),l.constructionRules.knotInfo.garderobeElements.onOPT,o))})),(0,h.Z)(this,"getCornerType",(function(t,o){return"OPVECK_I"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"INSIDE":"OPVECK_A"==l.getOptionVal(t.getElementId(),"OPTELEMENT",o)?"OUTSIDE":"NOCORNER"})),(0,h.Z)(this,"getElementHasTopPlate",(function(t,o,i){if(o.getElementHasTopElement(t.getElementId())){for(var r=o.getTopElements(t.getElementId()),a=!1,h=0;h<r.length;h++)l.getElementHasBottomPlate(r[h],i)&&(a=!0);return a}return!0})),this.constructionRulesLoaded=!1,this.getValueOfOptionOfArticle=t,this.checkArticleHasOption=o,this.hideOptionsForConstruction=new Map,this.updateCfgValuesByPlanner=i,this.partlistHelper=new E(this.getOptionVal,this.setOptionValue,this.getElementHasBottomPlate,this.getElementIsCornerElement,this.getCornerType,this.getElementHasTopPlate,this.getElementIsGarderobeElement)}),[{key:"arrayContainsValue",value:function arrayContainsValue(t,o){if(Array.isArray(t)){for(var i=0;i<t.length;i++)if(t[i]==o)return!0;return!1}var l=t.split(";");for(i=0;i<l.length;i++)if(l[i]==o)return!0;return!1}},{key:"evalRule",value:function evalRule(t,o,i){for(var l=!0,r=o.split("&"),a=0;a<r.length;a++){var h=r[a].split("=")[0],c=r[a].split("=")[1],u=this.getOptionVal(t,h,i);u&&u!=c&&(l=!1)}return l}},{key:"setOptionDoShow",value:function setOptionDoShow(t,o,i){var l=this.constructionRules.optionsVisibilityInfo[o];if(l){var r;if(null!=l.doShow)i.has(t)||i.set(t,new Map),null===(r=i.get(t))||void 0===r||r.set(o,l.doShow);if(this.hideOptionsForConstruction.has(t)){var a,h=this.hideOptionsForConstruction.get(t).indexOf(o);if(h>=0)null===(a=this.hideOptionsForConstruction.get(t))||void 0===a||a.splice(h,1)}}}},{key:"setOptionDoHide",value:function setOptionDoHide(t,o,i){var l,r,a=this.constructionRules.optionsVisibilityInfo[o];a&&(i.has(t)||i.set(t,new Map),null===(l=i.get(t))||void 0===l||l.set(o,a.doHide),this.hideOptionsForConstruction.has(t)||this.hideOptionsForConstruction.set(t,[]),null===(r=this.hideOptionsForConstruction.get(t))||void 0===r||r.push(o))}},{key:"getCurOptionBasedConstructionRules",value:function getCurOptionBasedConstructionRules(t,o){for(var i=[],l=0;l<this.constructionRules.optionBasedConstructionRules.length;l++){var r=this.constructionRules.optionBasedConstructionRules[l];this.getOptionVal(t,r.masterOptionName,o)==r.masterOptionValue&&i.push(r)}return i}},{key:"setAllOptToDefault",value:function setAllOptToDefault(t,o,i,l){for(var r=[],a=void 0,h=0;h<this.constructionRules.optionsInfluenceRulesOfAllElements.length;h++){var c=this.constructionRules.optionsInfluenceRulesOfAllElements[h];for(var u in i)u==c.onOPT&&this.arrayContainsValue(c.onOPVs,i[u])&&r.push({opt:c.influenceOPT,opv:c.forceOPV,unvalidOPVs:c.unvalidOPVs,warning:c.warning,doShowWarning:!1})}for(var d=t.getAllElementIdsInGrid(),m=0;m<d.length;m++){var g;if(this.hideOptionsForConstruction.has(d[m])&&this.hideOptionsForConstruction.get(d[m]).length>0){for(;this.hideOptionsForConstruction.get(d[m]).length>0;){var E=this.hideOptionsForConstruction.get(d[m])[0];this.setOptionDoShow(d[m],E,o)}this.hideOptionsForConstruction.delete(d[m])}this.constructionRules.hasDMOD&&(t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTDMOD",o):this.setOptionDoHide(d[m],"OPTDMOD",o));var I=t.getColumnCount();I>1?this.setOptionDoShow(d[m],"OPTMULTICOL",o):this.setOptionDoHide(d[m],"OPTMULTICOL",o),this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o),this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o);var p=t.getCellsInGridByElementId(d[m]);if(p.backside)this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVJA",o);else{if(this.setOptionValue(d[m],"OPTELEM_ON_BACK","OPVNEIN",o),p.startColIndex>0){var O=t.getPlannerElementAtGridPos(p.startColIndex-1,0,!1);if(O){var R=this.getOptionVal(O.getElementId(),"OPTELEMENT",o);"OPVECK_I"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_I",o):"OPVECK_A"==R?this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_L","OPVOHNE",o)}}if(p.endColIndex<I-1){var k=t.getPlannerElementAtGridPos(p.endColIndex+1,0,!1);if(k){var P=this.getOptionVal(k.getElementId(),"OPTELEMENT",o);"OPVECK_I"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_I",o):"OPVECK_A"==P?this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVECK_A",o):this.setOptionValue(d[m],"OPTCORNER_COL_R","OPVOHNE",o)}}}if(this.constructionRules.avoidOptionLastCol){var T=this.getOptionVal(d[m],this.constructionRules.avoidOptionLastCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionLastCol.onOPVs,T)&&p.endColIndex==I-1&&this.setOptionValue(d[m],this.constructionRules.avoidOptionLastCol.onOPT,this.constructionRules.avoidOptionLastCol.defaultOpv,o)}if(this.constructionRules.avoidOptionFirstCol){var V=this.getOptionVal(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,o);this.arrayContainsValue(this.constructionRules.avoidOptionFirstCol.onOPVs,V)&&0==p.startColIndex&&this.setOptionValue(d[m],this.constructionRules.avoidOptionFirstCol.onOPT,this.constructionRules.avoidOptionFirstCol.defaultOpv,o)}var v=this.hasOptionValue(d[m],"OPTWW",o);if(t.getElementIsFirstInGrid(d[m])?(this.setOptionDoShow(d[m],"OPTWERKZEUGKASTEN",o),v&&(t.getSizeOfWholeSet(!0).y>173&&!t.getPlannerHasActiveBackside()?this.setOptionDoShow(d[m],"OPTWW",o):this.setOptionDoHide(d[m],"OPTWW",o))):(this.setOptionDoHide(d[m],"OPTWERKZEUGKASTEN",o),v&&this.setOptionDoHide(d[m],"OPTWW",o)),o.has(d[m])||o.set(d[m],new Map),null===(g=o.get(d[m]))||void 0===g||g.set("DEBUG",t.getElementById(d[m]).getPosNr()+""),r.length>0)for(var C=0;C<r.length;C++){var B=this.getOptionVal(d[m],r[C].opt,o),_=!1;if(r[C].unvalidOPVs&&0!=r[C].unvalidOPVs.length){for(var x=r[C].unvalidOPVs.split(";"),G=0;G<x.length;G++)if(x[G]==B){_=!0;break}}else _=!0;_&&(B!=r[C].opv&&(this.setOptionValue(d[m],r[C].opt,r[C].opv,o),r[C].doShowWarning||(r[C].doShowWarning=!0,a=r[C].warning)))}if(i)for(var u in i)if(""!=u&&i[u]&&""!=i[u])for(h=0;h<this.constructionRules.optionsInfluenceRulesOfSingleElement.length;h++){c=this.constructionRules.optionsInfluenceRulesOfSingleElement[h];var b=!1;if(c.dir&&l&&l.length>0){if("TOP"==c.dir&&t.getElementHasBottomElement(d[m]))for(var H=t.getBottomElements(d[m]),y=0;y<H.length;y++)l.indexOf(H[y].getElementId())>=0&&(b=!0);if("DOWN"==c.dir&&t.getElementHasTopElement(d[m]))for(var L=t.getTopElements(d[m]),D=0;D<L.length;D++)l.indexOf(L[D].getElementId())>=0&&(b=!0);if("LEFT_RIGHT"==c.dir){if(t.getElementHasLeftElement(d[m]))for(var A=t.getLeftElements(d[m]),w=0;w<A.length;w++)l.indexOf(A[w].getElementId())>=0&&(b=!0);if(t.getElementHasRightElement(d[m]))for(var S=t.getRightElements(d[m]),N=0;N<S.length;N++)l.indexOf(S[N].getElementId())>=0&&(b=!0)}if("COL"==c.dir){var M=t.getCellsInGridByElementId(d[m]);t.getAllElementsInColumn(M.startColIndex,M.backside).forEach((function(t){return l.indexOf(t.ElementId)>=0?b=!0:void 0}))}if("BACK"==c.dir&&t.getPlannerHasActiveBackside()){var W=t.getOppositeElement(d[m]);W&&l.indexOf(W.getElementId())>=0&&(b=!0)}}else b=!0;if(b){B=this.getOptionVal(d[m],c.influenceOPT,o);u==c.onOPT&&B&&""!=B&&this.arrayContainsValue(c.unvalidOPVs,B)&&this.arrayContainsValue(c.onOPVs,i[u])&&(this.setOptionValue(d[m],c.influenceOPT,c.defaultOpv,o),c.warning&&(a=c.warning))}}var K=this.getCurOptionBasedConstructionRules(d[m],o);if(K)for(var Z=0;Z<K.length;Z++)if(K[Z].defaultOptions)for(var z=0;z<K[Z].defaultOptions.length;z++){var U=K[Z].defaultOptions[z];if(!U.rule||""==U.rule||this.evalRule(d[m],U.rule,o))for(var X=0;X<U.options.length;X++)"doShow"==U.value?this.setOptionDoShow(d[m],U.options[X],o):"doHide"==U.value&&this.setOptionDoHide(d[m],U.options[X],o),U.opv&&this.setOptionValue(d[m],U.options[X],U.opv,o)}this.setOptionValue(d[m],"OPTFAF_L_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_L_H","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_V","OPVOHNE_FAF",o),this.setOptionValue(d[m],"OPTFAF_R_H","OPVOHNE_FAF",o)}return a}},{key:"doCorrectAffectedElementsByOption",value:function doCorrectAffectedElementsByOption(t,o,i,l){if(null!=l&&1==l.length){var r=l[0];if(null!=i)for(var a in i){if(this.constructionRules.forceSameOptionInGrid&&this.arrayContainsValue(this.constructionRules.forceSameOptionInGrid,a)){var h=t.getCellsInGridByElementId(r).backside?t.getAllElementsInBackGrid():t.getAllElementsInFrontGrid();if(null!=h)for(var c=0;c<h.length;c++)this.setOptionValue(h[c].ElementId,a,i[a],o)}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInCol,a)){var u=t.getCellsInGridByElementId(r),d=t.getAllElementsInColumn(u.startColIndex,u.backside);if(null!=d){if(t.getPlannerHasActiveBackside()){var m,g=t.getAllElementsInColumn(u.startColIndex,!u.backside);g&&(d=null===(m=d)||void 0===m?void 0:m.concat(g))}for(c=0;c<d.length;c++)this.setOptionValue(d[c].ElementId,a,i[a],o)}}if(this.arrayContainsValue(this.constructionRules.forceSameOptionInRow,a)){var E=t.getCellsInGridByElementId(r),I=t.getAllElementsInRow(E.startRowIndex,E.backside);if(I&&t.getPlannerHasActiveBackside()){var p=t.getAllElementsInRow(E.startRowIndex,!E.backside);p&&(I=I.concat(p))}for(c=0;c<I.length;c++)this.setOptionValue(I[c].ElementId,a,i[a],o)}}var O=t.getCellsInGridByElementId(r),R=t.getAllElementsInRow(O.startRowIndex,O.backside);for(c=0;c<R.length;c++)if(R[c].getElementId()!=r)for(var k=0;k<this.constructionRules.forceSameOptionInRow.length;k++){var P=this.getOptionVal(R[c].getElementId(),this.constructionRules.forceSameOptionInRow[k],o);this.setOptionValue(r,this.constructionRules.forceSameOptionInRow[k],P,o);break}}}},{key:"handleVisibility_SHOW_HIDE",value:function handleVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.get(t).indexOf(i.OPTCurrentElem)>=0;this.setOptionDoHide(o,i.OPTNeighborElem,l),r||this.setOptionDoShow(t,i.OPTCurrentElem,l)}}},{key:"handleBacksideVisibility_SHOW_HIDE",value:function handleBacksideVisibility_SHOW_HIDE(t,o,i,l){if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem],a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem];r&&a&&this.getOptionVal(t,i.OPTCurrentElem,l)==r.doShow&&this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow&&this.setOptionDoHide(t,i.OPTCurrentElem,l)}}},{key:"handleVisibiliy_HIDE_HIDE",value:function handleVisibiliy_HIDE_HIDE(t,o,i,l){var r=this.constructionRules.optionsVisibilityInfo[i.OPTCurrentElem];if(this.checkArticleHasOption(t,i.OPTCurrentElem)&&this.checkArticleHasOption(o,i.OPTNeighborElem)){var a=this.constructionRules.optionsVisibilityInfo[i.OPTNeighborElem],h=r.doShow==this.getOptionVal(t,i.OPTCurrentElem,l),c=this.getOptionVal(o,i.OPTNeighborElem,l)==a.doShow;h&&c&&(this.setOptionDoHide(t,i.OPTCurrentElem,l),this.setOptionDoHide(o,i.OPTNeighborElem,l))}}},{key:"correctSimpleOpt",value:function correctSimpleOpt(t,o,i,l,r){var a=i.getPlannerElementAtGridPos(t,o,r);if(this.constructionRules.defaultConstructionRules.TOP){var h=void 0;if(i.getElementHasTopElement(a.ElementId)){h=i.getPlannerElementAtGridPos(t,o+1,r);for(var c=0;c<this.constructionRules.defaultConstructionRules.TOP.length;c++){var u=this.constructionRules.defaultConstructionRules.TOP[c];"SHOW_HIDE"==u.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,h.ElementId,u,l):"HIDE_HIDE"==u.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,h.ElementId,u,l)}}}if(this.constructionRules.defaultConstructionRules.RIGHT){var m=void 0;if(r?i.getElementHasLeftElement(a.ElementId):i.getElementHasRightElement(a.ElementId)){m=r?i.getPlannerElementAtGridPos(t-1,o,r):i.getPlannerElementAtGridPos(t+1,o,r);for(c=0;c<this.constructionRules.defaultConstructionRules.RIGHT.length;c++){var g=this.constructionRules.defaultConstructionRules.RIGHT[c];"SHOW_HIDE"==g.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,m.ElementId,g,l):"HIDE_HIDE"==g.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,m.ElementId,g,l)}}}if(this.constructionRules.defaultConstructionRules.DOWN){var E=void 0;if(o>0){E=i.getPlannerElementAtGridPos(t,o-1,r);for(c=0;c<this.constructionRules.defaultConstructionRules.DOWN.length;c++){var p=this.constructionRules.defaultConstructionRules.DOWN[c];"SHOW_HIDE"==p.OPTValueRule?this.handleVisibility_SHOW_HIDE(a.ElementId,E.ElementId,p,l):"HIDE_HIDE"==p.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(a.ElementId,E.ElementId,p,l)}}}var O=r?i.getLeftElements(a.ElementId):i.getRightElements(a.ElementId),R=r?i.getRightElements(a.ElementId):i.getLeftElements(a.ElementId),k=i.getTopElements(a.ElementId),P=i.getBottomElements(a.ElementId),T=r?i.getTopLeftElement(a.ElementId):i.getTopRightElement(a.ElementId);O.length>0?O.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_RECHTS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_RECHTS",this.getOptionVal(O[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_RECHTS",l),R.length>0?R.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_LINKS allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_LINKS",this.getOptionVal(R[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_LINKS",l),k.length>0?k.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_OBEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN",this.getOptionVal(k[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN",l),T?this.setOptionValue(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",this.getOptionVal(T.ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_OBEN_RECHTS",l),this.constructionRules.hasNeighbors&&this.constructionRules.hasNeighbors.indexOf("OPTNACHBAR_UNTEN")>=0&&(P.length>0?P.length>1?I.error(new d.GE("BoxPlannerError - only one OPTNACHBAR_UNTEN allowed",{code:"WC_0012"})):this.setOptionValue(a.ElementId,"OPTNACHBAR_UNTEN",this.getOptionVal(P[0].ElementId,"OPTELEMENT",l),l):this.setOptionDoHide(a.ElementId,"OPTNACHBAR_UNTEN",l))}},{key:"correctBack",value:function correctBack(t,o,i){if(this.constructionRules.hasDMOD)if(t.getPlannerHasActiveBackside()){var l=void 0;if(l=t.getOppositeElement(i),this.constructionRules.defaultConstructionRules.BACK)for(var r=0;r<this.constructionRules.defaultConstructionRules.BACK.length;r++){var a,h,c=this.constructionRules.defaultConstructionRules.BACK[r],u=!1;if(c.hideOnElemAndOppositeOPT&&c.hideOnElemAndOppositeOPV)this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(i,c.hideOnElemAndOppositeOPT,o))&&this.arrayContainsValue(c.hideOnElemAndOppositeOPV,this.getOptionVal(null===(a=l)||void 0===a?void 0:a.getElementId(),c.hideOnElemAndOppositeOPT,o))&&(u=!0);if(u)this.setOptionDoHide(i,c.OPTCurrentElem,o),this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o);else if("FORCE_HIDE"==c.OPTValueRule&&this.setOptionDoHide(l.getElementId(),c.OPTCurrentElem,o),"SHOW_HIDE"==c.OPTValueRule)this.handleBacksideVisibility_SHOW_HIDE(null===(h=l)||void 0===h?void 0:h.getElementId(),i,c,o);else"HIDE_HIDE"==c.OPTValueRule&&this.handleVisibiliy_HIDE_HIDE(l.ElementId,i,c,o)}this.getElementHasBottomPlate(l,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_U_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.getElementHasTopPlate(l,t,o)?this.setOptionDoShow(i,"OPTOPP_RAHMEN_O_V",o):this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}else this.setOptionDoHide(i,"OPTOPP_RAHMEN_U_V",o),this.setOptionDoHide(i,"OPTOPP_RAHMEN_O_V",o)}},{key:"correctBottom",value:function correctBottom(t,o,i){var l="";if(this.constructionRules.correctLeftRight&&null!=this.constructionRules.correctLeftRight.rowIndex)for(var r=t.getAllElementsInRow(this.constructionRules.correctLeftRight.rowIndex,i),a=0;a<r.length;a++){var h=r[a];if(0==a){if(null==(l=this.getOptionVal(h.ElementId,this.constructionRules.correctLeftRight.optWithOptVal,o)))return;i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeftBack,l,o))}i?this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optLeft,l,o):(this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRight,l,o),this.setOptionValue(h.ElementId,this.constructionRules.correctLeftRight.optRightBack,l,o))}}},{key:"getValidLadder",value:function getValidLadder(t,o,i){for(var l=o.getAllElementsInColumn(t,!1),r=0;r<this.constructionRules.correctLadder.validLadder.length;r++){var a=this.constructionRules.correctLadder.validLadder[r];if(l.length==a.colCount){for(var h=!0,c=0;c<l.length;c++){var u=l[c];if(this.getOptionVal(u.ElementId,a.heightOption,i)!=a.heightPerRow[c]&&(h=!1),!h)break}if(h)return a}}}},{key:"correctOptionsInfluencedByDimensions",value:function correctOptionsInfluencedByDimensions(t,o){var i=this;if(this.constructionRules.optionsInfluencedByDimensions){var l=t.getSizeOfWholeSet(!1),r=t.getAllElementsInFrontGrid();this.constructionRules.optionsInfluencedByDimensions.forEach((function(t){var a=!1;"height"==t.dimension.toLowerCase()&&l.y>=t.dimensionLimit&&(a=!0),"width"==t.dimension.toLowerCase()&&l.x>=t.dimensionLimit&&(a=!0),"depth"==t.dimension.toLowerCase()&&l.z>=t.dimensionLimit&&(a=!0),r.forEach((function(l){a?"doshow"==t.higherLimit.toLowerCase()?i.setOptionDoShow(l.ElementId,t.option,o):"dohide"==t.higherLimit.toLowerCase()&&i.setOptionDoHide(l.ElementId,t.option,o):"doshow"==t.lowerLimit.toLowerCase()?i.setOptionDoShow(l.ElementId,t.option,o):"dohide"==t.lowerLimit.toLowerCase()&&i.setOptionDoHide(l.ElementId,t.option,o)}))}))}}},{key:"correctLadder",value:function correctLadder(t,o){if(this.constructionRules.correctLadder){for(var i=t.getAllElementsInRow(this.constructionRules.correctLadder.rowIndex,!1),l=0;l<i.length;l++){var r=t.getRowCount(l,!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&-1==this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(r))for(var a=t.getAllElementsInColumn(l,!1),h=0;h<a.length;h++)this.setOptionValue(a[h].ElementId,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o);if(r<t.getSizeOfHighesRow(!1)){var c,u=null===(c=t.getPlannerElementAtGridPos(l,r-1,!1))||void 0===c?void 0:c.getElementId();u&&this.getOptionVal(u,this.constructionRules.correctLadder.optHeight,o)==this.constructionRules.correctLadder.opvProblematicHeight&&this.setOptionValue(u,this.constructionRules.correctLadder.optHeight,this.constructionRules.correctLadder.opvDefaultHeight,o)}}for(l=0;l<i.length;l++){var d=i[l],m=this.getValidLadder(l,t,o);0==l&&this.setOptionValue(d.ElementId,this.constructionRules.correctLadder.optLadderLeft,m.optLadder,o);var g=m;if(t.getElementHasRightElement(d.getElementId())){var E=this.getValidLadder(l+1,t,o);E.colCount>m.colCount&&(g=E)}this.setOptionValue(d.getElementId(),this.constructionRules.correctLadder.optLadderRight,g.optLadder,o)}var I=t.getSizeOfHighesRow(!1);if(this.constructionRules.correctLadder.onElementHighestRowCount&&this.constructionRules.correctLadder.onElementHighestRowCount.indexOf(I)>=0){var p=t.getAllElementsInRow(I-1,!1);for(l=0;l<p.length;l++){var O=p[l];this.setOptionDoShow(O.getElementId(),this.constructionRules.correctLadder.optHasHeight,o)}}}}},{key:"correctCoverPlate",value:function correctCoverPlate(t,o){var i=this;this.constructionRules.coverPlateRule&&(this.constructionRules.coverPlateRule.onHighestElementsOnly||t.getHighestElementsPerSeries().forEach((function(t){var l=0;t.forEach((function(t){var o;return l+=null!==(o=t.Width)&&void 0!==o?o:0}));var r=i.constructionRules.coverPlateRule.seriesWidthToPlateOpv.find((function(t){return t.limit>l}));r&&i.setOptionValue(t[0].ElementId,i.constructionRules.optABD,r.plateOpv,o)})))}},{key:"correctSeries",value:function correctSeries(t,o){for(var i=!1,l=t.getAllElementIdsInGrid(),r=!1,a=!1,h=0;h<l.length;h++){var c=l[h];this.getElementIsCornerElement(t.getElementById(c),o)&&(r=!0),this.checkArticleHasOption(c,"OPTBR_ABDECKPLATTE")&&this.setOptionDoHide(c,"OPTBR_ABDECKPLATTE",o);var u=this.getOptionVal(c,"OPTABDECKPLATTE",o);this.checkArticleHasOption(c,"OPTABDECKPLATTE")&&"OPVMIT_PLATTE"==u&&(i=!0),"OPVBR_18"==this.getOptionVal(c,"OPTBR",o)&&(a=!0)}if(!t.getPlannerHasActiveBackside()&&t.getPlannerElementAtGridPos(0,0,!1)){for(var d=t.getSizeOfHighesRow(!1),m=[],g=[],E=[],I=0,p=0,O=t.getAllElementsInColumn(p,!1);O.length>0;){if(O.length==d){var R=O[d-1];E.push(R),"OPVBR_75"==(u=this.getOptionVal(R.ElementId,"OPTBR",o))?I+=75:"OPVBR_18"==u?I+=18.75:"OPVBR_37"==u&&(I+=37.5),this.setOptionDoHide(R.ElementId,"OPTOBEN",o)}else E.length>0&&(m.push(E),g.push(I)),E=[],I=0;p++,O=t.getAllElementsInColumn(p,!1)}for(E.length>0&&(m.push(E),g.push(I)),h=0;h<m.length;h++){var k=m[h][0],P="";if(this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_40")>=0&&Math.abs(g[h]-40.4)<3?P="OPVABDECKPLATTE_40":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_77")>=0&&Math.abs(g[h]-77.8)<3?P="OPVABDECKPLATTE_77":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_115")>=0&&Math.abs(g[h]-115.3)<3?P="OPVABDECKPLATTE_115":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_152")>=0&&Math.abs(g[h]-152.8)<3?P="OPVABDECKPLATTE_152":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_190")>=0&&Math.abs(g[h]-190.3)<3?P="OPVABDECKPLATTE_190":this.constructionRules.hasABD_Values.indexOf("OPVABDECKPLATTE_227")>=0&&Math.abs(g[h]-227.8)<3&&(P="OPVABDECKPLATTE_227"),""==P||r)for(var T=t.getAllElementsInGridSortedbyGridPos(),V=0;V<T.length;V++)this.checkArticleHasOption(T[V].getElementId(),"OPTABD_HIDE")&&this.setOptionDoShow(T[V].getElementId(),"OPTABD_HIDE",o);else for(var v=t.getAllElementsInGridSortedbyGridPos(),C=0;C<v.length;C++)this.checkArticleHasOption(v[C].getElementId(),"OPTABD_HIDE")&&this.setOptionDoHide(v[C].getElementId(),"OPTABD_HIDE",o);if(""==P||!i||r||a)for(var B=0;B<m[h].length;B++)this.setOptionDoShow(m[h][B].ElementId,"OPTOBEN",o);else this.setOptionValue(k.ElementId,"OPTBR_ABDECKPLATTE",P,o)}}}},{key:"correctForceOptOfElement",value:function correctForceOptOfElement(t,o,i,l){if(0!=o.getCellsInGridByElementId(t).cells.length)for(var r=this.getCurOptionBasedConstructionRules(t,i),a=0;a<r.length;a++){if(r[a].forceOptions)for(var h=0;h<r[a].forceOptions.length;h++){var c=r[a].forceOptions[h];if(!c.rule||""==c.rule||this.evalRule(t,c.rule,i))for(var u=c.options,d=c.value,m=0;m<u.length;m++){var g=u[m],E=this.constructionRules.optionsVisibilityInfo[g];if(E.complementDir){var I=E.complementDir;l&&("LEFT"==I?I="RIGHT":"RIGHT"==I&&(I="LEFT"));var p=o.getNeighborElements(t,I);if(p.length>0)for(var O=0;O<p.length;O++){for(var R=p[O],k=this.getCurOptionBasedConstructionRules(R.ElementId,i),P=E.complementOPT,T=!1,V=0;V<k.length;V++)if(k[V].forceOptions)for(var v=0;v<k[V].forceOptions.length;v++){var C=k[V].forceOptions[v];if((!C.rule||""==C.rule||this.evalRule(R.ElementId,C.rule,i))&&(this.arrayContainsValue(C.options,P)&&(T=!0,"doShow"==d&&"doShow"==C.value&&("OPVFUELLUNG"==this.getOptionVal(t,"OPTELEMENT",i)&&"OPVFUELLUNG"==this.getOptionVal(R.ElementId,"OPTELEMENT",i)?(this.setOptionDoHide(R.ElementId,P,i),this.setOptionDoHide(R.ElementId,P,i)):this.setOptionDoShow(R.ElementId,P,i)),"doHide"==d&&"doHide"==C.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doShow"==d&&"doHide"==C.value||"doHide"==d&&"doShow"==C.value))){var B=!0;c.prio&&C.prio?B=c.prio<=C.prio:c.prio?B=!0:C.prio&&(B=!1),B?"doHide"==d?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doHide"==C.value?(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)):"doShow"==C.value&&(this.setOptionDoHide(t,g,i),this.setOptionDoShow(R.ElementId,P,i))}}T||("doShow"==d&&(this.setOptionDoShow(t,g,i),this.setOptionDoHide(R.ElementId,P,i)),"doHide"==d&&(this.setOptionDoHide(t,g,i),this.setOptionDoHide(R.ElementId,P,i)))}else"doShow"==d&&this.setOptionDoShow(t,g,i),"doHide"==d&&this.setOptionDoHide(t,g,i)}}}if(r[a].changeOptions)for(var _=0;_<r[a].changeOptions.length;_++){for(var x=!0,G=r[a].changeOptions[_].rule.split("&"),b=0;b<G.length;b++)if(G[b].indexOf("!=")>0){var H=G[b].split("!=")[0],y=G[b].split("!=")[1];this.getOptionVal(t,H,i)==y&&(x=!1)}else{H=G[b].split("=")[0],y=G[b].split("=")[1];this.getOptionVal(t,H,i)!=y&&(x=!1)}x&&(r[a].changeOptions[_].doShow&&this.setOptionDoShow(t,r[a].changeOptions[_].doShow,i),r[a].changeOptions[_].doHide&&this.setOptionDoHide(t,r[a].changeOptions[_].doHide,i),r[a].changeOptions[_].opt&&r[a].changeOptions[_].opv&&this.setOptionValue(t,r[a].changeOptions[_].opt,r[a].changeOptions[_].opv,i))}}}},{key:"correctNeighborCustomOLTs",value:function correctNeighborCustomOLTs(t,o,i){if(this.constructionRules.correctNeighborOPT&&0!=this.constructionRules.correctNeighborOPT.length)for(var l=0;l<this.constructionRules.correctNeighborOPT.length;l++){var r=o.getCellsInGridByElementId(t);if(this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,"OPVOHNE",i),0==r.cells.length)return;var a=o.getNeighborElements(t,this.constructionRules.correctNeighborOPT[l].dir);if(a.length>0){var h=this.getOptionVal(a[0].ElementId,this.constructionRules.correctNeighborOPT[l].neighborOPT,i);""!=h&&this.setOptionValue(t,this.constructionRules.correctNeighborOPT[l].opt,h,i)}}}},{key:"doChangeRetailArticleNumbers",value:function doChangeRetailArticleNumbers(t,o){var i=t.getAllElementsInGridSortedbyGridPos();if(this.constructionRules.correctRetailArticleNumberByRule&&this.constructionRules.correctRetailArticleNumberByRule.length>0)for(var l=!0,r=0;r<this.constructionRules.correctRetailArticleNumberByRule.length;r++){var a=this.constructionRules.correctRetailArticleNumberByRule[r];if("global"==a.range){for(var h=0;h<i.length&&l;h++){this.evalRule(i[h].getElementId(),a.rule,o)||(l=!1)}if(l)return{doChange:!0,retailArticleRules:a.retailArticleRules}}}return{doChange:!1}}},{key:"setConstructionRules",value:function setConstructionRules(t){t&&t.constructionRules&&(this.constructionRules=t.constructionRules,this.partlistHelper.setConstructionRules(t.constructionRules),this.constructionRulesLoaded=!0)}},{key:"getConstructionRulesLoaded",value:function getConstructionRulesLoaded(){return this.constructionRulesLoaded}},{key:"updateOptionLogicBoxPlanner",value:(t=(0,l.Z)(u().mark((function _callee(t,o,i,l){var r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null!=this.constructionRules&&this.constructionRulesLoaded){u.next=3;break}return I.error(new d.GE("Error construction rules are not set for boxPlanner",{code:"WC_0012"})),u.abrupt("return");case 3:if(r=(new Date).getTime(),a=void 0,I.debug("BoxPlanner - updateOptionLogicInGrid start updateOptionLogicInGrid"),h=new Map,l)for(c=t.getAllElementIdsInGrid(),o=void 0,i=void 0,m=0;m<c.length;m++)this.getElementIsCornerElement(t.getElementById(c[m]),h)&&this.setOptionValue(c[m],"OPTELEMENT","OPVOFFENES_FACH",h);for(a=this.setAllOptToDefault(t,h,o,i),this.doCorrectAffectedElementsByOption(t,h,o,i),this.correctBottom(t,h,!1),t.getPlannerHasActiveBackside()&&this.correctBottom(t,h,!0),this.correctSeries(t,h),this.correctCoverPlate(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!1);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctSimpleOpt(m,g,t,h,!0);for(m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h,!1),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!1).ElementId,t,h);if(t.getPlannerHasActiveBackside())for(m=t.getColumnCount()-1;m>=0;m--)for(g=0;g<t.getRowCount(m,!1);g++)this.correctForceOptOfElement(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h,!0),this.correctNeighborCustomOLTs(t.getPlannerElementAtGridPos(m,g,!0).ElementId,t,h);for(this.correctLadder(t,h),this.correctOptionsInfluencedByDimensions(t,h),this.partlistHelper.calculateKnots(t,h),this.partlistHelper.calculateRahmen(t,h),m=0;m<t.getColumnCount();m++)for(g=0;g<t.getRowCount(m,!1);g++)this.correctBack(t,h,t.getPlannerElementAtGridPos(m,g,!1).getElementId());return E=this.doChangeRetailArticleNumbers(t,h),u.next=27,this.updateCfgValuesByPlanner(h,void 0,this.constructionRules.partlistRules.bundleRules,E);case 27:return I.debug("BoxPlanner updateOptionLogic - Duration after setting Option Values of all Articles: "+((new Date).getTime()-r)),I.debug("BoxPlanner updateOptionLogic - Duration after setting updating configurator: "+((new Date).getTime()-r)),u.abrupt("return",a);case 30:case"end":return u.stop()}}),_callee,this)}))),function updateOptionLogicBoxPlanner(o,i,l,r){return t.apply(this,arguments)})},{key:"onElemDeleted",value:function onElemDeleted(t){this.hideOptionsForConstruction.has(t)&&this.hideOptionsForConstruction.delete(t)}},{key:"onElementCopy",value:function onElementCopy(t,o){if(this.hideOptionsForConstruction.has(t)){var i=this.hideOptionsForConstruction.get(t);this.hideOptionsForConstruction.set(o,(0,m.Z)(i))}}},{key:"getHasMaxElemCountPerColumn",value:function getHasMaxElemCountPerColumn(){return null!=this.constructionRules.maxElemCountPerCol}},{key:"getMaxElemCountPerColumn",value:function getMaxElemCountPerColumn(){return this.constructionRules.maxElemCountPerCol}},{key:"getForceWholePlanningSameHeight",value:function getForceWholePlanningSameHeight(){return this.constructionRules.forceWholePlanningSameHeight}}]);var t}(),O=i(64357),R=i(17562);function _createForOfIteratorHelper(t,o){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,o){if(t){if("string"==typeof t)return _arrayLikeToArray(t,o);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,o):void 0}}(t))||o&&t&&"number"==typeof t.length){i&&(t=i);var l=0,r=function F(){};return{s:r,n:function n(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function e(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,h=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return h=t.done,t},e:function e(t){c=!0,a=t},f:function f(){try{h||null==i.return||i.return()}finally{if(c)throw a}}}}function _arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,l=Array(o);i<o;i++)l[i]=t[i];return l}var k=d.ZP.initLog("Planner","BOX-PLANNER_GRID"),P=function(){return(0,a.Z)((function BoxPlannerGrid(t,o){(0,r.Z)(this,BoxPlannerGrid),(0,h.Z)(this,"plannerElements",void 0),(0,h.Z)(this,"frontGrid",void 0),(0,h.Z)(this,"backGrid",void 0),(0,h.Z)(this,"hasActiveBackside",void 0),(0,h.Z)(this,"getValueOfOptionOfArticle",void 0),(0,h.Z)(this,"gridSetupParams",void 0),this.plannerElements=new Map,this.frontGrid=new Array,this.backGrid=new Array,this.gridSetupParams=t,this.getValueOfOptionOfArticle=o,this.hasActiveBackside=!1}),[{key:"createNewCells",value:function createNewCells(t,o,i,l){if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[{plannerElementId:t.ElementId,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),index:new O.FM(o,i)}],startColIndex:o,endColIndex:o,startRowIndex:i,endRowIndex:i,backside:l,colCount:1,rowCount:1};this.gridSetupParams.forceFixCellRasterSize||k.error(new d.GE("Box planner with params forceSingleCellPerElement is false and forceFixCellRasterSize is false are not allowed"));for(var r=Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),a=Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth),h=[],c=0;c<r;c++)for(var u=0;u<a;u++){var m={plannerElementId:t.ElementId,width:this.gridSetupParams.fixCellRasterWidth,height:this.gridSetupParams.fixCellRasterHeight,index:new O.FM(o+c,i+u)};h.push(m)}return{cells:h,startColIndex:o,endColIndex:o+r-1,startRowIndex:i,endRowIndex:i+a-1,backside:l,colCount:r,rowCount:a}}},{key:"createEmptyCells",value:function createEmptyCells(t,o,i,l,r,a){for(var h=[],c=t;c<=i;c++)for(var u=o;u<=l;u++){var d={plannerElementId:-1,width:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:r,height:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:a,index:new O.FM(c,u)};h.push(d)}return h}},{key:"getCellCount",value:function getCellCount(t){return this.gridSetupParams.forceSingleCellPerElement?{colCount:1,rowCount:1}:{colCount:Math.round(t.getWidth()/this.gridSetupParams.fixCellRasterWidth),rowCount:Math.round(t.getHeight()/this.gridSetupParams.fixCellRasterWidth)}}},{key:"getAllUsedCellsInGrid",value:function getAllUsedCellsInGrid(t){for(var o=new Array,i=t?this.backGrid:this.frontGrid,l=0;l<i.length;l++)for(var r=0;r<i[l].length;r++)null!=i[l][r]&&o.push(i[l][r]);return o}},{key:"getGridColumnWidth",value:function getGridColumnWidth(t){for(var o=0;o<this.frontGrid[t].length;o++)if(this.frontGrid[t][o])return this.frontGrid[t][o].width;return 0}},{key:"getGridColumnHeight",value:function getGridColumnHeight(t){var o=0,i=!1;if(this.frontGrid.length>t)for(var l=this.frontGrid[t],r=l.length;r>=0;r--)!i&&l[r]&&(i=!0),i&&(o+=null==l[r]?0:l[r].height);return o}},{key:"deleteElementByIdFromGrid",value:function deleteElementByIdFromGrid(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.endRowIndex-o.startRowIndex+1,r=!1,a=o.startColIndex,h=o.startColIndex-o.endColIndex+1;this.getRowCount(o.startColIndex,o.backside)==l&&(r=!0);var c=this.getAllUsedCellsInGrid(o.backside);i=new Array;for(var u=0;u<c.length;u++){var d=c[u];d.plannerElementId!=t&&(r&&d.index.x>a&&(d.index.x-=h),i[d.index.x]||(i[d.index.x]=[]),i[d.index.x][d.index.y]=d)}o.backside?this.backGrid=i:this.frontGrid=i}},{key:"getPlannerElementAtGridPos",value:function getPlannerElementAtGridPos(t,o,i){var l=i?this.backGrid:this.frontGrid;if(l[t]&&l[t][o]){var r=l[t][o];if(null==r)return;return this.plannerElements.get(r.plannerElementId)}}},{key:"getCellsInGridByElementId",value:function getCellsInGridByElementId(t){for(var o=void 0,i=!1,l=0;l<this.frontGrid.length;l++)for(var r=0;r<this.frontGrid[l].length;r++){var a=this.frontGrid[l][r];a&&a.plannerElementId==t&&(o=a,i=!1)}if(null==o)for(l=0;l<this.backGrid.length;l++)for(r=0;r<this.backGrid[l].length;r++){var h=this.backGrid[l][r];h&&h.plannerElementId==t&&(o=h,i=!0)}if(null==o)return{cells:[],backside:!1,startColIndex:-1,endColIndex:-1,startRowIndex:-1,endRowIndex:-1,colCount:0,rowCount:0};if(this.gridSetupParams.forceSingleCellPerElement)return{cells:[o],backside:i,startColIndex:o.index.x,endColIndex:o.index.x,startRowIndex:o.index.y,endRowIndex:o.index.y,colCount:1,rowCount:1};var c=i?this.backGrid:this.frontGrid,u=[o],d=1/0,m=-1/0,g=1/0,E=-1/0;for(l=o.index.x;l<c.length;l++)for(r=o.index.y+1;r<c.length;r++){var I=c[l][r];if(!I||I.plannerElementId!=t)break;l<d&&(d=l),l>m&&(m=l),r<g&&(g=r),r>m&&(E=r),u.push(I)}return{cells:u,backside:i,startColIndex:d,endColIndex:m,startRowIndex:g,endRowIndex:E,colCount:m-d+1,rowCount:E-g+1}}},{key:"getAllElementIdsInGrid",value:function getAllElementIdsInGrid(){return Array.from(this.plannerElements.keys())}},{key:"_getAllElementsInGrid",value:function _getAllElementsInGrid(t){for(var o=[],i=[],l=0;l<t.length;l++)for(var r=0;r<t[l].length;r++){var a=t[l][r];null!=a&&(-1==o.indexOf(a.plannerElementId)&&(o.push(a.plannerElementId),i.push(this.plannerElements.get(a.plannerElementId))))}return i}},{key:"getAllElementsInFrontGrid",value:function getAllElementsInFrontGrid(){return this._getAllElementsInGrid(this.frontGrid)}},{key:"getAllElementsInBackGrid",value:function getAllElementsInBackGrid(){return this._getAllElementsInGrid(this.backGrid)}},{key:"getAllElementsInBacksideModuleGrid",value:function getAllElementsInBacksideModuleGrid(){return this._getAllElementsInGrid(this.backGrid).map((function(t){return t.ElementId}))}},{key:"getAllElementsInGridSortedbyElementId",value:function getAllElementsInGridSortedbyElementId(){return Array.from(this.plannerElements.values())}},{key:"getAllElementsInGridSortedbyGridPos",value:function getAllElementsInGridSortedbyGridPos(){for(var t=[],o=[],i=0;i<this.frontGrid.length;i++)for(var l=0;l<this.frontGrid[i].length;l++){var r=this.frontGrid[i][l];if(r&&-1==o.indexOf(r.plannerElementId)){var a=this.getElementById(r.plannerElementId);o.push(r.plannerElementId),t.push(a)}}for(i=0;i<this.backGrid.length;i++)for(l=0;l<this.backGrid[i].length;l++){var h=this.backGrid[i][l];if(h&&-1==o.indexOf(h.plannerElementId)){var c=this.getElementById(h.plannerElementId);o.push(h.plannerElementId),t.push(c)}}return t}},{key:"getElementById",value:function getElementById(t){return this.plannerElements.get(t)}},{key:"getElementIsFirstInGrid",value:function getElementIsFirstInGrid(t){var o=this.getCellsInGridByElementId(t);return 0!=o.cells.length&&(0==o.cells[0].index.x&&0==o.cells[0].index.y&&!o.backside)}},{key:"getElementIsInLastCol",value:function getElementIsInLastCol(t,o){var i=o?this.backGrid:this.frontGrid;return this.getCellsInGridByElementId(t).endColIndex+1==i.length}},{key:"getElementHasTopElement",value:function getElementHasTopElement(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=o.startColIndex;l<=o.endColIndex;l++)if(i[l].length>o.endRowIndex+1&&i[l][o.endRowIndex+1])return!0;return!1}},{key:"getTopElements",value:function getTopElements(t){for(var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[],a=o.startColIndex;a<=o.endColIndex;a++)if(i[a].length>o.endRowIndex+1&&i[a][o.endRowIndex+1]){var h=i[a][o.endRowIndex+1];if(!h)continue;-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getTopRightElement",value:function getTopRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.endRowIndex+1&&i[o.endColIndex+1][o.endRowIndex+1]){var l=i[o.endColIndex+1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getTopLeftElement",value:function getTopLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(o.startColIndex>0&&i[o.startColIndex-1].length>0&&i[o.startColIndex-1][o.endRowIndex+1]){var l=i[o.startColIndex-1][o.endRowIndex+1];return this.plannerElements.get(l.plannerElementId)}}},{key:"getElementHasBottomElement",value:function getElementHasBottomElement(t){return this.getCellsInGridByElementId(t).startRowIndex-1>=0}},{key:"getBottomElements",value:function getBottomElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startRowIndex-1>=0)for(var a=o.startColIndex;a<=o.endColIndex;a++){var h=i[a][o.startRowIndex-1];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasRightElement",value:function getElementHasRightElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;if(i.length>o.endColIndex+1&&i[o.endColIndex+1].length>o.startRowIndex&&i[o.endColIndex+1][o.startRowIndex])return!0;return!1}},{key:"getRightElements",value:function getRightElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>o.endColIndex+1)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.endColIndex+1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getElementHasLeftElement",value:function getElementHasLeftElement(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid;return!!(o.startColIndex>0&&i[o.startColIndex-1][o.startRowIndex])}},{key:"getLeftElements",value:function getLeftElements(t){var o=this.getCellsInGridByElementId(t),i=o.backside?this.backGrid:this.frontGrid,l=[],r=[];if(o.startColIndex-1>=0)for(var a=o.startRowIndex;a<=o.endRowIndex;a++){var h=i[o.startColIndex-1][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getAllElementsInColumn",value:function getAllElementsInColumn(t,o){var i=o?this.backGrid:this.frontGrid,l=[],r=[];if(i.length>t)for(var a=0;a<i[t].length;a++){var h=i[t][a];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getColumnCount",value:function getColumnCount(){return this.frontGrid.length}},{key:"getRowCount",value:function getRowCount(t,o){return o?this.backGrid[t].length:this.frontGrid[t].length}},{key:"getAllElementsInRow",value:function getAllElementsInRow(t,o){for(var i=o?this.backGrid:this.frontGrid,l=[],r=[],a=0;a<i.length;a++)if(i[a].length>t){var h=i[a][t];h&&-1==r.indexOf(h.plannerElementId)&&(r.push(h.plannerElementId),l.push(this.plannerElements.get(h.plannerElementId)))}return l}},{key:"getSizeOfHighesRow",value:function getSizeOfHighesRow(t){for(var o=t?this.backGrid:this.frontGrid,i=0,l=0;l<o.length;l++)for(var r=o[l].length;r>=0;r--){if(o[l][r]){i<r&&(i=r);break}}return i+1}},{key:"getNeighborElements",value:function getNeighborElements(t,o){var i=this.getCellsInGridByElementId(t),l=i.backside?this.backGrid:this.frontGrid,r=[],a=[];switch(o){case"TOP":for(var h=i.startColIndex;h<=i.endColIndex;h++){var c=h,u=i.endRowIndex+1;if(l[c].length>u){var d=l[c][u];d&&-1==a.indexOf(d.plannerElementId)&&(a.push(d.plannerElementId),r.push(this.plannerElements.get(d.plannerElementId)))}}break;case"DOWN":for(h=i.startColIndex;h<=i.endColIndex;h++){var m=h,g=i.startRowIndex-1;if(g>=0){var E=l[m][g];E&&-1==a.indexOf(E.plannerElementId)&&(a.push(E.plannerElementId),r.push(this.plannerElements.get(E.plannerElementId)))}}break;case"LEFT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var I=i.startColIndex-1,p=h;if(I>=0){var O=l[I][p];O&&-1==a.indexOf(O.plannerElementId)&&(a.push(O.plannerElementId),r.push(this.plannerElements.get(O.plannerElementId)))}}break;case"RIGHT":for(h=i.startRowIndex;h<=i.endRowIndex;h++){var R=i.startColIndex+1,k=h;if(l.length>R){var P=l[R][k];P&&-1==a.indexOf(P.plannerElementId)&&(a.push(P.plannerElementId),r.push(this.plannerElements.get(P.plannerElementId)))}}break;case"BACK":if(this.hasActiveBackside){var T=this.getPlannerElementAtGridPos(i.startColIndex,i.startRowIndex,!0);null!=T&&(r=[T])}}return r}},{key:"getOppositeElement",value:function getOppositeElement(t){if(this.hasActiveBackside){var o=this.getCellsInGridByElementId(t);return o.backside?this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!1):this.getPlannerElementAtGridPos(o.startColIndex,o.startRowIndex,!0)}}},{key:"getOppositeElements",value:function getOppositeElements(t){var o=[];if(this.hasActiveBackside)for(var i=0;i<t.length;i++){var l=this.getOppositeElement(t[i]);null!=l&&o.push(l)}return o}},{key:"getSizeOfWholeSet",value:function getSizeOfWholeSet(t){for(var o=0,i=0,l=0,r=[],a=0;a<this.frontGrid.length;a++){for(var h=0,c=0;c<this.frontGrid[a].length;c++){var u=this.frontGrid[a][c];u&&-1==r.indexOf(u.plannerElementId)&&(h+=this.plannerElements.get(u.plannerElementId).getHeight(),0==a&&0==c&&(i=this.plannerElements.get(u.plannerElementId).getDepth()))}h>l&&(l=h);var d=this.getGridColumnWidth(a);t&&a>0&&(77.9==d?d=75:40.4==d?d=37.5:21.7==d&&(d=18.75)),o+=d}return this.hasActiveBackside&&(i*=2),new O.P(o,l,i)}},{key:"getHighestElementsPerSeries",value:function getHighestElementsPerSeries(){if(this.hasActiveBackside)throw new Error("this function is doesnt implement the backside logic (yet)");for(var t=[],o=-1,i=0;i<this.getColumnCount();i++){var l=this.getRowCount(i,!1);l==o&&(t[t.length-1]||t.push([]),t[t.length-1].push(this.getPlannerElementAtGridPos(i,l-1,!1))),o=l}return t}},{key:"getAllElementsInSameRowByElementId",value:function getAllElementsInSameRowByElementId(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInRow(o.startRowIndex,!1);return this.hasActiveBackside&&(i=i.concat(this.getAllElementsInRow(o.startRowIndex,!0))),{elementIds:i.map((function(t){return t.ElementId})),plannerElements:i,backside:o.backside}}},{key:"getAllElementsDown",value:function getAllElementsDown(t){var o=this.getCellsInGridByElementId(t);if(0==o.startRowIndex)return{elements:[],backside:!1};for(var i=o.backside?this.backGrid:this.frontGrid,l=[],r=o.startColIndex;r<=o.endColIndex;r++)for(var a=o.startRowIndex--;a>=0;a--){var h=i[r][a];h&&-1==l.indexOf(h.plannerElementId)&&l.push(h.plannerElementId)}return{elements:l,backside:o.backside}}},{key:"getAllElementsInSameCol",value:function getAllElementsInSameCol(t){var o=this.getCellsInGridByElementId(t),i=this.getAllElementsInColumn(o.startColIndex,o.backside);return null==i&&(i=[]),{elements:i.map((function(t){return t.ElementId})),backside:o.backside}}},{key:"prepareGridForColCopy",value:function prepareGridForColCopy(t,o){if("AVO"!=o){var i=this.getCellsInGridByElementId(t),l=(this.plannerElements.get(t),0);"AVR"==o?l=i.endColIndex+1:"AVL"==o&&(l=i.startColIndex);var r=i.endColIndex-i.startColIndex+1,a=this.getAllUsedCellsInGrid(!1);this.frontGrid=new Array;for(var h=0;h<a.length;h++){var c=a[h];c.index.x>=l&&(c.index.x+=r),this.frontGrid[c.index.x]||(this.frontGrid[c.index.x]=[]),this.frontGrid[c.index.x][c.index.y]=c}for(h=l;h<l+r;h++)this.frontGrid[h]||(this.frontGrid[h]=[]);if(this.hasActiveBackside){var u=this.getAllUsedCellsInGrid(!0);this.backGrid=new Array;for(h=0;h<u.length;h++){var d=u[h];d.index.x>=l&&(d.index.x+=r),this.backGrid[d.index.x]||(this.backGrid[d.index.x]=[]),this.backGrid[d.index.x][d.index.y]=d}for(h=l;h<l+r;h++)this.backGrid[h]||(this.backGrid[h]=[])}}}},{key:"prepareGridForBackSideCopy",value:function prepareGridForBackSideCopy(){this.backGrid=new Array,this.hasActiveBackside=!0}},{key:"addElementAtGridPos",value:function addElementAtGridPos(t,o,i,l){for(var r=l?this.backGrid:this.frontGrid,a=this.createNewCells(t,o,i,l),h=0;h<a.cells.length;h++){var c=a.cells[h];r[c.index.x]||(r[c.index.x]=[]),r[c.index.x][c.index.y]=c}this.plannerElements.set(t.getElementId(),t),l&&(this.hasActiveBackside=!0)}},{key:"addElementAsCopy",value:function addElementAsCopy(t,o,i){var l=this.getCellsInGridByElementId(t),r=-1,a=-1,h="BACKSIDE"==i?!l.backside:l.backside,c=this.getCellCount(o);switch(i){case"AVR":r=l.endColIndex+1,a=l.startRowIndex;break;case"AVL":r=l.startColIndex-c.colCount,a=l.startRowIndex;break;case"AVO":r=l.startColIndex,a=l.endRowIndex+1;break;case"BACKSIDE":r=l.startColIndex,a=l.startRowIndex}for(var u=this.createNewCells(o,r,a,h),d=h?this.backGrid:this.frontGrid,m=0;m<u.cells.length;m++)d[u.cells[m].index.x]||(d[u.cells[m].index.x]=[]),d[u.cells[m].index.x][u.cells[m].index.y]=u.cells[m];this.plannerElements.set(o.getElementId(),o)}},{key:"deleteElement",value:function deleteElement(t,o){this.plannerElements.has(t)||k.error(new d.GE("Try to delete an elementId that does not exist"));this.getCellsInGridByElementId(t);R.Z.removeDockingPointRelations(this.plannerElements.get(t)),this.deleteElementByIdFromGrid(t),this.plannerElements.delete(t),this.hasActiveBackside}},{key:"updateWorldPosOfElements",value:function updateWorldPosOfElements(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){var i=t.value;R.Z.removeDockingPointRelations(i)}}catch(t){o.e(t)}finally{o.f()}for(var l=1,r=[],a=0;a<this.frontGrid.length;a++)for(var h=0;h<this.frontGrid[a].length;h++){var c=this.frontGrid[a][h];if(-1==r.indexOf(c.plannerElementId)){var u=this.plannerElements.get(c.plannerElementId);r.push(c.plannerElementId);for(var m=this.getNeighborElements(c.plannerElementId,"TOP"),g=this.getNeighborElements(c.plannerElementId,"RIGHT"),E=0;E<m.length;E++)R.Z.tryDockElement(u,"AVO",[m[E]]);for(E=0;E<g.length;E++)R.Z.tryDockElement(u,"AVR",[g[E]]);u.PosNr=l,l++}}for(a=0;a<this.backGrid.length;a++)for(h=0;h<this.backGrid[a].length;h++){var I=this.backGrid[a][h];if(-1==r.indexOf(I.plannerElementId)){var p=this.plannerElements.get(I.plannerElementId);r.push(I.plannerElementId);var O=this.frontGrid[a][h],P=this.plannerElements.get(O.plannerElementId);if(P){var T=null==P?void 0:P.getDockingPointById("AVO_AVO_2_IL");T?p&&R.Z.tryDockElementToDP(p,P,T):k.error(new d.GE("Error Loading DockingPoint AVO_2 for plannerElement"))}var V=this.getNeighborElements(I.plannerElementId,"TOP"),v=this.getNeighborElements(I.plannerElementId,"RIGHT");for(E=0;E<V.length;E++)R.Z.tryDockElement(p,"AVO",[V[E]]);for(E=0;E<v.length;E++)R.Z.tryDockElement(p,"AVL",[v[E]]);p.PosNr=l,l++}}}},{key:"destroyBoxPlannerGrid",value:function destroyBoxPlannerGrid(){var t,o=_createForOfIteratorHelper(this.plannerElements.values());try{for(o.s();!(t=o.n()).done;){t.value.destroy()}}catch(t){o.e(t)}finally{o.f()}this.plannerElements.clear(),this.frontGrid=new Array,this.hasActiveBackside&&(this.hasActiveBackside=!1,this.backGrid=new Array)}},{key:"destroyBacksideModuleGrid",value:function destroyBacksideModuleGrid(){this.hasActiveBackside=!1;var t,o=this.getAllElementsInBackGrid(),i=_createForOfIteratorHelper(o.values());try{for(i.s();!(t=i.n()).done;){var l=t.value;this.plannerElements.delete(l.ElementId),l.destroy()}}catch(t){i.e(t)}finally{i.f()}o=[],this.backGrid=new Array}},{key:"getPlannerHasActiveBackside",value:function getPlannerHasActiveBackside(){return this.hasActiveBackside}},{key:"getForceSingleCellPerElement",value:function getForceSingleCellPerElement(){return this.gridSetupParams.forceSingleCellPerElement}},{key:"getBoundingBox",value:function getBoundingBox(){var t,o=0,i=0,l=0,r=0,a=0,h=this.plannerElements.get(this.frontGrid[0][0].plannerElementId).getDepth(),c=0;t="RIGHT";for(var u=[],d=0;d<this.frontGrid.length;d++){var m=this.frontGrid[d][0];if(!m)break;if(-1==u.indexOf(m.plannerElementId)){u.push(m.plannerElementId);var g=this.plannerElements.get(m.plannerElementId);if(!g)continue;var E=this.getValueOfOptionOfArticle(m.plannerElementId,"OPTELEMENT");"RIGHT"==t?r+=g.getWidth():"FRONT"==t?h+=g.getWidth():"LEFT"==t?r-=g.getWidth():"BACK"==t&&(h-=g.getWidth()),"OPVECK_I"==E?"RIGHT"==t?t="FRONT":"FRONT"==t?t="LEFT":"LEFT"==t?t="BACK":"BACK"==t&&(t="RIGHT"):"OPVECK_A"==E&&("RIGHT"==t?t="BACK":"FRONT"==t?t="RIGHT":"LEFT"==t?t="FRONT":"BACK"==t&&(t="LEFT")),r<i&&(i=r),r>l&&(l=r),h<a&&(a=h),h>c&&(c=h);var I=this.getGridColumnHeight(d);o=o<I?I:o}}var p=c-a,O=l-i;return this.hasActiveBackside&&(p=2*h),{width:Math.round(1e3*O)/1e3,height:Math.round(1e3*o)/1e3,depth:Math.round(1e3*p)/1e3}}},{key:"getFreeMoveLocation",value:function getFreeMoveLocation(t){var o=this.getElementById(t);if(!o)return[];var i=this.getCellsInGridByElementId(t);if(0===i.cells.length)return[];var l,r=[],a=function isEmptyCell(t,o){var i;return void 0===(null===(i=h[t])||void 0===i?void 0:i[o])},h=i.backside?this.backGrid:this.frontGrid,c=_createForOfIteratorHelper(this.plannerElements.keys());try{for(c.s();!(l=c.n()).done;){var u=l.value;if(u!=t){var d=this.getElementById(u);if(this.gridSetupParams.forceSingleCellPerElement){if(!this.getElementHasTopElement(u)&&d.getWidth()==o.getWidth()){var m=this.getCellsInGridByElementId(u),g=this.getAllElementsInRow(m.endRowIndex+1,m.backside);if(g.length>0&&g[0].getHeight()!=o.getHeight())continue;var E=this.createLocationInformation(o,i.backside,this.createEmptyCells(m.startColIndex,m.endRowIndex+1,m.startColIndex,m.endRowIndex+1,o.getWidth(),o.getHeight()),m.startColIndex,m.endRowIndex+1,1,1);r.push(E)}}else for(var I=this.getCellsInGridByElementId(u),p=-1,O=-1,R=I.endRowIndex+1,k=I.startColIndex;k<=I.startColIndex+I.colCount-1;k++){var P=!1;if(a(k,R)){if(-1==p?(p=k,O=k):O=k,k==I.startColIndex+I.colCount-1)if(i.colCount<=O-p+1)P=!0;else{P=!0;for(var T=0;T<i.colCount;T++)if(a(p+T,I.endRowIndex)){P=!1;break}}}else i.colCount<=O-p+1&&(P=!0);if(P){var V=this.createLocationInformation(o,i.backside,this.createEmptyCells(p,I.endRowIndex+1,p+i.colCount-1,I.endRowIndex+i.rowCount-1,o.getWidth(),o.getHeight()),p,I.endRowIndex+1,i.colCount,i.rowCount);r.push(V)}}}}}catch(t){c.e(t)}finally{c.f()}var v=this.createLocationInformation(o,i.backside,this.createEmptyCells(-i.colCount,0,-1,i.rowCount-1,o.getWidth(),o.getHeight()),-i.colCount,0,i.colCount,i.rowCount);r.push(v);var C=this.createLocationInformation(o,i.backside,this.createEmptyCells(this.getColumnCount(),0,this.getColumnCount()+i.colCount-1,i.rowCount-1,o.getWidth(),o.getHeight()),this.getColumnCount(),0,i.colCount,i.rowCount);return r.push(C),r}},{key:"getFreePlanningLocation",value:function getFreePlanningLocation(t,o){var i=this.getElementById(t);if(i){var l=this.getCellsInGridByElementId(t);if(0!==l.cells.length){var r=l.backside?this.backGrid:this.frontGrid,a=l.startColIndex,h=l.endColIndex,c=l.startRowIndex,u=l.endRowIndex,d=-1,m=-1,g=-1,E=-1,I=[],p=function isValidCell(t,o){var i;return void 0===(null===(i=r[t])||void 0===i?void 0:i[o])};switch(o){case"LEFT":for(var O=a-1,R=!1,k=c;k<=u;k++)if(p(O,k)){m=k,R=!0;break}if(!R)return;R=!1;for(var P=a-1;P>=a-l.colCount&&(p(P,m)&&(0==m||!p(P,m-1)));P--)R=!0,d=P;if(!R)return;g=a-1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"TOP":for(var T=u+1,V=!1,v=h;v>=a;v--)p(v,T)&&(d=v,V=!0);if(!V)return;m=T,g=h,E=T+l.rowCount-1,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;case"RIGHT":for(var C=h+1,B=!1,_=c;_<=u;_++)if(p(C,_)){m=_,B=!0;break}if(!B)return;B=!1;for(var x=h+1;x<=h+l.colCount&&(p(x,m)&&(0==m||!p(x,m-1)));x++)g=x,B=!0;if(!B)return;d=h+1,E=u,I=this.createEmptyCells(d,m,g,E,i.getWidth(),i.getHeight());break;default:return}return this.createLocationInformation(i,l.backside,I,d,m,g-d+1,E-m+1)}}}},{key:"createLocationInformation",value:function createLocationInformation(t,o,i,l,r,a,h){var c=o?this.backGrid:this.frontGrid,u={cells:i,widthPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterWidth:t.getWidth(),heightPerCell:this.gridSetupParams.forceFixCellRasterSize?this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depthPerCell:t.getDepth(),width:this.gridSetupParams.forceFixCellRasterSize?a*this.gridSetupParams.fixCellRasterWidth:t.getWidth(),height:this.gridSetupParams.forceFixCellRasterSize?h*this.gridSetupParams.fixCellRasterHeight:t.getHeight(),depth:t.getDepth(),startIndexWorldPos:new O.FM(0,0)};if(this.gridSetupParams.forceFixCellRasterSize)u.startIndexWorldPos=new O.FM(l*this.gridSetupParams.fixCellRasterWidth,r*this.gridSetupParams.fixCellRasterHeight);else{for(var d=0,m=0;m<l;m++)d+=c[m][0].width;l<0&&(d=-t.getWidth());var g=0;for(m=0;m<r;m++)g+=c[l][m].height;u.startIndexWorldPos=new O.FM(d,g)}return u}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){for(var t=this.getAllElementsInGridSortedbyGridPos(),o={boxPlannerInteractionInformationPerElement:new Map},i=0;i<t.length;i++){var l=t[i],r=this.getCellsInGridByElementId(l.getElementId()),a=this.createLocationInformation(l,r.backside,r.cells,r.startColIndex,r.startRowIndex,r.colCount,r.rowCount),h=this.getFreePlanningLocation(l.getElementId(),"LEFT"),c=this.getFreePlanningLocation(l.getElementId(),"RIGHT"),u=this.getFreePlanningLocation(l.getElementId(),"TOP"),d=this.getElementHasTopElement(l.getElementId()),m=[];!d&&t.length>1&&(m=this.getFreeMoveLocation(l.getElementId()));var g={location:a,isDeletable:!d&&t.length>1,availablePlanningLocations:{availableBoxPlannerCellsLeft:h,availableBoxPlannerCellsTop:u,availableBoxPlannerCellsRight:c},availableMovingLocations:m};o.boxPlannerInteractionInformationPerElement.set(l.getElementId(),g)}return o}},{key:"getGeneralPlanningState",value:function getGeneralPlanningState(t){for(var o=[],i=void 0,l=Array.from(this.plannerElements.values()).map((function(t){return{basketId:t.getBasketId(),elementId:t.getElementId(),articleCodex:t.getArticleCodex(),size:{width:t.getWidth(),height:t.getHeight(),depth:t.getDepth()},area:{fromX:void 0,toX:void 0,fromY:void 0,toY:void 0}}})),r=0;r<this.frontGrid.length;r++){o.push([]);for(var a=this.frontGrid[r],h=function _loop(){var t=a[c];if(t){var i=l.find((function(o){return o.elementId===t.plannerElementId}));i&&((void 0===i.area.fromX||i.area.fromX>t.index.x)&&(i.area.fromX=t.index.x),(void 0===i.area.toX||i.area.toX<t.index.x)&&(i.area.toX=t.index.x),(void 0===i.area.fromY||i.area.fromY>t.index.y)&&(i.area.fromY=t.index.y),(void 0===i.area.toY||i.area.toY<t.index.y)&&(i.area.toY=t.index.y)),o[r].push({index:t.index,plannedElement:i})}},c=0;c<a.length;c++)h()}var u=Math.max.apply(Math,(0,m.Z)(o.map((function(t){return t.length}))));o.forEach((function(t){for(;t.length<u;){var o,i=t[t.length-1],l=i?i.index.y+1:0;t.push({index:new O.FM((null===(o=t[0])||void 0===o?void 0:o.index.x)||0,l),plannedElement:void 0})}}));var d=t?l.find((function(o){return o.elementId===t})):void 0;if(d){var g=this.getFreePlanningLocation(d.elementId,"LEFT"),E=this.getFreePlanningLocation(d.elementId,"RIGHT"),I=this.getFreePlanningLocation(d.elementId,"TOP"),p=[];g&&this.addFreeCellsToMatrix(o,g.cells,p),E&&this.addFreeCellsToMatrix(o,E.cells,p),I&&this.addFreeCellsToMatrix(o,I.cells,p),i={articleCodex:d.articleCodex,size:d.size,gridSpace:{rows:d.area.toY-d.area.fromY+1,colums:d.area.toX-d.area.fromX+1},rules:p,elementId:t}}return{grids:[{index:0,rowSizes:this.getRowSizes(o,i),columnSizes:this.getColumnSizes(o,i),matrix:o}],selectedElement:i}}},{key:"getRowSizes",value:function getRowSizes(t,o){if(this.getForceSingleCellPerElement()){for(var i=t[0].length,l=Array(i).fill(-1),r=function _loop2(i){var r,a=null===(r=t.find((function(t){var o,l;return void 0!==(null===(o=t[i].plannedElement)||void 0===o?void 0:o.size.height)&&-1!=(null===(l=t[i].plannedElement)||void 0===l?void 0:l.size.height)})))||void 0===r?void 0:r[i];if(null!=a&&a.plannedElement?l[i]=a.plannedElement.size.height:o&&(l[i]=o.size.height),-1===l[i])return 1},a=0;a<i&&!r(a);a++);return l.includes(-1)&&k.error(new Error("Column sizes are not set")),l}return 15}},{key:"getColumnSizes",value:function getColumnSizes(t,o){if(this.getForceSingleCellPerElement()){for(var i=t.length,l=Array(i).fill(-1),r=0;r<i;r++){var a=t[r].find((function(t){return t.plannedElement}));if(null!=a&&a.plannedElement?l[r]=a.plannedElement.size.width:o&&(l[r]=o.size.width),!l.includes(-1))break}if(l.includes(-1))throw new Error("Row sizes are not set");return l}return 15}},{key:"addFreeCellsToMatrix",value:function addFreeCellsToMatrix(t,o,i){o.forEach((function(o){var i=o.index.x,l=o.index.y,r=t.find((function(t){return t.find((function(t){return t.index.x===i}))}));if(!r){for(var a=[],h=0;h<t[0].length;h++)a.push({index:new O.FM(i,h),plannedElement:void 0});t[0][0].index.x>i?t.unshift(a):t.push(a)}var c=t.find((function(t){return t.find((function(t){return t.index.y===l}))}));c||t.map((function(t){var o;return t.push({index:new O.FM((null===(o=t[0])||void 0===o?void 0:o.index.x)||0,l),plannedElement:void 0})}))})),i.push({type:"FixedPositon",grids:[{gridIndex:0,places:[{lowestX:Math.min.apply(Math,(0,m.Z)(o.map((function(t){return t.index.x})))),lowestY:Math.min.apply(Math,(0,m.Z)(o.map((function(t){return t.index.y}))))}]}]})}}])}(),T=i(2209),V=i(57312),v=i(58178),C=d.ZP.initLog("Planner","WEB-PLANNER-LOGIC"),B=function(){function DivaBoxPlanner(t,o){(0,r.Z)(this,DivaBoxPlanner),(0,h.Z)(this,"set",void 0),(0,h.Z)(this,"plannerID",void 0),(0,h.Z)(this,"constructionRulesHandler",void 0),(0,h.Z)(this,"boxPlannerGrid",void 0),(0,h.Z)(this,"nextElementId",1),this.set=t,this.plannerID=o,this.constructionRulesHandler=new p(this.set.getValueOfOptionOfArticle,this.set.checkArticleHasOption,this.set.updateCfgValuesByPlanner);this.boxPlannerGrid=new P({hasMaxGridRasterHeight:!1,hasMaxGridRasterWidth:!1,forceSingleCellPerElement:!0,forceFixCellRasterSize:!1},this.set.getValueOfOptionOfArticle)}return(0,a.Z)(DivaBoxPlanner,[{key:"initPlanner",value:(g=(0,l.Z)(u().mark((function _callee(t){var o,i,l,r,a,h,c,m,g,E;return u().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:if(null==(o=JSON.parse(d.ZP.decodeBase64(t))).v||2!=o.v){u.next=26;break}if(o.set&&o.set.elements&&0!=o.set.elements.length){u.next=4;break}return u.abrupt("return");case 4:i=o.set.elements,l=0;case 6:if(!(l<i.length)){u.next=21;break}return r=i[l],a=parseInt(r.elementID),h=new V.Z(this.set.getSetId(),r.basketID,a,DivaBoxPlanner.plannerType),this.nextElementId<a+1&&(this.nextElementId=a+1),this.set.setElementId(r.basketID,h.ElementId),this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(h.ElementId)),(c=this.set.getPlannerData(h.ElementId))&&h.updatePlannerData(c),u.next=17,T.Z.loadSVG(h,this.set);case 17:this.boxPlannerGrid.addElementAtGridPos(h,r.boxPlannerInfo.gridPosCol,r.boxPlannerInfo.gridPosRow,r.boxPlannerInfo.isOnBackside);case 18:l++,u.next=6;break;case 21:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=24,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 24:u.next=42;break;case 26:m=1,l=0;case 28:if(!(l<o.Elements.length)){u.next=38;break}return g=o.Elements[l],(a=parseInt(g.ID))>m&&(m=a),E={boxElementID:g.ID,boxCol:g.col,boxRow:g.row,boxUpdateWholePlanning:!1},u.next=35,this.addPlannerElement(g.BasketID,E);case 35:l++,u.next=28;break;case 38:return this.nextElementId=m+1,this.boxPlannerGrid.updateWorldPosOfElements(),u.next=42,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 42:return u.abrupt("return",o);case 43:case"end":return u.stop()}}),_callee,this)}))),function initPlanner(t){return g.apply(this,arguments)})},{key:"saveSetPlanner",value:function saveSetPlanner(){for(var t=[],o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=this.boxPlannerGrid.getElementById(o[i]);if(l){for(var r=this.boxPlannerGrid.getCellsInGridByElementId(o[i]),a=l.getDockingDockingPoints(),h=[],c=0;c<a.length;c++){var u,d={id:a[c].DpId,onID:a[c].OnElementId,onDPID:null===(u=a[c].OnDP)||void 0===u?void 0:u.DpId};h.push(d)}var m={elementID:l.getElementId(),basketID:this.set.getBasketId(l.getElementId()),CatalogCodex:this.set.getCatalogCodex(),Codex:this.set.getArticleCodex(l.getElementId()),posNr:l.PosNr,x:l.WorldPosCenter.x,y:l.WorldPosCenter.y,z:l.WorldPosCenter.z,rot:l.RotDeg,width:l.Width?l.Width:-1,height:l.Height?l.Height:-1,depth:l.Depth?l.Depth:-1,DP:h,boxPlannerInfo:{gridPosCol:r.startColIndex,gridPosRow:r.startRowIndex,isOnBackside:r.backside}};t.push(m)}}var g=this.boxPlannerGrid.getBoundingBox();return{setId:this.set.getSetId(),x:0,y:0,z:0,width:g.width,height:g.height,depth:g.depth,rot:0,elements:t}}},{key:"addPlannerElement",value:(m=(0,l.Z)(u().mark((function _callee2(t,o){var i,l;return u().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(null!=o&&null!=o.boxElementID&&null!=o.boxCol&&null!=o.boxRow){r.next=2;break}return r.abrupt("return");case 2:return i=new V.Z(this.set.getSetId(),t,o.boxElementID,DivaBoxPlanner.plannerType),this.nextElementId=isNaN(o.boxElementID)?this.nextElementId:o.boxElementID+1,this.set.setElementId(t,i.ElementId),l=this.set.getPlannerData(i.ElementId),i.updatePlannerData(l),r.next=9,T.Z.loadSVG(i,this.set);case 9:if(this.constructionRulesHandler.getConstructionRulesLoaded()||this.constructionRulesHandler.setConstructionRules(this.set.getConstructionRuleOfElementId(i.ElementId)),this.boxPlannerGrid.addElementAtGridPos(i,o.boxCol,o.boxRow,null!=o.backside&&o.backside),!o.boxUpdateWholePlanning){r.next=15;break}return this.boxPlannerGrid.updateWorldPosOfElements(),r.next=15,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 15:case"end":return r.stop()}}),_callee2,this)}))),function addPlannerElement(t,o){return m.apply(this,arguments)})},{key:"extendPlanner",value:(c=(0,l.Z)(u().mark((function _callee3(t,o){return u().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),_callee3)}))),function extendPlanner(t,o){return c.apply(this,arguments)})},{key:"copyPlannerElement",value:(i=(0,l.Z)(u().mark((function _callee4(t,o){var i,l,r,a,h,c,d,m=this;return u().wrap((function _callee4$(u){for(;;)switch(u.prev=u.next){case 0:if(i=!1,o){u.next=3;break}return u.abrupt("return");case 3:"STD"==o.copyType&&(o.targetElements=[]),l=[],r=this,a="AVR","BoxPlanner_backside"==o.copyType?a="BACKSIDE":"STD"!=o.copyType&&"BoxPlanner_COL"!=o.copyType||("AVR"==o.dpType?a="AVR":"AVO"==o.dpType?a="AVO":"AVL"==o.dpType&&(a="AVL")),t.forEach((function(t,r){var h;i||(!o||"AVL"!=o.dpType&&"AVR"!=o.dpType?o&&o.copyType&&"BoxPlanner_backside"==o.copyType&&(m.boxPlannerGrid.getPlannerHasActiveBackside()||m.boxPlannerGrid.prepareGridForBackSideCopy()):m.boxPlannerGrid.prepareGridForColCopy(r,o.dpType)),i=!0;var c=new V.Z(m.set.getSetId(),t,m.nextElementId,DivaBoxPlanner.plannerType);m.nextElementId++,m.set.setElementId(t,c.ElementId);var u=m.set.getPlannerData(c.ElementId);c.updatePlannerData(u),m.boxPlannerGrid.addElementAsCopy(r,c,a),m.constructionRulesHandler.onElementCopy(r,c.getElementId()),l.push(c),"STD"==o.copyType&&(null===(h=o.targetElements)||void 0===h||h.push(c.getElementId()))})),h=0;case 10:if(!(h<l.length)){u.next=17;break}return u.next=13,T.Z.loadSVG(l[h],this.set);case 13:if("AVO"==a&&this.constructionRulesHandler.getHasMaxElemCountPerColumn()&&this.boxPlannerGrid.getCellsInGridByElementId(l[h].ElementId).endRowIndex+1==r.constructionRulesHandler.getMaxElemCountPerColumn())for(c=l[h].getFreeDockingPointsByType("AVO"),d=0;d<c.length;d++)c[d].disableDP(!0);case 14:h++,u.next=10;break;case 17:return this.boxPlannerGrid.updateWorldPosOfElements(),u.next=20,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,o.changedOPT,o.targetElements);case 20:case"end":return u.stop()}}),_callee4,this)}))),function copyPlannerElement(t,o){return i.apply(this,arguments)})},{key:"initIDM3DMeta",value:function initIDM3DMeta(t){C.debug("No IDM3D Planner for BoxPlanner")}},{key:"getPlannerElementsInfluencedByDeletion",value:function getPlannerElementsInfluencedByDeletion(t,o){if(this.constructionRulesHandler.getForceWholePlanningSameHeight())return 0==this.boxPlannerGrid.getCellsInGridByElementId(t).startRowIndex?[]:this.boxPlannerGrid.getAllElementsInSameRowByElementId(t).elementIds.filter((function(o){return o!=t}));if(this.boxPlannerGrid.getPlannerHasActiveBackside()){if("BoxPlanner_backside"==o)return this.boxPlannerGrid.getAllElementsInBackGrid().map((function(t){return t.ElementId})).filter((function(o){return o!=t}));var i=this.boxPlannerGrid.getOppositeElement(t);if(i)return[i.getElementId()]}return[]}},{key:"getPlannerElementsInfluencedByCopy",value:function getPlannerElementsInfluencedByCopy(t,o){var i=[];if(o&&"NO"==(null==o?void 0:o.dpType)&&"BoxPlanner_backside"==o.copyType)return this.boxPlannerGrid.getAllElementIdsInGrid();if(o&&"BoxPlanner_COL"==o.copyType){for(var l=this.boxPlannerGrid.getCellsInGridByElementId(t),r=this.boxPlannerGrid.getAllElementsInColumn(l.startColIndex,l.backside),a=0;a<r.length;a++)i.push(r[a].getElementId());return i}if(i.push(t),o){switch(o.dpType){case"AVL":case"AVR":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var h=this.boxPlannerGrid.getAllElementsInSameCol(t);i=h.elements,h.backside}else{var c=this.boxPlannerGrid.getAllElementsDown(t);i=i.concat(c.elements),c.backside}break;case"AVO":if(this.constructionRulesHandler.getForceWholePlanningSameHeight()){var u=this.boxPlannerGrid.getAllElementsInSameRowByElementId(t);i=u.elementIds,u.backside}}this.boxPlannerGrid.getPlannerHasActiveBackside()&&(i=i.concat(this.boxPlannerGrid.getOppositeElements(i).map((function(t){return t.ElementId}))))}return Array.from(new Set(i))}},{key:"deletePlannerElement",value:(o=(0,l.Z)(u().mark((function _callee5(t,o,i){var l,r,a,h;return u().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(l=this.boxPlannerGrid.getCellsInGridByElementId(t),r={row:l.startRowIndex,col:l.startColIndex,backside:!1},i&&"BoxPlanner_backside"==i?r={row:0,col:0,backside:!1}:l.startRowIndex>0?r.row--:(r.col=0==l.startColIndex?0:l.startColIndex-1,r.row=this.boxPlannerGrid.getRowCount(r.col,l.backside)-1),this.boxPlannerGrid.deleteElement(t,i),this.constructionRulesHandler.onElemDeleted(t),a=!0,i&&("BoxPlanner_backside"==i?(this.boxPlannerGrid.destroyBacksideModuleGrid(),a=!0):"STD_DONTUPDATE"==i&&(a=!1)),!a){o.next=11;break}return this.boxPlannerGrid.updateWorldPosOfElements(),o.next=11,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid);case 11:if(!this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside)){o.next=13;break}return o.abrupt("return",{newElementToSelect:null===(h=this.boxPlannerGrid.getPlannerElementAtGridPos(r.col,r.row,r.backside))||void 0===h?void 0:h.getElementId()});case 13:return o.abrupt("return",{});case 14:case"end":return o.stop()}}),_callee5,this)}))),function deletePlannerElement(t,i,l){return o.apply(this,arguments)})},{key:"getAllViewPlannerElements",value:function getAllViewPlannerElements(){return this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos()}},{key:"getNeighborElements",value:function getNeighborElements(t,o){var i=this.boxPlannerGrid.getElementById(t);if(!i)return[];var l=null==i?void 0:i.getDockingDockingPointsByType(o);if(!l)return[];for(var r=[],a=0;a<(null==l?void 0:l.length);a++)null!=l[a]&&r.push(l[a].OnElementId);return r}},{key:"getFreeDockingPointsByElementId",value:function getFreeDockingPointsByElementId(t,o){return{dockingPoints:[],filter:[]}}},{key:"getDockedDockingPointsByElementId",value:function getDockedDockingPointsByElementId(t,o){return[]}},{key:"getDockedGroups",value:function getDockedGroups(){return[this.boxPlannerGrid.getAllElementIdsInGrid()]}},{key:"getBoundingBox",value:function getBoundingBox(){return C.warn("BoxPlanner - get2DViewPlannerBoundingBox not implemented yet","WC_0012"),new v.Z}},{key:"updatePlannerTrans",value:function updatePlannerTrans(t,o,i,l,r,a){return C.error(new d.GE("BoxPlanner - updatePlannerTrans not implemented yet",{code:"WC_0012"})),!1}},{key:"updatePlanner",value:(t=(0,l.Z)(u().mark((function _callee6(t,o){var i,l,r,a,h,c,d,m,g;return u().wrap((function _callee6$(u){for(;;)switch(u.prev=u.next){case 0:if(C.debug("BoxPlanner - configurationHasChanged "+t),!(t&&o&&o.length>0&&t.OPTELEMENT)||"OPVECK_I"!=t.OPTELEMENT&&"OPVECK_A"!=t.OPTELEMENT){u.next=18;break}if(!(o.length>1)){u.next=9;break}return u.next=5,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o,!0);case 5:if(!(i=u.sent)){u.next=8;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:i});case 8:case 46:case 47:return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[]});case 9:if(l=this.boxPlannerGrid.getCellsInGridByElementId(o[0]),r=o[0],l.startRowIndex>0&&(r=this.boxPlannerGrid.getPlannerElementAtGridPos(l.startColIndex,0,!1).getElementId()),this.boxPlannerGrid.getElementHasLeftElement(r)&&this.boxPlannerGrid.getElementHasRightElement(r)){u.next=18;break}return a="NO",this.boxPlannerGrid.getElementHasLeftElement(r)||(a="AVL"),this.boxPlannerGrid.getElementHasRightElement(r)||(a="AVR"),h=this.getPlannerElementsInfluencedByCopy(r,{dpType:a,copyType:"BoxPlanner_COL"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:h,copyDPType:a,copyType:"BoxPlanner_COL",ignoreOptionsToCopy:["OPTELEMENT"],changedOPT:t,targetElements:o});case 18:if(!t||!t.OPTDMOD){u.next=33;break}u.t0=t.OPTDMOD,u.next="OPVD_EIN"===u.t0?22:"OPVD_AUS"===u.t0?26:31;break;case 22:if(this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=25;break}return c=this.getPlannerElementsInfluencedByCopy(-1,{dpType:"NO",copyType:"BoxPlanner_backside"}),u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],elementIdToCopy:c,copyType:"BoxPlanner_backside",changedOPT:t});case 25:case 30:return u.abrupt("break",31);case 26:if(!this.boxPlannerGrid.getPlannerHasActiveBackside()){u.next=30;break}if(!((d=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=30;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:d.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t});case 31:case 37:u.next=47;break;case 33:if(!(t&&t.OPTFARBE_RAHMEN&&"OPVSCHWARZ_MATT"==t.OPTFARBE_RAHMEN&&this.boxPlannerGrid.getPlannerHasActiveBackside())){u.next=39;break}if(!((m=this.boxPlannerGrid.getAllElementsInBackGrid()).length>0)){u.next=37;break}return u.abrupt("return",{doDeleteBackGrid:!0,elemIdsToDelete:m.map((function(t){return t.ElementId})),deletionType:"BoxPlanner_backside",changedOPT:t,targetElements:o,viewMessageCodex:"BOXPLAN_BLACKFRAME_INCOMPATIBLE_ELEMENT_WARNING"});case 39:return u.next=41,this.constructionRulesHandler.updateOptionLogicBoxPlanner(this.boxPlannerGrid,t,o);case 41:if(!(g=u.sent)){u.next=46;break}return u.abrupt("return",{doDeleteBackGrid:!1,elemIdsToDelete:[],viewMessageCodex:g});case 48:case"end":return u.stop()}}),_callee6,this)}))),function updatePlanner(o,i){return t.apply(this,arguments)})},{key:"getSetData",value:function getSetData(t,o,i,l){for(var r={ID:"S1",H:"",x:0,y:0,z:0,w:0,ELE:[],Blob:this.set.CatalogData.supplierILN,Cat:this.set.getCatalogCodex(),ShowDim:i},a=this.boxPlannerGrid.getAllElementsInGridSortedbyGridPos(),h=0;h<a.length;h++){var c=a[h],u=c.ElementId,m=this.set.getPlannerConfigData(u).config,g={ID:"E"+u,N:m.N,Model:m.Model,x:-c.WorldPosCenter.x,y:c.WorldPosCenter.y,z:c.WorldPosCenter.z,PosPivot:"Center",w:c.getRotDeg(),RotPivot:"Center",DP:c.getDockingPointJS3D(),MAT:m.MAT,CFG:m.CFG,H:""},E=(0,d.FB)(JSON.stringify(g));g.H=E,r.ELE.push(g)}E=(0,d.FB)(JSON.stringify(r));return r.H=E,{constructionSet:r}}},{key:"getPlannerId",value:function getPlannerId(){return this.plannerID}},{key:"getElementPosInfo",value:function getElementPosInfo(){C.error(new d.GE("BoxPlanner - getElementPosInfo not implemented yet",{code:"WC_0012"}))}},{key:"destroyPlanner",value:function destroyPlanner(){this.boxPlannerGrid.destroyBoxPlannerGrid()}},{key:"getCatalogData",value:function getCatalogData(){return this.set.CatalogData}},{key:"getPlannerBoundingBox",value:function getPlannerBoundingBox(){return this.boxPlannerGrid.getBoundingBox()}},{key:"updatePlannerBoundingBox",value:function updatePlannerBoundingBox(){}},{key:"getPlanningIsComplete",value:function getPlanningIsComplete(){return null!=this.boxPlannerGrid.getPlannerElementAtGridPos(0,0,!1)}},{key:"updateSetPosNr",value:function updateSetPosNr(t){for(var o=this.boxPlannerGrid.getAllElementIdsInGrid(),i=0;i<o.length;i++){var l=o[i],r=this.boxPlannerGrid.getElementById(l);r&&(r.SetPosNr=t+r.PosNr-1,this.set.setPosNr(r.ElementId,r.getPosNr()))}return o.length}},{key:"clonePlanner",value:function clonePlanner(t,o,i){var l=new DivaBoxPlanner(t,o);return l.initPlanner(i),l}},{key:"getPlannerInteractionInformation",value:function getPlannerInteractionInformation(){return this.boxPlannerGrid.getPlannerInteractionInformation()}},{key:"getGeneralPlanningState",value:function getGeneralPlanningState(t){return this.boxPlannerGrid.getGeneralPlanningState(t)}}]);var t,o,i,c,m,g}();(0,h.Z)(B,"plannerType","BOX")}}]);
|