@crystaldesign/web-planner-logic 24.10.0-beta.9 → 24.10.0-rc.2

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 (93) hide show
  1. package/build/cjs/{DivaBoxPlanner-ce0b5ccf.js → DivaBoxPlanner-fc403f96.js} +16 -18
  2. package/build/cjs/{DivaStandardPlanner-11d92ddc.js → DivaStandardPlanner-381861d5.js} +26 -30
  3. package/build/cjs/{DoorPlanner-157f3b83.js → DoorPlanner-4534b32f.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-973eb29d.js → Host3DSignalR-e6cae920.js} +1 -6
  5. package/build/cjs/{LiviqueWWSHandler-175ace96.js → LiviqueWWSHandler-9bc80b98.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-b5b08965.js → PfisterWWSHandler-24c470e2.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-8b2718d9.js → PlannerHandler2D-fbc28e95.js} +1249 -10
  8. package/build/cjs/{ProductBasketHandler-b37e5eb2.js → ProductBasketHandler-08dcf24e.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-9d531962.js → SeriousBasketHandler-a4647e89.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-f8f7b3c2.js → ShelfPlanner-561be11e.js} +5 -5
  11. package/build/cjs/{StandardWWSHandler-e322419c.js → StandardWWSHandler-e211a327.js} +1 -1
  12. package/build/cjs/{index-91696556.js → index-4d5cef6f.js} +1109 -1641
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-162f61b3.js → DivaBoxPlanner-8ef0722c.js} +5 -7
  15. package/build/esm/{DivaStandardPlanner-bb2a6560.js → DivaStandardPlanner-19cc5ac0.js} +5 -9
  16. package/build/esm/{DoorPlanner-dfcc1e9b.js → DoorPlanner-c3fe5ecf.js} +1 -1
  17. package/build/esm/{Host3DSignalR-08117df5.js → Host3DSignalR-5d78c3f5.js} +1 -6
  18. package/build/esm/{LiviqueWWSHandler-ab108660.js → LiviqueWWSHandler-2f2cc617.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-28dd4770.js → PfisterWWSHandler-701e95ee.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-bc825497.js → PlannerHandler2D-bf892db2.js} +1245 -8
  21. package/build/esm/{ProductBasketHandler-56d310f8.js → ProductBasketHandler-a1dd8bb2.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-7d8bdefe.js → SeriousBasketHandler-d5b6a347.js} +1 -1
  23. package/build/esm/{ShelfPlanner-ff88c9d8.js → ShelfPlanner-e3b31a33.js} +5 -5
  24. package/build/esm/{StandardWWSHandler-8b217a8f.js → StandardWWSHandler-d2f8cb1c.js} +1 -1
  25. package/build/esm/{index-999a0e8c.js → index-bbda3bc5.js} +1109 -1641
  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 +6 -14
  32. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -3
  34. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  35. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +1 -1
  36. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  37. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
  38. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  39. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  40. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  41. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +1 -2
  42. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  43. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
  44. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  45. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
  46. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  47. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -3
  48. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  49. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  51. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +1 -1
  52. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +2 -3
  54. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  55. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -12
  57. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
  59. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  60. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
  62. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
  65. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +0 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
  68. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  69. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
  71. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
  74. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  75. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  76. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  77. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
  78. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  79. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
  80. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  81. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -0
  82. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  83. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
  84. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  85. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
  87. package/package.json +2 -2
  88. package/build/cjs/DivaSingleProductPlanner-19811faa.js +0 -1169
  89. package/build/cjs/DockingPointHandler-e37440e2.js +0 -1255
  90. package/build/esm/DivaSingleProductPlanner-bc11af8c.js +0 -1158
  91. package/build/esm/DockingPointHandler-ce5b6cc8.js +0 -1245
  92. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
  93. 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,
@@ -16053,7 +16024,7 @@ var OptionValueCatalogData = /*#__PURE__*/function () {
16053
16024
  showOnlyWhenHasPrice: jsonOPV.ShowOnlyWhenHasPrice && jsonOPV.ShowOnlyWhenHasPrice == 'True' ? true : false,
16054
16025
  priceUnit: jsonOPV.PriceUnit,
16055
16026
  value: jsonOPV.Value,
16056
- property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"](Object.values((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : {}))),
16027
+ property: [].concat(_toConsumableArray__default["default"]((_jsonOPV$Metadatas = jsonOPV.Metadatas) !== null && _jsonOPV$Metadatas !== void 0 ? _jsonOPV$Metadatas : []), _toConsumableArray__default["default"]((_mask$properties = mask === null || mask === void 0 ? void 0 : mask.properties) !== null && _mask$properties !== void 0 ? _mask$properties : [])),
16057
16028
  textbausteine: jsonOPV.Textbausteine
16058
16029
  };
16059
16030
  this.opv.colorGroups = this.mapRALColorToGroup();
@@ -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);
@@ -16435,11 +16406,11 @@ var CatalogArticleData = /*#__PURE__*/function () {
16435
16406
  arePricesLoaded: false,
16436
16407
  articleOptions: {},
16437
16408
  decisions: [],
16438
- properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"](Object.values((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : {}))),
16409
+ properties: [].concat(_toConsumableArray__default["default"]((_jsonArticle$Metadata = jsonArticle.Metadatas) !== null && _jsonArticle$Metadata !== void 0 ? _jsonArticle$Metadata : []), _toConsumableArray__default["default"]((_articleMask$properti = articleMask === null || articleMask === void 0 ? void 0 : articleMask.properties) !== null && _articleMask$properti !== void 0 ? _articleMask$properti : [])),
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,
@@ -17843,7 +17814,7 @@ var OptionCatalogData = /*#__PURE__*/function () {
17843
17814
  _classCallCheck__default["default"](this, OptionCatalogData);
17844
17815
  _defineProperty__default["default"](this, "opt", void 0);
17845
17816
  var optionMask = (_catalogData$catalogM = (_catalogData$catalogM2 = catalogData.catalogMask) === null || _catalogData$catalogM2 === void 0 || (_catalogData$catalogM2 = _catalogData$catalogM2.options) === null || _catalogData$catalogM2 === void 0 ? void 0 : _catalogData$catalogM2[codex]) !== null && _catalogData$catalogM !== void 0 ? _catalogData$catalogM : codex.startsWith('OPT') ? (_catalogData$catalogM3 = catalogData.catalogMask) === null || _catalogData$catalogM3 === void 0 || (_catalogData$catalogM3 = _catalogData$catalogM3.options) === null || _catalogData$catalogM3 === void 0 ? void 0 : _catalogData$catalogM3[codex.substring(3)] : undefined;
17846
- var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray__default["default"](Object.values((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : {})));
17817
+ var properties = [].concat(_toConsumableArray__default["default"]((_jsonOPT$Properties = jsonOPT.Properties) !== null && _jsonOPT$Properties !== void 0 ? _jsonOPT$Properties : []), _toConsumableArray__default["default"]((_optionMask$propertie = optionMask === null || optionMask === void 0 ? void 0 : optionMask.properties) !== null && _optionMask$propertie !== void 0 ? _optionMask$propertie : []));
17847
17818
  this.opt = {
17848
17819
  codex: codex,
17849
17820
  name: (_optionMask$name$cata = optionMask === null || optionMask === void 0 || (_optionMask$name = optionMask.name) === null || _optionMask$name === void 0 ? void 0 : _optionMask$name[(_catalogData$api$getL = catalogData.api.getLanguage()) === null || _catalogData$api$getL === void 0 ? void 0 : _catalogData$api$getL.toLowerCase()]) !== null && _optionMask$name$cata !== void 0 ? _optionMask$name$cata : jsonOPT.Name,
@@ -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"](Object.values(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-f8f7b3c2.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-157f3b83.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() {
@@ -30346,7 +30314,7 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30346
30314
  if (targetArticle[opt] && !variantValues[opt]) variantValues[opt] = targetArticle[opt];
30347
30315
  }
30348
30316
  }
30349
- 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);
30350
30318
  set.basketConfigVariants.push(configVariant);
30351
30319
  case 28:
30352
30320
  case "end":
@@ -30401,11 +30369,11 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30401
30369
  }, {
30402
30370
  key: "isFavorite",
30403
30371
  value: function isFavorite(set, targetArticles, item, optionCodex) {
30404
- var _item$ocd, _set$WebConfig, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30372
+ var _item$ocd, _set$api$ReturnToFrom, _favorites$VariantVal, _Object$keys;
30405
30373
  var favorites = set.favorites;
30406
30374
  var opvCodex = (_item$ocd = item.ocd) !== null && _item$ocd !== void 0 ? _item$ocd : item.codex;
30407
30375
  var opt = optionCodex ? optionCodex : item.parent.codex;
30408
- 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'));
30409
30377
  if (!doShowFav) return undefined;
30410
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)) {
30411
30379
  for (var i = 0; i < targetArticles.length; i++) {
@@ -30426,8 +30394,8 @@ var DivaFavoritesHandler = /*#__PURE__*/function () {
30426
30394
  }();
30427
30395
  var favoritesHandlerInstance = new DivaFavoritesHandler();
30428
30396
 
30429
- 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; }
30430
- 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; }
30431
30399
 
30432
30400
  //Diese Klasse beinhaltet die Logik wie eine aktuelle Konfiguration mit allen möglicheen Ausprägungen mit Preisen in einem Set aussieht.
30433
30401
  //Der in einem Set gemergte Optionsbaum
@@ -30984,7 +30952,7 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
30984
30952
  //get schnittmenge of all the articles
30985
30953
  if (i === 0) {
30986
30954
  constructionRules = myOptionState.constructionRules;
30987
- configItems = _objectSpread$a({}, myOptionState.visibleOptionValues);
30955
+ configItems = _objectSpread$9({}, myOptionState.visibleOptionValues);
30988
30956
  } else {
30989
30957
  for (var _key2 in configItems) {
30990
30958
  if (!myOptionState.visibleOptionValues[_key2]) {
@@ -31215,8 +31183,8 @@ var DivaConfigTreeHandler = /*#__PURE__*/function () {
31215
31183
  }();
31216
31184
  var configTreeHandler = new DivaConfigTreeHandler();
31217
31185
 
31218
- 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; }
31219
- 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; }
31220
31188
  var LOG$8 = DivaUtils__default["default"].initLog('Planner', 'DIVA-SET-HANDLER');
31221
31189
 
31222
31190
  /*
@@ -31706,7 +31674,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
31706
31674
  }
31707
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;
31708
31676
  _context6.next = 18;
31709
- 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 ? {
31710
31678
  variantValues: variantValues
31711
31679
  } : {}));
31712
31680
  case 18:
@@ -32339,7 +32307,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32339
32307
  _context17.next = 24;
32340
32308
  break;
32341
32309
  }
32342
- return _context17.abrupt("return", _objectSpread$9(_objectSpread$9({}, doesFit), {}, {
32310
+ return _context17.abrupt("return", _objectSpread$8(_objectSpread$8({}, doesFit), {}, {
32343
32311
  accessoire: accessoire
32344
32312
  }));
32345
32313
  case 24:
@@ -32771,7 +32739,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32771
32739
  var articlecodex = plannerElement.articleCodex;
32772
32740
  if (type == 'PLANNERSWITCH' && Object.keys(set.getDivaArticles())[0]) {
32773
32741
  if (plannerViewInfo.catalogPlannerArticles[i].filterType == 'Accessoire') continue;
32774
- cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32742
+ cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32775
32743
  var index = cleanedCaltaogPlannerArticles.length - 1;
32776
32744
  cleanedCaltaogPlannerArticles[index].groupName = '';
32777
32745
  if (set.getArticlesByArticleCodex(articlecodex).length > 0) {
@@ -32789,10 +32757,10 @@ var DivaSetHandler = /*#__PURE__*/function () {
32789
32757
  plannerViewInfo.plannerConfiguration.updatePaletteAfterPlanningChanged = true;
32790
32758
  }
32791
32759
  }
32792
- if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$9({}, plannerElement));
32760
+ if (!dontPushElement) cleanedCaltaogPlannerArticles.push(_objectSpread$8({}, plannerElement));
32793
32761
  }
32794
32762
  }
