@colijnit/homedecorator 255.1.2 → 255.1.4

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 (58) hide show
  1. package/app/core/model/homedecorator-settings-options.d.ts +1 -0
  2. package/app/core/service/homedecorator-connector-adapter.service.d.ts +2 -2
  3. package/app/core/service/homedecorator-connector.service.d.ts +2 -2
  4. package/app/core/service/utils.service.d.ts +1 -0
  5. package/app/plugins/core3d/components/ar-gui/ar-gui-root/ar-gui-elements/ar-gui-buttons/ar-gui-buttons.component.scss +2 -4
  6. package/app/plugins/core3d/items/floor-plane-item.d.ts +8 -1
  7. package/app/plugins/core3d/items/metadata.d.ts +2 -0
  8. package/app/plugins/core3d/service/ar.service.d.ts +1 -0
  9. package/app/plugins/core3d/service/floor-pattern.service.d.ts +26 -0
  10. package/app/plugins/core3d/service/floor-tile-intersection.service.d.ts +25 -0
  11. package/app/plugins/core3d/service/outline.service.d.ts +1 -2
  12. package/app/plugins/core3d/service/post-processing.service.d.ts +6 -0
  13. package/app/plugins/core3d/service/scene.service.d.ts +4 -1
  14. package/app/plugins/core3d/service/ssr.service.d.ts +19 -0
  15. package/app/plugins/model-uploader/model-previewer/model-preview.component.d.ts +40 -3
  16. package/app/plugins/render/service/new-render.service.d.ts +1 -0
  17. package/app/plugins/threedselector/threedselector/service/build-furniture.service.d.ts +10 -1
  18. package/app/plugins/threedselector/threedselector/threedselector.component.d.ts +1 -0
  19. package/app/plugins/toolbar/toolbar.module.d.ts +2 -1
  20. package/app/shared/pdf-export/pdf-export.component.d.ts +20 -0
  21. package/app/shared/pdf-export/pdf-export.component.scss +19 -0
  22. package/app/shared/pdf-export/pdf-export.module.d.ts +11 -0
  23. package/assets/icons/xmark_regular.svg +1 -0
  24. package/bundles/colijnit-homedecorator.umd.js +1406 -295
  25. package/bundles/colijnit-homedecorator.umd.js.map +1 -1
  26. package/esm2015/app/app.version.js +4 -4
  27. package/esm2015/app/core/model/homedecorator-settings-options.js +2 -1
  28. package/esm2015/app/core/model/light-preset.js +11 -7
  29. package/esm2015/app/core/service/homedecorator-connector-adapter.service.js +6 -8
  30. package/esm2015/app/core/service/homedecorator-connector.service.js +7 -5
  31. package/esm2015/app/core/service/utils.service.js +16 -1
  32. package/esm2015/app/plugins/core3d/components/ar-gui/ar-gui-root/ar-gui-elements/ar-gui-buttons/ar-gui-buttons.component.js +2 -2
  33. package/esm2015/app/plugins/core3d/components/scene-options/scene-options.component.js +63 -3
  34. package/esm2015/app/plugins/core3d/items/floor-plane-item.js +25 -2
  35. package/esm2015/app/plugins/core3d/items/metadata.js +1 -1
  36. package/esm2015/app/plugins/core3d/service/ar.service.js +14 -1
  37. package/esm2015/app/plugins/core3d/service/floor-pattern.service.js +156 -0
  38. package/esm2015/app/plugins/core3d/service/floor-tile-intersection.service.js +122 -0
  39. package/esm2015/app/plugins/core3d/service/floor.service.js +5 -2
  40. package/esm2015/app/plugins/core3d/service/outline.service.js +9 -8
  41. package/esm2015/app/plugins/core3d/service/post-processing.service.js +77 -22
  42. package/esm2015/app/plugins/core3d/service/scene.service.js +30 -13
  43. package/esm2015/app/plugins/core3d/service/ssr.service.js +104 -0
  44. package/esm2015/app/plugins/lite-selector/lite-selector/component/selections-summary/selections-summary.component.js +3 -3
  45. package/esm2015/app/plugins/model-uploader/model-previewer/model-preview.component.js +339 -79
  46. package/esm2015/app/plugins/model-uploader/model-uploader/model-uploader.component.js +3 -2
  47. package/esm2015/app/plugins/product-catalog/product-catalog/product-catalog.component.js +3 -2
  48. package/esm2015/app/plugins/render/service/new-render.service.js +37 -13
  49. package/esm2015/app/plugins/room-planner/room-planner/room-planner.component.js +2 -2
  50. package/esm2015/app/plugins/threedselector/threedselector/service/build-furniture.service.js +135 -5
  51. package/esm2015/app/plugins/threedselector/threedselector/threedselector.component.js +35 -9
  52. package/esm2015/app/plugins/toolbar/toolbar/toolbar.component.js +9 -25
  53. package/esm2015/app/plugins/toolbar/toolbar.module.js +8 -4
  54. package/esm2015/app/shared/pdf-export/pdf-export.component.js +86 -0
  55. package/esm2015/app/shared/pdf-export/pdf-export.module.js +38 -0
  56. package/fesm2015/colijnit-homedecorator.js +1385 -295
  57. package/fesm2015/colijnit-homedecorator.js.map +1 -1
  58. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/configuratorapi/build/enum/node-type.enum'), require('@colijnit/configuratorapi/build/model/configurator-statistics-environment'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/ioneconnector/build/model/data-service-response-data'), require('@colijnit/configuratorapi/build/model/frozen-article'), require('@colijnit/configuratorapi/build/model/selection'), require('@colijnit/configuratorapi/build/model/answer-price'), require('@colijnit/configuratorapi/build/model/article'), require('@colijnit/configuratorapi/build/model/deco-node'), require('@colijnit/configuratorapi/build/model/skip-button-info'), require('@colijnit/configuratorapi'), require('@colijnit/mainapi'), require('@colijnit/articleapi/build/articles'), require('@colijnit/configuratorapi/build/model/article-text.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/ioneconnector/build/utils/image-utils'), require('@colijnit/articleapi/build/model/external-catalog-startup-info'), require('@colijnit/articleapi/build/model/catalog-definition.bo'), require('@colijnit/articleapi/build/model/external-source.bo'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/configuratorapi/build/model/article-category'), require('@colijnit/articleapi/build/model/article-flat.bo'), require('@colijnit/mainapi/build/enum/internal-param.enum'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@colijnit/configuratorapi/build/utils/image-utils'), require('@angular/common/http'), require('axios'), require('textdiff-patch'), require('three'), require('@tweenjs/tween.js'), require('polygon-tools'), require('three-gpu-pathtracer'), require('three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js'), require('three/examples/jsm/geometries/TextGeometry'), require('three/examples/jsm/loaders/FontLoader'), require('three/examples/jsm/webxr/XRControllerModelFactory'), require('@colijnit/configuratorapi/build/enum/hdeco-positioning.enum'), require('three/examples/jsm/postprocessing/OutlinePass'), require('three/examples/jsm/postprocessing/EffectComposer'), require('three/examples/jsm/postprocessing/RenderPass'), require('three/examples/jsm/postprocessing/ShaderPass'), require('three/examples/jsm/shaders/FXAAShader'), require('three/examples/jsm/shaders/GammaCorrectionShader'), require('md5'), require('three/examples/jsm/libs/lil-gui.module.min'), require('n8ao'), require('three/examples/jsm/postprocessing/SMAAPass'), require('@angular/platform-browser'), require('ngx-device-detector'), require('@angular/material/icon'), require('@angular/animations'), require('@angular/common'), require('@angular/material/dialog'), require('three/examples/jsm/loaders/RGBELoader'), require('@colijnit/configuratorapi/build/enum/hdeco-placement.enum'), require('rxjs/internal/observable/fromEvent'), require('rxjs/operators'), require('rxjs/internal/observable/of'), require('three/examples/jsm/utils/BufferGeometryUtils.js'), require('three/examples/jsm/loaders/OBJLoader'), require('three/examples/jsm/loaders/MTLLoader'), require('three/examples/jsm/loaders/GLTFLoader'), require('three/examples/jsm/exporters/GLTFExporter'), require('three/examples/jsm/loaders/DRACOLoader'), require('three/examples/jsm/loaders/KTX2Loader'), require('three/examples/jsm/exporters/USDZExporter'), require('@angular/material/list'), require('@angular/material/core'), require('@colijnit/configuratorapi/build/enum/deco-node-type.enum'), require('jszip'), require('@colijnit/configuratorapi/build/enum/deco-node-kind.enum'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/forms'), require('three/examples/jsm/utils/BufferGeometryUtils'), require('three/src/constants'), require('@colijnit/corecomponents'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@colijnit/corecomponents_v12'), require('@angular/material/slider'), require('@angular/material/input'), require('dat.gui'), require('@migenius/realityserver-client'), require('@angular/material/grid-list'), require('@angular/material/progress-spinner'), require('@angular/flex-layout/flex'), require('@angular/material/progress-bar'), require('three/examples/jsm/geometries/DecalGeometry'), require('fabric'), require('@angular/material/button-toggle'), require('@angular/material/snack-bar'), require('@angular/material/slide-toggle'), require('@angular/material/divider'), require('browser-image-compression'), require('@angular/material/tabs'), require('@angular/flex-layout/extended'), require('ngx-color/chrome'), require('@angular/router'), require('delaunator'), require('three/examples/jsm/helpers/VertexNormalsHelper'), require('@angular/cdk/portal'), require('file-saver'), require('ng2-pdf-viewer'), require('html2canvas'), require('three/examples/jsm/controls/OrbitControls'), require('three/examples/jsm/loaders/FBXLoader'), require('three/examples/jsm/loaders/TDSLoader'), require('@angular/material/radio'), require('@angular/material/toolbar'), require('@angular/material/menu'), require('@angular/material/card'), require('@angular/material/sidenav'), require('@angular/material/badge'), require('@colijnit/articleapi/build/model/external-catalog-startup-info-request'), require('@colijnit/catalog'), require('ngx-lightbox'), require('@angular/flex-layout'), require('@angular/cdk/drag-drop')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/homedecorator', ['exports', '@angular/core', 'rxjs', '@colijnit/configuratorapi/build/enum/node-type.enum', '@colijnit/configuratorapi/build/model/configurator-statistics-environment', '@colijnit/ioneconnector/build/model/options', '@colijnit/ioneconnector/build/model/data-service-response-data', '@colijnit/configuratorapi/build/model/frozen-article', '@colijnit/configuratorapi/build/model/selection', '@colijnit/configuratorapi/build/model/answer-price', '@colijnit/configuratorapi/build/model/article', '@colijnit/configuratorapi/build/model/deco-node', '@colijnit/configuratorapi/build/model/skip-button-info', '@colijnit/configuratorapi', '@colijnit/mainapi', '@colijnit/articleapi/build/articles', '@colijnit/configuratorapi/build/model/article-text.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/ioneconnector/build/utils/image-utils', '@colijnit/articleapi/build/model/external-catalog-startup-info', '@colijnit/articleapi/build/model/catalog-definition.bo', '@colijnit/articleapi/build/model/external-source.bo', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/configuratorapi/build/model/article-category', '@colijnit/articleapi/build/model/article-flat.bo', '@colijnit/mainapi/build/enum/internal-param.enum', '@colijnit/ioneconnector/build/utils/string-utils', '@colijnit/configuratorapi/build/utils/image-utils', '@angular/common/http', 'axios', 'textdiff-patch', 'three', '@tweenjs/tween.js', 'polygon-tools', 'three-gpu-pathtracer', 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js', 'three/examples/jsm/geometries/TextGeometry', 'three/examples/jsm/loaders/FontLoader', 'three/examples/jsm/webxr/XRControllerModelFactory', '@colijnit/configuratorapi/build/enum/hdeco-positioning.enum', 'three/examples/jsm/postprocessing/OutlinePass', 'three/examples/jsm/postprocessing/EffectComposer', 'three/examples/jsm/postprocessing/RenderPass', 'three/examples/jsm/postprocessing/ShaderPass', 'three/examples/jsm/shaders/FXAAShader', 'three/examples/jsm/shaders/GammaCorrectionShader', 'md5', 'three/examples/jsm/libs/lil-gui.module.min', 'n8ao', 'three/examples/jsm/postprocessing/SMAAPass', '@angular/platform-browser', 'ngx-device-detector', '@angular/material/icon', '@angular/animations', '@angular/common', '@angular/material/dialog', 'three/examples/jsm/loaders/RGBELoader', '@colijnit/configuratorapi/build/enum/hdeco-placement.enum', 'rxjs/internal/observable/fromEvent', 'rxjs/operators', 'rxjs/internal/observable/of', 'three/examples/jsm/utils/BufferGeometryUtils.js', 'three/examples/jsm/loaders/OBJLoader', 'three/examples/jsm/loaders/MTLLoader', 'three/examples/jsm/loaders/GLTFLoader', 'three/examples/jsm/exporters/GLTFExporter', 'three/examples/jsm/loaders/DRACOLoader', 'three/examples/jsm/loaders/KTX2Loader', 'three/examples/jsm/exporters/USDZExporter', '@angular/material/list', '@angular/material/core', '@colijnit/configuratorapi/build/enum/deco-node-type.enum', 'jszip', '@colijnit/configuratorapi/build/enum/deco-node-kind.enum', '@angular/material/checkbox', '@angular/material/button', '@angular/forms', 'three/examples/jsm/utils/BufferGeometryUtils', 'three/src/constants', '@colijnit/corecomponents', '@angular/material/form-field', '@angular/material/select', '@angular/material/tooltip', '@colijnit/corecomponents_v12', '@angular/material/slider', '@angular/material/input', 'dat.gui', '@migenius/realityserver-client', '@angular/material/grid-list', '@angular/material/progress-spinner', '@angular/flex-layout/flex', '@angular/material/progress-bar', 'three/examples/jsm/geometries/DecalGeometry', 'fabric', '@angular/material/button-toggle', '@angular/material/snack-bar', '@angular/material/slide-toggle', '@angular/material/divider', 'browser-image-compression', '@angular/material/tabs', '@angular/flex-layout/extended', 'ngx-color/chrome', '@angular/router', 'delaunator', 'three/examples/jsm/helpers/VertexNormalsHelper', '@angular/cdk/portal', 'file-saver', 'ng2-pdf-viewer', 'html2canvas', 'three/examples/jsm/controls/OrbitControls', 'three/examples/jsm/loaders/FBXLoader', 'three/examples/jsm/loaders/TDSLoader', '@angular/material/radio', '@angular/material/toolbar', '@angular/material/menu', '@angular/material/card', '@angular/material/sidenav', '@angular/material/badge', '@colijnit/articleapi/build/model/external-catalog-startup-info-request', '@colijnit/catalog', 'ngx-lightbox', '@angular/flex-layout', '@angular/cdk/drag-drop'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.homedecorator = {}), global.ng.core, global.rxjs, global.nodeType_enum, global.configuratorStatisticsEnvironment, global.options, global.dataServiceResponseData, global.frozenArticle, global.selection, global.answerPrice, global.article, global.decoNode, global.skipButtonInfo, global.configuratorapi, global.mainapi, global.articles, global.articleText_bo, global.businessObjectFactory, global.imageUtils, global.externalCatalogStartupInfo, global.catalogDefinition_bo, global.externalSource_bo, global.articleFullObject, global.articleCategory, global.articleFlat_bo, global.internalParam_enum, global.stringUtils, global.imageUtils$1, global.ng.common.http, global.axios, global.applyPatch, global.THREE, global.TWEEN, global.PolygonTools, global.threeGpuPathtracer, global.ParallelMeshBVHWorker_js, global.TextGeometry, global.FontLoader, global.XRControllerModelFactory, global.hdecoPositioning_enum, global.OutlinePass, global.EffectComposer, global.RenderPass, global.ShaderPass, global.FXAAShader, global.GammaCorrectionShader, global.md5, global.GUI, global.n8ao, global.SMAAPass, global.ng.platformBrowser, global.i2$1, global.ng.material.icon, global.ng.animations, global.ng.common, global.ng.material.dialog, global.RGBELoader, global.hdecoPlacement_enum, global.rxjs["internal/observable/fromEvent"], global.rxjs.operators, global.rxjs["internal/observable/of"], global.BufferGeometryUtils, global.OBJLoader, global.MTLLoader, global.GLTFLoader, global.GLTFExporter, global.DRACOLoader, global.KTX2Loader, global.USDZExporter, global.ng.material.list, global.ng.material.core, global.decoNodeType_enum, global.JSZip, global.decoNodeKind_enum, global.ng.material.checkbox, global.ng.material.button, global.ng.forms, global.BufferGeometryUtils$1, global.constants, global.i4, global.ng.material.formField, global.ng.material.select, global.ng.material.tooltip, global.i4$1, global.ng.material.slider, global.ng.material.input, global.dat, global.realityserverClient, global.ng.material.gridList, global.ng.material.progressSpinner, global.ng.flexLayout.flex, global.ng.material.progressBar, global.DecalGeometry, global.fabric, global.ng.material.buttonToggle, global.ng.material.snackBar, global.ng.material.slideToggle, global.ng.material.divider, global.imageCompression, global.ng.material.tabs, global.ng.flexLayout.extended, global.i1$3, global.ng.router, global.Delaunator, global.VertexNormalsHelper, global.ng.cdk.portal, global.fileSaver, global.i6$2, global.html2canvas, global.OrbitControls, global.FBXLoader, global.TDSLoader, global.ng.material.radio, global.ng.material.toolbar, global.ng.material.menu, global.ng.material.card, global.ng.material.sidenav, global.ng.material.badge, global.externalCatalogStartupInfoRequest, global.i7$3, global.i1$5, global.ng.flexLayout, global.ng.cdk.dragDrop));
5
- })(this, (function (exports, i0, rxjs, nodeType_enum, configuratorStatisticsEnvironment, options, dataServiceResponseData, frozenArticle, selection, answerPrice, article, decoNode, skipButtonInfo, configuratorapi, mainapi, articles, articleText_bo, businessObjectFactory, imageUtils, externalCatalogStartupInfo, catalogDefinition_bo, externalSource_bo, articleFullObject, articleCategory, articleFlat_bo, internalParam_enum, stringUtils, imageUtils$1, i2, axios, applyPatch, THREE, TWEEN, PolygonTools, threeGpuPathtracer, ParallelMeshBVHWorker_js, TextGeometry, FontLoader, XRControllerModelFactory, hdecoPositioning_enum, OutlinePass, EffectComposer, RenderPass, ShaderPass, FXAAShader, GammaCorrectionShader, md5, GUI, n8ao, SMAAPass, i1, i2$1, i5$1, animations, i5, i1$1, RGBELoader, hdecoPlacement_enum, fromEvent, operators, of, BufferGeometryUtils, OBJLoader, MTLLoader, GLTFLoader, GLTFExporter, DRACOLoader, KTX2Loader, USDZExporter, i2$2, i3, decoNodeType_enum, JSZip, decoNodeKind_enum, i1$2, i3$1, i8, BufferGeometryUtils$1, constants, i4, i7, i9, i10, i4$1, i7$1, i19, dat, realityserverClient, i3$2, i15, i3$3, i2$3, DecalGeometry, fabric, i7$2, i2$4, i10$1, i6, imageCompression, i1$4, i6$1, i1$3, i5$2, Delaunator, VertexNormalsHelper, i28, fileSaver, i6$2, html2canvas, OrbitControls, FBXLoader, TDSLoader, i6$3, i19$1, i22, i23, i26, i30, externalCatalogStartupInfoRequest, i7$3, i1$5, flexLayout, i10$2) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/configuratorapi/build/enum/node-type.enum'), require('@colijnit/configuratorapi/build/model/configurator-statistics-environment'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/ioneconnector/build/model/data-service-response-data'), require('@colijnit/configuratorapi/build/model/frozen-article'), require('@colijnit/configuratorapi/build/model/selection'), require('@colijnit/configuratorapi/build/model/answer-price'), require('@colijnit/configuratorapi/build/model/article'), require('@colijnit/configuratorapi/build/model/deco-node'), require('@colijnit/configuratorapi/build/model/skip-button-info'), require('@colijnit/configuratorapi'), require('@colijnit/mainapi'), require('@colijnit/articleapi/build/articles'), require('@colijnit/configuratorapi/build/model/article-text.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/ioneconnector/build/utils/image-utils'), require('@colijnit/articleapi/build/model/external-catalog-startup-info'), require('@colijnit/articleapi/build/model/catalog-definition.bo'), require('@colijnit/articleapi/build/model/external-source.bo'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/configuratorapi/build/model/article-category'), require('@colijnit/articleapi/build/model/article-flat.bo'), require('@colijnit/mainapi/build/enum/internal-param.enum'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@colijnit/configuratorapi/build/utils/image-utils'), require('@angular/common/http'), require('axios'), require('textdiff-patch'), require('three'), require('@tweenjs/tween.js'), require('polygon-tools'), require('three-gpu-pathtracer'), require('three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js'), require('three/examples/jsm/geometries/TextGeometry'), require('three/examples/jsm/loaders/FontLoader'), require('three/examples/jsm/webxr/XRControllerModelFactory'), require('@colijnit/configuratorapi/build/enum/hdeco-positioning.enum'), require('three/examples/jsm/postprocessing/OutlinePass'), require('three/examples/jsm/postprocessing/EffectComposer'), require('three/examples/jsm/postprocessing/RenderPass'), require('three/examples/jsm/postprocessing/ShaderPass'), require('three/examples/jsm/shaders/FXAAShader'), require('three/examples/jsm/postprocessing/OutputPass'), require('md5'), require('three/examples/jsm/libs/lil-gui.module.min'), require('n8ao'), require('three/examples/jsm/postprocessing/TAARenderPass'), require('@angular/platform-browser'), require('ngx-device-detector'), require('@angular/material/icon'), require('@angular/animations'), require('@angular/common'), require('@angular/material/dialog'), require('three/examples/jsm/loaders/RGBELoader'), require('@colijnit/configuratorapi/build/enum/hdeco-placement.enum'), require('rxjs/internal/observable/fromEvent'), require('rxjs/operators'), require('rxjs/internal/observable/of'), require('three/examples/jsm/utils/BufferGeometryUtils.js'), require('three/examples/jsm/loaders/OBJLoader'), require('three/examples/jsm/loaders/MTLLoader'), require('three/examples/jsm/loaders/GLTFLoader'), require('three/examples/jsm/exporters/GLTFExporter'), require('three/examples/jsm/loaders/DRACOLoader'), require('three/examples/jsm/loaders/KTX2Loader'), require('three/examples/jsm/exporters/USDZExporter'), require('@angular/material/list'), require('@angular/material/core'), require('@colijnit/configuratorapi/build/enum/deco-node-type.enum'), require('jszip'), require('@colijnit/configuratorapi/build/enum/deco-node-kind.enum'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/forms'), require('three/examples/jsm/utils/BufferGeometryUtils'), require('three-mesh-bvh'), require('three/src/constants'), require('@colijnit/corecomponents'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@colijnit/corecomponents_v12'), require('@angular/material/slider'), require('@angular/material/input'), require('dat.gui'), require('@migenius/realityserver-client'), require('@angular/material/grid-list'), require('@angular/material/progress-spinner'), require('@angular/flex-layout/flex'), require('@angular/material/progress-bar'), require('three/examples/jsm/geometries/DecalGeometry'), require('fabric'), require('@angular/material/button-toggle'), require('@angular/material/snack-bar'), require('@angular/material/slide-toggle'), require('@angular/material/divider'), require('browser-image-compression'), require('@angular/material/tabs'), require('@angular/flex-layout/extended'), require('ngx-color/chrome'), require('@angular/router'), require('delaunator'), require('three/examples/jsm/helpers/VertexNormalsHelper'), require('@angular/cdk/portal'), require('file-saver'), require('ng2-pdf-viewer'), require('html2canvas'), require('three/examples/jsm/controls/OrbitControls'), require('three/examples/jsm/loaders/FBXLoader'), require('three/examples/jsm/loaders/TDSLoader'), require('three/examples/jsm/loaders/STLLoader'), require('@angular/material/radio'), require('@angular/material/toolbar'), require('@angular/material/menu'), require('@angular/material/card'), require('@angular/material/sidenav'), require('@angular/material/badge'), require('@colijnit/articleapi/build/model/external-catalog-startup-info-request'), require('@colijnit/catalog'), require('ngx-lightbox'), require('@angular/flex-layout'), require('@angular/cdk/drag-drop'), require('jspdf'), require('jspdf-autotable')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/homedecorator', ['exports', '@angular/core', 'rxjs', '@colijnit/configuratorapi/build/enum/node-type.enum', '@colijnit/configuratorapi/build/model/configurator-statistics-environment', '@colijnit/ioneconnector/build/model/options', '@colijnit/ioneconnector/build/model/data-service-response-data', '@colijnit/configuratorapi/build/model/frozen-article', '@colijnit/configuratorapi/build/model/selection', '@colijnit/configuratorapi/build/model/answer-price', '@colijnit/configuratorapi/build/model/article', '@colijnit/configuratorapi/build/model/deco-node', '@colijnit/configuratorapi/build/model/skip-button-info', '@colijnit/configuratorapi', '@colijnit/mainapi', '@colijnit/articleapi/build/articles', '@colijnit/configuratorapi/build/model/article-text.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/ioneconnector/build/utils/image-utils', '@colijnit/articleapi/build/model/external-catalog-startup-info', '@colijnit/articleapi/build/model/catalog-definition.bo', '@colijnit/articleapi/build/model/external-source.bo', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/configuratorapi/build/model/article-category', '@colijnit/articleapi/build/model/article-flat.bo', '@colijnit/mainapi/build/enum/internal-param.enum', '@colijnit/ioneconnector/build/utils/string-utils', '@colijnit/configuratorapi/build/utils/image-utils', '@angular/common/http', 'axios', 'textdiff-patch', 'three', '@tweenjs/tween.js', 'polygon-tools', 'three-gpu-pathtracer', 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js', 'three/examples/jsm/geometries/TextGeometry', 'three/examples/jsm/loaders/FontLoader', 'three/examples/jsm/webxr/XRControllerModelFactory', '@colijnit/configuratorapi/build/enum/hdeco-positioning.enum', 'three/examples/jsm/postprocessing/OutlinePass', 'three/examples/jsm/postprocessing/EffectComposer', 'three/examples/jsm/postprocessing/RenderPass', 'three/examples/jsm/postprocessing/ShaderPass', 'three/examples/jsm/shaders/FXAAShader', 'three/examples/jsm/postprocessing/OutputPass', 'md5', 'three/examples/jsm/libs/lil-gui.module.min', 'n8ao', 'three/examples/jsm/postprocessing/TAARenderPass', '@angular/platform-browser', 'ngx-device-detector', '@angular/material/icon', '@angular/animations', '@angular/common', '@angular/material/dialog', 'three/examples/jsm/loaders/RGBELoader', '@colijnit/configuratorapi/build/enum/hdeco-placement.enum', 'rxjs/internal/observable/fromEvent', 'rxjs/operators', 'rxjs/internal/observable/of', 'three/examples/jsm/utils/BufferGeometryUtils.js', 'three/examples/jsm/loaders/OBJLoader', 'three/examples/jsm/loaders/MTLLoader', 'three/examples/jsm/loaders/GLTFLoader', 'three/examples/jsm/exporters/GLTFExporter', 'three/examples/jsm/loaders/DRACOLoader', 'three/examples/jsm/loaders/KTX2Loader', 'three/examples/jsm/exporters/USDZExporter', '@angular/material/list', '@angular/material/core', '@colijnit/configuratorapi/build/enum/deco-node-type.enum', 'jszip', '@colijnit/configuratorapi/build/enum/deco-node-kind.enum', '@angular/material/checkbox', '@angular/material/button', '@angular/forms', 'three/examples/jsm/utils/BufferGeometryUtils', 'three-mesh-bvh', 'three/src/constants', '@colijnit/corecomponents', '@angular/material/form-field', '@angular/material/select', '@angular/material/tooltip', '@colijnit/corecomponents_v12', '@angular/material/slider', '@angular/material/input', 'dat.gui', '@migenius/realityserver-client', '@angular/material/grid-list', '@angular/material/progress-spinner', '@angular/flex-layout/flex', '@angular/material/progress-bar', 'three/examples/jsm/geometries/DecalGeometry', 'fabric', '@angular/material/button-toggle', '@angular/material/snack-bar', '@angular/material/slide-toggle', '@angular/material/divider', 'browser-image-compression', '@angular/material/tabs', '@angular/flex-layout/extended', 'ngx-color/chrome', '@angular/router', 'delaunator', 'three/examples/jsm/helpers/VertexNormalsHelper', '@angular/cdk/portal', 'file-saver', 'ng2-pdf-viewer', 'html2canvas', 'three/examples/jsm/controls/OrbitControls', 'three/examples/jsm/loaders/FBXLoader', 'three/examples/jsm/loaders/TDSLoader', 'three/examples/jsm/loaders/STLLoader', '@angular/material/radio', '@angular/material/toolbar', '@angular/material/menu', '@angular/material/card', '@angular/material/sidenav', '@angular/material/badge', '@colijnit/articleapi/build/model/external-catalog-startup-info-request', '@colijnit/catalog', 'ngx-lightbox', '@angular/flex-layout', '@angular/cdk/drag-drop', 'jspdf', 'jspdf-autotable'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.homedecorator = {}), global.ng.core, global.rxjs, global.nodeType_enum, global.configuratorStatisticsEnvironment, global.options, global.dataServiceResponseData, global.frozenArticle, global.selection, global.answerPrice, global.article, global.decoNode, global.skipButtonInfo, global.configuratorapi, global.mainapi, global.articles, global.articleText_bo, global.businessObjectFactory, global.imageUtils, global.externalCatalogStartupInfo, global.catalogDefinition_bo, global.externalSource_bo, global.articleFullObject, global.articleCategory, global.articleFlat_bo, global.internalParam_enum, global.stringUtils, global.imageUtils$1, global.ng.common.http, global.axios, global.applyPatch, global.THREE, global.TWEEN, global.PolygonTools, global.threeGpuPathtracer, global.ParallelMeshBVHWorker_js, global.TextGeometry, global.FontLoader, global.XRControllerModelFactory, global.hdecoPositioning_enum, global.OutlinePass, global.EffectComposer, global.RenderPass, global.ShaderPass, global.FXAAShader, global.OutputPass, global.md5, global.GUI, global.n8ao, global.TAARenderPass, global.ng.platformBrowser, global.i2$1, global.ng.material.icon, global.ng.animations, global.ng.common, global.ng.material.dialog, global.RGBELoader, global.hdecoPlacement_enum, global.rxjs["internal/observable/fromEvent"], global.rxjs.operators, global.rxjs["internal/observable/of"], global.BufferGeometryUtils, global.OBJLoader, global.MTLLoader, global.GLTFLoader, global.GLTFExporter, global.DRACOLoader, global.KTX2Loader, global.USDZExporter, global.ng.material.list, global.ng.material.core, global.decoNodeType_enum, global.JSZip, global.decoNodeKind_enum, global.ng.material.checkbox, global.ng.material.button, global.ng.forms, global.BufferGeometryUtils$1, global.threeMeshBvh, global.constants, global.i4, global.ng.material.formField, global.ng.material.select, global.ng.material.tooltip, global.i4$1, global.ng.material.slider, global.ng.material.input, global.dat, global.realityserverClient, global.ng.material.gridList, global.ng.material.progressSpinner, global.ng.flexLayout.flex, global.ng.material.progressBar, global.DecalGeometry, global.fabric, global.ng.material.buttonToggle, global.ng.material.snackBar, global.ng.material.slideToggle, global.ng.material.divider, global.imageCompression, global.ng.material.tabs, global.ng.flexLayout.extended, global.i1$3, global.ng.router, global.Delaunator, global.VertexNormalsHelper, global.ng.cdk.portal, global.fileSaver, global.i6$2, global.html2canvas, global.OrbitControls, global.FBXLoader, global.TDSLoader, global.STLLoader, global.ng.material.radio, global.ng.material.toolbar, global.ng.material.menu, global.ng.material.card, global.ng.material.sidenav, global.ng.material.badge, global.externalCatalogStartupInfoRequest, global.i7$3, global.i1$5, global.ng.flexLayout, global.ng.cdk.dragDrop, global.jspdf, global.autoTable));
5
+ })(this, (function (exports, i0, rxjs, nodeType_enum, configuratorStatisticsEnvironment, options, dataServiceResponseData, frozenArticle, selection, answerPrice, article, decoNode, skipButtonInfo, configuratorapi, mainapi, articles, articleText_bo, businessObjectFactory, imageUtils, externalCatalogStartupInfo, catalogDefinition_bo, externalSource_bo, articleFullObject, articleCategory, articleFlat_bo, internalParam_enum, stringUtils, imageUtils$1, i2, axios, applyPatch, THREE, TWEEN, PolygonTools, threeGpuPathtracer, ParallelMeshBVHWorker_js, TextGeometry, FontLoader, XRControllerModelFactory, hdecoPositioning_enum, OutlinePass, EffectComposer, RenderPass, ShaderPass, FXAAShader, OutputPass, md5, GUI, n8ao, TAARenderPass, i1, i2$1, i5$1, animations, i5, i1$1, RGBELoader, hdecoPlacement_enum, fromEvent, operators, of, BufferGeometryUtils, OBJLoader, MTLLoader, GLTFLoader, GLTFExporter, DRACOLoader, KTX2Loader, USDZExporter, i2$2, i3, decoNodeType_enum, JSZip, decoNodeKind_enum, i1$2, i3$1, i8, BufferGeometryUtils$1, threeMeshBvh, constants, i4, i7, i9, i10, i4$1, i7$1, i19, dat, realityserverClient, i3$2, i15, i3$3, i2$3, DecalGeometry, fabric, i7$2, i2$4, i10$1, i6, imageCompression, i1$4, i6$1, i1$3, i5$2, Delaunator, VertexNormalsHelper, i28, fileSaver, i6$2, html2canvas, OrbitControls, FBXLoader, TDSLoader, STLLoader, i9$1, i19$1, i22, i23, i26, i30, externalCatalogStartupInfoRequest, i7$3, i1$5, flexLayout, i10$2, jspdf, autoTable) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -71,7 +71,7 @@
71
71
  var i28__namespace = /*#__PURE__*/_interopNamespace(i28);
72
72
  var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
73
73
  var html2canvas__default = /*#__PURE__*/_interopDefaultLegacy(html2canvas);
74
- var i6__namespace$3 = /*#__PURE__*/_interopNamespace(i6$3);
74
+ var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
75
75
  var i19__namespace$1 = /*#__PURE__*/_interopNamespace(i19$1);
76
76
  var i22__namespace = /*#__PURE__*/_interopNamespace(i22);
77
77
  var i23__namespace = /*#__PURE__*/_interopNamespace(i23);
@@ -80,6 +80,7 @@
80
80
  var i7__namespace$3 = /*#__PURE__*/_interopNamespace(i7$3);
81
81
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
82
82
  var i10__namespace$2 = /*#__PURE__*/_interopNamespace(i10$2);
83
+ var autoTable__default = /*#__PURE__*/_interopDefaultLegacy(autoTable);
83
84
 
84
85
  /******************************************************************************
85
86
  Copyright (c) Microsoft Corporation.
@@ -210,7 +211,7 @@
210
211
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
211
212
  return Reflect.metadata(metadataKey, metadataValue);
212
213
  }
213
- function __awaiter$1n(thisArg, _arguments, P, generator) {
214
+ function __awaiter$1o(thisArg, _arguments, P, generator) {
214
215
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
215
216
  return new (P || (P = Promise))(function (resolve, reject) {
216
217
  function fulfilled(value) { try {
@@ -535,7 +536,7 @@
535
536
  __decorate: __decorate,
536
537
  __param: __param,
537
538
  __metadata: __metadata,
538
- __awaiter: __awaiter$1n,
539
+ __awaiter: __awaiter$1o,
539
540
  __generator: __generator,
540
541
  __createBinding: __createBinding,
541
542
  __exportStar: __exportStar,
@@ -745,7 +746,7 @@
745
746
  }]
746
747
  }] });
747
748
 
748
- var __awaiter$1m = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
749
+ var __awaiter$1n = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
749
750
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
750
751
  return new (P || (P = Promise))(function (resolve, reject) {
751
752
  function fulfilled(value) { try {
@@ -821,7 +822,7 @@
821
822
  configurable: true
822
823
  });
823
824
  HomedecoratorConnectorAdapterService.prototype.initConnector = function (options, externalSource, forceReload, externalSourceId) {
824
- return __awaiter$1m(this, void 0, void 0, function () {
825
+ return __awaiter$1n(this, void 0, void 0, function () {
825
826
  var renewConnector, _a, externalSourceData, externalMainApi, externalVersion, catalogSettings, externalConfigurator, loginResponse, externalArticleApi, externalConnector;
826
827
  var _this = this;
827
828
  return __generator(this, function (_b) {
@@ -898,7 +899,7 @@
898
899
  });
899
900
  };
900
901
  HomedecoratorConnectorAdapterService.prototype.logOut = function () {
901
- return __awaiter$1m(this, void 0, void 0, function () {
902
+ return __awaiter$1n(this, void 0, void 0, function () {
902
903
  return __generator(this, function (_a) {
903
904
  switch (_a.label) {
904
905
  case 0: return [4 /*yield*/, this.connector.logOut()];
@@ -933,7 +934,7 @@
933
934
  return 2;
934
935
  };
