@realsee/dnalogel 2.0.0-alpha.4 → 2.0.0-alpha.40

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 (643) hide show
  1. package/README.md +93 -4
  2. package/components/index.js +1450 -0
  3. package/dist/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  4. package/dist/CSS3DRenderPlugin/index.d.ts +4 -0
  5. package/dist/CSS3DRenderPlugin/index.js +234 -0
  6. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  7. package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  8. package/dist/CameraMovementPlugin/index.d.ts +5 -0
  9. package/dist/CameraMovementPlugin/index.js +302 -0
  10. package/dist/CameraMovementPlugin/typing.d.ts +68 -0
  11. package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
  12. package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
  13. package/dist/ItemLabelPlugin/index.d.ts +9 -0
  14. package/dist/ItemLabelPlugin/index.js +943 -0
  15. package/dist/ItemLabelPlugin/typings.d.ts +63 -0
  16. package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  17. package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  18. package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  19. package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  20. package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  21. package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  22. package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
  23. package/dist/ModelChassisCompassPlugin/index.js +145 -0
  24. package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  25. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
  26. package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
  27. package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  28. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  29. package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
  30. package/dist/ModelItemLabelPlugin/index.js +654 -0
  31. package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
  32. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  33. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  34. package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  35. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  36. package/dist/ModelRoomLabelPlugin/index.js +541 -0
  37. package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
  38. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  39. package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  40. package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
  41. package/dist/ModelTVVideoPlugin/index.js +301 -0
  42. package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
  43. package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  44. package/dist/ModelViewPlugin/Plugin.d.ts +17 -0
  45. package/dist/ModelViewPlugin/index.d.ts +4 -0
  46. package/dist/ModelViewPlugin/index.js +186 -0
  47. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  48. package/dist/PanoCompassPlugin/Plugin.d.ts +47 -0
  49. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  50. package/dist/PanoCompassPlugin/index.d.ts +8 -0
  51. package/dist/PanoCompassPlugin/index.js +636 -0
  52. package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  53. package/dist/PanoCursorRaycasterPlugin/index.js +90 -0
  54. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  55. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  56. package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  57. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  58. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  59. package/dist/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  60. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  61. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  62. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  63. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  64. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  65. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  66. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  67. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  68. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  69. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  70. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  71. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  72. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  73. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  74. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  75. package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  76. package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  77. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  78. package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  79. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  80. package/dist/PanoMeasurePlugin/index.d.ts +10 -0
  81. package/dist/PanoMeasurePlugin/index.js +3963 -0
  82. package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
  83. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  84. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  85. package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  86. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  87. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  88. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  89. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  90. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  91. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  92. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  93. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  94. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  95. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  96. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  97. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  98. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  99. package/dist/PanoRulerPlugin/Plugin.d.ts +31 -0
  100. package/dist/PanoRulerPlugin/index.d.ts +5 -0
  101. package/dist/PanoRulerPlugin/index.js +610 -0
  102. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  103. package/dist/PanoRulerPlugin/typings.d.ts +21 -0
  104. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  105. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  106. package/dist/PanoRulerProPlugin/index.js +1006 -0
  107. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  108. package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  109. package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
  110. package/dist/PanoSpatialTagPlugin/index.js +1307 -0
  111. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  112. package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
  113. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  114. package/dist/base/BasePlugin.d.ts +100 -0
  115. package/dist/base/BasePluginWithData.d.ts +34 -0
  116. package/dist/components/PaintBrush/Controller.d.ts +43 -0
  117. package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
  118. package/dist/components/PaintBrush/index.d.ts +27 -0
  119. package/dist/components/PaintBrush/style.d.ts +2 -0
  120. package/dist/components/PaintBrush/tween.d.ts +62 -0
  121. package/dist/components/PaintBrush/typings.d.ts +58 -0
  122. package/dist/components/PaintBrush/utils.d.ts +26 -0
  123. package/dist/components/index.d.ts +2 -0
  124. package/dist/floorplan/Assets/camera.d.ts +1 -0
  125. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/Assets/compass.d.ts +0 -0
  126. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  127. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +98 -0
  128. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
  129. package/dist/floorplan/ModelFloorplanPlugin/index.js +4533 -0
  130. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  131. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
  132. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
  133. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +2008 -0
  134. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  135. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +67 -0
  136. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
  137. package/dist/floorplan/TopviewFloorplanPlugin/index.js +4236 -0
  138. package/dist/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  139. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  140. package/dist/floorplan/constant.d.ts +5 -0
  141. package/dist/floorplan/index.d.ts +6 -0
  142. package/dist/floorplan/typings/floorplanData.d.ts +137 -0
  143. package/dist/floorplan/typings/floorplanServerData.d.ts +131 -0
  144. package/dist/floorplan/typings/utility.d.ts +2 -0
  145. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
  146. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
  147. package/dist/floorplan/utils/formatData.d.ts +5 -0
  148. package/dist/floorplan/utils/formatPosition.d.ts +36 -0
  149. package/dist/index.d.ts +17 -0
  150. package/dist/index.es.js +16212 -0
  151. package/dist/index.js +16266 -0
  152. package/dist/index.umd.js +16258 -0
  153. package/dist/shared-utils/Preloader.d.ts +6 -0
  154. package/dist/shared-utils/Subscribe.d.ts +45 -0
  155. package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  156. package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  157. package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
  158. package/dist/shared-utils/animationFrame/index.d.ts +15 -0
  159. package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
  160. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  161. package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
  162. package/dist/shared-utils/createLine/index.d.ts +3 -0
  163. package/dist/shared-utils/debounce.d.ts +6 -0
  164. package/dist/shared-utils/equal.d.ts +11 -0
  165. package/dist/shared-utils/filter.d.ts +27 -0
  166. package/dist/shared-utils/five/changeMode.d.ts +5 -0
  167. package/dist/shared-utils/formatRad.d.ts +7 -0
  168. package/dist/shared-utils/getPxmm.d.ts +19 -0
  169. package/dist/shared-utils/getRandomColor.d.ts +1 -0
  170. package/dist/shared-utils/index.d.ts +1 -0
  171. package/dist/shared-utils/isNil.d.ts +10 -0
  172. package/dist/shared-utils/isTruelyObject.d.ts +18 -0
  173. package/dist/shared-utils/logger.d.ts +16 -0
  174. package/dist/shared-utils/math/Interval.d.ts +13 -0
  175. package/dist/shared-utils/math/Rectangle.d.ts +27 -0
  176. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  177. package/dist/shared-utils/math/index.d.ts +2 -0
  178. package/dist/shared-utils/math/planimetry.d.ts +116 -0
  179. package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
  180. package/dist/shared-utils/nearlyEqual.d.ts +7 -0
  181. package/dist/shared-utils/nextFrame.d.ts +1 -0
  182. package/dist/shared-utils/noop.d.ts +5 -0
  183. package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  184. package/dist/shared-utils/px2rem.d.ts +1 -0
  185. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  186. package/dist/shared-utils/tap.d.ts +8 -0
  187. package/dist/shared-utils/three/centerPoint.d.ts +2 -0
  188. package/dist/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  189. package/dist/shared-utils/three/getNormal.d.ts +2 -0
  190. package/dist/shared-utils/three/getTextureLoader.d.ts +6 -0
  191. package/dist/shared-utils/three/loadFbxObj.d.ts +2 -0
  192. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  193. package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  194. package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  195. package/dist/shared-utils/throttle.d.ts +7 -0
  196. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  197. package/dist/shared-utils/to.d.ts +8 -0
  198. package/dist/shared-utils/uuid.d.ts +5 -0
  199. package/dist/shared-utils/vectorTocoordinates.d.ts +7 -0
  200. package/dist/typings/math.type.d.ts +44 -0
  201. package/dist/typings/utils.type.d.ts +2 -0
  202. package/docs/.nojekyll +1 -0
  203. package/docs/assets/highlight.css +78 -0
  204. package/docs/assets/icons.css +1043 -0
  205. package/docs/assets/icons.png +0 -0
  206. package/docs/assets/icons@2x.png +0 -0
  207. package/docs/assets/main.js +52 -0
  208. package/docs/assets/search.js +1 -0
  209. package/docs/assets/style.css +1413 -0
  210. package/docs/assets/widgets.png +0 -0
  211. package/docs/assets/widgets@2x.png +0 -0
  212. package/docs/classes/Magnifier.html +9 -0
  213. package/docs/classes/ModelRoomLabelController.html +17 -0
  214. package/docs/enums/CameraMovementEffect.html +3 -0
  215. package/docs/enums/DIRECTION.html +1 -0
  216. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -0
  217. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  218. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
  219. package/docs/enums/Rotation.html +3 -0
  220. package/docs/index.html +88 -0
  221. package/docs/interfaces/CSS3DRenderPluginExportType.html +4 -0
  222. package/docs/interfaces/CameraMovementPluginExportType.html +17 -0
  223. package/docs/interfaces/FloorplanBounding.html +10 -0
  224. package/docs/interfaces/FloorplanData.html +3 -0
  225. package/docs/interfaces/FloorplanEntrance.html +15 -0
  226. package/docs/interfaces/FloorplanExtraObject.html +7 -0
  227. package/docs/interfaces/FloorplanExtraObject3D.html +3 -0
  228. package/docs/interfaces/FloorplanFloorData.html +3 -0
  229. package/docs/interfaces/FloorplanImagePosition.html +3 -0
  230. package/docs/interfaces/FloorplanObserver.html +5 -0
  231. package/docs/interfaces/FloorplanOutlineItem.html +3 -0
  232. package/docs/interfaces/FloorplanPosition.html +3 -0
  233. package/docs/interfaces/FloorplanRoomItem.html +17 -0
  234. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -0
  235. package/docs/interfaces/FloorplanServerBounding.html +10 -0
  236. package/docs/interfaces/FloorplanServerComputedData.html +1 -0
  237. package/docs/interfaces/FloorplanServerData.html +3 -0
  238. package/docs/interfaces/FloorplanServerEntrance.html +15 -0
  239. package/docs/interfaces/FloorplanServerFloorData.html +3 -0
  240. package/docs/interfaces/FloorplanServerImagePosition.html +3 -0
  241. package/docs/interfaces/FloorplanServerObserver.html +5 -0
  242. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -0
  243. package/docs/interfaces/FloorplanServerPosition.html +3 -0
  244. package/docs/interfaces/FloorplanServerRoomItem.html +20 -0
  245. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -0
  246. package/docs/interfaces/ItemLabelPluginData.html +1 -0
  247. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
  248. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
  249. package/docs/interfaces/LineJson.html +1 -0
  250. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  251. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  252. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  253. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  254. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  255. package/docs/interfaces/ModelItemLabelPluginData.html +1 -0
  256. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -0
  257. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -0
  258. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  259. package/docs/interfaces/ModelTVVideoPluginData.html +1 -0
  260. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -0
  261. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -0
  262. package/docs/interfaces/ModelViewPluginExportType.html +1 -0
  263. package/docs/interfaces/OpenParameter.html +3 -0
  264. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  265. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  266. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  267. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -0
  268. package/docs/interfaces/PanoMeasureParameterType.html +1 -0
  269. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  270. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  271. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  272. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  273. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  274. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  275. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  276. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -0
  277. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -0
  278. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  279. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -0
  280. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  281. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -0
  282. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  283. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -0
  284. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -0
  285. package/docs/interfaces/Point.html +1 -0
  286. package/docs/interfaces/PointJson.html +1 -0
  287. package/docs/interfaces/Room.html +1 -0
  288. package/docs/interfaces/RoomInfo.html +1 -0
  289. package/docs/interfaces/RoomLabel.html +13 -0
  290. package/docs/interfaces/RoomRules.html +1 -0
  291. package/docs/interfaces/Rooms.html +1 -0
  292. package/docs/modules.html +36 -0
  293. package/libs/CSS3DRenderPlugin/Plugin.d.ts +49 -0
  294. package/libs/CSS3DRenderPlugin/Plugin.js +182 -0
  295. package/libs/CSS3DRenderPlugin/index.d.ts +3 -48
  296. package/libs/CSS3DRenderPlugin/index.js +2 -180
  297. package/libs/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  298. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +159 -0
  299. package/libs/CameraMovementPlugin/index.d.ts +4 -6
  300. package/libs/CameraMovementPlugin/index.js +3 -158
  301. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  302. package/libs/ItemLabelPlugin/ItemLabelComponent.js +568 -0
  303. package/libs/ItemLabelPlugin/ItemLabelItem.js +227 -0
  304. package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
  305. package/libs/ItemLabelPlugin/Plugin.js +126 -0
  306. package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
  307. package/libs/{floorplan/ModelFloorplanPlugin/typings → ItemLabelPlugin}/events.type.js +0 -0
  308. package/libs/ItemLabelPlugin/index.d.ts +9 -0
  309. package/libs/ItemLabelPlugin/index.js +8 -0
  310. package/libs/ItemLabelPlugin/typings.d.ts +63 -0
  311. package/libs/ItemLabelPlugin/typings.js +7 -0
  312. package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  313. package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
  314. package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  315. package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
  316. package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
  317. package/libs/ItemLabelPlugin/utils/isImpacted.js +13 -0
  318. package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  319. package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
  320. package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  321. package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
  322. package/libs/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  323. package/libs/ModelChassisCompassPlugin/Plugin.js +77 -0
  324. package/libs/ModelChassisCompassPlugin/index.d.ts +3 -18
  325. package/libs/ModelChassisCompassPlugin/index.js +2 -74
  326. package/libs/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  327. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +140 -0
  328. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +3 -25
  329. package/libs/ModelEntryDoorGuidePlugin/index.js +2 -135
  330. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +389 -0
  331. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
  332. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  333. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +120 -0
  334. package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
  335. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  336. package/libs/ModelItemLabelPlugin/index.d.ts +9 -0
  337. package/libs/ModelItemLabelPlugin/index.js +8 -0
  338. package/libs/ModelItemLabelPlugin/typings.d.ts +56 -0
  339. package/libs/ModelItemLabelPlugin/typings.js +7 -0
  340. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  341. package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
  342. package/libs/ModelRoomLabelPlugin/Controller.js +67 -25
  343. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  344. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +291 -0
  345. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  346. package/libs/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  347. package/libs/ModelTVVideoPlugin/Plugin.js +254 -0
  348. package/libs/ModelTVVideoPlugin/index.d.ts +5 -0
  349. package/libs/ModelTVVideoPlugin/index.js +4 -0
  350. package/libs/ModelTVVideoPlugin/typings.d.ts +25 -0
  351. package/libs/ModelTVVideoPlugin/typings.js +8 -0
  352. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  353. package/libs/ModelTVVideoPlugin/utils/parseData.js +13 -0
  354. package/libs/ModelViewPlugin/Plugin.d.ts +17 -0
  355. package/libs/ModelViewPlugin/Plugin.js +159 -0
  356. package/libs/ModelViewPlugin/index.d.ts +3 -16
  357. package/libs/ModelViewPlugin/index.js +2 -159
  358. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  359. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  360. package/libs/PanoCompassPlugin/Plugin.d.ts +47 -0
  361. package/libs/PanoCompassPlugin/Plugin.js +249 -0
  362. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  363. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  364. package/libs/PanoCompassPlugin/index.d.ts +7 -24
  365. package/libs/PanoCompassPlugin/index.js +6 -88
  366. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  367. package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
  368. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +39 -0
  369. package/libs/PanoMeasurePlugin/Controller/BaseController.js +132 -0
  370. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  371. package/libs/PanoMeasurePlugin/Controller/EditController.js +329 -0
  372. package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
  373. package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
  374. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  375. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +64 -0
  376. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  377. package/libs/PanoMeasurePlugin/Controller/WatchController.js +316 -0
  378. package/libs/PanoMeasurePlugin/Controller/index.d.ts +70 -0
  379. package/libs/PanoMeasurePlugin/Controller/index.js +306 -0
  380. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  381. package/libs/PanoMeasurePlugin/Model/index.js +139 -0
  382. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  383. package/libs/PanoMeasurePlugin/Model/line.js +114 -0
  384. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  385. package/libs/PanoMeasurePlugin/Model/point.js +48 -0
  386. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  387. package/libs/PanoMeasurePlugin/Model/polyline.js +65 -0
  388. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  389. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +12 -0
  390. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  391. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  392. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  393. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  394. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  395. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +190 -0
  396. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  397. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +48 -0
  398. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  399. package/libs/PanoMeasurePlugin/Modules/GuideController.js +110 -0
  400. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  401. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +278 -0
  402. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  403. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +128 -0
  404. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  405. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +126 -0
  406. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  407. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +73 -0
  408. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  409. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +117 -0
  410. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  411. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
  412. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  413. package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +98 -0
  414. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  415. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +71 -0
  416. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  417. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
  418. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  419. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +264 -0
  420. package/libs/PanoMeasurePlugin/index.d.ts +10 -0
  421. package/libs/PanoMeasurePlugin/index.js +7 -0
  422. package/libs/PanoMeasurePlugin/typings/data.d.ts +37 -0
  423. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  424. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  425. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  426. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  427. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  428. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  429. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
  430. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  431. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  432. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  433. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  434. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  435. package/libs/PanoMeasurePlugin/utils/distanceDom.js +120 -0
  436. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  437. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  438. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  439. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  440. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  441. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  442. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  443. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  444. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  445. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  446. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  447. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  448. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  449. package/libs/PanoMeasurePlugin/utils/line.js +33 -0
  450. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  451. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  452. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  453. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +69 -0
  454. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  455. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  456. package/libs/PanoRulerPlugin/Plugin.d.ts +31 -0
  457. package/libs/PanoRulerPlugin/Plugin.js +403 -0
  458. package/libs/PanoRulerPlugin/index.d.ts +4 -30
  459. package/libs/PanoRulerPlugin/index.js +2 -396
  460. package/libs/PanoRulerPlugin/style.d.ts +1 -1
  461. package/libs/PanoRulerPlugin/style.js +1 -0
  462. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  463. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  464. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  465. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  466. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  467. package/libs/PanoRulerProPlugin/index.js +8 -0
  468. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  469. package/libs/PanoRulerProPlugin/typings.js +1 -0
  470. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  471. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  472. package/libs/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  473. package/libs/PanoSpatialTagPlugin/Plugin.js +426 -0
  474. package/libs/PanoSpatialTagPlugin/index.d.ts +5 -0
  475. package/libs/PanoSpatialTagPlugin/index.js +5 -0
  476. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  477. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  478. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  479. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  480. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  481. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  482. package/libs/base/BasePlugin.d.ts +100 -0
  483. package/libs/base/BasePlugin.js +31 -0
  484. package/libs/base/BasePluginWithData.d.ts +34 -0
  485. package/libs/base/BasePluginWithData.js +4 -0
  486. package/libs/components/PaintBrush/Controller.d.ts +43 -0
  487. package/libs/components/PaintBrush/Controller.js +575 -0
  488. package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
  489. package/libs/components/PaintBrush/Subscribe.js +121 -0
  490. package/libs/components/PaintBrush/index.d.ts +27 -0
  491. package/libs/components/PaintBrush/index.js +57 -0
  492. package/libs/components/PaintBrush/style.d.ts +2 -0
  493. package/libs/components/PaintBrush/style.js +102 -0
  494. package/libs/components/PaintBrush/tween.d.ts +62 -0
  495. package/libs/components/PaintBrush/tween.js +15 -0
  496. package/libs/components/PaintBrush/typings.d.ts +58 -0
  497. package/libs/components/PaintBrush/typings.js +6 -0
  498. package/libs/components/PaintBrush/utils.d.ts +26 -0
  499. package/libs/components/PaintBrush/utils.js +51 -0
  500. package/libs/components/index.d.ts +2 -0
  501. package/libs/components/index.js +3 -0
  502. package/libs/floorplan/Assets/compass.d.ts +1 -0
  503. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  504. package/libs/floorplan/Components/BaseImage.js +222 -0
  505. package/libs/floorplan/Components/Camera.js +120 -0
  506. package/libs/floorplan/Components/Compass.js +120 -0
  507. package/libs/floorplan/Components/CurrentFloor.js +469 -0
  508. package/libs/floorplan/Components/Main.js +470 -0
  509. package/libs/floorplan/Components/Normalmage.js +63 -0
  510. package/libs/floorplan/Components/RoomHighlight/Room.js +107 -0
  511. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +216 -0
  512. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +322 -0
  513. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +309 -0
  514. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +331 -0
  515. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  516. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +104 -0
  517. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +142 -0
  518. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  519. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +269 -0
  520. package/libs/floorplan/Components/SvgImage.js +83 -0
  521. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -75
  522. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +666 -322
  523. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
  524. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
  525. package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  526. package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
  527. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +168 -0
  528. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +250 -0
  529. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  530. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +373 -0
  531. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +24 -16
  532. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +195 -43
  533. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
  534. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
  535. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  536. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
  537. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +53 -45
  538. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +451 -154
  539. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +6 -4
  540. package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
  541. package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
  542. package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  543. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
  544. package/libs/floorplan/constant.d.ts +5 -0
  545. package/libs/floorplan/constant.js +6 -0
  546. package/libs/floorplan/index.d.ts +6 -0
  547. package/libs/floorplan/index.js +7 -0
  548. package/libs/floorplan/typings/floorplanServerData.d.ts +4 -0
  549. package/libs/floorplan/utils/constant.d.ts +22 -0
  550. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
  551. package/libs/floorplan/utils/correctFiveState.d.ts +15 -0
  552. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
  553. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  554. package/libs/floorplan/utils/formatPosition.js +3 -3
  555. package/libs/index.d.ts +17 -21
  556. package/libs/index.js +29 -12
  557. package/libs/shared-utils/Subscribe.js +8 -1
  558. package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
  559. package/libs/shared-utils/createCanvasTextTexture.js +6 -5
  560. package/libs/shared-utils/five/changeMode.d.ts +4 -1
  561. package/libs/shared-utils/five/changeMode.js +34 -13
  562. package/libs/shared-utils/getPxmm.d.ts +14 -1
  563. package/libs/shared-utils/getPxmm.js +31 -12
  564. package/libs/shared-utils/index.d.ts +1 -0
  565. package/libs/shared-utils/index.js +1 -0
  566. package/libs/shared-utils/logger.d.ts +16 -0
  567. package/libs/shared-utils/logger.js +47 -0
  568. package/libs/shared-utils/math/Interval.d.ts +13 -0
  569. package/libs/shared-utils/math/Interval.js +40 -0
  570. package/libs/shared-utils/math/Rectangle.d.ts +27 -0
  571. package/libs/shared-utils/math/Rectangle.js +50 -0
  572. package/libs/shared-utils/math/evenNumber.js +1 -1
  573. package/libs/shared-utils/math/index.d.ts +2 -0
  574. package/libs/shared-utils/math/index.js +2 -0
  575. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  576. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  577. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  578. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  579. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
  580. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  581. package/libs/shared-utils/tinyEJSrender.js +210 -0
  582. package/libs/shared-utils/uuid.d.ts +1 -0
  583. package/libs/shared-utils/uuid.js +1 -0
  584. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  585. package/package.json +30 -14
  586. package/CHANGELOG.md +0 -7
  587. package/dist/dnalogel.cjs.js +0 -2
  588. package/dist/dnalogel.es.js +0 -37796
  589. package/dist/dnalogel.umd.js +0 -2
  590. package/dist/style.css +0 -1
  591. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
  592. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +0 -1
  593. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -80
  594. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +0 -1
  595. package/libs/floorplan/Components/BaseImage.svelte +0 -25
  596. package/libs/floorplan/Components/BaseImage.svelte.map +0 -1
  597. package/libs/floorplan/Components/Normalmage.svelte +0 -11
  598. package/libs/floorplan/Components/Normalmage.svelte.map +0 -1
  599. package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -21
  600. package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +0 -1
  601. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -60
  602. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +0 -1
  603. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -35
  604. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +0 -1
  605. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
  606. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +0 -1
  607. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -16
  608. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +0 -1
  609. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -17
  610. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +0 -1
  611. package/libs/floorplan/Components/SvgImage.svelte +0 -25
  612. package/libs/floorplan/Components/SvgImage.svelte.map +0 -1
  613. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +0 -46
  614. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +0 -1
  615. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +0 -48
  616. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +0 -1
  617. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -37
  618. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  619. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +0 -50
  620. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +0 -1
  621. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +0 -41
  622. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +0 -1
  623. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +0 -25
  624. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +0 -1
  625. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +0 -148
  626. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +0 -1
  627. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +0 -15
  628. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +0 -1
  629. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
  630. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -84
  631. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +0 -1
  632. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
  633. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +0 -1
  634. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
  635. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +0 -1
  636. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -61
  637. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +0 -1
  638. package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
  639. package/libs/shared-utils/five/useFivePlugin.js +0 -8
  640. package/libs/shared-utils/useDebounce.d.ts +0 -8
  641. package/libs/shared-utils/useDebounce.js +0 -22
  642. package/libs/shared-utils/useThrottle.d.ts +0 -8
  643. package/libs/shared-utils/useThrottle.js +0 -25