32795
- return _objectSpread$9(_objectSpread$9({}, plannerViewInfo), {}, {
32763
+ return _objectSpread$8(_objectSpread$8({}, plannerViewInfo), {}, {
32796
32764
  catalogPlannerArticles: cleanedCaltaogPlannerArticles
32797
32765
  });
32798
32766
  }
@@ -32991,7 +32959,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
32991
32959
  filterType = set.configTree.getCurFilterType(configStepKey, optionStatesOfArticle, configItems.configItems);
32992
32960
  stepInfo = set.configTree.getStepInfo(configStepKey, optionStatesOfArticle);
32993
32961
  contentItemId = (_configItems$option = configItems.option) === null || _configItems$option === void 0 ? void 0 : _configItems$option.contentItemId;
32994
- return _context24.abrupt("return", _objectSpread$9(_objectSpread$9(_objectSpread$9({
32962
+ return _context24.abrupt("return", _objectSpread$8(_objectSpread$8(_objectSpread$8({
32995
32963
  isRenderedNotInSettingPalette: set.configTree.isRenderedNotInSettingPalette(configStepKey),
32996
32964
  isRenderedInAccessorieStep: set.configTree.isRenderedInAccessorieStep(configStepKey),
32997
32965
  visible: set.configTree.getVisibility(configStepKey, visible, set.CatalogData)
@@ -33414,7 +33382,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33414
33382
  break;
33415
33383
  }
33416
33384
  _context28.next = 17;
33417
- 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]), {}, {
33418
33386
  basketId: oldBasketIds[_i5]
33419
33387
  }), true);
33420
33388
  case 17:
@@ -33811,7 +33779,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33811
33779
  origOrderSet.BBox = actOrderSet.BBox;
33812
33780
  origOrderSet.VariantDescription = actOrderSet.VariantDescription;
33813
33781
  if (actOrderSet.ConfigVariants && origOrderSet.ConfigVariants) origOrderSet.ConfigVariants = actOrderSet.ConfigVariants.map(function (variant, index) {
33814
- return _objectSpread$9(_objectSpread$9({}, variant), {}, {
33782
+ return _objectSpread$8(_objectSpread$8({}, variant), {}, {
33815
33783
  SetImage: origOrderSet.ConfigVariants[index].SetImage,
33816
33784
  HQRenderScript: origOrderSet.ConfigVariants[index].HQRenderScript,
33817
33785
  Set2DImage: origOrderSet.ConfigVariants[index].Set2DImage,
@@ -33849,25 +33817,12 @@ var DivaSetHandler = /*#__PURE__*/function () {
33849
33817
  DivaUtils__default["default"].startSpanOfApm('GetSet3D und 2D Image');
33850
33818
  GroupType = 'PLANNING';
33851
33819
  plannerData = set.plannerHandler.savePlanner(set.getSetId());
33852
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
33853
- _context31.next = 10;
33854
- break;
33855
- }
33856
- _context31.next = 7;
33857
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
33858
- case 7:
33859
- _context31.t0 = _context31.sent;
33860
- _context31.next = 11;
33861
- break;
33862
- case 10:
33863
- _context31.t0 = undefined;
33864
- case 11:
33865
- setImage = _context31.t0;
33820
+ setImage = undefined;
33866
33821
  urlToPlanning2D = undefined;
33867
33822
  alternateSetImages = undefined;
33868
33823
  hqRenderScript = undefined;
33869
33824
  if (dontGenerateImages) {
33870
- _context31.next = 32;
33825
+ _context31.next = 25;
33871
33826
  break;
33872
33827
  }
33873
33828
  promise3D = this.getSetImage(set, typeof window === 'undefined');
@@ -33875,22 +33830,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
33875
33830
  if (!catalogData.dontSaveAlternativeRenderings && set.CatalogData.alternateRenderingsForSummary.length) {
33876
33831
  promise3DAlternate = this.getAlternateSetImages(set);
33877
33832
  }
33878
- _context31.next = 21;
33833
+ _context31.next = 14;
33879
33834
  return Promise.all([promise3D, promise2D, promise3DAlternate]);
33880
- case 21:
33835
+ case 14:
33881
33836
  _yield$Promise$all = _context31.sent;
33882
33837
  _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 3);
33883
33838
  setImage = _yield$Promise$all2[0];
33884
33839
  urlToPlanning2D = _yield$Promise$all2[1];
33885
33840
  alternateSetImages = _yield$Promise$all2[2];
33886
33841
  promiseHQRenderScript = this.getHQRenderScript(set, divaNr);
33887
- _context31.next = 29;
33842
+ _context31.next = 22;
33888
33843
  return Promise.all([promiseHQRenderScript]);
33889
- case 29:
33844
+ case 22:
33890
33845
  _yield$Promise$all3 = _context31.sent;
33891
33846
  _yield$Promise$all4 = _slicedToArray__default["default"](_yield$Promise$all3, 1);
33892
33847
  hqRenderScript = _yield$Promise$all4[0];
33893
- case 32:
33848
+ case 25:
33894
33849
  LOG$8.startTransaction({
33895
33850
  event: 'FillBakset',
33896
33851
  eventId: 'FILL_BASKET',
@@ -33956,7 +33911,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33956
33911
  MetaData_locales: !((_set$basketConfigVari3 = set.basketConfigVariants) !== null && _set$basketConfigVari3 !== void 0 && _set$basketConfigVari3.length) ? set.MetaData_locales : undefined
33957
33912
  });
33958
33913
  return _context31.abrupt("return", orderSet);
33959
- case 39:
33914
+ case 32:
33960
33915
  case "end":
33961
33916
  return _context31.stop();
33962
33917
  }
@@ -33984,7 +33939,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
33984
33939
  catalogData = set.CatalogData;
33985
33940
  is3D = ['3DImage', 'BoxPlanner', 'RTViewer'].includes(set.getPlannerMode());
33986
33941
  if (!is3D) {
33987
- _context32.next = 13;
33942
+ _context32.next = 11;
33988
33943
  break;
33989
33944
  }
33990
33945
  LOG$8.startTransaction({
@@ -34000,20 +33955,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
34000
33955
  case 9:
34001
33956
  setImage = _context32.sent;
34002
33957
  LOG$8.successTransaction('RENDER_3D_IMAGE');
34003
- _context32.next = 17;
34004
- break;
34005
- case 13:
34006
- if (!(set.getPlannerMode() == 'SirvViewer_only')) {
34007
- _context32.next = 17;
34008
- break;
34009
- }
34010
- _context32.next = 16;
34011
- return set.plannerHandler.getSetImageAsUrl(set.getSetId());
34012
- case 16:
34013
- setImage = _context32.sent;
34014
- case 17:
33958
+ case 11:
34015
33959
  return _context32.abrupt("return", setImage);
34016
- case 18:
33960
+ case 12:
34017
33961
  case "end":
34018
33962
  return _context32.stop();
34019
33963
  }
@@ -34165,77 +34109,22 @@ var DivaSetHandler = /*#__PURE__*/function () {
34165
34109
  Info: bbox.width + 'cm x ' + bbox.depth + 'cm'
34166
34110
  };
34167
34111
  }
34168
-
34169
- /****************************Cache building***************************/
34170
-
34171
- /**
34172
- * This function creates the cache for all images.
34173
- * @returns returns true if the whole set was created correctly
34174
- */
34175
34112
  }, {
34176
- key: "createRenderCache",
34177
- value: (function () {
34178
- var _createRenderCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(set) {
34179
- var _set$getAlternateRend3;
34180
- var timeout;
34113
+ key: "loadProductsOfSets",
34114
+ value: function () {
34115
+ var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee34(orderSets, involvedSetIds) {
34181
34116
  return _regeneratorRuntime__default["default"].wrap(function _callee34$(_context36) {
34182
34117
  while (1) switch (_context36.prev = _context36.next) {
34183
34118
  case 0:
34184
- 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, {
34185
- width: 100,
34186
- height: 100,
34187
- isFullscreenRendering: false,
34188
- planner3DGridEnabled: false,
34189
- mediaServiceSaveMode: 'PERMANENT',
34190
- doShow3DDimensionLines: false
34191
- });
34192
- timeout = 50;
34193
- case 2:
34194
- if (!set.plannerHandler.checkIsWaitingForRendering()) {
34195
- _context36.next = 10;
34196
- break;
34197
- }
34198
- timeout--;
34199
- if (!(timeout == 0)) {
34200
- _context36.next = 6;
34201
- break;
34202
- }
34203
- return _context36.abrupt("return", false);
34204
- case 6:
34205
- _context36.next = 8;
34206
- return DivaUtils__default["default"].Sleep(300);
34207
- case 8:
34208
34119
  _context36.next = 2;
34209
- break;
34210
- case 10:
34211
- return _context36.abrupt("return", true);
34212
- case 11:
34213
- case "end":
34214
- return _context36.stop();
34215
- }
34216
- }, _callee34);
34217
- }));
34218
- function createRenderCache(_x113) {
34219
- return _createRenderCache.apply(this, arguments);
34220
- }
34221
- return createRenderCache;
34222
- }())
34223
- }, {
34224
- key: "loadProductsOfSets",
34225
- value: function () {
34226
- var _loadProductsOfSets = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee35(orderSets, involvedSetIds) {
34227
- return _regeneratorRuntime__default["default"].wrap(function _callee35$(_context37) {
34228
- while (1) switch (_context37.prev = _context37.next) {
34229
- case 0:
34230
- _context37.next = 2;
34231
34120
  return productHandlerInstance.loadProductsOfSets(orderSets, involvedSetIds);
34232
34121
  case 2:
34233
34122
  case "end":
34234
- return _context37.stop();
34123
+ return _context36.stop();
34235
34124
  }
34236
- }, _callee35);
34125
+ }, _callee34);
34237
34126
  }));
34238
- function loadProductsOfSets(_x114, _x115) {
34127
+ function loadProductsOfSets(_x113, _x114) {
34239
34128
  return _loadProductsOfSets.apply(this, arguments);
34240
34129
  }
34241
34130
  return loadProductsOfSets;
@@ -34272,28 +34161,28 @@ var DivaSetHandler = /*#__PURE__*/function () {
34272
34161
  }, {
34273
34162
  key: "addOrderSetArticlesToExistingSet",
34274
34163
  value: function () {
34275
- var _addOrderSetArticlesToExistingSet = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee36(set, orderSet, lastSetToInitialize) {
34276
- return _regeneratorRuntime__default["default"].wrap(function _callee36$(_context38) {
34277
- 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) {
34278
34167
  case 0:
34279
34168
  //TODO: GLOBAL STUFF
34280
34169
  //this.updateActSet(set);
34281
34170
  orderSet.changeBasketIds();
34282
- _context38.next = 3;
34171
+ _context37.next = 3;
34283
34172
  return this.initOrderLineArticles(set, orderSet);
34284
34173
  case 3:
34285
- _context38.next = 5;
34174
+ _context37.next = 5;
34286
34175
  return set.plannerHandler.extendSet(set, orderSet.SetPlanData, lastSetToInitialize);
34287
34176
  case 5:
34288
- _context38.next = 7;
34177
+ _context37.next = 7;
34289
34178
  return productHandlerInstance.updateProducts(set, 'onAdd');
34290
34179
  case 7:
34291
34180
  case "end":
34292
- return _context38.stop();
34181
+ return _context37.stop();
34293
34182
  }
34294
- }, _callee36, this);
34183
+ }, _callee35, this);
34295
34184
  }));
34296
- function addOrderSetArticlesToExistingSet(_x116, _x117, _x118) {
34185
+ function addOrderSetArticlesToExistingSet(_x115, _x116, _x117) {
34297
34186
  return _addOrderSetArticlesToExistingSet.apply(this, arguments);
34298
34187
  }
34299
34188
  return addOrderSetArticlesToExistingSet;
@@ -34310,589 +34199,112 @@ var DivaSetHandler = /*#__PURE__*/function () {
34310
34199
  }();
34311
34200
  var setHandlerInstance = new DivaSetHandler();
34312
34201
 
34313
- //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; }
34314
34204
  var LOG$7 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
34315
- var Rendering = /*#__PURE__*/function () {
34316
- function Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, hasLayerMask, hasStaticBG, mediaServiceSaveMode, alternateRenderingsExist, alternateRendererInfo) {
34317
- _classCallCheck__default["default"](this, Rendering);
34318
- _defineProperty__default["default"](this, "planningHash", void 0);
34319
- _defineProperty__default["default"](this, "renderHash", void 0);
34320
- _defineProperty__default["default"](this, "creationTime", void 0);
34321
- _defineProperty__default["default"](this, "renderWidth", void 0);
34322
- _defineProperty__default["default"](this, "renderHeight", void 0);
34323
- _defineProperty__default["default"](this, "uiInfo", void 0);
34324
- _defineProperty__default["default"](this, "urlToSavedRendering", void 0);
34325
- // viewPoint: string;
34326
- // private posInfo: any;
34327
- //private doStream: boolean; Streaming over 3D Host is deprected
34328
- //private byteChunkArr: any;
34329
- //private byteChunkLayerMaskArr: any;
34330
- _defineProperty__default["default"](this, "hasLayerMask", void 0);
34331
- //private imgBytes: any;
34332
- _defineProperty__default["default"](this, "imgForSrc", void 0);
34333
- _defineProperty__default["default"](this, "HQRenderingUrl", void 0);
34334
- _defineProperty__default["default"](this, "SpinUrl", void 0);
34335
- _defineProperty__default["default"](this, "ArUrl", void 0);
34336
- _defineProperty__default["default"](this, "layerMaskAsBase64", void 0);
34337
- _defineProperty__default["default"](this, "layerMaskThreeTexture", void 0);
34338
- _defineProperty__default["default"](this, "isFullscreenRendering", void 0);
34339
- _defineProperty__default["default"](this, "hasStaticBackground", void 0);
34340
- _defineProperty__default["default"](this, "hasDimensionLines", void 0);
34341
- _defineProperty__default["default"](this, "plannerMeasureDigits", void 0);
34342
- _defineProperty__default["default"](this, "alternateRendererInfo", void 0);
34343
- _defineProperty__default["default"](this, "isAlternateRendering", void 0);
34344
- _defineProperty__default["default"](this, "alternateRenderingsExist", void 0);
34345
- _defineProperty__default["default"](this, "mediaServiceSaveMode", void 0);
34346
- _defineProperty__default["default"](this, "isLoadedFromCache", void 0);
34347
- _defineProperty__default["default"](this, "catalogData", void 0);
34348
- //this.doStream = false;
34349
- this.planningHash = planningHash;
34350
- this.renderHash = renderHash;
34351
- this.renderWidth = width;
34352
- this.renderHeight = height;
34353
- this.uiInfo = '';
34354
- this.imgForSrc = '';
34355
- this.layerMaskAsBase64 = '';
34356
- this.isFullscreenRendering = isFullscreenRendering;
34357
- this.hasDimensionLines = hasDimensionLines;
34358
- this.plannerMeasureDigits = plannerMeasureDigits;
34359
- this.hasLayerMask = hasLayerMask;
34360
- this.creationTime = new Date();
34361
- this.layerMaskThreeTexture = undefined;
34362
- this.hasStaticBackground = hasStaticBG;
34363
- this.mediaServiceSaveMode = mediaServiceSaveMode;
34364
- this.urlToSavedRendering = '';
34365
- this.catalogData = {
34366
- catalogCodex: '',
34367
- catalogGUID: ''
34368
- };
34369
- this.isLoadedFromCache = false;
34370
- this.HQRenderingUrl = '';
34371
- this.SpinUrl = '';
34372
- this.ArUrl = '';
34373
- if (alternateRendererInfo != undefined) this.isAlternateRendering = true;else this.isAlternateRendering = false;
34374
- this.alternateRendererInfo = alternateRendererInfo;
34375
- this.alternateRenderingsExist = !!alternateRenderingsExist;
34376
- }
34377
- return _createClass__default["default"](Rendering, [{
34378
- key: "clone",
34379
- value: function clone(rendering) {
34380
- this.planningHash = rendering.planningHash;
34381
- this.renderHash = rendering.renderHash;
34382
- this.creationTime = rendering.creationTime;
34383
- this.renderWidth = rendering.renderWidth;
34384
- this.renderHeight = rendering.renderHeight;
34385
- this.uiInfo = rendering.uiInfo;
34386
- this.urlToSavedRendering = rendering.urlToSavedRendering;
34387
- this.hasLayerMask = rendering.hasLayerMask;
34388
- this.imgForSrc = rendering.imgForSrc;
34389
- this.HQRenderingUrl = rendering.HQRenderingUrl;
34390
- this.layerMaskAsBase64 = rendering.layerMaskAsBase64;
34391
- this.layerMaskThreeTexture = rendering.layerMaskThreeTexture;
34392
- this.isFullscreenRendering = rendering.isFullscreenRendering;
34393
- this.hasStaticBackground = rendering.hasStaticBackground;
34394
- this.hasDimensionLines = rendering.hasDimensionLines;
34395
- this.plannerMeasureDigits = rendering.plannerMeasureDigits;
34396
- this.alternateRendererInfo = rendering.alternateRendererInfo;
34397
- this.isAlternateRendering = rendering.isAlternateRendering;
34398
- this.alternateRenderingsExist = rendering.alternateRenderingsExist;
34399
- this.mediaServiceSaveMode = rendering.mediaServiceSaveMode;
34400
- this.isLoadedFromCache = rendering.isLoadedFromCache;
34401
- this.catalogData = rendering.catalogData;
34402
- }
34403
- }, {
34404
- key: "getAllDockingPoints",
34405
- value: function getAllDockingPoints(setId, elementId) {
34406
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34407
- return this.uiInfo['S1']['E' + elementId]['DP'];
34408
- }
34409
- return this.uiInfo[setId]['E' + elementId]['DP'];
34410
- }
34411
- }, {
34412
- key: "getHasStaticBackground",
34413
- value: function getHasStaticBackground() {
34414
- return this.hasStaticBackground;
34415
- }
34416
- }, {
34417
- key: "getIsFullscreenRendering",
34418
- value: function getIsFullscreenRendering() {
34419
- return this.isFullscreenRendering;
34420
- }
34421
- }, {
34422
- key: "setIsFullscreenRendering",
34423
- value: function setIsFullscreenRendering(isFullscreen) {
34424
- this.isFullscreenRendering = isFullscreen;
34205
+ var DivaBasketHandler = /*#__PURE__*/function () {
34206
+ function DivaBasketHandler(plannerConfig) {
34207
+ var _this = this,
34208
+ _this$plannerConfig$s,
34209
+ _this$plannerConfig$s2,
34210
+ _this$plannerConfig$a;
34211
+ _classCallCheck__default["default"](this, DivaBasketHandler);
34212
+ _defineProperty__default["default"](this, "baskets", {});
34213
+ _defineProperty__default["default"](this, "ignoreInitObjectWhenInitializing", false);
34214
+ _defineProperty__default["default"](this, "plannerConfig", void 0);
34215
+ _defineProperty__default["default"](this, "divaNr", void 0);
34216
+ _defineProperty__default["default"](this, "loadDivaNr", void 0);
34217
+ _defineProperty__default["default"](this, "specificSetIdToLoad", void 0);
34218
+ _defineProperty__default["default"](this, "assignNewDivaNr", false);
34219
+ _defineProperty__default["default"](this, "basketWasSavedWithCurrentDocVersion", void 0);
34220
+ _defineProperty__default["default"](this, "emailConfig", void 0);
34221
+ _defineProperty__default["default"](this, "reportConfig", void 0);
34222
+ _defineProperty__default["default"](this, "_divaWWSHandler", void 0);
34223
+ _defineProperty__default["default"](this, "_handler", void 0);
34224
+ _defineProperty__default["default"](this, "_basketHandler", void 0);
34225
+ _defineProperty__default["default"](this, "startProductId", void 0);
34226
+ //Only helper variable
34227
+ _defineProperty__default["default"](this, "origConfiguration", {});
34228
+ /**
34229
+ * This function returns the originalConfiguration options
34230
+ */
34231
+ _defineProperty__default["default"](this, "getOrigConfiguration", function () {
34232
+ return _this.origConfiguration;
34233
+ });
34234
+ this.plannerConfig = plannerConfig;
34235
+ this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34236
+ this._handler = plannerConfig.handler;
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'))) {
34238
+ LOG$7.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
34239
+ code: 'WC_0003'
34240
+ }));
34425
34241
  }
34426
- }, {
34427
- key: "getHasDimensionLines",
34428
- value: function getHasDimensionLines() {
34429
- return this.hasDimensionLines;
34242
+ this.loadDivaNr = this.plannerConfig.divaNr;
34243
+ if (this.plannerConfig.initEmptyPlanner) {
34244
+ this.assignNewDivaNr = true;
34430
34245
  }
34431
- }, {
34432
- key: "getPlannerMeasureDigits",
34433
- value: function getPlannerMeasureDigits() {
34434
- return this.plannerMeasureDigits;
34246
+ if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34247
+ var _this$plannerConfig$a2, _this$plannerConfig$a3;
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"]);
34435
34249
  }
34436
- }, {
34437
- key: "getIsAlternateRendering",
34438
- value: function getIsAlternateRendering() {
34439
- return this.isAlternateRendering;
34250
+ }
34251
+ return _createClass__default["default"](DivaBasketHandler, [{
34252
+ key: "actDivaNr",
34253
+ get: function get() {
34254
+ return this.divaNr;
34440
34255
  }
34441
34256
  }, {
34442
- key: "getAlternateRenderInfo",
34443
- value: function getAlternateRenderInfo() {
34444
- return this.alternateRendererInfo;
34257
+ key: "actBasket",
34258
+ get: function get() {
34259
+ return this.baskets[this.divaNr];
34445
34260
  }
34446
34261
  }, {
34447
- key: "getAlternateRenderingsExist",
34448
- value: function getAlternateRenderingsExist() {
34449
- return this.alternateRenderingsExist;
34262
+ key: "catalogCodexesOfOrderSets",
34263
+ get: function get() {
34264
+ var orderSets = this.baskets[this.divaNr].OrderSets;
34265
+ var ret = [];
34266
+ var _loop = function _loop(i) {
34267
+ if (!ret.find(function (catalogCodex) {
34268
+ return catalogCodex == orderSets[i].CatalogCodex;
34269
+ })) ret.push(orderSets[i].CatalogCodex);
34270
+ };
34271
+ for (var i = 0; i < orderSets.length; i++) {
34272
+ _loop(i);
34273
+ }
34274
+ return ret;
34450
34275
  }
34451
34276
  }, {
34452
- key: "hasUIInfosOfElement",
34453
- value: function hasUIInfosOfElement(setId, elementid) {
34454
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34455
- return this.uiInfo['S1']['E' + elementid] != undefined;
34456
- } else {
34457
- return this.uiInfo[setId] != undefined && this.uiInfo[setId]['E' + elementid] != undefined;
34458
- }
34277
+ key: "ArticlesToInitialize",
34278
+ get: function get() {
34279
+ return this.plannerConfig.articleCodexes;
34459
34280
  }
34460
34281
  }, {
34461
- key: "getOutlinePolygonForSVG",
34462
- value: function getOutlinePolygonForSVG(setId, elementId, viewPortSize) {
34463
- var poly = [];
34464
- var avgCamDist = 0;
34465
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34466
- poly = this.uiInfo['S1']['E' + elementId]['POLYOUTLINE'];
34467
- avgCamDist = this.uiInfo['S1']['E' + elementId]['AVGCAMDIST'];
34468
- } else if (this.uiInfo[setId]) {
34469
- poly = this.uiInfo[setId]['E' + elementId]['POLYOUTLINE'];
34470
- avgCamDist = this.uiInfo[setId]['E' + elementId]['AVGCAMDIST'];
34471
- } else {
34472
- poly = this.uiInfo['E' + elementId]['POLYOUTLINE'];
34473
- avgCamDist = this.uiInfo['E' + elementId]['AVGCAMDIST'];
34474
- }
34475
- if (!poly) return undefined;
34476
- var points = '';
34477
- for (var i = 0; i < poly.length; i++) {
34478
- points += Math.round(poly[i].x * 0.01 * viewPortSize.imgWidth) + ',' + Math.round((100 - poly[i].y) * 0.01 * viewPortSize.imgHeight) + ' ';
34479
- }
34480
- return {
34481
- points: points,
34482
- avgCamDist: avgCamDist
34483
- };
34282
+ key: "updatePlannerConfig",
34283
+ value: function updatePlannerConfig(plannerConfig) {
34284
+ this.plannerConfig = plannerConfig;
34484
34285
  }
34485
-
34486
- //Left/Right_Bottom/Top_Back/Front
34487
34286
  }, {
34488
- key: "getRightTopBackUIPos",
34489
- value: function getRightTopBackUIPos(setId, elemId) {
34490
- var bbox = null;
34491
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34492
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34493
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34494
- if (!bbox) return;
34495
- for (var i = 0; i < bbox.length; i++) {
34496
- if (bbox[i].C == 'RTB') {
34497
- return bbox[i];
34498
- }
34499
- }
34287
+ key: "updateDivaNrInBasket",
34288
+ value: function updateDivaNrInBasket(divaNr) {
34289
+ this.loadDivaNr = divaNr;
34500
34290
  }
34501
- //Left/Right_Bottom/Top_Back/Front
34502
34291
  }, {
34503
- key: "getLeftTopBackUIPos",
34504
- value: function getLeftTopBackUIPos(setId, elemId) {
34505
- var bbox = null;
34506
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34507
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34508
- } else if (this.uiInfo[setId]) bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];else bbox = this.uiInfo['E' + elemId]['BBOX3D'];
34509
- if (!bbox) return;
34510
- for (var i = 0; i < bbox.length; i++) {
34511
- if (bbox[i].C == 'LTB') {
34512
- return bbox[i];
34513
- }
34514
- }
34515
- }
34516
- //Left/Right_Bottom/Top_Back/Front
34517
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34518
- }, {
34519
- key: "getLeftBottomFrontUIPos",
34520
- value: function getLeftBottomFrontUIPos(setId, elemId) {
34521
- var bbox = null;
34522
- if (this.uiInfo == '') return null;
34523
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34524
- if (!this.uiInfo['S1']['E' + elemId]) return;
34525
- bbox = this.uiInfo['S1']['E' + elemId]['BBOX3D'];
34526
- } else if (this.uiInfo[setId]) {
34527
- if (!this.uiInfo[setId]['E' + elemId]) return;
34528
- bbox = this.uiInfo[setId]['E' + elemId]['BBOX3D'];
34529
- } else {
34530
- var _this$uiInfo;
34531
- bbox = (_this$uiInfo = this.uiInfo['E' + elemId]) === null || _this$uiInfo === void 0 ? void 0 : _this$uiInfo['BBOX3D'];
34532
- }
34533
- if (!bbox) return;
34534
- for (var i = 0; i < bbox.length; i++) {
34535
- if (bbox[i].C == 'LBF') {
34536
- return bbox[i];
34537
- }
34538
- }
34539
- }
34540
- }, {
34541
- key: "getBoxPlannerCornerUIPos",
34542
- value: function getBoxPlannerCornerUIPos(setId, elemId, corner) {
34543
- var boxPlan = [];
34544
- if (this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined) {
34545
- boxPlan = this.uiInfo['S1']['E' + elemId]['BoxPlan'];
34546
- } else if (this.uiInfo[setId]) boxPlan = this.uiInfo[setId]['E' + elemId]['BoxPlan'];else boxPlan = this.uiInfo['E' + elemId]['BoxPlan'];
34547
- for (var i = 0; i < boxPlan.length; i++) {
34548
- if (!boxPlan[i].N || !boxPlan[i].x || !boxPlan[i].y) continue;
34549
- switch (corner) {
34550
- case 'TOPCENTER':
34551
- if (boxPlan[i].N == 'TC') {
34552
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34553
- }
34554
- break;
34555
- case 'LEFTCENTER':
34556
- if (boxPlan[i].N == 'LC') {
34557
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34558
- }
34559
- break;
34560
- case 'RIGHTCENTER':
34561
- if (boxPlan[i].N == 'RC') {
34562
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34563
- }
34564
- break;
34565
- case 'RIGHTTOPFRONT':
34566
- if (boxPlan[i].N == 'RTF') {
34567
- return new Vector2(Number(boxPlan[i].x), Number(boxPlan[i].y));
34568
- }
34569
- break;
34570
- }
34571
- }
34572
- return undefined;
34573
- }
34574
- }, {
34575
- key: "getUnityCamPos",
34576
- value: function getUnityCamPos() {
34577
- return new Vector3(parseFloat(this.uiInfo['CAM']['X']), parseFloat(this.uiInfo['CAM']['Y']), parseFloat(this.uiInfo['CAM']['Z']));
34578
- }
34579
- }, {
34580
- key: "getUnityCamRot",
34581
- value: function getUnityCamRot() {
34582
- // return new Vector3(parseFloat(this.uiInfo["CAM"]["RX"]), parseFloat(this.uiInfo["CAM"]["RY"]), parseFloat(this.uiInfo["CAM"]["RZ"]));
34583
- var quatVec = new Vector4(parseFloat(this.uiInfo['CAM']['QX']), parseFloat(this.uiInfo['CAM']['QY']), parseFloat(this.uiInfo['CAM']['QZ']), parseFloat(this.uiInfo['CAM']['QW']));
34584
- return quatVec;
34585
- }
34586
- }, {
34587
- key: "getUnityFOV",
34588
- value: function getUnityFOV() {
34589
- return parseFloat(this.uiInfo['CAM']['FOV']);
34590
- }
34591
-
34592
- //elementId has to be a string because when working with accs in shelf planner an element id is the combination of parentElementId.rasterHeight.gridId
34593
- //It returns the distance of an element to the ground in cm
34594
- }, {
34595
- key: "getDistanceToGround",
34596
- value: function getDistanceToGround(setId, elementId) {
34597
- setId = this.uiInfo[setId] == undefined && this.uiInfo['S1'] != undefined ? 'S1' : setId;
34598
- if (this.uiInfo[setId] && this.uiInfo[setId]['E' + elementId] && this.uiInfo[setId]['E' + elementId]['DIM'] && this.uiInfo[setId]['E' + elementId]['DIM']['dfg']) {
34599
- return this.uiInfo[setId]['E' + elementId]['DIM']['dfg'] * 100;
34600
- }
34601
- return -1;
34602
- }
34603
- }, {
34604
- key: "addUIInfo",
34605
- value: function addUIInfo(uiInfo) {
34606
- try {
34607
- this.uiInfo = JSON.parse(uiInfo);
34608
- //this.calcOutlinePolygon();
34609
- } catch (error) {
34610
- LOG$7.error(new DivaUtils.DivaError('Error when parsing UI Info in rendering. Corrupt UIInfo: ' + uiInfo, {
34611
- code: 'WC_0013',
34612
- cause: error
34613
- }));
34614
- }
34615
- }
34616
-
34617
- /**
34618
- * This function adds a blobImage to the rendering .
34619
- * It is parsed to a base64 image.
34620
- * @param blob The blob contains the image
34621
- * @param isLayerMask True if the Image is the layer mask image
34622
- */
34623
- }, {
34624
- key: "addImgAsBlob",
34625
- value: function addImgAsBlob(buffer, isLayerMask) {
34626
- if (isLayerMask) this.layerMaskAsBase64 = buffer.toString('base64');else this.imgForSrc = 'data:image/jpeg;base64,' + buffer.toString('base64');
34627
- }
34628
-
34629
- //Write $("img.einBild").src
34630
- }, {
34631
- key: "getHQRenderingURL",
34632
- value: function getHQRenderingURL() {
34633
- return this.HQRenderingUrl;
34634
- }
34635
- }, {
34636
- key: "getArURl",
34637
- value: function getArURl() {
34638
- return this.ArUrl;
34639
- }
34640
- }, {
34641
- key: "getSpinURL",
34642
- value: function getSpinURL() {
34643
- return this.SpinUrl;
34644
- }
34645
- }, {
34646
- key: "getImageForSrc",
34647
- value: function getImageForSrc() {
34648
- return this.imgForSrc;
34649
- }
34650
- }, {
34651
- key: "containsSirvUrl",
34652
- value: function containsSirvUrl() {
34653
- return this.HQRenderingUrl != '';
34654
- }
34655
- }, {
34656
- key: "setArUrl",
34657
- value: function setArUrl(url) {
34658
- this.ArUrl = url;
34659
- }
34660
- }, {
34661
- key: "setSpinUrl",
34662
- value: function setSpinUrl(url) {
34663
- this.SpinUrl = url;
34664
- }
34665
- }, {
34666
- key: "setHQRenderingUrl",
34667
- value: function setHQRenderingUrl(url, useSirvViewer) {
34668
- if (useSirvViewer) {
34669
- this.HQRenderingUrl = url;
34670
- } else {
34671
- this.imgForSrc = url;
34672
- }
34673
- }
34674
-
34675
- //*****************************************GETTER und SETTER********************************************** */
34676
- }, {
34677
- key: "CatalogCodex",
34678
- get: function get() {
34679
- return this.catalogData.catalogCodex;
34680
- },
34681
- set: function set(val) {
34682
- this.catalogData.catalogCodex = val;
34683
- }
34684
- }, {
34685
- key: "CatalogGUID",
34686
- get: function get() {
34687
- return this.catalogData.catalogGUID;
34688
- },
34689
- set: function set(val) {
34690
- this.catalogData.catalogGUID = val;
34691
- }
34692
- }, {
34693
- key: "IsLoadedFromCache",
34694
- get: function get() {
34695
- return this.isLoadedFromCache;
34696
- },
34697
- set: function set(val) {
34698
- this.isLoadedFromCache = val;
34699
- }
34700
- }, {
34701
- key: "PlanningHash",
34702
- get: function get() {
34703
- return this.planningHash;
34704
- }
34705
- }, {
34706
- key: "RenderHash",
34707
- get: function get() {
34708
- return this.renderHash;
34709
- }
34710
- }, {
34711
- key: "UrlToSavedRendering",
34712
- get: function get() {
34713
- return this.urlToSavedRendering;
34714
- },
34715
- set: function set(url) {
34716
- this.urlToSavedRendering = url;
34717
- }
34718
- }, {
34719
- key: "HasLayerMask",
34720
- get: function get() {
34721
- return this.hasLayerMask;
34722
- },
34723
- set: function set(hasLayerMask) {
34724
- this.hasLayerMask = hasLayerMask;
34725
- }
34726
- }, {
34727
- key: "RenderWidth",
34728
- get: function get() {
34729
- return this.renderWidth;
34730
- }
34731
- }, {
34732
- key: "RenderHeight",
34733
- get: function get() {
34734
- return this.renderHeight;
34735
- }
34736
- }, {
34737
- key: "getHasLayerMask",
34738
- value: function getHasLayerMask() {
34739
- return this.hasLayerMask;
34740
- }
34741
- }, {
34742
- key: "getLayerMaskForSrc",
34743
- value: function getLayerMaskForSrc() {
34744
- return this.layerMaskAsBase64;
34745
- }
34746
- }, {
34747
- key: "HasLayerMaskThreeTexture",
34748
- get: function get() {
34749
- return this.layerMaskThreeTexture != undefined;
34750
- }
34751
- }, {
34752
- key: "LayerMaskThreeTexture",
34753
- get: function get() {
34754
- return this.layerMaskThreeTexture;
34755
- },
34756
- set: function set(tex) {
34757
- this.layerMaskThreeTexture = tex;
34758
- }
34759
- /*
34760
- get DoStream() {
34761
- return this.doStream;
34762
- }
34763
- */
34764
- }, {
34765
- key: "AllImgLoaded",
34766
- get: function get() {
34767
- return (this.imgForSrc != '' || this.HQRenderingUrl != '') && (!this.hasLayerMask || this.layerMaskAsBase64 != '');
34768
- }
34769
- }, {
34770
- key: "UiInfoLoaded",
34771
- get: function get() {
34772
- return this.uiInfo != '';
34773
- }
34774
- }, {
34775
- key: "CreationTime",
34776
- get: function get() {
34777
- return this.creationTime.getTime();
34778
- }
34779
- }, {
34780
- key: "MediaServiceSaveMode",
34781
- get: function get() {
34782
- return this.mediaServiceSaveMode;
34783
- },
34784
- set: function set(mode) {
34785
- this.mediaServiceSaveMode = mode;
34786
- }
34787
- }]);
34788
- }();
34789
-
34790
- 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; }
34791
- 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; }
34792
- var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
34793
- var DivaBasketHandler = /*#__PURE__*/function () {
34794
- function DivaBasketHandler(plannerConfig) {
34795
- var _this = this,
34796
- _this$plannerConfig$s,
34797
- _this$plannerConfig$s2,
34798
- _this$plannerConfig$a;
34799
- _classCallCheck__default["default"](this, DivaBasketHandler);
34800
- _defineProperty__default["default"](this, "baskets", {});
34801
- _defineProperty__default["default"](this, "ignoreInitObjectWhenInitializing", false);
34802
- _defineProperty__default["default"](this, "plannerConfig", void 0);
34803
- _defineProperty__default["default"](this, "divaNr", void 0);
34804
- _defineProperty__default["default"](this, "loadDivaNr", void 0);
34805
- _defineProperty__default["default"](this, "specificSetIdToLoad", void 0);
34806
- _defineProperty__default["default"](this, "assignNewDivaNr", false);
34807
- _defineProperty__default["default"](this, "basketWasSavedWithCurrentDocVersion", void 0);
34808
- _defineProperty__default["default"](this, "emailConfig", void 0);
34809
- _defineProperty__default["default"](this, "reportConfig", void 0);
34810
- _defineProperty__default["default"](this, "_divaWWSHandler", void 0);
34811
- _defineProperty__default["default"](this, "_handler", void 0);
34812
- _defineProperty__default["default"](this, "_basketHandler", void 0);
34813
- _defineProperty__default["default"](this, "startProductId", void 0);
34814
- //Only helper variable
34815
- _defineProperty__default["default"](this, "origConfiguration", {});
34816
- /**
34817
- * This function returns the originalConfiguration options
34818
- */
34819
- _defineProperty__default["default"](this, "getOrigConfiguration", function () {
34820
- return _this.origConfiguration;
34821
- });
34822
- this.plannerConfig = plannerConfig;
34823
- this.assignNewDivaNr = !!this.plannerConfig.assignNewDivaNr;
34824
- this._handler = plannerConfig.handler;
34825
- 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'))) {
34826
- LOG$6.error(new DivaUtils.DivaError('Keine Öffnungsparameter', {
34827
- code: 'WC_0003'
34828
- }));
34829
- }
34830
- this.loadDivaNr = this.plannerConfig.divaNr;
34831
- if (this.plannerConfig.initEmptyPlanner) {
34832
- this.assignNewDivaNr = true;
34833
- }
34834
- if ((_this$plannerConfig$a = this.plannerConfig.apiConfig) !== null && _this$plannerConfig$a !== void 0 && _this$plannerConfig$a.basketService) {
34835
- var _this$plannerConfig$a2, _this$plannerConfig$a3;
34836
- 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"]);
34837
- }
34838
- }
34839
- return _createClass__default["default"](DivaBasketHandler, [{
34840
- key: "actDivaNr",
34841
- get: function get() {
34842
- return this.divaNr;
34843
- }
34844
- }, {
34845
- key: "actBasket",
34846
- get: function get() {
34847
- return this.baskets[this.divaNr];
34848
- }
34849
- }, {
34850
- key: "catalogCodexesOfOrderSets",
34851
- get: function get() {
34852
- var orderSets = this.baskets[this.divaNr].OrderSets;
34853
- var ret = [];
34854
- var _loop = function _loop(i) {
34855
- if (!ret.find(function (catalogCodex) {
34856
- return catalogCodex == orderSets[i].CatalogCodex;
34857
- })) ret.push(orderSets[i].CatalogCodex);
34858
- };
34859
- for (var i = 0; i < orderSets.length; i++) {
34860
- _loop(i);
34861
- }
34862
- return ret;
34863
- }
34864
- }, {
34865
- key: "ArticlesToInitialize",
34866
- get: function get() {
34867
- return this.plannerConfig.articleCodexes;
34868
- }
34869
- }, {
34870
- key: "updatePlannerConfig",
34871
- value: function updatePlannerConfig(plannerConfig) {
34872
- this.plannerConfig = plannerConfig;
34873
- }
34874
- }, {
34875
- key: "updateDivaNrInBasket",
34876
- value: function updateDivaNrInBasket(divaNr) {
34877
- this.loadDivaNr = divaNr;
34878
- }
34879
- }, {
34880
- key: "setIgnoreInitObjectWhenInitializing",
34881
- value: function setIgnoreInitObjectWhenInitializing() {
34882
- this.ignoreInitObjectWhenInitializing = true;
34292
+ key: "setIgnoreInitObjectWhenInitializing",
34293
+ value: function setIgnoreInitObjectWhenInitializing() {
34294
+ this.ignoreInitObjectWhenInitializing = true;
34883
34295
  }
34884
34296
  }, {
34885
34297
  key: "initializeBasket",
34886
34298
  value: function () {
34887
34299
  var _initializeBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(api) {
34888
34300
  var _this$plannerConfig$s3, _this$plannerConfig$s5, _api$getPlannerType, _this$plannerConfig$r;
34889
- 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;
34890
34302
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
34891
34303
  while (1) switch (_context.prev = _context.next) {
34892
34304
  case 0:
34893
34305
  this.basketWasSavedWithCurrentDocVersion = false;
34894
34306
  this.startProductId = undefined;
34895
- 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 + "'");
34896
34308
  if (this.ignoreInitObjectWhenInitializing) {
34897
34309
  _context.next = 34;
34898
34310
  break;
@@ -35019,9 +34431,9 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35019
34431
  op: 'eq',
35020
34432
  value: (_this$plannerConfig$c2 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c2 === void 0 ? void 0 : _this$plannerConfig$c2._id
35021
34433
  }, {
35022
- id: 'available',
34434
+ id: 'availableForOrganizations',
35023
34435
  op: 'eq',
35024
- value: true
34436
+ value: (_this$plannerConfig$c3 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c3 === void 0 ? void 0 : _this$plannerConfig$c3._id
35025
34437
  }]);
35026
34438
  case 60:
35027
34439
  result = _context.sent;
@@ -35058,7 +34470,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35058
34470
  title: (_api$getI18n = api.getI18n()) === null || _api$getI18n === void 0 ? void 0 : _api$getI18n.t('configurator.no_startproduct_defined_title'),
35059
34471
  text: (_api$getI18n2 = api.getI18n()) === null || _api$getI18n2 === void 0 ? void 0 : _api$getI18n2.t('configurator.no_startproduct_defined_text')
35060
34472
  });
35061
- 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"!'));
35062
34474
  case 77:
35063
34475
  _context.next = 83;
35064
34476
  break;
@@ -35206,12 +34618,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35206
34618
  case 0:
35207
34619
  basketFromAPI = (_dataFromApi$basket = dataFromApi.basket) !== null && _dataFromApi$basket !== void 0 ? _dataFromApi$basket : dataFromApi.Basket; //evaluateRopoEffect(basketFromAPI,);
35208
34620
  if (origProductId) basketFromAPI.OrigProductId = origProductId;
35209
- basket = _objectSpread$8({}, basketFromAPI);
34621
+ basket = _objectSpread$7({}, basketFromAPI);
35210
34622
  if (!basketFromAPI) {
35211
- _context5.next = 50;
34623
+ _context5.next = 48;
35212
34624
  break;
35213
34625
  }
35214
- LOG$6.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
34626
+ LOG$7.debug('divaNr: ' + divaNr + ' was loaded successfully from server!');
35215
34627
  if (basketFromAPI.OrigDivaNr) {
35216
34628
  this.origConfiguration.originDivaNr = basketFromAPI.OrigDivaNr;
35217
34629
  } else if (basketFromAPI.OrigCatalogCodex) {
@@ -35305,20 +34717,14 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35305
34717
  this.baskets[newDivaNr] = new basketModel.BasketData(basket);
35306
34718
  this.baskets[newDivaNr].clearRenderData();
35307
34719
  if (!keepOldDivaNr) this.divaNr = newDivaNr;
35308
- _context5.next = 46;
35309
- return DivaUtils__default["default"].initCache({
35310
- accountGuid: this.baskets[newDivaNr].OrderSets[0].AccountGUID,
35311
- catalogCodex: this.baskets[newDivaNr].OrderSets[0].CatalogCodex
35312
- });
35313
- case 46:
35314
34720
  if (this.assignNewDivaNr) {
35315
34721
  this.baskets[newDivaNr].clearBasketClientData();
35316
34722
  this.baskets[newDivaNr].ProductSetName = '';
35317
34723
  }
35318
34724
  return _context5.abrupt("return", true);
35319
- case 50:
34725
+ case 48:
35320
34726
  return _context5.abrupt("return", false);
35321
- case 51:
34727
+ case 49:
35322
34728
  case "end":
35323
34729
  return _context5.stop();
35324
34730
  }
@@ -35352,7 +34758,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35352
34758
  key: "loadBasketByCatalogCodex",
35353
34759
  value: function () {
35354
34760
  var _loadBasketByCatalogCodex = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee6(api) {
35355
- var _this$plannerConfig$s8, _this$actBasket$Order, _this$actBasket$Order2;
34761
+ var _this$plannerConfig$s8;
35356
34762
  var newBasket, _this$baskets$this$di;
35357
34763
  return _regeneratorRuntime__default["default"].wrap(function _callee6$(_context6) {
35358
34764
  while (1) switch (_context6.prev = _context6.next) {
@@ -35363,37 +34769,23 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35363
34769
  if (this.plannerConfig.articleCodexes) {
35364
34770
  this.origConfiguration.originArticleCodexes = this.plannerConfig.articleCodexes;
35365
34771
  }
35366
- if (!(DivaUtils__default["default"].CacheIsEnabled && DivaUtils__default["default"].CacheAccountGuid)) {
34772
+ if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35367
34773
  _context6.next = 6;
35368
34774
  break;
35369
34775
  }
35370
- this.plannerConfig.accountGuid = DivaUtils__default["default"].CacheAccountGuid;
35371
- _context6.next = 8;
34776
+ _context6.t0 = _this$plannerConfig$s8;
34777
+ _context6.next = 9;
35372
34778
  break;
35373
34779
  case 6:
35374
34780
  _context6.next = 8;
35375
- return DivaUtils__default["default"].initCache({
35376
- accountGuid: this.plannerConfig.accountGuid,
35377
- catalogCodex: this.plannerConfig.catalogCodex
35378
- });
35379
- case 8:
35380
- if (!((_this$plannerConfig$s8 = this.plannerConfig.startDivaNr) !== null && _this$plannerConfig$s8 !== void 0)) {
35381
- _context6.next = 12;
35382
- break;
35383
- }
35384
- _context6.t0 = _this$plannerConfig$s8;
35385
- _context6.next = 15;
35386
- break;
35387
- case 12:
35388
- _context6.next = 14;
35389
34781
  return this.createNewDivaNr(api);
35390
- case 14:
34782
+ case 8:
35391
34783
  _context6.t0 = _context6.sent;
35392
- case 15:
34784
+ case 9:
35393
34785
  this.divaNr = _context6.t0;
35394
- _context6.next = 18;
34786
+ _context6.next = 12;
35395
34787
  return this.createNewBasket(api, this.plannerConfig, this.divaNr, api.getLanguage());
35396
- case 18:
34788
+ case 12:
35397
34789
  newBasket = _context6.sent;
35398
34790
  if (!this.plannerConfig.basketData) {
35399
34791
  this.baskets[this.divaNr] = newBasket;
@@ -35410,14 +34802,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35410
34802
  if (this.baskets[this.divaNr].SetPlannerInfos) ;
35411
34803
  }
35412
34804
  this.specificSetIdToLoad = this.plannerConfig.setId;
35413
- _context6.next = 23;
35414
- return DivaUtils__default["default"].initCache({
35415
- accountGuid: (_this$actBasket$Order = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order === void 0 ? void 0 : _this$actBasket$Order.AccountGUID,
35416
- catalogCodex: (_this$actBasket$Order2 = this.actBasket.OrderSets[0]) === null || _this$actBasket$Order2 === void 0 ? void 0 : _this$actBasket$Order2.CatalogCodex
35417
- });
35418
- case 23:
35419
34805
  return _context6.abrupt("return", true);
35420
- case 24:
34806
+ case 16:
35421
34807
  case "end":
35422
34808
  return _context6.stop();
35423
34809
  }
@@ -35448,7 +34834,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35448
34834
  case 9:
35449
34835
  _context7.prev = 9;
35450
34836
  _context7.t0 = _context7["catch"](0);
35451
- 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', {
35452
34838
  code: 'WC_0004',
35453
34839
  custom: {
35454
34840
  divaNr: divaNr
@@ -35484,7 +34870,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35484
34870
  _context8.next = 8;
35485
34871
  break;
35486
34872
  }
35487
- 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', {
35488
34874
  code: 'WC_0005',
35489
34875
  custom: {
35490
34876
  productId: productId
@@ -35568,7 +34954,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35568
34954
  _context10.next = 6;
35569
34955
  break;
35570
34956
  }
35571
- 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', {
35572
34958
  code: 'WC_0005',
35573
34959
  custom: {
35574
34960
  productId: productId
@@ -35605,8 +34991,8 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35605
34991
  CatalogGUID: initObject.catalogGuid,
35606
34992
  AccountGUID: initObject.accountGuid,
35607
34993
  Favorites: new basketModel.Favorites()
35608
- }); //dont get session if cache is active (SuS)
35609
- if (!(initObject.accountGuid && !orderSet.AccountSessionGUID && !DivaUtils__default["default"].cacheIsReady)) {
34994
+ });
34995
+ if (!(initObject.accountGuid && !orderSet.AccountSessionGUID)) {
35610
34996
  _context11.next = 5;
35611
34997
  break;
35612
34998
  }
@@ -35655,12 +35041,12 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35655
35041
  key: "saveToBasket",
35656
35042
  value: function () {
35657
35043
  var _saveToBasket = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(api, actBasket, returnTo) {
35658
- var _this$plannerConfig$c3, _this$_basketHandler, _api$getJwt;
35044
+ var _this$plannerConfig$c4, _this$_basketHandler, _api$getJwt;
35659
35045
  var response;
35660
35046
  return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context12) {
35661
35047
  while (1) switch (_context12.prev = _context12.next) {
35662
35048
  case 0:
35663
- LOG$6.startTransaction({
35049
+ LOG$7.startTransaction({
35664
35050
  event: 'SaveBasketOnAPI',
35665
35051
  eventId: 'SAVE_BASKET_ON_API',
35666
35052
  message: 'Save Basket on API'
@@ -35674,7 +35060,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35674
35060
  return DivaUtils__default["default"].updateBasketOrgInfo(actBasket, this.plannerConfig.currentOrganization, this.plannerConfig.currentUser, this.plannerConfig.settings.keepSalesPersonDataInBasket);
35675
35061
  case 8:
35676
35062
  actBasket.UserLanguage = api.getLanguage();
35677
- 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;
35678
35064
  _context12.next = 12;
35679
35065
  return (_this$_basketHandler = this._basketHandler) === null || _this$_basketHandler === void 0 ? void 0 : _this$_basketHandler.saveBasket({
35680
35066
  jwt: (_api$getJwt = api.getJwt()) !== null && _api$getJwt !== void 0 ? _api$getJwt : undefined,
@@ -35699,7 +35085,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35699
35085
  }
35700
35086
  return _context12.abrupt("return", response);
35701
35087
  case 19:
35702
- LOG$6.successTransaction('saveBasketOnAPI');
35088
+ LOG$7.successTransaction('saveBasketOnAPI');
35703
35089
  return _context12.abrupt("return", response === null || response === void 0 ? void 0 : response._id);
35704
35090
  case 21:
35705
35091
  case "end":
@@ -35805,7 +35191,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35805
35191
  if (_loop2()) continue;
35806
35192
  }
35807
35193
  var variantValues = article.VariantValuesParentOption;
35808
- var data = _objectSpread$8(_objectSpread$8({}, this.actBasket), {}, {
35194
+ var data = _objectSpread$7(_objectSpread$7({}, this.actBasket), {}, {
35809
35195
  changedValues: changedValues,
35810
35196
  variantValues: variantValues,
35811
35197
  isInit: isInit,
@@ -35830,7 +35216,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35830
35216
  break;
35831
35217
  case 3:
35832
35218
  _context13.next = 5;
35833
- return Promise.resolve().then(function () { return require('./PfisterWWSHandler-b5b08965.js'); });
35219
+ return Promise.resolve().then(function () { return require('./PfisterWWSHandler-24c470e2.js'); });
35834
35220
  case 5:
35835
35221
  _yield$import = _context13.sent;
35836
35222
  PfisterWWSHandler = _yield$import["default"];
@@ -35838,7 +35224,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35838
35224
  return _context13.abrupt("break", 33);
35839
35225
  case 9:
35840
35226
  _context13.next = 11;
35841
- return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-175ace96.js'); });
35227
+ return Promise.resolve().then(function () { return require('./LiviqueWWSHandler-9bc80b98.js'); });
35842
35228
  case 11:
35843
35229
  _yield$import2 = _context13.sent;
35844
35230
  LiviqueWWSHandler = _yield$import2["default"];
@@ -35846,7 +35232,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35846
35232
  return _context13.abrupt("break", 33);
35847
35233
  case 15:
35848
35234
  _context13.next = 17;
35849
- return Promise.resolve().then(function () { return require('./SeriousBasketHandler-9d531962.js'); });
35235
+ return Promise.resolve().then(function () { return require('./SeriousBasketHandler-a4647e89.js'); });
35850
35236
  case 17:
35851
35237
  _yield$import3 = _context13.sent;
35852
35238
  SeriousWWSHandler = _yield$import3["default"];
@@ -35854,7 +35240,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35854
35240
  return _context13.abrupt("break", 33);
35855
35241
  case 21:
35856
35242
  _context13.next = 23;
35857
- return Promise.resolve().then(function () { return require('./ProductBasketHandler-b37e5eb2.js'); });
35243
+ return Promise.resolve().then(function () { return require('./ProductBasketHandler-08dcf24e.js'); });
35858
35244
  case 23:
35859
35245
  _yield$import4 = _context13.sent;
35860
35246
  ProductWWSHandler = _yield$import4["default"];
@@ -35862,7 +35248,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35862
35248
  return _context13.abrupt("break", 33);
35863
35249
  case 27:
35864
35250
  _context13.next = 29;
35865
- return Promise.resolve().then(function () { return require('./StandardWWSHandler-e322419c.js'); });
35251
+ return Promise.resolve().then(function () { return require('./StandardWWSHandler-e211a327.js'); });
35866
35252
  case 29:
35867
35253
  _yield$import5 = _context13.sent;
35868
35254
  StandardWWSHandler = _yield$import5["default"];
@@ -35893,43 +35279,43 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35893
35279
  //if no shopType is set in parent organization, no ropo effekt
35894
35280
  if (!organization.shopType) return;
35895
35281
  if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'store') {
35896
- var _this$plannerConfig$c4;
35897
- LOG$6.businessEvent('ropoEffectStoreToStore', 'Seller', 'Evaluating the ROPO Effect Store To Store', {
35898
- sourceDivaNr: sourceBasket.DivaNr,
35899
- sourceOrgId: sourceOrganizationId.id,
35900
- targetOrgId: (_this$plannerConfig$c4 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c4 === void 0 ? void 0 : _this$plannerConfig$c4._id
35901
- });
35902
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35903
35282
  var _this$plannerConfig$c5;
35904
- 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', {
35905
35284
  sourceDivaNr: sourceBasket.DivaNr,
35906
35285
  sourceOrgId: sourceOrganizationId.id,
35907
35286
  targetOrgId: (_this$plannerConfig$c5 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c5 === void 0 ? void 0 : _this$plannerConfig$c5._id
35908
35287
  });
35909
- } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35288
+ } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'webshop') {
35910
35289
  var _this$plannerConfig$c6;
35911
- 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', {
35912
35291
  sourceDivaNr: sourceBasket.DivaNr,
35913
35292
  sourceOrgId: sourceOrganizationId.id,
35914
35293
  targetOrgId: (_this$plannerConfig$c6 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c6 === void 0 ? void 0 : _this$plannerConfig$c6._id
35915
35294
  });
35916
- } else if (organization.shopType == 'webshop' && sourceOrganizationId.shopType == 'store') {
35295
+ } else if (organization.shopType == 'store' && sourceOrganizationId.shopType == 'webshop') {
35917
35296
  var _this$plannerConfig$c7;
35918
- 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', {
35919
35298
  sourceDivaNr: sourceBasket.DivaNr,
35920
35299
  sourceOrgId: sourceOrganizationId.id,
35921
35300
  targetOrgId: (_this$plannerConfig$c7 = this.plannerConfig.currentOrganization) === null || _this$plannerConfig$c7 === void 0 ? void 0 : _this$plannerConfig$c7._id
35922
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
+ });
35923
35309
  }
35924
35310
  } catch (e) {
35925
- var _this$plannerConfig$c8;
35926
- 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', {
35927
35313
  code: 'SELLER_0006',
35928
35314
  cause: e,
35929
35315
  custom: {
35930
35316
  sourceDivaNr: sourceBasket.DivaNr,
35931
35317
  sourceOrgId: sourceOrganizationId,
35932
- 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
35933
35319
  }
35934
35320
  }));
35935
35321
  }
@@ -35937,7 +35323,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
35937
35323
  }]);
35938
35324
  }();
35939
35325
 
35940
- var LOG$5 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
35326
+ var LOG$6 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
35941
35327
  var ViewPointHandler = /*#__PURE__*/function () {
35942
35328
  function ViewPointHandler() {
35943
35329
  _classCallCheck__default["default"](this, ViewPointHandler);
@@ -36160,22 +35546,22 @@ var ViewPointHandler = /*#__PURE__*/function () {
36160
35546
  var roomListObj = JSON.parse(roomlist);
36161
35547
  var roomIsSel = true;
36162
35548
  for (var roomCodex in roomListObj) {
36163
- LOG$5.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
35549
+ LOG$6.debug('Successfully Init roomList with Codex ' + roomCodex, 'ViewPointHandler - initRoomList');
36164
35550
  var curRoom = roomListObj[roomCodex];
36165
35551
  var mainCategory = '#WG#';
36166
35552
  if (!this.staticRoomMainCategories.has(roomCodex)) {
36167
- 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!', {
36168
35554
  code: 'WC_0013'
36169
35555
  }));
36170
35556
  } else {
36171
35557
  var categories = this.staticRoomMainCategories.get(roomCodex);
36172
35558
  if (categories.length == 0) {
36173
- 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!', {
36174
35560
  code: 'WC_0013'
36175
35561
  }));
36176
35562
  } else {
36177
35563
  if (categories.length > 1) {
36178
- 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!', {
36179
35565
  code: 'WC_0013'
36180
35566
  }));
36181
35567
  }
@@ -36189,7 +35575,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36189
35575
  previewUrl = previewUrl.replace('#WG#', mainCategory);
36190
35576
  }
36191
35577
  if (curRoom.VP[i].R && curRoom.VP[i].R.indexOf(':') == -1) {
36192
- 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, {
36193
35579
  code: 'WC_0013'
36194
35580
  }));
36195
35581
  }
@@ -36287,7 +35673,7 @@ var ViewPointHandler = /*#__PURE__*/function () {
36287
35673
  this.navInfo3D.rotVert = 0;
36288
35674
  this.navInfo3D.rotHori = 0;
36289
35675
  } else {
36290
- LOG$5.debug('There is no static frontend viewpoint room: ' + roomCodex);
35676
+ LOG$6.debug('There is no static frontend viewpoint room: ' + roomCodex);
36291
35677
  }
36292
35678
  } else if (this.curRoomCodex == roominfo.codex) {
36293
35679
  roominfo.sel = false;
@@ -36432,207 +35818,415 @@ var ViewPointHandler = /*#__PURE__*/function () {
36432
35818
  }]);
