@crystaldesign/web-planner-logic 24.10.0-beta.5 → 24.10.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/build/cjs/{DivaBoxPlanner-be2f45b7.js → DivaBoxPlanner-fc403f96.js} +16 -18
  2. package/build/cjs/{DivaStandardPlanner-7d349085.js → DivaStandardPlanner-381861d5.js} +26 -30
  3. package/build/cjs/{DoorPlanner-6a20b682.js → DoorPlanner-4534b32f.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-f7f33fe7.js → Host3DSignalR-e6cae920.js} +1 -6
  5. package/build/cjs/{LiviqueWWSHandler-1dcaf2f5.js → LiviqueWWSHandler-9bc80b98.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-b60e2dd4.js → PfisterWWSHandler-24c470e2.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-844d0e1a.js → PlannerHandler2D-fbc28e95.js} +1249 -10
  8. package/build/cjs/{ProductBasketHandler-91e017b7.js → ProductBasketHandler-08dcf24e.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-f6de9720.js → SeriousBasketHandler-a4647e89.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-af92cdfb.js → ShelfPlanner-561be11e.js} +5 -5
  11. package/build/cjs/{StandardWWSHandler-030a868f.js → StandardWWSHandler-e211a327.js} +1 -1
  12. package/build/cjs/{index-c05ab217.js → index-4d5cef6f.js} +1053 -1580
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-1b429c50.js → DivaBoxPlanner-8ef0722c.js} +5 -7
  15. package/build/esm/{DivaStandardPlanner-52862aa8.js → DivaStandardPlanner-19cc5ac0.js} +5 -9
  16. package/build/esm/{DoorPlanner-60e7f69e.js → DoorPlanner-c3fe5ecf.js} +1 -1
  17. package/build/esm/{Host3DSignalR-9733d510.js → Host3DSignalR-5d78c3f5.js} +1 -6
  18. package/build/esm/{LiviqueWWSHandler-11aee574.js → LiviqueWWSHandler-2f2cc617.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-d8d249ea.js → PfisterWWSHandler-701e95ee.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-dc938d0b.js → PlannerHandler2D-bf892db2.js} +1245 -8
  21. package/build/esm/{ProductBasketHandler-1f4cec9a.js → ProductBasketHandler-a1dd8bb2.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-07c16989.js → SeriousBasketHandler-d5b6a347.js} +1 -1
  23. package/build/esm/{ShelfPlanner-a4914a65.js → ShelfPlanner-e3b31a33.js} +5 -5
  24. package/build/esm/{StandardWWSHandler-f0685582.js → StandardWWSHandler-d2f8cb1c.js} +1 -1
  25. package/build/esm/{index-0c4bc491.js → index-bbda3bc5.js} +1053 -1580
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +6 -6
  28. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -5
  30. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +2 -2
  32. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -3
  33. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  34. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -1
  35. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  36. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
  37. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  38. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  39. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  40. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +1 -2
  41. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
  43. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
  45. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -3
  47. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +1 -1
  51. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -3
  53. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -12
  56. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  57. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
  58. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  59. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
  61. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  62. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
  63. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +0 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  68. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
  69. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
  71. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  74. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  75. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  76. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
  77. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  78. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
  79. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  80. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -0
  81. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  82. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
  83. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  84. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  85. package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
  86. package/package.json +2 -2
  87. package/build/cjs/DivaSingleProductPlanner-50bf9dc8.js +0 -1169
  88. package/build/cjs/DockingPointHandler-b4042d27.js +0 -1255
  89. package/build/esm/DivaSingleProductPlanner-463106e5.js +0 -1158
  90. package/build/esm/DockingPointHandler-0dae0c91.js +0 -1245
  91. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
  92. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts.map +0 -1
@@ -281,7 +281,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
281
281
  key: "getDataCache",
