@realsee/dnalogel 0.1.7 → 2.0.0-alpha.11

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 (731) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +24 -68
  3. package/{plugins → dist}/CSS3DRenderPlugin/index.d.ts +1 -1
  4. package/dist/CSS3DRenderPlugin/index.js +231 -0
  5. package/dist/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  6. package/{plugins → dist}/CameraMovementPlugin/index.d.ts +0 -0
  7. package/dist/CameraMovementPlugin/index.js +302 -0
  8. package/{plugins → dist}/CameraMovementPlugin/typing.d.ts +0 -0
  9. package/{plugins → dist}/ModelChassisCompassPlugin/index.d.ts +1 -1
  10. package/dist/ModelChassisCompassPlugin/index.js +142 -0
  11. package/{plugins → dist}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
  12. package/dist/ModelEntryDoorGuidePlugin/index.js +196 -0
  13. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  14. package/{plugins → dist}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
  15. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  16. package/dist/ModelRoomLabelPlugin/index.js +463 -0
  17. package/{plugins → dist}/ModelRoomLabelPlugin/typings.d.ts +2 -2
  18. package/{plugins → dist}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
  19. package/{plugins → dist}/ModelViewPlugin/index.d.ts +0 -0
  20. package/dist/ModelViewPlugin/index.js +187 -0
  21. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  22. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  23. package/dist/PanoCompassPlugin/index.d.ts +51 -0
  24. package/dist/PanoCompassPlugin/index.js +521 -0
  25. package/{plugins → dist}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
  26. package/dist/PanoCursorRaycasterPlugin/index.js +88 -0
  27. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  28. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  29. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  30. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  31. package/dist/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  32. package/dist/PanoMeasurePlugin/Model/index.d.ts +38 -0
  33. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  34. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  35. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  36. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  37. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  38. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  39. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  40. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  41. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  42. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  43. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  44. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  45. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
  46. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  47. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  48. package/dist/PanoMeasurePlugin/index.d.ts +7 -0
  49. package/dist/PanoMeasurePlugin/index.js +4789 -0
  50. package/dist/PanoMeasurePlugin/typings/data.d.ts +28 -0
  51. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  52. package/dist/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  53. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  54. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  55. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  56. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  57. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  58. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  59. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  60. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  61. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  62. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  63. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  64. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  65. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  66. package/{plugins → dist}/PanoRulerPlugin/index.d.ts +9 -5
  67. package/dist/PanoRulerPlugin/index.js +610 -0
  68. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  69. package/{plugins → dist}/PanoRulerPlugin/typings.d.ts +0 -0
  70. package/dist/PanoSpatialTagPlugin/index.d.ts +33 -0
  71. package/dist/PanoSpatialTagPlugin/index.js +1259 -0
  72. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  73. package/{plugins/floorplan/TopviewFloorplanPlugin → dist/PanoSpatialTagPlugin}/style.d.ts +0 -0
  74. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  75. package/dist/floorplan/Assets/camera.d.ts +1 -0
  76. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  77. package/dist/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  78. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/Controller.d.ts +19 -14
  79. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
  80. package/dist/floorplan/ModelFloorplanPlugin/index.js +3842 -0
  81. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
  82. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
  83. package/{plugins → dist}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
  84. package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
  85. package/{plugins → dist}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
  86. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +1673 -0
  87. package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +18 -11
  88. package/{plugins → dist}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
  89. package/dist/floorplan/TopviewFloorplanPlugin/index.js +3481 -0
  90. package/{plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts → dist/floorplan/TopviewFloorplanPlugin/style.d.ts} +0 -0
  91. package/dist/floorplan/constant.d.ts +5 -0
  92. package/{plugins → dist}/floorplan/typings/floorplanData.d.ts +6 -0
  93. package/{plugins → dist}/floorplan/typings/floorplanServerData.d.ts +8 -2
  94. package/dist/floorplan/typings/utility.d.ts +2 -0
  95. package/{plugins → dist}/floorplan/utils/formatData.d.ts +3 -3
  96. package/{plugins → dist}/floorplan/utils/formatPosition.d.ts +3 -4
  97. package/dist/index.d.ts +26 -0
  98. package/dist/index.es.js +12928 -0
  99. package/dist/index.js +12967 -0
  100. package/dist/index.umd.js +12961 -0
  101. package/{shared-utils → dist/shared-utils}/Preloader.d.ts +0 -0
  102. package/{shared-utils → dist/shared-utils}/Subscribe.d.ts +3 -3
  103. package/{shared-utils → dist/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
  104. package/{shared-utils → dist/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
  105. package/{shared-utils → dist/shared-utils}/animationFrame/formatRad.d.ts +0 -0
  106. package/{shared-utils → dist/shared-utils}/animationFrame/index.d.ts +0 -0
  107. package/{shared-utils → dist/shared-utils}/animationFrame/tween.d.ts +0 -0
  108. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  109. package/{shared-utils → dist/shared-utils}/createCanvasTextTexture.d.ts +0 -0
  110. package/{shared-utils → dist/shared-utils}/createLine/index.d.ts +1 -1
  111. package/{shared-utils → dist/shared-utils}/debounce.d.ts +1 -1
  112. package/{shared-utils → dist/shared-utils}/equal.d.ts +0 -0
  113. package/{shared-utils → dist/shared-utils}/filter.d.ts +0 -0
  114. package/{shared-utils → dist/shared-utils}/five/changeMode.d.ts +0 -0
  115. package/{shared-utils → dist/shared-utils}/five/useFivePlugin.d.ts +0 -0
  116. package/{shared-utils → dist/shared-utils}/formatRad.d.ts +0 -0
  117. package/dist/shared-utils/getPxmm.d.ts +11 -0
  118. package/{shared-utils → dist/shared-utils}/getRandomColor.d.ts +0 -0
  119. package/{shared-utils → dist/shared-utils}/isNil.d.ts +0 -0
  120. package/{shared-utils → dist/shared-utils}/isTruelyObject.d.ts +0 -0
  121. package/dist/shared-utils/math/evenNumber.d.ts +3 -0
  122. package/{shared-utils → dist/shared-utils}/math/planimetry.d.ts +4 -4
  123. package/{shared-utils → dist/shared-utils}/math/rad2Deg.d.ts +0 -0
  124. package/{shared-utils → dist/shared-utils}/nearlyEqual.d.ts +0 -0
  125. package/{shared-utils → dist/shared-utils}/nextFrame.d.ts +0 -0
  126. package/{shared-utils → dist/shared-utils}/noop.d.ts +0 -0
  127. package/{shared-utils → dist/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
  128. package/{shared-utils → dist/shared-utils}/px2rem.d.ts +0 -0
  129. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  130. package/{shared-utils → dist/shared-utils}/tap.d.ts +0 -0
  131. package/{shared-utils → dist/shared-utils}/three/centerPoint.d.ts +0 -0
  132. package/{shared-utils → dist/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
  133. package/{shared-utils → dist/shared-utils}/three/getNormal.d.ts +0 -0
  134. package/{shared-utils → dist/shared-utils}/three/getTextureLoader.d.ts +0 -0
  135. package/{shared-utils → dist/shared-utils}/three/loadFbxObj.d.ts +0 -0
  136. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  137. package/{shared-utils → dist/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
  138. package/{shared-utils → dist/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
  139. package/{shared-utils → dist/shared-utils}/throttle.d.ts +1 -1
  140. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  141. package/{shared-utils → dist/shared-utils}/to.d.ts +0 -0
  142. package/{shared-utils → dist/shared-utils}/useDebounce.d.ts +0 -0
  143. package/{shared-utils → dist/shared-utils}/useThrottle.d.ts +0 -0
  144. package/{libs/gltf-viewer → dist/shared-utils}/uuid.d.ts +0 -0
  145. package/{shared-utils → dist/shared-utils}/vectorTocoordinates.d.ts +0 -0
  146. package/{typings → dist/typings}/math.type.d.ts +0 -0
  147. package/{typings → dist/typings}/utils.type.d.ts +0 -0
  148. package/docs/.nojekyll +1 -0
  149. package/docs/assets/highlight.css +78 -0
  150. package/docs/assets/icons.css +1043 -0
  151. package/docs/assets/icons.png +0 -0
  152. package/docs/assets/icons@2x.png +0 -0
  153. package/docs/assets/main.js +52 -0
  154. package/docs/assets/search.js +1 -0
  155. package/docs/assets/style.css +1413 -0
  156. package/docs/assets/widgets.png +0 -0
  157. package/docs/assets/widgets@2x.png +0 -0
  158. package/docs/classes/ModelRoomLabelController.html +20 -0
  159. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -0
  160. package/docs/enums/ModelFloorplanErrorType.html +1 -0
  161. package/docs/index.html +43 -0
  162. package/docs/interfaces/LineJson.html +1 -0
  163. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -0
  164. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -0
  165. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -0
  166. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -0
  167. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -0
  168. package/docs/interfaces/ModelFloorplanParameterType.html +1 -0
  169. package/docs/interfaces/ModelFloorplanViewEvent.html +5 -0
  170. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -0
  171. package/docs/interfaces/PanoCompassPluginData.html +1 -0
  172. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -0
  173. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +11 -0
  174. package/docs/interfaces/PanoRulerPluginExportType.html +1 -0
  175. package/docs/interfaces/PanoRulerPluginOptions.html +1 -0
  176. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -0
  177. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -0
  178. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -0
  179. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -0
  180. package/docs/interfaces/PointJson.html +1 -0
  181. package/docs/interfaces/RoomLabel.html +13 -0
  182. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -0
  183. package/docs/modules.html +28 -0
  184. package/libs/CSS3DRenderPlugin/index.d.ts +49 -0
  185. package/libs/CSS3DRenderPlugin/index.js +179 -0
  186. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  187. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
  188. package/libs/CameraMovementPlugin/index.d.ts +7 -0
  189. package/libs/CameraMovementPlugin/index.js +159 -0
  190. package/libs/CameraMovementPlugin/typing.d.ts +68 -0
  191. package/libs/CameraMovementPlugin/typing.js +17 -0
  192. package/libs/ModelChassisCompassPlugin/index.d.ts +19 -0
  193. package/libs/ModelChassisCompassPlugin/index.js +75 -0
  194. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +26 -0
  195. package/libs/ModelEntryDoorGuidePlugin/index.js +137 -0
  196. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  197. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
  198. package/libs/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  199. package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
  200. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +121 -0
  201. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +255 -0
  202. package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
  203. package/libs/ModelRoomLabelPlugin/index.js +9 -0
  204. package/libs/ModelRoomLabelPlugin/typings.d.ts +35 -0
  205. package/libs/ModelRoomLabelPlugin/typings.js +1 -0
  206. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  207. package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
  208. package/libs/ModelViewPlugin/index.d.ts +17 -0
  209. package/libs/ModelViewPlugin/index.js +160 -0
  210. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  211. package/libs/PanoCompassPlugin/Assets/roomInfoIcon.js +1 -0
  212. package/libs/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  213. package/libs/PanoCompassPlugin/getRoomInfoInstance.js +48 -0
  214. package/libs/PanoCompassPlugin/index.d.ts +51 -0
  215. package/libs/PanoCompassPlugin/index.js +171 -0
  216. package/libs/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  217. package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
  218. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
  219. package/libs/PanoMeasurePlugin/Controller/BaseController.js +69 -0
  220. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
  221. package/libs/PanoMeasurePlugin/Controller/EditController.js +216 -0
  222. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  223. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +44 -0
  224. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
  225. package/libs/PanoMeasurePlugin/Controller/WatchController.js +223 -0
  226. package/libs/PanoMeasurePlugin/Controller/index.d.ts +61 -0
  227. package/libs/PanoMeasurePlugin/Controller/index.js +176 -0
  228. package/libs/PanoMeasurePlugin/Model/index.d.ts +38 -0
  229. package/libs/PanoMeasurePlugin/Model/index.js +114 -0
  230. package/libs/PanoMeasurePlugin/Model/line.d.ts +30 -0
  231. package/libs/PanoMeasurePlugin/Model/line.js +64 -0
  232. package/libs/PanoMeasurePlugin/Model/point.d.ts +16 -0
  233. package/libs/PanoMeasurePlugin/Model/point.js +28 -0
  234. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  235. package/libs/PanoMeasurePlugin/Model/polyline.js +48 -0
  236. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  237. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +15 -0
  238. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  239. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +2 -0
  240. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  241. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +2 -0
  242. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
  243. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +108 -0
  244. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  245. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +33 -0
  246. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  247. package/libs/PanoMeasurePlugin/Modules/GuideController.js +75 -0
  248. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
  249. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +103 -0
  250. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
  251. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +117 -0
  252. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
  253. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +102 -0
  254. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
  255. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +35 -0
  256. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
  257. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +69 -0
  258. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
  259. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +78 -0
  260. package/libs/PanoMeasurePlugin/index.d.ts +7 -0
  261. package/libs/PanoMeasurePlugin/index.js +5 -0
  262. package/libs/PanoMeasurePlugin/typings/data.d.ts +28 -0
  263. package/libs/PanoMeasurePlugin/typings/data.js +1 -0
  264. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
  265. package/libs/PanoMeasurePlugin/typings/event.type.js +1 -0
  266. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  267. package/libs/PanoMeasurePlugin/typings/utils.type.js +1 -0
  268. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  269. package/libs/PanoMeasurePlugin/utils/clearGroup.js +3 -0
  270. package/libs/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  271. package/libs/PanoMeasurePlugin/utils/constants.js +31 -0
  272. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  273. package/libs/PanoMeasurePlugin/utils/distanceDom.js +114 -0
  274. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  275. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.js +21 -0
  276. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  277. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +27 -0
  278. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  279. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +9 -0
  280. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  281. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +14 -0
  282. package/libs/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  283. package/libs/PanoMeasurePlugin/utils/ironbox.js +1 -0
  284. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  285. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +6 -0
  286. package/libs/PanoMeasurePlugin/utils/line.d.ts +17 -0
  287. package/libs/PanoMeasurePlugin/utils/line.js +32 -0
  288. package/libs/PanoMeasurePlugin/utils/math.d.ts +17 -0
  289. package/libs/PanoMeasurePlugin/utils/math.js +44 -0
  290. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
  291. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +21 -0
  292. package/libs/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  293. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +6 -0
  294. package/libs/PanoRulerPlugin/index.d.ts +31 -0
  295. package/libs/PanoRulerPlugin/index.js +398 -0
  296. package/libs/PanoRulerPlugin/style.d.ts +2 -0
  297. package/libs/PanoRulerPlugin/style.js +88 -0
  298. package/libs/PanoRulerPlugin/typings.d.ts +21 -0
  299. package/libs/PanoRulerPlugin/typings.js +1 -0
  300. package/libs/PanoSpatialTagPlugin/Components/origins.js +168 -0
  301. package/libs/PanoSpatialTagPlugin/Components/tag.js +302 -0
  302. package/libs/PanoSpatialTagPlugin/index.d.ts +33 -0
  303. package/libs/PanoSpatialTagPlugin/index.js +411 -0
  304. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  305. package/libs/PanoSpatialTagPlugin/store.js +2 -0
  306. package/libs/PanoSpatialTagPlugin/style.d.ts +1 -0
  307. package/libs/PanoSpatialTagPlugin/style.js +8 -0
  308. package/libs/PanoSpatialTagPlugin/typings.d.ts +40 -0
  309. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  310. package/libs/floorplan/Assets/camera.d.ts +1 -0
  311. package/libs/floorplan/Assets/camera.js +1 -0
  312. package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  313. package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
  314. package/libs/floorplan/Components/BaseImage.js +217 -0
  315. package/libs/floorplan/Components/Normalmage.js +63 -0
  316. package/libs/floorplan/Components/RoomHighlight/Room.js +70 -0
  317. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +289 -0
  318. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +328 -0
  319. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +64 -0
  320. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +103 -0
  321. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +140 -0
  322. package/libs/floorplan/Components/SvgImage.js +83 -0
  323. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  324. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
  325. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
  326. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +114 -0
  327. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
  328. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +383 -0
  329. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
  330. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
  331. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
  332. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
  333. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +105 -0
  334. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +359 -0
  335. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
  336. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
  337. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
  338. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
  339. package/libs/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
  340. package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
  341. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
  342. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
  343. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +152 -0
  344. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +248 -0
  345. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +154 -0
  346. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +312 -0
  347. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +28 -0
  348. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
  349. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
  350. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
  351. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +62 -0
  352. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +191 -0
  353. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
  354. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
  355. package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  356. package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
  357. package/libs/floorplan/constant.d.ts +5 -0
  358. package/libs/floorplan/constant.js +6 -0
  359. package/libs/floorplan/typings/floorplanData.d.ts +137 -0
  360. package/libs/floorplan/typings/floorplanData.js +6 -0
  361. package/libs/floorplan/typings/floorplanServerData.d.ts +131 -0
  362. package/libs/floorplan/typings/floorplanServerData.js +101 -0
  363. package/libs/floorplan/typings/utility.d.ts +2 -0
  364. package/libs/floorplan/typings/utility.js +1 -0
  365. package/libs/floorplan/utils/formatData.d.ts +5 -0
  366. package/libs/floorplan/utils/formatData.js +94 -0
  367. package/libs/floorplan/utils/formatPosition.d.ts +36 -0
  368. package/libs/floorplan/utils/formatPosition.js +50 -0
  369. package/libs/index.d.ts +26 -0
  370. package/libs/index.js +16 -0
  371. package/libs/shared-utils/Preloader.d.ts +6 -0
  372. package/libs/shared-utils/Preloader.js +38 -0
  373. package/libs/shared-utils/Subscribe.d.ts +45 -0
  374. package/libs/shared-utils/Subscribe.js +101 -0
  375. package/libs/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  376. package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
  377. package/libs/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  378. package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
  379. package/libs/shared-utils/animationFrame/formatRad.d.ts +15 -0
  380. package/libs/shared-utils/animationFrame/formatRad.js +20 -0
  381. package/libs/shared-utils/animationFrame/index.d.ts +15 -0
  382. package/libs/shared-utils/animationFrame/index.js +48 -0
  383. package/libs/shared-utils/animationFrame/tween.d.ts +75 -0
  384. package/libs/shared-utils/animationFrame/tween.js +44 -0
  385. package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  386. package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
  387. package/libs/shared-utils/createCanvasTextTexture.d.ts +8 -0
  388. package/libs/shared-utils/createCanvasTextTexture.js +19 -0
  389. package/libs/shared-utils/createLine/index.d.ts +3 -0
  390. package/libs/shared-utils/createLine/index.js +8 -0
  391. package/libs/shared-utils/debounce.d.ts +6 -0
  392. package/libs/shared-utils/debounce.js +14 -0
  393. package/libs/shared-utils/equal.d.ts +11 -0
  394. package/libs/shared-utils/equal.js +84 -0
  395. package/libs/shared-utils/filter.d.ts +27 -0
  396. package/libs/shared-utils/filter.js +53 -0
  397. package/libs/shared-utils/five/changeMode.d.ts +2 -0
  398. package/libs/shared-utils/five/changeMode.js +15 -0
  399. package/libs/shared-utils/five/useFivePlugin.d.ts +1 -0
  400. package/libs/shared-utils/five/useFivePlugin.js +8 -0
  401. package/libs/shared-utils/formatRad.d.ts +7 -0
  402. package/libs/shared-utils/formatRad.js +10 -0
  403. package/libs/shared-utils/getPxmm.d.ts +11 -0
  404. package/libs/shared-utils/getPxmm.js +34 -0
  405. package/libs/shared-utils/getRandomColor.d.ts +1 -0
  406. package/libs/shared-utils/getRandomColor.js +10 -0
  407. package/libs/shared-utils/isNil.d.ts +10 -0
  408. package/libs/shared-utils/isNil.js +14 -0
  409. package/libs/shared-utils/isTruelyObject.d.ts +18 -0
  410. package/libs/shared-utils/isTruelyObject.js +20 -0
  411. package/libs/shared-utils/math/evenNumber.d.ts +3 -0
  412. package/libs/shared-utils/math/evenNumber.js +4 -0
  413. package/libs/shared-utils/math/planimetry.d.ts +116 -0
  414. package/libs/shared-utils/math/planimetry.js +288 -0
  415. package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
  416. package/libs/shared-utils/math/rad2Deg.js +3 -0
  417. package/libs/shared-utils/nearlyEqual.d.ts +7 -0
  418. package/libs/shared-utils/nearlyEqual.js +9 -0
  419. package/libs/shared-utils/nextFrame.d.ts +1 -0
  420. package/libs/shared-utils/nextFrame.js +6 -0
  421. package/libs/shared-utils/noop.d.ts +5 -0
  422. package/libs/shared-utils/noop.js +7 -0
  423. package/libs/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  424. package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
  425. package/libs/shared-utils/px2rem.d.ts +1 -0
  426. package/libs/shared-utils/px2rem.js +4 -0
  427. package/libs/shared-utils/removeArrayItem.d.ts +7 -0
  428. package/libs/shared-utils/removeArrayItem.js +12 -0
  429. package/libs/shared-utils/tap.d.ts +8 -0
  430. package/{shared-utils → libs/shared-utils}/tap.js +4 -13
  431. package/libs/shared-utils/three/centerPoint.d.ts +2 -0
  432. package/libs/shared-utils/three/centerPoint.js +4 -0
  433. package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  434. package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
  435. package/libs/shared-utils/three/getNormal.d.ts +2 -0
  436. package/libs/shared-utils/three/getNormal.js +6 -0
  437. package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
  438. package/libs/shared-utils/three/getTextureLoader.js +17 -0
  439. package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
  440. package/libs/shared-utils/three/loadFbxObj.js +13 -0
  441. package/libs/shared-utils/three/loadTexture.d.ts +2 -0
  442. package/libs/shared-utils/three/loadTexture.js +10 -0
  443. package/libs/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  444. package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
  445. package/libs/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  446. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
  447. package/libs/shared-utils/throttle.d.ts +7 -0
  448. package/libs/shared-utils/throttle.js +18 -0
  449. package/libs/shared-utils/tinyEJSrender.d.ts +5 -0
  450. package/libs/shared-utils/tinyEJSrender.js +180 -0
  451. package/libs/shared-utils/to.d.ts +8 -0
  452. package/libs/shared-utils/to.js +18 -0
  453. package/libs/shared-utils/useDebounce.d.ts +8 -0
  454. package/libs/shared-utils/useDebounce.js +22 -0
  455. package/libs/shared-utils/useThrottle.d.ts +8 -0
  456. package/libs/shared-utils/useThrottle.js +25 -0
  457. package/{shared-utils → libs/shared-utils}/uuid.d.ts +0 -0
  458. package/libs/shared-utils/uuid.js +11 -0
  459. package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
  460. package/libs/shared-utils/vectorTocoordinates.js +9 -0
  461. package/libs/typings/math.type.d.ts +44 -0
  462. package/libs/typings/math.type.js +1 -0
  463. package/libs/typings/utils.type.d.ts +2 -0
  464. package/libs/typings/utils.type.js +1 -0
  465. package/package.json +55 -17
  466. package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
  467. package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
  468. package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
  469. package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
  470. package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
  471. package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
  472. package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
  473. package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
  474. package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
  475. package/components/ARVideoFigure/fragmentShader.js +0 -18
  476. package/components/ARVideoFigure/index.d.ts +0 -15
  477. package/components/ARVideoFigure/index.js +0 -80
  478. package/components/ARVideoFigure/vertexShader.d.ts +0 -1
  479. package/components/ARVideoFigure/vertexShader.js +0 -10
  480. package/components/GLTFView/index.d.ts +0 -72
  481. package/components/GLTFView/index.js +0 -149
  482. package/components/GlassFilters/index.d.ts +0 -32
  483. package/components/GlassFilters/index.js +0 -78
  484. package/components/ModelView/ModelViewController.d.ts +0 -18
  485. package/components/ModelView/ModelViewController.js +0 -157
  486. package/components/ModelView/index.d.ts +0 -10
  487. package/components/ModelView/index.js +0 -24
  488. package/components/PaintBrush/index.d.ts +0 -16
  489. package/components/PaintBrush/index.js +0 -47
  490. package/components/PanoTag/index.d.ts +0 -4
  491. package/components/PanoTag/index.js +0 -13
  492. package/custom.d.js +0 -3
  493. package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
  494. package/data/1aGKl9JmrlXMXx8d.js +0 -537
  495. package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
  496. package/data/54djM0oR6ky3Ey8e.js +0 -350
  497. package/data/6gyq3v1verxD7JO1.d.ts +0 -104
  498. package/data/6gyq3v1verxD7JO1.js +0 -462
  499. package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
  500. package/data/8054djM0oR6ky3Ey8e.js +0 -350
  501. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
  502. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
  503. package/data/PrXel3aqGbp34JQn.d.ts +0 -389
  504. package/data/PrXel3aqGbp34JQn.js +0 -4649
  505. package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
  506. package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
  507. package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
  508. package/data/YdoNP9K4rwQDwjJr.js +0 -1453
  509. package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
  510. package/data/ZLvK29zj4L29Jowd.js +0 -372
  511. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
  512. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
  513. package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
  514. package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
  515. package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
  516. package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
  517. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
  518. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
  519. package/data/lo024DEgzanMj5BE.d.ts +0 -55
  520. package/data/lo024DEgzanMj5BE.js +0 -966
  521. package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
  522. package/data/oPzy3ApbjjpD8YdR.js +0 -283
  523. package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
  524. package/data/qjAxMG4XbPn96wKG.js +0 -637
  525. package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
  526. package/data/rXel3aPQRRBD4JQn.js +0 -622
  527. package/data/vLykj3NWrllMrG06.d.ts +0 -91
  528. package/data/vLykj3NWrllMrG06.js +0 -2729
  529. package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
  530. package/data/wz0QV9KA4ugyo9ME.js +0 -136
  531. package/data/zxMawr9raSg8LYjG.d.ts +0 -53
  532. package/data/zxMawr9raSg8LYjG.js +0 -590
  533. package/examples/FiveStateController/index.js +0 -134
  534. package/examples/VRHouse/Mobile.js +0 -36
  535. package/examples/VRHouse/PC.js +0 -36
  536. package/examples/VRHouse/index.js +0 -36
  537. package/index.d.ts +0 -15
  538. package/index.js +0 -45
  539. package/libs/gltf-viewer/Subscribe.d.ts +0 -76
  540. package/libs/gltf-viewer/Subscribe.js +0 -231
  541. package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
  542. package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
  543. package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
  544. package/libs/gltf-viewer/coordsToDirection.js +0 -41
  545. package/libs/gltf-viewer/formatRad.d.ts +0 -1
  546. package/libs/gltf-viewer/formatRad.js +0 -13
  547. package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
  548. package/libs/gltf-viewer/getFrameTime.js +0 -28
  549. package/libs/gltf-viewer/index.d.ts +0 -55
  550. package/libs/gltf-viewer/index.js +0 -650
  551. package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
  552. package/libs/gltf-viewer/mouseWheel.js +0 -59
  553. package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
  554. package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
  555. package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
  556. package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
  557. package/libs/gltf-viewer/uuid.js +0 -28
  558. package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
  559. package/plugins/AutoPreloadPlugin/index.js +0 -111
  560. package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
  561. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
  562. package/plugins/CSS3DRenderPlugin/index.js +0 -298
  563. package/plugins/CameraMovementPlugin/index.js +0 -362
  564. package/plugins/CameraMovementPlugin/typing.js +0 -37
  565. package/plugins/ModelChassisCompassPlugin/index.js +0 -157
  566. package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
  567. package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
  568. package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
  569. package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
  570. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
  571. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
  572. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
  573. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
  574. package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
  575. package/plugins/ModelRoomLabelPlugin/index.js +0 -18
  576. package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
  577. package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
  578. package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
  579. package/plugins/ModelTVVideoPlugin/index.js +0 -397
  580. package/plugins/ModelViewPlugin/index.js +0 -223
  581. package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
  582. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
  583. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
  584. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
  585. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
  586. package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
  587. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
  588. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
  589. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
  590. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
  591. package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
  592. package/plugins/PanoDoorLabelPlugin/index.js +0 -14
  593. package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
  594. package/plugins/PanoIRobotPlugin/index.js +0 -18
  595. package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
  596. package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
  597. package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
  598. package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
  599. package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
  600. package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
  601. package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
  602. package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
  603. package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
  604. package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
  605. package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
  606. package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
  607. package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
  608. package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
  609. package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
  610. package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
  611. package/plugins/PanoRulerPlugin/index.js +0 -637
  612. package/plugins/PanoRulerPlugin/typings.js +0 -7
  613. package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
  614. package/plugins/PanoTVVideoPlugin/index.js +0 -433
  615. package/plugins/TreasurePlugin/Controller.d.ts +0 -73
  616. package/plugins/TreasurePlugin/Controller.js +0 -250
  617. package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
  618. package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
  619. package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
  620. package/plugins/TreasurePlugin/TreasureObject.js +0 -406
  621. package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
  622. package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
  623. package/plugins/TreasurePlugin/constants.d.ts +0 -33
  624. package/plugins/TreasurePlugin/constants.js +0 -67
  625. package/plugins/TreasurePlugin/index.d.ts +0 -11
  626. package/plugins/TreasurePlugin/index.js +0 -26
  627. package/plugins/TreasurePlugin/typings.d.ts +0 -2
  628. package/plugins/TreasurePlugin/typings.js +0 -7
  629. package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
  630. package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
  631. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
  632. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
  633. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
  634. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
  635. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
  636. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
  637. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
  638. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
  639. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
  640. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
  641. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
  642. package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
  643. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
  644. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
  645. package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
  646. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
  647. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
  648. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
  649. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
  650. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
  651. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
  652. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
  653. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
  654. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
  655. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
  656. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
  657. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
  658. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
  659. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
  660. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
  661. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
  662. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
  663. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
  664. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
  665. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
  666. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
  667. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
  668. package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
  669. package/plugins/floorplan/components/FloorplanImage.js +0 -90
  670. package/plugins/floorplan/typings/floorplanData.js +0 -7
  671. package/plugins/floorplan/typings/floorplanServerData.js +0 -382
  672. package/plugins/floorplan/utils/formatData.js +0 -217
  673. package/plugins/floorplan/utils/formatPosition.js +0 -89
  674. package/shared-utils/Preloader.js +0 -57
  675. package/shared-utils/Subscribe.js +0 -230
  676. package/shared-utils/animationFrame/BetterTween.js +0 -103
  677. package/shared-utils/animationFrame/calculateProgress.js +0 -40
  678. package/shared-utils/animationFrame/formatRad.js +0 -36
  679. package/shared-utils/animationFrame/index.js +0 -81
  680. package/shared-utils/animationFrame/tween.js +0 -92
  681. package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
  682. package/shared-utils/changeModelCanvansOpacity.js +0 -38
  683. package/shared-utils/createCanvasTextTexture.js +0 -31
  684. package/shared-utils/createFiveContainer.d.ts +0 -10
  685. package/shared-utils/createFiveContainer.js +0 -171
  686. package/shared-utils/createLine/index.js +0 -43
  687. package/shared-utils/debounce.js +0 -30
  688. package/shared-utils/equal.js +0 -107
  689. package/shared-utils/filter.js +0 -127
  690. package/shared-utils/five/changeMode.js +0 -82
  691. package/shared-utils/five/useFivePlugin.js +0 -17
  692. package/shared-utils/formatRad.js +0 -18
  693. package/shared-utils/getPxmm.d.ts +0 -6
  694. package/shared-utils/getPxmm.js +0 -51
  695. package/shared-utils/getRandomColor.js +0 -23
  696. package/shared-utils/isNil.js +0 -26
  697. package/shared-utils/isTruelyObject.js +0 -31
  698. package/shared-utils/math/evenNumber.d.ts +0 -1
  699. package/shared-utils/math/evenNumber.js +0 -13
  700. package/shared-utils/math/planimetry.js +0 -352
  701. package/shared-utils/math/rad2Deg.js +0 -12
  702. package/shared-utils/nearlyEqual.js +0 -19
  703. package/shared-utils/nextFrame.js +0 -15
  704. package/shared-utils/noop.js +0 -19
  705. package/shared-utils/object3d2LocalMatrix.js +0 -79
  706. package/shared-utils/px2rem.js +0 -22
  707. package/shared-utils/three/centerPoint.js +0 -14
  708. package/shared-utils/three/getExtraModelLoader.js +0 -45
  709. package/shared-utils/three/getNormal.js +0 -17
  710. package/shared-utils/three/getTextureLoader.js +0 -50
  711. package/shared-utils/three/loadFbxObj.js +0 -54
  712. package/shared-utils/three/loadTexture.d.ts +0 -2
  713. package/shared-utils/three/loadTexture.js +0 -46
  714. package/shared-utils/three/transformPositionToVector3.js +0 -20
  715. package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
  716. package/shared-utils/throttle.js +0 -29
  717. package/shared-utils/to.js +0 -67
  718. package/shared-utils/useDebounce.js +0 -49
  719. package/shared-utils/useThrottle.js +0 -47
  720. package/shared-utils/uuid.js +0 -28
  721. package/shared-utils/vectorTocoordinates.js +0 -18
  722. package/typedoc/components.d.ts +0 -6
  723. package/typedoc/components.js +0 -7
  724. package/typedoc/plugins.d.ts +0 -19
  725. package/typedoc/plugins.js +0 -165
  726. package/typedoc/shared-utils.d.ts +0 -3
  727. package/typedoc/shared-utils.js +0 -7
  728. package/typedoc/typings.d.ts +0 -3
  729. package/typedoc/typings.js +0 -7
  730. package/typings/math.type.js +0 -7
  731. package/typings/utils.type.js +0 -7
@@ -0,0 +1,3842 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var internal = require('svelte/internal');
6
+ var THREE = require('three');
7
+ var easing = require('svelte/easing');
8
+ var transition = require('svelte/transition');
9
+ var five = require('@realsee/five');
10
+
11
+ function _interopNamespace(e) {
12
+ if (e && e.__esModule) return e;
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n["default"] = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
30
+
31
+ 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==';
32
+
33
+ function rad2Deg$1(rad) {
34
+ return (rad * 180) / Math.PI;
35
+ }
36
+
37
+ /* src/floorplan/ModelFloorplanPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
38
+
39
+ function add_css$c(target) {
40
+ internal.append_styles(target, "svelte-e8a2kn", ".floorplan__camera-position.svelte-e8a2kn{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-e8a2kn{position:absolute;background-repeat:no-repeat;background-size:100%}");
41
+ }
42
+
43
+ function create_fragment$g(ctx) {
44
+ let div1;
45
+ let div0;
46
+
47
+ return {
48
+ c() {
49
+ div1 = internal.element("div");
50
+ div0 = internal.element("div");
51
+ internal.attr(div0, "class", "floorplan__camera-rotate svelte-e8a2kn");
52
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
53
+ internal.set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
54
+ internal.set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
55
+ internal.set_style(div0, "left", '-' + /*domSizeStyle*/ ctx[4], false);
56
+ internal.set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
57
+ internal.set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
58
+ internal.set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
59
+ internal.attr(div1, "class", "floorplan__camera-position svelte-e8a2kn");
60
+ internal.set_style(div1, "left", /*positionLeft*/ ctx[1], false);
61
+ internal.set_style(div1, "top", /*positionTop*/ ctx[2], false);
62
+ },
63
+ m(target, anchor) {
64
+ internal.insert(target, div1, anchor);
65
+ internal.append(div1, div0);
66
+ },
67
+ p(ctx, [dirty]) {
68
+ if (dirty & /*cameraImageUrl*/ 1) {
69
+ internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
70
+ }
71
+ },
72
+ i: internal.noop,
73
+ o: internal.noop,
74
+ d(detaching) {
75
+ if (detaching) internal.detach(div1);
76
+ }
77
+ };
78
+ }
79
+
80
+ function instance$g($$self, $$props, $$invalidate) {
81
+ let { panoIndex } = $$props;
82
+ let { floorplanData } = $$props;
83
+ let { lastPanoramaLongitude } = $$props;
84
+ let { cameraImageUrl } = $$props;
85
+ const { observers } = floorplanData;
86
+ const observer = observers[panoIndex];
87
+ const leftRatio = observer.positionInImage.x;
88
+ const topRatio = observer.positionInImage.y;
89
+ const positionLeft = leftRatio * 100 + '%';
90
+ const positionTop = topRatio * 100 + '%';
91
+ const rotate = -rad2Deg$1(lastPanoramaLongitude) + 45;
92
+
93
+ // TODO: 统一这里的判断条件,目前写了多处
94
+ const bodyWidth = document.body.clientWidth;
95
+
96
+ const bodyHeight = document.body.clientHeight;
97
+ const size = bodyWidth < 500 || bodyHeight < 500 ? 17 : 37;
98
+ const domSizeStyle = `${size / 16}rem`;
99
+
100
+ $$self.$$set = $$props => {
101
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
102
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
103
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(7, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
104
+ if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
105
+ };
106
+
107
+ return [
108
+ cameraImageUrl,
109
+ positionLeft,
110
+ positionTop,
111
+ rotate,
112
+ domSizeStyle,
113
+ panoIndex,
114
+ floorplanData,
115
+ lastPanoramaLongitude
116
+ ];
117
+ }
118
+
119
+ class Camera extends internal.SvelteComponent {
120
+ constructor(options) {
121
+ super();
122
+
123
+ internal.init(
124
+ this,
125
+ options,
126
+ instance$g,
127
+ create_fragment$g,
128
+ internal.safe_not_equal,
129
+ {
130
+ panoIndex: 5,
131
+ floorplanData: 6,
132
+ lastPanoramaLongitude: 7,
133
+ cameraImageUrl: 0
134
+ },
135
+ add_css$c
136
+ );
137
+ }
138
+ }
139
+
140
+ const COMPASS_IMAGE = 'data:image/png;base64,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';
141
+
142
+ /* src/floorplan/ModelFloorplanPlugin/Components/Compass.svelte generated by Svelte v3.47.0 */
143
+
144
+ function add_css$b(target) {
145
+ internal.append_styles(target, "svelte-5l80pv", ".floorplan-plugin__compass.svelte-5l80pv{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image.svelte-5l80pv{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-5l80pv{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
146
+ }
147
+
148
+ // (12:0) {#if northRad}
149
+ function create_if_block$6(ctx) {
150
+ let div1;
151
+ let div0;
152
+ let t0;
153
+ let span;
154
+ let t1;
155
+
156
+ return {
157
+ c() {
158
+ div1 = internal.element("div");
159
+ div0 = internal.element("div");
160
+ t0 = internal.space();
161
+ span = internal.element("span");
162
+ t1 = internal.text(/*northDesc*/ ctx[0]);
163
+ internal.attr(div0, "class", "floorplan-plugin__compass-image svelte-5l80pv");
164
+ internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
165
+ internal.attr(span, "class", "floorplan-plugin__compass-text svelte-5l80pv");
166
+ internal.attr(div1, "class", "floorplan-plugin__compass svelte-5l80pv");
167
+ internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
168
+ },
169
+ m(target, anchor) {
170
+ internal.insert(target, div1, anchor);
171
+ internal.append(div1, div0);
172
+ internal.append(div1, t0);
173
+ internal.append(div1, span);
174
+ internal.append(span, t1);
175
+ },
176
+ p(ctx, dirty) {
177
+ if (dirty & /*northDesc*/ 1) internal.set_data(t1, /*northDesc*/ ctx[0]);
178
+ },
179
+ d(detaching) {
180
+ if (detaching) internal.detach(div1);
181
+ }
182
+ };
183
+ }
184
+
185
+ function create_fragment$f(ctx) {
186
+ let if_block_anchor;
187
+ let if_block = /*northRad*/ ctx[1] && create_if_block$6(ctx);
188
+
189
+ return {
190
+ c() {
191
+ if (if_block) if_block.c();
192
+ if_block_anchor = internal.empty();
193
+ },
194
+ m(target, anchor) {
195
+ if (if_block) if_block.m(target, anchor);
196
+ internal.insert(target, if_block_anchor, anchor);
197
+ },
198
+ p(ctx, [dirty]) {
199
+ if (/*northRad*/ ctx[1]) if_block.p(ctx, dirty);
200
+ },
201
+ i: internal.noop,
202
+ o: internal.noop,
203
+ d(detaching) {
204
+ if (if_block) if_block.d(detaching);
205
+ if (detaching) internal.detach(if_block_anchor);
206
+ }
207
+ };
208
+ }
209
+
210
+ function rad2Deg(rad) {
211
+ return rad / Math.PI * 180;
212
+ }
213
+
214
+ function instance$f($$self, $$props, $$invalidate) {
215
+ let { floorplanData } = $$props;
216
+ let { northDesc } = $$props;
217
+ const northRad = floorplanData.entrance?.northRad;
218
+ const rotate = !northRad ? 0 : rad2Deg(northRad);
219
+ const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
220
+
221
+ $$self.$$set = $$props => {
222
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
223
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
224
+ };
225
+
226
+ return [northDesc, northRad, compassTransformStyle, floorplanData];
227
+ }
228
+
229
+ class Compass extends internal.SvelteComponent {
230
+ constructor(options) {
231
+ super();
232
+ internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$b);
233
+ }
234
+ }
235
+
236
+ /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
237
+
238
+ function add_css$a(target) {
239
+ internal.append_styles(target, "svelte-1ashbdx", ".floorplan-plugin__room-label-item.svelte-1ashbdx{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:15px;color:#fff;transform:translate(-50%, -50%);white-space:nowrap}.floorplan-plugin__room-size.svelte-1ashbdx{opacity:0.45}");
240
+ }
241
+
242
+ // (22:30)
243
+ function create_if_block_1$4(ctx) {
244
+ let html_tag;
245
+ let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
246
+ let html_anchor;
247
+
248
+ return {
249
+ c() {
250
+ html_tag = new internal.HtmlTag();
251
+ html_anchor = internal.empty();
252
+ html_tag.a = html_anchor;
253
+ },
254
+ m(target, anchor) {
255
+ html_tag.m(raw_value, target, anchor);
256
+ internal.insert(target, html_anchor, anchor);
257
+ },
258
+ p(ctx, dirty) {
259
+ if (dirty & /*userConfigElement*/ 4 && raw_value !== (raw_value = /*userConfigElement*/ ctx[2].outerHTML + "")) html_tag.p(raw_value);
260
+ },
261
+ d(detaching) {
262
+ if (detaching) internal.detach(html_anchor);
263
+ if (detaching) html_tag.d();
264
+ }
265
+ };
266
+ }
267
+
268
+ // (16:2) {#if getLabelElement === undefined}
269
+ function create_if_block$5(ctx) {
270
+ let span0;
271
+ let t0_value = /*room*/ ctx[0].name + "";
272
+ let t0;
273
+ let t1;
274
+ let span1;
275
+
276
+ return {
277
+ c() {
278
+ span0 = internal.element("span");
279
+ t0 = internal.text(t0_value);
280
+ t1 = internal.space();
281
+ span1 = internal.element("span");
282
+ span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
283
+ internal.attr(span0, "class", "floorplan-plugin__room-name");
284
+ internal.attr(span1, "class", "floorplan-plugin__room-size svelte-1ashbdx");
285
+ },
286
+ m(target, anchor) {
287
+ internal.insert(target, span0, anchor);
288
+ internal.append(span0, t0);
289
+ internal.insert(target, t1, anchor);
290
+ internal.insert(target, span1, anchor);
291
+ },
292
+ p(ctx, dirty) {
293
+ if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) internal.set_data(t0, t0_value);
294
+ },
295
+ d(detaching) {
296
+ if (detaching) internal.detach(span0);
297
+ if (detaching) internal.detach(t1);
298
+ if (detaching) internal.detach(span1);
299
+ }
300
+ };
301
+ }
302
+
303
+ function create_fragment$e(ctx) {
304
+ let div;
305
+
306
+ function select_block_type(ctx, dirty) {
307
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$5;
308
+ if (/*userConfigElement*/ ctx[2]) return create_if_block_1$4;
309
+ }
310
+
311
+ let current_block_type = select_block_type(ctx);
312
+ let if_block = current_block_type && current_block_type(ctx);
313
+
314
+ return {
315
+ c() {
316
+ div = internal.element("div");
317
+ if (if_block) if_block.c();
318
+ internal.attr(div, "class", "floorplan-plugin__room-label-item svelte-1ashbdx");
319
+ internal.set_style(div, "left", /*left*/ ctx[4], false);
320
+ internal.set_style(div, "top", /*top*/ ctx[5], false);
321
+ internal.set_style(div, "font-size", /*fontSize*/ ctx[6], false);
322
+ },
323
+ m(target, anchor) {
324
+ internal.insert(target, div, anchor);
325
+ if (if_block) if_block.m(div, null);
326
+ },
327
+ p(ctx, [dirty]) {
328
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
329
+ if_block.p(ctx, dirty);
330
+ } else {
331
+ if (if_block) if_block.d(1);
332
+ if_block = current_block_type && current_block_type(ctx);
333
+
334
+ if (if_block) {
335
+ if_block.c();
336
+ if_block.m(div, null);
337
+ }
338
+ }
339
+ },
340
+ i: internal.noop,
341
+ o: internal.noop,
342
+ d(detaching) {
343
+ if (detaching) internal.detach(div);
344
+
345
+ if (if_block) {
346
+ if_block.d();
347
+ }
348
+ }
349
+ };
350
+ }
351
+
352
+ function instance$e($$self, $$props, $$invalidate) {
353
+ let userConfigElement;
354
+ let { room } = $$props;
355
+ let { getLabelElement } = $$props;
356
+
357
+ // TODO: 统一这里的判断条件,目前写了多处
358
+ const bodyWidth = document.body.clientWidth;
359
+
360
+ const bodyHeight = document.body.clientHeight;
361
+ const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
362
+ const roomLabel = room.roomLabel;
363
+ const left = roomLabel.positionInImage.x * 100 + '%';
364
+ const top = roomLabel.positionInImage.y * 100 + '%';
365
+ const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
366
+
367
+ $$self.$$set = $$props => {
368
+ if ('room' in $$props) $$invalidate(0, room = $$props.room);
369
+ if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
370
+ };
371
+
372
+ $$self.$$.update = () => {
373
+ if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
374
+ $$invalidate(2, userConfigElement = getLabelElement?.(room));
375
+ }
376
+ };
377
+
378
+ return [room, getLabelElement, userConfigElement, roomSizeDes, left, top, fontSize];
379
+ }
380
+
381
+ class RoomLabel extends internal.SvelteComponent {
382
+ constructor(options) {
383
+ super();
384
+ internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { room: 0, getLabelElement: 1 }, add_css$a);
385
+ }
386
+ }
387
+
388
+ /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
389
+
390
+ function add_css$9(target) {
391
+ internal.append_styles(target, "svelte-sw25w3", ".floorplan-plugin__room-labels.svelte-sw25w3{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20}");
392
+ }
393
+
394
+ function get_each_context$4(ctx, list, i) {
395
+ const child_ctx = ctx.slice();
396
+ child_ctx[4] = list[i];
397
+ return child_ctx;
398
+ }
399
+
400
+ // (8:0) {#if rooms}
401
+ function create_if_block$4(ctx) {
402
+ let div;
403
+ let each_blocks = [];
404
+ let each_1_lookup = new Map();
405
+ let current;
406
+ let each_value = /*rooms*/ ctx[1];
407
+ const get_key = ctx => /*room*/ ctx[4].id;
408
+
409
+ for (let i = 0; i < each_value.length; i += 1) {
410
+ let child_ctx = get_each_context$4(ctx, each_value, i);
411
+ let key = get_key(child_ctx);
412
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
413
+ }
414
+
415
+ return {
416
+ c() {
417
+ div = internal.element("div");
418
+
419
+ for (let i = 0; i < each_blocks.length; i += 1) {
420
+ each_blocks[i].c();
421
+ }
422
+
423
+ internal.attr(div, "class", "floorplan-plugin__room-labels svelte-sw25w3");
424
+ },
425
+ m(target, anchor) {
426
+ internal.insert(target, div, anchor);
427
+
428
+ for (let i = 0; i < each_blocks.length; i += 1) {
429
+ each_blocks[i].m(div, null);
430
+ }
431
+
432
+ current = true;
433
+ },
434
+ p(ctx, dirty) {
435
+ if (dirty & /*rooms, getLabelElement*/ 3) {
436
+ each_value = /*rooms*/ ctx[1];
437
+ internal.group_outros();
438
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$4, null, get_each_context$4);
439
+ internal.check_outros();
440
+ }
441
+ },
442
+ i(local) {
443
+ if (current) return;
444
+
445
+ for (let i = 0; i < each_value.length; i += 1) {
446
+ internal.transition_in(each_blocks[i]);
447
+ }
448
+
449
+ current = true;
450
+ },
451
+ o(local) {
452
+ for (let i = 0; i < each_blocks.length; i += 1) {
453
+ internal.transition_out(each_blocks[i]);
454
+ }
455
+
456
+ current = false;
457
+ },
458
+ d(detaching) {
459
+ if (detaching) internal.detach(div);
460
+
461
+ for (let i = 0; i < each_blocks.length; i += 1) {
462
+ each_blocks[i].d();
463
+ }
464
+ }
465
+ };
466
+ }
467
+
468
+ // (10:4) {#each rooms as room (room.id)}
469
+ function create_each_block$4(key_1, ctx) {
470
+ let first;
471
+ let roomlabel;
472
+ let current;
473
+
474
+ const roomlabel_spread_levels = [
475
+ {
476
+ room: /*room*/ ctx[4],
477
+ getLabelElement: /*getLabelElement*/ ctx[0]
478
+ }
479
+ ];
480
+
481
+ let roomlabel_props = {};
482
+
483
+ for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
484
+ roomlabel_props = internal.assign(roomlabel_props, roomlabel_spread_levels[i]);
485
+ }
486
+
487
+ roomlabel = new RoomLabel({ props: roomlabel_props });
488
+
489
+ return {
490
+ key: key_1,
491
+ first: null,
492
+ c() {
493
+ first = internal.empty();
494
+ internal.create_component(roomlabel.$$.fragment);
495
+ this.first = first;
496
+ },
497
+ m(target, anchor) {
498
+ internal.insert(target, first, anchor);
499
+ internal.mount_component(roomlabel, target, anchor);
500
+ current = true;
501
+ },
502
+ p(new_ctx, dirty) {
503
+ ctx = new_ctx;
504
+
505
+ const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
506
+ ? internal.get_spread_update(roomlabel_spread_levels, [
507
+ {
508
+ room: /*room*/ ctx[4],
509
+ getLabelElement: /*getLabelElement*/ ctx[0]
510
+ }
511
+ ])
512
+ : {};
513
+
514
+ roomlabel.$set(roomlabel_changes);
515
+ },
516
+ i(local) {
517
+ if (current) return;
518
+ internal.transition_in(roomlabel.$$.fragment, local);
519
+ current = true;
520
+ },
521
+ o(local) {
522
+ internal.transition_out(roomlabel.$$.fragment, local);
523
+ current = false;
524
+ },
525
+ d(detaching) {
526
+ if (detaching) internal.detach(first);
527
+ internal.destroy_component(roomlabel, detaching);
528
+ }
529
+ };
530
+ }
531
+
532
+ function create_fragment$d(ctx) {
533
+ let if_block_anchor;
534
+ let current;
535
+ let if_block = /*rooms*/ ctx[1] && create_if_block$4(ctx);
536
+
537
+ return {
538
+ c() {
539
+ if (if_block) if_block.c();
540
+ if_block_anchor = internal.empty();
541
+ },
542
+ m(target, anchor) {
543
+ if (if_block) if_block.m(target, anchor);
544
+ internal.insert(target, if_block_anchor, anchor);
545
+ current = true;
546
+ },
547
+ p(ctx, [dirty]) {
548
+ if (/*rooms*/ ctx[1]) {
549
+ if (if_block) {
550
+ if_block.p(ctx, dirty);
551
+
552
+ if (dirty & /*rooms*/ 2) {
553
+ internal.transition_in(if_block, 1);
554
+ }
555
+ } else {
556
+ if_block = create_if_block$4(ctx);
557
+ if_block.c();
558
+ internal.transition_in(if_block, 1);
559
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
560
+ }
561
+ } else if (if_block) {
562
+ internal.group_outros();
563
+
564
+ internal.transition_out(if_block, 1, 1, () => {
565
+ if_block = null;
566
+ });
567
+
568
+ internal.check_outros();
569
+ }
570
+ },
571
+ i(local) {
572
+ if (current) return;
573
+ internal.transition_in(if_block);
574
+ current = true;
575
+ },
576
+ o(local) {
577
+ internal.transition_out(if_block);
578
+ current = false;
579
+ },
580
+ d(detaching) {
581
+ if (if_block) if_block.d(detaching);
582
+ if (detaching) internal.detach(if_block_anchor);
583
+ }
584
+ };
585
+ }
586
+
587
+ function instance$d($$self, $$props, $$invalidate) {
588
+ let rooms;
589
+ let { floorIndex } = $$props;
590
+ let { floorplanData } = $$props;
591
+ let { getLabelElement } = $$props;
592
+
593
+ $$self.$$set = $$props => {
594
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
595
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
596
+ if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
597
+ };
598
+
599
+ $$self.$$.update = () => {
600
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
601
+ $$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
602
+ }
603
+ };
604
+
605
+ return [getLabelElement, rooms, floorIndex, floorplanData];
606
+ }
607
+
608
+ class RoomLabels extends internal.SvelteComponent {
609
+ constructor(options) {
610
+ super();
611
+
612
+ internal.init(
613
+ this,
614
+ options,
615
+ instance$d,
616
+ create_fragment$d,
617
+ internal.safe_not_equal,
618
+ {
619
+ floorIndex: 2,
620
+ floorplanData: 3,
621
+ getLabelElement: 0
622
+ },
623
+ add_css$9
624
+ );
625
+ }
626
+ }
627
+
628
+ /**
629
+ * 判断对象是否为`null`或`undefined`。
630
+ * @param
631
+ * @return
632
+ */
633
+ /**
634
+ * 判断对象不为`null`或`undefined`。
635
+ */
636
+ function notNil(value) {
637
+ return value !== null && value !== undefined;
638
+ }
639
+
640
+ /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
641
+
642
+ function add_css$8(target) {
643
+ internal.append_styles(target, "svelte-1rr09in", ".floorplan-plugin__rule-labels.svelte-1rr09in{position:absolute;height:5px;display:flex;align-items:center}.floorplan-plugin__rule-labels-top.svelte-1rr09in{left:0;top:0}.floorplan-plugin__rule-labels-bottom.svelte-1rr09in{left:0;bottom:0}.floorplan-plugin__rule-labels-left.svelte-1rr09in{bottom:0;left:0}.floorplan-plugin__rule-labels-right.svelte-1rr09in{bottom:0;right:0}.floorplan-plugin__rule-line.svelte-1rr09in{background:#fff;opacity:0.05;width:100%;height:1px}.floorplan-plugin__rule-scale.svelte-1rr09in{position:absolute;background:#fff;opacity:0.05;transform-origin:center;width:1px;height:5px}.floorplan-plugin__text-wrapper.svelte-1rr09in{width:0;height:0;position:absolute}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper--is-left-or-top.svelte-1rr09in{top:10px}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper-is-right-or-bottom.svelte-1rr09in{bottom:10px}.floorplan-plugin__rule-text.svelte-1rr09in{position:absolute;width:max-content;display:block;transform:translate(-50%, -50%) rotate(180deg);font-size:10px;color:#fff;opacity:0.2}.floorplan-plugin__rule-text.is-row.svelte-1rr09in{transform:translate(-50%, -50%)}");
644
+ }
645
+
646
+ function get_each_context$3(ctx, list, i) {
647
+ const child_ctx = ctx.slice();
648
+ child_ctx[24] = list[i];
649
+ child_ctx[26] = i;
650
+ return child_ctx;
651
+ }
652
+
653
+ function get_each_context_1(ctx, list, i) {
654
+ const child_ctx = ctx.slice();
655
+ child_ctx[27] = list[i];
656
+ child_ctx[29] = i;
657
+ return child_ctx;
658
+ }
659
+
660
+ // (66:2) {#each positionPxArray as position, positionIndex (positionIndex)}
661
+ function create_each_block_1(key_1, ctx) {
662
+ let div;
663
+ let style_left = `${/*position*/ ctx[27]}px`;
664
+
665
+ return {
666
+ key: key_1,
667
+ first: null,
668
+ c() {
669
+ div = internal.element("div");
670
+ internal.attr(div, "class", "floorplan-plugin__rule-scale svelte-1rr09in");
671
+ internal.set_style(div, "left", style_left, false);
672
+ this.first = div;
673
+ },
674
+ m(target, anchor) {
675
+ internal.insert(target, div, anchor);
676
+ },
677
+ p(new_ctx, dirty) {
678
+ ctx = new_ctx;
679
+ },
680
+ d(detaching) {
681
+ if (detaching) internal.detach(div);
682
+ }
683
+ };
684
+ }
685
+
686
+ // (69:2) {#each textArray as textItem, textItemIndex (textItemIndex)}
687
+ function create_each_block$3(key_1, ctx) {
688
+ let div;
689
+ let span;
690
+ let t0_value = /*textItem*/ ctx[24].distance + "";
691
+ let t0;
692
+ let t1;
693
+ let style_left = `${/*textItem*/ ctx[24].positionPx}px`;
694
+
695
+ return {
696
+ key: key_1,
697
+ first: null,
698
+ c() {
699
+ div = internal.element("div");
700
+ span = internal.element("span");
701
+ t0 = internal.text(t0_value);
702
+ t1 = internal.space();
703
+ internal.attr(span, "class", "floorplan-plugin__rule-text svelte-1rr09in");
704
+ internal.toggle_class(span, "is-row", /*isRow*/ ctx[5]);
705
+ internal.attr(div, "class", "floorplan-plugin__text-wrapper svelte-1rr09in");
706
+ internal.toggle_class(div, "floorplan-plugin__text-wrapper--is-left-or-top", /*isLeft*/ ctx[3] || /*isTop*/ ctx[1]);
707
+ internal.toggle_class(div, "floorplan-plugin__text-wrapper-is-right-or-bottom", /*isRight*/ ctx[4] || /*isBottom*/ ctx[2]);
708
+ internal.set_style(div, "left", style_left, false);
709
+ this.first = div;
710
+ },
711
+ m(target, anchor) {
712
+ internal.insert(target, div, anchor);
713
+ internal.append(div, span);
714
+ internal.append(span, t0);
715
+ internal.append(div, t1);
716
+ },
717
+ p(new_ctx, dirty) {
718
+ ctx = new_ctx;
719
+ },
720
+ d(detaching) {
721
+ if (detaching) internal.detach(div);
722
+ }
723
+ };
724
+ }
725
+
726
+ function create_fragment$c(ctx) {
727
+ let div1;
728
+ let div0;
729
+ let t0;
730
+ let each_blocks_1 = [];
731
+ let each0_lookup = new Map();
732
+ let t1;
733
+ let each_blocks = [];
734
+ let each1_lookup = new Map();
735
+ let div1_class_value;
736
+ let each_value_1 = /*positionPxArray*/ ctx[6];
737
+ const get_key = ctx => /*positionIndex*/ ctx[29];
738
+
739
+ for (let i = 0; i < each_value_1.length; i += 1) {
740
+ let child_ctx = get_each_context_1(ctx, each_value_1, i);
741
+ let key = get_key(child_ctx);
742
+ each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx));
743
+ }
744
+
745
+ let each_value = /*textArray*/ ctx[10];
746
+ const get_key_1 = ctx => /*textItemIndex*/ ctx[26];
747
+
748
+ for (let i = 0; i < each_value.length; i += 1) {
749
+ let child_ctx = get_each_context$3(ctx, each_value, i);
750
+ let key = get_key_1(child_ctx);
751
+ each1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
752
+ }
753
+
754
+ return {
755
+ c() {
756
+ div1 = internal.element("div");
757
+ div0 = internal.element("div");
758
+ t0 = internal.space();
759
+
760
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
761
+ each_blocks_1[i].c();
762
+ }
763
+
764
+ t1 = internal.space();
765
+
766
+ for (let i = 0; i < each_blocks.length; i += 1) {
767
+ each_blocks[i].c();
768
+ }
769
+
770
+ internal.attr(div0, "class", "floorplan-plugin__rule-line svelte-1rr09in");
771
+ internal.attr(div1, "class", div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in");
772
+ internal.set_style(div1, "width", /*width*/ ctx[9], false);
773
+ internal.set_style(div1, "transform", /*transform*/ ctx[7], false);
774
+ internal.set_style(div1, "transform-origin", /*transformOrigin*/ ctx[8], false);
775
+ },
776
+ m(target, anchor) {
777
+ internal.insert(target, div1, anchor);
778
+ internal.append(div1, div0);
779
+ internal.append(div1, t0);
780
+
781
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
782
+ each_blocks_1[i].m(div1, null);
783
+ }
784
+
785
+ internal.append(div1, t1);
786
+
787
+ for (let i = 0; i < each_blocks.length; i += 1) {
788
+ each_blocks[i].m(div1, null);
789
+ }
790
+ },
791
+ p(ctx, [dirty]) {
792
+ if (dirty & /*positionPxArray*/ 64) {
793
+ each_value_1 = /*positionPxArray*/ ctx[6];
794
+ each_blocks_1 = internal.update_keyed_each(each_blocks_1, dirty, get_key, 1, ctx, each_value_1, each0_lookup, div1, internal.destroy_block, create_each_block_1, t1, get_each_context_1);
795
+ }
796
+
797
+ if (dirty & /*isLeft, isTop, isRight, isBottom, textArray, isRow*/ 1086) {
798
+ each_value = /*textArray*/ ctx[10];
799
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key_1, 1, ctx, each_value, each1_lookup, div1, internal.destroy_block, create_each_block$3, null, get_each_context$3);
800
+ }
801
+
802
+ if (dirty & /*type*/ 1 && div1_class_value !== (div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in")) {
803
+ internal.attr(div1, "class", div1_class_value);
804
+ }
805
+ },
806
+ i: internal.noop,
807
+ o: internal.noop,
808
+ d(detaching) {
809
+ if (detaching) internal.detach(div1);
810
+
811
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
812
+ each_blocks_1[i].d();
813
+ }
814
+
815
+ for (let i = 0; i < each_blocks.length; i += 1) {
816
+ each_blocks[i].d();
817
+ }
818
+ }
819
+ };
820
+ }
821
+
822
+ const padding = 1000;
823
+
824
+ function instance$c($$self, $$props, $$invalidate) {
825
+ let { pxmm } = $$props;
826
+ let { type } = $$props;
827
+ let { data } = $$props;
828
+ let { bounding } = $$props;
829
+ const isTop = type === 'top';
830
+ const isBottom = type === 'bottom';
831
+ const isLeft = type === 'left';
832
+ const isRight = type === 'right';
833
+ const isRow = isTop || isBottom;
834
+
835
+ // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
836
+ const positionArray = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
837
+ if (index === 0) return true;
838
+ return x !== arr[index - 1];
839
+ });
840
+
841
+ const minPosition = positionArray[0];
842
+ const maxPosition = positionArray.slice(-1)[0];
843
+ const length = maxPosition - minPosition;
844
+ const minBounding = isRow ? bounding.min.x : bounding.min.y;
845
+ const lengthPx = length * pxmm;
846
+ const positionPxArray = positionArray.map(x => (x - minPosition) / length * lengthPx);
847
+
848
+ // 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
849
+ const translateMain = (minPosition - minBounding) * pxmm;
850
+
851
+ // 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
852
+ const translateSecond = 27 - padding * pxmm;
853
+
854
+ const translate = (() => {
855
+ if (isTop) return `translate(${translateMain}px, ${-translateSecond}px)`;
856
+ if (isBottom) return `translate(${translateMain}px, ${translateSecond}px)`;
857
+ if (isLeft) return `translate(${-translateSecond}px, ${-translateMain}px)`;
858
+ if (isRight) return `translate(${translateSecond}px, ${-translateMain - lengthPx}px)`;
859
+ })();
860
+
861
+ const rotate = isRow ? 'rotate(0)' : 'rotate(-90deg)';
862
+ const transform = `${translate} ${rotate}`;
863
+ const transformOrigin = `${isRight ? 'right' : 'left'} ${isTop ? 'top' : 'bottom'}`;
864
+ const width = lengthPx + 'px';
865
+
866
+ // 把点位的户型图坐标转成距离起始位置的像素值
867
+ const textArray = positionArray.map((position, index, array) => {
868
+ if (index === 0) return null;
869
+ const distance = position - array[index - 1];
870
+ const positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
871
+ return { distance, positionPx };
872
+ }).filter(notNil).filter(item => item.distance / length > 0.12);
873
+
874
+ $$self.$$set = $$props => {
875
+ if ('pxmm' in $$props) $$invalidate(11, pxmm = $$props.pxmm);
876
+ if ('type' in $$props) $$invalidate(0, type = $$props.type);
877
+ if ('data' in $$props) $$invalidate(12, data = $$props.data);
878
+ if ('bounding' in $$props) $$invalidate(13, bounding = $$props.bounding);
879
+ };
880
+
881
+ return [
882
+ type,
883
+ isTop,
884
+ isBottom,
885
+ isLeft,
886
+ isRight,
887
+ isRow,
888
+ positionPxArray,
889
+ transform,
890
+ transformOrigin,
891
+ width,
892
+ textArray,
893
+ pxmm,
894
+ data,
895
+ bounding
896
+ ];
897
+ }
898
+
899
+ class RuleItem extends internal.SvelteComponent {
900
+ constructor(options) {
901
+ super();
902
+
903
+ internal.init(
904
+ this,
905
+ options,
906
+ instance$c,
907
+ create_fragment$c,
908
+ internal.safe_not_equal,
909
+ {
910
+ pxmm: 11,
911
+ type: 0,
912
+ data: 12,
913
+ bounding: 13
914
+ },
915
+ add_css$8
916
+ );
917
+ }
918
+ }
919
+
920
+ /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
921
+
922
+ function get_each_context$2(ctx, list, i) {
923
+ const child_ctx = ctx.slice();
924
+ child_ctx[7] = list[i][0];
925
+ child_ctx[8] = list[i][1];
926
+ return child_ctx;
927
+ }
928
+
929
+ // (12:2) {#each ruleLabelArray as [type, data] (type)}
930
+ function create_each_block$2(key_1, ctx) {
931
+ let first;
932
+ let ruleitem;
933
+ let current;
934
+
935
+ const ruleitem_spread_levels = [
936
+ {
937
+ type: /*type*/ ctx[7],
938
+ data: /*data*/ ctx[8],
939
+ pxmm: /*pxmm*/ ctx[0],
940
+ bounding: /*bounding*/ ctx[2]
941
+ }
942
+ ];
943
+
944
+ let ruleitem_props = {};
945
+
946
+ for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
947
+ ruleitem_props = internal.assign(ruleitem_props, ruleitem_spread_levels[i]);
948
+ }
949
+
950
+ ruleitem = new RuleItem({ props: ruleitem_props });
951
+
952
+ return {
953
+ key: key_1,
954
+ first: null,
955
+ c() {
956
+ first = internal.empty();
957
+ internal.create_component(ruleitem.$$.fragment);
958
+ this.first = first;
959
+ },
960
+ m(target, anchor) {
961
+ internal.insert(target, first, anchor);
962
+ internal.mount_component(ruleitem, target, anchor);
963
+ current = true;
964
+ },
965
+ p(new_ctx, dirty) {
966
+ ctx = new_ctx;
967
+
968
+ const ruleitem_changes = (dirty & /*ruleLabelArray, pxmm, bounding*/ 7)
969
+ ? internal.get_spread_update(ruleitem_spread_levels, [
970
+ {
971
+ type: /*type*/ ctx[7],
972
+ data: /*data*/ ctx[8],
973
+ pxmm: /*pxmm*/ ctx[0],
974
+ bounding: /*bounding*/ ctx[2]
975
+ }
976
+ ])
977
+ : {};
978
+
979
+ ruleitem.$set(ruleitem_changes);
980
+ },
981
+ i(local) {
982
+ if (current) return;
983
+ internal.transition_in(ruleitem.$$.fragment, local);
984
+ current = true;
985
+ },
986
+ o(local) {
987
+ internal.transition_out(ruleitem.$$.fragment, local);
988
+ current = false;
989
+ },
990
+ d(detaching) {
991
+ if (detaching) internal.detach(first);
992
+ internal.destroy_component(ruleitem, detaching);
993
+ }
994
+ };
995
+ }
996
+
997
+ function create_fragment$b(ctx) {
998
+ let div;
999
+ let each_blocks = [];
1000
+ let each_1_lookup = new Map();
1001
+ let current;
1002
+ let each_value = /*ruleLabelArray*/ ctx[1];
1003
+ const get_key = ctx => /*type*/ ctx[7];
1004
+
1005
+ for (let i = 0; i < each_value.length; i += 1) {
1006
+ let child_ctx = get_each_context$2(ctx, each_value, i);
1007
+ let key = get_key(child_ctx);
1008
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$2(key, child_ctx));
1009
+ }
1010
+
1011
+ return {
1012
+ c() {
1013
+ div = internal.element("div");
1014
+
1015
+ for (let i = 0; i < each_blocks.length; i += 1) {
1016
+ each_blocks[i].c();
1017
+ }
1018
+
1019
+ internal.attr(div, "class", "floorplan-plugin__rulelabels");
1020
+ },
1021
+ m(target, anchor) {
1022
+ internal.insert(target, div, anchor);
1023
+
1024
+ for (let i = 0; i < each_blocks.length; i += 1) {
1025
+ each_blocks[i].m(div, null);
1026
+ }
1027
+
1028
+ current = true;
1029
+ },
1030
+ p(ctx, [dirty]) {
1031
+ if (dirty & /*ruleLabelArray, pxmm, bounding*/ 7) {
1032
+ each_value = /*ruleLabelArray*/ ctx[1];
1033
+ internal.group_outros();
1034
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$2, null, get_each_context$2);
1035
+ internal.check_outros();
1036
+ }
1037
+ },
1038
+ i(local) {
1039
+ if (current) return;
1040
+
1041
+ for (let i = 0; i < each_value.length; i += 1) {
1042
+ internal.transition_in(each_blocks[i]);
1043
+ }
1044
+
1045
+ current = true;
1046
+ },
1047
+ o(local) {
1048
+ for (let i = 0; i < each_blocks.length; i += 1) {
1049
+ internal.transition_out(each_blocks[i]);
1050
+ }
1051
+
1052
+ current = false;
1053
+ },
1054
+ d(detaching) {
1055
+ if (detaching) internal.detach(div);
1056
+
1057
+ for (let i = 0; i < each_blocks.length; i += 1) {
1058
+ each_blocks[i].d();
1059
+ }
1060
+ }
1061
+ };
1062
+ }
1063
+
1064
+ function instance$b($$self, $$props, $$invalidate) {
1065
+ let bounding;
1066
+ let ruleLabelData;
1067
+ let ruleLabelDataKeys;
1068
+ let ruleLabelArray;
1069
+ let { pxmm } = $$props;
1070
+ let { floorIndex } = $$props;
1071
+ let { floorplanData } = $$props;
1072
+
1073
+ $$self.$$set = $$props => {
1074
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
1075
+ if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
1076
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
1077
+ };
1078
+
1079
+ $$self.$$.update = () => {
1080
+ if ($$self.$$.dirty & /*floorplanData*/ 16) {
1081
+ $$invalidate(2, bounding = floorplanData.bounding);
1082
+ }
1083
+
1084
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
1085
+ $$invalidate(5, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
1086
+ }
1087
+
1088
+ if ($$self.$$.dirty & /*ruleLabelData*/ 32) {
1089
+ $$invalidate(6, ruleLabelDataKeys = Object.keys(ruleLabelData));
1090
+ }
1091
+
1092
+ if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 96) {
1093
+ $$invalidate(1, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
1094
+ }
1095
+ };
1096
+
1097
+ return [
1098
+ pxmm,
1099
+ ruleLabelArray,
1100
+ bounding,
1101
+ floorIndex,
1102
+ floorplanData,
1103
+ ruleLabelData,
1104
+ ruleLabelDataKeys
1105
+ ];
1106
+ }
1107
+
1108
+ class RuleLabels extends internal.SvelteComponent {
1109
+ constructor(options) {
1110
+ super();
1111
+ internal.init(this, options, instance$b, create_fragment$b, internal.safe_not_equal, { pxmm: 0, floorIndex: 3, floorplanData: 4 });
1112
+ }
1113
+ }
1114
+
1115
+ /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
1116
+
1117
+ function add_css$7(target) {
1118
+ internal.append_styles(target, "svelte-1cuuebb", "img.svelte-1cuuebb{width:100%;height:100%}");
1119
+ }
1120
+
1121
+ function create_fragment$a(ctx) {
1122
+ let img;
1123
+ let img_src_value;
1124
+
1125
+ return {
1126
+ c() {
1127
+ img = internal.element("img");
1128
+ if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
1129
+ internal.attr(img, "alt", "floorplan iamge");
1130
+ internal.attr(img, "class", "svelte-1cuuebb");
1131
+ },
1132
+ m(target, anchor) {
1133
+ internal.insert(target, img, anchor);
1134
+ },
1135
+ p(ctx, [dirty]) {
1136
+ if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
1137
+ internal.attr(img, "src", img_src_value);
1138
+ }
1139
+ },
1140
+ i: internal.noop,
1141
+ o: internal.noop,
1142
+ d(detaching) {
1143
+ if (detaching) internal.detach(img);
1144
+ }
1145
+ };
1146
+ }
1147
+
1148
+ function instance$a($$self, $$props, $$invalidate) {
1149
+ let { url } = $$props;
1150
+
1151
+ $$self.$$set = $$props => {
1152
+ if ('url' in $$props) $$invalidate(0, url = $$props.url);
1153
+ };
1154
+
1155
+ return [url];
1156
+ }
1157
+
1158
+ class Normalmage extends internal.SvelteComponent {
1159
+ constructor(options) {
1160
+ super();
1161
+ internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, { url: 0 }, add_css$7);
1162
+ }
1163
+ }
1164
+
1165
+ /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
1166
+
1167
+ function add_css$6(target) {
1168
+ internal.append_styles(target, "svelte-1qqy56u", ".floorplan-plugin__base-image.svelte-1qqy56u{width:100%;height:100%}");
1169
+ }
1170
+
1171
+ function create_fragment$9(ctx) {
1172
+ let div;
1173
+ let html_tag;
1174
+ let t;
1175
+ let html_tag_1;
1176
+
1177
+ return {
1178
+ c() {
1179
+ div = internal.element("div");
1180
+ html_tag = new internal.HtmlTag();
1181
+ t = internal.space();
1182
+ html_tag_1 = new internal.HtmlTag();
1183
+ html_tag.a = t;
1184
+ html_tag_1.a = null;
1185
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-1qqy56u");
1186
+ },
1187
+ m(target, anchor) {
1188
+ internal.insert(target, div, anchor);
1189
+ html_tag.m(/*svgStyle*/ ctx[1], div);
1190
+ internal.append(div, t);
1191
+ html_tag_1.m(/*content*/ ctx[0], div);
1192
+ },
1193
+ p(ctx, [dirty]) {
1194
+ if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
1195
+ },
1196
+ i: internal.noop,
1197
+ o: internal.noop,
1198
+ d(detaching) {
1199
+ if (detaching) internal.detach(div);
1200
+ }
1201
+ };
1202
+ }
1203
+
1204
+ function instance$9($$self, $$props, $$invalidate) {
1205
+ let { content } = $$props;
1206
+
1207
+ const svgStyle = `
1208
+ <style>
1209
+ svg [type='lineGroup'] path {
1210
+ fill: #ffffff;
1211
+ stroke: #ffffff;
1212
+ }
1213
+ svg [type='lineItemGroup'] g g g g {
1214
+ stroke: #ffffff;
1215
+ }
1216
+ </style>
1217
+ `;
1218
+
1219
+ $$self.$$set = $$props => {
1220
+ if ('content' in $$props) $$invalidate(0, content = $$props.content);
1221
+ };
1222
+
1223
+ return [content, svgStyle];
1224
+ }
1225
+
1226
+ class SvgImage extends internal.SvelteComponent {
1227
+ constructor(options) {
1228
+ super();
1229
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, { content: 0 }, add_css$6);
1230
+ }
1231
+ }
1232
+
1233
+ /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
1234
+
1235
+ function add_css$5(target) {
1236
+ internal.append_styles(target, "svelte-126ja8e", ".floorplan-plugin__base-image.svelte-126ja8e{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
1237
+ }
1238
+
1239
+ // (12:22)
1240
+ function create_if_block_1$3(ctx) {
1241
+ let normalimage;
1242
+ let current;
1243
+ normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
1244
+
1245
+ return {
1246
+ c() {
1247
+ internal.create_component(normalimage.$$.fragment);
1248
+ },
1249
+ m(target, anchor) {
1250
+ internal.mount_component(normalimage, target, anchor);
1251
+ current = true;
1252
+ },
1253
+ p(ctx, dirty) {
1254
+ const normalimage_changes = {};
1255
+ if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
1256
+ normalimage.$set(normalimage_changes);
1257
+ },
1258
+ i(local) {
1259
+ if (current) return;
1260
+ internal.transition_in(normalimage.$$.fragment, local);
1261
+ current = true;
1262
+ },
1263
+ o(local) {
1264
+ internal.transition_out(normalimage.$$.fragment, local);
1265
+ current = false;
1266
+ },
1267
+ d(detaching) {
1268
+ internal.destroy_component(normalimage, detaching);
1269
+ }
1270
+ };
1271
+ }
1272
+
1273
+ // (10:2) {#if svgContent}
1274
+ function create_if_block$3(ctx) {
1275
+ let svgimage;
1276
+ let current;
1277
+
1278
+ svgimage = new SvgImage({
1279
+ props: { content: /*svgContent*/ ctx[0] }
1280
+ });
1281
+
1282
+ return {
1283
+ c() {
1284
+ internal.create_component(svgimage.$$.fragment);
1285
+ },
1286
+ m(target, anchor) {
1287
+ internal.mount_component(svgimage, target, anchor);
1288
+ current = true;
1289
+ },
1290
+ p(ctx, dirty) {
1291
+ const svgimage_changes = {};
1292
+ if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
1293
+ svgimage.$set(svgimage_changes);
1294
+ },
1295
+ i(local) {
1296
+ if (current) return;
1297
+ internal.transition_in(svgimage.$$.fragment, local);
1298
+ current = true;
1299
+ },
1300
+ o(local) {
1301
+ internal.transition_out(svgimage.$$.fragment, local);
1302
+ current = false;
1303
+ },
1304
+ d(detaching) {
1305
+ internal.destroy_component(svgimage, detaching);
1306
+ }
1307
+ };
1308
+ }
1309
+
1310
+ function create_fragment$8(ctx) {
1311
+ let div;
1312
+ let current_block_type_index;
1313
+ let if_block;
1314
+ let current;
1315
+ const if_block_creators = [create_if_block$3, create_if_block_1$3];
1316
+ const if_blocks = [];
1317
+
1318
+ function select_block_type(ctx, dirty) {
1319
+ if (/*svgContent*/ ctx[0]) return 0;
1320
+ if (/*imageData*/ ctx[1]) return 1;
1321
+ return -1;
1322
+ }
1323
+
1324
+ if (~(current_block_type_index = select_block_type(ctx))) {
1325
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1326
+ }
1327
+
1328
+ return {
1329
+ c() {
1330
+ div = internal.element("div");
1331
+ if (if_block) if_block.c();
1332
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-126ja8e");
1333
+ },
1334
+ m(target, anchor) {
1335
+ internal.insert(target, div, anchor);
1336
+
1337
+ if (~current_block_type_index) {
1338
+ if_blocks[current_block_type_index].m(div, null);
1339
+ }
1340
+
1341
+ current = true;
1342
+ },
1343
+ p(ctx, [dirty]) {
1344
+ let previous_block_index = current_block_type_index;
1345
+ current_block_type_index = select_block_type(ctx);
1346
+
1347
+ if (current_block_type_index === previous_block_index) {
1348
+ if (~current_block_type_index) {
1349
+ if_blocks[current_block_type_index].p(ctx, dirty);
1350
+ }
1351
+ } else {
1352
+ if (if_block) {
1353
+ internal.group_outros();
1354
+
1355
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
1356
+ if_blocks[previous_block_index] = null;
1357
+ });
1358
+
1359
+ internal.check_outros();
1360
+ }
1361
+
1362
+ if (~current_block_type_index) {
1363
+ if_block = if_blocks[current_block_type_index];
1364
+
1365
+ if (!if_block) {
1366
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1367
+ if_block.c();
1368
+ } else {
1369
+ if_block.p(ctx, dirty);
1370
+ }
1371
+
1372
+ internal.transition_in(if_block, 1);
1373
+ if_block.m(div, null);
1374
+ } else {
1375
+ if_block = null;
1376
+ }
1377
+ }
1378
+ },
1379
+ i(local) {
1380
+ if (current) return;
1381
+ internal.transition_in(if_block);
1382
+ current = true;
1383
+ },
1384
+ o(local) {
1385
+ internal.transition_out(if_block);
1386
+ current = false;
1387
+ },
1388
+ d(detaching) {
1389
+ if (detaching) internal.detach(div);
1390
+
1391
+ if (~current_block_type_index) {
1392
+ if_blocks[current_block_type_index].d();
1393
+ }
1394
+ }
1395
+ };
1396
+ }
1397
+
1398
+ function instance$8($$self, $$props, $$invalidate) {
1399
+ let imageData;
1400
+ let svgContent;
1401
+ let { floorIndex } = $$props;
1402
+ let { floorplanData } = $$props;
1403
+
1404
+ $$self.$$set = $$props => {
1405
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
1406
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
1407
+ };
1408
+
1409
+ $$self.$$.update = () => {
1410
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1411
+ $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
1412
+ }
1413
+
1414
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1415
+ $$invalidate(0, svgContent = floorplanData.outlines?.[floorIndex]?.svgContent);
1416
+ }
1417
+ };
1418
+
1419
+ return [svgContent, imageData, floorIndex, floorplanData];
1420
+ }
1421
+
1422
+ class BaseImage extends internal.SvelteComponent {
1423
+ constructor(options) {
1424
+ super();
1425
+ internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$5);
1426
+ }
1427
+ }
1428
+
1429
+ function pathD(points, options = {}) {
1430
+ let d = '';
1431
+ const { needZ, needA } = options;
1432
+ const _points = needZ ? points.slice().concat(points[0]) : points.slice();
1433
+ _points.forEach((_point, index) => {
1434
+ const { x, y } = options.format ? options.format(_point) : _point;
1435
+ const point = x + ',' + y;
1436
+ if (index === 0) {
1437
+ d += 'M' + point;
1438
+ return d;
1439
+ }
1440
+ if (needA?.[index]) {
1441
+ d += 'A' + needA[index] + ',' + point;
1442
+ return d;
1443
+ }
1444
+ d += 'L' + point;
1445
+ return d;
1446
+ });
1447
+ return d + (needZ ? 'Z' : '');
1448
+ }
1449
+ /** 把户型图上点点位转换到 SVG 上的点位 */
1450
+ function formatFloorplanPoint({ x, y }, pxmm, bounding) {
1451
+ const { max, min } = bounding;
1452
+ return { x: (x - min.x) * pxmm, y: (max.y - y) * pxmm };
1453
+ }
1454
+
1455
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
1456
+
1457
+ function create_fragment$7(ctx) {
1458
+ let path_1;
1459
+
1460
+ return {
1461
+ c() {
1462
+ path_1 = internal.svg_element("path");
1463
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1464
+ internal.attr(path_1, "fill", "#2F313A");
1465
+ },
1466
+ m(target, anchor) {
1467
+ internal.insert(target, path_1, anchor);
1468
+ },
1469
+ p(ctx, [dirty]) {
1470
+ if (dirty & /*d*/ 1) {
1471
+ internal.attr(path_1, "d", /*d*/ ctx[0]);
1472
+ }
1473
+ },
1474
+ i: internal.noop,
1475
+ o: internal.noop,
1476
+ d(detaching) {
1477
+ if (detaching) internal.detach(path_1);
1478
+ }
1479
+ };
1480
+ }
1481
+
1482
+ function instance$7($$self, $$props, $$invalidate) {
1483
+ let d;
1484
+ let { path } = $$props;
1485
+
1486
+ $$self.$$set = $$props => {
1487
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
1488
+ };
1489
+
1490
+ $$self.$$.update = () => {
1491
+ if ($$self.$$.dirty & /*path*/ 2) {
1492
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1493
+ }
1494
+ };
1495
+
1496
+ return [d, path];
1497
+ }
1498
+
1499
+ class RoomMaterial_0 extends internal.SvelteComponent {
1500
+ constructor(options) {
1501
+ super();
1502
+ internal.init(this, options, instance$7, create_fragment$7, internal.safe_not_equal, { path: 1 });
1503
+ }
1504
+ }
1505
+
1506
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
1507
+
1508
+ function create_fragment$6(ctx) {
1509
+ let defs;
1510
+ let pattern;
1511
+ let rect;
1512
+ let path0;
1513
+ let t;
1514
+ let path1;
1515
+
1516
+ return {
1517
+ c() {
1518
+ defs = internal.svg_element("defs");
1519
+ pattern = internal.svg_element("pattern");
1520
+ rect = internal.svg_element("rect");
1521
+ path0 = internal.svg_element("path");
1522
+ t = internal.space();
1523
+ path1 = internal.svg_element("path");
1524
+ internal.attr(rect, "x", "0");
1525
+ internal.attr(rect, "y", "0");
1526
+ internal.attr(rect, "width", /*width*/ ctx[1]);
1527
+ internal.attr(rect, "height", /*width*/ ctx[1]);
1528
+ internal.attr(rect, "fill", "#323747");
1529
+ internal.attr(path0, "d", /*patternPathD*/ ctx[2]);
1530
+ internal.attr(path0, "stroke", "#ffffff");
1531
+ internal.attr(path0, "stroke-opacity", "0.06");
1532
+ internal.attr(path0, "stroke-width", "0.5");
1533
+ internal.attr(path0, "fill", "none");
1534
+ internal.attr(pattern, "id", "fpm-room-pattern-0");
1535
+ internal.attr(pattern, "x", "0");
1536
+ internal.attr(pattern, "y", "0");
1537
+ internal.attr(pattern, "width", /*width*/ ctx[1]);
1538
+ internal.attr(pattern, "height", /*width*/ ctx[1]);
1539
+ internal.attr(pattern, "patternUnits", "userSpaceOnUse");
1540
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1541
+ internal.attr(path1, "fill", "url(#fpm-room-pattern-0)");
1542
+ },
1543
+ m(target, anchor) {
1544
+ internal.insert(target, defs, anchor);
1545
+ internal.append(defs, pattern);
1546
+ internal.append(pattern, rect);
1547
+ internal.append(pattern, path0);
1548
+ internal.insert(target, t, anchor);
1549
+ internal.insert(target, path1, anchor);
1550
+ },
1551
+ p(ctx, [dirty]) {
1552
+ if (dirty & /*d*/ 1) {
1553
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1554
+ }
1555
+ },
1556
+ i: internal.noop,
1557
+ o: internal.noop,
1558
+ d(detaching) {
1559
+ if (detaching) internal.detach(defs);
1560
+ if (detaching) internal.detach(t);
1561
+ if (detaching) internal.detach(path1);
1562
+ }
1563
+ };
1564
+ }
1565
+
1566
+ const halfWidth = 6;
1567
+
1568
+ function instance$6($$self, $$props, $$invalidate) {
1569
+ let d;
1570
+ let { path } = $$props;
1571
+ const width = halfWidth * 2;
1572
+ const patternPathD = `M0 ${halfWidth} h ${width} M${halfWidth} 0 v ${width}`;
1573
+
1574
+ $$self.$$set = $$props => {
1575
+ if ('path' in $$props) $$invalidate(3, path = $$props.path);
1576
+ };
1577
+
1578
+ $$self.$$.update = () => {
1579
+ if ($$self.$$.dirty & /*path*/ 8) {
1580
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1581
+ }
1582
+ };
1583
+
1584
+ return [d, width, patternPathD, path];
1585
+ }
1586
+
1587
+ class RoomMaterial_1 extends internal.SvelteComponent {
1588
+ constructor(options) {
1589
+ super();
1590
+ internal.init(this, options, instance$6, create_fragment$6, internal.safe_not_equal, { path: 3 });
1591
+ }
1592
+ }
1593
+
1594
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
1595
+
1596
+ function create_fragment$5(ctx) {
1597
+ let defs;
1598
+ let pattern0;
1599
+ let rect0;
1600
+ let pattern1;
1601
+ let rect1;
1602
+ let t0;
1603
+ let path0;
1604
+ let t1;
1605
+ let path1;
1606
+ let t2;
1607
+ let path2;
1608
+
1609
+ return {
1610
+ c() {
1611
+ defs = internal.svg_element("defs");
1612
+ pattern0 = internal.svg_element("pattern");
1613
+ rect0 = internal.svg_element("rect");
1614
+ pattern1 = internal.svg_element("pattern");
1615
+ rect1 = internal.svg_element("rect");
1616
+ t0 = internal.space();
1617
+ path0 = internal.svg_element("path");
1618
+ t1 = internal.space();
1619
+ path1 = internal.svg_element("path");
1620
+ t2 = internal.space();
1621
+ path2 = internal.svg_element("path");
1622
+ internal.attr(rect0, "x", "0.5");
1623
+ internal.attr(rect0, "y", "0.5");
1624
+ internal.attr(rect0, "width", "6");
1625
+ internal.attr(rect0, "height", "50");
1626
+ internal.attr(rect0, "fill", "none");
1627
+ internal.attr(rect0, "stroke", "#4B4B57");
1628
+ internal.attr(rect0, "stroke-width", "0.5");
1629
+ internal.attr(pattern0, "id", "room-material-pattern-1");
1630
+ internal.attr(pattern0, "x", "0");
1631
+ internal.attr(pattern0, "y", "0");
1632
+ internal.attr(pattern0, "width", "13");
1633
+ internal.attr(pattern0, "height", "51");
1634
+ internal.attr(pattern0, "patternUnits", "userSpaceOnUse");
1635
+ internal.attr(rect1, "x", "0.5");
1636
+ internal.attr(rect1, "y", "0.5");
1637
+ internal.attr(rect1, "width", "6");
1638
+ internal.attr(rect1, "height", "50");
1639
+ internal.attr(rect1, "fill", "none");
1640
+ internal.attr(rect1, "stroke", "#4B4B57");
1641
+ internal.attr(rect1, "stroke-width", "0.5");
1642
+ internal.attr(pattern1, "id", "room-material-pattern-2");
1643
+ internal.attr(pattern1, "x", "7");
1644
+ internal.attr(pattern1, "y", "25");
1645
+ internal.attr(pattern1, "width", "13");
1646
+ internal.attr(pattern1, "height", "51");
1647
+ internal.attr(pattern1, "patternUnits", "userSpaceOnUse");
1648
+ internal.attr(path0, "d", /*d*/ ctx[0]);
1649
+ internal.attr(path0, "fill", "#43434D");
1650
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1651
+ internal.attr(path1, "fill", "url(#room-material-pattern-1)");
1652
+ internal.attr(path2, "d", /*d*/ ctx[0]);
1653
+ internal.attr(path2, "fill", "url(#room-material-pattern-2)");
1654
+ },
1655
+ m(target, anchor) {
1656
+ internal.insert(target, defs, anchor);
1657
+ internal.append(defs, pattern0);
1658
+ internal.append(pattern0, rect0);
1659
+ internal.append(defs, pattern1);
1660
+ internal.append(pattern1, rect1);
1661
+ internal.insert(target, t0, anchor);
1662
+ internal.insert(target, path0, anchor);
1663
+ internal.insert(target, t1, anchor);
1664
+ internal.insert(target, path1, anchor);
1665
+ internal.insert(target, t2, anchor);
1666
+ internal.insert(target, path2, anchor);
1667
+ },
1668
+ p(ctx, [dirty]) {
1669
+ if (dirty & /*d*/ 1) {
1670
+ internal.attr(path0, "d", /*d*/ ctx[0]);
1671
+ }
1672
+
1673
+ if (dirty & /*d*/ 1) {
1674
+ internal.attr(path1, "d", /*d*/ ctx[0]);
1675
+ }
1676
+
1677
+ if (dirty & /*d*/ 1) {
1678
+ internal.attr(path2, "d", /*d*/ ctx[0]);
1679
+ }
1680
+ },
1681
+ i: internal.noop,
1682
+ o: internal.noop,
1683
+ d(detaching) {
1684
+ if (detaching) internal.detach(defs);
1685
+ if (detaching) internal.detach(t0);
1686
+ if (detaching) internal.detach(path0);
1687
+ if (detaching) internal.detach(t1);
1688
+ if (detaching) internal.detach(path1);
1689
+ if (detaching) internal.detach(t2);
1690
+ if (detaching) internal.detach(path2);
1691
+ }
1692
+ };
1693
+ }
1694
+
1695
+ function instance$5($$self, $$props, $$invalidate) {
1696
+ let d;
1697
+ let { path } = $$props;
1698
+
1699
+ $$self.$$set = $$props => {
1700
+ if ('path' in $$props) $$invalidate(1, path = $$props.path);
1701
+ };
1702
+
1703
+ $$self.$$.update = () => {
1704
+ if ($$self.$$.dirty & /*path*/ 2) {
1705
+ $$invalidate(0, d = pathD(path, { needZ: true }));
1706
+ }
1707
+ };
1708
+
1709
+ return [d, path];
1710
+ }
1711
+
1712
+ class RoomMaterial_2 extends internal.SvelteComponent {
1713
+ constructor(options) {
1714
+ super();
1715
+ internal.init(this, options, instance$5, create_fragment$5, internal.safe_not_equal, { path: 1 });
1716
+ }
1717
+ }
1718
+
1719
+ /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
1720
+
1721
+ function add_css$4(target) {
1722
+ internal.append_styles(target, "svelte-1b0icjc", "svg.svelte-1b0icjc{position:absolute;width:100%;height:100%;overflow:visible}");
1723
+ }
1724
+
1725
+ function get_each_context$1(ctx, list, i) {
1726
+ const child_ctx = ctx.slice();
1727
+ child_ctx[4] = list[i];
1728
+ return child_ctx;
1729
+ }
1730
+
1731
+ // (21:6) {:else}
1732
+ function create_else_block(ctx) {
1733
+ let roommaterial_1;
1734
+ let current;
1735
+ roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[4].path } });
1736
+
1737
+ return {
1738
+ c() {
1739
+ internal.create_component(roommaterial_1.$$.fragment);
1740
+ },
1741
+ m(target, anchor) {
1742
+ internal.mount_component(roommaterial_1, target, anchor);
1743
+ current = true;
1744
+ },
1745
+ p(ctx, dirty) {
1746
+ const roommaterial_1_changes = {};
1747
+ if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[4].path;
1748
+ roommaterial_1.$set(roommaterial_1_changes);
1749
+ },
1750
+ i(local) {
1751
+ if (current) return;
1752
+ internal.transition_in(roommaterial_1.$$.fragment, local);
1753
+ current = true;
1754
+ },
1755
+ o(local) {
1756
+ internal.transition_out(roommaterial_1.$$.fragment, local);
1757
+ current = false;
1758
+ },
1759
+ d(detaching) {
1760
+ internal.destroy_component(roommaterial_1, detaching);
1761
+ }
1762
+ };
1763
+ }
1764
+
1765
+ // (19:37)
1766
+ function create_if_block_1$2(ctx) {
1767
+ let roommaterial_2;
1768
+ let current;
1769
+ roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[4].path } });
1770
+
1771
+ return {
1772
+ c() {
1773
+ internal.create_component(roommaterial_2.$$.fragment);
1774
+ },
1775
+ m(target, anchor) {
1776
+ internal.mount_component(roommaterial_2, target, anchor);
1777
+ current = true;
1778
+ },
1779
+ p(ctx, dirty) {
1780
+ const roommaterial_2_changes = {};
1781
+ if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[4].path;
1782
+ roommaterial_2.$set(roommaterial_2_changes);
1783
+ },
1784
+ i(local) {
1785
+ if (current) return;
1786
+ internal.transition_in(roommaterial_2.$$.fragment, local);
1787
+ current = true;
1788
+ },
1789
+ o(local) {
1790
+ internal.transition_out(roommaterial_2.$$.fragment, local);
1791
+ current = false;
1792
+ },
1793
+ d(detaching) {
1794
+ internal.destroy_component(roommaterial_2, detaching);
1795
+ }
1796
+ };
1797
+ }
1798
+
1799
+ // (17:6) {#if room.floorType === 1}
1800
+ function create_if_block$2(ctx) {
1801
+ let roommaterial_0;
1802
+ let current;
1803
+ roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[4].path } });
1804
+
1805
+ return {
1806
+ c() {
1807
+ internal.create_component(roommaterial_0.$$.fragment);
1808
+ },
1809
+ m(target, anchor) {
1810
+ internal.mount_component(roommaterial_0, target, anchor);
1811
+ current = true;
1812
+ },
1813
+ p(ctx, dirty) {
1814
+ const roommaterial_0_changes = {};
1815
+ if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[4].path;
1816
+ roommaterial_0.$set(roommaterial_0_changes);
1817
+ },
1818
+ i(local) {
1819
+ if (current) return;
1820
+ internal.transition_in(roommaterial_0.$$.fragment, local);
1821
+ current = true;
1822
+ },
1823
+ o(local) {
1824
+ internal.transition_out(roommaterial_0.$$.fragment, local);
1825
+ current = false;
1826
+ },
1827
+ d(detaching) {
1828
+ internal.destroy_component(roommaterial_0, detaching);
1829
+ }
1830
+ };
1831
+ }
1832
+
1833
+ // (15:2) {#each rooms as room}
1834
+ function create_each_block$1(ctx) {
1835
+ let svg;
1836
+ let current_block_type_index;
1837
+ let if_block;
1838
+ let current;
1839
+ const if_block_creators = [create_if_block$2, create_if_block_1$2, create_else_block];
1840
+ const if_blocks = [];
1841
+
1842
+ function select_block_type(ctx, dirty) {
1843
+ if (/*room*/ ctx[4].floorType === 1) return 0;
1844
+ if (/*room*/ ctx[4].floorType === 0) return 1;
1845
+ return 2;
1846
+ }
1847
+
1848
+ current_block_type_index = select_block_type(ctx);
1849
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1850
+
1851
+ return {
1852
+ c() {
1853
+ svg = internal.svg_element("svg");
1854
+ if_block.c();
1855
+ internal.attr(svg, "class", "svelte-1b0icjc");
1856
+ },
1857
+ m(target, anchor) {
1858
+ internal.insert(target, svg, anchor);
1859
+ if_blocks[current_block_type_index].m(svg, null);
1860
+ current = true;
1861
+ },
1862
+ p(ctx, dirty) {
1863
+ let previous_block_index = current_block_type_index;
1864
+ current_block_type_index = select_block_type(ctx);
1865
+
1866
+ if (current_block_type_index === previous_block_index) {
1867
+ if_blocks[current_block_type_index].p(ctx, dirty);
1868
+ } else {
1869
+ internal.group_outros();
1870
+
1871
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
1872
+ if_blocks[previous_block_index] = null;
1873
+ });
1874
+
1875
+ internal.check_outros();
1876
+ if_block = if_blocks[current_block_type_index];
1877
+
1878
+ if (!if_block) {
1879
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1880
+ if_block.c();
1881
+ } else {
1882
+ if_block.p(ctx, dirty);
1883
+ }
1884
+
1885
+ internal.transition_in(if_block, 1);
1886
+ if_block.m(svg, null);
1887
+ }
1888
+ },
1889
+ i(local) {
1890
+ if (current) return;
1891
+ internal.transition_in(if_block);
1892
+ current = true;
1893
+ },
1894
+ o(local) {
1895
+ internal.transition_out(if_block);
1896
+ current = false;
1897
+ },
1898
+ d(detaching) {
1899
+ if (detaching) internal.detach(svg);
1900
+ if_blocks[current_block_type_index].d();
1901
+ }
1902
+ };
1903
+ }
1904
+
1905
+ function create_fragment$4(ctx) {
1906
+ let div;
1907
+ let current;
1908
+ let each_value = /*rooms*/ ctx[0];
1909
+ let each_blocks = [];
1910
+
1911
+ for (let i = 0; i < each_value.length; i += 1) {
1912
+ each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
1913
+ }
1914
+
1915
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
1916
+ each_blocks[i] = null;
1917
+ });
1918
+
1919
+ return {
1920
+ c() {
1921
+ div = internal.element("div");
1922
+
1923
+ for (let i = 0; i < each_blocks.length; i += 1) {
1924
+ each_blocks[i].c();
1925
+ }
1926
+
1927
+ internal.attr(div, "class", "floorplan-plugin__room-material");
1928
+ },
1929
+ m(target, anchor) {
1930
+ internal.insert(target, div, anchor);
1931
+
1932
+ for (let i = 0; i < each_blocks.length; i += 1) {
1933
+ each_blocks[i].m(div, null);
1934
+ }
1935
+
1936
+ current = true;
1937
+ },
1938
+ p(ctx, [dirty]) {
1939
+ if (dirty & /*rooms*/ 1) {
1940
+ each_value = /*rooms*/ ctx[0];
1941
+ let i;
1942
+
1943
+ for (i = 0; i < each_value.length; i += 1) {
1944
+ const child_ctx = get_each_context$1(ctx, each_value, i);
1945
+
1946
+ if (each_blocks[i]) {
1947
+ each_blocks[i].p(child_ctx, dirty);
1948
+ internal.transition_in(each_blocks[i], 1);
1949
+ } else {
1950
+ each_blocks[i] = create_each_block$1(child_ctx);
1951
+ each_blocks[i].c();
1952
+ internal.transition_in(each_blocks[i], 1);
1953
+ each_blocks[i].m(div, null);
1954
+ }
1955
+ }
1956
+
1957
+ internal.group_outros();
1958
+
1959
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
1960
+ out(i);
1961
+ }
1962
+
1963
+ internal.check_outros();
1964
+ }
1965
+ },
1966
+ i(local) {
1967
+ if (current) return;
1968
+
1969
+ for (let i = 0; i < each_value.length; i += 1) {
1970
+ internal.transition_in(each_blocks[i]);
1971
+ }
1972
+
1973
+ current = true;
1974
+ },
1975
+ o(local) {
1976
+ each_blocks = each_blocks.filter(Boolean);
1977
+
1978
+ for (let i = 0; i < each_blocks.length; i += 1) {
1979
+ internal.transition_out(each_blocks[i]);
1980
+ }
1981
+
1982
+ current = false;
1983
+ },
1984
+ d(detaching) {
1985
+ if (detaching) internal.detach(div);
1986
+ internal.destroy_each(each_blocks, detaching);
1987
+ }
1988
+ };
1989
+ }
1990
+
1991
+ function instance$4($$self, $$props, $$invalidate) {
1992
+ let rooms;
1993
+ let { floorIndex } = $$props;
1994
+ let { pxmm } = $$props;
1995
+ let { floorplanData } = $$props;
1996
+
1997
+ $$self.$$set = $$props => {
1998
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
1999
+ if ('pxmm' in $$props) $$invalidate(2, pxmm = $$props.pxmm);
2000
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2001
+ };
2002
+
2003
+ $$self.$$.update = () => {
2004
+ if ($$self.$$.dirty & /*floorplanData, floorIndex, pxmm*/ 14) {
2005
+ $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => ({
2006
+ ...room,
2007
+ path: room.path.map(p => formatFloorplanPoint(p, pxmm, floorplanData.bounding))
2008
+ })));
2009
+ }
2010
+ };
2011
+
2012
+ return [rooms, floorIndex, pxmm, floorplanData];
2013
+ }
2014
+
2015
+ class RoomMaterial extends internal.SvelteComponent {
2016
+ constructor(options) {
2017
+ super();
2018
+ internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 1, pxmm: 2, floorplanData: 3 }, add_css$4);
2019
+ }
2020
+ }
2021
+
2022
+ /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
2023
+
2024
+ function add_css$3(target) {
2025
+ internal.append_styles(target, "svelte-11takew", "path.svelte-11takew{opacity:0}path.svelte-11takew:hover{opacity:0.1}");
2026
+ }
2027
+
2028
+ function create_fragment$3(ctx) {
2029
+ let path;
2030
+
2031
+ return {
2032
+ c() {
2033
+ path = internal.svg_element("path");
2034
+ internal.attr(path, "d", /*_pathD*/ ctx[0]);
2035
+ internal.attr(path, "fill", `#fff`);
2036
+ internal.attr(path, "class", "svelte-11takew");
2037
+ },
2038
+ m(target, anchor) {
2039
+ internal.insert(target, path, anchor);
2040
+ },
2041
+ p: internal.noop,
2042
+ i: internal.noop,
2043
+ o: internal.noop,
2044
+ d(detaching) {
2045
+ if (detaching) internal.detach(path);
2046
+ }
2047
+ };
2048
+ }
2049
+
2050
+ function instance$3($$self, $$props, $$invalidate) {
2051
+ let { pxmm } = $$props;
2052
+ let { room } = $$props;
2053
+ let { floorplanData } = $$props;
2054
+ const { bounding } = floorplanData;
2055
+
2056
+ const _pathD = pathD(room.path, {
2057
+ needZ: true,
2058
+ format: vector => formatFloorplanPoint(vector, pxmm, bounding)
2059
+ });
2060
+
2061
+ $$self.$$set = $$props => {
2062
+ if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
2063
+ if ('room' in $$props) $$invalidate(2, room = $$props.room);
2064
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2065
+ };
2066
+
2067
+ return [_pathD, pxmm, room, floorplanData];
2068
+ }
2069
+
2070
+ class Room extends internal.SvelteComponent {
2071
+ constructor(options) {
2072
+ super();
2073
+ internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { pxmm: 1, room: 2, floorplanData: 3 }, add_css$3);
2074
+ }
2075
+ }
2076
+
2077
+ /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
2078
+
2079
+ function add_css$2(target) {
2080
+ internal.append_styles(target, "svelte-1aais5l", ".floorplan-plugin__room-highlight.svelte-1aais5l{position:absolute;width:100%;height:100%;pointer-events:all}svg.svelte-1aais5l{width:100%;height:100%;overflow:visible}");
2081
+ }
2082
+
2083
+ function get_each_context(ctx, list, i) {
2084
+ const child_ctx = ctx.slice();
2085
+ child_ctx[12] = list[i];
2086
+ return child_ctx;
2087
+ }
2088
+
2089
+ // (41:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
2090
+ function create_each_block(key_1, ctx) {
2091
+ let first;
2092
+ let room;
2093
+ let current;
2094
+
2095
+ const room_spread_levels = [
2096
+ {
2097
+ room: /*room*/ ctx[12],
2098
+ floorplanData: /*floorplanData*/ ctx[2],
2099
+ pxmm: /*pxmm*/ ctx[0]
2100
+ }
2101
+ ];
2102
+
2103
+ let room_props = {};
2104
+
2105
+ for (let i = 0; i < room_spread_levels.length; i += 1) {
2106
+ room_props = internal.assign(room_props, room_spread_levels[i]);
2107
+ }
2108
+
2109
+ room = new Room({ props: room_props });
2110
+
2111
+ return {
2112
+ key: key_1,
2113
+ first: null,
2114
+ c() {
2115
+ first = internal.empty();
2116
+ internal.create_component(room.$$.fragment);
2117
+ this.first = first;
2118
+ },
2119
+ m(target, anchor) {
2120
+ internal.insert(target, first, anchor);
2121
+ internal.mount_component(room, target, anchor);
2122
+ current = true;
2123
+ },
2124
+ p(new_ctx, dirty) {
2125
+ ctx = new_ctx;
2126
+
2127
+ const room_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 7)
2128
+ ? internal.get_spread_update(room_spread_levels, [
2129
+ {
2130
+ room: /*room*/ ctx[12],
2131
+ floorplanData: /*floorplanData*/ ctx[2],
2132
+ pxmm: /*pxmm*/ ctx[0]
2133
+ }
2134
+ ])
2135
+ : {};
2136
+
2137
+ room.$set(room_changes);
2138
+ },
2139
+ i(local) {
2140
+ if (current) return;
2141
+ internal.transition_in(room.$$.fragment, local);
2142
+ current = true;
2143
+ },
2144
+ o(local) {
2145
+ internal.transition_out(room.$$.fragment, local);
2146
+ current = false;
2147
+ },
2148
+ d(detaching) {
2149
+ if (detaching) internal.detach(first);
2150
+ internal.destroy_component(room, detaching);
2151
+ }
2152
+ };
2153
+ }
2154
+
2155
+ function create_fragment$2(ctx) {
2156
+ let div;
2157
+ let svg;
2158
+ let each_blocks = [];
2159
+ let each_1_lookup = new Map();
2160
+ let div_resize_listener;
2161
+ let current;
2162
+ let mounted;
2163
+ let dispose;
2164
+ let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2165
+ const get_key = ctx => /*room*/ ctx[12].id;
2166
+
2167
+ for (let i = 0; i < each_value.length; i += 1) {
2168
+ let child_ctx = get_each_context(ctx, each_value, i);
2169
+ let key = get_key(child_ctx);
2170
+ each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
2171
+ }
2172
+
2173
+ return {
2174
+ c() {
2175
+ div = internal.element("div");
2176
+ svg = internal.svg_element("svg");
2177
+
2178
+ for (let i = 0; i < each_blocks.length; i += 1) {
2179
+ each_blocks[i].c();
2180
+ }
2181
+
2182
+ internal.attr(svg, "class", "svelte-1aais5l");
2183
+ internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1aais5l");
2184
+ internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[10].call(div));
2185
+ },
2186
+ m(target, anchor) {
2187
+ internal.insert(target, div, anchor);
2188
+ internal.append(div, svg);
2189
+
2190
+ for (let i = 0; i < each_blocks.length; i += 1) {
2191
+ each_blocks[i].m(svg, null);
2192
+ }
2193
+
2194
+ /*div_binding*/ ctx[9](div);
2195
+ div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
2196
+ current = true;
2197
+
2198
+ if (!mounted) {
2199
+ dispose = internal.listen(div, "click", /*handleClick*/ ctx[6]);
2200
+ mounted = true;
2201
+ }
2202
+ },
2203
+ p(ctx, [dirty]) {
2204
+ if (dirty & /*floorplanData, floorIndex, pxmm*/ 7) {
2205
+ each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2206
+ internal.group_outros();
2207
+ 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);
2208
+ internal.check_outros();
2209
+ }
2210
+ },
2211
+ i(local) {
2212
+ if (current) return;
2213
+
2214
+ for (let i = 0; i < each_value.length; i += 1) {
2215
+ internal.transition_in(each_blocks[i]);
2216
+ }
2217
+
2218
+ current = true;
2219
+ },
2220
+ o(local) {
2221
+ for (let i = 0; i < each_blocks.length; i += 1) {
2222
+ internal.transition_out(each_blocks[i]);
2223
+ }
2224
+
2225
+ current = false;
2226
+ },
2227
+ d(detaching) {
2228
+ if (detaching) internal.detach(div);
2229
+
2230
+ for (let i = 0; i < each_blocks.length; i += 1) {
2231
+ each_blocks[i].d();
2232
+ }
2233
+
2234
+ /*div_binding*/ ctx[9](null);
2235
+ div_resize_listener();
2236
+ mounted = false;
2237
+ dispose();
2238
+ }
2239
+ };
2240
+ }
2241
+
2242
+ function instance$2($$self, $$props, $$invalidate) {
2243
+ let { five } = $$props;
2244
+ let { pxmm } = $$props;
2245
+ let { floorIndex } = $$props;
2246
+ let { floorplanData } = $$props;
2247
+ let { onRoomHeightClick } = $$props;
2248
+ let clientWidth;
2249
+ let clientHeight;
2250
+ let highlightContainerDom;
2251
+ const { observers: floorplan_observers } = floorplanData;
2252
+
2253
+ const handleClick = function (e) {
2254
+ if (onRoomHeightClick?.(e) === false) return;
2255
+
2256
+ // 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
2257
+ const boundingClientRect = highlightContainerDom.getBoundingClientRect();
2258
+
2259
+ const mouseClientVector = new THREE.Vector2(e.clientX, e.clientY);
2260
+ const domTopLeftVector = new THREE.Vector2(boundingClientRect.left, boundingClientRect.top);
2261
+ const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
2262
+
2263
+ // px 转换为 百分比
2264
+ const mouseOffsetRelativeVector = new THREE.Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
2265
+
2266
+ const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
2267
+ const position1 = new THREE.Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
2268
+ const position2 = new THREE.Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
2269
+ return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
2270
+ })[0];
2271
+
2272
+ five.moveToPano(closestPoint.index);
2273
+ };
2274
+
2275
+ function div_binding($$value) {
2276
+ internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
2277
+ highlightContainerDom = $$value;
2278
+ $$invalidate(5, highlightContainerDom);
2279
+ });
2280
+ }
2281
+
2282
+ function div_elementresize_handler() {
2283
+ clientWidth = this.clientWidth;
2284
+ clientHeight = this.clientHeight;
2285
+ $$invalidate(3, clientWidth);
2286
+ $$invalidate(4, clientHeight);
2287
+ }
2288
+
2289
+ $$self.$$set = $$props => {
2290
+ if ('five' in $$props) $$invalidate(7, five = $$props.five);
2291
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2292
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2293
+ if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
2294
+ if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
2295
+ };
2296
+
2297
+ return [
2298
+ pxmm,
2299
+ floorIndex,
2300
+ floorplanData,
2301
+ clientWidth,
2302
+ clientHeight,
2303
+ highlightContainerDom,
2304
+ handleClick,
2305
+ five,
2306
+ onRoomHeightClick,
2307
+ div_binding,
2308
+ div_elementresize_handler
2309
+ ];
2310
+ }
2311
+
2312
+ class RoomHighlight extends internal.SvelteComponent {
2313
+ constructor(options) {
2314
+ super();
2315
+
2316
+ internal.init(
2317
+ this,
2318
+ options,
2319
+ instance$2,
2320
+ create_fragment$2,
2321
+ internal.safe_not_equal,
2322
+ {
2323
+ five: 7,
2324
+ pxmm: 0,
2325
+ floorIndex: 1,
2326
+ floorplanData: 2,
2327
+ onRoomHeightClick: 8
2328
+ },
2329
+ add_css$2
2330
+ );
2331
+ }
2332
+ }
2333
+
2334
+ /* src/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
2335
+
2336
+ function add_css$1(target) {
2337
+ internal.append_styles(target, "svelte-3pdgs4", ".floorplan-current-floor.svelte-3pdgs4{position:relative;width:100%;height:100%}");
2338
+ }
2339
+
2340
+ // (19:2) {#if hoverEnable}
2341
+ function create_if_block_2(ctx) {
2342
+ let roomhighlight;
2343
+ let current;
2344
+
2345
+ const roomhighlight_spread_levels = [
2346
+ {
2347
+ five: /*five*/ ctx[1],
2348
+ pxmm: /*pxmm*/ ctx[0],
2349
+ floorIndex: /*floorIndex*/ ctx[2],
2350
+ floorplanData: /*floorplanData*/ ctx[6],
2351
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2352
+ }
2353
+ ];
2354
+
2355
+ let roomhighlight_props = {};
2356
+
2357
+ for (let i = 0; i < roomhighlight_spread_levels.length; i += 1) {
2358
+ roomhighlight_props = internal.assign(roomhighlight_props, roomhighlight_spread_levels[i]);
2359
+ }
2360
+
2361
+ roomhighlight = new RoomHighlight({ props: roomhighlight_props });
2362
+
2363
+ return {
2364
+ c() {
2365
+ internal.create_component(roomhighlight.$$.fragment);
2366
+ },
2367
+ m(target, anchor) {
2368
+ internal.mount_component(roomhighlight, target, anchor);
2369
+ current = true;
2370
+ },
2371
+ p(ctx, dirty) {
2372
+ const roomhighlight_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, onRoomHeightClick*/ 199)
2373
+ ? internal.get_spread_update(roomhighlight_spread_levels, [
2374
+ {
2375
+ five: /*five*/ ctx[1],
2376
+ pxmm: /*pxmm*/ ctx[0],
2377
+ floorIndex: /*floorIndex*/ ctx[2],
2378
+ floorplanData: /*floorplanData*/ ctx[6],
2379
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2380
+ }
2381
+ ])
2382
+ : {};
2383
+
2384
+ roomhighlight.$set(roomhighlight_changes);
2385
+ },
2386
+ i(local) {
2387
+ if (current) return;
2388
+ internal.transition_in(roomhighlight.$$.fragment, local);
2389
+ current = true;
2390
+ },
2391
+ o(local) {
2392
+ internal.transition_out(roomhighlight.$$.fragment, local);
2393
+ current = false;
2394
+ },
2395
+ d(detaching) {
2396
+ internal.destroy_component(roomhighlight, detaching);
2397
+ }
2398
+ };
2399
+ }
2400
+
2401
+ // (23:2) {#if roomLabelsEnable}
2402
+ function create_if_block_1$1(ctx) {
2403
+ let roomlabels;
2404
+ let current;
2405
+
2406
+ const roomlabels_spread_levels = [
2407
+ {
2408
+ floorplanData: /*floorplanData*/ ctx[6],
2409
+ floorIndex: /*floorIndex*/ ctx[2],
2410
+ getLabelElement: /*getLabelElement*/ ctx[8]
2411
+ }
2412
+ ];
2413
+
2414
+ let roomlabels_props = {};
2415
+
2416
+ for (let i = 0; i < roomlabels_spread_levels.length; i += 1) {
2417
+ roomlabels_props = internal.assign(roomlabels_props, roomlabels_spread_levels[i]);
2418
+ }
2419
+
2420
+ roomlabels = new RoomLabels({ props: roomlabels_props });
2421
+
2422
+ return {
2423
+ c() {
2424
+ internal.create_component(roomlabels.$$.fragment);
2425
+ },
2426
+ m(target, anchor) {
2427
+ internal.mount_component(roomlabels, target, anchor);
2428
+ current = true;
2429
+ },
2430
+ p(ctx, dirty) {
2431
+ const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 324)
2432
+ ? internal.get_spread_update(roomlabels_spread_levels, [
2433
+ {
2434
+ floorplanData: /*floorplanData*/ ctx[6],
2435
+ floorIndex: /*floorIndex*/ ctx[2],
2436
+ getLabelElement: /*getLabelElement*/ ctx[8]
2437
+ }
2438
+ ])
2439
+ : {};
2440
+
2441
+ roomlabels.$set(roomlabels_changes);
2442
+ },
2443
+ i(local) {
2444
+ if (current) return;
2445
+ internal.transition_in(roomlabels.$$.fragment, local);
2446
+ current = true;
2447
+ },
2448
+ o(local) {
2449
+ internal.transition_out(roomlabels.$$.fragment, local);
2450
+ current = false;
2451
+ },
2452
+ d(detaching) {
2453
+ internal.destroy_component(roomlabels, detaching);
2454
+ }
2455
+ };
2456
+ }
2457
+
2458
+ // (26:2) {#if ruleLabelsEnable}
2459
+ function create_if_block$1(ctx) {
2460
+ let rulelabels;
2461
+ let current;
2462
+
2463
+ const rulelabels_spread_levels = [
2464
+ {
2465
+ floorplanData: /*floorplanData*/ ctx[6],
2466
+ floorIndex: /*floorIndex*/ ctx[2],
2467
+ pxmm: /*pxmm*/ ctx[0]
2468
+ }
2469
+ ];
2470
+
2471
+ let rulelabels_props = {};
2472
+
2473
+ for (let i = 0; i < rulelabels_spread_levels.length; i += 1) {
2474
+ rulelabels_props = internal.assign(rulelabels_props, rulelabels_spread_levels[i]);
2475
+ }
2476
+
2477
+ rulelabels = new RuleLabels({ props: rulelabels_props });
2478
+
2479
+ return {
2480
+ c() {
2481
+ internal.create_component(rulelabels.$$.fragment);
2482
+ },
2483
+ m(target, anchor) {
2484
+ internal.mount_component(rulelabels, target, anchor);
2485
+ current = true;
2486
+ },
2487
+ p(ctx, dirty) {
2488
+ const rulelabels_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 69)
2489
+ ? internal.get_spread_update(rulelabels_spread_levels, [
2490
+ {
2491
+ floorplanData: /*floorplanData*/ ctx[6],
2492
+ floorIndex: /*floorIndex*/ ctx[2],
2493
+ pxmm: /*pxmm*/ ctx[0]
2494
+ }
2495
+ ])
2496
+ : {};
2497
+
2498
+ rulelabels.$set(rulelabels_changes);
2499
+ },
2500
+ i(local) {
2501
+ if (current) return;
2502
+ internal.transition_in(rulelabels.$$.fragment, local);
2503
+ current = true;
2504
+ },
2505
+ o(local) {
2506
+ internal.transition_out(rulelabels.$$.fragment, local);
2507
+ current = false;
2508
+ },
2509
+ d(detaching) {
2510
+ internal.destroy_component(rulelabels, detaching);
2511
+ }
2512
+ };
2513
+ }
2514
+
2515
+ function create_fragment$1(ctx) {
2516
+ let div;
2517
+ let roommaterial;
2518
+ let t0;
2519
+ let t1;
2520
+ let baseimage;
2521
+ let t2;
2522
+ let t3;
2523
+ let current;
2524
+
2525
+ const roommaterial_spread_levels = [
2526
+ {
2527
+ floorIndex: /*floorIndex*/ ctx[2],
2528
+ floorplanData: /*floorplanData*/ ctx[6],
2529
+ pxmm: /*pxmm*/ ctx[0]
2530
+ }
2531
+ ];
2532
+
2533
+ let roommaterial_props = {};
2534
+
2535
+ for (let i = 0; i < roommaterial_spread_levels.length; i += 1) {
2536
+ roommaterial_props = internal.assign(roommaterial_props, roommaterial_spread_levels[i]);
2537
+ }
2538
+
2539
+ roommaterial = new RoomMaterial({ props: roommaterial_props });
2540
+ let if_block0 = /*hoverEnable*/ ctx[3] && create_if_block_2(ctx);
2541
+
2542
+ const baseimage_spread_levels = [
2543
+ {
2544
+ floorplanData: /*floorplanData*/ ctx[6],
2545
+ floorIndex: /*floorIndex*/ ctx[2]
2546
+ }
2547
+ ];
2548
+
2549
+ let baseimage_props = {};
2550
+
2551
+ for (let i = 0; i < baseimage_spread_levels.length; i += 1) {
2552
+ baseimage_props = internal.assign(baseimage_props, baseimage_spread_levels[i]);
2553
+ }
2554
+
2555
+ baseimage = new BaseImage({ props: baseimage_props });
2556
+ let if_block1 = /*roomLabelsEnable*/ ctx[4] && create_if_block_1$1(ctx);
2557
+ let if_block2 = /*ruleLabelsEnable*/ ctx[5] && create_if_block$1(ctx);
2558
+
2559
+ return {
2560
+ c() {
2561
+ div = internal.element("div");
2562
+ internal.create_component(roommaterial.$$.fragment);
2563
+ t0 = internal.space();
2564
+ if (if_block0) if_block0.c();
2565
+ t1 = internal.space();
2566
+ internal.create_component(baseimage.$$.fragment);
2567
+ t2 = internal.space();
2568
+ if (if_block1) if_block1.c();
2569
+ t3 = internal.space();
2570
+ if (if_block2) if_block2.c();
2571
+ internal.attr(div, "class", "floorplan-current-floor svelte-3pdgs4");
2572
+ },
2573
+ m(target, anchor) {
2574
+ internal.insert(target, div, anchor);
2575
+ internal.mount_component(roommaterial, div, null);
2576
+ internal.append(div, t0);
2577
+ if (if_block0) if_block0.m(div, null);
2578
+ internal.append(div, t1);
2579
+ internal.mount_component(baseimage, div, null);
2580
+ internal.append(div, t2);
2581
+ if (if_block1) if_block1.m(div, null);
2582
+ internal.append(div, t3);
2583
+ if (if_block2) if_block2.m(div, null);
2584
+ current = true;
2585
+ },
2586
+ p(ctx, [dirty]) {
2587
+ const roommaterial_changes = (dirty & /*floorIndex, floorplanData, pxmm*/ 69)
2588
+ ? internal.get_spread_update(roommaterial_spread_levels, [
2589
+ {
2590
+ floorIndex: /*floorIndex*/ ctx[2],
2591
+ floorplanData: /*floorplanData*/ ctx[6],
2592
+ pxmm: /*pxmm*/ ctx[0]
2593
+ }
2594
+ ])
2595
+ : {};
2596
+
2597
+ roommaterial.$set(roommaterial_changes);
2598
+
2599
+ if (/*hoverEnable*/ ctx[3]) {
2600
+ if (if_block0) {
2601
+ if_block0.p(ctx, dirty);
2602
+
2603
+ if (dirty & /*hoverEnable*/ 8) {
2604
+ internal.transition_in(if_block0, 1);
2605
+ }
2606
+ } else {
2607
+ if_block0 = create_if_block_2(ctx);
2608
+ if_block0.c();
2609
+ internal.transition_in(if_block0, 1);
2610
+ if_block0.m(div, t1);
2611
+ }
2612
+ } else if (if_block0) {
2613
+ internal.group_outros();
2614
+
2615
+ internal.transition_out(if_block0, 1, 1, () => {
2616
+ if_block0 = null;
2617
+ });
2618
+
2619
+ internal.check_outros();
2620
+ }
2621
+
2622
+ const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 68)
2623
+ ? internal.get_spread_update(baseimage_spread_levels, [
2624
+ {
2625
+ floorplanData: /*floorplanData*/ ctx[6],
2626
+ floorIndex: /*floorIndex*/ ctx[2]
2627
+ }
2628
+ ])
2629
+ : {};
2630
+
2631
+ baseimage.$set(baseimage_changes);
2632
+
2633
+ if (/*roomLabelsEnable*/ ctx[4]) {
2634
+ if (if_block1) {
2635
+ if_block1.p(ctx, dirty);
2636
+
2637
+ if (dirty & /*roomLabelsEnable*/ 16) {
2638
+ internal.transition_in(if_block1, 1);
2639
+ }
2640
+ } else {
2641
+ if_block1 = create_if_block_1$1(ctx);
2642
+ if_block1.c();
2643
+ internal.transition_in(if_block1, 1);
2644
+ if_block1.m(div, t3);
2645
+ }
2646
+ } else if (if_block1) {
2647
+ internal.group_outros();
2648
+
2649
+ internal.transition_out(if_block1, 1, 1, () => {
2650
+ if_block1 = null;
2651
+ });
2652
+
2653
+ internal.check_outros();
2654
+ }
2655
+
2656
+ if (/*ruleLabelsEnable*/ ctx[5]) {
2657
+ if (if_block2) {
2658
+ if_block2.p(ctx, dirty);
2659
+
2660
+ if (dirty & /*ruleLabelsEnable*/ 32) {
2661
+ internal.transition_in(if_block2, 1);
2662
+ }
2663
+ } else {
2664
+ if_block2 = create_if_block$1(ctx);
2665
+ if_block2.c();
2666
+ internal.transition_in(if_block2, 1);
2667
+ if_block2.m(div, null);
2668
+ }
2669
+ } else if (if_block2) {
2670
+ internal.group_outros();
2671
+
2672
+ internal.transition_out(if_block2, 1, 1, () => {
2673
+ if_block2 = null;
2674
+ });
2675
+
2676
+ internal.check_outros();
2677
+ }
2678
+ },
2679
+ i(local) {
2680
+ if (current) return;
2681
+ internal.transition_in(roommaterial.$$.fragment, local);
2682
+ internal.transition_in(if_block0);
2683
+ internal.transition_in(baseimage.$$.fragment, local);
2684
+ internal.transition_in(if_block1);
2685
+ internal.transition_in(if_block2);
2686
+ current = true;
2687
+ },
2688
+ o(local) {
2689
+ internal.transition_out(roommaterial.$$.fragment, local);
2690
+ internal.transition_out(if_block0);
2691
+ internal.transition_out(baseimage.$$.fragment, local);
2692
+ internal.transition_out(if_block1);
2693
+ internal.transition_out(if_block2);
2694
+ current = false;
2695
+ },
2696
+ d(detaching) {
2697
+ if (detaching) internal.detach(div);
2698
+ internal.destroy_component(roommaterial);
2699
+ if (if_block0) if_block0.d();
2700
+ internal.destroy_component(baseimage);
2701
+ if (if_block1) if_block1.d();
2702
+ if (if_block2) if_block2.d();
2703
+ }
2704
+ };
2705
+ }
2706
+
2707
+ function instance$1($$self, $$props, $$invalidate) {
2708
+ let { pxmm } = $$props;
2709
+ let { five } = $$props;
2710
+ let { floorIndex } = $$props;
2711
+ let { hoverEnable } = $$props;
2712
+ let { roomLabelsEnable } = $$props;
2713
+ let { ruleLabelsEnable } = $$props;
2714
+ let { floorplanData } = $$props;
2715
+ let { onRoomHeightClick } = $$props;
2716
+ let { getLabelElement } = $$props;
2717
+
2718
+ $$self.$$set = $$props => {
2719
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2720
+ if ('five' in $$props) $$invalidate(1, five = $$props.five);
2721
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
2722
+ if ('hoverEnable' in $$props) $$invalidate(3, hoverEnable = $$props.hoverEnable);
2723
+ if ('roomLabelsEnable' in $$props) $$invalidate(4, roomLabelsEnable = $$props.roomLabelsEnable);
2724
+ if ('ruleLabelsEnable' in $$props) $$invalidate(5, ruleLabelsEnable = $$props.ruleLabelsEnable);
2725
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
2726
+ if ('onRoomHeightClick' in $$props) $$invalidate(7, onRoomHeightClick = $$props.onRoomHeightClick);
2727
+ if ('getLabelElement' in $$props) $$invalidate(8, getLabelElement = $$props.getLabelElement);
2728
+ };
2729
+
2730
+ return [
2731
+ pxmm,
2732
+ five,
2733
+ floorIndex,
2734
+ hoverEnable,
2735
+ roomLabelsEnable,
2736
+ ruleLabelsEnable,
2737
+ floorplanData,
2738
+ onRoomHeightClick,
2739
+ getLabelElement
2740
+ ];
2741
+ }
2742
+
2743
+ class CurrentFloor extends internal.SvelteComponent {
2744
+ constructor(options) {
2745
+ super();
2746
+
2747
+ internal.init(
2748
+ this,
2749
+ options,
2750
+ instance$1,
2751
+ create_fragment$1,
2752
+ internal.safe_not_equal,
2753
+ {
2754
+ pxmm: 0,
2755
+ five: 1,
2756
+ floorIndex: 2,
2757
+ hoverEnable: 3,
2758
+ roomLabelsEnable: 4,
2759
+ ruleLabelsEnable: 5,
2760
+ floorplanData: 6,
2761
+ onRoomHeightClick: 7,
2762
+ getLabelElement: 8
2763
+ },
2764
+ add_css$1
2765
+ );
2766
+ }
2767
+ }
2768
+
2769
+ /* src/floorplan/ModelFloorplanPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
2770
+
2771
+ function add_css(target) {
2772
+ internal.append_styles(target, "svelte-177x2q7", ".floorplan-main.svelte-177x2q7{width:100%;height:100%}");
2773
+ }
2774
+
2775
+ // (24:0) {#if visible}
2776
+ function create_if_block(ctx) {
2777
+ let div;
2778
+ let currentfloor;
2779
+ let t0;
2780
+ let camera;
2781
+ let t1;
2782
+ let div_intro;
2783
+ let current;
2784
+
2785
+ const currentfloor_spread_levels = [
2786
+ {
2787
+ five: /*five*/ ctx[2],
2788
+ pxmm: /*pxmm*/ ctx[1],
2789
+ floorIndex: /*floorIndex*/ ctx[6],
2790
+ hoverEnable: /*hoverEnable*/ ctx[7],
2791
+ floorplanData: /*floorplanData*/ ctx[11],
2792
+ getLabelElement: /*getLabelElement*/ ctx[15],
2793
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
2794
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
2795
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
2796
+ }
2797
+ ];
2798
+
2799
+ let currentfloor_props = {};
2800
+
2801
+ for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
2802
+ currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
2803
+ }
2804
+
2805
+ currentfloor = new CurrentFloor({ props: currentfloor_props });
2806
+
2807
+ const camera_spread_levels = [
2808
+ {
2809
+ panoIndex: /*panoIndex*/ ctx[5],
2810
+ floorplanData: /*floorplanData*/ ctx[11],
2811
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
2812
+ cameraImageUrl: /*cameraImageUrl*/ ctx[13]
2813
+ }
2814
+ ];
2815
+
2816
+ let camera_props = {};
2817
+
2818
+ for (let i = 0; i < camera_spread_levels.length; i += 1) {
2819
+ camera_props = internal.assign(camera_props, camera_spread_levels[i]);
2820
+ }
2821
+
2822
+ camera = new Camera({ props: camera_props });
2823
+ let if_block = /*compassEnable*/ ctx[8] && create_if_block_1(ctx);
2824
+
2825
+ return {
2826
+ c() {
2827
+ div = internal.element("div");
2828
+ internal.create_component(currentfloor.$$.fragment);
2829
+ t0 = internal.space();
2830
+ internal.create_component(camera.$$.fragment);
2831
+ t1 = internal.space();
2832
+ if (if_block) if_block.c();
2833
+ internal.attr(div, "class", "floorplan-main svelte-177x2q7");
2834
+ },
2835
+ m(target, anchor) {
2836
+ internal.insert(target, div, anchor);
2837
+ internal.mount_component(currentfloor, div, null);
2838
+ internal.append(div, t0);
2839
+ internal.mount_component(camera, div, null);
2840
+ internal.append(div, t1);
2841
+ if (if_block) if_block.m(div, null);
2842
+ current = true;
2843
+ },
2844
+ p(new_ctx, dirty) {
2845
+ ctx = new_ctx;
2846
+
2847
+ const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, onRoomHeightClick*/ 52934)
2848
+ ? internal.get_spread_update(currentfloor_spread_levels, [
2849
+ {
2850
+ five: /*five*/ ctx[2],
2851
+ pxmm: /*pxmm*/ ctx[1],
2852
+ floorIndex: /*floorIndex*/ ctx[6],
2853
+ hoverEnable: /*hoverEnable*/ ctx[7],
2854
+ floorplanData: /*floorplanData*/ ctx[11],
2855
+ getLabelElement: /*getLabelElement*/ ctx[15],
2856
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
2857
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
2858
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
2859
+ }
2860
+ ])
2861
+ : {};
2862
+
2863
+ currentfloor.$set(currentfloor_changes);
2864
+
2865
+ const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 14368)
2866
+ ? internal.get_spread_update(camera_spread_levels, [
2867
+ {
2868
+ panoIndex: /*panoIndex*/ ctx[5],
2869
+ floorplanData: /*floorplanData*/ ctx[11],
2870
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
2871
+ cameraImageUrl: /*cameraImageUrl*/ ctx[13]
2872
+ }
2873
+ ])
2874
+ : {};
2875
+
2876
+ camera.$set(camera_changes);
2877
+
2878
+ if (/*compassEnable*/ ctx[8]) {
2879
+ if (if_block) {
2880
+ if_block.p(ctx, dirty);
2881
+
2882
+ if (dirty & /*compassEnable*/ 256) {
2883
+ internal.transition_in(if_block, 1);
2884
+ }
2885
+ } else {
2886
+ if_block = create_if_block_1(ctx);
2887
+ if_block.c();
2888
+ internal.transition_in(if_block, 1);
2889
+ if_block.m(div, null);
2890
+ }
2891
+ } else if (if_block) {
2892
+ internal.group_outros();
2893
+
2894
+ internal.transition_out(if_block, 1, 1, () => {
2895
+ if_block = null;
2896
+ });
2897
+
2898
+ internal.check_outros();
2899
+ }
2900
+ },
2901
+ i(local) {
2902
+ if (current) return;
2903
+ internal.transition_in(currentfloor.$$.fragment, local);
2904
+ internal.transition_in(camera.$$.fragment, local);
2905
+ internal.transition_in(if_block);
2906
+
2907
+ if (!div_intro) {
2908
+ internal.add_render_callback(() => {
2909
+ div_intro = internal.create_in_transition(div, transition.fade, {
2910
+ duration: /*duration*/ ctx[3],
2911
+ easing: easing.linear
2912
+ });
2913
+
2914
+ div_intro.start();
2915
+ });
2916
+ }
2917
+
2918
+ current = true;
2919
+ },
2920
+ o(local) {
2921
+ internal.transition_out(currentfloor.$$.fragment, local);
2922
+ internal.transition_out(camera.$$.fragment, local);
2923
+ internal.transition_out(if_block);
2924
+ current = false;
2925
+ },
2926
+ d(detaching) {
2927
+ if (detaching) internal.detach(div);
2928
+ internal.destroy_component(currentfloor);
2929
+ internal.destroy_component(camera);
2930
+ if (if_block) if_block.d();
2931
+ }
2932
+ };
2933
+ }
2934
+
2935
+ // (40:4) {#if compassEnable}
2936
+ function create_if_block_1(ctx) {
2937
+ let compass;
2938
+ let current;
2939
+
2940
+ compass = new Compass({
2941
+ props: {
2942
+ floorplanData: /*floorplanData*/ ctx[11],
2943
+ northDesc: /*northDesc*/ ctx[0]
2944
+ }
2945
+ });
2946
+
2947
+ return {
2948
+ c() {
2949
+ internal.create_component(compass.$$.fragment);
2950
+ },
2951
+ m(target, anchor) {
2952
+ internal.mount_component(compass, target, anchor);
2953
+ current = true;
2954
+ },
2955
+ p(ctx, dirty) {
2956
+ const compass_changes = {};
2957
+ if (dirty & /*floorplanData*/ 2048) compass_changes.floorplanData = /*floorplanData*/ ctx[11];
2958
+ if (dirty & /*northDesc*/ 1) compass_changes.northDesc = /*northDesc*/ ctx[0];
2959
+ compass.$set(compass_changes);
2960
+ },
2961
+ i(local) {
2962
+ if (current) return;
2963
+ internal.transition_in(compass.$$.fragment, local);
2964
+ current = true;
2965
+ },
2966
+ o(local) {
2967
+ internal.transition_out(compass.$$.fragment, local);
2968
+ current = false;
2969
+ },
2970
+ d(detaching) {
2971
+ internal.destroy_component(compass, detaching);
2972
+ }
2973
+ };
2974
+ }
2975
+
2976
+ function create_fragment(ctx) {
2977
+ let if_block_anchor;
2978
+ let current;
2979
+ let if_block = /*visible*/ ctx[4] && create_if_block(ctx);
2980
+
2981
+ return {
2982
+ c() {
2983
+ if (if_block) if_block.c();
2984
+ if_block_anchor = internal.empty();
2985
+ },
2986
+ m(target, anchor) {
2987
+ if (if_block) if_block.m(target, anchor);
2988
+ internal.insert(target, if_block_anchor, anchor);
2989
+ current = true;
2990
+ },
2991
+ p(ctx, [dirty]) {
2992
+ if (/*visible*/ ctx[4]) {
2993
+ if (if_block) {
2994
+ if_block.p(ctx, dirty);
2995
+
2996
+ if (dirty & /*visible*/ 16) {
2997
+ internal.transition_in(if_block, 1);
2998
+ }
2999
+ } else {
3000
+ if_block = create_if_block(ctx);
3001
+ if_block.c();
3002
+ internal.transition_in(if_block, 1);
3003
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
3004
+ }
3005
+ } else if (if_block) {
3006
+ internal.group_outros();
3007
+
3008
+ internal.transition_out(if_block, 1, 1, () => {
3009
+ if_block = null;
3010
+ });
3011
+
3012
+ internal.check_outros();
3013
+ }
3014
+ },
3015
+ i(local) {
3016
+ if (current) return;
3017
+ internal.transition_in(if_block);
3018
+ current = true;
3019
+ },
3020
+ o(local) {
3021
+ internal.transition_out(if_block);
3022
+ current = false;
3023
+ },
3024
+ d(detaching) {
3025
+ if (if_block) if_block.d(detaching);
3026
+ if (detaching) internal.detach(if_block_anchor);
3027
+ }
3028
+ };
3029
+ }
3030
+
3031
+ function instance($$self, $$props, $$invalidate) {
3032
+ let { northDesc } = $$props;
3033
+ let { pxmm } = $$props;
3034
+ let { five } = $$props;
3035
+ let { duration = 0 } = $$props;
3036
+ let { visible } = $$props;
3037
+ let { panoIndex } = $$props;
3038
+ let { floorIndex } = $$props;
3039
+ let { hoverEnable } = $$props;
3040
+ let { compassEnable } = $$props;
3041
+ let { roomLabelsEnable } = $$props;
3042
+ let { ruleLabelsEnable } = $$props;
3043
+ let { floorplanData } = $$props;
3044
+ let { lastPanoramaLongitude } = $$props;
3045
+ let { cameraImageUrl } = $$props;
3046
+ let { onRoomHeightClick } = $$props;
3047
+ let { getLabelElement } = $$props;
3048
+
3049
+ $$self.$$set = $$props => {
3050
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
3051
+ if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
3052
+ if ('five' in $$props) $$invalidate(2, five = $$props.five);
3053
+ if ('duration' in $$props) $$invalidate(3, duration = $$props.duration);
3054
+ if ('visible' in $$props) $$invalidate(4, visible = $$props.visible);
3055
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
3056
+ if ('floorIndex' in $$props) $$invalidate(6, floorIndex = $$props.floorIndex);
3057
+ if ('hoverEnable' in $$props) $$invalidate(7, hoverEnable = $$props.hoverEnable);
3058
+ if ('compassEnable' in $$props) $$invalidate(8, compassEnable = $$props.compassEnable);
3059
+ if ('roomLabelsEnable' in $$props) $$invalidate(9, roomLabelsEnable = $$props.roomLabelsEnable);
3060
+ if ('ruleLabelsEnable' in $$props) $$invalidate(10, ruleLabelsEnable = $$props.ruleLabelsEnable);
3061
+ if ('floorplanData' in $$props) $$invalidate(11, floorplanData = $$props.floorplanData);
3062
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(12, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
3063
+ if ('cameraImageUrl' in $$props) $$invalidate(13, cameraImageUrl = $$props.cameraImageUrl);
3064
+ if ('onRoomHeightClick' in $$props) $$invalidate(14, onRoomHeightClick = $$props.onRoomHeightClick);
3065
+ if ('getLabelElement' in $$props) $$invalidate(15, getLabelElement = $$props.getLabelElement);
3066
+ };
3067
+
3068
+ return [
3069
+ northDesc,
3070
+ pxmm,
3071
+ five,
3072
+ duration,
3073
+ visible,
3074
+ panoIndex,
3075
+ floorIndex,
3076
+ hoverEnable,
3077
+ compassEnable,
3078
+ roomLabelsEnable,
3079
+ ruleLabelsEnable,
3080
+ floorplanData,
3081
+ lastPanoramaLongitude,
3082
+ cameraImageUrl,
3083
+ onRoomHeightClick,
3084
+ getLabelElement
3085
+ ];
3086
+ }
3087
+
3088
+ class Main extends internal.SvelteComponent {
3089
+ constructor(options) {
3090
+ super();
3091
+
3092
+ internal.init(
3093
+ this,
3094
+ options,
3095
+ instance,
3096
+ create_fragment,
3097
+ internal.safe_not_equal,
3098
+ {
3099
+ northDesc: 0,
3100
+ pxmm: 1,
3101
+ five: 2,
3102
+ duration: 3,
3103
+ visible: 4,
3104
+ panoIndex: 5,
3105
+ floorIndex: 6,
3106
+ hoverEnable: 7,
3107
+ compassEnable: 8,
3108
+ roomLabelsEnable: 9,
3109
+ ruleLabelsEnable: 10,
3110
+ floorplanData: 11,
3111
+ lastPanoramaLongitude: 12,
3112
+ cameraImageUrl: 13,
3113
+ onRoomHeightClick: 14,
3114
+ getLabelElement: 15
3115
+ },
3116
+ add_css
3117
+ );
3118
+ }
3119
+ }
3120
+
3121
+ /**
3122
+ * 传入一个 Promise
3123
+ * 无异常,返回 [null, data]
3124
+ * 有异常,则返回 [Error, undefined]
3125
+ * 用于替代 try&catch 处理 await 异常的方案
3126
+ */
3127
+ async function to(promise) {
3128
+ try {
3129
+ const data = await promise;
3130
+ return [null, data];
3131
+ }
3132
+ catch (error) {
3133
+ if (error instanceof Error)
3134
+ return [error, null];
3135
+ return [new Error(''), null];
3136
+ }
3137
+ }
3138
+
3139
+ async function formatOutlines(outlines) {
3140
+ const headers = new Headers({ 'Content-Type': 'text/plain' });
3141
+ const getOutlineItem = async function (item) {
3142
+ const outlineItem = {
3143
+ index: item.index,
3144
+ url: item.url,
3145
+ svgUrl: item.svg_url,
3146
+ };
3147
+ if (item.svg_url) {
3148
+ const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
3149
+ outlineItem.svgContent = svgContent;
3150
+ }
3151
+ return outlineItem;
3152
+ };
3153
+ const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
3154
+ return svgOutlineItems;
3155
+ }
3156
+ function formatRoom(data) {
3157
+ const floorplanRoomItem = {
3158
+ id: data.id,
3159
+ size: data.size,
3160
+ name: data.name,
3161
+ path: data.path,
3162
+ roomType: data.room_type,
3163
+ floorType: data.floor_type,
3164
+ roomLabel: {
3165
+ position: data.room_label.position,
3166
+ positionInImage: data.room_label.position_in_image,
3167
+ },
3168
+ observerIndexs: data.observer_indexs,
3169
+ };
3170
+ return floorplanRoomItem;
3171
+ }
3172
+ function formatFloorData(_data) {
3173
+ return {
3174
+ floorName: _data.floor_name,
3175
+ floorIndex: _data.floor_index,
3176
+ rooms: _data.rooms.map(formatRoom),
3177
+ rules: _data.rules,
3178
+ };
3179
+ }
3180
+ function formateFloorplanObserver(data) {
3181
+ const floorplanObserver = {
3182
+ index: data.index,
3183
+ floorIndex: data.floor_index,
3184
+ position: data.position,
3185
+ positionInImage: data.position_in_image,
3186
+ };
3187
+ return floorplanObserver;
3188
+ }
3189
+ function formatFloorplanEntrance(data) {
3190
+ const floorplanEntrance = {
3191
+ rad: data.rad,
3192
+ position: data.position,
3193
+ positionInImage: data.position_in_image,
3194
+ northRad: data.north_rad,
3195
+ roomId: data.room_id,
3196
+ floorIndex: data.floor_index,
3197
+ };
3198
+ return floorplanEntrance;
3199
+ }
3200
+ async function formatData(data) {
3201
+ const outlines = await formatOutlines(data.outlines);
3202
+ const bounding = data.computed_data.bounding;
3203
+ const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
3204
+ const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
3205
+ const floorplanData = {
3206
+ outlines,
3207
+ entrance,
3208
+ bounding,
3209
+ floorDatas,
3210
+ observers: data.computed_data.observers.map(formateFloorplanObserver),
3211
+ };
3212
+ return floorplanData;
3213
+ }
3214
+
3215
+ /**
3216
+ * 检查一个值是否是狭义上的对象
3217
+ * @param {any} value 要检查的值
3218
+ *
3219
+ * isTruelyObject({})
3220
+ * // => true
3221
+ *
3222
+ * isObjectLike([1, 2, 3])
3223
+ * // => false
3224
+ *
3225
+ * isObjectLike(Function)
3226
+ * // => false
3227
+ *
3228
+ * isObjectLike(null)
3229
+ * // => false
3230
+ *
3231
+ */
3232
+ function isTruelyObject(value) {
3233
+ return Object.prototype.toString.call(value) === '[object Object]';
3234
+ }
3235
+
3236
+ /* eslint-disable @typescript-eslint/no-use-before-define */
3237
+ function baseIsEqual(value, other) {
3238
+ if (value === other)
3239
+ return true;
3240
+ if (typeof value !== typeof other)
3241
+ return false;
3242
+ if (Number.isNaN(value) && Number.isNaN(other))
3243
+ return true;
3244
+ return false;
3245
+ }
3246
+ function objEqualShallow(value, other) {
3247
+ const valueProps = Object.getOwnPropertyNames(value);
3248
+ const otherProps = Object.getOwnPropertyNames(other);
3249
+ if (valueProps.length !== otherProps.length)
3250
+ return false;
3251
+ for (let i = 0, len = valueProps.length; i < len; i++) {
3252
+ const propName = valueProps[i];
3253
+ if (!baseIsEqual(value[propName], other[propName]))
3254
+ return false;
3255
+ }
3256
+ return true;
3257
+ }
3258
+ function arrayEqualShallow(value, other) {
3259
+ if (value.length !== other.length)
3260
+ return false;
3261
+ for (let i = 0, len = value.length; i < len; i++) {
3262
+ if (!baseIsEqual(value[i], other[i]))
3263
+ return false;
3264
+ }
3265
+ return true;
3266
+ }
3267
+ function isShallowEqual(value, other) {
3268
+ if (baseIsEqual(value, other))
3269
+ return true;
3270
+ if (isTruelyObject(value) && isTruelyObject(other))
3271
+ return objEqualShallow(value, other);
3272
+ if (Array.isArray(value) && Array.isArray(other))
3273
+ return arrayEqualShallow(value, other);
3274
+ return false;
3275
+ }
3276
+ function isDeepEqual(value, other) {
3277
+ if (baseIsEqual(value, other))
3278
+ return true;
3279
+ if (isTruelyObject(value) && isTruelyObject(other))
3280
+ return objEqualDeep(value, other);
3281
+ if (Array.isArray(value) && Array.isArray(other))
3282
+ return arrayEqualDeep(value, other);
3283
+ return false;
3284
+ }
3285
+ function arrayEqualDeep(value, other) {
3286
+ if (value.length !== other.length)
3287
+ return false;
3288
+ for (let i = 0, len = value.length; i < len; i++) {
3289
+ if (!isDeepEqual(value[i], other[i]))
3290
+ return false;
3291
+ }
3292
+ return true;
3293
+ }
3294
+ function objEqualDeep(value, other) {
3295
+ const valueProps = Object.getOwnPropertyNames(value);
3296
+ const otherProps = Object.getOwnPropertyNames(other);
3297
+ if (valueProps.length !== otherProps.length)
3298
+ return false;
3299
+ for (let i = 0, len = valueProps.length; i < len; i++) {
3300
+ const propName = valueProps[i];
3301
+ if (!isDeepEqual(value[propName], other[propName]))
3302
+ return false;
3303
+ }
3304
+ return true;
3305
+ }
3306
+ /**
3307
+ * 对象比较
3308
+ * @param {*} value 第一个比较的值
3309
+ * @param {*} other 第二个比较的值
3310
+ * @param {Object} options 可选参数,可选项包括:<br />
3311
+ * deep {Boolean} 是否深比较<br />
3312
+ * @returns {boolean} 是否相等
3313
+ */
3314
+ function equal(value, other, opt = { deep: false }) {
3315
+ if (!opt.deep)
3316
+ return isShallowEqual(value, other);
3317
+ return isDeepEqual(value, other);
3318
+ }
3319
+
3320
+ var FLOOR_PLAN_ATTACHED_TO;
3321
+ (function (FLOOR_PLAN_ATTACHED_TO) {
3322
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["FLOOR"] = 1] = "FLOOR";
3323
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["CEILING"] = 2] = "CEILING";
3324
+ FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
3325
+ })(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
3326
+
3327
+ /**
3328
+ * 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
3329
+ * @param five five
3330
+ */
3331
+ function getPxmm(five, container, floorIndex, options) {
3332
+ const maxFloorIndex = Math.max(...five.work.observers.map((ob) => ob.floorIndex));
3333
+ function getFloorY(floorIndex) {
3334
+ return floorIndex > maxFloorIndex
3335
+ ? five.model.bounding.max.y
3336
+ : Math.max(...five.work.observers
3337
+ .filter((ob) => ob.floorIndex === floorIndex)
3338
+ .map((ob) => ob.standingPosition.y));
3339
+ }
3340
+ function getY() {
3341
+ const currentFloorY = getFloorY(floorIndex);
3342
+ const nextFloorY = getFloorY(floorIndex + 1);
3343
+ const attachedTo = options?.attachedTo || FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER;
3344
+ if (attachedTo === FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER)
3345
+ return (five.model.bounding.max.y + five.model.bounding.min.y) / 2;
3346
+ else if (attachedTo === FLOOR_PLAN_ATTACHED_TO.CEILING)
3347
+ return nextFloorY;
3348
+ else
3349
+ return currentFloorY;
3350
+ }
3351
+ const y = getY();
3352
+ const originPosition = new THREE__namespace.Vector3(0, y, 0);
3353
+ const originPositionXUnit = new THREE__namespace.Vector3(1, y, 0);
3354
+ const mouse = originPosition.clone().project(five.camera);
3355
+ const xUnitMouse = originPositionXUnit.clone().project(five.camera);
3356
+ const pxmm = Math.abs((xUnitMouse.x - mouse.x) / 1000) * (container.getBoundingClientRect().width / 2);
3357
+ return pxmm;
3358
+ }
3359
+
3360
+ async function changeMode(five, ...changeModeParams) {
3361
+ const [changeModeError] = await to(five.changeMode(...changeModeParams));
3362
+ if (changeModeError)
3363
+ throw changeModeError;
3364
+ await new Promise((reslove, reject) => {
3365
+ five.once('initAnimationEnded', reslove);
3366
+ const handleModeChange = (mode) => {
3367
+ if (mode !== changeModeParams[0])
3368
+ reject('changeMode 被中断');
3369
+ five.off('modeChange', handleModeChange);
3370
+ };
3371
+ five.on('modeChange', handleModeChange);
3372
+ });
3373
+ }
3374
+
3375
+ var FloorplanErrorType;
3376
+ (function (FloorplanErrorType) {
3377
+ FloorplanErrorType["UnknownError"] = "UnknowError";
3378
+ FloorplanErrorType["DataNotLoaded"] = "DataNotLoaded";
3379
+ FloorplanErrorType["BreakOffByHide"] = "BreakOffByHide";
3380
+ FloorplanErrorType["ModelNotLoaded"] = "ModelNotLoaded";
3381
+ FloorplanErrorType["ChangeModeError"] = "ChangeModeError";
3382
+ FloorplanErrorType["UpdateCameraError"] = "UpdateCameraError";
3383
+ FloorplanErrorType["DifferentShowParams"] = "DifferentShowParams";
3384
+ })(FloorplanErrorType || (FloorplanErrorType = {}));
3385
+ /** 户型图展示 & 模型消失的默认时间 */
3386
+ const SHOW_ANIME_DURATION = 500;
3387
+ /** Five camera 默认 fov */
3388
+ const FIVE_CAMERA_DEFAULT_FOV = 80;
3389
+
3390
+ /**
3391
+ * 比较两个数字近似相等
3392
+ * @param num1 数字1
3393
+ * @param num2 数字2
3394
+ * @param accuracy 精度:精确到小数点后几位,默认精确到 小数点后四位
3395
+ */
3396
+ function nearlyEqual(num1, num2, accuracy = 4) {
3397
+ return Math.floor(num1 * Math.pow(10, accuracy)) === Math.floor(num2 * Math.pow(10, accuracy));
3398
+ }
3399
+
3400
+ /** 判断当前状态是否可以展示户型图 */
3401
+ function checkShowState(five$1, showState) {
3402
+ if (five$1.currentMode !== five.Five.Mode.Floorplan)
3403
+ return false;
3404
+ const { latitude, longitude, fov } = showState;
3405
+ const { latitude: _latitude, longitude: _longitude } = five$1.getCurrentState();
3406
+ const _fov = five$1.camera.fov;
3407
+ if (nearlyEqual(latitude, _latitude, 1) && nearlyEqual(longitude, _longitude, 1) && fov === _fov)
3408
+ return true;
3409
+ return false;
3410
+ }
3411
+ /** 更改 Five 状态到展示户型图的状态
3412
+ * 1. 判断状态不符合时,会纠正到正确的状态
3413
+ * 2. 内置了相应的动画时间计算
3414
+ * 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
3415
+ */
3416
+ async function correctFiveState(five$1, showState, userAction = true) {
3417
+ // 当前已满足状态,不需要变更
3418
+ const result = checkShowState(five$1, showState);
3419
+ if (result === true)
3420
+ return;
3421
+ // 纠正 mode
3422
+ if (five$1.currentMode !== five.Five.Mode.Floorplan) {
3423
+ const [changeModeError] = await to(changeMode(five$1, five.Five.Mode.Floorplan, showState, undefined, userAction));
3424
+ if (changeModeError)
3425
+ throw changeModeError;
3426
+ // changeMode 是异步行为,可能会被打断,需要在结束后加一次判断
3427
+ const result = checkShowState(five$1, showState);
3428
+ if (result === false)
3429
+ throw new Error(FloorplanErrorType.ChangeModeError);
3430
+ return;
3431
+ }
3432
+ // 纠正相机状态
3433
+ // 根据 latitude、longitude、fov 计算动画时间,最多 1s
3434
+ const { latitude, longitude, fov } = five$1.getCurrentState();
3435
+ const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
3436
+ const [updateCameraError] = await to(five$1.updateCamera(showState, time, userAction));
3437
+ if (updateCameraError)
3438
+ throw new Error(FloorplanErrorType.UpdateCameraError);
3439
+ return;
3440
+ }
3441
+
3442
+ function changeModelCanvasOpacity(five, opacity, duration = 300) {
3443
+ const fiveEle = five.getElement();
3444
+ if (!fiveEle)
3445
+ return;
3446
+ fiveEle.style.opacity = opacity + '';
3447
+ fiveEle.style.transition = duration === 0 ? 'none' : `opacity ${duration}ms linear`;
3448
+ if (duration === 0)
3449
+ return;
3450
+ Promise.race([
3451
+ new Promise((res) => fiveEle.addEventListener('transitionend', res, { once: true })),
3452
+ new Promise((res) => setTimeout(res, duration)),
3453
+ ]).then(() => {
3454
+ fiveEle.style.transition = 'none';
3455
+ });
3456
+ }
3457
+
3458
+ /**
3459
+ * 把第一个参数传入第二个参数(函数)中并执行
3460
+ * 一般用于执行函数后返回变量。
3461
+ * @param {any} something
3462
+ * @param {function} callback
3463
+ * @return {any}
3464
+ */
3465
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3466
+ function tap(something, callback) {
3467
+ callback(something);
3468
+ return something;
3469
+ }
3470
+
3471
+ /**
3472
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
3473
+ * @param object
3474
+ * @param props 排除的属性
3475
+ * @return
3476
+ */
3477
+ function omit(object, props) {
3478
+ return tap({}, (result) => {
3479
+ for (const name in object) {
3480
+ if (props.indexOf(name) !== -1)
3481
+ continue;
3482
+ result[name] = object[name];
3483
+ }
3484
+ });
3485
+ }
3486
+
3487
+ const MODEL_FLOORPLAN_PLUGIN_NAME = 'modelFloorplanPlugin';
3488
+ class ModelFloorplanPluginController {
3489
+ name = MODEL_FLOORPLAN_PLUGIN_NAME;
3490
+ /** 用于绑定事件钩子 */
3491
+ hooks;
3492
+ /** 展示状态 */
3493
+ visible = false;
3494
+ /** 户型图大小 */
3495
+ size = { width: 0, height: 0 };
3496
+ app = undefined;
3497
+ pxmm = 0;
3498
+ five;
3499
+ panoIndex = 0;
3500
+ floorIndex = 0;
3501
+ configs = {};
3502
+ lastPanoramaLongitude = 0;
3503
+ selector;
3504
+ floorplanData;
3505
+ wrapper;
3506
+ container = document.createElement('div');
3507
+ showState;
3508
+ /** 记录上次 show 的参数,如果不一致,需要 reject 掉正在进行的 showPromise */
3509
+ ModelFloorplanPluginsShowOpts;
3510
+ showPromise;
3511
+ showRejection;
3512
+ constructor(five$1, params) {
3513
+ this.five = five$1;
3514
+ this.hooks = new five.Subscribe();
3515
+ this.selector = params.selector;
3516
+ this.configs = omit(params, ['selector']);
3517
+ this.showState = { longitude: 0, latitude: Math.PI / 2, fov: FIVE_CAMERA_DEFAULT_FOV / (params?.scale ?? 1) };
3518
+ // 设置 container 样式
3519
+ this.container.classList.add('floorplan-plugin');
3520
+ Object.assign(this.container.style, {
3521
+ position: 'absolute',
3522
+ left: '50%',
3523
+ top: '50%',
3524
+ transform: 'translate(-50%, -50%)',
3525
+ pointerEvents: 'none',
3526
+ zIndex: 10,
3527
+ });
3528
+ // 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
3529
+ this.five.model.loaded ? this.handleModelLoaded() : five$1.once('modelLoaded', this.handleModelLoaded);
3530
+ five$1.once('dispose', this.dispose);
3531
+ five$1.on('modeChange', this.handleModeChange);
3532
+ five$1.on('panoArrived', this.handlePanoArrived);
3533
+ five$1.on('wantsChangeMode', this.handleWantsChangeMode);
3534
+ five$1.on('wantsInteriaPan', this.handleWantsInteriaPan);
3535
+ five$1.on('modelShownFloorChange', this.onModelShownFloorChange);
3536
+ }
3537
+ dispose = () => {
3538
+ const five = this.five;
3539
+ this.hide();
3540
+ this.app?.$destroy();
3541
+ this.container?.remove();
3542
+ five.off('modelLoaded', this.handleModelLoaded);
3543
+ five.off('modeChange', this.handleModeChange);
3544
+ five.off('panGesture', this.handlePanGesture);
3545
+ five.off('panoArrived', this.handlePanoArrived);
3546
+ five.off('wantsChangeMode', this.handleWantsChangeMode);
3547
+ five.off('wantsInteriaPan', this.handleWantsInteriaPan);
3548
+ five.off('wantsTapGesture', this.handleWantsTapGesture);
3549
+ five.off('modelShownFloorChange', this.onModelShownFloorChange);
3550
+ };
3551
+ /** 加载户型图数据 */
3552
+ async load(data) {
3553
+ const copyData = JSON.parse(JSON.stringify(data));
3554
+ this.floorplanData = await formatData(copyData);
3555
+ this.render();
3556
+ }
3557
+ /** 把插件的渲染DOM插入到对应的容器中去 */
3558
+ appendTo(wrapper) {
3559
+ this.wrapper = wrapper;
3560
+ wrapper.appendChild(this.container);
3561
+ return this;
3562
+ }
3563
+ /** 更新户型图大小 */
3564
+ updateSize = () => {
3565
+ if (!this.floorplanData)
3566
+ return;
3567
+ if (!checkShowState(this.five, this.showState))
3568
+ return;
3569
+ if (!this.container || !this.wrapper)
3570
+ return;
3571
+ // 计算户型图展示大小
3572
+ const { min, max } = this.floorplanData.bounding;
3573
+ const width = max.x - min.x;
3574
+ const height = max.y - min.y;
3575
+ // 每毫米对应的 px 值
3576
+ const options = this.configs.attachedTo ? { attachedTo: this.configs.attachedTo } : undefined;
3577
+ const pxmm = getPxmm(this.five, this.wrapper, this.floorIndex, options);
3578
+ const _width = Math.ceil(width * pxmm);
3579
+ const _height = Math.ceil(height * pxmm);
3580
+ if (this.size.width === _width && this.size.height === _height)
3581
+ return;
3582
+ this.pxmm = pxmm;
3583
+ this.size = { width: _width, height: _height };
3584
+ this.container.style.width = _width + 'px';
3585
+ this.container.style.height = _height + 'px';
3586
+ };
3587
+ /** 展示户型图
3588
+ * 1. show 函数大部分情况下需要耗时
3589
+ * 2. 如果当前已经在展示中,将不会触发任何事件
3590
+ * 3. 如果展示过程被中断,将抛出错误
3591
+ * 4. 多次调用 show 方法,只会触发一次 showAnimationEnded 事件,但是展示结果会取决于最后一次调用参数
3592
+ * 5. 如果多次调用 show 方法,参数与上次参数不一致时,上次 show Promise 会被 reject
3593
+ * @param opts.floorIndex 楼层
3594
+ * @param opts.modelOpacity 模型透明度
3595
+ * @param opts.immediately 是否立即展示
3596
+ * @param opts.isAutoShow 是否是自动展示
3597
+ */
3598
+ show = async (opts) => {
3599
+ // 已经在展示中了
3600
+ if (!this.showPromise && this.visible)
3601
+ return true;
3602
+ if (!this.five.model?.loaded)
3603
+ throw new Error(FloorplanErrorType.ModelNotLoaded);
3604
+ if (!this.floorplanData)
3605
+ throw new Error(FloorplanErrorType.DataNotLoaded);
3606
+ this.visible = true;
3607
+ if (this.showPromise) {
3608
+ const sameWithLastOpts = equal(opts, this.ModelFloorplanPluginsShowOpts, { deep: false });
3609
+ if (!!this.showPromise && sameWithLastOpts)
3610
+ return this.showPromise;
3611
+ if (!!this.showPromise && !sameWithLastOpts)
3612
+ this.showRejection?.(FloorplanErrorType.DifferentShowParams);
3613
+ }
3614
+ this.ModelFloorplanPluginsShowOpts = opts;
3615
+ const getShowPromise = async () => {
3616
+ let hasRejected = false;
3617
+ let externalErrorMsg;
3618
+ this.showRejection = (errorMsg) => {
3619
+ hasRejected = true;
3620
+ externalErrorMsg = errorMsg;
3621
+ };
3622
+ const [correctError] = await to(correctFiveState(this.five, this.showState, opts?.userAction));
3623
+ if (correctError)
3624
+ throw correctError;
3625
+ // 异步结束要判断当前是不是被中断了,是不是调用了隐藏
3626
+ if (hasRejected)
3627
+ throw externalErrorMsg ? new Error(externalErrorMsg) : new Error(FloorplanErrorType.UnknownError);
3628
+ if (!this.visible)
3629
+ throw new Error(FloorplanErrorType.UnknownError);
3630
+ // 更新户型图状态
3631
+ this.visible = true;
3632
+ // 更新户型图大小
3633
+ this.updateSize();
3634
+ // 高亮当前楼层,有两个目的
3635
+ // 1. 点击模型时,可以跳转到当前楼层的点位上
3636
+ // 2. 当前楼层比较小时,户型图也比较小,如果展示全部楼层,会展示户型图外有一圈模型
3637
+ if (opts?.floorIndex)
3638
+ this.floorIndex = opts.floorIndex;
3639
+ this.five.model.show(this.floorIndex);
3640
+ // 模型消失, 渲染户型图
3641
+ const modelOpacity = opts?.modelOpacity ?? this.configs.modelOpacity ?? 1;
3642
+ const renderDuration = opts?.immediately ? 0 : SHOW_ANIME_DURATION;
3643
+ changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
3644
+ this.render(renderDuration);
3645
+ // 展示之后的事件监听
3646
+ this.five.on('wantsGesture', this.handleWantsGesture);
3647
+ this.five.on('wantsTapGesture', this.handleWantsTapGesture);
3648
+ return true;
3649
+ };
3650
+ const showPromise = getShowPromise()
3651
+ .then(() => {
3652
+ this.hooks.emit('showAnimationEnded', { auto: !!opts?.isAutoShow, userAction: opts?.userAction ?? true });
3653
+ return true;
3654
+ })
3655
+ .catch((error) => {
3656
+ // 自动展示的报错内部处理
3657
+ if (opts?.isAutoShow)
3658
+ return false;
3659
+ if (!(error instanceof Error))
3660
+ return false;
3661
+ // 非自动展示的报错继续向外抛出
3662
+ throw error;
3663
+ })
3664
+ .finally(() => {
3665
+ this.showPromise = undefined;
3666
+ this.showRejection = undefined;
3667
+ });
3668
+ this.showPromise = showPromise;
3669
+ return showPromise;
3670
+ };
3671
+ /** 隐藏户型图 */
3672
+ hide = (options) => {
3673
+ if (this.size.width === 0)
3674
+ return true;
3675
+ if (this.visible === false)
3676
+ return true;
3677
+ const isAutoHide = !!options?.isAutoHide;
3678
+ this.five.off('wantsGesture', this.handleWantsGesture);
3679
+ this.five.off('wantsTapGesture', this.handleWantsTapGesture);
3680
+ this.visible = false;
3681
+ this.showRejection?.(FloorplanErrorType.BreakOffByHide);
3682
+ changeModelCanvasOpacity(this.five, 1, 0);
3683
+ this.render();
3684
+ this.hooks.emit('hide', { auto: isAutoHide, userAction: options?.userAction ?? true });
3685
+ return true;
3686
+ };
3687
+ /** 更改户型图楼层 */
3688
+ changeFloor(floorIndex) {
3689
+ this.five.model.show(floorIndex);
3690
+ this.floorIndex = floorIndex;
3691
+ this.render();
3692
+ }
3693
+ changeConfigs(params) {
3694
+ Object.assign(this.configs, params);
3695
+ if (!this.container)
3696
+ return;
3697
+ this.render();
3698
+ }
3699
+ /** 模型楼层高亮改变时,自动进行楼层切换 */
3700
+ onModelShownFloorChange = (shownFloor) => {
3701
+ if (shownFloor === null)
3702
+ return;
3703
+ this.floorIndex = shownFloor;
3704
+ this.updateSize();
3705
+ this.render();
3706
+ };
3707
+ handleModelLoaded = () => {
3708
+ if (this.wrapper)
3709
+ return;
3710
+ if (!this.selector)
3711
+ return;
3712
+ const wrapper = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
3713
+ if (!wrapper)
3714
+ throw new Error('不正确的父容器选择器');
3715
+ this.wrapper = wrapper;
3716
+ wrapper.append(this.container);
3717
+ };
3718
+ handleClick = () => {
3719
+ if (!this.visible)
3720
+ return;
3721
+ const prevented = this.hooks.emit('click');
3722
+ if (prevented)
3723
+ return false;
3724
+ };
3725
+ handleWantsTapGesture = () => this.handleClick();
3726
+ /** 从 Panorama 切换到其他模态时,记录当前的相机水平视角 */
3727
+ handleWantsChangeMode = (mode) => {
3728
+ if (mode !== 'Panorama') {
3729
+ this.lastPanoramaLongitude = this.five.getCurrentState().longitude;
3730
+ }
3731
+ if (mode !== 'Floorplan')
3732
+ this.hide();
3733
+ };
3734
+ /** 监听模型态变化,只有在模型态才进行手势动作监听 */
3735
+ handleModeChange = (mode) => {
3736
+ if (mode === 'Floorplan') {
3737
+ this.five.on('panGesture', this.handlePanGesture);
3738
+ }
3739
+ else {
3740
+ this.hide();
3741
+ this.five.off('panGesture', this.handlePanGesture);
3742
+ }
3743
+ };
3744
+ /** panoIndex 改变时,更新 floorIndex */
3745
+ handlePanoArrived = (index) => {
3746
+ if (!this.five?.work)
3747
+ return;
3748
+ this.panoIndex = index;
3749
+ this.floorIndex = this.five.work.observers[index].floorIndex;
3750
+ };
3751
+ /** 当户型图正在展示中的时候禁用惯性 */
3752
+ handleWantsInteriaPan = () => {
3753
+ if (this.visible)
3754
+ return false;
3755
+ };
3756
+ /** 在户型图展示时阻止多指操作, 阻止鼠标放大 */
3757
+ handleWantsGesture = (type, pointers) => {
3758
+ if (!this.visible)
3759
+ return;
3760
+ if (pointers.length > 1)
3761
+ return false;
3762
+ if (type === 'mouseWheel')
3763
+ return false;
3764
+ };
3765
+ /** 监听三维模型滑动
3766
+ * 1. 在三维模型转动结束时,如果达到设置的阈值,会自动切换到户型图
3767
+ * 2. 如何户型图已经展示,滑动时关闭户型图
3768
+ */
3769
+ handlePanGesture = async ({ latitude, longitude }, isFinal) => {
3770
+ if (this.configs.autoShowEnable === false)
3771
+ return;
3772
+ // 如果操作结束后,户型图还在展示中,初始化模型状态
3773
+ if (isFinal && this.visible)
3774
+ return this.five.setState(this.showState, true);
3775
+ // 满足消失的条件:
3776
+ // 水平旋转角大于正负 5 度 || 俯仰角度大于 5 度
3777
+ const latitudeHide = Math.abs(latitude - Math.PI / 2) > (5 * Math.PI) / 180;
3778
+ const longitudeHide = longitude > 5 * (Math.PI / 180) && longitude < 355 * (Math.PI / 180);
3779
+ const canHide = latitudeHide || longitudeHide;
3780
+ if (this.visible && canHide)
3781
+ return this.hide({ isAutoHide: true });
3782
+ if (this.five.camera.fov / FIVE_CAMERA_DEFAULT_FOV < 0.8)
3783
+ return;
3784
+ // 户型图展示条件:
3785
+ // 水平旋转角正负 30 度 && 俯仰角度小于 10 度
3786
+ const latitudeVisible = Math.abs(latitude - Math.PI / 2) < (10 * Math.PI) / 180;
3787
+ const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
3788
+ if (isFinal && !this.visible && latitudeVisible && longitudeVisible) {
3789
+ // 当手指离开时需要等惯性结束之后在进行判断
3790
+ const handleInteriaPan = async (any, isFinal) => {
3791
+ if (!isFinal)
3792
+ return;
3793
+ this.five.off('interiaPan', handleInteriaPan);
3794
+ await this.show({ isAutoShow: true });
3795
+ };
3796
+ this.five.on('interiaPan', handleInteriaPan);
3797
+ return;
3798
+ }
3799
+ };
3800
+ render(duration) {
3801
+ if (!this.container || !this.floorplanData)
3802
+ return;
3803
+ if (this.size.width === 0)
3804
+ return;
3805
+ const { northDesc, hoverEnable, cameraImageUrl, getLabelElement, roomLabelsEnable, compassEnable, ruleLabelsEnable } = this.configs;
3806
+ const props = {
3807
+ northDesc: northDesc ?? '北',
3808
+ five: this.five,
3809
+ pxmm: this.pxmm,
3810
+ cameraImageUrl,
3811
+ visible: this.visible,
3812
+ duration: duration ?? 0,
3813
+ panoIndex: this.panoIndex,
3814
+ floorIndex: this.floorIndex,
3815
+ floorplanData: this.floorplanData,
3816
+ hoverEnable: hoverEnable ?? false,
3817
+ compassEnable: compassEnable ?? true,
3818
+ ruleLabelsEnable: ruleLabelsEnable ?? true,
3819
+ roomLabelsEnable: roomLabelsEnable ?? true,
3820
+ lastPanoramaLongitude: this.lastPanoramaLongitude,
3821
+ getLabelElement,
3822
+ onRoomHeightClick: this.handleClick,
3823
+ };
3824
+ if (!this.app) {
3825
+ this.app = new Main({
3826
+ target: this.container,
3827
+ intro: true,
3828
+ props,
3829
+ });
3830
+ }
3831
+ else {
3832
+ this.app.$set(props);
3833
+ }
3834
+ }
3835
+ }
3836
+
3837
+ const ModelFloorplanPlugin = (five, params) => {
3838
+ return new ModelFloorplanPluginController(five, params);
3839
+ };
3840
+
3841
+ exports.ModelFloorplanPlugin = ModelFloorplanPlugin;
3842
+ exports["default"] = ModelFloorplanPlugin;