36433
35819
  }();
36434
35820
 
36435
- 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; }
36436
- 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; }
36437
- var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
36438
- var DivaMediaServiceHandler = /*#__PURE__*/function () {
36439
- //-------------------------------------------------- INITIALIZATION--------------------------------------------------------------//
36440
-
36441
- function DivaMediaServiceHandler() {
36442
- _classCallCheck__default["default"](this, DivaMediaServiceHandler);
36443
- _defineProperty__default["default"](this, "organizationId", void 0);
36444
- _defineProperty__default["default"](this, "mediaServiceUrl", void 0);
36445
- _defineProperty__default["default"](this, "mediaServiceApiKey", void 0);
36446
- _defineProperty__default["default"](this, "jwt", void 0);
36447
- _defineProperty__default["default"](this, "POST_saveTmp2PermanentPostfix", '/saveTmp2Permanent');
36448
- _defineProperty__default["default"](this, "GET_MediaItemrefs", '/v1/mediaitems/refs?limit=20&skip=0&filter=');
36449
- _defineProperty__default["default"](this, "POST_mediaItem", '/v1/mediaitems?ref=true');
36450
- this.organizationId = '';
36451
- this.mediaServiceUrl = '';
36452
- 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;
36453
35875
  }
36454
- return _createClass__default["default"](DivaMediaServiceHandler, [{
36455
- key: "setOrganizationId",
36456
- value: function setOrganizationId(organizationId) {
36457
- 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;
36458
35899
  }
36459
35900
  }, {
36460
- key: "setMediaServiceUrl",
36461
- value: function setMediaServiceUrl(mediaServiceUrl) {
36462
- 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'];
36463
35907
  }
36464
35908
  }, {
36465
- key: "setMediaServiceApiKey",
36466
- value: function setMediaServiceApiKey(mediaServiceApiKey) {
36467
- this.mediaServiceApiKey = mediaServiceApiKey;
35909
+ key: "getHasStaticBackground",
35910
+ value: function getHasStaticBackground() {
35911
+ return this.hasStaticBackground;
36468
35912
  }
36469
35913
  }, {
36470
- key: "setJwt",
36471
- value: function setJwt(jwt) {
36472
- this.jwt = jwt;
35914
+ key: "getIsFullscreenRendering",
35915
+ value: function getIsFullscreenRendering() {
35916
+ return this.isFullscreenRendering;
36473
35917
  }
36474
35918
  }, {
36475
- key: "loadRenderingFromCache",
36476
- value: function () {
36477
- var _loadRenderingFromCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(hash) {
36478
- var logOnError,
36479
- url,
36480
- response,
36481
- error,
36482
- result,
36483
- _args = arguments;
36484
- return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
36485
- while (1) switch (_context.prev = _context.next) {
36486
- case 0:
36487
- logOnError = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
36488
- LOG$4.startTransaction({
36489
- event: 'onRequestRendering',
36490
- message: 'Requesting Rendering',
36491
- eventId: 'ON_REQUEST_RENDERING',
36492
- warningTime: 2000,
36493
- errorTime: 4000,
36494
- labels: {}
36495
- });
36496
- url = this.mediaServiceUrl + this.GET_MediaItemrefs + '%5B%7Bhash%2Ceq%2C' + hash + '%7D%2C%7BorganizationId%2Ceq%2C' + this.organizationId + '%7D%5D';
36497
- LOG$4.debug('Try load Rendering from Cache. hash: ' + hash);
36498
- _context.next = 6;
36499
- return fetch(url, {
36500
- method: 'GET',
36501
- mode: 'cors',
36502
- headers: _objectSpread$7({}, this.jwt ? {
36503
- authorization: "Bearer ".concat(this.jwt)
36504
- } : {
36505
- 'X-API-KEY': this.mediaServiceApiKey
36506
- })
36507
- });
36508
- case 6:
36509
- response = _context.sent;
36510
- error = false;
36511
- if (!response.ok) {
36512
- _context.next = 20;
36513
- break;
36514
- }
36515
- _context.next = 11;
36516
- return response.json();
36517
- case 11:
36518
- result = _context.sent;
36519
- if (!(result.data.length > 0)) {
36520
- _context.next = 17;
36521
- break;
36522
- }
36523
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36524
- return _context.abrupt("return", result.data[0].url);
36525
- case 17:
36526
- error = true;
36527
- case 18:
36528
- _context.next = 21;
36529
- break;
36530
- case 20:
36531
- error = true;
36532
- case 21:
36533
- if (error && logOnError) {
36534
- LOG$4.errorTransaction('ON_REQUEST_RENDERING', 'WC_0015', 'loadRenderingFromCache not found (functionType C3D). Load rendering from Cache not successfull. Hash: ' + hash + 'response: ' + response);
36535
- }
36536
- LOG$4.successTransaction('ON_REQUEST_RENDERING', {});
36537
- return _context.abrupt("return", '');
36538
- case 24:
36539
- case "end":
36540
- return _context.stop();
36541
- }
36542
- }, _callee, this);
36543
- }));
36544
- function loadRenderingFromCache(_x) {
36545
- 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;
36546
35955
  }
36547
- return loadRenderingFromCache;
36548
- }()
35956
+ }
36549
35957
  }, {
36550
- key: "base64ToBlob",
36551
- value: function base64ToBlob(base64String, hash) {
36552
- DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler base64ToBlob');
36553
- if (base64String.startsWith('data:image/jpeg;base64,')) {
36554
- 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'];
36555
35971
  }
36556
- var binary_string = window.atob(base64String);
36557
- var len = binary_string.length;
36558
- var bytes = new Uint8Array(len);
36559
- for (var i = 0; i < len; i++) {
36560
- 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) + ' ';
36561
35976
  }
36562
- var blob = new File([bytes.buffer], hash + '.jpg', {
36563
- type: 'image/jpeg'
36564
- });
36565
- DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler base64ToBlob');
36566
- return blob;
35977
+ return {
35978
+ points: points,
35979
+ avgCamDist: avgCamDist
35980
+ };
36567
35981
  }
