@roomle/web-sdk 2.32.0-alpha.2 → 2.33.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/lib/{banana-for-scale-581a9b6b.js → banana-for-scale-295bd115.js} +2 -2
  2. package/lib/{banana-for-scale-581a9b6b.js.map → banana-for-scale-295bd115.js.map} +1 -1
  3. package/lib/{banana-for-scale-5a2d558c.nomodule.js → banana-for-scale-51468e53.nomodule.js} +2 -2
  4. package/lib/{banana-for-scale-5a2d558c.nomodule.js.map → banana-for-scale-51468e53.nomodule.js.map} +1 -1
  5. package/lib/{component-dimensioning-7b174f68.js → component-dimensioning-a0131c47.js} +2 -2
  6. package/lib/component-dimensioning-a0131c47.js.map +1 -0
  7. package/lib/{component-dimensioning-2f8feac1.nomodule.js → component-dimensioning-d982df92.nomodule.js} +2 -2
  8. package/lib/component-dimensioning-d982df92.nomodule.js.map +1 -0
  9. package/lib/{configurator-a8082ea1.js → configurator-1f9550a4.js} +2 -2
  10. package/lib/{configurator-a8082ea1.js.map → configurator-1f9550a4.js.map} +1 -1
  11. package/lib/{configurator-a458b70f.nomodule.js → configurator-3b28e269.nomodule.js} +2 -2
  12. package/lib/{configurator-a458b70f.nomodule.js.map → configurator-3b28e269.nomodule.js.map} +1 -1
  13. package/lib/configurator-main-17613dd5.js +2 -0
  14. package/lib/configurator-main-17613dd5.js.map +1 -0
  15. package/lib/configurator-main.nomodule.js +1 -1
  16. package/lib/{configurator-mesh-generator-e084ec1c.nomodule.js → configurator-mesh-generator-739987bc.nomodule.js} +2 -2
  17. package/lib/configurator-mesh-generator-739987bc.nomodule.js.map +1 -0
  18. package/lib/{configurator-mesh-generator-e2bc0702.js → configurator-mesh-generator-8225c767.js} +2 -2
  19. package/lib/configurator-mesh-generator-8225c767.js.map +1 -0
  20. package/lib/{default-light-setting-f14ab23f.js → default-light-setting-3d7c93c3.js} +2 -2
  21. package/lib/default-light-setting-3d7c93c3.js.map +1 -0
  22. package/lib/{default-light-setting-accf9742.nomodule.js → default-light-setting-8e15475a.nomodule.js} +2 -2
  23. package/lib/default-light-setting-8e15475a.nomodule.js.map +1 -0
  24. package/lib/definitions/common-core/src/cameracontrol/camera-control-2d.d.ts +2 -3
  25. package/lib/definitions/common-core/src/services/common-kernel-access.d.ts +1 -1
  26. package/lib/definitions/typings/kernel.d.ts +4 -1
  27. package/lib/{dimensioning-helper-eaf316cd.nomodule.js → dimensioning-helper-40ff8083.nomodule.js} +2 -2
  28. package/lib/{dimensioning-helper-eaf316cd.nomodule.js.map → dimensioning-helper-40ff8083.nomodule.js.map} +1 -1
  29. package/lib/{dimensioning-helper-cf97b68e.js → dimensioning-helper-bd1cd5cf.js} +2 -2
  30. package/lib/{dimensioning-helper-cf97b68e.js.map → dimensioning-helper-bd1cd5cf.js.map} +1 -1
  31. package/lib/{glb-viewer-3b0c4942.js → glb-viewer-158a96c6.js} +2 -2
  32. package/lib/{glb-viewer-3b0c4942.js.map → glb-viewer-158a96c6.js.map} +1 -1
  33. package/lib/{glb-viewer-81899272.nomodule.js → glb-viewer-62770a0d.nomodule.js} +2 -2
  34. package/lib/{glb-viewer-81899272.nomodule.js.map → glb-viewer-62770a0d.nomodule.js.map} +1 -1
  35. package/lib/glb-viewer-main-0e7e11f4.js +2 -0
  36. package/lib/glb-viewer-main-0e7e11f4.js.map +1 -0
  37. package/lib/glb-viewer-main.nomodule.js +1 -1
  38. package/lib/{image-renderer-9aeaac77.nomodule.js → image-renderer-c7d625ac.nomodule.js} +2 -2
  39. package/lib/{image-renderer-9aeaac77.nomodule.js.map → image-renderer-c7d625ac.nomodule.js.map} +1 -1
  40. package/lib/{image-renderer-53f05110.js → image-renderer-f651bf35.js} +2 -2
  41. package/lib/{image-renderer-53f05110.js.map → image-renderer-f651bf35.js.map} +1 -1
  42. package/lib/legacy/{banana-for-scale-ef2edd06.legacy.js → banana-for-scale-8905ec6a.legacy.js} +2 -2
  43. package/lib/legacy/{banana-for-scale-ef2edd06.legacy.js.map → banana-for-scale-8905ec6a.legacy.js.map} +1 -1
  44. package/lib/legacy/{component-dimensioning-8295cecf.legacy.js → component-dimensioning-b68b9cd2.legacy.js} +2 -2
  45. package/lib/legacy/component-dimensioning-b68b9cd2.legacy.js.map +1 -0
  46. package/lib/legacy/{configurator-1b623df3.legacy.js → configurator-b7c2caf2.legacy.js} +2 -2
  47. package/lib/legacy/{configurator-1b623df3.legacy.js.map → configurator-b7c2caf2.legacy.js.map} +1 -1
  48. package/lib/legacy/configurator-main.legacy.js +1 -1
  49. package/lib/legacy/{configurator-mesh-generator-91863180.legacy.js → configurator-mesh-generator-1ee809cc.legacy.js} +2 -2
  50. package/lib/legacy/configurator-mesh-generator-1ee809cc.legacy.js.map +1 -0
  51. package/lib/legacy/{default-light-setting-02c02f33.legacy.js → default-light-setting-e05ac634.legacy.js} +2 -2
  52. package/lib/legacy/default-light-setting-e05ac634.legacy.js.map +1 -0
  53. package/lib/legacy/{dimensioning-helper-bd2928a2.legacy.js → dimensioning-helper-08bbcc1e.legacy.js} +2 -2
  54. package/lib/legacy/{dimensioning-helper-bd2928a2.legacy.js.map → dimensioning-helper-08bbcc1e.legacy.js.map} +1 -1
  55. package/lib/legacy/{glb-viewer-7ff2c7ff.legacy.js → glb-viewer-94cdce28.legacy.js} +2 -2
  56. package/lib/legacy/{glb-viewer-7ff2c7ff.legacy.js.map → glb-viewer-94cdce28.legacy.js.map} +1 -1
  57. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  58. package/lib/legacy/{image-renderer-c5cf8937.legacy.js → image-renderer-fe52ecbf.legacy.js} +2 -2
  59. package/lib/legacy/{image-renderer-c5cf8937.legacy.js.map → image-renderer-fe52ecbf.legacy.js.map} +1 -1
  60. package/lib/legacy/{material-viewer-e256772e.legacy.js → material-viewer-dfdb7b74.legacy.js} +2 -2
  61. package/lib/legacy/material-viewer-dfdb7b74.legacy.js.map +1 -0
  62. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  63. package/lib/legacy/{mesh-generator-b8ae0e15.legacy.js → mesh-generator-db585670.legacy.js} +2 -2
  64. package/lib/legacy/mesh-generator-db585670.legacy.js.map +1 -0
  65. package/lib/legacy/pixotron-9d8f3907.legacy.js +2 -0
  66. package/lib/legacy/{pixotron-e001da2e.legacy.js.map → pixotron-9d8f3907.legacy.js.map} +1 -1
  67. package/lib/legacy/planner-69ee75ba.legacy.js +2 -0
  68. package/lib/legacy/{planner-cdd6d066.legacy.js.map → planner-69ee75ba.legacy.js.map} +1 -1
  69. package/lib/legacy/planner-main.legacy.js +1 -1
  70. package/lib/legacy/{rapi-access-56e6c092.legacy.js → rapi-access-ffb2a4e7.legacy.js} +2 -2
  71. package/lib/legacy/{rapi-access-56e6c092.legacy.js.map → rapi-access-ffb2a4e7.legacy.js.map} +1 -1
  72. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  73. package/lib/legacy/static/ConfiguratorKernel-ddddcf4163f302c8.wasm +0 -0
  74. package/lib/legacy/static/{ConfiguratorKernel-7ab30b3ec0665ce3.js → ConfiguratorKernel-e9bbd4998a056b0b.js} +33 -32
  75. package/lib/legacy/static/ConfiguratorKernelJs-20574b8e2d7e90dc.js +143 -0
  76. package/lib/legacy/static/ConfiguratorKernelJs-c5169f7b294750f6.mem +0 -0
  77. package/lib/legacy/static/{RoomleCore-4eda12f44a8a7680.js → RoomleCore-18f96bc7c4c9fe8e.js} +59 -58
  78. package/lib/legacy/static/RoomleCore-d28dd6c00ccae598.wasm +0 -0
  79. package/lib/legacy/static/RoomleCoreJs-2ceb6d8e908f2db1.mem +0 -0
  80. package/lib/legacy/static/RoomleCoreJs-6b7253d115d26737.js +151 -0
  81. package/lib/legacy/static/shaders-b15e4dcfb3e03fb8.json +1 -0
  82. package/lib/legacy/{stats-helper-d5430708.legacy.js → stats-helper-40cd0001.legacy.js} +2 -2
  83. package/lib/legacy/{stats-helper-d5430708.legacy.js.map → stats-helper-40cd0001.legacy.js.map} +1 -1
  84. package/lib/{material-viewer-f11e1375.js → material-viewer-18907703.js} +2 -2
  85. package/lib/material-viewer-18907703.js.map +1 -0
  86. package/lib/{material-viewer-a7b87d2e.nomodule.js → material-viewer-ed21faad.nomodule.js} +2 -2
  87. package/lib/material-viewer-ed21faad.nomodule.js.map +1 -0
  88. package/lib/material-viewer-main-98e1d22e.js +2 -0
  89. package/lib/material-viewer-main-98e1d22e.js.map +1 -0
  90. package/lib/material-viewer-main.nomodule.js +1 -1
  91. package/lib/{mesh-generator-0bca3ff9.js → mesh-generator-b7cbbe98.js} +2 -2
  92. package/lib/mesh-generator-b7cbbe98.js.map +1 -0
  93. package/lib/{mesh-generator-149119b9.nomodule.js → mesh-generator-f418c5c9.nomodule.js} +2 -2
  94. package/lib/mesh-generator-f418c5c9.nomodule.js.map +1 -0
  95. package/lib/pixotron-2a572c8a.js +2 -0
  96. package/lib/{pixotron-77031317.js.map → pixotron-2a572c8a.js.map} +1 -1
  97. package/lib/pixotron-4abbb950.nomodule.js +2 -0
  98. package/lib/{pixotron-0d36898b.nomodule.js.map → pixotron-4abbb950.nomodule.js.map} +1 -1
  99. package/lib/planner-9d8be47a.nomodule.js +2 -0
  100. package/lib/{planner-f1be5140.nomodule.js.map → planner-9d8be47a.nomodule.js.map} +1 -1
  101. package/lib/planner-f3bb0f74.js +2 -0
  102. package/lib/{planner-e87a1d4d.js.map → planner-f3bb0f74.js.map} +1 -1
  103. package/lib/planner-main-37327367.js +2 -0
  104. package/lib/planner-main-37327367.js.map +1 -0
  105. package/lib/planner-main.nomodule.js +1 -1
  106. package/lib/{rapi-access-e93cfc64.js → rapi-access-178276b1.js} +2 -2
  107. package/lib/{rapi-access-e93cfc64.js.map → rapi-access-178276b1.js.map} +1 -1
  108. package/lib/{rapi-access-d733ff35.nomodule.js → rapi-access-4969733b.nomodule.js} +2 -2
  109. package/lib/{rapi-access-d733ff35.nomodule.js.map → rapi-access-4969733b.nomodule.js.map} +1 -1
  110. package/lib/{roomle-sdk-f67726b1.js → roomle-sdk-a9e5fee4.js} +2 -2
  111. package/lib/roomle-sdk-a9e5fee4.js.map +1 -0
  112. package/lib/roomle-sdk.nomodule.js +1 -1
  113. package/lib/static/ConfiguratorKernel-ddddcf4163f302c8.wasm +0 -0
  114. package/lib/static/{ConfiguratorKernel-7ab30b3ec0665ce3.js → ConfiguratorKernel-e9bbd4998a056b0b.js} +1 -1
  115. package/lib/static/ConfiguratorKernel-e9bbd4998a056b0b.js.map +1 -0
  116. package/lib/static/ConfiguratorKernelJs-20574b8e2d7e90dc.js +143 -0
  117. package/lib/static/ConfiguratorKernelJs-c5169f7b294750f6.mem +0 -0
  118. package/lib/static/{RoomleCore-4eda12f44a8a7680.js → RoomleCore-18f96bc7c4c9fe8e.js} +1 -1
  119. package/lib/static/RoomleCore-18f96bc7c4c9fe8e.js.map +1 -0
  120. package/lib/static/RoomleCore-d28dd6c00ccae598.wasm +0 -0
  121. package/lib/static/RoomleCoreJs-2ceb6d8e908f2db1.mem +0 -0
  122. package/lib/static/RoomleCoreJs-6b7253d115d26737.js +151 -0
  123. package/lib/static/shaders-b15e4dcfb3e03fb8.json +1 -0
  124. package/lib/{stats-helper-cc90de84.nomodule.js → stats-helper-182428cc.nomodule.js} +2 -2
  125. package/lib/{stats-helper-cc90de84.nomodule.js.map → stats-helper-182428cc.nomodule.js.map} +1 -1
  126. package/lib/{stats-helper-8edb994e.js → stats-helper-dd403e56.js} +2 -2
  127. package/lib/{stats-helper-8edb994e.js.map → stats-helper-dd403e56.js.map} +1 -1
  128. package/package.json +2 -2
  129. package/lib/component-dimensioning-2f8feac1.nomodule.js.map +0 -1
  130. package/lib/component-dimensioning-7b174f68.js.map +0 -1
  131. package/lib/configurator-main-94cb38ef.js +0 -2
  132. package/lib/configurator-main-94cb38ef.js.map +0 -1
  133. package/lib/configurator-mesh-generator-e084ec1c.nomodule.js.map +0 -1
  134. package/lib/configurator-mesh-generator-e2bc0702.js.map +0 -1
  135. package/lib/default-light-setting-accf9742.nomodule.js.map +0 -1
  136. package/lib/default-light-setting-f14ab23f.js.map +0 -1
  137. package/lib/glb-viewer-main-93c1326f.js +0 -2
  138. package/lib/glb-viewer-main-93c1326f.js.map +0 -1
  139. package/lib/legacy/component-dimensioning-8295cecf.legacy.js.map +0 -1
  140. package/lib/legacy/configurator-mesh-generator-91863180.legacy.js.map +0 -1
  141. package/lib/legacy/default-light-setting-02c02f33.legacy.js.map +0 -1
  142. package/lib/legacy/material-viewer-e256772e.legacy.js.map +0 -1
  143. package/lib/legacy/mesh-generator-b8ae0e15.legacy.js.map +0 -1
  144. package/lib/legacy/pixotron-e001da2e.legacy.js +0 -2
  145. package/lib/legacy/planner-cdd6d066.legacy.js +0 -2
  146. package/lib/legacy/static/ConfiguratorKernel-bc2c3f790e1f4198.wasm +0 -0
  147. package/lib/legacy/static/ConfiguratorKernelJs-6aef0040f4eefda4.js +0 -143
  148. package/lib/legacy/static/ConfiguratorKernelJs-e3477a0d9d548c2d.mem +0 -0
  149. package/lib/legacy/static/RoomleCore-c25c508e44bd22d0.wasm +0 -0
  150. package/lib/legacy/static/RoomleCoreJs-7b50d00fa12cc53f.mem +0 -0
  151. package/lib/legacy/static/RoomleCoreJs-d2251ac95c262c0b.js +0 -151
  152. package/lib/legacy/static/shaders-65f151c33a3a1e39.json +0 -1
  153. package/lib/material-viewer-a7b87d2e.nomodule.js.map +0 -1
  154. package/lib/material-viewer-f11e1375.js.map +0 -1
  155. package/lib/material-viewer-main-82aefbf8.js +0 -2
  156. package/lib/material-viewer-main-82aefbf8.js.map +0 -1
  157. package/lib/mesh-generator-0bca3ff9.js.map +0 -1
  158. package/lib/mesh-generator-149119b9.nomodule.js.map +0 -1
  159. package/lib/pixotron-0d36898b.nomodule.js +0 -2
  160. package/lib/pixotron-77031317.js +0 -2
  161. package/lib/planner-e87a1d4d.js +0 -2
  162. package/lib/planner-f1be5140.nomodule.js +0 -2
  163. package/lib/planner-main-559f37ca.js +0 -2
  164. package/lib/planner-main-559f37ca.js.map +0 -1
  165. package/lib/roomle-sdk-f67726b1.js.map +0 -1
  166. package/lib/static/ConfiguratorKernel-7ab30b3ec0665ce3.js.map +0 -1
  167. package/lib/static/ConfiguratorKernel-bc2c3f790e1f4198.wasm +0 -0
  168. package/lib/static/ConfiguratorKernelJs-6aef0040f4eefda4.js +0 -143
  169. package/lib/static/ConfiguratorKernelJs-e3477a0d9d548c2d.mem +0 -0
  170. package/lib/static/RoomleCore-4eda12f44a8a7680.js.map +0 -1
  171. package/lib/static/RoomleCore-c25c508e44bd22d0.wasm +0 -0
  172. package/lib/static/RoomleCoreJs-7b50d00fa12cc53f.mem +0 -0
  173. package/lib/static/RoomleCoreJs-d2251ac95c262c0b.js +0 -151
  174. package/lib/static/shaders-65f151c33a3a1e39.json +0 -1