282
282
  value: function () {
283
283
  var _getDataCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee3(queryString, cacheMD5, accountSessionGuid, useWebServiceApi, method, data) {
284
- var myQS, url, init, addSession, cacheUrl, _this$apiConfig3, _this$apiConfig4, api2Url, result;
284
+ var myQS, url, init, addSession, _this$apiConfig3, _this$apiConfig4, api2Url, result;
285
285
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
286
286
  while (1) switch (_context3.prev = _context3.next) {
287
287
  case 0:
@@ -294,7 +294,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
294
294
  };
295
295
  addSession = true;
296
296
  if (!(this.jsonDataCache.get(myQS) || cacheMD5 && this.jsonDataCache.get(cacheMD5))) {
297
- _context3.next = 11;
297
+ _context3.next = 9;
298
298
  break;
299
299
  }
300
300
  LOG$g.debug('getDataFromInternalCache: ' + queryString);
@@ -305,77 +305,68 @@ var DivaApiHandler = /*#__PURE__*/function () {
305
305
  return _context3.abrupt("return", this.jsonDataCache.get(myQS));
306
306
  case 8:
307
307
  return _context3.abrupt("return", this.jsonDataCache.get(cacheMD5));
308
- case 11:
309
- if (cacheMD5) {
310
- cacheUrl = DivaUtils__default["default"].getCacheData(cacheMD5, queryString);
311
- if (cacheUrl) {
312
- LOG$g.debug('getDataFromCDNCache: ' + queryString);
313
- url = cacheUrl;
314
- addSession = false;
315
- }
316
- }
317
- case 12:
308
+ case 9:
318
309
  if (!addSession) {
319
- _context3.next = 34;
310
+ _context3.next = 31;
320
311
  break;
321
312
  }
322
313
  if (!useWebServiceApi) {
323
- _context3.next = 25;
314
+ _context3.next = 22;
324
315
  break;
325
316
  }
326
317
  if (!this.jwt) {
327
- _context3.next = 18;
318
+ _context3.next = 15;
328
319
  break;
329
320
  }
330
321
  init.config.headers = {
331
322
  Authorization: 'Bearer ' + this.jwt
332
323
  };
333
- _context3.next = 23;
324
+ _context3.next = 20;
334
325
  break;
335
- case 18:
326
+ case 15:
336
327
  if (!this.apiKey) {
337
- _context3.next = 22;
328
+ _context3.next = 19;
338
329
  break;
339
330
  }
340
331
  init.config.headers = {
341
332
  'X-API-KEY': this.apiKey
342
333
  };
343
- _context3.next = 23;
334
+ _context3.next = 20;
344
335
  break;
345
- case 22:
336
+ case 19:
346
337
  throw new Error('not jwt or API Key Found');
347
- case 23:
348
- _context3.next = 34;
338
+ case 20:
339
+ _context3.next = 31;
349
340
  break;
350
- case 25:
341
+ case 22:
351
342
  api2Url = (_this$apiConfig3 = this.apiConfig) === null || _this$apiConfig3 === void 0 ? void 0 : _this$apiConfig3.api2["default"];
352
343
  if (this.getApplicationEnvironment() == 'WEB' && (_this$apiConfig4 = this.apiConfig) !== null && _this$apiConfig4 !== void 0 && _this$apiConfig4.api2.web) {
353
344
  api2Url = this.apiConfig.api2.web;
354
345
  }
355
346
  _context3.t0 = accountSessionGuid;
356
347
  if (_context3.t0) {
357
- _context3.next = 32;
348
+ _context3.next = 29;
358
349
  break;
359
350
  }
360
- _context3.next = 31;
351
+ _context3.next = 28;
361
352
  return this.getSessionGuid('V', undefined, this.OrganizationId, api2Url);
362
- case 31:
353
+ case 28:
363
354
  _context3.t0 = _context3.sent;
364
- case 32:
355
+ case 29:
365
356
  _context3.t1 = _context3.t0;
366
357
  init.config.headers = {
367
358
  sessionGuid: _context3.t1
368
359
  };
369
- case 34:
370
- _context3.next = 36;
360
+ case 31:
361
+ _context3.next = 33;
371
362
  return this.fetchData(url, init);
372
- case 36:
363
+ case 33:
373
364
  result = _context3.sent;
374
365
  this.jsonDataCache.set(myQS, result);
375
366
  if (cacheMD5) this.jsonDataCache.set(cacheMD5, result);
376
367
  LOG$g.debug('getDataFromApi: ' + queryString);
377
368
  return _context3.abrupt("return", result);
378
- case 41:
369
+ case 38:
379
370
  case "end":
380
371
  return _context3.stop();
381
372
  }
@@ -438,9 +429,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
438
429
  diva3dServerMode: data.diva3dServerMode != undefined ? data.diva3dServerMode : 'SignalR',
439
430
  diva3dRenderGroup: data.diva3dRenderGroup != undefined ? data.diva3dRenderGroup : 'MYCC7',
440
431
  mediaServiceApiKey: data.divaMediaServiceApiKey,
441
- diva3dUseImageCache: data.diva3dUseImageCache != undefined ? data.diva3dUseImageCache : false,
442
- diva3dSuppressCacheCreation: data.diva3dSuppressCacheCreation != undefined ? data.diva3dSuppressCacheCreation : false,
443
- diva3dUseSirvViewer: data.diva3dUseSirvViewer != undefined ? data.diva3dUseSirvViewer : false,
444
432
  language: lang !== null && lang !== void 0 ? lang : this.getLanguage(),
445
433
  abTestCases: data.abTestCases !== undefined ? data.abTestCases : [],
446
434
  checkForProductsInStock: data.checkForProductsInStock,
@@ -457,6 +445,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
457
445
  viewConfig: (_data$ViewConfig = data.ViewConfig) !== null && _data$ViewConfig !== void 0 ? _data$ViewConfig : data.viewConfig,
458
446
  loadSupplierColors: data.loadSupplierColors,
459
447
  showSelectionModeZero: data.showSelectionModeZero,
448
+ dontLoadCatalogEditorLiteMask: data.dontLoadCatalogEditorLiteMask,
460
449
  emailConfig: data.emailConfig,
461
450
  reportConfig: data.reportConfig,
462
451
  barrierConfig: data.barrierConfig,
@@ -559,24 +548,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
559
548
  var _this$divaWebConfigDa8, _this$divaWebConfigDa9;
560
549
  return (_this$divaWebConfigDa8 = (_this$divaWebConfigDa9 = this.divaWebConfigData) === null || _this$divaWebConfigDa9 === void 0 ? void 0 : _this$divaWebConfigDa9.diva3dRenderGroup) !== null && _this$divaWebConfigDa8 !== void 0 ? _this$divaWebConfigDa8 : '';
561
550
  }
562
- }, {
563
- key: "getDiva3dUseImageCache",
564
- value: function getDiva3dUseImageCache() {
565
- var _this$divaWebConfigDa10;
566
- return !!((_this$divaWebConfigDa10 = this.divaWebConfigData) !== null && _this$divaWebConfigDa10 !== void 0 && _this$divaWebConfigDa10.diva3dUseImageCache);
567
- }
568
- }, {
569
- key: "getDiva3DSuppressCacheCreation",
570
- value: function getDiva3DSuppressCacheCreation() {
571
- var _this$divaWebConfigDa11;
572
- return !!((_this$divaWebConfigDa11 = this.divaWebConfigData) !== null && _this$divaWebConfigDa11 !== void 0 && _this$divaWebConfigDa11.diva3dSuppressCacheCreation);
573
- }
574
- }, {
575
- key: "getDiva3dUseSirvViewer",
576
- value: function getDiva3dUseSirvViewer() {
577
- var _this$divaWebConfigDa12;
578
- return !!((_this$divaWebConfigDa12 = this.divaWebConfigData) !== null && _this$divaWebConfigDa12 !== void 0 && _this$divaWebConfigDa12.diva3dUseSirvViewer);
579
- }
580
551
  }, {
581
552
  key: "getServerId",
582
553
  value: function getServerId() {
@@ -612,80 +583,86 @@ var DivaApiHandler = /*#__PURE__*/function () {
612
583
  }, {
613
584
  key: "getDiva3dStaticBGImage",
614
585
  value: function getDiva3dStaticBGImage() {
615
- var _this$divaWebConfigDa13;
616
- return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3dStaticBGImage;
586
+ var _this$divaWebConfigDa10;
587
+ return (_this$divaWebConfigDa10 = this.divaWebConfigData) === null || _this$divaWebConfigDa10 === void 0 ? void 0 : _this$divaWebConfigDa10.diva3dStaticBGImage;
617
588
  }
618
589
  }, {
619
590
  key: "getDiva3dStaticBGImage_DefaultRoomList",
620
591
  value: function getDiva3dStaticBGImage_DefaultRoomList() {
621
- var _this$divaWebConfigDa14, _this$divaWebConfigDa15;
622
- return ((_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa15 = this.divaWebConfigData) === null || _this$divaWebConfigDa15 === void 0 ? void 0 : _this$divaWebConfigDa15.diva3dStaticBGImage_DefaultRoomList;
592
+ var _this$divaWebConfigDa11, _this$divaWebConfigDa12;
593
+ return ((_this$divaWebConfigDa11 = this.divaWebConfigData) === null || _this$divaWebConfigDa11 === void 0 ? void 0 : _this$divaWebConfigDa11.diva3dStaticBGImage_DefaultRoomList) == '' ? '3D_STATBG_ROOMLIST' : (_this$divaWebConfigDa12 = this.divaWebConfigData) === null || _this$divaWebConfigDa12 === void 0 ? void 0 : _this$divaWebConfigDa12.diva3dStaticBGImage_DefaultRoomList;
623
594
  }
624
595
  }, {
625
596
  key: "getDiva3DAllowDefaultCatRoomList",
626
597
  value: function getDiva3DAllowDefaultCatRoomList() {
627
- var _this$divaWebConfigDa16;
628
- return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.diva3DAllowDefaultCatRoomList;
598
+ var _this$divaWebConfigDa13;
599
+ return (_this$divaWebConfigDa13 = this.divaWebConfigData) === null || _this$divaWebConfigDa13 === void 0 ? void 0 : _this$divaWebConfigDa13.diva3DAllowDefaultCatRoomList;
629
600
  }
630
601
  }, {
631
602
  key: "doAllowSetPlanner",
632
603
  value: function doAllowSetPlanner() {
633
- var _this$divaWebConfigDa17;
634
- return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.doAllowSetPlanner;
604
+ var _this$divaWebConfigDa14;
605
+ return (_this$divaWebConfigDa14 = this.divaWebConfigData) === null || _this$divaWebConfigDa14 === void 0 ? void 0 : _this$divaWebConfigDa14.doAllowSetPlanner;
635
606
  }
636
607
  }, {
637
608
  key: "getHidePlanner",
638
609
  value: function getHidePlanner() {
639
- var _this$divaWebConfigDa18;
640
- return !!((_this$divaWebConfigDa18 = this.divaWebConfigData) !== null && _this$divaWebConfigDa18 !== void 0 && (_this$divaWebConfigDa18 = _this$divaWebConfigDa18.viewConfig) !== null && _this$divaWebConfigDa18 !== void 0 && _this$divaWebConfigDa18.hidePlanner);
610
+ var _this$divaWebConfigDa15;
611
+ return !!((_this$divaWebConfigDa15 = this.divaWebConfigData) !== null && _this$divaWebConfigDa15 !== void 0 && (_this$divaWebConfigDa15 = _this$divaWebConfigDa15.viewConfig) !== null && _this$divaWebConfigDa15 !== void 0 && _this$divaWebConfigDa15.hidePlanner);
641
612
  }
642
613
  }, {
643
614
  key: "getDoShowAR",
644
615
  value: function getDoShowAR() {
645
- var _this$divaWebConfigDa19;
646
- return (_this$divaWebConfigDa19 = this.divaWebConfigData) === null || _this$divaWebConfigDa19 === void 0 || (_this$divaWebConfigDa19 = _this$divaWebConfigDa19.viewConfig) === null || _this$divaWebConfigDa19 === void 0 ? void 0 : _this$divaWebConfigDa19.enableAR;
616
+ var _this$divaWebConfigDa16;
617
+ return (_this$divaWebConfigDa16 = this.divaWebConfigData) === null || _this$divaWebConfigDa16 === void 0 || (_this$divaWebConfigDa16 = _this$divaWebConfigDa16.viewConfig) === null || _this$divaWebConfigDa16 === void 0 ? void 0 : _this$divaWebConfigDa16.enableAR;
618
+ }
619
+ }, {
620
+ key: "forceShowRTV",
621
+ value: function forceShowRTV() {
622
+ var _this$divaWebConfigDa17;
623
+ return (_this$divaWebConfigDa17 = this.divaWebConfigData) === null || _this$divaWebConfigDa17 === void 0 || (_this$divaWebConfigDa17 = _this$divaWebConfigDa17.viewConfig) === null || _this$divaWebConfigDa17 === void 0 ? void 0 : _this$divaWebConfigDa17.forceRTV;
647
624
  }
648
625
  }, {
649
626
  key: "getDoShowRTV",
650
627
  value: function getDoShowRTV() {
651
- var _this$divaWebConfigDa20;
652
- return (_this$divaWebConfigDa20 = this.divaWebConfigData) === null || _this$divaWebConfigDa20 === void 0 || (_this$divaWebConfigDa20 = _this$divaWebConfigDa20.viewConfig) === null || _this$divaWebConfigDa20 === void 0 ? void 0 : _this$divaWebConfigDa20.enableRTV;
628
+ var _this$divaWebConfigDa18;
629
+ return (_this$divaWebConfigDa18 = this.divaWebConfigData) === null || _this$divaWebConfigDa18 === void 0 || (_this$divaWebConfigDa18 = _this$divaWebConfigDa18.viewConfig) === null || _this$divaWebConfigDa18 === void 0 ? void 0 : _this$divaWebConfigDa18.enableRTV;
653
630
  }
654
631
  }, {
655
632
  key: "getEnableRTVUnityKombi",
656
633
  value: function getEnableRTVUnityKombi() {
657
- var _this$divaWebConfigDa21;
658
- return !!((_this$divaWebConfigDa21 = this.divaWebConfigData) !== null && _this$divaWebConfigDa21 !== void 0 && _this$divaWebConfigDa21.viewConfig.enableRtvUnityKombi);
634
+ var _this$divaWebConfigDa19;
635
+ return !!((_this$divaWebConfigDa19 = this.divaWebConfigData) !== null && _this$divaWebConfigDa19 !== void 0 && _this$divaWebConfigDa19.viewConfig.enableRtvUnityKombi);
659
636
  }
660
637
  }, {
661
638
  key: "getDoDisablePlanner2D",
662
639
  value: function getDoDisablePlanner2D() {
663
- var _this$divaWebConfigDa22;
664
- return !!((_this$divaWebConfigDa22 = this.divaWebConfigData) !== null && _this$divaWebConfigDa22 !== void 0 && _this$divaWebConfigDa22.doDisablePlanner2D);
640
+ var _this$divaWebConfigDa20;
641
+ return !!((_this$divaWebConfigDa20 = this.divaWebConfigData) !== null && _this$divaWebConfigDa20 !== void 0 && _this$divaWebConfigDa20.doDisablePlanner2D);
665
642
  }
666
643
  }, {
667
644
  key: "getRoomListInProduct",
668
645
  value: function getRoomListInProduct() {
669
- var _this$divaWebConfigDa23;
670
- return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && (_this$divaWebConfigDa23 = _this$divaWebConfigDa23.viewConfig) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.roomListInProduct);
646
+ var _this$divaWebConfigDa21;
647
+ return !!((_this$divaWebConfigDa21 = this.divaWebConfigData) !== null && _this$divaWebConfigDa21 !== void 0 && (_this$divaWebConfigDa21 = _this$divaWebConfigDa21.viewConfig) !== null && _this$divaWebConfigDa21 !== void 0 && _this$divaWebConfigDa21.roomListInProduct);
671
648
  }
672
649
  }, {
673
650
  key: "getPlannerType",
674
651
  value: function getPlannerType() {
675
- var _this$divaWebConfigDa24;
676
- return (_this$divaWebConfigDa24 = this.divaWebConfigData) === null || _this$divaWebConfigDa24 === void 0 || (_this$divaWebConfigDa24 = _this$divaWebConfigDa24.viewConfig) === null || _this$divaWebConfigDa24 === void 0 ? void 0 : _this$divaWebConfigDa24.plannerType;
652
+ var _this$divaWebConfigDa22;
653
+ return (_this$divaWebConfigDa22 = this.divaWebConfigData) === null || _this$divaWebConfigDa22 === void 0 || (_this$divaWebConfigDa22 = _this$divaWebConfigDa22.viewConfig) === null || _this$divaWebConfigDa22 === void 0 ? void 0 : _this$divaWebConfigDa22.plannerType;
677
654
  }
678
655
  }, {
679
656
  key: "getLoadSupplierColors",
680
657
  value: function getLoadSupplierColors() {
681
- var _this$divaWebConfigDa25;
682
- return !!((_this$divaWebConfigDa25 = this.divaWebConfigData) !== null && _this$divaWebConfigDa25 !== void 0 && _this$divaWebConfigDa25.loadSupplierColors);
658
+ var _this$divaWebConfigDa23;
659
+ return !!((_this$divaWebConfigDa23 = this.divaWebConfigData) !== null && _this$divaWebConfigDa23 !== void 0 && _this$divaWebConfigDa23.loadSupplierColors);
683
660
  }
684
661
  }, {
685
662
  key: "showSelectionModeZero",
686
663
  value: function showSelectionModeZero() {
687
- var _this$divaWebConfigDa26;
688
- return !!((_this$divaWebConfigDa26 = this.divaWebConfigData) !== null && _this$divaWebConfigDa26 !== void 0 && _this$divaWebConfigDa26.showSelectionModeZero);
664
+ var _this$divaWebConfigDa24;
665
+ return !!((_this$divaWebConfigDa24 = this.divaWebConfigData) !== null && _this$divaWebConfigDa24 !== void 0 && _this$divaWebConfigDa24.showSelectionModeZero);
689
666
  }
690
667
  }, {
691
668
  key: "ruleDescSeperator",
@@ -705,8 +682,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
705
682
  }, {
706
683
  key: "getDoCheckVariantData",
707
684
  value: function getDoCheckVariantData() {
708
- var _this$divaWebConfigDa27;
709
- return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.doCheckVariantData;
685
+ var _this$divaWebConfigDa25;
686
+ return (_this$divaWebConfigDa25 = this.divaWebConfigData) === null || _this$divaWebConfigDa25 === void 0 ? void 0 : _this$divaWebConfigDa25.doCheckVariantData;
710
687
  }
711
688
  }, {
712
689
  key: "setI18n",
@@ -799,50 +776,50 @@ var DivaApiHandler = /*#__PURE__*/function () {
799
776
  }, {
800
777
  key: "getViewConfig",
801
778
  value: function getViewConfig() {
802
- var _this$divaWebConfigDa28;
803
- return (_this$divaWebConfigDa28 = this.divaWebConfigData) === null || _this$divaWebConfigDa28 === void 0 ? void 0 : _this$divaWebConfigDa28.viewConfig;
779
+ var _this$divaWebConfigDa26;
780
+ return (_this$divaWebConfigDa26 = this.divaWebConfigData) === null || _this$divaWebConfigDa26 === void 0 ? void 0 : _this$divaWebConfigDa26.viewConfig;
804
781
  }
805
782
  }, {
806
783
  key: "getEmailConfig",
807
784
  value: function getEmailConfig() {
808
- var _this$divaWebConfigDa29;
809
- return (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.emailConfig;
785
+ var _this$divaWebConfigDa27;
786
+ return (_this$divaWebConfigDa27 = this.divaWebConfigData) === null || _this$divaWebConfigDa27 === void 0 ? void 0 : _this$divaWebConfigDa27.emailConfig;
810
787
  }
811
788
  }, {
812
789
  key: "getABTestCases",
813
790
  value: function getABTestCases() {
814
- var _this$divaWebConfigDa30, _this$divaWebConfigDa31;
815
- return (_this$divaWebConfigDa30 = (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.abTestCases) !== null && _this$divaWebConfigDa30 !== void 0 ? _this$divaWebConfigDa30 : [];
791
+ var _this$divaWebConfigDa28, _this$divaWebConfigDa29;
792
+ return (_this$divaWebConfigDa28 = (_this$divaWebConfigDa29 = this.divaWebConfigData) === null || _this$divaWebConfigDa29 === void 0 ? void 0 : _this$divaWebConfigDa29.abTestCases) !== null && _this$divaWebConfigDa28 !== void 0 ? _this$divaWebConfigDa28 : [];
816
793
  }
817
794
  }, {
818
795
  key: "getBarrierConfig",
819
796
  value: function getBarrierConfig() {
820
- var _this$divaWebConfigDa32;
821
- return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.barrierConfig;
797
+ var _this$divaWebConfigDa30;
798
+ return (_this$divaWebConfigDa30 = this.divaWebConfigData) === null || _this$divaWebConfigDa30 === void 0 ? void 0 : _this$divaWebConfigDa30.barrierConfig;
822
799
  }
823
800
  }, {
824
801
  key: "getTemplateConfig",
825
802
  value: function getTemplateConfig() {
826
- var _this$divaWebConfigDa33;
827
- return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.templateConfig;
803
+ var _this$divaWebConfigDa31;
804
+ return (_this$divaWebConfigDa31 = this.divaWebConfigData) === null || _this$divaWebConfigDa31 === void 0 ? void 0 : _this$divaWebConfigDa31.templateConfig;
828
805
  }
829
806
  }, {
830
807
  key: "showDivaNr",
831
808
  value: function showDivaNr() {
832
- var _this$divaWebConfigDa34;
833
- return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.showDivaNr;
809
+ var _this$divaWebConfigDa32;
810
+ return (_this$divaWebConfigDa32 = this.divaWebConfigData) === null || _this$divaWebConfigDa32 === void 0 ? void 0 : _this$divaWebConfigDa32.showDivaNr;
834
811
  }
835
812
  }, {
836
813
  key: "onErrorHandling",
837
814
  value: function onErrorHandling() {
838
- var _this$divaWebConfigDa35;
839
- return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.onErrorHandling;
815
+ var _this$divaWebConfigDa33;
816
+ return (_this$divaWebConfigDa33 = this.divaWebConfigData) === null || _this$divaWebConfigDa33 === void 0 ? void 0 : _this$divaWebConfigDa33.onErrorHandling;
840
817
  }
841
818
  }, {
842
819
  key: "diva3DRenderingDefault",
843
820
  value: function diva3DRenderingDefault() {
844
- var _this$divaWebConfigDa36;
845
- return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.diva3DRenderingDefault;
821
+ var _this$divaWebConfigDa34;
822
+ return (_this$divaWebConfigDa34 = this.divaWebConfigData) === null || _this$divaWebConfigDa34 === void 0 ? void 0 : _this$divaWebConfigDa34.diva3DRenderingDefault;
846
823
  }
847
824
  }, {
848
825
  key: "getJwt",
@@ -857,8 +834,8 @@ var DivaApiHandler = /*#__PURE__*/function () {
857
834
  }, {
858
835
  key: "getUseMask",
859
836
  value: function getUseMask() {
860
- var _this$divaWebConfigDa37;
861
- return (_this$divaWebConfigDa37 = this.divaWebConfigData) === null || _this$divaWebConfigDa37 === void 0 ? void 0 : _this$divaWebConfigDa37.useMask;
837
+ var _this$divaWebConfigDa35;
838
+ return (_this$divaWebConfigDa35 = this.divaWebConfigData) === null || _this$divaWebConfigDa35 === void 0 ? void 0 : _this$divaWebConfigDa35.useMask;
862
839
  }
863
840
  }, {
864
841
  key: "apiUrl",
@@ -949,7 +926,7 @@ var DivaApiHandler = /*#__PURE__*/function () {
949
926
  }, {
950
927
  key: "getCatalogProductUrl",
951
928
  value: function getCatalogProductUrl(catalogCodex) {
952
- var search = '{catCodex,contains,' + catalogCodex + '},{available,eq,true}';
929
+ var search = '{catCodex,contains,' + catalogCodex + "},{availableForOrganizations,eq,".concat(this.organization._id, "}");
953
930
  return '/v1/products?' + 'search=' + encodeURIComponent('[' + search + ']') + '&organizationIds=' + this.organization._id + '&fields=' + encodeURIComponent('{divaNr,addedPrice,discountedPrice,shortDescription,image,dockingPoints,articles,originDivaNr,variantId,affiliate,retailerArticleNr,minQuantity,increments,calculatedPrice}');
954
931
  }
955
932
  }, {
@@ -1150,12 +1127,6 @@ var DivaApiHandler = /*#__PURE__*/function () {
1150
1127
  value: function getImageURL(image, mediaURL) {
1151
1128
  var ret = '';
1152
1129
  if (image != '' && image != null) {
1153
- if (DivaUtils__default["default"].CacheIsEnabled) {
1154
- ret = DivaUtils__default["default"].getCacheData(image.toUpperCase(), '');
1155
- if (ret) {
1156
- return ret;
1157
- }
1158
- }
1159
1130
  var header = image.substring(0, 4).toLowerCase();
1160
1131
  if (header == 'http' || header == 'data') {
1161
1132
  ret = image;
@@ -1396,8 +1367,14 @@ var DivaApiHandler = /*#__PURE__*/function () {
1396
1367
  }, {
1397
1368
  key: "dontLoadAdditionalModelInfos",
1398
1369
  get: function get() {
1399
- var _this$divaWebConfigDa38;
1400
- return (_this$divaWebConfigDa38 = this.divaWebConfigData) === null || _this$divaWebConfigDa38 === void 0 ? void 0 : _this$divaWebConfigDa38.dontLoadAdditionalModelInfos;
1370
+ var _this$divaWebConfigDa36;
1371
+ return (_this$divaWebConfigDa36 = this.divaWebConfigData) === null || _this$divaWebConfigDa36 === void 0 ? void 0 : _this$divaWebConfigDa36.dontLoadAdditionalModelInfos;
1372
+ }
1373
+ }, {
1374
+ key: "dontLoadCatalogEditorLiteMask",
1375
+ get: function get() {
1376
+ var _this$divaWebConfigDa37;
1377
+ return (_this$divaWebConfigDa37 = this.divaWebConfigData) === null || _this$divaWebConfigDa37 === void 0 ? void 0 : _this$divaWebConfigDa37.dontLoadCatalogEditorLiteMask;
1401
1378
  }
1402
1379
  }, {
1403
1380
  key: "OrganizationId",
@@ -1708,7 +1685,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
1708
1685
  catalogOPV: catalogOPV,
1709
1686
  pac: jsonOPV.PAC,
1710
1687
  pgr: jsonOPV.PGR,
1711
- isRendered: jsonOPV.IsRendered != undefined ? jsonOPV.IsRendered : true,
1712
1688
  subArticleCodex: jsonOPV.SubArticleCodex && jsonOPV.SubArticleCodex != '' ? jsonOPV.SubArticleCodex : undefined,
1713
1689
  subArticleTypeNr: jsonOPV.SubArticleTypeNr && jsonOPV.SubArticleTypeNr != '' ? jsonOPV.SubArticleTypeNr : undefined,
1714
1690
  subRetailArticleNr: jsonOPV.SubRetailArticleNr && jsonOPV.SubRetailArticleNr != '' ? jsonOPV.SubRetailArticleNr : undefined,
@@ -2045,11 +2021,6 @@ var ArticleOptionValueData = /*#__PURE__*/function () {
2045
2021
  get: function get() {
2046
2022
  return this.opv.catalogOPV.value;
2047
2023
  }
2048
- }, {
2049
- key: "isDigitalized",
2050
- get: function get() {
2051
- return this.opv.isRendered;
2052
- }
2053
2024
  }, {
2054
2025
  key: "metaData",
2055
2026
  get: function get() {
@@ -15964,10 +15935,10 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
15964
15935
  _mask$name,
15965
15936
  _catalog$api$getLangu,
15966
15937
  _mask$name2,
15967
- _mask$groupName$catal,
15968
- _mask$groupName,
15938
+ _mask$groupname$catal,
15939
+ _mask$groupname,
15969
15940
  _catalog$api$getLangu2,
15970
- _mask$groupName2,
15941
+ _mask$groupname2,
15971
15942
  _jsonOPV$MeasureStep,
15972
15943
  _jsonOPV$Metadatas,
15973
15944
  _mask$properties;
@@ -16038,8 +16009,8 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16038
16009
  isTexture: jsonOPV.IsTexture && jsonOPV.IsTexture == 'True' ? true : false,
16039
16010
  description: jsonOPV.Description,
16040
16011
  description_locales: jsonOPV.Description_locales,
16041
- groupName: ((_mask$groupName$catal = mask === null || mask === void 0 || (_mask$groupName = mask.groupName) === null || _mask$groupName === void 0 ? void 0 : _mask$groupName[(_catalog$api$getLangu2 = catalog.api.getLanguage()) === null || _catalog$api$getLangu2 === void 0 ? void 0 : _catalog$api$getLangu2.toLowerCase()]) !== null && _mask$groupName$catal !== void 0 ? _mask$groupName$catal : jsonOPV.GroupName && jsonOPV.GroupName != '') ? jsonOPV.GroupName : undefined,
16042
- groupName_locales: (_mask$groupName2 = mask === null || mask === void 0 ? void 0 : mask.groupName) !== null && _mask$groupName2 !== void 0 ? _mask$groupName2 : jsonOPV.GroupName_locales,
16012
+ groupName: (_mask$groupname$catal = mask === null || mask === void 0 || (_mask$groupname = mask.groupname) === null || _mask$groupname === void 0 ? void 0 : _mask$groupname[(_catalog$api$getLangu2 = catalog.api.getLanguage()) === null || _catalog$api$getLangu2 === void 0 ? void 0 : _catalog$api$getLangu2.toLowerCase()]) !== null && _mask$groupname$catal !== void 0 ? _mask$groupname$catal : jsonOPV.GroupName && jsonOPV.GroupName != '' ? jsonOPV.GroupName : undefined,
16013
+ groupName_locales: (_mask$groupname2 = mask === null || mask === void 0 ? void 0 : mask.groupname) !== null && _mask$groupname2 !== void 0 ? _mask$groupname2 : jsonOPV.GroupName_locales,
16043
16014
  hiddenByMask: mask === null || mask === void 0 ? void 0 : mask.hidden,
16044
16015
  textureName: jsonOPV.TextureName && jsonOPV.TextureName != '' ? jsonOPV.TextureName : jsonOPV.PFTFile && jsonOPV.PFTFile != '' ? jsonOPV.PFTFile : undefined,
16045
16016
  material: jsonOPV.Material && jsonOPV.Material != '' ? jsonOPV.Material : undefined,
@@ -16404,8 +16375,8 @@ var CatalogArticleData = /*#__PURE__*/function () {
16404
16375
  _catalogData$api$getL,
16405
16376
  _jsonArticle$Metadata,
16406
16377
  _articleMask$properti,
16407
- _articleMask$groupNam,
16408
- _articleMask$groupNam2,
16378
+ _articleMask$groupnam,
16379
+ _articleMask$groupnam2,
16409
16380
  _catalogData$api$getL2,
16410
16381
  _articleMask$hidden;
16411
16382
  _classCallCheck__default["default"](this, CatalogArticleData);
@@ -16439,7 +16410,7 @@ var CatalogArticleData = /*#__PURE__*/function () {
16439
16410
  image: jsonArticle.Image && jsonArticle.Image != '' ? jsonArticle.Image : undefined,
16440
16411
  imageWidth: jsonArticle.ImageWidth ? jsonArticle.ImageWidth : undefined,
16441
16412
  imageHeight: jsonArticle.ImageHeight ? jsonArticle.ImageHeight : undefined,
16442
- groupName: (_articleMask$groupNam = articleMask === null || articleMask === void 0 || (_articleMask$groupNam2 = articleMask.groupName) === null || _articleMask$groupNam2 === void 0 ? void 0 : _articleMask$groupNam2[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()]) !== null && _articleMask$groupNam !== void 0 ? _articleMask$groupNam : jsonArticle.GroupName,
16413
+ groupName: (_articleMask$groupnam = articleMask === null || articleMask === void 0 || (_articleMask$groupnam2 = articleMask.groupname) === null || _articleMask$groupnam2 === void 0 ? void 0 : _articleMask$groupnam2[(_catalogData$api$getL2 = catalogData.api.getLanguage()) === null || _catalogData$api$getL2 === void 0 ? void 0 : _catalogData$api$getL2.toLowerCase()]) !== null && _articleMask$groupnam !== void 0 ? _articleMask$groupnam : jsonArticle.GroupName,
16443
16414
  mainCategory: jsonArticle.MainCategory && jsonArticle.MainCategory != '' ? jsonArticle.MainCategory : undefined,
16444
16415
  width: jsonArticle.Width && jsonArticle.Width != '' ? Number(jsonArticle.Width.replace('cm', '').replace(',', '.')) : undefined,
16445
16416
  height: jsonArticle.Height && jsonArticle.Height != '' ? Number(jsonArticle.Height.replace('cm', '').replace(',', '.')) : undefined,
@@ -18132,6 +18103,8 @@ var OptionCatalogData = /*#__PURE__*/function () {
18132
18103
  }]);
18133
18104
  }();
18134
18105
 
18106
+ function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18107
+ function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18135
18108
  var LOG$e = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
18136
18109
 
18137
18110
  /*
@@ -18342,8 +18315,9 @@ var DivaCatalogData = /*#__PURE__*/function () {
18342
18315
  this.catalogData.mediaUrl = this.getMediaURL(json.SubFolder);
18343
18316
  }
18344
18317
  if (json.Properties) {
18318
+ var _this$catalogMask$cat, _this$catalogMask;
18345
18319
  this.origProperties = json.Properties;
18346
- this.initProperties(json.Properties);
18320
+ this.initProperties([].concat(_toConsumableArray__default["default"](json.Properties), _toConsumableArray__default["default"]((_this$catalogMask$cat = (_this$catalogMask = this.catalogMask) === null || _this$catalogMask === void 0 || (_this$catalogMask = _this$catalogMask.catalog) === null || _this$catalogMask === void 0 ? void 0 : _this$catalogMask.properties) !== null && _this$catalogMask$cat !== void 0 ? _this$catalogMask$cat : [])));
18347
18321
  }
18348
18322
  this.plannerPaletteViewInfo = {
18349
18323
  catalogPlannerArticles: [],
@@ -18361,13 +18335,13 @@ var DivaCatalogData = /*#__PURE__*/function () {
18361
18335
  }
18362
18336
  return _createClass__default["default"](DivaCatalogData, [{
18363
18337
  key: "initMask",
18364
- value: function initMask() {
18365
- var _this$catalogMask;
18366
- if ((_this$catalogMask = this.catalogMask) !== null && _this$catalogMask !== void 0 && _this$catalogMask.catalog) {
18367
- var _this$catalogMask$cat;
18368
- if ((_this$catalogMask$cat = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat !== void 0 && _this$catalogMask$cat[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
18338
+ value: function initMask(initProps) {
18339
+ var _this$catalogMask2;
18340
+ if ((_this$catalogMask2 = this.catalogMask) !== null && _this$catalogMask2 !== void 0 && _this$catalogMask2.catalog) {
18341
+ var _this$catalogMask$cat2;
18342
+ if ((_this$catalogMask$cat2 = this.catalogMask.catalog.name) !== null && _this$catalogMask$cat2 !== void 0 && _this$catalogMask$cat2[this.api.getLanguage()]) this.catalogData.catalogName = this.catalogMask.catalog.name[this.api.getLanguage()];
18369
18343
  if (this.catalogMask.catalog.name) this.catalogData.name_locales = this.catalogMask.catalog.name;
18370
- if (this.catalogMask.catalog.properties) this.initProperties([].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](this.catalogMask.catalog.properties)));
18344
+ if (this.catalogMask.catalog.properties && initProps) this.initProperties([].concat(_toConsumableArray__default["default"](this.origProperties), _toConsumableArray__default["default"](this.catalogMask.catalog.properties)));
18371
18345
  }
18372
18346
  }
18373
18347
  }, {
@@ -19587,7 +19561,7 @@ var DivaCatalogData = /*#__PURE__*/function () {
19587
19561
  if (!this.additionalModelInfos) throw new Error('additionalModelInfos dont exist for this catalog');
19588
19562
  this.updateMask(newMask).then(function (r) {
19589
19563
  _this3.additionalModelInfos = r;
19590
- _this3.initMask();
19564
+ _this3.initMask(true);
19591
19565
  });
19592
19566
  }
19593
19567
  }, {
@@ -19638,6 +19612,37 @@ var DivaCatalogData = /*#__PURE__*/function () {
19638
19612
  }()
19639
19613
  }]);
19640
19614
  }();
19615
+ var mapMask = function mapMask(mask) {
19616
+ var _mappedMask$catalog;
19617
+ if (!mask) return undefined;
19618
+ var mappedMask = _objectSpread$e({}, mask);
19619
+ var mapProperties = function mapProperties(props) {
19620
+ if (Array.isArray(props)) return props;
19621
+ var mappedProps = [];
19622
+ for (var key in props) {
19623
+ var prop = props[key];
19624
+ mappedProps.push({
19625
+ Codex: key,
19626
+ Name: prop.name,
19627
+ Value: prop.value
19628
+ });
19629
+ }
19630
+ return mappedProps;
19631
+ };
19632
+ if ((_mappedMask$catalog = mappedMask.catalog) !== null && _mappedMask$catalog !== void 0 && _mappedMask$catalog.properties) {
19633
+ mappedMask.catalog.properties = mapProperties(mappedMask.catalog.properties);
19634
+ }
19635
+ if (mappedMask.articles) for (var articleCodex in mappedMask.articles) {
19636
+ if (mappedMask.articles[articleCodex].properties) mappedMask.articles[articleCodex].properties = mapProperties(mappedMask.articles[articleCodex].properties);
19637
+ }
19638
+ if (mappedMask.options) for (var opt in mappedMask.options) {
19639
+ if (mappedMask.options[opt].properties) mappedMask.options[opt].properties = mapProperties(mappedMask.options[opt].properties);
19640
+ }
19641
+ if (mappedMask.optionvalues) for (var opv in mappedMask.optionvalues) {
19642
+ if (mappedMask.optionvalues[opv].properties) mappedMask.optionvalues[opv].properties = mapProperties(mappedMask.optionvalues[opv].properties);
19643
+ }
19644
+ return mappedMask;
19645
+ };
19641
19646
 
19642
19647
  var LOG$d = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
19643
19648
  var DivaCatalogHandler = /*#__PURE__*/function () {
@@ -19660,7 +19665,7 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19660
19665
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19661
19666
  case 5:
19662
19667
  if (!orderSet) {
19663
- _context.next = 46;
19668
+ _context.next = 47;
19664
19669
  break;
19665
19670
  }
19666
19671
  // ab hier parallell laden
@@ -19683,47 +19688,52 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19683
19688
  additionalModelInfos = undefined;
19684
19689
  mask = undefined;
19685
19690
  _context.prev = 19;
19686
- _context.next = 22;
19691
+ if (state.api.dontLoadCatalogEditorLiteMask) {
19692
+ _context.next = 24;
19693
+ break;
19694
+ }
19695
+ _context.next = 23;
19687
19696
  return state.api.getDataCache(state.api.getCatalogMaskQS(catalogApiData.GUID, state.api.OrganizationId), undefined, undefined, 'enricher');
19688
- case 22:
19697
+ case 23:
19689
19698
  mask = _context.sent;
19699
+ case 24:
19690
19700
  if (!(!state.api.dontLoadAdditionalModelInfos && catalogApiData.AccountGuid)) {
19691
- _context.next = 27;
19701
+ _context.next = 28;
19692
19702
  break;
19693
19703
  }
19694
- _context.next = 26;
19704
+ _context.next = 27;
19695
19705
  return state.api.getDataCache(state.api.getAdditionalModelInfosQS(catalogApiData.AccountGuid, catalogApiData.GUID), undefined, undefined, 'catalog');
19696
- case 26:
19697
- additionalModelInfos = _context.sent;
19698
19706
  case 27:
19699
- _context.next = 32;
19707
+ additionalModelInfos = _context.sent;
19708
+ case 28:
19709
+ _context.next = 33;
19700
19710
  break;
19701
- case 29:
19702
- _context.prev = 29;
19711
+ case 30:
19712
+ _context.prev = 30;
19703
19713
  _context.t0 = _context["catch"](19);
19704
19714
  LOG$d.debug('no additionalModelInfos found: ' + _context.t0);
19705
- case 32:
19715
+ case 33:
19706
19716
  if (state.catalogMask || mask) {
19707
19717
  if (!additionalModelInfos) additionalModelInfos = {
19708
19718
  _id: ''
19709
19719
  };
19710
- additionalModelInfos.catalogMask = (_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask;
19720
+ additionalModelInfos.catalogMask = mapMask((_state$catalogMask = state.catalogMask) !== null && _state$catalogMask !== void 0 ? _state$catalogMask : mask);
19711
19721
  }
19712
19722
  catalogData = new DivaCatalogData(catalogApiData, orderSet, state.api, additionalModelInfos);
19713
19723
  if (!(catalogArticleListData.Articles && catalogArticleListData.Articles.length > 0)) {
19714
- _context.next = 38;
19724
+ _context.next = 39;
19715
19725
  break;
19716
19726
  }
19717
19727
  catalogData.initCatalogArticles(catalogArticleListData.Articles);
19718
- _context.next = 41;
19728
+ _context.next = 42;
19719
19729
  break;
19720
- case 38:
19730
+ case 39:
19721
19731
  DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
19722
19732
  LOG$d.error(new DivaUtils.DivaError('Catalog ' + catalogData.catalogName + ' not listed', {
19723
19733
  code: 'WC_0002'
19724
19734
  }));
19725
19735
  throw new Error('Articles of Catalog: ' + catalogData.catalogCodex + ' are empty');
19726
- case 41:
19736
+ case 42:
19727
19737
  if (catalogArticlePlannerListData.PlannerElements && catalogArticlePlannerListData.PlannerElements.length > 0) {
19728
19738
  catalogData.initCatalogPlannerArticles(catalogArticlePlannerListData.PlannerElements);
19729
19739
  }
@@ -19740,16 +19750,16 @@ var DivaCatalogHandler = /*#__PURE__*/function () {
19740
19750
 
19741
19751
  DivaUtils__default["default"].endSpanOfApm('Catalog initialize');
19742
19752
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19743
- case 46:
19753
+ case 47:
19744
19754
  LOG$d.error(new DivaUtils.DivaError('Catalog: ' + catalogCodex + ' not initialized! and orderSet not set', {
19745
19755
  code: 'WC_0007'
19746
19756
  }));
19747
19757
  return _context.abrupt("return", state.divaCatalogs[catalogKey]);
19748
- case 48:
19758
+ case 49:
19749
19759
  case "end":
19750
19760
  return _context.stop();
19751
19761
  }
19752
- }, _callee, null, [[19, 29]]);
19762
+ }, _callee, null, [[19, 30]]);
19753
19763
  }));
19754
19764
  function getCatalogData(_x, _x2, _x3) {
19755
19765
  return _getCatalogData.apply(this, arguments);
@@ -20259,12 +20269,6 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20259
20269
  set: function set(val) {
20260
20270
  this.articleOptionState.freeTextLang = val;
20261
20271
  }
20262
- }, {
20263
- key: "isNotVisualized",
20264
- get: function get() {
20265
- var _this$val20;
20266
- return ((_this$val20 = this.val) === null || _this$val20 === void 0 ? void 0 : _this$val20.isDigitalized) == false && this.val.isTexture;
20267
- }
20268
20272
  }, {
20269
20273
  key: "onlyVisibleIfNotUndock",
20270
20274
  get: function get() {
@@ -20292,8 +20296,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20292
20296
  }, {
20293
20297
  key: "warning",
20294
20298
  get: function get() {
20295
- var _this$val21;
20296
- if ((_this$val21 = this.val) !== null && _this$val21 !== void 0 && _this$val21.isFreeText) {
20299
+ var _this$val20;
20300
+ if ((_this$val20 = this.val) !== null && _this$val20 !== void 0 && _this$val20.isFreeText) {
20297
20301
  if (this.val.measureMaximum && Number(this.freeText) > Number(this.val.measureMaximum) || this.val.measureMinimum && Number(this.freeText) < Number(this.val.measureMinimum)) {
20298
20302
  return 'measureWarning';
20299
20303
  }
@@ -20391,8 +20395,8 @@ var ArticleOptionStateData = /*#__PURE__*/function () {
20391
20395
  }]);
20392
20396
  }();
20393
20397
 
20394
- function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20395
- function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20398
+ function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20399
+ function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
20396
20400
  var LOG$c = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
20397
20401
  var DivaArticle = /*#__PURE__*/function () {
20398
20402
  //Hier steht die aktuelle Konfiguration
@@ -20602,7 +20606,7 @@ var DivaArticle = /*#__PURE__*/function () {
20602
20606
  var partlistArticle = this.partlistArticles[basketId];
20603
20607
  if (!onlyVisible || partlistArticle.partlistArticleVisibleInTree) partlistArticles[basketId] = partlistArticle;
20604
20608
  if (partlistArticle.hasPartlistArticle) {
20605
- partlistArticles = _objectSpread$e(_objectSpread$e({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20609
+ partlistArticles = _objectSpread$d(_objectSpread$d({}, partlistArticles), partlistArticle.getRecursivePartlistArticles(onlyVisible));
20606
20610
  }
20607
20611
  }
20608
20612
  return partlistArticles;
@@ -20689,17 +20693,6 @@ var DivaArticle = /*#__PURE__*/function () {
20689
20693
  set: function set(val) {
20690
20694
  this.article.toDeleteAfterInit = val;
20691
20695
  }
20692
- }, {
20693
- key: "articleHasNotVisualizedValues",
20694
- get: function get() {
20695
- if (!this.model3DName) return false;
20696
- for (var key in this.articleOptionStates) {
20697
- if (!this.articleOptionStates[key].isNotVisualized) {
20698
- return true;
20699
- }
20700
- }
20701
- return false;
20702
- }
20703
20696
  }, {
20704
20697
  key: "actSizeText",
20705
20698
  get: function get() {
@@ -21074,13 +21067,13 @@ var DivaArticle = /*#__PURE__*/function () {
21074
21067
  }, {
21075
21068
  key: "articleOptionStatesWithParents",
21076
21069
  get: function get() {
21077
- return _objectSpread$e(_objectSpread$e({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21070
+ return _objectSpread$d(_objectSpread$d({}, this.getReqursiveArticleOptionStates()), this.articleOptionStatesData);
21078
21071
  }
21079
21072
  }, {
21080
21073
  key: "getReqursiveArticleOptionStates",
21081
21074
  value: function getReqursiveArticleOptionStates() {
21082
21075
  var _this$partListParentA6, _this$partListParentA7, _this$partListParentA8, _this$partListParentA9, _this$accessoireParen3, _this$accessoireParen4, _this$accessoireParen5, _this$accessoireParen6;
21083
- return _objectSpread$e(_objectSpread$e(_objectSpread$e(_objectSpread$e({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
21076
+ return _objectSpread$d(_objectSpread$d(_objectSpread$d(_objectSpread$d({}, (_this$partListParentA6 = (_this$partListParentA7 = this.partListParentArticle) === null || _this$partListParentA7 === void 0 ? void 0 : _this$partListParentA7.articleOptionStatesData) !== null && _this$partListParentA6 !== void 0 ? _this$partListParentA6 : {}), (_this$partListParentA8 = (_this$partListParentA9 = this.partListParentArticle) === null || _this$partListParentA9 === void 0 ? void 0 : _this$partListParentA9.getReqursiveArticleOptionStates()) !== null && _this$partListParentA8 !== void 0 ? _this$partListParentA8 : {}), (_this$accessoireParen3 = (_this$accessoireParen4 = this.accessoireParentArticle) === null || _this$accessoireParen4 === void 0 ? void 0 : _this$accessoireParen4.articleOptionStatesData) !== null && _this$accessoireParen3 !== void 0 ? _this$accessoireParen3 : {}), (_this$accessoireParen5 = (_this$accessoireParen6 = this.accessoireParentArticle) === null || _this$accessoireParen6 === void 0 ? void 0 : _this$accessoireParen6.getReqursiveArticleOptionStates()) !== null && _this$accessoireParen5 !== void 0 ? _this$accessoireParen5 : {});
21084
21077
  }
21085
21078
  }, {
21086
21079
  key: "clearArticleOptionStates",
@@ -22843,7 +22836,7 @@ var DivaArticle = /*#__PURE__*/function () {
22843
22836
  RuleDesc: myRuleDesc,
22844
22837
  RuleDesc_locales: myRuleDesc_locales,
22845
22838
  PosInvisibility: myPartListPos.PosInvisibility,
22846
- VariantValues: _objectSpread$e(_objectSpread$e({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
22839
+ VariantValues: _objectSpread$d(_objectSpread$d({}, (_previousPartlistArti = previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantValues) !== null && _previousPartlistArti !== void 0 ? _previousPartlistArti : {}), newConfigValues !== null && newConfigValues !== void 0 ? newConfigValues : {}),
22847
22840
  VariantItemData: previousPartlistArticle === null || previousPartlistArticle === void 0 ? void 0 : previousPartlistArticle.VariantItemData,
22848
22841
  optionImgForPrint: optionImgForPrint,
22849
22842
  optionsForPrint: optionsForPrint
@@ -22917,7 +22910,7 @@ var DivaArticle = /*#__PURE__*/function () {
22917
22910
  }
22918
22911
  for (var key in this.articleOptionStates) {
22919
22912
  var myOPS = this.articleOptionStates[key];
22920
- myOPS.visibleOptionValues = _objectSpread$e({}, myOPS.option.articleOptionValues);
22913
+ myOPS.visibleOptionValues = _objectSpread$d({}, myOPS.option.articleOptionValues);
22921
22914
  myOPS.visibleCount = Object.keys(myOPS.option.articleOptionValues).length;
22922
22915
  myOPS.definedBySetFeatureFixed = false;
22923
22916
  }
@@ -23148,7 +23141,7 @@ var DivaArticle = /*#__PURE__*/function () {
23148
23141
  }
23149
23142
  if (ruleValid) {
23150
23143
  ruleWasValidOnce = true;
23151
- if (m == 0) validOPVs[OPT] = _objectSpread$e({}, possibleOPVs);
23144
+ if (m == 0) validOPVs[OPT] = _objectSpread$d({}, possibleOPVs);
23152
23145
  opvCodex = opvCodex.slice(1);
23153
23146
  if (possibleOPVs[opvCodex] != null) delete validOPVs[OPT][opvCodex];
23154
23147
  }
@@ -23544,7 +23537,7 @@ var DivaArticle = /*#__PURE__*/function () {
23544
23537
  break;
23545
23538
  }
23546
23539
  _context.next = 4;
23547
- return Promise.resolve().then(function () { return require('./ShelfPlanner-af92cdfb.js'); });
23540
+ return Promise.resolve().then(function () { return require('./ShelfPlanner-561be11e.js'); });
23548
23541
  case 4:
23549
23542
  _yield$import = _context.sent;
23550
23543
  ShelfPlanner = _yield$import["default"];
@@ -23639,8 +23632,6 @@ var DivaArticle = /*#__PURE__*/function () {
23639
23632
  if (myArtOPS.replaceMainArtNr) {
23640
23633
  this.configArticleCodex = myArtOPS.replaceMainArtNr;
23641
23634
  }
23642
- var name = myArtOPS.name;
23643
- console.log('name', name);
23644
23635
  if (!tmpOPT.useMaxPriceOfGroup) {
23645
23636
  myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
23646
23637
  }
@@ -24147,7 +24138,7 @@ var DivaArticle = /*#__PURE__*/function () {
24147
24138
  */
24148
24139
  }, {
24149
24140
  key: "getPlannerConfigData",
24150
- value: function getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo) {
24141
+ value: function getPlannerConfigData(accessoireArticles, alternateRenderInfo) {
24151
24142
  var _this$doorPlanner2, _this$doorPlanner3;
24152
24143
  var ret = {
24153
24144
  N: this.name,
@@ -24155,8 +24146,8 @@ var DivaArticle = /*#__PURE__*/function () {
24155
24146
  ArtNr: this.article.catalogArticle.articleCodex,
24156
24147
  CFG: []
24157
24148
  };
24158
- var containsTextureNotDigitalized = this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24159
- if (!excludeInvalidCacheOptions) ret.CFG.push({
24149
+ this.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24150
+ ret.CFG.push({
24160
24151
  OPT: 'QUANTITY',
24161
24152
  OPV: this.quantity.toString()
24162
24153
  });
@@ -24185,41 +24176,32 @@ var DivaArticle = /*#__PURE__*/function () {
24185
24176
  ret['MOVE'] = doorInfo;
24186
24177
  }
24187
24178
  return {
24188
- config: ret,
24189
- containsTextureNotDigitalized: containsTextureNotDigitalized
24179
+ config: ret
24190
24180
  };
24191
24181
  }
24192
24182
  }, {
24193
24183
  key: "addOptionStateFromArticleToPlannerData",
24194
24184
  value: function addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo) {
24195
- var containsTextureNotDigitalized = false;
24196
24185
  for (var key in this.articleOptionStates) {
24197
- if (this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo)) {
24198
- containsTextureNotDigitalized = true;
24199
- }
24186
+ this.addOptionStateToPlannerData(ret, this.articleOptionStates[key], alternateRenderInfo);
24200
24187
  }
24201
24188
  for (var _key5 in this.article.partlistArticles) {
24202
24189
  var partlistArticle = this.article.partlistArticles[_key5];
24203
24190
  if (!partlistArticle.hasOptionsThatParentDoesNotHave) continue;
24204
- if (partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo)) {
24205
- containsTextureNotDigitalized = true;
24206
- }
24191
+ partlistArticle.addOptionStateFromArticleToPlannerData(ret, alternateRenderInfo);
24207
24192
  }
24208
- return containsTextureNotDigitalized;
24209
24193
  }
24210
24194
  }, {
24211
24195
  key: "addOptionStateToPlannerData",
24212
24196
  value: function addOptionStateToPlannerData(ret, ops, alternateRenderInfo) {
24213
24197
  var opv;
24214
24198
  var opt;
24215
- var containsTextureNotDigitalized = false;
24216
24199
  if (ops.val) {
24217
24200
  var _ops$val$ocd, _ops$option$ocd;
24218
24201
  opv = (_ops$val$ocd = ops.val.ocd) !== null && _ops$val$ocd !== void 0 ? _ops$val$ocd : ops.val.codex;
24219
24202
  if (this.CatalogData.isIDM3DCat && ops.val.vCodex) opv = 'OPV' + ops.idmVariantenArt + '_' + ops.val.vCodex;
24220
24203
  opt = (_ops$option$ocd = ops.option.ocd) !== null && _ops$option$ocd !== void 0 ? _ops$option$ocd : ops.optionCodex;
24221
24204
  if (alternateRenderInfo != undefined && alternateRenderInfo.hideOptionsIn3DImage.includes(opt)) return;
24222
- if (!ops.val.isDigitalized && ops.val.isTexture) containsTextureNotDigitalized = true;
24223
24205
  ret.CFG.push({
24224
24206
  OPT: opt,
24225
24207
  OPV: opv
@@ -24244,7 +24226,6 @@ var DivaArticle = /*#__PURE__*/function () {
24244
24226
  });
24245
24227
  }
24246
24228
  }
24247
- return containsTextureNotDigitalized;
24248
24229
  }
24249
24230
  }, {
24250
24231
  key: "getAccessoireMATData",
@@ -24306,7 +24287,7 @@ var DivaArticle = /*#__PURE__*/function () {
24306
24287
  key: "getVariantBasketData",
24307
24288
  value: function getVariantBasketData() {
24308
24289
  var variantBasketData = [];
24309
- var opsObj = _objectSpread$e({}, this.articleOptionStates);
24290
+ var opsObj = _objectSpread$d({}, this.articleOptionStates);
24310
24291
  if (this.article.optionsForPrint) {
24311
24292
  for (var i = 0; i < this.article.optionsForPrint.length; i++) {
24312
24293
  var ops = this.getArticleOptionState(this.article.optionsForPrint[i]);
@@ -24492,8 +24473,8 @@ var DivaArticle = /*#__PURE__*/function () {
24492
24473
  }]);
24493
24474
  }();
24494
24475
 
24495
- function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24496
- function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24476
+ function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24477
+ function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24497
24478
  var LOG$b = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
24498
24479
 
24499
24480
  //Diese Klasse verwaltet den Optionsbaum und ladelogik etc. eines Artikels
@@ -24712,7 +24693,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
24712
24693
  return _context5.abrupt("continue", 37);
24713
24694
  case 11:
24714
24695
  if (targetArticlesWithNewValues.includes(targetArticlesToUpdate[i])) {
24715
- valuesArray[i] = actArticle.getValidValues(_objectSpread$d({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24696
+ valuesArray[i] = actArticle.getValidValues(_objectSpread$c({}, myValues), actArticle.CatalogData.mergeOptionsToSameOption);
24716
24697
  }
24717
24698
  if (!(Object.entries(valuesArray[i]).length > 0 || from !== null && from !== void 0 && from.startsWith('initializing'))) {
24718
24699
  _context5.next = 32;
@@ -25346,7 +25327,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25346
25327
  }
25347
25328
  doLoadItem.BasketID = nArticle.basketId;
25348
25329
  _context14.next = 9;
25349
- return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$d(_objectSpread$d({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25330
+ return this.toDoAfterArticleLoaded(nArticle, {}, _objectSpread$c(_objectSpread$c({}, doLoadItem.VariantValues), newConfigValues), 'initializingPartlist', doLoadItem.VariantItemData);
25350
25331
  case 9:
25351
25332
  article.addPartlistArticle(nArticle);
25352
25333
  case 10:
@@ -25490,7 +25471,7 @@ var DivaArticleHandler = /*#__PURE__*/function () {
25490
25471
  if (ruleValid) break;
25491
25472
  }
25492
25473
  if (ruleValid) {
25493
- returnValue.push(_objectSpread$d(_objectSpread$d({}, entry), {}, {
25474
+ returnValue.push(_objectSpread$c(_objectSpread$c({}, entry), {}, {
25494
25475
  index: i
25495
25476
  }));
25496
25477
  break;
@@ -26472,7 +26453,6 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26472
26453
  var optionStep = step === null || step === void 0 ? void 0 : step.optionStep;
26473
26454
  var paletteType = 'SMALL';
26474
26455
  if (configStep && optionStep) {
26475
- var _set$api$ReturnToFrom;
26476
26456
  var optionState = articles[configStep.targetArticles[0]][configStep.option];
26477
26457
  if (configStep.option == 'OPTVINYL' || configStep.option == 'OPTVINYL_1' || configStep.option == 'OPTFABRIC' || configStep.option == 'OPTBE' || configStep.option == 'OPTBE_AUSSEN' || configStep.option == 'OPTBE_INNEN' || configStep.option == 'OPTBE_PANEELE' || configStep.option == 'OPTMATRATZE_BE' || configStep.option == 'OPTBE_UG' || configStep.option == 'OPTBEZUG' || configStep.option == 'OPTKO' || configStep.option == 'OPTFR' || configStep.option == 'OPTNI' || configStep.option == 'OPTUF_FA' || configStep.option == 'OPTBE_NETZ' || configStep.option == 'OPTBE_AL' || configStep.option == 'OPTKISSEN_BE' || configStep.option == 'OPTKP_BE' || configStep.option == 'OPTARM_BE' || configStep.option == 'OPTBE_KT' || configStep.option == 'OPT3' || configStep.option == 'OPT5' || configStep.option == 'OPTBE_KNOEPFE' || configStep.option == 'OPTSK_FARBE' || configStep.option == 'OPTBANDFARBE' || configStep.option == 'OPTBE_BOX' || configStep.option == 'OPTMA_AF_BE' || configStep.option == 'OPTTOPPER_BE' || optionState.option.hasOPG && optionState.hasImages || optionStep.mergesToOPG) {
26478
26458
  paletteType = 'GAL';
@@ -26500,31 +26480,15 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26500
26480
  if (paletteType == 'GALLERY') {
26501
26481
  paletteType = 'GAL';
26502
26482
  }
26503
- //TODO correct with franz
26504
- if ((!set.api.getDiva3DSuppressCacheCreation() && set.api.getDiva3dUseImageCache() || (_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS')) && paletteType == 'DROPDOWN_TEXT') paletteType = 'VERY_SMALL';
26505
26483
  }
26506
26484
  return paletteType;
26507
26485
  }
26508
26486
  }, {
26509
26487
  key: "getStepInfo",
26510
26488
  value: function getStepInfo(configStepKey, optionStatesOfArticle) {
26511
- var isNotVisualized = false;
26512
- var targetArticles = this.getTargetArticles(configStepKey),
26513
- allSteps = this.getAllByKey(configStepKey);
26514
- if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) {
26515
- for (var i = 0; i < targetArticles.length; i++) {
26516
- if (optionStatesOfArticle[targetArticles[i]][allSteps.optionStep.codex].isNotVisualized) {
26517
- isNotVisualized = true;
26518
- break;
26519
- }
26520
- }
26521
- }
26522
- if (isNotVisualized) {
26523
- return 'SHOW_NOT_VISUALIZED_WARNINIG';
26524
- }
26525
- if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) {
26526
- return allSteps.configStep.warning;
26527
- }
26489
+ var allSteps = this.getAllByKey(configStepKey);
26490
+ if (allSteps !== null && allSteps !== void 0 && allSteps.optionStep) ;
26491
+ if (allSteps !== null && allSteps !== void 0 && allSteps.configStep.warning) return allSteps.configStep.warning;
26528
26492
  return undefined;
26529
26493
  }
26530
26494
  }, {
@@ -26832,8 +26796,8 @@ var DivaConfigTreeData = /*#__PURE__*/function () {
26832
26796
  function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
26833
26797
  function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
26834
26798
  function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
26835
- function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26836
- function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26799
+ function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26800
+ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26837
26801
  var LOG$9 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
26838
26802
  var DivaSet = /*#__PURE__*/function () {
26839
26803
  function DivaSet(catalog, _setId, orderSet, initSetState) {
@@ -26928,7 +26892,7 @@ var DivaSet = /*#__PURE__*/function () {
26928
26892
  _context.next = 10;
26929
26893
  break;
26930
26894
  }
26931
- validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$c({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26895
+ validValues = repairVariantValuesAndPlanner ? article.getValidValues(_objectSpread$b({}, variantValues), article.CatalogData.mergeOptionsToSameOption) : {};
26932
26896
  _context.t0 = partlistArticlesToLoad;
26933
26897
  _context.next = 8;
26934
26898
  return articleHandlerInstance.updateCfgValues(article, repairVariantValuesAndPlanner ? validValues : variantValues, {}, undefined, loadPlas);
@@ -27043,7 +27007,7 @@ var DivaSet = /*#__PURE__*/function () {
27043
27007
  }
27044
27008
  return false;
27045
27009
  });
27046
- _defineProperty__default["default"](this, "getPlannerConfigData", function (elementId, excludeInvalidCacheOptions, alternateRenderInfo) {
27010
+ _defineProperty__default["default"](this, "getPlannerConfigData", function (elementId, alternateRenderInfo) {
27047
27011
  var article = _this.getArticleByElementId(elementId);
27048
27012
  var articleAccs = [];
27049
27013
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
@@ -27051,7 +27015,6 @@ var DivaSet = /*#__PURE__*/function () {
27051
27015
  }
27052
27016
  var plannerConfigData = {
27053
27017
  config: {},
27054
- containsTextureNotDigitalized: false,
27055
27018
  accs: articleAccs
27056
27019
  };
27057
27020
  if (article) {
@@ -27065,9 +27028,8 @@ var DivaSet = /*#__PURE__*/function () {
27065
27028
  }
27066
27029
  }
27067
27030
  }
27068
- var result = article.getPlannerConfigData(accessoireArticles, excludeInvalidCacheOptions, alternateRenderInfo);
27031
+ var result = article.getPlannerConfigData(accessoireArticles, alternateRenderInfo);
27069
27032
  plannerConfigData.config = result.config;
27070
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
27071
27033
  }
27072
27034
  return plannerConfigData;
27073
27035
  });
@@ -27075,7 +27037,6 @@ var DivaSet = /*#__PURE__*/function () {
27075
27037
  var article = _this.getArticleByBasketId(basketId);
27076
27038
  var plannerConfigData = {
27077
27039
  config: {},
27078
- containsTextureNotDigitalized: false,
27079
27040
  accs: []
27080
27041
  };
27081
27042
  if (article) {
@@ -27083,9 +27044,8 @@ var DivaSet = /*#__PURE__*/function () {
27083
27044
  for (var key in article === null || article === void 0 ? void 0 : article.accessoires) {
27084
27045
  if (article.accessoires[key].elementId) articleAccs.push(article.accessoires[key].elementId);
27085
27046
  }
27086
- var result = article.getPlannerConfigData(article.accessoires, false);
27047
+ var result = article.getPlannerConfigData(article.accessoires);
27087
27048
  plannerConfigData.config = result.config;
27088
- plannerConfigData.containsTextureNotDigitalized = result.containsTextureNotDigitalized;
27089
27049
  plannerConfigData.accs = articleAccs;
27090
27050
  }
27091
27051
  return plannerConfigData;
@@ -27181,7 +27141,6 @@ var DivaSet = /*#__PURE__*/function () {
27181
27141
  if (this.catalogData.useBoxPlanner) {
27182
27142
  plannerMode = 'BoxPlanner';
27183
27143
  } else if (this.catalogData.has3dModels) {
27184
- var _this$WebConfig;
27185
27144
  for (var key in this.divaArticles) {
27186
27145
  if (this.divaArticles[key].model3DName) {
27187
27146
  plannerMode = '3DImage';
@@ -27193,9 +27152,6 @@ var DivaSet = /*#__PURE__*/function () {
27193
27152
  if (Object.entries(this.divaArticles).length == 0) {
27194
27153
  plannerMode = '3DImage';
27195
27154
  }
27196
- if ((_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dUseSirvViewer) {
27197
- plannerMode = 'SirvViewer_only';
27198
- }
27199
27155
  if (this.catalogData.divaArReady && this.catalogData.useShelfPlannerRTV) {
27200
27156
  //TODO Matthias sauber initialisieren ob in RTV oder IMAGE3D gestartet wird.
27201
27157
  plannerMode = 'RTViewer';
@@ -27214,7 +27170,7 @@ var DivaSet = /*#__PURE__*/function () {
27214
27170
  plannerMode = 'No';
27215
27171
  }
27216
27172
  this.plannerMode = plannerMode;
27217
- this.setType = plannerMode == 'No' || plannerMode == 'SirvViewer_only' ? 'ARTICLE' : 'PLANNING';
27173
+ this.setType = plannerMode == 'No' ? 'ARTICLE' : 'PLANNING';
27218
27174
  return plannerMode;
27219
27175
  }
27220
27176
  }, {
@@ -27436,9 +27392,11 @@ var DivaSet = /*#__PURE__*/function () {
27436
27392
  key: "getSetTitle",
27437
27393
  value: function getSetTitle() {
27438
27394
  var _this$ViewConfig, _this$setState$config;
27439
- if ((_this$ViewConfig = this.ViewConfig) !== null && _this$ViewConfig !== void 0 && _this$ViewConfig.useArticleNameAsTitle && Object.keys(this.divaArticles).length > 0) {
27440
- var article = this.divaArticles[Object.keys(this.divaArticles)[0]];
27441
- return article.name;
27395
+ if ((_this$ViewConfig = this.ViewConfig) !== null && _this$ViewConfig !== void 0 && _this$ViewConfig.useArticleNameAsTitle && _toConsumableArray__default["default"](new Set(this.mainArtcles.map(function (a) {
27396
+ return a.articleCodex;
27397
+ }))).length == 1) {
27398
+ var name = this.mainArtcles[0].name.replace(/\(.+?\)/g, '');
27399
+ if (typeof this.ViewConfig.useArticleNameAsTitle !== 'number' || name.length < this.ViewConfig.useArticleNameAsTitle) return name;
27442
27400
  }
27443
27401
  return (_this$setState$config = this.setState.configuratorTitle) !== null && _this$setState$config !== void 0 ? _this$setState$config : this.getSetName();
27444
27402
  }
@@ -27509,8 +27467,8 @@ var DivaSet = /*#__PURE__*/function () {
27509
27467
  var articles = {};
27510
27468
  for (var basketId in this.divaArticles) {
27511
27469
  articles[basketId] = this.divaArticles[basketId];
27512
- if (allPartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles());
27513
- if (visiblePartlistArticlesAlso) articles = _objectSpread$c(_objectSpread$c({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27470
+ if (allPartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles());
27471
+ if (visiblePartlistArticlesAlso) articles = _objectSpread$b(_objectSpread$b({}, articles), articles[basketId].getRecursivePartlistArticles(true));
27514
27472
  }
27515
27473
  return articles;
27516
27474
  }
@@ -27754,6 +27712,16 @@ var DivaSet = /*#__PURE__*/function () {
27754
27712
  if (optionSetName.length) ret += ' ' + optionSetName.join(', ');
27755
27713
  return ret;
27756
27714
  }
27715
+ }, {
27716
+ key: "mainArtcles",
27717
+ get: function get() {
27718
+ var mainArtcles = [];
27719
+ for (var basketId in this.divaArticles) {
27720
+ var article = this.divaArticles[basketId];
27721
+ if (!article.relatedToBasketId) mainArtcles.push(article);
27722
+ }
27723
+ return mainArtcles;
27724
+ }
27757
27725
  }, {
27758
27726
  key: "setName_locales",
27759
27727
  get: function get() {
@@ -28005,8 +27973,8 @@ var DivaSet = /*#__PURE__*/function () {
28005
27973
  }, {
28006
27974
  key: "remindPriceForHash",
28007
27975
  value: function remindPriceForHash(product) {
28008
- var _product$discountedPr, _product$discountedPr2;
28009
- if (!product.available) return;
27976
+ var _product$availableFor, _product$discountedPr, _product$discountedPr2;
27977
+ if (!((_product$availableFor = product.availableForOrganizations) !== null && _product$availableFor !== void 0 && _product$availableFor.includes(this.getSetState.organizationId))) return;
28010
27978
  var claculatedPrice = this.getSetPrice(true);
28011
27979
  if (!product.discountedPrice && product.addedPrice === product.calculatedPrice && claculatedPrice == product.calculatedPrice) {
28012
27980
  return;
@@ -28032,7 +28000,7 @@ var DivaSet = /*#__PURE__*/function () {
28032
28000
  break;
28033
28001
  }
28034
28002
  _context4.next = 3;
28035
- return Promise.resolve().then(function () { return require('./DoorPlanner-6a20b682.js'); });
28003
+ return Promise.resolve().then(function () { return require('./DoorPlanner-4534b32f.js'); });
28036
28004
  case 3:
28037
28005
  _yield$import = _context4.sent;
28038
28006
  DoorPlanner = _yield$import["default"];
@@ -28137,8 +28105,8 @@ var DivaSet = /*#__PURE__*/function () {
28137
28105
  }, {
28138
28106
  key: "hasStaticRoomList",
28139
28107
  get: function get() {
28140
- var _this$WebConfig2;
28141
- if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig2 = this.WebConfig) !== null && _this$WebConfig2 !== void 0 && _this$WebConfig2.diva3dStaticBGImage) {
28108
+ var _this$WebConfig;
28109
+ if (this.CatalogData.roomList3DStaticBGImage.size > 0 && (_this$WebConfig = this.WebConfig) !== null && _this$WebConfig !== void 0 && _this$WebConfig.diva3dStaticBGImage) {
28142
28110
  return true;
28143
28111
  }
28144
28112
  return false;
@@ -28179,8 +28147,8 @@ var DivaSet = /*#__PURE__*/function () {
28179
28147
  }, {
28180
28148
  key: "ViewConfig",
28181
28149
  get: function get() {
28182
- var _this$WebConfig3;
28183
- return (_this$WebConfig3 = this.WebConfig) === null || _this$WebConfig3 === void 0 ? void 0 : _this$WebConfig3.viewConfig;
28150
+ var _this$WebConfig2;
28151
+ return (_this$WebConfig2 = this.WebConfig) === null || _this$WebConfig2 === void 0 ? void 0 : _this$WebConfig2.viewConfig;
28184
28152
  }
28185
28153
  }, {
28186
28154
  key: "i18n",
@@ -29667,8 +29635,8 @@ var SummaryHandler = /*#__PURE__*/function () {
29667
29635
  }();
29668
29636
  var summaryHandlerInstance = new SummaryHandler();
29669
29637
 
29670
- function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29671
- function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29638
+ function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29639
+ function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29672
29640
  DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
29673
29641
  var DivaFavoritesHandler = /*#__PURE__*/function () {
29674
29642
  function DivaFavoritesHandler() {
@@ -29749,10 +29717,10 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29749
29717
  setHashes = {};
29750
29718
  variantId = this.getVariantIdToStart(set);
29751
29719
  origConfig = articles[Object.keys(articles)[0]].VariantValues;
29752
- i = variants.length - 1;
29720
+ i = 0;
29753
29721
  case 6:
29754
- if (!(i >= 0)) {
29755
- _context3.next = 50;
29722
+ if (!(i < variants.length)) {
29723
+ _context3.next = 53;
29756
29724
  break;
29757
29725
  }
29758
29726
  variantForTargetArticles = variants[i];
@@ -29855,9 +29823,14 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29855
29823
  variantForTargetArticles.configVariantValues = configVariantValues;
29856
29824
  variantForTargetArticles.price = set === null || set === void 0 ? void 0 : set.getSetPrice();
29857
29825
  variantForTargetArticles.title = set === null || set === void 0 ? void 0 : set.CatalogData.catalogName;
29858
- if (!variantIsValid) {
29859
- variants.splice(i, 1);
29826
+ if (variantIsValid) {
29827
+ _context3.next = 48;
29828
+ break;
29860
29829
  }
29830
+ variants.splice(i, 1);
29831
+ i--;
29832
+ return _context3.abrupt("continue", 50);
29833
+ case 48:
29861
29834
  reservedId = this.tryGetOldVariantIdForVariant(set, variants[i]);
29862
29835
  if (reservedId !== undefined) {
29863
29836
  variants[i].id = reservedId;
@@ -29865,21 +29838,21 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
29865
29838
  variants[i].id = variantId;
29866
29839
  variantId++;
29867
29840
  }
29868
- case 47:
29869
- i--;
29841
+ case 50:
29842
+ i++;
29870
29843
  _context3.next = 6;
29871
29844
  break;
29872
- case 50:
29845
+ case 53:
29873
29846
  if (!set.favoritesChanged) this.evalOldConfigVariants(set, variants);
29874
- _context3.next = 53;
29847
+ _context3.next = 56;
29875
29848
  return setHandlerInstance.updateArticlesOptionStatesOfActSet(set, origConfig, Object.keys(articles), true);
29876
- case 53:
29849
+ case 56:
29877
29850
  set.allVariantsCache = variants;
29878
29851
  variants.sort(function (a, b) {
29879
29852
  return a.id - b.id;
29880
29853
  });
29881
29854
  return _context3.abrupt("return", variants);
29882
- case 56:
29855
+ case 59:
29883
29856
  case "end":
29884
29857
  return _context3.stop();
29885
29858
  }
@@ -30166,7 +30139,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30166
30139
  allvariants = _context4.t0;
30167
30140
  validVariants = [];
30168
30141
  for (i = 0; i < allvariants.length; i++) {
30169
- if (!set.disabledVariants.includes(i)) {
30142
+ if (!set.disabledVariants.includes(allvariants[i].id)) {
30170
30143
  validVariants.push(allvariants[i]);
30171
30144
  }
30172
30145
  }
@@ -30341,7 +30314,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30341
30314
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30342
30315
  }
30343
30316
  }
30344
- configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$b(_objectSpread$b({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30317
+ configVariant = new basketModel.ConfigVariantData(variant.id, set.setName, set.setName_locales, setImage, (_hQRenderScript = hQRenderScript) === null || _hQRenderScript === void 0 ? void 0 : _hQRenderScript._id, DivaUtils__default["default"].encodeBase64(set.plannerHandler.getProject3D(set.getSetId())), set.getVariantsDescription(), set.SetArticleNr, set.getSetPrice(), set.setHash, 1, set.getVariantBasketData(), articleHandlerInstance.getCompactOrderLine(_objectSpread$a(_objectSpread$a({}, set.getDivaArticles()), set.getPartlistArticlesOfSet())), variantValues, summaryHandlerInstance.convertSummaryItemsToSummaryInfo(set), plannerData != undefined ? DivaUtils__default["default"].encodeBase64(JSON.stringify(plannerData)) : '', urlToPlanning2D, setHandlerInstance.getBBoxObject(set), set.getBruttoSetPrice(), undefined, undefined, set.MetaData, set.MetaData_locales, DivaUtils__default["default"].stripTagsFromDict(set.getVariantsDescription_locales()), (_basket$OrderSets$set = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set === void 0 || (_basket$OrderSets$set = _basket$OrderSets$set[set.basketConfigVariants.length]) === null || _basket$OrderSets$set === void 0 ? void 0 : _basket$OrderSets$set.SetOrderText, (_basket$OrderSets$set2 = basket.OrderSets[setindex].ConfigVariants) === null || _basket$OrderSets$set2 === void 0 || (_basket$OrderSets$set2 = _basket$OrderSets$set2[set.basketConfigVariants.length]) === null || _basket$OrderSets$set2 === void 0 ? void 0 : _basket$OrderSets$set2.SetOrderText_locales);
30345
30318
  set.basketConfigVariants.push(configVariant);
30346
30319
  case 28:
30347
30320
  case "end":
@@ -30361,8 +30334,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30361
30334
  if (!((_set$oldConfigVariant3 = set.oldConfigVariants) !== null && _set$oldConfigVariant3 !== void 0 && _set$oldConfigVariant3.length)) return;
30362
30335
  //set all invalid
30363
30336
  set.disabledVariants = [];
30364
- variants.map(function (v, index) {
30365
- return set.disabledVariants.push(index);
30337
+ variants.map(function (v) {
30338
+ return set.disabledVariants.push(v.id);
30366
30339
  });
30367
30340
  var oldConfigVariants = _toConsumableArray__default["default"](set.oldConfigVariants);
30368
30341
  for (var i = 0; i < variants.length; i++) {
@@ -30385,7 +30358,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30385
30358
  if (tryNext) break;
30386
30359
  }
30387
30360
  if (!tryNext) {
30388
- var index = set.disabledVariants.indexOf(i);
30361
+ var index = set.disabledVariants.indexOf(variant.id);
30389
30362
  if (index != -1) set.disabledVariants.splice(index, 1);
30390
30363
  oldConfigVariants.splice(j, 1);
30391
30364
  }
@@ -30396,11 +30369,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30396
30369
  }, {
30397
30370
  key: "isFavorite",
30398
30371
  value: function isFavorite(set, targetArticles, item, optionCodex) {
30399
- var _item$ocd, _set$WebConfig, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30372
+ var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30400
30373
  var favorites = set.favorites;
30401
30374
  var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
30402
30375
  var opt = optionCodex ? optionCodex : item.parent.codex;
30403
- var doShowFav = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.diva3dUseImageCache) && !set.WebConfig.diva3dSuppressCacheCreation || !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
30376
+ var doShowFav = !!((_set$api$ReturnToFrom = set.api.ReturnToFromParams) !== null && _set$api$ReturnToFrom !== void 0 && _set$api$ReturnToFrom.startsWith('FAVORITS'));
30404
30377
  if (!doShowFav) return undefined;
30405
30378
  if ((_favorites$VariantVal = favorites.VariantValues) !== null && _favorites$VariantVal !== void 0 && _favorites$VariantVal[opt] && (_Object$keys = Object.keys(favorites.VariantValues[opt])) !== null && _Object$keys !== void 0 && _Object$keys.includes(opvCodex)) {
30406
30379
  for (var i = 0; i < targetArticles.length; i++) {
@@ -30421,8 +30394,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30421
30394
  }();
30422
30395
  var favoritesHandlerInstance = new DivaFavoritesHandler();
30423
30396
 
30424
- function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
30425
- function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30397
+ function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
30398
+ function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30426
30399
 
30427
30400
  //Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
30428
30401
  //Der in einem Set gemergte Optionsbaum
@@ -30979,7 +30952,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
30979
30952
  //get schnittmenge of all the articles
30980
30953
  if (i === 0) {
30981
30954
  constructionRules = myOptionState.constructionRules;
30982
- configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
30955
+ configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
30983
30956
  } else {
30984
30957
  for (var _key2 in configItems) {
30985
30958
  if (!myOptionState.visibleOptionValues[_key2]) {
@@ -31210,8 +31183,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
31210
31183
  }();
31211
31184
  var configTreeHandler = new DivaConfigTreeHandler();
31212
31185
 
31213
- function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31214
- function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31186
+ function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31187
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
31215
31188
  var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
31216
31189
 
31217
31190
  /*
@@ -31701,7 +31674,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
31701
31674
  }
31702
31675
  variantValues = (_initSetState$initVar = initSetState.initVariantValues) !== null && _initSetState$initVar !== void 0 ? _initSetState$initVar : catalogData === null || catalogData === void 0 || (_catalogData$promoted = catalogData.promotedOpvs) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted.articles) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[articlesToInitialize[j]]) === null || _catalogData$promoted === void 0 || (_catalogData$promoted = _catalogData$promoted[0]) === null || _catalogData$promoted === void 0 ? void 0 : _catalogData$promoted.variantValues;
31703
31676
  _context6.next = 18;
31704
- return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$9(_objectSpread$9({}, params), variantValues ? {
31677
+ return this.addPlannerElement(set, articlesToInitialize[j], _objectSpread$8(_objectSpread$8({}, params), variantValues ? {
31705
31678
  variantValues: variantValues
31706
31679
  } : {}));
31707
31680
  case 18:
@@ -32334,7 +32307,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32334
32307
  _context17.next = 24;
32335
32308
  break;
32336
32309
  }
32337
- return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
32310
+ return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
32338
32311
  accessoire: accessoire
32339
32312
  }));
32340
32313
  case 24:
@@ -32766,7 +32739,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32766
32739
  var articlecodex = plannerElement.articleCodex;
32767
32740
  if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
32768
32741
  if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
32769
- cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32742
+ cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32770
32743
  var index = cleanedCaltaogPlannerArticles.length - 1;
32771
32744
  cleanedCaltaogPlannerArticles[index].groupName = '';
32772
32745
  if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
@@ -32784,10 +32757,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
32784
32757
  plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
32785
32758
  }
32786
32759
  }
32787
- if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32760
+ if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32788
32761
  }
32789
32762
  }
32790
- return _objectSpread$9(_objectSpread$9({}, plannerViewInfo), {}, {
32763
+ return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
32791
32764
  catalogPlannerArticles: cleanedCaltaogPlannerArticles
32792
32765
  });
32793
32766
  }
@@ -32986,7 +32959,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32986
32959
  filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
32987
32960
  stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
32988
32961
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
32989
- return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
32962
+ return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
32990
32963
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
32991
32964
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
32992
32965
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -33409,7 +33382,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33409
33382
  break;
33410
33383
  }
33411
33384
  _context28.next = 17;
33412
- return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$9(_objectSpread$9({}, edoArticlesToLoad[_i5]), {}, {
33385
+ return this.addArticleToActSet(set, edoArticlesToLoad[_i5].ArticleCodex, _objectSpread$8(_objectSpread$8({}, edoArticlesToLoad[_i5]), {}, {
33413
33386
  basketId: oldBasketIds[_i5]
33414
33387
  }), true);
33415
33388
  case 17:
@@ -33806,7 +33779,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33806
33779
  origOrderSet.BBox = actOrderSet.BBox;
33807
33780
  origOrderSet.VariantDescription = actOrderSet.VariantDescription;
33808
33781
  if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
33809
- return _objectSpread$9(_objectSpread$9({}, variant), {}, {
33782
+ return _objectSpread$8(_objectSpread$8({}, variant), {}, {
33810
33783
  SetImage: origOrderSet.ConfigVariants[index].SetImage,
33811
33784
  HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
33812
33785
  Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
@@ -33844,25 +33817,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
33844
33817
  DivaUtils__default["default"].startSpanOfApm('GetSet3D und 2D Image');
33845
33818
  GroupType = 'PLANNING';
33846
33819
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
33847
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33848
- _context31.next = 10;
33849
- break;
33850
- }
33851
- _context31.next = 7;
33852
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33853
- case 7:
33854
- _context31.t0 = _context31.sent;
33855
- _context31.next = 11;
33856
- break;
33857
- case 10:
33858
- _context31.t0 = undefined;
33859
- case 11:
33860
- setImage = _context31.t0;
33820
+ setImage = undefined;
33861
33821
  urlToPlanning2D = undefined;
33862
33822
  alternateSetImages = undefined;
33863
33823
  hqRenderScript = undefined;
33864
33824
  if (dontGenerateImages) {
33865
- _context31.next = 32;
33825
+ _context31.next = 25;
33866
33826
  break;
33867
33827
  }
33868
33828
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33870,22 +33830,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
33870
33830
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33871
33831
  promise3DAlternate = this.getAlternateSetImages(set);
33872
33832
  }
33873
- _context31.next = 21;
33833
+ _context31.next = 14;
33874
33834
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33875
- case 21:
33835
+ case 14:
33876
33836
  _yield$Promise$all = _context31.sent;
33877
33837
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
33878
33838
  setImage = _yield$Promise$all2[0];
33879
33839
  urlToPlanning2D = _yield$Promise$all2[1];
33880
33840
  alternateSetImages = _yield$Promise$all2[2];
33881
33841
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33882
- _context31.next = 29;
33842
+ _context31.next = 22;
33883
33843
  return Promise.all([promiseHQRenderScript]);
33884
- case 29:
33844
+ case 22:
33885
33845
  _yield$Promise$all3 = _context31.sent;
33886
33846
  _yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
33887
33847
  hqRenderScript = _yield$Promise$all4[0];
33888
- case 32:
33848
+ case 25:
33889
33849
  LOG$8.startTransaction({
33890
33850
  event: 'FillBakset',
33891
33851
  eventId: 'FILL_BASKET',
@@ -33951,7 +33911,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33951
33911
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33952
33912
  });
33953
33913
  return _context31.abrupt("return", orderSet);
33954
- case 39:
33914
+ case 32:
33955
33915
  case "end":
33956
33916
  return _context31.stop();
33957
33917
  }
@@ -33979,7 +33939,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33979
33939
  catalogData = set.CatalogData;
33980
33940
  is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
33981
33941
  if (!is3D) {
33982
- _context32.next = 13;
33942
+ _context32.next = 11;
33983
33943
  break;
33984
33944
  }
33985
33945
  LOG$8.startTransaction({
@@ -33995,20 +33955,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
33995
33955
  case 9:
33996
33956
  setImage = _context32.sent;
33997
33957
  LOG$8.successTransaction('RENDER_3D_IMAGE');
33998
- _context32.next = 17;
33999
- break;
34000
- case 13:
34001
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
34002
- _context32.next = 17;
34003
- break;
34004
- }
34005
- _context32.next = 16;
34006
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34007
- case 16:
34008
- setImage = _context32.sent;
34009
- case 17:
33958
+ case 11:
34010
33959
  return _context32.abrupt("return", setImage);
34011
- case 18:
33960
+ case 12:
34012
33961
  case "end":
34013
33962
  return _context32.stop();
34014
33963
  }
@@ -34160,77 +34109,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
34160
34109
  Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34161
34110
  };
34162
34111
  }
34163
-
34164
- /****************************Cache building***************************/
34165
-
34166
- /**
34167
- * This function creates the cache for all images.
34168
- * @returns returns true if the whole set was created correctly
34169
- */
34170
34112
  }, {
34171
- key: "createRenderCache",
34172
- value: (function () {
34173
- var _createRenderCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(set) {
34174
- var _set$getAlternateRend3;
34175
- var timeout;
34113
+ key: "loadProductsOfSets",
34114
+ value: function () {
34115
+ var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(orderSets, involvedSetIds) {
34176
34116
  return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context36) {
34177
34117
  while (1) switch (_context36.prev = _context36.next) {
34178
34118
  case 0:
34179
- set.plannerHandler.request3D(true, false, (set === null || set === void 0 || (_set$getAlternateRend3 = set.getAlternateRenderInfo()) === null || _set$getAlternateRend3 === void 0 ? void 0 : _set$getAlternateRend3.length) > 0, undefined, true, {
34180
- width: 100,
34181
- height: 100,
34182
- isFullscreenRendering: false,
34183
- planner3DGridEnabled: false,
34184
- mediaServiceSaveMode: 'PERMANENT',
34185
- doShow3DDimensionLines: false
34186
- });
34187
- timeout = 50;
34188
- case 2:
34189
- if (!set.plannerHandler.checkIsWaitingForRendering()) {
34190
- _context36.next = 10;
34191
- break;
34192
- }
34193
- timeout--;
34194
- if (!(timeout == 0)) {
34195
- _context36.next = 6;
34196
- break;
34197
- }
34198
- return _context36.abrupt("return", false);
34199
- case 6:
34200
- _context36.next = 8;
34201
- return DivaUtils__default["default"].Sleep(300);
34202
- case 8:
34203
34119
  _context36.next = 2;
34204
- break;
34205
- case 10:
34206
- return _context36.abrupt("return", true);
34207
- case 11:
34208
- case "end":
34209
- return _context36.stop();
34210
- }
34211
- }, _callee34);
34212
- }));
34213
- function createRenderCache(_x113) {
34214
- return _createRenderCache.apply(this, arguments);
34215
- }
34216
- return createRenderCache;
34217
- }())
34218
- }, {
34219
- key: "loadProductsOfSets",
34220
- value: function () {
34221
- var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(orderSets, involvedSetIds) {
34222
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
34223
- while (1) switch (_context37.prev = _context37.next) {
34224
- case 0:
34225
- _context37.next = 2;
34226
34120
  return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
34227
34121
  case 2:
34228
34122
  case "end":
34229
- return _context37.stop();
34123
+ return _context36.stop();
34230
34124
  }
34231
- }, _callee35);
34125
+ }, _callee34);
34232
34126
  }));
34233
- function loadProductsOfSets(_x114, _x115) {
34127
+ function loadProductsOfSets(_x113, _x114) {
34234
34128
  return _loadProductsOfSets.apply(this, arguments);
34235
34129
  }
34236
34130
  return loadProductsOfSets;
@@ -34267,28 +34161,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
34267
34161
  }, {
34268
34162
  key: "addOrderSetArticlesToExistingSet",
34269
34163
  value: function () {
34270
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(set, orderSet, lastSetToInitialize) {
34271
- return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context38) {
34272
- while (1) switch (_context38.prev = _context38.next) {
34164
+ var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(set, orderSet, lastSetToInitialize) {
34165
+ return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
34166
+ while (1) switch (_context37.prev = _context37.next) {
34273
34167
  case 0:
34274
34168
  //TODO: GLOBAL STUFF
34275
34169
  //this.updateActSet(set);
34276
34170
  orderSet.changeBasketIds();
34277
- _context38.next = 3;
34171
+ _context37.next = 3;
34278
34172
  return this.initOrderLineArticles(set, orderSet);
34279
34173
  case 3:
34280
- _context38.next = 5;
34174
+ _context37.next = 5;
34281
34175
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
34282
34176
  case 5:
34283
- _context38.next = 7;
34177
+ _context37.next = 7;
34284
34178
  return productHandlerInstance.updateProducts(set, 'onAdd');
34285
34179
  case 7:
34286
34180
  case "end":
34287
- return _context38.stop();
34181
+ return _context37.stop();
34288
34182
  }
34289
- }, _callee36, this);
34183
+ }, _callee35, this);
34290
34184
  }));
34291
- function addOrderSetArticlesToExistingSet(_x116, _x117, _x118) {
34185
+ function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
34292
34186
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
34293
34187
  }
34294
34188
  return addOrderSetArticlesToExistingSet;
@@ -34305,486 +34199,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
34305
34199
  }();
34306
34200
  var setHandlerInstance = new DivaSetHandler();
34307
34201
 
34308
- //This class saves all informations needed for a rendering
34202
+ function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34203
+ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34309
34204
  var LOG$7 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
34310
- var Rendering = /*#__PURE__*/function () {
34311
- function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
34312
- _classCallCheck__default["default"](this, Rendering);
34313
- _defineProperty__default["default"](this, "planningHash", void 0);
34314
- _defineProperty__default["default"](this, "renderHash", void 0);
34315
- _defineProperty__default["default"](this, "creationTime", void 0);
34316
- _defineProperty__default["default"](this, "renderWidth", void 0);
34317
- _defineProperty__default["default"](this, "renderHeight", void 0);
34318
- _defineProperty__default["default"](this, "uiInfo", void 0);
34319
- _defineProperty__default["default"](this, "urlToSavedRendering", void 0);
34320
- // viewPoint: string;
34321
- // private posInfo: any;
34322
- //private doStream: boolean; Streaming over 3D Host is deprected
34323
- //private byteChunkArr: any;
34324
- //private byteChunkLayerMaskArr: any;
34325
- _defineProperty__default["default"](this, "hasLayerMask", void 0);
34326
- //private imgBytes: any;
34327
- _defineProperty__default["default"](this, "imgForSrc", void 0);
34328
- _defineProperty__default["default"](this, "HQRenderingUrl", void 0);
34329
- _defineProperty__default["default"](this, "SpinUrl", void 0);
34330
- _defineProperty__default["default"](this, "ArUrl", void 0);
34331
- _defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
34332
- _defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
34333
- _defineProperty__default["default"](this, "isFullscreenRendering", void 0);
34334
- _defineProperty__default["default"](this, "hasStaticBackground", void 0);
34335
- _defineProperty__default["default"](this, "hasDimensionLines", void 0);
34336
- _defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
34337
- _defineProperty__default["default"](this, "alternateRendererInfo", void 0);
34338
- _defineProperty__default["default"](this, "isAlternateRendering", void 0);
34339
- _defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
34340
- _defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
34341
- _defineProperty__default["default"](this, "isLoadedFromCache", void 0);
34342
- _defineProperty__default["default"](this, "catalogData", void 0);
34343
- //this.doStream = false;
34344
- this.planningHash = planningHash;
34345
- this.renderHash = renderHash;
34346
- this.renderWidth = width;
34347
- this.renderHeight = height;
34348
- this.uiInfo = '';
34349
- this.imgForSrc = '';
34350
- this.layerMaskAsBase64 = '';
34351
- this.isFullscreenRendering = isFullscreenRendering;
34352
- this.hasDimensionLines = hasDimensionLines;
34353
- this.plannerMeasureDigits = plannerMeasureDigits;
34354
- this.hasLayerMask = hasLayerMask;
34355
- this.creationTime = new Date();
34356
- this.layerMaskThreeTexture = undefined;
34357
- this.hasStaticBackground = hasStaticBG;
34358
- this.mediaServiceSaveMode = mediaServiceSaveMode;
34359
- this.urlToSavedRendering = '';
34360
- this.catalogData = {
34361
- catalogCodex: '',
34362
- catalogGUID: ''
34363
- };
34364
- this.isLoadedFromCache = false;
34365
- this.HQRenderingUrl = '';
34366
- this.SpinUrl = '';
34367
- this.ArUrl = '';
34368
- if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
34369
- this.alternateRendererInfo = alternateRendererInfo;
34370
- this.alternateRenderingsExist = !!alternateRenderingsExist;
34371
- }
34372
- return _createClass__default["default"](Rendering, [{
34373
- key: "clone",
34374
- value: function clone(rendering) {
34375
- this.planningHash = rendering.planningHash;
34376
- this.renderHash = rendering.renderHash;
34377
- this.creationTime = rendering.creationTime;
34378
- this.renderWidth = rendering.renderWidth;
34379
- this.renderHeight = rendering.renderHeight;
34380
- this.uiInfo = rendering.uiInfo;
34381
- this.urlToSavedRendering = rendering.urlToSavedRendering;
34382
- this.hasLayerMask = rendering.hasLayerMask;
34383
- this.imgForSrc = rendering.imgForSrc;
34384
- this.HQRenderingUrl = rendering.HQRenderingUrl;
34385
- this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
34386
- this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
34387
- this.isFullscreenRendering = rendering.isFullscreenRendering;
34388
- this.hasStaticBackground = rendering.hasStaticBackground;
34389
- this.hasDimensionLines = rendering.hasDimensionLines;
34390
- this.plannerMeasureDigits = rendering.plannerMeasureDigits;
34391
- this.alternateRendererInfo = rendering.alternateRendererInfo;
34392
- this.isAlternateRendering = rendering.isAlternateRendering;
34393
- this.alternateRenderingsExist = rendering.alternateRenderingsExist;
34394
- this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
34395
- this.isLoadedFromCache = rendering.isLoadedFromCache;
34396
- this.catalogData = rendering.catalogData;
34397
- }
34398
- }, {
34399
- key: "getAllDockingPoints",
34400
- value: function getAllDockingPoints(setId, elementId) {
34401
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34402
- return this.uiInfo['S1']['E' + elementId]['DP'];
34403
- }
34404
- return this.uiInfo[setId]['E' + elementId]['DP'];
34405
- }
34406
- }, {
34407
- key: "getHasStaticBackground",
34408
- value: function getHasStaticBackground() {
34409
- return this.hasStaticBackground;
34410
- }
34411
- }, {
34412
- key: "getIsFullscreenRendering",
34413
- value: function getIsFullscreenRendering() {
34414
- return this.isFullscreenRendering;
34415
- }
34416
- }, {
34417
- key: "setIsFullscreenRendering",
34418
- value: function setIsFullscreenRendering(isFullscreen) {
34419
- this.isFullscreenRendering = isFullscreen;
34420
- }
34421
- }, {
34422
- key: "getHasDimensionLines",
34423
- value: function getHasDimensionLines() {
34424
- return this.hasDimensionLines;
34425
- }
34426
- }, {
34427
- key: "getPlannerMeasureDigits",
34428
- value: function getPlannerMeasureDigits() {
34429
- return this.plannerMeasureDigits;
34430
- }
34431
- }, {
34432
- key: "getIsAlternateRendering",
34433
- value: function getIsAlternateRendering() {
34434
- return this.isAlternateRendering;
34435
- }
34436
- }, {
34437
- key: "getAlternateRenderInfo",
34438
- value: function getAlternateRenderInfo() {
34439
- return this.alternateRendererInfo;
34440
- }
34441
- }, {
34442
- key: "getAlternateRenderingsExist",
34443
- value: function getAlternateRenderingsExist() {
34444
- return this.alternateRenderingsExist;
34445
- }
34446
- }, {
34447
- key: "hasUIInfosOfElement",
34448
- value: function hasUIInfosOfElement(setId, elementid) {
34449
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34450
- return this.uiInfo['S1']['E' + elementid] != undefined;
34451
- } else {
34452
- return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
34453
- }
34454
- }
34455
- }, {
34456
- key: "getOutlinePolygonForSVG",
34457
- value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
34458
- var poly = [];
34459
- var avgCamDist = 0;
34460
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34461
- poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
34462
- avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
34463
- } else if (this.uiInfo[setId]) {
34464
- poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
34465
- avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
34466
- } else {
34467
- poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
34468
- avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
34469
- }
34470
- if (!poly) return undefined;
34471
- var points = '';
34472
- for (var i = 0; i < poly.length; i++) {
34473
- points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
34474
- }
34475
- return {
34476
- points: points,
34477
- avgCamDist: avgCamDist
34478
- };
34479
- }
34480
-
34481
- //Left/Right_Bottom/Top_Back/Front
34482
- }, {
34483
- key: "getRightTopBackUIPos",
34484
- value: function getRightTopBackUIPos(setId, elemId) {
34485
- var bbox = null;
34486
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34487
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34488
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34489
- if (!bbox) return;
34490
- for (var i = 0; i < bbox.length; i++) {
34491
- if (bbox[i].C == 'RTB') {
34492
- return bbox[i];
34493
- }
34494
- }
34495
- }
34496
- //Left/Right_Bottom/Top_Back/Front
34497
- }, {
34498
- key: "getLeftTopBackUIPos",
34499
- value: function getLeftTopBackUIPos(setId, elemId) {
34500
- var bbox = null;
34501
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34502
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34503
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34504
- if (!bbox) return;
34505
- for (var i = 0; i < bbox.length; i++) {
34506
- if (bbox[i].C == 'LTB') {
34507
- return bbox[i];
34508
- }
34509
- }
34510
- }
34511
- //Left/Right_Bottom/Top_Back/Front
34512
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34513
- }, {
34514
- key: "getLeftBottomFrontUIPos",
34515
- value: function getLeftBottomFrontUIPos(setId, elemId) {
34516
- var bbox = null;
34517
- if (this.uiInfo == '') return null;
34518
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34519
- if (!this.uiInfo['S1']['E' + elemId]) return;
34520
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34521
- } else if (this.uiInfo[setId]) {
34522
- if (!this.uiInfo[setId]['E' + elemId]) return;
34523
- bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
34524
- } else {
34525
- var _this$uiInfo;
34526
- bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
34527
- }
34528
- if (!bbox) return;
34529
- for (var i = 0; i < bbox.length; i++) {
34530
- if (bbox[i].C == 'LBF') {
34531
- return bbox[i];
34532
- }
34533
- }
34534
- }
34535
- }, {
34536
- key: "getBoxPlannerCornerUIPos",
34537
- value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
34538
- var boxPlan = [];
34539
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34540
- boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
34541
- } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
34542
- for (var i = 0; i < boxPlan.length; i++) {
34543
- if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
34544
- switch (corner) {
34545
- case 'TOPCENTER':
34546
- if (boxPlan[i].N == 'TC') {
34547
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34548
- }
34549
- break;
34550
- case 'LEFTCENTER':
34551
- if (boxPlan[i].N == 'LC') {
34552
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34553
- }
34554
- break;
34555
- case 'RIGHTCENTER':
34556
- if (boxPlan[i].N == 'RC') {
34557
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34558
- }
34559
- break;
34560
- case 'RIGHTTOPFRONT':
34561
- if (boxPlan[i].N == 'RTF') {
34562
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34563
- }
34564
- break;
34565
- }
34566
- }
34567
- return undefined;
34568
- }
34569
- }, {
34570
- key: "getUnityCamPos",
34571
- value: function getUnityCamPos() {
34572
- return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
34573
- }
34574
- }, {
34575
- key: "getUnityCamRot",
34576
- value: function getUnityCamRot() {
34577
- // return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
34578
- var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
34579
- return quatVec;
34580
- }
34581
- }, {
34582
- key: "getUnityFOV",
34583
- value: function getUnityFOV() {
34584
- return parseFloat(this.uiInfo['CAM']['FOV']);
34585
- }
34586
-
34587
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34588
- //It returns the distance of an element to the ground in cm
34589
- }, {
34590
- key: "getDistanceToGround",
34591
- value: function getDistanceToGround(setId, elementId) {
34592
- setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
34593
- if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
34594
- return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
34595
- }
34596
- return -1;
34597
- }
34598
- }, {
34599
- key: "addUIInfo",
34600
- value: function addUIInfo(uiInfo) {
34601
- try {
34602
- this.uiInfo = JSON.parse(uiInfo);
34603
- //this.calcOutlinePolygon();
34604
- } catch (error) {
34605
- LOG$7.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
34606
- code: 'WC_0013',
34607
- cause: error
34608
- }));
34609
- }
34610
- }
34611
-
34612
- /**
34613
- * This function adds a blobImage to the rendering .
34614
- * It is parsed to a base64 image.
34615
- * @param blob The blob contains the image
34616
- * @param isLayerMask True if the Image is the layer mask image
34617
- */
34618
- }, {
34619
- key: "addImgAsBlob",
34620
- value: function addImgAsBlob(buffer, isLayerMask) {
34621
- if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
34622
- }
34623
-
34624
- //Write $("img.einBild").src
34625
- }, {
34626
- key: "getHQRenderingURL",
34627
- value: function getHQRenderingURL() {
34628
- return this.HQRenderingUrl;
34629
- }
34630
- }, {
34631
- key: "getArURl",
34632
- value: function getArURl() {
34633
- return this.ArUrl;
34634
- }
34635
- }, {
34636
- key: "getSpinURL",
34637
- value: function getSpinURL() {
34638
- return this.SpinUrl;
34639
- }
34640
- }, {
34641
- key: "getImageForSrc",
34642
- value: function getImageForSrc() {
34643
- return this.imgForSrc;
34644
- }
34645
- }, {
34646
- key: "containsSirvUrl",
34647
- value: function containsSirvUrl() {
34648
- return this.HQRenderingUrl != '';
34649
- }
34650
- }, {
34651
- key: "setArUrl",
34652
- value: function setArUrl(url) {
34653
- this.ArUrl = url;
34654
- }
34655
- }, {
34656
- key: "setSpinUrl",
34657
- value: function setSpinUrl(url) {
34658
- this.SpinUrl = url;
34659
- }
34660
- }, {
34661
- key: "setHQRenderingUrl",
34662
- value: function setHQRenderingUrl(url, useSirvViewer) {
34663
- if (useSirvViewer) {
34664
- this.HQRenderingUrl = url;
34665
- } else {
34666
- this.imgForSrc = url;
34667
- }
34668
- }
34669
-
34670
- //*****************************************GETTER und SETTER********************************************** */
34671
- }, {
34672
- key: "CatalogCodex",
34673
- get: function get() {
34674
- return this.catalogData.catalogCodex;
34675
- },
34676
- set: function set(val) {
34677
- this.catalogData.catalogCodex = val;
34678
- }
34679
- }, {
34680
- key: "CatalogGUID",
34681
- get: function get() {
34682
- return this.catalogData.catalogGUID;
34683
- },
34684
- set: function set(val) {
34685
- this.catalogData.catalogGUID = val;
34686
- }
34687
- }, {
34688
- key: "IsLoadedFromCache",
34689
- get: function get() {
34690
- return this.isLoadedFromCache;
34691
- },
34692
- set: function set(val) {
34693
- this.isLoadedFromCache = val;
34694
- }
34695
- }, {
34696
- key: "PlanningHash",
34697
- get: function get() {
34698
- return this.planningHash;
34699
- }
34700
- }, {
34701
- key: "RenderHash",
34702
- get: function get() {
34703
- return this.renderHash;
34704
- }
34705
- }, {
34706
- key: "UrlToSavedRendering",
34707
- get: function get() {
34708
- return this.urlToSavedRendering;
34709
- },
34710
- set: function set(url) {
34711
- this.urlToSavedRendering = url;
34712
- }
34713
- }, {
34714
- key: "HasLayerMask",
34715
- get: function get() {
34716
- return this.hasLayerMask;
34717
- },
34718
- set: function set(hasLayerMask) {
34719
- this.hasLayerMask = hasLayerMask;
34720
- }
34721
- }, {
34722
- key: "RenderWidth",
34723
- get: function get() {
34724
- return this.renderWidth;
34725
- }
34726
- }, {
34727
- key: "RenderHeight",
34728
- get: function get() {
34729
- return this.renderHeight;
34730
- }
34731
- }, {
34732
- key: "getHasLayerMask",
34733
- value: function getHasLayerMask() {
34734
- return this.hasLayerMask;
34735
- }
34736
- }, {
34737
- key: "getLayerMaskForSrc",
34738
- value: function getLayerMaskForSrc() {
34739
- return this.layerMaskAsBase64;
34740
- }
34741
- }, {
34742
- key: "HasLayerMaskThreeTexture",
34743
- get: function get() {
34744
- return this.layerMaskThreeTexture != undefined;
34745
- }
34746
- }, {
34747
- key: "LayerMaskThreeTexture",
34748
- get: function get() {
34749
- return this.layerMaskThreeTexture;
34750
- },
34751
- set: function set(tex) {
34752
- this.layerMaskThreeTexture = tex;
34753
- }
34754
- /*
34755
- get DoStream() {
34756
- return this.doStream;
34757
- }
34758
- */
34759
- }, {
34760
- key: "AllImgLoaded",
34761
- get: function get() {
34762
- return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
34763
- }
34764
- }, {
34765
- key: "UiInfoLoaded",
34766
- get: function get() {
34767
- return this.uiInfo != '';
34768
- }
34769
- }, {
34770
- key: "CreationTime",
34771
- get: function get() {
34772
- return this.creationTime.getTime();
34773
- }
34774
- }, {
34775
- key: "MediaServiceSaveMode",
34776
- get: function get() {
34777
- return this.mediaServiceSaveMode;
34778
- },
34779
- set: function set(mode) {
34780
- this.mediaServiceSaveMode = mode;
34781
- }
34782
- }]);
34783
- }();
34784
-
34785
- function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
34786
- function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34787
- var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
34788
34205
  var DivaBasketHandler = /*#__PURE__*/function () {
34789
34206
  function DivaBasketHandler(plannerConfig) {
34790
34207
  var _this = this,
@@ -34818,7 +34235,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34818
34235
  this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34819
34236
  this._handler = plannerConfig.handler;
34820
34237
  if (this.plannerConfig.divaNr == undefined && this.plannerConfig.basketData == undefined && this.plannerConfig.catalogCodex == undefined && this.plannerConfig.productId == undefined && this.plannerConfig.customProductId == undefined && this.plannerConfig.returnTo != 'TEST_CONFIGURATORLOGIC' && !((_this$plannerConfig$s = this.plannerConfig.settings) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.ViewConfig) !== null && _this$plannerConfig$s !== void 0 && (_this$plannerConfig$s = _this$plannerConfig$s.plannerType) !== null && _this$plannerConfig$s !== void 0 && _this$plannerConfig$s.includes('PRODUCTS') || (_this$plannerConfig$s2 = this.plannerConfig.settings) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.ViewConfig) !== null && _this$plannerConfig$s2 !== void 0 && (_this$plannerConfig$s2 = _this$plannerConfig$s2.plannerType) !== null && _this$plannerConfig$s2 !== void 0 && _this$plannerConfig$s2.includes('PROMOTED'))) {
34821
- LOG$6.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
34238
+ LOG$7.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
34822
34239
  code: 'WC_0003'
34823
34240
  }));
34824
34241
  }
@@ -34828,7 +34245,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34828
34245
  }
34829
34246
  if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34830
34247
  var _this$plannerConfig$a2, _this$plannerConfig$a3;
34831
- this._basketHandler = new BasketHandler__default["default"](LOG$6, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
34248
+ this._basketHandler = new BasketHandler__default["default"](LOG$7, (_this$plannerConfig$a2 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a2 === void 0 ? void 0 : _this$plannerConfig$a2.basketService, (_this$plannerConfig$a3 = this.plannerConfig.apiConfig) === null || _this$plannerConfig$a3 === void 0 ? void 0 : _this$plannerConfig$a3.api2["default"]);
34832
34249
  }
34833
34250
  }
34834
34251
  return _createClass__default["default"](DivaBasketHandler, [{
@@ -34881,13 +34298,13 @@ var DivaBasketHandler = /*#__PURE__*/function () {
34881
34298
  value: function () {
34882
34299
  var _initializeBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(api) {
34883
34300
  var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
34884
- var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
34301
+ var returnSuccessfully, divaNr, i, os, _params$customFieldsT, params, _this$plannerConfig$h, _this$plannerConfig$c, _this$plannerConfig$c2, _this$plannerConfig$c3, _result$data$, result, _result$data$2, _this$plannerConfig$s4, _this$plannerConfig$a4, _api$getI18n, _api$getI18n2, successfully;
34885
34302
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
34886
34303
  while (1) switch (_context.prev = _context.next) {
34887
34304
  case 0:
34888
34305
  this.basketWasSavedWithCurrentDocVersion = false;
34889
34306
  this.startProductId = undefined;
34890
- LOG$6.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34307
+ LOG$7.debug("Basket initialising. initObject is: '", this.plannerConfig, "' divaNr to load is: '" + this.loadDivaNr + "'");
34891
34308
  if (this.ignoreInitObjectWhenInitializing) {
34892
34309
  _context.next = 34;
34893
34310
  break;
@@ -35014,9 +34431,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35014
34431
  op: 'eq',
35015
34432
  value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
35016
34433
  }, {
35017
- id: 'available',
34434
+ id: 'availableForOrganizations',
35018
34435
  op: 'eq',
35019
- value: true
34436
+ value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
35020
34437
  }]);
35021
34438
  case 60:
35022
34439
  result = _context.sent;
@@ -35053,7 +34470,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35053
34470
  title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
35054
34471
  text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
35055
34472
  });
35056
- LOG$6.error(new DivaUtils.DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
34473
+ LOG$7.error(new DivaUtils.DivaError('it is configured to initialize the startProductForOrganizations if there are no other parameters. But no available product was found with organizationId: "' + this.plannerConfig.currentOrganization._id + '" in the field: "startProductForOrganizations"!'));
35057
34474
  case 77:
35058
34475
  _context.next = 83;
35059
34476
  break;
@@ -35201,12 +34618,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35201
34618
  case 0:
35202
34619
  basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
35203
34620
  if (origProductId) basketFromAPI.OrigProductId = origProductId;
35204
- basket = _objectSpread$8({}, basketFromAPI);
34621
+ basket = _objectSpread$7({}, basketFromAPI);
35205
34622
  if (!basketFromAPI) {
35206
- _context5.next = 50;
34623
+ _context5.next = 48;
35207
34624
  break;
35208
34625
  }
35209
- LOG$6.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
34626
+ LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
35210
34627
  if (basketFromAPI.OrigDivaNr) {
35211
34628
  this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
35212
34629
  } else if (basketFromAPI.OrigCatalogCodex) {
@@ -35300,20 +34717,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35300
34717
  this.baskets[newDivaNr] = new basketModel.BasketData(basket);
35301
34718
  this.baskets[newDivaNr].clearRenderData();
35302
34719
  if (!keepOldDivaNr) this.divaNr = newDivaNr;
35303
- _context5.next = 46;
35304
- return DivaUtils__default["default"].initCache({
35305
- accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
35306
- catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
35307
- });
35308
- case 46:
35309
34720
  if (this.assignNewDivaNr) {
35310
34721
  this.baskets[newDivaNr].clearBasketClientData();
35311
34722
  this.baskets[newDivaNr].ProductSetName = '';
35312
34723
  }
35313
34724
  return _context5.abrupt("return", true);
35314
- case 50:
34725
+ case 48:
35315
34726
  return _context5.abrupt("return", false);
35316
- case 51:
34727
+ case 49:
35317
34728
  case "end":
35318
34729
  return _context5.stop();
35319
34730
  }
@@ -35347,7 +34758,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35347
34758
  key: "loadBasketByCatalogCodex",
35348
34759
  value: function () {
35349
34760
  var _loadBasketByCatalogCodex = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(api) {
35350
- var _this$plannerConfig$s8, _this$actBasket$Order, _this$actBasket$Order2;
34761
+ var _this$plannerConfig$s8;
35351
34762
  var newBasket, _this$baskets$this$di;
35352
34763
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
35353
34764
  while (1) switch (_context6.prev = _context6.next) {
@@ -35358,37 +34769,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35358
34769
  if (this.plannerConfig.articleCodexes) {
35359
34770
  this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
35360
34771
  }
35361
- if (!(DivaUtils__default["default"].CacheIsEnabled && DivaUtils__default["default"].CacheAccountGuid)) {
34772
+ if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35362
34773
  _context6.next = 6;
35363
34774
  break;
35364
34775
  }
35365
- this.plannerConfig.accountGuid = DivaUtils__default["default"].CacheAccountGuid;
35366
- _context6.next = 8;
34776
+ _context6.t0 = _this$plannerConfig$s8;
34777
+ _context6.next = 9;
35367
34778
  break;
35368
34779
  case 6:
35369
34780
  _context6.next = 8;
35370
- return DivaUtils__default["default"].initCache({
35371
- accountGuid: this.plannerConfig.accountGuid,
35372
- catalogCodex: this.plannerConfig.catalogCodex
35373
- });
35374
- case 8:
35375
- if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35376
- _context6.next = 12;
35377
- break;
35378
- }
35379
- _context6.t0 = _this$plannerConfig$s8;
35380
- _context6.next = 15;
35381
- break;
35382
- case 12:
35383
- _context6.next = 14;
35384
34781
  return this.createNewDivaNr(api);
35385
- case 14:
34782
+ case 8:
35386
34783
  _context6.t0 = _context6.sent;
35387
- case 15:
34784
+ case 9:
35388
34785
  this.divaNr = _context6.t0;
35389
- _context6.next = 18;
34786
+ _context6.next = 12;
35390
34787
  return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
35391
- case 18:
34788
+ case 12:
35392
34789
  newBasket = _context6.sent;
35393
34790
  if (!this.plannerConfig.basketData) {
35394
34791
  this.baskets[this.divaNr] = newBasket;
@@ -35405,14 +34802,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35405
34802
  if (this.baskets[this.divaNr].SetPlannerInfos) ;
35406
34803
  }
35407
34804
  this.specificSetIdToLoad = this.plannerConfig.setId;
35408
- _context6.next = 23;
35409
- return DivaUtils__default["default"].initCache({
35410
- accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
35411
- catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
35412
- });
35413
- case 23:
35414
34805
  return _context6.abrupt("return", true);
35415
- case 24:
34806
+ case 16:
35416
34807
  case "end":
35417
34808
  return _context6.stop();
35418
34809
  }
@@ -35443,7 +34834,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35443
34834
  case 9:
35444
34835
  _context7.prev = 9;
35445
34836
  _context7.t0 = _context7["catch"](0);
35446
- LOG$6.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
34837
+ LOG$7.error(new DivaUtils.DivaError('DivaNr konnte in der Datenbank nicht gefunden werden', {
35447
34838
  code: 'WC_0004',
35448
34839
  custom: {
35449
34840
  divaNr: divaNr
@@ -35479,7 +34870,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35479
34870
  _context8.next = 8;
35480
34871
  break;
35481
34872
  }
35482
- LOG$6.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34873
+ LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35483
34874
  code: 'WC_0005',
35484
34875
  custom: {
35485
34876
  productId: productId
@@ -35563,7 +34954,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35563
34954
  _context10.next = 6;
35564
34955
  break;
35565
34956
  }
35566
- LOG$6.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
34957
+ LOG$7.error(new DivaUtils.DivaError('ProductId konnte in der Datenbank nicht gefunden werden', {
35567
34958
  code: 'WC_0005',
35568
34959
  custom: {
35569
34960
  productId: productId
@@ -35600,8 +34991,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35600
34991
  CatalogGUID: initObject.catalogGuid,
35601
34992
  AccountGUID: initObject.accountGuid,
35602
34993
  Favorites: new basketModel.Favorites()
35603
- }); //dont get session if cache is active (SuS)
35604
- if (!(initObject.accountGuid && !orderSet.AccountSessionGUID && !DivaUtils__default["default"].cacheIsReady)) {
34994
+ });
34995
+ if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
35605
34996
  _context11.next = 5;
35606
34997
  break;
35607
34998
  }
@@ -35650,12 +35041,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35650
35041
  key: "saveToBasket",
35651
35042
  value: function () {
35652
35043
  var _saveToBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(api, actBasket, returnTo) {
35653
- var _this$plannerConfig$c3, _this$_basketHandler, _api$getJwt;
35044
+ var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
35654
35045
  var response;
35655
35046
  return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
35656
35047
  while (1) switch (_context12.prev = _context12.next) {
35657
35048
  case 0:
35658
- LOG$6.startTransaction({
35049
+ LOG$7.startTransaction({
35659
35050
  event: 'SaveBasketOnAPI',
35660
35051
  eventId: 'SAVE_BASKET_ON_API',
35661
35052
  message: 'Save Basket on API'
@@ -35669,7 +35060,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35669
35060
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
35670
35061
  case 8:
35671
35062
  actBasket.UserLanguage = api.getLanguage();
35672
- actBasket.PrintRetailLogo = (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3.logoUrl;
35063
+ actBasket.PrintRetailLogo = (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4.logoUrl;
35673
35064
  _context12.next = 12;
35674
35065
  return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
35675
35066
  jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
@@ -35694,7 +35085,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35694
35085
  }
35695
35086
  return _context12.abrupt("return", response);
35696
35087
  case 19:
35697
- LOG$6.successTransaction('saveBasketOnAPI');
35088
+ LOG$7.successTransaction('saveBasketOnAPI');
35698
35089
  return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
35699
35090
  case 21:
35700
35091
  case "end":
@@ -35800,7 +35191,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35800
35191
  if (_loop2()) continue;
35801
35192
  }
35802
35193
  var variantValues = article.VariantValuesParentOption;
35803
- var data = _objectSpread$8(_objectSpread$8({}, this.actBasket), {}, {
35194
+ var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
35804
35195
  changedValues: changedValues,
35805
35196
  variantValues: variantValues,
35806
35197
  isInit: isInit,
@@ -35825,7 +35216,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35825
35216
  break;
35826
35217
  case 3:
35827
35218
  _context13.next = 5;
35828
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-b60e2dd4.js'); });
35219
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-24c470e2.js'); });
35829
35220
  case 5:
35830
35221
  _yield$import = _context13.sent;
35831
35222
  PfisterWWSHandler = _yield$import["default"];
@@ -35833,7 +35224,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35833
35224
  return _context13.abrupt("break", 33);
35834
35225
  case 9:
35835
35226
  _context13.next = 11;
35836
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-1dcaf2f5.js'); });
35227
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-9bc80b98.js'); });
35837
35228
  case 11:
35838
35229
  _yield$import2 = _context13.sent;
35839
35230
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35841,7 +35232,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35841
35232
  return _context13.abrupt("break", 33);
35842
35233
  case 15:
35843
35234
  _context13.next = 17;
35844
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-f6de9720.js'); });
35235
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-a4647e89.js'); });
35845
35236
  case 17:
35846
35237
  _yield$import3 = _context13.sent;
35847
35238
  SeriousWWSHandler = _yield$import3["default"];
@@ -35849,7 +35240,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35849
35240
  return _context13.abrupt("break", 33);
35850
35241
  case 21:
35851
35242
  _context13.next = 23;
35852
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-91e017b7.js'); });
35243
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-08dcf24e.js'); });
35853
35244
  case 23:
35854
35245
  _yield$import4 = _context13.sent;
35855
35246
  ProductWWSHandler = _yield$import4["default"];
@@ -35857,7 +35248,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35857
35248
  return _context13.abrupt("break", 33);
35858
35249
  case 27:
35859
35250
  _context13.next = 29;
35860
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-030a868f.js'); });
35251
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-e211a327.js'); });
35861
35252
  case 29:
35862
35253
  _yield$import5 = _context13.sent;
35863
35254
  StandardWWSHandler = _yield$import5["default"];
@@ -35888,43 +35279,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35888
35279
  //if no shopType is set in parent organization, no ropo effekt
35889
35280
  if (!organization.shopType) return;
35890
35281
  if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
35891
- var _this$plannerConfig$c4;
35892
- LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35893
- sourceDivaNr: sourceBasket.DivaNr,
35894
- sourceOrgId: sourceOrganizationId.id,
35895
- targetOrgId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
35896
- });
35897
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35898
35282
  var _this$plannerConfig$c5;
35899
- LOG$6.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35283
+ LOG$7.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35900
35284
  sourceDivaNr: sourceBasket.DivaNr,
35901
35285
  sourceOrgId: sourceOrganizationId.id,
35902
35286
  targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
35903
35287
  });
35904
- } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35288
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35905
35289
  var _this$plannerConfig$c6;
35906
- LOG$6.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35290
+ LOG$7.businessEvent('ropoEffectWebToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Web', {
35907
35291
  sourceDivaNr: sourceBasket.DivaNr,
35908
35292
  sourceOrgId: sourceOrganizationId.id,
35909
35293
  targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
35910
35294
  });
35911
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35295
+ } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35912
35296
  var _this$plannerConfig$c7;
35913
- LOG$6.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35297
+ LOG$7.businessEvent('ropoEffectStoreToWeb', 'Seller', 'Evaluating the ROPO Effect Web To Store', {
35914
35298
  sourceDivaNr: sourceBasket.DivaNr,
35915
35299
  sourceOrgId: sourceOrganizationId.id,
35916
35300
  targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
35917
35301
  });
35302
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35303
+ var _this$plannerConfig$c8;
35304
+ LOG$7.businessEvent('ropoEffectWebToStore', 'Seller', 'Evaluating the ROPO Effect Store To Web', {
35305
+ sourceDivaNr: sourceBasket.DivaNr,
35306
+ sourceOrgId: sourceOrganizationId.id,
35307
+ targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35308
+ });
35918
35309
  }
35919
35310
  } catch (e) {
35920
- var _this$plannerConfig$c8;
35921
- LOG$6.error(new DivaUtils.DivaError('Error on Evaluating ROPO Effect', {
35311
+ var _this$plannerConfig$c9;
35312
+ LOG$7.error(new DivaUtils.DivaError('Error on Evaluating ROPO Effect', {
35922
35313
  code: 'SELLER_0006',
35923
35314
  cause: e,
35924
35315
  custom: {
35925
35316
  sourceDivaNr: sourceBasket.DivaNr,
35926
35317
  sourceOrgId: sourceOrganizationId,
35927
- targetOrgId: (_this$plannerConfig$c8 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c8 === void 0 ? void 0 : _this$plannerConfig$c8._id
35318
+ targetOrgId: (_this$plannerConfig$c9 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c9 === void 0 ? void 0 : _this$plannerConfig$c9._id
35928
35319
  }
35929
35320
  }));
35930
35321
  }
@@ -35932,7 +35323,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35932
35323
  }]);
35933
35324
  }();
35934
35325
 
35935
- var LOG$5 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
35326
+ var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
35936
35327
  var ViewPointHandler = /*#__PURE__*/function () {
35937
35328
  function ViewPointHandler() {
35938
35329
  _classCallCheck__default["default"](this, ViewPointHandler);
@@ -36155,22 +35546,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
36155
35546
  var roomListObj = JSON.parse(roomlist);
36156
35547
  var roomIsSel = true;
36157
35548
  for (var roomCodex in roomListObj) {
36158
- LOG$5.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
35549
+ LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
36159
35550
  var curRoom = roomListObj[roomCodex];
36160
35551
  var mainCategory = '#WG#';
36161
35552
  if (!this.staticRoomMainCategories.has(roomCodex)) {
36162
- LOG$5.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35553
+ LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36163
35554
  code: 'WC_0013'
36164
35555
  }));
36165
35556
  } else {
36166
35557
  var categories = this.staticRoomMainCategories.get(roomCodex);
36167
35558
  if (categories.length == 0) {
36168
- LOG$5.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
35559
+ LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. Please add a retailerMainCategory for this catalog in the CE!', {
36169
35560
  code: 'WC_0013'
36170
35561
  }));
36171
35562
  } else {
36172
35563
  if (categories.length > 1) {
36173
- LOG$5.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
35564
+ LOG$6.error(new DivaUtils.DivaError('Error when parsing preview URL for a viewPoint. There is more than one Catalog loaded. Decide a strategy which mainCategory should be taken!', {
36174
35565
  code: 'WC_0013'
36175
35566
  }));
36176
35567
  }
@@ -36184,7 +35575,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36184
35575
  previewUrl = previewUrl.replace('#WG#', mainCategory);
36185
35576
  }
36186
35577
  if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
36187
- LOG$5.error(new DivaUtils.DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
35578
+ LOG$6.error(new DivaUtils.DivaError('The background has a custom width and custom height. However it is not formatted correctly. the width and height must be separated with ":" : ' + curRoom.VP[i].R, {
36188
35579
  code: 'WC_0013'
36189
35580
  }));
36190
35581
  }
@@ -36282,7 +35673,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36282
35673
  this.navInfo3D.rotVert = 0;
36283
35674
  this.navInfo3D.rotHori = 0;
36284
35675
  } else {
36285
- LOG$5.debug('There is no static frontend viewpoint room: ' + roomCodex);
35676
+ LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
36286
35677
  }
36287
35678
  } else if (this.curRoomCodex == roominfo.codex) {
36288
35679
  roominfo.sel = false;
@@ -36427,207 +35818,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
36427
35818
  }]);
36428
35819
  }();
36429
35820
 
36430
- function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36431
- function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36432
- var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
36433
- var DivaMediaServiceHandler = /*#__PURE__*/function () {
36434
- //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
36435
-
36436
- function DivaMediaServiceHandler() {
36437
- _classCallCheck__default["default"](this, DivaMediaServiceHandler);
36438
- _defineProperty__default["default"](this, "organizationId", void 0);
36439
- _defineProperty__default["default"](this, "mediaServiceUrl", void 0);
36440
- _defineProperty__default["default"](this, "mediaServiceApiKey", void 0);
36441
- _defineProperty__default["default"](this, "jwt", void 0);
36442
- _defineProperty__default["default"](this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
36443
- _defineProperty__default["default"](this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
36444
- _defineProperty__default["default"](this, "POST_mediaItem", '/v1/mediaitems?ref=true');
36445
- this.organizationId = '';
36446
- this.mediaServiceUrl = '';
36447
- this.mediaServiceApiKey = '';
35821
+ //This class saves all informations needed for a rendering
35822
+ var LOG$5 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
35823
+ var Rendering = /*#__PURE__*/function () {
35824
+ function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
35825
+ _classCallCheck__default["default"](this, Rendering);
35826
+ _defineProperty__default["default"](this, "planningHash", void 0);
35827
+ _defineProperty__default["default"](this, "renderHash", void 0);
35828
+ _defineProperty__default["default"](this, "creationTime", void 0);
35829
+ _defineProperty__default["default"](this, "renderWidth", void 0);
35830
+ _defineProperty__default["default"](this, "renderHeight", void 0);
35831
+ _defineProperty__default["default"](this, "uiInfo", void 0);
35832
+ _defineProperty__default["default"](this, "urlToSavedRendering", void 0);
35833
+ // viewPoint: string;
35834
+ // private posInfo: any;
35835
+ //private doStream: boolean; Streaming over 3D Host is deprected
35836
+ //private byteChunkArr: any;
35837
+ //private byteChunkLayerMaskArr: any;
35838
+ _defineProperty__default["default"](this, "hasLayerMask", void 0);
35839
+ //private imgBytes: any;
35840
+ _defineProperty__default["default"](this, "imgForSrc", void 0);
35841
+ _defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
35842
+ _defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
35843
+ _defineProperty__default["default"](this, "isFullscreenRendering", void 0);
35844
+ _defineProperty__default["default"](this, "hasStaticBackground", void 0);
35845
+ _defineProperty__default["default"](this, "hasDimensionLines", void 0);
35846
+ _defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
35847
+ _defineProperty__default["default"](this, "alternateRendererInfo", void 0);
35848
+ _defineProperty__default["default"](this, "isAlternateRendering", void 0);
35849
+ _defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
35850
+ _defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
35851
+ _defineProperty__default["default"](this, "catalogData", void 0);
35852
+ this.planningHash = planningHash;
35853
+ this.renderHash = renderHash;
35854
+ this.renderWidth = width;
35855
+ this.renderHeight = height;
35856
+ this.uiInfo = '';
35857
+ this.imgForSrc = '';
35858
+ this.layerMaskAsBase64 = '';
35859
+ this.isFullscreenRendering = isFullscreenRendering;
35860
+ this.hasDimensionLines = hasDimensionLines;
35861
+ this.plannerMeasureDigits = plannerMeasureDigits;
35862
+ this.hasLayerMask = hasLayerMask;
35863
+ this.creationTime = new Date();
35864
+ this.layerMaskThreeTexture = undefined;
35865
+ this.hasStaticBackground = hasStaticBG;
35866
+ this.mediaServiceSaveMode = mediaServiceSaveMode;
35867
+ this.urlToSavedRendering = '';
35868
+ this.catalogData = {
35869
+ catalogCodex: '',
35870
+ catalogGUID: ''
35871
+ };
35872
+ if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
35873
+ this.alternateRendererInfo = alternateRendererInfo;
35874
+ this.alternateRenderingsExist = !!alternateRenderingsExist;
36448
35875
  }
36449
- return _createClass__default["default"](DivaMediaServiceHandler, [{
36450
- key: "setOrganizationId",
36451
- value: function setOrganizationId(organizationId) {
36452
- this.organizationId = organizationId;
35876
+ return _createClass__default["default"](Rendering, [{
35877
+ key: "clone",
35878
+ value: function clone(rendering) {
35879
+ this.planningHash = rendering.planningHash;
35880
+ this.renderHash = rendering.renderHash;
35881
+ this.creationTime = rendering.creationTime;
35882
+ this.renderWidth = rendering.renderWidth;
35883
+ this.renderHeight = rendering.renderHeight;
35884
+ this.uiInfo = rendering.uiInfo;
35885
+ this.urlToSavedRendering = rendering.urlToSavedRendering;
35886
+ this.hasLayerMask = rendering.hasLayerMask;
35887
+ this.imgForSrc = rendering.imgForSrc;
35888
+ this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
35889
+ this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
35890
+ this.isFullscreenRendering = rendering.isFullscreenRendering;
35891
+ this.hasStaticBackground = rendering.hasStaticBackground;
35892
+ this.hasDimensionLines = rendering.hasDimensionLines;
35893
+ this.plannerMeasureDigits = rendering.plannerMeasureDigits;
35894
+ this.alternateRendererInfo = rendering.alternateRendererInfo;
35895
+ this.isAlternateRendering = rendering.isAlternateRendering;
35896
+ this.alternateRenderingsExist = rendering.alternateRenderingsExist;
35897
+ this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
35898
+ this.catalogData = rendering.catalogData;
36453
35899
  }
36454
35900
  }, {
36455
- key: "setMediaServiceUrl",
36456
- value: function setMediaServiceUrl(mediaServiceUrl) {
36457
- this.mediaServiceUrl = mediaServiceUrl;
35901
+ key: "getAllDockingPoints",
35902
+ value: function getAllDockingPoints(setId, elementId) {
35903
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35904
+ return this.uiInfo['S1']['E' + elementId]['DP'];
35905
+ }
35906
+ return this.uiInfo[setId]['E' + elementId]['DP'];
36458
35907
  }
36459
35908
  }, {
36460
- key: "setMediaServiceApiKey",
36461
- value: function setMediaServiceApiKey(mediaServiceApiKey) {
36462
- this.mediaServiceApiKey = mediaServiceApiKey;
35909
+ key: "getHasStaticBackground",
35910
+ value: function getHasStaticBackground() {
35911
+ return this.hasStaticBackground;
36463
35912
  }
36464
35913
  }, {
36465
- key: "setJwt",
36466
- value: function setJwt(jwt) {
36467
- this.jwt = jwt;
35914
+ key: "getIsFullscreenRendering",
35915
+ value: function getIsFullscreenRendering() {
35916
+ return this.isFullscreenRendering;
36468
35917
  }
36469
35918
  }, {
36470
- key: "loadRenderingFromCache",
36471
- value: function () {
36472
- var _loadRenderingFromCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(hash) {
36473
- var logOnError,
36474
- url,
36475
- response,
36476
- error,
36477
- result,
36478
- _args = arguments;
36479
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
36480
- while (1) switch (_context.prev = _context.next) {
36481
- case 0:
36482
- logOnError = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
36483
- LOG$4.startTransaction({
36484
- event: 'onRequestRendering',
36485
- message: 'Requesting Rendering',
36486
- eventId: 'ON_REQUEST_RENDERING',
36487
- warningTime: 2000,
36488
- errorTime: 4000,
36489
- labels: {}
36490
- });
36491
- url = this.mediaServiceUrl + this.GET_MediaItemrefs + '%5B%7Bhash%2Ceq%2C' + hash + '%7D%2C%7BorganizationId%2Ceq%2C' + this.organizationId + '%7D%5D';
36492
- LOG$4.debug('Try load Rendering from Cache. hash: ' + hash);
36493
- _context.next = 6;
36494
- return fetch(url, {
36495
- method: 'GET',
36496
- mode: 'cors',
36497
- headers: _objectSpread$7({}, this.jwt ? {
36498
- authorization: "Bearer ".concat(this.jwt)
36499
- } : {
36500
- 'X-API-KEY': this.mediaServiceApiKey
36501
- })
36502
- });
36503
- case 6:
36504
- response = _context.sent;
36505
- error = false;
36506
- if (!response.ok) {
36507
- _context.next = 20;
36508
- break;
36509
- }
36510
- _context.next = 11;
36511
- return response.json();
36512
- case 11:
36513
- result = _context.sent;
36514
- if (!(result.data.length > 0)) {
36515
- _context.next = 17;
36516
- break;
36517
- }
36518
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36519
- return _context.abrupt("return", result.data[0].url);
36520
- case 17:
36521
- error = true;
36522
- case 18:
36523
- _context.next = 21;
36524
- break;
36525
- case 20:
36526
- error = true;
36527
- case 21:
36528
- if (error && logOnError) {
36529
- LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
36530
- }
36531
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36532
- return _context.abrupt("return", '');
36533
- case 24:
36534
- case "end":
36535
- return _context.stop();
36536
- }
36537
- }, _callee, this);
36538
- }));
36539
- function loadRenderingFromCache(_x) {
36540
- return _loadRenderingFromCache.apply(this, arguments);
35919
+ key: "setIsFullscreenRendering",
35920
+ value: function setIsFullscreenRendering(isFullscreen) {
35921
+ this.isFullscreenRendering = isFullscreen;
35922
+ }
35923
+ }, {
35924
+ key: "getHasDimensionLines",
35925
+ value: function getHasDimensionLines() {
35926
+ return this.hasDimensionLines;
35927
+ }
35928
+ }, {
35929
+ key: "getPlannerMeasureDigits",
35930
+ value: function getPlannerMeasureDigits() {
35931
+ return this.plannerMeasureDigits;
35932
+ }
35933
+ }, {
35934
+ key: "getIsAlternateRendering",
35935
+ value: function getIsAlternateRendering() {
35936
+ return this.isAlternateRendering;
35937
+ }
35938
+ }, {
35939
+ key: "getAlternateRenderInfo",
35940
+ value: function getAlternateRenderInfo() {
35941
+ return this.alternateRendererInfo;
35942
+ }
35943
+ }, {
35944
+ key: "getAlternateRenderingsExist",
35945
+ value: function getAlternateRenderingsExist() {
35946
+ return this.alternateRenderingsExist;
35947
+ }
35948
+ }, {
35949
+ key: "hasUIInfosOfElement",
35950
+ value: function hasUIInfosOfElement(setId, elementid) {
35951
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35952
+ return this.uiInfo['S1']['E' + elementid] != undefined;
35953
+ } else {
35954
+ return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
36541
35955
  }
36542
- return loadRenderingFromCache;
36543
- }()
35956
+ }
36544
35957
  }, {
36545
- key: "base64ToBlob",
36546
- value: function base64ToBlob(base64String, hash) {
36547
- DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
36548
- if (base64String.startsWith('data:image/jpeg;base64,')) {
36549
- base64String = base64String.replace('data:image/jpeg;base64,', '');
35958
+ key: "getOutlinePolygonForSVG",
35959
+ value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
35960
+ var poly = [];
35961
+ var avgCamDist = 0;
35962
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35963
+ poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
35964
+ avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
35965
+ } else if (this.uiInfo[setId]) {
35966
+ poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
35967
+ avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
35968
+ } else {
35969
+ poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
35970
+ avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
36550
35971
  }
36551
- var binary_string = window.atob(base64String);
36552
- var len = binary_string.length;
36553
- var bytes = new Uint8Array(len);
36554
- for (var i = 0; i < len; i++) {
36555
- bytes[i] = binary_string.charCodeAt(i);
35972
+ if (!poly) return undefined;
35973
+ var points = '';
35974
+ for (var i = 0; i < poly.length; i++) {
35975
+ points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
36556
35976
  }
36557
- var blob = new File([bytes.buffer], hash + '.jpg', {
36558
- type: 'image/jpeg'
36559
- });
36560
- DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
36561
- return blob;
35977
+ return {
35978
+ points: points,
35979
+ avgCamDist: avgCamDist
35980
+ };
36562
35981
  }
35982
+
35983
+ //Left/Right_Bottom/Top_Back/Front
36563
35984
  }, {
36564
- key: "savePlanning2DPermanent",
36565
- value: function () {
36566
- var _savePlanning2DPermanent = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
36567
- var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
36568
- return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
36569
- while (1) switch (_context2.prev = _context2.next) {
36570
- case 0:
36571
- DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36572
- imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
36573
- url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
36574
- //create media item ref and set same paramters
36575
- data = new FormData();
36576
- data.append('file', imageBlob);
36577
- mediaItem = {
36578
- organizationId: this.organizationId,
36579
- mediaType: 'PCT',
36580
- fileName: hash + '.jpg'
36581
- };
36582
- data.append('mediaItem', JSON.stringify(mediaItem));
36583
- mediaItemRef = {
36584
- functionType: 'P2D',
36585
- planningHash: hash,
36586
- catalogCodex: catalogCodex,
36587
- catalogGuid: catalogGUID
36588
- };
36589
- data.append('mediaItemRef', JSON.stringify(mediaItemRef));
36590
- _context2.next = 11;
36591
- return fetch(url, {
36592
- method: 'POST',
36593
- body: data,
36594
- headers: {
36595
- 'X-API-KEY': this.mediaServiceApiKey
36596
- }
36597
- });
36598
- case 11:
36599
- response = _context2.sent;
36600
- if (!response.ok) {
36601
- _context2.next = 20;
36602
- break;
36603
- }
36604
- _context2.next = 15;
36605
- return response.json();
36606
- case 15:
36607
- res = _context2.sent;
36608
- LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
36609
- return _context2.abrupt("return", res.url);
36610
- case 20:
36611
- LOG$4.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
36612
- code: 'WC_0016'
36613
- }));
36614
- case 21:
36615
- DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36616
- return _context2.abrupt("return", '');
36617
- case 23:
36618
- case "end":
36619
- return _context2.stop();
36620
- }
36621
- }, _callee2, this);
36622
- }));
36623
- function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
36624
- return _savePlanning2DPermanent.apply(this, arguments);
35985
+ key: "getRightTopBackUIPos",
35986
+ value: function getRightTopBackUIPos(setId, elemId) {
35987
+ var bbox = null;
35988
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
35989
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
35990
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
35991
+ if (!bbox) return;
35992
+ for (var i = 0; i < bbox.length; i++) {
35993
+ if (bbox[i].C == 'RTB') {
35994
+ return bbox[i];
35995
+ }
36625
35996
  }
36626
- return savePlanning2DPermanent;
36627
- }()
35997
+ }
35998
+ //Left/Right_Bottom/Top_Back/Front
35999
+ }, {
36000
+ key: "getLeftTopBackUIPos",
36001
+ value: function getLeftTopBackUIPos(setId, elemId) {
36002
+ var bbox = null;
36003
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
36004
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
36005
+ } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
36006
+ if (!bbox) return;
36007
+ for (var i = 0; i < bbox.length; i++) {
36008
+ if (bbox[i].C == 'LTB') {
36009
+ return bbox[i];
36010
+ }
36011
+ }
36012
+ }
36013
+ //Left/Right_Bottom/Top_Back/Front
36014
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
36015
+ }, {
36016
+ key: "getLeftBottomFrontUIPos",
36017
+ value: function getLeftBottomFrontUIPos(setId, elemId) {
36018
+ var bbox = null;
36019
+ if (this.uiInfo == '') return null;
36020
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
36021
+ if (!this.uiInfo['S1']['E' + elemId]) return;
36022
+ bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
36023
+ } else if (this.uiInfo[setId]) {
36024
+ if (!this.uiInfo[setId]['E' + elemId]) return;
36025
+ bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
36026
+ } else {
36027
+ var _this$uiInfo;
36028
+ bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
36029
+ }
36030
+ if (!bbox) return;
36031
+ for (var i = 0; i < bbox.length; i++) {
36032
+ if (bbox[i].C == 'LBF') {
36033
+ return bbox[i];
36034
+ }
36035
+ }
36036
+ }
36037
+ }, {
36038
+ key: "getBoxPlannerCornerUIPos",
36039
+ value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
36040
+ var boxPlan = [];
36041
+ if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
36042
+ boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
36043
+ } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
36044
+ for (var i = 0; i < boxPlan.length; i++) {
36045
+ if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
36046
+ switch (corner) {
36047
+ case 'TOPCENTER':
36048
+ if (boxPlan[i].N == 'TC') {
36049
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36050
+ }
36051
+ break;
36052
+ case 'LEFTCENTER':
36053
+ if (boxPlan[i].N == 'LC') {
36054
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36055
+ }
36056
+ break;
36057
+ case 'RIGHTCENTER':
36058
+ if (boxPlan[i].N == 'RC') {
36059
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36060
+ }
36061
+ break;
36062
+ case 'RIGHTTOPFRONT':
36063
+ if (boxPlan[i].N == 'RTF') {
36064
+ return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
36065
+ }
36066
+ break;
36067
+ }
36068
+ }
36069
+ return undefined;
36070
+ }
36071
+ }, {
36072
+ key: "getUnityCamPos",
36073
+ value: function getUnityCamPos() {
36074
+ return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
36075
+ }
36076
+ }, {
36077
+ key: "getUnityCamRot",
36078
+ value: function getUnityCamRot() {
36079
+ var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
36080
+ return quatVec;
36081
+ }
36082
+ }, {
36083
+ key: "getUnityFOV",
36084
+ value: function getUnityFOV() {
36085
+ return parseFloat(this.uiInfo['CAM']['FOV']);
36086
+ }
36087
+
36088
+ //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
36089
+ //It returns the distance of an element to the ground in cm
36090
+ }, {
36091
+ key: "getDistanceToGround",
36092
+ value: function getDistanceToGround(setId, elementId) {
36093
+ setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
36094
+ if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
36095
+ return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
36096
+ }
36097
+ return -1;
36098
+ }
36099
+ }, {
36100
+ key: "addUIInfo",
36101
+ value: function addUIInfo(uiInfo) {
36102
+ try {
36103
+ this.uiInfo = JSON.parse(uiInfo);
36104
+ } catch (error) {
36105
+ LOG$5.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
36106
+ code: 'WC_0013',
36107
+ cause: error
36108
+ }));
36109
+ }
36110
+ }
36111
+
36112
+ /**
36113
+ * This function adds a blobImage to the rendering .
36114
+ * It is parsed to a base64 image.
36115
+ * @param blob The blob contains the image
36116
+ * @param isLayerMask True if the Image is the layer mask image
36117
+ */
36118
+ }, {
36119
+ key: "addImgAsBlob",
36120
+ value: function addImgAsBlob(buffer, isLayerMask) {
36121
+ if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
36122
+ }
36123
+ }, {
36124
+ key: "getImageForSrc",
36125
+ value: function getImageForSrc() {
36126
+ return this.imgForSrc;
36127
+ }
36128
+
36129
+ //*****************************************GETTER und SETTER********************************************** */
36130
+ }, {
36131
+ key: "CatalogCodex",
36132
+ get: function get() {
36133
+ return this.catalogData.catalogCodex;
36134
+ },
36135
+ set: function set(val) {
36136
+ this.catalogData.catalogCodex = val;
36137
+ }
36138
+ }, {
36139
+ key: "CatalogGUID",
36140
+ get: function get() {
36141
+ return this.catalogData.catalogGUID;
36142
+ },
36143
+ set: function set(val) {
36144
+ this.catalogData.catalogGUID = val;
36145
+ }
36146
+ }, {
36147
+ key: "PlanningHash",
36148
+ get: function get() {
36149
+ return this.planningHash;
36150
+ }
36151
+ }, {
36152
+ key: "RenderHash",
36153
+ get: function get() {
36154
+ return this.renderHash;
36155
+ }
36156
+ }, {
36157
+ key: "UrlToSavedRendering",
36158
+ get: function get() {
36159
+ return this.urlToSavedRendering;
36160
+ },
36161
+ set: function set(url) {
36162
+ this.urlToSavedRendering = url;
36163
+ }
36164
+ }, {
36165
+ key: "HasLayerMask",
36166
+ get: function get() {
36167
+ return this.hasLayerMask;
36168
+ },
36169
+ set: function set(hasLayerMask) {
36170
+ this.hasLayerMask = hasLayerMask;
36171
+ }
36172
+ }, {
36173
+ key: "RenderWidth",
36174
+ get: function get() {
36175
+ return this.renderWidth;
36176
+ }
36177
+ }, {
36178
+ key: "RenderHeight",
36179
+ get: function get() {
36180
+ return this.renderHeight;
36181
+ }
36182
+ }, {
36183
+ key: "getHasLayerMask",
36184
+ value: function getHasLayerMask() {
36185
+ return this.hasLayerMask;
36186
+ }
36187
+ }, {
36188
+ key: "getLayerMaskForSrc",
36189
+ value: function getLayerMaskForSrc() {
36190
+ return this.layerMaskAsBase64;
36191
+ }
36192
+ }, {
36193
+ key: "HasLayerMaskThreeTexture",
36194
+ get: function get() {
36195
+ return this.layerMaskThreeTexture != undefined;
36196
+ }
36197
+ }, {
36198
+ key: "LayerMaskThreeTexture",
36199
+ get: function get() {
36200
+ return this.layerMaskThreeTexture;
36201
+ },
36202
+ set: function set(tex) {
36203
+ this.layerMaskThreeTexture = tex;
36204
+ }
36205
+ }, {
36206
+ key: "AllImgLoaded",
36207
+ get: function get() {
36208
+ return this.imgForSrc != '' && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
36209
+ }
36210
+ }, {
36211
+ key: "UiInfoLoaded",
36212
+ get: function get() {
36213
+ return this.uiInfo != '';
36214
+ }
36215
+ }, {
36216
+ key: "CreationTime",
36217
+ get: function get() {
36218
+ return this.creationTime.getTime();
36219
+ }
36220
+ }, {
36221
+ key: "MediaServiceSaveMode",
36222
+ get: function get() {
36223
+ return this.mediaServiceSaveMode;
36224
+ },
36225
+ set: function set(mode) {
36226
+ this.mediaServiceSaveMode = mode;
36227
+ }
36628
36228
  }]);
36629
36229
  }();
36630
- var mediaServiceHandler = new DivaMediaServiceHandler();
36631
36230
 
36632
36231
  var RenderSettings = /*#__PURE__*/function () {
36633
36232
  function RenderSettings() {
@@ -36648,9 +36247,6 @@ var RenderSettings = /*#__PURE__*/function () {
36648
36247
  _defineProperty__default["default"](this, "applicationName", void 0);
36649
36248
  _defineProperty__default["default"](this, "divaMediaServiceUrl", void 0);
36650
36249
  _defineProperty__default["default"](this, "renderGroup", void 0);
36651
- _defineProperty__default["default"](this, "useSirvViewer", void 0);
36652
- _defineProperty__default["default"](this, "useMediaServiceImageCache", void 0);
36653
- _defineProperty__default["default"](this, "suppressCacheCreation", void 0);
36654
36250
  this.organizationId = '';
36655
36251
  this.diva3DServerURL = '';
36656
36252
  this.userID = '';
@@ -36659,9 +36255,6 @@ var RenderSettings = /*#__PURE__*/function () {
36659
36255
  this.applicationName = '';
36660
36256
  this.divaMediaServiceUrl = '';
36661
36257
  this.renderGroup = '';
36662
- this.useSirvViewer = false;
36663
- this.useMediaServiceImageCache = false;
36664
- this.suppressCacheCreation = false;
36665
36258
  }
36666
36259
  return _createClass__default["default"](RenderSettings, [{
36667
36260
  key: "OrganizationId",
@@ -36727,30 +36320,6 @@ var RenderSettings = /*#__PURE__*/function () {
36727
36320
  set: function set(group) {
36728
36321
  this.renderGroup = group;
36729
36322
  }
36730
- }, {
36731
- key: "UseSirvViewer",
36732
- get: function get() {
36733
- return this.useSirvViewer;
36734
- },
36735
- set: function set(viewer) {
36736
- this.useSirvViewer = viewer;
36737
- }
36738
- }, {
36739
- key: "UseMediaServiceImageCache",
36740
- get: function get() {
36741
- return this.useMediaServiceImageCache;
36742
- },
36743
- set: function set(cache) {
36744
- this.useMediaServiceImageCache = cache;
36745
- }
36746
- }, {
36747
- key: "SuppressCacheCreation",
36748
- get: function get() {
36749
- return this.suppressCacheCreation;
36750
- },
36751
- set: function set(cache) {
36752
- this.suppressCacheCreation = cache;
36753
- }
36754
36323
  }]);
36755
36324
  }();
36756
36325
  /*
@@ -36799,7 +36368,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
36799
36368
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
36800
36369
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
36801
36370
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
36802
- var LOG$3 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
36371
+ var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
36803
36372
  var PlannerHandler3D = /*#__PURE__*/function () {
36804
36373
  //-------------------------------------------------Initialization---------------------------------------------------------------
36805
36374
 
@@ -36917,12 +36486,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36917
36486
  };
36918
36487
  }
36919
36488
  return _createClass__default["default"](PlannerHandler3D, [{
36920
- key: "doUseRealtimeRendering",
36921
- value: function doUseRealtimeRendering() {
36922
- if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
36923
- return true;
36924
- }
36925
- }, {
36926
36489
  key: "setJwt",
36927
36490
  value: function setJwt(jwt) {
36928
36491
  this.jwt = jwt;
@@ -37042,9 +36605,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37042
36605
  }
37043
36606
  this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
37044
36607
  this.renderSettings.OrganizationId = params.organizationId;
37045
- this.renderSettings.UseSirvViewer = params.useSirvViewer;
37046
- this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
37047
- this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
37048
36608
  this.liveArViewerUrl = params.arViewerUrl;
37049
36609
  return result;
37050
36610
  }
@@ -37057,21 +36617,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37057
36617
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
37058
36618
  while (1) switch (_context3.prev = _context3.next) {
37059
36619
  case 0:
37060
- if (!this.doUseRealtimeRendering()) {
37061
- _context3.next = 7;
37062
- break;
37063
- }
37064
- _context3.next = 3;
37065
- return Promise.resolve().then(function () { return require('./Host3DSignalR-f7f33fe7.js'); });
37066
- case 3:
36620
+ _context3.next = 2;
36621
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-e6cae920.js'); });
36622
+ case 2:
37067
36623
  _yield$import = _context3.sent;
37068
36624
  Host3DSignalR = _yield$import["default"];
37069
36625
  this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
37070
- LOG$3.debug('initializeConnection to Host3DSignalR');
37071
- case 7:
37072
- _context3.next = 9;
36626
+ LOG$4.debug('initializeConnection to Host3DSignalR');
36627
+ _context3.next = 8;
37073
36628
  return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
37074
- case 9:
36629
+ case 8:
37075
36630
  case "end":
37076
36631
  return _context3.stop();
37077
36632
  }
@@ -37134,7 +36689,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37134
36689
  value: function onConnectedToDivaNr(status) {
37135
36690
  //Check if request3D has to be called againe
37136
36691
  if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
37137
- LOG$3.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
36692
+ LOG$4.debug('Return Login - joind successfully but during loggin, a render or hqRenderScript Request was made. Remake it now');
37138
36693
  this.todoAfterLogin.request3D.doRequest3D = false;
37139
36694
  this.request3D(this.todoAfterLogin.request3D.params);
37140
36695
  this.todoAfterLogin.request3D.params = undefined;
@@ -37188,36 +36743,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37188
36743
  * @param buffer
37189
36744
  */
37190
36745
  function handleReceiveRendering(params) {
37191
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
36746
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
37192
36747
  var isLayerMask = params.hash.endsWith('_m') ? true : false;
37193
36748
  params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
37194
36749
  var cachedRendering = this.getRenderingFromCache(params.hash);
37195
36750
  var waitedRendering = this.getWaitForRendering(params.hash);
37196
36751
  if (!cachedRendering && !waitedRendering) {
37197
- LOG$3.error(new DivaUtils.DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
36752
+ LOG$4.error(new DivaUtils.DivaError('Error when handling receive Rendering. Not waiting for new Rendering but also not in cache ' + params.hash + '; saveMode: ' + params.saveMode));
37198
36753
  return;
37199
36754
  }
37200
36755
  if (waitedRendering) {
37201
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
36756
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
37202
36757
  //If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
37203
36758
  if ((waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'PERMANENT' && params.saveMode != '1' || (waitedRendering === null || waitedRendering === void 0 ? void 0 : waitedRendering.MediaServiceSaveMode) == 'STREAM' && params.saveMode != '0') {
37204
- LOG$3.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
36759
+ LOG$4.debug('Rendering with wrong savemode arrived. Wait for correct rendering');
37205
36760
  return;
37206
36761
  }
37207
36762
  if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
37208
36763
  waitedRendering.UrlToSavedRendering = params.url;
37209
- LOG$3.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
36764
+ LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
37210
36765
  }
37211
- if (this.renderSettings.UseSirvViewer && params.url) waitedRendering.setHQRenderingUrl(params.url, true);else waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
36766
+ waitedRendering.addImgAsBlob(Buffer.from(params.buffer), isLayerMask);
37212
36767
 
37213
36768
  //Do not display the rendering if it was saved in real Time mode withough cache - it was only saved when entering the Zusammenfassung for saving it later in the Basket
37214
36769
 
37215
- if ((!this.doUseRealtimeRendering() || this.renderSettings.UseMediaServiceImageCache || waitedRendering.MediaServiceSaveMode == 'STREAM') && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
36770
+ if (waitedRendering.MediaServiceSaveMode == 'STREAM' && this.checkRenderingReady(params.hash, waitedRendering)) this.updatePlannerRendering(waitedRendering);
37216
36771
  return;
37217
36772
  }
37218
36773
  if (params.url) {
37219
36774
  //If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
37220
- LOG$3.debug('handleReceiveRendering load from cache');
36775
+ LOG$4.debug('handleReceiveRendering load from cache');
37221
36776
  cachedRendering.UrlToSavedRendering = params.url;
37222
36777
  }
37223
36778
  }
@@ -37248,10 +36803,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37248
36803
  }, {
37249
36804
  key: "checkRenderingReady",
37250
36805
  value: function checkRenderingReady(hash, rendering) {
37251
- if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded && !rendering.IsLoadedFromCache) return false;
36806
+ if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
37252
36807
  this.waitForRenderings["delete"](hash);
37253
36808
  this.renderCache.set(hash, rendering);
37254
- LOG$3.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
36809
+ LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
37255
36810
  return true;
37256
36811
  }
37257
36812
  /**
@@ -37266,7 +36821,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37266
36821
  this.waitForRenderings["delete"](hash);
37267
36822
  return false;
37268
36823
  }
37269
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36824
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37270
36825
  return true;
37271
36826
  }
37272
36827
  }, {
@@ -37278,7 +36833,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37278
36833
  this.waitForHQRenderScript["delete"](hash);
37279
36834
  return false;
37280
36835
  }
37281
- LOG$3.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
36836
+ LOG$4.debug('Wait for rendering - The same rendering was asked not 4 seconds ago. !', 'PlannerHandler3D checkWaitForImage');
37282
36837
  return true;
37283
36838
  }
37284
36839
 
@@ -37300,10 +36855,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37300
36855
  result.renderHeight = curRoomListVP.backgroundImg_Height;
37301
36856
  result.renderHeight = result.renderHeight * 1.3;
37302
36857
  result.renderWidth = result.renderWidth * 1.3;
37303
- } else if (this.renderSettings.UseMediaServiceImageCache) {
37304
- //Force the size of the rendering to be a standard size
37305
- result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
37306
- result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
37307
36858
  } else if (mediaServiceSaveMode == 'PERMANENT') {
37308
36859
  //SAVE with correct Resolution
37309
36860
  result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
@@ -37347,7 +36898,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37347
36898
  return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
37348
36899
  while (1) switch (_context5.prev = _context5.next) {
37349
36900
  case 0:
37350
- LOG$3.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
36901
+ LOG$4.debug('getLastSavedRendering ' + ((_this$lastSavedRender = this.lastSavedRendering) === null || _this$lastSavedRender === void 0 ? void 0 : _this$lastSavedRender.UrlToSavedRendering));
37351
36902
  if (!(this.lastSavedRendering == undefined)) {
37352
36903
  _context5.next = 3;
37353
36904
  break;
@@ -37362,7 +36913,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37362
36913
  _context5.next = 12;
37363
36914
  break;
37364
36915
  }
37365
- LOG$3.debug('getLAstSavedRendering - wait here');
36916
+ LOG$4.debug('getLAstSavedRendering - wait here');
37366
36917
  _context5.next = 8;
37367
36918
  return this.delay(100);
37368
36919
  case 8:
@@ -37516,20 +37067,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37516
37067
  value: (function () {
37517
37068
  var _request3D = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
37518
37069
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37519
- var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _plannerMeasureDigits, productHash, renderingFoundInCache, _rendering, fullscreenRendering, renderingInCacheFound, _plannerMeasureDigits2, _productHash, _this$connectionHandl6, _plannerMeasureDigits3, _params$camera2, _params$camera3, returnRequest;
37070
+ var room, newRenderSize, doReloadWholePlanning, planningHash, requestRenderingFrom3DHost, requestHqRenderScriptFrom3DHost, rendering, renderHash, viewPointName, functionType, _params$camera, sizeInfo, _rendering, fullscreenRendering, renderingInCacheFound, _this$connectionHandl6, _plannerMeasureDigits, _params$camera2, _params$camera3, returnRequest;
37520
37071
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
37521
37072
  while (1) switch (_context7.prev = _context7.next) {
37522
37073
  case 0:
37523
- if (!(this.doUseRealtimeRendering() && this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37074
+ if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37524
37075
  _context7.next = 5;
37525
37076
  break;
37526
37077
  }
37527
- LOG$3.debug('RequestRendering - but connection Not Ready');
37078
+ LOG$4.debug('RequestRendering - but connection Not Ready');
37528
37079
  this.todoAfterLogin.request3D.params = params;
37529
37080
  this.todoAfterLogin.request3D.doRequest3D = true;
37530
37081
  return _context7.abrupt("return");
37531
37082
  case 5:
37532
- LOG$3.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
37083
+ LOG$4.debug('Request New 3D rendering: ' + (params === null || params === void 0 ? void 0 : params.doRequestRendering) + ', hqRenderScript: ' + (params === null || params === void 0 ? void 0 : params.doRequestHqRenderScript), 'PlannerHandler3D');
37533
37084
  room = this.viewPointHandler.getCurRoomCodex();
37534
37085
  newRenderSize = this.setRoomInfoInPlanningData(params.planningData, (_params$renderRequest = (_params$renderRequest2 = params.renderRequestInfos) === null || _params$renderRequest2 === void 0 ? void 0 : _params$renderRequest2.width) !== null && _params$renderRequest !== void 0 ? _params$renderRequest : 500, (_params$renderRequest3 = (_params$renderRequest4 = params.renderRequestInfos) === null || _params$renderRequest4 === void 0 ? void 0 : _params$renderRequest4.height) !== null && _params$renderRequest3 !== void 0 ? _params$renderRequest3 : 500, (_params$renderRequest5 = (_params$renderRequest6 = params.renderRequestInfos) === null || _params$renderRequest6 === void 0 ? void 0 : _params$renderRequest6.mediaServiceSaveMode) !== null && _params$renderRequest5 !== void 0 ? _params$renderRequest5 : undefined);
37535
37086
  doReloadWholePlanning = true;
@@ -37548,103 +37099,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37548
37099
  this.lastFramePlanningHash = planningHash;
37549
37100
  requestRenderingFrom3DHost = false;
37550
37101
  requestHqRenderScriptFrom3DHost = false;
37551
- if (!params.doRequestHqRenderScript) {
37552
- _context7.next = 23;
37553
- break;
37554
- }
37555
- if (this.doUseRealtimeRendering()) {
37556
- _context7.next = 21;
37557
- break;
37558
- }
37559
- LOG$3.error(new DivaUtils.DivaError('Requesting hqRenderScript is only supported when using real time rendering'));
37560
- return _context7.abrupt("return");
37561
- case 21:
37562
- rendering = this.hqRenderScriptCache.get(planningHash);
37563
- if (rendering) {
37564
- LOG$3.debug('Get HQRenderScript from cache');
37565
- this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37566
- this.updatePlannerHqRenderScriptInView(rendering);
37567
- this.sendARRenderScript(rendering);
37568
- params.doRequestHqRenderScript = false;
37569
- } else {
37570
- if (!this.checkWaitForHQRenderScript(planningHash)) {
37571
- requestHqRenderScriptFrom3DHost = true;
37572
- this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37573
- //If a new HQRenderscript has to be loaded - always reload planning
37574
- doReloadWholePlanning = true;
37102
+ if (params.doRequestHqRenderScript) {
37103
+ rendering = this.hqRenderScriptCache.get(planningHash);
37104
+ if (rendering) {
37105
+ LOG$4.debug('Get HQRenderScript from cache');
37106
+ this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37107
+ this.updatePlannerHqRenderScriptInView(rendering);
37108
+ this.sendARRenderScript(rendering);
37109
+ params.doRequestHqRenderScript = false;
37110
+ } else {
37111
+ if (!this.checkWaitForHQRenderScript(planningHash)) {
37112
+ requestHqRenderScriptFrom3DHost = true;
37113
+ this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37114
+ //If a new HQRenderscript has to be loaded - always reload planning
37115
+ doReloadWholePlanning = true;
37116
+ }
37575
37117
  }
37576
37118
  }
37577
- case 23:
37578
37119
  renderHash = '';
37579
37120
  viewPointName = '';
37580
37121
  functionType = 'P3D';
37581
- if (!params.doRequestRendering) {
37582
- _context7.next = 54;
37583
- break;
37584
- }
37585
- viewPointName = this.viewPointHandler.getCurViewPointToRender();
37586
- sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37587
- renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37588
- this.lastRequestedRenderHash = renderHash;
37589
- LOG$3.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37590
- if (this.doUseRealtimeRendering()) {
37591
- _context7.next = 40;
37592
- break;
37593
- }
37594
- productHash = this.getProductHash(params.planningData); // If you only have to load the rendering from the cache and do not have to create the cache - you not have to use the SignalR Connection
37595
- _context7.next = 36;
37596
- return this.requestRenderingCache(planningHash, renderHash, productHash, viewPointName, params.renderRequestInfos.width, params.renderRequestInfos.height, params.renderRequestInfos.isFullscreenRendering, params.renderRequestInfos.doShow3DDimensionLines, (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0, params.catalogData);
37597
- case 36:
37598
- renderingFoundInCache = _context7.sent;
37599
- if (!renderingFoundInCache) LOG$3.debug('Cached rendering not found ' + renderHash);
37600
- _context7.next = 54;
37601
- break;
37602
- case 40:
37603
- if (!this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37604
- _context7.next = 47;
37605
- break;
37606
- }
37607
- //If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
37608
- //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37609
- LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37610
- this.lastFramePlanningHash = '';
37611
- _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37612
- if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37613
- if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37614
- fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37615
- fullscreenRendering.clone(_rendering);
37616
- fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37617
- this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37618
- params.doRequestRendering = false;
37122
+ if (params.doRequestRendering) {
37123
+ viewPointName = this.viewPointHandler.getCurViewPointToRender();
37124
+ sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37125
+ renderHash = DivaUtils.md5(JSON.stringify(params.planningData) + '#' + room + '#' + viewPointName + '#' + sizeInfo + '#' + JSON.stringify((_params$camera = params.camera) !== null && _params$camera !== void 0 ? _params$camera : this.latestCamera));
37126
+ this.lastRequestedRenderHash = renderHash;
37127
+ LOG$4.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37128
+ if (this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37129
+ //If planning is laoded from cache - reset lastFramePlanningHash. It can happen that something changed in the planning (Delete element) and the Rendering with 1 element is loaded from cahche - the exe has still 2 elements.
37130
+ //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37131
+ LOG$4.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37132
+ this.lastFramePlanningHash = '';
37133
+ _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37134
+ if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37135
+ if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37136
+ fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37137
+ fullscreenRendering.clone(_rendering);
37138
+ fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37139
+ this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37140
+ params.doRequestRendering = false;
37141
+ } else {
37142
+ this.updatePlannerRendering(_rendering); //lade einfach
37143
+ params.doRequestRendering = false;
37144
+ LOG$4.debug('Do load rendering from cache with renderHash: ' + renderHash);
37145
+ }
37146
+ }
37619
37147
  } else {
37620
- this.updatePlannerRendering(_rendering); //lade einfach
37621
- params.doRequestRendering = false;
37622
- LOG$3.debug('Do load rendering from cache with renderHash: ' + renderHash);
37623
- }
37624
- }
37625
- _context7.next = 54;
37626
- break;
37627
- case 47:
37628
- renderingInCacheFound = false;
37629
- if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
37630
- _context7.next = 53;
37631
- break;
37632
- }
37633
- _productHash = this.getProductHash(params.planningData);
37634
- _context7.next = 52;
37635
- return this.requestRenderingCache(planningHash, renderHash, _productHash, viewPointName, params.renderRequestInfos.width, params.renderRequestInfos.height, params.renderRequestInfos.isFullscreenRendering, params.renderRequestInfos.doShow3DDimensionLines, (_plannerMeasureDigits2 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits2 !== void 0 ? _plannerMeasureDigits2 : 0, params.catalogData);
37636
- case 52:
37637
- renderingInCacheFound = _context7.sent;
37638
- case 53:
37639
- if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
37640
- if (!this.checkWaitForImage(renderHash)) {
37641
- requestRenderingFrom3DHost = true;
37642
- this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37148
+ renderingInCacheFound = false;
37149
+ if (!renderingInCacheFound) {
37150
+ if (!this.checkWaitForImage(renderHash)) {
37151
+ requestRenderingFrom3DHost = true;
37152
+ this.waitForRenderings.set(renderHash, new Rendering('PLACEHOLDER', 'PLACEHOLDER', '', 0, 0, false, false, 0, false, false, 'STREAM'));
37153
+ }
37154
+ }
37643
37155
  }
37644
37156
  }
37645
- case 54:
37646
37157
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37647
- _context7.next = 63;
37158
+ _context7.next = 31;
37648
37159
  break;
37649
37160
  }
37650
37161
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37662,7 +37173,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37662
37173
  height: params.renderRequestInfos.height,
37663
37174
  isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
37664
37175
  hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
37665
- plannerMeasureDigits: (_plannerMeasureDigits3 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits3 !== void 0 ? _plannerMeasureDigits3 : 0,
37176
+ plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
37666
37177
  planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
37667
37178
  mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
37668
37179
  functionType: functionType,
@@ -37677,14 +37188,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37677
37188
  });
37678
37189
  if (params.camera) this.latestCamera = params.camera;
37679
37190
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37680
- _context7.next = 61;
37191
+ _context7.next = 29;
37681
37192
  break;
37682
37193
  }
37683
- LOG$3.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37194
+ LOG$4.error(new DivaUtils.DivaError('Error requesting the 3D from host. RequestHqRenderScript: ' + requestHqRenderScriptFrom3DHost + '; RequestRendering: ' + requestRenderingFrom3DHost, {
37684
37195
  code: 'WC_0013'
37685
37196
  }));
37686
37197
  return _context7.abrupt("return");
37687
- case 61:
37198
+ case 29:
37688
37199
  if (requestHqRenderScriptFrom3DHost) {
37689
37200
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37690
37201
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37696,7 +37207,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37696
37207
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37697
37208
  }
37698
37209
  }
37699
- case 63:
37210
+ case 31:
37700
37211
  case "end":
37701
37212
  return _context7.stop();
37702
37213
  }
@@ -37749,70 +37260,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37749
37260
  });
37750
37261
  if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
37751
37262
  }
37752
-
37753
- /**
37754
- * This function handles to load a rendering from the cache
37755
- * @param hash
37756
- * @param viewPointName
37757
- * @param width
37758
- * @param height
37759
- * @param isFullscreenRendering
37760
- *
37761
- * @returns true, if the rendering was found in the cache
37762
- */
37763
- }, {
37764
- key: "requestRenderingCache",
37765
- value: (function () {
37766
- var _requestRenderingCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
37767
- var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
37768
- return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
37769
- while (1) switch (_context8.prev = _context8.next) {
37770
- case 0:
37771
- renderingInCacheFound = false;
37772
- if (this.waitForRenderings.has(renderHash)) {
37773
- _context8.next = 12;
37774
- break;
37775
- }
37776
- rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
37777
- this.waitForRenderings.set(renderHash, rendering);
37778
- //Try load image from cache
37779
- promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
37780
- _context8.next = 7;
37781
- return Promise.all(promises);
37782
- case 7:
37783
- _yield$Promise$all = _context8.sent;
37784
- _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 2);
37785
- urlRenderingCache = _yield$Promise$all2[0];
37786
- urlARCache = _yield$Promise$all2[1];
37787
- if (urlRenderingCache || urlARCache) {
37788
- renderingInCacheFound = true;
37789
- if (urlRenderingCache) {
37790
- rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
37791
- rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
37792
- }
37793
- if (urlARCache) rendering.setArUrl(urlARCache);
37794
- rendering.IsLoadedFromCache = true;
37795
- rendering.CatalogCodex = catalogData.catalogCodex;
37796
- rendering.CatalogGUID = catalogData.catalogGUID;
37797
- LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
37798
- doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
37799
- if (doUpdateRendering) this.updatePlannerRendering(rendering);
37800
- } else {
37801
- this.waitForRenderings["delete"](renderHash);
37802
- }
37803
- case 12:
37804
- return _context8.abrupt("return", renderingInCacheFound);
37805
- case 13:
37806
- case "end":
37807
- return _context8.stop();
37808
- }
37809
- }, _callee8, this);
37810
- }));
37811
- function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
37812
- return _requestRenderingCache.apply(this, arguments);
37813
- }
37814
- return requestRenderingCache;
37815
- }())
37816
37263
  }, {
37817
37264
  key: "handleStaticVP",
37818
37265
  value: function handleStaticVP(vpCodex) {
@@ -37916,20 +37363,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37916
37363
  value: function getStaticRoomListItems() {
37917
37364
  return this.viewPointHandler.getStaticRoomList();
37918
37365
  }
37919
-
37920
- /**
37921
- * Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
37922
- */
37923
- }, {
37924
- key: "clearRenderCache",
37925
- value: function clearRenderCache() {
37926
- LOG$3.debug('PlannerHandler3D clearRenderCache');
37927
- this.renderCache.clear();
37928
- this.currRendering = undefined;
37929
- this.lastSavedRendering = undefined;
37930
- this.lastSavedAlternateRenderings = undefined;
37931
- this.hqRenderScriptCache.clear();
37932
- }
37933
37366
  }, {
37934
37367
  key: "clearCurrentRendering",
37935
37368
  value: function clearCurrentRendering() {
@@ -37958,11 +37391,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37958
37391
  value: function checkIsWaitingForHQRenderScript() {
37959
37392
  return this.waitForHQRenderScript.size > 0;
37960
37393
  }
37961
- }, {
37962
- key: "getUseMediaServiceImageCache",
37963
- value: function getUseMediaServiceImageCache() {
37964
- return this.renderSettings.UseMediaServiceImageCache;
37965
- }
37966
37394
  }, {
37967
37395
  key: "setOrigConfigurationCallback",
37968
37396
  value: function setOrigConfigurationCallback(callback) {
@@ -37976,19 +37404,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37976
37404
  }, {
37977
37405
  key: "openARObserverConnection",
37978
37406
  value: function () {
37979
- var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee10(handleNoHqrs) {
37407
+ var _openARObserverConnection = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(handleNoHqrs) {
37980
37408
  var _this2 = this;
37981
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
37982
- while (1) switch (_context10.prev = _context10.next) {
37409
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
37410
+ while (1) switch (_context9.prev = _context9.next) {
37983
37411
  case 0:
37984
- return _context10.abrupt("return", new Promise( /*#__PURE__*/function () {
37985
- var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee9(resolve, reject) {
37412
+ return _context9.abrupt("return", new Promise( /*#__PURE__*/function () {
37413
+ var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(resolve, reject) {
37986
37414
  var socketUrl;
37987
- return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
37988
- while (1) switch (_context9.prev = _context9.next) {
37415
+ return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
37416
+ while (1) switch (_context8.prev = _context8.next) {
37989
37417
  case 0:
37990
37418
  if (_this2.liveArViewerUrl) {
37991
- _context9.next = 2;
37419
+ _context8.next = 2;
37992
37420
  break;
37993
37421
  }
37994
37422
  throw new Error('No Live AR Viewer URL set');
@@ -38004,26 +37432,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38004
37432
  }
38005
37433
  });
38006
37434
  _this2.liveArSocket.on('disconnect', function () {
38007
- LOG$3.error(new DivaUtils.DivaError('AR Socket disconnected'));
37435
+ LOG$4.error(new DivaUtils.DivaError('AR Socket disconnected'));
38008
37436
  });
38009
37437
  _this2.liveArSocket.on('observer-joined', function () {
38010
37438
  var _this2$liveArSocket;
38011
- LOG$3.debug('AR Observer joined');
37439
+ LOG$4.debug('AR Observer joined');
38012
37440
  _this2.liveArClientsConnected = true;
38013
37441
  var hqRenderScript = _this2.lastSavedHQRenderScript;
38014
37442
  if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
38015
37443
  hqRenderScript: JSON.stringify(hqRenderScript)
38016
37444
  });else {
38017
- LOG$3.debug('No HQRenderScript found for observer-joined');
37445
+ LOG$4.debug('No HQRenderScript found for observer-joined');
38018
37446
  handleNoHqrs();
38019
37447
  }
38020
37448
  });
38021
37449
  _this2.liveArSocket.on('observer-left', function () {
38022
- LOG$3.debug('AR Observer left');
37450
+ LOG$4.debug('AR Observer left');
38023
37451
  _this2.liveArClientsConnected = false;
38024
37452
  });
38025
37453
  _this2.liveArSocket.on('connected', function (data) {
38026
- LOG$3.debug('AR Socket connected ' + data.connectionId);
37454
+ LOG$4.debug('AR Socket connected ' + data.connectionId);
38027
37455
  _this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
38028
37456
  connectionId: data.connectionId
38029
37457
  });
@@ -38037,21 +37465,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38037
37465
  }
38038
37466
  case 3:
38039
37467
  case "end":
38040
- return _context9.stop();
37468
+ return _context8.stop();
38041
37469
  }
38042
- }, _callee9);
37470
+ }, _callee8);
38043
37471
  }));
38044
- return function (_x19, _x20) {
37472
+ return function (_x7, _x8) {
38045
37473
  return _ref.apply(this, arguments);
38046
37474
  };
38047
37475
  }()));
38048
37476
  case 1:
38049
37477
  case "end":
38050
- return _context10.stop();
37478
+ return _context9.stop();
38051
37479
  }
38052
- }, _callee10);
37480
+ }, _callee9);
38053
37481
  }));
38054
- function openARObserverConnection(_x18) {
37482
+ function openARObserverConnection(_x6) {
38055
37483
  return _openARObserverConnection.apply(this, arguments);
38056
37484
  }
38057
37485
  return openARObserverConnection;
@@ -38061,10 +37489,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38061
37489
  value: function sendARRenderScript(hqRenderScript) {
38062
37490
  var _this$liveArSocket;
38063
37491
  if (!this.liveArClientsConnected) {
38064
- LOG$3.debug('No AR Clients connected, dont send render script');
37492
+ LOG$4.debug('No AR Clients connected, dont send render script');
38065
37493
  return;
38066
37494
  }
38067
- LOG$3.debug('Sending AR Render Script to clients');
37495
+ LOG$4.debug('Sending AR Render Script to clients');
38068
37496
  (_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
38069
37497
  hqRenderScript: hqRenderScript.HQRenderScript
38070
37498
  });
@@ -38072,6 +37500,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38072
37500
  }]);
38073
37501
  }();
38074
37502
 
37503
+ var LOG$3 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
37504
+ var DivaMediaServiceHandler = /*#__PURE__*/function () {
37505
+ //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
37506
+
37507
+ function DivaMediaServiceHandler() {
37508
+ _classCallCheck__default["default"](this, DivaMediaServiceHandler);
37509
+ _defineProperty__default["default"](this, "organizationId", void 0);
37510
+ _defineProperty__default["default"](this, "mediaServiceUrl", void 0);
37511
+ _defineProperty__default["default"](this, "mediaServiceApiKey", void 0);
37512
+ _defineProperty__default["default"](this, "jwt", void 0);
37513
+ _defineProperty__default["default"](this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
37514
+ _defineProperty__default["default"](this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
37515
+ _defineProperty__default["default"](this, "POST_mediaItem", '/v1/mediaitems?ref=true');
37516
+ this.organizationId = '';
37517
+ this.mediaServiceUrl = '';
37518
+ this.mediaServiceApiKey = '';
37519
+ }
37520
+ return _createClass__default["default"](DivaMediaServiceHandler, [{
37521
+ key: "setOrganizationId",
37522
+ value: function setOrganizationId(organizationId) {
37523
+ this.organizationId = organizationId;
37524
+ }
37525
+ }, {
37526
+ key: "setMediaServiceUrl",
37527
+ value: function setMediaServiceUrl(mediaServiceUrl) {
37528
+ this.mediaServiceUrl = mediaServiceUrl;
37529
+ }
37530
+ }, {
37531
+ key: "setMediaServiceApiKey",
37532
+ value: function setMediaServiceApiKey(mediaServiceApiKey) {
37533
+ this.mediaServiceApiKey = mediaServiceApiKey;
37534
+ }
37535
+ }, {
37536
+ key: "setJwt",
37537
+ value: function setJwt(jwt) {
37538
+ this.jwt = jwt;
37539
+ }
37540
+ }, {
37541
+ key: "base64ToBlob",
37542
+ value: function base64ToBlob(base64String, hash) {
37543
+ DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
37544
+ if (base64String.startsWith('data:image/jpeg;base64,')) {
37545
+ base64String = base64String.replace('data:image/jpeg;base64,', '');
37546
+ }
37547
+ var binary_string = window.atob(base64String);
37548
+ var len = binary_string.length;
37549
+ var bytes = new Uint8Array(len);
37550
+ for (var i = 0; i < len; i++) {
37551
+ bytes[i] = binary_string.charCodeAt(i);
37552
+ }
37553
+ var blob = new File([bytes.buffer], hash + '.jpg', {
37554
+ type: 'image/jpeg'
37555
+ });
37556
+ DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
37557
+ return blob;
37558
+ }
37559
+ }, {
37560
+ key: "savePlanning2DPermanent",
37561
+ value: function () {
37562
+ var _savePlanning2DPermanent = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
37563
+ var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
37564
+ return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
37565
+ while (1) switch (_context.prev = _context.next) {
37566
+ case 0:
37567
+ DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37568
+ imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
37569
+ url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
37570
+ //create media item ref and set same paramters
37571
+ data = new FormData();
37572
+ data.append('file', imageBlob);
37573
+ mediaItem = {
37574
+ organizationId: this.organizationId,
37575
+ mediaType: 'PCT',
37576
+ fileName: hash + '.jpg'
37577
+ };
37578
+ data.append('mediaItem', JSON.stringify(mediaItem));
37579
+ mediaItemRef = {
37580
+ functionType: 'P2D',
37581
+ planningHash: hash,
37582
+ catalogCodex: catalogCodex,
37583
+ catalogGuid: catalogGUID
37584
+ };
37585
+ data.append('mediaItemRef', JSON.stringify(mediaItemRef));
37586
+ _context.next = 11;
37587
+ return fetch(url, {
37588
+ method: 'POST',
37589
+ body: data,
37590
+ headers: {
37591
+ 'X-API-KEY': this.mediaServiceApiKey
37592
+ }
37593
+ });
37594
+ case 11:
37595
+ response = _context.sent;
37596
+ if (!response.ok) {
37597
+ _context.next = 20;
37598
+ break;
37599
+ }
37600
+ _context.next = 15;
37601
+ return response.json();
37602
+ case 15:
37603
+ res = _context.sent;
37604
+ LOG$3.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
37605
+ return _context.abrupt("return", res.url);
37606
+ case 20:
37607
+ LOG$3.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
37608
+ code: 'WC_0016'
37609
+ }));
37610
+ case 21:
37611
+ DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
37612
+ return _context.abrupt("return", '');
37613
+ case 23:
37614
+ case "end":
37615
+ return _context.stop();
37616
+ }
37617
+ }, _callee, this);
37618
+ }));
37619
+ function savePlanning2DPermanent(_x, _x2, _x3, _x4) {
37620
+ return _savePlanning2DPermanent.apply(this, arguments);
37621
+ }
37622
+ return savePlanning2DPermanent;
37623
+ }()
37624
+ }]);
37625
+ }();
37626
+ var mediaServiceHandler = new DivaMediaServiceHandler();
37627
+
38075
37628
  /**
38076
37629
  * This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
38077
37630
  */
@@ -38406,7 +37959,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38406
37959
  key: "initPlanner",
38407
37960
  value: (function () {
38408
37961
  var _initPlanner = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(initSetState, plannerHandlerFunctions) {
38409
- var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, useSirvViewer, _initSetState$api$web, result;
37962
+ var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
38410
37963
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
38411
37964
  while (1) switch (_context.prev = _context.next) {
38412
37965
  case 0:
@@ -38415,8 +37968,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38415
37968
  this.plannerHandlerFunctions = plannerHandlerFunctions;
38416
37969
  diva3dServerUrl = initSetState.api.get3DServerUrl();
38417
37970
  divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
38418
- mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
38419
- useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
37971
+ mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
38420
37972
  //diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
38421
37973
  // diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
38422
37974
  //diva3dServerUrl = 'https://localhost:44315/';
@@ -38426,7 +37978,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38426
37978
  //divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
38427
37979
  //divaMediaServiceUrl = 'http://localhost:3000';
38428
37980
  if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
38429
- _context.next = 15;
37981
+ _context.next = 14;
38430
37982
  break;
38431
37983
  }
38432
37984
  this.handler3D.initializeCallbackFunctions({
@@ -38438,34 +37990,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38438
37990
  this.handler3D.setJwt(initSetState.api.getJwt());
38439
37991
  //Only use if only 1 Planner/Set is used. Not possible in setPlanner
38440
37992
  result = this.handler3D.initializeAPISettings({
38441
- useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
38442
- suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
38443
37993
  renderGroup: renderGroup,
38444
37994
  diva3dServerUrl: diva3dServerUrl,
38445
37995
  divaMediaServiceUrl: divaMediaServiceUrl,
38446
37996
  organizationId: initSetState.organizationId,
38447
- useSirvViewer: useSirvViewer,
38448
37997
  arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
38449
37998
  });
38450
37999
  if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
38451
- _context.next = 14;
38000
+ _context.next = 13;
38452
38001
  break;
38453
38002
  }
38454
- _context.next = 14;
38003
+ _context.next = 13;
38455
38004
  return this.handler3D.initializeConnection();
38456
- case 14:
38005
+ case 13:
38457
38006
  if (this.divaNr != initSetState.divaNr) {
38458
38007
  this.divaNr = initSetState.divaNr;
38459
38008
  this.handler3D.joinDivaNr(this.divaNr);
38460
38009
  }
38461
- case 15:
38010
+ case 14:
38462
38011
  mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
38463
38012
  mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
38464
38013
  mediaServiceHandler.setOrganizationId(initSetState.organizationId);
38465
38014
  mediaServiceHandler.setJwt(initSetState.api.getJwt());
38466
38015
  this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
38467
38016
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initPlanner');
38468
- case 21:
38017
+ case 20:
38469
38018
  case "end":
38470
38019
  return _context.stop();
38471
38020
  }
@@ -38582,10 +38131,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38582
38131
  roomlistCodex,
38583
38132
  roomLists,
38584
38133
  _yield$import,
38585
- DivaSingleProductPlanner,
38586
- _yield$import2,
38587
38134
  DivaStandardPlanner,
38588
- _yield$import3,
38135
+ _yield$import2,
38589
38136
  DivaBoxPlanner,
38590
38137
  _args4 = arguments;
38591
38138
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
@@ -38614,58 +38161,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38614
38161
  }
38615
38162
  this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
38616
38163
  _context4.t0 = set.getPlannerEdition();
38617
- _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 23 : 29;
38164
+ _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
38618
38165
  break;
38619
38166
  case 8:
38620
- if (!this.handler3D.getUseMediaServiceImageCache()) {
38621
- _context4.next = 16;
38622
- break;
38623
- }
38624
- _context4.next = 11;
38625
- return Promise.resolve().then(function () { return require('./DivaSingleProductPlanner-50bf9dc8.js'); });
38626
- case 11:
38167
+ _context4.next = 10;
38168
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-381861d5.js'); });
38169
+ case 10:
38627
38170
  _yield$import = _context4.sent;
38628
- DivaSingleProductPlanner = _yield$import["default"];
38629
- planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
38630
- _context4.next = 22;
38631
- break;
38632
- case 16:
38633
- _context4.next = 18;
38634
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-7d349085.js'); });
38635
- case 18:
38636
- _yield$import2 = _context4.sent;
38637
- DivaStandardPlanner = _yield$import2["default"];
38171
+ DivaStandardPlanner = _yield$import["default"];
38638
38172
  planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
38639
38173
  if (catalogData.isIDM3DCat) {
38640
38174
  planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
38641
38175
  }
38642
- case 22:
38643
- return _context4.abrupt("break", 29);
38644
- case 23:
38645
- _context4.next = 25;
38646
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-be2f45b7.js'); });
38647
- case 25:
38648
- _yield$import3 = _context4.sent;
38649
- DivaBoxPlanner = _yield$import3["default"];
38176
+ return _context4.abrupt("break", 21);
38177
+ case 15:
38178
+ _context4.next = 17;
38179
+ return Promise.resolve().then(function () { return require('./DivaBoxPlanner-fc403f96.js'); });
38180
+ case 17:
38181
+ _yield$import2 = _context4.sent;
38182
+ DivaBoxPlanner = _yield$import2["default"];
38650
38183
  planner = new DivaBoxPlanner(set, this.plannerIDCount);
38651
- return _context4.abrupt("break", 29);
38652
- case 29:
38184
+ return _context4.abrupt("break", 21);
38185
+ case 21:
38653
38186
  this.plannerList.set(set.getSetId(), planner);
38654
38187
  this.plannerIDCount++;
38655
38188
  if (!(setPlanData != null && setPlanData != '')) {
38656
- _context4.next = 34;
38189
+ _context4.next = 26;
38657
38190
  break;
38658
38191
  }
38659
- _context4.next = 34;
38192
+ _context4.next = 26;
38660
38193
  return planner.initPlanner(setPlanData);
38661
- case 34:
38194
+ case 26:
38662
38195
  if (lastSetToInitialize) {
38663
38196
  this.updateAllPlannerBBs();
38664
38197
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
38665
38198
  }
38666
38199
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
38667
38200
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initSet');
38668
- case 37:
38201
+ case 29:
38669
38202
  case "end":
38670
38203
  return _context4.stop();
38671
38204
  }
@@ -39135,7 +38668,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39135
38668
  }, {
39136
38669
  key: "clearHandler3D",
39137
38670
  value: function clearHandler3D() {
39138
- this.handler3D.clearRenderCache();
39139
38671
  this.handler3D.closeConnection();
39140
38672
  }
39141
38673
  }, {
@@ -39384,7 +38916,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39384
38916
  if (!renderRequestInfos) {
39385
38917
  LOG$2.error(new DivaUtils.DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
39386
38918
  return;
39387
- } else if ((renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) && !this.handler3D.getUseMediaServiceImageCache()) {
38919
+ } else if (renderRequestInfos.width <= 0 || isNaN(renderRequestInfos.width) || renderRequestInfos.height <= 0 || isNaN(renderRequestInfos.height)) {
39388
38920
  LOG$2.error(new DivaUtils.DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
39389
38921
  return;
39390
38922
  }
@@ -39393,14 +38925,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39393
38925
  var loadedCatData = [];
39394
38926
  var plannerExists = false;
39395
38927
  var savedSetId = undefined;
39396
- var containsNotDigitalizedTextures = false;
39397
- var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
39398
38928
  this.plannerList.forEach(function (planner, setId) {
39399
38929
  var _renderRequestInfos$d;
39400
38930
  savedSetId = setId;
39401
- var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, useMediaServiceImageCache, alternateRenderInfo);
38931
+ var config = planner.getSetData(true, _this3.plannerHandlerFunctions.doAllowSetPlanner(), (_renderRequestInfos$d = renderRequestInfos === null || renderRequestInfos === void 0 ? void 0 : renderRequestInfos.doShow3DDimensionLines) !== null && _renderRequestInfos$d !== void 0 ? _renderRequestInfos$d : false, alternateRenderInfo);
39402
38932
  var setData = config.constructionSet;
39403
- if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
39404
38933
 
39405
38934
  //Add technical Info to setData
39406
38935
  var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
@@ -39420,15 +38949,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39420
38949
  });
39421
38950
  });
39422
38951
  if (plannerExists) {
39423
- if (containsNotDigitalizedTextures) {
39424
- var _this$plannerHandlerF3, _this$plannerHandlerF4;
39425
- (_this$plannerHandlerF3 = (_this$plannerHandlerF4 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF3 === void 0 || _this$plannerHandlerF3.call(_this$plannerHandlerF4, 'TEXTURE_NOT_DIGITALIZED_WARNING', true, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
39426
- } else {
39427
- var _this$plannerHandlerF5, _this$plannerHandlerF6;
39428
- //Hide message warning if shown
39429
- (_this$plannerHandlerF5 = (_this$plannerHandlerF6 = this.plannerHandlerFunctions).updatePlannerMsgContainer) === null || _this$plannerHandlerF5 === void 0 || _this$plannerHandlerF5.call(_this$plannerHandlerF6, 'TEXTURE_NOT_DIGITALIZED_WARNING', false, 'INFO', 'TEXTURE_NOT_DIGITALIZED_WARNING', false, undefined);
39430
- }
39431
-
39432
38952
  // if not in set planner mode overwrite s1 with correct setId
39433
38953
  if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
39434
38954
  plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
@@ -39471,12 +38991,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39471
38991
 
39472
38992
  if (!setId) {
39473
38993
  this.plannerList.forEach(function (planner, setId) {
39474
- var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false, _this4.handler3D.getUseMediaServiceImageCache());
38994
+ var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
39475
38995
  var setData = config.constructionSet;
39476
38996
  plannerData.SCE.ROO[0].SET.push(setData);
39477
38997
  });
39478
38998
  } else {
39479
- var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false, this.handler3D.getUseMediaServiceImageCache());
38999
+ var config = this.plannerList.get(setId).getSetData(true, this.plannerHandlerFunctions.doAllowSetPlanner(), false);
39480
39000
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39481
39001
  }
39482
39002
  return JSON.stringify(plannerData);
@@ -39503,7 +39023,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39503
39023
  // let posInformation: any = {};
39504
39024
 
39505
39025
  this.plannerList.forEach(function (planner, setId) {
39506
- var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false, _this5.handler3D.getUseMediaServiceImageCache());
39026
+ var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
39507
39027
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39508
39028
  });
39509
39029
  return DivaUtils.md5(JSON.stringify(plannerData));
@@ -39558,7 +39078,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39558
39078
  _defineProperty__default["default"](this, "updatePlanner3DImage", void 0);
39559
39079
  _defineProperty__default["default"](this, "setRotationOrbitCube", void 0);
39560
39080
  _defineProperty__default["default"](this, "getCanvas2DAsJPG", void 0);
39561
- _defineProperty__default["default"](this, "updateSirvViewer", void 0);
39562
39081
  _defineProperty__default["default"](this, "updateFullscreenRendering", void 0);
39563
39082
  _defineProperty__default["default"](this, "plannerHandler", void 0);
39564
39083
  _defineProperty__default["default"](this, "updateSetImage", void 0);
@@ -39648,18 +39167,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39648
39167
  if (rendering.getIsFullscreenRendering()) {
39649
39168
  _this.updateFullscreenRendering(rendering);
39650
39169
  } else {
39651
- if (_this.getCurPlannerViewMode() == 'SirvViewer_only') {
39652
- var _this$actSet, _this$updateSirvViewe, _this$actSet2;
39653
- (_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
39654
- (_this$updateSirvViewe = _this.updateSirvViewer) === null || _this$updateSirvViewe === void 0 || _this$updateSirvViewe.call(_this, rendering, (_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getArticleVariantValues());
39655
- } else {
39656
- var _this$actSet3;
39657
- _this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
39658
- }
39170
+ var _this$actSet;
39171
+ _this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
39659
39172
  }
39660
39173
  if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
39661
- var _this$actSet4, _this$state$user, _this$state$user2, _this$state$user3;
39662
- _this.api.postPlanningInfo((_this$actSet4 = _this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
39174
+ var _this$actSet2, _this$state$user, _this$state$user2, _this$state$user3;
39175
+ _this.api.postPlanningInfo((_this$actSet2 = _this.actSet()) === null || _this$actSet2 === void 0 ? void 0 : _this$actSet2.getVariantBasketData(), _this.divaNr, rendering.getImageForSrc(), _this.getCurSetPrice() + setHandlerInstance.getActSetPriceFormat(_this.actSet()), _this.getCurCatalogName(), (_this$state$user = _this.state.user) === null || _this$state$user === void 0 ? void 0 : _this$state$user._id, (_this$state$user2 = _this.state.user) === null || _this$state$user2 === void 0 ? void 0 : _this$state$user2.name, (_this$state$user3 = _this.state.user) === null || _this$state$user3 === void 0 ? void 0 : _this$state$user3.familyName, _this.state.organization._id);
39663
39176
  }
39664
39177
  });
39665
39178
  /**
@@ -40501,19 +40014,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40501
40014
  }, {
40502
40015
  key: "getDivaArticles",
40503
40016
  value: function getDivaArticles() {
40504
- var _this$actSet5;
40505
- return (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getDivaArticles();
40017
+ var _this$actSet3;
40018
+ return (_this$actSet3 = this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getDivaArticles();
40506
40019
  }
40507
40020
  }, {
40508
40021
  key: "getDimension",
40509
40022
  value: function () {
40510
40023
  var _getDimension = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14() {
40511
- var _this$actSet6;
40024
+ var _this$actSet4;
40512
40025
  return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
40513
40026
  while (1) switch (_context14.prev = _context14.next) {
40514
40027
  case 0:
40515
40028
  _context14.next = 2;
40516
- return (_this$actSet6 = this.actSet()) === null || _this$actSet6 === void 0 ? void 0 : _this$actSet6.getDimensionPerVariant();
40029
+ return (_this$actSet4 = this.actSet()) === null || _this$actSet4 === void 0 ? void 0 : _this$actSet4.getDimensionPerVariant();
40517
40030
  case 2:
40518
40031
  return _context14.abrupt("return", _context14.sent);
40519
40032
  case 3:
@@ -40572,7 +40085,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40572
40085
  this.updateWebConfiguratorTitle();
40573
40086
  //initialize planner view
40574
40087
  (_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
40575
- this.initCache();
40088
+ this.updatePlannerView('INIT_VIEW');
40576
40089
  this.onBasketInitialized();
40577
40090
  this.checkVariantData();
40578
40091
  case 17:
@@ -40592,8 +40105,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40592
40105
  }, {
40593
40106
  key: "updateWebConfiguratorTitle",
40594
40107
  value: function updateWebConfiguratorTitle() {
40595
- var _this$setWebConifgura, _this$actSet7;
40596
- (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.getSetTitle());
40108
+ var _this$setWebConifgura, _this$actSet5;
40109
+ (_this$setWebConifgura = this.setWebConifguratorTitle) === null || _this$setWebConifgura === void 0 || _this$setWebConifgura.call(this, (_this$actSet5 = this.actSet()) === null || _this$actSet5 === void 0 ? void 0 : _this$actSet5.getSetTitle());
40597
40110
  }
40598
40111
  }, {
40599
40112
  key: "updateConfigStructure",
@@ -40605,7 +40118,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40605
40118
  value: function () {
40606
40119
  var _runInitMode = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
40607
40120
  var _this$navigateToTabGr2;
40608
- var doDefault, configStepKey, _this$actSet8, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40121
+ var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40609
40122
  return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
40610
40123
  while (1) switch (_context16.prev = _context16.next) {
40611
40124
  case 0:
@@ -40640,7 +40153,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40640
40153
  if (doDefault) {
40641
40154
  if (plannerMode == 'ProductList') {
40642
40155
  (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
40643
- } else if ((_this$actSet8 = this.actSet()) !== null && _this$actSet8 !== void 0 && _this$actSet8.hasStaticRoomList) {
40156
+ } else if ((_this$actSet6 = this.actSet()) !== null && _this$actSet6 !== void 0 && _this$actSet6.hasStaticRoomList) {
40644
40157
  (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
40645
40158
  } else {
40646
40159
  (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
@@ -40657,24 +40170,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40657
40170
  }
40658
40171
  return runInitMode;
40659
40172
  }()
40660
- }, {
40661
- key: "initCache",
40662
- value: function initCache() {
40663
- //get cached image
40664
- var initFirstRenderingByCache = false;
40665
- if (DivaUtils__default["default"].CacheIsEnabled) {
40666
- var firstImageUrl = DivaUtils__default["default"].getCacheData('FIRSTIMAGE', '');
40667
- if (firstImageUrl) {
40668
- initFirstRenderingByCache = true;
40669
- var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
40670
- rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
40671
- this.updatePlannerRendering(rendering);
40672
- }
40673
- }
40674
- if (!initFirstRenderingByCache) {
40675
- this.updatePlannerView('INIT_VIEW');
40676
- }
40677
- }
40678
40173
  }, {
40679
40174
  key: "addSetToActPlanningByDivaNr",
40680
40175
  value: function () {
@@ -40888,7 +40383,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40888
40383
  setHandlerInstance.update3DPlannerView(true, true, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime2 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime2 === void 0 ? void 0 : _this$getDoShow3DDime2.call(this), alternateRenderInfo, viewpoint);
40889
40384
  break;
40890
40385
  case '3DImage':
40891
- case 'SirvViewer_only':
40892
40386
  //Request new Rendering
40893
40387
  setHandlerInstance.update3DPlannerView(true, !!this.doLoadHQR, set, this.getPlannerRenderingSize(), this.getPlanner3DGridEnabled(), 'STREAM', (_this$getDoShow3DDime3 = this.getDoShow3DDimensionLines) === null || _this$getDoShow3DDime3 === void 0 ? void 0 : _this$getDoShow3DDime3.call(this), alternateRenderInfo);
40894
40388
  break;
@@ -40935,8 +40429,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40935
40429
  }, {
40936
40430
  key: "getAlternateRenderingsForSummary",
40937
40431
  value: function getAlternateRenderingsForSummary() {
40938
- var _this$actSet9;
40939
- return (_this$actSet9 = this.actSet()) === null || _this$actSet9 === void 0 || (_this$actSet9 = _this$actSet9.CatalogData) === null || _this$actSet9 === void 0 ? void 0 : _this$actSet9.alternateRenderingsForSummary;
40432
+ var _this$actSet7;
40433
+ return (_this$actSet7 = this.actSet()) === null || _this$actSet7 === void 0 || (_this$actSet7 = _this$actSet7.CatalogData) === null || _this$actSet7 === void 0 ? void 0 : _this$actSet7.alternateRenderingsForSummary;
40940
40434
  }
40941
40435
  }, {
40942
40436
  key: "destroyWebPlanner",
@@ -41232,8 +40726,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41232
40726
  }, {
41233
40727
  key: "setDifferentOptions",
41234
40728
  value: function setDifferentOptions(options) {
41235
- var _this$actSet10;
41236
- (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 || _this$actSet10.setDifferentOptions(options);
40729
+ var _this$actSet8;
40730
+ (_this$actSet8 = this.actSet()) === null || _this$actSet8 === void 0 || _this$actSet8.setDifferentOptions(options);
41237
40731
  }
41238
40732
 
41239
40733
  /**
@@ -41610,7 +41104,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41610
41104
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
41611
41105
  * The planner step is not shown if:
41612
41106
  * - There is no viewer Option set for the Planner
41613
- * - The configurator config disables the planner Step (SuS + Cache System)
41614
41107
  * - The box Planner is loaded
41615
41108
  */
41616
41109
  }, {
@@ -41631,8 +41124,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41631
41124
 
41632
41125
  //if planner is hidden by config but nothing is planned initially
41633
41126
  if (plannerType === 'NONE') {
41634
- var _this$plannerConfig$a7, _this$actSet11;
41635
- if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet11 = this.actSet()) !== null && _this$actSet11 !== void 0 && (_this$actSet11 = _this$actSet11.CatalogData.startPlannerArticle) !== null && _this$actSet11 !== void 0 && _this$actSet11.length)) {
41127
+ var _this$plannerConfig$a7, _this$actSet9;
41128
+ if (!this.plannerConfig.divaNr && this.plannerConfig.catalogCodex && !((_this$plannerConfig$a7 = this.plannerConfig.articleCodexes) !== null && _this$plannerConfig$a7 !== void 0 && _this$plannerConfig$a7.length) && !this.plannerConfig.productId && !this.plannerConfig.customProductId && !this.plannerConfig.basketData && !((_this$actSet9 = this.actSet()) !== null && _this$actSet9 !== void 0 && (_this$actSet9 = _this$actSet9.CatalogData.startPlannerArticle) !== null && _this$actSet9 !== void 0 && _this$actSet9.length)) {
41636
41129
  plannerType = 'PLANNER';
41637
41130
  }
41638
41131
  }
@@ -41672,38 +41165,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41672
41165
  }, {
41673
41166
  key: "getCurCatalogCodex",
41674
41167
  value: function getCurCatalogCodex() {
41675
- var _this$actSet12;
41676
- return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getCatalogCodex();
41168
+ var _this$actSet10;
41169
+ return (_this$actSet10 = this.actSet()) === null || _this$actSet10 === void 0 ? void 0 : _this$actSet10.getCatalogCodex();
41677
41170
  }
41678
41171
  }, {
41679
41172
  key: "getCurCatalogName",
41680
41173
  value: function getCurCatalogName() {
41681
- var _this$actSet13;
41682
- return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getCatalogName();
41174
+ var _this$actSet11;
41175
+ return (_this$actSet11 = this.actSet()) === null || _this$actSet11 === void 0 ? void 0 : _this$actSet11.getCatalogName();
41683
41176
  }
41684
41177
  }, {
41685
41178
  key: "getCurAccountName",
41686
41179
  value: function getCurAccountName() {
41687
- var _this$actSet14;
41688
- return (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getAccountName();
41180
+ var _this$actSet12;
41181
+ return (_this$actSet12 = this.actSet()) === null || _this$actSet12 === void 0 ? void 0 : _this$actSet12.getAccountName();
41689
41182
  }
41690
41183
  }, {
41691
41184
  key: "getCurSupplierGuid",
41692
41185
  value: function getCurSupplierGuid() {
41693
- var _this$actSet15;
41694
- return (_this$actSet15 = this.actSet()) === null || _this$actSet15 === void 0 ? void 0 : _this$actSet15.getSupplierGuid();
41186
+ var _this$actSet13;
41187
+ return (_this$actSet13 = this.actSet()) === null || _this$actSet13 === void 0 ? void 0 : _this$actSet13.getSupplierGuid();
41695
41188
  }
41696
41189
  }, {
41697
41190
  key: "getCurSetPrice",
41698
41191
  value: function getCurSetPrice() {
41699
- var _this$actSet$getSetPr, _this$actSet16;
41700
- return (_this$actSet$getSetPr = (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
41192
+ var _this$actSet$getSetPr, _this$actSet14;
41193
+ return (_this$actSet$getSetPr = (_this$actSet14 = this.actSet()) === null || _this$actSet14 === void 0 ? void 0 : _this$actSet14.getSetPrice()) !== null && _this$actSet$getSetPr !== void 0 ? _this$actSet$getSetPr : 0;
41701
41194
  }
41702
41195
  }, {
41703
41196
  key: "getCurImageMode",
41704
41197
  value: function getCurImageMode() {
41705
- var _this$actSet17;
41706
- return (_this$actSet17 = this.actSet()) !== null && _this$actSet17 !== void 0 && (_this$actSet17 = _this$actSet17.CatalogData) !== null && _this$actSet17 !== void 0 && _this$actSet17.has3dModels ? '3D' : '2D';
41198
+ var _this$actSet15;
41199
+ return (_this$actSet15 = this.actSet()) !== null && _this$actSet15 !== void 0 && (_this$actSet15 = _this$actSet15.CatalogData) !== null && _this$actSet15 !== void 0 && _this$actSet15.has3dModels ? '3D' : '2D';
41707
41200
  }
41708
41201
  }, {
41709
41202
  key: "getViewConfig",
@@ -41734,73 +41227,64 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41734
41227
  }, {
41735
41228
  key: "doShow3DDimensionLines",
41736
41229
  value: function doShow3DDimensionLines() {
41737
- var _this$actSet18;
41738
- return (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 || (_this$actSet18 = _this$actSet18.CatalogData) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.doShow3DDimensionLines;
41230
+ var _this$actSet16;
41231
+ return (_this$actSet16 = this.actSet()) === null || _this$actSet16 === void 0 || (_this$actSet16 = _this$actSet16.CatalogData) === null || _this$actSet16 === void 0 ? void 0 : _this$actSet16.doShow3DDimensionLines;
41739
41232
  }
41740
41233
  }, {
41741
41234
  key: "hidePlannerUiIcons",
41742
41235
  value: function hidePlannerUiIcons() {
41743
- var _this$actSet19;
41744
- return (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 || (_this$actSet19 = _this$actSet19.CatalogData) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.hidePlannerUiIcons;
41236
+ var _this$actSet17;
41237
+ return (_this$actSet17 = this.actSet()) === null || _this$actSet17 === void 0 || (_this$actSet17 = _this$actSet17.CatalogData) === null || _this$actSet17 === void 0 ? void 0 : _this$actSet17.hidePlannerUiIcons;
41745
41238
  }
41746
41239
  }, {
41747
41240
  key: "doShowPlannerReplaceMode",
41748
41241
  value: function doShowPlannerReplaceMode() {
41749
- var _this$actSet20, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41750
- var catalogData = (_this$actSet20 = this.actSet()) === null || _this$actSet20 === void 0 ? void 0 : _this$actSet20.CatalogData;
41242
+ var _this$actSet18, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41243
+ var catalogData = (_this$actSet18 = this.actSet()) === null || _this$actSet18 === void 0 ? void 0 : _this$actSet18.CatalogData;
41751
41244
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.replaceModeActive) && ((_this$api$getViewConf2 = this.api.getViewConfig()) === null || _this$api$getViewConf2 === void 0 ? void 0 : _this$api$getViewConf2.showReplaceFunctionInPlanner) && Object.entries(catalogData.allCatalogPlannerArticles).length > 1 && Object.entries((_catalogData$PlannerP = (_catalogData$PlannerP2 = catalogData.PlannerPaletteViewInfo) === null || _catalogData$PlannerP2 === void 0 ? void 0 : _catalogData$PlannerP2.catalogPlannerArticles) !== null && _catalogData$PlannerP !== void 0 ? _catalogData$PlannerP : {}).length > 1;
41752
41245
  }
41753
41246
  }, {
41754
41247
  key: "doPlannerReplaceAutoSwitch",
41755
41248
  value: function doPlannerReplaceAutoSwitch() {
41756
- var _this$actSet21, _this$api$getViewConf3;
41757
- var catalogData = (_this$actSet21 = this.actSet()) === null || _this$actSet21 === void 0 ? void 0 : _this$actSet21.CatalogData;
41249
+ var _this$actSet19, _this$api$getViewConf3;
41250
+ var catalogData = (_this$actSet19 = this.actSet()) === null || _this$actSet19 === void 0 ? void 0 : _this$actSet19.CatalogData;
41758
41251
  return (catalogData === null || catalogData === void 0 ? void 0 : catalogData.catalogPlannsCompletely) && this.doShowPlannerReplaceMode() && ((_this$api$getViewConf3 = this.api.getViewConfig()) === null || _this$api$getViewConf3 === void 0 ? void 0 : _this$api$getViewConf3.allowAutoSwitchInReplaceFunctionInPlanner);
41759
41252
  }
41760
41253
  }, {
41761
41254
  key: "getHidePlanner",
41762
41255
  value: function getHidePlanner() {
41763
- var _this$actSet22;
41764
- return this.api.getHidePlanner() || !!((_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.useBoxPlanner);
41256
+ var _this$actSet20;
41257
+ return this.api.getHidePlanner() || !!((_this$actSet20 = this.actSet()) !== null && _this$actSet20 !== void 0 && _this$actSet20.CatalogData.useBoxPlanner);
41765
41258
  }
41766
41259
  }, {
41767
41260
  key: "getAllowRTV",
41768
41261
  value: function getAllowRTV() {
41769
- var _this$actSet23, _this$actSet24;
41770
- if ((_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaForceRTV) return true;
41771
- if (this.api.getDoShowRTV() && (_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaArReady) return true;
41262
+ var _this$actSet21, _this$actSet22;
41263
+ if (this.api.forceShowRTV()) return true;
41264
+ if ((_this$actSet21 = this.actSet()) !== null && _this$actSet21 !== void 0 && _this$actSet21.CatalogData.divaForceRTV) return true;
41265
+ if (this.api.getDoShowRTV() && (_this$actSet22 = this.actSet()) !== null && _this$actSet22 !== void 0 && _this$actSet22.CatalogData.divaArReady) return true;
41772
41266
  return false;
41773
41267
  }
41774
41268
  }, {
41775
41269
  key: "geAllowQRCodeAR",
41776
41270
  value: function geAllowQRCodeAR() {
41777
- var _this$actSet25;
41778
- if (this.api.getDoShowAR() && (_this$actSet25 = this.actSet()) !== null && _this$actSet25 !== void 0 && _this$actSet25.CatalogData.divaArReady) return true;
41271
+ var _this$actSet23;
41272
+ if (this.api.getDoShowAR() && (_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaArReady) return true;
41779
41273
  return false;
41780
41274
  }
41781
41275
  }, {
41782
41276
  key: "getEnableUnityRtvKombi",
41783
41277
  value: function getEnableUnityRtvKombi() {
41784
- var _this$actSet26;
41278
+ var _this$actSet24;
41785
41279
  // if force rtv disable unity kombi - biohort
41786
- if ((_this$actSet26 = this.actSet()) !== null && _this$actSet26 !== void 0 && _this$actSet26.CatalogData.divaForceRTV) return false;
41280
+ if ((_this$actSet24 = this.actSet()) !== null && _this$actSet24 !== void 0 && _this$actSet24.CatalogData.divaForceRTV) return false;
41787
41281
  return this.api.getEnableRTVUnityKombi();
41788
41282
  }
41789
41283
  }, {
41790
41284
  key: "getShelfPlannerRTV",
41791
41285
  value: function getShelfPlannerRTV() {
41792
- var _this$actSet27;
41793
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
41794
- }
41795
- }, {
41796
- key: "getDiva3DSuppressCacheCreation",
41797
- value: function getDiva3DSuppressCacheCreation() {
41798
- return this.api.getDiva3DSuppressCacheCreation();
41799
- }
41800
- }, {
41801
- key: "getDiva3dUseImageCache",
41802
- value: function getDiva3dUseImageCache() {
41803
- return this.api.getDiva3dUseImageCache();
41286
+ var _this$actSet25;
41287
+ return (_this$actSet25 = this.actSet()) === null || _this$actSet25 === void 0 ? void 0 : _this$actSet25.CatalogData.useShelfPlannerRTV;
41804
41288
  }
41805
41289
  }, {
41806
41290
  key: "getBasketData",
@@ -41841,8 +41325,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41841
41325
  }, {
41842
41326
  key: "getCatalogData",
41843
41327
  value: function getCatalogData() {
41844
- var _this$actSet28;
41845
- return (_this$actSet28 = this.actSet()) === null || _this$actSet28 === void 0 ? void 0 : _this$actSet28.CatalogData;
41328
+ var _this$actSet26;
41329
+ return (_this$actSet26 = this.actSet()) === null || _this$actSet26 === void 0 ? void 0 : _this$actSet26.CatalogData;
41846
41330
  }
41847
41331
  }, {
41848
41332
  key: "ReturnTo",
@@ -42123,11 +41607,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42123
41607
  value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
42124
41608
  this.getCanvas2DAsJPG = getCanvas2DAsJPG;
42125
41609
  }
42126
- }, {
42127
- key: "registerUpdateSirvViewer",
42128
- value: function registerUpdateSirvViewer(updateSirvViewer) {
42129
- this.updateSirvViewer = updateSirvViewer;
42130
- }
42131
41610
  }, {
42132
41611
  key: "registerUpdatePlanner2DGrid",
42133
41612
  value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
@@ -42595,7 +42074,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42595
42074
  this.updatePlanner3DImage = undefined;
42596
42075
  this.setRotationOrbitCube = undefined;
42597
42076
  this.getCanvas2DAsJPG = undefined;
42598
- this.updateSirvViewer = undefined;
42599
42077
  this.updatePlannerMsgContainer = undefined;
42600
42078
  this.updateFullscreenRendering = undefined;
42601
42079
  this.updateSetImage = undefined;
@@ -43535,24 +43013,25 @@ var Grid = /*#__PURE__*/function () {
43535
43013
  }, {
43536
43014
  key: "onConfigChanged",
43537
43015
  value: function onConfigChanged() {
43016
+ var returnTypes = [];
43017
+ if (this.ShowOnRule) {
43018
+ var disabled = !this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(this.ShowOnRule));
43019
+ if (disabled !== this.disabledByRule) {
43020
+ this.disabledByRule = disabled;
43021
+ returnTypes.push('disableGridRule');
43022
+ }
43023
+ }
43538
43024
  if (this.heightGridCellCountOnRule) {
43539
43025
  for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
43540
43026
  if (this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(this.heightGridCellCountOnRule[i].Rule))) {
43541
43027
  if (this.currentLoadedRuleIndex != i) {
43542
43028
  this.currentLoadedRuleIndex = i;
43543
- return 'heightGridRule';
43029
+ returnTypes.push('heightGridRule');
43544
43030
  }
43545
43031
  }
43546
43032
  }
43547
43033
  }
43548
- if (this.ShowOnRule) {
43549
- var disabled = !this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(this.ShowOnRule));
43550
- if (disabled !== this.disabledByRule) {
43551
- this.disabledByRule = disabled;
43552
- return 'disableGridRule';
43553
- }
43554
- }
43555
- return false;
43034
+ return returnTypes;
43556
43035
  }
43557
43036
 
43558
43037
  /**
@@ -59980,7 +59459,7 @@ var ProductHandler = /*#__PURE__*/function () {
59980
59459
  */
59981
59460
  _defineProperty__default["default"](this, "loadProducts", /*#__PURE__*/function () {
59982
59461
  var _ref4 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(_ref3) {
59983
- var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17, _baseProduct18;
59462
+ var _productData$length, _basket$OrderSets, _baseProduct, _baseProduct2, _baseProduct3, _baseProduct4, _baseProduct5, _baseProduct6, _baseProduct7, _baseProduct8, _baseProduct9, _baseProduct10, _baseProduct11, _baseProduct$width, _baseProduct12, _basket$SetPlannerInf, _basket$OrderSets$0$B, _baseProduct$height, _baseProduct13, _basket$SetPlannerInf2, _basket$OrderSets$0$B2, _baseProduct$depth, _baseProduct14, _basket$SetPlannerInf3, _basket$OrderSets$0$B3, _basket$SetPlannerInf4, _basket$SetPlannerInf5, _baseProduct15, _baseProduct16, _baseProduct17;
59984
59463
  var basket, catalogData, productData, classificationFields, products, baseProduct, variantProducts, isSet, dockingPoints, orderDescription, catalogDataName, catalogDataDescription, setName, _ProductHandler$calcu, shortDescription, shortDescriptionModified, _ProductHandler$calcu2, addedPrice, addedPriceModified, articles, baseData, classificationData, variantData, variantDataModified, addedProducts, removedProducts, optFields, initialSelectedFields, _basket$OrderSets$0$C2, usedConfigVariants, differingOPTs, _basket$OrderSets$0$C3, opts, i;
59985
59464
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
59986
59465
  while (1) switch (_context2.prev = _context2.next) {
@@ -60092,10 +59571,9 @@ var ProductHandler = /*#__PURE__*/function () {
60092
59571
  mainCategory: _this.mainCategory,
60093
59572
  subCategory: _this.subCategory,
60094
59573
  retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
60095
- available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
60096
59574
  dockingPoints: dockingPoints,
60097
- media: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.media,
60098
- affiliate: (_baseProduct18 = baseProduct) === null || _baseProduct18 === void 0 ? void 0 : _baseProduct18.affiliate
59575
+ media: (_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.media,
59576
+ affiliate: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.affiliate
60099
59577
  }; //get classification data and remove field prefix
60100
59578
  classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
60101
59579
  variantData = [];
@@ -60577,11 +60055,6 @@ _defineProperty__default["default"](ProductHandler, "baseDataFields", [{
60577
60055
  type: 'text',
60578
60056
  title: 'productcreator.fields.technicalDescription',
60579
60057
  fieldType: 'BASE'
60580
- }, {
60581
- field: 'available',
60582
- type: 'boolean',
60583
- title: 'productcreator.fields.available',
60584
- fieldType: 'BASE'
60585
60058
  }, {
60586
60059
  field: 'calculatedPrice',
60587
60060
  type: 'price',