35982
+
35983
+ //Left/Right_Bottom/Top_Back/Front
36568
35984
  }, {
36569
- key: "savePlanning2DPermanent",
36570
- value: function () {
36571
- var _savePlanning2DPermanent = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(hash, catalogCodex, catalogGUID, planning2DAsJPG) {
36572
- var imageBlob, url, data, mediaItem, mediaItemRef, response, res;
36573
- return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
36574
- while (1) switch (_context2.prev = _context2.next) {
36575
- case 0:
36576
- DivaUtils__default["default"].startSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36577
- imageBlob = this.base64ToBlob(planning2DAsJPG, hash);
36578
- url = this.mediaServiceUrl + this.POST_mediaItem; //push media item return url
36579
- //create media item ref and set same paramters
36580
- data = new FormData();
36581
- data.append('file', imageBlob);
36582
- mediaItem = {
36583
- organizationId: this.organizationId,
36584
- mediaType: 'PCT',
36585
- fileName: hash + '.jpg'
36586
- };
36587
- data.append('mediaItem', JSON.stringify(mediaItem));
36588
- mediaItemRef = {
36589
- functionType: 'P2D',
36590
- planningHash: hash,
36591
- catalogCodex: catalogCodex,
36592
- catalogGuid: catalogGUID
36593
- };
36594
- data.append('mediaItemRef', JSON.stringify(mediaItemRef));
36595
- _context2.next = 11;
36596
- return fetch(url, {
36597
- method: 'POST',
36598
- body: data,
36599
- headers: {
36600
- 'X-API-KEY': this.mediaServiceApiKey
36601
- }
36602
- });
36603
- case 11:
36604
- response = _context2.sent;
36605
- if (!response.ok) {
36606
- _context2.next = 20;
36607
- break;
36608
- }
36609
- _context2.next = 15;
36610
- return response.json();
36611
- case 15:
36612
- res = _context2.sent;
36613
- LOG$4.debug('Successfully saved 2D Planning in media Service. URL: ' + res.url);
36614
- return _context2.abrupt("return", res.url);
36615
- case 20:
36616
- LOG$4.error(new DivaUtils.DivaError('Error when saving the Planning2D image on mediaService. Hash: ' + hash + 'response: ' + response, {
36617
- code: 'WC_0016'
36618
- }));
36619
- case 21:
36620
- DivaUtils__default["default"].endSpanOfApm('MediaServiceHandler savePlanning2DPermanent');
36621
- return _context2.abrupt("return", '');
36622
- case 23:
36623
- case "end":
36624
- return _context2.stop();
36625
- }
36626
- }, _callee2, this);
36627
- }));
36628
- function savePlanning2DPermanent(_x2, _x3, _x4, _x5) {
36629
- 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
+ }
36630
35996
  }