@@ -1,2 +0,0 @@
1
- import{g as getAllParameters}from"./query-params-helper-a271f9dc.js";import{r as RoomleDependencyInjection,B as Benchmark,I as INJECTABLES,_ as __decorate,i as inject,t as toRadiant,s as position3VectorsAreEqual,u as position2VectorsAreEqual,v as getIdealDistance,w as to360Degrees,x as getAngle,y as AsyncGuard,z as vectorIsEqual,F as fadeIn,G as createMaterial,H as addTexture,J as getGUI,K as rotationQuaternionsAreEqual,M as getDelta,d as dispose,D as DynamicLightSettingLoader,R as RoomleComponentFactoryInitializer,N as DynamicQualitySettingLoader}from"./rapi-access-e93cfc64.js";import{a as debounce,g as getAssetPath,h as handleJsonResponse,i as isWebGl2}from"./main-thread-to-worker-9d399850.js";var TWEEN_FILE_NAME="static/Tween-d024b02fe34f25ab.js";class Main{constructor(t){this._context=t||RoomleDependencyInjection.getContext(this.getContextName()),Benchmark.start("loadingTime")}_setupCommonGlobals(){window.__RML__DEBUG__||(window.__RML__DEBUG__={}),window.__RML__ENV__||(window.__RML__ENV__={},window.__RML__ENV__.assetPath||(window.__RML__ENV__.assetPath=""))}_setupCommonDependencies(){RoomleDependencyInjection.setup(INJECTABLES);const t=getAllParameters();this.lookup("global-init-data").setOverrides(t),this.lookup("init-data",this._context).setOverrides(t)}_cleanUpCommonGlobals(){window.__RML__DEBUG__&&(window.__RML__DEBUG__.Kernel&&window.__RML__DEBUG__.Kernel.clearAll&&window.__RML__DEBUG__.Kernel.clearAll(),delete window.__RML__DEBUG__),delete window.__RML__ENV__;for(const t in window.THREE)if(window.THREE.hasOwnProperty(t))try{delete window.THREE[t]}catch(t){console.error(t)}window.THREE=void 0}_cleanUpCommonDependencies(){}boot(t){this._setupCommonGlobals(),this._setupCommonDependencies(),this.setupGlobals(t),this.setupDependencies(),this.bootFinished()}lookup(t,e){return window.__RML__DI__.lookup(t,e)}teardown(){this.cleanUpDependencies(),this._cleanUpCommonDependencies(),this.cleanUpGlobals(),this._cleanUpCommonGlobals(),window.__RML__DI__&&delete window.__RML__DI__}pause(){this.lookup("life-cycle-manager",this._context).pause(),window.TWEEN&&TWEEN.removeAll()}resume(t){t&&this.lookup("dom-helper",this._context).setDomElement(t),this.lookup("life-cycle-manager",this._context).resume()}destroy(){this.pause(),this.lookup("life-cycle-manager",this._context).destroy(),RoomleDependencyInjection.cleanUp(this._context)}getRapiAccess(){return this.lookup("rapi-access",this._context)}}class EventDispatcher{constructor(){this._listeners={}}_addEventListener(t,e,i){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push({callback:e,scope:i})}addEventListener(t,e,i){this._addEventListener(t,e,i)}dispatchEvent(t,e){if(!this._listeners[t])return;const i=this._listeners[t];let s=i.length;for(let t=0;t<s;t++){const s=i[t];e?s.callback.apply(s.scope,[e]):s.callback.call(s.scope)}}removeEventListener(t,e){const i=this._listeners[t];if(i)for(let t=0,s=i.length;t<s;t++)if(i[t].callback===e)return void i.splice(t,1)}}const INITIAL_PITCH=10;let CameraControl=(()=>{class t extends EventDispatcher{constructor(t,e,i){if(super(),this._tweenEnd=null,this._cameraStandingStill=!0,this._pitch=toRadiant(10),this._yaw=toRadiant(-30),this._distance=-1,this._locked=!1,this._inputListeners=[],this._lerpEnabled=!0,this._creator_=t,this._inputManager=e,this._initInputListener(),this._addInputListeners(),this._cameraPosition=new THREE.Vector3,this._targetPosition=new THREE.Vector3,i?this._cameraPosition.copy(i):this._cameraPosition=new THREE.Vector3(0,.5,3),this._initData.debug){const t=this.getDebugCameraPosition();t&&this._setCurrentCameraParameters(t)}let s=this._domHelper.getClientDimensions();this._width=s.x,this._height=s.y,this._dispatchCameraIdle=debounce(this._dispatchCameraIdle.bind(this),16)}getCamera(){return this._getCamera()}_addInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.addEventListener(t.key,t.fun,this)})}_removeInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.removeEventListener(t.key,t.fun)}),this._inputListeners=[]}cleanUp(){this._removeInputListeners()}animateCamera(t){let e=this._cameraPosition;if(!e||position3VectorsAreEqual(e,this.getCamera().position))return this._cameraStandingStill||(this._cameraStandingStill=!0,this._dispatchCameraIdle(),this._initData.debug&&this.saveDebugCameraPosition()),!1;if(this._cameraStandingStill&&this.dispatchEvent(7,3),this._cameraStandingStill=!1,this._lerpEnabled&&!this._tweenEnd){let i=this.getCamera().position.clone();const s=Math.min(10*t,1);i.lerp(e,s),this.getCamera().position.copy(i)}else this.getCamera().position.copy(e);return!0}getDebugCameraPosition(){return JSON.parse(localStorage.getItem("debug_camera_position"))}saveDebugCameraPosition(){localStorage.setItem("debug_camera_position",JSON.stringify(this._getCurrentCameraParameters()))}_dispatchCameraIdle(){this.dispatchEvent(8,3)}_areEqual(t,e){return t.yaw.toFixed(5)===e.yaw.toFixed(5)&&t.pitch.toFixed(5)===e.pitch.toFixed(5)&&t.distance.toFixed(5)===e.distance.toFixed(5)&&t.targetX===e.targetX&&t.targetY===e.targetY&&t.targetZ===e.targetZ}_tweenCameraParameter(t,e,i){return new Promise(i=>{if(e.yaw-t.yaw<=-Math.PI?t.yaw-=2*Math.PI:e.yaw-t.yaw>=Math.PI&&(t.yaw+=2*Math.PI),window.TWEEN){if(null!==this._tweenEnd&&this._tweenEnd.blockOtherTweens)return;this._tweenEnd=e,new TWEEN.Tween(t).to(e,400).easing(TWEEN.Easing.Sinusoidal.In).onUpdate(()=>{this.dispatchEvent(1,3),this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._setCameraNear(),this._update(new THREE.Vector3(t.targetX,t.targetY,t.targetZ))}).onComplete(()=>{this.dispatchEvent(2,3),this._tweenEnd=null,i()}).start(),this.dispatchEvent(0,3)}})}_setCameraNear(){const t=this.getCamera();if(t instanceof THREE.PerspectiveCamera){const e=Math.max(.1,this._distance/6);t.near=e}}_getCurrentCameraParameters(){const t=this._targetPosition.clone();return{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z}}_setCurrentCameraParameters(t){this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._targetPosition.copy(new THREE.Vector3(t.targetX,t.targetY,t.targetZ))}_rotateHorizontal(t){this._yaw-=t,this._yaw<-Math.PI?this._yaw+=2*Math.PI:this._yaw>Math.PI&&(this._yaw-=2*Math.PI)}_rotateVertical(t){this._pitch+=t,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI)}saveState(t){if(t||!this._stateSaved){let t=this._yaw,e=this._pitch,i=this._distance,s=this._targetPosition.clone();if(this._stateSaved={yaw:t,pitch:e,distance:i,targetX:s.x,targetY:s.y,targetZ:s.z,blockOtherTweens:!0},this._getCamera().fov){let t=this._getCamera();this._stateSaved.fov=t.fov,this._stateSaved.near=t.near,this._stateSaved.far=t.far}return this._stateSaved}return null}resetToState(){if(this._stateSaved){this._stateSaved.blockOtherTweens=!1;let t=this._targetPosition.clone();this._tweenCameraParameter({yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z},this._stateSaved,!0)}this._stateSaved=null}setToState(t,e){this._tweenCameraParameter(t,e,!0)}hasSavedState(){return null!=this._stateSaved}lock(){this._locked=!0}unlock(){this._locked=!1}getTargetPosition(){return this._targetPosition}_saveYawAndPitch(){this._getCamera().userData.yaw=this._yaw,this._getCamera().userData.pitch=this._pitch}getInputPosition(t){const{x:e,y:i}=this._domHelper.getClientDimensions();return new THREE.Vector3(t.x/e*2-1,-t.y/i*2+1,.5)}addLightContainer(t){t.name="lights";const e=this._getCamera(),i=e.children.find(t=>"lights"===t.name);i&&e.remove(i),e.add(t)}checkNearFarDistance(t){if(!t)return;const e=this._cameraPosition.distanceTo(t),i=this._getCamera();i instanceof THREE.PerspectiveCamera&&e>i.far&&(i.far=e+1)}}return __decorate([inject],t.prototype,"_domHelper",void 0),__decorate([inject],t.prototype,"_initData",void 0),t})();class ZoomChangeEvent{constructor(t,e){this.minZoom=!1,this.maxZoom=!1,this.minZoom=t,this.maxZoom=e}}class CameraControl3D extends CameraControl{constructor(t,e,i,s){super(t,e,i),this._bounds=new THREE.Vector3,this._scale=1,this._state=0,this._zoomSpeed=Math.pow(.95,3),this.minDistance=0,this.maxDistance=5,this.minPolarAngle=toRadiant(0),this.maxPolarAngle=toRadiant(85),this.minAzimuthAngle=Number.NEGATIVE_INFINITY,this.maxAzimuthAngle=Number.POSITIVE_INFINITY,this._zoomDistance=.1,this._userInteraction=!1,this._currentZoomHash="",this._maxZoomedIn=!1,this._maxZoomedOut=!1,this._panningEnabled=!1,s?this._camera=s:this._initCamera(),this._targetPosition||(this._targetPosition=new THREE.Vector3(0,0,0));const{cameraRestriction:a,zoomDistance:n,minVerticalCameraAngle:o,maxVerticalCameraAngle:r,minHorizontalCameraAngle:h,maxHorizontalCameraAngle:_}=this._initData;if(n&&(this._zoomDistance=n/100),void 0!==o&&(this.minPolarAngle=toRadiant(o<0?o:-1*o)),void 0!==r&&(this.maxPolarAngle=toRadiant(r)),void 0!==h&&(this.minAzimuthAngle=toRadiant(h<0?h:-1*h)),void 0!==_&&(this.maxAzimuthAngle=toRadiant(_)),void 0!==a){let t=Math.abs(toRadiant(a));this.minAzimuthAngle=-t,this.maxAzimuthAngle=t,this.maxPolarAngle=Math.min(t,toRadiant(85))}this._update()}_getCamera(){return this._camera||this._initCamera(),this._camera}_initCamera(){this._camera=new THREE.PerspectiveCamera,this._camera.fov=30,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(5),this._camera.layers.enable(4)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}animateCamera(t){if(!super.animateCamera(t))return!1;let e=this._targetPosition;return!!e&&(this.getCamera().lookAt(e),!0)}_initInputListener(){this._inputListeners.push({key:3,fun:()=>{this._state=1}}),this._inputListeners.push({key:6,fun:t=>{var e,i;1!==this._state||this._locked||(this._userInteraction=!0,!(void 0!==(null===(e=t.event)||void 0===e?void 0:e.shiftKey)&&(null===(i=t.event)||void 0===i?void 0:i.shiftKey))&&this._panningEnabled&&this.disablePanning(),this._move(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:11,fun:t=>{1===this._state||this._locked||(this._userInteraction=!0,this._pan(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2,t.type),this._state=0,this._orbitPosition=null,this._lerpEnabled=!0}}),this._inputListeners.push({key:7,fun:({event:t})=>{this._maxZoomedIn||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomIn())}}),this._inputListeners.push({key:8,fun:({event:t})=>{this._maxZoomedOut||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomOut())}})}_panTargetPosition(t){const e=t.clone().sub(this._orbitPosition),i=this._domHelper.element,s=this._targetPosition.project(this._camera),a=Math.max(2,4*(1-this._distance/this.maxDistance));s.x=s.x-e.x/i.clientHeight*a,s.y=s.y+e.y/i.clientHeight*a,this._targetPosition.copy(s.unproject(this._camera))}_pan(t,e){this._lerpEnabled=!1,this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e)),this._panTargetPosition(t),position2VectorsAreEqual(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}_move(t,e){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e));const i=t.clone().sub(this._orbitPosition),s=this._domHelper.element;this._panningEnabled?this._panTargetPosition(t):(this._rotateHorizontal(2*Math.PI*i.x/s.clientWidth*1),this._rotateVertical(2*Math.PI*i.y/s.clientHeight*1)),position2VectorsAreEqual(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}setBounds(t){this._boundingBox=t}zoomToFitBounds(t){this.setBounds(t);const e=t.getSize(new THREE.Vector3);if(this._initData.debug||e.x+e.y+e.z===0)return;const i=this._getCurrentCameraParameters(),s=t.getCenter(new THREE.Vector3),a=this._setDistanceAndRangesBasedOnBounds(e);this._checkZoomDistance(t,a),this._tweenCameraParameter(i,{yaw:this._yaw,pitch:this._pitch,distance:a,targetX:s.x,targetY:s.y,targetZ:s.z},!1)}updateToBounds(t,e,i=!0,s){if(this.setBounds(t),this._initData.debug)return;const a=t.getCenter(new THREE.Vector3);this._targetPosition=s?s.clone():new THREE.Vector3(a.x,a.y,a.z);const n=this._getCurrentCameraParameters(),o=t.getSize(new THREE.Vector3);if(i){const i=this._setDistanceAndRangesBasedOnBounds(o);this._distance=i,this._checkZoomDistance(t,i),this._userInteraction?this._tweenCameraParameter(n,{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:this._targetPosition.x,targetY:this._targetPosition.y,targetZ:this._targetPosition.z},e):this._update()}else this._setDistanceAndRangesBasedOnBounds(o,!1);this._update()}_checkZoomDistance(t,e){const i=t.getBoundingSphere(new THREE.Sphere);e-i.radius<this._zoomDistance&&(console.warn("the initial camera position is closer than the zoomDistance param, zoomDistance is set to initial camera position."),this._zoomDistance=e-i.radius)}_setDistanceAndRangesBasedOnBounds(t,e=!0){const i=this._domHelper.getClientDimensions(),s=i.x,a=i.y,n=this._camera.offset?s-s*this._camera.offset.left-s*(1-this._camera.offset.right):s,o=this._camera.offset?a-a*this._camera.offset.bottom-a*(1-this._camera.offset.top):a;this._bounds.copy(t);const{cameraSpacing:r}=this._initData;t.addScalar(r/100),this.minDistance=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);const h=Math.max(t.x,t.y),{x:_,y:d}=this._getMargin(n,o),l=getIdealDistance(t.x+_,t.y+d,t.z,this._camera.fov,n,o);return this._distance<l&&e&&(this._distance=l),this.maxDistance=l+h,this.maxDistance<2&&(this.maxDistance=2),this._camera.far=5*this.maxDistance,this._setCameraNear(),l}_getMargin(t,e){let i=this._bounds.x/2,s=this._bounds.y/2;return t>1080&&(i+=this._bounds.x<.3?.2:0,i+=this._bounds.x*(t/1080-1)),e>1080&&(i+=this._bounds.y<.3?.2:0,s+=this._bounds.y*(e/1080-1)),{x:i,y:s}}reset(t,e,i,s,a=!0){const n=t.getSize(new THREE.Vector3);if(n){if(e)this._targetPosition.copy(e);else{const e=t.getCenter(new THREE.Vector3);this._targetPosition.copy(e)}const o=this._getCurrentCameraParameters();if(i||(i=-30),s||(s=10),this._pitch=toRadiant(s),this._yaw=toRadiant(i),this._initData.debug)return this._distance=this._setDistanceAndRangesBasedOnBounds(n),this._update(this._targetPosition),void this._setDistanceAndRangesBasedOnBounds(n);this._setDistanceAndRangesBasedOnBounds(n);let r=this._targetPosition.clone();a?this._tweenCameraParameter(o,{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:r.x,targetY:r.y,targetZ:r.z},!0):this._update(this._targetPosition)}else console.warn("you cant reset without bounds!")}updateAndReset(t,e,i,s,a,n=!0){const o=new THREE.Vector3(-t.x/2,0,-t.z/2),r=new THREE.Vector3(t.x/2,t.y,t.z/2);if(this._boundingBox=new THREE.Box3(o,r),a&&t.addScalar(a),e?this._targetPosition.copy(e):this._targetPosition=new THREE.Vector3(0,t.y/2,0),-1===this._distance){const e=this._setDistanceAndRangesBasedOnBounds(t);this._distance=Math.max(2,e)}const h=this._getCurrentCameraParameters();i||(i=-30),s||(s=10),this._pitch=toRadiant(s),this._yaw=toRadiant(i),this._setDistanceAndRangesBasedOnBounds(t);let _=this._targetPosition.clone();n?this._tweenCameraParameter(h,{yaw:this._yaw,pitch:this._pitch,distance:this.maxDistance,targetX:_.x,targetY:_.y,targetZ:_.z},!0):this._update(this._targetPosition)}_update(t){this._initData.debug?this._pitch=Math.max(toRadiant(-89),Math.min(toRadiant(89),this._pitch)):(this._yaw=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,this._yaw)),this._pitch=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._pitch))),this._saveYawAndPitch();const e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX"),i=(new THREE.Quaternion).setFromEuler(e),s=new THREE.Vector3(0,0,-1);s.applyQuaternion(i),this._distance*=this._scale,this._initData.debug||(this._distance=Math.min(this.maxDistance,this._distance)),t&&this._targetPosition.copy(t);const a=this._targetPosition.clone().sub(s.multiplyScalar(this._distance));if(this._initData.debug)this._cameraPosition.copy(a),this._zoomChanged(!1,!1);else{const t=this._getCameraSphere(a);null!=this._boundingBox&&this._boundingBox.intersectsSphere(t)&&this._scale>=1?this._distance+=.1:null==this._boundingBox||this._boundingBox.intersectsSphere(t)?this._zoomChanged(!1,!0):(this._cameraPosition.copy(a),this._distance===this.maxDistance?this._zoomChanged(!0,!1):this._zoomChanged(!1,!1))}this._scale=1}_zoomChanged(t,e){let i=t+""+e;0!==this._currentZoomHash.length&&this._currentZoomHash===i||(this.dispatchEvent(5,new ZoomChangeEvent(t,e)),this._currentZoomHash=i),this._maxZoomedIn=e,this._maxZoomedOut=t}zoomTo(t,e,i,s,a,n){return this._tweenCameraParameter(this._getCurrentCameraParameters(),{yaw:s,pitch:a,distance:2.725*getIdealDistance(t.x,t.y,t.z,this._camera.fov,e,i),targetX:n.x,targetY:n.y,targetZ:n.z,blockOtherTweens:!0},!0)}_getCameraSphere(t){const e=Math.max(this._bounds.x,this._bounds.y),i=Math.max(e/10,this._zoomDistance);return new THREE.Sphere(t,i)}zoomIn(t){this._lerpEnabled=!0,this._scale*=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(3)}zoomOut(t){this._lerpEnabled=!0,this._scale/=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(4)}clear(){this._userInteraction=!1,this._initData.debug||(this._distance=-1,this._targetPosition=new THREE.Vector3(0,0,0))}async moveCamera(t){return this._tweenCameraParameter(this._getCurrentCameraParameters(),t,!0)}enablePanning(){this._lerpEnabled=!1,this._panningEnabled=!0}disablePanning(){this._lerpEnabled=!1,this._panningEnabled=!1}}let _scriptCache={},_idCache={},ScriptLoader=(()=>{class t{constructor(t){this._creator_=t}fetch(t,e){return this._singlePromiseFactory.create(5,t,(i,s)=>{!function(t,e,i,s){if(-1===t.indexOf("http")&&(t=getAssetPath()+t),_scriptCache[t])return i();if(e.id&&_idCache[e.id])return s(new Error('There is already a script with ID "'+e.id+'"'));const a=Benchmark.start("load_"+e.id.replace(/-/g,"_")),n=document.createElement("script");n.async=!1,n.src=t,n.id=e.id,n.onload=()=>{_scriptCache[t]=!0,_idCache[e.id]=!0,Benchmark.end(a),Object.defineProperty(i,"name",{value:"resolve-"+e.id}),i()},n.onerror=t=>{s(t)},document.body.appendChild(n)}(t,e,i,s)})}loadScripts(t){const e=[];return t.forEach(t=>{let i=this.fetch(t.name,{id:t.id});e.push(i)}),Promise.all(e)}cleanUp(){for(let t in _idCache)if(_idCache.hasOwnProperty(t)){const e=document.getElementById(t);e&&e.parentElement.removeChild(e)}_scriptCache={},_idCache={}}}return __decorate([inject],t.prototype,"_singlePromiseFactory",void 0),t})();const BROWSER_EVENTS={MOUSE_MOVE:"mousemove",MOUSE_DOWN:"mousedown",MOUSE_UP:"mouseup",MOUSE_LEAVE:"mouseleave",MOUSE_ENTER:"mouseenter",MOUSE_WHEEL:"wheel",TOUCH_MOVE:"touchmove",TOUCH_START:"touchstart",TOUCH_END:"touchend",CONTEXT_MENU:"contextmenu"};class InputEvent{constructor(t,e,i,s,a){this.position=t,this.positionRelative=e,this.type=i,this.rotation=s,this.event=a}}const MIN_MOVE_DISTANCE=5*window.devicePixelRatio,MIN_DOLLY_DISTANCE=3*window.devicePixelRatio;let InputManager=(()=>{class t extends EventDispatcher{constructor(t){super(),this._debug=!1,this._elementHit=!1,this._delta=-1,this._state=0,this._pinchDistance=-1,this._rotationAngle=-1,this._lastMouseWheelEvent=null,this._lastTouchEvent=null,this._events=Object.keys(BROWSER_EVENTS).map(t=>BROWSER_EVENTS[t]),this._creator_=t,this._downPosition={x:0,y:0},this._downPositionRelative={x:0,y:0},this._boundingClientRect=this._domHelper.element.getBoundingClientRect()}enableDragIn(t){this._setState(1),this._dragEnabled=!0,t&&(this._dragMV=this._dragM.bind(this),this._dragEV=this._dragE.bind(this),this._dragTarget=t.currentTarget||t.target,this._delta=-1,this._dragMVName="drag",this._dragEVName="dragend",window.TouchEvent&&t instanceof TouchEvent?(this._dragMVName="touchmove",this._dragEVName="touchend"):t.dataTransfer&&t.dataTransfer.setData&&t.dataTransfer.setData("text/plain"," "),this._firefoxDragPosition={x:0,y:0},document.ondragover=t=>{t=t||window.event,this._firefoxDragPosition.x=t.pageX,this._firefoxDragPosition.y=t.pageY},this._dragTarget.addEventListener(this._dragMVName,this._dragMV,!1),this._dragTarget.addEventListener(this._dragEVName,this._dragEV,!1))}_dragM(t){let e=t,i=null,s=null;window.TouchEvent&&t instanceof TouchEvent?(i=this._getTouchPosition(e),s=this._getTouchPositionRelative(e)):(i=this._getMousePosition(e),s=this._getMousePositionRelative(e)),i.x>0&&i.y>0&&this._move(i,s)}_dragE(t){let e=t;document.ondragover=null,this._firefoxDragPosition=null,this._dragTarget.removeEventListener(this._dragMVName,this._dragMV),this._dragTarget.removeEventListener(this._dragEVName,this._dragEV),window.TouchEvent&&t instanceof TouchEvent?this._onUp(this._getTouchPosition(e),this._getTouchPositionRelative(e),2):this._onUp(this._getMousePosition(e),this._getMousePositionRelative(e),1)}addEvents(t){this._events.forEach(e=>t.addEventListener(e,this,!1))}removeEvents(t){this._events.forEach(e=>t.removeEventListener(e,this,!1))}_move2(t){if(this._lastTouchEvent&&t.timeStamp-this._lastTouchEvent.timeStamp<16)return;const e=t.touches[0],i=t.touches[1],s=e.pageX-i.pageX,a=e.pageY-i.pageY,n=Math.abs(s)+Math.abs(a);this._pinchDistance>-1&&(n>this._pinchDistance+MIN_DOLLY_DISTANCE?(this._setState(3),this.dispatchEvent(7,new InputEvent(this._getTouchPosition(t),this._getTouchPositionRelative(t)))):n<this._pinchDistance-MIN_DOLLY_DISTANCE?(this._setState(3),this.dispatchEvent(8,new InputEvent(this._getTouchPosition(t),this._getTouchPositionRelative(t)))):n<=this._pinchDistance+MIN_DOLLY_DISTANCE&&n>=this._pinchDistance-MIN_DOLLY_DISTANCE&&(this._setState(5),this.dispatchEvent(11,new InputEvent(this._getTouchPosition(t),this._getTouchPositionRelative(t))))),this._pinchDistance=n,this._lastTouchEvent=t}_setState(t){this._state=t}_move(t,e,i,s){void 0===i&&(i=0),void 0===this._dragEnabled&&(this._dragEnabled=!1),1===this._state&&this._canDrag(i)&&(this._delta=this._getDelta(t),this._delta>MIN_MOVE_DISTANCE&&(this._setState(2),this._longClickTimer&&clearTimeout(this._longClickTimer),this.dispatchEvent(0,new InputEvent(t,e)))),2===this._state&&this.dispatchEvent(1,new InputEvent(t,e)),this._longClickTimer&&clearTimeout(this._longClickTimer),this.dispatchEvent(6,new InputEvent(t,e,i,null,s))}_longClick(){this._setState(2),this._longClickTimer&&clearTimeout(this._longClickTimer),this.dispatchEvent(0,new InputEvent(this._downPosition,this._downPositionRelative)),this.dispatchEvent(1,new InputEvent(this._downPosition,this._downPositionRelative))}_onUp(t,e,i){this.dispatchEvent(4,new InputEvent(t,e,i)),this._getDelta(t)<=MIN_MOVE_DISTANCE&&this.dispatchEvent(5,new InputEvent(t,e)),2===this._state&&this.dispatchEvent(2,new InputEvent(t,e)),4===this._state&&(this.dispatchEvent(10,new InputEvent(t,e)),this._rotationAngle=-1),3===this._state&&(this._pinchDistance=-1),this._lastTouchEvent=null,this._setState(0),this._dragTarget=null,this._elementHit=!1,this._longClickTimer&&clearTimeout(this._longClickTimer)}_getTouchPosition(t){if(t.touches.length){let{clientX:e,clientY:i}=t.touches[0];if(t.touches.length>1){const s=t.touches[1],a=s.clientX,n=s.clientY;e=(e+a)/2,i=(i+n)/2}return{x:e,y:i}}const e=t.changedTouches[0];return{x:e.clientX,y:e.clientY}}_getTouchPositionRelative(t){const e=this._boundingClientRect,{clientWidth:i,clientHeight:s}=this._domHelper.element;if(t.touches.length){const{clientX:a,clientY:n}=t.touches[0];return{x:(a-e.left)/i*2-1,y:-(n-e.top)/s*2+1}}const a=t.changedTouches[0];return{x:(a.clientX-e.left)/i*2-1,y:-(a.clientY-e.top)/s*2+1}}_getMousePosition(t){if(0!==t.clientX&&0!==t.clientY)return{x:t.clientX,y:t.clientY};{let{x:e,y:i}=this._getFireFoxMousePosition(t);return{x:e,y:i}}}_getFireFoxMousePosition(t){let{x:e,y:i}=this._domHelper.getClientDimensions();return{x:e-(e+t.offsetX),y:i-(i+t.offsetY)}}_getMousePositionRelative(t){const e=this._boundingClientRect;return 0!==t.clientX&&0!==t.clientY?{x:(t.clientX-e.left)/this._domHelper.element.clientWidth*2-1,y:-(t.clientY-e.top)/this._domHelper.element.clientHeight*2+1}:this._firefoxDragPosition&&0!==this._firefoxDragPosition.x&&0!==this._firefoxDragPosition.y?{x:(this._firefoxDragPosition.x-e.left)/this._domHelper.element.clientWidth*2-1,y:-(this._firefoxDragPosition.y-e.top)/this._domHelper.element.clientHeight*2+1}:(console.trace("this should not happen"),{x:0,y:0})}_getDelta(t){return Math.abs(this._downPosition.y-t.y)+Math.abs(this._downPosition.x-t.x)}setDragEnabled(t){this._dragEnabled=t}handleEvent(t){switch(this._debug&&t.type,t.type){case BROWSER_EVENTS.MOUSE_MOVE:this._onMouseMove(t);break;case BROWSER_EVENTS.MOUSE_DOWN:this._onMouseDown(t);break;case BROWSER_EVENTS.MOUSE_UP:this._onMouseUp(t);break;case BROWSER_EVENTS.MOUSE_LEAVE:this._onMouseLeave(t);break;case BROWSER_EVENTS.MOUSE_ENTER:this._onMouseEnter(t);break;case BROWSER_EVENTS.MOUSE_WHEEL:this._onMouseWheel(t);break;case BROWSER_EVENTS.TOUCH_MOVE:this._onTouchMove(t);break;case BROWSER_EVENTS.TOUCH_START:this._onTouchStart(t);break;case BROWSER_EVENTS.TOUCH_END:this._onTouchEnd(t);break;case BROWSER_EVENTS.CONTEXT_MENU:this._onContextMenu(t)}}_onMouseDown(t){t.preventDefault();let{x:e,y:i}=this._getMousePosition(t);this._downPosition={x:e,y:i},this._downPositionRelative=this._getMousePositionRelative(t),this.dispatchEvent(3,new InputEvent({x:e,y:i},this._downPositionRelative,1)),this._setState(1)}_onMouseUp(t){t.preventDefault(),this._onUp(this._getMousePosition(t),this._getMousePositionRelative(t),1)}_onMouseMove(t){t.preventDefault(),this._move(this._getMousePosition(t),this._getMousePositionRelative(t),1,t)}_onMouseLeave(t){this._delta=-1,this._onMouseUp(t)}_onMouseEnter(t){t.preventDefault()}_onMouseWheel(t){if(this._lastMouseWheelEvent&&t.timeStamp-this._lastMouseWheelEvent.timeStamp<40)return t.preventDefault(),void t.stopPropagation();t.deltaY<0?this.dispatchEvent(7,new InputEvent(this._getMousePosition(t),this._getMousePositionRelative(t),1,0,t)):this.dispatchEvent(8,new InputEvent(this._getMousePosition(t),this._getMousePositionRelative(t),1,0,t)),this._lastMouseWheelEvent=t}_onTouchMove(t){if(t.preventDefault(),!this._dragTarget)if(1===t.touches.length)this._move(this._getTouchPosition(t),this._getTouchPositionRelative(t),2);else if(2===t.touches.length)if(this._elementHit||4===this._state){const e=t.touches[0],i=t.touches[1];let s={x:e.pageX,y:e.pageY},a={x:i.pageX,y:i.pageY};const n=to360Degrees(getAngle(s,a));this._rotationAngle<0&&(this._rotationAngle=n);const o=n-this._rotationAngle;this._rotationAngle=n,this.dispatchEvent(9,new InputEvent(this._getTouchPosition(t),this._getTouchPositionRelative(t),2,toRadiant(o))),this._setState(4)}else this._move2(t)}_onTouchStart(t){if(t.preventDefault(),1===t.touches.length){let{x:e,y:i}=this._getTouchPosition(t);this._downPosition={x:e,y:i},this._downPositionRelative=this._getTouchPositionRelative(t),this.dispatchEvent(3,new InputEvent({x:e,y:i},this._downPositionRelative,2)),this._setState(1),this._longClickTimer=window.setTimeout(this._longClick.bind(this),350)}else 2===t.touches.length&&(1!==this._state&&2!==this._state||this._onUp(this._getTouchPosition(t),this._getTouchPositionRelative(t),2),this._setState(3))}_onTouchEnd(t){t.preventDefault(),t.touches.length>1&&5===this._state||3===this._state||this._onUp(this._getTouchPosition(t),this._getTouchPositionRelative(t),2)}_onContextMenu(t){t.preventDefault()}_canDrag(t){return this._dragEnabled}onElementHit(){this._elementHit=!0}updateSize(){this._boundingClientRect=this._domHelper.element.getBoundingClientRect()}}return __decorate([inject],t.prototype,"_domHelper",void 0),t})();class LightSetting{constructor(t,e){this._scene=t,e&&e.removeFromScene()}needsBounds(){return!1}updateBounds(t){}getCameraContainer(){return this._cameraContainer||(this._cameraContainer=new THREE.Object3D),this._cameraContainer}}const DEFAULT_BAKED_SHADOW_PARAMS={enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightSolidAngle:40,yPosition:0};class BakedShadowEnvironment extends class{constructor(t,e){this._scene=t,e&&(e.removeFromScene(),e.cleanUp())}updateCamera(t){}reload(){this.removeFromScene(),this.addToScene()}updateBounds(t,e){this._bounds=t}cleanUp(){this._scene=null}}{constructor(t,e){super(t,e),this._pixotronGuard=new AsyncGuard,this._params=Object.assign(DEFAULT_BAKED_SHADOW_PARAMS,{lightDirection:new THREE.Vector3(0,1,.5),onComplete:this._addGroundShadows.bind(this),onProgress:this._progressCallback.bind(this)})}_progressCallback(t){}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}setPixotron(t,e,i,s){t&&(this._pixotron=t,this._renderer=e,this._camera=i,this._shadowBaker||(this._shadowBaker=new window.PIXOTRON.PlaneShadowBakePass(Object.assign(this._params,s))),this._shadowBaker.enable?this._shadowBaker.startBake(this._renderer,this._scene,this._camera):this._shadowBaker.enable=!0,this._wasAAEnabled=this._pixotron.enableAA,this._pixotronGuard.resolve())}async _addGroundShadows(){await this._pixotronGuard.wait(),this._pixotron.needsUpdate=!0,this._shadowPlane=this._shadowBaker.getShadowPlane(),this._shadowPlane.name="Shadow plane",this._shadowPlane.receiveShadow=!1,0!==this._params.yPosition&&(this._shadowPlane.position.y=this._params.yPosition),this._shadowPlane.visible=!0,this.addToScene(),this._loadedCallback&&this._loadedCallback()}setLoadedCallback(t){this._loadedCallback=t}update(){const t=this._getNumberOfChildren();this._bake(),this._sceneChildren=t}updateBounds(t,e){const i=this._getNumberOfChildren();return!(vectorIsEqual(this._bounds,t,1e-4)&&this._scene&&i===this._sceneChildren&&!e||(super.updateBounds(t),this._bake(),this._sceneChildren=i,0))}_bake(){this._pixotronGuard.wait().then(()=>{this._shadowPlane&&(this._shadowPlane.visible=!1),this._shadowBaker.startBake(this._renderer,this._scene,this._camera)})}_getNumberOfChildren(){let t=0;return this._scene.traverse(e=>{"Shadow plane"!==e.name&&t++}),t}addToScene(){this._scene&&this._shadowPlane&&(this._shadowPlane.material.needsUpdate=!0,fadeIn(this._shadowPlane),this._scene.add(this._shadowPlane))}removeFromScene(){this._shadowPlane&&(this._scene.remove(this._shadowPlane),this._pixotron&&(this._pixotron.enableAA=this._wasAAEnabled))}showGUI(){}}class BakedShadowPlane{constructor(t){this._innerSize=1,this._outerSize=100,this._plane=new THREE.Object3D,this._plane.rotation.x=-Math.PI/2;const e=new THREE.MeshStandardMaterial;this._innerPlaneMesh=new THREE.Mesh,this._innerPlaneMesh.layers.set(2),this._innerPlaneMesh.material=e,this._innerPlaneMesh.receiveShadow=!0,this._outerPlaneMesh=new THREE.Mesh,this._outerPlaneMesh.layers.set(2),this._outerPlaneMesh.material=e,this._outerPlaneMesh.receiveShadow=!0,this._plane.add(this._innerPlaneMesh),this._plane.add(this._outerPlaneMesh),this._innerSize=1,this._outerSize=t,this._updatePlane(this._innerSize,this._outerSize)}getRootNode(){return this._plane}getInnerPlane(){return this._innerPlaneMesh}getOuterPlane(){return this._outerPlaneMesh}updateSize(t){this._innerSize=t,this._updatePlane(this._innerSize,this._outerSize)}_updatePlane(t,e){const i=new THREE.Shape;i.moveTo(-t/2,-t/2),i.lineTo(-t/2,t/2),i.lineTo(t/2,t/2),i.lineTo(t/2,-t/2),i.lineTo(-t/2,-t/2);const s=new THREE.Shape;s.moveTo(-e/2,-e/2),s.lineTo(-e/2,e/2),s.lineTo(e/2,e/2),s.lineTo(e/2,-e/2),s.lineTo(-e/2,-e/2);const a=new THREE.Path;a.moveTo(-t/2,-t/2),a.lineTo(-t/2,t/2),a.lineTo(t/2,t/2),a.lineTo(t/2,-t/2),a.lineTo(-t/2,-t/2),s.holes.push(a);const n=new THREE.ShapeBufferGeometry(i);this._innerPlaneMesh.geometry&&this._innerPlaneMesh.geometry.dispose(),this._innerPlaneMesh.geometry=n;const o=new THREE.ShapeBufferGeometry(s);this._outerPlaneMesh.geometry&&this._outerPlaneMesh.geometry.dispose(),this._outerPlaneMesh.geometry=o;const r=n.attributes.uv.clone();n.setAttribute("uv2",r);const h=n.attributes.uv2.array;for(let t=0;t<h.length;++t)h[t]+=.5}}let FloorEnvironment=(()=>{class t extends BakedShadowEnvironment{constructor(t,e,i){super(t,e),this._longestSide=2,this._bakedShadowPlane=new BakedShadowPlane(100),this._fog=i||!1,this._textureLoader=new THREE.TextureLoader,this.addToScene()}needsBounds(){return!0}needsCamera(){return this._fog}needsRotation(){return!1}updateBounds(t){return super.updateBounds(t),this._longestSide=Math.max(t.x,t.z),this._update(),!0}updateCamera(t){this._cameraDistance=t.position.distanceTo(new THREE.Vector3(0,0,0)),this._update()}_update(){this._fog&&this._updateFog()}_updateFog(){let t=this._longestSide/2;this._scene.fog=new THREE.Fog(16185078,this._cameraDistance+t+3,this._cameraDistance+t+3+1),this._scene.background=new THREE.Color(16185078)}_updateFloor(){if(this._floorMaterial)this._bakedShadowPlane.getOuterPlane().material=this._floorMaterial,this._bakedShadowPlane.getInnerPlane().material=this._floorMaterial;else{let t=this._width/1e3,e=this._height/1e3;this._repeatable&&(this._floorTexture.wrapS=THREE.RepeatWrapping,this._floorTexture.wrapT=THREE.RepeatWrapping,this._floorTexture.repeat.set(100/t,100/e));let i=new THREE.MeshStandardMaterial({map:this._floorTexture,side:THREE.DoubleSide});this._bakedShadowPlane.getInnerPlane().material=i,this._bakedShadowPlane.getOuterPlane().material=i}}addToScene(){this._scene&&(this._shadowPlane&&(this._bakedShadowPlane.updateSize(this._shadowPlane.scale.x),this._bakedShadowPlane.getRootNode().position.copy(this._shadowPlane.position),this._bakedShadowPlane.getInnerPlane().material.aoMap=this._shadowPlane.material.aoMap),this._scene.add(this._bakedShadowPlane.getRootNode()))}removeFromScene(){this._scene.remove(this._bakedShadowPlane.getRootNode())}setFloorMaterial(t,e,i,s){return this._width=e,this._height=i,this._repeatable=s,this._floorPromise=new Promise((e,i)=>{this._textureLoader.load(t,t=>{this._floorTexture=t,e()},null,i)}),new Promise((t,e)=>{this._floorPromise.then(()=>{this._updateFloor(),this._update(),t()},e)})}changeFloorMaterial(t,e){this._floorPromise=new Promise((i,s)=>{this._floorMaterial=createMaterial(t,this._environmentLoader),this._rapiAccess.getTexturesOf(t).then(t=>{if(t.length>0){let a=[];t.forEach(t=>{a.push(addTexture(this._dataSyncer.requestAsset(t.image,!0),t,this._floorMaterial,e,1,1))}),Promise.all(a).then(()=>{setTimeout(()=>i(),0)},s)}else setTimeout(()=>i(),0)})});let i=[this._floorPromise];return new Promise((t,e)=>{Promise.all(i).then(()=>{this._updateFloor(),this._update(),t()},e)})}showGUI(){this._floorMaterial?this._addGUI():this._floorPromise&&this._floorPromise.then(()=>this._addGUI())}_addGUI(){let t=getGUI();if(!t)return;let e=t.addFolder("Floor");e.add(this._floorMaterial,"roughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"reflectivity").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoat").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoatRoughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"opacity").min(0).max(1).step(.01),e.add(this._floorMaterial,"metalness").min(0).max(1).step(.01),e.add(this._floorMaterial,"bumpScale").min(0).max(1).step(.01)}}return __decorate([inject],t.prototype,"_rapiAccess",void 0),__decorate([inject],t.prototype,"_dataSyncer",void 0),__decorate([inject],t.prototype,"_environmentLoader",void 0),t})();class BackgroundEnvironment extends BakedShadowEnvironment{constructor(t,e,i,s,a){if(super(t,e),this._color=i,this._oldBackground=t.background,s&&a){this._canvas=s,this._style=document.createElement("style");let t='background-image: url("'+a+'"); background-size: cover;';this._style.innerText=".rml-scene-background {"+t+"}",this._canvas.appendChild(this._style)}}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}addToScene(){super.addToScene(),this._scene&&this._color&&(this._scene.background=this._color),this._canvas&&this._canvas.classList&&(this._scene.background=null,this._canvas.classList.add("rml-scene-background"),this._pixotron&&(this._pixotron.enableAA=!1))}removeFromScene(){super.removeFromScene(),this._oldBackground&&(this._scene.background=this._oldBackground),this._canvas&&this._canvas.classList.remove("rml-scene-background")}}class CameraControl2D extends CameraControl{constructor(t,e,i){super(t,e,i),this._scale=1,this._state=0,this._size=20,this._center=new THREE.Vector3,this._lastPosition=new THREE.Vector2,this._zoomPosition=new THREE.Vector3,this._lastZoom=0,this._zoomSpeed=Math.pow(.95,2),this._cameraZoom=1,this._initCamera(i||new THREE.Vector3(0,10,0));let s=new THREE.PlaneGeometry(1e3,1e3);s.rotateX(-Math.PI/2),this._plane=new THREE.Mesh(s,new THREE.MeshStandardMaterial)}_getCamera(){return this._camera||this._initCamera(new THREE.Vector3(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=e/i*this._size,a=this._size;this._camera=new THREE.OrthographicCamera(s/-2,s/2,a/2,a/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new THREE.Vector3(0,0,0))}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions(),i=t/e*this._size,s=this._size;this._camera.left=i/-2,this._camera.right=i/2,this._camera.top=s/2,this._camera.bottom=s/-2,this._camera.updateProjectionMatrix()}_initInputListener(){this._inputListeners.push({key:3,fun:t=>{this._locked||(this._state=1,this._lastPosition.set(t.positionRelative.x,t.positionRelative.y),this.dispatchEvent(0))}}),this._inputListeners.push({key:6,fun:t=>{1!==this._state||this._locked||(this._move(new THREE.Vector2(t.positionRelative.x,t.positionRelative.y),t.type),this.dispatchEvent(1))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2),this._state=0}}),this._inputListeners.push({key:7,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale/=this._zoomSpeed,this._zoomTo(t.positionRelative,1),this._update()}}),this._inputListeners.push({key:8,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale*=this._zoomSpeed,this._zoomTo(t.positionRelative,-1),this._update()}})}_zoomTo(t,e){if(Date.now()-this._lastZoom>200){let e=new THREE.Vector3(t.x,t.y,0);e.unproject(this._camera),this._zoomPosition.copy(e)}this._lastZoom=Date.now()}_move(t,e){let i=new THREE.Vector3,s=new THREE.Vector3(this._lastPosition.x,this._lastPosition.y,0),a=new THREE.Vector3(t.x,t.y,0);s.unproject(this._camera),a.unproject(this._camera),i.subVectors(a,s),this._cameraPosition.x-=i.x*(2===e?1.1:1),this._cameraPosition.z-=i.z*(2===e?1.1:1),this._lastPosition.copy(t)}updateToBounds(t,e){let{x:i,y:s}=this._domHelper.getClientDimensions(),a=i/s;this._size=Math.max(t.x,t.z);let n=this._size,o=this._size;a>1?n=this._size*a:o=this._size*(s/i),this._center.copy(e),this._camera.left=n/-2,this._camera.right=n/2,this._camera.top=o/2,this._camera.bottom=o/-2,this._camera.zoom=1,this._camera.position.set(this._center.x,10,this._center.z),this._cameraPosition.copy(this._camera.position)}_update(t){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.8);let e=(new THREE.Vector3).subVectors(this._zoomPosition,this._cameraPosition).multiplyScalar((this._scale-this._cameraZoom)/this._scale);this._cameraPosition.x+=e.x,this._cameraPosition.z+=e.z,this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){return!(!super.animateCamera(t)&&Math.abs(this._cameraZoom-this._camera.zoom)<=.01||(this._camera.zoom=THREE.MathUtils.lerp(this._camera.zoom,this._cameraZoom,10*t),0))}}const KEYBOARD_ROTATION_ANGLE=Math.PI/4;class CameraControlFirstPerson extends CameraControl{constructor(t,e,i,s){super(t,e,i),this._state=0,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=toRadiant(-60),this.maxPolarAngle=toRadiant(60),this._camera=s||new THREE.PerspectiveCamera,this._camera.fov=70,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(5),this._camera.layers.enable(4),i?this._camera.position.set(i.x,1.5,i.z):this._camera.position.set(0,1.5,0),this._cameraPosition=new THREE.Vector3,this._cameraPosition.copy(this._camera.position),this._cameraRotation=new THREE.Quaternion,this._pitch=0,this._yaw=0;let a=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(a),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}_gamepadConnected(t){this.startButtonPressListener()}_gamepadDisconnected(t){window.cancelAnimationFrame(this._listenerLoopAnimationFrame)}startButtonPressListener(){this._listenerLoopAnimationFrame=window.requestAnimationFrame(()=>{this.buttonPressListener()})}buttonPressListener(){let t=navigator.getGamepads()[0];this._checkRightStick(t),this._checkLeftStick(t),this._checkButtons(t),this._processKeyMap(this._keyMap,.001),this.startButtonPressListener()}_checkRightStick(t){let e=t.axes[2],i=t.axes[3];Math.abs(e)>.2&&(this._rotateHorizontal(.01*KEYBOARD_ROTATION_ANGLE*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*KEYBOARD_ROTATION_ANGLE*i),this._update(),this.dispatchEvent(1))}_checkLeftStick(t){let e=t.axes[0],i=t.axes[1];Math.abs(i)>.2?i<0?this._keyMap.set(87,!0):this._keyMap.set(83,!0):t.buttons&&t.buttons[12]&&t.buttons[12].pressed?this._keyMap.set(87,!0):t.buttons&&t.buttons[13]&&t.buttons[13].pressed?this._keyMap.set(83,!0):(this._keyMap.set(87,!1),this._keyMap.set(83,!1)),Math.abs(e)>.2?e<0?this._keyMap.set(65,!0):this._keyMap.set(68,!0):(this._keyMap.set(65,!1),this._keyMap.set(68,!1))}_checkButtons(t){t.buttons&&t.buttons[6]&&t.buttons[6].pressed?this._keyMap.set(16,!0):this._keyMap.set(16,!1),t.buttons&&t.buttons[14]&&t.buttons[14].pressed?(this._keyMap.set(37,!0),this.dispatchEvent(1)):this._keyMap.set(37,!1),t.buttons&&t.buttons[15]&&t.buttons[15].pressed?(this._keyMap.set(39,!0),this.dispatchEvent(1)):this._keyMap.set(39,!1)}animateCamera(t){let e=this._cameraPosition,i=this._cameraRotation,s=this.getCamera(),a=position3VectorsAreEqual(e,s.position),n=rotationQuaternionsAreEqual(i,s.quaternion);if(!e||a&&n)return!1;let o=this.getCamera().position.clone(),r=Math.min(10*t,1);o.lerp(e,r),this.getCamera().position.copy(o);let h=this.getCamera().quaternion.clone(),_=Math.min(5*t,1);h.slerp(i,_),this.getCamera().setRotationFromQuaternion(h);let d=!1;return this._keyMap.forEach(t=>{t&&(d=!0)}),d&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){window.addEventListener("keyup",this._onKeyChanged.bind(this),!1),window.addEventListener("keydown",this._onKeyChanged.bind(this),!1),this._inputListeners.push({key:3,fun:t=>{this._down(t)}}),this._inputListeners.push({key:6,fun:t=>{this._move(t)}}),this._inputListeners.push({key:4,fun:t=>{this._up(t)}})}_down(t){this._downPosition=t.position,this._position=t.position,this._state=1,2===t.type&&window.setTimeout(this._onLongDown.bind(this),350),2===t.type?this._rotationSpeed=.6:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new THREE.Vector2(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new THREE.Vector2(t.position.x,t.position.y)),this._moveForward())}_up(t){1===this._state&&this.dispatchEvent(2),2===this._state&&this._keyMap.set(87,!1),this._state=0,this._orbitPosition=null}_onLongDown(){getDelta(this._downPosition,this._position)<MIN_MOVE_DISTANCE&&1===this._state&&(this._state=2,this._orbit(new THREE.Vector2(this._position.x,this._position.y)),this._moveForward())}_update(t){let e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(e)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}_onKeyChanged(t){this._keyMap.set(t.keyCode,"keydown"===t.type),this.dispatchEvent(6),this._processKeyMap(this._keyMap,.001)&&t.preventDefault()}_processKeyMap(t,e){e=Math.min(e,.1);let i=new THREE.Vector3(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1*e),t.get(68)&&(i.x=1*e),t.get(37)&&(this._rotateHorizontal(-KEYBOARD_ROTATION_ANGLE*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(KEYBOARD_ROTATION_ANGLE*this._rotationSpeed*e),s=!0),t.get(16)&&(i.x*=3,i.z*=3),!(0===i.x&&0===i.y&&0===i.z&&!s||(i.applyQuaternion(this.getCamera().quaternion),this._cameraPosition.add(new THREE.Vector3(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1*i),(t.get(83)||t.get(40))&&(e.z=1*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0));let e=t.clone().sub(this._orbitPosition),i=this._domHelper.element instanceof Document?this._domHelper.element.body:this._domHelper.element;e.multiplyScalar(-1),this._rotateHorizontal(2*Math.PI*e.x/i.clientWidth*1),this._rotateVertical(2*Math.PI*e.y/i.clientHeight*1),position2VectorsAreEqual(this._orbitPosition,t)||this.dispatchEvent(1),this._orbitPosition.copy(t),this._update()}_moveForward(){this._keyMap.set(87,!0),this._processKeyMap(this._keyMap,.001)}_rotateVertical(t){let e=this._pitch+t;e>this.maxPolarAngle||e<this.minPolarAngle||(this._pitch=e,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI),this._saveYawAndPitch())}}let DynamicEnvironmentSettingLoader=(()=>{class t{parse(t,e,i,s){let a=JSON.parse(s);return a.environment?this.load(t,e,i,a):null}load(t,e,i,s){let a,n=s.environment;if(!n)return console.warn("No environment set in scene settings"),Promise.resolve(null);switch(n.type){case"color":a=new Promise(e=>e(new BackgroundEnvironment(t,i,new THREE.Color(n.details.color))));break;case"image":a=new Promise(s=>s(new BackgroundEnvironment(t,i,null,e,n.details.imageUrl)));break;case"floor":a=new Promise(e=>{this._rapiAccess.getMaterial(n.details.material).then(s=>{let a=void 0===n.details.fog||n.details.fog,o=new FloorEnvironment(t,i,a);o.changeFloorMaterial(s).then(()=>{e(o)})})});break;case"baked_shadow":a=new Promise(s=>{n.details&&n.details.color?s(new BackgroundEnvironment(t,i,new THREE.Color(n.details.color))):n.details&&n.details.imageUrl?s(new BackgroundEnvironment(t,i,null,e,n.details.imageUrl)):s(new BakedShadowEnvironment(t,i))});break;default:console.warn("Could not load environment, return old environment"),a=new Promise(t=>t(i))}return a}}return __decorate([inject],t.prototype,"_rapiAccess",void 0),t})(),DynamicLightSetting=(()=>{class t extends LightSetting{constructor(t,e){super(t,e),this._lights=[]}needsBounds(){return!0}updateBounds(t){if(this._cameraLight){const e=this._cameraLight,i=new THREE.Vector3;t.getSize(i);const s=1.5*Math.max(Math.max(i.x,i.y),i.z);this._boundingSize=s,e.shadow.camera.top=s/2,e.shadow.camera.bottom=-s/2,e.shadow.camera.left=-s/2,e.shadow.camera.right=s/2,e.shadow.camera.updateProjectionMatrix()}}loadFromJSON(t){return new Promise(e=>{this._lights=this._dynamicLightSettingLoader.parse(t),this.addToScene(),e()})}loadFromObject(t){return new Promise(e=>{t.lights||e(),this._lights=this._dynamicLightSettingLoader.load(t),this._lights.forEach((t,e)=>{t.userData.movesWithCamera&&(this._cameraLight=t,this._lights.splice(e,1))}),this.addToScene(),e()})}loadFromURL(t){return new Promise((e,i)=>{fetch(new Request(t,{method:"GET"})).then(handleJsonResponse).then(t=>this.loadFromObject(t).then(e,i))})}addToScene(){this._lights.forEach(t=>{this._scene.add(t)}),this._cameraLight&&this._scene.add(this._cameraLight)}update(t,e){if(!this._cameraLight)return;let i=new THREE.Vector3;t.getWorldDirection(i),i.multiplyScalar(-this._boundingSize);let s=e.clone().add(i);this._cameraLight.position.copy(s)}removeFromScene(){this._lights.forEach(t=>{this._scene.remove(t)}),this._cameraLight&&this._scene.remove(this._cameraLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let t=getGUI();this._cameraLight&&this._addToGUI(t,this._cameraLight),this._lights.forEach(e=>{this._addToGUI(t,e)})}_addToGUI(t,e){t&&(e instanceof THREE.SpotLight&&this._addSpotLightToGUI(t,e),e instanceof THREE.AmbientLight&&this._addAmbientLightToGUI(t,e),e instanceof THREE.DirectionalLight&&this._addDirectionalLightToGUI(t,e),e instanceof THREE.RectAreaLight&&this._addRectAreaLightToGUI(t,e))}_addRectAreaLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),intensity:e.intensity*(e.width*e.height)};i.add(e,"visible"),i.add(s,"intensity").min(10).max(400).step(10).onChange(t=>{e.intensity=t/(e.width*e.height)}),i.add(e,"castShadow"),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addSpotLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),angle:180*e.angle/Math.PI};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.add(e,"penumbra").min(0).max(1).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(s,"angle").min(10).max(180).step(1).onChange(t=>{e.angle=t*Math.PI/180}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addAmbientLightToGUI(t,e){let i={name:e.name,color:"#"+e.color.getHexString()},s=t.addFolder(e.name);s.add(e,"visible"),s.add(e,"intensity").min(0).max(5).step(.1),s.addColor(i,"color").onChange(t=>{e.color=new THREE.Color(t)})}_addDirectionalLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString()};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e,"castShadow"),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}}return __decorate([inject],t.prototype,"_dynamicLightSettingLoader",void 0),t})();class HighPixelRatioQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(5),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class HighestQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(4),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class HighQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(3),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class MidQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(2),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class LowQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(1),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class LowestQualitySettings{constructor(){this._settings=new window.PIXOTRON.QualitySettings(0),this._settings.enableAA=!1,this._settings.useAreaLight=!1,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class PixotronUtil{constructor(t){this._sceneBoundingSphere=new THREE.Sphere,this._pixotron=t,this._initializeQualitySettings(),this._initializeQualityAdapters()}getPixotronInstance(t){const e={saoparams:{intensity:.5,occlusionWorldRadius:.6,smoothTransition:!0,bias:.02,accumulative:!1},shadowparams:{shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:100,side:THREE.FrontSide}};return t=t||e,new window.PIXOTRON.Pixotron(t)}showGUI(){let t=getGUI();if(!t)return;let e=t.addFolder("Renderer");e.add(this._pixotron.getSAOPass(),"enabled"),this._pixotron.getSAOPass().smoothTransition&&e.add(this._pixotron.getSAOPass(),"smoothTransition"),e.add(this._pixotron.getSAOPass(),"occlusionWorldRadius").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoRadius(t)}),e.add(this._pixotron.getSAOPass(),"intensity").min(.1).max(2).step(.05),e.add(this._pixotron.getSAOPass(),"bias").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoBias(t)}),this._pixotron.getSAOPass().numSamples&&e.add(this._pixotron.getSAOPass(),"numSamples").min(10).max(3e3).step(10),void 0!==this._pixotron.getShadowPass().enabled&&e.add(this._pixotron.getShadowPass(),"enabled"),e.add(this._pixotron.getShadowPass(),"smoothTransition"),e.add(this._pixotron.getShadowPass(),"enableAccumulation"),e.add(this._pixotron.getShadowPass(),"shadowRadius").min(0).max(5).step(.1),e.add(this._pixotron.getShadowPass(),"shadowBiasMultiplier").min(0).max(3).step(.01),e.add(this._pixotron.getShadowPass(),"numSamples").min(10).max(3e3).step(10)}updateBounds(t){this._sceneBoundingSphere.copy(t);const e=.25*this._getMaxSaoRadius();this._adjustSaoRadius(e);const i=2*this._getMinSaoBias();this._adjustSaoBias(i)}_getSaoRadius(){return this._sceneBoundingSphere.radius}_adjustSaoRadius(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoRadius(),s=this._getMaxSaoRadius();e.occlusionWorldRadius=Math.min(Math.max(t,i),s)}_adjustSaoBias(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoBias(),s=this._getMaxSaoBias();e.bias=Math.min(Math.max(t,i),s)}_getMinSaoRadius(){return.001*this._getSaoRadius()}_getMaxSaoRadius(){return.6*this._getSaoRadius()}_getMinSaoBias(){return.001*this._getSaoRadius()}_getMaxSaoBias(){return.01*this._getSaoRadius()}updatePixelRatio(t){const e=new THREE.Vector2;t.getDrawingBufferSize(e),this._pixotron.setSize(Math.floor(e.width),Math.floor(e.height))}getHighPixelRatioQualitySetting(){return this._highPixelRatioQualitySetting.getSettings()}getLowestQualitySetting(){return this._lowQualitySetting.getSettings()}_initializeQualitySettings(){this._highestQualitySetting=new HighestQualitySettings,this._highPixelRatioQualitySetting=new HighPixelRatioQualitySettings,this._highQualitySetting=new HighQualitySettings,this._midQualitySetting=new MidQualitySettings,this._lowQualitySetting=new LowQualitySettings,this._lowestQualitySetting=new LowestQualitySettings}_initializeQualityAdapters(){this._autoQualityAdapter=new window.PIXOTRON.AutoQualityAdapter(this._pixotron),this._autoQualityAdapter.addQuality(this._highestQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._highQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._midQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowestQualitySetting.getSettings()),this._autoQualityAdapter.setDesiredFps(20),this._manualQualityAdapter=new window.PIXOTRON.ManualQualityAdapter(this._pixotron)}onAutoQualityChange(t){this._autoQualityAdapter.onQualityChange(t)}onManualQualityChange(t){this._manualQualityAdapter.onQualityChange(t)}getAutoAdapter(){return this._autoQualityAdapter}lockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().lock()}unLockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().unLock()}enablePixotronAutoQuality(){this._currentQualityAdapter||(this._currentQualityAdapter=this._autoQualityAdapter,this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStarts(){this._currentQualityAdapter&&(this._currentQualityAdapter=this._autoQualityAdapter,this._currentQualitySetting&&(this._manualQualityAdapter.setQualitySetting(this._currentQualitySetting),this._pixotron.setQualityAdapter(this._manualQualityAdapter)),this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStops(){this._currentQualityAdapter&&(this._currentQualitySetting=this._currentQualityAdapter.getCurrentQualitySetting(),this._currentQualityAdapter=this._manualQualityAdapter,this._pixotron.setQualityAdapter(this._manualQualityAdapter),this._manualQualityAdapter.setQualitySetting(this._highestQualitySetting.getSettings()))}}let SceneManager=(()=>{class t{constructor(t,e,i,s,a){this._depthWriteMaterial=new THREE.MeshBasicMaterial({colorWrite:!1}),this._maxAnisotropy=1,this._clock=new THREE.Clock,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._forceRender=!1,this._updateShadowsAndAO=!0,this._lastChange=Date.now(),this._running=!1,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this.createCameraControl(s,e),this._setupScene(e,a),this._lifeCycleManager.addEventListener(this)}onBeforeRender(){}_changeCameraControl(t){this._cameraControl&&this._cameraControl.cleanUp(),t instanceof CameraControlFirstPerson&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraControl instanceof CameraControlFirstPerson&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),this._cameraControl=t,this.cameraControlChanged()}cameraControlChanged(){}_addCameraControlListener(){this._cameraControl.addEventListener(0,this._requestRender,this),this._cameraControl.addEventListener(1,this._requestRender,this),this._cameraControl.addEventListener(2,this._requestRender,this),this._cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!0),this._requestRender()}_renderWithoutShadowsAndAO(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!1),this._requestRender()}_requestRender(){if(!this._renderer)return;const t=()=>{var e;this._delta=this._clock.getDelta(),this._animateCamera(),this._cameraControl.getCamera().layers.mask=65535,null===(e=this._statsHelper)||void 0===e||e.updateRenderInfo(this._renderer.info),this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._pixotron&&(this._pixotron.autoShadowsClear=this._updateShadowsAndAO,this._pixotron.autoSAOClear=this._updateShadowsAndAO,this._forceRender&&(this._pixotron.needsUpdate=!0),this._pixotron.render(this._renderer,this._scene,this._cameraControl.getCamera(),this._renderTarget),this._forceRender=!1,this._updateShadowsAndAO=!0,this._pixotron.blit(),this._shouldRenderUi()&&this._renderUi()),this._onAfterRender(),window.TWEEN&&TWEEN.update(),this._lastChange+3e3<Date.now()||this._stopRendering?this._running=!1:(this._running=!0,requestAnimationFrame(t))};this._lastChange=Date.now(),this._running||this._stopRendering||(this._running=!0,requestAnimationFrame(t))}_shouldRenderUi(){return this._pluginSystem&&this._pluginSystem.needsUiScene()}_renderUi(){const t=this._scene.background?this._scene.background.clone():null;this._scene.overrideMaterial=this._depthWriteMaterial,this._scene.background=null,this._renderer.render(this._scene,this._cameraControl.getCamera()),this._scene.overrideMaterial=null;const e=this._renderer.autoClear;this._renderer.autoClear=!1,this._renderer.clearDepth(),this._renderer.render(this._uiScene,this._cameraControl.getCamera()),this._renderer.autoClear=e,this._scene.background=t}_animateCamera(){this._cameraControl&&(!this._cameraControl.animateCamera(this._delta)&&this.shouldClearShadowsAndAO()&&this._pixotron&&!this._forceRender?(this._pixotron.autoShadowsClear=!1,this._pixotron.autoSAOClear=!1):(this._lightSetting instanceof DynamicLightSetting&&this._cameraControl.getCamera()instanceof THREE.PerspectiveCamera&&this._lightSetting.update(this._cameraControl.getCamera(),this._cameraControl.getTargetPosition()),this._pixotron&&(this._pixotron.needsUpdate=!0))),this._environment&&this._environment.needsCamera()&&this._cameraControl instanceof CameraControl3D&&this._environment.updateCamera(this._cameraControl.getCamera())}shouldClearShadowsAndAO(){return!1}_setupScene(t,e){const{x:i,y:s}=this._domHelper.getClientDimensions();this._scene=new THREE.Scene,this._uiScene=new THREE.Scene,(e=e||!1)||(this._scene.background=new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND));const a={format:THREE.RGBAFormat,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter},n=THREE.sRGBEncoding,o=Math.floor(i*window.devicePixelRatio),r=Math.floor(s*window.devicePixelRatio);isWebGl2()?this._renderTarget=new THREE.WebGLMultisampleRenderTarget(o,r,a):this._renderTarget=new THREE.WebGLRenderTarget(o,r,a),this._renderTarget.texture.encoding=n,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(i,s),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=THREE.PCFSoftShadowMap,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._environmentLoader.setRendererAndScene(this._renderer,this._scene),this._environmentLoader.registerEnvironmentChangedCallback(()=>this._requestRender()),this._requestRender(),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this._pluginSystem.init(this._scene,this._uiScene,this._cameraControl.getCamera().position),this._addCameraControlListener(),this.sceneChanged()}_tabVisible(){this.updateCamera(!1)}updateCamera(t=!0){const{x:e,y:i}=this._domHelper.getClientDimensions();this._renderer.setSize(e,i);const s=this._renderer.getPixelRatio();if(this._renderTarget){const t=Math.floor(e*s),a=Math.floor(i*s);this._renderTarget.setSize(t,a)}if(this._pixotron)try{this._pixotron.setSize(e,i)}catch(t){console.warn(t)}this._cameraControl.updateCamera(),this._renderEverything()}_onWindowResize(){const t=this._getInputManager();t&&t.updateSize(),this.updateCamera(),this._requestRender()}_isPartOfScene(t){return"Object3D"===t.type||"Mesh"===t.type||"GLB"===t.type||"GLTF"===t.type||"Group"===t.type}cleanUp(){this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener),this._cameraControl&&this._cameraControl.cleanUp(),this._stopRendering=!0}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{dispose(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(t){this._renderer.capabilities.maxTextures>8&&t&&this.loadDynamicLightSetting(t),this._pixotron=new window.PIXOTRON.Pixotron(this.getPixotronParams()),this._pixotron.enableAA=!1,this._pixotronUtil=new PixotronUtil(this._pixotron),this._initData.autoQuality&&this._enableAutoQuality(),this._environment instanceof BakedShadowEnvironment&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500))),this._requestRender()}_enableAutoQuality(){this._pixotronUtil.enablePixotronAutoQuality();const t=this._pixotronUtil.getAutoAdapter();this._pixotronUtil.onAutoQualityChange((e,i)=>{var s;null===(s=this._statsHelper)||void 0===s||s.updateQualityInfo(e);const a=this._pixotronUtil.getLowestQualitySetting();if(this._enableSSR(e.ssr),i&&e.getQuality()<i.getQuality()&&t.getAverageFps()<5&&t.setQualitySetting(a),this._renderer.getPixelRatio()>1&&!e.useDevicePixelRatio){this._renderer.setPixelRatio(1);const{x:t,y:e}=this._domHelper.getClientDimensions();try{this._pixotron.setSize(t,e)}catch(t){console.warn(t)}this._renderTarget&&this._renderTarget.setSize(t,e)}}),this._pixotronUtil.onManualQualityChange((t,e)=>{var i;null===(i=this._statsHelper)||void 0===i||i.updateQualityInfo(t),this._enableSSR(t.ssr)}),this._pixotronUtil.lockAdapter()}_enableSSR(t=!1){const e=void 0!==this._initData.ssr&&this._initData.ssr;this._pixotron.getSSRPass().enabled=!!e&&t}_loadGLTF(t,e,i,s,a,n,o){return new Promise((r,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,a,n,null,o).then(t=>{this._setCamera("GLTF",t),r(t)},h)})}_loadGLB(t,e,i,s,a,n,o,r){return new Promise((h,_)=>{this._staticItemLoader.loadGLB(t,e,i,s,a,n,o,r).then(t=>{this._setCamera("GLB",t),h(t)},_)})}_setCamera(t,e){if(!e)return void console.warn("could not set camera for gltf",e);const i=new THREE.Box3;i.setFromObject(e),"GLB"===t?this._cameraControl instanceof CameraControl3D&&this._cameraControl.updateToBounds(i,!1):"GLTF"===t&&(this._cameraControl instanceof CameraControl3D&&this._cameraControl.updateAndReset(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3),-15,70,5,!1),this._cameraControl instanceof CameraControl2D&&this._cameraControl.updateToBounds(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3))),this.updateCamera()}async showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:100;top:0;left:0;}",document.head.appendChild(t),await this._scriptLoader.fetch("static/dat.gui.min-b5cbb61e5c62f0bf.js",{id:"dat-gui-js"});let e=getGUI(!1);e&&(this._domHelper.element.appendChild(e.domElement),this._guiLoaded())}_guiLoaded(){let t=getGUI();t&&(this._lightSetting&&this._lightSetting.showGUI(),this._pixotron&&this._pixotronUtil.showGUI(),this._environment&&this._environment.showGUI(),this._addGUIListener(t))}_addGUIListener(t){let e=t.__folders;Object.keys(e).forEach(t=>{let i=e[t];i.__folders&&Object.keys(i.__folders).forEach(t=>{let i=e[t];this._addGUIListener(i)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._renderEverything()}showStats(){import("./stats-helper-8edb994e.js").then(t=>this._statsHelper=new t.default)}_onKeyDown(t){}_onKeyUp(t){}pause(){this._getInputManager().removeEvents(this._renderer.domElement),window.removeEventListener("resize",this,!1),window.removeEventListener("keydown",this,!1),window.removeEventListener("keyup",this,!1),document.removeEventListener("visibilitychange",this)}resume(){let t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;if(this._renderTarget){const t=Math.floor(e*window.devicePixelRatio),s=Math.floor(i*window.devicePixelRatio);this._renderTarget.setSize(t,s)}this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this.updateCamera()}destroy(){this.pause(),this.cleanUp()}handleEvent(t){switch(t.type){case"resize":this._onWindowResize();break;case"keydown":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyDown(t);break;case"keyup":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyUp(t);break;case"visibilitychange":this._tabVisible()}}async loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new DynamicEnvironmentSettingLoader).load(this._scene,this._renderer.domElement,this._environment,t).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new DynamicLightSetting(this._scene,this._lightSetting),i=this._lightSetting.loadFromObject(t)):i=Promise.resolve(),new Promise((t,s)=>{Promise.all([e,i]).then(()=>{this._renderEverything(),t()},s)})}setBackgroundColor(t){this._setEnvironment(new BackgroundEnvironment(this._scene,this._environment,new THREE.Color(t)))}setBackgroundImage(t){this._setEnvironment(new BackgroundEnvironment(this._scene,this._environment,null,this._renderer.domElement,t))}setBakedShadow(t,e){this._setEnvironment(new BackgroundEnvironment(this._scene,this._environment,new THREE.Color(t),this._renderer.domElement,e))}_setEnvironment(t){this._environment=t,this._environment instanceof BakedShadowEnvironment&&(this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._renderEverything(),500))),this._renderEverything()}loadQualitySetting(t){this._pixotron&&(new DynamicQualitySettingLoader).set(this._pixotron,t)}async loadDynamicLightSetting(t){this._lightSetting=new DynamicLightSetting(this._scene,this._lightSetting);let e=!1;if(t.url)await this._lightSetting.loadFromURL(t.url),e=!0;else if(t.json)await this._lightSetting.loadFromJSON(t.json),e=!0;else if(t.object)await this._lightSetting.loadFromObject(t.object),e=!0;else if(t.ls){const i=DynamicLightSettingLoader.createDynamicLightSettingSource(null,t.ls);await this._lightSetting.loadFromURL(i.url),e=!0}if(!e)throw new Error("No dynamic light setting source set");this._requestRender()}getScene(){return this._scene}updateScene(){this._updateBounds(this.getBounds()),this._renderEverything()}_updateBounds(t,e=!1){if(t){if(this.updateEnvironment(t,e),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),this._pixotronUtil){const e=new THREE.Sphere;t.getBoundingSphere(e),this._pixotronUtil.updateBounds(e)}this._requestRender(),this._pluginSystem.updateBounds(t)}}setCameraOffset(t){const e=this._cameraControl.getCamera();e.offset?(e.offset=t,this._renderEverything()):console.warn("Cannot set offset, current camera does not support it")}getCameraOffset(){const t=this._cameraControl.getCamera();return t.offset?JSON.parse(JSON.stringify(t.offset)):{left:0,top:0,right:1,bottom:1}}getPerspectiveOffsetCamera(){const t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;return RoomleComponentFactoryInitializer().createCamera(30,e/i,.1,20)}updateEnvironment(t,e=!1){if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new THREE.Vector3);i.x+i.y+i.z!==0&&this._environment.updateBounds(t.getSize(new THREE.Vector3),e)}}}return __decorate([inject],t.prototype,"_domHelper",void 0),__decorate([inject],t.prototype,"_scriptLoader",void 0),__decorate([inject],t.prototype,"_lifeCycleManager",void 0),__decorate([inject],t.prototype,"_staticItemLoader",void 0),__decorate([inject],t.prototype,"_environmentLoader",void 0),__decorate([inject],t.prototype,"_initData",void 0),__decorate([inject],t.prototype,"_pluginSystem",void 0),t})();var PIXOTRON_FILE_NAME="static/pi.min-0272f873b3a4380a.js";const PIXOTRON_EFFETCS=["static/CopyShader-cde53240fcc3e06e.js","static/EffectComposer-1e936e5d03ff43cc.js","static/RenderPass-bc5df3810a01b2c6.js","static/ShaderPass-31f36160e0ea282d.js","static/LuminosityHighPassShader-dd5826656142421d.js","static/OutlinePass-f4bcd337cdd89b8d.js","static/RectAreaLightUniformsLib-4b74882185efd473.js","static/GammaCorrectionShader-b3b56f244f0d1e0e.js"];export{BakedShadowEnvironment as B,CameraControl3D as C,EventDispatcher as E,FloorEnvironment as F,InputManager as I,LightSetting as L,Main as M,PIXOTRON_EFFETCS as P,SceneManager as S,TWEEN_FILE_NAME as T,BackgroundEnvironment as a,ScriptLoader as b,CameraControl as c,PIXOTRON_FILE_NAME as d,CameraControl2D as e,CameraControlFirstPerson as f,INITIAL_PITCH as g};
2
- //# sourceMappingURL=pixotron-77031317.js.map
@@ -1,2 +0,0 @@
1
- import"./query-params-helper-a271f9dc.js";import{J as getGUI,_ as __decorate,i as inject,a7 as convertToKernel,C as CANVAS_ID,y as AsyncGuard,a8 as setWallTransparencyBasedOnCamera,k as kernelBoxToThreeBox,B as Benchmark,F as fadeIn,a9 as setWallTransparency,m as isIdItemId,aa as GLTF_LOADER_FILE_NAME,ab as DRACO_LOADER_FILE_NAME,D as DynamicLightSettingLoader,q as convertCObject,V as getMaterialId,a4 as disposeMesh,U as UiCallback,e as DependencyInjectionAssignment,L as Logger,f as RapiAccess,r as RoomleDependencyInjection}from"./rapi-access-e93cfc64.js";import{d as deepMerge,s as setCursor,l as copy,m as isString}from"./main-thread-to-worker-9d399850.js";import{S as SceneEventHandler,c as StaticPlanObjectViewModel,d as ConfiguratorPlanObjectViewModel,G as GLTF_EXPORTER_FILE_NAME,b as prepareTopImage,a as preparePerspectiveImage,g as getCameraTargetForBBox,P as PlannerKernelAccess,C as ConfiguratorUiCallbacks}from"./image-renderer-53f05110.js";import{L as LightSetting,S as SceneManager,B as BakedShadowEnvironment,a as BackgroundEnvironment,C as CameraControl3D,e as CameraControl2D,f as CameraControlFirstPerson,g as INITIAL_PITCH,T as TWEEN_FILE_NAME,P as PIXOTRON_EFFETCS,d as PIXOTRON_FILE_NAME,I as InputManager,E as EventDispatcher,b as ScriptLoader,M as Main}from"./pixotron-77031317.js";import{M as MeshGenerator}from"./mesh-generator-0bca3ff9.js";import{D as DefaultLightSetting}from"./default-light-setting-f14ab23f.js";class PlannerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._center=new THREE.Vector3(0,0,0),this._params={ambientLight:{color:"#ffffff"},hemiLight:{color:"#ffffff"},mainDirLight:{direction:{x:.03,y:1,z:.03},color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.3),this._ambientLight.layers.set(1),this._mainDirLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.5),this._mainDirLight.castShadow=!0,this._mainDirLight.shadow.camera.near=.5,this._mainDirLight.shadow.camera.far=100,this._mainDirLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirLight.visible=!0,this.addToScene()}updateSunPosition(e,t){}addToScene(){this._scene.add(this._mainDirLight),this._scene.add(this._ambientLight),this._scene.add(this._mainDirLight.target)}removeFromScene(){this._scene.remove(this._mainDirLight),this._scene.remove(this._ambientLight),this._scene.remove(this._mainDirLight.target)}reload(){this.removeFromScene(),this.addToScene()}needsBounds(){return!0}updateBounds(e){this._center.copy(e.getCenter(new THREE.Vector3));const t=new THREE.Sphere;e.getBoundingSphere(t);const n=t.radius,a=new THREE.Vector3(this._params.mainDirLight.direction.x,this._params.mainDirLight.direction.y,this._params.mainDirLight.direction.z);a.normalize(),a.multiplyScalar(n),this._mainDirLight.position.copy(this._center),this._mainDirLight.position.add(a),this._mainDirLight.target.position.copy(this._center),this._mainDirLight.target.updateMatrixWorld(!0),this._mainDirLight.shadow.camera.top=n,this._mainDirLight.shadow.camera.bottom=-n,this._mainDirLight.shadow.camera.left=-n,this._mainDirLight.shadow.camera.right=n,this._mainDirLight.shadow.camera.near=.01,this._mainDirLight.shadow.camera.far=2*n,this._mainDirLight.shadow.camera.updateProjectionMatrix()}showGUI(){let e=getGUI();if(e){if(this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>this._ambientLight.color=new THREE.Color(e))}if(this._hemiLight){let t=e.addFolder("Hemi Light");t.add(this._hemiLight,"visible"),t.add(this._hemiLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.hemiLight,"color").onChange(e=>this._hemiLight.color=new THREE.Color(e))}if(this._mainDirLight){let t=e.addFolder("Main Directional Light");t.add(this._mainDirLight,"visible"),t.add(this._mainDirLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirLight.color=new THREE.Color(e)),t.add(this._mainDirLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center)),t.add(this._mainDirLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center)),t.add(this._mainDirLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center))}}}}class SceneEventInfo{constructor(e){const{planElementViewModel:t,resetCamera:n,state:a,oldState:i}=e;this.planElementViewModel=t,this.resetCamera=void 0===n||n,this.state=void 0===a?0:a,this.oldState=void 0===i?0:i}}let PlannerSceneEventHandler=(()=>{class e extends SceneEventHandler{constructor(e,t,n,a){super(e,t,n,a),this._state=0,this._inputManager.addEventListener(4,()=>this._position=null,this),this._raycastHelper.setMode(0);const i=new THREE.Layers;i.enable(3),i.enable(6),i.enable(8),this._raycastHelper.setLayers(i),this._raycastHelper.addEventListener(3,()=>{this._plannerSelectionHandler.cancelSelection()},this),this._plannerSelectionHandler.addEventListener(0,({planElementViewModel:e})=>{this.dispatchEvent(0,new SceneEventInfo({planElementViewModel:e}))},this),this._plannerSelectionHandler.addEventListener(1,({planElementViewModel:e})=>{this.setState(0),this.dispatchEvent(1,new SceneEventInfo({planElementViewModel:e}))},this),this._inputManager.addEventListener(6,e=>this._move(e),this)}getSelectionMode(){return this._plannerSelectionHandler.getSelectionMode()}async addPlanObjectHandlers(e,t){t||(t=await e.getObjectAsync());const n={hasListener:!0,priority:1,roomleId:e.getId()};this._addPlanObjectHandlers(e,t,n)}addWallHandlers(e){this._addPlanElementHandlers(e,e.getBoundingBox(),{hasListener:!0,priority:1,roomleId:e.getId()})}_addPlanObjectHandlers(e,t,n){t.userData.hasListener||(t.userData=deepMerge(t.userData,n),t.addEventListener("select",()=>this._clickElement(e)),t.addEventListener("drag_start",()=>this._dragStart(e)),t.addEventListener("drag",t=>this._drag(e,t.attachment.position)),t.addEventListener("drag_end",t=>this._dragEnd(e,t.attachment.position)),t.addEventListener("hover_on",()=>this._hoverOn(e)),t.addEventListener("hover_off",()=>this._hoverOff(e)),t.addEventListener("rotate",t=>this._rotate(e,t.attachment.rotation)))}_addPlanElementHandlers(e,t,n){t.userData.hasListener||(t.userData=deepMerge(t.userData,n),t.addEventListener("select",()=>this._clickElement(e)),t.addEventListener("drag_start",()=>this._dragStart(e)),t.addEventListener("drag",t=>this._drag(e,t.attachment.position)),t.addEventListener("drag_end",t=>this._dragEnd(e,t.attachment.position)),t.addEventListener("hover_on",()=>this._hoverOn(e)),t.addEventListener("hover_off",()=>this._hoverOff(e)))}_clickElement(e){this._debug&&e.getId(),this._plannerSelectionHandler.check(e),this._setCursor()}_hoverOn(e){this._hoveredObject=e,this._setCursor()}_hoverOff(e){this._hoveredObject=null,this._setCursor()}_setCursor(){2===this._state&&this._hasSelection()?setCursor("ew-resize"):1===this._state?setCursor("grabbing"):this._hoveredObject&&this._plannerSelectionHandler.isSelected(this._hoveredObject.getId())?setCursor("move"):this._hoveredObject?setCursor("pointer"):setCursor("default")}setCamera(e){this._raycastHelper.setCamera(e)}setScene(e){this._raycastHelper.setScene(e)}getSelectedIds(){return this._plannerSelectionHandler.getSelectedIds()}setSelectionMode(e){this._plannerSelectionHandler.setSelectionMode(e)}setPlanViewModel(e){this._planViewModel=e}cancelSelection(){this._plannerSelectionHandler.cancelSelection()}_dragStart(e){this._plannerSelectionHandler.isSelected(e.getId())&&0===this._state&&(this._draggedObject=e,this.setState(1),this.dispatchEvent(4,new SceneEventInfo({planElementViewModel:e})),this._setCursor())}_drag(e,t){if(!this._draggedObject||1!==this._state)return;const n=this._plannerKernelAccess.planInteractionHandler;if(this._plannerSelectionHandler.getSelectedIds().length>1){const e=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList;let a=t.sub(this._draggedObject.getPosition());this._plannerSelectionHandler.getSelectedIds().forEach(t=>e.push_back(this._planViewModel.getPlanObjectForId(t).getPlanObject())),n.moveObjectsBy(e,convertToKernel(a))}else n.moveElementTo(e.getPlanElement(),convertToKernel(t));this.dispatchEvent(5,new SceneEventInfo({planElementViewModel:e}))}_dragEnd(e,t){this._draggedObject&&(this._draggedObject=null,this.setState(0),this.dispatchEvent(6,new SceneEventInfo({planElementViewModel:e})),this._dragIn&&(this.cancelSelection(),this.setDragIn(!1)),this._setCursor())}_rotate(e,t){if(this._plannerSelectionHandler.isSelected(e.getId())){const n=this._plannerKernelAccess.planInteractionHandler,a=e.getPlanObject();n.setObjectRotation(e.getPlanElement(),a.rotation-t)}}setState(e){const t=this._state;this._state=e,this._setCursor(),this.dispatchEvent(2,new SceneEventInfo({state:this._state,oldState:t})),this._position=null,2===this._state&&this._plannerKernelAccess.planInteractionHandler.deactivateAllSnappingActivity()}resetState(){this.setState(0)}_move(e){if(2===this._state&&this._hasSelection()){this._setCursor();let t=Math.PI/180;const{x:n,y:a}=e.positionRelative;this._position?t=1.4*e.positionRelative.x*Math.PI-1.4*this._position.x*Math.PI:this._position=new THREE.Vector3(e.positionRelative.x,e.positionRelative.y,0);const i=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList,s=new THREE.Box3;this.getSelectedIds().forEach(e=>{var t;const n=null===(t=this._planViewModel)||void 0===t?void 0:t.getPlanObjectForId(e);n&&n.getObject()&&(i.push_back(n.getPlanObject()),s.expandByObject(n.getContainer()))});const r=s.getCenter(new THREE.Vector3);this._plannerKernelAccess.planInteractionHandler.rotateObjectsBy(i,t,convertToKernel(r)),this._position.copy(new THREE.Vector3(n,a,0))}}_hasSelection(){return this._plannerSelectionHandler.getSelectedIds().length>0}selectPlanElement(e){this._plannerSelectionHandler.check(e)}_interaction(e){this.dispatchEvent(0,new SceneEventInfo({}))}addComponentDragInHandler(e){if(!this._dragIn)return;const t=e.getBoundingBox();this._addPlanElementHandlers(e,t,{hasListener:!0,priority:1,roomleId:e.getId()}),this._raycastHelper.enableDragIn(t),this._dragStart(e)}}return __decorate([inject],e.prototype,"_plannerSelectionHandler",void 0),__decorate([inject],e.prototype,"_plannerKernelAccess",void 0),e})(),PlannerSceneManager=(()=>{class e extends SceneManager{constructor(e,t,n,a){super(e,t,CANVAS_ID.HSP,a),this._staticItemGuard=new AsyncGuard,this._configurableItemGuard=new AsyncGuard,this._roomlePlannerCallback=n,this._plannerMeshGenerator.maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._plannerMeshGenerator.maxTextures=this._renderer.capabilities.maxTextures,this._plannerSceneEventHandler=new PlannerSceneEventHandler(e,this._scene,this._cameraControl.getCamera(),this._getInputManager()),this._plannerSceneEventHandler.addEventListener(2,({state:e,oldState:t})=>{2===t&&e!==t&&this._roomlePlannerUiCallback.onRotationCancel(),2===e||1===e?this._cameraControl.lock():this._cameraControl.unlock()},this),this._plannerSceneEventHandler.addEventListener(0,({planElementViewModel:e})=>{e instanceof StaticPlanObjectViewModel&&this._initData.debug&&e.getGLBUrl(),this._highlight(e),this._onSelectionChange(e)},this),this._plannerSceneEventHandler.addEventListener(1,()=>{this._highlight(null),this._roomlePlannerUiCallback.onSelectionCancel()},this),this._plannerSceneEventHandler.addEventListener(4,()=>{this._plannerKernelAccess.planInteractionHandler.startInteraction(),this._cameraControl.lock(),this._environment instanceof BakedShadowEnvironment&&this._environment.removeFromScene(),this._requestRender(),this._dragStartBounds=this.getBounds()},this),this._plannerSceneEventHandler.addEventListener(5,({planElementViewModel:e})=>{this._cameraControl.checkNearFarDistance(e.getPosition()),this._requestRender()},this),this._plannerSceneEventHandler.addEventListener(6,({planElementViewModel:e})=>{const t=this._plannerKernelAccess.planInteractionHandler;t.endInteraction(),this._cameraControl.unlock(),this._environment instanceof BakedShadowEnvironment&&this._environment.addToScene();const n=this._getDragPosition(e.getPosition());n&&t.moveElementTo(e.getPlanElement(),convertToKernel(n)),this.updateEnvironment(this.getBounds(),!0),this._zoomToBounds(),this._renderEverything()},this),this._plannerKernelAccess.addPlannerListener(this),this._plannerMeshGenerator.setMaterialLoadedListener(()=>{this._configurableItemGuard.resolve(),this._requestRender()}),window.onbeforeunload=this.clearScene.bind(this),this._renderListener=()=>{this._requestRender()},this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)}_getDragPosition(e){if(!this._plannerSceneEventHandler.isDragIn())return null;const t=this._dragStartBounds?this._dragStartBounds:this.getBounds(),n=t.getCenter(new THREE.Vector3),a=e.distanceTo(n),i=t.getSize(new THREE.Vector3),s=Math.max(i.x,i.z)+3;if(a>s){const t=(new THREE.Vector3).subVectors(e,n).normalize();return n.clone().add(t.multiplyScalar(s))}return null}_onSelectionChange(e){let t;e instanceof StaticPlanObjectViewModel&&(t="static"),e instanceof ConfiguratorPlanObjectViewModel&&(t="configuration");const n={};if(e instanceof StaticPlanObjectViewModel&&(n.item=e.getRapiItem()),e instanceof ConfiguratorPlanObjectViewModel){const t=e.getConfigurationRuntimeId();n.configurationRuntimeId=t}const a=(async()=>{const n={};if(e instanceof StaticPlanObjectViewModel&&(n.item=e.getRapiItem()),e instanceof ConfiguratorPlanObjectViewModel){const a=e.getConfigurationRuntimeId(),i=e.getPlanObject().getCatalogItemId(),s=this._plannerKernelAccess.kernelInstance.getHashOfConfiguration(a);let r;if(i&&isIdItemId(i)){const e=await this._rapiAccess.getItem(i);n.item=e,r=e.rootComponentId?e.rootComponentId:null}else try{const e=await this._rapiAccess.getConfiguration(s);n.configuration=e,r=e.rootComponentId?e.rootComponentId:null}catch(e){console.warn("Could not get RAPI configuration for kernel hash "+s+", saving configuration...");const t=await this._plannerKernelAccess.getConfigurationData(a),i=await this._rapiAccess.saveConfiguration(t);n.configuration=i,r=i.rootComponentId?i.rootComponentId:null}if(r){const e=await this._rapiAccess.getComponent(r);n.component=e}n.configurationRuntimeId=a,t="configuration"}return copy(n)})();this._roomlePlannerUiCallback.onSelectionChange(copy(this._plannerSceneEventHandler.getSelectionMode()),copy(t),copy(n),a)}_setupScene(e,t){super._setupScene(e,t),this._initData.moc?(this._lightSetting=new DefaultLightSetting(this._scene),this._setEnvironment(new BackgroundEnvironment(this._scene,this._environment,new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND)))):(this._lightSetting=new PlannerLightSetting(this._scene),this._addSky(),this._setEnvironment(new BakedShadowEnvironment(this._scene,this._environment)))}onBeforeRender(){this._cameraControl instanceof CameraControl3D&&this._plannerMeshGenerator.wallMeshes.forEach(e=>setWallTransparencyBasedOnCamera(this._cameraControl.getCamera(),e.material))}_getInputManager(){return this._plannerInputManager}createCameraControl(e,t){this.setMode(e)}resetCamera(){this._cameraControl.hasSavedState()?this.resetCameraToState():this.resetCameraPositionToStart()}resetCameraToState(){this._cameraControl.resetToState()}resetCameraPositionToStart(){this._requestRender()}_getYRotationOfObject(e){let t=e.getWorldDirection(new THREE.Vector3).clone();t.y=0,t.lengthSq()<.01&&(t=new THREE.Vector3(0,1,0),t.applyQuaternion(e.quaternion),t.y=0),t.normalize();let n=Math.asin(t.x);return t.z<0&&(n=Math.PI-n),n<0&&(n+=2*Math.PI),n}loadStaticPlanObjects(){let e=new Map;this._planViewModel.getStaticPlanObjectViewModels().forEach(t=>{let n=t.getPlanObject();e.has(n.getCatalogItemId())?e.get(n.getCatalogItemId()).push(t):e.set(n.getCatalogItemId(),[t])}),this._rapiAccess.getItems(Array.from(e.keys())).then(t=>{let n=[];t.forEach(t=>{this._plannerKernelAccess.catalogItemLoaded(t),e.get(t.id).forEach(e=>{n.push(new Promise((n,a)=>{e.setRapiItem(t).then(()=>{this._requestRender(),n()},a)}))})}),Promise.all(n).then(()=>this._staticItemsLoaded())})}_staticItemsLoaded(){this._requestRender(),this._staticItemGuard.resolve(),this._roomlePlannerUiCallback.onItemsLoaded()}preload(e){this._planId=e;let t=this._localStorageHelper.getItem(this._planId,"rml_plans");t&&this._loadGLTF(t).then(e=>{this._preloadScene=e,this._preloadScene&&this._scene.add(this._preloadScene),this._requestRender()})}planXMLLoaded(e){this.endPlanConstruction(e);const t=e.getBounds(),n=kernelBoxToThreeBox(t);this._updateBounds(n),this.loadStaticPlanObjects()}planCompletelyLoaded(e){this._renderEverything()}handlerSwitchedPlans(e){if(this._planViewModel=e,this._planViewModel.setPlannerSceneEventHandler(this._plannerSceneEventHandler),this._planViewModel.setGeometriesMergedListener(()=>{this._renderEverything()}),this._plannerSceneEventHandler.setPlanViewModel(this._planViewModel),this.clearScene(),!this._initData.moc){this._addSky();let e=new THREE.PlaneGeometry(1e3,1e3);e.rotateX(-Math.PI/2);let t=new THREE.MeshStandardMaterial({color:"#f0f0f0",roughness:1,metalness:0}),n=new THREE.Mesh(e,t);n.name="Ground",n.position.y=-.01,n.receiveShadow=!0,this._scene.add(n)}this.resetCamera(),this._setCeiling(),this._staticItemGuard.reset(),this._configurableItemGuard.reset(),Promise.all([this._staticItemGuard.wait(),this._configurableItemGuard.wait()]).then(this._itemsLoaded.bind(this))}_itemsLoaded(){const e=this._planViewModel.getCorePlan();if(this._pixotron){const t=kernelBoxToThreeBox(e.getBounds());this._pixotron.getShadowPass().setShadowRecieverBBox(t)}this._roomlePlannerUiCallback.onCompletelyLoaded(),this._pixotronUtil&&this._planViewModel.materialQueue.finished(!0).then(()=>{this._pixotronUtil.unLockAdapter()}),this.updateEnvironment(this.getBounds(),!0),this._renderEverything(),Benchmark.end("loadingTime")}beginPlanConstruction(e){}addPlanMesh(e,t,n,a,i,s,r){}endPlanConstruction(e){this._renderLoopFunction=()=>{this._scene.add(this._planViewModel.getConstructionGroup()),this._scene.add(this._planViewModel.getCeilingGroup()),this._scene.add(this._planViewModel.getFloorGroup()),this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(this._planViewModel.getBoundingBox()),this._scene.remove(this._preloadScene)}}addPlanObjectToScene(e){if(e){const t=e.getContainer();fadeIn(t),this._scene.add(t),this._plannerSceneEventHandler.isDragIn()&&(this._plannerSceneEventHandler.selectPlanElement(e),this._plannerSceneEventHandler.addComponentDragInHandler(e),this._requestRender())}setTimeout(()=>{this._zoomToBounds()},0),this._renderEverything()}removePlanObjectFromScene(e){this._scene.remove(e.getContainer()),e.clear(),this.updateEnvironment(this.getBounds()),this._zoomToBounds(),this._renderEverything()}planElementChanged(e,t){this.updateEnvironment(this.getBounds(),!0),this._renderEverything(),this._onPlanChanged()}exportGLB(e,t){this._scriptLoader.fetch(GLTF_EXPORTER_FILE_NAME,{id:"gltf-exporter"}).then(()=>{let n=new THREE.GLTFExporter;e||(e=[],this._scene.children.forEach(t=>{this._isPartOfScene(t)&&e.push(t)})),n.parse(e,e=>{let n=t||"test";this._localStorageHelper.addItem(n,JSON.stringify(e),"rml_plans")},{binary:!1,embedImages:!0,forceIndices:!0})})}importGLB(e){this._loadGLB(e).then(e=>this._scene.add(e))}clearScene(){this._plannerMeshGenerator.clear(),this._planViewModel.sceneCleared(),super.clearScene()}_addSky(){this._sky=new THREE.Sky,this._sky.name="Sky",this._sky.scale.setScalar(45e4),this._scene.add(this._sky),this._sky.material.uniforms.turbidity.value=10,this._sky.material.uniforms.rayleigh.value=2,this._sky.material.uniforms.luminance.value=1,this._sky.material.uniforms.mieCoefficient.value=.005,this._sky.material.uniforms.mieDirectionalG.value=.8;let e=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));e.name="Sunsphere",e.position.y=-7e5,e.visible=!1,this._scene.add(e);let t=-.2*Math.PI,n=2*Math.PI*-.25;e.position.x=4e5*Math.cos(n),e.position.y=4e5*Math.sin(n)*Math.sin(t),e.position.z=4e5*Math.sin(n)*Math.cos(t),e.visible=!0,this._sky.material.uniforms.sunPosition.value.copy(e.position),this._lightSetting instanceof PlannerLightSetting&&this._lightSetting.updateSunPosition(.3,.25)}switchTo2D(){this._cameraControl instanceof CameraControl2D||(this._plannerMeshGenerator.wallMeshes.forEach(e=>setWallTransparency(e.material,!1,!1)),this._renderEverything(),this._changeCameraControl(new CameraControl2D(this._creator_,this._getInputManager())),this._updateCamera(),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("2D"))}switchTo3D(){this._cameraControl instanceof CameraControl3D||(this._renderEverything(),this._changeCameraControl(new CameraControl3D(this._creator_,this._getInputManager(),new THREE.Vector3(0,10,0),this.getPerspectiveOffsetCamera())),this._updateCamera(),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("3D"))}_setCeiling(){this._planViewModel&&(this._cameraControl instanceof CameraControlFirstPerson?this._planViewModel.getCeilingGroup().visible=!0:this._planViewModel.getCeilingGroup().visible=!1)}cameraControlChanged(){super.cameraControlChanged(),this._plannerSceneEventHandler&&this._plannerSceneEventHandler.setCamera(this._cameraControl.getCamera())}sceneChanged(){this._plannerSceneEventHandler&&this._plannerSceneEventHandler.setScene(this._scene)}closeHSC(){this._requestRender(),this._cameraControl instanceof CameraControl3D&&this._cameraControl.resetToState()}switchToFirstPerson(){if(this._cameraControl instanceof CameraControlFirstPerson)return;this._plannerMeshGenerator.wallMeshes.forEach(e=>setWallTransparency(e.material,!1,!1)),this._renderEverything();let e=new THREE.Vector3(0,0,0);this._planViewModel&&(e=this._planViewModel.getBoundingBox().getCenter(new THREE.Vector3)),this._cameraControl&&this._cameraControl.cleanUp(),this._changeCameraControl(new CameraControlFirstPerson(this._creator_,this._getInputManager(),e,this.getPerspectiveOffsetCamera())),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("FP")}_onKeyDown(e){super._onKeyDown(e),this._initData.debug&&this._checkNumKey(e),!e.key||"Meta"!==e.key&&"Control"!==e.key||(this._plannerSceneEventHandler.setSelectionMode("multiselect"),e.preventDefault()),e.key&&e.key.includes("Shift")&&this._cameraControl instanceof CameraControl3D&&(this._cameraControl.enablePanning(),e.preventDefault())}_checkNumKey(e){e.key&&"1"===e.key&&(this.switchTo2D(),e.preventDefault()),e.key&&"2"===e.key&&(this.switchTo3D(),e.preventDefault()),e.key&&"3"===e.key&&(this.switchToFirstPerson(),e.preventDefault())}_onKeyUp(e){super._onKeyDown(e),!e.key||"Meta"!==e.key&&"Control"!==e.key||(this._plannerSceneEventHandler.setSelectionMode("standard"),e.preventDefault()),e.key&&e.key.includes("Shift")&&this._cameraControl instanceof CameraControl3D&&(this._cameraControl.disablePanning(),e.preventDefault())}setMode(e){switch(e){case"2D":this.switchTo2D();break;case"3D":this.switchTo3D();break;case"FP":this.switchToFirstPerson()}}_highlight(e){let t=new Set;e&&e.getObject()&&e.getObject().children&&e.getObject().children.forEach(e=>t.add(e)),this._plannerSceneEventHandler.getSelectedIds().forEach(e=>{const n=this._planViewModel.getPlanObjectForId(e);n&&n.getObject()&&n.getObject().children&&n.getObject().children.forEach(e=>t.add(e))}),this._pixotron&&this._pixotron.highlightObjects(Array.from(t))}destroy(){super.destroy(),this._plannerMeshGenerator.removeMaterialLoadedListener(),this._planViewModel.removeGeometriesMergedListener()}getPixotronParams(){return{saoparams:{intensity:.5,occlusionWorldRadius:.6,smoothTransition:!0,samplesPerFrame:4,bias:.02,numSamples:100,accumulative:!1,falloff:2},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100},outlineparams:{highlightColor:new THREE.Color(this._initData.colors.SELECTION),edgeStrength:1,transparency:.9,edgeThickness:2}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:1024,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.8,darkness:.3,size:1.2,lightDirection:new THREE.Vector3(0,1,0),lightSolidAngle:40,yPosition:.006}}planObjectConfigurationLoaded(e,t,n){if(e&&e.extRef&&t&&t.extRef){let e=t.extRef.jsObject.getPlanObject().getConfigurationRuntimeId();e>0&&this._planViewModel.constructComponents(e)}}addMesh(e,t,n,a,i,s){}_updateBounds(e){e&&(this._updateCamera(e),super._updateBounds(e))}_updateCamera(e){if(e||(e=this.getBounds()),e){if(this._cameraControl instanceof CameraControl3D){const t=e.getSize(new THREE.Vector3),n=Math.max(t.x,t.z),a=this._initData.moc?.5*n*-1:5,i=this._initData.moc?INITIAL_PITCH:70;this._cameraControl.updateAndReset(t,e.getCenter(new THREE.Vector3),-15,i,a,!1)}this._cameraControl instanceof CameraControl2D&&this._cameraControl.updateToBounds(e.getSize(new THREE.Vector3),e.getCenter(new THREE.Vector3))}}_zoomToBounds(){const e=this.getBounds();this._cameraControl instanceof CameraControl3D&&this._cameraControl.zoomToFitBounds(e)}getBounds(){return this._planViewModel?this._planViewModel.getBoundingBox():null}cancelSelection(){this._plannerSceneEventHandler.cancelSelection(),this._highlight(null),this._requestRender()}deleteSelection(){const e=this._plannerSceneEventHandler.getSelectedIds();this.cancelSelection(),e.forEach(e=>{const t=this._planViewModel.getPlanObjectForId(e);t&&t.getObject()&&this._plannerKernelAccess.planInteractionHandler.removeElement(t.getKernelObject())})}rotateSelection(e){const t=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList,n=new THREE.Box3;this._plannerSceneEventHandler.getSelectedIds().forEach(e=>{const a=this._planViewModel.getPlanObjectForId(e);a&&a.getObject()&&(t.push_back(a.getPlanObject()),n.expandByObject(a.getContainer()))});const a=n.getCenter(new THREE.Vector3),i=this._plannerKernelAccess.planInteractionHandler.groupObjects(t);this._plannerKernelAccess.planInteractionHandler.rotateGroupBy(i,e,convertToKernel(a))}planBoundsChanged(){this.updateEnvironment(this.getBounds()),this._requestRender()}planElementRemoved(e){this._onPlanChanged(),this._renderEverything()}_onPlanChanged(){this._roomlePlannerUiCallback.onPlanChanged()}prepareTopImage(e={}){return new Promise(t=>{this._planViewModel.materialQueue.finished(!0).then(async()=>{let n=this._calculateBoundingBoxOfAllMeshes(.1);this._lightSetting.removeFromScene();let a=await prepareTopImage(this._scene,null,n,e);this._lightSetting.addToScene(),this._requestRender(),t(a)})})}preparePerspectiveImage(e={}){return new Promise((t,n)=>{this._planViewModel.materialQueue.finished(!0).then(async()=>{let n;n=this._cameraControl instanceof CameraControl3D?this._cameraControl.getCamera().clone():this.getPerspectiveOffsetCamera();let a=this._calculateBoundingBoxOfAllMeshes();this._lightSetting.removeFromScene();const i=await preparePerspectiveImage(this._scene,null,n,a,e);this._lightSetting.addToScene(),this._requestRender(),t(i)},n)})}_calculateBoundingBoxOfAllMeshes(e=0){const t=this.getBounds();return getCameraTargetForBBox(t,e)}enableRotation(){this._plannerSceneEventHandler.setState(2)}disableRotation(){this._plannerSceneEventHandler.resetState()}dragIn(e){this._plannerSceneEventHandler.setDragIn(!0,e)}getPlannerSceneEventHandler(){return this._plannerSceneEventHandler}}return __decorate([inject],e.prototype,"_plannerKernelAccess",void 0),__decorate([inject],e.prototype,"_rapiAccess",void 0),__decorate([inject],e.prototype,"_plannerMeshGenerator",void 0),__decorate([inject],e.prototype,"_plannerInputManager",void 0),__decorate([inject],e.prototype,"_roomlePlannerUiCallback",void 0),__decorate([inject],e.prototype,"_localStorageHelper",void 0),e})();const OFFSET={left:0,top:1,right:1,bottom:0};let RoomlePlanner=(()=>{class e{constructor(e){this._hscInstance=null,this._glbInstance=null,this._creator_=e,this._kernelAccessCallback.addListener(this),this._backstack.init([CANVAS_ID.HSP],this)}deleteSelection(){this._sceneManager.deleteSelection()}rotateSelection(e){this._sceneManager.rotateSelection(e)}cancelSelection(){this._sceneManager.cancelSelection()}init(e,t,n){return Benchmark.start("loadingTime"),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):(this._preloadPlanId=t,this.setOverrides(n),new Promise(this._initPromiseCallback.bind(this)))}loadPlanXml(e,t){return this.setOverrides(t),new Promise(n=>{this._plan=this._planInteractionHandler.loadPlanXML(e),this._sceneManager.planXMLLoaded(this._plan),this._roomlePlannerUiCallback.onTotalFloorAreaChanged(this._planInteractionHandler.getPlan().getTotalFloorArea()),this._backstack.bringIntoForeground(CANVAS_ID.HSP),this._initData.moc&&(t.id?this._rapiAccess.trackView(t.id):this._rapiAccess.trackView("planXML")),n()})}loadPlan(e,t){return this.setOverrides(t),new Promise((t,n)=>{this._rapiAccess.getPlan(e).then(n=>{this._plan=this._planInteractionHandler.loadPlanXML(n.planObjects),this._sceneManager.planXMLLoaded(this._plan),this._roomlePlannerUiCallback.onTotalFloorAreaChanged(this._planInteractionHandler.getPlan().getTotalFloorArea()),this._backstack.bringIntoForeground(CANVAS_ID.HSP),this._initData.moc&&this._rapiAccess.trackView(e),t()},n)})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}switch2D(){this._sceneManager.switchTo2D()}switch3D(){this._sceneManager.switchTo3D()}switchToFirstPerson(){this._sceneManager.switchToFirstPerson()}exportGLB(){this._sceneManager.exportGLB()}importGLB(e){this._sceneManager.importGLB(e)}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(GLTF_LOADER_FILE_NAME,{id:"gltf-loader"}),n=this._scriptLoader.fetch(DRACO_LOADER_FILE_NAME,{id:"draco-loader"}),a=this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"}),i=this._scriptLoader.fetch("static/Sky-6621935ea8a523af.js",{id:"sky-js"});Promise.all([t,n,a,i]).then(()=>{this._kernelReadyCallback=e;const{dls:t,ls:n,mode:a,stats:i}=this._initData;this._sceneManager||(this._sceneManager=new PlannerSceneManager(this._creator_,OFFSET,this,a)),this._preloadPlanId&&this._sceneManager.preload(this._preloadPlanId);const s=DynamicLightSettingLoader.createDynamicLightSettingSource(t,n);i&&this.showStats(),this.enableHD(s),this._planInteractionHandler&&this._kernelReadyCallback()})})}enableHD(e){return new Promise((t,n)=>{const a=()=>{this._sceneManager.enableHD(e),t()};this._threeLoader.fetch().then(()=>Promise.all(PIXOTRON_EFFETCS.map(e=>this._scriptLoader.fetch(e,{id:e})))).then(()=>{this._scriptLoader.fetch(PIXOTRON_FILE_NAME,{id:"pi-js"}).then(a,n)},n)})}isReady(){this._planInteractionHandler=this._plannerKernelAccess.planInteractionHandler,this._kernelReadyCallback&&this._kernelReadyCallback()}showBenchmarks(){Benchmark.showBenchmarks()}async switchToConfigurator(){const e=await this._singlePromiseFactory.create(3,"startHSC",e=>{if(this._hscInstance)return e(this._hscInstance);import("./configurator-a8082ea1.js").then((function(e){return e.c})).then(({Configurator:t})=>{const n=new t(this._creator_);n.boot({kernelInstance:this._planInteractionHandler.getConfiguratorKernel(),kernelContainer:this._plannerKernelAccess.kernelContainer}),n.getApi().setOverrides(this._initData),n.getApi().init(this._domHelper.element).then(()=>{this._hscInstance=n,e(this._hscInstance)})})});return this._backstack.bringIntoForeground(CANVAS_ID.HSC),this.cancelSelection(),e}async switchToViewer(){const e=await this._singlePromiseFactory.create(4,"startGLB",e=>{if(this._glbInstance)return e(this._glbInstance);import("./glb-viewer-3b0c4942.js").then(t=>{const n=new t.GlbViewer(this._creator_);n.boot(),n.getApi().setOverrides(this._initData),n.getApi().init(this._domHelper.element).then(()=>{this._glbInstance=n,e(this._glbInstance)})})});return this._backstack.bringIntoForeground(CANVAS_ID.GLB),this.cancelSelection(),e}switchToPlanner(e){e&&this.loadPlan(e),this._backstack.bringIntoForeground(CANVAS_ID.HSP)}updateSize(){this._sceneManager.updateCamera()}getMain(){}update(){this.updateSize(),this._glbInstance&&this._glbInstance.getApi().updateSize(),this._hscInstance&&this._hscInstance.getApi().updateSize()}get callbacks(){return this._roomlePlannerUiCallback}set callbacks(e){this._roomlePlannerUiCallback=e}showStats(){this._sceneManager.showStats()}onBackStackChanged(e){this._roomlePlannerUiCallback.onBackStackChanged(e)}onCloseHSC(){this._sceneManager.closeHSC(),this._hscInstance&&this._hscInstance.getApi().pauseKernelCallbacks()}back(){if(this._backstack.current()===CANVAS_ID.GLB&&this._glbInstance&&this._glbInstance.getApi().clearScene(),this._backstack.current()===CANVAS_ID.HSC&&this._hscInstance){const e=this._hscInstance.getApi();e.cancelSelection(),e.cancelDockings(),e.hideDimensions(),e.disableMultiselect(),this._sceneManager.updateScene()}this._backstack.back()}backTo(e){this._backstack.backTo(e)}getConfigurator(){return this._hscInstance}getCurrentSkin(){return this._rapiAccess.getCurrentSkin()}getRuntimeComponentIdOfRootComponent(e){return e?this._plannerKernelAccess.planInteractionHandler?this._plannerKernelAccess.planInteractionHandler.getConfiguratorKernel().getRootPlanComponentIdFromObjectId(e):(console.warn("Can not retrieve runtime id without planInteractionHandler"),0):(console.warn("Can not retrieve runtime id without planObjectId"),0)}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}syncCatalog(e){return this._dataSyncer.syncCatalog(e)}loadError(e){}getPlanInteractionHandler(){return Promise.resolve(this._planInteractionHandler)}getPlanModelViewHelper(){return Promise.resolve(this._plannerKernelAccess.planModelViewHelper)}async insertObject(e,t,n){if(!this._planInteractionHandler)throw new Error("no plan interaction handler");t&&(t=convertToKernel(new THREE.Vector3(t.x,t.y,t.z)));const a=await(isIdItemId(e)?this._rapiAccess.getItem(e):this._rapiAccess.getConfiguration(e)),i=await this._plannerKernelAccess.addPlanObjectFromItem(a,t,n);return this._sceneManager.updateScene(),i}async insertItemList(e){const t=e.map(e=>isIdItemId(e)?this._rapiAccess.getItem(e):this._rapiAccess.getConfiguration(e)),n=await Promise.all(t);await this._plannerKernelAccess.insertItems(n)}async insertItems(e){await this._plannerKernelAccess.insertItems(e)}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getCameraOffset(){return this._sceneManager.getCameraOffset()}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}async getObjects(){const e=(await this.getPlanModelViewHelper()).getPlanOverview(this._plan);let t=[];const n=[],a=[],i=convertCObject(e.objects);await Promise.all(i.map(async e=>{const i=convertCObject(e);if(i.catalogItemId?n.push(i.catalogItemId):i.configurationHash&&a.push(i.configurationHash),i.parts){const e=i.configurationHash||i.catalogItemId,t=await this._plannerKernelAccess.addUiDataAndPriceToPartList(i.parts,e);i.parts=t}i.data=null,t.push(i)}));const[s,r]=await Promise.all([this._rapiAccess.getItems(n),this._rapiAccess.getConfigurations(a)]),o=[],l=new Map;for(const e of s)l.set(e.id,e);for(const e of r)l.set(e.id,e),o.push(e.rootComponentId);const c=await this._rapiAccess.getComponents(o),h=new Map;for(const e of c)h.set(e.id,e);for(const e of t){const t=e.catalogItemId||e.configurationHash,n=l.get(t)||null;if(n&&!n.label&&h.has(n.rootComponentId)){const e=h.get(n.rootComponentId);n.label=e.label}n&&!n.label&&(n.label=t),e.data=n}return t}async getPlanOverview(){const e=(await this.getPlanModelViewHelper()).getPlanOverview(this._plan);return convertCObject(e)}prepareTopImage(e={}){return this._sceneManager.prepareTopImage(e)}preparePerspectiveImage(e={}){return this._sceneManager.preparePerspectiveImage(e)}enableRotation(){this._sceneManager.enableRotation()}disableRotation(){this._sceneManager.disableRotation()}async dragInObject(e,t){this._sceneManager.dragIn(t);const n=await this._rapiAccess.getItem(e);this.insertItems([n])}enableSnapping(){this._planInteractionHandler.reactivateAllSnappingActivity()}disableSnapping(){this._planInteractionHandler.deactivateAllSnappingActivity()}async getPartlistOf(e){const t=this._plannerKernelAccess.kernelInstance.getHashOfConfiguration(e);if(!t){const e="Object has no partlist because it is not a configuration: "+t;return console.warn(e),Promise.reject(e)}const n=this._plannerKernelAccess.kernelInstance.getPartList(e);return await this._plannerKernelAccess.addUiDataAndPriceToPartList(n,t)}formatValueToUnitString(e,t){return this._unitFormatter.formatValueToUnitString(e,t)}drawWalls(e,t={}){var n,a;const i=this._planInteractionHandler;i.startInteraction();const s=[];for(const t of e){const e=i.addNode(t.from),r=i.addNode(t.to),o=i.addWall(e,r);void 0!==(null===(n=t.props)||void 0===n?void 0:n.height)&&i.setWallHeight(o,t.props.height),void 0!==(null===(a=t.props)||void 0===a?void 0:a.thickness)&&i.setWallThickness(o,t.props.thickness),s.push(o)}return t.keepInteractionOpen||i.endInteraction(),s}removeElements(e,t={}){const n=this._planInteractionHandler;n.startInteraction();for(const t of e)this._planInteractionHandler.removeElement(t);t.keepInteractionOpen||n.endInteraction()}}return __decorate([inject],e.prototype,"_domHelper",void 0),__decorate([inject],e.prototype,"_scriptLoader",void 0),__decorate([inject],e.prototype,"_kernelAccessCallback",void 0),__decorate([inject],e.prototype,"_plannerKernelAccess",void 0),__decorate([inject],e.prototype,"_rapiAccess",void 0),__decorate([inject],e.prototype,"_singlePromiseFactory",void 0),__decorate([inject],e.prototype,"_roomlePlannerUiCallback",void 0),__decorate([inject],e.prototype,"_lifeCycleManager",void 0),__decorate([inject],e.prototype,"_backstack",void 0),__decorate([inject],e.prototype,"_threeLoader",void 0),__decorate([inject],e.prototype,"_dataSyncer",void 0),__decorate([inject],e.prototype,"_initData",void 0),__decorate([inject],e.prototype,"_globalInitData",void 0),__decorate([inject],e.prototype,"_unitFormatter",void 0),e})(),Backstack=(()=>{class e{constructor(e){this._initialStack=[],this._creator_=e,this._lifeCycleManager.addEventListener(this)}_setInitialStack(e){this._initialStack=[...e]}_setCallbacks(e){this._callbacks=e}_resetCanvasStack(){this._canvasStack=[...this._initialStack]}init(e,t){this._setInitialStack(e),this._resetCanvasStack(),this._setCallbacks(t)}bringIntoForeground(e){const t=this._domHelper.element.querySelectorAll("canvas");let n=!1;t.forEach(t=>{if(t.classList.contains(e)){if(!t.classList.contains("foreground")){const t=this.current();t&&e!==t&&(this._canvasStack.push(e),n=!0),t||(n=!0)}t.classList.remove("background"),t.classList.add("foreground")}else t.classList.remove("foreground"),t.classList.add("background")}),n&&this._callbacks.onBackStackChanged(this._canvasStack)}current(){return this._canvasStack[this._canvasStack.length-1]}back(){if(1===this._canvasStack.length)return;let e=this._canvasStack.pop();this.bringIntoForeground(this.current()),e===CANVAS_ID.HSC&&this._callbacks.onCloseHSC(),this._callbacks.onBackStackChanged(this._canvasStack)}backTo(e){if(1!==this._canvasStack.length&&this.current()!==e)for(;this._canvasStack.length>0;){let t=this.current();if(t===e){this.bringIntoForeground(t);break}t===CANVAS_ID.HSC&&this._callbacks.onCloseHSC(),this._canvasStack.pop(),this._callbacks.onBackStackChanged(this._canvasStack)}}pause(){this._resetCanvasStack()}resume(){}destroy(){}}return __decorate([inject],e.prototype,"_domHelper",void 0),__decorate([inject],e.prototype,"_lifeCycleManager",void 0),e})();class PlannerSelectionHandlerEvent{constructor(e){const{planElementViewModel:t}=e;this.planElementViewModel=t}}const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("planner-input-manager",class extends InputManager{_canDrag(e){return!0}},1),new DependencyInjectionAssignment("planner-kernel-access",PlannerKernelAccess),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("planner-mesh-generator",class extends MeshGenerator{constructor(e){super(e),this._wallMeshes=[],this._defaultMaterial=new THREE.MeshStandardMaterial({color:"#ffffff",roughness:1,metalness:0,opacity:1,envMap:null}),this._environmentLoader.setEnvMap(this._defaultMaterial)}generateGeometry(e=null,t,n,a,i,s=!1){let r;return r=s?this._generateGeometry(e,t,n,a,i).clone():this._generateGeometry(e,t,n,a,i),r}generateMesh(e=null,t,n,a,i,s,r,o=!1){const l=this.generateGeometry(e,n,a,i,s,o),c=new THREE.Mesh(l,this._previewMaterial);return c.layers.set(3),!t&&r&&7!==r.value?(console.warn("material is undefined"),c):(this.setMaterial(c,t,r).then(()=>{const e=r&&3===r.value;c.castShadow=!e}),this._checkWallMaterial(c,r),c)}async setMaterial(e,t,n){if(e.userData.material=getMaterialId(t,n),e.userData.materialId=t,isString(t))t?await this._assignMaterial(e,t):(console.warn("Used default material because material is empty"),this.changeMaterialOfMesh(e,this._defaultMaterial));else{if(!t)return void this.changeMaterialOfMesh(e,this._defaultMaterial);2===(t=t).getSourceType().value?await this._assignMaterial(e,t.materialId):1===t.getSourceType().value?await this._assignItem(e,t.catalogItemId):3===t.getSourceType().value?await this._assignRGB(e,t.rgbValue):0===t.getSourceType().value?this.changeMaterialOfMesh(e,this._defaultMaterial):(this.changeMaterialOfMesh(e,this._defaultMaterial),1!==n.value&&7!==n.value&&3!==n.value&&console.warn("Used default material because material is not supported",t))}}set maxAnisotropy(e){this._maxAnisotropy=e}_checkWallMaterial(e,t){t&&1===t.value&&(e.renderOrder=5,this._wallMeshes.push(e))}clear(){super.clear(),this.clearWallMeshes()}clearWallMeshes(){this._wallMeshes.forEach(e=>{disposeMesh(e)}),this._wallMeshes=[]}get wallMeshes(){return this._wallMeshes}}),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("roomle-planner-ui-callback",class extends UiCallback{constructor(e){super(e),this.onItemsLoaded=()=>{},this.onBackStackChanged=e=>{},this.onCameraChanged=e=>{},this.onTotalFloorAreaChanged=e=>{},this.onPlanInteractionHandlerCreated=e=>{},this.onPlannerKernelIsReady=e=>{},this.onConfiguratorKernelIsReady=(e,t)=>{},this.onSelectionChange=(e,t,n,a)=>{},this.onSelectionCancel=()=>{},this.onPlanChanged=()=>{},this.onCompletelyLoaded=()=>{},this.onRotationCancel=()=>{},this.onHistoryChange=(e,t)=>{}}}),new DependencyInjectionAssignment("configurator-ui-callbacks",ConfiguratorUiCallbacks,1),new DependencyInjectionAssignment("backstack",Backstack),new DependencyInjectionAssignment("planner-selection-handler",class extends EventDispatcher{constructor(){super(...arguments),this._selectionMode="standard",this._selectedPlanElementViewModels=new Map}check(e){"standard"===this._selectionMode&&this._checkStandard(e),"multiselect"===this._selectionMode&&this._checkMulti(e)}cancelSelection(){0!==this._selectedPlanElementViewModels.size&&this._selectedPlanElementViewModels.forEach((e,t)=>{this._selectedPlanElementViewModels.delete(t),this.dispatchEvent(1,new PlannerSelectionHandlerEvent({planElementViewModel:e}))})}_checkStandard(e){if(this._selectedPlanElementViewModels.has(e.getId()))return this._selectedPlanElementViewModels.delete(e.getId()),void this.dispatchEvent(1,new PlannerSelectionHandlerEvent({planElementViewModel:e}));this._selectedPlanElementViewModels.size>0&&this._selectedPlanElementViewModels.forEach((e,t)=>{this._selectedPlanElementViewModels.delete(t),this.dispatchEvent(1,new PlannerSelectionHandlerEvent({planElementViewModel:e}))}),this._selectedPlanElementViewModels.set(e.getId(),e),this.dispatchEvent(0,new PlannerSelectionHandlerEvent({planElementViewModel:e}))}_checkMulti(e){if(this._selectedPlanElementViewModels.has(e.getId()))return this._selectedPlanElementViewModels.delete(e.getId()),void this.dispatchEvent(1,new PlannerSelectionHandlerEvent({planElementViewModel:e}));this._selectedPlanElementViewModels.set(e.getId(),e),this.dispatchEvent(0,new PlannerSelectionHandlerEvent({planElementViewModel:e}))}setSelectionMode(e){this._selectionMode=e}getSelectionMode(){return this._selectionMode}hasSelection(){return this._selectedPlanElementViewModels.size>0}getSelectedIds(){let e=[];return this._selectedPlanElementViewModels.forEach(t=>e.push(t.getId())),e}isSelected(e){return!!this._selectedPlanElementViewModels.get(e)}})];class Planner extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context),this.lookup("planner-kernel-access",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._planner=new RoomlePlanner(this._context),this._planner.getMain=()=>this,window.RoomlePlanner||(window.RoomlePlanner=this._planner)}getApi(){return this._planner}getContextName(){return"planner"}}export{Planner};
2
- //# sourceMappingURL=planner-e87a1d4d.js.map
@@ -1,2 +0,0 @@
1
- System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-d733ff35.nomodule.js","./main-thread-to-worker-97315397.nomodule.js","./image-renderer-9aeaac77.nomodule.js","./pixotron-0d36898b.nomodule.js","./mesh-generator-149119b9.nomodule.js","./default-light-setting-accf9742.nomodule.js"],(function(e,t){var n,a,i,s,r,o,l,h,c,d,_,p,g,m,u,w,S,f,C,v,E,M,b,I,k,y,P,H,L,D,T,R,O,V,A,B,j,x,F,G,K,U,z,q,W,N,X,Q,J,Y,Z,$,ee;return{setters:[function(){},function(e){n=e.J,a=e._,i=e.i,s=e.a7,r=e.C,o=e.y,l=e.a8,h=e.k,c=e.B,d=e.F,_=e.a9,p=e.m,g=e.aa,m=e.ab,u=e.D,w=e.q,S=e.V,f=e.a4,C=e.U,v=e.e,E=e.L,M=e.f,b=e.r},function(e){I=e.d,k=e.s,y=e.l,P=e.m},function(e){H=e.S,L=e.c,D=e.d,T=e.G,R=e.b,O=e.a,V=e.g,A=e.P,B=e.C},function(e){j=e.L,x=e.S,F=e.B,G=e.a,K=e.C,U=e.e,z=e.f,q=e.g,W=e.T,N=e.P,X=e.d,Q=e.I,J=e.E,Y=e.b,Z=e.M},function(e){$=e.M},function(e){ee=e.D}],execute:function(){class te extends j{constructor(e,t){super(e,t),this._center=new THREE.Vector3(0,0,0),this._params={ambientLight:{color:"#ffffff"},hemiLight:{color:"#ffffff"},mainDirLight:{direction:{x:.03,y:1,z:.03},color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.3),this._ambientLight.layers.set(1),this._mainDirLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.5),this._mainDirLight.castShadow=!0,this._mainDirLight.shadow.camera.near=.5,this._mainDirLight.shadow.camera.far=100,this._mainDirLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirLight.visible=!0,this.addToScene()}updateSunPosition(e,t){}addToScene(){this._scene.add(this._mainDirLight),this._scene.add(this._ambientLight),this._scene.add(this._mainDirLight.target)}removeFromScene(){this._scene.remove(this._mainDirLight),this._scene.remove(this._ambientLight),this._scene.remove(this._mainDirLight.target)}reload(){this.removeFromScene(),this.addToScene()}needsBounds(){return!0}updateBounds(e){this._center.copy(e.getCenter(new THREE.Vector3));const t=new THREE.Sphere;e.getBoundingSphere(t);const n=t.radius,a=new THREE.Vector3(this._params.mainDirLight.direction.x,this._params.mainDirLight.direction.y,this._params.mainDirLight.direction.z);a.normalize(),a.multiplyScalar(n),this._mainDirLight.position.copy(this._center),this._mainDirLight.position.add(a),this._mainDirLight.target.position.copy(this._center),this._mainDirLight.target.updateMatrixWorld(!0),this._mainDirLight.shadow.camera.top=n,this._mainDirLight.shadow.camera.bottom=-n,this._mainDirLight.shadow.camera.left=-n,this._mainDirLight.shadow.camera.right=n,this._mainDirLight.shadow.camera.near=.01,this._mainDirLight.shadow.camera.far=2*n,this._mainDirLight.shadow.camera.updateProjectionMatrix()}showGUI(){let e=n();if(e){if(this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>this._ambientLight.color=new THREE.Color(e))}if(this._hemiLight){let t=e.addFolder("Hemi Light");t.add(this._hemiLight,"visible"),t.add(this._hemiLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.hemiLight,"color").onChange(e=>this._hemiLight.color=new THREE.Color(e))}if(this._mainDirLight){let t=e.addFolder("Main Directional Light");t.add(this._mainDirLight,"visible"),t.add(this._mainDirLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirLight.color=new THREE.Color(e)),t.add(this._mainDirLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center)),t.add(this._mainDirLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center)),t.add(this._mainDirLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirLight.lookAt(this._center))}}}}class ne{constructor(e){const{planElementViewModel:t,resetCamera:n,state:a,oldState:i}=e;this.planElementViewModel=t,this.resetCamera=void 0===n||n,this.state=void 0===a?0:a,this.oldState=void 0===i?0:i}}let ae=(()=>{class e extends H{constructor(e,t,n,a){super(e,t,n,a),this._state=0,this._inputManager.addEventListener(4,()=>this._position=null,this),this._raycastHelper.setMode(0);const i=new THREE.Layers;i.enable(3),i.enable(6),i.enable(8),this._raycastHelper.setLayers(i),this._raycastHelper.addEventListener(3,()=>{this._plannerSelectionHandler.cancelSelection()},this),this._plannerSelectionHandler.addEventListener(0,({planElementViewModel:e})=>{this.dispatchEvent(0,new ne({planElementViewModel:e}))},this),this._plannerSelectionHandler.addEventListener(1,({planElementViewModel:e})=>{this.setState(0),this.dispatchEvent(1,new ne({planElementViewModel:e}))},this),this._inputManager.addEventListener(6,e=>this._move(e),this)}getSelectionMode(){return this._plannerSelectionHandler.getSelectionMode()}async addPlanObjectHandlers(e,t){t||(t=await e.getObjectAsync());const n={hasListener:!0,priority:1,roomleId:e.getId()};this._addPlanObjectHandlers(e,t,n)}addWallHandlers(e){this._addPlanElementHandlers(e,e.getBoundingBox(),{hasListener:!0,priority:1,roomleId:e.getId()})}_addPlanObjectHandlers(e,t,n){t.userData.hasListener||(t.userData=I(t.userData,n),t.addEventListener("select",()=>this._clickElement(e)),t.addEventListener("drag_start",()=>this._dragStart(e)),t.addEventListener("drag",t=>this._drag(e,t.attachment.position)),t.addEventListener("drag_end",t=>this._dragEnd(e,t.attachment.position)),t.addEventListener("hover_on",()=>this._hoverOn(e)),t.addEventListener("hover_off",()=>this._hoverOff(e)),t.addEventListener("rotate",t=>this._rotate(e,t.attachment.rotation)))}_addPlanElementHandlers(e,t,n){t.userData.hasListener||(t.userData=I(t.userData,n),t.addEventListener("select",()=>this._clickElement(e)),t.addEventListener("drag_start",()=>this._dragStart(e)),t.addEventListener("drag",t=>this._drag(e,t.attachment.position)),t.addEventListener("drag_end",t=>this._dragEnd(e,t.attachment.position)),t.addEventListener("hover_on",()=>this._hoverOn(e)),t.addEventListener("hover_off",()=>this._hoverOff(e)))}_clickElement(e){this._debug&&e.getId(),this._plannerSelectionHandler.check(e),this._setCursor()}_hoverOn(e){this._hoveredObject=e,this._setCursor()}_hoverOff(e){this._hoveredObject=null,this._setCursor()}_setCursor(){2===this._state&&this._hasSelection()?k("ew-resize"):1===this._state?k("grabbing"):this._hoveredObject&&this._plannerSelectionHandler.isSelected(this._hoveredObject.getId())?k("move"):this._hoveredObject?k("pointer"):k("default")}setCamera(e){this._raycastHelper.setCamera(e)}setScene(e){this._raycastHelper.setScene(e)}getSelectedIds(){return this._plannerSelectionHandler.getSelectedIds()}setSelectionMode(e){this._plannerSelectionHandler.setSelectionMode(e)}setPlanViewModel(e){this._planViewModel=e}cancelSelection(){this._plannerSelectionHandler.cancelSelection()}_dragStart(e){this._plannerSelectionHandler.isSelected(e.getId())&&0===this._state&&(this._draggedObject=e,this.setState(1),this.dispatchEvent(4,new ne({planElementViewModel:e})),this._setCursor())}_drag(e,t){if(!this._draggedObject||1!==this._state)return;const n=this._plannerKernelAccess.planInteractionHandler;if(this._plannerSelectionHandler.getSelectedIds().length>1){const e=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList;let a=t.sub(this._draggedObject.getPosition());this._plannerSelectionHandler.getSelectedIds().forEach(t=>e.push_back(this._planViewModel.getPlanObjectForId(t).getPlanObject())),n.moveObjectsBy(e,s(a))}else n.moveElementTo(e.getPlanElement(),s(t));this.dispatchEvent(5,new ne({planElementViewModel:e}))}_dragEnd(e,t){this._draggedObject&&(this._draggedObject=null,this.setState(0),this.dispatchEvent(6,new ne({planElementViewModel:e})),this._dragIn&&(this.cancelSelection(),this.setDragIn(!1)),this._setCursor())}_rotate(e,t){if(this._plannerSelectionHandler.isSelected(e.getId())){const n=this._plannerKernelAccess.planInteractionHandler,a=e.getPlanObject();n.setObjectRotation(e.getPlanElement(),a.rotation-t)}}setState(e){const t=this._state;this._state=e,this._setCursor(),this.dispatchEvent(2,new ne({state:this._state,oldState:t})),this._position=null,2===this._state&&this._plannerKernelAccess.planInteractionHandler.deactivateAllSnappingActivity()}resetState(){this.setState(0)}_move(e){if(2===this._state&&this._hasSelection()){this._setCursor();let t=Math.PI/180;const{x:n,y:a}=e.positionRelative;this._position?t=1.4*e.positionRelative.x*Math.PI-1.4*this._position.x*Math.PI:this._position=new THREE.Vector3(e.positionRelative.x,e.positionRelative.y,0);const i=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList,r=new THREE.Box3;this.getSelectedIds().forEach(e=>{var t;const n=null===(t=this._planViewModel)||void 0===t?void 0:t.getPlanObjectForId(e);n&&n.getObject()&&(i.push_back(n.getPlanObject()),r.expandByObject(n.getContainer()))});const o=r.getCenter(new THREE.Vector3);this._plannerKernelAccess.planInteractionHandler.rotateObjectsBy(i,t,s(o)),this._position.copy(new THREE.Vector3(n,a,0))}}_hasSelection(){return this._plannerSelectionHandler.getSelectedIds().length>0}selectPlanElement(e){this._plannerSelectionHandler.check(e)}_interaction(e){this.dispatchEvent(0,new ne({}))}addComponentDragInHandler(e){if(!this._dragIn)return;const t=e.getBoundingBox();this._addPlanElementHandlers(e,t,{hasListener:!0,priority:1,roomleId:e.getId()}),this._raycastHelper.enableDragIn(t),this._dragStart(e)}}return a([i],e.prototype,"_plannerSelectionHandler",void 0),a([i],e.prototype,"_plannerKernelAccess",void 0),e})(),ie=(()=>{class e extends x{constructor(e,t,n,a){super(e,t,r.HSP,a),this._staticItemGuard=new o,this._configurableItemGuard=new o,this._roomlePlannerCallback=n,this._plannerMeshGenerator.maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._plannerMeshGenerator.maxTextures=this._renderer.capabilities.maxTextures,this._plannerSceneEventHandler=new ae(e,this._scene,this._cameraControl.getCamera(),this._getInputManager()),this._plannerSceneEventHandler.addEventListener(2,({state:e,oldState:t})=>{2===t&&e!==t&&this._roomlePlannerUiCallback.onRotationCancel(),2===e||1===e?this._cameraControl.lock():this._cameraControl.unlock()},this),this._plannerSceneEventHandler.addEventListener(0,({planElementViewModel:e})=>{e instanceof L&&this._initData.debug&&e.getGLBUrl(),this._highlight(e),this._onSelectionChange(e)},this),this._plannerSceneEventHandler.addEventListener(1,()=>{this._highlight(null),this._roomlePlannerUiCallback.onSelectionCancel()},this),this._plannerSceneEventHandler.addEventListener(4,()=>{this._plannerKernelAccess.planInteractionHandler.startInteraction(),this._cameraControl.lock(),this._environment instanceof F&&this._environment.removeFromScene(),this._requestRender(),this._dragStartBounds=this.getBounds()},this),this._plannerSceneEventHandler.addEventListener(5,({planElementViewModel:e})=>{this._cameraControl.checkNearFarDistance(e.getPosition()),this._requestRender()},this),this._plannerSceneEventHandler.addEventListener(6,({planElementViewModel:e})=>{const t=this._plannerKernelAccess.planInteractionHandler;t.endInteraction(),this._cameraControl.unlock(),this._environment instanceof F&&this._environment.addToScene();const n=this._getDragPosition(e.getPosition());n&&t.moveElementTo(e.getPlanElement(),s(n)),this.updateEnvironment(this.getBounds(),!0),this._zoomToBounds(),this._renderEverything()},this),this._plannerKernelAccess.addPlannerListener(this),this._plannerMeshGenerator.setMaterialLoadedListener(()=>{this._configurableItemGuard.resolve(),this._requestRender()}),window.onbeforeunload=this.clearScene.bind(this),this._renderListener=()=>{this._requestRender()},this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)}_getDragPosition(e){if(!this._plannerSceneEventHandler.isDragIn())return null;const t=this._dragStartBounds?this._dragStartBounds:this.getBounds(),n=t.getCenter(new THREE.Vector3),a=e.distanceTo(n),i=t.getSize(new THREE.Vector3),s=Math.max(i.x,i.z)+3;if(a>s){const t=(new THREE.Vector3).subVectors(e,n).normalize();return n.clone().add(t.multiplyScalar(s))}return null}_onSelectionChange(e){let t;e instanceof L&&(t="static"),e instanceof D&&(t="configuration");const n={};if(e instanceof L&&(n.item=e.getRapiItem()),e instanceof D){const t=e.getConfigurationRuntimeId();n.configurationRuntimeId=t}const a=(async()=>{const n={};if(e instanceof L&&(n.item=e.getRapiItem()),e instanceof D){const a=e.getConfigurationRuntimeId(),i=e.getPlanObject().getCatalogItemId(),s=this._plannerKernelAccess.kernelInstance.getHashOfConfiguration(a);let r;if(i&&p(i)){const e=await this._rapiAccess.getItem(i);n.item=e,r=e.rootComponentId?e.rootComponentId:null}else try{const e=await this._rapiAccess.getConfiguration(s);n.configuration=e,r=e.rootComponentId?e.rootComponentId:null}catch(e){console.warn("Could not get RAPI configuration for kernel hash "+s+", saving configuration...");const t=await this._plannerKernelAccess.getConfigurationData(a),i=await this._rapiAccess.saveConfiguration(t);n.configuration=i,r=i.rootComponentId?i.rootComponentId:null}if(r){const e=await this._rapiAccess.getComponent(r);n.component=e}n.configurationRuntimeId=a,t="configuration"}return y(n)})();this._roomlePlannerUiCallback.onSelectionChange(y(this._plannerSceneEventHandler.getSelectionMode()),y(t),y(n),a)}_setupScene(e,t){super._setupScene(e,t),this._initData.moc?(this._lightSetting=new ee(this._scene),this._setEnvironment(new G(this._scene,this._environment,new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND)))):(this._lightSetting=new te(this._scene),this._addSky(),this._setEnvironment(new F(this._scene,this._environment)))}onBeforeRender(){this._cameraControl instanceof K&&this._plannerMeshGenerator.wallMeshes.forEach(e=>l(this._cameraControl.getCamera(),e.material))}_getInputManager(){return this._plannerInputManager}createCameraControl(e,t){this.setMode(e)}resetCamera(){this._cameraControl.hasSavedState()?this.resetCameraToState():this.resetCameraPositionToStart()}resetCameraToState(){this._cameraControl.resetToState()}resetCameraPositionToStart(){this._requestRender()}_getYRotationOfObject(e){let t=e.getWorldDirection(new THREE.Vector3).clone();t.y=0,t.lengthSq()<.01&&(t=new THREE.Vector3(0,1,0),t.applyQuaternion(e.quaternion),t.y=0),t.normalize();let n=Math.asin(t.x);return t.z<0&&(n=Math.PI-n),n<0&&(n+=2*Math.PI),n}loadStaticPlanObjects(){let e=new Map;this._planViewModel.getStaticPlanObjectViewModels().forEach(t=>{let n=t.getPlanObject();e.has(n.getCatalogItemId())?e.get(n.getCatalogItemId()).push(t):e.set(n.getCatalogItemId(),[t])}),this._rapiAccess.getItems(Array.from(e.keys())).then(t=>{let n=[];t.forEach(t=>{this._plannerKernelAccess.catalogItemLoaded(t),e.get(t.id).forEach(e=>{n.push(new Promise((n,a)=>{e.setRapiItem(t).then(()=>{this._requestRender(),n()},a)}))})}),Promise.all(n).then(()=>this._staticItemsLoaded())})}_staticItemsLoaded(){this._requestRender(),this._staticItemGuard.resolve(),this._roomlePlannerUiCallback.onItemsLoaded()}preload(e){this._planId=e;let t=this._localStorageHelper.getItem(this._planId,"rml_plans");t&&this._loadGLTF(t).then(e=>{this._preloadScene=e,this._preloadScene&&this._scene.add(this._preloadScene),this._requestRender()})}planXMLLoaded(e){this.endPlanConstruction(e);const t=e.getBounds(),n=h(t);this._updateBounds(n),this.loadStaticPlanObjects()}planCompletelyLoaded(e){this._renderEverything()}handlerSwitchedPlans(e){if(this._planViewModel=e,this._planViewModel.setPlannerSceneEventHandler(this._plannerSceneEventHandler),this._planViewModel.setGeometriesMergedListener(()=>{this._renderEverything()}),this._plannerSceneEventHandler.setPlanViewModel(this._planViewModel),this.clearScene(),!this._initData.moc){this._addSky();let e=new THREE.PlaneGeometry(1e3,1e3);e.rotateX(-Math.PI/2);let t=new THREE.MeshStandardMaterial({color:"#f0f0f0",roughness:1,metalness:0}),n=new THREE.Mesh(e,t);n.name="Ground",n.position.y=-.01,n.receiveShadow=!0,this._scene.add(n)}this.resetCamera(),this._setCeiling(),this._staticItemGuard.reset(),this._configurableItemGuard.reset(),Promise.all([this._staticItemGuard.wait(),this._configurableItemGuard.wait()]).then(this._itemsLoaded.bind(this))}_itemsLoaded(){const e=this._planViewModel.getCorePlan();if(this._pixotron){const t=h(e.getBounds());this._pixotron.getShadowPass().setShadowRecieverBBox(t)}this._roomlePlannerUiCallback.onCompletelyLoaded(),this._pixotronUtil&&this._planViewModel.materialQueue.finished(!0).then(()=>{this._pixotronUtil.unLockAdapter()}),this.updateEnvironment(this.getBounds(),!0),this._renderEverything(),c.end("loadingTime")}beginPlanConstruction(e){}addPlanMesh(e,t,n,a,i,s,r){}endPlanConstruction(e){this._renderLoopFunction=()=>{this._scene.add(this._planViewModel.getConstructionGroup()),this._scene.add(this._planViewModel.getCeilingGroup()),this._scene.add(this._planViewModel.getFloorGroup()),this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(this._planViewModel.getBoundingBox()),this._scene.remove(this._preloadScene)}}addPlanObjectToScene(e){if(e){const t=e.getContainer();d(t),this._scene.add(t),this._plannerSceneEventHandler.isDragIn()&&(this._plannerSceneEventHandler.selectPlanElement(e),this._plannerSceneEventHandler.addComponentDragInHandler(e),this._requestRender())}setTimeout(()=>{this._zoomToBounds()},0),this._renderEverything()}removePlanObjectFromScene(e){this._scene.remove(e.getContainer()),e.clear(),this.updateEnvironment(this.getBounds()),this._zoomToBounds(),this._renderEverything()}planElementChanged(e,t){this.updateEnvironment(this.getBounds(),!0),this._renderEverything(),this._onPlanChanged()}exportGLB(e,t){this._scriptLoader.fetch(T,{id:"gltf-exporter"}).then(()=>{let n=new THREE.GLTFExporter;e||(e=[],this._scene.children.forEach(t=>{this._isPartOfScene(t)&&e.push(t)})),n.parse(e,e=>{let n=t||"test";this._localStorageHelper.addItem(n,JSON.stringify(e),"rml_plans")},{binary:!1,embedImages:!0,forceIndices:!0})})}importGLB(e){this._loadGLB(e).then(e=>this._scene.add(e))}clearScene(){this._plannerMeshGenerator.clear(),this._planViewModel.sceneCleared(),super.clearScene()}_addSky(){this._sky=new THREE.Sky,this._sky.name="Sky",this._sky.scale.setScalar(45e4),this._scene.add(this._sky),this._sky.material.uniforms.turbidity.value=10,this._sky.material.uniforms.rayleigh.value=2,this._sky.material.uniforms.luminance.value=1,this._sky.material.uniforms.mieCoefficient.value=.005,this._sky.material.uniforms.mieDirectionalG.value=.8;let e=new THREE.Mesh(new THREE.SphereBufferGeometry(2e4,16,8),new THREE.MeshBasicMaterial({color:16777215}));e.name="Sunsphere",e.position.y=-7e5,e.visible=!1,this._scene.add(e);let t=-.2*Math.PI,n=2*Math.PI*-.25;e.position.x=4e5*Math.cos(n),e.position.y=4e5*Math.sin(n)*Math.sin(t),e.position.z=4e5*Math.sin(n)*Math.cos(t),e.visible=!0,this._sky.material.uniforms.sunPosition.value.copy(e.position),this._lightSetting instanceof te&&this._lightSetting.updateSunPosition(.3,.25)}switchTo2D(){this._cameraControl instanceof U||(this._plannerMeshGenerator.wallMeshes.forEach(e=>_(e.material,!1,!1)),this._renderEverything(),this._changeCameraControl(new U(this._creator_,this._getInputManager())),this._updateCamera(),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("2D"))}switchTo3D(){this._cameraControl instanceof K||(this._renderEverything(),this._changeCameraControl(new K(this._creator_,this._getInputManager(),new THREE.Vector3(0,10,0),this.getPerspectiveOffsetCamera())),this._updateCamera(),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("3D"))}_setCeiling(){this._planViewModel&&(this._cameraControl instanceof z?this._planViewModel.getCeilingGroup().visible=!0:this._planViewModel.getCeilingGroup().visible=!1)}cameraControlChanged(){super.cameraControlChanged(),this._plannerSceneEventHandler&&this._plannerSceneEventHandler.setCamera(this._cameraControl.getCamera())}sceneChanged(){this._plannerSceneEventHandler&&this._plannerSceneEventHandler.setScene(this._scene)}closeHSC(){this._requestRender(),this._cameraControl instanceof K&&this._cameraControl.resetToState()}switchToFirstPerson(){if(this._cameraControl instanceof z)return;this._plannerMeshGenerator.wallMeshes.forEach(e=>_(e.material,!1,!1)),this._renderEverything();let e=new THREE.Vector3(0,0,0);this._planViewModel&&(e=this._planViewModel.getBoundingBox().getCenter(new THREE.Vector3)),this._cameraControl&&this._cameraControl.cleanUp(),this._changeCameraControl(new z(this._creator_,this._getInputManager(),e,this.getPerspectiveOffsetCamera())),this._addCameraControlListener(),this._setCeiling(),this._roomlePlannerUiCallback.onCameraChanged("FP")}_onKeyDown(e){super._onKeyDown(e),this._initData.debug&&this._checkNumKey(e),!e.key||"Meta"!==e.key&&"Control"!==e.key||(this._plannerSceneEventHandler.setSelectionMode("multiselect"),e.preventDefault()),e.key&&e.key.includes("Shift")&&this._cameraControl instanceof K&&(this._cameraControl.enablePanning(),e.preventDefault())}_checkNumKey(e){e.key&&"1"===e.key&&(this.switchTo2D(),e.preventDefault()),e.key&&"2"===e.key&&(this.switchTo3D(),e.preventDefault()),e.key&&"3"===e.key&&(this.switchToFirstPerson(),e.preventDefault())}_onKeyUp(e){super._onKeyDown(e),!e.key||"Meta"!==e.key&&"Control"!==e.key||(this._plannerSceneEventHandler.setSelectionMode("standard"),e.preventDefault()),e.key&&e.key.includes("Shift")&&this._cameraControl instanceof K&&(this._cameraControl.disablePanning(),e.preventDefault())}setMode(e){switch(e){case"2D":this.switchTo2D();break;case"3D":this.switchTo3D();break;case"FP":this.switchToFirstPerson()}}_highlight(e){let t=new Set;e&&e.getObject()&&e.getObject().children&&e.getObject().children.forEach(e=>t.add(e)),this._plannerSceneEventHandler.getSelectedIds().forEach(e=>{const n=this._planViewModel.getPlanObjectForId(e);n&&n.getObject()&&n.getObject().children&&n.getObject().children.forEach(e=>t.add(e))}),this._pixotron&&this._pixotron.highlightObjects(Array.from(t))}destroy(){super.destroy(),this._plannerMeshGenerator.removeMaterialLoadedListener(),this._planViewModel.removeGeometriesMergedListener()}getPixotronParams(){return{saoparams:{intensity:.5,occlusionWorldRadius:.6,smoothTransition:!0,samplesPerFrame:4,bias:.02,numSamples:100,accumulative:!1,falloff:2},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100},outlineparams:{highlightColor:new THREE.Color(this._initData.colors.SELECTION),edgeStrength:1,transparency:.9,edgeThickness:2}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:1024,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.8,darkness:.3,size:1.2,lightDirection:new THREE.Vector3(0,1,0),lightSolidAngle:40,yPosition:.006}}planObjectConfigurationLoaded(e,t,n){if(e&&e.extRef&&t&&t.extRef){let e=t.extRef.jsObject.getPlanObject().getConfigurationRuntimeId();e>0&&this._planViewModel.constructComponents(e)}}addMesh(e,t,n,a,i,s){}_updateBounds(e){e&&(this._updateCamera(e),super._updateBounds(e))}_updateCamera(e){if(e||(e=this.getBounds()),e){if(this._cameraControl instanceof K){const t=e.getSize(new THREE.Vector3),n=Math.max(t.x,t.z),a=this._initData.moc?.5*n*-1:5,i=this._initData.moc?q:70;this._cameraControl.updateAndReset(t,e.getCenter(new THREE.Vector3),-15,i,a,!1)}this._cameraControl instanceof U&&this._cameraControl.updateToBounds(e.getSize(new THREE.Vector3),e.getCenter(new THREE.Vector3))}}_zoomToBounds(){const e=this.getBounds();this._cameraControl instanceof K&&this._cameraControl.zoomToFitBounds(e)}getBounds(){return this._planViewModel?this._planViewModel.getBoundingBox():null}cancelSelection(){this._plannerSceneEventHandler.cancelSelection(),this._highlight(null),this._requestRender()}deleteSelection(){const e=this._plannerSceneEventHandler.getSelectedIds();this.cancelSelection(),e.forEach(e=>{const t=this._planViewModel.getPlanObjectForId(e);t&&t.getObject()&&this._plannerKernelAccess.planInteractionHandler.removeElement(t.getKernelObject())})}rotateSelection(e){const t=new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList,n=new THREE.Box3;this._plannerSceneEventHandler.getSelectedIds().forEach(e=>{const a=this._planViewModel.getPlanObjectForId(e);a&&a.getObject()&&(t.push_back(a.getPlanObject()),n.expandByObject(a.getContainer()))});const a=n.getCenter(new THREE.Vector3),i=this._plannerKernelAccess.planInteractionHandler.groupObjects(t);this._plannerKernelAccess.planInteractionHandler.rotateGroupBy(i,e,s(a))}planBoundsChanged(){this.updateEnvironment(this.getBounds()),this._requestRender()}planElementRemoved(e){this._onPlanChanged(),this._renderEverything()}_onPlanChanged(){this._roomlePlannerUiCallback.onPlanChanged()}prepareTopImage(e={}){return new Promise(t=>{this._planViewModel.materialQueue.finished(!0).then(async()=>{let n=this._calculateBoundingBoxOfAllMeshes(.1);this._lightSetting.removeFromScene();let a=await R(this._scene,null,n,e);this._lightSetting.addToScene(),this._requestRender(),t(a)})})}preparePerspectiveImage(e={}){return new Promise((t,n)=>{this._planViewModel.materialQueue.finished(!0).then(async()=>{let n;n=this._cameraControl instanceof K?this._cameraControl.getCamera().clone():this.getPerspectiveOffsetCamera();let a=this._calculateBoundingBoxOfAllMeshes();this._lightSetting.removeFromScene();const i=await O(this._scene,null,n,a,e);this._lightSetting.addToScene(),this._requestRender(),t(i)},n)})}_calculateBoundingBoxOfAllMeshes(e=0){const t=this.getBounds();return V(t,e)}enableRotation(){this._plannerSceneEventHandler.setState(2)}disableRotation(){this._plannerSceneEventHandler.resetState()}dragIn(e){this._plannerSceneEventHandler.setDragIn(!0,e)}getPlannerSceneEventHandler(){return this._plannerSceneEventHandler}}return a([i],e.prototype,"_plannerKernelAccess",void 0),a([i],e.prototype,"_rapiAccess",void 0),a([i],e.prototype,"_plannerMeshGenerator",void 0),a([i],e.prototype,"_plannerInputManager",void 0),a([i],e.prototype,"_roomlePlannerUiCallback",void 0),a([i],e.prototype,"_localStorageHelper",void 0),e})();const se={left:0,top:1,right:1,bottom:0};let re=(()=>{class e{constructor(e){this._hscInstance=null,this._glbInstance=null,this._creator_=e,this._kernelAccessCallback.addListener(this),this._backstack.init([r.HSP],this)}deleteSelection(){this._sceneManager.deleteSelection()}rotateSelection(e){this._sceneManager.rotateSelection(e)}cancelSelection(){this._sceneManager.cancelSelection()}init(e,t,n){return c.start("loadingTime"),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):(this._preloadPlanId=t,this.setOverrides(n),new Promise(this._initPromiseCallback.bind(this)))}loadPlanXml(e,t){return this.setOverrides(t),new Promise(n=>{this._plan=this._planInteractionHandler.loadPlanXML(e),this._sceneManager.planXMLLoaded(this._plan),this._roomlePlannerUiCallback.onTotalFloorAreaChanged(this._planInteractionHandler.getPlan().getTotalFloorArea()),this._backstack.bringIntoForeground(r.HSP),this._initData.moc&&(t.id?this._rapiAccess.trackView(t.id):this._rapiAccess.trackView("planXML")),n()})}loadPlan(e,t){return this.setOverrides(t),new Promise((t,n)=>{this._rapiAccess.getPlan(e).then(n=>{this._plan=this._planInteractionHandler.loadPlanXML(n.planObjects),this._sceneManager.planXMLLoaded(this._plan),this._roomlePlannerUiCallback.onTotalFloorAreaChanged(this._planInteractionHandler.getPlan().getTotalFloorArea()),this._backstack.bringIntoForeground(r.HSP),this._initData.moc&&this._rapiAccess.trackView(e),t()},n)})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}switch2D(){this._sceneManager.switchTo2D()}switch3D(){this._sceneManager.switchTo3D()}switchToFirstPerson(){this._sceneManager.switchToFirstPerson()}exportGLB(){this._sceneManager.exportGLB()}importGLB(e){this._sceneManager.importGLB(e)}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(g,{id:"gltf-loader"}),n=this._scriptLoader.fetch(m,{id:"draco-loader"}),a=this._scriptLoader.fetch(W,{id:"tween-js"}),i=this._scriptLoader.fetch("static/Sky-6621935ea8a523af.js",{id:"sky-js"});Promise.all([t,n,a,i]).then(()=>{this._kernelReadyCallback=e;const{dls:t,ls:n,mode:a,stats:i}=this._initData;this._sceneManager||(this._sceneManager=new ie(this._creator_,se,this,a)),this._preloadPlanId&&this._sceneManager.preload(this._preloadPlanId);const s=u.createDynamicLightSettingSource(t,n);i&&this.showStats(),this.enableHD(s),this._planInteractionHandler&&this._kernelReadyCallback()})})}enableHD(e){return new Promise((t,n)=>{const a=()=>{this._sceneManager.enableHD(e),t()};this._threeLoader.fetch().then(()=>Promise.all(N.map(e=>this._scriptLoader.fetch(e,{id:e})))).then(()=>{this._scriptLoader.fetch(X,{id:"pi-js"}).then(a,n)},n)})}isReady(){this._planInteractionHandler=this._plannerKernelAccess.planInteractionHandler,this._kernelReadyCallback&&this._kernelReadyCallback()}showBenchmarks(){c.showBenchmarks()}async switchToConfigurator(){const e=await this._singlePromiseFactory.create(3,"startHSC",e=>{if(this._hscInstance)return e(this._hscInstance);t.import("./configurator-a458b70f.nomodule.js").then((function(e){return e.c})).then(({Configurator:t})=>{const n=new t(this._creator_);n.boot({kernelInstance:this._planInteractionHandler.getConfiguratorKernel(),kernelContainer:this._plannerKernelAccess.kernelContainer}),n.getApi().setOverrides(this._initData),n.getApi().init(this._domHelper.element).then(()=>{this._hscInstance=n,e(this._hscInstance)})})});return this._backstack.bringIntoForeground(r.HSC),this.cancelSelection(),e}async switchToViewer(){const e=await this._singlePromiseFactory.create(4,"startGLB",e=>{if(this._glbInstance)return e(this._glbInstance);t.import("./glb-viewer-81899272.nomodule.js").then(t=>{const n=new t.GlbViewer(this._creator_);n.boot(),n.getApi().setOverrides(this._initData),n.getApi().init(this._domHelper.element).then(()=>{this._glbInstance=n,e(this._glbInstance)})})});return this._backstack.bringIntoForeground(r.GLB),this.cancelSelection(),e}switchToPlanner(e){e&&this.loadPlan(e),this._backstack.bringIntoForeground(r.HSP)}updateSize(){this._sceneManager.updateCamera()}getMain(){}update(){this.updateSize(),this._glbInstance&&this._glbInstance.getApi().updateSize(),this._hscInstance&&this._hscInstance.getApi().updateSize()}get callbacks(){return this._roomlePlannerUiCallback}set callbacks(e){this._roomlePlannerUiCallback=e}showStats(){this._sceneManager.showStats()}onBackStackChanged(e){this._roomlePlannerUiCallback.onBackStackChanged(e)}onCloseHSC(){this._sceneManager.closeHSC(),this._hscInstance&&this._hscInstance.getApi().pauseKernelCallbacks()}back(){if(this._backstack.current()===r.GLB&&this._glbInstance&&this._glbInstance.getApi().clearScene(),this._backstack.current()===r.HSC&&this._hscInstance){const e=this._hscInstance.getApi();e.cancelSelection(),e.cancelDockings(),e.hideDimensions(),e.disableMultiselect(),this._sceneManager.updateScene()}this._backstack.back()}backTo(e){this._backstack.backTo(e)}getConfigurator(){return this._hscInstance}getCurrentSkin(){return this._rapiAccess.getCurrentSkin()}getRuntimeComponentIdOfRootComponent(e){return e?this._plannerKernelAccess.planInteractionHandler?this._plannerKernelAccess.planInteractionHandler.getConfiguratorKernel().getRootPlanComponentIdFromObjectId(e):(console.warn("Can not retrieve runtime id without planInteractionHandler"),0):(console.warn("Can not retrieve runtime id without planObjectId"),0)}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}syncCatalog(e){return this._dataSyncer.syncCatalog(e)}loadError(e){}getPlanInteractionHandler(){return Promise.resolve(this._planInteractionHandler)}getPlanModelViewHelper(){return Promise.resolve(this._plannerKernelAccess.planModelViewHelper)}async insertObject(e,t,n){if(!this._planInteractionHandler)throw new Error("no plan interaction handler");t&&(t=s(new THREE.Vector3(t.x,t.y,t.z)));const a=await(p(e)?this._rapiAccess.getItem(e):this._rapiAccess.getConfiguration(e)),i=await this._plannerKernelAccess.addPlanObjectFromItem(a,t,n);return this._sceneManager.updateScene(),i}async insertItemList(e){const t=e.map(e=>p(e)?this._rapiAccess.getItem(e):this._rapiAccess.getConfiguration(e)),n=await Promise.all(t);await this._plannerKernelAccess.insertItems(n)}async insertItems(e){await this._plannerKernelAccess.insertItems(e)}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getCameraOffset(){return this._sceneManager.getCameraOffset()}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}async getObjects(){const e=(await this.getPlanModelViewHelper()).getPlanOverview(this._plan);let t=[];const n=[],a=[],i=w(e.objects);await Promise.all(i.map(async e=>{const i=w(e);if(i.catalogItemId?n.push(i.catalogItemId):i.configurationHash&&a.push(i.configurationHash),i.parts){const e=i.configurationHash||i.catalogItemId,t=await this._plannerKernelAccess.addUiDataAndPriceToPartList(i.parts,e);i.parts=t}i.data=null,t.push(i)}));const[s,r]=await Promise.all([this._rapiAccess.getItems(n),this._rapiAccess.getConfigurations(a)]),o=[],l=new Map;for(const e of s)l.set(e.id,e);for(const e of r)l.set(e.id,e),o.push(e.rootComponentId);const h=await this._rapiAccess.getComponents(o),c=new Map;for(const e of h)c.set(e.id,e);for(const e of t){const t=e.catalogItemId||e.configurationHash,n=l.get(t)||null;if(n&&!n.label&&c.has(n.rootComponentId)){const e=c.get(n.rootComponentId);n.label=e.label}n&&!n.label&&(n.label=t),e.data=n}return t}async getPlanOverview(){const e=(await this.getPlanModelViewHelper()).getPlanOverview(this._plan);return w(e)}prepareTopImage(e={}){return this._sceneManager.prepareTopImage(e)}preparePerspectiveImage(e={}){return this._sceneManager.preparePerspectiveImage(e)}enableRotation(){this._sceneManager.enableRotation()}disableRotation(){this._sceneManager.disableRotation()}async dragInObject(e,t){this._sceneManager.dragIn(t);const n=await this._rapiAccess.getItem(e);this.insertItems([n])}enableSnapping(){this._planInteractionHandler.reactivateAllSnappingActivity()}disableSnapping(){this._planInteractionHandler.deactivateAllSnappingActivity()}async getPartlistOf(e){const t=this._plannerKernelAccess.kernelInstance.getHashOfConfiguration(e);if(!t){const e="Object has no partlist because it is not a configuration: "+t;return console.warn(e),Promise.reject(e)}const n=this._plannerKernelAccess.kernelInstance.getPartList(e);return await this._plannerKernelAccess.addUiDataAndPriceToPartList(n,t)}formatValueToUnitString(e,t){return this._unitFormatter.formatValueToUnitString(e,t)}drawWalls(e,t={}){var n,a;const i=this._planInteractionHandler;i.startInteraction();const s=[];for(const t of e){const e=i.addNode(t.from),r=i.addNode(t.to),o=i.addWall(e,r);void 0!==(null===(n=t.props)||void 0===n?void 0:n.height)&&i.setWallHeight(o,t.props.height),void 0!==(null===(a=t.props)||void 0===a?void 0:a.thickness)&&i.setWallThickness(o,t.props.thickness),s.push(o)}return t.keepInteractionOpen||i.endInteraction(),s}removeElements(e,t={}){const n=this._planInteractionHandler;n.startInteraction();for(const t of e)this._planInteractionHandler.removeElement(t);t.keepInteractionOpen||n.endInteraction()}}return a([i],e.prototype,"_domHelper",void 0),a([i],e.prototype,"_scriptLoader",void 0),a([i],e.prototype,"_kernelAccessCallback",void 0),a([i],e.prototype,"_plannerKernelAccess",void 0),a([i],e.prototype,"_rapiAccess",void 0),a([i],e.prototype,"_singlePromiseFactory",void 0),a([i],e.prototype,"_roomlePlannerUiCallback",void 0),a([i],e.prototype,"_lifeCycleManager",void 0),a([i],e.prototype,"_backstack",void 0),a([i],e.prototype,"_threeLoader",void 0),a([i],e.prototype,"_dataSyncer",void 0),a([i],e.prototype,"_initData",void 0),a([i],e.prototype,"_globalInitData",void 0),a([i],e.prototype,"_unitFormatter",void 0),e})(),oe=(()=>{class e{constructor(e){this._initialStack=[],this._creator_=e,this._lifeCycleManager.addEventListener(this)}_setInitialStack(e){this._initialStack=[...e]}_setCallbacks(e){this._callbacks=e}_resetCanvasStack(){this._canvasStack=[...this._initialStack]}init(e,t){this._setInitialStack(e),this._resetCanvasStack(),this._setCallbacks(t)}bringIntoForeground(e){const t=this._domHelper.element.querySelectorAll("canvas");let n=!1;t.forEach(t=>{if(t.classList.contains(e)){if(!t.classList.contains("foreground")){const t=this.current();t&&e!==t&&(this._canvasStack.push(e),n=!0),t||(n=!0)}t.classList.remove("background"),t.classList.add("foreground")}else t.classList.remove("foreground"),t.classList.add("background")}),n&&this._callbacks.onBackStackChanged(this._canvasStack)}current(){return this._canvasStack[this._canvasStack.length-1]}back(){if(1===this._canvasStack.length)return;let e=this._canvasStack.pop();this.bringIntoForeground(this.current()),e===r.HSC&&this._callbacks.onCloseHSC(),this._callbacks.onBackStackChanged(this._canvasStack)}backTo(e){if(1!==this._canvasStack.length&&this.current()!==e)for(;this._canvasStack.length>0;){let t=this.current();if(t===e){this.bringIntoForeground(t);break}t===r.HSC&&this._callbacks.onCloseHSC(),this._canvasStack.pop(),this._callbacks.onBackStackChanged(this._canvasStack)}}pause(){this._resetCanvasStack()}resume(){}destroy(){}}return a([i],e.prototype,"_domHelper",void 0),a([i],e.prototype,"_lifeCycleManager",void 0),e})();class le{constructor(e){const{planElementViewModel:t}=e;this.planElementViewModel=t}}const he=[new v("script-loader",Y),new v("planner-input-manager",class extends Q{_canDrag(e){return!0}},1),new v("planner-kernel-access",A),new v("logger",E),new v("planner-mesh-generator",class extends ${constructor(e){super(e),this._wallMeshes=[],this._defaultMaterial=new THREE.MeshStandardMaterial({color:"#ffffff",roughness:1,metalness:0,opacity:1,envMap:null}),this._environmentLoader.setEnvMap(this._defaultMaterial)}generateGeometry(e=null,t,n,a,i,s=!1){let r;return r=s?this._generateGeometry(e,t,n,a,i).clone():this._generateGeometry(e,t,n,a,i),r}generateMesh(e=null,t,n,a,i,s,r,o=!1){const l=this.generateGeometry(e,n,a,i,s,o),h=new THREE.Mesh(l,this._previewMaterial);return h.layers.set(3),!t&&r&&7!==r.value?(console.warn("material is undefined"),h):(this.setMaterial(h,t,r).then(()=>{const e=r&&3===r.value;h.castShadow=!e}),this._checkWallMaterial(h,r),h)}async setMaterial(e,t,n){if(e.userData.material=S(t,n),e.userData.materialId=t,P(t))t?await this._assignMaterial(e,t):(console.warn("Used default material because material is empty"),this.changeMaterialOfMesh(e,this._defaultMaterial));else{if(!t)return void this.changeMaterialOfMesh(e,this._defaultMaterial);2===(t=t).getSourceType().value?await this._assignMaterial(e,t.materialId):1===t.getSourceType().value?await this._assignItem(e,t.catalogItemId):3===t.getSourceType().value?await this._assignRGB(e,t.rgbValue):0===t.getSourceType().value?this.changeMaterialOfMesh(e,this._defaultMaterial):(this.changeMaterialOfMesh(e,this._defaultMaterial),1!==n.value&&7!==n.value&&3!==n.value&&console.warn("Used default material because material is not supported",t))}}set maxAnisotropy(e){this._maxAnisotropy=e}_checkWallMaterial(e,t){t&&1===t.value&&(e.renderOrder=5,this._wallMeshes.push(e))}clear(){super.clear(),this.clearWallMeshes()}clearWallMeshes(){this._wallMeshes.forEach(e=>{f(e)}),this._wallMeshes=[]}get wallMeshes(){return this._wallMeshes}}),new v("rapi-access",M),new v("roomle-planner-ui-callback",class extends C{constructor(e){super(e),this.onItemsLoaded=()=>{},this.onBackStackChanged=e=>{},this.onCameraChanged=e=>{},this.onTotalFloorAreaChanged=e=>{},this.onPlanInteractionHandlerCreated=e=>{},this.onPlannerKernelIsReady=e=>{},this.onConfiguratorKernelIsReady=(e,t)=>{},this.onSelectionChange=(e,t,n,a)=>{},this.onSelectionCancel=()=>{},this.onPlanChanged=()=>{},this.onCompletelyLoaded=()=>{},this.onRotationCancel=()=>{},this.onHistoryChange=(e,t)=>{}}}),new v("configurator-ui-callbacks",B,1),new v("backstack",oe),new v("planner-selection-handler",class extends J{constructor(){super(...arguments),this._selectionMode="standard",this._selectedPlanElementViewModels=new Map}check(e){"standard"===this._selectionMode&&this._checkStandard(e),"multiselect"===this._selectionMode&&this._checkMulti(e)}cancelSelection(){0!==this._selectedPlanElementViewModels.size&&this._selectedPlanElementViewModels.forEach((e,t)=>{this._selectedPlanElementViewModels.delete(t),this.dispatchEvent(1,new le({planElementViewModel:e}))})}_checkStandard(e){if(this._selectedPlanElementViewModels.has(e.getId()))return this._selectedPlanElementViewModels.delete(e.getId()),void this.dispatchEvent(1,new le({planElementViewModel:e}));this._selectedPlanElementViewModels.size>0&&this._selectedPlanElementViewModels.forEach((e,t)=>{this._selectedPlanElementViewModels.delete(t),this.dispatchEvent(1,new le({planElementViewModel:e}))}),this._selectedPlanElementViewModels.set(e.getId(),e),this.dispatchEvent(0,new le({planElementViewModel:e}))}_checkMulti(e){if(this._selectedPlanElementViewModels.has(e.getId()))return this._selectedPlanElementViewModels.delete(e.getId()),void this.dispatchEvent(1,new le({planElementViewModel:e}));this._selectedPlanElementViewModels.set(e.getId(),e),this.dispatchEvent(0,new le({planElementViewModel:e}))}setSelectionMode(e){this._selectionMode=e}getSelectionMode(){return this._selectionMode}hasSelection(){return this._selectedPlanElementViewModels.size>0}getSelectedIds(){let e=[];return this._selectedPlanElementViewModels.forEach(t=>e.push(t.getId())),e}isSelected(e){return!!this._selectedPlanElementViewModels.get(e)}})];e("Planner",class extends Z{setupGlobals(){}setupDependencies(){b.setup(he),this.lookup("logger",this._context),this.lookup("planner-kernel-access",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._planner=new re(this._context),this._planner.getMain=()=>this,window.RoomlePlanner||(window.RoomlePlanner=this._planner)}getApi(){return this._planner}getContextName(){return"planner"}})}}}));
2
- //# sourceMappingURL=planner-f1be5140.nomodule.js.map
@@ -1,2 +0,0 @@
1
- import"./query-params-helper-a271f9dc.js";import"./rapi-access-e93cfc64.js";import"./main-thread-to-worker-9d399850.js";import"./image-renderer-53f05110.js";import{Planner}from"./planner-e87a1d4d.js";import"./pixotron-77031317.js";import"./mesh-generator-0bca3ff9.js";import"./default-light-setting-f14ab23f.js";(new Planner).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let a=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-a))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)});
2
- //# sourceMappingURL=planner-main-559f37ca.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"planner-main-559f37ca.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"roomle-sdk-f67726b1.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["0"],"names":["_scriptDir","ConfiguratorKernel","document","currentScript","src","undefined","k","aa","ba","ready","Promise","a","b","ca","Object","assign","da","ea","q","indexOf","substr","replace","lastIndexOf","fa","print","console","log","bind","r","printErr","warn","thisProgram","quit","ha","t","wasmBinary","noExitRuntime","WebAssembly","ia","ja","ka","la","TextDecoder","ma","c","d","subarray","decode","e","f","String","fromCharCode","h","na","length","charCodeAt","oa","xa","B","u","x","ra","A","D","ya","za","pa","qa","sa","ta","ua","va","wa","Aa","buffer","HEAP8","Int8Array","HEAP16","Int16Array","HEAP32","Int32Array","HEAPU8","Uint8Array","HEAPU16","Uint16Array","HEAPU32","Uint32Array","HEAPF32","Float32Array","HEAPF64","Float64Array","Ba","Ca","Da","Ea","Fa","Ga","preRun","shift","unshift","F","E","Ha","Ia","onAbort","RuntimeError","Ja","startsWith","preloadedImages","preloadedAudios","Ka","locateFile","La","Na","kd","zc","G","get","H","this","Gc","Tb","xc","mc","dc","Rc","fc","Ec","Qc","tc","Ic","cc","yc","$c","Oa","Ac","J","ic","Kc","Pa","jc","Qa","K","Ra","Sa","Ta","L","Ua","pop","push","Va","Wa","Xa","fromWireType","Ya","Za","$a","ab","bb","Function","cb","Error","name","message","stack","toString","prototype","create","constructor","db","eb","M","g","m","N","forEach","Array","hasOwnProperty","fb","TypeError","gb","O","hb","P","Vc","ib","Sb","Vb","Ub","jb","kb","lb","count","value","Xb","$b","bc","nb","ob","pb","hc","qb","rb","tb","ub","FinalizationRegistry","unregister","register","Q","vb","Wb","arguments","apply","qc","wb","md","xb","kc","ac","Oc","pc","Mc","Yc","yb","zb","Bc","Ab","Bb","sc","Cc","rc","dd","clone","Zc","R","Cb","S","n","p","Xc","Jc","toWireType","Zb","Db","U","includes","concat","call","Eb","Fb","Gb","Hb","Ib","map","join","Jb","Kb","Lb","w","split","Mb","V","Nb","Dc","W","Ob","Pb","Qb","Rb","Yb","globalThis","USER","LOGNAME","PATH","PWD","HOME","LANG","navigator","languages","_","ec","gc","Date","getTime","getMonth","getFullYear","getDate","setDate","setMonth","setFullYear","InternalError","nc","oc","BindingError","isAliasOf","getPrototypeOf","isDeleted","deleteLater","getInheritedInstanceCount","keys","getLiveInheritedInstances","flushPendingDeletes","setDelayFunction","Pc","Fc","argPackAdvance","readValueFromPointer","deleteObject","sb","Lc","pointerType","mb","UnboundTypeError","count_emval_handles","get_first_emval","Ed","X","slice","o","Hc","Uc","bd","Sc","y","Tc","l","v","ad","z","cd","Nc","read","C","write","I","T","splice","Symbol","substring","className","_a","Z","values","Y","ArrayBuffer","Uint8ClampedArray","s","Wc","ga","Math","min","max","grow","byteLength","ld","jd","$","i","Hd","Fd","Ma","j","Gd","Id","getDay","wc","gd","fd","uc","lc","vc","nd","ed","hd","%c","%D","%F","%h","%r","%R","%T","%x","%X","%Ec","%EC","%Ex","%EX","%Ey","%EY","%Od","%Oe","%OH","%OI","%Om","%OM","%OS","%Ou","%OU","%OV","%Ow","%OW","%Oy","RegExp","%a","%A","%b","%B","%C","%d","%e","%g","%G","%H","%I","%j","%m","%M","%n","%p","%S","%t","%u","%U","ceil","%V","%w","%W","%y","%Y","%z","abs","%Z","%%","set","asm","exports","monitorRunDependencies","clearInterval","instance","fetch","resolve","then","credentials","ok","arrayBuffer","catch","instantiate","instantiateWasm","instantiateStreaming","___wasm_call_ctors","_free","_malloc","_main","___getTypeName","___embind_register_native_and_builtin_types","Jd","_setThrew","stackSave","stackRestore","___cxa_can_catch","___cxa_is_pointer_type","dynCall_jii","dynCall_viiiji","dynCall_iij","dynCall_vij","Kd","status","Md","calledRun","onRuntimeInitialized","Nd","onExit","postRun","setStatus","setTimeout","dynCall_viijii","dynCall_jiji","dynCall_iiiiij","dynCall_iiiiijj","dynCall_iiiiiijj","Ld","run","preInit","noInitialRun","module","define"],"mappings":"AACA,IACMA,WADFC,oBACED,WAAiC,oBAAbE,UAA4BA,SAASC,cAAgBD,SAASC,cAAcC,SAAMC,EAEnG,SACAJ,GAIT,IAAIK,EAAiFC,EAAGC,EAHtFP,EAAqBA,GAAsB,GAGvCK,IAAIA,OAAgC,IAAvBL,EAAqCA,EAAqB,IAAcK,EAAEG,MAAM,IAAIC,SAAQ,SAASC,EAAEC,GAAGL,EAAGI,EAAEH,EAAGI,KAAI,IAAIC,EAAGC,OAAOC,OAAO,GAAGT,GAAGU,EAAG,iBAAiBC,EAAG,CAACN,EAAEC,KAAK,MAAMA,GAAIM,EAAE,GAAG,oBAAoBhB,UAAUA,SAASC,gBAAgBe,EAAEhB,SAASC,cAAcC,KAAKJ,aAAakB,EAAElB,YAAmCkB,EAAvB,IAAIA,EAAEC,QAAQ,SAAWD,EAAEE,OAAO,EAAEF,EAAEG,QAAQ,SAAS,IAAIC,YAAY,KAAK,GAAK,GAAG,IAAIC,EAAGjB,EAAEkB,OAAOC,QAAQC,IAAIC,KAAKF,SAASG,EAAEtB,EAAEuB,UAAUJ,QAAQK,KAAKH,KAAKF,SAASX,OAAOC,OAAOT,EAAEO,GACzfA,EAAG,KAAKP,EAAEyB,cAAcf,EAAGV,EAAEyB,aAAazB,EAAE0B,OAAOf,EAAGX,EAAE0B,MAAM,IAAQC,EAAJC,EAAE,EAAK5B,EAAE6B,aAAaF,EAAG3B,EAAE6B,YAAY,IAAIC,EAAc9B,EAAE8B,gBAAe,EAAG,iBAAiBC,aAAaC,EAAG,mCAAmC,IAAIC,EAAGC,GAAG,EAAGC,EAAG,o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