935
936
  HomedecoratorConnectorAdapterService.prototype.getWebViewStartupInfo = function (request) {
936
- return __awaiter$1m(this, void 0, void 0, function () {
937
+ return __awaiter$1n(this, void 0, void 0, function () {
937
938
  var response;
938
939
  return __generator(this, function (_a) {
939
940
  switch (_a.label) {
@@ -952,7 +953,7 @@
952
953
  });
953
954
  };
954
955
  HomedecoratorConnectorAdapterService.prototype.getGoodIdFromArticleNr = function (sku) {
955
- return __awaiter$1m(this, void 0, void 0, function () {
956
+ return __awaiter$1n(this, void 0, void 0, function () {
956
957
  var response;
957
958
  return __generator(this, function (_a) {
958
959
  switch (_a.label) {
@@ -980,7 +981,7 @@
980
981
  return this.connector.copyInstance(instanceId, shouldSaveCurrentInstanceId);
981
982
  };
982
983
  HomedecoratorConnectorAdapterService.prototype.saveConfigurations = function () {
983
- return __awaiter$1m(this, void 0, void 0, function () {
984
+ return __awaiter$1n(this, void 0, void 0, function () {
984
985
  var _a, _b, _i, key, connector;
985
986
  return __generator(this, function (_c) {
986
987
  switch (_c.label) {
@@ -1015,7 +1016,7 @@
1015
1016
  };
1016
1017
  // @returns The initial article
1017
1018
  HomedecoratorConnectorAdapterService.prototype.getArticle = function (sku, branch) {
1018
- return __awaiter$1m(this, void 0, void 0, function () {
1019
+ return __awaiter$1n(this, void 0, void 0, function () {
1019
1020
  var goodId;
1020
1021
  return __generator(this, function (_a) {
1021
1022
  switch (_a.label) {
@@ -1031,7 +1032,7 @@
1031
1032
  });
1032
1033
  };
1033
1034
  HomedecoratorConnectorAdapterService.prototype.getArticleQuickSel = function (goodId, branch) {
1034
- return __awaiter$1m(this, void 0, void 0, function () {
1035
+ return __awaiter$1n(this, void 0, void 0, function () {
1035
1036
  var response;
1036
1037
  return __generator(this, function (_a) {
1037
1038
  switch (_a.label) {
@@ -1056,7 +1057,7 @@
1056
1057
  return this.connector.getQuestionAndAnswers();
1057
1058
  };
1058
1059
  HomedecoratorConnectorAdapterService.prototype.getSelectionsAsync = function () {
1059
- return __awaiter$1m(this, void 0, void 0, function () {
1060
+ return __awaiter$1n(this, void 0, void 0, function () {
1060
1061
  var response;
1061
1062
  return __generator(this, function (_a) {
1062
1063
  switch (_a.label) {
@@ -1072,7 +1073,7 @@
1072
1073
  });
1073
1074
  };
1074
1075
  HomedecoratorConnectorAdapterService.prototype.getDecosAsync = function () {
1075
- return __awaiter$1m(this, void 0, void 0, function () {
1076
+ return __awaiter$1n(this, void 0, void 0, function () {
1076
1077
  var response;
1077
1078
  return __generator(this, function (_a) {
1078
1079
  switch (_a.label) {
@@ -1088,7 +1089,7 @@
1088
1089
  });
1089
1090
  };
1090
1091
  HomedecoratorConnectorAdapterService.prototype.getAnswerPrices = function () {
1091
- return __awaiter$1m(this, void 0, void 0, function () {
1092
+ return __awaiter$1n(this, void 0, void 0, function () {
1092
1093
  var response;
1093
1094
  return __generator(this, function (_a) {
1094
1095
  switch (_a.label) {
@@ -1103,15 +1104,16 @@
1103
1104
  });
1104
1105
  });
1105
1106
  };
1106
- HomedecoratorConnectorAdapterService.prototype.getJsonConfiguredArticles = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
1107
+ HomedecoratorConnectorAdapterService.prototype.getJsonConfiguredArticles = function (goodId, goodType, quantity, externalSource, showLoader, instanceId, configuratorStatistics) {
1108
+ if (externalSource === void 0) { externalSource = false; }
1107
1109
  if (showLoader === void 0) { showLoader = true; }
1108
- return this.articleApi.getJsonArticleFlatTree(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
1110
+ return this.articleApi.getJsonArticleFlatTree(goodId, goodType, quantity, externalSource, showLoader, instanceId, configuratorStatistics);
1109
1111
  };
1110
1112
  // public getJsonMatchTableArticles(): Promise<void> {
1111
1113
  // return this.connector.getJsonMatchTableArticles();
1112
1114
  // }
1113
1115
  HomedecoratorConnectorAdapterService.prototype.setInstanceToConfigure = function (id) {
1114
- return __awaiter$1m(this, void 0, void 0, function () {
1116
+ return __awaiter$1n(this, void 0, void 0, function () {
1115
1117
  return __generator(this, function (_a) {
1116
1118
  if (id !== null) {
1117
1119
  return [2 /*return*/, this.connector.setInstanceToConfigure(id)];
@@ -1124,7 +1126,7 @@
1124
1126
  });
1125
1127
  };
1126
1128
  HomedecoratorConnectorAdapterService.prototype.selectAnswer = function (answer, userInput) {
1127
- return __awaiter$1m(this, void 0, void 0, function () {
1129
+ return __awaiter$1n(this, void 0, void 0, function () {
1128
1130
  return __generator(this, function (_a) {
1129
1131
  return [2 /*return*/, this.connector.selectAnswer(answer, false, userInput)];
1130
1132
  });
@@ -1146,7 +1148,7 @@
1146
1148
  HomedecoratorConnectorAdapterService.prototype.getImageForAnswerOrSelection = function (answerOrSelection, publication, thumbNail, showLoader) {
1147
1149
  if (thumbNail === void 0) { thumbNail = true; }
1148
1150
  if (showLoader === void 0) { showLoader = true; }
1149
- return __awaiter$1m(this, void 0, void 0, function () {
1151
+ return __awaiter$1n(this, void 0, void 0, function () {
1150
1152
  var response;
1151
1153
  return __generator(this, function (_a) {
1152
1154
  switch (_a.label) {
@@ -1170,7 +1172,7 @@
1170
1172
  });
1171
1173
  };
1172
1174
  HomedecoratorConnectorAdapterService.prototype.getSkipButtonImageAndText = function (goodId) {
1173
- return __awaiter$1m(this, void 0, void 0, function () {
1175
+ return __awaiter$1n(this, void 0, void 0, function () {
1174
1176
  var response;
1175
1177
  return __generator(this, function (_a) {
1176
1178
  switch (_a.label) {
@@ -1190,7 +1192,7 @@
1190
1192
  return this.getImageForAnswerOrSelection(answerOrSelection, 32);
1191
1193
  };
1192
1194
  HomedecoratorConnectorAdapterService.prototype.getAnswerInfo = function (answer) {
1193
- return __awaiter$1m(this, void 0, void 0, function () {
1195
+ return __awaiter$1n(this, void 0, void 0, function () {
1194
1196
  var response;
1195
1197
  return __generator(this, function (_a) {
1196
1198
  switch (_a.label) {
@@ -1206,7 +1208,7 @@
1206
1208
  });
1207
1209
  };
1208
1210
  HomedecoratorConnectorAdapterService.prototype.getInternalParameter = function (parameter) {
1209
- return __awaiter$1m(this, void 0, void 0, function () {
1211
+ return __awaiter$1n(this, void 0, void 0, function () {
1210
1212
  var response;
1211
1213
  return __generator(this, function (_a) {
1212
1214
  switch (_a.label) {
@@ -1225,13 +1227,11 @@
1225
1227
  });
1226
1228
  };
1227
1229
  HomedecoratorConnectorAdapterService.prototype.store3DModelCDN = function (filename, fileContents) {
1228
- return __awaiter$1m(this, void 0, void 0, function () {
1229
- var int8Array, response;
1230
+ return __awaiter$1n(this, void 0, void 0, function () {
1231
+ var response;
1230
1232
  return __generator(this, function (_a) {
1231
1233
  switch (_a.label) {
1232
- case 0:
1233
- int8Array = new Int8Array(fileContents);
1234
- return [4 /*yield*/, this.mainApi.uploadModelToCDN(filename, int8Array)];
1234
+ case 0: return [4 /*yield*/, this.mainApi.uploadModelToCDN(filename, fileContents)];
1235
1235
  case 1:
1236
1236
  response = _a.sent();
1237
1237
  if (response && response.validationResult && response.validationResult.success) {
@@ -1246,11 +1246,11 @@
1246
1246
  });
1247
1247
  };
1248
1248
  HomedecoratorConnectorAdapterService.prototype.getCatalogDefinitionsList = function () {
1249
- return __awaiter$1m(this, void 0, void 0, function () {
1249
+ return __awaiter$1n(this, void 0, void 0, function () {
1250
1250
  var response;
1251
1251
  return __generator(this, function (_a) {
1252
1252
  switch (_a.label) {
1253
- case 0: return [4 /*yield*/, this._articleApi.getCatalogDefinitions().catch(function (e) {
1253
+ case 0: return [4 /*yield*/, this.articleApi.getCatalogDefinitions().catch(function (e) {
1254
1254
  return new dataServiceResponseData.DataServiceResponseData();
1255
1255
  })];
1256
1256
  case 1:
@@ -1267,7 +1267,7 @@
1267
1267
  });
1268
1268
  };
1269
1269
  HomedecoratorConnectorAdapterService.prototype.getExternalSource = function (externalSourceId) {
1270
- return __awaiter$1m(this, void 0, void 0, function () {
1270
+ return __awaiter$1n(this, void 0, void 0, function () {
1271
1271
  var response;
1272
1272
  return __generator(this, function (_a) {
1273
1273
  switch (_a.label) {
@@ -1275,7 +1275,7 @@
1275
1275
  if (!externalSourceId) {
1276
1276
  return [2 /*return*/, null];
1277
1277
  }
1278
- return [4 /*yield*/, this._articleApi.getExternalSource(externalSourceId)];
1278
+ return [4 /*yield*/, this.articleApi.getExternalSource(externalSourceId)];
1279
1279
  case 1:
1280
1280
  response = _a.sent();
1281
1281
  if (response && response.validationResult && response.validationResult.success) {
@@ -1295,7 +1295,7 @@
1295
1295
  });
1296
1296
  };
1297
1297
  HomedecoratorConnectorAdapterService.prototype.getArticleFullObject = function (goodId) {
1298
- return __awaiter$1m(this, void 0, void 0, function () {
1298
+ return __awaiter$1n(this, void 0, void 0, function () {
1299
1299
  var result;
1300
1300
  return __generator(this, function (_a) {
1301
1301
  switch (_a.label) {
@@ -1314,7 +1314,7 @@
1314
1314
  });
1315
1315
  };
1316
1316
  HomedecoratorConnectorAdapterService.prototype.getArticleCategories = function (publicationCode) {
1317
- return __awaiter$1m(this, void 0, void 0, function () {
1317
+ return __awaiter$1n(this, void 0, void 0, function () {
1318
1318
  var result;
1319
1319
  return __generator(this, function (_a) {
1320
1320
  switch (_a.label) {
@@ -1334,7 +1334,7 @@
1334
1334
  };
1335
1335
  //
1336
1336
  HomedecoratorConnectorAdapterService.prototype.getArticleFlat = function (sku) {
1337
- return __awaiter$1m(this, void 0, void 0, function () {
1337
+ return __awaiter$1n(this, void 0, void 0, function () {
1338
1338
  var result;
1339
1339
  return __generator(this, function (_a) {
1340
1340
  switch (_a.label) {
@@ -1384,7 +1384,7 @@
1384
1384
  }]
1385
1385
  }], ctorParameters: function () { return [{ type: HomedecoratorAppEventService }]; } });
1386
1386
 
1387
- var __awaiter$1l = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1387
+ var __awaiter$1m = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1388
1388
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1389
1389
  return new (P || (P = Promise))(function (resolve, reject) {
1390
1390
  function fulfilled(value) { try {
@@ -1408,10 +1408,10 @@
1408
1408
  }
1409
1409
  JsonUtilsService.prototype.readJsonFile = function (filePath, includeBaseUrl) {
1410
1410
  if (includeBaseUrl === void 0) { includeBaseUrl = true; }
1411
- return __awaiter$1l(this, void 0, void 0, function () {
1411
+ return __awaiter$1m(this, void 0, void 0, function () {
1412
1412
  var _this = this;
1413
1413
  return __generator(this, function (_a) {
1414
- return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter$1l(_this, void 0, void 0, function () {
1414
+ return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter$1m(_this, void 0, void 0, function () {
1415
1415
  var response, empty_1, e_1;
1416
1416
  return __generator(this, function (_a) {
1417
1417
  switch (_a.label) {
@@ -1512,6 +1512,7 @@
1512
1512
  this.useRenderWebsocket = false;
1513
1513
  this.productRenderSceneAssetId = 'scene_studio_eevee';
1514
1514
  this.pathTracer = false;
1515
+ this.ssrEnabled = false;
1515
1516
  this.maxRenderSamples = 100;
1516
1517
  }
1517
1518
  return HomedecoratorSettingsOptions;
@@ -1594,7 +1595,7 @@
1594
1595
  return value === null || value === undefined || value === '';
1595
1596
  }
1596
1597
 
1597
- var __awaiter$1k = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1598
+ var __awaiter$1l = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1598
1599
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1599
1600
  return new (P || (P = Promise))(function (resolve, reject) {
1600
1601
  function fulfilled(value) { try {
@@ -1640,7 +1641,7 @@
1640
1641
  return text ? text : key;
1641
1642
  };
1642
1643
  HomedecoratorDictionaryService.prototype.setDictionary = function (path, client, languageCode, additionalTranslationFile) {
1643
- return __awaiter$1k(this, void 0, void 0, function () {
1644
+ return __awaiter$1l(this, void 0, void 0, function () {
1644
1645
  var dictionaryData, fileName, fileName;
1645
1646
  return __generator(this, function (_a) {
1646
1647
  switch (_a.label) {
@@ -1676,7 +1677,7 @@
1676
1677
  });
1677
1678
  };
1678
1679
  HomedecoratorDictionaryService.prototype._getDictionaryData = function (path) {
1679
- return __awaiter$1k(this, void 0, void 0, function () {
1680
+ return __awaiter$1l(this, void 0, void 0, function () {
1680
1681
  return __generator(this, function (_a) {
1681
1682
  switch (_a.label) {
1682
1683
  case 0: return [4 /*yield*/, this._jsonUtilsService.readJsonFile(path, false)
@@ -1699,7 +1700,7 @@
1699
1700
  }]
1700
1701
  }], ctorParameters: function () { return [{ type: JsonUtilsService }]; } });
1701
1702
 
1702
- var __awaiter$1j = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1703
+ var __awaiter$1k = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1703
1704
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1704
1705
  return new (P || (P = Promise))(function (resolve, reject) {
1705
1706
  function fulfilled(value) { try {
@@ -1785,7 +1786,7 @@
1785
1786
  }
1786
1787
  };
1787
1788
  HomedecoratorSettingsService.prototype.initializeSettings = function () {
1788
- return __awaiter$1j(this, void 0, void 0, function () {
1789
+ return __awaiter$1k(this, void 0, void 0, function () {
1789
1790
  var jsonSettings;
1790
1791
  return __generator(this, function (_a) {
1791
1792
  switch (_a.label) {
@@ -1809,7 +1810,7 @@
1809
1810
  });
1810
1811
  };
1811
1812
  HomedecoratorSettingsService.prototype.initialize = function (settings) {
1812
- return __awaiter$1j(this, void 0, void 0, function () {
1813
+ return __awaiter$1k(this, void 0, void 0, function () {
1813
1814
  var path, e_1, path, uploadSetting;
1814
1815
  return __generator(this, function (_a) {
1815
1816
  switch (_a.label) {
@@ -1864,7 +1865,7 @@
1864
1865
  });
1865
1866
  };
1866
1867
  HomedecoratorSettingsService.prototype._checkUrlParameters = function () {
1867
- return __awaiter$1j(this, void 0, void 0, function () {
1868
+ return __awaiter$1k(this, void 0, void 0, function () {
1868
1869
  var urlParams, client, jsonSettings;
1869
1870
  return __generator(this, function (_a) {
1870
1871
  switch (_a.label) {
@@ -1895,7 +1896,7 @@
1895
1896
  }]
1896
1897
  }], ctorParameters: function () { return [{ type: JsonUtilsService }, { type: HomedecoratorDictionaryService }, { type: HomedecoratorConnectorAdapterService }]; } });
1897
1898
 
1898
- var __awaiter$1i = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1899
+ var __awaiter$1j = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1899
1900
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1900
1901
  return new (P || (P = Promise))(function (resolve, reject) {
1901
1902
  function fulfilled(value) { try {
@@ -1939,7 +1940,7 @@
1939
1940
  configurable: true
1940
1941
  });
1941
1942
  SkipButtonInfoService.prototype.getSkipButtonImageAndText = function (goodId) {
1942
- return __awaiter$1i(this, void 0, void 0, function () {
1943
+ return __awaiter$1j(this, void 0, void 0, function () {
1943
1944
  var skipButtonInfo, image;
1944
1945
  return __generator(this, function (_a) {
1945
1946
  switch (_a.label) {
@@ -2030,7 +2031,7 @@
2030
2031
  }]
2031
2032
  }] });
2032
2033
 
2033
- var __awaiter$1h = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2034
+ var __awaiter$1i = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2034
2035
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2035
2036
  return new (P || (P = Promise))(function (resolve, reject) {
2036
2037
  function fulfilled(value) { try {
@@ -2137,7 +2138,7 @@
2137
2138
  configurable: true
2138
2139
  });
2139
2140
  PermanentStoreService.prototype.updateRegisterForm = function (furniture) {
2140
- return __awaiter$1h(this, void 0, void 0, function () {
2141
+ return __awaiter$1i(this, void 0, void 0, function () {
2141
2142
  var collectiveSheetKey, collectiveSheetScriptURL, customSheetScriptURL, sheetKey, postUrl, hostUrl, payLoad;
2142
2143
  var _this = this;
2143
2144
  return __generator(this, function (_a) {
@@ -2269,7 +2270,7 @@
2269
2270
  }]
2270
2271
  }], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }, { type: PermanentStoreService }]; } });
2271
2272
 
2272
- var __awaiter$1g = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2273
+ var __awaiter$1h = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2273
2274
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2274
2275
  return new (P || (P = Promise))(function (resolve, reject) {
2275
2276
  function fulfilled(value) { try {
@@ -2409,14 +2410,14 @@
2409
2410
  this._imageCache.clear();
2410
2411
  };
2411
2412
  HomedecoratorConnectorService.prototype.getWebViewStartupInfo = function (request) {
2412
- return __awaiter$1g(this, void 0, void 0, function () {
2413
+ return __awaiter$1h(this, void 0, void 0, function () {
2413
2414
  return __generator(this, function (_a) {
2414
2415
  return [2 /*return*/, this._connector.getWebViewStartupInfo(request)];
2415
2416
  });
2416
2417
  });
2417
2418
  };
2418
2419
  HomedecoratorConnectorService.prototype.initNodeInstance = function (sku) {
2419
- return __awaiter$1g(this, void 0, void 0, function () {
2420
+ return __awaiter$1h(this, void 0, void 0, function () {
2420
2421
  var goodId, response;
2421
2422
  return __generator(this, function (_a) {
2422
2423
  switch (_a.label) {
@@ -2432,7 +2433,7 @@
2432
2433
  });
2433
2434
  };
2434
2435
  HomedecoratorConnectorService.prototype.changeConnection = function (instanceId, oldConnection, newConnection) {
2435
- return __awaiter$1g(this, void 0, void 0, function () {
2436
+ return __awaiter$1h(this, void 0, void 0, function () {
2436
2437
  var response;
2437
2438
  return __generator(this, function (_a) {
2438
2439
  switch (_a.label) {
@@ -2467,7 +2468,7 @@
2467
2468
  this._decoNodes = decoNodes;
2468
2469
  };
2469
2470
  HomedecoratorConnectorService.prototype.initConnection = function (forceReload) {
2470
- return __awaiter$1g(this, void 0, void 0, function () {
2471
+ return __awaiter$1h(this, void 0, void 0, function () {
2471
2472
  var settings, e_1;
2472
2473
  var _this = this;
2473
2474
  return __generator(this, function (_a) {
@@ -2506,15 +2507,16 @@
2506
2507
  HomedecoratorConnectorService.prototype.getInternalParameter = function (param) {
2507
2508
  return this._connector.getInternalParameter(param);
2508
2509
  };
2509
- HomedecoratorConnectorService.prototype.getJsonConfiguredArticles = function (goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics) {
2510
+ HomedecoratorConnectorService.prototype.getJsonConfiguredArticles = function (goodId, goodType, quantity, externalSource, showLoader, instanceId, configuratorStatistics) {
2511
+ if (externalSource === void 0) { externalSource = false; }
2510
2512
  if (showLoader === void 0) { showLoader = true; }
2511
- return this._connector.getJsonConfiguredArticles(goodId, goodType, quantity, showLoader, instanceId, configuratorStatistics);
2513
+ return this._connector.getJsonConfiguredArticles(goodId, goodType, quantity, externalSource, showLoader, instanceId, configuratorStatistics);
2512
2514
  };
2513
2515
  // public getJsonMatchTableArticles(): Promise<any> {
2514
2516
  // return this._connector.getJsonMatchTableArticles();
2515
2517
  // }
2516
2518
  HomedecoratorConnectorService.prototype.setInstance = function (id) {
2517
- return __awaiter$1g(this, void 0, void 0, function () {
2519
+ return __awaiter$1h(this, void 0, void 0, function () {
2518
2520
  var response;
2519
2521
  return __generator(this, function (_a) {
2520
2522
  switch (_a.label) {
@@ -2536,7 +2538,7 @@
2536
2538
  return this._copyInstance(instanceId, false, result);
2537
2539
  };
2538
2540
  HomedecoratorConnectorService.prototype.saveConfigurations = function () {
2539
- return __awaiter$1g(this, void 0, void 0, function () {
2541
+ return __awaiter$1h(this, void 0, void 0, function () {
2540
2542
  var success;
2541
2543
  return __generator(this, function (_a) {
2542
2544
  switch (_a.label) {
@@ -2552,14 +2554,17 @@
2552
2554
  });
2553
2555
  };
2554
2556
  HomedecoratorConnectorService.prototype.getArticle = function (sku, branch) {
2555
- return __awaiter$1g(this, void 0, void 0, function () {
2557
+ return __awaiter$1h(this, void 0, void 0, function () {
2556
2558
  var article;
2557
2559
  return __generator(this, function (_a) {
2558
2560
  switch (_a.label) {
2559
- case 0: return [4 /*yield*/, this._connector.getArticle(sku, branch)
2560
- .catch(function (e) {
2561
- return Promise.reject(e);
2562
- })];
2561
+ case 0:
2562
+ this.selections = [];
2563
+ this._decoNodes = [];
2564
+ return [4 /*yield*/, this._connector.getArticle(sku, branch)
2565
+ .catch(function (e) {
2566
+ return Promise.reject(e);
2567
+ })];
2563
2568
  case 1:
2564
2569
  article = _a.sent();
2565
2570
  this.articleReceived.next(article);
@@ -2581,7 +2586,7 @@
2581
2586
  // this._connector.getQuestionAndAnswers();
2582
2587
  // }
2583
2588
  HomedecoratorConnectorService.prototype.getQuestionAndAnswersAsync = function () {
2584
- return __awaiter$1g(this, void 0, void 0, function () {
2589
+ return __awaiter$1h(this, void 0, void 0, function () {
2585
2590
  var questionAndAnswers;
2586
2591
  var _this = this;
2587
2592
  return __generator(this, function (_a) {
@@ -2596,7 +2601,7 @@
2596
2601
  });
2597
2602
  };
2598
2603
  HomedecoratorConnectorService.prototype.getSelectionsAsync = function () {
2599
- return __awaiter$1g(this, void 0, void 0, function () {
2604
+ return __awaiter$1h(this, void 0, void 0, function () {
2600
2605
  var selections;
2601
2606
  return __generator(this, function (_a) {
2602
2607
  switch (_a.label) {
@@ -2616,7 +2621,7 @@
2616
2621
  });
2617
2622
  };
2618
2623
  HomedecoratorConnectorService.prototype.getDecosAsync = function () {
2619
- return __awaiter$1g(this, void 0, void 0, function () {
2624
+ return __awaiter$1h(this, void 0, void 0, function () {
2620
2625
  var _a;
2621
2626
  return __generator(this, function (_b) {
2622
2627
  switch (_b.label) {
@@ -2652,7 +2657,7 @@
2652
2657
  return this._connector.replaceSelection(selection);
2653
2658
  };
2654
2659
  HomedecoratorConnectorService.prototype.getAnswerInfo = function (answer) {
2655
- return __awaiter$1g(this, void 0, void 0, function () {
2660
+ return __awaiter$1h(this, void 0, void 0, function () {
2656
2661
  var articleTexts;
2657
2662
  return __generator(this, function (_a) {
2658
2663
  switch (_a.label) {
@@ -2667,7 +2672,7 @@
2667
2672
  };
2668
2673
  HomedecoratorConnectorService.prototype.extendWithAnswerTextAndImage = function (answer, showLoader) {
2669
2674
  if (showLoader === void 0) { showLoader = true; }
2670
- return __awaiter$1g(this, void 0, void 0, function () {
2675
+ return __awaiter$1h(this, void 0, void 0, function () {
2671
2676
  var _this = this;
2672
2677
  return __generator(this, function (_a) {
2673
2678
  if (answer.nodeId) {
@@ -2693,7 +2698,7 @@
2693
2698
  };
2694
2699
  HomedecoratorConnectorService.prototype.extendWithSelectionImage = function (selection, showLoader) {
2695
2700
  if (showLoader === void 0) { showLoader = true; }
2696
- return __awaiter$1g(this, void 0, void 0, function () {
2701
+ return __awaiter$1h(this, void 0, void 0, function () {
2697
2702
  var _this = this;
2698
2703
  return __generator(this, function (_a) {
2699
2704
  if (selection.nodeId) {
@@ -2816,8 +2821,8 @@
2816
2821
  }
2817
2822
  });
2818
2823
  };
2819
- HomedecoratorConnectorService.prototype.addToCart = function (goodId, goodType, quantity, instanceId) {
2820
- return __awaiter$1g(this, void 0, void 0, function () {
2824
+ HomedecoratorConnectorService.prototype.addToCart = function (goodId, goodType, quantity, instanceId, externalSource) {
2825
+ return __awaiter$1h(this, void 0, void 0, function () {
2821
2826
  var json, statistics, frozenArticle$1;
2822
2827
  return __generator(this, function (_a) {
2823
2828
  switch (_a.label) {
@@ -2829,7 +2834,7 @@
2829
2834
  statistics.sessionId = this._settingsService.settings.session ? this._settingsService.settings.session.sessionId : 'unknown';
2830
2835
  statistics.webHost = window.location.host;
2831
2836
  statistics.bundleHost = window.location.host;
2832
- return [4 /*yield*/, this.getJsonConfiguredArticles(goodId, goodType, quantity, false, instanceId, statistics)];
2837
+ return [4 /*yield*/, this.getJsonConfiguredArticles(goodId, goodType, quantity, externalSource, true, instanceId, statistics)];
2833
2838
  case 1:
2834
2839
  json = _a.sent();
2835
2840
  frozenArticle$1 = JSON.parse(json);
@@ -2845,7 +2850,7 @@
2845
2850
  });
2846
2851
  };
2847
2852
  HomedecoratorConnectorService.prototype.handleAnswersReceived = function (answers) {
2848
- return __awaiter$1g(this, void 0, void 0, function () {
2853
+ return __awaiter$1h(this, void 0, void 0, function () {
2849
2854
  return __generator(this, function (_a) {
2850
2855
  this._activeAnswers = answers;
2851
2856
  this.answerCountReceived.next(this._activeAnswers.length);
@@ -2961,7 +2966,7 @@
2961
2966
  };
2962
2967
  // POSTCONDITION: current activeAnswers have price values.
2963
2968
  HomedecoratorConnectorService.prototype._loadPricesOfActiveAnswers = function () {
2964
- return __awaiter$1g(this, void 0, void 0, function () {
2969
+ return __awaiter$1h(this, void 0, void 0, function () {
2965
2970
  var answerPrices;
2966
2971
  var _this = this;
2967
2972
  return __generator(this, function (_a) {
@@ -2988,7 +2993,7 @@
2988
2993
  });
2989
2994
  };
2990
2995
  HomedecoratorConnectorService.prototype._copyInstance = function (originalInstanceId, shouldSaveCurrentInstanceId, result) {
2991
- return __awaiter$1g(this, void 0, void 0, function () {
2996
+ return __awaiter$1h(this, void 0, void 0, function () {
2992
2997
  var copyInstanceResponse, newInstanceId;
2993
2998
  return __generator(this, function (_a) {
2994
2999
  switch (_a.label) {
@@ -3033,7 +3038,7 @@
3033
3038
  }]
3034
3039
  }], ctorParameters: function () { return [{ type: HomedecoratorConnectorAdapterService }, { type: JsonUtilsService }, { type: HomedecoratorSettingsService }, { type: SkipButtonInfoService }, { type: MessageBusService }, { type: HomedecoratorAppEventService }, { type: GoogleTagManagerService }]; } });
3035
3040
 
3036
- var __awaiter$1f = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3041
+ var __awaiter$1g = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3037
3042
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3038
3043
  return new (P || (P = Promise))(function (resolve, reject) {
3039
3044
  function fulfilled(value) { try {
@@ -3090,7 +3095,7 @@
3090
3095
  window.history.replaceState(data, title, url);
3091
3096
  };
3092
3097
  AppStateService.prototype.undo = function () {
3093
- return __awaiter$1f(this, void 0, void 0, function () {
3098
+ return __awaiter$1g(this, void 0, void 0, function () {
3094
3099
  return __generator(this, function (_a) {
3095
3100
  switch (_a.label) {
3096
3101
  case 0:
@@ -3104,7 +3109,7 @@
3104
3109
  });
3105
3110
  };
3106
3111
  AppStateService.prototype.redo = function () {
3107
- return __awaiter$1f(this, void 0, void 0, function () {
3112
+ return __awaiter$1g(this, void 0, void 0, function () {
3108
3113
  return __generator(this, function (_a) {
3109
3114
  switch (_a.label) {
3110
3115
  case 0:
@@ -3382,7 +3387,7 @@
3382
3387
  }]
3383
3388
  }], ctorParameters: function () { return []; } });
3384
3389
 
3385
- var __awaiter$1e = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3390
+ var __awaiter$1f = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3386
3391
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3387
3392
  return new (P || (P = Promise))(function (resolve, reject) {
3388
3393
  function fulfilled(value) { try {
@@ -3427,7 +3432,7 @@
3427
3432
  }
3428
3433
  };
3429
3434
  LocalStorageService.prototype.getRecoverySaveState = function () {
3430
- return __awaiter$1e(this, void 0, void 0, function () {
3435
+ return __awaiter$1f(this, void 0, void 0, function () {
3431
3436
  var indexedDBSave, localStorageSave;
3432
3437
  return __generator(this, function (_a) {
3433
3438
  switch (_a.label) {
@@ -3450,7 +3455,7 @@
3450
3455
  });
3451
3456
  };
3452
3457
  LocalStorageService.prototype.getIndexedDBSaveState = function () {
3453
- return __awaiter$1e(this, void 0, void 0, function () {
3458
+ return __awaiter$1f(this, void 0, void 0, function () {
3454
3459
  var getMessage;
3455
3460
  return __generator(this, function (_a) {
3456
3461
  switch (_a.label) {
@@ -3463,7 +3468,7 @@
3463
3468
  });
3464
3469
  };
3465
3470
  LocalStorageService.prototype.writeIndexedDBSaveState = function (saveState) {
3466
- return __awaiter$1e(this, void 0, void 0, function () {
3471
+ return __awaiter$1f(this, void 0, void 0, function () {
3467
3472
  var saveMessage;
3468
3473
  return __generator(this, function (_a) {
3469
3474
  switch (_a.label) {
@@ -3480,7 +3485,7 @@
3480
3485
  });
3481
3486
  };
3482
3487
  LocalStorageService.prototype.checkForLocalSave = function () {
3483
- return __awaiter$1e(this, void 0, void 0, function () {
3488
+ return __awaiter$1f(this, void 0, void 0, function () {
3484
3489
  var indexedDBSave;
3485
3490
  return __generator(this, function (_a) {
3486
3491
  switch (_a.label) {
@@ -3512,7 +3517,7 @@
3512
3517
  }]
3513
3518
  }], ctorParameters: function () { return [{ type: WebWorkerService }]; } });
3514
3519
 
3515
- var __awaiter$1d = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3520
+ var __awaiter$1e = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3516
3521
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3517
3522
  return new (P || (P = Promise))(function (resolve, reject) {
3518
3523
  function fulfilled(value) { try {
@@ -3603,7 +3608,7 @@
3603
3608
  }
3604
3609
  };
3605
3610
  FileUtils.SaveGLBFile = function (data, assetPath) {
3606
- return __awaiter$1d(this, void 0, void 0, function () {
3611
+ return __awaiter$1e(this, void 0, void 0, function () {
3607
3612
  return __generator(this, function (_a) {
3608
3613
  return [2 /*return*/, new Promise(function (resolve, reject) {
3609
3614
  var xhr = new XMLHttpRequest();
@@ -3762,7 +3767,7 @@
3762
3767
  }());
3763
3768
  FileUtils._cachedTextureUploads = new Map();
3764
3769
 
3765
- var __awaiter$1c = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3770
+ var __awaiter$1d = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3766
3771
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3767
3772
  return new (P || (P = Promise))(function (resolve, reject) {
3768
3773
  function fulfilled(value) { try {
@@ -3786,7 +3791,7 @@
3786
3791
  this._settingsService = _settingsService;
3787
3792
  }
3788
3793
  FileService.prototype.getTotalDownloadSize = function (files) {
3789
- return __awaiter$1c(this, void 0, void 0, function () {
3794
+ return __awaiter$1d(this, void 0, void 0, function () {
3790
3795
  var url, data, response;
3791
3796
  return __generator(this, function (_a) {
3792
3797
  switch (_a.label) {
@@ -3822,7 +3827,7 @@
3822
3827
  }]
3823
3828
  }], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }]; } });
3824
3829
 
3825
- var __awaiter$1b = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3830
+ var __awaiter$1c = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3826
3831
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3827
3832
  return new (P || (P = Promise))(function (resolve, reject) {
3828
3833
  function fulfilled(value) { try {
@@ -3859,7 +3864,7 @@
3859
3864
  configurable: true
3860
3865
  });
3861
3866
  ProgressService.prototype.prepareDownloads = function (furniture) {
3862
- return __awaiter$1b(this, void 0, void 0, function () {
3867
+ return __awaiter$1c(this, void 0, void 0, function () {
3863
3868
  var files, i, model, realUrl, url, _a;
3864
3869
  return __generator(this, function (_b) {
3865
3870
  switch (_b.label) {
@@ -4780,7 +4785,7 @@
4780
4785
  RelativePositionUtils.appOffsetTop = 0;
4781
4786
  RelativePositionUtils.appOffsetLeft = 0;
4782
4787
 
4783
- var __awaiter$1a = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4788
+ var __awaiter$1b = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4784
4789
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4785
4790
  return new (P || (P = Promise))(function (resolve, reject) {
4786
4791
  function fulfilled(value) { try {
@@ -4989,7 +4994,7 @@
4989
4994
  scope.pan(new THREE__namespace.Vector2(x, y));
4990
4995
  };
4991
4996
  this.animateCamera = function (type, change) {
4992
- return __awaiter$1a(this, void 0, void 0, function () {
4997
+ return __awaiter$1b(this, void 0, void 0, function () {
4993
4998
  var changing, tween;
4994
4999
  var _this = this;
4995
5000
  return __generator(this, function (_a) {
@@ -5005,7 +5010,7 @@
5005
5010
  });
5006
5011
  };
5007
5012
  this.animateCameraMovement = function (endPosition, endTarget, endDuration) {
5008
- return __awaiter$1a(this, void 0, void 0, function () {
5013
+ return __awaiter$1b(this, void 0, void 0, function () {
5009
5014
  var duration, position, target, targetTween, positionTween, targetPromise, positionPromise;
5010
5015
  var _this = this;
5011
5016
  return __generator(this, function (_a) {
@@ -5081,7 +5086,7 @@
5081
5086
  this.updatePositionTarget(this.camera.position, this.target);
5082
5087
  };
5083
5088
  this.animateMoveTo = function (target) {
5084
- return __awaiter$1a(this, void 0, void 0, function () {
5089
+ return __awaiter$1b(this, void 0, void 0, function () {
5085
5090
  var position, distance, tween;
5086
5091
  return __generator(this, function (_a) {
5087
5092
  position = scope.target.clone();
@@ -5272,7 +5277,7 @@
5272
5277
  return event && event.target && event.target === document.body;
5273
5278
  }
5274
5279
  function onMouseMove(event) {
5275
- return __awaiter$1a(this, void 0, void 0, function () {
5280
+ return __awaiter$1b(this, void 0, void 0, function () {
5276
5281
  var mousePos;
5277
5282
  return __generator(this, function (_a) {
5278
5283
  if (!isMouseEventAllowed(event)) {
@@ -5638,7 +5643,7 @@
5638
5643
  }]
5639
5644
  }] });
5640
5645
 
5641
- var __awaiter$19 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5646
+ var __awaiter$1a = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5642
5647
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5643
5648
  return new (P || (P = Promise))(function (resolve, reject) {
5644
5649
  function fulfilled(value) { try {
@@ -5849,7 +5854,7 @@
5849
5854
  this.cameraMovementChanged.next();
5850
5855
  };
5851
5856
  CameraService.prototype.moveCameraToFitObject = function (object, offset) {
5852
- return __awaiter$19(this, void 0, void 0, function () {
5857
+ return __awaiter$1a(this, void 0, void 0, function () {
5853
5858
  var boundingBox, center, size, maxDim, fov, cameraZ, newPosition, tween;
5854
5859
  return __generator(this, function (_a) {
5855
5860
  switch (_a.label) {
@@ -5919,7 +5924,7 @@
5919
5924
  return target.clone().add(new THREE.Vector3(0, targetDistance, targetDistance));
5920
5925
  };
5921
5926
  CameraService.prototype._placeWalkThroughCameraInCorner = function (viewCorner) {
5922
- return __awaiter$19(this, void 0, void 0, function () {
5927
+ return __awaiter$1a(this, void 0, void 0, function () {
5923
5928
  var center2d, center, corner2d, corner, distance, diff, lerpAlpha, nearCorner, tween;
5924
5929
  return __generator(this, function (_a) {
5925
5930
  switch (_a.label) {
@@ -6110,7 +6115,7 @@
6110
6115
  }]
6111
6116
  }], ctorParameters: function () { return []; } });
6112
6117
 
6113
- var __awaiter$18 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6118
+ var __awaiter$19 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6114
6119
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6115
6120
  return new (P || (P = Promise))(function (resolve, reject) {
6116
6121
  function fulfilled(value) { try {
@@ -6136,7 +6141,7 @@
6136
6141
  this.messages = [];
6137
6142
  }
6138
6143
  MessageBoardService.prototype.init = function (scene) {
6139
- return __awaiter$18(this, void 0, void 0, function () {
6144
+ return __awaiter$19(this, void 0, void 0, function () {
6140
6145
  return __generator(this, function (_a) {
6141
6146
  this.scene = scene;
6142
6147
  if (this._settingsService.settings.options.xrDebug) {
@@ -6178,7 +6183,7 @@
6178
6183
  }]
6179
6184
  }], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }, { type: FontService }]; } });
6180
6185
 
6181
- var __awaiter$17 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6186
+ var __awaiter$18 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6182
6187
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6183
6188
  return new (P || (P = Promise))(function (resolve, reject) {
6184
6189
  function fulfilled(value) { try {
@@ -6218,7 +6223,7 @@
6218
6223
  this._subs.forEach(function (s) { return s.unsubscribe(); });
6219
6224
  };
6220
6225
  XrService.prototype.init = function (renderer, scene, camera) {
6221
- return __awaiter$17(this, void 0, void 0, function () {
6226
+ return __awaiter$18(this, void 0, void 0, function () {
6222
6227
  var displays;
6223
6228
  var _this = this;
6224
6229
  return __generator(this, function (_a) {
@@ -6503,7 +6508,7 @@
6503
6508
  }]
6504
6509
  }], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }, { type: DebugService }, { type: MessageBoardService }]; } });
6505
6510
 
6506
- var __awaiter$16 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6511
+ var __awaiter$17 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6507
6512
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6508
6513
  return new (P || (P = Promise))(function (resolve, reject) {
6509
6514
  function fulfilled(value) { try {
@@ -6569,7 +6574,7 @@
6569
6574
  * @param {XRCoordinateSystem} frameOfRef
6570
6575
  */
6571
6576
  Reticle.prototype.update = function (session, camera, frameOfRef) {
6572
- return __awaiter$16(this, void 0, void 0, function () {
6577
+ return __awaiter$17(this, void 0, void 0, function () {
6573
6578
  var ray, origin, direction, hits, hit, hitMatrix;
6574
6579
  return __generator(this, function (_a) {
6575
6580
  this._rayCaster = this._rayCaster || new THREE.Raycaster();
@@ -7191,7 +7196,7 @@
7191
7196
  return ServiceLocator;
7192
7197
  }());
7193
7198
 
7194
- var __awaiter$15 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7199
+ var __awaiter$16 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7195
7200
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7196
7201
  return new (P || (P = Promise))(function (resolve, reject) {
7197
7202
  function fulfilled(value) { try {
@@ -7218,7 +7223,6 @@
7218
7223
  this._hideOutlineTimeout = 10000;
7219
7224
  this._animationDuration = 5000;
7220
7225
  this._outlinePassAsError = false;
7221
- this._useMSAA = false;
7222
7226
  this._initializing = false;
7223
7227
  this._subs = [];
7224
7228
  this.needsRender = false;
@@ -7241,16 +7245,18 @@
7241
7245
  this._composer = new EffectComposer.EffectComposer(this._renderer, this._renderTarget);
7242
7246
  this._composer.setPixelRatio(window.devicePixelRatio);
7243
7247
  var renderPass = new RenderPass.RenderPass(this._scene, this._camera);
7244
- this._composer.addPass(renderPass);
7248
+ this._outputPass = new OutputPass.OutputPass();
7245
7249
  this._outlinePass = new OutlinePass.OutlinePass(new THREE.Vector2(width, height), this._scene, this._camera);
7246
- this._composer.addPass(this._outlinePass);
7247
7250
  this._fxaaPass = new ShaderPass.ShaderPass(FXAAShader.FXAAShader);
7248
7251
  this._fxaaPass.material.uniforms['resolution'].value.set(1 / width, 1 / height);
7249
- this._composer.addPass(this._fxaaPass);
7250
7252
  // needed for the sRGBEncoding to work
7251
7253
  // https://stackoverflow.com/questions/72936071/srgbencoding-in-not-working-in-three-effectcomposer
7252
- var gammaCorrectionPass = new ShaderPass.ShaderPass(GammaCorrectionShader.GammaCorrectionShader);
7253
- this._composer.addPass(gammaCorrectionPass);
7254
+ // const gammaCorrectionPass = new ShaderPass(GammaCorrectionShader);
7255
+ this._composer.addPass(renderPass);
7256
+ this._composer.addPass(this._outlinePass);
7257
+ this._composer.addPass(this._fxaaPass);
7258
+ // this._composer.addPass(gammaCorrectionPass);
7259
+ this._composer.addPass(this._outputPass);
7254
7260
  this._setSelectionGlowSettings();
7255
7261
  this._composer.setSize(width, height);
7256
7262
  };
@@ -7272,7 +7278,7 @@
7272
7278
  this._outlinePass.selectedObjects = [item];
7273
7279
  };
7274
7280
  OutlineService.prototype.showOutline = function (item) {
7275
- return __awaiter$15(this, void 0, void 0, function () {
7281
+ return __awaiter$16(this, void 0, void 0, function () {
7276
7282
  var _this = this;
7277
7283
  return __generator(this, function (_a) {
7278
7284
  // if (item && (item instanceof FloorPin || item instanceof WallPin)) {
@@ -7295,7 +7301,7 @@
7295
7301
  });
7296
7302
  };
7297
7303
  OutlineService.prototype.hideOutline = function () {
7298
- return __awaiter$15(this, void 0, void 0, function () {
7304
+ return __awaiter$16(this, void 0, void 0, function () {
7299
7305
  return __generator(this, function (_a) {
7300
7306
  if (this._outlinePass.selectedObjects.length > 0) {
7301
7307
  // await this._animatedOutlineStrength(300, 0);
@@ -8192,7 +8198,7 @@
8192
8198
  TextureType[TextureType["PBR"] = 3] = "PBR";
8193
8199
  })(TextureType || (TextureType = {}));
8194
8200
 
8195
- var __awaiter$14 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8201
+ var __awaiter$15 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8196
8202
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8197
8203
  return new (P || (P = Promise))(function (resolve, reject) {
8198
8204
  function fulfilled(value) { try {
@@ -8261,7 +8267,7 @@
8261
8267
  };
8262
8268
  // use canvas to create rotated textures
8263
8269
  MaterialUtils.RotatedCanvasTexture = function (texture, textureURL, dimensions, adjustScale, repeatX, repeatY) {
8264
- return __awaiter$14(this, void 0, void 0, function () {
8270
+ return __awaiter$15(this, void 0, void 0, function () {
8265
8271
  var img;
8266
8272
  return __generator(this, function (_a) {
8267
8273
  switch (_a.label) {
@@ -8274,7 +8280,7 @@
8274
8280
  });
8275
8281
  };
8276
8282
  MaterialUtils.CustomTileMapTexture = function (texture, dimensions) {
8277
- return __awaiter$14(this, void 0, void 0, function () {
8283
+ return __awaiter$15(this, void 0, void 0, function () {
8278
8284
  var img, ratio, tileSizeMax, newTileSize, t, image;
8279
8285
  return __generator(this, function (_a) {
8280
8286
  switch (_a.label) {
@@ -8317,7 +8323,7 @@
8317
8323
  };
8318
8324
  // use canvas to create texture from photo
8319
8325
  MaterialUtils.FromImage = function (texture /*, dimensions: THREE.Vector2*/) {
8320
- return __awaiter$14(this, void 0, void 0, function () {
8326
+ return __awaiter$15(this, void 0, void 0, function () {
8321
8327
  var img, canvas, threeTexture;
8322
8328
  return __generator(this, function (_a) {
8323
8329
  switch (_a.label) {
@@ -8336,7 +8342,7 @@
8336
8342
  });
8337
8343
  };
8338
8344
  MaterialUtils.ReadAndResizePhotoAsDataURL = function (file) {
8339
- return __awaiter$14(this, void 0, void 0, function () {
8345
+ return __awaiter$15(this, void 0, void 0, function () {
8340
8346
  var imageSrc;
8341
8347
  return __generator(this, function (_a) {
8342
8348
  switch (_a.label) {
@@ -8403,7 +8409,7 @@
8403
8409
  });
8404
8410
  };
8405
8411
  MaterialUtils.GetMaterialMaps = function (material, texture, dimensions) {
8406
- return __awaiter$14(this, void 0, void 0, function () {
8412
+ return __awaiter$15(this, void 0, void 0, function () {
8407
8413
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8408
8414
  return __generator(this, function (_s) {
8409
8415
  switch (_s.label) {
@@ -8518,7 +8524,7 @@
8518
8524
  });
8519
8525
  };
8520
8526
  MaterialUtils.loadMaterializeMaps = function (material, texture) {
8521
- return __awaiter$14(this, void 0, void 0, function () {
8527
+ return __awaiter$15(this, void 0, void 0, function () {
8522
8528
  var _a, _b, _c, _d, _e;
8523
8529
  return __generator(this, function (_f) {
8524
8530
  switch (_f.label) {
@@ -8598,7 +8604,7 @@
8598
8604
  };
8599
8605
  // use canvas to create texture from flipped photo
8600
8606
  MaterialUtils.FromFlippedImage = function (texture, dimensions) {
8601
- return __awaiter$14(this, void 0, void 0, function () {
8607
+ return __awaiter$15(this, void 0, void 0, function () {
8602
8608
  var origImg, canvas, threeTexture;
8603
8609
  return __generator(this, function (_a) {
8604
8610
  switch (_a.label) {
@@ -8636,7 +8642,7 @@
8636
8642
  };
8637
8643
  // use canvas to create custom textures
8638
8644
  MaterialUtils.CustomTileTexture = function (texture) {
8639
- return __awaiter$14(this, void 0, void 0, function () {
8645
+ return __awaiter$15(this, void 0, void 0, function () {
8640
8646
  var img, canvas;
8641
8647
  return __generator(this, function (_a) {
8642
8648
  switch (_a.label) {
@@ -8652,7 +8658,7 @@
8652
8658
  });
8653
8659
  };
8654
8660
  MaterialUtils.RotatedImageTexture = function (texture, textureURL) {
8655
- return __awaiter$14(this, void 0, void 0, function () {
8661
+ return __awaiter$15(this, void 0, void 0, function () {
8656
8662
  var img, canvas;
8657
8663
  return __generator(this, function (_a) {
8658
8664
  switch (_a.label) {
@@ -8668,7 +8674,7 @@
8668
8674
  });
8669
8675
  };
8670
8676
  MaterialUtils.CreateTileDataUrl = function (img, texture) {
8671
- return __awaiter$14(this, void 0, void 0, function () {
8677
+ return __awaiter$15(this, void 0, void 0, function () {
8672
8678
  var canvas, tileUnit, tileCtx;
8673
8679
  return __generator(this, function (_a) {
8674
8680
  switch (_a.label) {
@@ -8691,7 +8697,7 @@
8691
8697
  });
8692
8698
  };
8693
8699
  MaterialUtils.CreateTileMap = function (img, texture, oDimensions, adjustScale, repeatX, repeatY) {
8694
- return __awaiter$14(this, void 0, void 0, function () {
8700
+ return __awaiter$15(this, void 0, void 0, function () {
8695
8701
  var dimensions, canvas, rotation, imgSize, ctx, bbHeight, bbWidth, i, j, threeTexture;
8696
8702
  return __generator(this, function (_a) {
8697
8703
  switch (_a.label) {
@@ -8779,7 +8785,7 @@
8779
8785
  MaterialUtils.imageCache = new Map();
8780
8786
  MaterialUtils.textureCache = new Map();
8781
8787
 
8782
- var __awaiter$13 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8788
+ var __awaiter$14 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8783
8789
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8784
8790
  return new (P || (P = Promise))(function (resolve, reject) {
8785
8791
  function fulfilled(value) { try {
@@ -8834,7 +8840,7 @@
8834
8840
  Utils$1.DisposeObject(this._pointRepresentation);
8835
8841
  };
8836
8842
  ArService.prototype.resetPlaneDetection = function () {
8837
- return __awaiter$13(this, void 0, void 0, function () {
8843
+ return __awaiter$14(this, void 0, void 0, function () {
8838
8844
  var _this = this;
8839
8845
  return __generator(this, function (_a) {
8840
8846
  switch (_a.label) {
@@ -8861,8 +8867,25 @@
8861
8867
  ArService.prototype.endSessionEvent = function () {
8862
8868
  this._session.end();
8863
8869
  };
8870
+ ArService.prototype.arIOSSupported = function () {
8871
+ return __awaiter$14(this, void 0, void 0, function () {
8872
+ var isIOS, anchor;
8873
+ return __generator(this, function (_a) {
8874
+ isIOS = /iPad|iPhone|iPod/.test(navigator.platform) ||
8875
+ (navigator.userAgent.includes('Mac') && 'ontouchend' in document);
8876
+ if (isIOS) {
8877
+ anchor = document.createElement('a');
8878
+ return [2 /*return*/, anchor.relList.supports('ar')];
8879
+ }
8880
+ else {
8881
+ return [2 /*return*/, false];
8882
+ }
8883
+ return [2 /*return*/];
8884
+ });
8885
+ });
8886
+ };
8864
8887
  ArService.prototype.arSupported = function () {
8865
- return __awaiter$13(this, void 0, void 0, function () {
8888
+ return __awaiter$14(this, void 0, void 0, function () {
8866
8889
  return __generator(this, function (_a) {
8867
8890
  switch (_a.label) {
8868
8891
  case 0:
@@ -9234,7 +9257,7 @@
9234
9257
  }
9235
9258
  };
9236
9259
  ArService.prototype._createPlaneMaterial = function () {
9237
- return __awaiter$13(this, void 0, void 0, function () {
9260
+ return __awaiter$14(this, void 0, void 0, function () {
9238
9261
  var pm, _a;
9239
9262
  return __generator(this, function (_b) {
9240
9263
  switch (_b.label) {
@@ -9253,7 +9276,7 @@
9253
9276
  });
9254
9277
  };
9255
9278
  ArService.prototype._onSessionStarted = function (session) {
9256
- return __awaiter$13(this, void 0, void 0, function () {
9279
+ return __awaiter$14(this, void 0, void 0, function () {
9257
9280
  var domOverlay;
9258
9281
  var _this = this;
9259
9282
  return __generator(this, function (_a) {
@@ -9387,7 +9410,7 @@
9387
9410
  }
9388
9411
  };
9389
9412
  ArService.prototype._checkIfHoldTouchEvent = function ($event) {
9390
- return __awaiter$13(this, void 0, void 0, function () {
9413
+ return __awaiter$14(this, void 0, void 0, function () {
9391
9414
  var _this = this;
9392
9415
  return __generator(this, function (_a) {
9393
9416
  setTimeout(function () {
@@ -9717,25 +9740,6 @@
9717
9740
  function PostProcessingService(_configurationService) {
9718
9741
  var _this = this;
9719
9742
  this._configurationService = _configurationService;
9720
- this._subs = [];
9721
- this._subs.push(this._configurationService.onChange.subscribe(function (changed) {
9722
- if (ConfigurationKey.ShowPostProcessingSettings in changed) {
9723
- _this._showHideGui(changed[ConfigurationKey.ShowPostProcessingSettings]);
9724
- }
9725
- }));
9726
- }
9727
- PostProcessingService.prototype.ngOnDestroy = function () {
9728
- this._subs.forEach(function (s) { return s.unsubscribe(); });
9729
- };
9730
- PostProcessingService.prototype.init = function (renderer, scene, camera, width, height) {
9731
- this._renderer = renderer;
9732
- this._scene = scene;
9733
- this._camera = camera;
9734
- this._composer = new EffectComposer.EffectComposer(renderer);
9735
- this._n8aoPass = new n8ao.N8AOPass(scene, camera, width, height);
9736
- var smaaPass = new SMAAPass.SMAAPass(width, height);
9737
- this._composer.addPass(this._n8aoPass);
9738
- this._composer.addPass(smaaPass);
9739
9743
  this._effectController = {
9740
9744
  aoSamples: 32.0,
9741
9745
  denoiseSamples: 8.0,
@@ -9753,7 +9757,51 @@
9753
9757
  stencil: true,
9754
9758
  accumulate: false
9755
9759
  };
9760
+ this._subs = [];
9761
+ this._subs.push(this._configurationService.onChange.subscribe(function (changed) {
9762
+ if (ConfigurationKey.ShowPostProcessingSettings in changed) {
9763
+ _this._showHideGui(changed[ConfigurationKey.ShowPostProcessingSettings]);
9764
+ }
9765
+ }));
9766
+ }
9767
+ PostProcessingService.prototype.ngOnDestroy = function () {
9768
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
9769
+ };
9770
+ PostProcessingService.prototype.init = function (renderer, scene, camera, width, height) {
9771
+ this._renderer = renderer;
9772
+ this._scene = scene;
9773
+ this._camera = camera;
9774
+ this._renderTarget = new THREE.WebGLRenderTarget(width, height, {
9775
+ minFilter: THREE.NearestFilter,
9776
+ magFilter: THREE.NearestFilter,
9777
+ format: THREE.RGBAFormat,
9778
+ colorSpace: THREE.SRGBColorSpace
9779
+ });
9780
+ this._renderTarget.samples = 4;
9781
+ this._renderTarget.depthTexture = new THREE.DepthTexture(width, height, THREE.UnsignedIntType);
9782
+ this._renderTarget.depthTexture.format = THREE.DepthFormat;
9783
+ this._composer = new EffectComposer.EffectComposer(this._renderer, this._renderTarget);
9784
+ this._n8aoPass = new n8ao.N8AOPass(scene, camera, width, height);
9785
+ this._n8aoPass.configuration.gammaCorrection = false;
9786
+ this._n8aoPass.debugMode = true;
9787
+ // const smaaPass = new SMAAPass(width, height);
9788
+ // this._composer.addPass(smaaPass);
9789
+ // const fxaaPass = new ShaderPass(FXAAShader);
9790
+ // const pixelRatio = this._renderer.getPixelRatio();
9791
+ // fxaaPass.material.uniforms[ 'resolution' ].value.x = 1 / (width * pixelRatio);
9792
+ // fxaaPass.material.uniforms[ 'resolution' ].value.y = 1 / (height * pixelRatio);
9793
+ this._outputPass = new OutputPass.OutputPass();
9794
+ this._taaRenderPass = new TAARenderPass.TAARenderPass(this._scene, this._camera, 0x000000, 0);
9795
+ this._taaRenderPass.unbiased = false;
9796
+ this._taaRenderPass.sampleLevel = 4;
9797
+ this._renderPass = new RenderPass.RenderPass(this._scene, this._camera);
9798
+ // this._renderPass.enabled = false;
9799
+ this._composer.addPass(this._renderPass);
9800
+ this._composer.addPass(this._taaRenderPass);
9801
+ this._composer.addPass(this._n8aoPass);
9802
+ this._composer.addPass(this._outputPass);
9756
9803
  this._createGui();
9804
+ this._createGuiTaaPass();
9757
9805
  };
9758
9806
  PostProcessingService.prototype._updatePass = function () {
9759
9807
  this._n8aoPass.configuration.aoRadius = this._effectController.aoRadius;
@@ -9773,6 +9821,35 @@
9773
9821
  this._n8aoPass.configuration.accumulate = this._effectController.accumulate;
9774
9822
  this.render();
9775
9823
  };
9824
+ PostProcessingService.prototype._createGuiTaaPass = function () {
9825
+ var _this = this;
9826
+ this._taaPassGui = new GUI__default["default"]();
9827
+ this._taaPassGui.hide();
9828
+ var param = { TAAEnabled: '1', TAASampleLevel: 0 };
9829
+ this._taaPassGui.add(param, 'TAAEnabled', {
9830
+ 'Disabled': '0',
9831
+ 'Enabled': '1'
9832
+ }).onFinishChange(function () {
9833
+ if (_this._taaRenderPass) {
9834
+ _this._taaRenderPass.enabled = (param.TAAEnabled === '1');
9835
+ }
9836
+ _this.render();
9837
+ });
9838
+ this._taaPassGui.add(param, 'TAASampleLevel', {
9839
+ 'Level 0: 1 Sample': 0,
9840
+ 'Level 1: 2 Samples': 1,
9841
+ 'Level 2: 4 Samples': 2,
9842
+ 'Level 3: 8 Samples': 3,
9843
+ 'Level 4: 16 Samples': 4,
9844
+ 'Level 5: 32 Samples': 5
9845
+ }).onFinishChange(function () {
9846
+ if (_this._taaRenderPass) {
9847
+ _this._taaRenderPass.sampleLevel = param.TAASampleLevel;
9848
+ }
9849
+ _this.render();
9850
+ });
9851
+ this._taaPassGui.open();
9852
+ };
9776
9853
  PostProcessingService.prototype.setSize = function (width, height) {
9777
9854
  this._composer.setSize(width, height);
9778
9855
  };
@@ -9839,6 +9916,144 @@
9839
9916
  }]
9840
9917
  }], ctorParameters: function () { return [{ type: ConfigurationService }]; } });
9841
9918
 
9919
+ var __awaiter$13 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9920
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9921
+ return new (P || (P = Promise))(function (resolve, reject) {
9922
+ function fulfilled(value) { try {
9923
+ step(generator.next(value));
9924
+ }
9925
+ catch (e) {
9926
+ reject(e);
9927
+ } }
9928
+ function rejected(value) { try {
9929
+ step(generator["throw"](value));
9930
+ }
9931
+ catch (e) {
9932
+ reject(e);
9933
+ } }
9934
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9935
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9936
+ });
9937
+ };
9938
+ var SsrService = /** @class */ (function () {
9939
+ function SsrService(_settingsService) {
9940
+ this._settingsService = _settingsService;
9941
+ this._enabled = false;
9942
+ this._subs = [];
9943
+ }
9944
+ Object.defineProperty(SsrService.prototype, "enabled", {
9945
+ get: function () {
9946
+ return this._enabled;
9947
+ },
9948
+ set: function (value) {
9949
+ this._enabled = value;
9950
+ if (this._enabled) {
9951
+ this._prepareWebsocket();
9952
+ }
9953
+ },
9954
+ enumerable: false,
9955
+ configurable: true
9956
+ });
9957
+ SsrService.prototype.ngOnDestroy = function () {
9958
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
9959
+ };
9960
+ SsrService.prototype.init = function () {
9961
+ var _this = this;
9962
+ var socket = new WebSocket('ws://localhost:7005');
9963
+ var peerConnection = new RTCPeerConnection({
9964
+ iceServers: [{ urls: 'stun:stun.1.google.com:19302' }]
9965
+ });
9966
+ peerConnection.onicecandidate = function (event) {
9967
+ if (event.candidate) {
9968
+ socket.send(JSON.stringify({ candidate: event.candidate }));
9969
+ }
9970
+ };
9971
+ peerConnection.ontrack = function (event) {
9972
+ var remoteVideo = document.getElementById('remoteVideo');
9973
+ // @ts-ignore
9974
+ if (remoteVideo.srcObject !== event.streams[0]) {
9975
+ // @ts-ignore
9976
+ remoteVideo.srcObject = event.streams[0];
9977
+ }
9978
+ };
9979
+ socket.onmessage = function (message) { return __awaiter$13(_this, void 0, void 0, function () {
9980
+ var text, data, answer, e_1, e_2;
9981
+ return __generator(this, function (_a) {
9982
+ switch (_a.label) {
9983
+ case 0:
9984
+ _a.trys.push([0, 10, , 11]);
9985
+ return [4 /*yield*/, message.data.text()];
9986
+ case 1:
9987
+ text = _a.sent();
9988
+ data = JSON.parse(text);
9989
+ if (!data.offer) return [3 /*break*/, 5];
9990
+ return [4 /*yield*/, peerConnection.setRemoteDescription(new RTCSessionDescription(data.offer))];
9991
+ case 2:
9992
+ _a.sent();
9993
+ return [4 /*yield*/, peerConnection.createAnswer()];
9994
+ case 3:
9995
+ answer = _a.sent();
9996
+ return [4 /*yield*/, peerConnection.setLocalDescription(answer)];
9997
+ case 4:
9998
+ _a.sent();
9999
+ socket.send(JSON.stringify({ answer: peerConnection.localDescription }));
10000
+ return [3 /*break*/, 9];
10001
+ case 5:
10002
+ if (!data.candidate) return [3 /*break*/, 9];
10003
+ _a.label = 6;
10004
+ case 6:
10005
+ _a.trys.push([6, 8, , 9]);
10006
+ return [4 /*yield*/, peerConnection.addIceCandidate(new RTCIceCandidate(data.candidate))];
10007
+ case 7:
10008
+ _a.sent();
10009
+ return [3 /*break*/, 9];
10010
+ case 8:
10011
+ e_1 = _a.sent();
10012
+ console.error('Error adding ICE-Candidate', e_1);
10013
+ return [3 /*break*/, 9];
10014
+ case 9: return [3 /*break*/, 11];
10015
+ case 10:
10016
+ e_2 = _a.sent();
10017
+ console.error(e_2);
10018
+ return [3 /*break*/, 11];
10019
+ case 11: return [2 /*return*/];
10020
+ }
10021
+ });
10022
+ }); };
10023
+ };
10024
+ SsrService.prototype.sceneChanged = function (scene) {
10025
+ if (this._websocket.readyState === WebSocket.OPEN) {
10026
+ var sceneClone = scene.clone(true);
10027
+ this._websocket.send(JSON.stringify(sceneClone));
10028
+ }
10029
+ };
10030
+ SsrService.prototype._prepareWebsocket = function () {
10031
+ if (!this._settingsService.settings.newRenderParameters.websocket) {
10032
+ return;
10033
+ }
10034
+ var webSocketConnection = this._settingsService.settings.newRenderParameters.websocket;
10035
+ this._websocket = new WebSocket(webSocketConnection);
10036
+ // webSocket.onopen = () => {
10037
+ // webSocket.send(JSON.stringify(data));
10038
+ // };
10039
+ this._websocket.onmessage = function (event) {
10040
+ var result = JSON.parse(event.data);
10041
+ if (result) {
10042
+ console.log(result);
10043
+ }
10044
+ };
10045
+ };
10046
+ return SsrService;
10047
+ }());
10048
+ SsrService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, deps: [{ token: HomedecoratorSettingsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
10049
+ SsrService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, providedIn: 'root' });
10050
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, decorators: [{
10051
+ type: i0.Injectable,
10052
+ args: [{
10053
+ providedIn: 'root'
10054
+ }]
10055
+ }], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }]; } });
10056
+
9842
10057
  var __awaiter$12 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
9843
10058
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9844
10059
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9859,7 +10074,7 @@
9859
10074
  });
9860
10075
  };
9861
10076
  var SceneService = /** @class */ (function () {
9862
- function SceneService(_cameraService, _configurationService, _xrService, _vrService, _arService, _messageBusService, _viewModeService, _outlineService, _settingsService, _postProcessing) {
10077
+ function SceneService(_cameraService, _configurationService, _xrService, _vrService, _arService, _messageBusService, _viewModeService, _outlineService, _settingsService, _postProcessing, _ssrService) {
9863
10078
  var _this = this;
9864
10079
  this._cameraService = _cameraService;
9865
10080
  this._configurationService = _configurationService;
@@ -9871,6 +10086,7 @@
9871
10086
  this._outlineService = _outlineService;
9872
10087
  this._settingsService = _settingsService;
9873
10088
  this._postProcessing = _postProcessing;
10089
+ this._ssrService = _ssrService;
9874
10090
  this.onBeforeRender = new rxjs.Subject();
9875
10091
  this.onAfterRender = new rxjs.Subject();
9876
10092
  this.sceneInitialized = new rxjs.BehaviorSubject(false);
@@ -9957,6 +10173,7 @@
9957
10173
  if (loaded) {
9958
10174
  _this._initPathTracer();
9959
10175
  _this._maxRenderSamples = _this._settingsService.settings.options.maxRenderSamples;
10176
+ _this._ssrService.enabled = _this._settingsService.settings.options.ssrEnabled;
9960
10177
  }
9961
10178
  })
9962
10179
  // this._xrService.sessionStarted.subscribe((mode: XrMode) => {
@@ -10021,6 +10238,20 @@
10021
10238
  });
10022
10239
  this.needsRender = true;
10023
10240
  };
10241
+ SceneService.prototype.createRenderWithOrthographicCamera = function () {
10242
+ var aspect = window.innerWidth / window.innerHeight;
10243
+ var frustumSize = 10;
10244
+ var orthographicCamera = new THREE.OrthographicCamera(frustumSize * aspect / -2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / -2, 0.1, 100);
10245
+ orthographicCamera.position.set(0, 3, -2);
10246
+ orthographicCamera.lookAt(0, 0, -2);
10247
+ orthographicCamera.name = 'orthographiccamera';
10248
+ this.scene.add(orthographicCamera);
10249
+ this.renderer.render(this.scene, orthographicCamera);
10250
+ var render = this.renderer.domElement.toDataURL('image/jpeg');
10251
+ this.scene.getObjectByName('orthographiccamera').remove();
10252
+ this.renderer.render(this.scene, this._cameraService.camera);
10253
+ return render;
10254
+ };
10024
10255
  SceneService.prototype._initScene = function () {
10025
10256
  this.scene = new THREE.Scene();
10026
10257
  this._setSceneBackground();
@@ -10078,13 +10309,13 @@
10078
10309
  // logarithmicDepthBuffer: true*/
10079
10310
  // });
10080
10311
  // this.renderer = new WebGLRenderer({alpha: true, antialias: false, preserveDrawingBuffer: true, premultipliedAlpha: true});
10081
- this.renderer = new THREE.WebGLRenderer({
10082
- precision: 'highp',
10083
- powerPreference: 'high-performance',
10084
- antialias: false,
10085
- stencil: false,
10086
- depth: false
10087
- });
10312
+ this.renderer = new THREE.WebGLRenderer( /*{
10313
+ precision: 'highp',
10314
+ powerPreference: 'high-performance',
10315
+ antialias: true,
10316
+ stencil: false,
10317
+ depth: false
10318
+ }*/);
10088
10319
  this.renderer.outputColorSpace = THREE.SRGBColorSpace;
10089
10320
  this.renderer.autoClear = false;
10090
10321
  this.renderer.setPixelRatio(window.devicePixelRatio);
@@ -10150,8 +10381,8 @@
10150
10381
  this.renderer.render(this.scene, this._cameraService.camera);
10151
10382
  }
10152
10383
  else {
10153
- // this._outlineService.render();
10154
10384
  this._postProcessing.render();
10385
+ this._outlineService.render();
10155
10386
  }
10156
10387
  // this.renderer.render(this.scene, this._cameraService.camera);
10157
10388
  }
@@ -10201,14 +10432,14 @@
10201
10432
  };
10202
10433
  return SceneService;
10203
10434
  }());
10204
- SceneService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, deps: [{ token: CameraService }, { token: ConfigurationService }, { token: XrService }, { token: VrService }, { token: ArService }, { token: MessageBusService }, { token: ViewModeService }, { token: OutlineService }, { token: HomedecoratorSettingsService }, { token: PostProcessingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
10435
+ SceneService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, deps: [{ token: CameraService }, { token: ConfigurationService }, { token: XrService }, { token: VrService }, { token: ArService }, { token: MessageBusService }, { token: ViewModeService }, { token: OutlineService }, { token: HomedecoratorSettingsService }, { token: PostProcessingService }, { token: SsrService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
10205
10436
  SceneService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, providedIn: 'root' });
10206
10437
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, decorators: [{
10207
10438
  type: i0.Injectable,
10208
10439
  args: [{
10209
10440
  providedIn: 'root'
10210
10441
  }]
10211
- }], ctorParameters: function () { return [{ type: CameraService }, { type: ConfigurationService }, { type: XrService }, { type: VrService }, { type: ArService }, { type: MessageBusService }, { type: ViewModeService }, { type: OutlineService }, { type: HomedecoratorSettingsService }, { type: PostProcessingService }]; } });
10442
+ }], ctorParameters: function () { return [{ type: CameraService }, { type: ConfigurationService }, { type: XrService }, { type: VrService }, { type: ArService }, { type: MessageBusService }, { type: ViewModeService }, { type: OutlineService }, { type: HomedecoratorSettingsService }, { type: PostProcessingService }, { type: SsrService }]; } });
10212
10443
 
10213
10444
  var __awaiter$11 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
10214
10445
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -14034,12 +14265,16 @@
14034
14265
  model.standalone = modelInterface.standalone;
14035
14266
  model.group = modelInterface.group;
14036
14267
  model.navigatorType = modelInterface.navigatorType;
14037
- model.shadowMapType = modelInterface.shadowMapType ?
14038
- Array.from(shadowMapTypesMap.entries()).find(function (key, value) { return key[1] === modelInterface.shadowMapType; })[0] :
14039
- ShadowMapLocalType.PCFSoftShadowMap;
14040
- model.outputEncoding = modelInterface.outputEncoding ?
14041
- Array.from(outputEncodingMap.entries()).find(function (key, value) { return key[1] === modelInterface.outputEncoding; })[0] :
14042
- OutputEncoding.SRGBColorSpace;
14268
+ if (Array.from(shadowMapTypesMap.entries()).find(function (key, value) { return key[1] === modelInterface.shadowMapType; })) {
14269
+ model.shadowMapType = modelInterface.shadowMapType ?
14270
+ Array.from(shadowMapTypesMap.entries()).find(function (key, value) { return key[1] === modelInterface.shadowMapType; })[0] :
14271
+ ShadowMapLocalType.PCFSoftShadowMap;
14272
+ }
14273
+ if (Array.from(outputEncodingMap.entries()).find(function (key, value) { return key[1] === modelInterface.outputEncoding; })) {
14274
+ model.outputEncoding = modelInterface.outputEncoding ?
14275
+ Array.from(outputEncodingMap.entries()).find(function (key, value) { return key[1] === modelInterface.outputEncoding; })[0] :
14276
+ OutputEncoding.SRGBColorSpace;
14277
+ }
14043
14278
  model.shadowRadius = modelInterface.shadowRadius;
14044
14279
  model.toneMappingExposure = modelInterface.toneMappingExposure ? modelInterface.toneMappingExposure : 1;
14045
14280
  model.physicallyCorrectLights = modelInterface.physicallyCorrectLights ? modelInterface.physicallyCorrectLights : false;
@@ -14073,9 +14308,9 @@
14073
14308
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
14074
14309
  /* tslint:disable */
14075
14310
  var VersionInfo = {
14076
- "application": "Homedecorator",
14077
- "appVersion": "252.0.1",
14078
- "revision": "44fb58ea"
14311
+ application: "Homedecorator",
14312
+ appVersion: "255.1.2",
14313
+ revision: "111849"
14079
14314
  };
14080
14315
  /* tslint:enable */
14081
14316
 
@@ -14530,11 +14765,23 @@
14530
14765
  _this.floorTexture = texture;
14531
14766
  if (object && object instanceof THREE.Mesh) {
14532
14767
  _this._originalFloorMaterial = object.material;
14768
+ _this.floorMesh = object;
14769
+ _this._volume = new THREE.Box3();
14770
+ _this._volume.setFromObject(object);
14533
14771
  _this._originalUvs = object.geometry.attributes.uv.array;
14534
14772
  _this._originalGeometry = object.geometry;
14535
14773
  }
14536
14774
  return _this;
14537
14775
  }
14776
+ Object.defineProperty(FloorPlaneItem.prototype, "size", {
14777
+ get: function () {
14778
+ var size = new THREE.Vector3();
14779
+ this._volume.getSize(size);
14780
+ return size;
14781
+ },
14782
+ enumerable: false,
14783
+ configurable: true
14784
+ });
14538
14785
  Object.defineProperty(FloorPlaneItem.prototype, "floorMaterial", {
14539
14786
  set: function (mat) {
14540
14787
  this.children.forEach(function (c) {
@@ -14548,6 +14795,24 @@
14548
14795
  enumerable: false,
14549
14796
  configurable: true
14550
14797
  });
14798
+ Object.defineProperty(FloorPlaneItem.prototype, "floorObject", {
14799
+ set: function (object) {
14800
+ this.children.forEach(function (c) { return c.visible = false; });
14801
+ this._restoreObjects = this.children;
14802
+ this._configurableFloor = object;
14803
+ this.add(object);
14804
+ },
14805
+ enumerable: false,
14806
+ configurable: true
14807
+ });
14808
+ FloorPlaneItem.prototype.restoreFloorObject = function () {
14809
+ if (!this._configurableFloor) {
14810
+ return;
14811
+ }
14812
+ this.remove(this._configurableFloor);
14813
+ this._configurableFloor.children.forEach(function (child) { return child.dispose(); });
14814
+ this._restoreObjects.forEach(function (c) { return c.visible = true; });
14815
+ };
14551
14816
  FloorPlaneItem.prototype.getTexture = function () {
14552
14817
  return this.floorTexture;
14553
14818
  };
@@ -14559,6 +14824,7 @@
14559
14824
  };
14560
14825
  FloorPlaneItem.prototype.removed = function () {
14561
14826
  var _this = this;
14827
+ this.restoreFloorObject();
14562
14828
  if (this._originalFloorMaterial) {
14563
14829
  this.configurable = false;
14564
14830
  this.metadata.ione = false;
@@ -15447,13 +15713,16 @@
15447
15713
  else {
15448
15714
  geometry = new THREE.ShapeGeometry(shape).center();
15449
15715
  }
15716
+ this._sceneService.needsRender = true;
15717
+ // floorMaterial.metalness = 0;
15718
+ geometry.rotateX(Math.PI / 2);
15450
15719
  return [4 /*yield*/, this._createFloorMaterial(color, texture)];
15451
15720
  case 1:
15452
15721
  floorMaterial = _a.sent();
15453
15722
  floorMesh = new ThreeMesh(geometry, floorMaterial);
15454
15723
  floorPlane = new FloorPlaneItem({ itemType: ItemType.FloorDecoration }, floorMesh);
15455
15724
  floorPlane.name = 'floor-plane';
15456
- floorPlane.rotation.set(Math.PI / 2, 0, 0);
15725
+ // floorPlane.rotation.set(Math.PI / 2, 0, 0);
15457
15726
  floorPlane.receiveShadow = true;
15458
15727
  floorPlane.castShadow = false;
15459
15728
  floorCenter = corners ? this._getFloorCenter(corners) : new THREE.Vector3(0, 0, 0);
@@ -20058,6 +20327,30 @@
20058
20327
  this._ktx2Loader.detectSupport(this._sceneService.renderer);
20059
20328
  return this._ktx2Loader;
20060
20329
  };
20330
+ UtilsService.prototype.downloadUSDZforARIOS = function (object) {
20331
+ return __awaiter$R(this, void 0, void 0, function () {
20332
+ var exporter, arraybuffer, blob, url, element;
20333
+ return __generator(this, function (_a) {
20334
+ switch (_a.label) {
20335
+ case 0:
20336
+ exporter = new USDZExporter.USDZExporter();
20337
+ return [4 /*yield*/, exporter.parseAsync(object)];
20338
+ case 1:
20339
+ arraybuffer = _a.sent();
20340
+ blob = new Blob([arraybuffer], { type: 'model/vnd.usdz+zip' });
20341
+ url = URL.createObjectURL(blob);
20342
+ element = document.createElement('a');
20343
+ element.style.display = 'none';
20344
+ element.href = url;
20345
+ document.body.appendChild(element);
20346
+ element.click();
20347
+ document.body.removeChild(element);
20348
+ URL.revokeObjectURL(url);
20349
+ return [2 /*return*/];
20350
+ }
20351
+ });
20352
+ });
20353
+ };
20061
20354
  UtilsService.prototype._download3DModelAsGLB = function (object) {
20062
20355
  var _this = this;
20063
20356
  var options = {
@@ -23983,6 +24276,163 @@
23983
24276
  }] }];
23984
24277
  } });
23985
24278
 
24279
+ var FloorPattern;
24280
+ (function (FloorPattern) {
24281
+ FloorPattern[FloorPattern["NORMAL"] = 0] = "NORMAL";
24282
+ FloorPattern[FloorPattern["HERRINGBONE"] = 1] = "HERRINGBONE";
24283
+ FloorPattern[FloorPattern["HON60"] = 2] = "HON60";
24284
+ FloorPattern[FloorPattern["HON45"] = 3] = "HON45";
24285
+ })(FloorPattern || (FloorPattern = {}));
24286
+ var FloorPatternDirection;
24287
+ (function (FloorPatternDirection) {
24288
+ FloorPatternDirection[FloorPatternDirection["STANDING"] = 0] = "STANDING";
24289
+ FloorPatternDirection[FloorPatternDirection["LYING"] = 1] = "LYING";
24290
+ })(FloorPatternDirection || (FloorPatternDirection = {}));
24291
+ var FloorPatternService = /** @class */ (function () {
24292
+ function FloorPatternService() {
24293
+ }
24294
+ FloorPatternService.prototype.generatePattern = function (floorPattern, plankSize, floorSize, direction) {
24295
+ if (direction === void 0) { direction = FloorPatternDirection.LYING; }
24296
+ var floorRotation = direction === FloorPatternDirection.STANDING ? 90 : 0;
24297
+ var floorWidth = floorSize.x;
24298
+ var floorLength = floorSize.z;
24299
+ if (direction === FloorPatternDirection.STANDING) {
24300
+ floorWidth = floorSize.z;
24301
+ floorLength = floorSize.x;
24302
+ }
24303
+ switch (floorPattern) {
24304
+ case FloorPattern.NORMAL:
24305
+ return this._normalPattern(plankSize, floorWidth, floorLength, floorRotation);
24306
+ case FloorPattern.HERRINGBONE:
24307
+ return this._herringBone(plankSize, floorWidth, floorLength, floorRotation);
24308
+ case FloorPattern.HON45:
24309
+ return this._hon(plankSize, floorWidth, floorLength, floorRotation, 45);
24310
+ case FloorPattern.HON60:
24311
+ return this._hon(plankSize, floorWidth, floorLength, floorRotation, 60);
24312
+ }
24313
+ };
24314
+ FloorPatternService.prototype._rotatePatternOnZAxis = function (items, floorRotation) {
24315
+ if (floorRotation % 360 > 0) {
24316
+ items.forEach(function (item) {
24317
+ var radians = THREE.MathUtils.degToRad(floorRotation);
24318
+ var x = item.position.x;
24319
+ var z = item.position.z;
24320
+ item.position.x = x * Math.cos(radians) - z * Math.sin(radians);
24321
+ item.position.z = x * Math.sin(radians) + z * Math.cos(radians);
24322
+ });
24323
+ }
24324
+ };
24325
+ FloorPatternService.prototype._normalPattern = function (plankSize, floorWidth, floorLength, floorRotation) {
24326
+ var items = [];
24327
+ var stepOffsetAmount = .4;
24328
+ var plankWidth = plankSize.x;
24329
+ var plankLength = plankSize.z;
24330
+ var offsetSteps = plankWidth / stepOffsetAmount;
24331
+ var rows = Math.ceil(floorLength / plankLength);
24332
+ var columns = Math.ceil(floorWidth / plankWidth);
24333
+ var centerOffsetX = (floorWidth / 2 * -1) + (plankWidth / 2);
24334
+ var centerOffsetZ = (floorLength / 2 * -1) + (plankLength / 2);
24335
+ var currentOffsetStep = 0;
24336
+ for (var row = 0; row < rows; row++) {
24337
+ if (currentOffsetStep > offsetSteps) {
24338
+ currentOffsetStep = 0;
24339
+ }
24340
+ var plankPosZ = (plankLength * row);
24341
+ var currentOffsetAmount = stepOffsetAmount * currentOffsetStep;
24342
+ var planks = currentOffsetStep > 0 ? columns + 1 : columns;
24343
+ for (var col = 0; col < planks; col++) {
24344
+ var plankPosX = (plankWidth * col) - currentOffsetAmount;
24345
+ items.push({
24346
+ position: new THREE.Vector3(plankPosX + centerOffsetX, 0, plankPosZ + centerOffsetZ),
24347
+ rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation), 0),
24348
+ isLeft: true
24349
+ });
24350
+ }
24351
+ currentOffsetStep++;
24352
+ }
24353
+ this._rotatePatternOnZAxis(items, floorRotation);
24354
+ return items;
24355
+ };
24356
+ FloorPatternService.prototype._herringBone = function (plankSize, floorWidth, floorLength, floorRotation) {
24357
+ var items = [];
24358
+ var herringBoneAngle = 45;
24359
+ var sqrt2 = Math.sqrt(2);
24360
+ var plankWidth = plankSize.x;
24361
+ var plankLength = plankSize.z;
24362
+ var offsetPlankPosX = plankWidth * sqrt2;
24363
+ var offsetPlankPosZ = plankLength * sqrt2;
24364
+ var columns = Math.ceil(floorWidth / (plankWidth * sqrt2));
24365
+ var rows = Math.ceil(floorLength / (plankLength * sqrt2) +
24366
+ // add extra rows so that there isn't a gap
24367
+ offsetPlankPosX * 2);
24368
+ var centerOffsetX = floorWidth / 2 * -1 + offsetPlankPosX / 4 - offsetPlankPosZ / 4;
24369
+ var centerOffsetZ = floorLength / 2 * -1 - offsetPlankPosX / 4;
24370
+ for (var column = 0; column < columns; column++) {
24371
+ var plankPosX = offsetPlankPosX * column;
24372
+ for (var row = 0; row < rows; row++) {
24373
+ var plankPosZ = offsetPlankPosZ * row;
24374
+ var plankLeft = {
24375
+ position: new THREE.Vector3(plankPosX + centerOffsetX, 0, plankPosZ + centerOffsetZ),
24376
+ rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation + herringBoneAngle), 0),
24377
+ isLeft: true
24378
+ };
24379
+ var plankRight = {
24380
+ position: new THREE.Vector3(plankPosX + offsetPlankPosX / 2 + centerOffsetX, 0, plankPosZ + offsetPlankPosZ / 2 + centerOffsetZ),
24381
+ rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation - herringBoneAngle), 0),
24382
+ isLeft: false
24383
+ };
24384
+ items.push(plankLeft, plankRight);
24385
+ }
24386
+ }
24387
+ this._rotatePatternOnZAxis(items, floorRotation);
24388
+ return items;
24389
+ };
24390
+ FloorPatternService.prototype._hon = function (plankSize, floorWidth, floorLength, floorRotation, patternAngle) {
24391
+ var items = [];
24392
+ var patternAngleRad = THREE.MathUtils.degToRad(patternAngle);
24393
+ var plankWidth = plankSize.x;
24394
+ var plankLength = plankSize.z;
24395
+ var sin = Math.sin(patternAngleRad);
24396
+ var cos = Math.cos(patternAngleRad);
24397
+ var overlapValue = plankLength * cos;
24398
+ var rowExtendValue = plankWidth * cos;
24399
+ var offsetZ = plankLength * cos * 2;
24400
+ var offsetX = plankWidth * sin;
24401
+ var centerOffsetX = (floorWidth - offsetX) / 2 + overlapValue;
24402
+ var centerOffsetZ = (floorLength + rowExtendValue) / 2;
24403
+ var columns = Math.ceil(floorWidth / ((offsetX - overlapValue) * 2));
24404
+ var rows = Math.ceil((floorLength + rowExtendValue) / offsetZ);
24405
+ for (var column = 0; column < columns; column++) {
24406
+ var plankPosX = column * (offsetX - overlapValue) * 2;
24407
+ for (var row = 0; row < rows; row++) {
24408
+ var plankPosZ = row * offsetZ;
24409
+ var plankLeft = {
24410
+ position: new THREE.Vector3(plankPosX - centerOffsetX, 0, plankPosZ - centerOffsetZ),
24411
+ rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad((90 - patternAngle) + floorRotation), 0),
24412
+ isLeft: true
24413
+ };
24414
+ var plankRight = {
24415
+ position: new THREE.Vector3(plankPosX + offsetX - overlapValue - centerOffsetX, 0, plankPosZ - centerOffsetZ),
24416
+ rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad((90 + patternAngle) + floorRotation), 0),
24417
+ isLeft: false
24418
+ };
24419
+ items.push(plankLeft, plankRight);
24420
+ }
24421
+ }
24422
+ this._rotatePatternOnZAxis(items, floorRotation);
24423
+ return items;
24424
+ };
24425
+ return FloorPatternService;
24426
+ }());
24427
+ FloorPatternService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
24428
+ FloorPatternService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, providedIn: 'root' });
24429
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, decorators: [{
24430
+ type: i0.Injectable,
24431
+ args: [{
24432
+ providedIn: 'root'
24433
+ }]
24434
+ }] });
24435
+
23986
24436
  var __awaiter$H = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
23987
24437
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23988
24438
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -24476,6 +24926,157 @@
24476
24926
  }]
24477
24927
  }], ctorParameters: function () { return [{ type: SceneService }]; } });
24478
24928
 
24929
+ var FloorTileIntersectionService = /** @class */ (function () {
24930
+ function FloorTileIntersectionService(_sceneService) {
24931
+ this._sceneService = _sceneService;
24932
+ this._debug = false;
24933
+ this._edgeCollisionMargin = 0.05;
24934
+ }
24935
+ FloorTileIntersectionService.prototype.toggleDebug = function () {
24936
+ this._debug = !this._debug;
24937
+ };
24938
+ FloorTileIntersectionService.prototype.countTiles = function (floorMesh, floorPattern, geometry) {
24939
+ var e_1, _a;
24940
+ var result = {
24941
+ left: 0,
24942
+ right: 0,
24943
+ edge: 0,
24944
+ total: 0,
24945
+ };
24946
+ console.log(floorMesh.position);
24947
+ var _b = this._checkIntersection2(floorMesh, floorPattern, geometry), floorHits = _b.floorHits, edgeHits = _b.edgeHits;
24948
+ try {
24949
+ for (var floorHits_1 = __values(floorHits), floorHits_1_1 = floorHits_1.next(); !floorHits_1_1.done; floorHits_1_1 = floorHits_1.next()) {
24950
+ var floorHit = floorHits_1_1.value;
24951
+ if (floorHit.isLeft) {
24952
+ result.left += 1;
24953
+ }
24954
+ else {
24955
+ result.right += 1;
24956
+ }
24957
+ }
24958
+ }
24959
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
24960
+ finally {
24961
+ try {
24962
+ if (floorHits_1_1 && !floorHits_1_1.done && (_a = floorHits_1.return)) _a.call(floorHits_1);
24963
+ }
24964
+ finally { if (e_1) throw e_1.error; }
24965
+ }
24966
+ result.edge = edgeHits.length;
24967
+ result.total = floorHits.length;
24968
+ return result;
24969
+ };
24970
+ FloorTileIntersectionService.prototype._checkIntersection2 = function (floorMesh, floorPattern, geometry) {
24971
+ var e_2, _a;
24972
+ // const edgeColliders = this._generateEdgeColliders(floorMesh.geometry);
24973
+ var result = {
24974
+ floorHits: new Array(),
24975
+ edgeHits: new Array()
24976
+ };
24977
+ var bvh = new threeMeshBvh.MeshBVH(geometry);
24978
+ var positionReference = new THREE.Object3D();
24979
+ try {
24980
+ for (var floorPattern_1 = __values(floorPattern), floorPattern_1_1 = floorPattern_1.next(); !floorPattern_1_1.done; floorPattern_1_1 = floorPattern_1.next()) {
24981
+ var floorItem = floorPattern_1_1.value;
24982
+ var pos = floorItem.position;
24983
+ positionReference.position.set(pos.x, pos.y, pos.z);
24984
+ positionReference.updateMatrixWorld();
24985
+ var floorWorldToBhv = new THREE.Matrix4()
24986
+ .copy(positionReference.matrixWorld)
24987
+ .invert()
24988
+ .multiply(floorMesh.matrixWorld);
24989
+ if (bvh.intersectsGeometry(floorMesh.geometry, floorWorldToBhv)) {
24990
+ result.floorHits.push(floorItem);
24991
+ // TODO: find solution for edge detection, this should work as it used the same logic as for the floor.
24992
+ // for (const edgeCollider of edgeColliders) {
24993
+ // const edgeWorldToBhv = new Matrix4()
24994
+ // .copy(positionReference.matrixWorld)
24995
+ // .invert()
24996
+ // .multiply(edgeCollider.matrixWorld);
24997
+ // if (bvh.intersectsGeometry(edgeCollider.geometry, edgeWorldToBhv)) {
24998
+ // result.edgeHits.push(floorItem);
24999
+ // }
25000
+ // }
25001
+ }
25002
+ }
25003
+ }
25004
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
25005
+ finally {
25006
+ try {
25007
+ if (floorPattern_1_1 && !floorPattern_1_1.done && (_a = floorPattern_1.return)) _a.call(floorPattern_1);
25008
+ }
25009
+ finally { if (e_2) throw e_2.error; }
25010
+ }
25011
+ return result;
25012
+ };
25013
+ FloorTileIntersectionService.prototype._generateEdgeColliders = function (floorGeom) {
25014
+ var e_3, _a;
25015
+ var edgeLinesGeom = new THREE.EdgesGeometry(floorGeom);
25016
+ var linePositions = edgeLinesGeom.getAttribute('position').array;
25017
+ var edges = new Array();
25018
+ for (var i = 0; i < linePositions.length; i += 6) {
25019
+ // store vector a and b (1 line pair), because we work in 2D we skip the y-axis which should be zero
25020
+ var vectorA = new THREE.Vector2(linePositions[i], linePositions[i + 2]);
25021
+ var vectorB = new THREE.Vector2(linePositions[i + 3], linePositions[i + 5]);
25022
+ // calculate center of line
25023
+ var position = new THREE.Vector2().lerpVectors(vectorA, vectorB, .5);
25024
+ // calculate length
25025
+ var length = vectorA.distanceTo(vectorB);
25026
+ // create normalised orientation
25027
+ var unitVector = new THREE.Vector2().subVectors(vectorB, vectorA).normalize();
25028
+ // rotation in radians
25029
+ var rotation = Math.atan2(unitVector.y, unitVector.x);
25030
+ // create edge line with volume
25031
+ var edgeGeom = new THREE.BoxGeometry(length, 0.1, this._edgeCollisionMargin);
25032
+ var edge = new THREE.Mesh(edgeGeom);
25033
+ // position edge
25034
+ edge.rotation.y = rotation * -1;
25035
+ edge.position.z = position.y;
25036
+ edge.position.x = position.x;
25037
+ // update bounding box value for correct collision
25038
+ edge.updateMatrixWorld();
25039
+ edge.geometry.computeBoundingBox();
25040
+ edge.geometry.boundingBox.applyMatrix4(edge.matrixWorld);
25041
+ // adds meshes to scene
25042
+ edges.push(edge);
25043
+ }
25044
+ if (this._debug) {
25045
+ var scene = this._sceneService.scene;
25046
+ try {
25047
+ for (var edges_1 = __values(edges), edges_1_1 = edges_1.next(); !edges_1_1.done; edges_1_1 = edges_1.next()) {
25048
+ var edge = edges_1_1.value;
25049
+ edge.material = this._randomColMat();
25050
+ scene.add(edge);
25051
+ }
25052
+ }
25053
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
25054
+ finally {
25055
+ try {
25056
+ if (edges_1_1 && !edges_1_1.done && (_a = edges_1.return)) _a.call(edges_1);
25057
+ }
25058
+ finally { if (e_3) throw e_3.error; }
25059
+ }
25060
+ }
25061
+ return edges;
25062
+ };
25063
+ FloorTileIntersectionService.prototype._randomColMat = function () {
25064
+ var color = new THREE.Color(Math.random(), Math.random(), Math.random());
25065
+ return new THREE.MeshBasicMaterial({ color: color, wireframe: false, side: THREE.DoubleSide });
25066
+ };
25067
+ FloorTileIntersectionService.prototype.ngOnDestroy = function () {
25068
+ };
25069
+ return FloorTileIntersectionService;
25070
+ }());
25071
+ FloorTileIntersectionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, deps: [{ token: SceneService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
25072
+ FloorTileIntersectionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, providedIn: 'root' });
25073
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, decorators: [{
25074
+ type: i0.Injectable,
25075
+ args: [{
25076
+ providedIn: 'root'
25077
+ }]
25078
+ }], ctorParameters: function () { return [{ type: SceneService }]; } });
25079
+
24479
25080
  var __awaiter$G = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
24480
25081
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
24481
25082
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -24498,7 +25099,7 @@
24498
25099
  var defaultPosition$1 = new THREE.Vector3(4, 0, 1);
24499
25100
  var defaultRotation$1 = new THREE.Euler(0, Math.PI, 0);
24500
25101
  var BuildFurnitureService = /** @class */ (function () {
24501
- function BuildFurnitureService(_dialog, _iOne, _threedSelectorService, _collisionManager, _messageBus, _dictionaryService, _hudService, _sceneService, _cameraService, _sceneEventService, _appEventService, _presetService, _itemService, _elementService, _permanentStoreService, _googleTagManager, _settingsService, _utilsService, _variationService, _appStateService, _errorService, _itemGroupService, _variationCacheService, _resizeService, _viewModeService, _floorService) {
25102
+ function BuildFurnitureService(_dialog, _iOne, _threedSelectorService, _collisionManager, _messageBus, _dictionaryService, _hudService, _sceneService, _cameraService, _sceneEventService, _appEventService, _presetService, _itemService, _elementService, _permanentStoreService, _googleTagManager, _settingsService, _utilsService, _variationService, _appStateService, _errorService, _itemGroupService, _variationCacheService, _resizeService, _viewModeService, _floorService, _floorPatternService, _floorTileIntersectionService) {
24502
25103
  var _this = this;
24503
25104
  this._dialog = _dialog;
24504
25105
  this._iOne = _iOne;
@@ -24526,6 +25127,8 @@
24526
25127
  this._resizeService = _resizeService;
24527
25128
  this._viewModeService = _viewModeService;
24528
25129
  this._floorService = _floorService;
25130
+ this._floorPatternService = _floorPatternService;
25131
+ this._floorTileIntersectionService = _floorTileIntersectionService;
24529
25132
  this.toggleSelectedElement = new rxjs.Subject();
24530
25133
  this.configureModeChanged = new rxjs.Subject();
24531
25134
  this.buildFinished = new rxjs.Subject();
@@ -24871,6 +25474,10 @@
24871
25474
  var objectToExport = this._currentCustomFloorGroup ? this._currentCustomFloorGroup : this._itemService.items[0];
24872
25475
  this._utilsService.showExportDialog(objectToExport);
24873
25476
  };
25477
+ BuildFurnitureService.prototype.downloadUDSZforARIOS = function () {
25478
+ var objectToExport = this._currentCustomFloorGroup ? this._currentCustomFloorGroup : this._itemService.items[0];
25479
+ this._utilsService.downloadUSDZforARIOS(objectToExport);
25480
+ };
24874
25481
  BuildFurnitureService.prototype.downloadScene = function () {
24875
25482
  var assetPath = this._settingsService.settings.assetPath;
24876
25483
  // The ground plane looks odd in renders.
@@ -24944,6 +25551,7 @@
24944
25551
  }
24945
25552
  this._answerSelected.length = 0;
24946
25553
  this._hudService.updateSelectedItemHud();
25554
+ this._generateLayingPattern(item);
24947
25555
  this.buildFinished.next(result);
24948
25556
  if (result.resultType === ResultType.NoSelections) {
24949
25557
  result.resultType = ResultType.ConfigurationFixed;
@@ -24956,6 +25564,126 @@
24956
25564
  });
24957
25565
  });
24958
25566
  };
25567
+ BuildFurnitureService.prototype._generateLayingPattern = function (floor) {
25568
+ var floorPatternInfo = this._generateFloorPatternInfo(floor);
25569
+ floor.restoreFloorObject();
25570
+ var meshLeft = this.full3DObjectToUse.children.find(function (m) { return m.name === floorPatternInfo.meshIdLeft; });
25571
+ this._normalizeMesh(meshLeft);
25572
+ var meshRight = null;
25573
+ if (floorPatternInfo.meshIdRight !== null) {
25574
+ meshRight = this.full3DObjectToUse.children.find(function (m) { return m.name === floorPatternInfo.meshIdRight; });
25575
+ this._normalizeMesh(meshRight);
25576
+ }
25577
+ var floorSize = floor.size;
25578
+ var plankSize = new THREE.Vector3();
25579
+ meshLeft.geometry.boundingBox.getSize(plankSize);
25580
+ var items = this._floorPatternService.generatePattern(floorPatternInfo.floorPattern, plankSize, floorSize, floorPatternInfo.floorPatternDirection);
25581
+ var itemAmount = (meshRight === null) ? items.length : items.length / 2;
25582
+ var material = floor.getMaterial();
25583
+ var planksLeft = new THREE.InstancedMesh(meshLeft.geometry, material, itemAmount);
25584
+ var planksRight;
25585
+ if (meshRight) {
25586
+ planksRight = new THREE.InstancedMesh(meshRight.geometry, material, itemAmount);
25587
+ }
25588
+ // assign transform to each item in instanced mesh
25589
+ var dummy = new THREE.Object3D();
25590
+ var matrixIndex = 0;
25591
+ for (var i = 0; i < items.length; i++) {
25592
+ var item = items[i];
25593
+ var targetPlankMesh = (item.isLeft) ? planksLeft : planksRight;
25594
+ var position = item.position;
25595
+ var rotation = item.rotation;
25596
+ dummy.position.set(position.x, position.y, position.z);
25597
+ dummy.rotation.set(rotation.x, rotation.y, rotation.z);
25598
+ dummy.updateMatrix();
25599
+ targetPlankMesh.setMatrixAt(matrixIndex, dummy.matrix);
25600
+ if (planksRight) {
25601
+ if (i !== 0 && (i % 2 !== 0)) {
25602
+ matrixIndex++;
25603
+ }
25604
+ }
25605
+ else {
25606
+ matrixIndex++;
25607
+ }
25608
+ }
25609
+ var customFloorWrapper = new THREE.Object3D();
25610
+ customFloorWrapper.add(planksLeft);
25611
+ if (planksRight)
25612
+ customFloorWrapper.add(planksRight);
25613
+ floor.floorObject = customFloorWrapper;
25614
+ // this._floorTileIntersectionService.toggleDebug();
25615
+ floor.metadata.floorCountResult = this._floorTileIntersectionService.countTiles(floor.floorMesh, items, meshLeft.geometry);
25616
+ };
25617
+ BuildFurnitureService.prototype._generateFloorPatternInfo = function (item) {
25618
+ this._generateSelectedInMetadata(item);
25619
+ var info = {
25620
+ meshIdLeft: null,
25621
+ meshIdRight: null,
25622
+ floorPattern: FloorPattern.NORMAL,
25623
+ floorPatternDirection: FloorPatternDirection.LYING
25624
+ };
25625
+ var selected = item.metadata.selections;
25626
+ var afmeting = selected.find(function (s) { return s.question.toLowerCase() === 'plank afmeting'; });
25627
+ var afmetingString = afmeting.answer.toLowerCase();
25628
+ afmetingString = afmetingString.substr(afmetingString.lastIndexOf(' ') + 1);
25629
+ var legPatroonAnswer = selected.find(function (s) { return s.question.toLowerCase() === 'leg patroon'; }).answer.toLowerCase();
25630
+ var legPatroonString = '';
25631
+ switch (true) {
25632
+ case legPatroonAnswer.indexOf('recht') !== -1:
25633
+ legPatroonString = '90';
25634
+ info.floorPattern = FloorPattern.NORMAL;
25635
+ break;
25636
+ case legPatroonAnswer.indexOf('graat') !== -1:
25637
+ legPatroonString = '90';
25638
+ info.floorPattern = FloorPattern.HERRINGBONE;
25639
+ break;
25640
+ case legPatroonAnswer.indexOf('60') !== -1:
25641
+ legPatroonString = '60';
25642
+ info.floorPattern = FloorPattern.HON60;
25643
+ break;
25644
+ case legPatroonAnswer.indexOf('45') !== -1:
25645
+ legPatroonString = '45';
25646
+ info.floorPattern = FloorPattern.HON45;
25647
+ break;
25648
+ }
25649
+ info.meshIdLeft = afmetingString + "_" + legPatroonString;
25650
+ if (info.floorPattern === FloorPattern.HON45 || info.floorPattern === FloorPattern.HON60) {
25651
+ info.meshIdRight = "r_" + afmetingString + "_" + legPatroonString;
25652
+ }
25653
+ if (info.floorPattern === FloorPattern.HERRINGBONE) {
25654
+ info.meshIdRight = info.meshIdLeft;
25655
+ }
25656
+ var legRichtingAnswer = selected.find(function (s) { return s.question.toLowerCase() === 'leg richting'; }).answer.toLowerCase();
25657
+ info.floorPatternDirection = (legRichtingAnswer.indexOf('verticaal') !== -1) ? FloorPatternDirection.STANDING : FloorPatternDirection.LYING;
25658
+ return info;
25659
+ };
25660
+ BuildFurnitureService.prototype._generateSelectedInMetadata = function (item) {
25661
+ var cloneSelections = JSON.parse(JSON.stringify(this.selections));
25662
+ cloneSelections.forEach(function (s) {
25663
+ s.imageData = undefined;
25664
+ s.imageDataLastAnswer = undefined;
25665
+ if (s.addables) {
25666
+ s.addables.forEach(function (a) {
25667
+ a.imageData = undefined;
25668
+ });
25669
+ }
25670
+ });
25671
+ item.metadata.decos = Array.from(this._iOne.decoNodes);
25672
+ item.metadata.selections = cloneSelections;
25673
+ };
25674
+ BuildFurnitureService.prototype._normalizeMesh = function (mesh) {
25675
+ var meshSize = new THREE.Vector3();
25676
+ mesh.geometry.computeBoundingBox();
25677
+ mesh.geometry.boundingBox.getSize(meshSize);
25678
+ if (meshSize.z > meshSize.x) {
25679
+ mesh.geometry.rotateY(Math.PI / 2);
25680
+ }
25681
+ mesh.geometry.center();
25682
+ mesh.geometry.computeBoundingBox();
25683
+ var center = new THREE.Vector3();
25684
+ mesh.geometry.boundingBox.getCenter(center);
25685
+ mesh.position.copy(center);
25686
+ };
24959
25687
  BuildFurnitureService.prototype._startToBuildFromConfigurator = function (metadata) {
24960
25688
  return this.startToBuild(null, metadata);
24961
25689
  };
@@ -25956,14 +26684,14 @@
25956
26684
  };
25957
26685
  return BuildFurnitureService;
25958
26686
  }());
25959
- BuildFurnitureService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, deps: [{ token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorService }, { token: ThreedselectorService }, { token: CollisionManagerService }, { token: MessageBusService }, { token: HomedecoratorDictionaryService }, { token: HudService }, { token: SceneService }, { token: CameraService }, { token: SceneEventService }, { token: HomedecoratorAppEventService }, { token: PresetsService }, { token: ItemService }, { token: ElementService }, { token: PermanentStoreService }, { token: GoogleTagManagerService }, { token: HomedecoratorSettingsService }, { token: UtilsService }, { token: VariationService }, { token: AppStateService }, { token: ErrorService }, { token: ItemGroupService }, { token: VariationCacheService }, { token: ResizeService }, { token: ViewModeService }, { token: FloorService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
26687
+ BuildFurnitureService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, deps: [{ token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorService }, { token: ThreedselectorService }, { token: CollisionManagerService }, { token: MessageBusService }, { token: HomedecoratorDictionaryService }, { token: HudService }, { token: SceneService }, { token: CameraService }, { token: SceneEventService }, { token: HomedecoratorAppEventService }, { token: PresetsService }, { token: ItemService }, { token: ElementService }, { token: PermanentStoreService }, { token: GoogleTagManagerService }, { token: HomedecoratorSettingsService }, { token: UtilsService }, { token: VariationService }, { token: AppStateService }, { token: ErrorService }, { token: ItemGroupService }, { token: VariationCacheService }, { token: ResizeService }, { token: ViewModeService }, { token: FloorService }, { token: FloorPatternService }, { token: FloorTileIntersectionService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
25960
26688
  BuildFurnitureService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, providedIn: 'root' });
25961
26689
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, decorators: [{
25962
26690
  type: i0.Injectable,
25963
26691
  args: [{
25964
26692
  providedIn: 'root'
25965
26693
  }]
25966
- }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorService }, { type: ThreedselectorService }, { type: CollisionManagerService }, { type: MessageBusService }, { type: HomedecoratorDictionaryService }, { type: HudService }, { type: SceneService }, { type: CameraService }, { type: SceneEventService }, { type: HomedecoratorAppEventService }, { type: PresetsService }, { type: ItemService }, { type: ElementService }, { type: PermanentStoreService }, { type: GoogleTagManagerService }, { type: HomedecoratorSettingsService }, { type: UtilsService }, { type: VariationService }, { type: AppStateService }, { type: ErrorService }, { type: ItemGroupService }, { type: VariationCacheService }, { type: ResizeService }, { type: ViewModeService }, { type: FloorService }]; } });
26694
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorService }, { type: ThreedselectorService }, { type: CollisionManagerService }, { type: MessageBusService }, { type: HomedecoratorDictionaryService }, { type: HudService }, { type: SceneService }, { type: CameraService }, { type: SceneEventService }, { type: HomedecoratorAppEventService }, { type: PresetsService }, { type: ItemService }, { type: ElementService }, { type: PermanentStoreService }, { type: GoogleTagManagerService }, { type: HomedecoratorSettingsService }, { type: UtilsService }, { type: VariationService }, { type: AppStateService }, { type: ErrorService }, { type: ItemGroupService }, { type: VariationCacheService }, { type: ResizeService }, { type: ViewModeService }, { type: FloorService }, { type: FloorPatternService }, { type: FloorTileIntersectionService }]; } });
25967
26695
 
25968
26696
  var __awaiter$F = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
25969
26697
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -29873,38 +30601,62 @@
29873
30601
  NewRenderService.prototype._getNewRenderImage = function (force) {
29874
30602
  if (force === void 0) { force = false; }
29875
30603
  return __awaiter$x(this, void 0, void 0, function () {
29876
- var renderInput, data;
30604
+ var data, data;
30605
+ return __generator(this, function (_a) {
30606
+ if (this._settingsService.settings.blenderRenderService) {
30607
+ data = this._getDataForRender(force);
30608
+ this._handleAjaxBlenderRender(data);
30609
+ // this.messageService.emit(MessageType.ShowLoadingIndicator, {title: 'Rendering...'});
30610
+ // const renderInput = {
30611
+ // 'height': 800,
30612
+ // 'width': 1200,
30613
+ // 'sceneAssetId': this._settingsService.settings.productRenderSceneAssetId
30614
+ // };
30615
+ // await this._utilsService.prepRoomForRender(true, renderInput);
30616
+ }
30617
+ else {
30618
+ data = this._getDataForRender(force);
30619
+ if (this._settingsService.settings.options.useRenderWebsocket) {
30620
+ this._handleWebSocketRender(data);
30621
+ }
30622
+ else {
30623
+ this._handleAjaxRender(data);
30624
+ }
30625
+ }
30626
+ return [2 /*return*/];
30627
+ });
30628
+ });
30629
+ };
30630
+ NewRenderService.prototype._handleAjaxBlenderRender = function (data) {
30631
+ return __awaiter$x(this, void 0, void 0, function () {
30632
+ var result;
29877
30633
  return __generator(this, function (_a) {
29878
30634
  switch (_a.label) {
29879
- case 0:
29880
- if (!this._settingsService.settings.blenderRenderService) return [3 /*break*/, 2];
29881
- this.messageService.emit(MessageType.ShowLoadingIndicator, { title: 'Rendering...' });
29882
- renderInput = {
29883
- 'height': 800,
29884
- 'width': 1200,
29885
- 'sceneAssetId': this._settingsService.settings.productRenderSceneAssetId
29886
- };
29887
- return [4 /*yield*/, this._utilsService.prepRoomForRender(true, renderInput)];
30635
+ case 0: return [4 /*yield*/, axios__default["default"]({
30636
+ headers: {
30637
+ 'Content-Type': 'application/json'
30638
+ },
30639
+ method: 'POST',
30640
+ data: JSON.stringify(data),
30641
+ url: this._settingsService.settings.newRenderParameters.host + ":" + this._settingsService.settings.newRenderParameters.port + "/getBlenderRenderFromData",
30642
+ responseType: 'json'
30643
+ })];
29888
30644
  case 1:
29889
- _a.sent();
29890
- return [3 /*break*/, 3];
29891
- case 2:
29892
- data = this._getDataForRender(force);
29893
- if (this._settingsService.settings.options.useRenderWebsocket) {
29894
- this._handleWebSocketRender(data);
29895
- }
29896
- else {
29897
- this._handleAjaxRender(data);
30645
+ result = _a.sent();
30646
+ if (result.status === 200) {
30647
+ // const image = `data:${result.data.fileType};base64,${result.data.image}`;
30648
+ // this._showPreviewImage(result.data.image);
30649
+ // console.log(image);
30650
+ this.renderImageChanged.next(result.data.image);
29898
30651
  }
29899
- _a.label = 3;
29900
- case 3: return [2 /*return*/];
30652
+ return [2 /*return*/];
29901
30653
  }
29902
30654
  });
29903
30655
  });
29904
30656
  };
29905
30657
  NewRenderService.prototype._handleAjaxRender = function (data) {
29906
30658
  return __awaiter$x(this, void 0, void 0, function () {
29907
- var result, image;
30659
+ var result;
29908
30660
  return __generator(this, function (_a) {
29909
30661
  switch (_a.label) {
29910
30662
  case 0: return [4 /*yield*/, axios__default["default"]({
@@ -29919,10 +30671,10 @@
29919
30671
  case 1:
29920
30672
  result = _a.sent();
29921
30673
  if (result.status === 200) {
29922
- image = "data:" + result.data.fileType + ";base64," + result.data.image;
29923
- // this._showPreviewImage(image);
30674
+ // const image = `data:${result.data.fileType};base64,${result.data.image}`;
30675
+ // this._showPreviewImage(result.data.image);
29924
30676
  // console.log(image);
29925
- this.renderImageChanged.next(image);
30677
+ this.renderImageChanged.next(result.data.image);
29926
30678
  }
29927
30679
  return [2 /*return*/];
29928
30680
  }
@@ -29982,7 +30734,7 @@
29982
30734
  img.style.position = 'fixed';
29983
30735
  img.style.top = '0';
29984
30736
  img.style.left = '0';
29985
- img.style.width = '800px';
30737
+ // img.style.width = '800px';
29986
30738
  img.style.height = '600px';
29987
30739
  img.style.zIndex = '10';
29988
30740
  }
@@ -29990,14 +30742,17 @@
29990
30742
  };
29991
30743
  NewRenderService.prototype._getDataForRender = function (force) {
29992
30744
  if (force === void 0) { force = false; }
30745
+ this._cameraService.camera.updateMatrixWorld(true);
30746
+ var camMatrix = Array.from(this._cameraService.camera.matrixWorld.elements);
29993
30747
  var options = {
29994
30748
  force: force,
29995
30749
  width: this._settingsService.settings.newRenderParameters.imageWidth,
29996
30750
  height: this._settingsService.settings.newRenderParameters.imageHeight,
30751
+ sceneAssetId: this._settingsService.settings.productRenderSceneAssetId,
29997
30752
  max_samples: this._settingsService.settings.newRenderParameters.iterations,
29998
30753
  cameraOptions: {
29999
30754
  fov: this._cameraService.camera.fov,
30000
- matrix: this.standAloneCameraMatrix
30755
+ matrix: camMatrix
30001
30756
  },
30002
30757
  environmentOptions: {
30003
30758
  hdri: this._settingsService.settings.newRenderParameters.hdri,
@@ -30530,7 +31285,7 @@
30530
31285
  return SceneOptionsComponent;
30531
31286
  }());
30532
31287
  SceneOptionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneOptionsComponent, deps: [{ token: SceneOptionsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
30533
- SceneOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SceneOptionsComponent, selector: "scene-options", ngImport: i0__namespace, template: "<div class=\"buttons-wrapper\">\r\n <div class=\"button-wrapper\" *ngFor=\"let button of buttons\">\r\n <div *ngIf=\"!!button.show\">\r\n <button mat-raised-button matTooltip=\"{{(button.active ? button.tooltipActive : button.tooltip) | localize}}\"\r\n [id]=\"button.elementId\"\r\n [ngClass]=\"button.class\"\r\n [class.active]=\"button.active\"\r\n (click)=\"handleShowChildren($event, button)\">\r\n <img *ngIf=\"button.image\" [src]=\"button.image\" />\r\n <mat-icon *ngIf=\"!button.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ button.label }}</mat-icon>\r\n </button>\r\n <ng-container *ngIf=\"button.children\">\r\n <div class=\"children-wrapper\">\r\n <div *ngFor=\"let childButton of button.children\" class=\"child-button-wrapper\">\r\n <button [@showHideChild]=childButton.show mat-raised-button matTooltip=\"{{(childButton.active ? childButton.tooltipActive : childButton.tooltip) | localize}}\"\r\n [id]=\"childButton.elementId\"\r\n [ngClass]=\"'child-button ' + childButton.class\"\r\n [class.active]=\"childButton.active\"\r\n [class.show]=\"childButton.show\"\r\n (click)=\"handleClick($event, childButton)\">\r\n <img *ngIf=\"childButton.image\" [src]=\"childButton.image\" />\r\n <mat-icon *ngIf=\"!childButton.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ childButton.label }}</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{margin:0 5px}:host .buttons-wrapper{display:flex;flex-direction:row;align-items:center;grid-column-gap:5px;column-gap:5px}:host .button-wrapper{position:relative}:host .children-wrapper{display:flex;flex-direction:column;position:absolute;transform:translateY(calc(-100% - 50px));z-index:999}:host button{z-index:1}:host button img{pointer-events:none;width:100%;height:100%}:host button.active{box-shadow:none}:host button.circle{width:50px;height:50px;border-radius:50%}:host button.circle img{border-radius:50%}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "localize": LocalizePipe }, animations: [
31288
+ SceneOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SceneOptionsComponent, selector: "scene-options", ngImport: i0__namespace, template: "\n <div class=\"buttons-wrapper\">\n <div class=\"button-wrapper\" *ngFor=\"let button of buttons\">\n <div *ngIf=\"!!button.show\">\n <button mat-raised-button matTooltip=\"{{(button.active ? button.tooltipActive : button.tooltip) | localize}}\"\n [id]=\"button.elementId\"\n [ngClass]=\"button.class\"\n [class.active]=\"button.active\"\n (click)=\"handleShowChildren($event, button)\">\n <img *ngIf=\"button.image\" [src]=\"button.image\" />\n <mat-icon *ngIf=\"!button.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ button.label }}</mat-icon>\n </button>\n <ng-container *ngIf=\"button.children\">\n <div class=\"children-wrapper\">\n <div *ngFor=\"let childButton of button.children\" class=\"child-button-wrapper\">\n <button [@showHideChild]=childButton.show mat-raised-button matTooltip=\"{{(childButton.active ? childButton.tooltipActive : childButton.tooltip) | localize}}\"\n [id]=\"childButton.elementId\"\n [ngClass]=\"'child-button ' + childButton.class\"\n [class.active]=\"childButton.active\"\n [class.show]=\"childButton.show\"\n (click)=\"handleClick($event, childButton)\">\n <img *ngIf=\"childButton.image\" [src]=\"childButton.image\" />\n <mat-icon *ngIf=\"!childButton.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ childButton.label }}</mat-icon>\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n ", isInline: true, styles: [":host{margin:0 5px}:host .buttons-wrapper{display:flex;flex-direction:row;align-items:center;grid-column-gap:5px;column-gap:5px}:host .button-wrapper{position:relative}:host .children-wrapper{display:flex;flex-direction:column;position:absolute;transform:translateY(calc(-100% - 50px));z-index:999}:host button{z-index:1}:host button img{pointer-events:none;width:100%;height:100%}:host button.active{box-shadow:none}:host button.circle{width:50px;height:50px;border-radius:50%}:host button.circle img{border-radius:50%}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "localize": LocalizePipe }, animations: [
30534
31289
  animations.trigger('showHideChild', [
30535
31290
  animations.state('true', animations.style({ 'opacity': '1', 'visibility': 'visible' })),
30536
31291
  animations.state('false', animations.style({ 'opacity': '0', 'visibility': 'hidden' })),
@@ -30541,7 +31296,7 @@
30541
31296
  type: i0.Component,
30542
31297
  args: [{
30543
31298
  selector: 'scene-options',
30544
- templateUrl: './scene-options.component.html',
31299
+ template: "\n <div class=\"buttons-wrapper\">\n <div class=\"button-wrapper\" *ngFor=\"let button of buttons\">\n <div *ngIf=\"!!button.show\">\n <button mat-raised-button matTooltip=\"{{(button.active ? button.tooltipActive : button.tooltip) | localize}}\"\n [id]=\"button.elementId\"\n [ngClass]=\"button.class\"\n [class.active]=\"button.active\"\n (click)=\"handleShowChildren($event, button)\">\n <img *ngIf=\"button.image\" [src]=\"button.image\" />\n <mat-icon *ngIf=\"!button.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ button.label }}</mat-icon>\n </button>\n <ng-container *ngIf=\"button.children\">\n <div class=\"children-wrapper\">\n <div *ngFor=\"let childButton of button.children\" class=\"child-button-wrapper\">\n <button [@showHideChild]=childButton.show mat-raised-button matTooltip=\"{{(childButton.active ? childButton.tooltipActive : childButton.tooltip) | localize}}\"\n [id]=\"childButton.elementId\"\n [ngClass]=\"'child-button ' + childButton.class\"\n [class.active]=\"childButton.active\"\n [class.show]=\"childButton.show\"\n (click)=\"handleClick($event, childButton)\">\n <img *ngIf=\"childButton.image\" [src]=\"childButton.image\" />\n <mat-icon *ngIf=\"!childButton.image\" class=\"homedecorator-material-icons\" aria-hidden=\"true\">{{ childButton.label }}</mat-icon>\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n ",
30545
31300
  styleUrls: [
30546
31301
  './scene-options.component.scss'
30547
31302
  ],
@@ -30651,7 +31406,7 @@
30651
31406
  return ArGuiButtonsComponent;
30652
31407
  }());
30653
31408
  ArGuiButtonsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ArGuiButtonsComponent, deps: [{ token: HomedecoratorIconCacheService }, { token: ArService }], target: i0__namespace.ɵɵFactoryTarget.Component });
30654
- ArGuiButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ArGuiButtonsComponent, selector: "ar-gui-buttons", ngImport: i0__namespace, template: "<div class=\"buttons-container\">\r\n <div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button mat-mini-fab class=\"button-icon back\" (click)=\"endSession()\">\r\n <co-icon class=\"icon rotated\" [iconData]=\"iconService.getIcon(icon.TriangleDown)\"></co-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button class=\"button-icon\" mat-mini-fab (click)=\"showConfigurator()\">\r\n <co-icon class=\"icon\" [iconData]=\"iconService.getIcon(icon.MagicWand)\"></co-icon>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".buttons-container{position:absolute;display:flex;left:50%;bottom:0;transform:translate(-50%)}.button-container{padding:20px}.button-icon{text-align:-webkit-center}.back{padding-right:3px}.icon{width:65%;height:65%;fill:#fff}.rotated{transform:rotate(90deg)}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace$1.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }] });
31409
+ ArGuiButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ArGuiButtonsComponent, selector: "ar-gui-buttons", ngImport: i0__namespace, template: "<div class=\"buttons-container\">\r\n <div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button mat-mini-fab class=\"button-icon back\" (click)=\"endSession()\">\r\n <co-icon class=\"icon rotated\" [iconData]=\"iconService.getIcon(icon.Cross)\"></co-icon>\r\n </button>\r\n </div>\r\n\r\n <!--div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button class=\"button-icon\" mat-mini-fab (click)=\"showConfigurator()\">\r\n <co-icon class=\"icon\" [iconData]=\"iconService.getIcon(icon.MagicWand)\"></co-icon>\r\n </button>\r\n </div-->\r\n</div>\r\n", styles: [".buttons-container{position:absolute;display:flex;right:15px;top:15px}.button-container{padding:20px}.button-icon{text-align:-webkit-center}.back{padding-right:3px}.icon{width:65%;height:65%;fill:#fff}.rotated{transform:rotate(90deg)}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace$1.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }] });
30655
31410
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ArGuiButtonsComponent, decorators: [{
30656
31411
  type: i0.Component,
30657
31412
  args: [{
@@ -31114,12 +31869,12 @@
31114
31869
  return SelectionsSummaryComponent;
31115
31870
  }());
31116
31871
  SelectionsSummaryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectionsSummaryComponent, deps: [{ token: BuildFurnitureService }, { token: CustomizerService }, { token: HomedecoratorSettingsService }, { token: HomedecoratorConnectorService }, { token: HomedecoratorIconCacheService }], target: i0__namespace.ɵɵFactoryTarget.Component });
31117
- SelectionsSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SelectionsSummaryComponent, selector: "rp-selections-summary", inputs: { selections: "selections", showLabel: "showLabel", canClose: "canClose", answersTemplate: "answersTemplate", answerToShowFromSelectionText: "answerToShowFromSelectionText", customDimensions: "customDimensions" }, outputs: { closeClick: "closeClick", cancelAnswers: "cancelAnswers", selectSelection: "selectSelection" }, host: { listeners: { "document:mouseup": "handledocumentMouseUp($event)", "document:mousemove": "handleDocumentMouseDown($event)" }, properties: { "class.custom-dimensions": "this.customDimensions", "class.disable-mouse": "this.disableMouse" } }, ngImport: i0__namespace, template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host.disable-mouse{pointer-events:none}.selections-content{overflow-y:auto}.rp-selections-summary{display:inline-block;background-color:#fff;overflow-y:auto;position:relative}.rp-selections-summary ::ng-deep co-summary-line br{display:none}:host:not(.custom-dimensions){min-width:400px;max-width:600px;min-height:300px}.drawer__header{height:48px}h2{display:inline-block}button.close-lite-selector{position:absolute;right:0}div.sum{display:flex;align-items:center;height:50px;width:100%;background-color:#deecf3;box-shadow:0 0 2px #484f6040}div.sum>label{width:100%;font-size:11.5px;margin-left:12px}div.sum>div.price{font-weight:bold;font-size:18px;margin-right:3px;white-space:nowrap}co-icon{margin:0 10px}.customizer-slideout{margin-top:65px;width:400px;height:800px!important}.close-answer{position:absolute;top:0;right:0}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: SelectionsSummaryLineComponent, selector: "rp-selections-summary-line", inputs: ["selection", "valutaSymbol", "answersTemplate", "answerToShowFromSelectionText"], outputs: ["customizeButtonClicked", "summaryLineClick"] }, { type: i4__namespace.ɵbr, selector: "co-slideout", inputs: ["show", "resizable"] }, { type: CustomizerComponent, selector: "rp-customizer", inputs: ["selection"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "localize": LocalizePipe, "priceDisplay": i4__namespace.ɵn } });
31872
+ SelectionsSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SelectionsSummaryComponent, selector: "rp-selections-summary", inputs: { selections: "selections", showLabel: "showLabel", canClose: "canClose", answersTemplate: "answersTemplate", answerToShowFromSelectionText: "answerToShowFromSelectionText", customDimensions: "customDimensions" }, outputs: { closeClick: "closeClick", cancelAnswers: "cancelAnswers", selectSelection: "selectSelection" }, host: { listeners: { "document:mouseup": "handledocumentMouseUp($event)", "document:mousemove": "handleDocumentMouseDown($event)" }, properties: { "class.custom-dimensions": "this.customDimensions", "class.disable-mouse": "this.disableMouse" } }, ngImport: i0__namespace, template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\" *ngIf=\"selections && selections.length > 0\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host.disable-mouse{pointer-events:none}.selections-content{overflow-y:auto}.rp-selections-summary{display:inline-block;background-color:#fff;overflow-y:auto;position:relative}.rp-selections-summary ::ng-deep co-summary-line br{display:none}:host:not(.custom-dimensions){min-width:400px;max-width:600px;min-height:300px}.drawer__header{height:48px}h2{display:inline-block}button.close-lite-selector{position:absolute;right:0}div.sum{display:flex;align-items:center;height:50px;width:100%;background-color:#deecf3;box-shadow:0 0 2px #484f6040}div.sum>label{width:100%;font-size:11.5px;margin-left:12px}div.sum>div.price{font-weight:bold;font-size:18px;margin-right:3px;white-space:nowrap}co-icon{margin:0 10px}.customizer-slideout{margin-top:65px;width:400px;height:800px!important}.close-answer{position:absolute;top:0;right:0}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: SelectionsSummaryLineComponent, selector: "rp-selections-summary-line", inputs: ["selection", "valutaSymbol", "answersTemplate", "answerToShowFromSelectionText"], outputs: ["customizeButtonClicked", "summaryLineClick"] }, { type: i4__namespace.ɵbr, selector: "co-slideout", inputs: ["show", "resizable"] }, { type: CustomizerComponent, selector: "rp-customizer", inputs: ["selection"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "localize": LocalizePipe, "priceDisplay": i4__namespace.ɵn } });
31118
31873
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectionsSummaryComponent, decorators: [{
31119
31874
  type: i0.Component,
31120
31875
  args: [{
31121
31876
  selector: 'rp-selections-summary',
31122
- template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ",
31877
+ template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\" *ngIf=\"selections && selections.length > 0\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ",
31123
31878
  styleUrls: ['./selections-summary.component.scss']
31124
31879
  }]
31125
31880
  }], ctorParameters: function () { return [{ type: BuildFurnitureService }, { type: CustomizerService }, { type: HomedecoratorSettingsService }, { type: HomedecoratorConnectorService }, { type: HomedecoratorIconCacheService }]; }, propDecorators: { selections: [{
@@ -38255,7 +39010,7 @@
38255
39010
  return [4 /*yield*/, this._connectorAdapterService.initConnector(object.metadata.externalSettings ? object.metadata.externalSettings.settings : this.settingsService.settings, object.metadata.externalSettings ? object.metadata.externalSettings.name : undefined, false, object.metadata.externalSettings && object.metadata.externalSettings.externalSource ? object.metadata.externalSettings.externalSource.sourceId : null)];
38256
39011
  case 1:
38257
39012
  _a.sent();
38258
- return [4 /*yield*/, this._connectorService.addToCart(+object.metadata.goodId, object.metadata.goodType, 1, +object.metadata.itemId)];
39013
+ return [4 /*yield*/, this._connectorService.addToCart(+object.metadata.goodId, object.metadata.goodType, 1, +object.metadata.itemId, !!(object.metadata.externalSettings && object.metadata.externalSettings.externalSource))];
38259
39014
  case 2:
38260
39015
  json = _a.sent();
38261
39016
  if (object.metadata.externalSettings) {
@@ -41192,12 +41947,12 @@
41192
41947
  };
41193
41948
  ThreedselectorComponent.prototype._handleSkuSet = function (sku) {
41194
41949
  return __awaiter$c(this, void 0, void 0, function () {
41195
- var arButton, _a;
41950
+ var arButton, _a, arIOSButton, _b;
41196
41951
  var _this = this;
41197
- return __generator(this, function (_b) {
41198
- switch (_b.label) {
41952
+ return __generator(this, function (_c) {
41953
+ switch (_c.label) {
41199
41954
  case 0:
41200
- if (!sku) return [3 /*break*/, 2];
41955
+ if (!sku) return [3 /*break*/, 3];
41201
41956
  this._subs.push(this._iOne.controllerInitialized.subscribe(function (initialized) { return __awaiter$c(_this, void 0, void 0, function () {
41202
41957
  return __generator(this, function (_a) {
41203
41958
  if (initialized) {
@@ -41216,7 +41971,7 @@
41216
41971
  };
41217
41972
  return [4 /*yield*/, this._arService.arSupported()];
41218
41973
  case 1:
41219
- arButton = (_a.show = (_b.sent()) &&
41974
+ arButton = (_a.show = (_c.sent()) &&
41220
41975
  this._settingsService.settings.options.showStandaloneARButton &&
41221
41976
  this._settingsService.settings.options.arEnabled,
41222
41977
  _a.click = function () {
@@ -41227,9 +41982,25 @@
41227
41982
  }
41228
41983
  },
41229
41984
  _a);
41985
+ _b = {
41986
+ id: 3,
41987
+ elementId: 'standalone_ar_session',
41988
+ tooltip: 'START_AR_SESSION',
41989
+ order: 10,
41990
+ image: this._iconCacheService.getIconAsBase64(IconEnum.ArCircle),
41991
+ toggle: false
41992
+ };
41993
+ return [4 /*yield*/, this._arService.arIOSSupported()];
41994
+ case 2:
41995
+ arIOSButton = (_b.show = (_c.sent()) &&
41996
+ this._settingsService.settings.options.showStandaloneARButton &&
41997
+ this._settingsService.settings.options.arEnabled,
41998
+ _b.click = function () { return _this._buildFurnitureService.downloadUDSZforARIOS(); },
41999
+ _b);
41230
42000
  this._sceneOptionsService.addSceneOptionButton(arButton);
41231
- _b.label = 2;
41232
- case 2: return [2 /*return*/];
42001
+ this._sceneOptionsService.addSceneOptionButton(arIOSButton);
42002
+ _c.label = 3;
42003
+ case 3: return [2 /*return*/];
41233
42004
  }
41234
42005
  });
41235
42006
  });
@@ -41429,8 +42200,9 @@
41429
42200
  return __awaiter$c(this, void 0, void 0, function () {
41430
42201
  return __generator(this, function (_a) {
41431
42202
  switch (_a.label) {
41432
- case 0:
41433
- this._cameraService.moveCameraToFitObject(item);
42203
+ case 0: return [4 /*yield*/, this._cameraService.moveCameraToFitObject(item)];
42204
+ case 1:
42205
+ _a.sent();
41434
42206
  if (this._settingsService.settings.options.cameraPositionFixed) {
41435
42207
  this._rotationService.enableRotationFor(item);
41436
42208
  }
@@ -41441,12 +42213,12 @@
41441
42213
  }
41442
42214
  this._sceneService.needsRender = true;
41443
42215
  this._callBackFnWhenBuildFinished = undefined;
41444
- if (!this._settingsService.settings.cameraConfig) return [3 /*break*/, 2];
42216
+ if (!this._settingsService.settings.cameraConfig) return [3 /*break*/, 3];
41445
42217
  return [4 /*yield*/, this._dynamicCameraService.loadCustomCameraSettings()];
41446
- case 1:
41447
- _a.sent();
41448
- _a.label = 2;
41449
42218
  case 2:
42219
+ _a.sent();
42220
+ _a.label = 3;
42221
+ case 3:
41450
42222
  if (this._settingsService.settings.options.enable3DInPhoto) {
41451
42223
  this._threedInPhotoInitializerService.init(null, this._cameraService.camera, this._sceneService.scene, this._sceneService.renderer);
41452
42224
  }
@@ -41656,10 +42428,7 @@
41656
42428
  // }
41657
42429
  var len = selection.decoNode ? selection.decoNode.connectors.length : 0;
41658
42430
  var _loop_2 = function (i) {
41659
- var conObject = this_2._selectedElementObject.getObjectByName(selection.decoNode.connectors[i].connector);
41660
- if (!conObject && this_2._selectedElementObject.parent) {
41661
- conObject = this_2._selectedElementObject.parent.getObjectByName(selection.decoNode.connectors[i].connector);
41662
- }
42431
+ var conObject = this_2._getConnectorObject(this_2._selectedElementObject, selection.decoNode.connectors[i].connector);
41663
42432
  if (conObject && this_2._canShowAddButton(selection.decoNode.connectors[i], conObject)) {
41664
42433
  this_2.editAddButtons.push(new CustomButton('', function () {
41665
42434
  _this._handleAddButtonClick(selection, selection.decoNode.connectors[i], _this._selectedElementObject);
@@ -41686,6 +42455,23 @@
41686
42455
  });
41687
42456
  }
41688
42457
  };
42458
+ ThreedselectorComponent.prototype._getConnectorObject = function (obj, connector) {
42459
+ if (!obj) {
42460
+ return null;
42461
+ }
42462
+ var objFound = obj.getObjectByName(connector);
42463
+ if (objFound) {
42464
+ return objFound;
42465
+ }
42466
+ else {
42467
+ if (obj.parent) {
42468
+ return this._getConnectorObject(obj.parent, connector);
42469
+ }
42470
+ else {
42471
+ return null;
42472
+ }
42473
+ }
42474
+ };
41689
42475
  ThreedselectorComponent.prototype._getOppositeConnectorParts = function (connector) {
41690
42476
  var connectorPartsArr = connector.split('_');
41691
42477
  connectorPartsArr.pop(); // remove number
@@ -43644,7 +44430,7 @@
43644
44430
  });
43645
44431
  };
43646
44432
  var ModelPreviewComponent = /** @class */ (function () {
43647
- function ModelPreviewComponent(data, settingsService, _dialogRef, _thirdPartyModelService, _messageService, _dialog, _adapterService) {
44433
+ function ModelPreviewComponent(data, settingsService, _dialogRef, _thirdPartyModelService, _messageService, _dialog, _adapterService, _lightPresetsService, _dictionaryService, _fontService) {
43648
44434
  this.data = data;
43649
44435
  this.settingsService = settingsService;
43650
44436
  this._dialogRef = _dialogRef;
@@ -43652,8 +44438,21 @@
43652
44438
  this._messageService = _messageService;
43653
44439
  this._dialog = _dialog;
43654
44440
  this._adapterService = _adapterService;
44441
+ this._lightPresetsService = _lightPresetsService;
44442
+ this._dictionaryService = _dictionaryService;
44443
+ this._fontService = _fontService;
43655
44444
  this.unitsOfMeasurement = 'cm';
43656
44445
  this.mathPi = Math.PI;
44446
+ this.showReferenceModel = true;
44447
+ this.floorSizeHeight = 10;
44448
+ this.floorSizeWidth = 10;
44449
+ this.gridSize = 10;
44450
+ this.gridDivision = 10;
44451
+ this.distanceStep = 1;
44452
+ this.stackable = false;
44453
+ this.heightAdjustable = false;
44454
+ this._measurements = [];
44455
+ this.font = this._fontService.hudFont;
43657
44456
  }
43658
44457
  ModelPreviewComponent.prototype.ngOnInit = function () {
43659
44458
  this.initScene();
@@ -43687,44 +44486,65 @@
43687
44486
  this.rendererPreview.domElement.setAttribute('id', 'threed');
43688
44487
  this.rendererPreview.setSize(window.innerWidth / 2, window.innerHeight / 2, true);
43689
44488
  // init camera
43690
- this.cameraPreview = new THREE.PerspectiveCamera(45, 1, 0.01, 10000);
44489
+ this.cameraPreview = new THREE.PerspectiveCamera(45, 1, 0.01, 100000000);
43691
44490
  this.cameraPreview.position.set(0, 2, 10);
43692
44491
  this.cameraPreview.aspect = window.innerWidth / window.innerHeight;
43693
44492
  this.cameraPreview.updateProjectionMatrix();
43694
44493
  this.controls = new OrbitControls.OrbitControls(this.cameraPreview, this.rendererPreview.domElement);
43695
44494
  this.controls.update();
43696
- var box1geo = new THREE.BoxGeometry(1, 1, 1);
43697
- var box1 = new THREE.Mesh(box1geo, new THREE.MeshBasicMaterial({ color: 0x0000ff }));
43698
- box1.position.set(3, 0.5, 3);
43699
- box1.castShadow = true;
43700
- box1.receiveShadow = true;
43701
- box1.name = 'Reference_model';
43702
- this.scenePreview.add(box1);
43703
- var planeGeometry = new THREE.PlaneGeometry(10, 10);
43704
- var planeMaterial = new THREE.MeshBasicMaterial({ color: 0xFAF9F6, side: THREE__namespace.DoubleSide });
44495
+ this.loadFloorPlane();
44496
+ this.loadReferenceModel();
44497
+ this.loadLights();
44498
+ var gridHelper = new THREE.GridHelper(this.gridSize, this.gridDivision);
44499
+ gridHelper.name = 'GridHelper';
44500
+ this.scenePreview.add(gridHelper);
44501
+ this._animate();
44502
+ };
44503
+ ModelPreviewComponent.prototype.loadFloorPlane = function () {
44504
+ var planeGeometry = new THREE.PlaneGeometry(this.floorSizeWidth, this.floorSizeHeight);
44505
+ var planeMaterial = new THREE.MeshBasicMaterial({ color: 0x899499, side: THREE__namespace.DoubleSide });
43705
44506
  var plane = new THREE.Mesh(planeGeometry, planeMaterial);
43706
44507
  plane.rotation.x = -Math.PI / 2;
43707
44508
  plane.position.y = 0;
43708
44509
  plane.name = 'floor_plane';
43709
44510
  this.scenePreview.add(plane);
43710
- // Add some basic lights for when models contains MeshLambertMaterial
43711
- var ambientLight = new THREE.AmbientLight(0x404040);
43712
- this.scenePreview.add(ambientLight);
43713
- var directionalLight = new THREE.DirectionalLight(0xffffff, 8);
43714
- directionalLight.position.set(0, 10, 0);
43715
- directionalLight.castShadow = true;
43716
- this.scenePreview.add(directionalLight);
43717
- var pointLight = new THREE.PointLight(0xffffff, 1, 100);
43718
- pointLight.position.set(0, 5, 5);
43719
- this.scenePreview.add(pointLight);
43720
- // basic hdri lighting
43721
- var hdriPath = '/assets/hdri/std_env_v2_A.hdr';
43722
- this.loadHDRI(hdriPath).then(function () {
43723
- // console.log('HDRI loaded successfully.');
43724
- }).catch(function (error) {
43725
- // console.error('Error loading HDRI:', error);
43726
- });
43727
- this._animate();
44511
+ };
44512
+ ModelPreviewComponent.prototype.loadLights = function () {
44513
+ var e_1, _a;
44514
+ var listOfLightPresets = this._lightPresetsService.loadedLightPresets;
44515
+ var lightPreset = this._lightPresetsService.activeLightPreset;
44516
+ try {
44517
+ for (var _b = __values(lightPreset.lights), _c = _b.next(); !_c.done; _c = _b.next()) {
44518
+ var lightProperties = _c.value;
44519
+ this._createLightFromProperties(lightProperties);
44520
+ }
44521
+ }
44522
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
44523
+ finally {
44524
+ try {
44525
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
44526
+ }
44527
+ finally { if (e_1) throw e_1.error; }
44528
+ }
44529
+ };
44530
+ ModelPreviewComponent.prototype.loadReferenceModel = function () {
44531
+ var _this = this;
44532
+ var referenceModelPath = '';
44533
+ var referenceModel = 'reference_pop.glb';
44534
+ if (this.settingsService.settings.threeDAssetPath) {
44535
+ referenceModelPath = this.settingsService.settings.threeDAssetPath + 'assets/';
44536
+ }
44537
+ var loader = new GLTFLoader.GLTFLoader();
44538
+ loader.load(referenceModelPath + referenceModel, function (gltf) { return __awaiter$4(_this, void 0, void 0, function () {
44539
+ return __generator(this, function (_a) {
44540
+ gltf.scene.position.set(3, 0, 3);
44541
+ gltf.scene.castShadow = true;
44542
+ gltf.scene.receiveShadow = true;
44543
+ gltf.scene.name = 'Reference_model';
44544
+ this.scenePreview.add(gltf.scene);
44545
+ return [2 /*return*/];
44546
+ });
44547
+ }); });
43728
44548
  };
43729
44549
  ModelPreviewComponent.prototype.loadModel = function (input) {
43730
44550
  this.modelName = this._setModelName(input.file.file.name);
@@ -43741,6 +44561,9 @@
43741
44561
  else if (fileType === '3ds') {
43742
44562
  this._tdsLoader(input);
43743
44563
  }
44564
+ else if (fileType === 'stl') {
44565
+ this._stlLoader(input);
44566
+ }
43744
44567
  };
43745
44568
  ModelPreviewComponent.prototype.loadHDRI = function (path) {
43746
44569
  var _this = this;
@@ -43762,11 +44585,10 @@
43762
44585
  // add timestamp
43763
44586
  var timestamp = new Date().getTime();
43764
44587
  var exportFileName = this._setModelName(this.glbExportName.nativeElement.value) + '_' + timestamp;
43765
- var elementsToRemove = ['Reference_model', 'floor_plane'];
44588
+ var elementsToRemove = ['modelBoxhelper', 'Reference_model', 'floor_plane', 'GridHelper', 'Ambient', 'Directional front-left', 'spot back (anti-sun)', 'boxHeight', 'boxWidth', 'boxDepth'];
43766
44589
  var gltfExporter = new GLTFExporter.GLTFExporter();
43767
44590
  var scene;
43768
44591
  scene = this.scenePreview.clone();
43769
- scene.environment.dispose();
43770
44592
  scene.children.forEach(function (c) {
43771
44593
  if (c instanceof THREE.Light) {
43772
44594
  scene.remove(c);
@@ -43791,7 +44613,8 @@
43791
44613
  else {
43792
44614
  _this._downloadModel(exportFileName + ".glb", file);
43793
44615
  }
43794
- }, function () {
44616
+ }, function (e) {
44617
+ console.log(e);
43795
44618
  }, options);
43796
44619
  };
43797
44620
  ModelPreviewComponent.prototype.scaleArticle = function () {
@@ -43820,9 +44643,33 @@
43820
44643
  }
43821
44644
  this._getBoundingBox(model);
43822
44645
  };
44646
+ ModelPreviewComponent.prototype.moveModel = function (axis, amount) {
44647
+ var model = this.scenePreview.getObjectByName(this.modelName);
44648
+ if (axis === 'x') {
44649
+ model.position.x += amount;
44650
+ }
44651
+ else if (axis === 'y') {
44652
+ model.position.y += amount;
44653
+ }
44654
+ else if (axis === 'z') {
44655
+ model.position.z += amount;
44656
+ }
44657
+ this._getBoundingBox(model);
44658
+ };
43823
44659
  ModelPreviewComponent.prototype.setUnit = function (event) {
43824
44660
  this.unitsOfMeasurement = event.value;
43825
44661
  };
44662
+ ModelPreviewComponent.prototype.toggleShowReferenceModel = function () {
44663
+ var model = this.scenePreview.getObjectByName('Reference_model');
44664
+ model.visible = !this.showReferenceModel;
44665
+ this.showReferenceModel = !this.showReferenceModel;
44666
+ };
44667
+ ModelPreviewComponent.prototype.setStackable = function (event) {
44668
+ this.stackable = event.value;
44669
+ };
44670
+ ModelPreviewComponent.prototype.setHeightAdjustable = function (event) {
44671
+ this.heightAdjustable = event.value;
44672
+ };
43826
44673
  ModelPreviewComponent.prototype._animate = function () {
43827
44674
  var _this = this;
43828
44675
  setTimeout(function () {
@@ -43849,13 +44696,37 @@
43849
44696
  };
43850
44697
  ModelPreviewComponent.prototype._sendModelToCDN = function (fileName, blob) {
43851
44698
  return __awaiter$4(this, void 0, void 0, function () {
44699
+ var reader;
43852
44700
  var _this = this;
43853
44701
  return __generator(this, function (_a) {
43854
- this._blobToArrayBuffer(blob).then(function (file) {
43855
- _this._adapterService.store3DModelCDN(fileName, file).then(function (filePath) {
43856
- console.log(filePath);
44702
+ reader = new FileReader();
44703
+ reader.readAsDataURL(blob);
44704
+ reader.onloadend = function (event) { return __awaiter$4(_this, void 0, void 0, function () {
44705
+ var fileAsString;
44706
+ var _this = this;
44707
+ return __generator(this, function (_a) {
44708
+ fileAsString = FileUtils.StripMimeStringFromDataUri(event.target.result);
44709
+ this._adapterService.store3DModelCDN(fileName, fileAsString).then(function (filePath) {
44710
+ if (filePath) {
44711
+ _this._blobToArrayBuffer(blob).then(function (file) {
44712
+ var hash = fileName;
44713
+ var modelUrl = filePath; // Set url from the CDN
44714
+ var configurationData = {};
44715
+ var priceData = {};
44716
+ var metaData = _this._thirdPartyModelService.setMetadata(hash, modelUrl, configurationData);
44717
+ metaData.canElevate = _this.heightAdjustable;
44718
+ metaData.thirdPartyModel = true;
44719
+ // We also can set the metadata here and pas it as the last argument for parseModelToGLB.
44720
+ _this._thirdPartyModelService.parseModelToGLB(file, hash, modelUrl, configurationData, priceData, metaData).then(function (result) {
44721
+ _this._dialog.closeAll();
44722
+ _this._messageService.emit(MessageType.HideProductCatalog);
44723
+ });
44724
+ });
44725
+ }
44726
+ });
44727
+ return [2 /*return*/];
43857
44728
  });
43858
- });
44729
+ }); };
43859
44730
  return [2 /*return*/];
43860
44731
  });
43861
44732
  });
@@ -43869,12 +44740,7 @@
43869
44740
  var loader = new GLTFLoader.GLTFLoader();
43870
44741
  loader.parse(input.file.fileContents, '', function (object) { return __awaiter$4(_this, void 0, void 0, function () {
43871
44742
  return __generator(this, function (_a) {
43872
- object.scene.name = this.modelName;
43873
- object.scene.position.set(0, 0, 0);
43874
- object.scene.scale.set(1, 1, 1);
43875
- this.scenePreview.add(object.scene);
43876
- this.loadedModel = object.scene;
43877
- this._getBoundingBox(object.scene);
44743
+ this._prepModelForScene(object.scene);
43878
44744
  return [2 /*return*/];
43879
44745
  });
43880
44746
  }); }, function (error) {
@@ -43884,12 +44750,7 @@
43884
44750
  ModelPreviewComponent.prototype._fbxLoader = function (input) {
43885
44751
  var fbxLoader = new FBXLoader.FBXLoader();
43886
44752
  var object = fbxLoader.parse(input.file.fileContents, '');
43887
- object.name = this.modelName;
43888
- object.position.set(0, 0, 0);
43889
- object.scale.set(1, 1, 1);
43890
- this.scenePreview.add(object);
43891
- this.loadedModel = object;
43892
- this._getBoundingBox(object);
44753
+ this._prepModelForScene(object);
43893
44754
  };
43894
44755
  ModelPreviewComponent.prototype._objLoader = function (input) {
43895
44756
  var objLoader = new OBJLoader.OBJLoader();
@@ -43898,26 +44759,116 @@
43898
44759
  var decoder = new TextDecoder();
43899
44760
  var str = decoder.decode(buf);
43900
44761
  var object = objLoader.parse(str);
43901
- object.name = this.modelName;
43902
- object.position.set(0, 0, 0);
43903
- object.scale.set(1, 1, 1);
43904
- this.scenePreview.add(object);
43905
- this.loadedModel = object;
43906
- this._getBoundingBox(object);
44762
+ this._prepModelForScene(object);
43907
44763
  };
43908
44764
  ModelPreviewComponent.prototype._tdsLoader = function (input) {
43909
44765
  var tdsLoader = new TDSLoader.TDSLoader();
43910
44766
  var object = tdsLoader.parse(input.file.fileContents, '');
44767
+ object.traverse(function (element) {
44768
+ console.log(element);
44769
+ });
44770
+ this._prepModelForScene(object);
44771
+ };
44772
+ ModelPreviewComponent.prototype._stlLoader = function (input) {
44773
+ var stlLoader = new STLLoader.STLLoader();
44774
+ var object = stlLoader.parse(input.file.fileContents);
44775
+ this._addFromGeometry(object);
44776
+ };
44777
+ ModelPreviewComponent.prototype._addFromGeometry = function (geometry) {
44778
+ var material = new THREE.MeshPhongMaterial({ transparent: true, opacity: geometry.alpha });
44779
+ var model = new THREE.Mesh(geometry, material);
44780
+ this._prepModelForScene(model);
44781
+ };
44782
+ ModelPreviewComponent.prototype._prepModelForScene = function (object) {
43911
44783
  object.name = this.modelName;
43912
44784
  object.position.set(0, 0, 0);
43913
44785
  object.scale.set(1, 1, 1);
44786
+ // Remove lights from the children
44787
+ object.children.forEach(function (c) {
44788
+ if (c instanceof THREE.Light) {
44789
+ object.remove(c);
44790
+ }
44791
+ });
43914
44792
  this.scenePreview.add(object);
43915
44793
  this.loadedModel = object;
43916
44794
  this._getBoundingBox(object);
43917
44795
  };
43918
44796
  ModelPreviewComponent.prototype._getBoundingBox = function (object) {
43919
- var boundingBox = new THREE__namespace.Box3().setFromObject(object);
44797
+ var boundingBox = new THREE.Box3().setFromObject(object);
43920
44798
  this.boundingBoxSize = boundingBox.getSize(new THREE.Vector3());
44799
+ this._setMeasurements(this.boundingBoxSize);
44800
+ this._showMeasurements();
44801
+ var boxHelper = new THREE.BoxHelper(object);
44802
+ boxHelper.material.color.set(0xFF00FF);
44803
+ boxHelper.name = 'modelBoxhelper';
44804
+ this.scenePreview.add(boxHelper);
44805
+ };
44806
+ ModelPreviewComponent.prototype._showMeasurements = function () {
44807
+ var _this = this;
44808
+ var measurementsMeshes = this._measurements.map(function (value) { return value.textMesh; });
44809
+ measurementsMeshes.forEach(function (object) { return _this.scenePreview.add(object); });
44810
+ };
44811
+ ModelPreviewComponent.prototype._setMeasurements = function (boundingBox) {
44812
+ var setHeight = this._createHeightMeasurement(boundingBox.y);
44813
+ this._measurements.push(setHeight);
44814
+ var setWidth = this._createWidthMeasurement(boundingBox.x);
44815
+ this._measurements.push(setWidth);
44816
+ var setDepth = this._createDepthMeasurement(boundingBox.z);
44817
+ this._measurements.push(setDepth);
44818
+ };
44819
+ ModelPreviewComponent.prototype._createHeightMeasurement = function (heightInput) {
44820
+ var height = new BoxMeasurement();
44821
+ var heightString = MeasurementUtils.makeText(heightInput, this.unitsOfMeasurement, this.distanceStep);
44822
+ var text = this._dictionaryService.get('LABEL_HEIGHT');
44823
+ height.textMesh = makeTextMesh(heightString, this.font, 0xFF00FF, 0.08, false, false, text);
44824
+ height.positions = this._calculateHeightPositions();
44825
+ height.textMesh.name = 'boxHeight';
44826
+ return height;
44827
+ };
44828
+ ModelPreviewComponent.prototype._createWidthMeasurement = function (widthInput) {
44829
+ var width = new BoxMeasurement();
44830
+ var widthString = MeasurementUtils.makeText(widthInput, this.unitsOfMeasurement, this.distanceStep);
44831
+ var text = this._dictionaryService.get('LABEL_WIDTH');
44832
+ width.textMesh = makeTextMesh(widthString, this.font, 0xFF00FF, 0.08, false, false, text);
44833
+ width.positions = this._calculateWidthPositions();
44834
+ width.textMesh.name = 'boxWidth';
44835
+ return width;
44836
+ };
44837
+ ModelPreviewComponent.prototype._createDepthMeasurement = function (depthInput) {
44838
+ var depth = new BoxMeasurement();
44839
+ var depthString = MeasurementUtils.makeText(depthInput, this.unitsOfMeasurement, this.distanceStep);
44840
+ var text = this._dictionaryService.get('LABEL_DEPTH');
44841
+ depth.textMesh = makeTextMesh(depthString, this.font, 0xFF00FF, 0.08, false, false, text);
44842
+ depth.positions = this._calculateDepthPositions();
44843
+ depth.textMesh.name = 'boxDepth';
44844
+ return depth;
44845
+ };
44846
+ ModelPreviewComponent.prototype._calculateHeightPositions = function () {
44847
+ var _this = this;
44848
+ return positioningFactors.map(function (_a) {
44849
+ var _b = __read(_a, 2), j = _b[0], k = _b[1];
44850
+ return new THREE__namespace.Vector3()
44851
+ .addScaledVector(xDirection, j / 2 * _this.boundingBoxSize.x)
44852
+ .addScaledVector(zDirection, k / 2 * _this.boundingBoxSize.z);
44853
+ });
44854
+ };
44855
+ ModelPreviewComponent.prototype._calculateWidthPositions = function () {
44856
+ var _this = this;
44857
+ return positioningFactors.map(function (_a) {
44858
+ var _b = __read(_a, 2), j = _b[0], k = _b[1];
44859
+ return new THREE__namespace.Vector3()
44860
+ .addScaledVector(yDirection, j / 2 * _this.boundingBoxSize.y)
44861
+ .addScaledVector(zDirection, k / 2 * _this.boundingBoxSize.z);
44862
+ });
44863
+ };
44864
+ ModelPreviewComponent.prototype._calculateDepthPositions = function () {
44865
+ var _this = this;
44866
+ return positioningFactors.map(function (_a) {
44867
+ var _b = __read(_a, 2), j = _b[0], k = _b[1];
44868
+ return new THREE__namespace.Vector3()
44869
+ .addScaledVector(yDirection, j / 2 * _this.boundingBoxSize.y)
44870
+ .addScaledVector(xDirection, k / 2 * _this.boundingBoxSize.x);
44871
+ });
43921
44872
  };
43922
44873
  ModelPreviewComponent.prototype._blobToArrayBuffer = function (blob) {
43923
44874
  return new Promise(function (resolve, reject) {
@@ -43936,22 +44887,61 @@
43936
44887
  reader.readAsArrayBuffer(blob);
43937
44888
  });
43938
44889
  };
44890
+ ModelPreviewComponent.prototype._createLightFromProperties = function (lightProperties) {
44891
+ var lightType = lightProperties.type;
44892
+ var getLights = new LightCreateService();
44893
+ var light = getLights.createNewLight(lightType);
44894
+ light.userData.wallOffset = lightProperties.wallOffset;
44895
+ light.userData.rotationOffset = lightProperties.rotationOffset;
44896
+ light.userData.topDownDirectional = lightProperties.topDownDirectional;
44897
+ for (var property in lightProperties) {
44898
+ if (!light.hasOwnProperty(property)) {
44899
+ continue;
44900
+ }
44901
+ if (property === 'position') {
44902
+ light.position.y = lightProperties.position.y;
44903
+ }
44904
+ else if (property === 'color') {
44905
+ light.color = new THREE.Color(lightProperties.color);
44906
+ }
44907
+ else if (property === 'groundColor') {
44908
+ light.groundColor = new THREE.Color(lightProperties.groundColor);
44909
+ }
44910
+ else {
44911
+ this._setObjectProperties(light, property, lightProperties[property]);
44912
+ }
44913
+ }
44914
+ this.scenePreview.add(light);
44915
+ };
44916
+ ModelPreviewComponent.prototype._setObjectProperties = function (object, property, value) {
44917
+ if (property === 'shadow') {
44918
+ for (var prop in value) {
44919
+ if (!object[property].hasOwnProperty(prop)) {
44920
+ continue;
44921
+ }
44922
+ object[property][prop] = value[prop];
44923
+ }
44924
+ }
44925
+ else {
44926
+ object[property] = value;
44927
+ }
44928
+ };
43939
44929
  return ModelPreviewComponent;
43940
44930
  }());
43941
- ModelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: HomedecoratorSettingsService }, { token: i1__namespace$1.MatDialogRef }, { token: ThirdPartyModelService }, { token: MessageBusService }, { token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
43942
- ModelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ModelPreviewComponent, selector: "rp-model-preview", viewQueries: [{ propertyName: "glbExportName", first: true, predicate: ["fileName"], descendants: true }, { propertyName: "heightArticle", first: true, predicate: ["heightArticle"], descendants: true }], ngImport: i0__namespace, template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Size</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.file.size }}</label>\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download</button>\n </div>\n </div>\n </div>\n ", isInline: true, styles: [".model-preview{display:flex;flex-direction:row}.model-preview .model-preview-actions{min-width:240px;box-sizing:border-box;padding:10px 20px;border-left:1px solid #5b6875}.model-preview .model-preview-actions .model-preview-info-container{margin-bottom:10px}.model-preview .model-preview-actions .model-preview-info-container .model-preview-info-left{font-weight:bolder}.model-preview .exportButton{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px;display:flex;align-items:center}.model-preview .exportButton:hover{background:#dda73f;color:#fff}input{border:1px solid #5b6875;box-sizing:border-box;padding:3px 10px;border-radius:3px}.mat-radio-wrapper{margin:10px 0}mat-radio-group mat-radio-button{display:block}.rotation-button-container div{display:flex;justify-content:space-between;margin-bottom:10px}.rotation-button-container div button{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px}.rotation-button-container div button:hover{background:#dda73f;color:#fff}\n"], components: [{ type: i6__namespace$3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], directives: [{ type: i6__namespace$3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
44931
+ ModelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: HomedecoratorSettingsService }, { token: i1__namespace$1.MatDialogRef }, { token: ThirdPartyModelService }, { token: MessageBusService }, { token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorAdapterService }, { token: LightPresetsService }, { token: HomedecoratorDictionaryService }, { token: FontService }], target: i0__namespace.ɵɵFactoryTarget.Component });
44932
+ ModelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ModelPreviewComponent, selector: "rp-model-preview", viewQueries: [{ propertyName: "glbExportName", first: true, predicate: ["fileName"], descendants: true }, { propertyName: "heightArticle", first: true, predicate: ["heightArticle"], descendants: true }], ngImport: i0__namespace, template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div>\n <button (click)=\"toggleShowReferenceModel()\">Show Reference model</button>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n\n <div class=\"rotation-button-container\">\n <p>Positie</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"moveModel('x', 0.01)\">x-as + 0.01</button>\n <button (click)=\"moveModel('x', -0.01)\">x-as -0.01</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"moveModel('y', 0.01)\">y-as + 0.01</button>\n <button (click)=\"moveModel('y', -0.01)\">y-as - 0.01</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"moveModel('z', 0.01)\">z-as + 0.01</button>\n <button (click)=\"moveModel('z', -0.01)\">z-as -0.01</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Stackable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setStackable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Height adjustable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setHeightAdjustable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Upload to CDN and add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download model</button>\n </div>\n </div>\n </div>\n ", isInline: true, styles: [".model-preview{display:flex;flex-direction:row}.model-preview .model-preview-actions{min-width:240px;box-sizing:border-box;padding:10px 20px;border-left:1px solid #5b6875}.model-preview .model-preview-actions .model-preview-info-container{margin-bottom:10px}.model-preview .model-preview-actions .model-preview-info-container .model-preview-info-left{font-weight:bolder}.model-preview .exportButton{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px;display:flex;align-items:center}.model-preview .exportButton:hover{background:#dda73f;color:#fff}input{border:1px solid #5b6875;box-sizing:border-box;padding:3px 10px;border-radius:3px}.mat-radio-wrapper{margin:10px 0}mat-radio-group mat-radio-button{display:block}.rotation-button-container div{display:flex;justify-content:space-between;margin-bottom:10px}.rotation-button-container div button{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px}.rotation-button-container div button:hover{background:#dda73f;color:#fff}\n"], components: [{ type: i9__namespace$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], directives: [{ type: i9__namespace$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
43943
44933
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, decorators: [{
43944
44934
  type: i0.Component,
43945
44935
  args: [{
43946
44936
  selector: 'rp-model-preview',
43947
- template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Size</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.file.size }}</label>\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download</button>\n </div>\n </div>\n </div>\n ",
44937
+ template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div>\n <button (click)=\"toggleShowReferenceModel()\">Show Reference model</button>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n\n <div class=\"rotation-button-container\">\n <p>Positie</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"moveModel('x', 0.01)\">x-as + 0.01</button>\n <button (click)=\"moveModel('x', -0.01)\">x-as -0.01</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"moveModel('y', 0.01)\">y-as + 0.01</button>\n <button (click)=\"moveModel('y', -0.01)\">y-as - 0.01</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"moveModel('z', 0.01)\">z-as + 0.01</button>\n <button (click)=\"moveModel('z', -0.01)\">z-as -0.01</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Stackable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setStackable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Height adjustable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setHeightAdjustable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Upload to CDN and add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download model</button>\n </div>\n </div>\n </div>\n ",
43948
44938
  styleUrls: ['./model-preview.component.scss']
43949
44939
  }]
43950
44940
  }], ctorParameters: function () {
43951
44941
  return [{ type: undefined, decorators: [{
43952
44942
  type: i0.Inject,
43953
44943
  args: [i1$1.MAT_DIALOG_DATA]
43954
- }] }, { type: HomedecoratorSettingsService }, { type: i1__namespace$1.MatDialogRef }, { type: ThirdPartyModelService }, { type: MessageBusService }, { type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorAdapterService }];
44944
+ }] }, { type: HomedecoratorSettingsService }, { type: i1__namespace$1.MatDialogRef }, { type: ThirdPartyModelService }, { type: MessageBusService }, { type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorAdapterService }, { type: LightPresetsService }, { type: HomedecoratorDictionaryService }, { type: FontService }];
43955
44945
  }, propDecorators: { glbExportName: [{
43956
44946
  type: i0.ViewChild,
43957
44947
  args: ['fileName']
@@ -44325,7 +45315,7 @@
44325
45315
  return ToolbarComponent;
44326
45316
  }());
44327
45317
  ToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarComponent, deps: [{ token: AppStateService }, { token: PresetsService }, { token: MessageBusService }, { token: HomedecoratorSettingsService }, { token: LocalStorageService }, { token: ScreenSizeAnalysisService }, { token: i1__namespace$1.MatDialog }, { token: ToastService }, { token: HomedecoratorAppService }, { token: PermanentStoreService }, { token: UtilsService }, { token: ThreedselectorService }, { token: ItemService }, { token: FloorplanService }, { token: FloorService }, { token: AnimationService }, { token: DevelopmentService }, { token: NewRenderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
44328
- ToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ToolbarComponent, selector: "rp-toolbar", host: { listeners: { "document:keydown": "handleKeyDown($event)" } }, viewQueries: [{ propertyName: "leftSidebar", first: true, predicate: ["leftSidebar"], descendants: true, static: true }], ngImport: i0__namespace, template: "\n <!--\n <div class=\"layer layer&#45;&#45;toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n\n <!-- <ng-container *ngIf=\"settingsService.settings.options.showRoomRenderButton\">-->\n <!-- <button mat-icon-button (click)=\"apiRoomRender()\">-->\n <!-- <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'RENDER_GLB' | localize}}\">share_windows</mat-icon>-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <!-- <ng-container>-->\n <!-- <button mat-icon-button (click)=\"testRender()\">-->\n <!-- TEST-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <div class=\"hd-toolbar-spacer\"></div>\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;top:0;z-index:100;height:100%;width:100%;pointer-events:none}:host .hd-toolbar-spacer{display:flex;flex-basis:100%}:host .toast-wrapper{height:auto;position:absolute;top:64px;left:50%;-webkit-user-select:none;user-select:none;pointer-events:none;background:#74B77F;padding:30px;border-radius:0 0 10px 10px;min-width:150px;max-width:90%;color:#fff;text-align:center;transform:translate(-50%,-100%)}:host .toast-wrapper.warning{background:#F17300}:host .toast-wrapper.error{background:#CC2936}:host ::ng-deep .drawer__header{display:flex;align-items:center;min-height:40px;margin-bottom:16px}:host ::ng-deep .drawer__header h2{margin:0 auto 0 0}:host ::ng-deep mat-tab-header,:host ::ng-deep .FileDrop{margin-bottom:16px}:host ::ng-deep .tab--skin ::ng-deep .mat-tab-label{height:52px;min-width:auto}:host ::ng-deep .drawer p{white-space:pre-wrap}:host ::ng-deep .mat-divider{margin:16px 0 24px}:host ::ng-deep .mat-drawer-backdrop{display:none}.storage-error{min-width:30px;height:30px;display:flex;align-items:center;align-self:center;border-radius:50%;justify-content:center;background:white;color:#c00;font-size:25px;font-weight:bold}.layer--toolbar{display:flex;flex-direction:column}.toolbar{z-index:101;box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.toolbar .menu-icon{min-width:50px;display:flex;justify-content:center;margin-left:-16px}.toolbar-logo{width:50px}.secondary-logo{margin-left:20px}.toolbar__nav{display:flex;flex-direction:row;padding-top:0}.toolbar__nav .mat-list-item{color:#fff;height:40px}.toolbar-row{flex:auto;display:flex;flex-direction:column;padding:0;pointer-events:none;position:relative;align-items:baseline;height:100%}.toolbar--secondary{width:64px;padding:16px 0;flex-direction:column;background:#fff;height:100%}.toolbar--secondary .drawer{flex:auto;pointer-events:none;background:transparent}.wip-card{margin-left:22px;padding:6px 22px;color:#fff;background-color:#ed912e}.drawer-container{position:static;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.drawer{width:420px;padding:16px;display:flex;flex-direction:column;left:65px}.toolbar,.toolbar--secondary>*,.drawer-container>*,.drawer>*{pointer-events:all}.drawer__button{min-width:initial;padding:0;border:none;position:absolute;top:0;right:0;border-radius:50%}.blinker{animation:blinker 1s linear infinite}.mat-badge-content{background-color:#b71c1c;animation:bounce 2s ease-out;animation-iteration-count:infinite;margin-left:5px}.badge{margin-right:20px;margin-bottom:20px}::ng-deep .tooltip-red{background:#b71c1c}@keyframes bounce{0%{transform:scale(1) translateY(0)}10%{transform:scale(1.1,.9) translateY(0)}30%{transform:scale(.9,1.1) translateY(-20px)}50%{transform:scale(1.05,.95) translateY(0)}57%{transform:scale(1) translateY(-7px)}64%{transform:scale(1) translateY(0)}to{transform:scale(1) translateY(0)}}@keyframes blinker{50%{opacity:0}}::ng-deep .mat-menu-panel{width:256px!important}::ng-deep .mat-menu-panel .mat-menu-content{display:flex;flex-direction:column;padding-left:10px;padding-right:10px}::ng-deep mat-drawer-content.mat-drawer-content{display:flex;height:100%;flex-direction:column}\n"], components: [{ type: i19__namespace$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i22__namespace.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i23__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace$2.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2__namespace$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: LimitedModeMessageComponent, selector: "limited-mode-message", outputs: ["closeClicked"] }, { type: i26__namespace.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { type: i26__namespace.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { type: i26__namespace.MatDrawerContent, selector: "mat-drawer-content" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i22__namespace.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i28__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i23__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i30__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i19__namespace$1.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }], pipes: { "localize": LocalizePipe }, animations: [
45318
+ ToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ToolbarComponent, selector: "rp-toolbar", host: { listeners: { "document:keydown": "handleKeyDown($event)" } }, viewQueries: [{ propertyName: "leftSidebar", first: true, predicate: ["leftSidebar"], descendants: true, static: true }], ngImport: i0__namespace, template: "\n <!--\n <div class=\"layer layer&#45;&#45;toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n <div class=\"hd-toolbar-spacer\"></div>\n\n<!-- <ng-container>-->\n<!-- <rp-pdf-export></rp-pdf-export>-->\n<!-- </ng-container>-->\n\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;top:0;z-index:100;height:100%;width:100%;pointer-events:none}:host .hd-toolbar-spacer{display:flex;flex-basis:100%}:host .toast-wrapper{height:auto;position:absolute;top:64px;left:50%;-webkit-user-select:none;user-select:none;pointer-events:none;background:#74B77F;padding:30px;border-radius:0 0 10px 10px;min-width:150px;max-width:90%;color:#fff;text-align:center;transform:translate(-50%,-100%)}:host .toast-wrapper.warning{background:#F17300}:host .toast-wrapper.error{background:#CC2936}:host ::ng-deep .drawer__header{display:flex;align-items:center;min-height:40px;margin-bottom:16px}:host ::ng-deep .drawer__header h2{margin:0 auto 0 0}:host ::ng-deep mat-tab-header,:host ::ng-deep .FileDrop{margin-bottom:16px}:host ::ng-deep .tab--skin ::ng-deep .mat-tab-label{height:52px;min-width:auto}:host ::ng-deep .drawer p{white-space:pre-wrap}:host ::ng-deep .mat-divider{margin:16px 0 24px}:host ::ng-deep .mat-drawer-backdrop{display:none}.storage-error{min-width:30px;height:30px;display:flex;align-items:center;align-self:center;border-radius:50%;justify-content:center;background:white;color:#c00;font-size:25px;font-weight:bold}.layer--toolbar{display:flex;flex-direction:column}.toolbar{z-index:101;box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.toolbar .menu-icon{min-width:50px;display:flex;justify-content:center;margin-left:-16px}.toolbar-logo{width:50px}.secondary-logo{margin-left:20px}.toolbar__nav{display:flex;flex-direction:row;padding-top:0}.toolbar__nav .mat-list-item{color:#fff;height:40px}.toolbar-row{flex:auto;display:flex;flex-direction:column;padding:0;pointer-events:none;position:relative;align-items:baseline;height:100%}.toolbar--secondary{width:64px;padding:16px 0;flex-direction:column;background:#fff;height:100%}.toolbar--secondary .drawer{flex:auto;pointer-events:none;background:transparent}.wip-card{margin-left:22px;padding:6px 22px;color:#fff;background-color:#ed912e}.drawer-container{position:static;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.drawer{width:420px;padding:16px;display:flex;flex-direction:column;left:65px}.toolbar,.toolbar--secondary>*,.drawer-container>*,.drawer>*{pointer-events:all}.drawer__button{min-width:initial;padding:0;border:none;position:absolute;top:0;right:0;border-radius:50%}.blinker{animation:blinker 1s linear infinite}.mat-badge-content{background-color:#b71c1c;animation:bounce 2s ease-out;animation-iteration-count:infinite;margin-left:5px}.badge{margin-right:20px;margin-bottom:20px}::ng-deep .tooltip-red{background:#b71c1c}@keyframes bounce{0%{transform:scale(1) translateY(0)}10%{transform:scale(1.1,.9) translateY(0)}30%{transform:scale(.9,1.1) translateY(-20px)}50%{transform:scale(1.05,.95) translateY(0)}57%{transform:scale(1) translateY(-7px)}64%{transform:scale(1) translateY(0)}to{transform:scale(1) translateY(0)}}@keyframes blinker{50%{opacity:0}}::ng-deep .mat-menu-panel{width:256px!important}::ng-deep .mat-menu-panel .mat-menu-content{display:flex;flex-direction:column;padding-left:10px;padding-right:10px}::ng-deep mat-drawer-content.mat-drawer-content{display:flex;height:100%;flex-direction:column}\n"], components: [{ type: i19__namespace$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i22__namespace.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i23__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace$2.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2__namespace$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: LimitedModeMessageComponent, selector: "limited-mode-message", outputs: ["closeClicked"] }, { type: i26__namespace.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { type: i26__namespace.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { type: i26__namespace.MatDrawerContent, selector: "mat-drawer-content" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i22__namespace.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i28__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i23__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i30__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i19__namespace$1.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }], pipes: { "localize": LocalizePipe }, animations: [
44329
45319
  animations.trigger('showToast', [
44330
45320
  animations.state('void', animations.style({ 'transform-origin': 'top center', transform: 'translate(-50%, -100%)' })),
44331
45321
  animations.state('*', animations.style({ 'transform-origin': 'top center', transform: 'translate(-50%, 0)' })),
@@ -44342,7 +45332,7 @@
44342
45332
  type: i0.Component,
44343
45333
  args: [{
44344
45334
  selector: 'rp-toolbar',
44345
- template: "\n <!--\n <div class=\"layer layer&#45;&#45;toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n\n <!-- <ng-container *ngIf=\"settingsService.settings.options.showRoomRenderButton\">-->\n <!-- <button mat-icon-button (click)=\"apiRoomRender()\">-->\n <!-- <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'RENDER_GLB' | localize}}\">share_windows</mat-icon>-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <!-- <ng-container>-->\n <!-- <button mat-icon-button (click)=\"testRender()\">-->\n <!-- TEST-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <div class=\"hd-toolbar-spacer\"></div>\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ",
45335
+ template: "\n <!--\n <div class=\"layer layer&#45;&#45;toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n <div class=\"hd-toolbar-spacer\"></div>\n\n<!-- <ng-container>-->\n<!-- <rp-pdf-export></rp-pdf-export>-->\n<!-- </ng-container>-->\n\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ",
44346
45336
  styleUrls: ['./toolbar.component.scss'],
44347
45337
  animations: [
44348
45338
  animations.trigger('showToast', [
@@ -44480,13 +45470,14 @@
44480
45470
  this.file = null;
44481
45471
  this.fileMaxSize = 30; // file size in mb
44482
45472
  this._maxFileSize = this.fileMaxSize * 1024 * 1024; // fileMaxSize to kb
44483
- this._allowedFiles = ['glb', 'obj', 'fbx', '3ds', 'gltf'];
45473
+ this._allowedFiles = ['glb', 'obj', 'fbx', '3ds', 'gltf', 'stl'];
44484
45474
  }
44485
45475
  ModelUploaderComponent.prototype.ngOnInit = function () {
44486
45476
  };
44487
45477
  ModelUploaderComponent.prototype.ngOnDestroy = function () {
44488
45478
  };
44489
45479
  ModelUploaderComponent.prototype.onChange = function (event) {
45480
+ this.showUploadError = false;
44490
45481
  var file = event.target.files[0];
44491
45482
  if (file) {
44492
45483
  this.file = file;
@@ -44733,7 +45724,7 @@
44733
45724
  if (!jsonString) return [3 /*break*/, 4];
44734
45725
  jsonObj_1 = JSON.parse(jsonString);
44735
45726
  if (!(jsonObj_1['hash'] !== undefined)) return [3 /*break*/, 4];
44736
- customerName = 'Linteloo';
45727
+ customerName = this.catalogInfo.username;
44737
45728
  modelUrl_1 = this.catalogInfo.externalSource.domain + '/models/' + jsonObj_1['hash'] + '/glb';
44738
45729
  configurationUrl = this.catalogInfo.externalSource.domain + '/configurationData/' + jsonObj_1['hash'];
44739
45730
  priceDataUrl = this.catalogInfo.externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + jsonObj_1['hash'];
@@ -47070,6 +48061,123 @@
47070
48061
  }]
47071
48062
  }] });
47072
48063
 
48064
+ var ExportPdfComponent = /** @class */ (function () {
48065
+ function ExportPdfComponent(_sceneService, _floorService, _messageBusService) {
48066
+ var _this = this;
48067
+ this._sceneService = _sceneService;
48068
+ this._floorService = _floorService;
48069
+ this._messageBusService = _messageBusService;
48070
+ this._subs = [];
48071
+ this._diagramBackground = '';
48072
+ this._subs.push(this._messageBusService.subscribe(MessageType.LoadScaledDiagram, function (input) { return _this.setDiagramBackground(input); }));
48073
+ }
48074
+ ExportPdfComponent.prototype.ngOnDestroy = function () {
48075
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
48076
+ };
48077
+ ExportPdfComponent.prototype.getFloor = function () {
48078
+ var e_1, _a;
48079
+ var activeFloor = this._floorService.floorToConfigure.metadata;
48080
+ var output = [];
48081
+ if (activeFloor) {
48082
+ var floorCountResult = activeFloor.floorCountResult;
48083
+ output.push(['Planken links', floorCountResult.left.toString()]);
48084
+ output.push(['Planken rechts', floorCountResult.right.toString()]);
48085
+ output.push(['Hoek', floorCountResult.edge.toString()]);
48086
+ output.push(['Totaal aantal planken', floorCountResult.total.toString()]);
48087
+ var selectedSelections = activeFloor.selections;
48088
+ try {
48089
+ for (var selectedSelections_1 = __values(selectedSelections), selectedSelections_1_1 = selectedSelections_1.next(); !selectedSelections_1_1.done; selectedSelections_1_1 = selectedSelections_1.next()) {
48090
+ var selectedSelection = selectedSelections_1_1.value;
48091
+ if (selectedSelection.commercialAnswer !== undefined) {
48092
+ output.push([selectedSelection.commercialQuestion, selectedSelection.commercialAnswer]);
48093
+ }
48094
+ }
48095
+ }
48096
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
48097
+ finally {
48098
+ try {
48099
+ if (selectedSelections_1_1 && !selectedSelections_1_1.done && (_a = selectedSelections_1.return)) _a.call(selectedSelections_1);
48100
+ }
48101
+ finally { if (e_1) throw e_1.error; }
48102
+ }
48103
+ console.log(output);
48104
+ }
48105
+ return output;
48106
+ };
48107
+ ExportPdfComponent.prototype.generatePdf = function () {
48108
+ // get all data
48109
+ var sceneImage = this._createSceneScreenshot();
48110
+ var doc = new jspdf.jsPDF();
48111
+ var dataList = this.getFloor();
48112
+ var dataListLength = dataList.length;
48113
+ autoTable__default["default"](doc, {
48114
+ head: [['Header', 'Value']],
48115
+ body: dataList,
48116
+ bodyStyles: { minCellHeight: 10 }
48117
+ });
48118
+ doc.addPage();
48119
+ doc.addImage(sceneImage, 'JPEG', 0, 0, 210, 117); // size is in mm not pixels!
48120
+ if (this._diagramBackground !== '') {
48121
+ doc.addPage();
48122
+ var offsetYImageTwo = 30 + 125 + (dataListLength * 10);
48123
+ doc.addImage(this._diagramBackground, 'JPEG', 0, 0, 210, 117); // size is in mm not pixels!
48124
+ }
48125
+ doc.save('sample.pdf');
48126
+ };
48127
+ ExportPdfComponent.prototype.setDiagramBackground = function (input) {
48128
+ this._diagramBackground = input.background.src;
48129
+ };
48130
+ ExportPdfComponent.prototype._createSceneScreenshot = function () {
48131
+ return this._sceneService.createRenderWithOrthographicCamera();
48132
+ // return this._sceneService.getSceneCanvasImage();
48133
+ };
48134
+ return ExportPdfComponent;
48135
+ }());
48136
+ ExportPdfComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfComponent, deps: [{ token: SceneService }, { token: FloorService }, { token: MessageBusService }], target: i0__namespace.ɵɵFactoryTarget.Component });
48137
+ ExportPdfComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ExportPdfComponent, selector: "rp-pdf-export", ngImport: i0__namespace, template: "\n <div>\n <button (click)=\"generatePdf()\">Generate PDF</button>\n </div>\n ", isInline: true, styles: [":host .mat-dialog-content{margin:0;padding:0;overflow:hidden}:host .mat-nav-list{display:flex;flex-direction:column}.mat-dialog-actions{margin-bottom:0}.item-description{white-space:inherit!important}\n"] });
48138
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfComponent, decorators: [{
48139
+ type: i0.Component,
48140
+ args: [{
48141
+ selector: 'rp-pdf-export',
48142
+ template: "\n <div>\n <button (click)=\"generatePdf()\">Generate PDF</button>\n </div>\n ",
48143
+ styleUrls: ['./pdf-export.component.scss']
48144
+ }]
48145
+ }], ctorParameters: function () { return [{ type: SceneService }, { type: FloorService }, { type: MessageBusService }]; } });
48146
+
48147
+ var ExportPdfModule = /** @class */ (function () {
48148
+ function ExportPdfModule() {
48149
+ }
48150
+ return ExportPdfModule;
48151
+ }());
48152
+ ExportPdfModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
48153
+ ExportPdfModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, declarations: [ExportPdfComponent], imports: [CoreModule,
48154
+ i5.CommonModule,
48155
+ i1$1.MatDialogModule,
48156
+ i2$2.MatListModule], exports: [ExportPdfComponent] });
48157
+ ExportPdfModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, imports: [[
48158
+ CoreModule,
48159
+ i5.CommonModule,
48160
+ i1$1.MatDialogModule,
48161
+ i2$2.MatListModule
48162
+ ]] });
48163
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, decorators: [{
48164
+ type: i0.NgModule,
48165
+ args: [{
48166
+ imports: [
48167
+ CoreModule,
48168
+ i5.CommonModule,
48169
+ i1$1.MatDialogModule,
48170
+ i2$2.MatListModule
48171
+ ],
48172
+ exports: [
48173
+ ExportPdfComponent
48174
+ ],
48175
+ declarations: [
48176
+ ExportPdfComponent
48177
+ ]
48178
+ }]
48179
+ }] });
48180
+
47073
48181
  var ToolbarModule = /** @class */ (function () {
47074
48182
  function ToolbarModule() {
47075
48183
  }
@@ -47114,7 +48222,8 @@
47114
48222
  i4.IconModule,
47115
48223
  i30.MatBadgeModule,
47116
48224
  ThreedInPhotoModule,
47117
- i6$2.PdfViewerModule], exports: [ToolbarComponent] });
48225
+ i6$2.PdfViewerModule,
48226
+ ExportPdfModule], exports: [ToolbarComponent] });
47118
48227
  ToolbarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarModule, imports: [[
47119
48228
  CoreModule,
47120
48229
  i5.CommonModule,
@@ -47143,7 +48252,8 @@
47143
48252
  i4.IconModule,
47144
48253
  i30.MatBadgeModule,
47145
48254
  ThreedInPhotoModule,
47146
- i6$2.PdfViewerModule
48255
+ i6$2.PdfViewerModule,
48256
+ ExportPdfModule
47147
48257
  ]] });
47148
48258
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarModule, decorators: [{
47149
48259
  type: i0.NgModule,
@@ -47176,7 +48286,8 @@
47176
48286
  i4.IconModule,
47177
48287
  i30.MatBadgeModule,
47178
48288
  ThreedInPhotoModule,
47179
- i6$2.PdfViewerModule
48289
+ i6$2.PdfViewerModule,
48290
+ ExportPdfModule
47180
48291
  ],
47181
48292
  entryComponents: [
47182
48293
  LoadFromCloudDialogComponent,
@@ -47256,7 +48367,7 @@
47256
48367
  i4$1.ImageModule,
47257
48368
  i7$3.CatalogExternalSourcesModule,
47258
48369
  i7$3.CatalogExternalSourceModule,
47259
- i6$3.MatRadioModule], exports: [ModelUploaderComponent] });
48370
+ i9$1.MatRadioModule], exports: [ModelUploaderComponent] });
47260
48371
  ModelUploaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelUploaderModule, imports: [[
47261
48372
  i5.CommonModule,
47262
48373
  CoreModule,
@@ -47266,7 +48377,7 @@
47266
48377
  i4$1.ImageModule,
47267
48378
  i7$3.CatalogExternalSourcesModule,
47268
48379
  i7$3.CatalogExternalSourceModule,
47269
- i6$3.MatRadioModule,
48380
+ i9$1.MatRadioModule,
47270
48381
  ]] });
47271
48382
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelUploaderModule, decorators: [{
47272
48383
  type: i0.NgModule,
@@ -47280,7 +48391,7 @@
47280
48391
  i4$1.ImageModule,
47281
48392
  i7$3.CatalogExternalSourcesModule,
47282
48393
  i7$3.CatalogExternalSourceModule,
47283
- i6$3.MatRadioModule,
48394
+ i9$1.MatRadioModule,
47284
48395
  ],
47285
48396
  exports: [
47286
48397
  ModelUploaderComponent