36631
- return savePlanning2DPermanent;
36632
- }()
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
+ }
36633
36228
  }]);
36634
36229
  }();
36635
- var mediaServiceHandler = new DivaMediaServiceHandler();
36636
36230
 
36637
36231
  var RenderSettings = /*#__PURE__*/function () {
36638
36232
  function RenderSettings() {
@@ -36653,9 +36247,6 @@ var RenderSettings = /*#__PURE__*/function () {
36653
36247
  _defineProperty__default["default"](this, "applicationName", void 0);
36654
36248
  _defineProperty__default["default"](this, "divaMediaServiceUrl", void 0);
36655
36249
  _defineProperty__default["default"](this, "renderGroup", void 0);
36656
- _defineProperty__default["default"](this, "useSirvViewer", void 0);
36657
- _defineProperty__default["default"](this, "useMediaServiceImageCache", void 0);
36658
- _defineProperty__default["default"](this, "suppressCacheCreation", void 0);
36659
36250
  this.organizationId = '';
36660
36251
  this.diva3DServerURL = '';
36661
36252
  this.userID = '';
@@ -36664,9 +36255,6 @@ var RenderSettings = /*#__PURE__*/function () {
36664
36255
  this.applicationName = '';
36665
36256
  this.divaMediaServiceUrl = '';
36666
36257
  this.renderGroup = '';
36667
- this.useSirvViewer = false;
36668
- this.useMediaServiceImageCache = false;
36669
- this.suppressCacheCreation = false;
36670
36258
  }
36671
36259
  return _createClass__default["default"](RenderSettings, [{
36672
36260
  key: "OrganizationId",
@@ -36732,30 +36320,6 @@ var RenderSettings = /*#__PURE__*/function () {
36732
36320
  set: function set(group) {
36733
36321
  this.renderGroup = group;
36734
36322
  }
36735
- }, {
36736
- key: "UseSirvViewer",
36737
- get: function get() {
36738
- return this.useSirvViewer;
36739
- },
36740
- set: function set(viewer) {
36741
- this.useSirvViewer = viewer;
36742
- }
36743
- }, {
36744
- key: "UseMediaServiceImageCache",
36745
- get: function get() {
36746
- return this.useMediaServiceImageCache;
36747
- },
36748
- set: function set(cache) {
36749
- this.useMediaServiceImageCache = cache;
36750
- }
36751
- }, {
36752
- key: "SuppressCacheCreation",
36753
- get: function get() {
36754
- return this.suppressCacheCreation;
36755
- },
36756
- set: function set(cache) {
36757
- this.suppressCacheCreation = cache;
36758
- }
36759
36323
  }]);
36760
36324
  }();
36761
36325
  /*
@@ -36804,7 +36368,7 @@ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t
36804
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; } } }; }
36805
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; } }
36806
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; }
36807
- var LOG$3 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
36371
+ var LOG$4 = DivaUtils__default["default"].initLog('Planner', 'PLANNER-HANDLER-3D');
36808
36372
  var PlannerHandler3D = /*#__PURE__*/function () {
36809
36373
  //-------------------------------------------------Initialization---------------------------------------------------------------
36810
36374
 
@@ -36922,12 +36486,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
36922
36486
  };
36923
36487
  }
36924
36488
  return _createClass__default["default"](PlannerHandler3D, [{
36925
- key: "doUseRealtimeRendering",
36926
- value: function doUseRealtimeRendering() {
36927
- if (this.renderSettings.SuppressCacheCreation && this.renderSettings.UseMediaServiceImageCache) return false;
36928
- return true;
36929
- }
36930
- }, {
36931
36489
  key: "setJwt",
36932
36490
  value: function setJwt(jwt) {
36933
36491
  this.jwt = jwt;
@@ -37047,9 +36605,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37047
36605
  }
37048
36606
  this.renderSettings.DivaMediaServiceUrl = params.divaMediaServiceUrl;
37049
36607
  this.renderSettings.OrganizationId = params.organizationId;
37050
- this.renderSettings.UseSirvViewer = params.useSirvViewer;
37051
- this.renderSettings.UseMediaServiceImageCache = params.useMediaServiceImageCache;
37052
- this.renderSettings.SuppressCacheCreation = params.suppressCacheCreation;
37053
36608
  this.liveArViewerUrl = params.arViewerUrl;
37054
36609
  return result;
37055
36610
  }
@@ -37062,21 +36617,16 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37062
36617
  return _regeneratorRuntime__default["default"].wrap(function _callee3$(_context3) {
37063
36618
  while (1) switch (_context3.prev = _context3.next) {
37064
36619
  case 0:
37065
- if (!this.doUseRealtimeRendering()) {
37066
- _context3.next = 7;
37067
- break;
37068
- }
37069
- _context3.next = 3;
37070
- return Promise.resolve().then(function () { return require('./Host3DSignalR-973eb29d.js'); });
37071
- case 3:
36620
+ _context3.next = 2;
36621
+ return Promise.resolve().then(function () { return require('./Host3DSignalR-e6cae920.js'); });
36622
+ case 2:
37072
36623
  _yield$import = _context3.sent;
37073
36624
  Host3DSignalR = _yield$import["default"];
37074
36625
  this.connectionHandler = new Host3DSignalR(this.renderSettings, this);
37075
- LOG$3.debug('initializeConnection to Host3DSignalR');
37076
- case 7:
37077
- _context3.next = 9;
36626
+ LOG$4.debug('initializeConnection to Host3DSignalR');
36627
+ _context3.next = 8;
37078
36628
  return (_this$connectionHandl2 = this.connectionHandler) === null || _this$connectionHandl2 === void 0 ? void 0 : _this$connectionHandl2.initializeConnection();
37079
- case 9:
36629
+ case 8:
37080
36630
  case "end":
37081
36631
  return _context3.stop();
37082
36632
  }
@@ -37139,7 +36689,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37139
36689
  value: function onConnectedToDivaNr(status) {
37140
36690
  //Check if request3D has to be called againe
37141
36691
  if (status != 'SUCCESSFULL' || !this.todoAfterLogin.request3D.doRequest3D) return;
37142
- 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');
37143
36693
  this.todoAfterLogin.request3D.doRequest3D = false;
37144
36694
  this.request3D(this.todoAfterLogin.request3D.params);
37145
36695
  this.todoAfterLogin.request3D.params = undefined;
@@ -37193,36 +36743,36 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37193
36743
  * @param buffer
37194
36744
  */
37195
36745
  function handleReceiveRendering(params) {
37196
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
36746
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; SameMode: ' + params.saveMode);
37197
36747
  var isLayerMask = params.hash.endsWith('_m') ? true : false;
37198
36748
  params.hash = isLayerMask ? params.hash.substring(0, params.hash.length - 2) : params.hash;
37199
36749
  var cachedRendering = this.getRenderingFromCache(params.hash);
37200
36750
  var waitedRendering = this.getWaitForRendering(params.hash);
37201
36751
  if (!cachedRendering && !waitedRendering) {
37202
- 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));
37203
36753
  return;
37204
36754
  }
37205
36755
  if (waitedRendering) {
37206
- LOG$3.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
36756
+ LOG$4.debug('handleReceiveRendering ' + params.hash + '; Found in waitForRenderings');
37207
36757
  //If the last requested rendering was in another saving mode than the received rendering - do nothing and wait for the correct rendering
37208
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') {
37209
- 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');
37210
36760
  return;
37211
36761
  }
37212
36762
  if (params.url && waitedRendering.MediaServiceSaveMode == 'PERMANENT') {
37213
36763
  waitedRendering.UrlToSavedRendering = params.url;
37214
- LOG$3.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
36764
+ LOG$4.debug('handleReceiveRendering Set lastSavedRendering URL ' + params.url);
37215
36765
  }
37216
- 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);
37217
36767
 
37218
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
37219
36769
 
37220
- 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);
37221
36771
  return;
37222
36772
  }
37223
36773
  if (params.url) {
37224
36774
  //If several renderings of the same hash are requested contemoranely (first Stream then TEMP). Then save the tempURL in the rendering
37225
- LOG$3.debug('handleReceiveRendering load from cache');
36775
+ LOG$4.debug('handleReceiveRendering load from cache');
37226
36776
  cachedRendering.UrlToSavedRendering = params.url;
37227
36777
  }
37228
36778
  }
@@ -37253,10 +36803,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37253
36803
  }, {
37254
36804
  key: "checkRenderingReady",
37255
36805
  value: function checkRenderingReady(hash, rendering) {
37256
- if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded && !rendering.IsLoadedFromCache) return false;
36806
+ if (!rendering.AllImgLoaded || !rendering.UiInfoLoaded) return false;
37257
36807
  this.waitForRenderings["delete"](hash);
37258
36808
  this.renderCache.set(hash, rendering);
37259
- LOG$3.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
36809
+ LOG$4.debug('Send to view. CurrentHash: ' + hash + '; lastRequestedHash: ' + this.lastRequestedRenderHash);
37260
36810
  return true;
37261
36811
  }
37262
36812
  /**
@@ -37271,7 +36821,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37271
36821
  this.waitForRenderings["delete"](hash);
37272
36822
  return false;
37273
36823
  }
37274
- 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');
37275
36825
  return true;
37276
36826
  }
37277
36827
  }, {
@@ -37283,7 +36833,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37283
36833
  this.waitForHQRenderScript["delete"](hash);
37284
36834
  return false;
37285
36835
  }
37286
- 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');
37287
36837
  return true;
37288
36838
  }
37289
36839
 
@@ -37305,10 +36855,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37305
36855
  result.renderHeight = curRoomListVP.backgroundImg_Height;
37306
36856
  result.renderHeight = result.renderHeight * 1.3;
37307
36857
  result.renderWidth = result.renderWidth * 1.3;
37308
- } else if (this.renderSettings.UseMediaServiceImageCache) {
37309
- //Force the size of the rendering to be a standard size
37310
- result.renderWidth = this.renderSettings.CACHE_16_9_RENDER_WIDTH;
37311
- result.renderHeight = this.renderSettings.CACHE_16_9_RENDER_HEIGHT;
37312
36858
  } else if (mediaServiceSaveMode == 'PERMANENT') {
37313
36859
  //SAVE with correct Resolution
37314
36860
  result.renderWidth = this.renderSettings.SAVE_16_9_RENDER_WIDTH;
@@ -37352,7 +36898,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37352
36898
  return _regeneratorRuntime__default["default"].wrap(function _callee5$(_context5) {
37353
36899
  while (1) switch (_context5.prev = _context5.next) {
37354
36900
  case 0:
37355
- 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));
37356
36902
  if (!(this.lastSavedRendering == undefined)) {
37357
36903
  _context5.next = 3;
37358
36904
  break;
@@ -37367,7 +36913,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37367
36913
  _context5.next = 12;
37368
36914
  break;
37369
36915
  }
37370
- LOG$3.debug('getLAstSavedRendering - wait here');
36916
+ LOG$4.debug('getLAstSavedRendering - wait here');
37371
36917
  _context5.next = 8;
37372
36918
  return this.delay(100);
37373
36919
  case 8:
@@ -37521,20 +37067,20 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37521
37067
  value: (function () {
37522
37068
  var _request3D = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee7(params) {
37523
37069
  var _params$renderRequest, _params$renderRequest2, _params$renderRequest3, _params$renderRequest4, _params$renderRequest5, _params$renderRequest6, _this$viewPointHandle;
37524
- 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;
37525
37071
  return _regeneratorRuntime__default["default"].wrap(function _callee7$(_context7) {
37526
37072
  while (1) switch (_context7.prev = _context7.next) {
37527
37073
  case 0:
37528
- if (!(this.doUseRealtimeRendering() && this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37074
+ if (!(this.connectionHandler && (!this.connectionHandler.getConnectionReady() || !this.connectionHandler.getSuccessfullyJoinedToDivaNr()))) {
37529
37075
  _context7.next = 5;
37530
37076
  break;
37531
37077
  }
37532
- LOG$3.debug('RequestRendering - but connection Not Ready');
37078
+ LOG$4.debug('RequestRendering - but connection Not Ready');
37533
37079
  this.todoAfterLogin.request3D.params = params;
37534
37080
  this.todoAfterLogin.request3D.doRequest3D = true;
37535
37081
  return _context7.abrupt("return");
37536
37082
  case 5:
37537
- 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');
37538
37084
  room = this.viewPointHandler.getCurRoomCodex();
37539
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);
37540
37086
  doReloadWholePlanning = true;
@@ -37553,103 +37099,63 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37553
37099
  this.lastFramePlanningHash = planningHash;
37554
37100
  requestRenderingFrom3DHost = false;
37555
37101
  requestHqRenderScriptFrom3DHost = false;
37556
- if (!params.doRequestHqRenderScript) {
37557
- _context7.next = 23;
37558
- break;
37559
- }
37560
- if (this.doUseRealtimeRendering()) {
37561
- _context7.next = 21;
37562
- break;
37563
- }
37564
- LOG$3.error(new DivaUtils.DivaError('Requesting hqRenderScript is only supported when using real time rendering'));
37565
- return _context7.abrupt("return");
37566
- case 21:
37567
- rendering = this.hqRenderScriptCache.get(planningHash);
37568
- if (rendering) {
37569
- LOG$3.debug('Get HQRenderScript from cache');
37570
- this.lastSavedHQRenderScript = JSON.parse(rendering.HQRenderScript);
37571
- this.updatePlannerHqRenderScriptInView(rendering);
37572
- this.sendARRenderScript(rendering);
37573
- params.doRequestHqRenderScript = false;
37574
- } else {
37575
- if (!this.checkWaitForHQRenderScript(planningHash)) {
37576
- requestHqRenderScriptFrom3DHost = true;
37577
- this.waitForHQRenderScript.set(planningHash, new HQRenderScript('PLACEHOLDER'));
37578
- //If a new HQRenderscript has to be loaded - always reload planning
37579
- 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
+ }
37580
37117
  }
37581
37118
  }
37582
- case 23:
37583
37119
  renderHash = '';
37584
37120
  viewPointName = '';
37585
37121
  functionType = 'P3D';
37586
- if (!params.doRequestRendering) {
37587
- _context7.next = 54;
37588
- break;
37589
- }
37590
- viewPointName = this.viewPointHandler.getCurViewPointToRender();
37591
- sizeInfo = params.renderRequestInfos.width + ':' + params.renderRequestInfos.height;
37592
- 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));
37593
- this.lastRequestedRenderHash = renderHash;
37594
- LOG$3.debug('Request New Rendering with hash ' + renderHash + '; and planningHash: ' + planningHash, 'PlannerHandler3D');
37595
- if (this.doUseRealtimeRendering()) {
37596
- _context7.next = 40;
37597
- break;
37598
- }
37599
- 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
37600
- _context7.next = 36;
37601
- 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);
37602
- case 36:
37603
- renderingFoundInCache = _context7.sent;
37604
- if (!renderingFoundInCache) LOG$3.debug('Cached rendering not found ' + renderHash);
37605
- _context7.next = 54;
37606
- break;
37607
- case 40:
37608
- if (!this.checkIsRenderingCached(renderHash, params.renderRequestInfos.planner3DGridEnabled, params.renderRequestInfos.mediaServiceSaveMode)) {
37609
- _context7.next = 47;
37610
- break;
37611
- }
37612
- //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.
37613
- //When the client then rotates - nothing changes in the hash - but the exe loads 2 elements.
37614
- LOG$3.debug('Load Rendering from Cache with hash ' + renderHash, 'PlannerHandler3D');
37615
- this.lastFramePlanningHash = '';
37616
- _rendering = this.getRenderingFromCache(renderHash); //check if current rendering is fullscreenrendering
37617
- if ((!params.renderRequestInfos.planner3DGridEnabled || _rendering !== null && _rendering !== void 0 && _rendering.getHasLayerMask()) && !this.onlyRunLogic) {
37618
- if (params.renderRequestInfos.isFullscreenRendering != (_rendering === null || _rendering === void 0 ? void 0 : _rendering.getIsFullscreenRendering())) {
37619
- fullscreenRendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'PERMANENT', undefined);
37620
- fullscreenRendering.clone(_rendering);
37621
- fullscreenRendering.setIsFullscreenRendering(params.renderRequestInfos.isFullscreenRendering);
37622
- this.updatePlannerRendering(fullscreenRendering); //load the rendering as fullscreen image
37623
- 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
+ }
37624
37147
  } else {
37625
- this.updatePlannerRendering(_rendering); //lade einfach
37626
- params.doRequestRendering = false;
37627
- LOG$3.debug('Do load rendering from cache with renderHash: ' + renderHash);
37628
- }
37629
- }
37630
- _context7.next = 54;
37631
- break;
37632
- case 47:
37633
- renderingInCacheFound = false;
37634
- if (!(this.renderSettings.UseMediaServiceImageCache && this.viewPointHandler.getCurVPIsStart())) {
37635
- _context7.next = 53;
37636
- break;
37637
- }
37638
- _productHash = this.getProductHash(params.planningData);
37639
- _context7.next = 52;
37640
- 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);
37641
- case 52:
37642
- renderingInCacheFound = _context7.sent;
37643
- case 53:
37644
- if (!this.renderSettings.UseMediaServiceImageCache || !renderingInCacheFound) {
37645
- if (!this.checkWaitForImage(renderHash)) {
37646
- requestRenderingFrom3DHost = true;
37647
- 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
+ }
37648
37155
  }
37649
37156
  }
37650
- case 54:
37651
37157
  if (!(requestHqRenderScriptFrom3DHost || requestRenderingFrom3DHost)) {
37652
- _context7.next = 63;
37158
+ _context7.next = 31;
37653
37159
  break;
37654
37160
  }
37655
37161
  if (params.catalogData.lang) params.planningData.SCE.Lang = params.catalogData.lang;
@@ -37667,7 +37173,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37667
37173
  height: params.renderRequestInfos.height,
37668
37174
  isFullscreenRendering: params.renderRequestInfos.isFullscreenRendering,
37669
37175
  hasDimensionLines: params.renderRequestInfos.doShow3DDimensionLines,
37670
- plannerMeasureDigits: (_plannerMeasureDigits3 = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits3 !== void 0 ? _plannerMeasureDigits3 : 0,
37176
+ plannerMeasureDigits: (_plannerMeasureDigits = params.renderRequestInfos.plannerMeasureDigits) !== null && _plannerMeasureDigits !== void 0 ? _plannerMeasureDigits : 0,
37671
37177
  planner3DGridEnabled: params.renderRequestInfos.planner3DGridEnabled,
37672
37178
  mediaServiceSaveMode: params.renderRequestInfos.mediaServiceSaveMode,
37673
37179
  functionType: functionType,
@@ -37682,14 +37188,14 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37682
37188
  });
37683
37189
  if (params.camera) this.latestCamera = params.camera;
37684
37190
  if (!(returnRequest === undefined || requestHqRenderScriptFrom3DHost && returnRequest.hqRenderScript == undefined || requestRenderingFrom3DHost && returnRequest.rendering == undefined)) {
37685
- _context7.next = 61;
37191
+ _context7.next = 29;
37686
37192
  break;
37687
37193
  }
37688
- 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, {
37689
37195
  code: 'WC_0013'
37690
37196
  }));
37691
37197
  return _context7.abrupt("return");
37692
- case 61:
37198
+ case 29:
37693
37199
  if (requestHqRenderScriptFrom3DHost) {
37694
37200
  if (this.waitForHQRenderScript.has(planningHash)) this.waitForHQRenderScript["delete"](planningHash);
37695
37201
  this.waitForHQRenderScript.set(planningHash, returnRequest.hqRenderScript);
@@ -37701,7 +37207,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37701
37207
  if (returnRequest.rendering.getIsAlternateRendering()) this.addAlternateRenderingToSavedAlternateRenderings(returnRequest.rendering);else this.lastSavedRendering = returnRequest.rendering;
37702
37208
  }
37703
37209
  }
37704
- case 63:
37210
+ case 31:
37705
37211
  case "end":
37706
37212
  return _context7.stop();
37707
37213
  }
@@ -37754,70 +37260,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37754
37260
  });
37755
37261
  if (index === -1) this.lastSavedAlternateRenderings.push(rendering);else this.lastSavedAlternateRenderings[index] = rendering;
37756
37262
  }
37757
-
37758
- /**
37759
- * This function handles to load a rendering from the cache
37760
- * @param hash
37761
- * @param viewPointName
37762
- * @param width
37763
- * @param height
37764
- * @param isFullscreenRendering
37765
- *
37766
- * @returns true, if the rendering was found in the cache
37767
- */
37768
- }, {
37769
- key: "requestRenderingCache",
37770
- value: (function () {
37771
- var _requestRenderingCache = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee8(planningHash, renderHash, productHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, catalogData, alternateRenderingsExist, alternateRendererInfo) {
37772
- var renderingInCacheFound, rendering, promises, _yield$Promise$all, _yield$Promise$all2, urlRenderingCache, urlARCache, doUpdateRendering;
37773
- return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
37774
- while (1) switch (_context8.prev = _context8.next) {
37775
- case 0:
37776
- renderingInCacheFound = false;
37777
- if (this.waitForRenderings.has(renderHash)) {
37778
- _context8.next = 12;
37779
- break;
37780
- }
37781
- rendering = new Rendering(planningHash, renderHash, viewPointName, width, height, isFullscreenRendering, hasDimensionLines, plannerMeasureDigits, false, false, 'PERMANENT', alternateRenderingsExist, alternateRendererInfo);
37782
- this.waitForRenderings.set(renderHash, rendering);
37783
- //Try load image from cache
37784
- promises = [mediaServiceHandler.loadRenderingFromCache(renderHash), mediaServiceHandler.loadRenderingFromCache(productHash, false)];
37785
- _context8.next = 7;
37786
- return Promise.all(promises);
37787
- case 7:
37788
- _yield$Promise$all = _context8.sent;
37789
- _yield$Promise$all2 = _slicedToArray__default["default"](_yield$Promise$all, 2);
37790
- urlRenderingCache = _yield$Promise$all2[0];
37791
- urlARCache = _yield$Promise$all2[1];
37792
- if (urlRenderingCache || urlARCache) {
37793
- renderingInCacheFound = true;
37794
- if (urlRenderingCache) {
37795
- rendering.setHQRenderingUrl(urlRenderingCache, this.renderSettings.UseSirvViewer);
37796
- rendering.UrlToSavedRendering = rendering.getHQRenderingURL();
37797
- }
37798
- if (urlARCache) rendering.setArUrl(urlARCache);
37799
- rendering.IsLoadedFromCache = true;
37800
- rendering.CatalogCodex = catalogData.catalogCodex;
37801
- rendering.CatalogGUID = catalogData.catalogGUID;
37802
- LOG$3.debug('The rendering is loaded from the MediaServiceCache: ' + urlRenderingCache);
37803
- doUpdateRendering = this.checkRenderingReady(renderHash, rendering);
37804
- if (doUpdateRendering) this.updatePlannerRendering(rendering);
37805
- } else {
37806
- this.waitForRenderings["delete"](renderHash);
37807
- }
37808
- case 12:
37809
- return _context8.abrupt("return", renderingInCacheFound);
37810
- case 13:
37811
- case "end":
37812
- return _context8.stop();
37813
- }
37814
- }, _callee8, this);
37815
- }));
37816
- function requestRenderingCache(_x6, _x7, _x8, _x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16, _x17) {
37817
- return _requestRenderingCache.apply(this, arguments);
37818
- }
37819
- return requestRenderingCache;
37820
- }())
37821
37263
  }, {
37822
37264
  key: "handleStaticVP",
37823
37265
  value: function handleStaticVP(vpCodex) {
@@ -37921,20 +37363,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37921
37363
  value: function getStaticRoomListItems() {
37922
37364
  return this.viewPointHandler.getStaticRoomList();
37923
37365
  }
37924
-
37925
- /**
37926
- * Clears the whole renderCache and sets the current rendering and the lastSavedRendering to undefined
37927
- */
37928
- }, {
37929
- key: "clearRenderCache",
37930
- value: function clearRenderCache() {
37931
- LOG$3.debug('PlannerHandler3D clearRenderCache');
37932
- this.renderCache.clear();
37933
- this.currRendering = undefined;
37934
- this.lastSavedRendering = undefined;
37935
- this.lastSavedAlternateRenderings = undefined;
37936
- this.hqRenderScriptCache.clear();
37937
- }
37938
37366
  }, {
37939
37367
  key: "clearCurrentRendering",
37940
37368
  value: function clearCurrentRendering() {
@@ -37963,11 +37391,6 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37963
37391
  value: function checkIsWaitingForHQRenderScript() {
37964
37392
  return this.waitForHQRenderScript.size > 0;
37965
37393
  }
37966
- }, {
37967
- key: "getUseMediaServiceImageCache",
37968
- value: function getUseMediaServiceImageCache() {
37969
- return this.renderSettings.UseMediaServiceImageCache;
37970
- }
37971
37394
  }, {
37972
37395
  key: "setOrigConfigurationCallback",
37973
37396
  value: function setOrigConfigurationCallback(callback) {
@@ -37981,19 +37404,19 @@ var PlannerHandler3D = /*#__PURE__*/function () {
37981
37404
  }, {
37982
37405
  key: "openARObserverConnection",
37983
37406
  value: function () {
37984
- 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) {
37985
37408
  var _this2 = this;
37986
- return _regeneratorRuntime__default["default"].wrap(function _callee10$(_context10) {
37987
- while (1) switch (_context10.prev = _context10.next) {
37409
+ return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
37410
+ while (1) switch (_context9.prev = _context9.next) {
37988
37411
  case 0:
37989
- return _context10.abrupt("return", new Promise( /*#__PURE__*/function () {
37990
- 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) {
37991
37414
  var socketUrl;
37992
- return _regeneratorRuntime__default["default"].wrap(function _callee9$(_context9) {
37993
- while (1) switch (_context9.prev = _context9.next) {
37415
+ return _regeneratorRuntime__default["default"].wrap(function _callee8$(_context8) {
37416
+ while (1) switch (_context8.prev = _context8.next) {
37994
37417
  case 0:
37995
37418
  if (_this2.liveArViewerUrl) {
37996
- _context9.next = 2;
37419
+ _context8.next = 2;
37997
37420
  break;
37998
37421
  }
37999
37422
  throw new Error('No Live AR Viewer URL set');
@@ -38009,26 +37432,26 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38009
37432
  }
38010
37433
  });
38011
37434
  _this2.liveArSocket.on('disconnect', function () {
38012
- LOG$3.error(new DivaUtils.DivaError('AR Socket disconnected'));
37435
+ LOG$4.error(new DivaUtils.DivaError('AR Socket disconnected'));
38013
37436
  });
38014
37437
  _this2.liveArSocket.on('observer-joined', function () {
38015
37438
  var _this2$liveArSocket;
38016
- LOG$3.debug('AR Observer joined');
37439
+ LOG$4.debug('AR Observer joined');
38017
37440
  _this2.liveArClientsConnected = true;
38018
37441
  var hqRenderScript = _this2.lastSavedHQRenderScript;
38019
37442
  if (hqRenderScript) (_this2$liveArSocket = _this2.liveArSocket) === null || _this2$liveArSocket === void 0 || _this2$liveArSocket.emit('update', {
38020
37443
  hqRenderScript: JSON.stringify(hqRenderScript)
38021
37444
  });else {
38022
- LOG$3.debug('No HQRenderScript found for observer-joined');
37445
+ LOG$4.debug('No HQRenderScript found for observer-joined');
38023
37446
  handleNoHqrs();
38024
37447
  }
38025
37448
  });
38026
37449
  _this2.liveArSocket.on('observer-left', function () {
38027
- LOG$3.debug('AR Observer left');
37450
+ LOG$4.debug('AR Observer left');
38028
37451
  _this2.liveArClientsConnected = false;
38029
37452
  });
38030
37453
  _this2.liveArSocket.on('connected', function (data) {
38031
- LOG$3.debug('AR Socket connected ' + data.connectionId);
37454
+ LOG$4.debug('AR Socket connected ' + data.connectionId);
38032
37455
  _this2.liveArSocket.auth = _objectSpread$6(_objectSpread$6({}, _this2.liveArSocket.auth), {}, {
38033
37456
  connectionId: data.connectionId
38034
37457
  });
@@ -38042,21 +37465,21 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38042
37465
  }
38043
37466
  case 3:
38044
37467
  case "end":
38045
- return _context9.stop();
37468
+ return _context8.stop();
38046
37469
  }
38047
- }, _callee9);
37470
+ }, _callee8);
38048
37471
  }));
38049
- return function (_x19, _x20) {
37472
+ return function (_x7, _x8) {
38050
37473
  return _ref.apply(this, arguments);
38051
37474
  };
38052
37475
  }()));
38053
37476
  case 1:
38054
37477
  case "end":
38055
- return _context10.stop();
37478
+ return _context9.stop();
38056
37479
  }
38057
- }, _callee10);
37480
+ }, _callee9);
38058
37481
  }));