@@ -0,0 +1,2008 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var internal = require('svelte/internal');
6
+ var svelte = require('svelte');
7
+ var five = require('@realsee/five');
8
+
9
+ const CAMERA_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAMAAAANf8AYAAAC2VBMVEUAAACCnP+Dn/+Enf+HqP+Gp/+Fof+Gpf+IrP+Lsf+Dof+Cmv+Lsv+Mtf+Eo/+Bmf+JrP+Hqf+Env+Krv+Fo/+Pu/+Ms/+Qvv+Hqf+RwP+KsP+Fpf+Mtv+Gov+Bnf+Qv/+Nt/+Krv+Ho/+Rwf+Ouv+Emv+Amv+SxP+Sw/+NuP+Mtf/G0f6huP+Ot/+JrP+Jqv+Dnv+crf6Uqv////+QvP+PvP+Ms//J0/3p9/+Ux/+Ouf+Krf+Iqf+Fpv+/zf6WsP+MpP+RqP+Uyf+Jy//V3P6Yuf+Qqf+Rqv/5/f+Sxf+Jy/////+Lx/+Ouf+Nw/+Owv+PwP+Jr/+Jq/+VvP+Vuv/c4v+Fnf+btP+InP+Blf/3+P6Txf+Jzf+Jyf+NxP+Qwf/t8/6Svv+Tvf/O1f7Czv3T2f6cu/+qvP7a4fvo7v77/v/o9//p9//0+v////+Vy//w9//k8/+B1f/v9/+D0/+UyP/u9v+D0v/i8f+F0v/g7/+G0P+KzP+Hz/////+Lx//s8/+Puf/h7P+Mxv/w9f7q8v/q8f2RwP/r8f6JrP/t8v6RvP/l6f7////j6P6VvP/f5/7q8P7a4P/U2f6au/+ZuP+ewf+auP+iu//n6f2Fn//j6P/h4fn9/v/4/P/3/P/o9v/l9P+F1P+B1f/i8v+UyP+J0f+E0f/h7//r8v6Izf/g7v/q8v6Pv//f7P7f7f/g7f+Lxf+MyP+Mw//k7v6Ow/+Ov//v8/2Pu//t8f+Tvv/p8P6Uu//q7v/i6P2Xvf+WuP/L1vypu//Azv7K0/zy8v/l8v/A4P/o9f/x+f+I0f/j8v+J0P/s9v/h8P+I0P/t9v/r9P6Lyv+Lyf/s9P/g7P+Myv/s8/7j7v+Jrv/q8P2Uwf+Epf+TuP/a3vzh5f3w8P/a4P20v//Nzfzx8f/Pz/Cg0P/f7//u9f/q8v7o8v7s8/7s8v3w9f+Sv/+TuP+Gp//s8fr///8/HFXHAAAA8nRSTlMANUQ/Z2JJXXaKTjCPmVMre3E6gFiylLxsxoVYnk5JwaOFU8utOjrV0KieQS2icWwzMC4Dt7aTQvjfrHprXD0zMyvpvUxGNjH+2sK9raeYkoiAcF5TUi0rKCYY2cy3pIJ/eGpEQDcxLx0S/Pv19PPu7Ovr5+Tk4eDe3NXU09DIsq2opKCViYN9e3V1cmZlXllVTk1GQDs2NTMwJw0K/vn28u/u5+Pj3tjNycjGw8DAua2pqJ6SjYyMf3BvaWNgWk5NSTc3MxT79PHw6efl2trY19PHurWysqWZe2xkXVlUPjo6OSskCO7Qzs6+vKCedmhdN1av0hoAAAV1SURBVEjHjZT3P9RxHMe1nCjcObo4cjpX5w53l7pUbnBGkr2TPZJKmiqVEQlJhGjvvfcm2nvvvXf5C3q/P98bkuR1D7+9n16v1/vzvtPrnAade/ty6anHJfFHOjkfXbe07PGxkuL4oqIjCzoDjHtxurzsRHmFStokjBDG/59JrwurOF2hkkUoIyKEQmFqatG3/xDnXlSGPZcKI5VKiVgsli+vrakpfNAx8UoVlpRWH6mUeMsVcm8vhah6WfXB3A6IlSlVKoE4KjxcgtNGRl1Ayzw9H+Z20DypMVkZZWKiUIi6oHj2PAbPs6Eh/+6/kBUpVUliIEQKGGcwGPbdiBpCQ/O//AMZJ218XW9igoHsGTwY7kopdMmSvTvbz/VGmiyhCARwWJ/Ss5CQ9pl3zVJZJCEwEszb6BtaGxrCn3XIyZP3trW3rybBWTCB1jy0sNGHeWM7+BgzrX4kJu752E57mWA5mIjsMRVxgGkrJpPpRvtJSywt3X2rPUSMuUgqIIzx37vRaLQeqNKEhN03/womg/bYhDJBBzdqvjsqYeHCHdfa1k9BF0QoEyuwoOadWc4sFutoXNzWGW2W3Axd8E3AxAZ6WNGeEoDl7EwPho/T0cDAtswb2Bi6kFx2VkwaDYgRI5zo9EUGRIGHD82e+ufrJ8uo+l31oQogYMJiOdFh2BQ03NTscEDAn8wKgQCeUsRTI8QEMhkYDDc1NTMLMuNwLAP8/a9Pbl0mJQlXhvVtrO2YNLce3Uew6IvAAsYtLS17gvwLCrKR0d3la0DsgdG3NiZVMBZacMh8L9CB2NjsS61eRiCtB4YH/Q21CMQKAgLnh1hYWAyJ3b9/40Qd09woppJhFytAnIPpBmBCCBjvjdrn59eKSU+SRWkZphu40IMBgRpAAMBmO7DZbL/786+s0TIpKqXOhgqGCKcnhOrd28HBlmj+2LFZWia9KjkqnHoa3BmsjG7wKIgDuSzQw9F29Gh+3jDunTseWas1zKtKYbiIsrEjZdAF2iPiYOvIz+Nyuebm5h6+HuvGa2xU0qhwBbkzayzjDO8y3IwgbAdHPp87zNx8sIvLYN/tvhc1TF1lWqSEwaMWgG3ABpIB4sC2HY2Ei0sf0O2YmLWr1CdQGRYp8SK3ic/ZnRWMLqQ+2xGRwUD069dvV8zcuRom+rlA6Y2MbgGmhAGEz4VYSPQF5cyZM6GFYl6eTlN6ixi6aE6PqDLQZRi4EKI/KOfGFjUzqCKsXu6l2RpuAKJxiI1tHhcQJAYOHDhgwOZZs4ZSTHR5lQQYPDW1DS4aELQxdyEIAANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==';
10
+
11
+ /**
12
+ * 创建一个防抖动函数,该函数在高频调用时会每隔 wait 毫秒后调用 func 方法
13
+ * `throttle` 会在第一次调用时立刻调用一次
14
+ * @param func - 要防抖动的函数
15
+ * @param wait - 需要延迟的毫秒数
16
+ */
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ function throttle(func, wait = 200) {
19
+ let last;
20
+ return function (...args) {
21
+ if (last)
22
+ return;
23
+ func(...args);
24
+ last = setTimeout(function () {
25
+ last = null;
26
+ }, wait);
27
+ };
28
+ }
29
+
30
+ /* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
31
+
32
+ function add_css$7(target) {
33
+ internal.append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
34
+ }
35
+
36
+ function create_fragment$8(ctx) {
37
+ let div2;
38
+ let div1;
39
+ let div0;
40
+
41
+ return {
42
+ c() {
43
+ div2 = internal.element("div");
44
+ div1 = internal.element("div");
45
+ div0 = internal.element("div");
46
+ internal.attr(div0, "class", "plugin-radar__camera-rotate svelte-1ty3s4p");
47
+ internal.set_style(div0, "background-image", "url(" + (/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE) + ")");
48
+ internal.set_style(div0, "transform", /*rotateTransform*/ ctx[1], false);
49
+ internal.attr(div1, "class", "plugin-radar__camera-position svelte-1ty3s4p");
50
+ internal.set_style(div1, "transform", /*positionTransform*/ ctx[2], false);
51
+ internal.attr(div2, "class", "plugin-radar__camera-wrapper svelte-1ty3s4p");
52
+ },
53
+ m(target, anchor) {
54
+ internal.insert(target, div2, anchor);
55
+ internal.append(div2, div1);
56
+ internal.append(div1, div0);
57
+ },
58
+ p(ctx, [dirty]) {
59
+ if (dirty & /*cameraImageUrl*/ 1) {
60
+ internal.set_style(div0, "background-image", "url(" + (/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE) + ")");
61
+ }
62
+
63
+ if (dirty & /*rotateTransform*/ 2) {
64
+ internal.set_style(div0, "transform", /*rotateTransform*/ ctx[1], false);
65
+ }
66
+
67
+ if (dirty & /*positionTransform*/ 4) {
68
+ internal.set_style(div1, "transform", /*positionTransform*/ ctx[2], false);
69
+ }
70
+ },
71
+ i: internal.noop,
72
+ o: internal.noop,
73
+ d(detaching) {
74
+ if (detaching) internal.detach(div2);
75
+ }
76
+ };
77
+ }
78
+
79
+ function getCameraRotateTransform(longitude) {
80
+ // 为什么要加 45 ==> 因为 UI 给的图初始角度是 -45
81
+ const rotate = Math.floor(longitude / Math.PI * 180) * -1 + 45;
82
+
83
+ return `rotate(${rotate}deg)`;
84
+ }
85
+
86
+ function instance$8($$self, $$props, $$invalidate) {
87
+ let positionTransform;
88
+ let rotateTransform;
89
+ let { five } = $$props;
90
+ let { pxmm } = $$props;
91
+ let { floorplanData } = $$props;
92
+ let { cameraImageUrl } = $$props;
93
+ let panoIndex = five.getCurrentState().panoIndex;
94
+ let longitude = five.getCurrentState().longitude;
95
+
96
+ /** 获取相机在当前 Five 状态下的位移 */
97
+ function getCameraPositionTransform(floorplanData, panoIndex) {
98
+ const bounding = floorplanData.bounding;
99
+ const floorplanObserver = floorplanData.observers[panoIndex];
100
+ if (!floorplanObserver) return '';
101
+ const clientWidth = (bounding.max.x - bounding.min.x) * pxmm;
102
+ const clientHeight = (bounding.max.y - bounding.min.y) * pxmm;
103
+ const left = Math.floor(floorplanObserver.positionInImage.x * clientWidth);
104
+ const top = Math.floor(floorplanObserver.positionInImage.y * clientHeight);
105
+ return `translate(${left}px, ${top}px)`;
106
+ }
107
+
108
+ function onFivePanoWillArrive(_panoIndex) {
109
+ $$invalidate(6, panoIndex = _panoIndex);
110
+ }
111
+
112
+ const onFiveCameraDirectionUpdate = throttle(
113
+ pose => {
114
+ $$invalidate(7, longitude = pose.longitude);
115
+ },
116
+ 1000 / 60
117
+ );
118
+
119
+ svelte.onMount(() => {
120
+ five.on('panoWillArrive', onFivePanoWillArrive);
121
+ five.on('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
122
+
123
+ return function dispose() {
124
+ five.off('panoWillArrive', onFivePanoWillArrive);
125
+ five.off('cameraDirectionUpdate', onFiveCameraDirectionUpdate);
126
+ };
127
+ });
128
+
129
+ $$self.$$set = $$props => {
130
+ if ('five' in $$props) $$invalidate(3, five = $$props.five);
131
+ if ('pxmm' in $$props) $$invalidate(4, pxmm = $$props.pxmm);
132
+ if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
133
+ if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
134
+ };
135
+
136
+ $$self.$$.update = () => {
137
+ if ($$self.$$.dirty & /*floorplanData, panoIndex*/ 96) {
138
+ // 初始状态,不能等 mount 之后再计算,那样第一次 camera 展示的时候也会有动画
139
+ $$invalidate(2, positionTransform = getCameraPositionTransform(floorplanData, panoIndex));
140
+ }
141
+
142
+ if ($$self.$$.dirty & /*longitude*/ 128) {
143
+ $$invalidate(1, rotateTransform = getCameraRotateTransform(longitude));
144
+ }
145
+ };
146
+
147
+ return [
148
+ cameraImageUrl,
149
+ rotateTransform,
150
+ positionTransform,
151
+ five,
152
+ pxmm,
153
+ floorplanData,
154
+ panoIndex,
155
+ longitude
156
+ ];
157
+ }
158
+
159
+ class Camera extends internal.SvelteComponent {
160
+ constructor(options) {
161
+ super();
162
+
163
+ internal.init(
164
+ this,
165
+ options,
166
+ instance$8,
167
+ create_fragment$8,
168
+ internal.safe_not_equal,
169
+ {
170
+ five: 3,
171
+ pxmm: 4,
172
+ floorplanData: 5,
173
+ cameraImageUrl: 0
174
+ },
175
+ add_css$7
176
+ );
177
+ }
178
+ }
179
+
180
+ /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
181
+
182
+ function add_css$6(target) {
183
+ internal.append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
184
+ }
185
+
186
+ function get_each_context$1(ctx, list, i) {
187
+ const child_ctx = ctx.slice();
188
+ child_ctx[1] = list[i];
189
+ return child_ctx;
190
+ }
191
+
192
+ // (5:2) {#each extraObjects as extraObject (extraObject.id)}
193
+ function create_each_block$1(key_1, ctx) {
194
+ let div1;
195
+ let div0;
196
+ let style_width = `${/*extraObject*/ ctx[1].icon.width / 16}rem`;
197
+ let style_height = `${/*extraObject*/ ctx[1].icon.height / 16}rem`;
198
+ let t;
199
+ let style_top = `${/*extraObject*/ ctx[1].positionInImage.y * 100}%`;
200
+ let style_left = `${/*extraObject*/ ctx[1].positionInImage.x * 100}%`;
201
+
202
+ return {
203
+ key: key_1,
204
+ first: null,
205
+ c() {
206
+ div1 = internal.element("div");
207
+ div0 = internal.element("div");
208
+ t = internal.space();
209
+ internal.attr(div0, "class", "plugin-pano-floorplan__extra-object-item svelte-1i87fz7");
210
+ internal.set_style(div0, "background-image", `url(${/*extraObject*/ ctx[1].icon.url})`);
211
+ internal.set_style(div0, "width", style_width, false);
212
+ internal.set_style(div0, "height", style_height, false);
213
+ internal.attr(div1, "class", "plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7");
214
+ internal.set_style(div1, "top", style_top, false);
215
+ internal.set_style(div1, "left", style_left, false);
216
+ this.first = div1;
217
+ },
218
+ m(target, anchor) {
219
+ internal.insert(target, div1, anchor);
220
+ internal.append(div1, div0);
221
+ internal.append(div1, t);
222
+ },
223
+ p(new_ctx, dirty) {
224
+ ctx = new_ctx;
225
+
226
+ if (dirty & /*extraObjects*/ 1) {
227
+ internal.set_style(div0, "background-image", `url(${/*extraObject*/ ctx[1].icon.url})`);
228
+ }
229
+
230
+ if (dirty & /*extraObjects*/ 1 && style_width !== (style_width = `${/*extraObject*/ ctx[1].icon.width / 16}rem`)) {
231
+ internal.set_style(div0, "width", style_width, false);
232
+ }
233
+
234
+ if (dirty & /*extraObjects*/ 1 && style_height !== (style_height = `${/*extraObject*/ ctx[1].icon.height / 16}rem`)) {
235
+ internal.set_style(div0, "height", style_height, false);
236
+ }
237
+
238
+ if (dirty & /*extraObjects*/ 1 && style_top !== (style_top = `${/*extraObject*/ ctx[1].positionInImage.y * 100}%`)) {
239
+ internal.set_style(div1, "top", style_top, false);
240
+ }
241
+
242
+ if (dirty & /*extraObjects*/ 1 && style_left !== (style_left = `${/*extraObject*/ ctx[1].positionInImage.x * 100}%`)) {
243
+ internal.set_style(div1, "left", style_left, false);
244
+ }
245
+ },
246
+ d(detaching) {
247
+ if (detaching) internal.detach(div1);
248
+ }
249
+ };
250
+ }
251
+
252
+ function create_fragment$7(ctx) {
253
+ let div;
254
+ let each_blocks = [];
255
+ let each_1_lookup = new Map();
256
+ let each_value = /*extraObjects*/ ctx[0];
257
+ const get_key = ctx => /*extraObject*/ ctx[1].id;
258
+
259
+ for (let i = 0; i < each_value.length; i += 1) {
260
+ let child_ctx = get_each_context$1(ctx, each_value, i);
261
+ let key = get_key(child_ctx);
262
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx));
263
+ }
264
+
265
+ return {
266
+ c() {
267
+ div = internal.element("div");
268
+
269
+ for (let i = 0; i < each_blocks.length; i += 1) {
270
+ each_blocks[i].c();
271
+ }
272
+
273
+ internal.attr(div, "class", "plugin-pano-floorplan__extra-objects svelte-1i87fz7");
274
+ },
275
+ m(target, anchor) {
276
+ internal.insert(target, div, anchor);
277
+
278
+ for (let i = 0; i < each_blocks.length; i += 1) {
279
+ each_blocks[i].m(div, null);
280
+ }
281
+ },
282
+ p(ctx, [dirty]) {
283
+ if (dirty & /*extraObjects*/ 1) {
284
+ each_value = /*extraObjects*/ ctx[0];
285
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.destroy_block, create_each_block$1, null, get_each_context$1);
286
+ }
287
+ },
288
+ i: internal.noop,
289
+ o: internal.noop,
290
+ d(detaching) {
291
+ if (detaching) internal.detach(div);
292
+
293
+ for (let i = 0; i < each_blocks.length; i += 1) {
294
+ each_blocks[i].d();
295
+ }
296
+ }
297
+ };
298
+ }
299
+
300
+ function instance$7($$self, $$props, $$invalidate) {
301
+ let { extraObjects = [] } = $$props;
302
+
303
+ $$self.$$set = $$props => {
304
+ if ('extraObjects' in $$props) $$invalidate(0, extraObjects = $$props.extraObjects);
305
+ };
306
+
307
+ return [extraObjects];
308
+ }
309
+
310
+ class ExtraObjects extends internal.SvelteComponent {
311
+ constructor(options) {
312
+ super();
313
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { extraObjects: 0 }, add_css$6);
314
+ }
315
+ }
316
+
317
+ /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
318
+
319
+ function add_css$5(target) {
320
+ internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
321
+ }
322
+
323
+ function create_fragment$6(ctx) {
324
+ let img;
325
+ let img_src_value;
326
+
327
+ return {
328
+ c() {
329
+ img = internal.element("img");
330
+ if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
331
+ internal.attr(img, "alt", "floorplan iamge");
332
+ internal.attr(img, "class", "svelte-1gfoniz");
333
+ },
334
+ m(target, anchor) {
335
+ internal.insert(target, img, anchor);
336
+ },
337
+ p(ctx, [dirty]) {
338
+ if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
339
+ internal.attr(img, "src", img_src_value);
340
+ }
341
+ },
342
+ i: internal.noop,
343
+ o: internal.noop,
344
+ d(detaching) {
345
+ if (detaching) internal.detach(img);
346
+ }
347
+ };
348
+ }
349
+
350
+ function instance$6($$self, $$props, $$invalidate) {
351
+ let { url } = $$props;
352
+
353
+ $$self.$$set = $$props => {
354
+ if ('url' in $$props) $$invalidate(0, url = $$props.url);
355
+ };
356
+
357
+ return [url];
358
+ }
359
+
360
+ class Normalmage extends internal.SvelteComponent {
361
+ constructor(options) {
362
+ super();
363
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { url: 0 }, add_css$5);
364
+ }
365
+ }
366
+
367
+ /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
368
+
369
+ function add_css$4(target) {
370
+ internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
371
+ }
372
+
373
+ function create_fragment$5(ctx) {
374
+ let div;
375
+ let html_tag;
376
+ let t;
377
+ let html_tag_1;
378
+
379
+ return {
380
+ c() {
381
+ div = internal.element("div");
382
+ html_tag = new internal.HtmlTag();
383
+ t = internal.space();
384
+ html_tag_1 = new internal.HtmlTag();
385
+ html_tag.a = t;
386
+ html_tag_1.a = null;
387
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ub47ya");
388
+ },
389
+ m(target, anchor) {
390
+ internal.insert(target, div, anchor);
391
+ html_tag.m(/*svgStyle*/ ctx[1], div);
392
+ internal.append(div, t);
393
+ html_tag_1.m(/*content*/ ctx[0], div);
394
+ },
395
+ p(ctx, [dirty]) {
396
+ if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
397
+ },
398
+ i: internal.noop,
399
+ o: internal.noop,
400
+ d(detaching) {
401
+ if (detaching) internal.detach(div);
402
+ }
403
+ };
404
+ }
405
+
406
+ function instance$5($$self, $$props, $$invalidate) {
407
+ let { content } = $$props;
408
+
409
+ const svgStyle = `
410
+ <style>
411
+ svg [type='lineGroup'] path {
412
+ fill: #ffffff;
413
+ stroke: #ffffff;
414
+ }
415
+ svg [type='lineItemGroup'] g g g g {
416
+ stroke: #ffffff;
417
+ }</style>
418
+ `;
419
+
420
+ $$self.$$set = $$props => {
421
+ if ('content' in $$props) $$invalidate(0, content = $$props.content);
422
+ };
423
+
424
+ return [content, svgStyle];
425
+ }
426
+
427
+ class SvgImage extends internal.SvelteComponent {
428
+ constructor(options) {
429
+ super();
430
+ internal.init(this, options, instance$5, create_fragment$5, internal.safe_not_equal, { content: 0 }, add_css$4);
431
+ }
432
+ }
433
+
434
+ /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
435
+
436
+ function add_css$3(target) {
437
+ internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
438
+ }
439
+
440
+ // (13:22)
441
+ function create_if_block_1$1(ctx) {
442
+ let normalimage;
443
+ let current;
444
+ normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
445
+
446
+ return {
447
+ c() {
448
+ internal.create_component(normalimage.$$.fragment);
449
+ },
450
+ m(target, anchor) {
451
+ internal.mount_component(normalimage, target, anchor);
452
+ current = true;
453
+ },
454
+ p(ctx, dirty) {
455
+ const normalimage_changes = {};
456
+ if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
457
+ normalimage.$set(normalimage_changes);
458
+ },
459
+ i(local) {
460
+ if (current) return;
461
+ internal.transition_in(normalimage.$$.fragment, local);
462
+ current = true;
463
+ },
464
+ o(local) {
465
+ internal.transition_out(normalimage.$$.fragment, local);
466
+ current = false;
467
+ },
468
+ d(detaching) {
469
+ internal.destroy_component(normalimage, detaching);
470
+ }
471
+ };
472
+ }
473
+
474
+ // (11:2) {#if svgContent}
475
+ function create_if_block$2(ctx) {
476
+ let svgimage;
477
+ let current;
478
+
479
+ svgimage = new SvgImage({
480
+ props: { content: /*svgContent*/ ctx[0] }
481
+ });
482
+
483
+ return {
484
+ c() {
485
+ internal.create_component(svgimage.$$.fragment);
486
+ },
487
+ m(target, anchor) {
488
+ internal.mount_component(svgimage, target, anchor);
489
+ current = true;
490
+ },
491
+ p(ctx, dirty) {
492
+ const svgimage_changes = {};
493
+ if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
494
+ svgimage.$set(svgimage_changes);
495
+ },
496
+ i(local) {
497
+ if (current) return;
498
+ internal.transition_in(svgimage.$$.fragment, local);
499
+ current = true;
500
+ },
501
+ o(local) {
502
+ internal.transition_out(svgimage.$$.fragment, local);
503
+ current = false;
504
+ },
505
+ d(detaching) {
506
+ internal.destroy_component(svgimage, detaching);
507
+ }
508
+ };
509
+ }
510
+
511
+ function create_fragment$4(ctx) {
512
+ let div;
513
+ let current_block_type_index;
514
+ let if_block;
515
+ let current;
516
+ const if_block_creators = [create_if_block$2, create_if_block_1$1];
517
+ const if_blocks = [];
518
+
519
+ function select_block_type(ctx, dirty) {
520
+ if (/*svgContent*/ ctx[0]) return 0;
521
+ if (/*imageData*/ ctx[1]) return 1;
522
+ return -1;
523
+ }
524
+
525
+ if (~(current_block_type_index = select_block_type(ctx))) {
526
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
527
+ }
528
+
529
+ return {
530
+ c() {
531
+ div = internal.element("div");
532
+ if (if_block) if_block.c();
533
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ozpg4a");
534
+ },
535
+ m(target, anchor) {
536
+ internal.insert(target, div, anchor);
537
+
538
+ if (~current_block_type_index) {
539
+ if_blocks[current_block_type_index].m(div, null);
540
+ }
541
+
542
+ current = true;
543
+ },
544
+ p(ctx, [dirty]) {
545
+ let previous_block_index = current_block_type_index;
546
+ current_block_type_index = select_block_type(ctx);
547
+
548
+ if (current_block_type_index === previous_block_index) {
549
+ if (~current_block_type_index) {
550
+ if_blocks[current_block_type_index].p(ctx, dirty);
551
+ }
552
+ } else {
553
+ if (if_block) {
554
+ internal.group_outros();
555
+
556
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
557
+ if_blocks[previous_block_index] = null;
558
+ });
559
+
560
+ internal.check_outros();
561
+ }
562
+
563
+ if (~current_block_type_index) {
564
+ if_block = if_blocks[current_block_type_index];
565
+
566
+ if (!if_block) {
567
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
568
+ if_block.c();
569
+ } else {
570
+ if_block.p(ctx, dirty);
571
+ }
572
+
573
+ internal.transition_in(if_block, 1);
574
+ if_block.m(div, null);
575
+ } else {
576
+ if_block = null;
577
+ }
578
+ }
579
+ },
580
+ i(local) {
581
+ if (current) return;
582
+ internal.transition_in(if_block);
583
+ current = true;
584
+ },
585
+ o(local) {
586
+ internal.transition_out(if_block);
587
+ current = false;
588
+ },
589
+ d(detaching) {
590
+ if (detaching) internal.detach(div);
591
+
592
+ if (~current_block_type_index) {
593
+ if_blocks[current_block_type_index].d();
594
+ }
595
+ }
596
+ };
597
+ }
598
+
599
+ function instance$4($$self, $$props, $$invalidate) {
600
+ let imageData;
601
+ let svgContent;
602
+ var _a, _b;
603
+ let { floorIndex } = $$props;
604
+ let { floorplanData } = $$props;
605
+
606
+ $$self.$$set = $$props => {
607
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
608
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
609
+ };
610
+
611
+ $$self.$$.update = () => {
612
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
613
+ $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
614
+ }
615
+
616
+ if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
617
+ $$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
618
+ ? void 0
619
+ : _a[floorIndex]) === null || _b === void 0
620
+ ? void 0
621
+ : _b.svgContent);
622
+ }
623
+ };
624
+
625
+ return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
626
+ }
627
+
628
+ class BaseImage extends internal.SvelteComponent {
629
+ constructor(options) {
630
+ super();
631
+ internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$3);
632
+ }
633
+ }
634
+
635
+ function pathD(points, options = {}) {
636
+ let d = '';
637
+ const { needZ, needA } = options;
638
+ const _points = needZ ? points.slice().concat(points[0]) : points.slice();
639
+ _points.forEach((_point, index) => {
640
+ const { x, y } = options.format ? options.format(_point) : _point;
641
+ const point = x + ',' + y;
642
+ if (index === 0) {
643
+ d += 'M' + point;
644
+ return d;
645
+ }
646
+ if (needA === null || needA === void 0 ? void 0 : needA[index]) {
647
+ d += 'A' + needA[index] + ',' + point;
648
+ return d;
649
+ }
650
+ d += 'L' + point;
651
+ return d;
652
+ });
653
+ return d + (needZ ? 'Z' : '');
654
+ }
655
+ /** 把户型图上点点位转换到 SVG 上的点位 */
656
+ function formatFloorplanPoint({ x, y }, bounding) {
657
+ const { max, min } = bounding;
658
+ return { x: x - min.x, y: max.y - y };
659
+ }
660
+ /** 模型坐标转户型图坐标 */
661
+ function modelPosition2FloorplanPosition(position, floorplanData) {
662
+ const x = position.x * 1000 + floorplanData.bounding.origin.x;
663
+ const y = -position.z * 1000 + floorplanData.bounding.origin.y;
664
+ return { x, y };
665
+ }
666
+ /** 户型图点位转在图片上的相对坐标 */
667
+ function floorplanPosition2ImagePosition(position, floorplanData) {
668
+ const bounding = floorplanData.bounding;
669
+ const boundingWidth = bounding.max.x - bounding.min.x;
670
+ const boundingHeight = bounding.max.y - bounding.min.y;
671
+ return {
672
+ x: (position.x - bounding.min.x) / boundingWidth,
673
+ y: (bounding.max.y - position.y) / boundingHeight,
674
+ };
675
+ }
676
+ /** 求三维坐标点所在的楼层 */
677
+ function getFloorIndexFromModelPosition(position, five) {
678
+ const floorIndex = Math.max(...five.work.observers.map((observer) => {
679
+ if (position.z >= observer.standingPosition.z)
680
+ return observer.floorIndex;
681
+ return 0;
682
+ }));
683
+ return floorIndex;
684
+ }
685
+
686
+ /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
687
+
688
+ function add_css$2(target) {
689
+ internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
690
+ }
691
+
692
+ function create_fragment$3(ctx) {
693
+ let path;
694
+ let mounted;
695
+ let dispose;
696
+
697
+ return {
698
+ c() {
699
+ path = internal.svg_element("path");
700
+ internal.attr(path, "d", /*_pathD*/ ctx[2]);
701
+ internal.attr(path, "fill", `#fff`);
702
+ internal.attr(path, "class", "svelte-19uvvss");
703
+ },
704
+ m(target, anchor) {
705
+ internal.insert(target, path, anchor);
706
+
707
+ if (!mounted) {
708
+ dispose = [
709
+ internal.listen(path, "mouseenter", /*onMouseEnter*/ ctx[0]),
710
+ internal.listen(path, "mouseleave", /*onMouseLeave*/ ctx[1])
711
+ ];
712
+
713
+ mounted = true;
714
+ }
715
+ },
716
+ p: internal.noop,
717
+ i: internal.noop,
718
+ o: internal.noop,
719
+ d(detaching) {
720
+ if (detaching) internal.detach(path);
721
+ mounted = false;
722
+ internal.run_all(dispose);
723
+ }
724
+ };
725
+ }
726
+
727
+ function instance$3($$self, $$props, $$invalidate) {
728
+ let { room } = $$props;
729
+ let { floorplanData } = $$props;
730
+ let { hoveredRoom } = $$props;
731
+
732
+ function onMouseEnter() {
733
+ hoveredRoom.set(room);
734
+ }
735
+
736
+ function onMouseLeave() {
737
+ hoveredRoom.set(undefined);
738
+ }
739
+
740
+ const { bounding } = floorplanData;
741
+
742
+ const _pathD = pathD(room.path, {
743
+ needZ: true,
744
+ format: vector => formatFloorplanPoint(vector, bounding)
745
+ });
746
+
747
+ $$self.$$set = $$props => {
748
+ if ('room' in $$props) $$invalidate(3, room = $$props.room);
749
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
750
+ if ('hoveredRoom' in $$props) $$invalidate(5, hoveredRoom = $$props.hoveredRoom);
751
+ };
752
+
753
+ return [onMouseEnter, onMouseLeave, _pathD, room, floorplanData, hoveredRoom];
754
+ }
755
+
756
+ class Room extends internal.SvelteComponent {
757
+ constructor(options) {
758
+ super();
759
+
760
+ internal.init(
761
+ this,
762
+ options,
763
+ instance$3,
764
+ create_fragment$3,
765
+ internal.safe_not_equal,
766
+ {
767
+ room: 3,
768
+ floorplanData: 4,
769
+ hoveredRoom: 5
770
+ },
771
+ add_css$2
772
+ );
773
+ }
774
+ }
775
+
776
+ /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
777
+
778
+ function add_css$1(target) {
779
+ internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
780
+ }
781
+
782
+ function get_each_context(ctx, list, i) {
783
+ const child_ctx = ctx.slice();
784
+ child_ctx[5] = list[i];
785
+ return child_ctx;
786
+ }
787
+
788
+ // (11:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
789
+ function create_each_block(key_1, ctx) {
790
+ let first;
791
+ let room;
792
+ let current;
793
+
794
+ const room_spread_levels = [
795
+ {
796
+ room: /*room*/ ctx[5],
797
+ floorplanData: /*floorplanData*/ ctx[1],
798
+ hoveredRoom: /*hoveredRoom*/ ctx[2]
799
+ }
800
+ ];
801
+
802
+ let room_props = {};
803
+
804
+ for (let i = 0; i < room_spread_levels.length; i += 1) {
805
+ room_props = internal.assign(room_props, room_spread_levels[i]);
806
+ }
807
+
808
+ room = new Room({ props: room_props });
809
+
810
+ return {
811
+ key: key_1,
812
+ first: null,
813
+ c() {
814
+ first = internal.empty();
815
+ internal.create_component(room.$$.fragment);
816
+ this.first = first;
817
+ },
818
+ m(target, anchor) {
819
+ internal.insert(target, first, anchor);
820
+ internal.mount_component(room, target, anchor);
821
+ current = true;
822
+ },
823
+ p(new_ctx, dirty) {
824
+ ctx = new_ctx;
825
+
826
+ const room_changes = (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7)
827
+ ? internal.get_spread_update(room_spread_levels, [
828
+ {
829
+ room: /*room*/ ctx[5],
830
+ floorplanData: /*floorplanData*/ ctx[1],
831
+ hoveredRoom: /*hoveredRoom*/ ctx[2]
832
+ }
833
+ ])
834
+ : {};
835
+
836
+ room.$set(room_changes);
837
+ },
838
+ i(local) {
839
+ if (current) return;
840
+ internal.transition_in(room.$$.fragment, local);
841
+ current = true;
842
+ },
843
+ o(local) {
844
+ internal.transition_out(room.$$.fragment, local);
845
+ current = false;
846
+ },
847
+ d(detaching) {
848
+ if (detaching) internal.detach(first);
849
+ internal.destroy_component(room, detaching);
850
+ }
851
+ };
852
+ }
853
+
854
+ function create_fragment$2(ctx) {
855
+ let div;
856
+ let svg;
857
+ let each_blocks = [];
858
+ let each_1_lookup = new Map();
859
+ let current;
860
+ let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
861
+ const get_key = ctx => /*room*/ ctx[5].id;
862
+
863
+ for (let i = 0; i < each_value.length; i += 1) {
864
+ let child_ctx = get_each_context(ctx, each_value, i);
865
+ let key = get_key(child_ctx);
866
+ each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
867
+ }
868
+
869
+ return {
870
+ c() {
871
+ div = internal.element("div");
872
+ svg = internal.svg_element("svg");
873
+
874
+ for (let i = 0; i < each_blocks.length; i += 1) {
875
+ each_blocks[i].c();
876
+ }
877
+
878
+ internal.attr(svg, "width", "100%");
879
+ internal.attr(svg, "height", "100%");
880
+ internal.attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[3]} ${/*boundingHeight*/ ctx[4]}`);
881
+ internal.attr(svg, "class", "svelte-1kqo6e4");
882
+ internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
883
+ },
884
+ m(target, anchor) {
885
+ internal.insert(target, div, anchor);
886
+ internal.append(div, svg);
887
+
888
+ for (let i = 0; i < each_blocks.length; i += 1) {
889
+ each_blocks[i].m(svg, null);
890
+ }
891
+
892
+ current = true;
893
+ },
894
+ p(ctx, [dirty]) {
895
+ if (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7) {
896
+ each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
897
+ internal.group_outros();
898
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block, null, get_each_context);
899
+ internal.check_outros();
900
+ }
901
+ },
902
+ i(local) {
903
+ if (current) return;
904
+
905
+ for (let i = 0; i < each_value.length; i += 1) {
906
+ internal.transition_in(each_blocks[i]);
907
+ }
908
+
909
+ current = true;
910
+ },
911
+ o(local) {
912
+ for (let i = 0; i < each_blocks.length; i += 1) {
913
+ internal.transition_out(each_blocks[i]);
914
+ }
915
+
916
+ current = false;
917
+ },
918
+ d(detaching) {
919
+ if (detaching) internal.detach(div);
920
+
921
+ for (let i = 0; i < each_blocks.length; i += 1) {
922
+ each_blocks[i].d();
923
+ }
924
+ }
925
+ };
926
+ }
927
+
928
+ function instance$2($$self, $$props, $$invalidate) {
929
+ let { floorIndex } = $$props;
930
+ let { floorplanData } = $$props;
931
+ let { hoveredRoom } = $$props;
932
+ const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
933
+ const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
934
+
935
+ $$self.$$set = $$props => {
936
+ if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
937
+ if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
938
+ if ('hoveredRoom' in $$props) $$invalidate(2, hoveredRoom = $$props.hoveredRoom);
939
+ };
940
+
941
+ return [floorIndex, floorplanData, hoveredRoom, boundingWidth, boundingHeight];
942
+ }
943
+
944
+ class RoomHighlight extends internal.SvelteComponent {
945
+ constructor(options) {
946
+ super();
947
+
948
+ internal.init(
949
+ this,
950
+ options,
951
+ instance$2,
952
+ create_fragment$2,
953
+ internal.safe_not_equal,
954
+ {
955
+ floorIndex: 0,
956
+ floorplanData: 1,
957
+ hoveredRoom: 2
958
+ },
959
+ add_css$1
960
+ );
961
+ }
962
+ }
963
+
964
+ /* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
965
+
966
+ function create_if_block$1(ctx) {
967
+ let highlight;
968
+ let current;
969
+
970
+ const highlight_spread_levels = [
971
+ {
972
+ five: /*five*/ ctx[0],
973
+ pxmm: /*pxmm*/ ctx[1],
974
+ floorIndex: /*floorIndex*/ ctx[2],
975
+ floorplanData: /*floorplanData*/ ctx[4],
976
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[6]
977
+ }
978
+ ];
979
+
980
+ let highlight_props = {};
981
+
982
+ for (let i = 0; i < highlight_spread_levels.length; i += 1) {
983
+ highlight_props = internal.assign(highlight_props, highlight_spread_levels[i]);
984
+ }
985
+
986
+ highlight = new RoomHighlight({ props: highlight_props });
987
+
988
+ return {
989
+ c() {
990
+ internal.create_component(highlight.$$.fragment);
991
+ },
992
+ m(target, anchor) {
993
+ internal.mount_component(highlight, target, anchor);
994
+ current = true;
995
+ },
996
+ p(ctx, dirty) {
997
+ const highlight_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, onRoomHeightClick*/ 87)
998
+ ? internal.get_spread_update(highlight_spread_levels, [
999
+ {
1000
+ five: /*five*/ ctx[0],
1001
+ pxmm: /*pxmm*/ ctx[1],
1002
+ floorIndex: /*floorIndex*/ ctx[2],
1003
+ floorplanData: /*floorplanData*/ ctx[4],
1004
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[6]
1005
+ }
1006
+ ])
1007
+ : {};
1008
+
1009
+ highlight.$set(highlight_changes);
1010
+ },
1011
+ i(local) {
1012
+ if (current) return;
1013
+ internal.transition_in(highlight.$$.fragment, local);
1014
+ current = true;
1015
+ },
1016
+ o(local) {
1017
+ internal.transition_out(highlight.$$.fragment, local);
1018
+ current = false;
1019
+ },
1020
+ d(detaching) {
1021
+ internal.destroy_component(highlight, detaching);
1022
+ }
1023
+ };
1024
+ }
1025
+
1026
+ function create_fragment$1(ctx) {
1027
+ let baseimage;
1028
+ let t0;
1029
+ let extraobjects;
1030
+ let t1;
1031
+ let if_block_anchor;
1032
+ let current;
1033
+
1034
+ const baseimage_spread_levels = [
1035
+ {
1036
+ floorIndex: /*floorIndex*/ ctx[2],
1037
+ floorplanData: /*floorplanData*/ ctx[4]
1038
+ }
1039
+ ];
1040
+
1041
+ let baseimage_props = {};
1042
+
1043
+ for (let i = 0; i < baseimage_spread_levels.length; i += 1) {
1044
+ baseimage_props = internal.assign(baseimage_props, baseimage_spread_levels[i]);
1045
+ }
1046
+
1047
+ baseimage = new BaseImage({ props: baseimage_props });
1048
+
1049
+ extraobjects = new ExtraObjects({
1050
+ props: {
1051
+ extraObjects: /*currentFloorExtraObjects*/ ctx[5]
1052
+ }
1053
+ });
1054
+
1055
+ let if_block = /*hoverEnable*/ ctx[3] && create_if_block$1(ctx);
1056
+
1057
+ return {
1058
+ c() {
1059
+ internal.create_component(baseimage.$$.fragment);
1060
+ t0 = internal.space();
1061
+ internal.create_component(extraobjects.$$.fragment);
1062
+ t1 = internal.space();
1063
+ if (if_block) if_block.c();
1064
+ if_block_anchor = internal.empty();
1065
+ },
1066
+ m(target, anchor) {
1067
+ internal.mount_component(baseimage, target, anchor);
1068
+ internal.insert(target, t0, anchor);
1069
+ internal.mount_component(extraobjects, target, anchor);
1070
+ internal.insert(target, t1, anchor);
1071
+ if (if_block) if_block.m(target, anchor);
1072
+ internal.insert(target, if_block_anchor, anchor);
1073
+ current = true;
1074
+ },
1075
+ p(ctx, [dirty]) {
1076
+ const baseimage_changes = (dirty & /*floorIndex, floorplanData*/ 20)
1077
+ ? internal.get_spread_update(baseimage_spread_levels, [
1078
+ {
1079
+ floorIndex: /*floorIndex*/ ctx[2],
1080
+ floorplanData: /*floorplanData*/ ctx[4]
1081
+ }
1082
+ ])
1083
+ : {};
1084
+
1085
+ baseimage.$set(baseimage_changes);
1086
+ const extraobjects_changes = {};
1087
+ if (dirty & /*currentFloorExtraObjects*/ 32) extraobjects_changes.extraObjects = /*currentFloorExtraObjects*/ ctx[5];
1088
+ extraobjects.$set(extraobjects_changes);
1089
+
1090
+ if (/*hoverEnable*/ ctx[3]) {
1091
+ if (if_block) {
1092
+ if_block.p(ctx, dirty);
1093
+
1094
+ if (dirty & /*hoverEnable*/ 8) {
1095
+ internal.transition_in(if_block, 1);
1096
+ }
1097
+ } else {
1098
+ if_block = create_if_block$1(ctx);
1099
+ if_block.c();
1100
+ internal.transition_in(if_block, 1);
1101
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
1102
+ }
1103
+ } else if (if_block) {
1104
+ internal.group_outros();
1105
+
1106
+ internal.transition_out(if_block, 1, 1, () => {
1107
+ if_block = null;
1108
+ });
1109
+
1110
+ internal.check_outros();
1111
+ }
1112
+ },
1113
+ i(local) {
1114
+ if (current) return;
1115
+ internal.transition_in(baseimage.$$.fragment, local);
1116
+ internal.transition_in(extraobjects.$$.fragment, local);
1117
+ internal.transition_in(if_block);
1118
+ current = true;
1119
+ },
1120
+ o(local) {
1121
+ internal.transition_out(baseimage.$$.fragment, local);
1122
+ internal.transition_out(extraobjects.$$.fragment, local);
1123
+ internal.transition_out(if_block);
1124
+ current = false;
1125
+ },
1126
+ d(detaching) {
1127
+ internal.destroy_component(baseimage, detaching);
1128
+ if (detaching) internal.detach(t0);
1129
+ internal.destroy_component(extraobjects, detaching);
1130
+ if (detaching) internal.detach(t1);
1131
+ if (if_block) if_block.d(detaching);
1132
+ if (detaching) internal.detach(if_block_anchor);
1133
+ }
1134
+ };
1135
+ }
1136
+
1137
+ function instance$1($$self, $$props, $$invalidate) {
1138
+ let currentFloorExtraObjects;
1139
+ let { five } = $$props;
1140
+ let { pxmm } = $$props;
1141
+ let { floorIndex } = $$props;
1142
+ let { hoverEnable } = $$props;
1143
+ let { floorplanData } = $$props;
1144
+ let { extraObjects = [] } = $$props;
1145
+ const onRoomHeightClick = undefined;
1146
+
1147
+ $$self.$$set = $$props => {
1148
+ if ('five' in $$props) $$invalidate(0, five = $$props.five);
1149
+ if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
1150
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
1151
+ if ('hoverEnable' in $$props) $$invalidate(3, hoverEnable = $$props.hoverEnable);
1152
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
1153
+ if ('extraObjects' in $$props) $$invalidate(7, extraObjects = $$props.extraObjects);
1154
+ };
1155
+
1156
+ $$self.$$.update = () => {
1157
+ if ($$self.$$.dirty & /*extraObjects, floorIndex*/ 132) {
1158
+ $$invalidate(5, currentFloorExtraObjects = extraObjects === null || extraObjects === void 0
1159
+ ? void 0
1160
+ : extraObjects.filter(object => object.floorIndex === floorIndex));
1161
+ }
1162
+ };
1163
+
1164
+ return [
1165
+ five,
1166
+ pxmm,
1167
+ floorIndex,
1168
+ hoverEnable,
1169
+ floorplanData,
1170
+ currentFloorExtraObjects,
1171
+ onRoomHeightClick,
1172
+ extraObjects
1173
+ ];
1174
+ }
1175
+
1176
+ class CurrentFloor extends internal.SvelteComponent {
1177
+ constructor(options) {
1178
+ super();
1179
+
1180
+ internal.init(this, options, instance$1, create_fragment$1, internal.safe_not_equal, {
1181
+ five: 0,
1182
+ pxmm: 1,
1183
+ floorIndex: 2,
1184
+ hoverEnable: 3,
1185
+ floorplanData: 4,
1186
+ extraObjects: 7
1187
+ });
1188
+ }
1189
+ }
1190
+
1191
+ /* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
1192
+
1193
+ function add_css(target) {
1194
+ internal.append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
1195
+ }
1196
+
1197
+ // (41:0) {#if visible}
1198
+ function create_if_block(ctx) {
1199
+ let div;
1200
+ let div_resize_listener;
1201
+ let current;
1202
+ let if_block = /*clientWidth*/ ctx[6] !== 0 && create_if_block_1(ctx);
1203
+
1204
+ return {
1205
+ c() {
1206
+ div = internal.element("div");
1207
+ if (if_block) if_block.c();
1208
+ internal.attr(div, "class", "plugin-floorplan-radar svelte-1mvqyqq");
1209
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[12].call(div));
1210
+ },
1211
+ m(target, anchor) {
1212
+ internal.insert(target, div, anchor);
1213
+ if (if_block) if_block.m(div, null);
1214
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[12].bind(div));
1215
+ current = true;
1216
+ },
1217
+ p(ctx, dirty) {
1218
+ if (/*clientWidth*/ ctx[6] !== 0) {
1219
+ if (if_block) {
1220
+ if_block.p(ctx, dirty);
1221
+
1222
+ if (dirty & /*clientWidth*/ 64) {
1223
+ internal.transition_in(if_block, 1);
1224
+ }
1225
+ } else {
1226
+ if_block = create_if_block_1(ctx);
1227
+ if_block.c();
1228
+ internal.transition_in(if_block, 1);
1229
+ if_block.m(div, null);
1230
+ }
1231
+ } else if (if_block) {
1232
+ internal.group_outros();
1233
+
1234
+ internal.transition_out(if_block, 1, 1, () => {
1235
+ if_block = null;
1236
+ });
1237
+
1238
+ internal.check_outros();
1239
+ }
1240
+ },
1241
+ i(local) {
1242
+ if (current) return;
1243
+ internal.transition_in(if_block);
1244
+ current = true;
1245
+ },
1246
+ o(local) {
1247
+ internal.transition_out(if_block);
1248
+ current = false;
1249
+ },
1250
+ d(detaching) {
1251
+ if (detaching) internal.detach(div);
1252
+ if (if_block) if_block.d();
1253
+ div_resize_listener();
1254
+ }
1255
+ };
1256
+ }
1257
+
1258
+ // (43:4) {#if clientWidth !== 0}
1259
+ function create_if_block_1(ctx) {
1260
+ let div;
1261
+ let currentfloor;
1262
+ let t;
1263
+ let camera;
1264
+ let style_width = `${/*contentWidth*/ ctx[8]}px`;
1265
+ let style_height = `${/*contentHeight*/ ctx[11]}px`;
1266
+ let current;
1267
+
1268
+ const currentfloor_spread_levels = [
1269
+ {
1270
+ five: /*five*/ ctx[0],
1271
+ pxmm: /*pxmm*/ ctx[9],
1272
+ floorIndex: /*floorIndex*/ ctx[10],
1273
+ floorplanData: /*floorplanData*/ ctx[3],
1274
+ hoverEnable: /*hoverEnable*/ ctx[2],
1275
+ extraObjects: /*extraObjects*/ ctx[5]
1276
+ }
1277
+ ];
1278
+
1279
+ let currentfloor_props = {};
1280
+
1281
+ for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
1282
+ currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
1283
+ }
1284
+
1285
+ currentfloor = new CurrentFloor({ props: currentfloor_props });
1286
+
1287
+ const camera_spread_levels = [
1288
+ {
1289
+ pxmm: /*pxmm*/ ctx[9],
1290
+ five: /*five*/ ctx[0],
1291
+ floorplanData: /*floorplanData*/ ctx[3],
1292
+ cameraImageUrl: /*cameraImageUrl*/ ctx[4]
1293
+ }
1294
+ ];
1295
+
1296
+ let camera_props = {};
1297
+
1298
+ for (let i = 0; i < camera_spread_levels.length; i += 1) {
1299
+ camera_props = internal.assign(camera_props, camera_spread_levels[i]);
1300
+ }
1301
+
1302
+ camera = new Camera({ props: camera_props });
1303
+
1304
+ return {
1305
+ c() {
1306
+ div = internal.element("div");
1307
+ internal.create_component(currentfloor.$$.fragment);
1308
+ t = internal.space();
1309
+ internal.create_component(camera.$$.fragment);
1310
+ internal.attr(div, "class", "plugin-floorplan-radar-container svelte-1mvqyqq");
1311
+ internal.set_style(div, "width", style_width, false);
1312
+ internal.set_style(div, "height", style_height, false);
1313
+ },
1314
+ m(target, anchor) {
1315
+ internal.insert(target, div, anchor);
1316
+ internal.mount_component(currentfloor, div, null);
1317
+ internal.append(div, t);
1318
+ internal.mount_component(camera, div, null);
1319
+ current = true;
1320
+ },
1321
+ p(ctx, dirty) {
1322
+ const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, hoverEnable, extraObjects*/ 1581)
1323
+ ? internal.get_spread_update(currentfloor_spread_levels, [
1324
+ {
1325
+ five: /*five*/ ctx[0],
1326
+ pxmm: /*pxmm*/ ctx[9],
1327
+ floorIndex: /*floorIndex*/ ctx[10],
1328
+ floorplanData: /*floorplanData*/ ctx[3],
1329
+ hoverEnable: /*hoverEnable*/ ctx[2],
1330
+ extraObjects: /*extraObjects*/ ctx[5]
1331
+ }
1332
+ ])
1333
+ : {};
1334
+
1335
+ currentfloor.$set(currentfloor_changes);
1336
+
1337
+ const camera_changes = (dirty & /*pxmm, five, floorplanData, cameraImageUrl*/ 537)
1338
+ ? internal.get_spread_update(camera_spread_levels, [
1339
+ {
1340
+ pxmm: /*pxmm*/ ctx[9],
1341
+ five: /*five*/ ctx[0],
1342
+ floorplanData: /*floorplanData*/ ctx[3],
1343
+ cameraImageUrl: /*cameraImageUrl*/ ctx[4]
1344
+ }
1345
+ ])
1346
+ : {};
1347
+
1348
+ camera.$set(camera_changes);
1349
+
1350
+ if (dirty & /*contentWidth*/ 256 && style_width !== (style_width = `${/*contentWidth*/ ctx[8]}px`)) {
1351
+ internal.set_style(div, "width", style_width, false);
1352
+ }
1353
+
1354
+ if (dirty & /*contentHeight*/ 2048 && style_height !== (style_height = `${/*contentHeight*/ ctx[11]}px`)) {
1355
+ internal.set_style(div, "height", style_height, false);
1356
+ }
1357
+ },
1358
+ i(local) {
1359
+ if (current) return;
1360
+ internal.transition_in(currentfloor.$$.fragment, local);
1361
+ internal.transition_in(camera.$$.fragment, local);
1362
+ current = true;
1363
+ },
1364
+ o(local) {
1365
+ internal.transition_out(currentfloor.$$.fragment, local);
1366
+ internal.transition_out(camera.$$.fragment, local);
1367
+ current = false;
1368
+ },
1369
+ d(detaching) {
1370
+ if (detaching) internal.detach(div);
1371
+ internal.destroy_component(currentfloor);
1372
+ internal.destroy_component(camera);
1373
+ }
1374
+ };
1375
+ }
1376
+
1377
+ function create_fragment(ctx) {
1378
+ let if_block_anchor;
1379
+ let current;
1380
+ let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
1381
+
1382
+ return {
1383
+ c() {
1384
+ if (if_block) if_block.c();
1385
+ if_block_anchor = internal.empty();
1386
+ },
1387
+ m(target, anchor) {
1388
+ if (if_block) if_block.m(target, anchor);
1389
+ internal.insert(target, if_block_anchor, anchor);
1390
+ current = true;
1391
+ },
1392
+ p(ctx, [dirty]) {
1393
+ if (/*visible*/ ctx[1]) {
1394
+ if (if_block) {
1395
+ if_block.p(ctx, dirty);
1396
+
1397
+ if (dirty & /*visible*/ 2) {
1398
+ internal.transition_in(if_block, 1);
1399
+ }
1400
+ } else {
1401
+ if_block = create_if_block(ctx);
1402
+ if_block.c();
1403
+ internal.transition_in(if_block, 1);
1404
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
1405
+ }
1406
+ } else if (if_block) {
1407
+ internal.group_outros();
1408
+
1409
+ internal.transition_out(if_block, 1, 1, () => {
1410
+ if_block = null;
1411
+ });
1412
+
1413
+ internal.check_outros();
1414
+ }
1415
+ },
1416
+ i(local) {
1417
+ if (current) return;
1418
+ internal.transition_in(if_block);
1419
+ current = true;
1420
+ },
1421
+ o(local) {
1422
+ internal.transition_out(if_block);
1423
+ current = false;
1424
+ },
1425
+ d(detaching) {
1426
+ if (if_block) if_block.d(detaching);
1427
+ if (detaching) internal.detach(if_block_anchor);
1428
+ }
1429
+ };
1430
+ }
1431
+
1432
+ function instance($$self, $$props, $$invalidate) {
1433
+ let { five } = $$props;
1434
+ let { visible } = $$props;
1435
+ let { hoverEnable } = $$props;
1436
+ let { floorplanData } = $$props;
1437
+ let { cameraImageUrl } = $$props;
1438
+ let { extraObjects = [] } = $$props;
1439
+ let pxmm = 0;
1440
+ let floorIndex = 0;
1441
+ let clientWidth = 0;
1442
+ let clientHeight = 0;
1443
+ let contentWidth = 0;
1444
+ let contentHeight = 0;
1445
+
1446
+ function handlePanoArrived(panoIndex) {
1447
+ $$invalidate(10, floorIndex = five.work.observers[panoIndex].floorIndex);
1448
+ }
1449
+
1450
+ svelte.onMount(() => {
1451
+ five.on('panoArrived', handlePanoArrived);
1452
+
1453
+ return () => {
1454
+ five.off('panoArrived', handlePanoArrived);
1455
+ };
1456
+ });
1457
+
1458
+ function div_elementresize_handler() {
1459
+ clientWidth = this.clientWidth;
1460
+ clientHeight = this.clientHeight;
1461
+ $$invalidate(6, clientWidth);
1462
+ $$invalidate(7, clientHeight);
1463
+ }
1464
+
1465
+ $$self.$$set = $$props => {
1466
+ if ('five' in $$props) $$invalidate(0, five = $$props.five);
1467
+ if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
1468
+ if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
1469
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
1470
+ if ('cameraImageUrl' in $$props) $$invalidate(4, cameraImageUrl = $$props.cameraImageUrl);
1471
+ if ('extraObjects' in $$props) $$invalidate(5, extraObjects = $$props.extraObjects);
1472
+ };
1473
+
1474
+ $$self.$$.update = () => {
1475
+ if ($$self.$$.dirty & /*clientWidth, clientHeight, floorplanData, contentWidth*/ 456) {
1476
+ {
1477
+ const size = Math.min(clientWidth, clientHeight);
1478
+ const { max, min } = floorplanData.bounding;
1479
+ const boundingWidth = max.x - min.x;
1480
+ const boundingHeight = max.y - min.y;
1481
+
1482
+ const contentSize = (function getSize() {
1483
+ if (boundingWidth > boundingHeight) return [size, size / boundingWidth * boundingHeight];
1484
+ return [size / boundingHeight * boundingWidth, size];
1485
+ })();
1486
+
1487
+ $$invalidate(8, contentWidth = contentSize[0]);
1488
+ $$invalidate(11, contentHeight = contentSize[1]);
1489
+ $$invalidate(9, pxmm = contentWidth / boundingWidth);
1490
+ }
1491
+ }
1492
+ };
1493
+
1494
+ return [
1495
+ five,
1496
+ visible,
1497
+ hoverEnable,
1498
+ floorplanData,
1499
+ cameraImageUrl,
1500
+ extraObjects,
1501
+ clientWidth,
1502
+ clientHeight,
1503
+ contentWidth,
1504
+ pxmm,
1505
+ floorIndex,
1506
+ contentHeight,
1507
+ div_elementresize_handler
1508
+ ];
1509
+ }
1510
+
1511
+ class Main extends internal.SvelteComponent {
1512
+ constructor(options) {
1513
+ super();
1514
+
1515
+ internal.init(
1516
+ this,
1517
+ options,
1518
+ instance,
1519
+ create_fragment,
1520
+ internal.safe_not_equal,
1521
+ {
1522
+ five: 0,
1523
+ visible: 1,
1524
+ hoverEnable: 2,
1525
+ floorplanData: 3,
1526
+ cameraImageUrl: 4,
1527
+ extraObjects: 5
1528
+ },
1529
+ add_css
1530
+ );
1531
+ }
1532
+ }
1533
+
1534
+ /**
1535
+ * 检查一个值是否是狭义上的对象
1536
+ * @param {any} value 要检查的值
1537
+ *
1538
+ * isTruelyObject({})
1539
+ * // => true
1540
+ *
1541
+ * isObjectLike([1, 2, 3])
1542
+ * // => false
1543
+ *
1544
+ * isObjectLike(Function)
1545
+ * // => false
1546
+ *
1547
+ * isObjectLike(null)
1548
+ * // => false
1549
+ *
1550
+ */
1551
+ function isTruelyObject(value) {
1552
+ return Object.prototype.toString.call(value) === '[object Object]';
1553
+ }
1554
+
1555
+ /* eslint-disable @typescript-eslint/no-use-before-define */
1556
+ function baseIsEqual(value, other) {
1557
+ if (value === other)
1558
+ return true;
1559
+ if (typeof value !== typeof other)
1560
+ return false;
1561
+ if (Number.isNaN(value) && Number.isNaN(other))
1562
+ return true;
1563
+ return false;
1564
+ }
1565
+ function objEqualShallow(value, other) {
1566
+ const valueProps = Object.getOwnPropertyNames(value);
1567
+ const otherProps = Object.getOwnPropertyNames(other);
1568
+ if (valueProps.length !== otherProps.length)
1569
+ return false;
1570
+ for (let i = 0, len = valueProps.length; i < len; i++) {
1571
+ const propName = valueProps[i];
1572
+ if (!baseIsEqual(value[propName], other[propName]))
1573
+ return false;
1574
+ }
1575
+ return true;
1576
+ }
1577
+ function arrayEqualShallow(value, other) {
1578
+ if (value.length !== other.length)
1579
+ return false;
1580
+ for (let i = 0, len = value.length; i < len; i++) {
1581
+ if (!baseIsEqual(value[i], other[i]))
1582
+ return false;
1583
+ }
1584
+ return true;
1585
+ }
1586
+ function isShallowEqual(value, other) {
1587
+ if (baseIsEqual(value, other))
1588
+ return true;
1589
+ if (isTruelyObject(value) && isTruelyObject(other))
1590
+ return objEqualShallow(value, other);
1591
+ if (Array.isArray(value) && Array.isArray(other))
1592
+ return arrayEqualShallow(value, other);
1593
+ return false;
1594
+ }
1595
+ function isDeepEqual(value, other) {
1596
+ if (baseIsEqual(value, other))
1597
+ return true;
1598
+ if (isTruelyObject(value) && isTruelyObject(other))
1599
+ return objEqualDeep(value, other);
1600
+ if (Array.isArray(value) && Array.isArray(other))
1601
+ return arrayEqualDeep(value, other);
1602
+ return false;
1603
+ }
1604
+ function arrayEqualDeep(value, other) {
1605
+ if (value.length !== other.length)
1606
+ return false;
1607
+ for (let i = 0, len = value.length; i < len; i++) {
1608
+ if (!isDeepEqual(value[i], other[i]))
1609
+ return false;
1610
+ }
1611
+ return true;
1612
+ }
1613
+ function objEqualDeep(value, other) {
1614
+ const valueProps = Object.getOwnPropertyNames(value);
1615
+ const otherProps = Object.getOwnPropertyNames(other);
1616
+ if (valueProps.length !== otherProps.length)
1617
+ return false;
1618
+ for (let i = 0, len = valueProps.length; i < len; i++) {
1619
+ const propName = valueProps[i];
1620
+ if (!isDeepEqual(value[propName], other[propName]))
1621
+ return false;
1622
+ }
1623
+ return true;
1624
+ }
1625
+ /**
1626
+ * 对象比较
1627
+ * @param {*} value 第一个比较的值
1628
+ * @param {*} other 第二个比较的值
1629
+ * @param {Object} options 可选参数,可选项包括:<br />
1630
+ * deep {Boolean} 是否深比较<br />
1631
+ * @returns {boolean} 是否相等
1632
+ */
1633
+ function equal(value, other, opt = { deep: false }) {
1634
+ if (!opt.deep)
1635
+ return isShallowEqual(value, other);
1636
+ return isDeepEqual(value, other);
1637
+ }
1638
+
1639
+ /**
1640
+ * plugin 的基本控制器
1641
+ */
1642
+ class Controller$2 {
1643
+ constructor(five$1) {
1644
+ Object.defineProperty(this, "five", {
1645
+ enumerable: true,
1646
+ configurable: true,
1647
+ writable: true,
1648
+ value: void 0
1649
+ });
1650
+ /**
1651
+ * 插件事件钩子
1652
+ */
1653
+ Object.defineProperty(this, "hooks", {
1654
+ enumerable: true,
1655
+ configurable: true,
1656
+ writable: true,
1657
+ value: new five.Subscribe()
1658
+ });
1659
+ this.five = five$1;
1660
+ }
1661
+ /**
1662
+ * 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
1663
+ */
1664
+ getCurrentState() {
1665
+ return this.state;
1666
+ }
1667
+ }
1668
+
1669
+ class Controller$1 extends Controller$2 {
1670
+ }
1671
+
1672
+ const FLOORPLAN_EXTRA_OBJECT_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC';
1673
+
1674
+ async function formatOutlines(outlines) {
1675
+ const headers = new Headers({ 'Content-Type': 'text/plain' });
1676
+ const getOutlineItem = async function (item) {
1677
+ const outlineItem = {
1678
+ index: item.index,
1679
+ url: item.url,
1680
+ svgUrl: item.svg_url,
1681
+ };
1682
+ if (item.svg_url) {
1683
+ const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
1684
+ outlineItem.svgContent = svgContent;
1685
+ }
1686
+ return outlineItem;
1687
+ };
1688
+ const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
1689
+ return svgOutlineItems;
1690
+ }
1691
+ function formatRoom(data) {
1692
+ const floorplanRoomItem = {
1693
+ id: data.id,
1694
+ size: data.size,
1695
+ name: data.name,
1696
+ path: data.path,
1697
+ roomType: data.room_type,
1698
+ floorType: data.floor_type,
1699
+ roomLabel: {
1700
+ position: data.room_label.position,
1701
+ positionInImage: data.room_label.position_in_image,
1702
+ },
1703
+ observerIndexs: data.observer_indexs,
1704
+ };
1705
+ return floorplanRoomItem;
1706
+ }
1707
+ function formatFloorData(_data) {
1708
+ return {
1709
+ floorName: _data.floor_name,
1710
+ floorIndex: _data.floor_index,
1711
+ rooms: _data.rooms.map(formatRoom),
1712
+ rules: _data.rules,
1713
+ };
1714
+ }
1715
+ function formateFloorplanObserver(data) {
1716
+ const floorplanObserver = {
1717
+ index: data.index,
1718
+ floorIndex: data.floor_index,
1719
+ position: data.position,
1720
+ positionInImage: data.position_in_image,
1721
+ };
1722
+ return floorplanObserver;
1723
+ }
1724
+ function formatFloorplanEntrance(data) {
1725
+ const floorplanEntrance = {
1726
+ rad: data.rad,
1727
+ position: data.position,
1728
+ positionInImage: data.position_in_image,
1729
+ northRad: data.north_rad,
1730
+ roomId: data.room_id,
1731
+ floorIndex: data.floor_index,
1732
+ };
1733
+ return floorplanEntrance;
1734
+ }
1735
+ async function formatData(data) {
1736
+ const outlines = await formatOutlines(data.outlines);
1737
+ const bounding = data.computed_data.bounding;
1738
+ const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
1739
+ const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
1740
+ const floorplanData = {
1741
+ outlines,
1742
+ entrance,
1743
+ bounding,
1744
+ floorDatas,
1745
+ observers: data.computed_data.observers.map(formateFloorplanObserver),
1746
+ };
1747
+ return floorplanData;
1748
+ }
1749
+ function formatExtraObjects(data, five, floorplanData) {
1750
+ const extraObjects = data.map((object) => {
1751
+ const position = object.position;
1752
+ const icon = object.icon
1753
+ ? object.icon
1754
+ : {
1755
+ url: FLOORPLAN_EXTRA_OBJECT_IMAGE,
1756
+ width: 45,
1757
+ height: 48,
1758
+ };
1759
+ const floorIndex = getFloorIndexFromModelPosition(position, five);
1760
+ const floorplanPosition = modelPosition2FloorplanPosition(position, floorplanData);
1761
+ const floorplanImagePosition = floorplanPosition2ImagePosition(floorplanPosition, floorplanData);
1762
+ return { floorIndex, icon, id: object.id, position: floorplanPosition, positionInImage: floorplanImagePosition };
1763
+ });
1764
+ return extraObjects;
1765
+ }
1766
+
1767
+ class Controller extends Controller$1 {
1768
+ constructor(five, params) {
1769
+ super(five);
1770
+ // =============== public properties =================
1771
+ Object.defineProperty(this, "name", {
1772
+ enumerable: true,
1773
+ configurable: true,
1774
+ writable: true,
1775
+ value: 'panoFloorplanRadarPlugin'
1776
+ });
1777
+ Object.defineProperty(this, "state", {
1778
+ enumerable: true,
1779
+ configurable: true,
1780
+ writable: true,
1781
+ value: void 0
1782
+ });
1783
+ // =============== protected properties =================
1784
+ Object.defineProperty(this, "data", {
1785
+ enumerable: true,
1786
+ configurable: true,
1787
+ writable: true,
1788
+ value: void 0
1789
+ });
1790
+ // =============== private properties =================
1791
+ Object.defineProperty(this, "app", {
1792
+ enumerable: true,
1793
+ configurable: true,
1794
+ writable: true,
1795
+ value: void 0
1796
+ });
1797
+ Object.defineProperty(this, "wrapperSelector", {
1798
+ enumerable: true,
1799
+ configurable: true,
1800
+ writable: true,
1801
+ value: ''
1802
+ });
1803
+ Object.defineProperty(this, "wrapper", {
1804
+ enumerable: true,
1805
+ configurable: true,
1806
+ writable: true,
1807
+ value: null
1808
+ });
1809
+ Object.defineProperty(this, "disposed", {
1810
+ enumerable: true,
1811
+ configurable: true,
1812
+ writable: true,
1813
+ value: false
1814
+ });
1815
+ Object.defineProperty(this, "extraObjects", {
1816
+ enumerable: true,
1817
+ configurable: true,
1818
+ writable: true,
1819
+ value: []
1820
+ });
1821
+ Object.defineProperty(this, "dispose", {
1822
+ enumerable: true,
1823
+ configurable: true,
1824
+ writable: true,
1825
+ value: () => {
1826
+ var _a;
1827
+ this.disposed = true;
1828
+ (_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
1829
+ this.wrapper = null;
1830
+ this.wrapperSelector = '';
1831
+ this.hooks.emit('dispose');
1832
+ }
1833
+ });
1834
+ Object.defineProperty(this, "_disable", {
1835
+ enumerable: true,
1836
+ configurable: true,
1837
+ writable: true,
1838
+ value: (options) => {
1839
+ var _a;
1840
+ const { userAction } = options;
1841
+ (_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
1842
+ this.app = undefined;
1843
+ this.hooks.emit('disable', { userAction });
1844
+ }
1845
+ });
1846
+ this.five = five;
1847
+ // =============== init State ===============
1848
+ const baseConfig = {
1849
+ hoverEnable: false,
1850
+ cameraImageUrl: CAMERA_IMAGE,
1851
+ };
1852
+ const paramsConfig = (params === null || params === void 0 ? void 0 : params.configs) ? params.configs : {};
1853
+ const config = Object.assign(Object.assign({}, baseConfig), paramsConfig);
1854
+ this.state = { enabled: true, visible: true, config };
1855
+ // =============== init wrapper ===============
1856
+ if (params === null || params === void 0 ? void 0 : params.wrapper)
1857
+ console.warn('不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法');
1858
+ if (typeof (params === null || params === void 0 ? void 0 : params.wrapper) === 'string')
1859
+ this.wrapperSelector = params.wrapper;
1860
+ else if ((params === null || params === void 0 ? void 0 : params.wrapper) instanceof Element)
1861
+ this.wrapper = params.wrapper;
1862
+ // =============== init Listener ===============
1863
+ five.once('dispose', this.dispose);
1864
+ }
1865
+ async load(serverData, state, userAction = true) {
1866
+ // const loadImage = async () => {
1867
+ // const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
1868
+ // // 当有 svgString 时,没有加载过程
1869
+ // if (floorplanData.outlines[floorIndex]?.svgContent) return
1870
+ // // 如果当前楼层图片不存在,不存在加载过程
1871
+ // const nowFloorImageSrc = floorplanData.outlines[floorIndex]?.url
1872
+ // if (!nowFloorImageSrc) return
1873
+ // // 图片加载完成时再 render
1874
+ // await new Promise<void>((resolve) => {
1875
+ // const nowFloorImage = new Image()
1876
+ // nowFloorImage.src = nowFloorImageSrc
1877
+ // nowFloorImage.onload = () => resolve()
1878
+ // })
1879
+ // }
1880
+ // await loadImage()
1881
+ function isPluginServerData(serverData) {
1882
+ return Object.prototype.hasOwnProperty.apply(serverData, ['version']);
1883
+ }
1884
+ const copyData = JSON.parse(JSON.stringify(serverData));
1885
+ const _serverData = isPluginServerData(copyData) ? copyData.data : copyData;
1886
+ const prevData = this.data;
1887
+ this.data = await formatData(_serverData);
1888
+ this.hooks.emit('dataLoaded', this.data);
1889
+ this.hooks.emit('dataChange', this.data, prevData);
1890
+ if (state)
1891
+ this.updateState(state, userAction);
1892
+ this.render();
1893
+ }
1894
+ async show(options = {}) {
1895
+ // 已经展示完成了,不做任何操作
1896
+ if (this.state.visible)
1897
+ return;
1898
+ const userAction = options.userAction !== undefined ? options.userAction : true;
1899
+ this.updateState({ visible: true }, userAction);
1900
+ this._show({ userAction });
1901
+ }
1902
+ async hide(options = {}) {
1903
+ if (!this.state.visible)
1904
+ return;
1905
+ const userAction = options.userAction !== undefined ? options.userAction : true;
1906
+ this.updateState({ visible: false }, userAction);
1907
+ this._hide({ userAction });
1908
+ }
1909
+ enable(options = {}) {
1910
+ if (this.state.enabled)
1911
+ return;
1912
+ const userAction = options.userAction !== undefined ? options.userAction : true;
1913
+ this.updateState({ enabled: true }, options.userAction || userAction);
1914
+ this._enable({ userAction });
1915
+ }
1916
+ disable(options = {}) {
1917
+ if (!this.state.enabled)
1918
+ return;
1919
+ const userAction = options.userAction !== undefined ? options.userAction : true;
1920
+ this.updateState({ enabled: false }, options.userAction || userAction);
1921
+ this._disable({ userAction });
1922
+ }
1923
+ /** 更改插件 State */
1924
+ setState(state, options = {}) {
1925
+ const prevState = this.state;
1926
+ const userAction = options.userAction !== undefined ? options.userAction : true;
1927
+ this.updateState(state, userAction);
1928
+ if (state.enabled !== undefined && prevState.enabled !== state.enabled) {
1929
+ const options = { userAction };
1930
+ state.enabled ? this._enable(options) : this._disable(options);
1931
+ }
1932
+ if (state.visible !== undefined && prevState.visible !== state.visible) {
1933
+ const options = { userAction };
1934
+ state.visible ? this._show(options) : this._hide(options);
1935
+ }
1936
+ }
1937
+ /** 把插件的渲染DOM插入到对应的容器中去 */
1938
+ appendTo(wrapper) {
1939
+ this.wrapper = wrapper;
1940
+ this.render();
1941
+ }
1942
+ changeConfigs(config, userAction = true) {
1943
+ this.setState({ config }, { userAction });
1944
+ this.render();
1945
+ }
1946
+ setExtraObjectsWith3DPositions(data) {
1947
+ if (!this.data)
1948
+ return;
1949
+ this.extraObjects = formatExtraObjects(data, this.five, this.data);
1950
+ this.render();
1951
+ }
1952
+ async formatData(serverData) {
1953
+ return await formatData(serverData.data);
1954
+ }
1955
+ _enable(options) {
1956
+ const { userAction } = options;
1957
+ this.hooks.emit('enable', { userAction });
1958
+ if (this.state.visible)
1959
+ this._show({ userAction });
1960
+ }
1961
+ _show(options) {
1962
+ if (this.disposed)
1963
+ return;
1964
+ if (!this.state.enabled)
1965
+ return;
1966
+ const { userAction } = options;
1967
+ this.hooks.emit('show', { userAction });
1968
+ this.render();
1969
+ }
1970
+ _hide(options) {
1971
+ if (this.disposed)
1972
+ return;
1973
+ if (!this.state.enabled)
1974
+ return;
1975
+ const { userAction } = options;
1976
+ this.hooks.emit('hide', { userAction });
1977
+ this.render();
1978
+ }
1979
+ updateState(state, userAction) {
1980
+ const prevState = this.state;
1981
+ this.state = Object.assign(Object.assign({}, this.state), state);
1982
+ if (equal(this.state, prevState, { deep: true }))
1983
+ return;
1984
+ this.hooks.emit('stateChange', { state: this.state, prevState, userAction });
1985
+ }
1986
+ render() {
1987
+ if (this.disposed)
1988
+ return;
1989
+ if (!this.state.enabled)
1990
+ return;
1991
+ // 处理 wrapper
1992
+ if (!this.wrapper && this.wrapperSelector) {
1993
+ const _wrapper = document.querySelector(this.wrapperSelector);
1994
+ this.wrapper = _wrapper;
1995
+ }
1996
+ if (!this.data || !this.wrapper)
1997
+ return;
1998
+ const props = Object.assign(Object.assign({}, this.state.config), { five: this.five, floorplanData: this.data, visible: this.state.visible, extraObjects: this.extraObjects });
1999
+ this.app ? this.app.$set(props) : (this.app = new Main({ target: this.wrapper, props }));
2000
+ }
2001
+ }
2002
+
2003
+ const PanoFloorplanRadarPlugin = (five, params) => {
2004
+ return new Controller(five, params);
2005
+ };
2006
+
2007
+ exports.PanoFloorplanRadarPlugin = PanoFloorplanRadarPlugin;
2008
+ exports["default"] = PanoFloorplanRadarPlugin;