38059
- function openARObserverConnection(_x18) {
37482
+ function openARObserverConnection(_x6) {
38060
37483
  return _openARObserverConnection.apply(this, arguments);
38061
37484
  }
38062
37485
  return openARObserverConnection;
@@ -38066,10 +37489,10 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38066
37489
  value: function sendARRenderScript(hqRenderScript) {
38067
37490
  var _this$liveArSocket;
38068
37491
  if (!this.liveArClientsConnected) {
38069
- LOG$3.debug('No AR Clients connected, dont send render script');
37492
+ LOG$4.debug('No AR Clients connected, dont send render script');
38070
37493
  return;
38071
37494
  }
38072
- LOG$3.debug('Sending AR Render Script to clients');
37495
+ LOG$4.debug('Sending AR Render Script to clients');
38073
37496
  (_this$liveArSocket = this.liveArSocket) === null || _this$liveArSocket === void 0 || _this$liveArSocket.emit('update', {
38074
37497
  hqRenderScript: hqRenderScript.HQRenderScript
38075
37498
  });
@@ -38077,6 +37500,131 @@ var PlannerHandler3D = /*#__PURE__*/function () {
38077
37500
  }]);
38078
37501
  }();
38079
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
+
38080
37628
  /**
38081
37629
  * This class saves a Bounding box. This bounding box can be of one Planner (one Set) or for several planner elements (multiple Sets)
38082
37630
  */
@@ -38411,7 +37959,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38411
37959
  key: "initPlanner",
38412
37960
  value: (function () {
38413
37961
  var _initPlanner = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(initSetState, plannerHandlerFunctions) {
38414
- var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, useSirvViewer, _initSetState$api$web, result;
37962
+ var renderGroup, diva3dServerUrl, divaMediaServiceUrl, mediaServiceApiKey, _initSetState$api$web, result;
38415
37963
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
38416
37964
  while (1) switch (_context.prev = _context.next) {
38417
37965
  case 0:
@@ -38420,8 +37968,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38420
37968
  this.plannerHandlerFunctions = plannerHandlerFunctions;
38421
37969
  diva3dServerUrl = initSetState.api.get3DServerUrl();
38422
37970
  divaMediaServiceUrl = initSetState.api.getDivaMediaServiceUrl();
38423
- mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey();
38424
- useSirvViewer = initSetState.api.getDiva3dUseSirvViewer(); //renderGroup = 'LeaTest';
37971
+ mediaServiceApiKey = initSetState.api.getDivaMediaServiceApiKey(); //renderGroup = 'LeaTest';
38425
37972
  //diva3dServerUrl = "https://test-einkauf-onboarding.pfister.ch/diva3d/diva3dhost2/";
38426
37973
  // diva3dServerUrl = "https://diva3dhost.diva-portal.com/diva3d/diva3dhost2/";
38427
37974
  //diva3dServerUrl = 'https://localhost:44315/';
@@ -38431,7 +37978,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38431
37978
  //divaMediaServiceUrl = 'https://api-test.diva-portal.com/media/';
38432
37979
  //divaMediaServiceUrl = 'http://localhost:3000';
38433
37980
  if (!(!initSetState.onlyRunLogic && !initSetState.no3DConnection)) {
38434
- _context.next = 15;
37981
+ _context.next = 14;
38435
37982
  break;
38436
37983
  }
38437
37984
  this.handler3D.initializeCallbackFunctions({
@@ -38443,34 +37990,31 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38443
37990
  this.handler3D.setJwt(initSetState.api.getJwt());
38444
37991
  //Only use if only 1 Planner/Set is used. Not possible in setPlanner
38445
37992
  result = this.handler3D.initializeAPISettings({
38446
- useMediaServiceImageCache: initSetState.api.getDiva3dUseImageCache(),
38447
- suppressCacheCreation: initSetState.api.getDiva3DSuppressCacheCreation(),
38448
37993
  renderGroup: renderGroup,
38449
37994
  diva3dServerUrl: diva3dServerUrl,
38450
37995
  divaMediaServiceUrl: divaMediaServiceUrl,
38451
37996
  organizationId: initSetState.organizationId,
38452
- useSirvViewer: useSirvViewer,
38453
37997
  arViewerUrl: (_initSetState$api$web = initSetState.api.webConfig) === null || _initSetState$api$web === void 0 ? void 0 : _initSetState$api$web.arViewerUrl
38454
37998
  });
38455
37999
  if (!(!this.handler3D.checkConnectionInitialized() || result.renderGroupChanged || result.diva3dServerUrlChanged)) {
38456
- _context.next = 14;
38000
+ _context.next = 13;
38457
38001
  break;
38458
38002
  }
38459
- _context.next = 14;
38003
+ _context.next = 13;
38460
38004
  return this.handler3D.initializeConnection();
38461
- case 14:
38005
+ case 13:
38462
38006
  if (this.divaNr != initSetState.divaNr) {
38463
38007
  this.divaNr = initSetState.divaNr;
38464
38008
  this.handler3D.joinDivaNr(this.divaNr);
38465
38009
  }
38466
- case 15:
38010
+ case 14:
38467
38011
  mediaServiceHandler.setMediaServiceUrl(divaMediaServiceUrl);
38468
38012
  mediaServiceHandler.setMediaServiceApiKey(mediaServiceApiKey);
38469
38013
  mediaServiceHandler.setOrganizationId(initSetState.organizationId);
38470
38014
  mediaServiceHandler.setJwt(initSetState.api.getJwt());
38471
38015
  this.handler3D.setOrigConfigurationCallback(this.plannerHandlerFunctions.getOrigConfiguration);
38472
38016
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initPlanner');
38473
- case 21:
38017
+ case 20:
38474
38018
  case "end":
38475
38019
  return _context.stop();
38476
38020
  }
@@ -38587,10 +38131,8 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38587
38131
  roomlistCodex,
38588
38132
  roomLists,
38589
38133
  _yield$import,
38590
- DivaSingleProductPlanner,
38591
- _yield$import2,
38592
38134
  DivaStandardPlanner,
38593
- _yield$import3,
38135
+ _yield$import2,
38594
38136
  DivaBoxPlanner,
38595
38137
  _args4 = arguments;
38596
38138
  return _regeneratorRuntime__default["default"].wrap(function _callee4$(_context4) {
@@ -38619,58 +38161,44 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
38619
38161
  }
38620
38162
  this.handler3D.initializeViewPoint(catalogData.standardWhiteroom);
38621
38163
  _context4.t0 = set.getPlannerEdition();
38622
- _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 23 : 29;
38164
+ _context4.next = _context4.t0 === 'STANDARD' ? 8 : _context4.t0 === 'BOX' ? 15 : 21;
38623
38165
  break;
38624
38166
  case 8:
38625
- if (!this.handler3D.getUseMediaServiceImageCache()) {
38626
- _context4.next = 16;
38627
- break;
38628
- }
38629
- _context4.next = 11;
38630
- return Promise.resolve().then(function () { return require('./DivaSingleProductPlanner-19811faa.js'); });
38631
- case 11:
38167
+ _context4.next = 10;
38168
+ return Promise.resolve().then(function () { return require('./DivaStandardPlanner-381861d5.js'); });
38169
+ case 10:
38632
38170
  _yield$import = _context4.sent;
38633
- DivaSingleProductPlanner = _yield$import["default"];
38634
- planner = new DivaSingleProductPlanner(set, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner());
38635
- _context4.next = 22;
38636
- break;
38637
- case 16:
38638
- _context4.next = 18;
38639
- return Promise.resolve().then(function () { return require('./DivaStandardPlanner-11d92ddc.js'); });
38640
- case 18:
38641
- _yield$import2 = _context4.sent;
38642
- DivaStandardPlanner = _yield$import2["default"];
38171
+ DivaStandardPlanner = _yield$import["default"];
38643
38172
  planner = new DivaStandardPlanner(set, this.plannerHandlerFunctions.updatePlannerMsgContainer, this.plannerIDCount, this.setPlannerHandler.getGlobalBoundingBox(), set.api.getHidePlanner(), !!set.api.getDoShowAR(), set.api.getDoDisablePlanner2D(), hasStaticBackground);
38644
38173
  if (catalogData.isIDM3DCat) {
38645
38174
  planner.initIDM3DMeta(catalogData.IDM3DCatCodex);
38646
38175
  }
38647
- case 22:
38648
- return _context4.abrupt("break", 29);
38649
- case 23:
38650
- _context4.next = 25;
38651
- return Promise.resolve().then(function () { return require('./DivaBoxPlanner-ce0b5ccf.js'); });
38652
- case 25:
38653
- _yield$import3 = _context4.sent;
38654
- 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"];
38655
38183
  planner = new DivaBoxPlanner(set, this.plannerIDCount);
38656
- return _context4.abrupt("break", 29);
38657
- case 29:
38184
+ return _context4.abrupt("break", 21);
38185
+ case 21:
38658
38186
  this.plannerList.set(set.getSetId(), planner);
38659
38187
  this.plannerIDCount++;
38660
38188
  if (!(setPlanData != null && setPlanData != '')) {
38661
- _context4.next = 34;
38189
+ _context4.next = 26;
38662
38190
  break;
38663
38191
  }
38664
- _context4.next = 34;
38192
+ _context4.next = 26;
38665
38193
  return planner.initPlanner(setPlanData);
38666
- case 34:
38194
+ case 26:
38667
38195
  if (lastSetToInitialize) {
38668
38196
  this.updateAllPlannerBBs();
38669
38197
  this.setPlannerHandler.calcGlobalBoundingBox(this.plannerList);
38670
38198
  }
38671
38199
  this.setPlannerHandler.updateSetPosNr(this.plannerList);
38672
38200
  DivaUtils__default["default"].endSpanOfApm('DivaPlannerHandler initSet');
38673
- case 37:
38201
+ case 29:
38674
38202
  case "end":
38675
38203
  return _context4.stop();
38676
38204
  }
@@ -39140,7 +38668,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39140
38668
  }, {
39141
38669
  key: "clearHandler3D",
39142
38670
  value: function clearHandler3D() {
39143
- this.handler3D.clearRenderCache();
39144
38671
  this.handler3D.closeConnection();
39145
38672
  }
39146
38673
  }, {
@@ -39389,7 +38916,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39389
38916
  if (!renderRequestInfos) {
39390
38917
  LOG$2.error(new DivaUtils.DivaError('Error requesting 3D rendering. No renderRequestInfo is set'));
39391
38918
  return;
39392
- } 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)) {
39393
38920
  LOG$2.error(new DivaUtils.DivaError('Error requesting rendering. Not valid width or height request width: ' + renderRequestInfos.width + ' height: ' + renderRequestInfos.height));
39394
38921
  return;
39395
38922
  }
@@ -39398,14 +38925,11 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39398
38925
  var loadedCatData = [];
39399
38926
  var plannerExists = false;
39400
38927
  var savedSetId = undefined;
39401
- var containsNotDigitalizedTextures = false;
39402
- var useMediaServiceImageCache = doRequestRendering && this.handler3D.getUseMediaServiceImageCache() ? true : false;
39403
38928
  this.plannerList.forEach(function (planner, setId) {
39404
38929
  var _renderRequestInfos$d;
39405
38930
  savedSetId = setId;
39406
- 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);
39407
38932
  var setData = config.constructionSet;
39408
- if (config.containsNotDigitalizedTextures) containsNotDigitalizedTextures = true;
39409
38933
 
39410
38934
  //Add technical Info to setData
39411
38935
  var bboxInfo2D = _this3.get2DViewPlannerBoundingBox();
@@ -39425,15 +38949,6 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39425
38949
  });
39426
38950
  });
39427
38951
  if (plannerExists) {
39428
- if (containsNotDigitalizedTextures) {
39429
- var _this$plannerHandlerF3, _this$plannerHandlerF4;
39430
- (_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);
39431
- } else {
39432
- var _this$plannerHandlerF5, _this$plannerHandlerF6;
39433
- //Hide message warning if shown
39434
- (_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);
39435
- }
39436
-
39437
38952
  // if not in set planner mode overwrite s1 with correct setId
39438
38953
  if (!this.plannerHandlerFunctions.doAllowSetPlanner()) {
39439
38954
  plannerData.SCE.ROO[0].SET[0].ID = savedSetId;
@@ -39476,12 +38991,12 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39476
38991
 
39477
38992
  if (!setId) {
39478
38993
  this.plannerList.forEach(function (planner, setId) {
39479
- var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false, _this4.handler3D.getUseMediaServiceImageCache());
38994
+ var config = planner.getSetData(true, _this4.plannerHandlerFunctions.doAllowSetPlanner(), false);
39480
38995
  var setData = config.constructionSet;
39481
38996
  plannerData.SCE.ROO[0].SET.push(setData);
39482
38997
  });
39483
38998
  } else {
39484
- 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);
39485
39000
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39486
39001
  }
39487
39002
  return JSON.stringify(plannerData);
@@ -39508,7 +39023,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
39508
39023
  // let posInformation: any = {};
39509
39024
 
39510
39025
  this.plannerList.forEach(function (planner, setId) {
39511
- var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false, _this5.handler3D.getUseMediaServiceImageCache());
39026
+ var config = planner.getSetData(false, _this5.plannerHandlerFunctions.doAllowSetPlanner(), false);
39512
39027
  plannerData.SCE.ROO[0].SET.push(config.constructionSet);
39513
39028
  });
39514
39029
  return DivaUtils.md5(JSON.stringify(plannerData));
@@ -39563,7 +39078,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39563
39078
  _defineProperty__default["default"](this, "updatePlanner3DImage", void 0);
39564
39079
  _defineProperty__default["default"](this, "setRotationOrbitCube", void 0);
39565
39080
  _defineProperty__default["default"](this, "getCanvas2DAsJPG", void 0);
39566
- _defineProperty__default["default"](this, "updateSirvViewer", void 0);
39567
39081
  _defineProperty__default["default"](this, "updateFullscreenRendering", void 0);
39568
39082
  _defineProperty__default["default"](this, "plannerHandler", void 0);
39569
39083
  _defineProperty__default["default"](this, "updateSetImage", void 0);
@@ -39653,18 +39167,12 @@ var DivaWebPlanner = /*#__PURE__*/function () {
39653
39167
  if (rendering.getIsFullscreenRendering()) {
39654
39168
  _this.updateFullscreenRendering(rendering);
39655
39169
  } else {
39656
- if (_this.getCurPlannerViewMode() == 'SirvViewer_only') {
39657
- var _this$actSet, _this$updateSirvViewe, _this$actSet2;
39658
- (_this$actSet = _this.actSet()) === null || _this$actSet === void 0 || _this$actSet.getVariantBasketData();
39659
- (_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());
39660
- } else {
39661
- var _this$actSet3;
39662
- _this.updatePlanner3DImage(rendering, ((_this$actSet3 = _this.actSet()) === null || _this$actSet3 === void 0 ? void 0 : _this$actSet3.getAlternateRenderInfo().length) > 0);
39663
- }
39170
+ var _this$actSet;
39171
+ _this.updatePlanner3DImage(rendering, ((_this$actSet = _this.actSet()) === null || _this$actSet === void 0 ? void 0 : _this$actSet.getAlternateRenderInfo().length) > 0);
39664
39172
  }
39665
39173
  if (_this.actions && (_this$state = _this.state) !== null && _this$state !== void 0 && _this$state.enableSupport) {
39666
- var _this$actSet4, _this$state$user, _this$state$user2, _this$state$user3;
39667
- _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);
39668
39176
  }
39669
39177
  });
39670
39178
  /**
@@ -40506,19 +40014,19 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40506
40014
  }, {
40507
40015
  key: "getDivaArticles",
40508
40016
  value: function getDivaArticles() {
40509
- var _this$actSet5;
40510
- 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();
40511
40019
  }
40512
40020
  }, {
40513
40021
  key: "getDimension",
40514
40022
  value: function () {
40515
40023
  var _getDimension = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14() {
40516
- var _this$actSet6;
40024
+ var _this$actSet4;
40517
40025
  return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context14) {
40518
40026
  while (1) switch (_context14.prev = _context14.next) {
40519
40027
  case 0:
40520
40028
  _context14.next = 2;
40521
- 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();
40522
40030
  case 2:
40523
40031
  return _context14.abrupt("return", _context14.sent);
40524
40032
  case 3:
@@ -40577,7 +40085,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40577
40085
  this.updateWebConfiguratorTitle();
40578
40086
  //initialize planner view
40579
40087
  (_this$updateViewPlann9 = this.updateViewPlannerElements) === null || _this$updateViewPlann9 === void 0 || _this$updateViewPlann9.call(this, setHandlerInstance.getAllViewPlannerElements(set), setHandlerInstance.getAllVisualiedNotPlannedElements(set), set.getSetId(), set.firstElementId);
40580
- this.initCache();
40088
+ this.updatePlannerView('INIT_VIEW');
40581
40089
  this.onBasketInitialized();
40582
40090
  this.checkVariantData();
40583
40091
  case 17:
@@ -40597,8 +40105,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40597
40105
  }, {
40598
40106
  key: "updateWebConfiguratorTitle",
40599
40107
  value: function updateWebConfiguratorTitle() {
40600
- var _this$setWebConifgura, _this$actSet7;
40601
- (_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());
40602
40110
  }
40603
40111
  }, {
40604
40112
  key: "updateConfigStructure",
@@ -40610,7 +40118,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40610
40118
  value: function () {
40611
40119
  var _runInitMode = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(plannerMode) {
40612
40120
  var _this$navigateToTabGr2;
40613
- var doDefault, configStepKey, _this$actSet8, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40121
+ var doDefault, configStepKey, _this$actSet6, _this$navigateToTabGr3, _this$navigateToTabGr4, _this$navigateToTabGr5;
40614
40122
  return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context16) {
40615
40123
  while (1) switch (_context16.prev = _context16.next) {
40616
40124
  case 0:
@@ -40645,7 +40153,7 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40645
40153
  if (doDefault) {
40646
40154
  if (plannerMode == 'ProductList') {
40647
40155
  (_this$navigateToTabGr3 = this.navigateToTabGroup) === null || _this$navigateToTabGr3 === void 0 || _this$navigateToTabGr3.call(this, 'PRODUCTS');
40648
- } 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) {
40649
40157
  (_this$navigateToTabGr4 = this.navigateToTabGroup) === null || _this$navigateToTabGr4 === void 0 || _this$navigateToTabGr4.call(this, 'ROOMLIST', true);
40650
40158
  } else {
40651
40159
  (_this$navigateToTabGr5 = this.navigateToTabGroup) === null || _this$navigateToTabGr5 === void 0 || _this$navigateToTabGr5.call(this, this.getCurPlannerType(true), true);
@@ -40662,24 +40170,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40662
40170
  }
40663
40171
  return runInitMode;
40664
40172
  }()
40665
- }, {
40666
- key: "initCache",
40667
- value: function initCache() {
40668
- //get cached image
40669
- var initFirstRenderingByCache = false;
40670
- if (DivaUtils__default["default"].CacheIsEnabled) {
40671
- var firstImageUrl = DivaUtils__default["default"].getCacheData('FIRSTIMAGE', '');
40672
- if (firstImageUrl) {
40673
- initFirstRenderingByCache = true;
40674
- var rendering = new Rendering('', '', '', -1, -1, false, false, 0, false, false, 'STREAM');
40675
- rendering.setHQRenderingUrl(firstImageUrl, this.api.getDiva3dUseSirvViewer());
40676
- this.updatePlannerRendering(rendering);
40677
- }
40678
- }
40679
- if (!initFirstRenderingByCache) {
40680
- this.updatePlannerView('INIT_VIEW');
40681
- }
40682
- }
40683
40173
  }, {
40684
40174
  key: "addSetToActPlanningByDivaNr",
40685
40175
  value: function () {
@@ -40893,7 +40383,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40893
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);
40894
40384
  break;
40895
40385
  case '3DImage':
40896
- case 'SirvViewer_only':
40897
40386
  //Request new Rendering
40898
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);
40899
40388
  break;
@@ -40940,8 +40429,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
40940
40429
  }, {
40941
40430
  key: "getAlternateRenderingsForSummary",
40942
40431
  value: function getAlternateRenderingsForSummary() {
40943
- var _this$actSet9;
40944
- 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;
40945
40434
  }
40946
40435
  }, {
40947
40436
  key: "destroyWebPlanner",
@@ -41237,8 +40726,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41237
40726
  }, {
41238
40727
  key: "setDifferentOptions",
41239
40728
  value: function setDifferentOptions(options) {
41240
- var _this$actSet10;
41241
- (_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);
41242
40731
  }
41243
40732
 
41244
40733
  /**
@@ -41615,7 +41104,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41615
41104
  * This function returns true if the Planner Mode should be visible and the planner Step should be shown.
41616
41105
  * The planner step is not shown if:
41617
41106
  * - There is no viewer Option set for the Planner
41618
- * - The configurator config disables the planner Step (SuS + Cache System)
41619
41107
  * - The box Planner is loaded
41620
41108
  */
41621
41109
  }, {
@@ -41636,8 +41124,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41636
41124
 
41637
41125
  //if planner is hidden by config but nothing is planned initially
41638
41126
  if (plannerType === 'NONE') {
41639
- var _this$plannerConfig$a7, _this$actSet11;
41640
- 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)) {
41641
41129
  plannerType = 'PLANNER';
41642
41130
  }
41643
41131
  }
@@ -41677,38 +41165,38 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41677
41165
  }, {
41678
41166
  key: "getCurCatalogCodex",
41679
41167
  value: function getCurCatalogCodex() {
41680
- var _this$actSet12;
41681
- 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();
41682
41170
  }
41683
41171
  }, {
41684
41172
  key: "getCurCatalogName",
41685
41173
  value: function getCurCatalogName() {
41686
- var _this$actSet13;
41687
- 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();
41688
41176
  }
41689
41177
  }, {
41690
41178
  key: "getCurAccountName",
41691
41179
  value: function getCurAccountName() {
41692
- var _this$actSet14;
41693
- 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();
41694
41182
  }
41695
41183
  }, {
41696
41184
  key: "getCurSupplierGuid",
41697
41185
  value: function getCurSupplierGuid() {
41698
- var _this$actSet15;
41699
- 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();
41700
41188
  }
41701
41189
  }, {
41702
41190
  key: "getCurSetPrice",
41703
41191
  value: function getCurSetPrice() {
41704
- var _this$actSet$getSetPr, _this$actSet16;
41705
- 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;
41706
41194
  }
41707
41195
  }, {
41708
41196
  key: "getCurImageMode",
41709
41197
  value: function getCurImageMode() {
41710
- var _this$actSet17;
41711
- 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';
41712
41200
  }
41713
41201
  }, {
41714
41202
  key: "getViewConfig",
@@ -41739,73 +41227,64 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41739
41227
  }, {
41740
41228
  key: "doShow3DDimensionLines",
41741
41229
  value: function doShow3DDimensionLines() {
41742
- var _this$actSet18;
41743
- 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;
41744
41232
  }
41745
41233
  }, {
41746
41234
  key: "hidePlannerUiIcons",
41747
41235
  value: function hidePlannerUiIcons() {
41748
- var _this$actSet19;
41749
- 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;
41750
41238
  }
41751
41239
  }, {
41752
41240
  key: "doShowPlannerReplaceMode",
41753
41241
  value: function doShowPlannerReplaceMode() {
41754
- var _this$actSet20, _this$api$getViewConf2, _catalogData$PlannerP, _catalogData$PlannerP2;
41755
- 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;
41756
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;
41757
41245
  }
41758
41246
  }, {
41759
41247
  key: "doPlannerReplaceAutoSwitch",
41760
41248
  value: function doPlannerReplaceAutoSwitch() {
41761
- var _this$actSet21, _this$api$getViewConf3;
41762
- 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;
41763
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);
41764
41252
  }
41765
41253
  }, {
41766
41254
  key: "getHidePlanner",
41767
41255
  value: function getHidePlanner() {
41768
- var _this$actSet22;
41769
- 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);
41770
41258
  }
41771
41259
  }, {
41772
41260
  key: "getAllowRTV",
41773
41261
  value: function getAllowRTV() {
41774
- var _this$actSet23, _this$actSet24;
41775
- if ((_this$actSet23 = this.actSet()) !== null && _this$actSet23 !== void 0 && _this$actSet23.CatalogData.divaForceRTV) return true;
41776
- 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;
41777
41266
  return false;
41778
41267
  }
41779
41268
  }, {
41780
41269
  key: "geAllowQRCodeAR",
41781
41270
  value: function geAllowQRCodeAR() {
41782
- var _this$actSet25;
41783
- 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;
41784
41273
  return false;
41785
41274
  }
41786
41275
  }, {
41787
41276
  key: "getEnableUnityRtvKombi",
41788
41277
  value: function getEnableUnityRtvKombi() {
41789
- var _this$actSet26;
41278
+ var _this$actSet24;
41790
41279
  // if force rtv disable unity kombi - biohort
41791
- 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;
41792
41281
  return this.api.getEnableRTVUnityKombi();
41793
41282
  }
41794
41283
  }, {
41795
41284
  key: "getShelfPlannerRTV",
41796
41285
  value: function getShelfPlannerRTV() {
41797
- var _this$actSet27;
41798
- return (_this$actSet27 = this.actSet()) === null || _this$actSet27 === void 0 ? void 0 : _this$actSet27.CatalogData.useShelfPlannerRTV;
41799
- }
41800
- }, {
41801
- key: "getDiva3DSuppressCacheCreation",
41802
- value: function getDiva3DSuppressCacheCreation() {
41803
- return this.api.getDiva3DSuppressCacheCreation();
41804
- }
41805
- }, {
41806
- key: "getDiva3dUseImageCache",
41807
- value: function getDiva3dUseImageCache() {
41808
- 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;
41809
41288
  }
41810
41289
  }, {
41811
41290
  key: "getBasketData",
@@ -41846,8 +41325,8 @@ var DivaWebPlanner = /*#__PURE__*/function () {
41846
41325
  }, {
41847
41326
  key: "getCatalogData",
41848
41327
  value: function getCatalogData() {
41849
- var _this$actSet28;
41850
- 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;
41851
41330
  }
41852
41331
  }, {
41853
41332
  key: "ReturnTo",
@@ -42128,11 +41607,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42128
41607
  value: function registerGetCanvas2DAsJPG(getCanvas2DAsJPG) {
42129
41608
  this.getCanvas2DAsJPG = getCanvas2DAsJPG;
42130
41609
  }
42131
- }, {
42132
- key: "registerUpdateSirvViewer",
42133
- value: function registerUpdateSirvViewer(updateSirvViewer) {
42134
- this.updateSirvViewer = updateSirvViewer;
42135
- }
42136
41610
  }, {
42137
41611
  key: "registerUpdatePlanner2DGrid",
42138
41612
  value: function registerUpdatePlanner2DGrid(updatePlanner2DGrid) {
@@ -42600,7 +42074,6 @@ var DivaWebPlanner = /*#__PURE__*/function () {
42600
42074
  this.updatePlanner3DImage = undefined;
42601
42075
  this.setRotationOrbitCube = undefined;
42602
42076
  this.getCanvas2DAsJPG = undefined;
42603
- this.updateSirvViewer = undefined;
42604
42077
  this.updatePlannerMsgContainer = undefined;
42605
42078
  this.updateFullscreenRendering = undefined;
42606
42079
  this.updateSetImage = undefined;
@@ -43540,24 +43013,25 @@ var Grid = /*#__PURE__*/function () {
43540
43013
  }, {
43541
43014
  key: "onConfigChanged",
43542
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
+ }
43543
43024
  if (this.heightGridCellCountOnRule) {
43544
43025
  for (var i = 0; i < this.heightGridCellCountOnRule.length; i++) {
43545
43026
  if (this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(this.heightGridCellCountOnRule[i].Rule))) {
43546
43027
  if (this.currentLoadedRuleIndex != i) {
43547
43028
  this.currentLoadedRuleIndex = i;
43548
- return 'heightGridRule';
43029
+ returnTypes.push('heightGridRule');
43549
43030
  }
43550
43031
  }
43551
43032
  }
43552
43033
  }
43553
- if (this.ShowOnRule) {
43554
- var disabled = !this.article.evalRule(DivaUtils__default["default"].getRuleByFormula(this.ShowOnRule));
43555
- if (disabled !== this.disabledByRule) {
43556
- this.disabledByRule = disabled;
43557
- return 'disableGridRule';
43558
- }
43559
- }
43560
- return false;
43034
+ return returnTypes;
43561
43035
  }
43562
43036
 
43563
43037
  /**
@@ -59985,7 +59459,7 @@ var ProductHandler = /*#__PURE__*/function () {
59985
59459
  */
59986
59460
  _defineProperty__default["default"](this, "loadProducts", /*#__PURE__*/function () {
59987
59461
  var _ref4 = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(_ref3) {
59988
- 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;
59989
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;
59990
59464
  return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
59991
59465
  while (1) switch (_context2.prev = _context2.next) {
@@ -60097,10 +59571,9 @@ var ProductHandler = /*#__PURE__*/function () {
60097
59571
  mainCategory: _this.mainCategory,
60098
59572
  subCategory: _this.subCategory,
60099
59573
  retailerArticleNr: (_baseProduct15 = baseProduct) === null || _baseProduct15 === void 0 ? void 0 : _baseProduct15.retailerArticleNr,
60100
- available: ((_baseProduct16 = baseProduct) === null || _baseProduct16 === void 0 ? void 0 : _baseProduct16.available) != undefined ? baseProduct.available : false,
60101
59574
  dockingPoints: dockingPoints,
60102
- media: (_baseProduct17 = baseProduct) === null || _baseProduct17 === void 0 ? void 0 : _baseProduct17.media,
60103
- 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
60104
59577
  }; //get classification data and remove field prefix
60105
59578
  classificationData = _this.parseClassificationFields(baseProduct, true); // init Variants
60106
59579
  variantData = [];
@@ -60582,11 +60055,6 @@ _defineProperty__default["default"](ProductHandler, "baseDataFields", [{
60582
60055
  type: 'text',
60583
60056
  title: 'productcreator.fields.technicalDescription',
60584
60057
  fieldType: 'BASE'
60585
- }, {
60586
- field: 'available',
60587
- type: 'boolean',
60588
- title: 'productcreator.fields.available',
60589
- fieldType: 'BASE'
60590
60058
  }, {
60591
60059
  field: 'calculatedPrice',
60592
60060
  type: 'price',